summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2020-12-27 17:47:37 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2021-01-30 17:13:33 +0000
commitb30d193948be5a7794d7ae3ba0ed9c2f72c88e0f (patch)
tree6a37e590faffb9bb9af66887de645c546445036c /usr/src
parentdf36e06d12cbf655ddf22339ef8c39fa2b83ebf8 (diff)
downloadillumos-joyent-b30d193948be5a7794d7ae3ba0ed9c2f72c88e0f.tar.gz
13405 ksh93 update to 2012-08-01
13434 sh: mishandles backslash as last character of a block of input 11750 ksh mkdir builtin doesn't honor special file permissions 9199 ksh93 builtin *grep -v mishandles blank lines, blows up libgcrypt-config 6756 sh (and ksh) have issues with ${1+"$@"} 6520 ksh: sleep could wait forever 4860 ksh93: core in printf 3791 /bin/sh's builtin 'rm' busted: 'rm -f' without arguments returns error 1047 ksh overwrites child core files 880 ksh93 coredumps on 'unset' 499 "interrupted system call" when using "tee" builtin in ksh Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Reviewed by: Dominik Hassler <hadfl@omnios.org> Approved by: Rich Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/Makefile.ast82
-rw-r--r--usr/src/cmd/Makefile8
-rw-r--r--usr/src/cmd/ast/Makefile81
-rw-r--r--usr/src/cmd/ast/Makefile.ast165
-rw-r--r--usr/src/cmd/ast/Makefile.asthdr (renamed from usr/src/lib/Makefile.asthdr)11
-rw-r--r--usr/src/cmd/ast/Makefile.astmsg (renamed from usr/src/lib/Makefile.astmsg)15
-rw-r--r--usr/src/cmd/ast/Makefile.iffe71
-rw-r--r--usr/src/cmd/ast/README.ast18
-rw-r--r--usr/src/cmd/ast/THIRDPARTYLICENSE245
-rw-r--r--usr/src/cmd/ast/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/cmd/ast/ksh/Makefile (renamed from usr/src/cmd/ksh/Makefile)24
-rw-r--r--usr/src/cmd/ast/ksh/Makefile.com (renamed from usr/src/cmd/ksh/Makefile.com)42
-rw-r--r--usr/src/cmd/ast/ksh/Makefile.testshell (renamed from usr/src/cmd/ksh/Makefile.testshell)54
-rw-r--r--usr/src/cmd/ast/ksh/amd64/Makefile (renamed from usr/src/cmd/ksh/amd64/Makefile)8
-rw-r--r--usr/src/cmd/ast/ksh/builtins/Makefile (renamed from usr/src/cmd/ksh/builtins/Makefile)31
-rw-r--r--usr/src/cmd/ast/ksh/builtins/alias.c (renamed from usr/src/cmd/ksh/builtins/alias.c)83
-rw-r--r--usr/src/cmd/ast/ksh/i386/Makefile (renamed from usr/src/cmd/ksh/sparc/Makefile)6
-rw-r--r--usr/src/cmd/ast/ksh/sparc/Makefile (renamed from usr/src/cmd/ksh/i386/Makefile)6
-rw-r--r--usr/src/cmd/ast/ksh/sparcv9/Makefile (renamed from usr/src/cmd/ksh/sparcv9/Makefile)8
-rw-r--r--usr/src/cmd/ast/libast/Makefile63
-rw-r--r--usr/src/cmd/ast/libast/Makefile.com157
-rw-r--r--usr/src/cmd/ast/libast/Makefile.defs654
-rw-r--r--usr/src/cmd/ast/libast/Makefile.iffe38
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/align (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/align)7
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/api89
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/aso24
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/asometh7
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/botch5
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/ccode (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/ccode)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/common (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/common)16
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/dirent (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/dirent)4
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/eaccess5
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/errno (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/errno)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/fcntl (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fcntl)6
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/float (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/float)70
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/fs (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fs)7
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/hack5
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/iconv (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/iconv)40
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/lib (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/lib)15
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/libpath (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/libpath)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/limits (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/limits)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/locale6
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/map (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/map)20
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/mmap (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mmap)3
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/mode (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mode)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/ndbm (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/ndbm)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/nl_types (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/nl_types)4
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/omitted5
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/options5
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/param (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/param)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/preroot6
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/prog (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/prog)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/sfinit (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sfinit)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/sfio (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sfio)3
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/sig (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/sig)4
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/siglist (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/siglist)5
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/signal (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/signal)58
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/sizeof10
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/standards45
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/stdio (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/stdio)10
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/sys (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sys)13
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/syscall10
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/time (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/time)4
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/tmlib (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmlib)4
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/tmx (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmx)4
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/tty (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/tty)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/tv (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tv)4
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/tvlib (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/tvlib)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/uwin37
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/vfork (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/vfork)8
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/vmalloc (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/vmalloc)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/wait (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/wait)2
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/wchar (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wchar)27
-rw-r--r--usr/src/cmd/ast/libast/amd64/FEATURE/wctype75
-rw-r--r--usr/src/cmd/ast/libast/amd64/Makefile (renamed from usr/src/lib/libast/amd64/Makefile)12
-rw-r--r--usr/src/cmd/ast/libast/amd64/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libast/amd64/conflim.h105
-rw-r--r--usr/src/cmd/ast/libast/amd64/conftab.c (renamed from usr/src/lib/libast/amd64/src/lib/libast/conftab.c)9
-rw-r--r--usr/src/cmd/ast/libast/amd64/conftab.h (renamed from usr/src/lib/libast/i386/src/lib/libast/conftab.h)6
-rw-r--r--usr/src/cmd/ast/libast/amd64/lc.h131
-rw-r--r--usr/src/cmd/ast/libast/amd64/lctab.c (renamed from usr/src/lib/libast/i386/src/lib/libast/lctab.c)15
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/align (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/align)7
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/api89
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/aso24
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/asometh7
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/botch5
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/ccode (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/ccode)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/common (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/common)16
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/dirent (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/dirent)4
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/eaccess5
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/errno (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/errno)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/fcntl (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fcntl)6
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/float (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/float)61
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/fs (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/fs)7
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/hack5
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/iconv (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/iconv)40
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/lib (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/lib)15
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/libpath (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/libpath)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/limits (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/limits)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/locale6
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/map (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/map)20
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/mmap (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/mmap)3
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/mode (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/mode)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/ndbm (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/ndbm)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/nl_types (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/nl_types)4
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/omitted5
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/options5
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/param (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/param)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/preroot6
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/prog (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/prog)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/sfinit (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/sfinit)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/sfio (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/sfio)3
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/sig (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sig)4
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/siglist (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/siglist)5
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/signal (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/signal)58
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/sizeof10
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/standards45
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/stdio (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/stdio)10
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/sys (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sys)13
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/syscall10
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/time (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/time)4
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/tmlib (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tmlib)4
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/tmx (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tmx)4
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/tty (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tty)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/tv (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/tv)4
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/tvlib (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tvlib)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/uwin37
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/vfork (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/vfork)8
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/vmalloc (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/vmalloc)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/wait (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/wait)2
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/wchar (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/wchar)27
-rw-r--r--usr/src/cmd/ast/libast/i386/FEATURE/wctype75
-rw-r--r--usr/src/cmd/ast/libast/i386/Makefile (renamed from usr/src/lib/libast/i386/Makefile)10
-rw-r--r--usr/src/cmd/ast/libast/i386/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libast/i386/conflim.h105
-rw-r--r--usr/src/cmd/ast/libast/i386/conftab.c (renamed from usr/src/lib/libast/sparc/src/lib/libast/conftab.c)9
-rw-r--r--usr/src/cmd/ast/libast/i386/conftab.h (renamed from usr/src/lib/libast/amd64/src/lib/libast/conftab.h)6
-rw-r--r--usr/src/cmd/ast/libast/i386/lc.h131
-rw-r--r--usr/src/cmd/ast/libast/i386/lctab.c (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/lctab.c)15
-rw-r--r--usr/src/cmd/ast/libast/mapfile-vers (renamed from usr/src/lib/libast/mapfile-vers)25
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/align (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/align)7
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/api89
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/aso25
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/asometh7
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/botch5
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/ccode (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_ccode.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/common (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/common)16
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/dirent (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_dirent.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/eaccess5
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/errno (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/errno)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/fcntl (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fcntl)6
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/float (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/float)57
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/fs (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fs)7
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/hack5
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/iconv (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/iconv)40
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/lib (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/lib)15
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/libpath (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/libpath)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/limits (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_limits.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/locale6
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/map (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/map)20
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/mmap (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_mmap.h)3
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/mode (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_mode.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/ndbm (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_ndbm.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/nl_types (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_nl_types.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/omitted5
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/options5
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/param (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_param.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/preroot6
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/prog (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/prog)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/sfinit (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sfinit)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/sfio (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sfio)3
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/sig (renamed from usr/src/lib/libast/amd64/src/lib/libast/sig.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/siglist (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/siglist)5
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/signal (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/signal)58
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/sizeof10
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/standards45
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/stdio (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_stdio.h)10
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/sys (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/sys)13
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/syscall10
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/time (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_time.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/tmlib (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmlib)4
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/tmx (renamed from usr/src/lib/libast/amd64/src/lib/libast/tmx.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/tty (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_tty.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/tv (renamed from usr/src/lib/libast/amd64/src/lib/libast/tv.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/tvlib (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tvlib)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/uwin37
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/vfork (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_vfork.h)8
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/vmalloc (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vmalloc)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/wait (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_wait.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/wchar (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wchar)27
-rw-r--r--usr/src/cmd/ast/libast/sparc/FEATURE/wctype75
-rw-r--r--usr/src/cmd/ast/libast/sparc/Makefile (renamed from usr/src/lib/libast/sparc/Makefile)11
-rw-r--r--usr/src/cmd/ast/libast/sparc/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libast/sparc/conflim.h105
-rw-r--r--usr/src/cmd/ast/libast/sparc/conftab.c (renamed from usr/src/lib/libast/i386/src/lib/libast/conftab.c)9
-rw-r--r--usr/src/cmd/ast/libast/sparc/conftab.h (renamed from usr/src/lib/libast/sparc/src/lib/libast/conftab.h)6
-rw-r--r--usr/src/cmd/ast/libast/sparc/lc.h131
-rw-r--r--usr/src/cmd/ast/libast/sparc/lctab.c (renamed from usr/src/lib/libast/sparc/src/lib/libast/lctab.c)15
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/align (renamed from usr/src/lib/libast/amd64/src/lib/libast/align.h)7
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/api89
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/aso24
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/asometh7
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/botch5
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/ccode (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_ccode.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/common (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/common)16
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/dirent (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_dirent.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/eaccess5
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/errno (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/errno)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/fcntl (renamed from usr/src/lib/libast/i386/src/lib/libast/FEATURE/fcntl)6
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/float (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/float)57
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/fs (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_fs.h)7
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/hack5
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/iconv (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/iconv)40
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/lib (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib)15
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/libpath (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/libpath)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/limits (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_limits.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/locale6
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/map (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/map)20
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/mmap (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_mmap.h)3
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/mode (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_mode.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/ndbm (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_ndbm.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/nl_types (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_nl_types.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/omitted5
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/options5
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/param (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_param.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/preroot6
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/prog (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/prog)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/sfinit (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sfinit)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/sfio (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sfio)3
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/sig (renamed from usr/src/lib/libast/i386/src/lib/libast/sig.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/siglist (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/siglist)5
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/signal (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/signal)58
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/sizeof10
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/standards45
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/stdio (renamed from usr/src/lib/libast/sparc/src/lib/libast/FEATURE/stdio)10
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/sys (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sys)13
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/syscall10
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/time (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_time.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/tmlib (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmlib)4
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/tmx (renamed from usr/src/lib/libast/i386/src/lib/libast/tmx.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/tty (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_tty.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/tv (renamed from usr/src/lib/libast/i386/src/lib/libast/tv.h)4
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/tvlib (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tvlib)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/uwin37
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/vfork (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_vfork.h)8
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/vmalloc (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vmalloc)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/wait (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_wait.h)2
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/wchar (renamed from usr/src/lib/libast/amd64/src/lib/libast/FEATURE/wchar)27
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/FEATURE/wctype75
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/Makefile (renamed from usr/src/lib/libast/sparcv9/Makefile)13
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/conflim.h105
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/conftab.c (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/conftab.c)9
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/conftab.h (renamed from usr/src/lib/libast/sparcv9/src/lib/libast/conftab.h)6
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/lc.h131
-rw-r--r--usr/src/cmd/ast/libast/sparcv9/lctab.c (renamed from usr/src/lib/libast/amd64/src/lib/libast/lctab.c)15
-rw-r--r--usr/src/cmd/ast/libcmd/Makefile (renamed from usr/src/lib/libcmd/Makefile)34
-rw-r--r--usr/src/cmd/ast/libcmd/Makefile.com (renamed from usr/src/lib/libcmd/Makefile.com)151
-rw-r--r--usr/src/cmd/ast/libcmd/Makefile.defs35
-rw-r--r--usr/src/cmd/ast/libcmd/Makefile.iffe22
-rw-r--r--usr/src/cmd/ast/libcmd/amd64/FEATURE/ids (renamed from usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/ids)6
-rw-r--r--usr/src/cmd/ast/libcmd/amd64/FEATURE/sockets (renamed from usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/sockets)4
-rw-r--r--usr/src/cmd/ast/libcmd/amd64/FEATURE/symlink6
-rw-r--r--usr/src/cmd/ast/libcmd/amd64/FEATURE/utsname (renamed from usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/utsname)5
-rw-r--r--usr/src/cmd/ast/libcmd/amd64/Makefile (renamed from usr/src/lib/libcmd/amd64/Makefile)6
-rw-r--r--usr/src/cmd/ast/libcmd/amd64/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libcmd/i386/FEATURE/ids (renamed from usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/ids)6
-rw-r--r--usr/src/cmd/ast/libcmd/i386/FEATURE/sockets (renamed from usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/sockets)4
-rw-r--r--usr/src/cmd/ast/libcmd/i386/FEATURE/symlink6
-rw-r--r--usr/src/cmd/ast/libcmd/i386/FEATURE/utsname (renamed from usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/utsname)5
-rw-r--r--usr/src/cmd/ast/libcmd/i386/Makefile (renamed from usr/src/lib/libcmd/i386/Makefile)4
-rw-r--r--usr/src/cmd/ast/libcmd/i386/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libcmd/mapfile-vers (renamed from usr/src/lib/libcmd/mapfile-vers)12
-rw-r--r--usr/src/cmd/ast/libcmd/sparc/FEATURE/ids (renamed from usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids)6
-rw-r--r--usr/src/cmd/ast/libcmd/sparc/FEATURE/sockets (renamed from usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/sockets)4
-rw-r--r--usr/src/cmd/ast/libcmd/sparc/FEATURE/symlink6
-rw-r--r--usr/src/cmd/ast/libcmd/sparc/FEATURE/utsname (renamed from usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/utsname)5
-rw-r--r--usr/src/cmd/ast/libcmd/sparc/Makefile (renamed from usr/src/lib/libcmd/sparc/Makefile)2
-rw-r--r--usr/src/cmd/ast/libcmd/sparc/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libcmd/sparcv9/FEATURE/ids (renamed from usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/ids)6
-rw-r--r--usr/src/cmd/ast/libcmd/sparcv9/FEATURE/sockets (renamed from usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/sockets)4
-rw-r--r--usr/src/cmd/ast/libcmd/sparcv9/FEATURE/symlink6
-rw-r--r--usr/src/cmd/ast/libcmd/sparcv9/FEATURE/utsname (renamed from usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/utsname)5
-rw-r--r--usr/src/cmd/ast/libcmd/sparcv9/Makefile (renamed from usr/src/lib/libcmd/sparcv9/Makefile)6
-rw-r--r--usr/src/cmd/ast/libcmd/sparcv9/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libdll/Makefile (renamed from usr/src/lib/libdll/Makefile)34
-rw-r--r--usr/src/cmd/ast/libdll/Makefile.com (renamed from usr/src/lib/libdll/Makefile.com)79
-rw-r--r--usr/src/cmd/ast/libdll/Makefile.defs31
-rw-r--r--usr/src/cmd/ast/libdll/Makefile.iffe22
-rw-r--r--usr/src/cmd/ast/libdll/amd64/FEATURE/dll (renamed from usr/src/lib/libdll/amd64/src/lib/libdll/FEATURE/dll)27
-rw-r--r--usr/src/cmd/ast/libdll/amd64/Makefile (renamed from usr/src/lib/libdll/amd64/Makefile)6
-rw-r--r--usr/src/cmd/ast/libdll/amd64/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libdll/i386/FEATURE/dll (renamed from usr/src/lib/libdll/sparc/src/lib/libdll/FEATURE/dll)27
-rw-r--r--usr/src/cmd/ast/libdll/i386/Makefile (renamed from usr/src/lib/libdll/i386/Makefile)4
-rw-r--r--usr/src/cmd/ast/libdll/i386/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libdll/mapfile-vers (renamed from usr/src/lib/libdll/mapfile-vers)12
-rw-r--r--usr/src/cmd/ast/libdll/sparc/FEATURE/dll (renamed from usr/src/lib/libdll/i386/src/lib/libdll/FEATURE/dll)27
-rw-r--r--usr/src/cmd/ast/libdll/sparc/Makefile (renamed from usr/src/lib/libdll/sparc/Makefile)4
-rw-r--r--usr/src/cmd/ast/libdll/sparc/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libdll/sparcv9/FEATURE/dll (renamed from usr/src/lib/libdll/sparcv9/src/lib/libdll/FEATURE/dll)27
-rw-r--r--usr/src/cmd/ast/libdll/sparcv9/Makefile (renamed from usr/src/lib/libdll/sparcv9/Makefile)6
-rw-r--r--usr/src/cmd/ast/libdll/sparcv9/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libpp/Makefile (renamed from usr/src/lib/libpp/Makefile)33
-rw-r--r--usr/src/cmd/ast/libpp/Makefile.com (renamed from usr/src/lib/libpp/Makefile.com)99
-rw-r--r--usr/src/cmd/ast/libpp/Makefile.defs32
-rw-r--r--usr/src/cmd/ast/libpp/i386/Makefile (renamed from usr/src/lib/libpp/sparc/Makefile)0
-rw-r--r--usr/src/cmd/ast/libpp/mapfile-vers (renamed from usr/src/lib/libpp/mapfile-vers)1
-rw-r--r--usr/src/cmd/ast/libpp/sparc/Makefile (renamed from usr/src/lib/libpp/i386/Makefile)3
-rw-r--r--usr/src/cmd/ast/libshell/Makefile (renamed from usr/src/lib/libshell/Makefile)37
-rw-r--r--usr/src/cmd/ast/libshell/Makefile.com100
-rw-r--r--usr/src/cmd/ast/libshell/Makefile.defs96
-rw-r--r--usr/src/cmd/ast/libshell/Makefile.demo (renamed from usr/src/lib/libshell/Makefile.demo)82
-rw-r--r--usr/src/cmd/ast/libshell/Makefile.doc (renamed from usr/src/lib/libshell/Makefile.doc)7
-rw-r--r--usr/src/cmd/ast/libshell/Makefile.iffe27
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/acct8
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/cmds22
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/dynamic16
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/execargs5
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/externs (renamed from usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs)10
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/locale (renamed from usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale)17
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/math (renamed from usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math)136
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/options21
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/poll (renamed from usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll)13
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/pstat5
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/rlimits37
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/setjmp (renamed from usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp)8
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/sigfeatures (renamed from usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures)13
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/time (renamed from usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time)8
-rw-r--r--usr/src/cmd/ast/libshell/amd64/FEATURE/ttys14
-rw-r--r--usr/src/cmd/ast/libshell/amd64/Makefile (renamed from usr/src/lib/libsum/sparcv9/Makefile)2
-rw-r--r--usr/src/cmd/ast/libshell/amd64/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libshell/common/illumos_cmdlist.h (renamed from usr/src/lib/libshell/common/data/solaris_cmdlist.h)24
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/cpvprint.sh (renamed from usr/src/lib/libshell/common/scripts/cpvprint.sh)2
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/crawlsrccomments.sh (renamed from usr/src/lib/libshell/common/scripts/crawlsrccomments.sh)156
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/filemutexdemo1.sh (renamed from usr/src/lib/libshell/common/scripts/filemutexdemo1.sh)62
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/filetree1.sh (renamed from usr/src/lib/libshell/common/scripts/filetree1.sh)20
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/gnaw.sh (renamed from usr/src/lib/libshell/common/scripts/gnaw.sh)94
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/mandelbrotset1.sh (renamed from usr/src/lib/libshell/common/scripts/mandelbrotset1.sh)12
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/multifollow.sh (renamed from usr/src/lib/libshell/common/scripts/multifollow.sh)8
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/numtree1.sh (renamed from usr/src/lib/libshell/common/scripts/numtree1.sh)12
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/primenumbers1.sh (renamed from usr/src/lib/libshell/common/scripts/primenumbers1.sh)2
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/rssread.sh (renamed from usr/src/lib/libshell/common/scripts/rssread.sh)72
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/shcalc.sh (renamed from usr/src/lib/libshell/common/scripts/shcalc.sh)38
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/shircbot.sh (renamed from usr/src/lib/libshell/common/scripts/shircbot.sh)82
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/shlint.sh (renamed from usr/src/lib/libshell/common/scripts/shlint.sh)2
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/shman.sh (renamed from usr/src/lib/libshell/common/scripts/shman.sh)42
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/shnote.sh (renamed from usr/src/lib/libshell/common/scripts/shnote.sh)66
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/shpiano.sh (renamed from usr/src/lib/libshell/common/scripts/shpiano.sh)18
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/shtinyurl.sh (renamed from usr/src/lib/libshell/common/scripts/shtinyurl.sh)22
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/shtwitter.sh (renamed from usr/src/lib/libshell/common/scripts/shtwitter.sh)42
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/simplefileattributetree1.sh (renamed from usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh)30
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/simplefiletree1.sh (renamed from usr/src/lib/libshell/common/scripts/simplefiletree1.sh)8
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/svcproptree1.sh (renamed from usr/src/lib/libshell/common/scripts/svcproptree1.sh)6
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/termclock.sh (renamed from usr/src/lib/libshell/common/scripts/termclock.sh)18
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/test_net_sctp.sh (renamed from usr/src/lib/libshell/common/scripts/test_net_sctp.sh)2
-rw-r--r--usr/src/cmd/ast/libshell/common/scripts/xmldocumenttree1.sh (renamed from usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh)40
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/README.tests (renamed from usr/src/lib/libshell/common/tests/README.tests)40
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/illumos_13434_chunked_heredoc.sh157
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_array_default_datatype.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh)14
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_poll.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_builtin_poll.sh)0
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_sum.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh)0
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_tail.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh)51
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_command_substitution.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh)10
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_misc.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh)4
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_nameref.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh)22
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_compoundvario.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh)14
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh)18
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh)2
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh)4
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh)4
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh)8
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh)2
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh)14
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh)2
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh)0
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh)4
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh)8
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh)14
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh)30
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh)0
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh)32
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh)0
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh)0
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh)2
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh)0
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh)4
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh)8
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh)8
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh)22
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh)28
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh)24
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh)20
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh)0
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_getconf.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh)8
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_local_compound_nameref001.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_local_compound_nameref001.sh)8
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_locale_misc.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh)12
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_staticvariables.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh)12
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree001.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh)26
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree002.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh)68
-rw-r--r--usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree003.sh (renamed from usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh)10
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/acct8
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/cmds22
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/dynamic16
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/execargs5
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/externs (renamed from usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs)10
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/locale (renamed from usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale)17
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/math (renamed from usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math)136
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/options21
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/poll (renamed from usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll)13
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/pstat5
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/rlimits38
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/setjmp (renamed from usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp)8
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/sigfeatures (renamed from usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures)13
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/time (renamed from usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time)8
-rw-r--r--usr/src/cmd/ast/libshell/i386/FEATURE/ttys14
-rw-r--r--usr/src/cmd/ast/libshell/i386/Makefile (renamed from usr/src/lib/libshell/i386/Makefile)0
-rw-r--r--usr/src/cmd/ast/libshell/i386/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libshell/mapfile-vers (renamed from usr/src/lib/libshell/mapfile-vers)84
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/1.png (renamed from usr/src/lib/libshell/misc/images/callouts/1.png)bin236 -> 236 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/10.png (renamed from usr/src/lib/libshell/misc/images/callouts/10.png)bin284 -> 284 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/2.png (renamed from usr/src/lib/libshell/misc/images/callouts/2.png)bin261 -> 261 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/3.png (renamed from usr/src/lib/libshell/misc/images/callouts/3.png)bin265 -> 265 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/4.png (renamed from usr/src/lib/libshell/misc/images/callouts/4.png)bin260 -> 260 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/5.png (renamed from usr/src/lib/libshell/misc/images/callouts/5.png)bin261 -> 261 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/6.png (renamed from usr/src/lib/libshell/misc/images/callouts/6.png)bin278 -> 278 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/7.png (renamed from usr/src/lib/libshell/misc/images/callouts/7.png)bin253 -> 253 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/8.png (renamed from usr/src/lib/libshell/misc/images/callouts/8.png)bin275 -> 275 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/callouts/9.png (renamed from usr/src/lib/libshell/misc/images/callouts/9.png)bin284 -> 284 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/tag_bourne.png (renamed from usr/src/lib/libshell/misc/images/tag_bourne.png)bin130 -> 130 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/tag_i18n.png (renamed from usr/src/lib/libshell/misc/images/tag_i18n.png)bin124 -> 124 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/tag_ksh.png (renamed from usr/src/lib/libshell/misc/images/tag_ksh.png)bin122 -> 122 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/tag_ksh88.png (renamed from usr/src/lib/libshell/misc/images/tag_ksh88.png)bin124 -> 124 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/tag_ksh93.png (renamed from usr/src/lib/libshell/misc/images/tag_ksh93.png)bin140 -> 140 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/tag_l10n.png (renamed from usr/src/lib/libshell/misc/images/tag_l10n.png)bin118 -> 118 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/images/tag_perf.png (renamed from usr/src/lib/libshell/misc/images/tag_perf.png)bin127 -> 127 bytes
-rw-r--r--usr/src/cmd/ast/libshell/misc/shell_styleguide.docbook (renamed from usr/src/lib/libshell/misc/shell_styleguide.docbook)0
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/acct8
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/cmds22
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/dynamic16
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/execargs5
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/externs (renamed from usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs)10
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/locale (renamed from usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale)17
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/math171
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/options21
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/poll (renamed from usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll)13
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/pstat5
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/rlimits38
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/setjmp (renamed from usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp)8
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/sigfeatures (renamed from usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures)13
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/time (renamed from usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time)8
-rw-r--r--usr/src/cmd/ast/libshell/sparc/FEATURE/ttys14
-rw-r--r--usr/src/cmd/ast/libshell/sparc/Makefile (renamed from usr/src/lib/libshell/sparc/Makefile)0
-rw-r--r--usr/src/cmd/ast/libshell/sparc/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/acct8
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/cmds22
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/dynamic16
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/execargs5
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/externs (renamed from usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs)10
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/locale (renamed from usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale)17
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/math171
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/options21
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/poll (renamed from usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll)13
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/pstat5
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/rlimits37
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/setjmp (renamed from usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp)8
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/sigfeatures (renamed from usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures)13
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/time (renamed from usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time)8
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/FEATURE/ttys14
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/Makefile (renamed from usr/src/lib/libshell/sparcv9/Makefile)2
-rw-r--r--usr/src/cmd/ast/libshell/sparcv9/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libsum/Makefile (renamed from usr/src/lib/libsum/Makefile)34
-rw-r--r--usr/src/cmd/ast/libsum/Makefile.com (renamed from usr/src/lib/libsum/Makefile.com)81
-rw-r--r--usr/src/cmd/ast/libsum/Makefile.defs29
-rw-r--r--usr/src/cmd/ast/libsum/Makefile.iffe22
-rw-r--r--usr/src/cmd/ast/libsum/amd64/FEATURE/sum (renamed from usr/src/lib/libsum/amd64/src/lib/libsum/FEATURE/sum)4
-rw-r--r--usr/src/cmd/ast/libsum/amd64/Makefile (renamed from usr/src/lib/libshell/amd64/Makefile)2
-rw-r--r--usr/src/cmd/ast/libsum/amd64/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/libsum/i386/FEATURE/sum (renamed from usr/src/lib/libsum/i386/src/lib/libsum/FEATURE/sum)4
-rw-r--r--usr/src/cmd/ast/libsum/i386/Makefile (renamed from usr/src/lib/libsum/i386/Makefile)0
-rw-r--r--usr/src/cmd/ast/libsum/i386/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libsum/mapfile-vers (renamed from usr/src/lib/libsum/mapfile-vers)1
-rw-r--r--usr/src/cmd/ast/libsum/sparc/FEATURE/sum (renamed from usr/src/lib/libsum/sparc/src/lib/libsum/FEATURE/sum)4
-rw-r--r--usr/src/cmd/ast/libsum/sparc/Makefile (renamed from usr/src/lib/libsum/sparc/Makefile)0
-rw-r--r--usr/src/cmd/ast/libsum/sparc/Makefile.iffe16
-rw-r--r--usr/src/cmd/ast/libsum/sparcv9/FEATURE/sum (renamed from usr/src/lib/libsum/sparcv9/src/lib/libsum/FEATURE/sum)4
-rw-r--r--usr/src/cmd/ast/libsum/sparcv9/Makefile (renamed from usr/src/lib/libsum/amd64/Makefile)2
-rw-r--r--usr/src/cmd/ast/libsum/sparcv9/Makefile.iffe17
-rw-r--r--usr/src/cmd/ast/msgcc/Makefile47
-rw-r--r--usr/src/cmd/ast/shcomp/Makefile (renamed from usr/src/cmd/shcomp/Makefile)39
-rw-r--r--usr/src/cmd/ast/tools/Makefile90
-rw-r--r--usr/src/contrib/ast/LICENSE210
-rw-r--r--usr/src/contrib/ast/LICENSE.descrip1
-rw-r--r--usr/src/contrib/ast/README6
-rw-r--r--usr/src/contrib/ast/lib/package/INIT.pkg12
-rw-r--r--usr/src/contrib/ast/lib/package/INIT.req0
-rw-r--r--usr/src/contrib/ast/lib/package/INIT.ver1
-rw-r--r--usr/src/contrib/ast/lib/package/ast-ast.pkg11
-rw-r--r--usr/src/contrib/ast/lib/package/ast-base.pkg22
-rw-r--r--usr/src/contrib/ast/lib/package/ast-base.req0
-rw-r--r--usr/src/contrib/ast/lib/package/ast-base.ver1
-rw-r--r--usr/src/contrib/ast/lib/package/ast-dss.pkg13
-rw-r--r--usr/src/contrib/ast/lib/package/ast-ksh.pkg89
-rw-r--r--usr/src/contrib/ast/lib/package/ast-ksh.req0
-rw-r--r--usr/src/contrib/ast/lib/package/ast-ksh.ver1
-rw-r--r--usr/src/contrib/ast/lib/package/ast-make.pkg19
-rw-r--r--usr/src/contrib/ast/lib/package/ast-open.pkg20
-rw-r--r--usr/src/contrib/ast/lib/package/ast-open.req0
-rw-r--r--usr/src/contrib/ast/lib/package/ast-open.ver1
-rw-r--r--usr/src/contrib/ast/lib/package/ast.def49
-rw-r--r--usr/src/contrib/ast/lib/package/ast.lic5
-rw-r--r--usr/src/contrib/ast/lib/package/bsd.def45
-rw-r--r--usr/src/contrib/ast/lib/package/bsd.lic1
-rw-r--r--usr/src/contrib/ast/lib/package/epl.def8
-rw-r--r--usr/src/contrib/ast/lib/package/ksh.pkg14
-rw-r--r--usr/src/contrib/ast/lib/package/package.mk1537
-rw-r--r--usr/src/contrib/ast/lib/package/zlib.def39
-rw-r--r--usr/src/contrib/ast/lib/package/zlib.lic1
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/C+probe870
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/CONVERT.mk260
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/MAPLIB.mk45
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/MSGFUN.mk2
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/MSGKEY.mk2
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/Makefile346
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/Mamfile1383
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/PROBE.mk13
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/RELEASE934
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/TEST.mk197
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/WWW.mk450
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/crossexec.sh139
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/db.c37
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/ditto.sh460
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/dl.c33
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/execrate.sh179
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/filter.sh98
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/gdbm.c37
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/gdbm1.c37
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/gdbm2.c37
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/hello.c23
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/hosttype.tst6
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/hurl.sh207
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/iconv.c29
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/iffe.sh4676
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/iffe.tst1945
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/ignore.sh43
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/intl.c29
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/m.c34
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/m2.c36
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/m3.c36
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/m4.c32
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/m5.c32
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/m6.c34
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/make.probe2242
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/mamake.c2375
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/mamake.rt40
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/mamake.tst63
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/mamprobe.sh267
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/mkdir.sh80
-rwxr-xr-xusr/src/contrib/ast/src/cmd/INIT/mktest.sh641
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/mprobe.sh30
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/nsl.c31
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/p.c24
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/package.mk1537
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/package.sh7347
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/probe.win32283
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/proto.c5286
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/ratz.c5311
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/regress.sh1463
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/release.c366
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/rt.sh479
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/silent.sh42
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/socket.c33
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/w.c30
-rw-r--r--usr/src/contrib/ast/src/cmd/INIT/w2.c27
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/COMPATIBILITY (renamed from usr/src/lib/libshell/common/COMPATIBILITY)28
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/DESIGN (renamed from usr/src/lib/libshell/common/DESIGN)34
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/Makefile251
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/Mamfile1525
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/OBSOLETE (renamed from usr/src/lib/libshell/common/OBSOLETE)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/PROMO.mm (renamed from usr/src/lib/libshell/common/PROMO.mm)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/README (renamed from usr/src/lib/libshell/common/README)2
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/RELEASE (renamed from usr/src/lib/libshell/common/RELEASE)1308
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/RELEASE88 (renamed from usr/src/lib/libshell/common/RELEASE88)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/RELEASE93 (renamed from usr/src/lib/libshell/common/RELEASE93)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/TYPES (renamed from usr/src/lib/libshell/common/TYPES)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/alarm.c (renamed from usr/src/lib/libshell/common/bltins/alarm.c)36
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/cd_pwd.c (renamed from usr/src/lib/libshell/common/bltins/cd_pwd.c)70
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/cflow.c (renamed from usr/src/lib/libshell/common/bltins/cflow.c)26
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/enum.c (renamed from usr/src/lib/libshell/common/bltins/enum.c)19
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/getopts.c (renamed from usr/src/lib/libshell/common/bltins/getopts.c)36
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/hist.c (renamed from usr/src/lib/libshell/common/bltins/hist.c)24
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/lib.c (renamed from usr/src/lib/libast/amd64/include/ast/wchar.h)15
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/misc.c (renamed from usr/src/lib/libshell/common/bltins/misc.c)124
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/mkservice.c (renamed from usr/src/lib/libshell/common/bltins/mkservice.c)18
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/poll_solaris.c (renamed from usr/src/lib/libshell/common/bltins/poll_solaris.c)32
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/print.c (renamed from usr/src/lib/libshell/common/bltins/print.c)214
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/read.c (renamed from usr/src/lib/libshell/common/bltins/read.c)194
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/regress.c (renamed from usr/src/lib/libshell/common/bltins/regress.c)12
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/shiocmd_solaris.c (renamed from usr/src/lib/libshell/common/bltins/shiocmd_solaris.c)50
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/sleep.c (renamed from usr/src/lib/libshell/common/bltins/sleep.c)30
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/test.c (renamed from usr/src/lib/libshell/common/bltins/test.c)87
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/trap.c (renamed from usr/src/lib/libshell/common/bltins/trap.c)119
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/typeset.c (renamed from usr/src/lib/libshell/common/bltins/typeset.c)566
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/ulimit.c (renamed from usr/src/lib/libshell/common/bltins/ulimit.c)28
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/umask.c (renamed from usr/src/lib/libshell/common/bltins/umask.c)12
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/bltins/whence.c (renamed from usr/src/lib/libshell/common/bltins/whence.c)32
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/builtins.mm (renamed from usr/src/lib/libshell/common/builtins.mm)283
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/aliases.c (renamed from usr/src/lib/libshell/common/data/aliases.c)52
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/bash_pre_rc.sh (renamed from usr/src/lib/libshell/common/data/bash_pre_rc.sh)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/builtins.c (renamed from usr/src/lib/libshell/common/data/builtins.c)183
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/keywords.c (renamed from usr/src/lib/libshell/common/data/keywords.c)11
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/lexstates.c (renamed from usr/src/lib/libshell/common/data/lexstates.c)16
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/limits.c (renamed from usr/src/lib/libshell/common/data/limits.c)19
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/math.tab (renamed from usr/src/lib/libshell/common/data/math.tab)10
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/msg.c (renamed from usr/src/lib/libshell/common/data/msg.c)29
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/options.c (renamed from usr/src/lib/libshell/common/data/options.c)13
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/signals.c (renamed from usr/src/lib/libshell/common/data/signals.c)19
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/strdata.c (renamed from usr/src/lib/libshell/common/data/strdata.c)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/testops.c (renamed from usr/src/lib/libshell/common/data/testops.c)10
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/data/variables.c (renamed from usr/src/lib/libshell/common/data/variables.c)19
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/edit/completion.c (renamed from usr/src/lib/libshell/common/edit/completion.c)62
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/edit/edit.c (renamed from usr/src/lib/libshell/common/edit/edit.c)327
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/edit/emacs.c (renamed from usr/src/lib/libshell/common/edit/emacs.c)120
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/edit/hexpand.c (renamed from usr/src/lib/libshell/common/edit/hexpand.c)18
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/edit/history.c (renamed from usr/src/lib/libshell/common/edit/history.c)88
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/edit/vi.c (renamed from usr/src/lib/libshell/common/edit/vi.c)140
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/cmds27
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/dynamic (renamed from usr/src/lib/libshell/common/features/dynamic)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/externs (renamed from usr/src/lib/libshell/common/features/externs)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/locale (renamed from usr/src/lib/libshell/common/features/locale)4
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/math.sh (renamed from usr/src/lib/libshell/common/features/math.sh)183
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/features/options (renamed from usr/src/lib/libshell/common/features/options)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/poll (renamed from usr/src/lib/libshell/common/features/poll)2
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/rlimits27
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/setjmp (renamed from usr/src/lib/libshell/common/features/setjmp)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/sigfeatures (renamed from usr/src/lib/libshell/common/features/sigfeatures)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/time (renamed from usr/src/lib/libshell/common/features/time)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/features/ttys (renamed from usr/src/lib/libshell/common/features/ttys)0
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/fun/dirs (renamed from usr/src/lib/libshell/common/fun/dirs)0
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/fun/popd (renamed from usr/src/lib/libshell/common/fun/popd)0
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/fun/pushd (renamed from usr/src/lib/libshell/common/fun/pushd)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/argnod.h (renamed from usr/src/lib/libshell/common/include/argnod.h)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/builtins.h (renamed from usr/src/lib/libshell/common/include/builtins.h)120
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/defs.h (renamed from usr/src/lib/libshell/common/include/defs.h)134
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/edit.h (renamed from usr/src/lib/libshell/common/include/edit.h)38
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/env.h (renamed from usr/src/lib/libshell/common/include/env.h)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/fault.h (renamed from usr/src/lib/libshell/common/include/fault.h)18
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/fcin.h (renamed from usr/src/lib/libshell/common/include/fcin.h)20
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/history.h (renamed from usr/src/lib/libshell/common/include/history.h)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/io.h (renamed from usr/src/lib/libshell/common/include/io.h)29
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/jobs.h (renamed from usr/src/lib/libshell/common/include/jobs.h)42
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/lexstates.h (renamed from usr/src/lib/libshell/common/include/lexstates.h)20
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/name.h (renamed from usr/src/lib/libshell/common/include/name.h)47
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/national.h (renamed from usr/src/lib/libshell/common/include/national.h)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/nval.h (renamed from usr/src/lib/libshell/common/include/nval.h)23
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/path.h (renamed from usr/src/lib/libshell/common/include/path.h)49
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/regress.h (renamed from usr/src/lib/libshell/common/include/regress.h)10
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/shell.h (renamed from usr/src/lib/libshell/common/include/shell.h)32
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/shlex.h (renamed from usr/src/lib/libshell/common/include/shlex.h)10
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/shnodes.h (renamed from usr/src/lib/libshell/common/include/shnodes.h)13
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/shtable.h (renamed from usr/src/lib/libshell/common/include/shtable.h)10
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/streval.h (renamed from usr/src/lib/libshell/common/include/streval.h)27
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/terminal.h (renamed from usr/src/lib/libshell/common/include/terminal.h)16
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/test.h (renamed from usr/src/lib/libshell/common/include/test.h)13
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/timeout.h (renamed from usr/src/lib/libshell/common/include/timeout.h)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/ulimit.h (renamed from usr/src/lib/libshell/common/include/ulimit.h)51
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/variables.h111
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/include/version.h (renamed from usr/src/lib/libshell/common/include/version.h)10
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.rt71
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.tst22544
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/mamexec307
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/mamstate.c73
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/nval.3 (renamed from usr/src/lib/libshell/common/nval.3)11
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh.1 (renamed from usr/src/lib/libshell/common/sh.1)628
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh.memo (renamed from usr/src/lib/libshell/common/sh.memo)0
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/args.c (renamed from usr/src/lib/libshell/common/sh/args.c)77
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/arith.c (renamed from usr/src/lib/libshell/common/sh/arith.c)254
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/array.c (renamed from usr/src/lib/libshell/common/sh/array.c)552
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/bash.c (renamed from usr/src/lib/libshell/common/sh/bash.c)13
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/defs.c (renamed from usr/src/lib/libshell/common/sh/defs.c)9
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/deparse.c (renamed from usr/src/lib/libshell/common/sh/deparse.c)29
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/env.c (renamed from usr/src/lib/libshell/common/sh/env.c)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/expand.c (renamed from usr/src/lib/libshell/common/sh/expand.c)30
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/fault.c (renamed from usr/src/lib/libshell/common/sh/fault.c)151
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/fcin.c (renamed from usr/src/lib/libshell/common/sh/fcin.c)26
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/init.c (renamed from usr/src/lib/libshell/common/sh/init.c)832
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/io.c (renamed from usr/src/lib/libshell/common/sh/io.c)716
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/jobs.c (renamed from usr/src/lib/libshell/common/sh/jobs.c)528
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/lex.c (renamed from usr/src/lib/libshell/common/sh/lex.c)317
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/macro.c (renamed from usr/src/lib/libshell/common/sh/macro.c)461
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/main.c (renamed from usr/src/lib/libshell/common/sh/main.c)101
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/name.c (renamed from usr/src/lib/libshell/common/sh/name.c)1059
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/nvdisc.c (renamed from usr/src/lib/libshell/common/sh/nvdisc.c)214
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/nvtree.c (renamed from usr/src/lib/libshell/common/sh/nvtree.c)143
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/nvtype.c (renamed from usr/src/lib/libshell/common/sh/nvtype.c)244
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/parse.c (renamed from usr/src/lib/libshell/common/sh/parse.c)252
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/path.c (renamed from usr/src/lib/libshell/common/sh/path.c)577
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/pmain.c (renamed from usr/src/lib/libshell/common/sh/pmain.c)9
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/shcomp.c (renamed from usr/src/lib/libshell/common/sh/shcomp.c)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/streval.c (renamed from usr/src/lib/libshell/common/sh/streval.c)155
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/string.c (renamed from usr/src/lib/libshell/common/sh/string.c)98
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/subshell.c (renamed from usr/src/lib/libshell/common/sh/subshell.c)323
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/suid_exec.c (renamed from usr/src/lib/libshell/common/sh/suid_exec.c)8
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/tdump.c (renamed from usr/src/lib/libshell/common/sh/tdump.c)10
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/timers.c (renamed from usr/src/lib/libshell/common/sh/timers.c)10
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/trestore.c (renamed from usr/src/lib/libshell/common/sh/trestore.c)20
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/waitevent.c (renamed from usr/src/lib/libshell/common/sh/waitevent.c)12
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/sh/xec.c (renamed from usr/src/lib/libshell/common/sh/xec.c)1685
-rw-r--r--usr/src/contrib/ast/src/cmd/ksh93/shell.3 (renamed from usr/src/lib/libshell/common/shell.3)14
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/alias.sh (renamed from usr/src/lib/libshell/common/tests/alias.sh)13
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/append.sh (renamed from usr/src/lib/libshell/common/tests/append.sh)46
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/arith.sh (renamed from usr/src/lib/libshell/common/tests/arith.sh)227
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/arrays.sh (renamed from usr/src/lib/libshell/common/tests/arrays.sh)179
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/arrays2.sh224
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/attributes.sh (renamed from usr/src/lib/libshell/common/tests/attributes.sh)119
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/basic.sh (renamed from usr/src/lib/libshell/common/tests/basic.sh)59
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/bracket.sh (renamed from usr/src/lib/libshell/common/tests/bracket.sh)46
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/builtins.sh (renamed from usr/src/lib/libshell/common/tests/builtins.sh)182
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/case.sh (renamed from usr/src/lib/libshell/common/tests/case.sh)14
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/comvar.sh (renamed from usr/src/lib/libshell/common/tests/comvar.sh)169
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/comvario.sh686
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/coprocess.sh368
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/cubetype.sh (renamed from usr/src/lib/libshell/common/tests/cubetype.sh)20
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/enum.sh (renamed from usr/src/lib/libshell/common/tests/enum.sh)17
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/exit.sh (renamed from usr/src/lib/libshell/common/tests/exit.sh)10
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/expand.sh (renamed from usr/src/lib/libshell/common/tests/expand.sh)11
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/functions.sh (renamed from usr/src/lib/libshell/common/tests/functions.sh)126
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/glob.sh (renamed from usr/src/lib/libshell/common/tests/glob.sh)25
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/grep.sh (renamed from usr/src/lib/libshell/common/tests/grep.sh)11
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/heredoc.sh500
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/io.sh (renamed from usr/src/lib/libshell/common/tests/io.sh)102
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/leaks.sh87
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/locale.sh345
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/math.sh202
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/nameref.sh (renamed from usr/src/lib/libshell/common/tests/nameref.sh)346
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/namespace.sh106
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/options.sh (renamed from usr/src/lib/libshell/common/tests/options.sh)65
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/path.sh (renamed from usr/src/lib/libshell/common/tests/path.sh)99
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/pointtype.sh (renamed from usr/src/lib/libshell/common/tests/pointtype.sh)17
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/pty.sh442
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/quoting.sh (renamed from usr/src/lib/libshell/common/tests/quoting.sh)41
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/quoting2.sh (renamed from usr/src/lib/libshell/common/tests/quoting2.sh)16
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/readcsv.sh70
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/recttype.sh (renamed from usr/src/lib/libshell/common/tests/recttype.sh)11
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/restricted.sh (renamed from usr/src/lib/libshell/common/tests/restricted.sh)13
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/return.sh (renamed from usr/src/lib/libshell/common/tests/return.sh)17
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/select.sh (renamed from usr/src/lib/libshell/common/tests/select.sh)11
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/shtests369
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/sigchld.sh (renamed from usr/src/lib/libshell/common/tests/sigchld.sh)31
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/signal.sh (renamed from usr/src/lib/libshell/common/tests/signal.sh)238
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/statics.sh690
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/subshell.sh (renamed from usr/src/lib/libshell/common/tests/subshell.sh)213
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/substring.sh (renamed from usr/src/lib/libshell/common/tests/substring.sh)126
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/tilde.sh (renamed from usr/src/lib/libshell/common/tests/tilde.sh)16
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/timetype.sh81
-rwxr-xr-xusr/src/contrib/ast/src/cmd/ksh93/tests/treemove.sh163
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/types.sh (renamed from usr/src/lib/libshell/common/tests/types.sh)283
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/variables.sh (renamed from usr/src/lib/libshell/common/tests/variables.sh)32
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/vartree1.sh (renamed from usr/src/lib/libshell/common/tests/vartree1.sh)11
-rwxr-xr-x[-rw-r--r--]usr/src/contrib/ast/src/cmd/ksh93/tests/vartree2.sh (renamed from usr/src/lib/libshell/common/tests/vartree2.sh)11
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/Makefile19
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/Mamfile314
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/NOTES (renamed from usr/src/cmd/ast/msgcc/NOTES)0
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/PROMO.mm (renamed from usr/src/cmd/ast/msgcc/PROMO.mm)0
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/RELEASE14
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/msgadmin.sh180
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/msgcc.sh (renamed from usr/src/cmd/ast/msgcc/msgcc.sh)76
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/msgcc.tst (renamed from usr/src/cmd/ast/msgcc/msgcc.tst)0
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/msgcpp.c (renamed from usr/src/cmd/ast/msgcc/msgcpp.c)8
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/msgcvt.c (renamed from usr/src/cmd/ast/msgcc/msgcvt.c)8
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/msggen.c (renamed from usr/src/cmd/ast/msgcc/msggen.c)8
-rw-r--r--usr/src/contrib/ast/src/cmd/msgcc/msgget.c (renamed from usr/src/cmd/ast/msgcc/msgget.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/Makefile434
-rw-r--r--usr/src/contrib/ast/src/lib/libast/Mamfile7348
-rw-r--r--usr/src/contrib/ast/src/lib/libast/README (renamed from usr/src/lib/libast/common/README)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/RELEASE (renamed from usr/src/lib/libast/common/RELEASE)190
-rw-r--r--usr/src/contrib/ast/src/lib/libast/aso/aso-fcntl.c188
-rw-r--r--usr/src/contrib/ast/src/lib/libast/aso/aso-sem.c193
-rw-r--r--usr/src/contrib/ast/src/lib/libast/aso/aso.c867
-rw-r--r--usr/src/contrib/ast/src/lib/libast/aso/asohdr.h (renamed from usr/src/lib/libast/amd64/include/ast/modex.h)77
-rw-r--r--usr/src/contrib/ast/src/lib/libast/aso/asolock.c55
-rw-r--r--usr/src/contrib/ast/src/lib/libast/aso/asometh.c (renamed from usr/src/lib/libast/amd64/src/lib/libast/ast_namval.h)37
-rw-r--r--usr/src/contrib/ast/src/lib/libast/aso/asorelax.c56
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/README-astsa15
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/aso.c56
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/aso.h (renamed from usr/src/lib/libast/amd64/include/ast/bytesex.h)33
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/ast.c85
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/ast.h156
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/ast_common.h (renamed from usr/src/lib/libast/i386/include/ast/bytesex.h)42
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/astsa.manifest50
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/astsa.mm33
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/astsa.omk82
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/ccode.h34
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/debug.h (renamed from usr/src/lib/libast/amd64/include/ast/dirent.h)17
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/error.c103
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/error.h (renamed from usr/src/lib/libast/i386/include/ast/ast_mode.h)57
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/hashkey.h (renamed from usr/src/lib/libast/amd64/include/ast/hashkey.h)28
-rwxr-xr-xusr/src/contrib/ast/src/lib/libast/astsa/mkast_sa150
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/option.h (renamed from usr/src/lib/libast/i386/include/ast/option.h)74
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/optlib.h (renamed from usr/src/lib/libast/common/misc/optlib.h)19
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/sfstr.c246
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/sfstr.h60
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/strdup.c (renamed from usr/src/lib/libast/common/string/strdup.c)17
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/strmatch.c597
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/times.h (renamed from usr/src/lib/libast/amd64/include/ast/nl_types.h)15
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.c102
-rw-r--r--usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.h (renamed from usr/src/lib/libast/amd64/include/ast/getopt.h)65
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/cdtlib.h183
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtclose.c (renamed from usr/src/lib/libast/common/cdt/dtclose.c)53
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtcomp.c60
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtdisc.c (renamed from usr/src/lib/libast/common/cdt/dtdisc.c)69
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dthash.c429
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dthdr.h (renamed from usr/src/lib/libast/common/include/usage.h)32
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtlist.c383
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtmethod.c107
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtnew.c (renamed from usr/src/lib/libast/common/cdt/dtnew.c)20
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtopen.c177
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtstrhash.c (renamed from usr/src/lib/libast/common/cdt/dtstrhash.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dttree.c694
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtview.c (renamed from usr/src/lib/libast/common/cdt/dtview.c)66
-rw-r--r--usr/src/contrib/ast/src/lib/libast/cdt/dtwalk.c (renamed from usr/src/lib/libast/common/cdt/dtwalk.c)23
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/atexit.c (renamed from usr/src/lib/libast/common/comp/atexit.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/basename.c (renamed from usr/src/lib/libast/common/comp/basename.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/catopen.c (renamed from usr/src/lib/libast/common/comp/catopen.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/closelog.c (renamed from usr/src/lib/libast/common/comp/closelog.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/conf.sh (renamed from usr/src/lib/libast/common/comp/conf.sh)55
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/conf.tab (renamed from usr/src/lib/libast/common/comp/conf.tab)30
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/creat64.c (renamed from usr/src/lib/libast/common/comp/creat64.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/dirname.c (renamed from usr/src/lib/libast/common/comp/dirname.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/dup2.c (renamed from usr/src/lib/libast/common/comp/dup2.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/eaccess.c (renamed from usr/src/lib/libast/common/comp/eaccess.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/errno.c (renamed from usr/src/lib/libast/common/comp/errno.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/execlp.c (renamed from usr/src/lib/libast/common/comp/execlp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/execve.c (renamed from usr/src/lib/libast/common/comp/execve.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/execvp.c (renamed from usr/src/lib/libast/common/comp/execvp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/execvpe.c (renamed from usr/src/lib/libast/common/comp/execvpe.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/fakelink.h (renamed from usr/src/lib/libast/common/include/ast_version.h)20
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/fcntl.c (renamed from usr/src/lib/libast/common/comp/fcntl.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/fmtmsg.h141
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/fmtmsglib.c (renamed from usr/src/lib/libast/common/comp/fmtmsglib.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/fnmatch.c (renamed from usr/src/lib/libast/common/comp/fnmatch.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/fnmatch.h (renamed from usr/src/lib/libast/common/comp/fnmatch.h)11
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/frexp.c (renamed from usr/src/lib/libast/common/comp/frexp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/frexpl.c (renamed from usr/src/lib/libast/common/comp/frexpl.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/fsync.c (renamed from usr/src/lib/libast/common/comp/fsync.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/ftw.c (renamed from usr/src/lib/libast/common/comp/ftw.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/ftw.h (renamed from usr/src/lib/libast/common/comp/ftw.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getdate.c (renamed from usr/src/lib/libast/common/comp/getdate.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getgroups.c (renamed from usr/src/lib/libast/common/comp/getgroups.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getlogin.c (renamed from usr/src/lib/libast/common/comp/getlogin.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getopt.c (renamed from usr/src/lib/libast/common/comp/getopt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getopt.h (renamed from usr/src/lib/libast/common/comp/getopt.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getoptl.c (renamed from usr/src/lib/libast/common/comp/getoptl.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getpgrp.c (renamed from usr/src/lib/libast/common/comp/getpgrp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getsubopt.c (renamed from usr/src/lib/libast/common/comp/getsubopt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/getwd.c (renamed from usr/src/lib/libast/common/comp/getwd.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/gross.c (renamed from usr/src/lib/libast/common/comp/gross.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/gross_sgi.h188
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/hsearch.c (renamed from usr/src/lib/libast/common/comp/hsearch.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/iconv.c (renamed from usr/src/lib/libast/common/comp/iconv.c)183
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/killpg.c (renamed from usr/src/lib/libast/common/comp/killpg.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/libgen.h (renamed from usr/src/lib/libast/common/comp/libgen.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/link.c (renamed from usr/src/lib/libast/common/comp/link.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/localeconv.c (renamed from usr/src/lib/libast/common/comp/localeconv.c)18
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/lstat.c (renamed from usr/src/lib/libast/common/comp/lstat.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/memccpy.c (renamed from usr/src/lib/libast/common/comp/memccpy.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/memchr.c (renamed from usr/src/lib/libast/common/comp/memchr.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/memcmp.c (renamed from usr/src/lib/libast/common/comp/memcmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/memcpy.c (renamed from usr/src/lib/libast/common/comp/memcpy.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/memmove.c (renamed from usr/src/lib/libast/common/comp/memmove.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/memset.c (renamed from usr/src/lib/libast/common/comp/memset.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/mkdir.c (renamed from usr/src/lib/libast/common/comp/mkdir.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/mkfifo.c (renamed from usr/src/lib/libast/common/comp/mkfifo.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/mknod.c (renamed from usr/src/lib/libast/common/comp/mknod.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/mktemp.c (renamed from usr/src/lib/libast/common/comp/mktemp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/mktime.c (renamed from usr/src/lib/libast/common/comp/mktime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/mount.c (renamed from usr/src/lib/libast/common/comp/mount.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/nftw.c (renamed from usr/src/lib/libast/common/comp/nftw.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/omitted.c (renamed from usr/src/lib/libast/common/comp/omitted.c)185
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/open.c (renamed from usr/src/lib/libast/common/comp/open.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/openlog.c (renamed from usr/src/lib/libast/common/comp/openlog.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/putenv.c (renamed from usr/src/lib/libast/common/comp/putenv.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/re_comp.c (renamed from usr/src/lib/libast/common/comp/re_comp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/re_comp.h (renamed from usr/src/lib/libast/common/comp/re_comp.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/readlink.c (renamed from usr/src/lib/libast/common/comp/readlink.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/realpath.c (renamed from usr/src/lib/libast/common/comp/realpath.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/regcmp.c (renamed from usr/src/lib/libast/common/comp/regcmp.c)141
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/regexp.c (renamed from usr/src/lib/libast/common/comp/regexp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/regexp.h (renamed from usr/src/lib/libast/common/comp/regexp.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/remove.c (renamed from usr/src/lib/libast/common/comp/remove.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/rename.c (renamed from usr/src/lib/libast/common/comp/rename.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/resolvepath.c (renamed from usr/src/lib/libast/common/comp/resolvepath.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/rmdir.c (renamed from usr/src/lib/libast/common/comp/rmdir.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/setenv.c (renamed from usr/src/lib/libast/common/comp/setenv.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/setlocale.c2876
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/setlogmask.c (renamed from usr/src/lib/libast/common/comp/setlogmask.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/setpgid.c (renamed from usr/src/lib/libast/common/comp/setpgid.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/setsid.c (renamed from usr/src/lib/libast/common/comp/setsid.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/sigflag.c (renamed from usr/src/lib/libast/common/comp/sigflag.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/sigunblock.c (renamed from usr/src/lib/libast/common/comp/sigunblock.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/spawnveg.c (renamed from usr/src/lib/libast/common/comp/spawnveg.c)58
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/statvfs.c (renamed from usr/src/lib/libast/common/comp/statvfs.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strcasecmp.c (renamed from usr/src/lib/libast/common/comp/strcasecmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strchr.c (renamed from usr/src/lib/libast/common/comp/strchr.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strftime.c (renamed from usr/src/lib/libast/common/comp/strftime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strncasecmp.c (renamed from usr/src/lib/libast/common/comp/strncasecmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strptime.c (renamed from usr/src/lib/libast/common/comp/strptime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strrchr.c (renamed from usr/src/lib/libast/common/comp/strrchr.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strstr.c (renamed from usr/src/lib/libast/common/comp/strstr.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strtod.c (renamed from usr/src/lib/libast/common/comp/strtod.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strtol.c (renamed from usr/src/lib/libast/common/comp/strtol.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strtold.c (renamed from usr/src/lib/libast/common/comp/strtold.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strtoll.c (renamed from usr/src/lib/libast/common/comp/strtoll.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strtoul.c (renamed from usr/src/lib/libast/common/comp/strtoul.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/strtoull.c (renamed from usr/src/lib/libast/common/comp/strtoull.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/swab.c (renamed from usr/src/lib/libast/common/comp/swab.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/symlink.c (renamed from usr/src/lib/libast/common/comp/symlink.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/syslog.c (renamed from usr/src/lib/libast/common/comp/syslog.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/syslog.h132
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/sysloglib.h (renamed from usr/src/lib/libast/sparc/src/lib/libast/ast_namval.h)44
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/system.c (renamed from usr/src/lib/libast/common/comp/system.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/tempnam.c (renamed from usr/src/lib/libast/common/comp/tempnam.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/tmpnam.c (renamed from usr/src/lib/libast/common/comp/tmpnam.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/transition.c (renamed from usr/src/lib/libast/common/comp/transition.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/tsearch.c (renamed from usr/src/lib/libast/common/comp/tsearch.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/unlink.c (renamed from usr/src/lib/libast/common/comp/unlink.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/unsetenv.c (renamed from usr/src/lib/libast/common/comp/unsetenv.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/vfork.c (renamed from usr/src/lib/libast/common/comp/vfork.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/waitpid.c (renamed from usr/src/lib/libast/common/comp/waitpid.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/wc.c (renamed from usr/src/lib/libast/common/comp/wc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/wordexp.c (renamed from usr/src/lib/libast/common/comp/wordexp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/comp/wordexp.h (renamed from usr/src/lib/libast/common/comp/wordexp.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/dir/dirlib.h (renamed from usr/src/lib/libast/common/dir/dirlib.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/dir/dirstd.h63
-rw-r--r--usr/src/contrib/ast/src/lib/libast/dir/getdents.c (renamed from usr/src/lib/libast/common/dir/getdents.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/dir/opendir.c (renamed from usr/src/lib/libast/common/dir/opendir.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/dir/readdir.c (renamed from usr/src/lib/libast/common/dir/readdir.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/dir/rewinddir.c (renamed from usr/src/lib/libast/common/dir/rewinddir.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/dir/seekdir.c (renamed from usr/src/lib/libast/common/dir/seekdir.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/dir/telldir.c (renamed from usr/src/lib/libast/common/dir/telldir.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/memfatal.c (renamed from usr/src/lib/libast/common/disc/memfatal.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcdio.c (renamed from usr/src/lib/libast/common/disc/sfdcdio.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcdos.c (renamed from usr/src/lib/libast/common/disc/sfdcdos.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcfilter.c (renamed from usr/src/lib/libast/common/disc/sfdcfilter.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdchdr.h (renamed from usr/src/lib/libast/common/disc/sfdchdr.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcmore.c (renamed from usr/src/lib/libast/common/disc/sfdcmore.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcprefix.c (renamed from usr/src/lib/libast/common/disc/sfdcprefix.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcseekable.c (renamed from usr/src/lib/libast/common/disc/sfdcseekable.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcslow.c (renamed from usr/src/lib/libast/common/disc/sfdcslow.c)9
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcsubstr.c (renamed from usr/src/lib/libast/common/disc/sfdcsubstr.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdctee.c (renamed from usr/src/lib/libast/common/disc/sfdctee.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfdcunion.c (renamed from usr/src/lib/libast/common/disc/sfdcunion.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfkeyprintf.c (renamed from usr/src/lib/libast/common/disc/sfkeyprintf.c)30
-rw-r--r--usr/src/contrib/ast/src/lib/libast/disc/sfstrtmp.c (renamed from usr/src/lib/libast/common/disc/sfstrtmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/align.c (renamed from usr/src/lib/libast/common/features/align.c)39
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/api15
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/aso628
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/asometh44
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/botch.c (renamed from usr/src/lib/libast/common/features/botch.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/ccode (renamed from usr/src/lib/libast/common/features/ccode)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/common (renamed from usr/src/lib/libast/common/features/common)86
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/dirent (renamed from usr/src/lib/libast/common/features/dirent)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/eaccess (renamed from usr/src/lib/libast/common/features/eaccess)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/errno (renamed from usr/src/lib/libast/common/features/errno)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/fcntl.c (renamed from usr/src/lib/libast/common/features/fcntl.c)18
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/float (renamed from usr/src/lib/libast/common/features/float)47
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/fs (renamed from usr/src/lib/libast/common/features/fs)20
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/hack (renamed from usr/src/lib/libast/common/features/hack)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/iconv (renamed from usr/src/lib/libast/common/features/iconv)36
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/lib (renamed from usr/src/lib/libast/common/features/lib)92
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/libpath.sh (renamed from usr/src/lib/libast/common/features/libpath.sh)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/limits.c (renamed from usr/src/lib/libast/common/features/limits.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/locale28
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/map.c (renamed from usr/src/lib/libast/common/features/map.c)30
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/mmap (renamed from usr/src/lib/libast/common/features/mmap)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/mode.c (renamed from usr/src/lib/libast/common/features/mode.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/ndbm (renamed from usr/src/lib/libast/common/features/ndbm)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/nl_types (renamed from usr/src/lib/libast/common/features/nl_types)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/omitted (renamed from usr/src/lib/libast/common/features/omitted)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/options (renamed from usr/src/lib/libast/common/features/options)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/param.sh (renamed from usr/src/lib/libast/common/features/param.sh)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/preroot.sh (renamed from usr/src/lib/libast/common/features/preroot.sh)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/prog12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/sfinit.c (renamed from usr/src/lib/libast/common/features/sfinit.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/sfio (renamed from usr/src/lib/libast/common/features/sfio)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/sig.sh (renamed from usr/src/lib/libast/common/features/sig.sh)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/siglist (renamed from usr/src/lib/libast/common/features/siglist)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/signal.c (renamed from usr/src/lib/libast/common/features/signal.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/sizeof13
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/standards (renamed from usr/src/lib/libast/common/features/standards)48
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/stdio (renamed from usr/src/lib/libast/common/features/stdio)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/sys (renamed from usr/src/lib/libast/common/features/sys)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/syscall18
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/time (renamed from usr/src/lib/libast/common/features/time)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/tmlib (renamed from usr/src/lib/libast/common/features/tmlib)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/tmx (renamed from usr/src/lib/libast/common/features/tmx)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/tty (renamed from usr/src/lib/libast/common/features/tty)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/tv (renamed from usr/src/lib/libast/common/features/tv)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/tvlib (renamed from usr/src/lib/libast/common/features/tvlib)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/uwin (renamed from usr/src/lib/libast/common/features/uwin)4
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/vfork (renamed from usr/src/lib/libast/common/features/vfork)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/vmalloc (renamed from usr/src/lib/libast/common/features/vmalloc)53
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/wait (renamed from usr/src/lib/libast/common/features/wait)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/wchar (renamed from usr/src/lib/libast/common/features/wchar)59
-rw-r--r--usr/src/contrib/ast/src/lib/libast/features/wctype14
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashalloc.c (renamed from usr/src/lib/libast/common/hash/hashalloc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashdump.c (renamed from usr/src/lib/libast/common/hash/hashdump.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashfree.c (renamed from usr/src/lib/libast/common/hash/hashfree.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashlast.c (renamed from usr/src/lib/libast/common/hash/hashlast.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashlib.h (renamed from usr/src/lib/libast/common/hash/hashlib.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashlook.c (renamed from usr/src/lib/libast/common/hash/hashlook.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashscan.c (renamed from usr/src/lib/libast/common/hash/hashscan.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashsize.c (renamed from usr/src/lib/libast/common/hash/hashsize.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashview.c (renamed from usr/src/lib/libast/common/hash/hashview.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/hashwalk.c (renamed from usr/src/lib/libast/common/hash/hashwalk.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/memhash.c (renamed from usr/src/lib/libast/common/hash/memhash.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/memsum.c (renamed from usr/src/lib/libast/common/hash/memsum.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/strhash.c (renamed from usr/src/lib/libast/common/hash/strhash.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/strkey.c (renamed from usr/src/lib/libast/common/hash/strkey.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/hash/strsum.c (renamed from usr/src/lib/libast/common/hash/strsum.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/aso.h183
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ast.h (renamed from usr/src/lib/libast/common/include/ast.h)61
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ast_dir.h (renamed from usr/src/lib/libast/common/include/ast_dir.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ast_getopt.h (renamed from usr/src/lib/libast/common/include/ast_getopt.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ast_std.h (renamed from usr/src/lib/libast/common/include/ast_std.h)18
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ast_windows.h (renamed from usr/src/lib/libast/common/include/ast_windows.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ccode.h (renamed from usr/src/lib/libast/common/include/ccode.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/cdt.h354
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/cmdarg.h (renamed from usr/src/lib/libast/common/include/cmdarg.h)64
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/debug.h (renamed from usr/src/lib/libast/common/include/debug.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/dt.h (renamed from usr/src/lib/libast/common/include/dt.h)11
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/error.h (renamed from usr/src/lib/libast/common/include/error.h)14
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/find.h (renamed from usr/src/lib/libast/common/include/find.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/fnv.h (renamed from usr/src/lib/libast/common/include/fnv.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/fs3d.h (renamed from usr/src/lib/libast/common/include/fs3d.h)13
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/fts.h (renamed from usr/src/lib/libast/common/include/fts.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ftwalk.h (renamed from usr/src/lib/libast/common/include/ftwalk.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/glob.h (renamed from usr/src/lib/libast/common/include/glob.h)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/hash.h (renamed from usr/src/lib/libast/common/include/hash.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/hashkey.h (renamed from usr/src/lib/libast/common/include/hashkey.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/hashpart.h (renamed from usr/src/lib/libast/common/include/hashpart.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ip6.h (renamed from usr/src/lib/libast/common/include/ip6.h)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/ls.h (renamed from usr/src/lib/libast/common/include/ls.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/magic.h (renamed from usr/src/lib/libast/common/include/magic.h)9
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/magicid.h (renamed from usr/src/lib/libast/common/include/magicid.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/mc.h (renamed from usr/src/lib/libast/common/include/mc.h)14
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/mime.h (renamed from usr/src/lib/libast/common/include/mime.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/mnt.h (renamed from usr/src/lib/libast/common/include/mnt.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/modecanon.h (renamed from usr/src/lib/libast/common/include/modecanon.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/modex.h (renamed from usr/src/lib/libast/common/include/modex.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/namval.h (renamed from usr/src/lib/libast/common/include/namval.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/option.h (renamed from usr/src/lib/libast/common/include/option.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/proc.h (renamed from usr/src/lib/libast/common/include/proc.h)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/recfmt.h (renamed from usr/src/lib/libast/common/include/recfmt.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/regex.h (renamed from usr/src/lib/libast/common/include/regex.h)24
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/sfdisc.h (renamed from usr/src/lib/libast/common/include/sfdisc.h)11
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/sfio.h (renamed from usr/src/lib/libast/i386/include/ast/sfio.h)20
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/sfio_s.h (renamed from usr/src/lib/libast/i386/include/ast/sfio_s.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/sfio_t.h (renamed from usr/src/lib/libast/i386/include/ast/sfio_t.h)19
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/shcmd.h (renamed from usr/src/lib/libast/common/include/shcmd.h)59
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/stack.h (renamed from usr/src/lib/libast/common/include/stack.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/stak.h (renamed from usr/src/lib/libast/common/include/stak.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/stk.h (renamed from usr/src/lib/libast/common/include/stk.h)20
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/swap.h (renamed from usr/src/lib/libast/common/include/swap.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/tar.h (renamed from usr/src/lib/libast/common/include/tar.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/times.h (renamed from usr/src/lib/libast/common/include/times.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/tm.h (renamed from usr/src/lib/libast/common/include/tm.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/tok.h (renamed from usr/src/lib/libast/common/include/tok.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/usage.h (renamed from usr/src/lib/libast/amd64/include/ast/usage.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/vdb.h (renamed from usr/src/lib/libast/common/include/vdb.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/vecargs.h (renamed from usr/src/lib/libast/common/include/vecargs.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/vmalloc.h (renamed from usr/src/lib/libast/i386/include/ast/vmalloc.h)162
-rw-r--r--usr/src/contrib/ast/src/lib/libast/include/wait.h (renamed from usr/src/lib/libast/common/include/wait.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/LIBAST.3 (renamed from usr/src/lib/libast/common/man/LIBAST.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/aso.3357
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/ast.3 (renamed from usr/src/lib/libast/common/man/ast.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/astsa.3 (renamed from usr/src/lib/libast/common/man/astsa.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/cdt.3 (renamed from usr/src/lib/libast/common/man/cdt.3)410
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/chr.3 (renamed from usr/src/lib/libast/common/man/chr.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/compat.3 (renamed from usr/src/lib/libast/common/man/compat.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/error.3 (renamed from usr/src/lib/libast/common/man/error.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/find.3 (renamed from usr/src/lib/libast/common/man/find.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/fmt.3 (renamed from usr/src/lib/libast/common/man/fmt.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/fmtls.3 (renamed from usr/src/lib/libast/common/man/fmtls.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/fs3d.3 (renamed from usr/src/lib/libast/common/man/fs3d.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/ftwalk.3 (renamed from usr/src/lib/libast/common/man/ftwalk.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/getcwd.3 (renamed from usr/src/lib/libast/common/man/getcwd.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/hash.3 (renamed from usr/src/lib/libast/common/man/hash.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/iblocks.3 (renamed from usr/src/lib/libast/common/man/iblocks.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/int.3 (renamed from usr/src/lib/libast/common/man/int.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/ip6.3 (renamed from usr/src/lib/libast/common/man/ip6.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/magic.3 (renamed from usr/src/lib/libast/common/man/magic.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/mem.3 (renamed from usr/src/lib/libast/common/man/mem.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/mime.3 (renamed from usr/src/lib/libast/common/man/mime.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/modecanon.3 (renamed from usr/src/lib/libast/common/man/modecanon.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/optget.3 (renamed from usr/src/lib/libast/common/man/optget.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/path.3 (renamed from usr/src/lib/libast/common/man/path.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/preroot.3 (renamed from usr/src/lib/libast/common/man/preroot.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/proc.3 (renamed from usr/src/lib/libast/common/man/proc.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/re.3 (renamed from usr/src/lib/libast/common/man/re.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/regex.3 (renamed from usr/src/lib/libast/common/man/regex.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/setenviron.3 (renamed from usr/src/lib/libast/common/man/setenviron.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/sfdisc.3 (renamed from usr/src/lib/libast/common/man/sfdisc.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/sfio.3 (renamed from usr/src/lib/libast/common/man/sfio.3)21
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/sig.3 (renamed from usr/src/lib/libast/common/man/sig.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/spawnveg.3 (renamed from usr/src/lib/libast/common/man/spawnveg.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/stak.3 (renamed from usr/src/lib/libast/common/man/stak.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/stk.3 (renamed from usr/src/lib/libast/common/man/stk.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strcopy.3 (renamed from usr/src/lib/libast/common/man/strcopy.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strdup.3 (renamed from usr/src/lib/libast/common/man/strdup.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strelapsed.3 (renamed from usr/src/lib/libast/common/man/strelapsed.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strerror.3 (renamed from usr/src/lib/libast/common/man/strerror.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/stresc.3 (renamed from usr/src/lib/libast/common/man/stresc.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/streval.3 (renamed from usr/src/lib/libast/common/man/streval.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strgid.3 (renamed from usr/src/lib/libast/common/man/strgid.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strmatch.3 (renamed from usr/src/lib/libast/common/man/strmatch.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/stropt.3 (renamed from usr/src/lib/libast/common/man/stropt.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strperm.3 (renamed from usr/src/lib/libast/common/man/strperm.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strsignal.3 (renamed from usr/src/lib/libast/common/man/strsignal.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strsort.3 (renamed from usr/src/lib/libast/common/man/strsort.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strtape.3 (renamed from usr/src/lib/libast/common/man/strtape.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/strton.3 (renamed from usr/src/lib/libast/common/man/strton.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/struid.3 (renamed from usr/src/lib/libast/common/man/struid.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/swap.3 (renamed from usr/src/lib/libast/common/man/swap.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/tab.3 (renamed from usr/src/lib/libast/common/man/tab.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/tm.3 (renamed from usr/src/lib/libast/common/man/tm.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/tmx.3 (renamed from usr/src/lib/libast/common/man/tmx.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/tok.3 (renamed from usr/src/lib/libast/common/man/tok.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/touch.3 (renamed from usr/src/lib/libast/common/man/touch.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/tv.3 (renamed from usr/src/lib/libast/common/man/tv.3)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/vecargs.3 (renamed from usr/src/lib/libast/common/man/vecargs.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/man/vmalloc.3 (renamed from usr/src/lib/libast/common/man/vmalloc.3)369
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/astintercept.c (renamed from usr/src/lib/libast/common/misc/astintercept.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/cmdarg.c (renamed from usr/src/lib/libast/common/misc/cmdarg.c)155
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/cmdlib.h (renamed from usr/src/lib/libast/i386/include/ast/modex.h)75
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/conformance.c151
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/debug.c (renamed from usr/src/lib/libast/common/misc/debug.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/error.c (renamed from usr/src/lib/libast/common/misc/error.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/errorf.c (renamed from usr/src/lib/libast/common/misc/errorf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/errormsg.c (renamed from usr/src/lib/libast/common/misc/errormsg.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/errorx.c (renamed from usr/src/lib/libast/common/misc/errorx.c)15
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/fastfind.c (renamed from usr/src/lib/libast/common/misc/fastfind.c)33
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/findlib.h (renamed from usr/src/lib/libast/common/misc/findlib.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/fmtrec.c (renamed from usr/src/lib/libast/common/misc/fmtrec.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/fs3d.c (renamed from usr/src/lib/libast/common/misc/fs3d.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/fts.c (renamed from usr/src/lib/libast/common/misc/fts.c)39
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/ftwalk.c (renamed from usr/src/lib/libast/common/misc/ftwalk.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/ftwflags.c (renamed from usr/src/lib/libast/common/misc/ftwflags.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/getcwd.c (renamed from usr/src/lib/libast/common/misc/getcwd.c)52
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/getenv.c (renamed from usr/src/lib/libast/common/misc/getenv.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/glob.c (renamed from usr/src/lib/libast/common/misc/glob.c)85
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/intercepts.h (renamed from usr/src/lib/libast/common/misc/intercepts.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/magic.c (renamed from usr/src/lib/libast/common/misc/magic.c)122
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/magic.tab1723
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/mime.c (renamed from usr/src/lib/libast/common/misc/mime.c)54
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/mimelib.h (renamed from usr/src/lib/libast/common/misc/mimelib.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/mimetype.c (renamed from usr/src/lib/libast/common/misc/mimetype.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/optctx.c (renamed from usr/src/lib/libast/common/misc/optctx.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/optesc.c (renamed from usr/src/lib/libast/common/misc/optesc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/optget.c (renamed from usr/src/lib/libast/common/misc/optget.c)1236
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/optjoin.c (renamed from usr/src/lib/libast/common/misc/optjoin.c)40
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/optlib.h115
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/procclose.c (renamed from usr/src/lib/libast/common/misc/procclose.c)75
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/procfree.c (renamed from usr/src/lib/libast/common/misc/procfree.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/proclib.h (renamed from usr/src/lib/libast/common/misc/proclib.h)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/procopen.c (renamed from usr/src/lib/libast/common/misc/procopen.c)95
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/procrun.c (renamed from usr/src/lib/libast/common/misc/procrun.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/recfmt.c (renamed from usr/src/lib/libast/common/misc/recfmt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/reclen.c (renamed from usr/src/lib/libast/common/misc/reclen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/recstr.c (renamed from usr/src/lib/libast/common/misc/recstr.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/setenviron.c (renamed from usr/src/lib/libast/common/misc/setenviron.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/sigcrit.c (renamed from usr/src/lib/libast/common/misc/sigcrit.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/sigdata.c (renamed from usr/src/lib/libast/common/misc/sigdata.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/signal.c (renamed from usr/src/lib/libast/common/misc/signal.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/stack.c (renamed from usr/src/lib/libast/common/misc/stack.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/state.c (renamed from usr/src/lib/libast/common/misc/state.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/stk.c (renamed from usr/src/lib/libast/common/misc/stk.c)78
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/systrace.c (renamed from usr/src/lib/libast/common/misc/systrace.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/translate.c (renamed from usr/src/lib/libast/common/misc/translate.c)112
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/univdata.c (renamed from usr/src/lib/libast/common/misc/univdata.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/misc/univlib.h (renamed from usr/src/lib/libast/common/misc/univlib.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/obsolete/spawn.c (renamed from usr/src/lib/libast/common/obsolete/spawn.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathaccess.c (renamed from usr/src/lib/libast/common/path/pathaccess.c)26
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathbin.c (renamed from usr/src/lib/libast/common/path/pathbin.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathcanon.c (renamed from usr/src/lib/libast/common/path/pathcanon.c)233
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathcat.c (renamed from usr/src/lib/libast/common/path/pathcat.c)58
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathcd.c (renamed from usr/src/lib/libast/common/path/pathcd.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathcheck.c (renamed from usr/src/lib/libast/common/path/pathcheck.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathexists.c (renamed from usr/src/lib/libast/common/path/pathexists.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathfind.c (renamed from usr/src/lib/libast/common/path/pathfind.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathgetlink.c (renamed from usr/src/lib/libast/common/path/pathgetlink.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathkey.c (renamed from usr/src/lib/libast/common/path/pathkey.c)39
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathnative.c (renamed from usr/src/lib/libast/common/path/pathnative.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathpath.c (renamed from usr/src/lib/libast/common/path/pathpath.c)34
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathposix.c (renamed from usr/src/lib/libast/common/path/pathposix.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathprobe.c (renamed from usr/src/lib/libast/common/path/pathprobe.c)55
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathprog.c (renamed from usr/src/lib/libast/common/path/pathprog.c)55
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathrepl.c (renamed from usr/src/lib/libast/common/path/pathrepl.c)30
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathsetlink.c (renamed from usr/src/lib/libast/common/path/pathsetlink.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathshell.c (renamed from usr/src/lib/libast/common/path/pathshell.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathstat.c (renamed from usr/src/lib/libast/common/path/pathstat.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathtemp.c (renamed from usr/src/lib/libast/common/path/pathtemp.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/path/pathtmp.c (renamed from usr/src/lib/libast/common/path/pathtmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/astconf.c (renamed from usr/src/lib/libast/common/port/astconf.c)181
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/astcopy.c (renamed from usr/src/lib/libast/common/port/astcopy.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/astdynamic.c (renamed from usr/src/lib/libast/common/port/astdynamic.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/astlicense.c (renamed from usr/src/lib/libast/common/port/astlicense.c)264
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/astmath.c (renamed from usr/src/lib/libast/common/port/astmath.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/astquery.c (renamed from usr/src/lib/libast/common/port/astquery.c)25
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/aststatic.c (renamed from usr/src/lib/libast/common/port/aststatic.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/astwinsize.c (renamed from usr/src/lib/libast/common/port/astwinsize.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/atmain.C37
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/iblocks.c (renamed from usr/src/lib/libast/common/port/iblocks.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/lc.c (renamed from usr/src/lib/libast/common/port/lc.c)121
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/lc.tab (renamed from usr/src/lib/libast/common/port/lc.tab)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/lcgen.c (renamed from usr/src/lib/libast/common/port/lcgen.c)26
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/lclang.h (renamed from usr/src/lib/libast/common/port/lclang.h)66
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/lclib.h (renamed from usr/src/lib/libast/common/port/lclib.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/mc.c (renamed from usr/src/lib/libast/common/port/mc.c)18
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/mnt.c (renamed from usr/src/lib/libast/common/port/mnt.c)47
-rw-r--r--usr/src/contrib/ast/src/lib/libast/port/touch.c (renamed from usr/src/lib/libast/common/port/touch.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/preroot/getpreroot.c (renamed from usr/src/lib/libast/common/preroot/getpreroot.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/preroot/ispreroot.c (renamed from usr/src/lib/libast/common/preroot/ispreroot.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/preroot/realopen.c (renamed from usr/src/lib/libast/common/preroot/realopen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/preroot/setpreroot.c (renamed from usr/src/lib/libast/common/preroot/setpreroot.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regalloc.c (renamed from usr/src/lib/libast/common/regex/regalloc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regcache.c (renamed from usr/src/lib/libast/common/regex/regcache.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regclass.c (renamed from usr/src/lib/libast/common/regex/regclass.c)127
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regcoll.c120
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regcomp.c (renamed from usr/src/lib/libast/common/regex/regcomp.c)239
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regdecomp.c (renamed from usr/src/lib/libast/common/regex/regdecomp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regerror.c (renamed from usr/src/lib/libast/common/regex/regerror.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regexec.c (renamed from usr/src/lib/libast/common/regex/regexec.c)44
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regfatal.c (renamed from usr/src/lib/libast/common/regex/regfatal.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/reginit.c (renamed from usr/src/lib/libast/common/regex/reginit.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/reglib.h (renamed from usr/src/lib/libast/common/regex/reglib.h)20
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regnexec.c (renamed from usr/src/lib/libast/common/regex/regnexec.c)82
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regrecord.c (renamed from usr/src/lib/libast/common/regex/regrecord.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regrexec.c (renamed from usr/src/lib/libast/common/regex/regrexec.c)46
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regstat.c (renamed from usr/src/lib/libast/common/regex/regstat.c)17
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regsub.c (renamed from usr/src/lib/libast/common/regex/regsub.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regsubcomp.c (renamed from usr/src/lib/libast/common/regex/regsubcomp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/regex/regsubexec.c (renamed from usr/src/lib/libast/common/regex/regsubexec.c)49
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfclrerr.c (renamed from usr/src/lib/libast/common/sfio/_sfclrerr.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfdlen.c (renamed from usr/src/lib/libast/common/sfio/_sfdlen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfeof.c (renamed from usr/src/lib/libast/common/sfio/_sfeof.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sferror.c (renamed from usr/src/lib/libast/common/sfio/_sferror.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sffileno.c (renamed from usr/src/lib/libast/common/sfio/_sffileno.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfgetc.c (renamed from usr/src/lib/libast/common/sfio/_sfgetc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl.c (renamed from usr/src/lib/libast/common/sfio/_sfgetl.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl2.c (renamed from usr/src/lib/libast/common/sfio/_sfgetl2.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu.c (renamed from usr/src/lib/libast/common/sfio/_sfgetu.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu2.c (renamed from usr/src/lib/libast/common/sfio/_sfgetu2.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfllen.c (renamed from usr/src/lib/libast/common/sfio/_sfllen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfopen.c (renamed from usr/src/lib/libast/common/sfio/_sfopen.c)43
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfputc.c (renamed from usr/src/lib/libast/common/sfio/_sfputc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfputd.c (renamed from usr/src/lib/libast/common/sfio/_sfputd.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfputl.c (renamed from usr/src/lib/libast/common/sfio/_sfputl.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfputm.c (renamed from usr/src/lib/libast/common/sfio/_sfputm.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfputu.c (renamed from usr/src/lib/libast/common/sfio/_sfputu.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfslen.c (renamed from usr/src/lib/libast/common/sfio/_sfslen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfstacked.c (renamed from usr/src/lib/libast/common/sfio/_sfstacked.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfulen.c (renamed from usr/src/lib/libast/common/sfio/_sfulen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/_sfvalue.c (renamed from usr/src/lib/libast/common/sfio/_sfvalue.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfclose.c (renamed from usr/src/lib/libast/common/sfio/sfclose.c)20
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfclrlock.c (renamed from usr/src/lib/libast/common/sfio/sfclrlock.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfcvt.c (renamed from usr/src/lib/libast/common/sfio/sfcvt.c)39
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfdisc.c (renamed from usr/src/lib/libast/common/sfio/sfdisc.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfdlen.c (renamed from usr/src/lib/libast/common/sfio/sfdlen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfecvt.c (renamed from usr/src/lib/libast/common/sfio/sfecvt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfexcept.c (renamed from usr/src/lib/libast/common/sfio/sfexcept.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfextern.c (renamed from usr/src/lib/libast/common/sfio/sfextern.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sffcvt.c (renamed from usr/src/lib/libast/common/sfio/sffcvt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sffilbuf.c (renamed from usr/src/lib/libast/common/sfio/sffilbuf.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfflsbuf.c (renamed from usr/src/lib/libast/common/sfio/sfflsbuf.c)13
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfgetd.c (renamed from usr/src/lib/libast/common/sfio/sfgetd.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfgetl.c (renamed from usr/src/lib/libast/common/sfio/sfgetl.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfgetm.c (renamed from usr/src/lib/libast/common/sfio/sfgetm.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfgetr.c (renamed from usr/src/lib/libast/common/sfio/sfgetr.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfgetu.c (renamed from usr/src/lib/libast/common/sfio/sfgetu.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfhdr.h (renamed from usr/src/lib/libast/common/sfio/sfhdr.h)54
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfllen.c (renamed from usr/src/lib/libast/common/sfio/sfllen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfmode.c (renamed from usr/src/lib/libast/common/sfio/sfmode.c)21
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfmove.c (renamed from usr/src/lib/libast/common/sfio/sfmove.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfmutex.c (renamed from usr/src/lib/libast/common/sfio/sfmutex.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfnew.c (renamed from usr/src/lib/libast/common/sfio/sfnew.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfnotify.c (renamed from usr/src/lib/libast/common/sfio/sfnotify.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfnputc.c (renamed from usr/src/lib/libast/common/sfio/sfnputc.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfopen.c (renamed from usr/src/lib/libast/common/sfio/sfopen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfpeek.c (renamed from usr/src/lib/libast/common/sfio/sfpeek.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfpkrd.c (renamed from usr/src/lib/libast/common/sfio/sfpkrd.c)134
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfpoll.c (renamed from usr/src/lib/libast/common/sfio/sfpoll.c)23
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfpool.c (renamed from usr/src/lib/libast/common/sfio/sfpool.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfpopen.c (renamed from usr/src/lib/libast/common/sfio/sfpopen.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfprintf.c (renamed from usr/src/lib/libast/common/sfio/sfprintf.c)40
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfprints.c (renamed from usr/src/lib/libast/common/sfio/sfprints.c)23
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfpurge.c (renamed from usr/src/lib/libast/common/sfio/sfpurge.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfputd.c (renamed from usr/src/lib/libast/common/sfio/sfputd.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfputl.c (renamed from usr/src/lib/libast/common/sfio/sfputl.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfputm.c (renamed from usr/src/lib/libast/common/sfio/sfputm.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfputr.c (renamed from usr/src/lib/libast/common/sfio/sfputr.c)29
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfputu.c (renamed from usr/src/lib/libast/common/sfio/sfputu.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfraise.c (renamed from usr/src/lib/libast/common/sfio/sfraise.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfrd.c (renamed from usr/src/lib/libast/common/sfio/sfrd.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfread.c (renamed from usr/src/lib/libast/common/sfio/sfread.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfreserve.c (renamed from usr/src/lib/libast/common/sfio/sfreserve.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfresize.c (renamed from usr/src/lib/libast/common/sfio/sfresize.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfscanf.c (renamed from usr/src/lib/libast/common/sfio/sfscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfseek.c (renamed from usr/src/lib/libast/common/sfio/sfseek.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfset.c (renamed from usr/src/lib/libast/common/sfio/sfset.c)26
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfsetbuf.c (renamed from usr/src/lib/libast/common/sfio/sfsetbuf.c)64
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfsetfd.c (renamed from usr/src/lib/libast/common/sfio/sfsetfd.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfsize.c (renamed from usr/src/lib/libast/common/sfio/sfsize.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfsk.c (renamed from usr/src/lib/libast/common/sfio/sfsk.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfstack.c (renamed from usr/src/lib/libast/common/sfio/sfstack.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfstrtod.c (renamed from usr/src/lib/libast/common/sfio/sfstrtod.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfstrtof.h (renamed from usr/src/lib/libast/common/sfio/sfstrtof.h)27
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfswap.c (renamed from usr/src/lib/libast/common/sfio/sfswap.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfsync.c (renamed from usr/src/lib/libast/common/sfio/sfsync.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sftable.c (renamed from usr/src/lib/libast/common/sfio/sftable.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sftell.c (renamed from usr/src/lib/libast/common/sfio/sftell.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sftmp.c (renamed from usr/src/lib/libast/common/sfio/sftmp.c)52
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfungetc.c (renamed from usr/src/lib/libast/common/sfio/sfungetc.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfvprintf.c (renamed from usr/src/lib/libast/common/sfio/sfvprintf.c)101
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfvscanf.c (renamed from usr/src/lib/libast/common/sfio/sfvscanf.c)25
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfwalk.c (renamed from usr/src/lib/libast/common/sfio/sfwalk.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfwr.c (renamed from usr/src/lib/libast/common/sfio/sfwr.c)15
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/sfwrite.c (renamed from usr/src/lib/libast/common/sfio/sfwrite.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libast/sfio/vthread.h (renamed from usr/src/lib/libast/common/sfio/vthread.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/std/bytesex.h (renamed from usr/src/lib/libast/sparc/include/ast/bytesex.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/std/dirent.h (renamed from usr/src/lib/libast/common/std/dirent.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/std/endian.h (renamed from usr/src/lib/libast/amd64/include/ast/endian.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/std/iconv.h (renamed from usr/src/lib/libast/amd64/include/ast/iconv.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/std/nl_types.h (renamed from usr/src/lib/libast/common/std/nl_types.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/std/stdio.h (renamed from usr/src/lib/libast/common/std/stdio.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/std/wchar.h (renamed from usr/src/lib/libast/common/std/wchar.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/std/wctype.h (renamed from usr/src/lib/libast/amd64/include/ast/stdio.h)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_doprnt.c (renamed from usr/src/lib/libast/common/stdio/_doprnt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_doscan.c (renamed from usr/src/lib/libast/common/stdio/_doscan.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_filbuf.c (renamed from usr/src/lib/libast/common/stdio/_filbuf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_flsbuf.c (renamed from usr/src/lib/libast/common/stdio/_flsbuf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdfun.c (renamed from usr/src/lib/libast/common/stdio/_stdfun.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdopen.c (renamed from usr/src/lib/libast/common/stdio/_stdopen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdprintf.c (renamed from usr/src/lib/libast/common/stdio/_stdprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdscanf.c (renamed from usr/src/lib/libast/common/stdio/_stdscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdsprnt.c (renamed from usr/src/lib/libast/common/stdio/_stdsprnt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdvbuf.c (renamed from usr/src/lib/libast/common/stdio/_stdvbuf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdvsnprnt.c (renamed from usr/src/lib/libast/common/stdio/_stdvsnprnt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdvsprnt.c (renamed from usr/src/lib/libast/common/stdio/_stdvsprnt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/_stdvsscn.c (renamed from usr/src/lib/libast/common/stdio/_stdvsscn.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/asprintf.c (renamed from usr/src/lib/libast/common/stdio/asprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/clearerr.c (renamed from usr/src/lib/libast/common/stdio/clearerr.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fclose.c (renamed from usr/src/lib/libast/common/stdio/fclose.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fcloseall.c (renamed from usr/src/lib/libast/common/stdio/fcloseall.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fdopen.c (renamed from usr/src/lib/libast/common/stdio/fdopen.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/feof.c (renamed from usr/src/lib/libast/common/stdio/feof.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/ferror.c (renamed from usr/src/lib/libast/common/stdio/ferror.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fflush.c (renamed from usr/src/lib/libast/common/stdio/fflush.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fgetc.c (renamed from usr/src/lib/libast/common/stdio/fgetc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fgetpos.c (renamed from usr/src/lib/libast/common/stdio/fgetpos.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fgets.c (renamed from usr/src/lib/libast/common/stdio/fgets.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fgetwc.c (renamed from usr/src/lib/libast/common/stdio/fgetwc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fgetws.c (renamed from usr/src/lib/libast/common/stdio/fgetws.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fileno.c (renamed from usr/src/lib/libast/common/stdio/fileno.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/flockfile.c (renamed from usr/src/lib/libast/common/stdio/flockfile.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fmemopen.c (renamed from usr/src/lib/libast/common/stdio/fmemopen.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fopen.c (renamed from usr/src/lib/libast/common/stdio/fopen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fprintf.c (renamed from usr/src/lib/libast/common/stdio/fprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fpurge.c (renamed from usr/src/lib/libast/common/stdio/fpurge.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fputc.c (renamed from usr/src/lib/libast/common/stdio/fputc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fputs.c (renamed from usr/src/lib/libast/common/stdio/fputs.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fputwc.c (renamed from usr/src/lib/libast/common/stdio/fputwc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fputws.c (renamed from usr/src/lib/libast/common/stdio/fputws.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fread.c (renamed from usr/src/lib/libast/common/stdio/fread.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/freopen.c (renamed from usr/src/lib/libast/common/stdio/freopen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fscanf.c (renamed from usr/src/lib/libast/common/stdio/fscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fseek.c (renamed from usr/src/lib/libast/common/stdio/fseek.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fseeko.c (renamed from usr/src/lib/libast/common/stdio/fseeko.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fsetpos.c (renamed from usr/src/lib/libast/common/stdio/fsetpos.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/ftell.c (renamed from usr/src/lib/libast/common/stdio/ftell.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/ftello.c (renamed from usr/src/lib/libast/common/stdio/ftello.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/ftrylockfile.c (renamed from usr/src/lib/libast/common/stdio/ftrylockfile.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/funlockfile.c (renamed from usr/src/lib/libast/common/stdio/funlockfile.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fwide.c (renamed from usr/src/lib/libast/common/stdio/fwide.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fwprintf.c (renamed from usr/src/lib/libast/common/stdio/fwprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fwrite.c (renamed from usr/src/lib/libast/common/stdio/fwrite.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/fwscanf.c (renamed from usr/src/lib/libast/common/stdio/fwscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/getc.c (renamed from usr/src/lib/libast/common/stdio/getc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/getchar.c (renamed from usr/src/lib/libast/common/stdio/getchar.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/getdelim.c (renamed from usr/src/lib/libast/common/stdio/getdelim.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/getline.c (renamed from usr/src/lib/libast/common/stdio/getline.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/getw.c (renamed from usr/src/lib/libast/common/stdio/getw.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/getwc.c (renamed from usr/src/lib/libast/common/stdio/getwc.c)9
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/getwchar.c (renamed from usr/src/lib/libast/common/stdio/getwchar.c)9
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/pclose.c (renamed from usr/src/lib/libast/common/stdio/pclose.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/popen.c (renamed from usr/src/lib/libast/common/stdio/popen.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/printf.c (renamed from usr/src/lib/libast/common/stdio/printf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/putc.c (renamed from usr/src/lib/libast/common/stdio/putc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/putchar.c (renamed from usr/src/lib/libast/common/stdio/putchar.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/puts.c (renamed from usr/src/lib/libast/common/stdio/puts.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/putw.c (renamed from usr/src/lib/libast/common/stdio/putw.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/putwc.c (renamed from usr/src/lib/libast/common/stdio/putwc.c)9
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/putwchar.c (renamed from usr/src/lib/libast/common/stdio/putwchar.c)9
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/rewind.c (renamed from usr/src/lib/libast/common/stdio/rewind.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/scanf.c (renamed from usr/src/lib/libast/common/stdio/scanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/setbuf.c (renamed from usr/src/lib/libast/common/stdio/setbuf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/setbuffer.c (renamed from usr/src/lib/libast/common/stdio/setbuffer.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/setlinebuf.c (renamed from usr/src/lib/libast/common/stdio/setlinebuf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/setvbuf.c (renamed from usr/src/lib/libast/common/stdio/setvbuf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/snprintf.c (renamed from usr/src/lib/libast/common/stdio/snprintf.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/sprintf.c (renamed from usr/src/lib/libast/common/stdio/sprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/sscanf.c (renamed from usr/src/lib/libast/common/stdio/sscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/stdhdr.h (renamed from usr/src/lib/libast/common/stdio/stdhdr.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/stdio_c99.c (renamed from usr/src/lib/libast/common/stdio/stdio_c99.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/swprintf.c (renamed from usr/src/lib/libast/common/stdio/swprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/swscanf.c (renamed from usr/src/lib/libast/common/stdio/swscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/tmpfile.c (renamed from usr/src/lib/libast/common/stdio/tmpfile.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/ungetc.c (renamed from usr/src/lib/libast/common/stdio/ungetc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/ungetwc.c (renamed from usr/src/lib/libast/common/stdio/ungetwc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vasprintf.c (renamed from usr/src/lib/libast/common/stdio/vasprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vfprintf.c (renamed from usr/src/lib/libast/common/stdio/vfprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vfscanf.c (renamed from usr/src/lib/libast/common/stdio/vfscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vfwprintf.c (renamed from usr/src/lib/libast/common/stdio/vfwprintf.c)11
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vfwscanf.c (renamed from usr/src/lib/libast/common/stdio/vfwscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vprintf.c (renamed from usr/src/lib/libast/common/stdio/vprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vscanf.c (renamed from usr/src/lib/libast/common/stdio/vscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vsnprintf.c (renamed from usr/src/lib/libast/common/stdio/vsnprintf.c)49
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vsprintf.c (renamed from usr/src/lib/libast/common/stdio/vsprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vsscanf.c (renamed from usr/src/lib/libast/common/stdio/vsscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vswprintf.c (renamed from usr/src/lib/libast/common/stdio/vswprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vswscanf.c (renamed from usr/src/lib/libast/common/stdio/vswscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vwprintf.c (renamed from usr/src/lib/libast/common/stdio/vwprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/vwscanf.c (renamed from usr/src/lib/libast/common/stdio/vwscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/wprintf.c (renamed from usr/src/lib/libast/common/stdio/wprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/stdio/wscanf.c (renamed from usr/src/lib/libast/common/stdio/wscanf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/base64.c (renamed from usr/src/lib/libast/common/string/base64.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/ccmap.c (renamed from usr/src/lib/libast/common/string/ccmap.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/ccmapid.c (renamed from usr/src/lib/libast/common/string/ccmapid.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/ccnative.c (renamed from usr/src/lib/libast/common/string/ccnative.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/chresc.c237
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/chrtoi.c (renamed from usr/src/lib/libast/common/string/chrtoi.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtbase.c (renamed from usr/src/lib/libast/common/string/fmtbase.c)44
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtbuf.c (renamed from usr/src/lib/libast/common/string/fmtbuf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtclock.c (renamed from usr/src/lib/libast/common/string/fmtclock.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtdev.c (renamed from usr/src/lib/libast/common/string/fmtdev.c)19
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtelapsed.c (renamed from usr/src/lib/libast/common/string/fmtelapsed.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmterror.c (renamed from usr/src/lib/libast/common/string/fmterror.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtesc.c (renamed from usr/src/lib/libast/common/string/fmtesc.c)23
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtfmt.c (renamed from usr/src/lib/libast/common/string/fmtfmt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtfs.c (renamed from usr/src/lib/libast/common/string/fmtfs.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtgid.c (renamed from usr/src/lib/libast/common/string/fmtgid.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtident.c (renamed from usr/src/lib/libast/common/string/fmtident.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtint.c122
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtip4.c (renamed from usr/src/lib/libast/common/string/fmtip4.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtip6.c (renamed from usr/src/lib/libast/common/string/fmtip6.c)32
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtls.c (renamed from usr/src/lib/libast/common/string/fmtls.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtmatch.c (renamed from usr/src/lib/libast/common/string/fmtmatch.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtmode.c (renamed from usr/src/lib/libast/common/string/fmtmode.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtnum.c (renamed from usr/src/lib/libast/common/string/fmtnum.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtperm.c (renamed from usr/src/lib/libast/common/string/fmtperm.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtre.c (renamed from usr/src/lib/libast/common/string/fmtre.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtscale.c (renamed from usr/src/lib/libast/common/string/fmtscale.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtsignal.c (renamed from usr/src/lib/libast/common/string/fmtsignal.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmttime.c (renamed from usr/src/lib/libast/common/string/fmttime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmttmx.c (renamed from usr/src/lib/libast/common/string/fmttmx.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmttv.c (renamed from usr/src/lib/libast/common/string/fmttv.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtuid.c (renamed from usr/src/lib/libast/common/string/fmtuid.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/fmtversion.c (renamed from usr/src/lib/libast/common/string/fmtversion.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/memdup.c (renamed from usr/src/lib/libast/common/string/memdup.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/modedata.c (renamed from usr/src/lib/libast/common/string/modedata.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/modei.c (renamed from usr/src/lib/libast/common/string/modei.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/modelib.h (renamed from usr/src/lib/libast/common/string/modelib.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/modex.c (renamed from usr/src/lib/libast/common/string/modex.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/stracmp.c (renamed from usr/src/lib/libast/common/string/stracmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strcopy.c (renamed from usr/src/lib/libast/common/string/strcopy.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strdup.c60
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strelapsed.c (renamed from usr/src/lib/libast/common/string/strelapsed.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strerror.c (renamed from usr/src/lib/libast/common/string/strerror.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/stresc.c (renamed from usr/src/lib/libast/common/string/stresc.c)25
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/streval.c (renamed from usr/src/lib/libast/common/string/streval.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strexpr.c (renamed from usr/src/lib/libast/common/string/strexpr.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strgid.c (renamed from usr/src/lib/libast/common/string/strgid.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strlcat.c (renamed from usr/src/lib/libast/common/string/strlcat.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strlcpy.c (renamed from usr/src/lib/libast/common/string/strlcpy.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strlook.c (renamed from usr/src/lib/libast/common/string/strlook.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strmatch.c (renamed from usr/src/lib/libast/common/string/strmatch.c)60
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strmode.c (renamed from usr/src/lib/libast/common/string/strmode.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strnacmp.c (renamed from usr/src/lib/libast/common/string/strnacmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strncopy.c (renamed from usr/src/lib/libast/common/string/strncopy.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strnpcmp.c (renamed from usr/src/lib/libast/common/string/strnpcmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strntod.c (renamed from usr/src/lib/libast/common/string/strntod.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strntol.c (renamed from usr/src/lib/libast/common/string/strntol.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strntold.c (renamed from usr/src/lib/libast/common/string/strntold.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strntoll.c (renamed from usr/src/lib/libast/common/string/strntoll.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strnton.c (renamed from usr/src/lib/libast/common/string/strnton.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strntonll.c (renamed from usr/src/lib/libast/common/string/strntonll.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strntoul.c (renamed from usr/src/lib/libast/common/string/strntoul.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strntoull.c (renamed from usr/src/lib/libast/common/string/strntoull.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strnvcmp.c (renamed from usr/src/lib/libast/common/string/strnvcmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/stropt.c (renamed from usr/src/lib/libast/common/string/stropt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strpcmp.c (renamed from usr/src/lib/libast/common/string/strpcmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strperm.c (renamed from usr/src/lib/libast/common/string/strperm.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strpsearch.c (renamed from usr/src/lib/libast/common/string/strpsearch.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strsearch.c (renamed from usr/src/lib/libast/common/string/strsearch.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strsort.c (renamed from usr/src/lib/libast/common/string/strsort.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strtape.c (renamed from usr/src/lib/libast/common/string/strtape.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strtoi.h (renamed from usr/src/lib/libast/common/string/strtoi.h)44
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strtoip4.c (renamed from usr/src/lib/libast/common/string/strtoip4.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strtoip6.c (renamed from usr/src/lib/libast/common/string/strtoip6.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strton.c (renamed from usr/src/lib/libast/common/string/strton.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strtonll.c (renamed from usr/src/lib/libast/common/string/strtonll.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/struid.c (renamed from usr/src/lib/libast/common/string/struid.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/struniq.c (renamed from usr/src/lib/libast/common/string/struniq.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/strvcmp.c (renamed from usr/src/lib/libast/common/string/strvcmp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/swapget.c (renamed from usr/src/lib/libast/common/string/swapget.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/swapmem.c (renamed from usr/src/lib/libast/common/string/swapmem.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/swapop.c (renamed from usr/src/lib/libast/common/string/swapop.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/swapput.c (renamed from usr/src/lib/libast/common/string/swapput.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/tok.c (renamed from usr/src/lib/libast/common/string/tok.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/tokline.c (renamed from usr/src/lib/libast/common/string/tokline.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/tokscan.c (renamed from usr/src/lib/libast/common/string/tokscan.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/string/wc2utf8.c78
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmdata.c (renamed from usr/src/lib/libast/common/tm/tmdata.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmdate.c (renamed from usr/src/lib/libast/common/tm/tmdate.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmequiv.c (renamed from usr/src/lib/libast/common/tm/tmequiv.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmfix.c (renamed from usr/src/lib/libast/common/tm/tmfix.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmfmt.c (renamed from usr/src/lib/libast/common/tm/tmfmt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmform.c (renamed from usr/src/lib/libast/common/tm/tmform.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmgoff.c (renamed from usr/src/lib/libast/common/tm/tmgoff.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tminit.c (renamed from usr/src/lib/libast/common/tm/tminit.c)11
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmleap.c (renamed from usr/src/lib/libast/common/tm/tmleap.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmlex.c (renamed from usr/src/lib/libast/common/tm/tmlex.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmlocale.c (renamed from usr/src/lib/libast/common/tm/tmlocale.c)26
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmmake.c (renamed from usr/src/lib/libast/common/tm/tmmake.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmpoff.c (renamed from usr/src/lib/libast/common/tm/tmpoff.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmscan.c (renamed from usr/src/lib/libast/common/tm/tmscan.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmsleep.c (renamed from usr/src/lib/libast/common/tm/tmsleep.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmtime.c (renamed from usr/src/lib/libast/common/tm/tmtime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmtype.c (renamed from usr/src/lib/libast/common/tm/tmtype.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmweek.c (renamed from usr/src/lib/libast/common/tm/tmweek.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmword.c (renamed from usr/src/lib/libast/common/tm/tmword.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxdate.c (renamed from usr/src/lib/libast/common/tm/tmxdate.c)418
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxduration.c (renamed from usr/src/lib/libast/common/tm/tmxduration.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxfmt.c (renamed from usr/src/lib/libast/common/tm/tmxfmt.c)192
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxgettime.c (renamed from usr/src/lib/libast/common/tm/tmxgettime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxleap.c (renamed from usr/src/lib/libast/common/tm/tmxleap.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxmake.c (renamed from usr/src/lib/libast/common/tm/tmxmake.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxscan.c (renamed from usr/src/lib/libast/common/tm/tmxscan.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxsettime.c (renamed from usr/src/lib/libast/common/tm/tmxsettime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxsleep.c (renamed from usr/src/lib/libast/common/tm/tmxsleep.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxtime.c (renamed from usr/src/lib/libast/common/tm/tmxtime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmxtouch.c (renamed from usr/src/lib/libast/common/tm/tmxtouch.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tmzone.c (renamed from usr/src/lib/libast/common/tm/tmzone.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tvcmp.c (renamed from usr/src/lib/libast/common/tm/tvcmp.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tvgettime.c (renamed from usr/src/lib/libast/common/tm/tvgettime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tvsettime.c (renamed from usr/src/lib/libast/common/tm/tvsettime.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tvsleep.c (renamed from usr/src/lib/libast/common/tm/tvsleep.c)2
-rw-r--r--usr/src/contrib/ast/src/lib/libast/tm/tvtouch.c (renamed from usr/src/lib/libast/common/tm/tvtouch.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/a64l.c (renamed from usr/src/lib/libast/common/uwin/a64l.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/acosh.c (renamed from usr/src/lib/libast/common/uwin/acosh.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/asinh.c (renamed from usr/src/lib/libast/common/uwin/asinh.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/atanh.c (renamed from usr/src/lib/libast/common/uwin/atanh.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/cbrt.c (renamed from usr/src/lib/libast/common/uwin/cbrt.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/crypt.c (renamed from usr/src/lib/libast/common/uwin/crypt.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/erf.c (renamed from usr/src/lib/libast/common/uwin/erf.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/err.c (renamed from usr/src/lib/libast/common/uwin/err.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/exp.c (renamed from usr/src/lib/libast/common/uwin/exp.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/exp__E.c (renamed from usr/src/lib/libast/common/uwin/exp__E.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/expm1.c (renamed from usr/src/lib/libast/common/uwin/expm1.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/gamma.c (renamed from usr/src/lib/libast/common/uwin/gamma.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/getpass.c (renamed from usr/src/lib/libast/common/uwin/getpass.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/lgamma.c (renamed from usr/src/lib/libast/common/uwin/lgamma.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/log.c (renamed from usr/src/lib/libast/common/uwin/log.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/log1p.c (renamed from usr/src/lib/libast/common/uwin/log1p.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/log__L.c (renamed from usr/src/lib/libast/common/uwin/log__L.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/mathimpl.h103
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/mini.sym84
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/rand48.c (renamed from usr/src/lib/libast/common/uwin/rand48.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/random.c (renamed from usr/src/lib/libast/common/uwin/random.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/rcmd.c (renamed from usr/src/lib/libast/common/uwin/rcmd.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/rint.c (renamed from usr/src/lib/libast/common/uwin/rint.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/rlib.h80
-rw-r--r--usr/src/contrib/ast/src/lib/libast/uwin/support.c (renamed from usr/src/lib/libast/common/uwin/support.c)0
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vec/vecargs.c (renamed from usr/src/lib/libast/common/vec/vecargs.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vec/vecfile.c (renamed from usr/src/lib/libast/common/vec/vecfile.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vec/vecfree.c (renamed from usr/src/lib/libast/common/vec/vecfree.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vec/vecload.c (renamed from usr/src/lib/libast/common/vec/vecload.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vec/vecstring.c (renamed from usr/src/lib/libast/common/vec/vecstring.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/malloc.c (renamed from usr/src/lib/libast/common/vmalloc/malloc.c)704
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmbest.c (renamed from usr/src/lib/libast/common/vmalloc/vmbest.c)747
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmclear.c (renamed from usr/src/lib/libast/common/vmalloc/vmclear.c)31
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmclose.c (renamed from usr/src/lib/libast/common/vmalloc/vmclose.c)52
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmdcheap.c (renamed from usr/src/lib/libast/common/vmalloc/vmdcheap.c)15
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmdebug.c (renamed from usr/src/lib/libast/common/vmalloc/vmdebug.c)379
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmdisc.c (renamed from usr/src/lib/libast/common/vmalloc/vmdisc.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmexit.c (renamed from usr/src/lib/libast/common/vmalloc/vmexit.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmgetmem.c (renamed from usr/src/lib/libast/common/vmalloc/vmgetmem.c)18
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmhdr.h (renamed from usr/src/lib/libast/common/vmalloc/vmhdr.h)136
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmlast.c (renamed from usr/src/lib/libast/common/vmalloc/vmlast.c)306
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmmopen.c515
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmopen.c180
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmpool.c (renamed from usr/src/lib/libast/common/vmalloc/vmpool.c)214
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmprivate.c (renamed from usr/src/lib/libast/common/vmalloc/vmprivate.c)132
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmprofile.c (renamed from usr/src/lib/libast/common/vmalloc/vmprofile.c)262
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmregion.c (renamed from usr/src/lib/libast/common/vmalloc/vmregion.c)11
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmsegment.c (renamed from usr/src/lib/libast/common/vmalloc/vmsegment.c)26
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmset.c (renamed from usr/src/lib/libast/common/vmalloc/vmset.c)28
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmstat.c (renamed from usr/src/lib/libast/common/vmalloc/vmstat.c)63
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmstrdup.c (renamed from usr/src/lib/libast/common/vmalloc/vmstrdup.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmtrace.c (renamed from usr/src/lib/libast/common/vmalloc/vmtrace.c)18
-rw-r--r--usr/src/contrib/ast/src/lib/libast/vmalloc/vmwalk.c (renamed from usr/src/lib/libast/common/vmalloc/vmwalk.c)46
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/Makefile90
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/Mamfile916
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/RELEASE (renamed from usr/src/lib/libcmd/common/RELEASE)36
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/basename.c (renamed from usr/src/lib/libcmd/common/basename.c)87
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/cat.c (renamed from usr/src/lib/libcmd/common/cat.c)56
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/chgrp.c (renamed from usr/src/lib/libcmd/common/chgrp.c)138
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/chmod.c (renamed from usr/src/lib/libcmd/common/chmod.c)79
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/chown.c (renamed from usr/src/lib/libcmd/common/chown.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/cksum.c (renamed from usr/src/lib/libcmd/common/cksum.c)22
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/cmd.h (renamed from usr/src/lib/libcmd/common/cmd.h)14
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/cmdinit.c (renamed from usr/src/lib/libcmd/common/cmdinit.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/cmp.c399
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/comm.c (renamed from usr/src/lib/libcmd/common/comm.c)48
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/cp.c (renamed from usr/src/lib/libcmd/common/cp.c)311
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/cut.c (renamed from usr/src/lib/libcmd/common/cut.c)22
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/date.c (renamed from usr/src/lib/libcmd/common/date.c)48
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/dirname.c (renamed from usr/src/lib/libcmd/common/dirname.c)55
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/expr.c (renamed from usr/src/lib/libcmd/common/expr.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/fds.c (renamed from usr/src/lib/libcmd/common/fds.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/features/ids (renamed from usr/src/lib/libcmd/common/features/ids)1
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/features/sockets (renamed from usr/src/lib/libcmd/common/features/sockets)0
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/features/symlink (renamed from usr/src/lib/libcmd/common/features/symlink)6
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/features/utsname (renamed from usr/src/lib/libcmd/common/features/utsname)0
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/fmt.c (renamed from usr/src/lib/libcmd/common/fmt.c)21
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/fold.c (renamed from usr/src/lib/libcmd/common/fold.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/fts_fix.c (renamed from usr/src/lib/libcmd/common/fts_fix.c)9
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/fts_fix.h (renamed from usr/src/lib/libcmd/common/fts_fix.h)9
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/getconf.c (renamed from usr/src/lib/libcmd/common/getconf.c)43
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/head.c (renamed from usr/src/lib/libcmd/common/head.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/id.c (renamed from usr/src/lib/libcmd/common/id.c)66
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/join.c (renamed from usr/src/lib/libcmd/common/join.c)32
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/lib.c (renamed from usr/src/lib/libast/common/std/iconv.h)15
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/ln.c (renamed from usr/src/lib/libcmd/common/ln.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/logname.c (renamed from usr/src/lib/libcmd/common/logname.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/md5sum.c (renamed from usr/src/lib/libcmd/common/md5sum.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/mkdir.c (renamed from usr/src/lib/libcmd/common/mkdir.c)110
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/mkfifo.c (renamed from usr/src/lib/libcmd/common/mkfifo.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/mktemp.c (renamed from usr/src/lib/libcmd/common/mktemp.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/mv.c (renamed from usr/src/lib/libcmd/common/mv.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/paste.c (renamed from usr/src/lib/libcmd/common/paste.c)46
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/pathchk.c (renamed from usr/src/lib/libcmd/common/pathchk.c)16
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/pids.c (renamed from usr/src/lib/libcmd/common/pids.c)22
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/rev.c (renamed from usr/src/lib/libcmd/common/rev.c)36
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/rev.h (renamed from usr/src/lib/libcmd/common/rev.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/revlib.c (renamed from usr/src/lib/libcmd/common/revlib.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/rm.c (renamed from usr/src/lib/libcmd/common/rm.c)65
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/rmdir.c (renamed from usr/src/lib/libcmd/common/rmdir.c)44
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/stty.c (renamed from usr/src/lib/libcmd/common/stty.c)62
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/sum.c (renamed from usr/src/lib/libcmd/common/sum.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/sync.c (renamed from usr/src/lib/libcmd/common/sync.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/tail.c (renamed from usr/src/lib/libcmd/common/tail.c)38
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/tee.c (renamed from usr/src/lib/libcmd/common/tee.c)20
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/tty.c (renamed from usr/src/lib/libcmd/common/tty.c)48
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/uname.c (renamed from usr/src/lib/libcmd/common/uname.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/uniq.c (renamed from usr/src/lib/libcmd/common/uniq.c)98
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/vmstate.c (renamed from usr/src/lib/libcmd/common/vmstate.c)55
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/wc.c (renamed from usr/src/lib/libcmd/common/wc.c)10
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/wc.h (renamed from usr/src/lib/libcmd/common/wc.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libcmd/wclib.c (renamed from usr/src/lib/libcmd/common/wclib.c)26
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/Makefile17
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/Mamfile322
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/RELEASE (renamed from usr/src/lib/libdll/common/RELEASE)10
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dlfcn.c (renamed from usr/src/lib/libdll/common/dlfcn.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dll_lib.c188
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dllcheck.c85
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dllerror.c (renamed from usr/src/lib/libast/i386/src/lib/libast/ast_namval.h)46
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dllfind.c (renamed from usr/src/lib/libdll/common/dllfind.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dlllib.h34
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dlllook.c (renamed from usr/src/lib/libdll/common/dlllook.c)13
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dllnext.c (renamed from usr/src/lib/libdll/common/dllnext.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dllopen.c (renamed from usr/src/lib/libdll/common/dllopen.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dllplug.c (renamed from usr/src/lib/libdll/common/dllplug.c)79
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/dllscan.c (renamed from usr/src/lib/libdll/common/dllscan.c)53
-rw-r--r--usr/src/contrib/ast/src/lib/libdll/features/dll (renamed from usr/src/lib/libdll/common/features/dll)21
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/BUGS (renamed from usr/src/lib/libpp/common/BUGS)0
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/HISTORY (renamed from usr/src/lib/libpp/common/HISTORY)0
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/Makefile196
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/Mamfile811
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/NOTES (renamed from usr/src/lib/libpp/common/NOTES)0
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/RELEASE (renamed from usr/src/lib/libpp/common/RELEASE)11
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/gentab.sh (renamed from usr/src/lib/libpp/common/gentab.sh)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pp.3 (renamed from usr/src/lib/libpp/common/pp.3)0
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pp.def (renamed from usr/src/lib/libpp/common/pp.def)0
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pp.h (renamed from usr/src/lib/libpp/common/pp.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pp.key (renamed from usr/src/lib/libpp/common/pp.key)0
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pp.probe (renamed from usr/src/lib/libpp/common/pp.probe)16
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pp.tab (renamed from usr/src/lib/libpp/common/pp.tab)0
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppargs.c (renamed from usr/src/lib/libpp/common/ppargs.c)15
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppbuiltin.c (renamed from usr/src/lib/libpp/common/ppbuiltin.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppcall.c (renamed from usr/src/lib/libpp/common/ppcall.c)11
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppcomment.c (renamed from usr/src/lib/libpp/common/ppcomment.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppcontext.c (renamed from usr/src/lib/libpp/common/ppcontext.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppcontrol.c (renamed from usr/src/lib/libpp/common/ppcontrol.c)22
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppcpp.c (renamed from usr/src/lib/libpp/common/ppcpp.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppdata.c (renamed from usr/src/lib/libpp/common/ppdata.c)11
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pperror.c (renamed from usr/src/lib/libpp/common/pperror.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppexpr.c (renamed from usr/src/lib/libpp/common/ppexpr.c)14
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppfsm.c (renamed from usr/src/lib/libpp/common/ppfsm.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppfsm.h (renamed from usr/src/lib/libpp/common/ppfsm.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppincref.c (renamed from usr/src/lib/libpp/common/ppincref.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppinput.c (renamed from usr/src/lib/libpp/common/ppinput.c)13
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppkey.c (renamed from usr/src/lib/libpp/common/ppkey.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppkey.h (renamed from usr/src/lib/libpp/common/ppkey.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pplex.c (renamed from usr/src/lib/libpp/common/pplex.c)15
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pplib.h (renamed from usr/src/lib/libpp/common/pplib.h)30
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppline.c (renamed from usr/src/lib/libpp/common/ppline.c)12
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppmacref.c (renamed from usr/src/lib/libpp/common/ppmacref.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppmisc.c (renamed from usr/src/lib/libpp/common/ppmisc.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppop.c (renamed from usr/src/lib/libpp/common/ppop.c)228
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pppragma.c (renamed from usr/src/lib/libpp/common/pppragma.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppprintf.c (renamed from usr/src/lib/libpp/common/ppprintf.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppproto.c (renamed from usr/src/lib/libpp/common/ppproto.c)236
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppsearch.c (renamed from usr/src/lib/libpp/common/ppsearch.c)47
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/ppsym.c (renamed from usr/src/lib/libpp/common/ppsym.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libpp/pptrace.c (renamed from usr/src/lib/libpp/common/pptrace.c)8
-rwxr-xr-xusr/src/contrib/ast/src/lib/libpp/probe.win32412
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/Makefile11
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/Mamfile247
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/RELEASE (renamed from usr/src/lib/libsum/common/RELEASE)1
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/features/sum (renamed from usr/src/lib/libsum/common/features/sum)0
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-ast4.c (renamed from usr/src/lib/libsum/common/sum-ast4.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-att.c (renamed from usr/src/lib/libsum/common/sum-att.c)18
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-bsd.c (renamed from usr/src/lib/libsum/common/sum-bsd.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-crc.c (renamed from usr/src/lib/libsum/common/sum-crc.c)110
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-lmd.c (renamed from usr/src/lib/libsum/common/sum-lmd.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-md5.c (renamed from usr/src/lib/libsum/common/sum-md5.c)19
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-prng.c (renamed from usr/src/lib/libsum/common/sum-prng.c)8
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-sha1.c (renamed from usr/src/lib/libsum/common/sum-sha1.c)19
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum-sha2.c (renamed from usr/src/lib/libsum/common/sum-sha2.c)37
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sum.h (renamed from usr/src/lib/libsum/common/sum.h)8
-rw-r--r--usr/src/contrib/ast/src/lib/libsum/sumlib.c (renamed from usr/src/lib/libsum/common/sumlib.c)8
-rw-r--r--usr/src/lib/Makefile27
-rw-r--r--usr/src/lib/libast/Makefile159
-rw-r--r--usr/src/lib/libast/Makefile.com767
-rw-r--r--usr/src/lib/libast/THIRDPARTYLICENSE245
-rw-r--r--usr/src/lib/libast/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/lib/libast/amd64/include/ast/align.h54
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast.h388
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_botch.h26
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_ccode.h50
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_common.h220
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_dir.h86
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_dirent.h103
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_fcntl.h135
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_float.h236
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_fs.h163
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_getopt.h25
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_iconv.h153
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_lib.h182
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_limits.h128
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_map.h471
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_mmap.h48
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_mode.h35
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_namval.h51
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_ndbm.h30
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_nl_types.h123
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_param.h30
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_standards.h31
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_std.h374
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_stdio.h608
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_sys.h171
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_time.h104
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_tty.h155
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_version.h10
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_vfork.h89
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_wait.h32
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_wchar.h208
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ast_windows.h48
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ccode.h101
-rw-r--r--usr/src/lib/libast/amd64/include/ast/cdt.h311
-rw-r--r--usr/src/lib/libast/amd64/include/ast/debug.h120
-rw-r--r--usr/src/lib/libast/amd64/include/ast/dt.h49
-rw-r--r--usr/src/lib/libast/amd64/include/ast/error.h196
-rw-r--r--usr/src/lib/libast/amd64/include/ast/find.h97
-rw-r--r--usr/src/lib/libast/amd64/include/ast/fnmatch.h71
-rw-r--r--usr/src/lib/libast/amd64/include/ast/fnv.h81
-rw-r--r--usr/src/lib/libast/amd64/include/ast/fs3d.h123
-rw-r--r--usr/src/lib/libast/amd64/include/ast/fts.h173
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ftw.h71
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ftwalk.h135
-rw-r--r--usr/src/lib/libast/amd64/include/ast/glob.h155
-rw-r--r--usr/src/lib/libast/amd64/include/ast/hash.h213
-rw-r--r--usr/src/lib/libast/amd64/include/ast/hashpart.h60
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ip6.h28
-rw-r--r--usr/src/lib/libast/amd64/include/ast/lc.h162
-rw-r--r--usr/src/lib/libast/amd64/include/ast/ls.h99
-rw-r--r--usr/src/lib/libast/amd64/include/ast/magic.h96
-rw-r--r--usr/src/lib/libast/amd64/include/ast/magicid.h55
-rw-r--r--usr/src/lib/libast/amd64/include/ast/mc.h107
-rw-r--r--usr/src/lib/libast/amd64/include/ast/mime.h102
-rw-r--r--usr/src/lib/libast/amd64/include/ast/mnt.h69
-rw-r--r--usr/src/lib/libast/amd64/include/ast/modecanon.h74
-rw-r--r--usr/src/lib/libast/amd64/include/ast/namval.h51
-rw-r--r--usr/src/lib/libast/amd64/include/ast/option.h120
-rw-r--r--usr/src/lib/libast/amd64/include/ast/preroot.h27
-rw-r--r--usr/src/lib/libast/amd64/include/ast/proc.h115
-rw-r--r--usr/src/lib/libast/amd64/include/ast/prototyped.h59
-rw-r--r--usr/src/lib/libast/amd64/include/ast/re_comp.h52
-rw-r--r--usr/src/lib/libast/amd64/include/ast/recfmt.h94
-rw-r--r--usr/src/lib/libast/amd64/include/ast/regex.h230
-rw-r--r--usr/src/lib/libast/amd64/include/ast/regexp.h139
-rw-r--r--usr/src/lib/libast/amd64/include/ast/sfdisc.h82
-rw-r--r--usr/src/lib/libast/amd64/include/ast/sfio.h455
-rw-r--r--usr/src/lib/libast/amd64/include/ast/sfio_s.h51
-rw-r--r--usr/src/lib/libast/amd64/include/ast/sfio_t.h126
-rw-r--r--usr/src/lib/libast/amd64/include/ast/shcmd.h104
-rw-r--r--usr/src/lib/libast/amd64/include/ast/sig.h159
-rw-r--r--usr/src/lib/libast/amd64/include/ast/stack.h94
-rw-r--r--usr/src/lib/libast/amd64/include/ast/stak.h64
-rw-r--r--usr/src/lib/libast/amd64/include/ast/stk.h92
-rw-r--r--usr/src/lib/libast/amd64/include/ast/swap.h64
-rw-r--r--usr/src/lib/libast/amd64/include/ast/tar.h127
-rw-r--r--usr/src/lib/libast/amd64/include/ast/times.h65
-rw-r--r--usr/src/lib/libast/amd64/include/ast/tm.h206
-rw-r--r--usr/src/lib/libast/amd64/include/ast/tmx.h151
-rw-r--r--usr/src/lib/libast/amd64/include/ast/tok.h58
-rw-r--r--usr/src/lib/libast/amd64/include/ast/tv.h132
-rw-r--r--usr/src/lib/libast/amd64/include/ast/vdb.h55
-rw-r--r--usr/src/lib/libast/amd64/include/ast/vecargs.h56
-rw-r--r--usr/src/lib/libast/amd64/include/ast/vmalloc.h321
-rw-r--r--usr/src/lib/libast/amd64/include/ast/wait.h107
-rw-r--r--usr/src/lib/libast/amd64/include/ast/wordexp.h74
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/botch5
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/eaccess5
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/hack5
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/isoc9911
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/omitted5
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/options5
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/preroot6
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/standards10
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/FEATURE/uwin17
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_botch.h5
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_common.h199
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_fcntl.h114
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_float.h215
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_iconv.h132
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_lib.h161
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_map.h450
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_standards.h10
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_sys.h150
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/ast_wchar.h187
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/lc.h162
-rw-r--r--usr/src/lib/libast/amd64/src/lib/libast/preroot.h6
-rw-r--r--usr/src/lib/libast/common/cdt/dtextract.c55
-rw-r--r--usr/src/lib/libast/common/cdt/dtflatten.c75
-rw-r--r--usr/src/lib/libast/common/cdt/dthash.c368
-rw-r--r--usr/src/lib/libast/common/cdt/dthdr.h84
-rw-r--r--usr/src/lib/libast/common/cdt/dtlist.c196
-rw-r--r--usr/src/lib/libast/common/cdt/dtmethod.c107
-rw-r--r--usr/src/lib/libast/common/cdt/dtopen.c109
-rw-r--r--usr/src/lib/libast/common/cdt/dtrenew.c79
-rw-r--r--usr/src/lib/libast/common/cdt/dtrestore.c88
-rw-r--r--usr/src/lib/libast/common/cdt/dtsize.c61
-rw-r--r--usr/src/lib/libast/common/cdt/dtstat.c132
-rw-r--r--usr/src/lib/libast/common/cdt/dttree.c391
-rw-r--r--usr/src/lib/libast/common/cdt/dttreeset.c83
-rw-r--r--usr/src/lib/libast/common/comp/setlocale.c1184
-rw-r--r--usr/src/lib/libast/common/features/isoc9913
-rw-r--r--usr/src/lib/libast/common/include/cdt.h311
-rw-r--r--usr/src/lib/libast/common/include/sfio.h455
-rw-r--r--usr/src/lib/libast/common/include/sfio_s.h51
-rw-r--r--usr/src/lib/libast/common/include/sfio_t.h126
-rw-r--r--usr/src/lib/libast/common/include/vmalloc.h321
-rw-r--r--usr/src/lib/libast/common/regex/regcoll.c304
-rw-r--r--usr/src/lib/libast/common/regex/ucs_names.h6426
-rw-r--r--usr/src/lib/libast/common/std/bytesex.h43
-rw-r--r--usr/src/lib/libast/common/std/endian.h54
-rw-r--r--usr/src/lib/libast/common/string/chresc.c181
-rw-r--r--usr/src/lib/libast/common/vmalloc/vmmopen.c324
-rw-r--r--usr/src/lib/libast/common/vmalloc/vmopen.c176
-rw-r--r--usr/src/lib/libast/i386/include/ast/align.h54
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast.h388
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_botch.h26
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_ccode.h50
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_common.h219
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_dir.h86
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_dirent.h127
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_fcntl.h135
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_float.h237
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_fs.h168
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_getopt.h25
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_iconv.h153
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_lib.h193
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_limits.h128
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_map.h471
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_mmap.h48
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_namval.h51
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_ndbm.h30
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_nl_types.h123
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_param.h30
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_standards.h31
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_std.h374
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_stdio.h608
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_sys.h171
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_time.h104
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_tty.h155
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_version.h10
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_vfork.h89
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_wait.h32
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_wchar.h208
-rw-r--r--usr/src/lib/libast/i386/include/ast/ast_windows.h48
-rw-r--r--usr/src/lib/libast/i386/include/ast/ccode.h101
-rw-r--r--usr/src/lib/libast/i386/include/ast/cdt.h311
-rw-r--r--usr/src/lib/libast/i386/include/ast/debug.h120
-rw-r--r--usr/src/lib/libast/i386/include/ast/dirent.h22
-rw-r--r--usr/src/lib/libast/i386/include/ast/dt.h49
-rw-r--r--usr/src/lib/libast/i386/include/ast/endian.h54
-rw-r--r--usr/src/lib/libast/i386/include/ast/error.h196
-rw-r--r--usr/src/lib/libast/i386/include/ast/find.h97
-rw-r--r--usr/src/lib/libast/i386/include/ast/fnmatch.h71
-rw-r--r--usr/src/lib/libast/i386/include/ast/fnv.h81
-rw-r--r--usr/src/lib/libast/i386/include/ast/fs3d.h123
-rw-r--r--usr/src/lib/libast/i386/include/ast/fts.h173
-rw-r--r--usr/src/lib/libast/i386/include/ast/ftw.h71
-rw-r--r--usr/src/lib/libast/i386/include/ast/ftwalk.h135
-rw-r--r--usr/src/lib/libast/i386/include/ast/getopt.h60
-rw-r--r--usr/src/lib/libast/i386/include/ast/glob.h155
-rw-r--r--usr/src/lib/libast/i386/include/ast/hash.h213
-rw-r--r--usr/src/lib/libast/i386/include/ast/hashkey.h73
-rw-r--r--usr/src/lib/libast/i386/include/ast/hashpart.h60
-rw-r--r--usr/src/lib/libast/i386/include/ast/iconv.h22
-rw-r--r--usr/src/lib/libast/i386/include/ast/ip6.h28
-rw-r--r--usr/src/lib/libast/i386/include/ast/lc.h162
-rw-r--r--usr/src/lib/libast/i386/include/ast/ls.h99
-rw-r--r--usr/src/lib/libast/i386/include/ast/magic.h96
-rw-r--r--usr/src/lib/libast/i386/include/ast/magicid.h55
-rw-r--r--usr/src/lib/libast/i386/include/ast/mc.h107
-rw-r--r--usr/src/lib/libast/i386/include/ast/mime.h102
-rw-r--r--usr/src/lib/libast/i386/include/ast/mnt.h69
-rw-r--r--usr/src/lib/libast/i386/include/ast/modecanon.h74
-rw-r--r--usr/src/lib/libast/i386/include/ast/namval.h51
-rw-r--r--usr/src/lib/libast/i386/include/ast/nl_types.h22
-rw-r--r--usr/src/lib/libast/i386/include/ast/preroot.h27
-rw-r--r--usr/src/lib/libast/i386/include/ast/proc.h115
-rw-r--r--usr/src/lib/libast/i386/include/ast/prototyped.h59
-rw-r--r--usr/src/lib/libast/i386/include/ast/re_comp.h52
-rw-r--r--usr/src/lib/libast/i386/include/ast/recfmt.h94
-rw-r--r--usr/src/lib/libast/i386/include/ast/regex.h230
-rw-r--r--usr/src/lib/libast/i386/include/ast/regexp.h139
-rw-r--r--usr/src/lib/libast/i386/include/ast/sfdisc.h82
-rw-r--r--usr/src/lib/libast/i386/include/ast/shcmd.h104
-rw-r--r--usr/src/lib/libast/i386/include/ast/sig.h159
-rw-r--r--usr/src/lib/libast/i386/include/ast/stack.h94
-rw-r--r--usr/src/lib/libast/i386/include/ast/stak.h64
-rw-r--r--usr/src/lib/libast/i386/include/ast/stdio.h22
-rw-r--r--usr/src/lib/libast/i386/include/ast/stk.h92
-rw-r--r--usr/src/lib/libast/i386/include/ast/swap.h64
-rw-r--r--usr/src/lib/libast/i386/include/ast/tar.h127
-rw-r--r--usr/src/lib/libast/i386/include/ast/times.h65
-rw-r--r--usr/src/lib/libast/i386/include/ast/tm.h206
-rw-r--r--usr/src/lib/libast/i386/include/ast/tmx.h151
-rw-r--r--usr/src/lib/libast/i386/include/ast/tok.h58
-rw-r--r--usr/src/lib/libast/i386/include/ast/tv.h132
-rw-r--r--usr/src/lib/libast/i386/include/ast/usage.h37
-rw-r--r--usr/src/lib/libast/i386/include/ast/vdb.h55
-rw-r--r--usr/src/lib/libast/i386/include/ast/vecargs.h56
-rw-r--r--usr/src/lib/libast/i386/include/ast/wait.h107
-rw-r--r--usr/src/lib/libast/i386/include/ast/wchar.h22
-rw-r--r--usr/src/lib/libast/i386/include/ast/wordexp.h74
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/botch5
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/eaccess5
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/hack5
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/isoc9911
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/omitted5
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/options5
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/preroot6
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/standards10
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/FEATURE/uwin17
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/align.h33
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_botch.h5
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_common.h198
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_fcntl.h114
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_float.h216
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_fs.h147
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_iconv.h132
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_lib.h172
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_map.h450
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_standards.h10
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_stdio.h587
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_sys.h150
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/ast_wchar.h187
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/lc.h162
-rw-r--r--usr/src/lib/libast/i386/src/lib/libast/preroot.h6
-rw-r--r--usr/src/lib/libast/sparc/include/ast/align.h54
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast.h388
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_botch.h26
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_ccode.h50
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_common.h219
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_dir.h86
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_dirent.h127
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_fcntl.h135
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_float.h237
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_fs.h164
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_getopt.h25
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_iconv.h153
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_lib.h193
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_limits.h128
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_map.h471
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_mmap.h48
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_mode.h35
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_namval.h51
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_ndbm.h30
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_nl_types.h123
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_param.h30
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_standards.h31
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_std.h374
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_stdio.h608
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_sys.h171
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_time.h104
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_tty.h155
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_version.h10
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_vfork.h89
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_wait.h32
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_wchar.h208
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ast_windows.h48
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ccode.h101
-rw-r--r--usr/src/lib/libast/sparc/include/ast/cdt.h311
-rw-r--r--usr/src/lib/libast/sparc/include/ast/debug.h120
-rw-r--r--usr/src/lib/libast/sparc/include/ast/dirent.h22
-rw-r--r--usr/src/lib/libast/sparc/include/ast/dt.h49
-rw-r--r--usr/src/lib/libast/sparc/include/ast/endian.h54
-rw-r--r--usr/src/lib/libast/sparc/include/ast/error.h196
-rw-r--r--usr/src/lib/libast/sparc/include/ast/find.h97
-rw-r--r--usr/src/lib/libast/sparc/include/ast/fnmatch.h71
-rw-r--r--usr/src/lib/libast/sparc/include/ast/fnv.h81
-rw-r--r--usr/src/lib/libast/sparc/include/ast/fs3d.h123
-rw-r--r--usr/src/lib/libast/sparc/include/ast/fts.h173
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ftw.h71
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ftwalk.h135
-rw-r--r--usr/src/lib/libast/sparc/include/ast/getopt.h60
-rw-r--r--usr/src/lib/libast/sparc/include/ast/glob.h155
-rw-r--r--usr/src/lib/libast/sparc/include/ast/hash.h213
-rw-r--r--usr/src/lib/libast/sparc/include/ast/hashkey.h73
-rw-r--r--usr/src/lib/libast/sparc/include/ast/hashpart.h60
-rw-r--r--usr/src/lib/libast/sparc/include/ast/iconv.h22
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ip6.h28
-rw-r--r--usr/src/lib/libast/sparc/include/ast/lc.h162
-rw-r--r--usr/src/lib/libast/sparc/include/ast/ls.h99
-rw-r--r--usr/src/lib/libast/sparc/include/ast/magic.h96
-rw-r--r--usr/src/lib/libast/sparc/include/ast/magicid.h55
-rw-r--r--usr/src/lib/libast/sparc/include/ast/mc.h107
-rw-r--r--usr/src/lib/libast/sparc/include/ast/mime.h102
-rw-r--r--usr/src/lib/libast/sparc/include/ast/mnt.h69
-rw-r--r--usr/src/lib/libast/sparc/include/ast/modecanon.h74
-rw-r--r--usr/src/lib/libast/sparc/include/ast/modex.h62
-rw-r--r--usr/src/lib/libast/sparc/include/ast/namval.h51
-rw-r--r--usr/src/lib/libast/sparc/include/ast/nl_types.h22
-rw-r--r--usr/src/lib/libast/sparc/include/ast/option.h120
-rw-r--r--usr/src/lib/libast/sparc/include/ast/preroot.h27
-rw-r--r--usr/src/lib/libast/sparc/include/ast/proc.h115
-rw-r--r--usr/src/lib/libast/sparc/include/ast/prototyped.h59
-rw-r--r--usr/src/lib/libast/sparc/include/ast/re_comp.h52
-rw-r--r--usr/src/lib/libast/sparc/include/ast/recfmt.h94
-rw-r--r--usr/src/lib/libast/sparc/include/ast/regex.h230
-rw-r--r--usr/src/lib/libast/sparc/include/ast/regexp.h139
-rw-r--r--usr/src/lib/libast/sparc/include/ast/sfdisc.h82
-rw-r--r--usr/src/lib/libast/sparc/include/ast/sfio.h455
-rw-r--r--usr/src/lib/libast/sparc/include/ast/sfio_s.h51
-rw-r--r--usr/src/lib/libast/sparc/include/ast/sfio_t.h126
-rw-r--r--usr/src/lib/libast/sparc/include/ast/shcmd.h104
-rw-r--r--usr/src/lib/libast/sparc/include/ast/sig.h159
-rw-r--r--usr/src/lib/libast/sparc/include/ast/stack.h94
-rw-r--r--usr/src/lib/libast/sparc/include/ast/stak.h64
-rw-r--r--usr/src/lib/libast/sparc/include/ast/stdio.h22
-rw-r--r--usr/src/lib/libast/sparc/include/ast/stk.h92
-rw-r--r--usr/src/lib/libast/sparc/include/ast/swap.h64
-rw-r--r--usr/src/lib/libast/sparc/include/ast/tar.h127
-rw-r--r--usr/src/lib/libast/sparc/include/ast/times.h65
-rw-r--r--usr/src/lib/libast/sparc/include/ast/tm.h206
-rw-r--r--usr/src/lib/libast/sparc/include/ast/tmx.h151
-rw-r--r--usr/src/lib/libast/sparc/include/ast/tok.h58
-rw-r--r--usr/src/lib/libast/sparc/include/ast/tv.h132
-rw-r--r--usr/src/lib/libast/sparc/include/ast/usage.h37
-rw-r--r--usr/src/lib/libast/sparc/include/ast/vdb.h55
-rw-r--r--usr/src/lib/libast/sparc/include/ast/vecargs.h56
-rw-r--r--usr/src/lib/libast/sparc/include/ast/vmalloc.h321
-rw-r--r--usr/src/lib/libast/sparc/include/ast/wait.h107
-rw-r--r--usr/src/lib/libast/sparc/include/ast/wchar.h22
-rw-r--r--usr/src/lib/libast/sparc/include/ast/wordexp.h74
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/botch5
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ccode29
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/dirent106
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/eaccess5
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/hack5
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/isoc9911
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/limits107
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mmap27
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mode14
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ndbm9
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/nl_types102
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/omitted5
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/options5
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/param9
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/preroot6
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sig138
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/standards10
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/time83
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmx130
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tty134
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tv111
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/uwin17
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vfork68
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wait11
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/align.h33
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_botch.h5
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_ccode.h29
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_common.h198
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_dirent.h106
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_fcntl.h114
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_float.h216
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_fs.h143
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_iconv.h132
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_lib.h172
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_limits.h107
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_map.h450
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h27
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_mode.h14
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_ndbm.h9
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_nl_types.h102
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_param.h9
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_standards.h10
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_stdio.h587
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_sys.h150
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_time.h83
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_tty.h134
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_vfork.h68
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_wait.h11
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/ast_wchar.h187
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/lc.h162
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/preroot.h6
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/sig.h138
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/tmx.h130
-rw-r--r--usr/src/lib/libast/sparc/src/lib/libast/tv.h111
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/align.h54
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast.h388
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_botch.h26
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_ccode.h50
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_common.h220
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_dir.h86
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_dirent.h103
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_fcntl.h135
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_float.h236
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_fs.h163
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_getopt.h25
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_iconv.h153
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_lib.h182
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_limits.h128
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_map.h471
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h48
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_mode.h35
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_namval.h51
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_ndbm.h30
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_nl_types.h123
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_param.h30
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_standards.h31
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_std.h374
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_stdio.h608
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_sys.h171
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_time.h104
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_tty.h155
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_version.h10
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_vfork.h89
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_wait.h32
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_wchar.h208
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ast_windows.h48
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/bytesex.h43
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ccode.h101
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/cdt.h311
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/debug.h120
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/dirent.h22
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/dt.h49
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/endian.h54
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/error.h196
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/find.h97
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/fnmatch.h71
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/fnv.h81
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/fs3d.h123
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/fts.h173
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ftw.h71
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ftwalk.h135
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/getopt.h60
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/glob.h155
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/hash.h213
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/hashkey.h73
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/hashpart.h60
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/iconv.h22
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ip6.h28
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/lc.h162
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/ls.h99
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/magic.h96
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/magicid.h55
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/mc.h107
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/mime.h102
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/mnt.h69
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/modecanon.h74
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/modex.h62
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/namval.h51
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/nl_types.h22
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/option.h120
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/preroot.h27
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/proc.h115
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/prototyped.h59
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/re_comp.h52
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/recfmt.h94
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/regex.h230
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/regexp.h139
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/sfdisc.h82
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/sfio.h455
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/sfio_s.h51
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/sfio_t.h126
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/shcmd.h104
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/sig.h159
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/stack.h94
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/stak.h64
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/stdio.h22
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/stk.h92
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/swap.h64
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/tar.h127
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/times.h65
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/tm.h206
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/tmx.h151
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/tok.h58
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/tv.h132
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/usage.h37
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/vdb.h55
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/vecargs.h56
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/vmalloc.h321
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/wait.h107
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/wchar.h22
-rw-r--r--usr/src/lib/libast/sparcv9/include/ast/wordexp.h74
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/align33
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/botch5
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ccode29
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/dirent82
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/eaccess5
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fs142
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/hack5
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/isoc9911
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/limits107
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mmap27
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mode14
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ndbm9
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/nl_types102
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/omitted5
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/options5
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/param9
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/preroot6
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sig138
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/standards10
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/stdio587
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/time83
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmx130
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tty134
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tv111
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/uwin17
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vfork68
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wait11
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/align.h33
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_botch.h5
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_ccode.h29
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_common.h199
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_dirent.h82
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_fcntl.h114
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_float.h215
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_fs.h142
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_iconv.h132
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_lib.h161
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_limits.h107
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_map.h450
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_mmap.h27
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_mode.h14
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_namval.h42
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_ndbm.h9
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_nl_types.h102
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_param.h9
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_standards.h10
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_stdio.h587
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_sys.h150
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_time.h83
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_tty.h134
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_vfork.h68
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_wait.h11
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/ast_wchar.h187
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/lc.h162
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/preroot.h6
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/sig.h138
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/tmx.h130
-rw-r--r--usr/src/lib/libast/sparcv9/src/lib/libast/tv.h111
-rw-r--r--usr/src/lib/libcmd/THIRDPARTYLICENSE245
-rw-r--r--usr/src/lib/libcmd/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/lib/libcmd/amd64/include/ast/cmd.h174
-rw-r--r--usr/src/lib/libcmd/amd64/include/ast/cmdext.h77
-rw-r--r--usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/symlink8
-rw-r--r--usr/src/lib/libcmd/common/cmp.c289
-rw-r--r--usr/src/lib/libcmd/common/grep.c876
-rw-r--r--usr/src/lib/libcmd/common/readlink.c111
-rw-r--r--usr/src/lib/libcmd/i386/include/ast/cmd.h174
-rw-r--r--usr/src/lib/libcmd/i386/include/ast/cmdext.h77
-rw-r--r--usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/symlink8
-rw-r--r--usr/src/lib/libcmd/sparc/include/ast/cmd.h174
-rw-r--r--usr/src/lib/libcmd/sparc/include/ast/cmdext.h77
-rw-r--r--usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink8
-rw-r--r--usr/src/lib/libcmd/sparcv9/include/ast/cmd.h174
-rw-r--r--usr/src/lib/libcmd/sparcv9/include/ast/cmdext.h77
-rw-r--r--usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/symlink8
-rw-r--r--usr/src/lib/libdll/THIRDPARTYLICENSE245
-rw-r--r--usr/src/lib/libdll/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/lib/libdll/amd64/src/lib/libdll/dlldefs.h129
-rw-r--r--usr/src/lib/libdll/i386/src/lib/libdll/dlldefs.h129
-rw-r--r--usr/src/lib/libdll/sparc/src/lib/libdll/dlldefs.h129
-rw-r--r--usr/src/lib/libdll/sparcv9/src/lib/libdll/dlldefs.h129
-rw-r--r--usr/src/lib/libpp/THIRDPARTYLICENSE245
-rw-r--r--usr/src/lib/libpp/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/lib/libpp/i386/pp.req2
-rw-r--r--usr/src/lib/libpp/i386/pp.yacc1
-rw-r--r--usr/src/lib/libpp/i386/ppdebug.h211
-rw-r--r--usr/src/lib/libpp/i386/ppdef.h220
-rw-r--r--usr/src/lib/libpp/i386/pptab.h152
-rw-r--r--usr/src/lib/libpp/sparc/pp.req2
-rw-r--r--usr/src/lib/libpp/sparc/pp.yacc1
-rw-r--r--usr/src/lib/libpp/sparc/ppdebug.h211
-rw-r--r--usr/src/lib/libpp/sparc/ppdef.h220
-rw-r--r--usr/src/lib/libpp/sparc/pptab.h152
-rw-r--r--usr/src/lib/libshell/Makefile.com174
-rw-r--r--usr/src/lib/libshell/THIRDPARTYLICENSE245
-rw-r--r--usr/src/lib/libshell/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/lib/libshell/amd64/include/ast/history.h84
-rw-r--r--usr/src/lib/libshell/amd64/include/ast/nval.h323
-rw-r--r--usr/src/lib/libshell/amd64/include/ast/shell.h264
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct13
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds37
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic22
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs11
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options25
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat11
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/rlimits20
-rw-r--r--usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys20
-rw-r--r--usr/src/lib/libshell/common/features/cmds1
-rw-r--r--usr/src/lib/libshell/common/features/math4
-rw-r--r--usr/src/lib/libshell/common/features/rlimits3
-rw-r--r--usr/src/lib/libshell/common/fun/title57
-rw-r--r--usr/src/lib/libshell/common/include/variables.h109
-rw-r--r--usr/src/lib/libshell/common/tests/arrays2.sh123
-rw-r--r--usr/src/lib/libshell/common/tests/coprocess.sh313
-rw-r--r--usr/src/lib/libshell/common/tests/heredoc.sh255
-rw-r--r--usr/src/lib/libshell/common/tests/shtests155
-rw-r--r--usr/src/lib/libshell/common/tests/statics.sh106
-rw-r--r--usr/src/lib/libshell/common/tests/timetype.sh80
-rw-r--r--usr/src/lib/libshell/common/tests/treemove.sh85
-rw-r--r--usr/src/lib/libshell/i386/include/ast/history.h84
-rw-r--r--usr/src/lib/libshell/i386/include/ast/nval.h323
-rw-r--r--usr/src/lib/libshell/i386/include/ast/shell.h264
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct13
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds37
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic22
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs11
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options25
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat11
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/rlimits20
-rw-r--r--usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys20
-rw-r--r--usr/src/lib/libshell/misc/ERRATA.txt1017
-rw-r--r--usr/src/lib/libshell/misc/buildksh93.readme78
-rw-r--r--usr/src/lib/libshell/misc/buildksh93.sh562
-rw-r--r--usr/src/lib/libshell/misc/filelist.txt91
-rw-r--r--usr/src/lib/libshell/sparc/include/ast/history.h84
-rw-r--r--usr/src/lib/libshell/sparc/include/ast/nval.h323
-rw-r--r--usr/src/lib/libshell/sparc/include/ast/shell.h264
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct13
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds37
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic22
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs11
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math183
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options25
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat11
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/rlimits20
-rw-r--r--usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys20
-rw-r--r--usr/src/lib/libshell/sparcv9/include/ast/history.h84
-rw-r--r--usr/src/lib/libshell/sparcv9/include/ast/nval.h323
-rw-r--r--usr/src/lib/libshell/sparcv9/include/ast/shell.h264
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct13
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds37
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic22
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs11
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math183
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options25
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat11
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits20
-rw-r--r--usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys20
-rw-r--r--usr/src/lib/libsum/THIRDPARTYLICENSE245
-rw-r--r--usr/src/lib/libsum/THIRDPARTYLICENSE.descrip1
-rw-r--r--usr/src/lib/libsum/amd64/include/ast/sum.h74
-rw-r--r--usr/src/lib/libsum/i386/include/ast/sum.h74
-rw-r--r--usr/src/lib/libsum/sparc/include/ast/sum.h74
-rw-r--r--usr/src/lib/libsum/sparcv9/include/ast/sum.h74
-rw-r--r--usr/src/man/man1/ksh93.12139
-rw-r--r--usr/src/pkg/manifests/SUNWcs.mf2
-rw-r--r--usr/src/pkg/manifests/developer-astdev.mf5
-rw-r--r--usr/src/pkg/manifests/source-demo-system.mf13
-rw-r--r--usr/src/pkg/manifests/system-header.mf10
-rw-r--r--usr/src/pkg/manifests/system-library.mf11
-rw-r--r--usr/src/tools/findunref/exception_list.open60
2411 files changed, 133041 insertions, 100379 deletions
diff --git a/usr/src/Makefile.ast b/usr/src/Makefile.ast
deleted file mode 100644
index 1a85c1c7e7..0000000000
--- a/usr/src/Makefile.ast
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# 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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-# Override this top level flag so the compiler builds in its native
-# C99 mode. This has been enabled to support the math stuff in the
-# AST tools (including ksh93).
-CSTD= $(CSTD_GNU99) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
-
-# silence common AST&co. warnings...
-# ... about |#pragma prototyped| ...
-CERRWARN += -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED
-
-# common CPP flags for libshell consumers (ksh, shcomp etc.)
-LIBSHELLCPPFLAGS = \
- -I$(LIBSHELLBASE)/$(LIBSHELLMACH)/src/cmd/ksh93 \
- -I$(LIBSHELLBASE)/common/include \
- -I$(ROOT)/usr/include/ast \
- -I$(ROOT)/usr/include \
- -DKSHELL \
- -DSHOPT_BGX \
- -DSHOPT_BRACEPAT \
- -DSHOPT_CMDLIB_BLTIN=0 \
- '-DSH_CMDLIB_DIR="/usr/ast/bin"' \
- '-DSHOPT_CMDLIB_HDR="solaris_cmdlist.h"' \
- -DSHOPT_DYNAMIC \
- -DSHOPT_ESH \
- -DSHOPT_FILESCAN \
- -DSHOPT_HISTEXPAND \
- -DSHOPT_KIA \
- -DSHOPT_MULTIBYTE \
- -DSHOPT_NAMESPACE \
- -DSHOPT_OPTIMIZE \
- -DSHOPT_PFSH \
- -DSHOPT_RAWONLY \
- -DSHOPT_STATS \
- -DSHOPT_SUID_EXEC \
- -DSHOPT_SYSRC \
- -DSHOPT_TYPEDEF \
- -DSHOPT_VSH \
- -D_BLD_shell \
- -D_PACKAGE_ast \
- '-DERROR_CATALOG="libshell"' \
- -DERROR_CONTEXT_T=Error_context_t \
- '-DUSAGE_LICENSE=\
- "[-author?David Korn <dgk@research.att.com>]"\
- "[-copyright?Copyright (c) 1982-2010 AT&T Intellectual Property]"\
- "[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
- "[--catalog?libshell]"'
-
-# Default CFLAGS/CFLAGS64 for AST sources
-# (-xstrconst makes string litereals read-only and -xcsi works
-# around compiler issues)
-ASTCFLAGS = \
- $(CCVERBOSE) \
- -_cc=-xcsi \
- -xstrconst
-ASTCFLAGS64 = \
- $(CCVERBOSE) \
- -_cc=-xcsi \
- -xstrconst
diff --git a/usr/src/cmd/Makefile b/usr/src/cmd/Makefile
index dee86627e5..3fb4a7d611 100644
--- a/usr/src/cmd/Makefile
+++ b/usr/src/cmd/Makefile
@@ -29,6 +29,7 @@
# Copyright 2018 Nexenta Systems, Inc.
# Copyright 2018 Gary Mills
# Copyright 2019 Peter Tribble
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
include ../Makefile.master
@@ -231,7 +232,6 @@ COMMON_SUBDIRS= \
keyserv \
killall \
krb5 \
- ksh \
kvmstat \
last \
lastcomm \
@@ -382,7 +382,6 @@ COMMON_SUBDIRS= \
setuname \
sgs \
sh \
- shcomp \
sleep \
smbios \
smbsrv \
@@ -528,6 +527,7 @@ MSGSUBDIRS= \
acctadm \
allocate \
asa \
+ ast \
audio \
audit \
auditconfig \
@@ -622,7 +622,6 @@ MSGSUBDIRS= \
itadm \
kbd \
krb5 \
- ksh \
last \
ldap \
ldapcachemgr \
@@ -698,7 +697,6 @@ MSGSUBDIRS= \
sdpadm \
sgs \
sh \
- shcomp \
smbsrv \
sort \
split \
@@ -844,7 +842,7 @@ _dc: $(DCSUBDIRS)
# Dependencies
#
fs.d: fstyp
-ksh: shcomp isaexec
+ast: isaexec
print: lp
fmt: mailx
diff --git a/usr/src/cmd/ast/Makefile b/usr/src/cmd/ast/Makefile
index 501bcfb4b5..82a3c7dc22 100644
--- a/usr/src/cmd/ast/Makefile
+++ b/usr/src/cmd/ast/Makefile
@@ -1,48 +1,67 @@
#
-# CDDL HEADER START
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
#
-# 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
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
#
+
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
-SHELL=/usr/bin/ksh93
+# Note that these AST components deliver installed headers to /usr/include/ast/
+# but nothing else in gate depends on these to build, and serveral of them are
+# auto-generated. The install_h target is deliberately not wired into
+# 'cmdheaders' in usr/src/Makefile as that would significantly increase the
+# time taken to run the 'setup' target. Instead, sub-components automatically
+# install header files as part of the 'install' target.
-include ../Makefile.cmd
+include $(SRC)/Makefile.master
-SUBDIRS= \
- msgcc
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+_msg := TARGET= _msg
+install := TARGET= install
+install_h := TARGET= install_h
+# The _feature target is used to initially populate and to update the
+# FEATURE files for each component. It is not run as part of a normal
+# build.
+_feature := TARGET= _feature install
-all := TARGET = all
-install := TARGET = install
-clean := TARGET = clean
-clobber := TARGET = clobber
-lint := TARGET = lint
+SUBDIRS= \
+ tools \
+ libast \
+ libcmd \
+ libdll \
+ libpp \
+ libshell \
+ libsum \
+ ksh \
+ msgcc \
+ shcomp
.KEEP_STATE:
+.PARALLEL: $(SUBDIRS)
-all install clean clobber lint: $(SUBDIRS)
+all clean clobber install install_h _msg _feature: $(SUBDIRS)
-$(SUBDIRS): FRC
+$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
FRC:
-include ../Makefile.targ
+libast: tools
+libcmd: libsum libast
+libdll: libast
+libpp: libast
+libshell: libast libcmd libdll
+libsum: libast
+
+shcomp: libshell
+msgcc: libast libpp
+ksh: libshell shcomp
diff --git a/usr/src/cmd/ast/Makefile.ast b/usr/src/cmd/ast/Makefile.ast
new file mode 100644
index 0000000000..66d799c6eb
--- /dev/null
+++ b/usr/src/cmd/ast/Makefile.ast
@@ -0,0 +1,165 @@
+#
+# 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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+C_AST = $(CONTRIB)/ast
+C_ASTINIT = $(C_AST)/src/cmd/INIT
+
+AST= $(SRC)/cmd/ast
+
+AST_TOOLS = $(AST)/tools
+AST_LCGEN = $(AST_TOOLS)/lcgen
+AST_PROTO = $(AST_TOOLS)/proto -p -s -l $(C_AST)/lib/package/ast.lic \
+ -o '$(AST_LICENSE)'
+
+# Override this top level flag so the compiler builds in its native C99 mode.
+CSTD= $(CSTD_GNU99)
+
+#
+# Shell feature flags.
+# * - the upstream build configuration can be viewed at
+# $(CONTRIB)/ast/src/cmd/ksh93/Makefile
+#
+
+# These options are enabled, and are also enabled by default in the upstream
+# build framework*:
+#
+# SHOPT_2DMATCH two dimensional .sh.match for ${var//pat/str}
+# SHOPT_BGX one SIGCHLD trap per completed job
+# SHOPT_BRACEPAT C-shell {...,...} expansions (, required)
+# SHOPT_DYNAMIC dynamic loading for builtins
+# SHOPT_ESH emacs/gmacs edit mode
+# SHOPT_FILESCAN fast file scan
+# SHOPT_FIXEDARRAY fixed dimension indexed array
+# SHOPT_HISTEXPAND csh-style history file expansions
+# SHOPT_KIA shell information database generation
+# SHOPT_MULTIBYTE multibyte character handling
+# SHOPT_NAMESPACE allow namespaces
+# SHOPT_OPTIMIZE optimize loop invariants
+# SHOPT_PFSH solaris exec_attr(4) profile execution
+# SHOPT_RAWONLY make viraw the only vi mode
+# SHOPT_STATS add .sh.stats variable
+# SHOPT_SUID_EXEC allow (safe) suid/sgid shell scripts
+# SHOPT_TYPEDEF enable typeset type definitions
+# SHOPT_VSH vi edit mode
+
+# These options are enabled but are not enabled by default in the upstream
+# build framework*:
+#
+# SHOPT_SYSRC attempt . /etc/ksh.kshrc if interactive
+
+# These options are NOT enabled but are enabled by default in the upstream
+# build framework*:
+#
+# SHOPT_AUDIT enable auditing per SHOPT_AUDITFILE
+# SHOPT_COSHELL build with connection to coshell
+# SHOPT_EDPREDICT predictive editing
+
+# These options are NOT enabled and are also NOT enabled in the upstream
+# build framework*:
+#
+# SHOPT_ACCT accounting
+# SHOPT_ACCTFILE per user accounting info
+# SHOPT_AUDITFILE "/etc/ksh_audit" auditing file
+# SHOPT_BASH bash compatibility code
+# SHOPT_CRNL accept <cr><nl> for <nl>
+# SHOPT_ECHOPRINT make echo equivalent to print
+# SHOPT_FS_3D 3d file system
+# SHOPT_OLDTERMIO support both TCGETA and TCGETS
+# SHOPT_P_SUID real uid's that require -p for set[ug]id
+# SHOPT_REGRESS enable __regress__ builtin
+# SHOPT_REMOTE enable --rc if running as a remote shell
+# SHOPT_SEVENBIT strip the eigth bit from characters
+# SHOPT_SPAWN use spawnveg for fork/exec
+# SHOPT_TIMEOUT number of seconds for shell timeout
+
+LIBSHELLFEATUREFLAGS= \
+ -DSHOPT_2DMATCH \
+ -DSHOPT_BGX \
+ -DSHOPT_BRACEPAT \
+ -DSHOPT_DYNAMIC \
+ -DSHOPT_ESH \
+ -DSHOPT_FILESCAN \
+ -DSHOPT_FIXEDARRAY \
+ -DSHOPT_HISTEXPAND \
+ -DSHOPT_KIA \
+ -DSHOPT_MULTIBYTE \
+ -DSHOPT_NAMESPACE \
+ -DSHOPT_OPTIMIZE \
+ -DSHOPT_PFSH \
+ -DSHOPT_RAWONLY \
+ -DSHOPT_STATS \
+ -DSHOPT_SUID_EXEC \
+ -DSHOPT_SYSRC \
+ -DSHOPT_TYPEDEF \
+ -DSHOPT_VSH
+
+#
+# common CPP flags for libshell consumers (ksh, shcomp etc.)
+#
+
+LIBSHELLCPPFLAGS= \
+ -I$(LIBSHELLBASE)/$(LIBSHELLMACH) \
+ -I$(ASTSRC)/include \
+ -I$(ROOT)/usr/include/ast \
+ -I$(ROOT)/usr/include \
+ \
+ -DSHOPT_CMDLIB_BLTIN=0 \
+ '-DSH_CMDLIB_DIR="/usr/ast/bin"' \
+ '-DSHOPT_CMDLIB_HDR="../common/illumos_cmdlist.h"' \
+ \
+ $(LIBSHELLFEATUREFLAGS) \
+ \
+ -DKSHELL \
+ -D_BLD_shell \
+ -D_PACKAGE_ast \
+ -D_API_ast=20100309 \
+ '-DERROR_CATALOG="libshell"' \
+ -DERROR_CONTEXT_T=Error_context_t \
+ '-DUSAGE_LICENSE=\
+ "[-author?David Korn <dgk@research.att.com>]" \
+ "[-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property]" \
+ "[-license?http://www.eclipse.org/org/documents/epl-v10.html]" \
+ "[--catalog?libshell]"'
+
+# Default CFLAGS/CFLAGS64 for AST sources
+ASTCFLAGS= $(CCVERBOSE)
+ASTCFLAGS64= $(CCVERBOSE)
+
+# Generated header files generated using this system have a number of
+# artifacts that are cleaned up by the following action.
+#
+# They include a 'generated by' header which includes the full path to
+# the source file. The path to the root of the gate is removed, leaving only
+# the relative part of the path.
+#
+# They have trailing whitespace, which is removed.
+
+POST_PROCESS_AST = $(SED) -i ' \
+ s^$(SRC)/^^g; \
+ s/ *$$//; \
+ /def.* _def_.*_$(MACH64)/s/$(MACH64)/$(HDRGUARD)/; \
+ /def.* _def_.*_$(MACH)/s/$(MACH)/$(HDRGUARD)/; \
+ '
diff --git a/usr/src/lib/Makefile.asthdr b/usr/src/cmd/ast/Makefile.asthdr
index 4e69621e56..0590b35ec0 100644
--- a/usr/src/lib/Makefile.asthdr
+++ b/usr/src/cmd/ast/Makefile.asthdr
@@ -23,11 +23,8 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-
-# Note: libast headers are generated by the AST build system outside OS/Net
-# (and then copied here) and depend on the architecture (e.g. "i386", "amd64",
-# "sparc", "sparcv9" etc. ...), we later merge them into one unified file
-# (see below)
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
ROOTHDRDIR= $(ROOT)/usr/include/ast
@@ -55,10 +52,10 @@ $(ROOTHDRDIR)/%: $(HDRDIR32)/% $(HDRDIR64)/%
@mkdir -p tmpastinclude ; \
typeset boilerplate="" ; \
boilerplate+="/*\n" \
- boilerplate+=" * BEGIN OpenSolaris section\n" \
+ boilerplate+=" * BEGIN illumos section\n" \
boilerplate+=" * This is an unstable interface; changes may be made\n" \
boilerplate+=" * without notice.\n" \
- boilerplate+=" * END OpenSolaris section\n" \
+ boilerplate+=" * END illumos section\n" \
boilerplate+=" */\n" ; \
if [[ "$(@F)" == "ast_limits.h" || \
"$(@F)" == "ast_dirent.h" ]] ; then \
diff --git a/usr/src/lib/Makefile.astmsg b/usr/src/cmd/ast/Makefile.astmsg
index 096805e825..c7f911c260 100644
--- a/usr/src/lib/Makefile.astmsg
+++ b/usr/src/cmd/ast/Makefile.astmsg
@@ -23,6 +23,8 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
#
# Temporarily control building AST l10n catalogs until all build
@@ -43,23 +45,24 @@ DONT_BUILD_AST_CATALOGS= $(DONT_BUILD_AST_CATALOGS_1:0=)
# l10n message catalog generation for AST libraries
#
-MSGLIBNAME= $(LIBRARY:.a=)
+MSGLIBNAME= $(ASTLIB)
ASTMSGCATALOG= $(ROOT)/usr/lib/locale/C/LC_MESSAGES/$(MSGLIBNAME)
$(DO_BUILD_AST_CATALOGS)ASTMSGCC= \
PATH="/usr/ast/bin/:/bin:/usr/bin" \
/usr/bin/ksh93 /usr/ast/bin/msgcc >>msgcc.out 2>&1
-ASTMSGS= $(OBJECTS:%.o=msgs/%.mso)
+ASTMSGS= $(LIBOBJS:%.o=msgs/%.mso)
# cpp defines needed by msgcc
i386_ASTMSGCCFLAGS= -D__i386
amd64_ASTMSGCCFLAGS= -D__amd64
sparc_ASTMSGCCFLAGS= -D__sparc
sparcv9_ASTMSGCCFLAGS= -D__sparcv9
-ASTMSGCCFLAGS= -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR $($(TARGETMACH)_ASTMSGCCFLAGS)
+ASTMSGCCFLAGS= -D_STDC_C99 -D__STDC__ -D__BUILTIN_VA_ARG_INCR \
+ $($(TARGETMACH)_ASTMSGCCFLAGS)
-msgs/%.mso: ../common/%.c
+msgs/%.mso: $(ASTSRC)/%.c
@mkdir -p "$$(dirname "$@")" ; \
print "# Processing file $< to $@" >>msgcc.out ; \
$(ASTMSGCC) -M-set=ast $(ASTMSGCCFLAGS) $(CFLAGS) $(CPPFLAGS) -c "$<" -o "$@"
@@ -80,8 +83,8 @@ $(ASTMSGCATALOG): $(MSGLIBNAME).msg
# Main catalog target
$(DO_BUILD_AST_CATALOGS)_msg: $(ASTMSGCATALOG)
-# Create empty catalog file when we do not build it (to avoid that we have to hack the
-# package database each time we toggle the switch)
+# Create empty catalog file when we do not build it (to avoid that we have to
+# hack the package database each time we toggle the switch)
$(DONT_BUILD_AST_CATALOGS)_msg:
$(DONT_BUILD_AST_CATALOGS) $(RM) $(ASTMSGCATALOG) ; \
$(TOUCH) $(ASTMSGCATALOG) ; \
diff --git a/usr/src/cmd/ast/Makefile.iffe b/usr/src/cmd/ast/Makefile.iffe
new file mode 100644
index 0000000000..07bd3ab5bf
--- /dev/null
+++ b/usr/src/cmd/ast/Makefile.iffe
@@ -0,0 +1,71 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+AST_IFFE = $(AST_TOOLS)/iffe
+
+# The AST sources use a utility called "iffe" (If FEature Exists) to probe the
+# build environment, and to generate the header files needed to build the
+# libraries and commands. In order to support cross-compilation, the
+# generated FEATURE files are bundled with gate, but a TBC target is
+# provided to re-generate them if necessary due to a change elsewhere in gate.
+#
+# NOTES:
+#
+# Only the primary compiler is used with iffe.
+#
+# We use big PIC here since pic is too small on 64-bit sparc and on 32-bit
+# it's close to the barrier.
+#
+# "-D_map_libc=1" is needed to force map.c to add a "_ast_" prefix to all
+# AST symbol names which may otherwise collide with libc.
+#
+# "-D_lib_socket=1 -lsocket -lnsl" was added to make sure ksh93 is compiled
+# with networking support enabled; the current AST build infrastructure has
+# problems with detecting networking support in illumos.
+#
+# "-D_TS_ERRNO -D_REENTRANT" are flags taken from the default OS/Net
+# build system.
+
+IFFECC= $($(TARGETMACH)_CC)
+IFFECPPFLAGS= $(ASTPLATFORMCPPFLAGS) \
+ -D_TS_ERRNO -D_REENTRANT \
+ -YI,$(ROOT)/usr/include -D_BLD_DLL -D_BLD_ast \
+ -D_lib_socket=1 -D_map_libc=1 \
+ $(LIBSHELLFEATUREFLAGS) \
+ -I$(ASTSRC)/include -I.
+IFFECFLAGS= $(CSTD_GNU99) $($(TARGETMACH)_COPTFLAG) \
+ $($(TARGETMACH)_C_BIGPICFLAGS) $($(TARGETMACH)_CFLAGS)
+IFFELDFLAGS= $(ZASSERTDEFLIB) $(ZFATALWARNINGS) $(LDLIBS)
+IFFELIBS= -lsocket -lnsl
+IFFEC= $(IFFECC) $(IFFECPPFLAGS) $(IFFECFLAGS) \
+ $(IFFELDFLAGS) $(IFFELIBS)
+IFFEFLAGS= -v -R $(ROOT)
+
+FEATURE/% := SHADOW_CCS=
+
+FEATURE/%: $(ASTSRC)/features/%
+ PATH=$(AST_TOOLS):$$PATH \
+ $(AST_IFFE) $(IFFEFLAGS) -c '$(IFFEC)' run $< $(IFFE_EXTRA)
+ $(POST_PROCESS_AST) $@
+
+FEATURE/%: $(ASTSRC)/features/%.c
+ PATH=$(AST_TOOLS):$$PATH \
+ $(AST_IFFE) $(IFFEFLAGS) -c '$(IFFEC)' run $< $(IFFE_EXTRA)
+ $(POST_PROCESS_AST) $@
+
+FEATURE/%: $(ASTSRC)/features/%.sh
+ PATH=$(AST_TOOLS):$$PATH \
+ $(AST_IFFE) $(IFFEFLAGS) -c '$(IFFEC)' run $< $(IFFE_EXTRA)
+ $(POST_PROCESS_AST) $@
diff --git a/usr/src/cmd/ast/README.ast b/usr/src/cmd/ast/README.ast
new file mode 100644
index 0000000000..e9ad2cfff8
--- /dev/null
+++ b/usr/src/cmd/ast/README.ast
@@ -0,0 +1,18 @@
+This area contains the build configuration for selected AT&T Software Technology
+(AST) libraries and commands. In particular ksh (the illumos /bin/sh), its
+supporting libraries and and a small number of system commands, see
+./ksh/builtins/alias.c
+
+The source for these components is in usr/src/contrib/ast/; see the README
+file there for more information.
+
+The AST library builds use FEATURE files to describe the capabilities of the
+host system and build environment (similar to the output from tools like
+GNU autoconf). In order to support cross compilation and ensure reproducible
+builds, these files are present in this tree under libXXX/<arch>/FEATURE/
+alongside a small number of other generated files.
+
+The FEATURE files can be re-generated based on the current contents of
+proto using 'make _feature' in this directory. This should be done after
+adding new features to the standard libraries that AST can detect and use.
+This needs to be done for all supported architectures.
diff --git a/usr/src/cmd/ast/THIRDPARTYLICENSE b/usr/src/cmd/ast/THIRDPARTYLICENSE
deleted file mode 100644
index 50c6364c06..0000000000
--- a/usr/src/cmd/ast/THIRDPARTYLICENSE
+++ /dev/null
@@ -1,245 +0,0 @@
-+------------------------------------------------------------------------------+
-| This license covers all software that refers to the URL |
-| http://www.opensource.org/licenses/cpl1.0.txt |
-+------------------------------------------------------------------------------+
-
-Common Public License Version 1.0
-
- THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
- PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
- THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
- 1. DEFINITIONS
-
- "Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and
- documentation distributed under this Agreement, and
-
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from
- and are distributed by that particular Contributor. A Contribution
- 'originates' from a Contributor if it was added to the Program by
- such Contributor itself or anyone acting on such Contributor's
- behalf. Contributions do not include additions to the Program
- which: (i) are separate modules of software distributed in
- conjunction with the Program under their own license agreement, and
- (ii) are not derivative works of the Program.
-
- "Contributor" means any person or entity that distributes the Program.
-
- "Licensed Patents " mean patent claims licensable by a Contributor
- which are necessarily infringed by the use or sale of its Contribution
- alone or when combined with the Program.
-
- "Program" means the Contributions distributed in accordance with this
- Agreement.
-
- "Recipient" means anyone who receives the Program under this
- Agreement, including all Contributors.
-
- 2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free copyright
- license to reproduce, prepare derivative works of, publicly
- display, publicly perform, distribute and sublicense the
- Contribution of such Contributor, if any, and such derivative
- works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free patent
- license under Licensed Patents to make, use, sell, offer to sell,
- import and otherwise transfer the Contribution of such Contributor,
- if any, in source code and object code form. This patent license
- shall apply to the combination of the Contribution and the Program
- if, at the time the Contribution is added by the Contributor, such
- addition of the Contribution causes such combination to be covered
- by the Licensed Patents. The patent license shall not apply to any
- other combinations which include the Contribution. No hardware per
- se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the
- licenses to its Contributions set forth herein, no assurances are
- provided by any Contributor that the Program does not infringe the
- patent or other intellectual property rights of any other entity.
- Each Contributor disclaims any liability to Recipient for claims
- brought by any other entity based on infringement of intellectual
- property rights or otherwise. As a condition to exercising the
- rights and licenses granted hereunder, each Recipient hereby
- assumes sole responsibility to secure any other intellectual
- property rights needed, if any. For example, if a third party
- patent license is required to allow Recipient to distribute the
- Program, it is Recipient's responsibility to acquire that license
- before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has
- sufficient copyright rights in its Contribution, if any, to grant
- the copyright license set forth in this Agreement.
-
- 3. REQUIREMENTS
-
- A Contributor may choose to distribute the Program in object code form
- under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all
- warranties and conditions, express and implied, including
- warranties or conditions of title and non-infringement, and implied
- warranties or conditions of merchantability and fitness for a
- particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all
- liability for damages, including direct, indirect, special,
- incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement
- are offered by that Contributor alone and not by any other party;
- and
-
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software
- exchange.
-
- When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the
- Program.
-
- Contributors may not remove or alter any copyright notices contained
- within the Program.
-
- Each Contributor must identify itself as the originator of its
- Contribution, if any, in a manner that reasonably allows subsequent
- Recipients to identify the originator of the Contribution.
-
- 4. COMMERCIAL DISTRIBUTION
-
- Commercial distributors of software may accept certain
- responsibilities with respect to end users, business partners and the
- like. While this license is intended to facilitate the commercial use
- of the Program, the Contributor who includes the Program in a
- commercial product offering should do so in a manner which does not
- create potential liability for other Contributors. Therefore, if a
- Contributor includes the Program in a commercial product offering,
- such Contributor ("Commercial Contributor") hereby agrees to defend
- and indemnify every other Contributor ("Indemnified Contributor")
- against any losses, damages and costs (collectively "Losses") arising
- from claims, lawsuits and other legal actions brought by a third party
- against the Indemnified Contributor to the extent caused by the acts
- or omissions of such Commercial Contributor in connection with its
- distribution of the Program in a commercial product offering. The
- obligations in this section do not apply to any claims or Losses
- relating to any actual or alleged intellectual property infringement.
- In order to qualify, an Indemnified Contributor must: a) promptly
- notify the Commercial Contributor in writing of such claim, and b)
- allow the Commercial Contributor to control, and cooperate with the
- Commercial Contributor in, the defense and any related settlement
- negotiations. The Indemnified Contributor may participate in any such
- claim at its own expense.
-
- For example, a Contributor might include the Program in a commercial
- product offering, Product X. That Contributor is then a Commercial
- Contributor. If that Commercial Contributor then makes performance
- claims, or offers warranties related to Product X, those performance
- claims and warranties are such Commercial Contributor's responsibility
- alone. Under this section, the Commercial Contributor would have to
- defend claims against the other Contributors related to those
- performance claims and warranties, and if a court requires any other
- Contributor to pay any damages as a result, the Commercial Contributor
- must pay those damages.
-
- 5. NO WARRANTY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
- PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
- WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
- OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
- responsible for determining the appropriateness of using and
- distributing the Program and assumes all risks associated with its
- exercise of rights under this Agreement, including but not limited to
- the risks and costs of program errors, compliance with applicable
- laws, damage to or loss of data, programs or equipment, and
- unavailability or interruption of operations.
-
- 6. DISCLAIMER OF LIABILITY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
- ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
- WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
- DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
- HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 7. GENERAL
-
- If any provision of this Agreement is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability of
- the remainder of the terms of this Agreement, and without further
- action by the parties hereto, such provision shall be reformed to the
- minimum extent necessary to make such provision valid and enforceable.
-
- If Recipient institutes patent litigation against a Contributor with
- respect to a patent applicable to software (including a cross-claim or
- counterclaim in a lawsuit), then any patent licenses granted by that
- Contributor to such Recipient under this Agreement shall terminate as
- of the date such litigation is filed. In addition, if Recipient
- institutes patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Program
- itself (excluding combinations of the Program with other software or
- hardware) infringes such Recipient's patent(s), then such Recipient's
- rights granted under Section 2(b) shall terminate as of the date such
- litigation is filed.
-
- All Recipient's rights under this Agreement shall terminate if it
- fails to comply with any of the material terms or conditions of this
- Agreement and does not cure such failure in a reasonable period of
- time after becoming aware of such noncompliance. If all Recipient's
- rights under this Agreement terminate, Recipient agrees to cease use
- and distribution of the Program as soon as reasonably practicable.
- However, Recipient's obligations under this Agreement and any licenses
- granted by Recipient relating to the Program shall continue and
- survive.
-
- Everyone is permitted to copy and distribute copies of this Agreement,
- but in order to avoid inconsistency the Agreement is copyrighted and
- may only be modified in the following manner. The Agreement Steward
- reserves the right to publish new versions (including revisions) of
- this Agreement from time to time. No one other than the Agreement
- Steward has the right to modify this Agreement. IBM is the initial
- Agreement Steward. IBM may assign the responsibility to serve as the
- Agreement Steward to a suitable separate entity. Each new version of
- the Agreement will be given a distinguishing version number. The
- Program (including Contributions) may always be distributed subject to
- the version of the Agreement under which it was received. In addition,
- after a new version of the Agreement is published, Contributor may
- elect to distribute the Program (including its Contributions) under
- the new version. Except as expressly stated in Sections 2(a) and 2(b)
- above, Recipient receives no rights or licenses to the intellectual
- property of any Contributor under this Agreement, whether expressly,
- by implication, estoppel or otherwise. All rights in the Program not
- expressly granted under this Agreement are reserved.
-
- This Agreement is governed by the laws of the State of New York and
- the intellectual property laws of the United States of America. No
- party to this Agreement will bring a legal action under this Agreement
- more than one year after the cause of action arose. Each party waives
- its rights to a jury trial in any resulting litigation.
-
-Copyright (c) 2004 by the Open Source Initiative
-This is a copy of the license posted on 2004-10-06 at:
- http://www.opensource.org/licenses/cpl
diff --git a/usr/src/cmd/ast/THIRDPARTYLICENSE.descrip b/usr/src/cmd/ast/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index 6281d83ba5..0000000000
--- a/usr/src/cmd/ast/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-AT&T ADVANCED SOFTWARE TECHNOLOGY UTILITIES
diff --git a/usr/src/cmd/ksh/Makefile b/usr/src/cmd/ast/ksh/Makefile
index a2eb19cde9..43ef7613e1 100644
--- a/usr/src/cmd/ksh/Makefile
+++ b/usr/src/cmd/ast/ksh/Makefile
@@ -21,15 +21,16 @@
#
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
PROG= ksh
USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93
-include ../Makefile.cmd
+include ../../Makefile.cmd
SUBDIRS= $(MACH)
$(BUILD64)SUBDIRS += $(MACH64)
@@ -40,33 +41,33 @@ ARCH32_i386= i86
ARCH32_sparc= sparcv7
ARCH32= $(ARCH32_$(MACH))
-# Serialise the build to avoid that we run the test suite for 32bit
-# and 64bit in parallel
-.NO_PARALLEL: $(SUBDIRS)
-
all := TARGET = all
install := TARGET = install
clean := TARGET = clean
-clobber := TARGET = clobber
+clobber := TARGET = clobber
lint := TARGET = lint
testshell := TARGET = testshell
.KEEP_STATE:
+# Serialise the build to avoid running the test suite for 32-bit
+# and 64-bit in parallel
+.NO_PARALLEL: $(SUBDIRS)
all clean clobber lint testshell: $(SUBDIRS)
+install_h _feature:
# dummy file since AST/ksh doesn't use *.po files
# (and "ksh" is just a frontend which calls directly into libshell,
-# e.g. there are no l10n strings here)
+# i.e. there are no l10n strings here)
$(PROG).po:
$(RM) ksh.po ksh93.po ; \
$(TOUCH) $(PROG).po
-install: $(ISAEXEC) $(SUBDIRS)
+install: $(SUBDIRS)
@(set -o xtrace ; \
builtin ln ; \
builtin rm ; \
- rm -f $(ROOTPROG) ; \
+ rm -f $(ROOTPROG) ; \
ln $(ISAEXEC) $(ROOTPROG) ; \
for i in $(USRKSH_ALIAS_LIST) ; do \
[[ "$$i" == "$(PROG)" ]] && continue ; \
@@ -87,7 +88,6 @@ install: $(ISAEXEC) $(SUBDIRS)
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
-
FRC:
-include ../Makefile.targ
+include ../../Makefile.targ
diff --git a/usr/src/cmd/ksh/Makefile.com b/usr/src/cmd/ast/ksh/Makefile.com
index 9f6b431e1f..f5be217a77 100644
--- a/usr/src/cmd/ksh/Makefile.com
+++ b/usr/src/cmd/ast/ksh/Makefile.com
@@ -23,6 +23,7 @@
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
SHELL=/usr/bin/ksh93
@@ -30,38 +31,33 @@ PROG= ksh
USRKSH_ALIAS_LIST=ksh ksh93 rksh rksh93
-OBJECTS= \
- pmain.o
+# Set common AST build flags (e.g., needed to support the math stuff).
+include ../../Makefile.ast
-LIBSHELLBASE=../../../lib/libshell
-LIBSHELLSRC=$(LIBSHELLBASE)/common/sh
+OBJECTS= pmain.o
-SRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
+ASTSRC= $(C_AST)/src/cmd/ksh93
+LIBSHELLBASE= ../../libshell
+LIBSHELLSRC= $(ASTSRC)/sh
-LDLIBS += -lshell
+SRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
-# Set common AST build flags (e.g., needed to support the math stuff).
-include ../../../Makefile.ast
+LDLIBS += -lshell -lumem
-# 1. Make sure that the -D/-U defines in CFLAGS below are in sync
-# with usr/src/lib/libshell/Makefile.com
-# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
+# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
# case - it MUST come as the last element but future changes in -D options
# may then cause silent breakage in the AST sources because the last -D
# option specified overrides previous -D options so we prefer the current
# way to explicitly list each single flag.
-CPPFLAGS = \
+CPPFLAGS= \
$(DTEXTDOM) $(DTS_ERRNO) \
$(LIBSHELLCPPFLAGS)
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
# Workaround for CR#6628728 ("|memcntl()| prototype not available for C99/XPG6")
pmain.o := CERRWARN += -_gcc=-Wno-implicit-function-declaration
-pmain.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
# not linted
SMATCH=off
@@ -94,9 +90,7 @@ clean:
# We explicitly delete "ksh" and "ksh93" to catch changes in
# BUILD_KSH93_AS_BINKSH (see Makefile.ksh93switch)
-CLOBBERFILES += \
- ksh \
- ksh93
+CLOBBERFILES += ksh ksh93
# Install rule for $(MACH)/Makefile (32bit)
INSTALL.ksh.32bit=@ \
@@ -120,12 +114,4 @@ INSTALL.ksh.64bit=@ \
done \
)
-#
-# ksh is not lint-clean yet; fake up a target. (You can use
-# "make lintcheck" to actually run lint; please send all lint fixes
-# upstream (to AT&T) so the next update will pull them into ON.)
-#
-lint:
- @ print "usr/src/cmd/ksh is not lint-clean: skipping"
-
include ../Makefile.testshell
diff --git a/usr/src/cmd/ksh/Makefile.testshell b/usr/src/cmd/ast/ksh/Makefile.testshell
index 7c1c6d0492..9d289a0ac7 100644
--- a/usr/src/cmd/ksh/Makefile.testshell
+++ b/usr/src/cmd/ast/ksh/Makefile.testshell
@@ -57,7 +57,7 @@
# and all important markets based on suggestions by Sun's i18n team.
#
# - More locales should be tested here (via ON_KSH_TEST_LOCALES below).
-# Locales like "ru_RU.KOI8-R","de_DE.UTF-8", "is_IS.ISO8859-1",
+# Locales like "ru_RU.KOI8-R","de_DE.UTF-8", "is_IS.ISO8859-1",
# "is_IS.UTF-8" and "nl_BE.ISO8859-15" are on our wishlist - but
# that is getting little bit more compliciated because these locales use
# ',' as decimal delimter. The best solution may be to wait for ksh93
@@ -65,7 +65,7 @@
# use ksh93's associative/compound variables (this may require a flag
# day... ;-( ).
#
-# - Due to the timing sensitivity of some of the tests, these tests should
+# - Due to the timing sensitivity of some of the tests, these tests should
# be run on a quiet system with no other activity.
#
@@ -107,12 +107,12 @@ testshell: $(PROG)
set +o errexit ; \
export PATH="$(SRC)/cmd/ksh/$(LIBSHELLMACH):/bin:/usr/bin" ; \
printf "# which ksh='%s', ksh93='%s'\n" \
- "$$(which ksh)" "$$(which ksh93)" ; \
+ "$$(which ksh)" "$$(which ksh93)" ; \
) ; \
if [[ "$$(isalist)" != ~(F)$(LIBSHELLMACH) ]] ; then \
printf \
- "# ISA='%s' not available on this system, skipping tests...\n" \
- "$(LIBSHELLMACH)" ; \
+ "# ISA='%s' not available on this system, skipping tests...\n" \
+ "$(LIBSHELLMACH)" ; \
exit 0 ; \
fi ; \
print "# Libraries used:" ; \
@@ -125,19 +125,19 @@ testshell: $(PROG)
(supported_locales="$$(/usr/bin/locale -a)" ; \
for test_lang in $(ON_KSH_TEST_LOCALES) ; do \
if [[ "$$(egrep "^$${test_lang}\$$" <<< "$${supported_locales}")" == "" ]] ; then \
- printf \
+ printf \
"# Locale '%s' not supported, skipping tests...\n" \
"$${test_lang}" ; \
- continue ; \
+ continue ; \
fi ; \
(for test_item in $(ON_KSH_TEST_LIST) ; do \
- [[ "$${test_item}" == "$(TESTSRC)/builtins.sh" || \
- "$${test_item}" == "$(TESTSRC)/glob.sh" || \
- "$${test_item}" == "$(TESTSRC)/options.sh" ]] || \
+ [[ "$${test_item}" == "$(TESTSRC)/builtins.sh" || \
+ "$${test_item}" == "$(TESTSRC)/glob.sh" || \
+ "$${test_item}" == "$(TESTSRC)/options.sh" ]] || \
$(ON_KSH_TEST_IGNORE_TESTFAILURE) && \
set +o errexit ; \
for mode in 'plain_script:-s' 'compiled_script:-c' ; do \
- printf \
+ printf \
"## Running %s test: LANG='%s' script='%s', mode='%s'\n" \
"$(LIBSHELLMACH)/ksh" \
"$${test_lang}" \
@@ -145,24 +145,24 @@ testshell: $(PROG)
"$${mode%:*}"; \
( \
ulimit -s 65536 ; \
- test_output="$$( ( \
- export \
- SHELL="$(SRC)/cmd/ksh/$(LIBSHELLMACH)/ksh" \
- LD_LIBRARY_PATH_64="$(ROOTLIB64)/" \
- LD_LIBRARY_PATH_32="$(ROOTLIB)/" \
- LD_LIBRARY_PATH="$(ROOTLIB64)/:$(ROOTLIB)/" ; \
- "$${SHELL}" "$(TESTSRC)/shtests" -t "$${mode#*:}" \
- LD_LIBRARY_PATH_64="$${LD_LIBRARY_PATH_64}" \
- LD_LIBRARY_PATH_32="$${LD_LIBRARY_PATH_32}" \
- LD_LIBRARY_PATH="$${LD_LIBRARY_PATH}" \
- SHELL="$${SHELL}" \
- LANG="$${test_lang}" \
- LC_ALL="$${test_lang}" \
+ test_output="$$( ( \
+ export \
+ SHELL="$(SRC)/cmd/ksh/$(LIBSHELLMACH)/ksh" \
+ LD_LIBRARY_PATH_64="$(ROOTLIB64)/" \
+ LD_LIBRARY_PATH_32="$(ROOTLIB)/" \
+ LD_LIBRARY_PATH="$(ROOTLIB64)/:$(ROOTLIB)/" ; \
+ "$${SHELL}" "$(TESTSRC)/shtests" -t "$${mode#*:}" \
+ LD_LIBRARY_PATH_64="$${LD_LIBRARY_PATH_64}" \
+ LD_LIBRARY_PATH_32="$${LD_LIBRARY_PATH_32}" \
+ LD_LIBRARY_PATH="$${LD_LIBRARY_PATH}" \
+ SHELL="$${SHELL}" \
+ LANG="$${test_lang}" \
+ LC_ALL="$${test_lang}" \
VMALLOC_OPTIONS=abort \
SHCOMP="$(ROOTBIN)/shcomp" \
- "$${test_item}" \
- ) 2>&1 | while read ; do \
- printf "#\t%s\n" "$${REPLY}" ; \
+ "$${test_item}" \
+ ) 2>&1 | while read ; do \
+ printf "#\t%s\n" "$${REPLY}" ; \
done | tee /dev/stderr)" ; \
[[ "$${test_output}" == ~(E)test.*passed\ \[\ [[:digit:]]*\ test.*\ 0\ errors\ \] ]] || \
(print "##--------> test failed" ; exit 1) \
diff --git a/usr/src/cmd/ksh/amd64/Makefile b/usr/src/cmd/ast/ksh/amd64/Makefile
index c6a3da7fe7..8c252d1a0f 100644
--- a/usr/src/cmd/ksh/amd64/Makefile
+++ b/usr/src/cmd/ast/ksh/amd64/Makefile
@@ -23,16 +23,18 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Specify the MACH we currently use to build and test ksh
LIBSHELLMACH= $(MACH64)
-include ../../Makefile.cmd
-include ../../Makefile.cmd.64
+include ../../../Makefile.cmd
+include ../../../Makefile.cmd.64
include ../Makefile.com
install: all $(ROOTPROG64)
$(INSTALL.ksh.64bit)
-include ../../Makefile.targ
+include ../../../Makefile.targ
diff --git a/usr/src/cmd/ksh/builtins/Makefile b/usr/src/cmd/ast/ksh/builtins/Makefile
index 2a3977c94c..8ae2eb1b67 100644
--- a/usr/src/cmd/ksh/builtins/Makefile
+++ b/usr/src/cmd/ast/ksh/builtins/Makefile
@@ -24,8 +24,8 @@
# Use is subject to license terms.
#
# Copyright 2010 Nexenta Systems, Inc. All rights reserved.
-#
# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
PROG= alias
@@ -86,8 +86,8 @@ ROOTXPG4ALIAS= \
$(XPG4SH:%=$(ROOTXPG4BIN)/%) $(XPG4ALIASPROG:%=$(ROOTXPG4BIN)/%)
ROOTALIASPROG= $(ALIASPROG:%=$(ROOTBIN)/%)
-include ../../Makefile.cmd
-$(SPARC_BLD)include ../../Makefile.cmd.64
+include ../../../Makefile.cmd
+$(SPARC_BLD)include ../../../Makefile.cmd.64
FILEMODE= 555
CERRWARN += -_gcc=-Wno-parentheses
@@ -111,30 +111,27 @@ $(ALIASPROG:%=$(ROOTBIN)/%): $(ROOTPROG)
.KEEP_STATE:
# Set common AST build flags (e.g., needed to support the math stuff).
-include ../../../Makefile.ast
+include ../../Makefile.ast
+
+
+ASTSRC= $(C_AST)/src/cmd/ksh93
OBJECTS= \
alias.o
SRCS= $(OBJECTS:%.o=%.c)
-LDLIBS += -lshell -lcmd -last
+LDLIBS += -lshell -lcmd -last -lumem
-CPPFLAGS = \
+CPPFLAGS= \
$(DTEXTDOM) $(DTS_ERRNO) \
+ -I$(ASTSRC)/include \
+ -I$(AST)/libshell/$(MACH) \
-I$(ROOT)/usr/include/ast \
-I$(ROOT)/usr/include
-# Enable workaround for a crash in /usr/bin/alias when invalid
-# options are passed (e.g. $ /usr/bin/alias -c #). The shell
-# code will call an error handler which does a |longjmp()| but
-# somehow the code failed to do the |setjmp()| before this point.
-CPPFLAGS += -DWORKAROUND_FOR_ALIAS_CRASH
-
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
ROOTCMDDIR=$(ROOT)/usr/bin
@@ -148,4 +145,4 @@ $(PROG): $(OBJECTS)
clean clobber:
rm -f $(PROG) $(OBJECTS)
-lint _msg:
+_msg:
diff --git a/usr/src/cmd/ksh/builtins/alias.c b/usr/src/cmd/ast/ksh/builtins/alias.c
index 88edbc1e9b..1516a0bf1c 100644
--- a/usr/src/cmd/ksh/builtins/alias.c
+++ b/usr/src/cmd/ast/ksh/builtins/alias.c
@@ -22,6 +22,8 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
*/
/*
@@ -31,14 +33,19 @@
* /usr/bin/cut will call the ksh "cut" builtin etc.
*/
+#include <defs.h>
#include <shell.h>
#include <nval.h>
#include <cmdext.h>
#include <stdio.h>
+#include <setjmp.h>
+
+#undef calloc
+#undef free
typedef struct {
const char *name;
- int (* func)(int, char **, void *);
+ int (* func)(int, char **, Shbltin_t *);
} bfastpathrec;
/*
@@ -68,7 +75,9 @@ bfastpathrec fastpath_builtins[] =
/* This list must be alphabetically sorted for |strcmp()| usage */
{ "basename", b_basename },
{ "cat", b_cat },
+ { "chgrp", b_chgrp },
{ "chmod", b_chmod },
+ { "chown", b_chown },
#ifdef ENABLE_PERFORMANCE_PARADOXON
{ "cksum", b_cksum },
#endif /* ENABLE_PERFORMANCE_PARADOXON */
@@ -78,14 +87,11 @@ bfastpathrec fastpath_builtins[] =
{ "cut", b_cut },
{ "date", b_date },
{ "dirname", b_dirname },
- { "egrep", b_egrep },
{ "expr", b_expr },
{ "fds", b_fds },
- { "fgrep", b_fgrep },
{ "fmt", b_fmt },
{ "fold", b_fold },
{ "getconf", b_getconf },
- { "grep", b_grep },
{ "head", b_head },
{ "id", b_id },
{ "join", b_join },
@@ -99,7 +105,6 @@ bfastpathrec fastpath_builtins[] =
{ "paste", b_paste },
{ "pathchk", b_pathchk },
{ "pids", b_pids },
- { "readlink", b_readlink },
#ifdef ENABLE_PERFORMANCE_PARADOXON
{ "rev", b_rev },
#endif /* ENABLE_PERFORMANCE_PARADOXON */
@@ -115,13 +120,12 @@ bfastpathrec fastpath_builtins[] =
{ "tty", b_tty },
{ "uname", b_uname },
{ "uniq", b_uniq },
+ { "vmstate", b_vmstate },
{ "wc", b_wc },
- { "xgrep", b_xgrep },
- { NULL, (int (*)(int, char **, void *))NULL }
+ { NULL, NULL }
};
-static inline
-const bfastpathrec *
+static inline const bfastpathrec *
find_bfastpathrec(const char *name)
{
unsigned int i;
@@ -132,13 +136,11 @@ find_bfastpathrec(const char *name)
return (&fastpath_builtins[i]);
else if (cmpres > 0)
return (NULL);
-
}
return (NULL);
}
-static inline
-int
+static inline int
fastpath_builtin_main(const bfastpathrec *brec, int argc, char *argv[])
{
setlocale(LC_ALL, ""); /* calls |_ast_setlocale()| */
@@ -147,12 +149,12 @@ fastpath_builtin_main(const bfastpathrec *brec, int argc, char *argv[])
}
-/* Builtin script, original derived from alias.sh */
+/* Builtin script, originally derived from alias.sh */
static const char *script = "\n"
/* Get name of builtin */
"typeset cmd=\"${0##*/}\"\n"
/*
- * If the requested command is not an alias load it explicitly
+ * If the requested command is not an alias, load it explicitly
* to make sure it is not bound to a path (those built-ins which
* are mapped via shell aliases point to commands which are
* "special shell built-ins" which cannot be bound to a specific
@@ -170,32 +172,18 @@ static const char *script = "\n"
"if [[ \"${cmd}\" == \"command\" ]] ; then\n"
"command \"$@\"\n"
"else\n"
-#ifdef WORKAROUND_FOR_ALIAS_CRASH
-/*
- * Work around a crash in /usr/bin/alias when invalid options are
- * passed (e.g. $ /usr/bin/alias -c #). The shell code will call
- * an error handler which does a |longjmp()| but somehow the code
- * failed to do the |setjmp()| before this point.
- * Putting the "alias" command in a subshell avoids the crash.
- * Real cause of the issue is under investigation and a fix be
- * delivered with the next ast-ksh update.
- */
- "( \"${cmd}\" \"$@\" )\n"
-#else
"\"${cmd}\" \"$@\"\n"
-#endif /* WORKAROUND_FOR_ALIAS_CRASH */
"fi\n"
"exitval=$?";
-
-static inline
-int
-script_builtin_main(int argc, char *argv[])
+static inline int
+script_builtin_main(int argc, char **argv)
{
int i;
Shell_t *shp;
Namval_t *np;
int exitval;
+ char **xargv;
/*
* Create copy of |argv| array shifted by one position to
@@ -204,18 +192,19 @@ script_builtin_main(int argc, char *argv[])
* values may trigger special shell modes (e.g. *rsh* will
* trigger "restricted" shell mode etc.).
*/
- char *xargv[argc+2];
+ xargv = calloc(argc + 2, sizeof (char *));
+ if (xargv == NULL)
+ return (1);
xargv[0] = "/usr/bin/sh";
- xargv[1] = "scriptname";
- for (i = 0; i < argc; i++) {
- xargv[i+1] = argv[i];
- }
- xargv[i+1] = NULL;
+ for (i = 0; i < argc; i++)
+ xargv[i + 1] = argv[i];
+ xargv[i + 1] = NULL;
- shp = sh_init(argc+1, xargv, 0);
+ shp = sh_init(argc + 1, xargv, 0);
if (!shp)
error(ERROR_exit(1), "shell initialisation failed.");
- (void) sh_trap(script, 0);
+ if (setjmp(*shp->jmplist) == 0)
+ (void) sh_trap(script, 0);
np = nv_open("exitval", shp->var_tree, 0);
if (!np)
@@ -223,36 +212,34 @@ script_builtin_main(int argc, char *argv[])
exitval = (int)nv_getnum(np);
nv_close(np);
+ free(xargv);
+
return (exitval);
}
int
-main(int argc, char *argv[])
+main(int argc, char **argv)
{
const char *progname;
const bfastpathrec *brec;
- char execnamebuff[PATH_MAX+1];
+ char execnamebuff[PATH_MAX + 1];
/* Get program name */
if (pathprog(argv[0], execnamebuff, sizeof (execnamebuff)) <= 0)
error(ERROR_exit(1), "could not determinate exec name.");
progname = (const char *)strrchr(execnamebuff, '/');
- if (progname != NULL) {
+
+ if (progname != NULL)
progname++;
- }
else
- {
progname = execnamebuff;
- }
/* Execute command... */
if (brec = find_bfastpathrec(progname)) {
/* ... either via a fast path (calling the code directly) ... */
return (fastpath_builtin_main(brec, argc, argv));
- }
- else
- {
+ } else {
/* ... or from within a full shell. */
return (script_builtin_main(argc, argv));
}
diff --git a/usr/src/cmd/ksh/sparc/Makefile b/usr/src/cmd/ast/ksh/i386/Makefile
index 5ce68f9ef3..78732c4fa1 100644
--- a/usr/src/cmd/ksh/sparc/Makefile
+++ b/usr/src/cmd/ast/ksh/i386/Makefile
@@ -23,15 +23,17 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Specify the MACH we currently use to build and test ksh
LIBSHELLMACH= $(MACH)
-include ../../Makefile.cmd
+include ../../../Makefile.cmd
include ../Makefile.com
install: all $(ROOTPROG32)
$(INSTALL.ksh.32bit)
-include ../../Makefile.targ
+include ../../../Makefile.targ
diff --git a/usr/src/cmd/ksh/i386/Makefile b/usr/src/cmd/ast/ksh/sparc/Makefile
index 5ce68f9ef3..78732c4fa1 100644
--- a/usr/src/cmd/ksh/i386/Makefile
+++ b/usr/src/cmd/ast/ksh/sparc/Makefile
@@ -23,15 +23,17 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Specify the MACH we currently use to build and test ksh
LIBSHELLMACH= $(MACH)
-include ../../Makefile.cmd
+include ../../../Makefile.cmd
include ../Makefile.com
install: all $(ROOTPROG32)
$(INSTALL.ksh.32bit)
-include ../../Makefile.targ
+include ../../../Makefile.targ
diff --git a/usr/src/cmd/ksh/sparcv9/Makefile b/usr/src/cmd/ast/ksh/sparcv9/Makefile
index c6a3da7fe7..8c252d1a0f 100644
--- a/usr/src/cmd/ksh/sparcv9/Makefile
+++ b/usr/src/cmd/ast/ksh/sparcv9/Makefile
@@ -23,16 +23,18 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Specify the MACH we currently use to build and test ksh
LIBSHELLMACH= $(MACH64)
-include ../../Makefile.cmd
-include ../../Makefile.cmd.64
+include ../../../Makefile.cmd
+include ../../../Makefile.cmd.64
include ../Makefile.com
install: all $(ROOTPROG64)
$(INSTALL.ksh.64bit)
-include ../../Makefile.targ
+include ../../../Makefile.targ
diff --git a/usr/src/cmd/ast/libast/Makefile b/usr/src/cmd/ast/libast/Makefile
new file mode 100644
index 0000000000..afddba154b
--- /dev/null
+++ b/usr/src/cmd/ast/libast/Makefile
@@ -0,0 +1,63 @@
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+SHELL= /usr/bin/ksh93
+
+include $(SRC)/lib/Makefile.lib
+
+SUBDIRS= $(MACH)
+$(BUILD64)SUBDIRS += $(MACH64)
+
+all := TARGET= all
+clean := TARGET= clean
+clobber := TARGET= clobber
+install := TARGET= install
+install_h := TARGET= install_h
+_msg := TARGET= _msg
+_feature := TARGET= _feature
+
+.KEEP_STATE:
+.PARALLEL: $(SUBDIRS)
+
+all clean clobber install _feature: $(SUBDIRS)
+_msg: $(MACH)
+
+include Makefile.defs
+HDRS= $(HEADERINSTALL)
+HDRDIR32= $(MACH)/ast
+HDRDIR64= $(MACH64)/ast
+include ../Makefile.asthdr
+
+install_h: $(SUBDIRS) .WAIT $(ROOTHDRS)
+install: install_h
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+FRC:
+
+include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/cmd/ast/libast/Makefile.com b/usr/src/cmd/ast/libast/Makefile.com
new file mode 100644
index 0000000000..862c2f8e67
--- /dev/null
+++ b/usr/src/cmd/ast/libast/Makefile.com
@@ -0,0 +1,157 @@
+#
+# 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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Copyright (c) 2019, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+
+SHELL= /usr/bin/ksh93
+
+LIBRARY= libast.a
+VERS= .1
+
+include ../Makefile.defs
+
+OBJECTS += $(LIBOBJS)
+
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.ast
+
+MAPFILES= ../mapfile-vers
+
+LIBS= $(DYNLIB)
+LDLIBS += -lm -lc -lsocket
+
+# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
+# case - it MUST come as the last element but future changes in -D options
+# may then cause silent breakage in the AST sources because the last -D
+# option specified overrides previous -D options so we prefer the current
+# way to explicitly list each single flag.
+# Notes:
+# - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
+# - Be careful with "-D__OBSOLETE__=xxx". Make sure this is in sync with
+# upstream (see Mamfile) and do not change the |__OBSOLETE__| value
+# without examining the symbols that will be removed, and evaluating
+# whether that breaks compatibility with upstream binaries.
+CPPFLAGS= \
+ $(DTEXTDOM) $(DTS_ERRNO) \
+ $(ASTPLATFORMCPPFLAGS) \
+ -Iast -I. \
+ -I$(ASTSRC) \
+ -I$(ASTSRC)/comp \
+ -I$(ASTSRC)/include \
+ -I$(ASTSRC)/std \
+ -I$(ASTSRC)/dir \
+ -I$(ASTSRC)/port \
+ -I$(ASTSRC)/sfio \
+ -I$(ASTSRC)/misc \
+ -I$(ASTSRC)/string \
+ -I$(ROOT)/usr/include \
+ '-DCONF_LIBSUFFIX=".so"' \
+ '-DCONF_LIBPREFIX="lib"' \
+ -DERROR_CATALOG=\""libast"\" \
+ -D__OBSOLETE__=20120101 \
+ -D_BLD_ast \
+ -D_PACKAGE_ast \
+ -D_BLD_DLL \
+ -D_AST_std_malloc=1
+
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
+
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += $(CNOWARN_UNINIT)
+CERRWARN += -_gcc=-Wno-char-subscripts
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-but-set-variable
+CERRWARN += -_gcc=-Wno-unused-but-set-parameter
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += -_gcc=-Wno-unused-label
+CERRWARN += -_gcc=-Wno-implicit-function-declaration
+CERRWARN += -_gcc=-Wno-empty-body
+CERRWARN += -_gcc=-Wno-type-limits
+CERRWARN += -_gcc=-Wno-address
+
+SMATCH= off
+
+all: install_h mkpicdirs .WAIT $(LIBS)
+
+mkpicdirs:
+ mkdir -p $(LOBJDIRS:%=pics/%)
+
+include $(SRC)/lib/Makefile.targ
+
+pics/%.o: $(ASTSRC)/%.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ $(POST_PROCESS_O)
+
+######################################################################
+# Header file generation
+
+ast/prototyped.h: FRC
+ $(MKDIR) -p $(@D)
+ $(AST_TOOLS)/proto -f /dev/null > $@
+
+ast/ast_common.h: ast/prototyped.h
+ $(AST_PROTO) FEATURE/common | $(GREP) -v 'define _def_map_' > $@
+ $(POST_PROCESS_AST) $@
+ $(CP) $@ .
+
+ast/lc.h: lc.h
+ $(AST_PROTO) lc.h > ast/lc.h
+
+# The HEADERGEN headers are generated from the corresponding FEATURE/ file
+# with any ast_ prefix removed.
+$(HEADERGEN:%=ast/%): FRC
+ src=`echo $(@F:%.h=%) | sed 's/^ast_//'`; \
+ $(AST_PROTO) FEATURE/$$src > $@
+ $(POST_PROCESS_AST) $@
+
+$(HEADERSRC:%=ast/%): FRC
+ src=$(@F) ;\
+ [[ $$src = ast_namval.h ]] && src=namval.h ;\
+ for d in include $(LOBJDIRS) std; do \
+ if [[ -f $(ASTSRC)/$$d/$$src ]]; then \
+ echo "$$d/$$src -> $@"; \
+ cp $(ASTSRC)/$$d/$$src $@; \
+ $(POST_PROCESS_AST) $@; \
+ break; \
+ fi; \
+ done
+
+CLOBBERFILES += ast_common.h t.c
+CLOBBERFILES += ast/*
+
+install_h: ast/prototyped.h ast/ast_common.h ast/lc.h \
+ $(HEADERGEN:%=ast/%) $(HEADERSRC:%=ast/%)
+
+.PARALLEL: $(HEADERGEN:%=ast/%) $(HEADERSRC:%=ast/%)
+
+_feature: FRC
+ $(MAKE) -f Makefile.iffe generate
+
+include ../../Makefile.astmsg
+
+FRC:
diff --git a/usr/src/cmd/ast/libast/Makefile.defs b/usr/src/cmd/ast/libast/Makefile.defs
new file mode 100644
index 0000000000..0974a07cb4
--- /dev/null
+++ b/usr/src/cmd/ast/libast/Makefile.defs
@@ -0,0 +1,654 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+# These macros should be kept synchronised with those in
+# usr/src/contrib/ast/src/lib/libast/Makefile
+
+AST_LICENSE = -o since=1985,author=gsf+dgk+kpv
+ASTLIB= libast
+ASTSRC= $(C_AST)/src/lib/$(ASTLIB)
+HDRGUARD= ast
+
+FEATURES= common lib sys fs tty standards param \
+ align api aso asometh botch ccode dirent eaccess errno \
+ fcntl float hack iconv libpath limits locale mmap \
+ mode ndbm nl_types omitted options preroot prog \
+ sfinit sfio sig siglist signal sizeof stdio \
+ syscall time tmlib tmx tv tvlib uwin vfork vmalloc wait \
+ wchar wctype map
+
+HEADERSTD= dirent.h iconv.h nl_types.h stdio.h wchar.h wctype.h
+
+HEADERSRC= \
+ ast.h ast_dir.h ast_getopt.h ast_std.h ast_namval.h ast_windows.h \
+ ccode.h cdt.h cdtlib.h cmdarg.h debug.h dt.h error.h find.h ftw.h \
+ ftwalk.h fts.h fs3d.h getopt.h glob.h hash.h hashkey.h hashpart.h \
+ ip6.h ls.h magic.h mc.h mime.h mnt.h modecanon.h modex.h \
+ namval.h option.h proc.h re_comp.h recfmt.h regex.h regexp.h \
+ sfio.h sfio_s.h sfio_t.h sfdisc.h shcmd.h \
+ stack.h stak.h stk.h swap.h tar.h times.h tm.h tok.h \
+ usage.h vdb.h vecargs.h vmalloc.h wait.h wordexp.h \
+ bytesex.h endian.h fnmatch.h magicid.h fnv.h aso.h \
+ $(HEADERSTD)
+
+HEADERGEN= \
+ align.h preroot.h sig.h tmx.h tv.h \
+ ast_api.h ast_botch.h ast_ccode.h ast_fcntl.h ast_float.h \
+ ast_fs.h ast_lib.h ast_map.h ast_mmap.h ast_mode.h ast_ndbm.h \
+ ast_param.h ast_sys.h ast_time.h ast_tty.h \
+ ast_vfork.h ast_wait.h ast_limits.h ast_standards.h ast_sizeof.h \
+ $(HEADERSTD:%=ast_%)
+
+HEADERINSTALL= $(HEADERSRC) $(HEADERGEN) ast_common.h lc.h prototyped.h
+
+LOBJDIRS= \
+ aso cdt comp dir disc hash misc obsolete path port preroot \
+ regex sfio stdio string tm uwin vec vmalloc
+
+LIBOBJS= \
+ aso/aso-fcntl.o \
+ aso/aso-sem.o \
+ aso/aso.o \
+ aso/asolock.o \
+ aso/asometh.o \
+ aso/asorelax.o \
+ cdt/dtclose.o \
+ cdt/dtcomp.o \
+ cdt/dtdisc.o \
+ cdt/dthash.o \
+ cdt/dtlist.o \
+ cdt/dtmethod.o \
+ cdt/dtnew.o \
+ cdt/dtopen.o \
+ cdt/dtstrhash.o \
+ cdt/dttree.o \
+ cdt/dtview.o \
+ cdt/dtwalk.o \
+ comp/atexit.o \
+ comp/basename.o \
+ comp/catopen.o \
+ comp/closelog.o \
+ comp/creat64.o \
+ comp/dirname.o \
+ comp/dup2.o \
+ comp/eaccess.o \
+ comp/errno.o \
+ comp/execlp.o \
+ comp/execve.o \
+ comp/execvp.o \
+ comp/execvpe.o \
+ comp/fcntl.o \
+ comp/fmtmsglib.o \
+ comp/fnmatch.o \
+ comp/frexp.o \
+ comp/frexpl.o \
+ comp/fsync.o \
+ comp/ftw.o \
+ comp/getdate.o \
+ comp/getgroups.o \
+ comp/getlogin.o \
+ comp/getopt.o \
+ comp/getoptl.o \
+ comp/getpgrp.o \
+ comp/getsubopt.o \
+ comp/getwd.o \
+ comp/gross.o \
+ comp/hsearch.o \
+ comp/iconv.o \
+ comp/killpg.o \
+ comp/link.o \
+ comp/localeconv.o \
+ comp/lstat.o \
+ comp/memccpy.o \
+ comp/memchr.o \
+ comp/memcmp.o \
+ comp/memcpy.o \
+ comp/memmove.o \
+ comp/memset.o \
+ comp/mkdir.o \
+ comp/mkfifo.o \
+ comp/mknod.o \
+ comp/mktemp.o \
+ comp/mktime.o \
+ comp/mount.o \
+ comp/nftw.o \
+ comp/omitted.o \
+ comp/open.o \
+ comp/openlog.o \
+ comp/putenv.o \
+ comp/re_comp.o \
+ comp/readlink.o \
+ comp/realpath.o \
+ comp/regcmp.o \
+ comp/regexp.o \
+ comp/remove.o \
+ comp/rename.o \
+ comp/resolvepath.o \
+ comp/rmdir.o \
+ comp/setenv.o \
+ comp/setlocale.o \
+ comp/setlogmask.o \
+ comp/setpgid.o \
+ comp/setsid.o \
+ comp/sigunblock.o \
+ comp/sigflag.o \
+ comp/spawnveg.o \
+ comp/statvfs.o \
+ comp/strcasecmp.o \
+ comp/strchr.o \
+ comp/strftime.o \
+ comp/strncasecmp.o \
+ comp/strptime.o \
+ comp/strrchr.o \
+ comp/strstr.o \
+ comp/strtod.o \
+ comp/strtol.o \
+ comp/strtold.o \
+ comp/strtoll.o \
+ comp/strtoul.o \
+ comp/strtoull.o \
+ comp/swab.o \
+ comp/symlink.o \
+ comp/syslog.o \
+ comp/system.o \
+ comp/tempnam.o \
+ comp/tmpnam.o \
+ comp/transition.o \
+ comp/tsearch.o \
+ comp/unlink.o \
+ comp/unsetenv.o \
+ comp/vfork.o \
+ comp/waitpid.o \
+ comp/wc.o \
+ comp/wordexp.o \
+ dir/getdents.o \
+ dir/opendir.o \
+ dir/readdir.o \
+ dir/rewinddir.o \
+ dir/seekdir.o \
+ dir/telldir.o \
+ disc/memfatal.o \
+ disc/sfdcdio.o \
+ disc/sfdcdos.o \
+ disc/sfdcfilter.o \
+ disc/sfdcmore.o \
+ disc/sfdcprefix.o \
+ disc/sfdcseekable.o \
+ disc/sfdcslow.o \
+ disc/sfdcsubstr.o \
+ disc/sfdctee.o \
+ disc/sfdcunion.o \
+ disc/sfkeyprintf.o \
+ disc/sfstrtmp.o \
+ hash/hashalloc.o \
+ hash/hashdump.o \
+ hash/hashfree.o \
+ hash/hashlast.o \
+ hash/hashlook.o \
+ hash/hashscan.o \
+ hash/hashsize.o \
+ hash/hashview.o \
+ hash/hashwalk.o \
+ hash/memhash.o \
+ hash/memsum.o \
+ hash/strhash.o \
+ hash/strkey.o \
+ hash/strsum.o \
+ misc/astintercept.o \
+ misc/conformance.o \
+ misc/debug.o \
+ misc/cmdarg.o \
+ misc/error.o \
+ misc/errorf.o \
+ misc/errormsg.o \
+ misc/errorx.o \
+ misc/fastfind.o \
+ misc/fmtrec.o \
+ misc/fs3d.o \
+ misc/fts.o \
+ misc/ftwalk.o \
+ misc/ftwflags.o \
+ misc/getcwd.o \
+ misc/getenv.o \
+ misc/glob.o \
+ misc/magic.o \
+ misc/mime.o \
+ misc/mimetype.o \
+ misc/optesc.o \
+ misc/optget.o \
+ misc/optjoin.o \
+ misc/optctx.o \
+ misc/procclose.o \
+ misc/procfree.o \
+ misc/procopen.o \
+ misc/procrun.o \
+ misc/recfmt.o \
+ misc/reclen.o \
+ misc/recstr.o \
+ misc/setenviron.o \
+ misc/sigcrit.o \
+ misc/sigdata.o \
+ misc/signal.o \
+ misc/stack.o \
+ misc/state.o \
+ misc/stk.o \
+ misc/systrace.o \
+ misc/translate.o \
+ misc/univdata.o \
+ obsolete/spawn.o \
+ path/pathaccess.o \
+ path/pathbin.o \
+ path/pathcanon.o \
+ path/pathcat.o \
+ path/pathcd.o \
+ path/pathcheck.o \
+ path/pathexists.o \
+ path/pathfind.o \
+ path/pathgetlink.o \
+ path/pathkey.o \
+ path/pathnative.o \
+ path/pathpath.o \
+ path/pathposix.o \
+ path/pathprobe.o \
+ path/pathprog.o \
+ path/pathrepl.o \
+ path/pathsetlink.o \
+ path/pathshell.o \
+ path/pathstat.o \
+ path/pathtemp.o \
+ path/pathtmp.o \
+ port/astconf.o \
+ port/astcopy.o \
+ port/astdynamic.o \
+ port/astlicense.o \
+ port/astquery.o \
+ port/aststatic.o \
+ port/astwinsize.o \
+ port/iblocks.o \
+ port/lc.o \
+ port/mc.o \
+ port/mnt.o \
+ port/touch.o \
+ preroot/getpreroot.o \
+ preroot/ispreroot.o \
+ preroot/realopen.o \
+ preroot/setpreroot.o \
+ regex/regalloc.o \
+ regex/regcache.o \
+ regex/regclass.o \
+ regex/regcoll.o \
+ regex/regcomp.o \
+ regex/regdecomp.o \
+ regex/regerror.o \
+ regex/regexec.o \
+ regex/regfatal.o \
+ regex/reginit.o \
+ regex/regnexec.o \
+ regex/regrecord.o \
+ regex/regrexec.o \
+ regex/regstat.o \
+ regex/regsub.o \
+ regex/regsubcomp.o \
+ regex/regsubexec.o \
+ sfio/_sfclrerr.o \
+ sfio/_sfdlen.o \
+ sfio/_sfeof.o \
+ sfio/_sferror.o \
+ sfio/_sffileno.o \
+ sfio/_sfgetc.o \
+ sfio/_sfgetl.o \
+ sfio/_sfgetl2.o \
+ sfio/_sfgetu.o \
+ sfio/_sfgetu2.o \
+ sfio/_sfllen.o \
+ sfio/_sfopen.o \
+ sfio/_sfputc.o \
+ sfio/_sfputd.o \
+ sfio/_sfputl.o \
+ sfio/_sfputm.o \
+ sfio/_sfputu.o \
+ sfio/_sfslen.o \
+ sfio/_sfstacked.o \
+ sfio/_sfulen.o \
+ sfio/_sfvalue.o \
+ sfio/sfclose.o \
+ sfio/sfclrlock.o \
+ sfio/sfcvt.o \
+ sfio/sfdisc.o \
+ sfio/sfdlen.o \
+ sfio/sfecvt.o \
+ sfio/sfexcept.o \
+ sfio/sfextern.o \
+ sfio/sffcvt.o \
+ sfio/sffilbuf.o \
+ sfio/sfflsbuf.o \
+ sfio/sfgetd.o \
+ sfio/sfgetl.o \
+ sfio/sfgetm.o \
+ sfio/sfgetr.o \
+ sfio/sfgetu.o \
+ sfio/sfllen.o \
+ sfio/sfmode.o \
+ sfio/sfmove.o \
+ sfio/sfmutex.o \
+ sfio/sfnew.o \
+ sfio/sfnotify.o \
+ sfio/sfnputc.o \
+ sfio/sfopen.o \
+ sfio/sfpeek.o \
+ sfio/sfpkrd.o \
+ sfio/sfpoll.o \
+ sfio/sfpool.o \
+ sfio/sfpopen.o \
+ sfio/sfprintf.o \
+ sfio/sfprints.o \
+ sfio/sfpurge.o \
+ sfio/sfputd.o \
+ sfio/sfputl.o \
+ sfio/sfputm.o \
+ sfio/sfputr.o \
+ sfio/sfputu.o \
+ sfio/sfraise.o \
+ sfio/sfrd.o \
+ sfio/sfread.o \
+ sfio/sfreserve.o \
+ sfio/sfresize.o \
+ sfio/sfscanf.o \
+ sfio/sfseek.o \
+ sfio/sfset.o \
+ sfio/sfsetbuf.o \
+ sfio/sfsetfd.o \
+ sfio/sfsize.o \
+ sfio/sfsk.o \
+ sfio/sfstack.o \
+ sfio/sfstrtod.o \
+ sfio/sfswap.o \
+ sfio/sfsync.o \
+ sfio/sftable.o \
+ sfio/sftell.o \
+ sfio/sftmp.o \
+ sfio/sfungetc.o \
+ sfio/sfvprintf.o \
+ sfio/sfvscanf.o \
+ sfio/sfwalk.o \
+ sfio/sfwr.o \
+ sfio/sfwrite.o \
+ stdio/_doprnt.o \
+ stdio/_doscan.o \
+ stdio/_filbuf.o \
+ stdio/_flsbuf.o \
+ stdio/_stdfun.o \
+ stdio/_stdopen.o \
+ stdio/_stdprintf.o \
+ stdio/_stdscanf.o \
+ stdio/_stdsprnt.o \
+ stdio/_stdvbuf.o \
+ stdio/_stdvsnprnt.o \
+ stdio/_stdvsprnt.o \
+ stdio/_stdvsscn.o \
+ stdio/asprintf.o \
+ stdio/clearerr.o \
+ stdio/fclose.o \
+ stdio/fcloseall.o \
+ stdio/fdopen.o \
+ stdio/feof.o \
+ stdio/ferror.o \
+ stdio/fflush.o \
+ stdio/fgetc.o \
+ stdio/fgetpos.o \
+ stdio/fgets.o \
+ stdio/fgetwc.o \
+ stdio/fgetws.o \
+ stdio/fileno.o \
+ stdio/flockfile.o \
+ stdio/fmemopen.o \
+ stdio/fopen.o \
+ stdio/fprintf.o \
+ stdio/fpurge.o \
+ stdio/fputc.o \
+ stdio/fputs.o \
+ stdio/fputwc.o \
+ stdio/fputws.o \
+ stdio/funlockfile.o \
+ stdio/fread.o \
+ stdio/freopen.o \
+ stdio/fscanf.o \
+ stdio/fseek.o \
+ stdio/fseeko.o \
+ stdio/fsetpos.o \
+ stdio/ftell.o \
+ stdio/ftello.o \
+ stdio/ftrylockfile.o \
+ stdio/fwide.o \
+ stdio/fwprintf.o \
+ stdio/fwrite.o \
+ stdio/fwscanf.o \
+ stdio/getc.o \
+ stdio/getchar.o \
+ stdio/getdelim.o \
+ stdio/getline.o \
+ stdio/getw.o \
+ stdio/getwc.o \
+ stdio/getwchar.o \
+ stdio/pclose.o \
+ stdio/popen.o \
+ stdio/printf.o \
+ stdio/putc.o \
+ stdio/putchar.o \
+ stdio/puts.o \
+ stdio/putw.o \
+ stdio/putwc.o \
+ stdio/putwchar.o \
+ stdio/rewind.o \
+ stdio/scanf.o \
+ stdio/setbuf.o \
+ stdio/setbuffer.o \
+ stdio/setlinebuf.o \
+ stdio/setvbuf.o \
+ stdio/snprintf.o \
+ stdio/sprintf.o \
+ stdio/sscanf.o \
+ stdio/stdio_c99.o \
+ stdio/swprintf.o \
+ stdio/swscanf.o \
+ stdio/tmpfile.o \
+ stdio/ungetc.o \
+ stdio/ungetwc.o \
+ stdio/vasprintf.o \
+ stdio/vfprintf.o \
+ stdio/vfscanf.o \
+ stdio/vfwprintf.o \
+ stdio/vfwscanf.o \
+ stdio/vprintf.o \
+ stdio/vscanf.o \
+ stdio/vsnprintf.o \
+ stdio/vsprintf.o \
+ stdio/vsscanf.o \
+ stdio/vswprintf.o \
+ stdio/vswscanf.o \
+ stdio/vwprintf.o \
+ stdio/vwscanf.o \
+ stdio/wprintf.o \
+ stdio/wscanf.o \
+ string/base64.o \
+ string/ccmap.o \
+ string/ccmapid.o \
+ string/ccnative.o \
+ string/chresc.o \
+ string/chrtoi.o \
+ string/fmtbase.o \
+ string/fmtbuf.o \
+ string/fmtclock.o \
+ string/fmtdev.o \
+ string/fmtelapsed.o \
+ string/fmterror.o \
+ string/fmtesc.o \
+ string/fmtfmt.o \
+ string/fmtfs.o \
+ string/fmtgid.o \
+ string/fmtident.o \
+ string/fmtint.o \
+ string/fmtip4.o \
+ string/fmtip6.o \
+ string/fmtls.o \
+ string/fmtmatch.o \
+ string/fmtmode.o \
+ string/fmtnum.o \
+ string/fmtperm.o \
+ string/fmtre.o \
+ string/fmtscale.o \
+ string/fmtsignal.o \
+ string/fmttime.o \
+ string/fmttmx.o \
+ string/fmttv.o \
+ string/fmtuid.o \
+ string/fmtversion.o \
+ string/memdup.o \
+ string/modedata.o \
+ string/modei.o \
+ string/modex.o \
+ string/stracmp.o \
+ string/strcopy.o \
+ string/strdup.o \
+ string/strelapsed.o \
+ string/strerror.o \
+ string/stresc.o \
+ string/streval.o \
+ string/strexpr.o \
+ string/strgid.o \
+ string/strlcat.o \
+ string/strlcpy.o \
+ string/strlook.o \
+ string/strmatch.o \
+ string/strmode.o \
+ string/strnacmp.o \
+ string/strncopy.o \
+ string/strnpcmp.o \
+ string/strntod.o \
+ string/strntol.o \
+ string/strntold.o \
+ string/strntoll.o \
+ string/strnton.o \
+ string/strntoul.o \
+ string/strntonll.o \
+ string/strntoull.o \
+ string/strnvcmp.o \
+ string/stropt.o \
+ string/strpcmp.o \
+ string/strperm.o \
+ string/strpsearch.o \
+ string/strsearch.o \
+ string/strsort.o \
+ string/strtape.o \
+ string/strtoip4.o \
+ string/strtoip6.o \
+ string/strton.o \
+ string/strtonll.o \
+ string/struid.o \
+ string/struniq.o \
+ string/strvcmp.o \
+ string/swapget.o \
+ string/swapmem.o \
+ string/swapop.o \
+ string/swapput.o \
+ string/tok.o \
+ string/tokline.o \
+ string/tokscan.o \
+ string/wc2utf8.o \
+ tm/tmdata.o \
+ tm/tmdate.o \
+ tm/tmequiv.o \
+ tm/tmfix.o \
+ tm/tmfmt.o \
+ tm/tmform.o \
+ tm/tmgoff.o \
+ tm/tminit.o \
+ tm/tmleap.o \
+ tm/tmlex.o \
+ tm/tmlocale.o \
+ tm/tmmake.o \
+ tm/tmpoff.o \
+ tm/tmscan.o \
+ tm/tmsleep.o \
+ tm/tmtime.o \
+ tm/tmtype.o \
+ tm/tmweek.o \
+ tm/tmword.o \
+ tm/tmxdate.o \
+ tm/tmxduration.o \
+ tm/tmxfmt.o \
+ tm/tmxgettime.o \
+ tm/tmxleap.o \
+ tm/tmxmake.o \
+ tm/tmxscan.o \
+ tm/tmxsettime.o \
+ tm/tmxsleep.o \
+ tm/tmxtime.o \
+ tm/tmxtouch.o \
+ tm/tmzone.o \
+ tm/tvcmp.o \
+ tm/tvgettime.o \
+ tm/tvsettime.o \
+ tm/tvsleep.o \
+ tm/tvtouch.o \
+ uwin/a64l.o \
+ uwin/acosh.o \
+ uwin/asinh.o \
+ uwin/atanh.o \
+ uwin/cbrt.o \
+ uwin/crypt.o \
+ uwin/erf.o \
+ uwin/err.o \
+ uwin/exp.o \
+ uwin/exp__E.o \
+ uwin/expm1.o \
+ uwin/gamma.o \
+ uwin/getpass.o \
+ uwin/lgamma.o \
+ uwin/log.o \
+ uwin/log1p.o \
+ uwin/log__L.o \
+ uwin/rand48.o \
+ uwin/random.o \
+ uwin/rcmd.o \
+ uwin/rint.o \
+ uwin/support.o \
+ vec/vecargs.o \
+ vec/vecfile.o \
+ vec/vecfree.o \
+ vec/vecload.o \
+ vec/vecstring.o \
+ vmalloc/malloc.o \
+ vmalloc/vmbest.o \
+ vmalloc/vmclear.o \
+ vmalloc/vmclose.o \
+ vmalloc/vmdcheap.o \
+ vmalloc/vmdebug.o \
+ vmalloc/vmdisc.o \
+ vmalloc/vmexit.o \
+ vmalloc/vmgetmem.o \
+ vmalloc/vmlast.o \
+ vmalloc/vmmopen.o \
+ vmalloc/vmopen.o \
+ vmalloc/vmpool.o \
+ vmalloc/vmprivate.o \
+ vmalloc/vmprofile.o \
+ vmalloc/vmregion.o \
+ vmalloc/vmsegment.o \
+ vmalloc/vmset.o \
+ vmalloc/vmstat.o \
+ vmalloc/vmstrdup.o \
+ vmalloc/vmtrace.o \
+ vmalloc/vmwalk.o
diff --git a/usr/src/cmd/ast/libast/Makefile.iffe b/usr/src/cmd/ast/libast/Makefile.iffe
new file mode 100644
index 0000000000..e1a952188c
--- /dev/null
+++ b/usr/src/cmd/ast/libast/Makefile.iffe
@@ -0,0 +1,38 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.com
+include ../../Makefile.iffe
+
+GENCONF= conflim.h conftab.c conftab.h
+LCCONF= lc.h lctab.c
+
+$(GENCONF): FRC
+ PATH=$(AST_TOOLS):$$PATH \
+ $(SHELL) $(ASTSRC)/comp/conf.sh -v $(ASTSRC)/comp/conf.tab \
+ $(IFFEC)
+ $(POST_PROCESS_AST) conflim.h conftab.c conftab.h
+
+$(LCCONF): $(ASTSRC)/port/lc.tab
+ $(AST_LCGEN) $(LCCONF) < $(ASTSRC)/port/lc.tab
+ $(POST_PROCESS_AST) $(LCCONF)
+
+FEATURE/limits: $(GENCONF)
+FEATURE/float: ast/ast_common.h
+
+cleaniffe: FRC
+ $(RM) $(FEATURES:%=FEATURE/%) $(GENCONF) $(LCCONF)
+
+generate: cleaniffe $(FEATURES:%=FEATURE/%) $(LCCONF)
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/align b/usr/src/cmd/ast/libast/amd64/FEATURE/align
index 26afb86c76..228de042de 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/align
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/align
@@ -1,12 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/align.c by iffe version 2012-07-17 : : */
#ifndef _def_align_ast
#define _def_align_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
+#define ALIGN_INTEGRAL uintptr_t
+#define ALIGN_INTEGER(x) ((char*)(x)-(char*)0)
#define ALIGN_POINTER(x) ((char*)(x))
#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/api b/usr/src/cmd/ast/libast/amd64/FEATURE/api
new file mode 100644
index 0000000000..7be5ba335f
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/api
@@ -0,0 +1,89 @@
+/* : : generated from contrib/ast/src/lib/libast/features/api by iffe version 2012-07-17 : : */
+#ifndef _AST_API_H
+#define _AST_API_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _AST_VERSION AST_VERSION /* pre-20100601 compatibility */
+
+#define AST_VERSION 20111111
+#define ASTAPI(rel) ( _BLD_ast || !_API_ast || _API_ast >= rel )
+
+#if !defined(_API_ast) && defined(_API_DEFAULT)
+#define _API_ast _API_DEFAULT
+#endif
+
+#if ASTAPI(20120411)
+#undef cmdopen
+#define cmdopen cmdopen_20120411
+#elif _API_ast >= 20110505
+#undef cmdopen
+#define cmdopen cmdopen_20110505
+#endif
+
+#if ASTAPI(20100601)
+#undef pathaccess
+#define pathaccess pathaccess_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathcanon
+#define pathcanon pathcanon_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathcat
+#define pathcat pathcat_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathkey
+#define pathkey pathkey_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathpath
+#define pathpath pathpath_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathprobe
+#define pathprobe pathprobe_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathrepl
+#define pathrepl pathrepl_20100601
+#endif
+
+#if ASTAPI(20120528)
+#undef regexec
+#define regexec regexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regnexec
+#define regnexec regnexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regrexec
+#define regrexec regrexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regsubexec
+#define regsubexec regsubexec_20120528
+#endif
+
+#if ASTAPI(20000308)
+#undef sfkeyprintf
+#define sfkeyprintf sfkeyprintf_20000308
+#endif
+
+#if ASTAPI(20120528)
+#undef strgrpmatch
+#define strgrpmatch strgrpmatch_20120528
+#endif
+
+#define _API_ast_MAP "cmdopen_20120411 cmdopen_20110505 pathaccess_20100601 pathcanon_20100601 pathcat_20100601 pathkey_20100601 pathpath_20100601 pathprobe_20100601 pathrepl_20100601 regexec_20120528 regnexec_20120528 regrexec_20120528 regsubexec_20120528 sfkeyprintf_20000308 strgrpmatch_20120528"
+
+#endif
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/aso b/usr/src/cmd/ast/libast/amd64/FEATURE/aso
new file mode 100644
index 0000000000..8baa447c72
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/aso
@@ -0,0 +1,24 @@
+/* : : generated from contrib/ast/src/lib/libast/features/aso by iffe version 2012-07-17 : : */
+#ifndef _def_aso_ast
+#define _def_aso_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* gcc 4.1+ 64 bit memory atomic operations model */
+#define _aso_cas8(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc8(p) __sync_fetch_and_add(p,1)
+#define _aso_dec8(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas16(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc16(p) __sync_fetch_and_add(p,1)
+#define _aso_dec16(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas32(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc32(p) __sync_fetch_and_add(p,1)
+#define _aso_dec32(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas64(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc64(p) __sync_fetch_and_add(p,1)
+#define _aso_dec64(p) __sync_fetch_and_sub(p,1)
+#if _ast_sizeof_pointer == 8
+#define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint64_t)o,(uint64_t)n))
+#else
+#define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint32_t)o,(uint32_t)n))
+#endif
+
+#endif
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/asometh b/usr/src/cmd/ast/libast/amd64/FEATURE/asometh
new file mode 100644
index 0000000000..c69b510fca
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/asometh
@@ -0,0 +1,7 @@
+/* : : generated from contrib/ast/src/lib/libast/features/asometh by iffe version 2012-07-17 : : */
+#ifndef _def_asometh_ast
+#define _def_asometh_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _aso_fcntl 1 /* fcntl(F_SETLCK[W]) work */
+#define _aso_semaphore 1 /* semget semop semctl work */
+#endif
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/botch b/usr/src/cmd/ast/libast/amd64/FEATURE/botch
new file mode 100644
index 0000000000..5938177616
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/botch
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/botch.c by iffe version 2012-07-17 : : */
+#ifndef _def_botch_ast
+#define _def_botch_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/ccode b/usr/src/cmd/ast/libast/amd64/FEATURE/ccode
index 1b67f360b9..30603c443a 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/ccode
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/ccode
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/ccode by iffe version 2012-07-17 : : */
#ifndef _def_ccode_ast
#define _def_ccode_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/common b/usr/src/cmd/ast/libast/amd64/FEATURE/common
index 5b62b7e272..8dddf7dc17 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/common
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/common
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/common by iffe version 2012-07-17 : : */
#ifndef _AST_COMMON_H
#define _AST_COMMON_H 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -15,6 +15,8 @@
#define _typ_long_double 1 /* long double is a type */
#define _typ_size_t 1 /* size_t is a type */
#define _typ_ssize_t 1 /* ssize_t is a type */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _typ___va_list 1 /* __va_list is a type */
#define _sys_stat 1 /* #include <sys/stat.h> ok */
#define _sys_socket 1 /* #include <sys/socket.h> ok */
#define _std_proto 1 /* standard C prototypes ok */
@@ -64,7 +66,7 @@
# define _NIL_(x) ((x)0)
#endif
-/* __INLINE__ is the inline keyword */
+/* __INLINE__, if defined, is the inline keyword */
#if !defined(__INLINE__) && defined(__cplusplus)
# define __INLINE__ inline
#endif
@@ -140,6 +142,15 @@
#define _ast_intmax_long 1
#define _ast_intswap 7
+#define _ast_sizeof_short 2 /* sizeof(short) */
+#define _ast_sizeof_int 4 /* sizeof(int) */
+#define _ast_sizeof_long 8 /* sizeof(long) */
+#define _ast_sizeof_size_t 8 /* sizeof(size_t) */
+#define _ast_sizeof_pointer 8 /* sizeof(pointer) */
+#define _ast_sizeof_float 4 /* sizeof(float) */
+#define _ast_sizeof_double 8 /* sizeof(double) */
+#define _ast_sizeof_long_double 16 /* sizeof(long_double) */
+
#define _ast_flt4_t float
#define _ast_flt8_t double
#define _ast_flt16_t long double
@@ -154,6 +165,7 @@
#define _typ_uint64_t 1 /* uint64_t is a type */
#define _typ_intmax_t 1 /* intmax_t is a type */
#define _typ_uintmax_t 1 /* uintmax_t is a type */
+#define _typ_uintptr_t 1 /* uintptr_t is a type */
#ifndef va_listref
#ifndef va_start
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/dirent b/usr/src/cmd/ast/libast/amd64/FEATURE/dirent
index f814e1efb0..5e7e6cc7fc 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/dirent
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/dirent
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/dirent by iffe version 2012-07-17 : : */
+
#ifndef _def_dirent_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/eaccess b/usr/src/cmd/ast/libast/amd64/FEATURE/eaccess
new file mode 100644
index 0000000000..27de29021e
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/eaccess
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/eaccess by iffe version 2012-07-17 : : */
+#ifndef _def_eaccess_ast
+#define _def_eaccess_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/errno b/usr/src/cmd/ast/libast/amd64/FEATURE/errno
index 6c7f795320..1107a008c7 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/errno
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/errno
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/errno by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/errno by iffe version 2012-07-17 : : */
#ifndef _def_errno_ast
#define _def_errno_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fcntl b/usr/src/cmd/ast/libast/amd64/FEATURE/fcntl
index ed6d4d0237..9c2328f31b 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fcntl
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/fcntl
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/fcntl.c by iffe version 2012-07-17 : : */
#ifndef _def_fcntl_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_fcntl_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
#if _typ_off64_t
#undef off_t
@@ -83,7 +83,9 @@
#include <fcntl.h>
#include <sys/mman.h>
+#define F_dupfd_cloexec F_DUPFD_CLOEXEC
#define O_BINARY 0
+#define O_cloexec O_CLOEXEC
#define O_TEMPORARY 0
#define O_TEXT 0
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/float b/usr/src/cmd/ast/libast/amd64/FEATURE/float
index fcf9f4aa09..d4a7e3d4bc 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/float
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/float
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/float by iffe version 2012-07-17 : : */
+
#ifndef _def_float_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -68,83 +68,86 @@
#define _hdr_math 1 /* #include <math.h> ok */
#define _hdr_values 1 /* #include <values.h> ok */
#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
#define _lib_frexp 1 /* frexp() in default lib(s) */
#define _lib_frexpl 1 /* frexpl() in default lib(s) */
#define _lib_ldexp 1 /* ldexp() in default lib(s) */
#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
#define _lib_copysign 1 /* copysign() in default lib(s) */
#define _lib_copysignl 1 /* copysignl() in default lib(s) */
+#define _npt_finite 1 /* finite() needs a prototype */
+#define _npt_finitel 1 /* finitel() needs a prototype */
+#define _npt_isinfl 1 /* isinfl() needs a prototype */
+#define _lib_fpclassify 1 /* fpclassify present and works */
+#define _lib_isinf 1 /* isinf present and works */
+#define _lib_isnan 1 /* isnan present and works */
+#define _lib_signbit 1 /* signbit present and works */
#include <ast_common.h>
#include <float.h>
#include <math.h>
#ifndef FLT_DIG
-#define FLT_DIG 6
+#define FLT_DIG 6
#endif
#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
+#define FLT_MAX 3.4028234663852885981170E+38F
#endif
#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
+#define FLT_MAX_10_EXP (+38)
#endif
#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
+#define FLT_MAX_EXP (+128)
#endif
#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
+#define FLT_MIN 1.1754943508222875079688E-38F
#endif
#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
+#define FLT_MIN_10_EXP (-37)
#endif
#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
+#define FLT_MIN_EXP (-125)
#endif
#ifndef DBL_DIG
-#define DBL_DIG 15
+#define DBL_DIG 15
#endif
#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
+#define DBL_MAX 1.7976931348623157081452E+308
#endif
#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
+#define DBL_MAX_10_EXP (+308)
#endif
#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
+#define DBL_MAX_EXP (+1024)
#endif
#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
+#define DBL_MIN 2.2250738585072013830903E-308
#endif
#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
+#define DBL_MIN_10_EXP (-307)
#endif
#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
+#define DBL_MIN_EXP (-1021)
#endif
#ifndef LDBL_DIG
-#define LDBL_DIG 18
+#define LDBL_DIG 18
#endif
#ifndef LDBL_MAX
-#define LDBL_MAX 1.1897314953572317650213E+4932L
+#define LDBL_MAX 1.1897314953572317650213E+4932L
#endif
#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
+#define LDBL_MAX_10_EXP (+4932)
#endif
#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
+#define LDBL_MAX_EXP (+16384)
#endif
#ifndef LDBL_MIN
-#define LDBL_MIN 3.3621031431120935062627E-4932L
+#define LDBL_MIN 3.3621031431120935062627E-4932L
#endif
#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
+#define LDBL_MIN_10_EXP (-4931)
#endif
#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
+#define LDBL_MIN_EXP (-16381)
#endif
@@ -196,20 +199,11 @@ typedef union _ast_dbl_exp_u
#define _ast_dbl_exp_index 1
#define _ast_dbl_exp_shift 20
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 2
-#define _ast_fltmax_exp_shift 0
-
#define _ast_flt_unsigned_max_t unsigned long long
#define _ast_flt_nan_init 0xff,0xff,0xff,0x7f
#define _ast_flt_inf_init 0x00,0x00,0x80,0x7f
#define _ast_dbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f
#define _ast_dbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f
-#define _ast_ldbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x40,0x00,0x00,0x00,0x00,0x00
-#define _ast_ldbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x40,0x00,0x00,0x00,0x00,0x00
+#define _ast_ldbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00
+#define _ast_ldbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fs b/usr/src/cmd/ast/libast/amd64/FEATURE/fs
index e8372a1398..e013cccbf6 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fs
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/fs
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/fs by iffe version 2012-07-17 : : */
+
#ifndef _def_fs_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -76,6 +76,8 @@ __STDPP__directive pragma pp:noinitial
#define _hdr_stdio 1 /* #include <stdio.h> ok */
#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
+#define _sys_param 1 /* #include <sys/param.h> ok */
+#define _sys_ucred 1 /* #include <sys/ucred.h> ok */
#define _sys_mount 1 /* #include <sys/mount.h> ok */
#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
@@ -84,7 +86,6 @@ __STDPP__directive pragma pp:noinitial
#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
#define _lib_getmntent 1 /* getmntent() in default lib(s) */
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/hack b/usr/src/cmd/ast/libast/amd64/FEATURE/hack
new file mode 100644
index 0000000000..fbbaf3a275
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/hack
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/hack by iffe version 2012-07-17 : : */
+#ifndef _def_hack_ast
+#define _def_hack_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/iconv b/usr/src/cmd/ast/libast/amd64/FEATURE/iconv
index d1d76b26c2..f81d5fc8fa 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/iconv
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/iconv
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/iconv by iffe version 2012-07-17 : : */
+
#ifndef _def_iconv_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -73,11 +73,16 @@
#include <ccode.h>
#include <../include/iconv.h> /* the native iconv.h */
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
+#define ICONV_VERSION 20110111L
+
+#define ICONV_FATAL 0x02
+#define ICONV_OMIT 0x04
+
+#define CC_ICONV (-1)
+#define CC_UCS (-2)
+#define CC_SCU (-3)
+#define CC_UTF (-4)
+#define CC_UME (-5)
#ifndef _ICONV_LIST_PRIVATE_
#undef iconv_t
@@ -102,10 +107,23 @@
#define iconv_write _ast_iconv_write
#endif
+typedef int (*Iconv_error_f) __PROTO__((__V_*, __V_*, int, ...));
+
+typedef struct Iconv_disc_s
+{
+ uint32_t version;
+ Iconv_error_f errorf;
+ size_t errors;
+ uint32_t flags;
+ int fill;
+} Iconv_disc_t;
+
typedef Ccmap_t _ast_iconv_list_t;
typedef __V_* _ast_iconv_t;
typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
+#define iconv_init(d,e) (memset(d,0,sizeof(*(d))),(d)->version=ICONV_VERSION,(d)->errorf=(Iconv_error_f)(e),(d)->fill=(-1))
+
#if _BLD_ast && defined(__EXPORT__)
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__ __EXPORT__
@@ -117,12 +135,12 @@ extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
+extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, Iconv_disc_t*));
+extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, Iconv_disc_t*));
#else
#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
+extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, Iconv_disc_t*));
+extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*));
#endif
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/lib b/usr/src/cmd/ast/libast/amd64/FEATURE/lib
index b0a14c5fc8..cab2bfea82 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/lib
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/lib
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/lib by iffe version 2012-07-17 : : */
#ifndef _def_lib_ast
#define _def_lib_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -12,8 +12,9 @@
#define _hdr_spawn 1 /* #include <spawn.h> ok */
#define _hdr_syslog 1 /* #include <syslog.h> ok */
#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
+#define _hdr_wchar 1 /* #include <wchar.h> ok */
+#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _dat__tzname 1 /* _tzname in default lib(s) */
#define _dat_tzname 1 /* tzname in default lib(s) */
#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
@@ -120,6 +121,7 @@
#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
#define _mem_DIR 1 /* DIR is a non-opaque struct */
+#define _mem_dd_fd_DIR 1 /* dd_fd is a member of DIR */
#define _sys_filio 1 /* #include <sys/filio.h> ok */
#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
@@ -131,19 +133,22 @@
#define _sys_time 1 /* #include <sys/time.h> ok */
#define _sys_times 1 /* #include <sys/times.h> ok */
#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _typ_ino64_t 1 /* ino64_t is a type */
#define _typ_off64_t 1 /* off64_t is a type */
#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
#define _tst_errno 1 /* errno can be assigned */
#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
+#define _sys_select 1 /* #include <sys/select.h> ok */
#define _lib_select 1 /* select() has standard 5 arg interface */
+#define _sys_select 1 /* select() requires <sys/select.h> */
#define _pipe_rw 1 /* full duplex pipes */
#define _hdr_unistd 1 /* #include <unistd.h> ok */
#define _lib_vfork 1 /* vfork exists and it works */
#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
+#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
+#define _stream_peek 1 /* ioctl(I_PEEK) works on pipe() */
+#define _socket_peek 1 /* recv(MSG_PEEK) works on socketpair() */
#define _hdr_string 1 /* #include <string.h> ok */
#define _lib_memcmp 1 /* standard memcmp interface that works */
#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/libpath b/usr/src/cmd/ast/libast/amd64/FEATURE/libpath
index d9730df658..d272a4015d 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/libpath
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/libpath
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/libpath.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/libpath.sh by iffe version 2012-07-17 : : */
#ifndef _def_libpath_ast
#define _def_libpath_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/limits b/usr/src/cmd/ast/libast/amd64/FEATURE/limits
index 933d0a00a6..efe390eee9 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/limits
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/limits
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/limits.c by iffe version 2012-07-17 : : */
#ifndef _def_limits_ast
#define _def_limits_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/locale b/usr/src/cmd/ast/libast/amd64/FEATURE/locale
new file mode 100644
index 0000000000..1013f583b5
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/locale
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libast/features/locale by iffe version 2012-07-17 : : */
+#ifndef _def_locale_ast
+#define _def_locale_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _locale_utf8_str "UTF-8"
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/map b/usr/src/cmd/ast/libast/amd64/FEATURE/map
index 8653690789..30c7f4e2b5 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/map
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/map
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/map.c by iffe version 2012-07-17 : : */
#ifndef _def_map_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_map_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
/*
* prototypes provided for standard interfaces hijacked
@@ -445,6 +445,22 @@ extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
+#define cmdopen_20120411 _ast_cmdopen_20120411
+#define cmdopen_20110505 _ast_cmdopen_20110505
+#define pathaccess_20100601 _ast_pathaccess_20100601
+#define pathcanon_20100601 _ast_pathcanon_20100601
+#define pathcat_20100601 _ast_pathcat_20100601
+#define pathkey_20100601 _ast_pathkey_20100601
+#define pathpath_20100601 _ast_pathpath_20100601
+#define pathprobe_20100601 _ast_pathprobe_20100601
+#define pathrepl_20100601 _ast_pathrepl_20100601
+#define regexec_20120528 _ast_regexec_20120528
+#define regnexec_20120528 _ast_regnexec_20120528
+#define regrexec_20120528 _ast_regrexec_20120528
+#define regsubexec_20120528 _ast_regsubexec_20120528
+#define sfkeyprintf_20000308 _ast_sfkeyprintf_20000308
+#define strgrpmatch_20120528 _ast_strgrpmatch_20120528
+
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mmap b/usr/src/cmd/ast/libast/amd64/FEATURE/mmap
index aea2a35cbb..12d991f9a6 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mmap
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/mmap
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/mmap by iffe version 2012-07-17 : : */
#ifndef _def_mmap_ast
#define _def_mmap_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -7,7 +7,6 @@
#define _lib_mmap64 1 /* mmap64 interface and implementation work */
#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
/* some systems get it wrong but escape concise detection */
#ifndef _NO_MMAP
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mode b/usr/src/cmd/ast/libast/amd64/FEATURE/mode
index 83e70f608e..f2ec3091fa 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mode
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/mode
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/mode.c by iffe version 2012-07-17 : : */
#ifndef _def_mode_ast
#define _def_mode_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/ndbm b/usr/src/cmd/ast/libast/amd64/FEATURE/ndbm
index 656547d2d4..0e55ff820d 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/ndbm
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/ndbm
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/ndbm by iffe version 2012-07-17 : : */
#ifndef _def_ndbm_ast
#define _def_ndbm_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/nl_types b/usr/src/cmd/ast/libast/amd64/FEATURE/nl_types
index 9c39d0de67..d8c540626e 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/nl_types
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/nl_types
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/nl_types by iffe version 2012-07-17 : : */
+
#ifndef _def_nl_types_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/omitted b/usr/src/cmd/ast/libast/amd64/FEATURE/omitted
new file mode 100644
index 0000000000..201e737ea1
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/omitted
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/omitted by iffe version 2012-07-17 : : */
+#ifndef _def_omitted_ast
+#define _def_omitted_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/options b/usr/src/cmd/ast/libast/amd64/FEATURE/options
new file mode 100644
index 0000000000..6154a341b5
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/options
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/options by iffe version 2012-07-17 : : */
+#ifndef _def_options_ast
+#define _def_options_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/param b/usr/src/cmd/ast/libast/amd64/FEATURE/param
index 9d45e3e464..8c200b4462 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/param
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/param
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/param.sh by iffe version 2012-07-17 : : */
#ifndef _def_param_ast
#define _def_param_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/preroot b/usr/src/cmd/ast/libast/amd64/FEATURE/preroot
new file mode 100644
index 0000000000..36626fb242
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/preroot
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libast/features/preroot.sh by iffe version 2012-07-17 : : */
+#ifndef _def_preroot_ast
+#define _def_preroot_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* preroot not enabled */
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/prog b/usr/src/cmd/ast/libast/amd64/FEATURE/prog
index f2a63509b2..592037efb7 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/prog
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/prog
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/prog by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/prog by iffe version 2012-07-17 : : */
#ifndef _def_prog_ast
#define _def_prog_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sfinit b/usr/src/cmd/ast/libast/amd64/FEATURE/sfinit
index 08c21a8791..756d559262 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sfinit
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sfinit
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/sfinit.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sfinit.c by iffe version 2012-07-17 : : */
#ifndef _def_sfinit_ast
#define _def_sfinit_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sfio b/usr/src/cmd/ast/libast/amd64/FEATURE/sfio
index 68427158e0..7cad3472b6 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sfio
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sfio
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/sfio by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sfio by iffe version 2012-07-17 : : */
#ifndef _def_sfio_ast
#define _def_sfio_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -9,6 +9,7 @@
#define _sys_filio 1 /* #include <sys/filio.h> ok */
#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
#define _key_signed 1 /* signed is a reserved keyword */
+#define _ptr_bits 64
#define _more_void_int 1 /* voidptr is larger than int */
#define _more_long_int 1 /* long is larger than int */
#define _lib_cvt 1 /* native floating point conversions ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/sig b/usr/src/cmd/ast/libast/amd64/FEATURE/sig
index 9504537d08..03020573f3 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/sig
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sig
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sig.sh by iffe version 2012-07-17 : : */
#ifndef _def_sig_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_sig_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
#define sig_info _sig_info_
#if defined(__STDPP__directive) && defined(__STDPP__hide)
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/siglist b/usr/src/cmd/ast/libast/amd64/FEATURE/siglist
index 271e57ef64..7ac817cdd9 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/siglist
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/siglist
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/siglist by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/siglist by iffe version 2012-07-17 : : */
#ifndef _def_siglist_ast
#define _def_siglist_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -125,4 +125,7 @@
#if defined(SIGJVM2) && !defined(HAD_SIGJVM2)
0,"JVM2",SIGJVM2,
#endif
+#if defined(SIGINFO) && !defined(HAD_SIGINFO)
+0,"INFO",SIGINFO,
+#endif
#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/signal b/usr/src/cmd/ast/libast/amd64/FEATURE/signal
index 613664d33b..43b48f1dda 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/signal
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/signal
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/signal.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/signal.c by iffe version 2012-07-17 : : */
#ifndef _def_signal_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,8 +62,8 @@
#define _def_signal_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define SIG_MAX 48
+
+#define SIG_MAX 73
static const char* const sig_name[] =
{
@@ -108,10 +108,35 @@ static const char* const sig_name[] =
"XRES",
"JVM1",
"JVM2",
+ "INFO",
"RTMIN",
"RTMIN+1",
"RTMIN+2",
"RTMIN+3",
+ "RTMIN+4",
+ "RTMIN+5",
+ "RTMIN+6",
+ "RTMIN+7",
+ "RTMIN+8",
+ "RTMIN+9",
+ "RTMIN+10",
+ "RTMIN+11",
+ "RTMIN+12",
+ "RTMIN+13",
+ "RTMIN+14",
+ "RTMIN+15",
+ "RTMAX-15",
+ "RTMAX-14",
+ "RTMAX-13",
+ "RTMAX-12",
+ "RTMAX-11",
+ "RTMAX-10",
+ "RTMAX-9",
+ "RTMAX-8",
+ "RTMAX-7",
+ "RTMAX-6",
+ "RTMAX-5",
+ "RTMAX-4",
"RTMAX-3",
"RTMAX-2",
"RTMAX-1",
@@ -162,6 +187,7 @@ static const char* const sig_text[] =
"Resource Control Exceeded",
"Reserved for JVM 1",
"Reserved for JVM 2",
+ "Information Request",
"Realtime priority 0 (lo)",
"Realtime priority 1",
"Realtime priority 2",
@@ -169,7 +195,31 @@ static const char* const sig_text[] =
"Realtime priority 4",
"Realtime priority 5",
"Realtime priority 6",
- "Realtime priority 7 (hi)",
+ "Realtime priority 7",
+ "Realtime priority 8",
+ "Realtime priority 9",
+ "Realtime priority 10",
+ "Realtime priority 11",
+ "Realtime priority 12",
+ "Realtime priority 13",
+ "Realtime priority 14",
+ "Realtime priority 15",
+ "Realtime priority 16",
+ "Realtime priority 17",
+ "Realtime priority 18",
+ "Realtime priority 19",
+ "Realtime priority 20",
+ "Realtime priority 21",
+ "Realtime priority 22",
+ "Realtime priority 23",
+ "Realtime priority 24",
+ "Realtime priority 25",
+ "Realtime priority 26",
+ "Realtime priority 27",
+ "Realtime priority 28",
+ "Realtime priority 29",
+ "Realtime priority 30",
+ "Realtime priority 31 (hi)",
0
};
#endif
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/sizeof b/usr/src/cmd/ast/libast/amd64/FEATURE/sizeof
new file mode 100644
index 0000000000..570d651f87
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sizeof
@@ -0,0 +1,10 @@
+/* : : generated from contrib/ast/src/lib/libast/features/sizeof by iffe version 2012-07-17 : : */
+#ifndef _def_sizeof_ast
+#define _def_sizeof_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _ast_sizeof_char 1
+#define _ast_sizeof_short 2
+#define _ast_sizeof_int 4
+#define _ast_sizeof_long 8
+#define _ast_sizeof_intmax_t 8
+#endif
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/standards b/usr/src/cmd/ast/libast/amd64/FEATURE/standards
new file mode 100644
index 0000000000..059f99e5bd
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/standards
@@ -0,0 +1,45 @@
+/* : : generated from contrib/ast/src/lib/libast/features/standards by iffe version 2012-07-17 : : */
+#ifndef _def_standards_ast
+#define _def_standards_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* _ALL_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works */
+#ifndef _ALL_SOURCE
+#define _ALL_SOURCE 1
+#endif
+#ifndef _POSIX_SOURCE
+#define _POSIX_SOURCE 1
+#endif
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 21000101L
+#endif
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 9900
+#endif
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__ 1
+#endif
+
+#define _LIB_m 1 /* -lm is a library */
+/* _ISOC99_SOURCE plays nice */
+#ifndef _ISOC99_SOURCE
+#define _ISOC99_SOURCE 1
+#endif
+
+
+/*
+* this is a nasty game we all play to honor standards symbol visibility
+* it would help if all implementations had
+* _KITCHEN_SINK_SOURCE
+* that enabled all symbols from the latest implemented standards
+* that's probably the most useful but least portable request
+*/
+
+#if __MACH__
+#undef _POSIX_SOURCE
+#endif
+
+
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/stdio b/usr/src/cmd/ast/libast/amd64/FEATURE/stdio
index 727b7add5f..0694a40264 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/stdio
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/stdio
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/stdio by iffe version 2012-07-17 : : */
+
#ifndef _SFSTDIO_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -356,13 +356,13 @@ extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
__STDPP__directive pragma pp:initial
#endif
#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
+#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
#endif
#ifndef L_ctermid
-#define L_ctermid 9
+#define L_ctermid 9
#endif
#ifndef L_tmpnam
-#define L_tmpnam 25
+#define L_tmpnam 25
#endif
#if defined(__STDPP__directive) && defined(__STDPP__initial)
__STDPP__directive pragma pp:noinitial
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sys b/usr/src/cmd/ast/libast/amd64/FEATURE/sys
index 9f2a84fb13..c02852888c 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sys
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/sys
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/sys by iffe version 2012-07-17 : : */
+
#ifndef _AST_SYS_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -73,9 +73,14 @@
#if !defined(_LARGEFILE_SOURCE)
#define _LARGEFILE_SOURCE 1
#endif
+#if !defined(_LARGE_FILE_API)
+#define _LARGE_FILE_API 1
+#endif
#else
#undef _LARGEFILE64_SOURCE
#undef _LARGEFILE_SOURCE
+#undef _LARGE_FILE_API
+#undef _typ_ino64_t
#undef _typ_off64_t
#undef _typ_struct_dirent64
#undef _lib_creat64
@@ -91,6 +96,9 @@
#undef _lib_statvfs64
#undef _lib_truncate64
#endif
+#if !_lib_readdir64
+#undef _typ_ino64_t
+#endif
#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
#endif
@@ -133,6 +141,7 @@
#define __MANGLE__ __LINKAGE__ __EXPORT__
#endif
extern __MANGLE__ void cfree __PROTO__((__V_*));
+extern __MANGLE__ size_t confstr __PROTO__((int, char*, size_t));
extern __MANGLE__ int eaccess __PROTO__((const char*, int));
extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/syscall b/usr/src/cmd/ast/libast/amd64/FEATURE/syscall
new file mode 100644
index 0000000000..0768fbae58
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/syscall
@@ -0,0 +1,10 @@
+/* : : generated from contrib/ast/src/lib/libast/features/syscall by iffe version 2012-07-17 : : */
+#ifndef _def_syscall_ast
+#define _def_syscall_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_sysgetcwd 1 /* syscall(SYS_getcwd,buf,len) implemented */
+#include <sys/syscall.h>
+
+#define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b)
+
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/time b/usr/src/cmd/ast/libast/amd64/FEATURE/time
index 46eef2afce..fba3ba062b 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/time
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/time
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/time by iffe version 2012-07-17 : : */
+
#ifndef _def_time_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmlib b/usr/src/cmd/ast/libast/amd64/FEATURE/tmlib
index c7672ac288..6162b62ea8 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmlib
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tmlib
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tmlib by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tmlib by iffe version 2012-07-17 : : */
+
#ifndef _def_tmlib_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmx b/usr/src/cmd/ast/libast/amd64/FEATURE/tmx
index 55bc45db88..6ad4804a4b 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tmx
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tmx
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tmx by iffe version 2012-07-17 : : */
+
#ifndef _TMX_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tty b/usr/src/cmd/ast/libast/amd64/FEATURE/tty
index 88985d2ab6..1d39c122ed 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tty
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tty
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/tty by iffe version 2012-07-17 : : */
#ifndef _def_tty_ast
#define _def_tty_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tv b/usr/src/cmd/ast/libast/amd64/FEATURE/tv
index d51d0f4b18..0caab4a20a 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tv
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tv
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tv by iffe version 2012-07-17 : : */
+
#ifndef _TV_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tvlib b/usr/src/cmd/ast/libast/amd64/FEATURE/tvlib
index e92d465929..3121038298 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tvlib
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/tvlib
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tvlib by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/tvlib by iffe version 2012-07-17 : : */
#ifndef _def_tvlib_ast
#define _def_tvlib_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/uwin b/usr/src/cmd/ast/libast/amd64/FEATURE/uwin
new file mode 100644
index 0000000000..66dcc8c3cb
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/uwin
@@ -0,0 +1,37 @@
+/* : : generated from contrib/ast/src/lib/libast/features/uwin by iffe version 2012-07-17 : : */
+#ifndef _def_uwin_ast
+#define _def_uwin_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_a64l 1 /* a64l() in default lib(s) */
+#define _lib_acosh 1 /* acosh() in default lib(s) */
+#define _lib_asinh 1 /* asinh() in default lib(s) */
+#define _lib_atanh 1 /* atanh() in default lib(s) */
+#define _lib_cbrt 1 /* cbrt() in default lib(s) */
+#define _lib_ceil 1 /* ceil() in default lib(s) */
+#define _lib_crypt 1 /* crypt() in default lib(s) */
+#define _lib_erf 1 /* erf() in default lib(s) */
+#define _lib_exp 1 /* exp() in default lib(s) */
+#define _lib_expm1 1 /* expm1() in default lib(s) */
+#define _lib_floor 1 /* floor() in default lib(s) */
+#define _lib_gamma 1 /* gamma() in default lib(s) */
+#define _lib_getpass 1 /* getpass() in default lib(s) */
+#define _lib_lgamma 1 /* lgamma() in default lib(s) */
+#define _lib_log 1 /* log() in default lib(s) */
+#define _lib_log1p 1 /* log1p() in default lib(s) */
+#define _lib_random 1 /* random() in default lib(s) */
+#define _lib_rcmd 1 /* rcmd() in default lib(s) */
+#define _lib_rint 1 /* rint() in default lib(s) */
+#define _lib_srand48 1 /* srand48() in default lib(s) */
+#define _lib_copysign 1 /* copysign() in default lib(s) */
+#define _lib_logb 1 /* logb() in default lib(s) */
+#define _lib_finite 1 /* finite() in default lib(s) */
+#define _lib_sqrt 1 /* sqrt() in default lib(s) */
+#define _lib_ilogb 1 /* ilogb() in default lib(s) */
+#define _lib_remainder 1 /* remainder() in default lib(s) */
+#define _lib_scalb 1 /* scalb() in default lib(s) */
+#define _lib__finite 1 /* _finite() in default lib(s) */
+#define _lib__scalb 1 /* _scalb() in default lib(s) */
+#define _dat__iob 1 /* _iob in default lib(s) */
+#define stricmp strcasecmp
+
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/vfork b/usr/src/cmd/ast/libast/amd64/FEATURE/vfork
index aa9cea31e5..b555d25c80 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/vfork
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/vfork
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/vfork by iffe version 2012-07-17 : : */
+
#ifndef _def_vfork_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,6 +63,6 @@
#define _def_vfork_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
+extern __MANGLE__ pid_t vfork(void) __attribute__((__returns_twice__));
+#pragma unknown_control_flow(vfork)
#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/vmalloc b/usr/src/cmd/ast/libast/amd64/FEATURE/vmalloc
index c233a981dd..0be84333de 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/vmalloc
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/vmalloc
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/vmalloc by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/vmalloc by iffe version 2012-07-17 : : */
#ifndef _def_vmalloc_ast
#define _def_vmalloc_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/wait b/usr/src/cmd/ast/libast/amd64/FEATURE/wait
index 6cd28b8bbf..36ae8feef1 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/wait
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/wait
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/wait by iffe version 2012-07-17 : : */
#ifndef _def_wait_ast
#define _def_wait_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wchar b/usr/src/cmd/ast/libast/amd64/FEATURE/wchar
index 17177484e4..2616f8f168 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wchar
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/wchar
@@ -1,8 +1,8 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
+/* : : generated from contrib/ast/src/lib/libast/features/wchar by iffe version 2012-07-17 : : */
+
+
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
# if defined(__cplusplus)
@@ -60,9 +60,10 @@
#if !defined(__LINKAGE__)
#define __LINKAGE__ /* 2004-08-11 transition */
#endif
-
-#define _def_wchar_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
+#ifndef _AST_WCHAR_H
+#define _AST_WCHAR_H 1
+
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
#define _hdr_stdio 1 /* #include <stdio.h> ok */
#define _hdr_wchar 1 /* #include <wchar.h> ok */
@@ -85,12 +86,13 @@
#include <ast_common.h>
#include <stdio.h>
#endif
+
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#include <wctype.h> /* <wchar.h> includes <wctype.h> */
+
#if _hdr_wchar && defined(_nxt_wchar)
#include <../include/wchar.h> /* the native wchar.h */
#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
#ifndef WEOF
#define WEOF (-1)
@@ -184,4 +186,13 @@ extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
+
+#else
+
+/* on some systems <wchar.h> is included multiple times with multiple effects */
+
+#if _hdr_wchar && defined(_nxt_wchar)
+#include <../include/wchar.h> /* the native wchar.h */
+#endif
+
#endif
diff --git a/usr/src/cmd/ast/libast/amd64/FEATURE/wctype b/usr/src/cmd/ast/libast/amd64/FEATURE/wctype
new file mode 100644
index 0000000000..0edae79c6a
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/FEATURE/wctype
@@ -0,0 +1,75 @@
+
+/* : : generated by proto : : */
+/* : : generated from contrib/ast/src/lib/libast/features/wctype by iffe version 2012-07-17 : : */
+
+#ifndef _def_wctype_ast
+#if !defined(__PROTO__)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
+# if defined(__cplusplus)
+# define __LINKAGE__ "C"
+# else
+# define __LINKAGE__
+# endif
+# define __STDARG__
+# define __PROTO__(x) x
+# define __OTORP__(x)
+# define __PARAM__(n,o) n
+# if !defined(__STDC__) && !defined(__cplusplus)
+# if !defined(c_plusplus)
+# define const
+# endif
+# define signed
+# define void int
+# define volatile
+# define __V_ char
+# else
+# define __V_ void
+# endif
+# else
+# define __PROTO__(x) ()
+# define __OTORP__(x) x
+# define __PARAM__(n,o) o
+# define __LINKAGE__
+# define __V_ char
+# define const
+# define signed
+# define void int
+# define volatile
+# endif
+# define __MANGLE__ __LINKAGE__
+# if defined(__cplusplus) || defined(c_plusplus)
+# define __VARARG__ ...
+# else
+# define __VARARG__
+# endif
+# if defined(__STDARG__)
+# define __VA_START__(p,a) va_start(p,a)
+# else
+# define __VA_START__(p,a) va_start(p)
+# endif
+# if !defined(__INLINE__)
+# if defined(__cplusplus)
+# define __INLINE__ extern __MANGLE__ inline
+# else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define __INLINE__ __inline
+# endif
+# endif
+# endif
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+
+#define _def_wctype_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _nxt_wctype <../include/wctype.h> /* include path for the native <wctype.h> */
+#define _nxt_wctype_str "../include/wctype.h" /* include string for the native <wctype.h> */
+#if _hdr_wctype && defined(_nxt_wctype)
+#include <../include/wctype.h> /* the native wctype.h */
+#endif
+
+#undef iswalpha
+
+#define iswalpha(w) (ast.mb_alpha?(*ast.mb_alpha)(w):isalpha(w))
+#endif
diff --git a/usr/src/lib/libast/amd64/Makefile b/usr/src/cmd/ast/libast/amd64/Makefile
index baa59970af..89fcdb081b 100644
--- a/usr/src/lib/libast/amd64/Makefile
+++ b/usr/src/cmd/ast/libast/amd64/Makefile
@@ -23,20 +23,18 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Platform-specific config
# Note that "HOSTTYPE" matches the value used by AT&T upstream.
-ASTPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"'
+ASTPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"'
# platform-specific sources
-OBJECTS = \
- amd64/src/lib/libast/conftab.o \
- amd64/src/lib/libast/lctab.o
-OBJDIRS = \
- amd64/src/lib/libast
+OBJECTS= conftab.o lctab.o
include ../Makefile.com
-include ../../Makefile.lib.64
+include $(SRC)/lib/Makefile.lib.64
# Use big PIC since libast is too big for pic on 64bit
# (and on 32bit it is close to the barrier)
diff --git a/usr/src/cmd/ast/libast/amd64/Makefile.iffe b/usr/src/cmd/ast/libast/amd64/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/cmd/ast/libast/amd64/conflim.h b/usr/src/cmd/ast/libast/amd64/conflim.h
new file mode 100644
index 0000000000..9b2e13d324
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/conflim.h
@@ -0,0 +1,105 @@
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
+
+/*
+ * supplemental <limits.h> values
+ */
+
+printf("#ifndef CHAR_BIT\n");
+printf("#define CHAR_BIT 8\n");
+printf("#endif\n");
+printf("#ifndef CHAR_MAX\n");
+printf("#define CHAR_MAX 127\n");
+printf("#endif\n");
+printf("#ifndef CHAR_MIN\n");
+printf("#define CHAR_MIN -128\n");
+printf("#endif\n");
+printf("#ifndef CLOCKS_PER_SEC\n");
+printf("#define CLOCKS_PER_SEC 1000000\n");
+printf("#endif\n");
+printf("#ifndef INT_MIN\n");
+printf("#define INT_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef LLONG_MAX\n");
+printf("#define LLONG_MAX 9223372036854775807\n");
+printf("#endif\n");
+printf("#ifndef LLONG_MIN\n");
+printf("#define LLONG_MIN -9223372036854775808\n");
+printf("#endif\n");
+printf("#ifndef LONG_MAX\n");
+printf("#define LONG_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef LONG_MIN\n");
+printf("#define LONG_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef MB_LEN_MAX\n");
+printf("#define MB_LEN_MAX 5\n");
+printf("#endif\n");
+printf("#ifndef OPEN_MAX_CEIL\n");
+printf("#ifndef OPEN_MAX\n");
+printf("#define OPEN_MAX %ld\n", OPEN_MAX);
+printf("#endif\n");
+printf("#define OPEN_MAX_CEIL OPEN_MAX\n");
+printf("#endif\n");
+printf("#ifndef PTHREAD_STACK_MIN\n");
+printf("#define PTHREAD_STACK_MIN 4096\n");
+printf("#endif\n");
+printf("#ifndef PTRDIFF_MAX\n");
+printf("#define PTRDIFF_MAX 9223372036854775807\n");
+printf("#endif\n");
+printf("#ifndef PTRDIFF_MIN\n");
+printf("#define PTRDIFF_MIN -9223372036854775808\n");
+printf("#endif\n");
+printf("#ifndef SCHAR_MAX\n");
+printf("#define SCHAR_MAX 127\n");
+printf("#endif\n");
+printf("#ifndef SCHAR_MIN\n");
+printf("#define SCHAR_MIN -128\n");
+printf("#endif\n");
+printf("#ifndef SHRT_MIN\n");
+printf("#define SHRT_MIN -32768\n");
+printf("#endif\n");
+printf("#ifndef SIG_ATOMIC_MAX\n");
+printf("#define SIG_ATOMIC_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef SIG_ATOMIC_MIN\n");
+printf("#define SIG_ATOMIC_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef SIZE_MAX\n");
+printf("#ifndef UINT_MAX\n");
+printf("#define UINT_MAX %lu\n", UINT_MAX);
+printf("#endif\n");
+printf("#define SIZE_MAX UINT_MAX\n");
+printf("#endif\n");
+printf("#ifndef SSIZE_MAX\n");
+printf("#ifndef INT_MAX\n");
+printf("#define INT_MAX %ld\n", INT_MAX);
+printf("#endif\n");
+printf("#define SSIZE_MAX INT_MAX\n");
+printf("#endif\n");
+printf("#ifndef TMP_MAX\n");
+printf("#define TMP_MAX 17576\n");
+printf("#endif\n");
+printf("#ifndef UCHAR_MAX\n");
+printf("#define UCHAR_MAX 255\n");
+printf("#endif\n");
+printf("#ifndef ULLONG_MAX\n");
+printf("#define ULLONG_MAX 18446744073709551615\n");
+printf("#endif\n");
+printf("#ifndef ULONG_MAX\n");
+printf("#define ULONG_MAX 4294967295\n");
+printf("#endif\n");
+printf("#ifndef USHRT_MAX\n");
+printf("#define USHRT_MAX 65535\n");
+printf("#endif\n");
+printf("#ifndef WCHAR_MAX\n");
+printf("#define WCHAR_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef WCHAR_MIN\n");
+printf("#define WCHAR_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef WINT_MAX\n");
+printf("#define WINT_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef WINT_MIN\n");
+printf("#define WINT_MIN -2147483648\n");
+printf("#endif\n");
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/conftab.c b/usr/src/cmd/ast/libast/amd64/conftab.c
index 47babdb776..f1a50aeb07 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/conftab.c
+++ b/usr/src/cmd/ast/libast/amd64/conftab.c
@@ -10,7 +10,7 @@
#include "FEATURE/param"
#include "conftab.h"
-/* : : generated by conf from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/comp/conf.tab : : */
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
/*
* prefix strings -- the first few are indexed by Conf_t.standard
@@ -37,7 +37,7 @@ const Prefix_t prefix[] =
"SI", 2, CONF_SVID, CONF_sysinfo,
};
-int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
+const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
/*
* conf strings sorted in ascending order
@@ -235,7 +235,7 @@ const Conf_t conf[] =
{ "PBS_MESSAGE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_MESSAGE },
{ "PBS_TRACK", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_TRACK },
{ "PHYS_PAGES", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SUN, 1, CONF_sysconf, _SC_PHYS_PAGES },
-{ "PID_MAX", { 0UL, 0 }, { 30000UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 },
+{ "PID_MAX", { 0UL, 0 }, { 999999UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 },
{ "PII", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
{ "PII_INTERNET", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
{ "PII_INTERNET_DGRAM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
@@ -282,6 +282,7 @@ const Conf_t conf[] =
{ "SEMAPHORES", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SEMAPHORES },
{ "SEM_NSEMS_MAX", { 0UL, 0 }, { _POSIX_SEM_NSEMS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SEM_NSEMS_MAX },
{ "SEM_VALUE_MAX", { 0UL, 0 }, { _POSIX_SEM_VALUE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SEM_VALUE_MAX },
+{ "SF_BUFSIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_MINMAX|CONF_UNDERSCORE, CONF_AST, 1, CONF_nop, -1 },
{ "SH", { 0, 0 }, { 0, "/bin/sh" }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_AST, 1, CONF_confstr, -1 },
{ "SHARED_MEMORY_OBJECTS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SHARED_MEMORY_OBJECTS },
{ "SHELL", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SHELL },
@@ -389,4 +390,4 @@ const Conf_t conf[] =
{ "XPG4", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 },
};
-int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
+const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
diff --git a/usr/src/lib/libast/i386/src/lib/libast/conftab.h b/usr/src/cmd/ast/libast/amd64/conftab.h
index 3806d2c70d..a15714e8cb 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/conftab.h
+++ b/usr/src/cmd/ast/libast/amd64/conftab.h
@@ -6,7 +6,7 @@
#endif
#include <sys/systeminfo.h>
-/* : : generated by conf from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/comp/conf.tab : : */
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
#if !defined(const) && !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus)
#define const
@@ -86,9 +86,9 @@ typedef struct Prefix_s
} Prefix_t;
extern const Conf_t conf[];
-extern int conf_elements;
+extern const int conf_elements;
extern const Prefix_t prefix[];
-extern int prefix_elements;
+extern const int prefix_elements;
#endif
diff --git a/usr/src/cmd/ast/libast/amd64/lc.h b/usr/src/cmd/ast/libast/amd64/lc.h
new file mode 100644
index 0000000000..024f410dfc
--- /dev/null
+++ b/usr/src/cmd/ast/libast/amd64/lc.h
@@ -0,0 +1,131 @@
+/* : : generated by cmd/ast/tools/lcgen : : */
+#pragma prototyped
+
+#ifndef _LC_H
+#define _LC_H 1
+
+#include <ast.h>
+
+#define LC_abbreviated 0x00001
+#define LC_checked 0x00002
+#define LC_debug 0x00004
+#define LC_default 0x00008
+#define LC_defined 0x00010
+#define LC_local 0x00020
+#define LC_primary 0x00040
+#define LC_qualified 0x00080
+#define LC_undefined 0x00100
+#define LC_utf8 0x00200
+#define LC_verbose 0x00400
+#define LC_setlocale 0x10000
+#define LC_setenv 0x20000
+#define LC_user 0x40000
+
+#define LC_language_attribute_max 2
+#define LC_territory_language_max 4
+
+struct Lc_s;
+
+typedef struct Lc_info_s
+{
+ const struct Lc_s* lc;
+ unsigned long number;
+ void* data;
+} Lc_info_t;
+
+typedef struct Lc_attribute_s
+{
+ const char* name;
+ unsigned long flags;
+ unsigned long index;
+} Lc_attribute_t;
+
+typedef struct Lc_charset_s
+{
+ const char* code;
+ const char* alternates;
+ const char* ms;
+ unsigned long index;
+} Lc_charset_t;
+
+typedef struct Lc_language_s
+{
+ const char* code;
+ const char* name;
+ const char* alternates;
+ const Lc_charset_t* charset;
+ unsigned long flags;
+ unsigned long index;
+ const Lc_attribute_t* attributes[LC_language_attribute_max];
+} Lc_language_t;
+
+typedef struct Lc_territory_s
+{
+ const char* code;
+ const char* name;
+ unsigned long flags;
+ unsigned long index;
+ const Lc_language_t* languages[LC_territory_language_max];
+#ifdef _LC_TERRITORY_PRIVATE_
+ _LC_TERRITORY_PRIVATE_
+#endif
+} Lc_territory_t;
+
+typedef struct Lc_map_s
+{
+ const char* code;
+ const Lc_language_t* language;
+ const Lc_territory_t* territory;
+ const Lc_charset_t* charset;
+ const Lc_attribute_t* attribute;
+} Lc_map_t;
+
+typedef struct Lc_attribute_list_s
+{
+ struct Lc_attribute_list_s* next;
+ const Lc_attribute_t* attribute;
+} Lc_attribute_list_t;
+
+typedef struct Lc_s
+{
+ const char* name;
+ const char* code;
+ const Lc_language_t* language;
+ const Lc_territory_t* territory;
+ const Lc_charset_t* charset;
+ const Lc_attribute_list_t* attributes;
+ unsigned long flags;
+ unsigned long index;
+#ifdef _LC_PRIVATE_
+ _LC_PRIVATE_
+#endif
+} Lc_t;
+
+struct Lc_category_s;
+
+typedef int (*Lc_category_set_f)(struct Lc_category_s*);
+
+typedef struct Lc_category_s
+{
+ const char* name;
+ int external;
+ int internal;
+ Lc_category_set_f setf;
+ Lc_t* prev;
+ unsigned int flags;
+} Lc_category_t;
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern size_t lccanon(Lc_t*, unsigned long flags, char*, size_t);
+extern Lc_category_t* lccategories(void);
+extern int lcindex(int, int);
+extern Lc_info_t* lcinfo(int);
+extern Lc_t* lcmake(const char*);
+extern Lc_t* lcscan(Lc_t*);
+
+#undef extern
+
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/lctab.c b/usr/src/cmd/ast/libast/amd64/lctab.c
index 4927e1fd3a..2afc20e2b5 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/lctab.c
+++ b/usr/src/cmd/ast/libast/amd64/lctab.c
@@ -1,4 +1,4 @@
-/* : : generated by ./lcgen : : */
+/* : : generated by cmd/ast/tools/lcgen : : */
#include "lclib.h"
#include "lclang.h"
@@ -1177,6 +1177,7 @@ const Lc_territory_t lc_territories[] =
{
{"C","C",LC_default,0,&lc_languages[0],0,0,0,0,0,0,0,},
{"debug","debug",LC_debug,0,&lc_languages[1],0,0,0,0,0,0,0,},
+{"eu","euro",0,0,&lc_languages[0],0,0,0,0,0,0,0,},
{"al","albania",0,
#ifdef CTRY_ALBANIA
CTRY_ALBANIA,
@@ -2624,11 +2625,11 @@ SUBLANG_ENGLISH_ZIMBABWE,
const Lc_map_t lc_maps[] =
{
-{"enu",&lc_languages[26],&lc_territories[93],&lc_charsets[0],0},
-{"enz",&lc_languages[26],&lc_territories[68],&lc_charsets[0],0},
-{"esm",&lc_languages[28],&lc_territories[63],&lc_charsets[0],0},
-{"esn",&lc_languages[28],&lc_territories[30],&lc_charsets[0],&attribute_es[1]},
-{"esp",&lc_languages[28],&lc_territories[30],&lc_charsets[0],&attribute_es[0]},
-{"usa",&lc_languages[26],&lc_territories[93],&lc_charsets[0],0},
+{"enu",&lc_languages[26],&lc_territories[94],&lc_charsets[0],0},
+{"enz",&lc_languages[26],&lc_territories[69],&lc_charsets[0],0},
+{"esm",&lc_languages[28],&lc_territories[64],&lc_charsets[0],0},
+{"esn",&lc_languages[28],&lc_territories[31],&lc_charsets[0],&attribute_es[1]},
+{"esp",&lc_languages[28],&lc_territories[31],&lc_charsets[0],&attribute_es[0]},
+{"usa",&lc_languages[26],&lc_territories[94],&lc_charsets[0],0},
0
};
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/align b/usr/src/cmd/ast/libast/i386/FEATURE/align
index fe2bdd2795..6feb6d9238 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/align
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/align
@@ -1,12 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/align.c by iffe version 2012-07-17 : : */
#ifndef _def_align_ast
#define _def_align_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
+#define ALIGN_INTEGRAL uintptr_t
+#define ALIGN_INTEGER(x) ((char*)(x)-(char*)0)
#define ALIGN_POINTER(x) ((char*)(x))
#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/api b/usr/src/cmd/ast/libast/i386/FEATURE/api
new file mode 100644
index 0000000000..7be5ba335f
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/api
@@ -0,0 +1,89 @@
+/* : : generated from contrib/ast/src/lib/libast/features/api by iffe version 2012-07-17 : : */
+#ifndef _AST_API_H
+#define _AST_API_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _AST_VERSION AST_VERSION /* pre-20100601 compatibility */
+
+#define AST_VERSION 20111111
+#define ASTAPI(rel) ( _BLD_ast || !_API_ast || _API_ast >= rel )
+
+#if !defined(_API_ast) && defined(_API_DEFAULT)
+#define _API_ast _API_DEFAULT
+#endif
+
+#if ASTAPI(20120411)
+#undef cmdopen
+#define cmdopen cmdopen_20120411
+#elif _API_ast >= 20110505
+#undef cmdopen
+#define cmdopen cmdopen_20110505
+#endif
+
+#if ASTAPI(20100601)
+#undef pathaccess
+#define pathaccess pathaccess_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathcanon
+#define pathcanon pathcanon_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathcat
+#define pathcat pathcat_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathkey
+#define pathkey pathkey_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathpath
+#define pathpath pathpath_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathprobe
+#define pathprobe pathprobe_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathrepl
+#define pathrepl pathrepl_20100601
+#endif
+
+#if ASTAPI(20120528)
+#undef regexec
+#define regexec regexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regnexec
+#define regnexec regnexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regrexec
+#define regrexec regrexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regsubexec
+#define regsubexec regsubexec_20120528
+#endif
+
+#if ASTAPI(20000308)
+#undef sfkeyprintf
+#define sfkeyprintf sfkeyprintf_20000308
+#endif
+
+#if ASTAPI(20120528)
+#undef strgrpmatch
+#define strgrpmatch strgrpmatch_20120528
+#endif
+
+#define _API_ast_MAP "cmdopen_20120411 cmdopen_20110505 pathaccess_20100601 pathcanon_20100601 pathcat_20100601 pathkey_20100601 pathpath_20100601 pathprobe_20100601 pathrepl_20100601 regexec_20120528 regnexec_20120528 regrexec_20120528 regsubexec_20120528 sfkeyprintf_20000308 strgrpmatch_20120528"
+
+#endif
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/aso b/usr/src/cmd/ast/libast/i386/FEATURE/aso
new file mode 100644
index 0000000000..8baa447c72
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/aso
@@ -0,0 +1,24 @@
+/* : : generated from contrib/ast/src/lib/libast/features/aso by iffe version 2012-07-17 : : */
+#ifndef _def_aso_ast
+#define _def_aso_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* gcc 4.1+ 64 bit memory atomic operations model */
+#define _aso_cas8(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc8(p) __sync_fetch_and_add(p,1)
+#define _aso_dec8(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas16(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc16(p) __sync_fetch_and_add(p,1)
+#define _aso_dec16(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas32(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc32(p) __sync_fetch_and_add(p,1)
+#define _aso_dec32(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas64(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc64(p) __sync_fetch_and_add(p,1)
+#define _aso_dec64(p) __sync_fetch_and_sub(p,1)
+#if _ast_sizeof_pointer == 8
+#define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint64_t)o,(uint64_t)n))
+#else
+#define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint32_t)o,(uint32_t)n))
+#endif
+
+#endif
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/asometh b/usr/src/cmd/ast/libast/i386/FEATURE/asometh
new file mode 100644
index 0000000000..c69b510fca
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/asometh
@@ -0,0 +1,7 @@
+/* : : generated from contrib/ast/src/lib/libast/features/asometh by iffe version 2012-07-17 : : */
+#ifndef _def_asometh_ast
+#define _def_asometh_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _aso_fcntl 1 /* fcntl(F_SETLCK[W]) work */
+#define _aso_semaphore 1 /* semget semop semctl work */
+#endif
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/botch b/usr/src/cmd/ast/libast/i386/FEATURE/botch
new file mode 100644
index 0000000000..5938177616
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/botch
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/botch.c by iffe version 2012-07-17 : : */
+#ifndef _def_botch_ast
+#define _def_botch_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/ccode b/usr/src/cmd/ast/libast/i386/FEATURE/ccode
index 6872a9fb50..30603c443a 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/ccode
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/ccode
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/ccode by iffe version 2012-07-17 : : */
#ifndef _def_ccode_ast
#define _def_ccode_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/common b/usr/src/cmd/ast/libast/i386/FEATURE/common
index 27dc6b2ddf..0719bea0e7 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/common
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/common
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/common by iffe version 2012-07-17 : : */
#ifndef _AST_COMMON_H
#define _AST_COMMON_H 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -15,6 +15,8 @@
#define _typ_long_double 1 /* long double is a type */
#define _typ_size_t 1 /* size_t is a type */
#define _typ_ssize_t 1 /* ssize_t is a type */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _typ___va_list 1 /* __va_list is a type */
#define _sys_stat 1 /* #include <sys/stat.h> ok */
#define _sys_socket 1 /* #include <sys/socket.h> ok */
#define _std_proto 1 /* standard C prototypes ok */
@@ -64,7 +66,7 @@
# define _NIL_(x) ((x)0)
#endif
-/* __INLINE__ is the inline keyword */
+/* __INLINE__, if defined, is the inline keyword */
#if !defined(__INLINE__) && defined(__cplusplus)
# define __INLINE__ inline
#endif
@@ -139,6 +141,15 @@
#define _ast_intmax_t _ast_int8_t
#define _ast_intswap 7
+#define _ast_sizeof_short 2 /* sizeof(short) */
+#define _ast_sizeof_int 4 /* sizeof(int) */
+#define _ast_sizeof_long 4 /* sizeof(long) */
+#define _ast_sizeof_size_t 4 /* sizeof(size_t) */
+#define _ast_sizeof_pointer 4 /* sizeof(pointer) */
+#define _ast_sizeof_float 4 /* sizeof(float) */
+#define _ast_sizeof_double 8 /* sizeof(double) */
+#define _ast_sizeof_long_double 12 /* sizeof(long_double) */
+
#define _ast_flt4_t float
#define _ast_flt8_t double
#define _ast_flt12_t long double
@@ -153,6 +164,7 @@
#define _typ_uint64_t 1 /* uint64_t is a type */
#define _typ_intmax_t 1 /* intmax_t is a type */
#define _typ_uintmax_t 1 /* uintmax_t is a type */
+#define _typ_uintptr_t 1 /* uintptr_t is a type */
#ifndef va_listref
#ifndef va_start
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/dirent b/usr/src/cmd/ast/libast/i386/FEATURE/dirent
index b44b2b3890..18f89fa388 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/dirent
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/dirent
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/dirent by iffe version 2012-07-17 : : */
+
#ifndef _def_dirent_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/eaccess b/usr/src/cmd/ast/libast/i386/FEATURE/eaccess
new file mode 100644
index 0000000000..27de29021e
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/eaccess
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/eaccess by iffe version 2012-07-17 : : */
+#ifndef _def_eaccess_ast
+#define _def_eaccess_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/errno b/usr/src/cmd/ast/libast/i386/FEATURE/errno
index a8d761409d..1107a008c7 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/errno
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/errno
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/errno by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/errno by iffe version 2012-07-17 : : */
#ifndef _def_errno_ast
#define _def_errno_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fcntl b/usr/src/cmd/ast/libast/i386/FEATURE/fcntl
index c6220d53e6..9c2328f31b 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/fcntl
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/fcntl
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/fcntl.c by iffe version 2012-07-17 : : */
#ifndef _def_fcntl_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_fcntl_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
#if _typ_off64_t
#undef off_t
@@ -83,7 +83,9 @@
#include <fcntl.h>
#include <sys/mman.h>
+#define F_dupfd_cloexec F_DUPFD_CLOEXEC
#define O_BINARY 0
+#define O_cloexec O_CLOEXEC
#define O_TEMPORARY 0
#define O_TEXT 0
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/float b/usr/src/cmd/ast/libast/i386/FEATURE/float
index 16c8246ded..7e6922cdfd 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/float
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/float
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/float by iffe version 2012-07-17 : : */
+
#ifndef _def_float_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -68,83 +68,86 @@
#define _hdr_math 1 /* #include <math.h> ok */
#define _hdr_values 1 /* #include <values.h> ok */
#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
#define _lib_frexp 1 /* frexp() in default lib(s) */
#define _lib_frexpl 1 /* frexpl() in default lib(s) */
#define _lib_ldexp 1 /* ldexp() in default lib(s) */
#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
#define _lib_copysign 1 /* copysign() in default lib(s) */
#define _lib_copysignl 1 /* copysignl() in default lib(s) */
+#define _npt_finite 1 /* finite() needs a prototype */
+#define _npt_finitel 1 /* finitel() needs a prototype */
+#define _npt_isinfl 1 /* isinfl() needs a prototype */
+#define _lib_fpclassify 1 /* fpclassify present and works */
+#define _lib_isinf 1 /* isinf present and works */
+#define _lib_isnan 1 /* isnan present and works */
+#define _lib_signbit 1 /* signbit present and works */
#include <ast_common.h>
#include <float.h>
#include <math.h>
#ifndef FLT_DIG
-#define FLT_DIG 6
+#define FLT_DIG 6
#endif
#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
+#define FLT_MAX 3.4028234663852885981170E+38F
#endif
#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
+#define FLT_MAX_10_EXP (+38)
#endif
#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
+#define FLT_MAX_EXP (+128)
#endif
#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
+#define FLT_MIN 1.1754943508222875079688E-38F
#endif
#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
+#define FLT_MIN_10_EXP (-37)
#endif
#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
+#define FLT_MIN_EXP (-125)
#endif
#ifndef DBL_DIG
-#define DBL_DIG 15
+#define DBL_DIG 15
#endif
#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
+#define DBL_MAX 1.7976931348623157081452E+308
#endif
#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
+#define DBL_MAX_10_EXP (+308)
#endif
#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
+#define DBL_MAX_EXP (+1024)
#endif
#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
+#define DBL_MIN 2.2250738585072013830903E-308
#endif
#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
+#define DBL_MIN_10_EXP (-307)
#endif
#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
+#define DBL_MIN_EXP (-1021)
#endif
#ifndef LDBL_DIG
-#define LDBL_DIG 18
+#define LDBL_DIG 18
#endif
#ifndef LDBL_MAX
-#define LDBL_MAX 1.1897314953572317650213E+4932L
+#define LDBL_MAX 1.1897314953572317650213E+4932L
#endif
#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
+#define LDBL_MAX_10_EXP (+4932)
#endif
#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
+#define LDBL_MAX_EXP (+16384)
#endif
#ifndef LDBL_MIN
-#define LDBL_MIN 3.3621031431120935062627E-4932L
+#define LDBL_MIN 3.3621031431120935062627E-4932L
#endif
#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
+#define LDBL_MIN_10_EXP (-4931)
#endif
#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
+#define LDBL_MIN_EXP (-16381)
#endif
@@ -211,6 +214,6 @@ typedef union _fltmax_exp_u
#define _ast_flt_inf_init 0x00,0x00,0x80,0x7f
#define _ast_dbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f
#define _ast_dbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f
-#define _ast_ldbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf0,0x7f
-#define _ast_ldbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0xf0,0x7f
+#define _ast_ldbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x00,0x00
+#define _ast_ldbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x00,0x00
#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/fs b/usr/src/cmd/ast/libast/i386/FEATURE/fs
index 5aad327b05..cdba4ad12e 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/fs
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/fs
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/fs by iffe version 2012-07-17 : : */
+
#ifndef _def_fs_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -80,6 +80,8 @@ __STDPP__directive pragma pp:noinitial
#define _hdr_stdio 1 /* #include <stdio.h> ok */
#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
+#define _sys_param 1 /* #include <sys/param.h> ok */
+#define _sys_ucred 1 /* #include <sys/ucred.h> ok */
#define _sys_mount 1 /* #include <sys/mount.h> ok */
#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
@@ -88,7 +90,6 @@ __STDPP__directive pragma pp:noinitial
#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
#define _lib_getmntent 1 /* getmntent() in default lib(s) */
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/hack b/usr/src/cmd/ast/libast/i386/FEATURE/hack
new file mode 100644
index 0000000000..fbbaf3a275
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/hack
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/hack by iffe version 2012-07-17 : : */
+#ifndef _def_hack_ast
+#define _def_hack_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/iconv b/usr/src/cmd/ast/libast/i386/FEATURE/iconv
index 720f456be1..f81d5fc8fa 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/iconv
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/iconv
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/iconv by iffe version 2012-07-17 : : */
+
#ifndef _def_iconv_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -73,11 +73,16 @@
#include <ccode.h>
#include <../include/iconv.h> /* the native iconv.h */
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
+#define ICONV_VERSION 20110111L
+
+#define ICONV_FATAL 0x02
+#define ICONV_OMIT 0x04
+
+#define CC_ICONV (-1)
+#define CC_UCS (-2)
+#define CC_SCU (-3)
+#define CC_UTF (-4)
+#define CC_UME (-5)
#ifndef _ICONV_LIST_PRIVATE_
#undef iconv_t
@@ -102,10 +107,23 @@
#define iconv_write _ast_iconv_write
#endif
+typedef int (*Iconv_error_f) __PROTO__((__V_*, __V_*, int, ...));
+
+typedef struct Iconv_disc_s
+{
+ uint32_t version;
+ Iconv_error_f errorf;
+ size_t errors;
+ uint32_t flags;
+ int fill;
+} Iconv_disc_t;
+
typedef Ccmap_t _ast_iconv_list_t;
typedef __V_* _ast_iconv_t;
typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
+#define iconv_init(d,e) (memset(d,0,sizeof(*(d))),(d)->version=ICONV_VERSION,(d)->errorf=(Iconv_error_f)(e),(d)->fill=(-1))
+
#if _BLD_ast && defined(__EXPORT__)
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__ __EXPORT__
@@ -117,12 +135,12 @@ extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
+extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, Iconv_disc_t*));
+extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, Iconv_disc_t*));
#else
#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
+extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, Iconv_disc_t*));
+extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*));
#endif
#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/lib b/usr/src/cmd/ast/libast/i386/FEATURE/lib
index b0e8a8d8cf..ade8e11b3b 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/lib
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/lib
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/lib by iffe version 2012-07-17 : : */
#ifndef _def_lib_ast
#define _def_lib_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -12,8 +12,9 @@
#define _hdr_spawn 1 /* #include <spawn.h> ok */
#define _hdr_syslog 1 /* #include <syslog.h> ok */
#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
+#define _hdr_wchar 1 /* #include <wchar.h> ok */
+#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _dat__tzname 1 /* _tzname in default lib(s) */
#define _dat_tzname 1 /* tzname in default lib(s) */
#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
@@ -131,6 +132,7 @@
#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
#define _mem_DIR 1 /* DIR is a non-opaque struct */
+#define _mem_dd_fd_DIR 1 /* dd_fd is a member of DIR */
#define _sys_filio 1 /* #include <sys/filio.h> ok */
#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
@@ -142,19 +144,22 @@
#define _sys_time 1 /* #include <sys/time.h> ok */
#define _sys_times 1 /* #include <sys/times.h> ok */
#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _typ_ino64_t 1 /* ino64_t is a type */
#define _typ_off64_t 1 /* off64_t is a type */
#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
#define _tst_errno 1 /* errno can be assigned */
#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
+#define _sys_select 1 /* #include <sys/select.h> ok */
#define _lib_select 1 /* select() has standard 5 arg interface */
+#define _sys_select 1 /* select() requires <sys/select.h> */
#define _pipe_rw 1 /* full duplex pipes */
#define _hdr_unistd 1 /* #include <unistd.h> ok */
#define _lib_vfork 1 /* vfork exists and it works */
#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
+#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
+#define _stream_peek 1 /* ioctl(I_PEEK) works on pipe() */
+#define _socket_peek 1 /* recv(MSG_PEEK) works on socketpair() */
#define _hdr_string 1 /* #include <string.h> ok */
#define _lib_memcmp 1 /* standard memcmp interface that works */
#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/libpath b/usr/src/cmd/ast/libast/i386/FEATURE/libpath
index 27eed5297d..d272a4015d 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/libpath
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/libpath
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/libpath.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/libpath.sh by iffe version 2012-07-17 : : */
#ifndef _def_libpath_ast
#define _def_libpath_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/limits b/usr/src/cmd/ast/libast/i386/FEATURE/limits
index 9638e84398..9fd982fd5a 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/limits
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/limits
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/limits.c by iffe version 2012-07-17 : : */
#ifndef _def_limits_ast
#define _def_limits_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/locale b/usr/src/cmd/ast/libast/i386/FEATURE/locale
new file mode 100644
index 0000000000..1013f583b5
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/locale
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libast/features/locale by iffe version 2012-07-17 : : */
+#ifndef _def_locale_ast
+#define _def_locale_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _locale_utf8_str "UTF-8"
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/map b/usr/src/cmd/ast/libast/i386/FEATURE/map
index a4ba960bec..30c7f4e2b5 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/map
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/map
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/map.c by iffe version 2012-07-17 : : */
#ifndef _def_map_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_map_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
/*
* prototypes provided for standard interfaces hijacked
@@ -445,6 +445,22 @@ extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
+#define cmdopen_20120411 _ast_cmdopen_20120411
+#define cmdopen_20110505 _ast_cmdopen_20110505
+#define pathaccess_20100601 _ast_pathaccess_20100601
+#define pathcanon_20100601 _ast_pathcanon_20100601
+#define pathcat_20100601 _ast_pathcat_20100601
+#define pathkey_20100601 _ast_pathkey_20100601
+#define pathpath_20100601 _ast_pathpath_20100601
+#define pathprobe_20100601 _ast_pathprobe_20100601
+#define pathrepl_20100601 _ast_pathrepl_20100601
+#define regexec_20120528 _ast_regexec_20120528
+#define regnexec_20120528 _ast_regnexec_20120528
+#define regrexec_20120528 _ast_regrexec_20120528
+#define regsubexec_20120528 _ast_regsubexec_20120528
+#define sfkeyprintf_20000308 _ast_sfkeyprintf_20000308
+#define strgrpmatch_20120528 _ast_strgrpmatch_20120528
+
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/mmap b/usr/src/cmd/ast/libast/i386/FEATURE/mmap
index 78c444078c..12d991f9a6 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/mmap
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/mmap
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/mmap by iffe version 2012-07-17 : : */
#ifndef _def_mmap_ast
#define _def_mmap_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -7,7 +7,6 @@
#define _lib_mmap64 1 /* mmap64 interface and implementation work */
#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
/* some systems get it wrong but escape concise detection */
#ifndef _NO_MMAP
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/mode b/usr/src/cmd/ast/libast/i386/FEATURE/mode
index 0aac69f173..f2ec3091fa 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/mode
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/mode
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/mode.c by iffe version 2012-07-17 : : */
#ifndef _def_mode_ast
#define _def_mode_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/ndbm b/usr/src/cmd/ast/libast/i386/FEATURE/ndbm
index a699c646cd..0e55ff820d 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/ndbm
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/ndbm
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/ndbm by iffe version 2012-07-17 : : */
#ifndef _def_ndbm_ast
#define _def_ndbm_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/nl_types b/usr/src/cmd/ast/libast/i386/FEATURE/nl_types
index 7202d7a419..d8c540626e 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/nl_types
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/nl_types
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/nl_types by iffe version 2012-07-17 : : */
+
#ifndef _def_nl_types_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/omitted b/usr/src/cmd/ast/libast/i386/FEATURE/omitted
new file mode 100644
index 0000000000..201e737ea1
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/omitted
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/omitted by iffe version 2012-07-17 : : */
+#ifndef _def_omitted_ast
+#define _def_omitted_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/options b/usr/src/cmd/ast/libast/i386/FEATURE/options
new file mode 100644
index 0000000000..6154a341b5
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/options
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/options by iffe version 2012-07-17 : : */
+#ifndef _def_options_ast
+#define _def_options_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/param b/usr/src/cmd/ast/libast/i386/FEATURE/param
index f8f80fe873..8c200b4462 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/param
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/param
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/param.sh by iffe version 2012-07-17 : : */
#ifndef _def_param_ast
#define _def_param_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/preroot b/usr/src/cmd/ast/libast/i386/FEATURE/preroot
new file mode 100644
index 0000000000..36626fb242
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/preroot
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libast/features/preroot.sh by iffe version 2012-07-17 : : */
+#ifndef _def_preroot_ast
+#define _def_preroot_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* preroot not enabled */
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/prog b/usr/src/cmd/ast/libast/i386/FEATURE/prog
index c8c170822d..592037efb7 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/prog
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/prog
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/prog by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/prog by iffe version 2012-07-17 : : */
#ifndef _def_prog_ast
#define _def_prog_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/sfinit b/usr/src/cmd/ast/libast/i386/FEATURE/sfinit
index 5e84018b57..756d559262 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/sfinit
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/sfinit
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/sfinit.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sfinit.c by iffe version 2012-07-17 : : */
#ifndef _def_sfinit_ast
#define _def_sfinit_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/sfio b/usr/src/cmd/ast/libast/i386/FEATURE/sfio
index 7f2bb58493..da0e42b2fa 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/sfio
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/sfio
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/sfio by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sfio by iffe version 2012-07-17 : : */
#ifndef _def_sfio_ast
#define _def_sfio_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -9,6 +9,7 @@
#define _sys_filio 1 /* #include <sys/filio.h> ok */
#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
#define _key_signed 1 /* signed is a reserved keyword */
+#define _ptr_bits 32
#define _lib_cvt 1 /* native floating point conversions ok */
#define _xopen_stdio 1 /* Stdio fseek/fflush are X/Open-compliant */
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sig b/usr/src/cmd/ast/libast/i386/FEATURE/sig
index aa519b2221..03020573f3 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sig
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/sig
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sig.sh by iffe version 2012-07-17 : : */
#ifndef _def_sig_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_sig_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
#define sig_info _sig_info_
#if defined(__STDPP__directive) && defined(__STDPP__hide)
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/siglist b/usr/src/cmd/ast/libast/i386/FEATURE/siglist
index 38bbd52e74..7ac817cdd9 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/siglist
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/siglist
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/siglist by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/siglist by iffe version 2012-07-17 : : */
#ifndef _def_siglist_ast
#define _def_siglist_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -125,4 +125,7 @@
#if defined(SIGJVM2) && !defined(HAD_SIGJVM2)
0,"JVM2",SIGJVM2,
#endif
+#if defined(SIGINFO) && !defined(HAD_SIGINFO)
+0,"INFO",SIGINFO,
+#endif
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/signal b/usr/src/cmd/ast/libast/i386/FEATURE/signal
index 297d7aee2a..43b48f1dda 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/signal
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/signal
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/signal.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/signal.c by iffe version 2012-07-17 : : */
#ifndef _def_signal_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,8 +62,8 @@
#define _def_signal_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define SIG_MAX 48
+
+#define SIG_MAX 73
static const char* const sig_name[] =
{
@@ -108,10 +108,35 @@ static const char* const sig_name[] =
"XRES",
"JVM1",
"JVM2",
+ "INFO",
"RTMIN",
"RTMIN+1",
"RTMIN+2",
"RTMIN+3",
+ "RTMIN+4",
+ "RTMIN+5",
+ "RTMIN+6",
+ "RTMIN+7",
+ "RTMIN+8",
+ "RTMIN+9",
+ "RTMIN+10",
+ "RTMIN+11",
+ "RTMIN+12",
+ "RTMIN+13",
+ "RTMIN+14",
+ "RTMIN+15",
+ "RTMAX-15",
+ "RTMAX-14",
+ "RTMAX-13",
+ "RTMAX-12",
+ "RTMAX-11",
+ "RTMAX-10",
+ "RTMAX-9",
+ "RTMAX-8",
+ "RTMAX-7",
+ "RTMAX-6",
+ "RTMAX-5",
+ "RTMAX-4",
"RTMAX-3",
"RTMAX-2",
"RTMAX-1",
@@ -162,6 +187,7 @@ static const char* const sig_text[] =
"Resource Control Exceeded",
"Reserved for JVM 1",
"Reserved for JVM 2",
+ "Information Request",
"Realtime priority 0 (lo)",
"Realtime priority 1",
"Realtime priority 2",
@@ -169,7 +195,31 @@ static const char* const sig_text[] =
"Realtime priority 4",
"Realtime priority 5",
"Realtime priority 6",
- "Realtime priority 7 (hi)",
+ "Realtime priority 7",
+ "Realtime priority 8",
+ "Realtime priority 9",
+ "Realtime priority 10",
+ "Realtime priority 11",
+ "Realtime priority 12",
+ "Realtime priority 13",
+ "Realtime priority 14",
+ "Realtime priority 15",
+ "Realtime priority 16",
+ "Realtime priority 17",
+ "Realtime priority 18",
+ "Realtime priority 19",
+ "Realtime priority 20",
+ "Realtime priority 21",
+ "Realtime priority 22",
+ "Realtime priority 23",
+ "Realtime priority 24",
+ "Realtime priority 25",
+ "Realtime priority 26",
+ "Realtime priority 27",
+ "Realtime priority 28",
+ "Realtime priority 29",
+ "Realtime priority 30",
+ "Realtime priority 31 (hi)",
0
};
#endif
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/sizeof b/usr/src/cmd/ast/libast/i386/FEATURE/sizeof
new file mode 100644
index 0000000000..275dff2774
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/sizeof
@@ -0,0 +1,10 @@
+/* : : generated from contrib/ast/src/lib/libast/features/sizeof by iffe version 2012-07-17 : : */
+#ifndef _def_sizeof_ast
+#define _def_sizeof_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _ast_sizeof_char 1
+#define _ast_sizeof_short 2
+#define _ast_sizeof_int 4
+#define _ast_sizeof_long 4
+#define _ast_sizeof_intmax_t 8
+#endif
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/standards b/usr/src/cmd/ast/libast/i386/FEATURE/standards
new file mode 100644
index 0000000000..059f99e5bd
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/standards
@@ -0,0 +1,45 @@
+/* : : generated from contrib/ast/src/lib/libast/features/standards by iffe version 2012-07-17 : : */
+#ifndef _def_standards_ast
+#define _def_standards_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* _ALL_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works */
+#ifndef _ALL_SOURCE
+#define _ALL_SOURCE 1
+#endif
+#ifndef _POSIX_SOURCE
+#define _POSIX_SOURCE 1
+#endif
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 21000101L
+#endif
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 9900
+#endif
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__ 1
+#endif
+
+#define _LIB_m 1 /* -lm is a library */
+/* _ISOC99_SOURCE plays nice */
+#ifndef _ISOC99_SOURCE
+#define _ISOC99_SOURCE 1
+#endif
+
+
+/*
+* this is a nasty game we all play to honor standards symbol visibility
+* it would help if all implementations had
+* _KITCHEN_SINK_SOURCE
+* that enabled all symbols from the latest implemented standards
+* that's probably the most useful but least portable request
+*/
+
+#if __MACH__
+#undef _POSIX_SOURCE
+#endif
+
+
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/stdio b/usr/src/cmd/ast/libast/i386/FEATURE/stdio
index a7530763bd..458447d900 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/stdio
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/stdio
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/stdio by iffe version 2012-07-17 : : */
+
#ifndef _SFSTDIO_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -356,13 +356,13 @@ extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
__STDPP__directive pragma pp:initial
#endif
#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
+#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
#endif
#ifndef L_ctermid
-#define L_ctermid 9
+#define L_ctermid 9
#endif
#ifndef L_tmpnam
-#define L_tmpnam 25
+#define L_tmpnam 25
#endif
#if defined(__STDPP__directive) && defined(__STDPP__initial)
__STDPP__directive pragma pp:noinitial
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sys b/usr/src/cmd/ast/libast/i386/FEATURE/sys
index 6d724f0a54..c02852888c 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/sys
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/sys
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/sys by iffe version 2012-07-17 : : */
+
#ifndef _AST_SYS_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -73,9 +73,14 @@
#if !defined(_LARGEFILE_SOURCE)
#define _LARGEFILE_SOURCE 1
#endif
+#if !defined(_LARGE_FILE_API)
+#define _LARGE_FILE_API 1
+#endif
#else
#undef _LARGEFILE64_SOURCE
#undef _LARGEFILE_SOURCE
+#undef _LARGE_FILE_API
+#undef _typ_ino64_t
#undef _typ_off64_t
#undef _typ_struct_dirent64
#undef _lib_creat64
@@ -91,6 +96,9 @@
#undef _lib_statvfs64
#undef _lib_truncate64
#endif
+#if !_lib_readdir64
+#undef _typ_ino64_t
+#endif
#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
#endif
@@ -133,6 +141,7 @@
#define __MANGLE__ __LINKAGE__ __EXPORT__
#endif
extern __MANGLE__ void cfree __PROTO__((__V_*));
+extern __MANGLE__ size_t confstr __PROTO__((int, char*, size_t));
extern __MANGLE__ int eaccess __PROTO__((const char*, int));
extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/syscall b/usr/src/cmd/ast/libast/i386/FEATURE/syscall
new file mode 100644
index 0000000000..0768fbae58
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/syscall
@@ -0,0 +1,10 @@
+/* : : generated from contrib/ast/src/lib/libast/features/syscall by iffe version 2012-07-17 : : */
+#ifndef _def_syscall_ast
+#define _def_syscall_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_sysgetcwd 1 /* syscall(SYS_getcwd,buf,len) implemented */
+#include <sys/syscall.h>
+
+#define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b)
+
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/time b/usr/src/cmd/ast/libast/i386/FEATURE/time
index 24059bcd77..fba3ba062b 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/time
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/time
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/time by iffe version 2012-07-17 : : */
+
#ifndef _def_time_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tmlib b/usr/src/cmd/ast/libast/i386/FEATURE/tmlib
index 309331f1a7..6162b62ea8 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tmlib
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/tmlib
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tmlib by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tmlib by iffe version 2012-07-17 : : */
+
#ifndef _def_tmlib_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tmx b/usr/src/cmd/ast/libast/i386/FEATURE/tmx
index 01af898e97..6ad4804a4b 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tmx
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/tmx
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tmx by iffe version 2012-07-17 : : */
+
#ifndef _TMX_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tty b/usr/src/cmd/ast/libast/i386/FEATURE/tty
index c4ec9d9e0d..1d39c122ed 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tty
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/tty
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/tty by iffe version 2012-07-17 : : */
#ifndef _def_tty_ast
#define _def_tty_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tv b/usr/src/cmd/ast/libast/i386/FEATURE/tv
index 0865fd4c4f..0caab4a20a 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/tv
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/tv
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tv by iffe version 2012-07-17 : : */
+
#ifndef _TV_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tvlib b/usr/src/cmd/ast/libast/i386/FEATURE/tvlib
index 6ce0c248b6..3121038298 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/tvlib
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/tvlib
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tvlib by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/tvlib by iffe version 2012-07-17 : : */
#ifndef _def_tvlib_ast
#define _def_tvlib_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/uwin b/usr/src/cmd/ast/libast/i386/FEATURE/uwin
new file mode 100644
index 0000000000..66dcc8c3cb
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/uwin
@@ -0,0 +1,37 @@
+/* : : generated from contrib/ast/src/lib/libast/features/uwin by iffe version 2012-07-17 : : */
+#ifndef _def_uwin_ast
+#define _def_uwin_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_a64l 1 /* a64l() in default lib(s) */
+#define _lib_acosh 1 /* acosh() in default lib(s) */
+#define _lib_asinh 1 /* asinh() in default lib(s) */
+#define _lib_atanh 1 /* atanh() in default lib(s) */
+#define _lib_cbrt 1 /* cbrt() in default lib(s) */
+#define _lib_ceil 1 /* ceil() in default lib(s) */
+#define _lib_crypt 1 /* crypt() in default lib(s) */
+#define _lib_erf 1 /* erf() in default lib(s) */
+#define _lib_exp 1 /* exp() in default lib(s) */
+#define _lib_expm1 1 /* expm1() in default lib(s) */
+#define _lib_floor 1 /* floor() in default lib(s) */
+#define _lib_gamma 1 /* gamma() in default lib(s) */
+#define _lib_getpass 1 /* getpass() in default lib(s) */
+#define _lib_lgamma 1 /* lgamma() in default lib(s) */
+#define _lib_log 1 /* log() in default lib(s) */
+#define _lib_log1p 1 /* log1p() in default lib(s) */
+#define _lib_random 1 /* random() in default lib(s) */
+#define _lib_rcmd 1 /* rcmd() in default lib(s) */
+#define _lib_rint 1 /* rint() in default lib(s) */
+#define _lib_srand48 1 /* srand48() in default lib(s) */
+#define _lib_copysign 1 /* copysign() in default lib(s) */
+#define _lib_logb 1 /* logb() in default lib(s) */
+#define _lib_finite 1 /* finite() in default lib(s) */
+#define _lib_sqrt 1 /* sqrt() in default lib(s) */
+#define _lib_ilogb 1 /* ilogb() in default lib(s) */
+#define _lib_remainder 1 /* remainder() in default lib(s) */
+#define _lib_scalb 1 /* scalb() in default lib(s) */
+#define _lib__finite 1 /* _finite() in default lib(s) */
+#define _lib__scalb 1 /* _scalb() in default lib(s) */
+#define _dat__iob 1 /* _iob in default lib(s) */
+#define stricmp strcasecmp
+
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/vfork b/usr/src/cmd/ast/libast/i386/FEATURE/vfork
index df49937dbb..b555d25c80 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/vfork
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/vfork
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/vfork by iffe version 2012-07-17 : : */
+
#ifndef _def_vfork_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,6 +63,6 @@
#define _def_vfork_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
+extern __MANGLE__ pid_t vfork(void) __attribute__((__returns_twice__));
+#pragma unknown_control_flow(vfork)
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/vmalloc b/usr/src/cmd/ast/libast/i386/FEATURE/vmalloc
index 8a6dee86da..0be84333de 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/vmalloc
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/vmalloc
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/vmalloc by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/vmalloc by iffe version 2012-07-17 : : */
#ifndef _def_vmalloc_ast
#define _def_vmalloc_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/wait b/usr/src/cmd/ast/libast/i386/FEATURE/wait
index 952ec382ee..36ae8feef1 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/wait
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/wait
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/wait by iffe version 2012-07-17 : : */
#ifndef _def_wait_ast
#define _def_wait_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/wchar b/usr/src/cmd/ast/libast/i386/FEATURE/wchar
index 83865979fc..2616f8f168 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/wchar
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/wchar
@@ -1,8 +1,8 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
+/* : : generated from contrib/ast/src/lib/libast/features/wchar by iffe version 2012-07-17 : : */
+
+
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
# if defined(__cplusplus)
@@ -60,9 +60,10 @@
#if !defined(__LINKAGE__)
#define __LINKAGE__ /* 2004-08-11 transition */
#endif
-
-#define _def_wchar_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
+#ifndef _AST_WCHAR_H
+#define _AST_WCHAR_H 1
+
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
#define _hdr_stdio 1 /* #include <stdio.h> ok */
#define _hdr_wchar 1 /* #include <wchar.h> ok */
@@ -85,12 +86,13 @@
#include <ast_common.h>
#include <stdio.h>
#endif
+
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#include <wctype.h> /* <wchar.h> includes <wctype.h> */
+
#if _hdr_wchar && defined(_nxt_wchar)
#include <../include/wchar.h> /* the native wchar.h */
#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
#ifndef WEOF
#define WEOF (-1)
@@ -184,4 +186,13 @@ extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
+
+#else
+
+/* on some systems <wchar.h> is included multiple times with multiple effects */
+
+#if _hdr_wchar && defined(_nxt_wchar)
+#include <../include/wchar.h> /* the native wchar.h */
+#endif
+
#endif
diff --git a/usr/src/cmd/ast/libast/i386/FEATURE/wctype b/usr/src/cmd/ast/libast/i386/FEATURE/wctype
new file mode 100644
index 0000000000..0edae79c6a
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/FEATURE/wctype
@@ -0,0 +1,75 @@
+
+/* : : generated by proto : : */
+/* : : generated from contrib/ast/src/lib/libast/features/wctype by iffe version 2012-07-17 : : */
+
+#ifndef _def_wctype_ast
+#if !defined(__PROTO__)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
+# if defined(__cplusplus)
+# define __LINKAGE__ "C"
+# else
+# define __LINKAGE__
+# endif
+# define __STDARG__
+# define __PROTO__(x) x
+# define __OTORP__(x)
+# define __PARAM__(n,o) n
+# if !defined(__STDC__) && !defined(__cplusplus)
+# if !defined(c_plusplus)
+# define const
+# endif
+# define signed
+# define void int
+# define volatile
+# define __V_ char
+# else
+# define __V_ void
+# endif
+# else
+# define __PROTO__(x) ()
+# define __OTORP__(x) x
+# define __PARAM__(n,o) o
+# define __LINKAGE__
+# define __V_ char
+# define const
+# define signed
+# define void int
+# define volatile
+# endif
+# define __MANGLE__ __LINKAGE__
+# if defined(__cplusplus) || defined(c_plusplus)
+# define __VARARG__ ...
+# else
+# define __VARARG__
+# endif
+# if defined(__STDARG__)
+# define __VA_START__(p,a) va_start(p,a)
+# else
+# define __VA_START__(p,a) va_start(p)
+# endif
+# if !defined(__INLINE__)
+# if defined(__cplusplus)
+# define __INLINE__ extern __MANGLE__ inline
+# else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define __INLINE__ __inline
+# endif
+# endif
+# endif
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+
+#define _def_wctype_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _nxt_wctype <../include/wctype.h> /* include path for the native <wctype.h> */
+#define _nxt_wctype_str "../include/wctype.h" /* include string for the native <wctype.h> */
+#if _hdr_wctype && defined(_nxt_wctype)
+#include <../include/wctype.h> /* the native wctype.h */
+#endif
+
+#undef iswalpha
+
+#define iswalpha(w) (ast.mb_alpha?(*ast.mb_alpha)(w):isalpha(w))
+#endif
diff --git a/usr/src/lib/libast/i386/Makefile b/usr/src/cmd/ast/libast/i386/Makefile
index a42bed719a..d12c90ab57 100644
--- a/usr/src/lib/libast/i386/Makefile
+++ b/usr/src/cmd/ast/libast/i386/Makefile
@@ -23,17 +23,15 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Platform-specific config
# Note that "HOSTTYPE" matches the value used by AT&T upstream.
-ASTPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"'
+ASTPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"'
# platform-specific sources
-OBJECTS = \
- i386/src/lib/libast/conftab.o \
- i386/src/lib/libast/lctab.o
-OBJDIRS = \
- i386/src/lib/libast
+OBJECTS= conftab.o lctab.o
include ../Makefile.com
diff --git a/usr/src/cmd/ast/libast/i386/Makefile.iffe b/usr/src/cmd/ast/libast/i386/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/cmd/ast/libast/i386/conflim.h b/usr/src/cmd/ast/libast/i386/conflim.h
new file mode 100644
index 0000000000..396c91cbbb
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/conflim.h
@@ -0,0 +1,105 @@
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
+
+/*
+ * supplemental <limits.h> values
+ */
+
+printf("#ifndef CHAR_BIT\n");
+printf("#define CHAR_BIT 8\n");
+printf("#endif\n");
+printf("#ifndef CHAR_MAX\n");
+printf("#define CHAR_MAX 127\n");
+printf("#endif\n");
+printf("#ifndef CHAR_MIN\n");
+printf("#define CHAR_MIN -128\n");
+printf("#endif\n");
+printf("#ifndef CLOCKS_PER_SEC\n");
+printf("#define CLOCKS_PER_SEC 1000000\n");
+printf("#endif\n");
+printf("#ifndef INT_MIN\n");
+printf("#define INT_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef LLONG_MAX\n");
+printf("#define LLONG_MAX 9223372036854775807\n");
+printf("#endif\n");
+printf("#ifndef LLONG_MIN\n");
+printf("#define LLONG_MIN -9223372036854775808\n");
+printf("#endif\n");
+printf("#ifndef LONG_MAX\n");
+printf("#define LONG_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef LONG_MIN\n");
+printf("#define LONG_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef MB_LEN_MAX\n");
+printf("#define MB_LEN_MAX 5\n");
+printf("#endif\n");
+printf("#ifndef OPEN_MAX_CEIL\n");
+printf("#ifndef OPEN_MAX\n");
+printf("#define OPEN_MAX %ld\n", OPEN_MAX);
+printf("#endif\n");
+printf("#define OPEN_MAX_CEIL OPEN_MAX\n");
+printf("#endif\n");
+printf("#ifndef PTHREAD_STACK_MIN\n");
+printf("#define PTHREAD_STACK_MIN 4096\n");
+printf("#endif\n");
+printf("#ifndef PTRDIFF_MAX\n");
+printf("#define PTRDIFF_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef PTRDIFF_MIN\n");
+printf("#define PTRDIFF_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef SCHAR_MAX\n");
+printf("#define SCHAR_MAX 127\n");
+printf("#endif\n");
+printf("#ifndef SCHAR_MIN\n");
+printf("#define SCHAR_MIN -128\n");
+printf("#endif\n");
+printf("#ifndef SHRT_MIN\n");
+printf("#define SHRT_MIN -32768\n");
+printf("#endif\n");
+printf("#ifndef SIG_ATOMIC_MAX\n");
+printf("#define SIG_ATOMIC_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef SIG_ATOMIC_MIN\n");
+printf("#define SIG_ATOMIC_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef SIZE_MAX\n");
+printf("#ifndef UINT_MAX\n");
+printf("#define UINT_MAX %lu\n", UINT_MAX);
+printf("#endif\n");
+printf("#define SIZE_MAX UINT_MAX\n");
+printf("#endif\n");
+printf("#ifndef SSIZE_MAX\n");
+printf("#ifndef INT_MAX\n");
+printf("#define INT_MAX %ld\n", INT_MAX);
+printf("#endif\n");
+printf("#define SSIZE_MAX INT_MAX\n");
+printf("#endif\n");
+printf("#ifndef TMP_MAX\n");
+printf("#define TMP_MAX 17576\n");
+printf("#endif\n");
+printf("#ifndef UCHAR_MAX\n");
+printf("#define UCHAR_MAX 255\n");
+printf("#endif\n");
+printf("#ifndef ULLONG_MAX\n");
+printf("#define ULLONG_MAX 18446744073709551615\n");
+printf("#endif\n");
+printf("#ifndef ULONG_MAX\n");
+printf("#define ULONG_MAX 4294967295\n");
+printf("#endif\n");
+printf("#ifndef USHRT_MAX\n");
+printf("#define USHRT_MAX 65535\n");
+printf("#endif\n");
+printf("#ifndef WCHAR_MAX\n");
+printf("#define WCHAR_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef WCHAR_MIN\n");
+printf("#define WCHAR_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef WINT_MAX\n");
+printf("#define WINT_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef WINT_MIN\n");
+printf("#define WINT_MIN -2147483648\n");
+printf("#endif\n");
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/conftab.c b/usr/src/cmd/ast/libast/i386/conftab.c
index 32880808b8..3fda0c607d 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/conftab.c
+++ b/usr/src/cmd/ast/libast/i386/conftab.c
@@ -10,7 +10,7 @@
#include "FEATURE/param"
#include "conftab.h"
-/* : : generated by conf from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/comp/conf.tab : : */
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
/*
* prefix strings -- the first few are indexed by Conf_t.standard
@@ -37,7 +37,7 @@ const Prefix_t prefix[] =
"SI", 2, CONF_SVID, CONF_sysinfo,
};
-int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
+const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
/*
* conf strings sorted in ascending order
@@ -235,7 +235,7 @@ const Conf_t conf[] =
{ "PBS_MESSAGE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_MESSAGE },
{ "PBS_TRACK", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_TRACK },
{ "PHYS_PAGES", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SUN, 1, CONF_sysconf, _SC_PHYS_PAGES },
-{ "PID_MAX", { 0ULL, 0 }, { 30000ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 },
+{ "PID_MAX", { 0ULL, 0 }, { 999999ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 },
{ "PII", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
{ "PII_INTERNET", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
{ "PII_INTERNET_DGRAM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
@@ -282,6 +282,7 @@ const Conf_t conf[] =
{ "SEMAPHORES", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SEMAPHORES },
{ "SEM_NSEMS_MAX", { 0ULL, 0 }, { _POSIX_SEM_NSEMS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SEM_NSEMS_MAX },
{ "SEM_VALUE_MAX", { 0ULL, 0 }, { _POSIX_SEM_VALUE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SEM_VALUE_MAX },
+{ "SF_BUFSIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_MINMAX|CONF_UNDERSCORE, CONF_AST, 1, CONF_nop, -1 },
{ "SH", { 0, 0 }, { 0, "/bin/sh" }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_AST, 1, CONF_confstr, -1 },
{ "SHARED_MEMORY_OBJECTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SHARED_MEMORY_OBJECTS },
{ "SHELL", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SHELL },
@@ -389,4 +390,4 @@ const Conf_t conf[] =
{ "XPG4", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 },
};
-int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
+const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/conftab.h b/usr/src/cmd/ast/libast/i386/conftab.h
index 843f12c9fd..a15714e8cb 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/conftab.h
+++ b/usr/src/cmd/ast/libast/i386/conftab.h
@@ -6,7 +6,7 @@
#endif
#include <sys/systeminfo.h>
-/* : : generated by conf from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/comp/conf.tab : : */
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
#if !defined(const) && !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus)
#define const
@@ -86,9 +86,9 @@ typedef struct Prefix_s
} Prefix_t;
extern const Conf_t conf[];
-extern int conf_elements;
+extern const int conf_elements;
extern const Prefix_t prefix[];
-extern int prefix_elements;
+extern const int prefix_elements;
#endif
diff --git a/usr/src/cmd/ast/libast/i386/lc.h b/usr/src/cmd/ast/libast/i386/lc.h
new file mode 100644
index 0000000000..024f410dfc
--- /dev/null
+++ b/usr/src/cmd/ast/libast/i386/lc.h
@@ -0,0 +1,131 @@
+/* : : generated by cmd/ast/tools/lcgen : : */
+#pragma prototyped
+
+#ifndef _LC_H
+#define _LC_H 1
+
+#include <ast.h>
+
+#define LC_abbreviated 0x00001
+#define LC_checked 0x00002
+#define LC_debug 0x00004
+#define LC_default 0x00008
+#define LC_defined 0x00010
+#define LC_local 0x00020
+#define LC_primary 0x00040
+#define LC_qualified 0x00080
+#define LC_undefined 0x00100
+#define LC_utf8 0x00200
+#define LC_verbose 0x00400
+#define LC_setlocale 0x10000
+#define LC_setenv 0x20000
+#define LC_user 0x40000
+
+#define LC_language_attribute_max 2
+#define LC_territory_language_max 4
+
+struct Lc_s;
+
+typedef struct Lc_info_s
+{
+ const struct Lc_s* lc;
+ unsigned long number;
+ void* data;
+} Lc_info_t;
+
+typedef struct Lc_attribute_s
+{
+ const char* name;
+ unsigned long flags;
+ unsigned long index;
+} Lc_attribute_t;
+
+typedef struct Lc_charset_s
+{
+ const char* code;
+ const char* alternates;
+ const char* ms;
+ unsigned long index;
+} Lc_charset_t;
+
+typedef struct Lc_language_s
+{
+ const char* code;
+ const char* name;
+ const char* alternates;
+ const Lc_charset_t* charset;
+ unsigned long flags;
+ unsigned long index;
+ const Lc_attribute_t* attributes[LC_language_attribute_max];
+} Lc_language_t;
+
+typedef struct Lc_territory_s
+{
+ const char* code;
+ const char* name;
+ unsigned long flags;
+ unsigned long index;
+ const Lc_language_t* languages[LC_territory_language_max];
+#ifdef _LC_TERRITORY_PRIVATE_
+ _LC_TERRITORY_PRIVATE_
+#endif
+} Lc_territory_t;
+
+typedef struct Lc_map_s
+{
+ const char* code;
+ const Lc_language_t* language;
+ const Lc_territory_t* territory;
+ const Lc_charset_t* charset;
+ const Lc_attribute_t* attribute;
+} Lc_map_t;
+
+typedef struct Lc_attribute_list_s
+{
+ struct Lc_attribute_list_s* next;
+ const Lc_attribute_t* attribute;
+} Lc_attribute_list_t;
+
+typedef struct Lc_s
+{
+ const char* name;
+ const char* code;
+ const Lc_language_t* language;
+ const Lc_territory_t* territory;
+ const Lc_charset_t* charset;
+ const Lc_attribute_list_t* attributes;
+ unsigned long flags;
+ unsigned long index;
+#ifdef _LC_PRIVATE_
+ _LC_PRIVATE_
+#endif
+} Lc_t;
+
+struct Lc_category_s;
+
+typedef int (*Lc_category_set_f)(struct Lc_category_s*);
+
+typedef struct Lc_category_s
+{
+ const char* name;
+ int external;
+ int internal;
+ Lc_category_set_f setf;
+ Lc_t* prev;
+ unsigned int flags;
+} Lc_category_t;
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern size_t lccanon(Lc_t*, unsigned long flags, char*, size_t);
+extern Lc_category_t* lccategories(void);
+extern int lcindex(int, int);
+extern Lc_info_t* lcinfo(int);
+extern Lc_t* lcmake(const char*);
+extern Lc_t* lcscan(Lc_t*);
+
+#undef extern
+
+#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/lctab.c b/usr/src/cmd/ast/libast/i386/lctab.c
index 4927e1fd3a..2afc20e2b5 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/lctab.c
+++ b/usr/src/cmd/ast/libast/i386/lctab.c
@@ -1,4 +1,4 @@
-/* : : generated by ./lcgen : : */
+/* : : generated by cmd/ast/tools/lcgen : : */
#include "lclib.h"
#include "lclang.h"
@@ -1177,6 +1177,7 @@ const Lc_territory_t lc_territories[] =
{
{"C","C",LC_default,0,&lc_languages[0],0,0,0,0,0,0,0,},
{"debug","debug",LC_debug,0,&lc_languages[1],0,0,0,0,0,0,0,},
+{"eu","euro",0,0,&lc_languages[0],0,0,0,0,0,0,0,},
{"al","albania",0,
#ifdef CTRY_ALBANIA
CTRY_ALBANIA,
@@ -2624,11 +2625,11 @@ SUBLANG_ENGLISH_ZIMBABWE,
const Lc_map_t lc_maps[] =
{
-{"enu",&lc_languages[26],&lc_territories[93],&lc_charsets[0],0},
-{"enz",&lc_languages[26],&lc_territories[68],&lc_charsets[0],0},
-{"esm",&lc_languages[28],&lc_territories[63],&lc_charsets[0],0},
-{"esn",&lc_languages[28],&lc_territories[30],&lc_charsets[0],&attribute_es[1]},
-{"esp",&lc_languages[28],&lc_territories[30],&lc_charsets[0],&attribute_es[0]},
-{"usa",&lc_languages[26],&lc_territories[93],&lc_charsets[0],0},
+{"enu",&lc_languages[26],&lc_territories[94],&lc_charsets[0],0},
+{"enz",&lc_languages[26],&lc_territories[69],&lc_charsets[0],0},
+{"esm",&lc_languages[28],&lc_territories[64],&lc_charsets[0],0},
+{"esn",&lc_languages[28],&lc_territories[31],&lc_charsets[0],&attribute_es[1]},
+{"esp",&lc_languages[28],&lc_territories[31],&lc_charsets[0],&attribute_es[0]},
+{"usa",&lc_languages[26],&lc_territories[94],&lc_charsets[0],0},
0
};
diff --git a/usr/src/lib/libast/mapfile-vers b/usr/src/cmd/ast/libast/mapfile-vers
index d2231b0617..305122da93 100644
--- a/usr/src/lib/libast/mapfile-vers
+++ b/usr/src/cmd/ast/libast/mapfile-vers
@@ -21,6 +21,7 @@
#
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
#
@@ -181,8 +182,10 @@ SYMBOL_VERSION SUNWprivate_1.1 {
_ast_optstr;
_ast_optusage;
_ast_pathaccess;
+ _ast_pathaccess_20100601;
_ast_pathbin;
_ast_pathcanon;
+ _ast_pathcanon_20100601;
_ast_pathcat;
_ast_pathcd;
_ast_pathcheck;
@@ -193,8 +196,10 @@ SYMBOL_VERSION SUNWprivate_1.1 {
_ast_pathkey;
_ast_pathnative;
_ast_pathpath;
+ _ast_pathpath_20100601;
_ast_pathposix;
_ast_pathprobe;
+ _ast_pathprobe_20100601;
_ast_pathprog;
_ast_pathrepl;
_ast_pathsetlink;
@@ -231,6 +236,7 @@ SYMBOL_VERSION SUNWprivate_1.1 {
_ast_regerror;
_ast_regex;
_ast_regexec;
+ _ast_regexec_20120528;
_ast_regfatal;
_ast_regfatalpat;
_ast_regfree;
@@ -242,6 +248,7 @@ SYMBOL_VERSION SUNWprivate_1.1 {
_ast_regsub;
_ast_regsubcomp;
_ast_regsubexec;
+ _ast_regsubexec_20120528;
_ast_regsubflags;
_ast_regsubfree;
_ast_remove;
@@ -255,6 +262,7 @@ SYMBOL_VERSION SUNWprivate_1.1 {
_ast_setlinebuf;
_ast_setlocale;
_ast_setvbuf;
+ _ast_sfkeyprintf_20000308;
_ast_sigcritical;
_ast_signal;
_ast_sigunblock;
@@ -339,6 +347,7 @@ SYMBOL_VERSION SUNWprivate_1.1 {
_ast_wscanf;
_ccmapcpy;
_ccmapstr;
+ _dtopen;
_error_info_;
_fini;
_hash_info_;
@@ -407,7 +416,9 @@ SYMBOL_VERSION SUNWprivate_1.1 {
ccmapname;
ccnative;
chresc;
+ chrexp;
chrtoi;
+ conformance;
dtclose;
dtdisc;
dtextract;
@@ -415,12 +426,10 @@ SYMBOL_VERSION SUNWprivate_1.1 {
dtmethod;
dtnew;
dtopen;
- dtrenew;
dtrestore;
dtsize;
dtstat;
dtstrhash;
- dttreeset;
dtview;
dtwalk;
error;
@@ -446,6 +455,7 @@ SYMBOL_VERSION SUNWprivate_1.1 {
fmtfs;
fmtgid;
fmtident;
+ fmtint;
fmtip4;
fmtls;
fmtmatch;
@@ -509,7 +519,6 @@ SYMBOL_VERSION SUNWprivate_1.1 {
mntwrite;
modei;
modex;
- pvalloc;
recfmt;
reclen;
recstr;
@@ -541,7 +550,6 @@ SYMBOL_VERSION SUNWprivate_1.1 {
sfgetr;
sfgetu;
sfkeyprintf;
- sfkeyprintf_20000308;
sfllen;
sfmove;
sfmutex;
@@ -674,7 +682,6 @@ SYMBOL_VERSION SUNWprivate_1.1 {
vmdisc;
vmgetmem;
vmmopen;
- vmmset;
vmopen;
vmprofile;
vmregion;
@@ -685,6 +692,7 @@ SYMBOL_VERSION SUNWprivate_1.1 {
vmtrace;
vmtrbusy;
vmwalk;
+ wc2utf8;
local:
*;
};
@@ -696,7 +704,6 @@ SYMBOL_VERSION SUNWprivate_1.1 {
Dthash;
Dtlist;
Dtobag;
- Dtorder;
Dtoset;
Dtqueue;
Dtset;
@@ -711,7 +718,6 @@ SYMBOL_VERSION SUNWprivate_1.1 {
Vmpool;
Vmprofile;
Vmregion;
- _DATA_dthash;
_DATA_dtlist;
_DATA_dttree;
_DATA_sigdata;
@@ -721,11 +727,6 @@ SYMBOL_VERSION SUNWprivate_1.1 {
_DATA_vmlast;
_DATA_vmpool;
_DATA_vmprofile;
- _Dthash;
- _Dtlist;
- _Dtqueue;
- _Dtstack;
- _Dttree;
_Sfstderr;
_Sfstdin;
_Sfstdout;
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/align b/usr/src/cmd/ast/libast/sparc/FEATURE/align
index 36b279e5aa..d7c53efe9c 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/align
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/align
@@ -1,12 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/align.c by iffe version 2012-07-17 : : */
#ifndef _def_align_ast
#define _def_align_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
+#define ALIGN_INTEGRAL uintptr_t
+#define ALIGN_INTEGER(x) ((char*)(x)-(char*)0)
#define ALIGN_POINTER(x) ((char*)(x))
#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/api b/usr/src/cmd/ast/libast/sparc/FEATURE/api
new file mode 100644
index 0000000000..7be5ba335f
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/api
@@ -0,0 +1,89 @@
+/* : : generated from contrib/ast/src/lib/libast/features/api by iffe version 2012-07-17 : : */
+#ifndef _AST_API_H
+#define _AST_API_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _AST_VERSION AST_VERSION /* pre-20100601 compatibility */
+
+#define AST_VERSION 20111111
+#define ASTAPI(rel) ( _BLD_ast || !_API_ast || _API_ast >= rel )
+
+#if !defined(_API_ast) && defined(_API_DEFAULT)
+#define _API_ast _API_DEFAULT
+#endif
+
+#if ASTAPI(20120411)
+#undef cmdopen
+#define cmdopen cmdopen_20120411
+#elif _API_ast >= 20110505
+#undef cmdopen
+#define cmdopen cmdopen_20110505
+#endif
+
+#if ASTAPI(20100601)
+#undef pathaccess
+#define pathaccess pathaccess_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathcanon
+#define pathcanon pathcanon_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathcat
+#define pathcat pathcat_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathkey
+#define pathkey pathkey_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathpath
+#define pathpath pathpath_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathprobe
+#define pathprobe pathprobe_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathrepl
+#define pathrepl pathrepl_20100601
+#endif
+
+#if ASTAPI(20120528)
+#undef regexec
+#define regexec regexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regnexec
+#define regnexec regnexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regrexec
+#define regrexec regrexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regsubexec
+#define regsubexec regsubexec_20120528
+#endif
+
+#if ASTAPI(20000308)
+#undef sfkeyprintf
+#define sfkeyprintf sfkeyprintf_20000308
+#endif
+
+#if ASTAPI(20120528)
+#undef strgrpmatch
+#define strgrpmatch strgrpmatch_20120528
+#endif
+
+#define _API_ast_MAP "cmdopen_20120411 cmdopen_20110505 pathaccess_20100601 pathcanon_20100601 pathcat_20100601 pathkey_20100601 pathpath_20100601 pathprobe_20100601 pathrepl_20100601 regexec_20120528 regnexec_20120528 regrexec_20120528 regsubexec_20120528 sfkeyprintf_20000308 strgrpmatch_20120528"
+
+#endif
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/aso b/usr/src/cmd/ast/libast/sparc/FEATURE/aso
new file mode 100644
index 0000000000..01c87bd20e
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/aso
@@ -0,0 +1,25 @@
+/* : : generated from contrib/ast/src/lib/libast/features/aso by iffe version 2012-07-17 : : */
+#ifndef _def_aso_ast
+#define _def_aso_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* <atomic.h> atomic_cas_64 */
+#include <atomic.h>
+#define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
+#define _aso_inc8(p) (atomic_add_8_nv(p,1)-1)
+#define _aso_dec8(p) (atomic_add_8_nv(p,-1)+1)
+#define _aso_cas16(p,o,n) atomic_cas_16(p,o,n)
+#define _aso_inc16(p) (atomic_add_16_nv(p,1)-1)
+#define _aso_dec16(p) (atomic_add_16_nv(p,-1)+1)
+#define _aso_cas32(p,o,n) atomic_cas_32(p,o,n)
+#define _aso_inc32(p) (atomic_add_32_nv(p,1)-1)
+#define _aso_dec32(p) (atomic_add_32_nv(p,-1)+1)
+#define _aso_cas64(p,o,n) atomic_cas_64(p,o,n)
+#define _aso_inc64(p) (atomic_add_64_nv(p,1)-1)
+#define _aso_dec64(p) (atomic_add_64_nv(p,-1)+1)
+#if _ast_sizeof_pointer == 8
+#define _aso_casptr(p,o,n) ((void*)atomic_cas_64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
+#else
+#define _aso_casptr(p,o,n) ((void*)atomic_cas_32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+#endif
+
+#endif
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/asometh b/usr/src/cmd/ast/libast/sparc/FEATURE/asometh
new file mode 100644
index 0000000000..c69b510fca
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/asometh
@@ -0,0 +1,7 @@
+/* : : generated from contrib/ast/src/lib/libast/features/asometh by iffe version 2012-07-17 : : */
+#ifndef _def_asometh_ast
+#define _def_asometh_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _aso_fcntl 1 /* fcntl(F_SETLCK[W]) work */
+#define _aso_semaphore 1 /* semget semop semctl work */
+#endif
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/botch b/usr/src/cmd/ast/libast/sparc/FEATURE/botch
new file mode 100644
index 0000000000..5938177616
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/botch
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/botch.c by iffe version 2012-07-17 : : */
+#ifndef _def_botch_ast
+#define _def_botch_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_ccode.h b/usr/src/cmd/ast/libast/sparc/FEATURE/ccode
index 6872a9fb50..30603c443a 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_ccode.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/ccode
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/ccode by iffe version 2012-07-17 : : */
#ifndef _def_ccode_ast
#define _def_ccode_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/common b/usr/src/cmd/ast/libast/sparc/FEATURE/common
index 295e05d946..d8fdc6e652 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/common
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/common
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/common by iffe version 2012-07-17 : : */
#ifndef _AST_COMMON_H
#define _AST_COMMON_H 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -15,6 +15,8 @@
#define _typ_long_double 1 /* long double is a type */
#define _typ_size_t 1 /* size_t is a type */
#define _typ_ssize_t 1 /* ssize_t is a type */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _typ___va_list 1 /* __va_list is a type */
#define _sys_stat 1 /* #include <sys/stat.h> ok */
#define _sys_socket 1 /* #include <sys/socket.h> ok */
#define _std_proto 1 /* standard C prototypes ok */
@@ -64,7 +66,7 @@
# define _NIL_(x) ((x)0)
#endif
-/* __INLINE__ is the inline keyword */
+/* __INLINE__, if defined, is the inline keyword */
#if !defined(__INLINE__) && defined(__cplusplus)
# define __INLINE__ inline
#endif
@@ -139,6 +141,15 @@
#define _ast_intmax_t _ast_int8_t
#define _ast_intswap 0
+#define _ast_sizeof_short 2 /* sizeof(short) */
+#define _ast_sizeof_int 4 /* sizeof(int) */
+#define _ast_sizeof_long 4 /* sizeof(long) */
+#define _ast_sizeof_size_t 4 /* sizeof(size_t) */
+#define _ast_sizeof_pointer 4 /* sizeof(pointer) */
+#define _ast_sizeof_float 4 /* sizeof(float) */
+#define _ast_sizeof_double 8 /* sizeof(double) */
+#define _ast_sizeof_long_double 16 /* sizeof(long_double) */
+
#define _ast_flt4_t float
#define _ast_flt8_t double
#define _ast_flt16_t long double
@@ -153,6 +164,7 @@
#define _typ_uint64_t 1 /* uint64_t is a type */
#define _typ_intmax_t 1 /* intmax_t is a type */
#define _typ_uintmax_t 1 /* uintmax_t is a type */
+#define _typ_uintptr_t 1 /* uintptr_t is a type */
#ifndef va_listref
#ifndef va_start
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_dirent.h b/usr/src/cmd/ast/libast/sparc/FEATURE/dirent
index b44b2b3890..18f89fa388 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_dirent.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/dirent
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/dirent by iffe version 2012-07-17 : : */
+
#ifndef _def_dirent_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/eaccess b/usr/src/cmd/ast/libast/sparc/FEATURE/eaccess
new file mode 100644
index 0000000000..27de29021e
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/eaccess
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/eaccess by iffe version 2012-07-17 : : */
+#ifndef _def_eaccess_ast
+#define _def_eaccess_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/errno b/usr/src/cmd/ast/libast/sparc/FEATURE/errno
index 1bd932ec6a..1107a008c7 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/errno
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/errno
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/errno by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/errno by iffe version 2012-07-17 : : */
#ifndef _def_errno_ast
#define _def_errno_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fcntl b/usr/src/cmd/ast/libast/sparc/FEATURE/fcntl
index f6c4f0abe4..9c2328f31b 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fcntl
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/fcntl
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/fcntl.c by iffe version 2012-07-17 : : */
#ifndef _def_fcntl_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_fcntl_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
#if _typ_off64_t
#undef off_t
@@ -83,7 +83,9 @@
#include <fcntl.h>
#include <sys/mman.h>
+#define F_dupfd_cloexec F_DUPFD_CLOEXEC
#define O_BINARY 0
+#define O_cloexec O_CLOEXEC
#define O_TEMPORARY 0
#define O_TEXT 0
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/float b/usr/src/cmd/ast/libast/sparc/FEATURE/float
index 9500cc2eaf..afc779a98e 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/float
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/float
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/float by iffe version 2012-07-17 : : */
+
#ifndef _def_float_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -68,83 +68,86 @@
#define _hdr_math 1 /* #include <math.h> ok */
#define _hdr_values 1 /* #include <values.h> ok */
#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
#define _lib_frexp 1 /* frexp() in default lib(s) */
#define _lib_frexpl 1 /* frexpl() in default lib(s) */
#define _lib_ldexp 1 /* ldexp() in default lib(s) */
#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
#define _lib_copysign 1 /* copysign() in default lib(s) */
#define _lib_copysignl 1 /* copysignl() in default lib(s) */
+#define _npt_finite 1 /* finite() needs a prototype */
+#define _npt_finitel 1 /* finitel() needs a prototype */
+#define _npt_isinfl 1 /* isinfl() needs a prototype */
+#define _lib_fpclassify 1 /* fpclassify present and works */
+#define _lib_isinf 1 /* isinf present and works */
+#define _lib_isnan 1 /* isnan present and works */
+#define _lib_signbit 1 /* signbit present and works */
#include <ast_common.h>
#include <float.h>
#include <math.h>
#ifndef FLT_DIG
-#define FLT_DIG 6
+#define FLT_DIG 6
#endif
#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
+#define FLT_MAX 3.4028234663852885981170E+38F
#endif
#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
+#define FLT_MAX_10_EXP (+38)
#endif
#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
+#define FLT_MAX_EXP (+128)
#endif
#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
+#define FLT_MIN 1.1754943508222875079688E-38F
#endif
#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
+#define FLT_MIN_10_EXP (-37)
#endif
#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
+#define FLT_MIN_EXP (-125)
#endif
#ifndef DBL_DIG
-#define DBL_DIG 15
+#define DBL_DIG 15
#endif
#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
+#define DBL_MAX 1.7976931348623157081452E+308
#endif
#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
+#define DBL_MAX_10_EXP (+308)
#endif
#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
+#define DBL_MAX_EXP (+1024)
#endif
#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
+#define DBL_MIN 2.2250738585072013830903E-308
#endif
#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
+#define DBL_MIN_10_EXP (-307)
#endif
#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
+#define DBL_MIN_EXP (-1021)
#endif
#ifndef LDBL_DIG
-#define LDBL_DIG 33
+#define LDBL_DIG 33
#endif
#ifndef LDBL_MAX
-#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
+#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
#endif
#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
+#define LDBL_MAX_10_EXP (+4932)
#endif
#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
+#define LDBL_MAX_EXP (+16384)
#endif
#ifndef LDBL_MIN
-#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
+#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
#endif
#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
+#define LDBL_MIN_10_EXP (-4931)
#endif
#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
+#define LDBL_MIN_EXP (-16381)
#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fs b/usr/src/cmd/ast/libast/sparc/FEATURE/fs
index 31611c188e..3ff682685a 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/fs
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/fs
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/fs by iffe version 2012-07-17 : : */
+
#ifndef _def_fs_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -76,6 +76,8 @@ __STDPP__directive pragma pp:noinitial
#define _hdr_stdio 1 /* #include <stdio.h> ok */
#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
+#define _sys_param 1 /* #include <sys/param.h> ok */
+#define _sys_ucred 1 /* #include <sys/ucred.h> ok */
#define _sys_mount 1 /* #include <sys/mount.h> ok */
#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
@@ -84,7 +86,6 @@ __STDPP__directive pragma pp:noinitial
#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
#define _lib_getmntent 1 /* getmntent() in default lib(s) */
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/hack b/usr/src/cmd/ast/libast/sparc/FEATURE/hack
new file mode 100644
index 0000000000..fbbaf3a275
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/hack
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/hack by iffe version 2012-07-17 : : */
+#ifndef _def_hack_ast
+#define _def_hack_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/iconv b/usr/src/cmd/ast/libast/sparc/FEATURE/iconv
index 29a13b5a0d..f81d5fc8fa 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/iconv
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/iconv
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/iconv by iffe version 2012-07-17 : : */
+
#ifndef _def_iconv_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -73,11 +73,16 @@
#include <ccode.h>
#include <../include/iconv.h> /* the native iconv.h */
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
+#define ICONV_VERSION 20110111L
+
+#define ICONV_FATAL 0x02
+#define ICONV_OMIT 0x04
+
+#define CC_ICONV (-1)
+#define CC_UCS (-2)
+#define CC_SCU (-3)
+#define CC_UTF (-4)
+#define CC_UME (-5)
#ifndef _ICONV_LIST_PRIVATE_
#undef iconv_t
@@ -102,10 +107,23 @@
#define iconv_write _ast_iconv_write
#endif
+typedef int (*Iconv_error_f) __PROTO__((__V_*, __V_*, int, ...));
+
+typedef struct Iconv_disc_s
+{
+ uint32_t version;
+ Iconv_error_f errorf;
+ size_t errors;
+ uint32_t flags;
+ int fill;
+} Iconv_disc_t;
+
typedef Ccmap_t _ast_iconv_list_t;
typedef __V_* _ast_iconv_t;
typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
+#define iconv_init(d,e) (memset(d,0,sizeof(*(d))),(d)->version=ICONV_VERSION,(d)->errorf=(Iconv_error_f)(e),(d)->fill=(-1))
+
#if _BLD_ast && defined(__EXPORT__)
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__ __EXPORT__
@@ -117,12 +135,12 @@ extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
+extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, Iconv_disc_t*));
+extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, Iconv_disc_t*));
#else
#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
+extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, Iconv_disc_t*));
+extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*));
#endif
#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/lib b/usr/src/cmd/ast/libast/sparc/FEATURE/lib
index 83be163f9f..ade8e11b3b 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/lib
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/lib
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/lib by iffe version 2012-07-17 : : */
#ifndef _def_lib_ast
#define _def_lib_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -12,8 +12,9 @@
#define _hdr_spawn 1 /* #include <spawn.h> ok */
#define _hdr_syslog 1 /* #include <syslog.h> ok */
#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
+#define _hdr_wchar 1 /* #include <wchar.h> ok */
+#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _dat__tzname 1 /* _tzname in default lib(s) */
#define _dat_tzname 1 /* tzname in default lib(s) */
#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
@@ -131,6 +132,7 @@
#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
#define _mem_DIR 1 /* DIR is a non-opaque struct */
+#define _mem_dd_fd_DIR 1 /* dd_fd is a member of DIR */
#define _sys_filio 1 /* #include <sys/filio.h> ok */
#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
@@ -142,19 +144,22 @@
#define _sys_time 1 /* #include <sys/time.h> ok */
#define _sys_times 1 /* #include <sys/times.h> ok */
#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _typ_ino64_t 1 /* ino64_t is a type */
#define _typ_off64_t 1 /* off64_t is a type */
#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
#define _tst_errno 1 /* errno can be assigned */
#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
+#define _sys_select 1 /* #include <sys/select.h> ok */
#define _lib_select 1 /* select() has standard 5 arg interface */
+#define _sys_select 1 /* select() requires <sys/select.h> */
#define _pipe_rw 1 /* full duplex pipes */
#define _hdr_unistd 1 /* #include <unistd.h> ok */
#define _lib_vfork 1 /* vfork exists and it works */
#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
+#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
+#define _stream_peek 1 /* ioctl(I_PEEK) works on pipe() */
+#define _socket_peek 1 /* recv(MSG_PEEK) works on socketpair() */
#define _hdr_string 1 /* #include <string.h> ok */
#define _lib_memcmp 1 /* standard memcmp interface that works */
#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/libpath b/usr/src/cmd/ast/libast/sparc/FEATURE/libpath
index 106ab7d172..d272a4015d 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/libpath
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/libpath
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/libpath.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/libpath.sh by iffe version 2012-07-17 : : */
#ifndef _def_libpath_ast
#define _def_libpath_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_limits.h b/usr/src/cmd/ast/libast/sparc/FEATURE/limits
index 9638e84398..9fd982fd5a 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_limits.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/limits
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/limits.c by iffe version 2012-07-17 : : */
#ifndef _def_limits_ast
#define _def_limits_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/locale b/usr/src/cmd/ast/libast/sparc/FEATURE/locale
new file mode 100644
index 0000000000..1013f583b5
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/locale
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libast/features/locale by iffe version 2012-07-17 : : */
+#ifndef _def_locale_ast
+#define _def_locale_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _locale_utf8_str "UTF-8"
+#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/map b/usr/src/cmd/ast/libast/sparc/FEATURE/map
index 101b9a4a6f..30c7f4e2b5 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/map
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/map
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/map.c by iffe version 2012-07-17 : : */
#ifndef _def_map_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_map_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
/*
* prototypes provided for standard interfaces hijacked
@@ -445,6 +445,22 @@ extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
+#define cmdopen_20120411 _ast_cmdopen_20120411
+#define cmdopen_20110505 _ast_cmdopen_20110505
+#define pathaccess_20100601 _ast_pathaccess_20100601
+#define pathcanon_20100601 _ast_pathcanon_20100601
+#define pathcat_20100601 _ast_pathcat_20100601
+#define pathkey_20100601 _ast_pathkey_20100601
+#define pathpath_20100601 _ast_pathpath_20100601
+#define pathprobe_20100601 _ast_pathprobe_20100601
+#define pathrepl_20100601 _ast_pathrepl_20100601
+#define regexec_20120528 _ast_regexec_20120528
+#define regnexec_20120528 _ast_regnexec_20120528
+#define regrexec_20120528 _ast_regrexec_20120528
+#define regsubexec_20120528 _ast_regsubexec_20120528
+#define sfkeyprintf_20000308 _ast_sfkeyprintf_20000308
+#define strgrpmatch_20120528 _ast_strgrpmatch_20120528
+
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_mmap.h b/usr/src/cmd/ast/libast/sparc/FEATURE/mmap
index aea2a35cbb..12d991f9a6 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_mmap.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/mmap
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/mmap by iffe version 2012-07-17 : : */
#ifndef _def_mmap_ast
#define _def_mmap_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -7,7 +7,6 @@
#define _lib_mmap64 1 /* mmap64 interface and implementation work */
#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
/* some systems get it wrong but escape concise detection */
#ifndef _NO_MMAP
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_mode.h b/usr/src/cmd/ast/libast/sparc/FEATURE/mode
index 83e70f608e..f2ec3091fa 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_mode.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/mode
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/mode.c by iffe version 2012-07-17 : : */
#ifndef _def_mode_ast
#define _def_mode_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_ndbm.h b/usr/src/cmd/ast/libast/sparc/FEATURE/ndbm
index 656547d2d4..0e55ff820d 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_ndbm.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/ndbm
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/ndbm by iffe version 2012-07-17 : : */
#ifndef _def_ndbm_ast
#define _def_ndbm_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_nl_types.h b/usr/src/cmd/ast/libast/sparc/FEATURE/nl_types
index 9c39d0de67..d8c540626e 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_nl_types.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/nl_types
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/nl_types by iffe version 2012-07-17 : : */
+
#ifndef _def_nl_types_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/omitted b/usr/src/cmd/ast/libast/sparc/FEATURE/omitted
new file mode 100644
index 0000000000..201e737ea1
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/omitted
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/omitted by iffe version 2012-07-17 : : */
+#ifndef _def_omitted_ast
+#define _def_omitted_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/options b/usr/src/cmd/ast/libast/sparc/FEATURE/options
new file mode 100644
index 0000000000..6154a341b5
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/options
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/options by iffe version 2012-07-17 : : */
+#ifndef _def_options_ast
+#define _def_options_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_param.h b/usr/src/cmd/ast/libast/sparc/FEATURE/param
index 9d45e3e464..8c200b4462 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_param.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/param
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/param.sh by iffe version 2012-07-17 : : */
#ifndef _def_param_ast
#define _def_param_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/preroot b/usr/src/cmd/ast/libast/sparc/FEATURE/preroot
new file mode 100644
index 0000000000..36626fb242
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/preroot
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libast/features/preroot.sh by iffe version 2012-07-17 : : */
+#ifndef _def_preroot_ast
+#define _def_preroot_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* preroot not enabled */
+#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/prog b/usr/src/cmd/ast/libast/sparc/FEATURE/prog
index 928ecd4ea0..592037efb7 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/prog
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/prog
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/prog by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/prog by iffe version 2012-07-17 : : */
#ifndef _def_prog_ast
#define _def_prog_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sfinit b/usr/src/cmd/ast/libast/sparc/FEATURE/sfinit
index ded1b0e153..756d559262 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sfinit
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sfinit
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/sfinit.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sfinit.c by iffe version 2012-07-17 : : */
#ifndef _def_sfinit_ast
#define _def_sfinit_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sfio b/usr/src/cmd/ast/libast/sparc/FEATURE/sfio
index 6ef937735f..da0e42b2fa 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sfio
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sfio
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/sfio by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sfio by iffe version 2012-07-17 : : */
#ifndef _def_sfio_ast
#define _def_sfio_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -9,6 +9,7 @@
#define _sys_filio 1 /* #include <sys/filio.h> ok */
#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
#define _key_signed 1 /* signed is a reserved keyword */
+#define _ptr_bits 32
#define _lib_cvt 1 /* native floating point conversions ok */
#define _xopen_stdio 1 /* Stdio fseek/fflush are X/Open-compliant */
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/sig.h b/usr/src/cmd/ast/libast/sparc/FEATURE/sig
index aa519b2221..03020573f3 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/sig.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sig
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sig.sh by iffe version 2012-07-17 : : */
#ifndef _def_sig_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_sig_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
#define sig_info _sig_info_
#if defined(__STDPP__directive) && defined(__STDPP__hide)
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/siglist b/usr/src/cmd/ast/libast/sparc/FEATURE/siglist
index 5fc9bcbbbc..7ac817cdd9 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/siglist
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/siglist
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/siglist by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/siglist by iffe version 2012-07-17 : : */
#ifndef _def_siglist_ast
#define _def_siglist_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -125,4 +125,7 @@
#if defined(SIGJVM2) && !defined(HAD_SIGJVM2)
0,"JVM2",SIGJVM2,
#endif
+#if defined(SIGINFO) && !defined(HAD_SIGINFO)
+0,"INFO",SIGINFO,
+#endif
#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/signal b/usr/src/cmd/ast/libast/sparc/FEATURE/signal
index 6ab7d11b56..43b48f1dda 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/signal
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/signal
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/signal.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/signal.c by iffe version 2012-07-17 : : */
#ifndef _def_signal_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,8 +62,8 @@
#define _def_signal_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define SIG_MAX 48
+
+#define SIG_MAX 73
static const char* const sig_name[] =
{
@@ -108,10 +108,35 @@ static const char* const sig_name[] =
"XRES",
"JVM1",
"JVM2",
+ "INFO",
"RTMIN",
"RTMIN+1",
"RTMIN+2",
"RTMIN+3",
+ "RTMIN+4",
+ "RTMIN+5",
+ "RTMIN+6",
+ "RTMIN+7",
+ "RTMIN+8",
+ "RTMIN+9",
+ "RTMIN+10",
+ "RTMIN+11",
+ "RTMIN+12",
+ "RTMIN+13",
+ "RTMIN+14",
+ "RTMIN+15",
+ "RTMAX-15",
+ "RTMAX-14",
+ "RTMAX-13",
+ "RTMAX-12",
+ "RTMAX-11",
+ "RTMAX-10",
+ "RTMAX-9",
+ "RTMAX-8",
+ "RTMAX-7",
+ "RTMAX-6",
+ "RTMAX-5",
+ "RTMAX-4",
"RTMAX-3",
"RTMAX-2",
"RTMAX-1",
@@ -162,6 +187,7 @@ static const char* const sig_text[] =
"Resource Control Exceeded",
"Reserved for JVM 1",
"Reserved for JVM 2",
+ "Information Request",
"Realtime priority 0 (lo)",
"Realtime priority 1",
"Realtime priority 2",
@@ -169,7 +195,31 @@ static const char* const sig_text[] =
"Realtime priority 4",
"Realtime priority 5",
"Realtime priority 6",
- "Realtime priority 7 (hi)",
+ "Realtime priority 7",
+ "Realtime priority 8",
+ "Realtime priority 9",
+ "Realtime priority 10",
+ "Realtime priority 11",
+ "Realtime priority 12",
+ "Realtime priority 13",
+ "Realtime priority 14",
+ "Realtime priority 15",
+ "Realtime priority 16",
+ "Realtime priority 17",
+ "Realtime priority 18",
+ "Realtime priority 19",
+ "Realtime priority 20",
+ "Realtime priority 21",
+ "Realtime priority 22",
+ "Realtime priority 23",
+ "Realtime priority 24",
+ "Realtime priority 25",
+ "Realtime priority 26",
+ "Realtime priority 27",
+ "Realtime priority 28",
+ "Realtime priority 29",
+ "Realtime priority 30",
+ "Realtime priority 31 (hi)",
0
};
#endif
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/sizeof b/usr/src/cmd/ast/libast/sparc/FEATURE/sizeof
new file mode 100644
index 0000000000..275dff2774
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sizeof
@@ -0,0 +1,10 @@
+/* : : generated from contrib/ast/src/lib/libast/features/sizeof by iffe version 2012-07-17 : : */
+#ifndef _def_sizeof_ast
+#define _def_sizeof_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _ast_sizeof_char 1
+#define _ast_sizeof_short 2
+#define _ast_sizeof_int 4
+#define _ast_sizeof_long 4
+#define _ast_sizeof_intmax_t 8
+#endif
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/standards b/usr/src/cmd/ast/libast/sparc/FEATURE/standards
new file mode 100644
index 0000000000..059f99e5bd
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/standards
@@ -0,0 +1,45 @@
+/* : : generated from contrib/ast/src/lib/libast/features/standards by iffe version 2012-07-17 : : */
+#ifndef _def_standards_ast
+#define _def_standards_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* _ALL_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works */
+#ifndef _ALL_SOURCE
+#define _ALL_SOURCE 1
+#endif
+#ifndef _POSIX_SOURCE
+#define _POSIX_SOURCE 1
+#endif
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 21000101L
+#endif
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 9900
+#endif
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__ 1
+#endif
+
+#define _LIB_m 1 /* -lm is a library */
+/* _ISOC99_SOURCE plays nice */
+#ifndef _ISOC99_SOURCE
+#define _ISOC99_SOURCE 1
+#endif
+
+
+/*
+* this is a nasty game we all play to honor standards symbol visibility
+* it would help if all implementations had
+* _KITCHEN_SINK_SOURCE
+* that enabled all symbols from the latest implemented standards
+* that's probably the most useful but least portable request
+*/
+
+#if __MACH__
+#undef _POSIX_SOURCE
+#endif
+
+
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_stdio.h b/usr/src/cmd/ast/libast/sparc/FEATURE/stdio
index 727b7add5f..0694a40264 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_stdio.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/stdio
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/stdio by iffe version 2012-07-17 : : */
+
#ifndef _SFSTDIO_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -356,13 +356,13 @@ extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
__STDPP__directive pragma pp:initial
#endif
#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
+#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
#endif
#ifndef L_ctermid
-#define L_ctermid 9
+#define L_ctermid 9
#endif
#ifndef L_tmpnam
-#define L_tmpnam 25
+#define L_tmpnam 25
#endif
#if defined(__STDPP__directive) && defined(__STDPP__initial)
__STDPP__directive pragma pp:noinitial
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/sys b/usr/src/cmd/ast/libast/sparc/FEATURE/sys
index 79554b0821..c02852888c 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/sys
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/sys
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/sys by iffe version 2012-07-17 : : */
+
#ifndef _AST_SYS_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -73,9 +73,14 @@
#if !defined(_LARGEFILE_SOURCE)
#define _LARGEFILE_SOURCE 1
#endif
+#if !defined(_LARGE_FILE_API)
+#define _LARGE_FILE_API 1
+#endif
#else
#undef _LARGEFILE64_SOURCE
#undef _LARGEFILE_SOURCE
+#undef _LARGE_FILE_API
+#undef _typ_ino64_t
#undef _typ_off64_t
#undef _typ_struct_dirent64
#undef _lib_creat64
@@ -91,6 +96,9 @@
#undef _lib_statvfs64
#undef _lib_truncate64
#endif
+#if !_lib_readdir64
+#undef _typ_ino64_t
+#endif
#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
#endif
@@ -133,6 +141,7 @@
#define __MANGLE__ __LINKAGE__ __EXPORT__
#endif
extern __MANGLE__ void cfree __PROTO__((__V_*));
+extern __MANGLE__ size_t confstr __PROTO__((int, char*, size_t));
extern __MANGLE__ int eaccess __PROTO__((const char*, int));
extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/syscall b/usr/src/cmd/ast/libast/sparc/FEATURE/syscall
new file mode 100644
index 0000000000..0768fbae58
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/syscall
@@ -0,0 +1,10 @@
+/* : : generated from contrib/ast/src/lib/libast/features/syscall by iffe version 2012-07-17 : : */
+#ifndef _def_syscall_ast
+#define _def_syscall_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_sysgetcwd 1 /* syscall(SYS_getcwd,buf,len) implemented */
+#include <sys/syscall.h>
+
+#define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b)
+
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_time.h b/usr/src/cmd/ast/libast/sparc/FEATURE/time
index 24059bcd77..fba3ba062b 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_time.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/time
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/time by iffe version 2012-07-17 : : */
+
#ifndef _def_time_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmlib b/usr/src/cmd/ast/libast/sparc/FEATURE/tmlib
index 591ced792c..6162b62ea8 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmlib
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tmlib
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tmlib by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tmlib by iffe version 2012-07-17 : : */
+
#ifndef _def_tmlib_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/tmx.h b/usr/src/cmd/ast/libast/sparc/FEATURE/tmx
index 01af898e97..6ad4804a4b 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/tmx.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tmx
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tmx by iffe version 2012-07-17 : : */
+
#ifndef _TMX_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_tty.h b/usr/src/cmd/ast/libast/sparc/FEATURE/tty
index c4ec9d9e0d..1d39c122ed 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_tty.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tty
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/tty by iffe version 2012-07-17 : : */
#ifndef _def_tty_ast
#define _def_tty_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/tv.h b/usr/src/cmd/ast/libast/sparc/FEATURE/tv
index d51d0f4b18..0caab4a20a 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/tv.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tv
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tv by iffe version 2012-07-17 : : */
+
#ifndef _TV_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tvlib b/usr/src/cmd/ast/libast/sparc/FEATURE/tvlib
index dced222619..3121038298 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tvlib
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/tvlib
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tvlib by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/tvlib by iffe version 2012-07-17 : : */
#ifndef _def_tvlib_ast
#define _def_tvlib_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/uwin b/usr/src/cmd/ast/libast/sparc/FEATURE/uwin
new file mode 100644
index 0000000000..66dcc8c3cb
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/uwin
@@ -0,0 +1,37 @@
+/* : : generated from contrib/ast/src/lib/libast/features/uwin by iffe version 2012-07-17 : : */
+#ifndef _def_uwin_ast
+#define _def_uwin_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_a64l 1 /* a64l() in default lib(s) */
+#define _lib_acosh 1 /* acosh() in default lib(s) */
+#define _lib_asinh 1 /* asinh() in default lib(s) */
+#define _lib_atanh 1 /* atanh() in default lib(s) */
+#define _lib_cbrt 1 /* cbrt() in default lib(s) */
+#define _lib_ceil 1 /* ceil() in default lib(s) */
+#define _lib_crypt 1 /* crypt() in default lib(s) */
+#define _lib_erf 1 /* erf() in default lib(s) */
+#define _lib_exp 1 /* exp() in default lib(s) */
+#define _lib_expm1 1 /* expm1() in default lib(s) */
+#define _lib_floor 1 /* floor() in default lib(s) */
+#define _lib_gamma 1 /* gamma() in default lib(s) */
+#define _lib_getpass 1 /* getpass() in default lib(s) */
+#define _lib_lgamma 1 /* lgamma() in default lib(s) */
+#define _lib_log 1 /* log() in default lib(s) */
+#define _lib_log1p 1 /* log1p() in default lib(s) */
+#define _lib_random 1 /* random() in default lib(s) */
+#define _lib_rcmd 1 /* rcmd() in default lib(s) */
+#define _lib_rint 1 /* rint() in default lib(s) */
+#define _lib_srand48 1 /* srand48() in default lib(s) */
+#define _lib_copysign 1 /* copysign() in default lib(s) */
+#define _lib_logb 1 /* logb() in default lib(s) */
+#define _lib_finite 1 /* finite() in default lib(s) */
+#define _lib_sqrt 1 /* sqrt() in default lib(s) */
+#define _lib_ilogb 1 /* ilogb() in default lib(s) */
+#define _lib_remainder 1 /* remainder() in default lib(s) */
+#define _lib_scalb 1 /* scalb() in default lib(s) */
+#define _lib__finite 1 /* _finite() in default lib(s) */
+#define _lib__scalb 1 /* _scalb() in default lib(s) */
+#define _dat__iob 1 /* _iob in default lib(s) */
+#define stricmp strcasecmp
+
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_vfork.h b/usr/src/cmd/ast/libast/sparc/FEATURE/vfork
index df49937dbb..b555d25c80 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_vfork.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/vfork
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/vfork by iffe version 2012-07-17 : : */
+
#ifndef _def_vfork_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,6 +63,6 @@
#define _def_vfork_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
+extern __MANGLE__ pid_t vfork(void) __attribute__((__returns_twice__));
+#pragma unknown_control_flow(vfork)
#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vmalloc b/usr/src/cmd/ast/libast/sparc/FEATURE/vmalloc
index f2fd994c52..0be84333de 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vmalloc
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/vmalloc
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/vmalloc by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/vmalloc by iffe version 2012-07-17 : : */
#ifndef _def_vmalloc_ast
#define _def_vmalloc_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_wait.h b/usr/src/cmd/ast/libast/sparc/FEATURE/wait
index 6cd28b8bbf..36ae8feef1 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_wait.h
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/wait
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/wait by iffe version 2012-07-17 : : */
#ifndef _def_wait_ast
#define _def_wait_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wchar b/usr/src/cmd/ast/libast/sparc/FEATURE/wchar
index 3525ac9f82..2616f8f168 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wchar
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/wchar
@@ -1,8 +1,8 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
+/* : : generated from contrib/ast/src/lib/libast/features/wchar by iffe version 2012-07-17 : : */
+
+
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
# if defined(__cplusplus)
@@ -60,9 +60,10 @@
#if !defined(__LINKAGE__)
#define __LINKAGE__ /* 2004-08-11 transition */
#endif
-
-#define _def_wchar_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
+#ifndef _AST_WCHAR_H
+#define _AST_WCHAR_H 1
+
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
#define _hdr_stdio 1 /* #include <stdio.h> ok */
#define _hdr_wchar 1 /* #include <wchar.h> ok */
@@ -85,12 +86,13 @@
#include <ast_common.h>
#include <stdio.h>
#endif
+
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#include <wctype.h> /* <wchar.h> includes <wctype.h> */
+
#if _hdr_wchar && defined(_nxt_wchar)
#include <../include/wchar.h> /* the native wchar.h */
#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
#ifndef WEOF
#define WEOF (-1)
@@ -184,4 +186,13 @@ extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
+
+#else
+
+/* on some systems <wchar.h> is included multiple times with multiple effects */
+
+#if _hdr_wchar && defined(_nxt_wchar)
+#include <../include/wchar.h> /* the native wchar.h */
+#endif
+
#endif
diff --git a/usr/src/cmd/ast/libast/sparc/FEATURE/wctype b/usr/src/cmd/ast/libast/sparc/FEATURE/wctype
new file mode 100644
index 0000000000..0edae79c6a
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/FEATURE/wctype
@@ -0,0 +1,75 @@
+
+/* : : generated by proto : : */
+/* : : generated from contrib/ast/src/lib/libast/features/wctype by iffe version 2012-07-17 : : */
+
+#ifndef _def_wctype_ast
+#if !defined(__PROTO__)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
+# if defined(__cplusplus)
+# define __LINKAGE__ "C"
+# else
+# define __LINKAGE__
+# endif
+# define __STDARG__
+# define __PROTO__(x) x
+# define __OTORP__(x)
+# define __PARAM__(n,o) n
+# if !defined(__STDC__) && !defined(__cplusplus)
+# if !defined(c_plusplus)
+# define const
+# endif
+# define signed
+# define void int
+# define volatile
+# define __V_ char
+# else
+# define __V_ void
+# endif
+# else
+# define __PROTO__(x) ()
+# define __OTORP__(x) x
+# define __PARAM__(n,o) o
+# define __LINKAGE__
+# define __V_ char
+# define const
+# define signed
+# define void int
+# define volatile
+# endif
+# define __MANGLE__ __LINKAGE__
+# if defined(__cplusplus) || defined(c_plusplus)
+# define __VARARG__ ...
+# else
+# define __VARARG__
+# endif
+# if defined(__STDARG__)
+# define __VA_START__(p,a) va_start(p,a)
+# else
+# define __VA_START__(p,a) va_start(p)
+# endif
+# if !defined(__INLINE__)
+# if defined(__cplusplus)
+# define __INLINE__ extern __MANGLE__ inline
+# else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define __INLINE__ __inline
+# endif
+# endif
+# endif
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+
+#define _def_wctype_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _nxt_wctype <../include/wctype.h> /* include path for the native <wctype.h> */
+#define _nxt_wctype_str "../include/wctype.h" /* include string for the native <wctype.h> */
+#if _hdr_wctype && defined(_nxt_wctype)
+#include <../include/wctype.h> /* the native wctype.h */
+#endif
+
+#undef iswalpha
+
+#define iswalpha(w) (ast.mb_alpha?(*ast.mb_alpha)(w):isalpha(w))
+#endif
diff --git a/usr/src/lib/libast/sparc/Makefile b/usr/src/cmd/ast/libast/sparc/Makefile
index 96eee28151..62a462a206 100644
--- a/usr/src/lib/libast/sparc/Makefile
+++ b/usr/src/cmd/ast/libast/sparc/Makefile
@@ -23,18 +23,15 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Platform-specific config
# Note that "HOSTTYPE" matches the value used by AT&T upstream.
-ASTPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"'
+ASTPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"'
# platform-specific sources
-OBJECTS = \
- sparc/src/lib/libast/conftab.o \
- sparc/src/lib/libast/lctab.o
-OBJDIRS = \
- sparc/src/lib/libast
+OBJECTS= conftab.o lctab.o
include ../Makefile.com
diff --git a/usr/src/cmd/ast/libast/sparc/Makefile.iffe b/usr/src/cmd/ast/libast/sparc/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/cmd/ast/libast/sparc/conflim.h b/usr/src/cmd/ast/libast/sparc/conflim.h
new file mode 100644
index 0000000000..396c91cbbb
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/conflim.h
@@ -0,0 +1,105 @@
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
+
+/*
+ * supplemental <limits.h> values
+ */
+
+printf("#ifndef CHAR_BIT\n");
+printf("#define CHAR_BIT 8\n");
+printf("#endif\n");
+printf("#ifndef CHAR_MAX\n");
+printf("#define CHAR_MAX 127\n");
+printf("#endif\n");
+printf("#ifndef CHAR_MIN\n");
+printf("#define CHAR_MIN -128\n");
+printf("#endif\n");
+printf("#ifndef CLOCKS_PER_SEC\n");
+printf("#define CLOCKS_PER_SEC 1000000\n");
+printf("#endif\n");
+printf("#ifndef INT_MIN\n");
+printf("#define INT_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef LLONG_MAX\n");
+printf("#define LLONG_MAX 9223372036854775807\n");
+printf("#endif\n");
+printf("#ifndef LLONG_MIN\n");
+printf("#define LLONG_MIN -9223372036854775808\n");
+printf("#endif\n");
+printf("#ifndef LONG_MAX\n");
+printf("#define LONG_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef LONG_MIN\n");
+printf("#define LONG_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef MB_LEN_MAX\n");
+printf("#define MB_LEN_MAX 5\n");
+printf("#endif\n");
+printf("#ifndef OPEN_MAX_CEIL\n");
+printf("#ifndef OPEN_MAX\n");
+printf("#define OPEN_MAX %ld\n", OPEN_MAX);
+printf("#endif\n");
+printf("#define OPEN_MAX_CEIL OPEN_MAX\n");
+printf("#endif\n");
+printf("#ifndef PTHREAD_STACK_MIN\n");
+printf("#define PTHREAD_STACK_MIN 4096\n");
+printf("#endif\n");
+printf("#ifndef PTRDIFF_MAX\n");
+printf("#define PTRDIFF_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef PTRDIFF_MIN\n");
+printf("#define PTRDIFF_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef SCHAR_MAX\n");
+printf("#define SCHAR_MAX 127\n");
+printf("#endif\n");
+printf("#ifndef SCHAR_MIN\n");
+printf("#define SCHAR_MIN -128\n");
+printf("#endif\n");
+printf("#ifndef SHRT_MIN\n");
+printf("#define SHRT_MIN -32768\n");
+printf("#endif\n");
+printf("#ifndef SIG_ATOMIC_MAX\n");
+printf("#define SIG_ATOMIC_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef SIG_ATOMIC_MIN\n");
+printf("#define SIG_ATOMIC_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef SIZE_MAX\n");
+printf("#ifndef UINT_MAX\n");
+printf("#define UINT_MAX %lu\n", UINT_MAX);
+printf("#endif\n");
+printf("#define SIZE_MAX UINT_MAX\n");
+printf("#endif\n");
+printf("#ifndef SSIZE_MAX\n");
+printf("#ifndef INT_MAX\n");
+printf("#define INT_MAX %ld\n", INT_MAX);
+printf("#endif\n");
+printf("#define SSIZE_MAX INT_MAX\n");
+printf("#endif\n");
+printf("#ifndef TMP_MAX\n");
+printf("#define TMP_MAX 17576\n");
+printf("#endif\n");
+printf("#ifndef UCHAR_MAX\n");
+printf("#define UCHAR_MAX 255\n");
+printf("#endif\n");
+printf("#ifndef ULLONG_MAX\n");
+printf("#define ULLONG_MAX 18446744073709551615\n");
+printf("#endif\n");
+printf("#ifndef ULONG_MAX\n");
+printf("#define ULONG_MAX 4294967295\n");
+printf("#endif\n");
+printf("#ifndef USHRT_MAX\n");
+printf("#define USHRT_MAX 65535\n");
+printf("#endif\n");
+printf("#ifndef WCHAR_MAX\n");
+printf("#define WCHAR_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef WCHAR_MIN\n");
+printf("#define WCHAR_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef WINT_MAX\n");
+printf("#define WINT_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef WINT_MIN\n");
+printf("#define WINT_MIN -2147483648\n");
+printf("#endif\n");
diff --git a/usr/src/lib/libast/i386/src/lib/libast/conftab.c b/usr/src/cmd/ast/libast/sparc/conftab.c
index 376d87d022..3fda0c607d 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/conftab.c
+++ b/usr/src/cmd/ast/libast/sparc/conftab.c
@@ -10,7 +10,7 @@
#include "FEATURE/param"
#include "conftab.h"
-/* : : generated by conf from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/comp/conf.tab : : */
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
/*
* prefix strings -- the first few are indexed by Conf_t.standard
@@ -37,7 +37,7 @@ const Prefix_t prefix[] =
"SI", 2, CONF_SVID, CONF_sysinfo,
};
-int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
+const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
/*
* conf strings sorted in ascending order
@@ -235,7 +235,7 @@ const Conf_t conf[] =
{ "PBS_MESSAGE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_MESSAGE },
{ "PBS_TRACK", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_TRACK },
{ "PHYS_PAGES", { 0ULL, 0 }, { 0ULL, 0 }, 0, CONF_SUN, 1, CONF_sysconf, _SC_PHYS_PAGES },
-{ "PID_MAX", { 0ULL, 0 }, { 30000ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 },
+{ "PID_MAX", { 0ULL, 0 }, { 999999ULL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 },
{ "PII", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
{ "PII_INTERNET", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
{ "PII_INTERNET_DGRAM", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
@@ -282,6 +282,7 @@ const Conf_t conf[] =
{ "SEMAPHORES", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SEMAPHORES },
{ "SEM_NSEMS_MAX", { 0ULL, 0 }, { _POSIX_SEM_NSEMS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SEM_NSEMS_MAX },
{ "SEM_VALUE_MAX", { 0ULL, 0 }, { _POSIX_SEM_VALUE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SEM_VALUE_MAX },
+{ "SF_BUFSIZE", { 0ULL, 0 }, { 0ULL, 0 }, CONF_MINMAX|CONF_UNDERSCORE, CONF_AST, 1, CONF_nop, -1 },
{ "SH", { 0, 0 }, { 0, "/bin/sh" }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_AST, 1, CONF_confstr, -1 },
{ "SHARED_MEMORY_OBJECTS", { 0ULL, 0 }, { 0ULL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SHARED_MEMORY_OBJECTS },
{ "SHELL", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SHELL },
@@ -389,4 +390,4 @@ const Conf_t conf[] =
{ "XPG4", { 0ULL, 0 }, { 0ULL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 },
};
-int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
+const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/conftab.h b/usr/src/cmd/ast/libast/sparc/conftab.h
index 05124ead5b..a15714e8cb 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/conftab.h
+++ b/usr/src/cmd/ast/libast/sparc/conftab.h
@@ -6,7 +6,7 @@
#endif
#include <sys/systeminfo.h>
-/* : : generated by conf from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/comp/conf.tab : : */
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
#if !defined(const) && !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus)
#define const
@@ -86,9 +86,9 @@ typedef struct Prefix_s
} Prefix_t;
extern const Conf_t conf[];
-extern int conf_elements;
+extern const int conf_elements;
extern const Prefix_t prefix[];
-extern int prefix_elements;
+extern const int prefix_elements;
#endif
diff --git a/usr/src/cmd/ast/libast/sparc/lc.h b/usr/src/cmd/ast/libast/sparc/lc.h
new file mode 100644
index 0000000000..024f410dfc
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparc/lc.h
@@ -0,0 +1,131 @@
+/* : : generated by cmd/ast/tools/lcgen : : */
+#pragma prototyped
+
+#ifndef _LC_H
+#define _LC_H 1
+
+#include <ast.h>
+
+#define LC_abbreviated 0x00001
+#define LC_checked 0x00002
+#define LC_debug 0x00004
+#define LC_default 0x00008
+#define LC_defined 0x00010
+#define LC_local 0x00020
+#define LC_primary 0x00040
+#define LC_qualified 0x00080
+#define LC_undefined 0x00100
+#define LC_utf8 0x00200
+#define LC_verbose 0x00400
+#define LC_setlocale 0x10000
+#define LC_setenv 0x20000
+#define LC_user 0x40000
+
+#define LC_language_attribute_max 2
+#define LC_territory_language_max 4
+
+struct Lc_s;
+
+typedef struct Lc_info_s
+{
+ const struct Lc_s* lc;
+ unsigned long number;
+ void* data;
+} Lc_info_t;
+
+typedef struct Lc_attribute_s
+{
+ const char* name;
+ unsigned long flags;
+ unsigned long index;
+} Lc_attribute_t;
+
+typedef struct Lc_charset_s
+{
+ const char* code;
+ const char* alternates;
+ const char* ms;
+ unsigned long index;
+} Lc_charset_t;
+
+typedef struct Lc_language_s
+{
+ const char* code;
+ const char* name;
+ const char* alternates;
+ const Lc_charset_t* charset;
+ unsigned long flags;
+ unsigned long index;
+ const Lc_attribute_t* attributes[LC_language_attribute_max];
+} Lc_language_t;
+
+typedef struct Lc_territory_s
+{
+ const char* code;
+ const char* name;
+ unsigned long flags;
+ unsigned long index;
+ const Lc_language_t* languages[LC_territory_language_max];
+#ifdef _LC_TERRITORY_PRIVATE_
+ _LC_TERRITORY_PRIVATE_
+#endif
+} Lc_territory_t;
+
+typedef struct Lc_map_s
+{
+ const char* code;
+ const Lc_language_t* language;
+ const Lc_territory_t* territory;
+ const Lc_charset_t* charset;
+ const Lc_attribute_t* attribute;
+} Lc_map_t;
+
+typedef struct Lc_attribute_list_s
+{
+ struct Lc_attribute_list_s* next;
+ const Lc_attribute_t* attribute;
+} Lc_attribute_list_t;
+
+typedef struct Lc_s
+{
+ const char* name;
+ const char* code;
+ const Lc_language_t* language;
+ const Lc_territory_t* territory;
+ const Lc_charset_t* charset;
+ const Lc_attribute_list_t* attributes;
+ unsigned long flags;
+ unsigned long index;
+#ifdef _LC_PRIVATE_
+ _LC_PRIVATE_
+#endif
+} Lc_t;
+
+struct Lc_category_s;
+
+typedef int (*Lc_category_set_f)(struct Lc_category_s*);
+
+typedef struct Lc_category_s
+{
+ const char* name;
+ int external;
+ int internal;
+ Lc_category_set_f setf;
+ Lc_t* prev;
+ unsigned int flags;
+} Lc_category_t;
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern size_t lccanon(Lc_t*, unsigned long flags, char*, size_t);
+extern Lc_category_t* lccategories(void);
+extern int lcindex(int, int);
+extern Lc_info_t* lcinfo(int);
+extern Lc_t* lcmake(const char*);
+extern Lc_t* lcscan(Lc_t*);
+
+#undef extern
+
+#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/lctab.c b/usr/src/cmd/ast/libast/sparc/lctab.c
index 4927e1fd3a..2afc20e2b5 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/lctab.c
+++ b/usr/src/cmd/ast/libast/sparc/lctab.c
@@ -1,4 +1,4 @@
-/* : : generated by ./lcgen : : */
+/* : : generated by cmd/ast/tools/lcgen : : */
#include "lclib.h"
#include "lclang.h"
@@ -1177,6 +1177,7 @@ const Lc_territory_t lc_territories[] =
{
{"C","C",LC_default,0,&lc_languages[0],0,0,0,0,0,0,0,},
{"debug","debug",LC_debug,0,&lc_languages[1],0,0,0,0,0,0,0,},
+{"eu","euro",0,0,&lc_languages[0],0,0,0,0,0,0,0,},
{"al","albania",0,
#ifdef CTRY_ALBANIA
CTRY_ALBANIA,
@@ -2624,11 +2625,11 @@ SUBLANG_ENGLISH_ZIMBABWE,
const Lc_map_t lc_maps[] =
{
-{"enu",&lc_languages[26],&lc_territories[93],&lc_charsets[0],0},
-{"enz",&lc_languages[26],&lc_territories[68],&lc_charsets[0],0},
-{"esm",&lc_languages[28],&lc_territories[63],&lc_charsets[0],0},
-{"esn",&lc_languages[28],&lc_territories[30],&lc_charsets[0],&attribute_es[1]},
-{"esp",&lc_languages[28],&lc_territories[30],&lc_charsets[0],&attribute_es[0]},
-{"usa",&lc_languages[26],&lc_territories[93],&lc_charsets[0],0},
+{"enu",&lc_languages[26],&lc_territories[94],&lc_charsets[0],0},
+{"enz",&lc_languages[26],&lc_territories[69],&lc_charsets[0],0},
+{"esm",&lc_languages[28],&lc_territories[64],&lc_charsets[0],0},
+{"esn",&lc_languages[28],&lc_territories[31],&lc_charsets[0],&attribute_es[1]},
+{"esp",&lc_languages[28],&lc_territories[31],&lc_charsets[0],&attribute_es[0]},
+{"usa",&lc_languages[26],&lc_territories[94],&lc_charsets[0],0},
0
};
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/align.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/align
index 26afb86c76..228de042de 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/align.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/align
@@ -1,12 +1,11 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/align.c by iffe version 2012-07-17 : : */
#ifndef _def_align_ast
#define _def_align_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
+#define ALIGN_INTEGRAL uintptr_t
+#define ALIGN_INTEGER(x) ((char*)(x)-(char*)0)
#define ALIGN_POINTER(x) ((char*)(x))
#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/api b/usr/src/cmd/ast/libast/sparcv9/FEATURE/api
new file mode 100644
index 0000000000..7be5ba335f
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/api
@@ -0,0 +1,89 @@
+/* : : generated from contrib/ast/src/lib/libast/features/api by iffe version 2012-07-17 : : */
+#ifndef _AST_API_H
+#define _AST_API_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _AST_VERSION AST_VERSION /* pre-20100601 compatibility */
+
+#define AST_VERSION 20111111
+#define ASTAPI(rel) ( _BLD_ast || !_API_ast || _API_ast >= rel )
+
+#if !defined(_API_ast) && defined(_API_DEFAULT)
+#define _API_ast _API_DEFAULT
+#endif
+
+#if ASTAPI(20120411)
+#undef cmdopen
+#define cmdopen cmdopen_20120411
+#elif _API_ast >= 20110505
+#undef cmdopen
+#define cmdopen cmdopen_20110505
+#endif
+
+#if ASTAPI(20100601)
+#undef pathaccess
+#define pathaccess pathaccess_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathcanon
+#define pathcanon pathcanon_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathcat
+#define pathcat pathcat_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathkey
+#define pathkey pathkey_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathpath
+#define pathpath pathpath_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathprobe
+#define pathprobe pathprobe_20100601
+#endif
+
+#if ASTAPI(20100601)
+#undef pathrepl
+#define pathrepl pathrepl_20100601
+#endif
+
+#if ASTAPI(20120528)
+#undef regexec
+#define regexec regexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regnexec
+#define regnexec regnexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regrexec
+#define regrexec regrexec_20120528
+#endif
+
+#if ASTAPI(20120528)
+#undef regsubexec
+#define regsubexec regsubexec_20120528
+#endif
+
+#if ASTAPI(20000308)
+#undef sfkeyprintf
+#define sfkeyprintf sfkeyprintf_20000308
+#endif
+
+#if ASTAPI(20120528)
+#undef strgrpmatch
+#define strgrpmatch strgrpmatch_20120528
+#endif
+
+#define _API_ast_MAP "cmdopen_20120411 cmdopen_20110505 pathaccess_20100601 pathcanon_20100601 pathcat_20100601 pathkey_20100601 pathpath_20100601 pathprobe_20100601 pathrepl_20100601 regexec_20120528 regnexec_20120528 regrexec_20120528 regsubexec_20120528 sfkeyprintf_20000308 strgrpmatch_20120528"
+
+#endif
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/aso b/usr/src/cmd/ast/libast/sparcv9/FEATURE/aso
new file mode 100644
index 0000000000..8baa447c72
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/aso
@@ -0,0 +1,24 @@
+/* : : generated from contrib/ast/src/lib/libast/features/aso by iffe version 2012-07-17 : : */
+#ifndef _def_aso_ast
+#define _def_aso_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* gcc 4.1+ 64 bit memory atomic operations model */
+#define _aso_cas8(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc8(p) __sync_fetch_and_add(p,1)
+#define _aso_dec8(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas16(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc16(p) __sync_fetch_and_add(p,1)
+#define _aso_dec16(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas32(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc32(p) __sync_fetch_and_add(p,1)
+#define _aso_dec32(p) __sync_fetch_and_sub(p,1)
+#define _aso_cas64(p,o,n) __sync_val_compare_and_swap(p,o,n)
+#define _aso_inc64(p) __sync_fetch_and_add(p,1)
+#define _aso_dec64(p) __sync_fetch_and_sub(p,1)
+#if _ast_sizeof_pointer == 8
+#define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint64_t)o,(uint64_t)n))
+#else
+#define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint32_t)o,(uint32_t)n))
+#endif
+
+#endif
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/asometh b/usr/src/cmd/ast/libast/sparcv9/FEATURE/asometh
new file mode 100644
index 0000000000..c69b510fca
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/asometh
@@ -0,0 +1,7 @@
+/* : : generated from contrib/ast/src/lib/libast/features/asometh by iffe version 2012-07-17 : : */
+#ifndef _def_asometh_ast
+#define _def_asometh_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _aso_fcntl 1 /* fcntl(F_SETLCK[W]) work */
+#define _aso_semaphore 1 /* semget semop semctl work */
+#endif
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/botch b/usr/src/cmd/ast/libast/sparcv9/FEATURE/botch
new file mode 100644
index 0000000000..5938177616
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/botch
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/botch.c by iffe version 2012-07-17 : : */
+#ifndef _def_botch_ast
+#define _def_botch_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_ccode.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/ccode
index 1b67f360b9..30603c443a 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_ccode.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/ccode
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/ccode by iffe version 2012-07-17 : : */
#ifndef _def_ccode_ast
#define _def_ccode_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/common b/usr/src/cmd/ast/libast/sparcv9/FEATURE/common
index ff813fbd2c..286e7ac5b7 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/common
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/common
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/common by iffe version 2012-07-17 : : */
#ifndef _AST_COMMON_H
#define _AST_COMMON_H 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -15,6 +15,8 @@
#define _typ_long_double 1 /* long double is a type */
#define _typ_size_t 1 /* size_t is a type */
#define _typ_ssize_t 1 /* ssize_t is a type */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _typ___va_list 1 /* __va_list is a type */
#define _sys_stat 1 /* #include <sys/stat.h> ok */
#define _sys_socket 1 /* #include <sys/socket.h> ok */
#define _std_proto 1 /* standard C prototypes ok */
@@ -64,7 +66,7 @@
# define _NIL_(x) ((x)0)
#endif
-/* __INLINE__ is the inline keyword */
+/* __INLINE__, if defined, is the inline keyword */
#if !defined(__INLINE__) && defined(__cplusplus)
# define __INLINE__ inline
#endif
@@ -140,6 +142,15 @@
#define _ast_intmax_long 1
#define _ast_intswap 0
+#define _ast_sizeof_short 2 /* sizeof(short) */
+#define _ast_sizeof_int 4 /* sizeof(int) */
+#define _ast_sizeof_long 8 /* sizeof(long) */
+#define _ast_sizeof_size_t 8 /* sizeof(size_t) */
+#define _ast_sizeof_pointer 8 /* sizeof(pointer) */
+#define _ast_sizeof_float 4 /* sizeof(float) */
+#define _ast_sizeof_double 8 /* sizeof(double) */
+#define _ast_sizeof_long_double 16 /* sizeof(long_double) */
+
#define _ast_flt4_t float
#define _ast_flt8_t double
#define _ast_flt16_t long double
@@ -154,6 +165,7 @@
#define _typ_uint64_t 1 /* uint64_t is a type */
#define _typ_intmax_t 1 /* intmax_t is a type */
#define _typ_uintmax_t 1 /* uintmax_t is a type */
+#define _typ_uintptr_t 1 /* uintptr_t is a type */
#ifndef va_listref
#ifndef va_start
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_dirent.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/dirent
index f814e1efb0..5e7e6cc7fc 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_dirent.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/dirent
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/dirent by iffe version 2012-07-17 : : */
+
#ifndef _def_dirent_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/eaccess b/usr/src/cmd/ast/libast/sparcv9/FEATURE/eaccess
new file mode 100644
index 0000000000..27de29021e
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/eaccess
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/eaccess by iffe version 2012-07-17 : : */
+#ifndef _def_eaccess_ast
+#define _def_eaccess_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/errno b/usr/src/cmd/ast/libast/sparcv9/FEATURE/errno
index 9e1c15edc0..1107a008c7 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/errno
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/errno
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/errno by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/errno by iffe version 2012-07-17 : : */
#ifndef _def_errno_ast
#define _def_errno_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/fcntl b/usr/src/cmd/ast/libast/sparcv9/FEATURE/fcntl
index a69d3aaeb6..9c2328f31b 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/fcntl
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/fcntl
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/fcntl.c by iffe version 2012-07-17 : : */
#ifndef _def_fcntl_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_fcntl_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
#if _typ_off64_t
#undef off_t
@@ -83,7 +83,9 @@
#include <fcntl.h>
#include <sys/mman.h>
+#define F_dupfd_cloexec F_DUPFD_CLOEXEC
#define O_BINARY 0
+#define O_cloexec O_CLOEXEC
#define O_TEMPORARY 0
#define O_TEXT 0
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/float b/usr/src/cmd/ast/libast/sparcv9/FEATURE/float
index a2ff3da6fe..121f02e32d 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/float
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/float
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/float by iffe version 2012-07-17 : : */
+
#ifndef _def_float_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -68,83 +68,86 @@
#define _hdr_math 1 /* #include <math.h> ok */
#define _hdr_values 1 /* #include <values.h> ok */
#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
#define _lib_frexp 1 /* frexp() in default lib(s) */
#define _lib_frexpl 1 /* frexpl() in default lib(s) */
#define _lib_ldexp 1 /* ldexp() in default lib(s) */
#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
#define _lib_copysign 1 /* copysign() in default lib(s) */
#define _lib_copysignl 1 /* copysignl() in default lib(s) */
+#define _npt_finite 1 /* finite() needs a prototype */
+#define _npt_finitel 1 /* finitel() needs a prototype */
+#define _npt_isinfl 1 /* isinfl() needs a prototype */
+#define _lib_fpclassify 1 /* fpclassify present and works */
+#define _lib_isinf 1 /* isinf present and works */
+#define _lib_isnan 1 /* isnan present and works */
+#define _lib_signbit 1 /* signbit present and works */
#include <ast_common.h>
#include <float.h>
#include <math.h>
#ifndef FLT_DIG
-#define FLT_DIG 6
+#define FLT_DIG 6
#endif
#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
+#define FLT_MAX 3.4028234663852885981170E+38F
#endif
#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
+#define FLT_MAX_10_EXP (+38)
#endif
#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
+#define FLT_MAX_EXP (+128)
#endif
#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
+#define FLT_MIN 1.1754943508222875079688E-38F
#endif
#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
+#define FLT_MIN_10_EXP (-37)
#endif
#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
+#define FLT_MIN_EXP (-125)
#endif
#ifndef DBL_DIG
-#define DBL_DIG 15
+#define DBL_DIG 15
#endif
#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
+#define DBL_MAX 1.7976931348623157081452E+308
#endif
#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
+#define DBL_MAX_10_EXP (+308)
#endif
#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
+#define DBL_MAX_EXP (+1024)
#endif
#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
+#define DBL_MIN 2.2250738585072013830903E-308
#endif
#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
+#define DBL_MIN_10_EXP (-307)
#endif
#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
+#define DBL_MIN_EXP (-1021)
#endif
#ifndef LDBL_DIG
-#define LDBL_DIG 33
+#define LDBL_DIG 33
#endif
#ifndef LDBL_MAX
-#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
+#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
#endif
#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
+#define LDBL_MAX_10_EXP (+4932)
#endif
#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
+#define LDBL_MAX_EXP (+16384)
#endif
#ifndef LDBL_MIN
-#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
+#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
#endif
#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
+#define LDBL_MIN_10_EXP (-4931)
#endif
#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
+#define LDBL_MIN_EXP (-16381)
#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_fs.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/fs
index e8372a1398..e013cccbf6 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_fs.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/fs
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/fs by iffe version 2012-07-17 : : */
+
#ifndef _def_fs_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -76,6 +76,8 @@ __STDPP__directive pragma pp:noinitial
#define _hdr_stdio 1 /* #include <stdio.h> ok */
#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
+#define _sys_param 1 /* #include <sys/param.h> ok */
+#define _sys_ucred 1 /* #include <sys/ucred.h> ok */
#define _sys_mount 1 /* #include <sys/mount.h> ok */
#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
@@ -84,7 +86,6 @@ __STDPP__directive pragma pp:noinitial
#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
#define _lib_getmntent 1 /* getmntent() in default lib(s) */
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/hack b/usr/src/cmd/ast/libast/sparcv9/FEATURE/hack
new file mode 100644
index 0000000000..fbbaf3a275
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/hack
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/hack by iffe version 2012-07-17 : : */
+#ifndef _def_hack_ast
+#define _def_hack_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/iconv b/usr/src/cmd/ast/libast/sparcv9/FEATURE/iconv
index 81f5332030..f81d5fc8fa 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/iconv
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/iconv
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/iconv by iffe version 2012-07-17 : : */
+
#ifndef _def_iconv_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -73,11 +73,16 @@
#include <ccode.h>
#include <../include/iconv.h> /* the native iconv.h */
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
+#define ICONV_VERSION 20110111L
+
+#define ICONV_FATAL 0x02
+#define ICONV_OMIT 0x04
+
+#define CC_ICONV (-1)
+#define CC_UCS (-2)
+#define CC_SCU (-3)
+#define CC_UTF (-4)
+#define CC_UME (-5)
#ifndef _ICONV_LIST_PRIVATE_
#undef iconv_t
@@ -102,10 +107,23 @@
#define iconv_write _ast_iconv_write
#endif
+typedef int (*Iconv_error_f) __PROTO__((__V_*, __V_*, int, ...));
+
+typedef struct Iconv_disc_s
+{
+ uint32_t version;
+ Iconv_error_f errorf;
+ size_t errors;
+ uint32_t flags;
+ int fill;
+} Iconv_disc_t;
+
typedef Ccmap_t _ast_iconv_list_t;
typedef __V_* _ast_iconv_t;
typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
+#define iconv_init(d,e) (memset(d,0,sizeof(*(d))),(d)->version=ICONV_VERSION,(d)->errorf=(Iconv_error_f)(e),(d)->fill=(-1))
+
#if _BLD_ast && defined(__EXPORT__)
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__ __EXPORT__
@@ -117,12 +135,12 @@ extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
+extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, Iconv_disc_t*));
+extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, Iconv_disc_t*));
#else
#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
+extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, Iconv_disc_t*));
+extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, Iconv_disc_t*));
#endif
#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib b/usr/src/cmd/ast/libast/sparcv9/FEATURE/lib
index 0b290d868b..cab2bfea82 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/lib
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/lib by iffe version 2012-07-17 : : */
#ifndef _def_lib_ast
#define _def_lib_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -12,8 +12,9 @@
#define _hdr_spawn 1 /* #include <spawn.h> ok */
#define _hdr_syslog 1 /* #include <syslog.h> ok */
#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
+#define _hdr_wchar 1 /* #include <wchar.h> ok */
+#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _dat__tzname 1 /* _tzname in default lib(s) */
#define _dat_tzname 1 /* tzname in default lib(s) */
#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
@@ -120,6 +121,7 @@
#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
#define _mem_DIR 1 /* DIR is a non-opaque struct */
+#define _mem_dd_fd_DIR 1 /* dd_fd is a member of DIR */
#define _sys_filio 1 /* #include <sys/filio.h> ok */
#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
@@ -131,19 +133,22 @@
#define _sys_time 1 /* #include <sys/time.h> ok */
#define _sys_times 1 /* #include <sys/times.h> ok */
#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _typ_ino64_t 1 /* ino64_t is a type */
#define _typ_off64_t 1 /* off64_t is a type */
#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
#define _tst_errno 1 /* errno can be assigned */
#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
+#define _sys_select 1 /* #include <sys/select.h> ok */
#define _lib_select 1 /* select() has standard 5 arg interface */
+#define _sys_select 1 /* select() requires <sys/select.h> */
#define _pipe_rw 1 /* full duplex pipes */
#define _hdr_unistd 1 /* #include <unistd.h> ok */
#define _lib_vfork 1 /* vfork exists and it works */
#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
+#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
+#define _stream_peek 1 /* ioctl(I_PEEK) works on pipe() */
+#define _socket_peek 1 /* recv(MSG_PEEK) works on socketpair() */
#define _hdr_string 1 /* #include <string.h> ok */
#define _lib_memcmp 1 /* standard memcmp interface that works */
#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/libpath b/usr/src/cmd/ast/libast/sparcv9/FEATURE/libpath
index 9aefb9aa61..d272a4015d 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/libpath
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/libpath
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/libpath.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/libpath.sh by iffe version 2012-07-17 : : */
#ifndef _def_libpath_ast
#define _def_libpath_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_limits.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/limits
index 933d0a00a6..efe390eee9 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_limits.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/limits
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/limits.c by iffe version 2012-07-17 : : */
#ifndef _def_limits_ast
#define _def_limits_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/locale b/usr/src/cmd/ast/libast/sparcv9/FEATURE/locale
new file mode 100644
index 0000000000..1013f583b5
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/locale
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libast/features/locale by iffe version 2012-07-17 : : */
+#ifndef _def_locale_ast
+#define _def_locale_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _locale_utf8_str "UTF-8"
+#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/map b/usr/src/cmd/ast/libast/sparcv9/FEATURE/map
index 17de2eb4c1..30c7f4e2b5 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/map
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/map
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/map.c by iffe version 2012-07-17 : : */
#ifndef _def_map_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_map_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
/*
* prototypes provided for standard interfaces hijacked
@@ -445,6 +445,22 @@ extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
+#define cmdopen_20120411 _ast_cmdopen_20120411
+#define cmdopen_20110505 _ast_cmdopen_20110505
+#define pathaccess_20100601 _ast_pathaccess_20100601
+#define pathcanon_20100601 _ast_pathcanon_20100601
+#define pathcat_20100601 _ast_pathcat_20100601
+#define pathkey_20100601 _ast_pathkey_20100601
+#define pathpath_20100601 _ast_pathpath_20100601
+#define pathprobe_20100601 _ast_pathprobe_20100601
+#define pathrepl_20100601 _ast_pathrepl_20100601
+#define regexec_20120528 _ast_regexec_20120528
+#define regnexec_20120528 _ast_regnexec_20120528
+#define regrexec_20120528 _ast_regrexec_20120528
+#define regsubexec_20120528 _ast_regsubexec_20120528
+#define sfkeyprintf_20000308 _ast_sfkeyprintf_20000308
+#define strgrpmatch_20120528 _ast_strgrpmatch_20120528
+
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_mmap.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/mmap
index 78c444078c..12d991f9a6 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_mmap.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/mmap
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/mmap by iffe version 2012-07-17 : : */
#ifndef _def_mmap_ast
#define _def_mmap_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -7,7 +7,6 @@
#define _lib_mmap64 1 /* mmap64 interface and implementation work */
#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
/* some systems get it wrong but escape concise detection */
#ifndef _NO_MMAP
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_mode.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/mode
index 0aac69f173..f2ec3091fa 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_mode.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/mode
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/mode.c by iffe version 2012-07-17 : : */
#ifndef _def_mode_ast
#define _def_mode_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_ndbm.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/ndbm
index a699c646cd..0e55ff820d 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_ndbm.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/ndbm
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/ndbm by iffe version 2012-07-17 : : */
#ifndef _def_ndbm_ast
#define _def_ndbm_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_nl_types.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/nl_types
index 7202d7a419..d8c540626e 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_nl_types.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/nl_types
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/nl_types by iffe version 2012-07-17 : : */
+
#ifndef _def_nl_types_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/omitted b/usr/src/cmd/ast/libast/sparcv9/FEATURE/omitted
new file mode 100644
index 0000000000..201e737ea1
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/omitted
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/omitted by iffe version 2012-07-17 : : */
+#ifndef _def_omitted_ast
+#define _def_omitted_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/options b/usr/src/cmd/ast/libast/sparcv9/FEATURE/options
new file mode 100644
index 0000000000..6154a341b5
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/options
@@ -0,0 +1,5 @@
+/* : : generated from contrib/ast/src/lib/libast/features/options by iffe version 2012-07-17 : : */
+#ifndef _def_options_ast
+#define _def_options_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_param.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/param
index f8f80fe873..8c200b4462 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_param.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/param
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/param.sh by iffe version 2012-07-17 : : */
#ifndef _def_param_ast
#define _def_param_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/preroot b/usr/src/cmd/ast/libast/sparcv9/FEATURE/preroot
new file mode 100644
index 0000000000..36626fb242
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/preroot
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libast/features/preroot.sh by iffe version 2012-07-17 : : */
+#ifndef _def_preroot_ast
+#define _def_preroot_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* preroot not enabled */
+#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/prog b/usr/src/cmd/ast/libast/sparcv9/FEATURE/prog
index a1894f7e1c..592037efb7 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/prog
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/prog
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/prog by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/prog by iffe version 2012-07-17 : : */
#ifndef _def_prog_ast
#define _def_prog_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sfinit b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfinit
index 8a7df115a5..756d559262 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sfinit
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfinit
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/sfinit.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sfinit.c by iffe version 2012-07-17 : : */
#ifndef _def_sfinit_ast
#define _def_sfinit_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sfio b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfio
index 779757d315..7cad3472b6 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sfio
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sfio
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/sfio by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sfio by iffe version 2012-07-17 : : */
#ifndef _def_sfio_ast
#define _def_sfio_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -9,6 +9,7 @@
#define _sys_filio 1 /* #include <sys/filio.h> ok */
#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
#define _key_signed 1 /* signed is a reserved keyword */
+#define _ptr_bits 64
#define _more_void_int 1 /* voidptr is larger than int */
#define _more_long_int 1 /* long is larger than int */
#define _lib_cvt 1 /* native floating point conversions ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/sig.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sig
index 9504537d08..03020573f3 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/sig.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sig
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/sig.sh by iffe version 2012-07-17 : : */
#ifndef _def_sig_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,7 +62,7 @@
#define _def_sig_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
+
#define sig_info _sig_info_
#if defined(__STDPP__directive) && defined(__STDPP__hide)
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/siglist b/usr/src/cmd/ast/libast/sparcv9/FEATURE/siglist
index 7cc8e88654..7ac817cdd9 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/siglist
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/siglist
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/siglist by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/siglist by iffe version 2012-07-17 : : */
#ifndef _def_siglist_ast
#define _def_siglist_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
@@ -125,4 +125,7 @@
#if defined(SIGJVM2) && !defined(HAD_SIGJVM2)
0,"JVM2",SIGJVM2,
#endif
+#if defined(SIGINFO) && !defined(HAD_SIGINFO)
+0,"INFO",SIGINFO,
+#endif
#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/signal b/usr/src/cmd/ast/libast/sparcv9/FEATURE/signal
index b3a6b7f347..43b48f1dda 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/signal
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/signal
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/signal.c by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/signal.c by iffe version 2012-07-17 : : */
#ifndef _def_signal_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,8 +62,8 @@
#define _def_signal_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define SIG_MAX 48
+
+#define SIG_MAX 73
static const char* const sig_name[] =
{
@@ -108,10 +108,35 @@ static const char* const sig_name[] =
"XRES",
"JVM1",
"JVM2",
+ "INFO",
"RTMIN",
"RTMIN+1",
"RTMIN+2",
"RTMIN+3",
+ "RTMIN+4",
+ "RTMIN+5",
+ "RTMIN+6",
+ "RTMIN+7",
+ "RTMIN+8",
+ "RTMIN+9",
+ "RTMIN+10",
+ "RTMIN+11",
+ "RTMIN+12",
+ "RTMIN+13",
+ "RTMIN+14",
+ "RTMIN+15",
+ "RTMAX-15",
+ "RTMAX-14",
+ "RTMAX-13",
+ "RTMAX-12",
+ "RTMAX-11",
+ "RTMAX-10",
+ "RTMAX-9",
+ "RTMAX-8",
+ "RTMAX-7",
+ "RTMAX-6",
+ "RTMAX-5",
+ "RTMAX-4",
"RTMAX-3",
"RTMAX-2",
"RTMAX-1",
@@ -162,6 +187,7 @@ static const char* const sig_text[] =
"Resource Control Exceeded",
"Reserved for JVM 1",
"Reserved for JVM 2",
+ "Information Request",
"Realtime priority 0 (lo)",
"Realtime priority 1",
"Realtime priority 2",
@@ -169,7 +195,31 @@ static const char* const sig_text[] =
"Realtime priority 4",
"Realtime priority 5",
"Realtime priority 6",
- "Realtime priority 7 (hi)",
+ "Realtime priority 7",
+ "Realtime priority 8",
+ "Realtime priority 9",
+ "Realtime priority 10",
+ "Realtime priority 11",
+ "Realtime priority 12",
+ "Realtime priority 13",
+ "Realtime priority 14",
+ "Realtime priority 15",
+ "Realtime priority 16",
+ "Realtime priority 17",
+ "Realtime priority 18",
+ "Realtime priority 19",
+ "Realtime priority 20",
+ "Realtime priority 21",
+ "Realtime priority 22",
+ "Realtime priority 23",
+ "Realtime priority 24",
+ "Realtime priority 25",
+ "Realtime priority 26",
+ "Realtime priority 27",
+ "Realtime priority 28",
+ "Realtime priority 29",
+ "Realtime priority 30",
+ "Realtime priority 31 (hi)",
0
};
#endif
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/sizeof b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sizeof
new file mode 100644
index 0000000000..570d651f87
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sizeof
@@ -0,0 +1,10 @@
+/* : : generated from contrib/ast/src/lib/libast/features/sizeof by iffe version 2012-07-17 : : */
+#ifndef _def_sizeof_ast
+#define _def_sizeof_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _ast_sizeof_char 1
+#define _ast_sizeof_short 2
+#define _ast_sizeof_int 4
+#define _ast_sizeof_long 8
+#define _ast_sizeof_intmax_t 8
+#endif
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/standards b/usr/src/cmd/ast/libast/sparcv9/FEATURE/standards
new file mode 100644
index 0000000000..059f99e5bd
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/standards
@@ -0,0 +1,45 @@
+/* : : generated from contrib/ast/src/lib/libast/features/standards by iffe version 2012-07-17 : : */
+#ifndef _def_standards_ast
+#define _def_standards_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* _ALL_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works */
+#ifndef _ALL_SOURCE
+#define _ALL_SOURCE 1
+#endif
+#ifndef _POSIX_SOURCE
+#define _POSIX_SOURCE 1
+#endif
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 21000101L
+#endif
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 9900
+#endif
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+#ifndef __EXTENSIONS__
+#define __EXTENSIONS__ 1
+#endif
+
+#define _LIB_m 1 /* -lm is a library */
+/* _ISOC99_SOURCE plays nice */
+#ifndef _ISOC99_SOURCE
+#define _ISOC99_SOURCE 1
+#endif
+
+
+/*
+* this is a nasty game we all play to honor standards symbol visibility
+* it would help if all implementations had
+* _KITCHEN_SINK_SOURCE
+* that enabled all symbols from the latest implemented standards
+* that's probably the most useful but least portable request
+*/
+
+#if __MACH__
+#undef _POSIX_SOURCE
+#endif
+
+
+#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/stdio b/usr/src/cmd/ast/libast/sparcv9/FEATURE/stdio
index c1c31497f3..0694a40264 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/stdio
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/stdio
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/stdio by iffe version 2012-07-17 : : */
+
#ifndef _SFSTDIO_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -356,13 +356,13 @@ extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
__STDPP__directive pragma pp:initial
#endif
#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
+#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
#endif
#ifndef L_ctermid
-#define L_ctermid 9
+#define L_ctermid 9
#endif
#ifndef L_tmpnam
-#define L_tmpnam 25
+#define L_tmpnam 25
#endif
#if defined(__STDPP__directive) && defined(__STDPP__initial)
__STDPP__directive pragma pp:noinitial
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sys b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sys
index 9d631719b7..c02852888c 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sys
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/sys
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/sys by iffe version 2012-07-17 : : */
+
#ifndef _AST_SYS_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -73,9 +73,14 @@
#if !defined(_LARGEFILE_SOURCE)
#define _LARGEFILE_SOURCE 1
#endif
+#if !defined(_LARGE_FILE_API)
+#define _LARGE_FILE_API 1
+#endif
#else
#undef _LARGEFILE64_SOURCE
#undef _LARGEFILE_SOURCE
+#undef _LARGE_FILE_API
+#undef _typ_ino64_t
#undef _typ_off64_t
#undef _typ_struct_dirent64
#undef _lib_creat64
@@ -91,6 +96,9 @@
#undef _lib_statvfs64
#undef _lib_truncate64
#endif
+#if !_lib_readdir64
+#undef _typ_ino64_t
+#endif
#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
#endif
@@ -133,6 +141,7 @@
#define __MANGLE__ __LINKAGE__ __EXPORT__
#endif
extern __MANGLE__ void cfree __PROTO__((__V_*));
+extern __MANGLE__ size_t confstr __PROTO__((int, char*, size_t));
extern __MANGLE__ int eaccess __PROTO__((const char*, int));
extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/syscall b/usr/src/cmd/ast/libast/sparcv9/FEATURE/syscall
new file mode 100644
index 0000000000..0768fbae58
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/syscall
@@ -0,0 +1,10 @@
+/* : : generated from contrib/ast/src/lib/libast/features/syscall by iffe version 2012-07-17 : : */
+#ifndef _def_syscall_ast
+#define _def_syscall_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_sysgetcwd 1 /* syscall(SYS_getcwd,buf,len) implemented */
+#include <sys/syscall.h>
+
+#define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b)
+
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_time.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/time
index 46eef2afce..fba3ba062b 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_time.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/time
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/time by iffe version 2012-07-17 : : */
+
#ifndef _def_time_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmlib b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmlib
index 7d21e48f9b..6162b62ea8 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmlib
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmlib
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tmlib by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tmlib by iffe version 2012-07-17 : : */
+
#ifndef _def_tmlib_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/i386/src/lib/libast/tmx.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmx
index 55bc45db88..6ad4804a4b 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/tmx.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tmx
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tmx by iffe version 2012-07-17 : : */
+
#ifndef _TMX_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_tty.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tty
index 88985d2ab6..1d39c122ed 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_tty.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tty
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/tty by iffe version 2012-07-17 : : */
#ifndef _def_tty_ast
#define _def_tty_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/tv.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tv
index 0865fd4c4f..0caab4a20a 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/tv.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tv
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/tv by iffe version 2012-07-17 : : */
+
#ifndef _TV_H
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tvlib b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tvlib
index bd2469ae59..3121038298 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tvlib
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/tvlib
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tvlib by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/tvlib by iffe version 2012-07-17 : : */
#ifndef _def_tvlib_ast
#define _def_tvlib_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/uwin b/usr/src/cmd/ast/libast/sparcv9/FEATURE/uwin
new file mode 100644
index 0000000000..66dcc8c3cb
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/uwin
@@ -0,0 +1,37 @@
+/* : : generated from contrib/ast/src/lib/libast/features/uwin by iffe version 2012-07-17 : : */
+#ifndef _def_uwin_ast
+#define _def_uwin_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_a64l 1 /* a64l() in default lib(s) */
+#define _lib_acosh 1 /* acosh() in default lib(s) */
+#define _lib_asinh 1 /* asinh() in default lib(s) */
+#define _lib_atanh 1 /* atanh() in default lib(s) */
+#define _lib_cbrt 1 /* cbrt() in default lib(s) */
+#define _lib_ceil 1 /* ceil() in default lib(s) */
+#define _lib_crypt 1 /* crypt() in default lib(s) */
+#define _lib_erf 1 /* erf() in default lib(s) */
+#define _lib_exp 1 /* exp() in default lib(s) */
+#define _lib_expm1 1 /* expm1() in default lib(s) */
+#define _lib_floor 1 /* floor() in default lib(s) */
+#define _lib_gamma 1 /* gamma() in default lib(s) */
+#define _lib_getpass 1 /* getpass() in default lib(s) */
+#define _lib_lgamma 1 /* lgamma() in default lib(s) */
+#define _lib_log 1 /* log() in default lib(s) */
+#define _lib_log1p 1 /* log1p() in default lib(s) */
+#define _lib_random 1 /* random() in default lib(s) */
+#define _lib_rcmd 1 /* rcmd() in default lib(s) */
+#define _lib_rint 1 /* rint() in default lib(s) */
+#define _lib_srand48 1 /* srand48() in default lib(s) */
+#define _lib_copysign 1 /* copysign() in default lib(s) */
+#define _lib_logb 1 /* logb() in default lib(s) */
+#define _lib_finite 1 /* finite() in default lib(s) */
+#define _lib_sqrt 1 /* sqrt() in default lib(s) */
+#define _lib_ilogb 1 /* ilogb() in default lib(s) */
+#define _lib_remainder 1 /* remainder() in default lib(s) */
+#define _lib_scalb 1 /* scalb() in default lib(s) */
+#define _lib__finite 1 /* _finite() in default lib(s) */
+#define _lib__scalb 1 /* _scalb() in default lib(s) */
+#define _dat__iob 1 /* _iob in default lib(s) */
+#define stricmp strcasecmp
+
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_vfork.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/vfork
index aa9cea31e5..b555d25c80 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_vfork.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/vfork
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libast/features/vfork by iffe version 2012-07-17 : : */
+
#ifndef _def_vfork_ast
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,6 +63,6 @@
#define _def_vfork_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
+extern __MANGLE__ pid_t vfork(void) __attribute__((__returns_twice__));
+#pragma unknown_control_flow(vfork)
#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vmalloc b/usr/src/cmd/ast/libast/sparcv9/FEATURE/vmalloc
index 576f8a7d31..0be84333de 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vmalloc
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/vmalloc
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/vmalloc by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/vmalloc by iffe version 2012-07-17 : : */
#ifndef _def_vmalloc_ast
#define _def_vmalloc_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_wait.h b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wait
index 952ec382ee..36ae8feef1 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_wait.h
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wait
@@ -1,4 +1,4 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libast/features/wait by iffe version 2012-07-17 : : */
#ifndef _def_wait_ast
#define _def_wait_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/wchar b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wchar
index 388a042950..2616f8f168 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/wchar
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wchar
@@ -1,8 +1,8 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
+/* : : generated from contrib/ast/src/lib/libast/features/wchar by iffe version 2012-07-17 : : */
+
+
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
# if defined(__cplusplus)
@@ -60,9 +60,10 @@
#if !defined(__LINKAGE__)
#define __LINKAGE__ /* 2004-08-11 transition */
#endif
-
-#define _def_wchar_ast 1
#define _sys_types 1 /* #include <sys/types.h> ok */
+#ifndef _AST_WCHAR_H
+#define _AST_WCHAR_H 1
+
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
#define _hdr_stdio 1 /* #include <stdio.h> ok */
#define _hdr_wchar 1 /* #include <wchar.h> ok */
@@ -85,12 +86,13 @@
#include <ast_common.h>
#include <stdio.h>
#endif
+
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#include <wctype.h> /* <wchar.h> includes <wctype.h> */
+
#if _hdr_wchar && defined(_nxt_wchar)
#include <../include/wchar.h> /* the native wchar.h */
#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
#ifndef WEOF
#define WEOF (-1)
@@ -184,4 +186,13 @@ extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
#undef __MANGLE__
#define __MANGLE__ __LINKAGE__
+
+#else
+
+/* on some systems <wchar.h> is included multiple times with multiple effects */
+
+#if _hdr_wchar && defined(_nxt_wchar)
+#include <../include/wchar.h> /* the native wchar.h */
+#endif
+
#endif
diff --git a/usr/src/cmd/ast/libast/sparcv9/FEATURE/wctype b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wctype
new file mode 100644
index 0000000000..0edae79c6a
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/FEATURE/wctype
@@ -0,0 +1,75 @@
+
+/* : : generated by proto : : */
+/* : : generated from contrib/ast/src/lib/libast/features/wctype by iffe version 2012-07-17 : : */
+
+#ifndef _def_wctype_ast
+#if !defined(__PROTO__)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
+# if defined(__cplusplus)
+# define __LINKAGE__ "C"
+# else
+# define __LINKAGE__
+# endif
+# define __STDARG__
+# define __PROTO__(x) x
+# define __OTORP__(x)
+# define __PARAM__(n,o) n
+# if !defined(__STDC__) && !defined(__cplusplus)
+# if !defined(c_plusplus)
+# define const
+# endif
+# define signed
+# define void int
+# define volatile
+# define __V_ char
+# else
+# define __V_ void
+# endif
+# else
+# define __PROTO__(x) ()
+# define __OTORP__(x) x
+# define __PARAM__(n,o) o
+# define __LINKAGE__
+# define __V_ char
+# define const
+# define signed
+# define void int
+# define volatile
+# endif
+# define __MANGLE__ __LINKAGE__
+# if defined(__cplusplus) || defined(c_plusplus)
+# define __VARARG__ ...
+# else
+# define __VARARG__
+# endif
+# if defined(__STDARG__)
+# define __VA_START__(p,a) va_start(p,a)
+# else
+# define __VA_START__(p,a) va_start(p)
+# endif
+# if !defined(__INLINE__)
+# if defined(__cplusplus)
+# define __INLINE__ extern __MANGLE__ inline
+# else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define __INLINE__ __inline
+# endif
+# endif
+# endif
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+
+#define _def_wctype_ast 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _nxt_wctype <../include/wctype.h> /* include path for the native <wctype.h> */
+#define _nxt_wctype_str "../include/wctype.h" /* include string for the native <wctype.h> */
+#if _hdr_wctype && defined(_nxt_wctype)
+#include <../include/wctype.h> /* the native wctype.h */
+#endif
+
+#undef iswalpha
+
+#define iswalpha(w) (ast.mb_alpha?(*ast.mb_alpha)(w):isalpha(w))
+#endif
diff --git a/usr/src/lib/libast/sparcv9/Makefile b/usr/src/cmd/ast/libast/sparcv9/Makefile
index ec4370867f..21826f567e 100644
--- a/usr/src/lib/libast/sparcv9/Makefile
+++ b/usr/src/cmd/ast/libast/sparcv9/Makefile
@@ -23,21 +23,18 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Platform-specific config
# Note that "HOSTTYPE" matches the value used by AT&T upstream.
-ASTPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"'
+ASTPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"'
# platform-specific sources
-OBJECTS = \
- sparcv9/src/lib/libast/conftab.o \
- sparcv9/src/lib/libast/lctab.o
-OBJDIRS = \
- sparcv9/src/lib/libast
+OBJECTS= conftab.o lctab.o
include ../Makefile.com
-include ../../Makefile.lib.64
+include $(SRC)/lib/Makefile.lib.64
# Use big PIC since libast is too big for pic on 64bit
# (and on 32bit it is close to the barrier)
diff --git a/usr/src/cmd/ast/libast/sparcv9/Makefile.iffe b/usr/src/cmd/ast/libast/sparcv9/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/cmd/ast/libast/sparcv9/conflim.h b/usr/src/cmd/ast/libast/sparcv9/conflim.h
new file mode 100644
index 0000000000..9b2e13d324
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/conflim.h
@@ -0,0 +1,105 @@
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
+
+/*
+ * supplemental <limits.h> values
+ */
+
+printf("#ifndef CHAR_BIT\n");
+printf("#define CHAR_BIT 8\n");
+printf("#endif\n");
+printf("#ifndef CHAR_MAX\n");
+printf("#define CHAR_MAX 127\n");
+printf("#endif\n");
+printf("#ifndef CHAR_MIN\n");
+printf("#define CHAR_MIN -128\n");
+printf("#endif\n");
+printf("#ifndef CLOCKS_PER_SEC\n");
+printf("#define CLOCKS_PER_SEC 1000000\n");
+printf("#endif\n");
+printf("#ifndef INT_MIN\n");
+printf("#define INT_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef LLONG_MAX\n");
+printf("#define LLONG_MAX 9223372036854775807\n");
+printf("#endif\n");
+printf("#ifndef LLONG_MIN\n");
+printf("#define LLONG_MIN -9223372036854775808\n");
+printf("#endif\n");
+printf("#ifndef LONG_MAX\n");
+printf("#define LONG_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef LONG_MIN\n");
+printf("#define LONG_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef MB_LEN_MAX\n");
+printf("#define MB_LEN_MAX 5\n");
+printf("#endif\n");
+printf("#ifndef OPEN_MAX_CEIL\n");
+printf("#ifndef OPEN_MAX\n");
+printf("#define OPEN_MAX %ld\n", OPEN_MAX);
+printf("#endif\n");
+printf("#define OPEN_MAX_CEIL OPEN_MAX\n");
+printf("#endif\n");
+printf("#ifndef PTHREAD_STACK_MIN\n");
+printf("#define PTHREAD_STACK_MIN 4096\n");
+printf("#endif\n");
+printf("#ifndef PTRDIFF_MAX\n");
+printf("#define PTRDIFF_MAX 9223372036854775807\n");
+printf("#endif\n");
+printf("#ifndef PTRDIFF_MIN\n");
+printf("#define PTRDIFF_MIN -9223372036854775808\n");
+printf("#endif\n");
+printf("#ifndef SCHAR_MAX\n");
+printf("#define SCHAR_MAX 127\n");
+printf("#endif\n");
+printf("#ifndef SCHAR_MIN\n");
+printf("#define SCHAR_MIN -128\n");
+printf("#endif\n");
+printf("#ifndef SHRT_MIN\n");
+printf("#define SHRT_MIN -32768\n");
+printf("#endif\n");
+printf("#ifndef SIG_ATOMIC_MAX\n");
+printf("#define SIG_ATOMIC_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef SIG_ATOMIC_MIN\n");
+printf("#define SIG_ATOMIC_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef SIZE_MAX\n");
+printf("#ifndef UINT_MAX\n");
+printf("#define UINT_MAX %lu\n", UINT_MAX);
+printf("#endif\n");
+printf("#define SIZE_MAX UINT_MAX\n");
+printf("#endif\n");
+printf("#ifndef SSIZE_MAX\n");
+printf("#ifndef INT_MAX\n");
+printf("#define INT_MAX %ld\n", INT_MAX);
+printf("#endif\n");
+printf("#define SSIZE_MAX INT_MAX\n");
+printf("#endif\n");
+printf("#ifndef TMP_MAX\n");
+printf("#define TMP_MAX 17576\n");
+printf("#endif\n");
+printf("#ifndef UCHAR_MAX\n");
+printf("#define UCHAR_MAX 255\n");
+printf("#endif\n");
+printf("#ifndef ULLONG_MAX\n");
+printf("#define ULLONG_MAX 18446744073709551615\n");
+printf("#endif\n");
+printf("#ifndef ULONG_MAX\n");
+printf("#define ULONG_MAX 4294967295\n");
+printf("#endif\n");
+printf("#ifndef USHRT_MAX\n");
+printf("#define USHRT_MAX 65535\n");
+printf("#endif\n");
+printf("#ifndef WCHAR_MAX\n");
+printf("#define WCHAR_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef WCHAR_MIN\n");
+printf("#define WCHAR_MIN -2147483648\n");
+printf("#endif\n");
+printf("#ifndef WINT_MAX\n");
+printf("#define WINT_MAX 2147483647\n");
+printf("#endif\n");
+printf("#ifndef WINT_MIN\n");
+printf("#define WINT_MIN -2147483648\n");
+printf("#endif\n");
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/conftab.c b/usr/src/cmd/ast/libast/sparcv9/conftab.c
index 6bcbe13801..f1a50aeb07 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/conftab.c
+++ b/usr/src/cmd/ast/libast/sparcv9/conftab.c
@@ -10,7 +10,7 @@
#include "FEATURE/param"
#include "conftab.h"
-/* : : generated by conf from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/comp/conf.tab : : */
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
/*
* prefix strings -- the first few are indexed by Conf_t.standard
@@ -37,7 +37,7 @@ const Prefix_t prefix[] =
"SI", 2, CONF_SVID, CONF_sysinfo,
};
-int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
+const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
/*
* conf strings sorted in ascending order
@@ -235,7 +235,7 @@ const Conf_t conf[] =
{ "PBS_MESSAGE", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_MESSAGE },
{ "PBS_TRACK", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 2, CONF_sysconf, _SC_2_PBS_TRACK },
{ "PHYS_PAGES", { 0UL, 0 }, { 0UL, 0 }, 0, CONF_SUN, 1, CONF_sysconf, _SC_PHYS_PAGES },
-{ "PID_MAX", { 0UL, 0 }, { 30000UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 },
+{ "PID_MAX", { 0UL, 0 }, { 999999UL, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_SVID, 1, CONF_sysconf, -1 },
{ "PII", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
{ "PII_INTERNET", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
{ "PII_INTERNET_DGRAM", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_POSIX, 1, CONF_sysconf, -1 },
@@ -282,6 +282,7 @@ const Conf_t conf[] =
{ "SEMAPHORES", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SEMAPHORES },
{ "SEM_NSEMS_MAX", { 0UL, 0 }, { _POSIX_SEM_NSEMS_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SEM_NSEMS_MAX },
{ "SEM_VALUE_MAX", { 0UL, 0 }, { _POSIX_SEM_VALUE_MAX, 0 }, CONF_LIMIT|CONF_MINMAX|CONF_UNDERSCORE|CONF_MINMAX_DEF, CONF_POSIX, 1, CONF_sysconf, _SC_SEM_VALUE_MAX },
+{ "SF_BUFSIZE", { 0UL, 0 }, { 0UL, 0 }, CONF_MINMAX|CONF_UNDERSCORE, CONF_AST, 1, CONF_nop, -1 },
{ "SH", { 0, 0 }, { 0, "/bin/sh" }, CONF_MINMAX|CONF_UNDERSCORE|CONF_STRING|CONF_MINMAX_DEF, CONF_AST, 1, CONF_confstr, -1 },
{ "SHARED_MEMORY_OBJECTS", { 0UL, 0 }, { 0UL, 0 }, CONF_DEFER_CALL|CONF_DEFER_MM|CONF_FEATURE|CONF_UNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SHARED_MEMORY_OBJECTS },
{ "SHELL", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE|CONF_NOUNDERSCORE|CONF_PREFIX_ONLY, CONF_POSIX, 1, CONF_sysconf, _SC_SHELL },
@@ -389,4 +390,4 @@ const Conf_t conf[] =
{ "XPG4", { 0UL, 0 }, { 0UL, 0 }, CONF_FEATURE|CONF_UNDERSCORE, CONF_XOPEN, 1, CONF_nop, -1 },
};
-int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
+const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/conftab.h b/usr/src/cmd/ast/libast/sparcv9/conftab.h
index 25acf6bc13..a15714e8cb 100644
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/conftab.h
+++ b/usr/src/cmd/ast/libast/sparcv9/conftab.h
@@ -6,7 +6,7 @@
#endif
#include <sys/systeminfo.h>
-/* : : generated by conf from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/comp/conf.tab : : */
+/* : : generated by conf from contrib/ast/src/lib/libast/comp/conf.tab : : */
#if !defined(const) && !defined(__STDC__) && !defined(__cplusplus) && !defined(c_plusplus)
#define const
@@ -86,9 +86,9 @@ typedef struct Prefix_s
} Prefix_t;
extern const Conf_t conf[];
-extern int conf_elements;
+extern const int conf_elements;
extern const Prefix_t prefix[];
-extern int prefix_elements;
+extern const int prefix_elements;
#endif
diff --git a/usr/src/cmd/ast/libast/sparcv9/lc.h b/usr/src/cmd/ast/libast/sparcv9/lc.h
new file mode 100644
index 0000000000..024f410dfc
--- /dev/null
+++ b/usr/src/cmd/ast/libast/sparcv9/lc.h
@@ -0,0 +1,131 @@
+/* : : generated by cmd/ast/tools/lcgen : : */
+#pragma prototyped
+
+#ifndef _LC_H
+#define _LC_H 1
+
+#include <ast.h>
+
+#define LC_abbreviated 0x00001
+#define LC_checked 0x00002
+#define LC_debug 0x00004
+#define LC_default 0x00008
+#define LC_defined 0x00010
+#define LC_local 0x00020
+#define LC_primary 0x00040
+#define LC_qualified 0x00080
+#define LC_undefined 0x00100
+#define LC_utf8 0x00200
+#define LC_verbose 0x00400
+#define LC_setlocale 0x10000
+#define LC_setenv 0x20000
+#define LC_user 0x40000
+
+#define LC_language_attribute_max 2
+#define LC_territory_language_max 4
+
+struct Lc_s;
+
+typedef struct Lc_info_s
+{
+ const struct Lc_s* lc;
+ unsigned long number;
+ void* data;
+} Lc_info_t;
+
+typedef struct Lc_attribute_s
+{
+ const char* name;
+ unsigned long flags;
+ unsigned long index;
+} Lc_attribute_t;
+
+typedef struct Lc_charset_s
+{
+ const char* code;
+ const char* alternates;
+ const char* ms;
+ unsigned long index;
+} Lc_charset_t;
+
+typedef struct Lc_language_s
+{
+ const char* code;
+ const char* name;
+ const char* alternates;
+ const Lc_charset_t* charset;
+ unsigned long flags;
+ unsigned long index;
+ const Lc_attribute_t* attributes[LC_language_attribute_max];
+} Lc_language_t;
+
+typedef struct Lc_territory_s
+{
+ const char* code;
+ const char* name;
+ unsigned long flags;
+ unsigned long index;
+ const Lc_language_t* languages[LC_territory_language_max];
+#ifdef _LC_TERRITORY_PRIVATE_
+ _LC_TERRITORY_PRIVATE_
+#endif
+} Lc_territory_t;
+
+typedef struct Lc_map_s
+{
+ const char* code;
+ const Lc_language_t* language;
+ const Lc_territory_t* territory;
+ const Lc_charset_t* charset;
+ const Lc_attribute_t* attribute;
+} Lc_map_t;
+
+typedef struct Lc_attribute_list_s
+{
+ struct Lc_attribute_list_s* next;
+ const Lc_attribute_t* attribute;
+} Lc_attribute_list_t;
+
+typedef struct Lc_s
+{
+ const char* name;
+ const char* code;
+ const Lc_language_t* language;
+ const Lc_territory_t* territory;
+ const Lc_charset_t* charset;
+ const Lc_attribute_list_t* attributes;
+ unsigned long flags;
+ unsigned long index;
+#ifdef _LC_PRIVATE_
+ _LC_PRIVATE_
+#endif
+} Lc_t;
+
+struct Lc_category_s;
+
+typedef int (*Lc_category_set_f)(struct Lc_category_s*);
+
+typedef struct Lc_category_s
+{
+ const char* name;
+ int external;
+ int internal;
+ Lc_category_set_f setf;
+ Lc_t* prev;
+ unsigned int flags;
+} Lc_category_t;
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern size_t lccanon(Lc_t*, unsigned long flags, char*, size_t);
+extern Lc_category_t* lccategories(void);
+extern int lcindex(int, int);
+extern Lc_info_t* lcinfo(int);
+extern Lc_t* lcmake(const char*);
+extern Lc_t* lcscan(Lc_t*);
+
+#undef extern
+
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/lctab.c b/usr/src/cmd/ast/libast/sparcv9/lctab.c
index 4927e1fd3a..2afc20e2b5 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/lctab.c
+++ b/usr/src/cmd/ast/libast/sparcv9/lctab.c
@@ -1,4 +1,4 @@
-/* : : generated by ./lcgen : : */
+/* : : generated by cmd/ast/tools/lcgen : : */
#include "lclib.h"
#include "lclang.h"
@@ -1177,6 +1177,7 @@ const Lc_territory_t lc_territories[] =
{
{"C","C",LC_default,0,&lc_languages[0],0,0,0,0,0,0,0,},
{"debug","debug",LC_debug,0,&lc_languages[1],0,0,0,0,0,0,0,},
+{"eu","euro",0,0,&lc_languages[0],0,0,0,0,0,0,0,},
{"al","albania",0,
#ifdef CTRY_ALBANIA
CTRY_ALBANIA,
@@ -2624,11 +2625,11 @@ SUBLANG_ENGLISH_ZIMBABWE,
const Lc_map_t lc_maps[] =
{
-{"enu",&lc_languages[26],&lc_territories[93],&lc_charsets[0],0},
-{"enz",&lc_languages[26],&lc_territories[68],&lc_charsets[0],0},
-{"esm",&lc_languages[28],&lc_territories[63],&lc_charsets[0],0},
-{"esn",&lc_languages[28],&lc_territories[30],&lc_charsets[0],&attribute_es[1]},
-{"esp",&lc_languages[28],&lc_territories[30],&lc_charsets[0],&attribute_es[0]},
-{"usa",&lc_languages[26],&lc_territories[93],&lc_charsets[0],0},
+{"enu",&lc_languages[26],&lc_territories[94],&lc_charsets[0],0},
+{"enz",&lc_languages[26],&lc_territories[69],&lc_charsets[0],0},
+{"esm",&lc_languages[28],&lc_territories[64],&lc_charsets[0],0},
+{"esn",&lc_languages[28],&lc_territories[31],&lc_charsets[0],&attribute_es[1]},
+{"esp",&lc_languages[28],&lc_territories[31],&lc_charsets[0],&attribute_es[0]},
+{"usa",&lc_languages[26],&lc_territories[94],&lc_charsets[0],0},
0
};
diff --git a/usr/src/lib/libcmd/Makefile b/usr/src/cmd/ast/libcmd/Makefile
index f958be9ad9..49312d85b0 100644
--- a/usr/src/lib/libcmd/Makefile
+++ b/usr/src/cmd/ast/libcmd/Makefile
@@ -23,41 +23,41 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+SHELL= /usr/bin/ksh93
-SHELL=/usr/bin/ksh93
-
-include ../Makefile.lib
+include $(SRC)/lib/Makefile.lib
-SUBDIRS = $(MACH)
+SUBDIRS= $(MACH)
$(BUILD64)SUBDIRS += $(MACH64)
all := TARGET= all
clean := TARGET= clean
clobber := TARGET= clobber
install := TARGET= install
+install_h := TARGET= install_h
_msg := TARGET= _msg
+_feature := TARGET= _feature
.KEEP_STATE:
+.PARALLEL: $(SUBDIRS)
-all clean clobber install _msg: $(SUBDIRS)
-
-HDRS= \
- cmd.h \
- cmdext.h
+all clean clobber install _feature: $(SUBDIRS)
+_msg: $(MACH)
-HDRDIR32= $(MACH)/include/ast
-HDRDIR64= $(MACH64)/include/ast
+include Makefile.defs
+HDRS= $(HEADERINSTALL)
+HDRDIR32= $(MACH)/ast
+HDRDIR64= $(MACH64)/ast
include ../Makefile.asthdr
-install_h: $(ROOTHDRS)
-
-# We don't check these header files because they're owned by AT&T/AST
-check:
+install_h: $(SUBDIRS) .WAIT $(ROOTHDRS)
+install: install_h
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
-
FRC:
-include ../Makefile.targ
+include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/lib/libcmd/Makefile.com b/usr/src/cmd/ast/libcmd/Makefile.com
index 4382f40764..1b75255ba0 100644
--- a/usr/src/lib/libcmd/Makefile.com
+++ b/usr/src/cmd/ast/libcmd/Makefile.com
@@ -23,96 +23,35 @@
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+SHELL= /usr/bin/ksh93
-SHELL=/usr/bin/ksh93
-
-LIBRARY = libcmd.a
-VERS = .1
-OBJECTS = \
- basename.o \
- cat.o \
- chgrp.o \
- cksum.o \
- chmod.o \
- chown.o \
- cmdinit.o \
- cmp.o \
- comm.o \
- cp.o \
- cut.o \
- date.o \
- dirname.o \
- expr.o \
- grep.o \
- fds.o \
- fmt.o \
- fold.o \
- fts_fix.o \
- getconf.o \
- head.o \
- id.o \
- join.o \
- ln.o \
- logname.o \
- md5sum.o \
- mkdir.o \
- mkfifo.o \
- mktemp.o \
- mv.o \
- paste.o \
- pathchk.o \
- pids.o \
- readlink.o \
- rev.o \
- revlib.o \
- rm.o \
- rmdir.o \
- stty.o \
- sum.o \
- sync.o \
- tail.o \
- tee.o \
- tty.o \
- uname.o \
- uniq.o \
- vmstate.o \
- wc.o \
- wclib.o
+LIBRARY= libcmd.a
+VERS= .1
-include ../../Makefile.astmsg
-
-include ../../Makefile.lib
+include ../Makefile.defs
-# mapfile-vers does not live with the sources in in common/ to make
-# automated code updates easier.
-MAPFILES= ../mapfile-vers
+OBJECTS += $(LIBOBJS)
-# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
-include ../../../Makefile.ast
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.ast
-LIBS = $(DYNLIB)
+MAPFILES= ../mapfile-vers
-LDLIBS += \
- -lsum \
- -last \
- -lsocket \
- -lnsl \
- -lc
+LIBS= $(DYNLIB)
-SRCDIR = ../common
+LDLIBS += -lsum -last -lsocket -lnsl -lc
# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
# case - it MUST come as the last element but future changes in -D options
# may then cause silent breakage in the AST sources because the last -D
# option specified overrides previous -D options so we prefer the current
# way to explicitly list each single flag.
-# Notes:
-# - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
-CPPFLAGS = \
+CPPFLAGS= \
$(DTEXTDOM) $(DTS_ERRNO) \
- -I../common \
- -Isrc/lib/libcmd \
+ -I$(ASTSRC) \
+ -Iast -I. \
-I$(ROOT)/usr/include/ast \
-I$(ROOT)/usr/include \
-D_BLD_cmd \
@@ -120,16 +59,14 @@ CPPFLAGS = \
-D_BLD_DLL \
'-DERROR_CATALOG="libcmd"' \
'-DUSAGE_LICENSE=\
- "[-author?Glenn Fowler <gsf@research.att.com>]"\
- "[-author?David Korn <dgk@research.att.com>]"\
- "[-copyright?Copyright (c) 1992-2010 AT&T Intellectual Property]"\
- "[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
- "[--catalog?libcmd]"'
+ "[-author?Glenn Fowler <gsf@research.att.com>]"\
+ "[-author?David Korn <dgk@research.att.com>]"\
+ "[-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property]"\
+ "[-license?http://www.eclipse.org/org/documents/epl-v10.html]"\
+ "[--catalog?libcmd]"'
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
CERRWARN += -_gcc=-Wno-unused-value
CERRWARN += -_gcc=-Wno-parentheses
@@ -140,12 +77,46 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration
# not linted
SMATCH=off
-pics/cut.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
-pics/sync.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
-pics/vmstate.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
+all: install_h .WAIT $(LIBS)
+
+include $(SRC)/lib/Makefile.targ
+
+pics/%.o: $(ASTSRC)/%.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ $(POST_PROCESS_O)
+
+######################################################################
+# Header file generation
+
+$(HEADERSRC:%=ast/%): FRC
+ $(MKDIR) -p $(@D)
+ $(CP) $(ASTSRC)/$(@F) $@
-.KEEP_STATE:
+# This rule is derived from $(CONTRIB)/ast/src/lib/libcmd/Makefile
+ast/cmdext.h:
+ $(MKDIR) -p $(@D)
+ echo '#include <shcmd.h>' > $@.tmp
+ $(SED) \
+ -e '/^b_[a-z_][a-z_0-9]*(/!d' \
+ -e 's/^b_//' \
+ -e 's/(.*//' \
+ -e 's/.*/extern int b_&(int, char**, Shbltin_t*);/' \
+ $(OBJECTS:%.o=$(ASTSRC)/%.c) | \
+ $(SORT) -u \
+ >> $@.tmp
+ $(AST_PROTO) -f $@.tmp >> $@
+ rm -f $@.tmp
+ $(POST_PROCESS_AST) $@
-all: $(LIBS)
+CLOBBERFILES += ast/*
+
+install_h: $(HEADERSRC:%=ast/%) $(HEADERGEN:%=ast/%)
+
+.PARALLEL: $(HEADERSRC:%=ast/%) $(HEADERGEN:%=ast/%)
+
+_feature: FRC
+ $(MAKE) -f Makefile.iffe generate
+
+include ../../Makefile.astmsg
-include ../../Makefile.targ
+FRC:
diff --git a/usr/src/cmd/ast/libcmd/Makefile.defs b/usr/src/cmd/ast/libcmd/Makefile.defs
new file mode 100644
index 0000000000..6a7de17450
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/Makefile.defs
@@ -0,0 +1,35 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+# These macros should be kept synchronised with those in
+# usr/src/contrib/ast/src/lib/libcmd/Makefile
+
+AST_LICENSE = since=1992,author=gsf+dgk
+ASTLIB= libcmd
+ASTSRC= $(C_AST)/src/lib/$(ASTLIB)
+HDRGUARD= cmd
+
+FEATURES= ids sockets symlink utsname
+HEADERSRC= cmd.h
+HEADERGEN= cmdext.h
+HEADERINSTALL= $(HEADERSRC) $(HEADERGEN)
+LOBJDIRS=
+LIBOBJS= \
+ basename.o cat.o chgrp.o cksum.o chmod.o chown.o cmdinit.o \
+ cmp.o comm.o cp.o cut.o date.o dirname.o expr.o fds.o \
+ fmt.o fold.o fts_fix.o getconf.o head.o id.o join.o lib.o ln.o \
+ logname.o md5sum.o mkdir.o mkfifo.o mktemp.o mv.o paste.o \
+ pathchk.o pids.o rev.o revlib.o rm.o rmdir.o stty.o sum.o \
+ sync.o tail.o tee.o tty.o uname.o uniq.o vmstate.o wc.o wclib.o
diff --git a/usr/src/cmd/ast/libcmd/Makefile.iffe b/usr/src/cmd/ast/libcmd/Makefile.iffe
new file mode 100644
index 0000000000..0a12069bf4
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/Makefile.iffe
@@ -0,0 +1,22 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.com
+include ../../Makefile.iffe
+
+cleaniffe: FRC
+ $(RM) $(FEATURES:%=FEATURE/%)
+
+generate: cleaniffe $(FEATURES:%=FEATURE/%)
diff --git a/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/ids b/usr/src/cmd/ast/libcmd/amd64/FEATURE/ids
index 5c25aaedd2..075c0e54f3 100644
--- a/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/ids
+++ b/usr/src/cmd/ast/libcmd/amd64/FEATURE/ids
@@ -1,13 +1,13 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libcmd/features/ids by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/ids by iffe version 2012-07-17 : : */
#ifndef _def_ids_cmd
#define _def_ids_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_endgrent 1 /* endgrent() in default lib(s) */
#define _lib_getgrent 1 /* getgrent() in default lib(s) */
#define _lib_setgrent 1 /* setgrent() in default lib(s) */
#define _sys_fss 1 /* #include <sys/fss.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _lib_getsid 1 /* getsid() in default lib(s) */
#if !_lib_fsid && _mac_fsid
#define _lib_fsid 1
#endif
diff --git a/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/sockets b/usr/src/cmd/ast/libcmd/amd64/FEATURE/sockets
index 701f83e584..778d18ecba 100644
--- a/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/sockets
+++ b/usr/src/cmd/ast/libcmd/amd64/FEATURE/sockets
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libcmd/features/sockets by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/sockets by iffe version 2012-07-17 : : */
#ifndef _def_sockets_cmd
#define _def_sockets_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _sys_socket 1 /* #include <sys/socket.h> ok */
#define _hdr_arpa_inet 1 /* #include <arpa/inet.h> ok */
#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
diff --git a/usr/src/cmd/ast/libcmd/amd64/FEATURE/symlink b/usr/src/cmd/ast/libcmd/amd64/FEATURE/symlink
new file mode 100644
index 0000000000..bb648ed5bc
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/amd64/FEATURE/symlink
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libcmd/features/symlink by iffe version 2012-07-17 : : */
+#ifndef _def_symlink_cmd
+#define _def_symlink_cmd 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_lchown 1 /* lchown implemented */
+#endif
diff --git a/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/utsname b/usr/src/cmd/ast/libcmd/amd64/FEATURE/utsname
index 60fae23d03..e5803b3478 100644
--- a/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/utsname
+++ b/usr/src/cmd/ast/libcmd/amd64/FEATURE/utsname
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libcmd/features/utsname by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/utsname by iffe version 2012-07-17 : : */
#ifndef _def_utsname_cmd
#define _def_utsname_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_getdomainname 1 /* getdomainname() in default lib(s) */
#define _lib_gethostid 1 /* gethostid() in default lib(s) */
#define _lib_gethostname 1 /* gethostname() in default lib(s) */
@@ -13,4 +11,5 @@
#define _sys_utsname 1 /* #include <sys/utsname.h> ok */
#define _sys_syscall 1 /* #include <sys/syscall.h> ok */
#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
+#define _UNAME_os_DEFAULT "illumos" /* default os name */
#endif
diff --git a/usr/src/lib/libcmd/amd64/Makefile b/usr/src/cmd/ast/libcmd/amd64/Makefile
index d7a4359e60..40bbf5e319 100644
--- a/usr/src/lib/libcmd/amd64/Makefile
+++ b/usr/src/cmd/ast/libcmd/amd64/Makefile
@@ -23,12 +23,10 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
include ../Makefile.com
-include ../../Makefile.lib.64
-
-all: $(LIBS)
+include $(SRC)/lib/Makefile.lib.64
install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/cmd/ast/libcmd/amd64/Makefile.iffe b/usr/src/cmd/ast/libcmd/amd64/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/amd64/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/ids b/usr/src/cmd/ast/libcmd/i386/FEATURE/ids
index 9ebd27114b..075c0e54f3 100644
--- a/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/ids
+++ b/usr/src/cmd/ast/libcmd/i386/FEATURE/ids
@@ -1,13 +1,13 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libcmd/features/ids by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/ids by iffe version 2012-07-17 : : */
#ifndef _def_ids_cmd
#define _def_ids_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_endgrent 1 /* endgrent() in default lib(s) */
#define _lib_getgrent 1 /* getgrent() in default lib(s) */
#define _lib_setgrent 1 /* setgrent() in default lib(s) */
#define _sys_fss 1 /* #include <sys/fss.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _lib_getsid 1 /* getsid() in default lib(s) */
#if !_lib_fsid && _mac_fsid
#define _lib_fsid 1
#endif
diff --git a/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/sockets b/usr/src/cmd/ast/libcmd/i386/FEATURE/sockets
index 6fb96ec2c6..778d18ecba 100644
--- a/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/sockets
+++ b/usr/src/cmd/ast/libcmd/i386/FEATURE/sockets
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libcmd/features/sockets by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/sockets by iffe version 2012-07-17 : : */
#ifndef _def_sockets_cmd
#define _def_sockets_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _sys_socket 1 /* #include <sys/socket.h> ok */
#define _hdr_arpa_inet 1 /* #include <arpa/inet.h> ok */
#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
diff --git a/usr/src/cmd/ast/libcmd/i386/FEATURE/symlink b/usr/src/cmd/ast/libcmd/i386/FEATURE/symlink
new file mode 100644
index 0000000000..bb648ed5bc
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/i386/FEATURE/symlink
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libcmd/features/symlink by iffe version 2012-07-17 : : */
+#ifndef _def_symlink_cmd
+#define _def_symlink_cmd 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_lchown 1 /* lchown implemented */
+#endif
diff --git a/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/utsname b/usr/src/cmd/ast/libcmd/i386/FEATURE/utsname
index f66b30e21d..e5803b3478 100644
--- a/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/utsname
+++ b/usr/src/cmd/ast/libcmd/i386/FEATURE/utsname
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libcmd/features/utsname by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/utsname by iffe version 2012-07-17 : : */
#ifndef _def_utsname_cmd
#define _def_utsname_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_getdomainname 1 /* getdomainname() in default lib(s) */
#define _lib_gethostid 1 /* gethostid() in default lib(s) */
#define _lib_gethostname 1 /* gethostname() in default lib(s) */
@@ -13,4 +11,5 @@
#define _sys_utsname 1 /* #include <sys/utsname.h> ok */
#define _sys_syscall 1 /* #include <sys/syscall.h> ok */
#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
+#define _UNAME_os_DEFAULT "illumos" /* default os name */
#endif
diff --git a/usr/src/lib/libcmd/i386/Makefile b/usr/src/cmd/ast/libcmd/i386/Makefile
index 6cbbf06d61..129e8f1cf0 100644
--- a/usr/src/lib/libcmd/i386/Makefile
+++ b/usr/src/cmd/ast/libcmd/i386/Makefile
@@ -23,9 +23,9 @@
# Copyright (c) 1997-2001 by Sun Microsystems, Inc.
# All rights reserved.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
include ../Makefile.com
-all: $(LIBS)
-
install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/cmd/ast/libcmd/i386/Makefile.iffe b/usr/src/cmd/ast/libcmd/i386/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/i386/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/lib/libcmd/mapfile-vers b/usr/src/cmd/ast/libcmd/mapfile-vers
index dd037e921c..6f932e7c05 100644
--- a/usr/src/lib/libcmd/mapfile-vers
+++ b/usr/src/cmd/ast/libcmd/mapfile-vers
@@ -21,6 +21,7 @@
#
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
#
@@ -42,8 +43,9 @@ $mapfile_version 2
# functions by AST/ksh93's version of libcmd
SYMBOL_VERSION SUNWprivate_1.1 {
global:
- _cmd_init;
-
+ plugin_version;
+ _cmd_init;
+
b_basename;
b_cat;
b_chgrp;
@@ -56,14 +58,11 @@ SYMBOL_VERSION SUNWprivate_1.1 {
b_cut;
b_date;
b_dirname;
- b_egrep;
b_expr;
b_fds;
- b_fgrep;
b_fmt;
b_fold;
b_getconf;
- b_grep;
b_head;
b_id;
b_join;
@@ -77,8 +76,6 @@ SYMBOL_VERSION SUNWprivate_1.1 {
b_paste;
b_pathchk;
b_pids;
- b_pgrep;
- b_readlink;
b_rev;
b_rm;
b_rmdir;
@@ -92,7 +89,6 @@ SYMBOL_VERSION SUNWprivate_1.1 {
b_uniq;
b_wc;
b_vmstate;
- b_xgrep;
local:
*;
};
diff --git a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids b/usr/src/cmd/ast/libcmd/sparc/FEATURE/ids
index bd025699c4..075c0e54f3 100644
--- a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/ids
+++ b/usr/src/cmd/ast/libcmd/sparc/FEATURE/ids
@@ -1,13 +1,13 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libcmd/features/ids by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/ids by iffe version 2012-07-17 : : */
#ifndef _def_ids_cmd
#define _def_ids_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_endgrent 1 /* endgrent() in default lib(s) */
#define _lib_getgrent 1 /* getgrent() in default lib(s) */
#define _lib_setgrent 1 /* setgrent() in default lib(s) */
#define _sys_fss 1 /* #include <sys/fss.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _lib_getsid 1 /* getsid() in default lib(s) */
#if !_lib_fsid && _mac_fsid
#define _lib_fsid 1
#endif
diff --git a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/sockets b/usr/src/cmd/ast/libcmd/sparc/FEATURE/sockets
index b5810a47fc..778d18ecba 100644
--- a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/sockets
+++ b/usr/src/cmd/ast/libcmd/sparc/FEATURE/sockets
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libcmd/features/sockets by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/sockets by iffe version 2012-07-17 : : */
#ifndef _def_sockets_cmd
#define _def_sockets_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _sys_socket 1 /* #include <sys/socket.h> ok */
#define _hdr_arpa_inet 1 /* #include <arpa/inet.h> ok */
#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
diff --git a/usr/src/cmd/ast/libcmd/sparc/FEATURE/symlink b/usr/src/cmd/ast/libcmd/sparc/FEATURE/symlink
new file mode 100644
index 0000000000..bb648ed5bc
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/sparc/FEATURE/symlink
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libcmd/features/symlink by iffe version 2012-07-17 : : */
+#ifndef _def_symlink_cmd
+#define _def_symlink_cmd 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_lchown 1 /* lchown implemented */
+#endif
diff --git a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/utsname b/usr/src/cmd/ast/libcmd/sparc/FEATURE/utsname
index 93df54b142..e5803b3478 100644
--- a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/utsname
+++ b/usr/src/cmd/ast/libcmd/sparc/FEATURE/utsname
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libcmd/features/utsname by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/utsname by iffe version 2012-07-17 : : */
#ifndef _def_utsname_cmd
#define _def_utsname_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_getdomainname 1 /* getdomainname() in default lib(s) */
#define _lib_gethostid 1 /* gethostid() in default lib(s) */
#define _lib_gethostname 1 /* gethostname() in default lib(s) */
@@ -13,4 +11,5 @@
#define _sys_utsname 1 /* #include <sys/utsname.h> ok */
#define _sys_syscall 1 /* #include <sys/syscall.h> ok */
#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
+#define _UNAME_os_DEFAULT "illumos" /* default os name */
#endif
diff --git a/usr/src/lib/libcmd/sparc/Makefile b/usr/src/cmd/ast/libcmd/sparc/Makefile
index 6cbbf06d61..f73ec75909 100644
--- a/usr/src/lib/libcmd/sparc/Makefile
+++ b/usr/src/cmd/ast/libcmd/sparc/Makefile
@@ -26,6 +26,4 @@
include ../Makefile.com
-all: $(LIBS)
-
install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/cmd/ast/libcmd/sparc/Makefile.iffe b/usr/src/cmd/ast/libcmd/sparc/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/sparc/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/ids b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/ids
index 9560cee811..075c0e54f3 100644
--- a/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/ids
+++ b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/ids
@@ -1,13 +1,13 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libcmd/features/ids by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/ids by iffe version 2012-07-17 : : */
#ifndef _def_ids_cmd
#define _def_ids_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_endgrent 1 /* endgrent() in default lib(s) */
#define _lib_getgrent 1 /* getgrent() in default lib(s) */
#define _lib_setgrent 1 /* setgrent() in default lib(s) */
#define _sys_fss 1 /* #include <sys/fss.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _lib_getsid 1 /* getsid() in default lib(s) */
#if !_lib_fsid && _mac_fsid
#define _lib_fsid 1
#endif
diff --git a/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/sockets b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/sockets
index 1f7dcfa50d..778d18ecba 100644
--- a/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/sockets
+++ b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/sockets
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libcmd/features/sockets by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/sockets by iffe version 2012-07-17 : : */
#ifndef _def_sockets_cmd
#define _def_sockets_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _sys_socket 1 /* #include <sys/socket.h> ok */
#define _hdr_arpa_inet 1 /* #include <arpa/inet.h> ok */
#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
diff --git a/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/symlink b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/symlink
new file mode 100644
index 0000000000..bb648ed5bc
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/symlink
@@ -0,0 +1,6 @@
+/* : : generated from contrib/ast/src/lib/libcmd/features/symlink by iffe version 2012-07-17 : : */
+#ifndef _def_symlink_cmd
+#define _def_symlink_cmd 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _lib_lchown 1 /* lchown implemented */
+#endif
diff --git a/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/utsname b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/utsname
index 4e3f4bcd4f..e5803b3478 100644
--- a/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/utsname
+++ b/usr/src/cmd/ast/libcmd/sparcv9/FEATURE/utsname
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libcmd/features/utsname by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libcmd/features/utsname by iffe version 2012-07-17 : : */
#ifndef _def_utsname_cmd
#define _def_utsname_cmd 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_getdomainname 1 /* getdomainname() in default lib(s) */
#define _lib_gethostid 1 /* gethostid() in default lib(s) */
#define _lib_gethostname 1 /* gethostname() in default lib(s) */
@@ -13,4 +11,5 @@
#define _sys_utsname 1 /* #include <sys/utsname.h> ok */
#define _sys_syscall 1 /* #include <sys/syscall.h> ok */
#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
+#define _UNAME_os_DEFAULT "illumos" /* default os name */
#endif
diff --git a/usr/src/lib/libcmd/sparcv9/Makefile b/usr/src/cmd/ast/libcmd/sparcv9/Makefile
index 2eafde412a..7d288bdcaa 100644
--- a/usr/src/lib/libcmd/sparcv9/Makefile
+++ b/usr/src/cmd/ast/libcmd/sparcv9/Makefile
@@ -23,12 +23,8 @@
# Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include ../Makefile.com
-include ../../Makefile.lib.64
-
-all: $(LIBS)
+include $(SRC)/lib/Makefile.lib.64
install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/cmd/ast/libcmd/sparcv9/Makefile.iffe b/usr/src/cmd/ast/libcmd/sparcv9/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libcmd/sparcv9/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/lib/libdll/Makefile b/usr/src/cmd/ast/libdll/Makefile
index 11ea67996f..b9846d0ccc 100644
--- a/usr/src/lib/libdll/Makefile
+++ b/usr/src/cmd/ast/libdll/Makefile
@@ -23,41 +23,41 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
-include ../Makefile.lib
+include $(SRC)/lib/Makefile.lib
-SUBDIRS = $(MACH)
+SUBDIRS= $(MACH)
$(BUILD64)SUBDIRS += $(MACH64)
all := TARGET= all
clean := TARGET= clean
clobber := TARGET= clobber
install := TARGET= install
+install_h := TARGET= install_h
_msg := TARGET= _msg
+_feature := TARGET= _feature
.KEEP_STATE:
+.PARALLEL: $(SUBDIRS)
-all clean clobber install _msg: $(SUBDIRS)
-
-LIBRARY= libdll.a
-
-HDRS= \
- dlldefs.h
+all clean clobber install _feature: $(SUBDIRS)
+_msg: $(MACH)
-HDRDIR32= $(MACH)/src/lib/libdll
-HDRDIR64= $(MACH64)/src/lib/libdll
+include Makefile.defs
+HDRS= $(HEADERINSTALL)
+HDRDIR32= $(MACH)/ast
+HDRDIR64= $(MACH64)/ast
include ../Makefile.asthdr
-install_h: $(ROOTHDRS)
-
-# We don't check these header files because they're owned by AT&T/AST
-check:
+install_h: $(SUBDIRS) .WAIT $(ROOTHDRS)
+install: install_h
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
-
FRC:
-include ../Makefile.targ
+include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/lib/libdll/Makefile.com b/usr/src/cmd/ast/libdll/Makefile.com
index bbc1813121..b6164335cc 100644
--- a/usr/src/lib/libdll/Makefile.com
+++ b/usr/src/cmd/ast/libdll/Makefile.com
@@ -24,39 +24,25 @@
# Use is subject to license terms.
#
# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
-LIBRARY= libdll.a
-VERS= .1
+LIBRARY= libdll.a
+VERS= .1
-OBJECTS= \
- dlfcn.o \
- dllfind.o \
- dlllook.o \
- dllnext.o \
- dllopen.o \
- dllplug.o \
- dllscan.o
+include ../Makefile.defs
-include ../../Makefile.astmsg
-
-include ../../Makefile.lib
-
-# mapfile-vers does not live with the sources in in common/ to make
-# automated code updates easier.
-MAPFILES= ../mapfile-vers
+OBJECTS += $(LIBOBJS)
-# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
-include ../../../Makefile.ast
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.ast
-LIBS = $(DYNLIB)
+MAPFILES= ../mapfile-vers
-LDLIBS += \
- -last \
- -lc
+LIBS= $(DYNLIB)
-SRCDIR = ../common
+LDLIBS += -last -lc
# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
# case - it MUST come as the last element but future changes in -D options
@@ -65,22 +51,20 @@ SRCDIR = ../common
# way to explicitly list each single flag.
# Notes:
# - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
-CPPFLAGS = \
+CPPFLAGS= \
$(DTEXTDOM) $(DTS_ERRNO) \
$(DLLPLATFORMCPPFLAGS) \
- -I. \
+ -Iast -I. \
-I$(ROOT)/usr/include/ast \
-I$(ROOT)/usr/include \
'-DCONF_LIBSUFFIX=".so"' \
'-DCONF_LIBPREFIX="lib"' \
- -D_BLD_dll \
-D_PACKAGE_ast \
- -D_BLD_DLL
+ -D_BLD_DLL \
+ -D_BLD_dll
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += $(CNOWARN_UNINIT)
@@ -88,8 +72,31 @@ CERRWARN += $(CNOWARN_UNINIT)
# needs work
SMOFF += all_func_returns,strcpy_overflow
-.KEEP_STATE:
+all: install_h .WAIT $(LIBS)
+
+include $(SRC)/lib/Makefile.targ
+
+pics/%.o: $(ASTSRC)/%.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ $(POST_PROCESS_O)
+
+######################################################################
+# Header file generation
-all: $(LIBS)
+$(HEADERGEN:%=ast/%): FRC
+ $(MKDIR) -p $(@D)
+ src=`echo $(@F:%.h=%) | sed 's/^ast_//'`; \
+ [[ $$src = dlldefs ]] && src=dll; \
+ $(AST_PROTO) FEATURE/$$src > $@
+ $(POST_PROCESS_AST) $@
+
+install_h: $(HEADERGEN:%=ast/%)
+
+CLOBBERFILES += ast/*
+
+_feature: FRC
+ $(MAKE) -f Makefile.iffe generate
+
+include ../../Makefile.astmsg
-include ../../Makefile.targ
+FRC:
diff --git a/usr/src/cmd/ast/libdll/Makefile.defs b/usr/src/cmd/ast/libdll/Makefile.defs
new file mode 100644
index 0000000000..cf3a8e669f
--- /dev/null
+++ b/usr/src/cmd/ast/libdll/Makefile.defs
@@ -0,0 +1,31 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+# These macros should be kept synchronised with those in
+# usr/src/contrib/ast/src/lib/libdll/Makefile
+
+AST_LICENSE = since=1997,author=gsf
+ASTLIB= libdll
+ASTSRC= $(C_AST)/src/lib/$(ASTLIB)
+HDRGUARD= dll
+
+FEATURES= dll
+HEADERSRC=
+HEADERGEN= dlldefs.h
+HEADERINSTALL= $(HEADERSRC) $(HEADERGEN)
+LOBJDIRS=
+LIBOBJS= \
+ dlfcn.o dllopen.o dllfind.o dllplug.o dll_lib.o \
+ dllnext.o dlllook.o dllscan.o dllcheck.o dllerror.o
diff --git a/usr/src/cmd/ast/libdll/Makefile.iffe b/usr/src/cmd/ast/libdll/Makefile.iffe
new file mode 100644
index 0000000000..0a12069bf4
--- /dev/null
+++ b/usr/src/cmd/ast/libdll/Makefile.iffe
@@ -0,0 +1,22 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.com
+include ../../Makefile.iffe
+
+cleaniffe: FRC
+ $(RM) $(FEATURES:%=FEATURE/%)
+
+generate: cleaniffe $(FEATURES:%=FEATURE/%)
diff --git a/usr/src/lib/libdll/amd64/src/lib/libdll/FEATURE/dll b/usr/src/cmd/ast/libdll/amd64/FEATURE/dll
index 6c7a005b64..b8f61d315a 100644
--- a/usr/src/lib/libdll/amd64/src/lib/libdll/FEATURE/dll
+++ b/usr/src/cmd/ast/libdll/amd64/FEATURE/dll
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libdll/features/dll by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libdll/features/dll by iffe version 2012-07-17 : : */
+
#ifndef _def_dll_dll
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,8 +63,6 @@
#define _def_dll_dll 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_dlfcn 1 /* #include <dlfcn.h> ok */
#define _LIB_dl 1 /* -ldl is a library */
#define _lib_dlopen 1 /* dlopen() in default lib(s) */
@@ -78,6 +76,9 @@
#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */
#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */
+typedef unsigned long (*Dll_plugin_version_f) __PROTO__((void));
+typedef int (*Dllerror_f) __PROTO__((__V_*, __V_*, int, ...));
+
typedef struct Dllinfo_s
{
char** sibling; /* sibling dirs on $PATH */
@@ -90,6 +91,17 @@ typedef struct Dllinfo_s
#endif
} Dllinfo_t;
+typedef struct Dllnames_s
+{
+ char* id;
+ char* name;
+ char* base;
+ char* type;
+ char* opts;
+ char* path;
+ char data[1024];
+} Dllnames_t;
+
typedef struct Dllent_s
{
char* path;
@@ -113,11 +125,18 @@ typedef struct Dllscan_s
#endif
extern __MANGLE__ Dllinfo_t* dllinfo __PROTO__((void));
+extern __MANGLE__ __V_* dllplugin __PROTO__((const char*, const char*, const char*, unsigned long, unsigned long*, int, char*, size_t));
extern __MANGLE__ __V_* dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
extern __MANGLE__ __V_* dllfind __PROTO__((const char*, const char*, int, char*, size_t));
+extern __MANGLE__ Dllnames_t* dllnames __PROTO__((const char*, const char*, Dllnames_t*));
+extern __MANGLE__ __V_* dll_lib __PROTO__((Dllnames_t*, unsigned long, Dllerror_f, __V_*));
+extern __MANGLE__ __V_* dllmeth __PROTO__((const char*, const char*, unsigned long));
extern __MANGLE__ __V_* dllopen __PROTO__((const char*, int));
extern __MANGLE__ __V_* dllnext __PROTO__((int));
extern __MANGLE__ __V_* dlllook __PROTO__((__V_*, const char*));
+extern __MANGLE__ int dllcheck __PROTO__((__V_*, const char*, unsigned long, unsigned long*));
+extern __MANGLE__ unsigned long dllversion __PROTO__((__V_*, const char*));
+extern __MANGLE__ char* dllerror __PROTO__((int));
extern __MANGLE__ Dllscan_t* dllsopen __PROTO__((const char*, const char*, const char*));
extern __MANGLE__ Dllent_t* dllsread __PROTO__((Dllscan_t*));
diff --git a/usr/src/lib/libdll/amd64/Makefile b/usr/src/cmd/ast/libdll/amd64/Makefile
index 781d7acaa7..dbcb8144a6 100644
--- a/usr/src/lib/libdll/amd64/Makefile
+++ b/usr/src/cmd/ast/libdll/amd64/Makefile
@@ -23,12 +23,14 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Platform-specific config
# Note that "HOSTTYPE" matches the value used by AT&T upstream.
-DLLPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"'
+DLLPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"'
include ../Makefile.com
-include ../../Makefile.lib.64
+include $(SRC)/lib/Makefile.lib.64
install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/cmd/ast/libdll/amd64/Makefile.iffe b/usr/src/cmd/ast/libdll/amd64/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libdll/amd64/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/lib/libdll/sparc/src/lib/libdll/FEATURE/dll b/usr/src/cmd/ast/libdll/i386/FEATURE/dll
index 7f5cd08a38..b8f61d315a 100644
--- a/usr/src/lib/libdll/sparc/src/lib/libdll/FEATURE/dll
+++ b/usr/src/cmd/ast/libdll/i386/FEATURE/dll
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libdll/features/dll by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libdll/features/dll by iffe version 2012-07-17 : : */
+
#ifndef _def_dll_dll
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,8 +63,6 @@
#define _def_dll_dll 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_dlfcn 1 /* #include <dlfcn.h> ok */
#define _LIB_dl 1 /* -ldl is a library */
#define _lib_dlopen 1 /* dlopen() in default lib(s) */
@@ -78,6 +76,9 @@
#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */
#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */
+typedef unsigned long (*Dll_plugin_version_f) __PROTO__((void));
+typedef int (*Dllerror_f) __PROTO__((__V_*, __V_*, int, ...));
+
typedef struct Dllinfo_s
{
char** sibling; /* sibling dirs on $PATH */
@@ -90,6 +91,17 @@ typedef struct Dllinfo_s
#endif
} Dllinfo_t;
+typedef struct Dllnames_s
+{
+ char* id;
+ char* name;
+ char* base;
+ char* type;
+ char* opts;
+ char* path;
+ char data[1024];
+} Dllnames_t;
+
typedef struct Dllent_s
{
char* path;
@@ -113,11 +125,18 @@ typedef struct Dllscan_s
#endif
extern __MANGLE__ Dllinfo_t* dllinfo __PROTO__((void));
+extern __MANGLE__ __V_* dllplugin __PROTO__((const char*, const char*, const char*, unsigned long, unsigned long*, int, char*, size_t));
extern __MANGLE__ __V_* dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
extern __MANGLE__ __V_* dllfind __PROTO__((const char*, const char*, int, char*, size_t));
+extern __MANGLE__ Dllnames_t* dllnames __PROTO__((const char*, const char*, Dllnames_t*));
+extern __MANGLE__ __V_* dll_lib __PROTO__((Dllnames_t*, unsigned long, Dllerror_f, __V_*));
+extern __MANGLE__ __V_* dllmeth __PROTO__((const char*, const char*, unsigned long));
extern __MANGLE__ __V_* dllopen __PROTO__((const char*, int));
extern __MANGLE__ __V_* dllnext __PROTO__((int));
extern __MANGLE__ __V_* dlllook __PROTO__((__V_*, const char*));
+extern __MANGLE__ int dllcheck __PROTO__((__V_*, const char*, unsigned long, unsigned long*));
+extern __MANGLE__ unsigned long dllversion __PROTO__((__V_*, const char*));
+extern __MANGLE__ char* dllerror __PROTO__((int));
extern __MANGLE__ Dllscan_t* dllsopen __PROTO__((const char*, const char*, const char*));
extern __MANGLE__ Dllent_t* dllsread __PROTO__((Dllscan_t*));
diff --git a/usr/src/lib/libdll/i386/Makefile b/usr/src/cmd/ast/libdll/i386/Makefile
index 2e6eac5888..b9af5daf9d 100644
--- a/usr/src/lib/libdll/i386/Makefile
+++ b/usr/src/cmd/ast/libdll/i386/Makefile
@@ -23,10 +23,12 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Platform-specific config
# Note that "HOSTTYPE" matches the value used by AT&T upstream.
-DLLPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"'
+DLLPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).i386"'
include ../Makefile.com
diff --git a/usr/src/cmd/ast/libdll/i386/Makefile.iffe b/usr/src/cmd/ast/libdll/i386/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libdll/i386/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/lib/libdll/mapfile-vers b/usr/src/cmd/ast/libdll/mapfile-vers
index c3e6b2b5c8..a19755dc18 100644
--- a/usr/src/lib/libdll/mapfile-vers
+++ b/usr/src/cmd/ast/libdll/mapfile-vers
@@ -21,6 +21,7 @@
#
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
#
@@ -39,17 +40,18 @@
$mapfile_version 2
-# information generated from usr/src/lib/libdll/i386/src/lib/libdll/dlldefs.h
SYMBOL_VERSION SUNWprivate_1.1 {
global:
+ dllerror;
+ dllfind;
dllinfo;
+ dlllook;
+ dllnext;
dllplug;
+ dllplugin;
+ dllsclose;
dllsopen;
- dllfind;
dllsread;
- dllnext;
- dlllook;
- dllsclose;
local:
*;
};
diff --git a/usr/src/lib/libdll/i386/src/lib/libdll/FEATURE/dll b/usr/src/cmd/ast/libdll/sparc/FEATURE/dll
index 8f1dfc4543..b8f61d315a 100644
--- a/usr/src/lib/libdll/i386/src/lib/libdll/FEATURE/dll
+++ b/usr/src/cmd/ast/libdll/sparc/FEATURE/dll
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libdll/features/dll by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libdll/features/dll by iffe version 2012-07-17 : : */
+
#ifndef _def_dll_dll
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,8 +63,6 @@
#define _def_dll_dll 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_dlfcn 1 /* #include <dlfcn.h> ok */
#define _LIB_dl 1 /* -ldl is a library */
#define _lib_dlopen 1 /* dlopen() in default lib(s) */
@@ -78,6 +76,9 @@
#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */
#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */
+typedef unsigned long (*Dll_plugin_version_f) __PROTO__((void));
+typedef int (*Dllerror_f) __PROTO__((__V_*, __V_*, int, ...));
+
typedef struct Dllinfo_s
{
char** sibling; /* sibling dirs on $PATH */
@@ -90,6 +91,17 @@ typedef struct Dllinfo_s
#endif
} Dllinfo_t;
+typedef struct Dllnames_s
+{
+ char* id;
+ char* name;
+ char* base;
+ char* type;
+ char* opts;
+ char* path;
+ char data[1024];
+} Dllnames_t;
+
typedef struct Dllent_s
{
char* path;
@@ -113,11 +125,18 @@ typedef struct Dllscan_s
#endif
extern __MANGLE__ Dllinfo_t* dllinfo __PROTO__((void));
+extern __MANGLE__ __V_* dllplugin __PROTO__((const char*, const char*, const char*, unsigned long, unsigned long*, int, char*, size_t));
extern __MANGLE__ __V_* dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
extern __MANGLE__ __V_* dllfind __PROTO__((const char*, const char*, int, char*, size_t));
+extern __MANGLE__ Dllnames_t* dllnames __PROTO__((const char*, const char*, Dllnames_t*));
+extern __MANGLE__ __V_* dll_lib __PROTO__((Dllnames_t*, unsigned long, Dllerror_f, __V_*));
+extern __MANGLE__ __V_* dllmeth __PROTO__((const char*, const char*, unsigned long));
extern __MANGLE__ __V_* dllopen __PROTO__((const char*, int));
extern __MANGLE__ __V_* dllnext __PROTO__((int));
extern __MANGLE__ __V_* dlllook __PROTO__((__V_*, const char*));
+extern __MANGLE__ int dllcheck __PROTO__((__V_*, const char*, unsigned long, unsigned long*));
+extern __MANGLE__ unsigned long dllversion __PROTO__((__V_*, const char*));
+extern __MANGLE__ char* dllerror __PROTO__((int));
extern __MANGLE__ Dllscan_t* dllsopen __PROTO__((const char*, const char*, const char*));
extern __MANGLE__ Dllent_t* dllsread __PROTO__((Dllscan_t*));
diff --git a/usr/src/lib/libdll/sparc/Makefile b/usr/src/cmd/ast/libdll/sparc/Makefile
index 3869ccf5b4..42db5bf43a 100644
--- a/usr/src/lib/libdll/sparc/Makefile
+++ b/usr/src/cmd/ast/libdll/sparc/Makefile
@@ -23,10 +23,12 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Platform-specific config
# Note that "HOSTTYPE" matches the value used by AT&T upstream.
-DLLPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"'
+DLLPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"'
include ../Makefile.com
diff --git a/usr/src/cmd/ast/libdll/sparc/Makefile.iffe b/usr/src/cmd/ast/libdll/sparc/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libdll/sparc/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/lib/libdll/sparcv9/src/lib/libdll/FEATURE/dll b/usr/src/cmd/ast/libdll/sparcv9/FEATURE/dll
index 306ed8c1d5..b8f61d315a 100644
--- a/usr/src/lib/libdll/sparcv9/src/lib/libdll/FEATURE/dll
+++ b/usr/src/cmd/ast/libdll/sparcv9/FEATURE/dll
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libdll/features/dll by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/lib/libdll/features/dll by iffe version 2012-07-17 : : */
+
#ifndef _def_dll_dll
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,8 +63,6 @@
#define _def_dll_dll 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_dlfcn 1 /* #include <dlfcn.h> ok */
#define _LIB_dl 1 /* -ldl is a library */
#define _lib_dlopen 1 /* dlopen() in default lib(s) */
@@ -78,6 +76,9 @@
#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */
#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */
+typedef unsigned long (*Dll_plugin_version_f) __PROTO__((void));
+typedef int (*Dllerror_f) __PROTO__((__V_*, __V_*, int, ...));
+
typedef struct Dllinfo_s
{
char** sibling; /* sibling dirs on $PATH */
@@ -90,6 +91,17 @@ typedef struct Dllinfo_s
#endif
} Dllinfo_t;
+typedef struct Dllnames_s
+{
+ char* id;
+ char* name;
+ char* base;
+ char* type;
+ char* opts;
+ char* path;
+ char data[1024];
+} Dllnames_t;
+
typedef struct Dllent_s
{
char* path;
@@ -113,11 +125,18 @@ typedef struct Dllscan_s
#endif
extern __MANGLE__ Dllinfo_t* dllinfo __PROTO__((void));
+extern __MANGLE__ __V_* dllplugin __PROTO__((const char*, const char*, const char*, unsigned long, unsigned long*, int, char*, size_t));
extern __MANGLE__ __V_* dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
extern __MANGLE__ __V_* dllfind __PROTO__((const char*, const char*, int, char*, size_t));
+extern __MANGLE__ Dllnames_t* dllnames __PROTO__((const char*, const char*, Dllnames_t*));
+extern __MANGLE__ __V_* dll_lib __PROTO__((Dllnames_t*, unsigned long, Dllerror_f, __V_*));
+extern __MANGLE__ __V_* dllmeth __PROTO__((const char*, const char*, unsigned long));
extern __MANGLE__ __V_* dllopen __PROTO__((const char*, int));
extern __MANGLE__ __V_* dllnext __PROTO__((int));
extern __MANGLE__ __V_* dlllook __PROTO__((__V_*, const char*));
+extern __MANGLE__ int dllcheck __PROTO__((__V_*, const char*, unsigned long, unsigned long*));
+extern __MANGLE__ unsigned long dllversion __PROTO__((__V_*, const char*));
+extern __MANGLE__ char* dllerror __PROTO__((int));
extern __MANGLE__ Dllscan_t* dllsopen __PROTO__((const char*, const char*, const char*));
extern __MANGLE__ Dllent_t* dllsread __PROTO__((Dllscan_t*));
diff --git a/usr/src/lib/libdll/sparcv9/Makefile b/usr/src/cmd/ast/libdll/sparcv9/Makefile
index ed28ed1df8..53f5bcbb15 100644
--- a/usr/src/lib/libdll/sparcv9/Makefile
+++ b/usr/src/cmd/ast/libdll/sparcv9/Makefile
@@ -23,12 +23,14 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
# Platform-specific config
# Note that "HOSTTYPE" matches the value used by AT&T upstream.
-DLLPLATFORMCPPFLAGS = '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"'
+DLLPLATFORMCPPFLAGS= '-DHOSTTYPE="sol$(RELEASE_MINOR).sun4"'
include ../Makefile.com
-include ../../Makefile.lib.64
+include $(SRC)/lib/Makefile.lib.64
install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/cmd/ast/libdll/sparcv9/Makefile.iffe b/usr/src/cmd/ast/libdll/sparcv9/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libdll/sparcv9/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/lib/libpp/Makefile b/usr/src/cmd/ast/libpp/Makefile
index f5ebfd574b..bfaa868db1 100644
--- a/usr/src/lib/libpp/Makefile
+++ b/usr/src/cmd/ast/libpp/Makefile
@@ -22,13 +22,14 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
-include ../Makefile.lib
+include $(SRC)/lib/Makefile.lib
-SUBDIRS = $(MACH)
-#$(BUILD64)SUBDIRS += $(MACH64)
+SUBDIRS= $(MACH)
all := TARGET= all
clean := TARGET= clean
@@ -38,26 +39,22 @@ _msg := TARGET= _msg
.KEEP_STATE:
-all clean clobber install _msg: $(SUBDIRS)
-
-LIBRARY= libpp.a
-
-HDRS= \
- pp.h \
- ppkey.h
+all clean clobber install: $(SUBDIRS)
+_msg: $(MACH)
+_feature:
-HDRDIR32= common
-HDRDIR64= common
+include ../Makefile.ast
+include Makefile.defs
+HDRS= $(HEADERINSTALL)
+HDRDIR32= $(ASTSRC)
+HDRDIR64= $(ASTSRC)
include ../Makefile.asthdr
install_h: $(ROOTHDRS)
-
-# We don't check these header files because they're owned by AT&T/AST
-check:
+install: install_h
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
-
FRC:
-include ../Makefile.targ
+include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/lib/libpp/Makefile.com b/usr/src/cmd/ast/libpp/Makefile.com
index b42419ce01..6140425eec 100644
--- a/usr/src/lib/libpp/Makefile.com
+++ b/usr/src/cmd/ast/libpp/Makefile.com
@@ -23,80 +23,45 @@
# Use is subject to license terms.
#
# Copyright (c) 2019, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
-SHELL=/usr/bin/ksh93
-
-LIBRARY= libpp.a
-VERS= .1
-
-OBJECTS= \
- ppargs.o \
- ppbuiltin.o \
- ppcall.o \
- ppcomment.o \
- ppcontext.o \
- ppcontrol.o \
- ppcpp.o \
- ppdata.o \
- pperror.o \
- ppexpr.o \
- ppfsm.o \
- ppincref.o \
- ppinput.o \
- ppkey.o \
- pplex.o \
- ppline.o \
- ppmacref.o \
- ppmisc.o \
- ppop.o \
- pppragma.o \
- ppprintf.o \
- ppproto.o \
- ppsearch.o \
- pptrace.o
+SHELL= /usr/bin/ksh93
-include ../../Makefile.astmsg
-
-include ../../Makefile.lib
+LIBRARY= libpp.a
+VERS= .1
-# mapfile-vers does not live with the sources in in common/ to make
-# automated code updates easier.
-MAPFILES= ../mapfile-vers
+include ../Makefile.defs
-# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
-include ../../../Makefile.ast
+OBJECTS += $(LIBOBJS)
-LIBS = $(DYNLIB)
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.ast
-LDLIBS += \
- -last \
- -lc
+MAPFILES= ../mapfile-vers
+LIBS= $(DYNLIB)
-SRCDIR = ../common
+LDLIBS += -last -lc
# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
# case - it MUST come as the last element but future changes in -D options
# may then cause silent breakage in the AST sources because the last -D
# option specified overrides previous -D options so we prefer the current
# way to explicitly list each single flag.
-CPPFLAGS = \
+CPPFLAGS= \
$(DTEXTDOM) $(DTS_ERRNO) \
-I. \
-I$(ROOT)/usr/include/ast \
-I$(ROOT)/usr/include \
-D_PACKAGE_ast \
'-DUSAGE_LICENSE=\
- "[-author?Glenn Fowler <gsf@research.att.com>]"\
- "[-copyright?Copyright (c) 1986-2009 AT&T Intellectual Property]"\
- "[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
- "[--catalog?libpp]"'
-
+ "[-author?Glenn Fowler <gsf@research.att.com>]"\
+ "[-copyright?Copyright (c) 1986-2012 AT&T Intellectual Property]"\
+ "[-license?http://www.eclipse.org/org/documents/epl-v10.html]"\
+ "[--catalog?libpp]"'
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += $(CNOWARN_UNINIT)
@@ -107,20 +72,20 @@ CERRWARN += -_gcc=-Wno-unused-value
# "pplex() parse error: turning off implications after 60 seconds"
SMATCH = off
-pics/ppcall.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/ppcontrol.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/ppcpp.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/ppexpr.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/pplex.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/ppop.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/ppsearch.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/ppsearch.o := CERRWARN += -_gcc=-Wno-sequence-point
-pics/pplex.o := CERRWARN += -_gcc=-Wno-implicit-fallthrough
-pics/ppcpp.o := CERRWARN += -_gcc=-Wno-implicit-fallthrough
-pics/ppproto.o := CERRWARN += -_gcc=-Wno-implicit-fallthrough
+all: $(LIBS)
-.KEEP_STATE:
+include $(SRC)/lib/Makefile.targ
-all: $(LIBS)
+ppdef.h: $(ASTSRC)/pp.tab
+ $(AST_TOOLS)/gentab -d $(ASTSRC)/pp.tab > $@
+
+pptab.h: $(ASTSRC)/pp.tab
+ $(AST_TOOLS)/gentab -t $(ASTSRC)/pp.tab > $@
+
+pics/%.o: $(ASTSRC)/%.c ppdef.h pptab.h
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ $(POST_PROCESS_O)
-include ../../Makefile.targ
+CLOBBERFILES += pptab.h ppdef.h
+
+include ../../Makefile.astmsg
diff --git a/usr/src/cmd/ast/libpp/Makefile.defs b/usr/src/cmd/ast/libpp/Makefile.defs
new file mode 100644
index 0000000000..4bbee17b6f
--- /dev/null
+++ b/usr/src/cmd/ast/libpp/Makefile.defs
@@ -0,0 +1,32 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+# These macros should be kept synchronised with those in
+# usr/src/contrib/ast/src/lib/libpp/Makefile
+
+AST_LICENSE = since=1996,author=gsf
+ASTLIB= libpp
+ASTSRC= $(C_AST)/src/lib/$(ASTLIB)
+HDRGUARD= pp
+
+FEATURES=
+HEADERSRC= pp.h ppkey.h
+HEADERGEN=
+HEADERINSTALL= $(HEADERSRC) $(HEADERGEN)
+LOBJDIRS=
+LIBOBJS= ppargs.o ppbuiltin.o ppcall.o ppcomment.o ppcontext.o ppcontrol.o \
+ ppcpp.o ppdata.o pperror.o ppexpr.o ppfsm.o ppincref.o ppinput.o \
+ ppkey.o pplex.o ppline.o ppmacref.o ppmisc.o ppop.o pppragma.o \
+ ppprintf.o ppproto.o ppsearch.o pptrace.o
diff --git a/usr/src/lib/libpp/sparc/Makefile b/usr/src/cmd/ast/libpp/i386/Makefile
index 6c35d1fc88..6c35d1fc88 100644
--- a/usr/src/lib/libpp/sparc/Makefile
+++ b/usr/src/cmd/ast/libpp/i386/Makefile
diff --git a/usr/src/lib/libpp/mapfile-vers b/usr/src/cmd/ast/libpp/mapfile-vers
index 5c35324feb..76d7fcc53c 100644
--- a/usr/src/lib/libpp/mapfile-vers
+++ b/usr/src/cmd/ast/libpp/mapfile-vers
@@ -21,6 +21,7 @@
#
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
#
diff --git a/usr/src/lib/libpp/i386/Makefile b/usr/src/cmd/ast/libpp/sparc/Makefile
index 0620d7d10f..20c09d9e82 100644
--- a/usr/src/lib/libpp/i386/Makefile
+++ b/usr/src/cmd/ast/libpp/sparc/Makefile
@@ -23,7 +23,8 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
include ../Makefile.com
diff --git a/usr/src/lib/libshell/Makefile b/usr/src/cmd/ast/libshell/Makefile
index fd0a93421d..817297a67b 100644
--- a/usr/src/lib/libshell/Makefile
+++ b/usr/src/cmd/ast/libshell/Makefile
@@ -23,46 +23,45 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
-include ../Makefile.lib
+include $(SRC)/lib/Makefile.lib
-SUBDIRS = $(MACH)
+SUBDIRS= $(MACH)
$(BUILD64)SUBDIRS += $(MACH64)
all := TARGET= all
clean := TARGET= clean
clobber := TARGET= clobber
install := TARGET= install
+install_h := TARGET= install_h
_msg := TARGET= _msg
+_feature := TARGET= _feature
.KEEP_STATE:
+.PARALLEL: $(SUBDIRS)
-all clean clobber install _msg: $(SUBDIRS)
-
-LIBRARY= libshell.a
-
-HDRS= \
- history.h \
- nval.h \
- shell.h
+all clean clobber install _feature: $(SUBDIRS)
+_msg: $(MACH)
-HDRDIR32= $(MACH)/include/ast
-HDRDIR64= $(MACH64)/include/ast
+include Makefile.defs
+HDRS= $(HEADERINSTALL)
+HDRDIR32= $(MACH)/ast
+HDRDIR64= $(MACH64)/ast
include ../Makefile.asthdr
-install_h: $(ROOTHDRS)
-
-# We don't check these header files because they're owned by AT&T/AST
-check:
+install_h: $(SUBDIRS) .WAIT $(ROOTHDRS)
+install: install_h
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
-
FRC:
+ASTSRC= $(CONTRIB)/ast/src/cmd/ksh93
include Makefile.demo
include Makefile.doc
-include ../Makefile.targ
+include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/cmd/ast/libshell/Makefile.com b/usr/src/cmd/ast/libshell/Makefile.com
new file mode 100644
index 0000000000..be07424b73
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/Makefile.com
@@ -0,0 +1,100 @@
+#
+# 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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2019, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+SHELL= /usr/bin/ksh93
+
+LIBRARY= libshell.a
+VERS= .1
+
+include ../Makefile.defs
+
+OBJECTS += $(LIBOBJS)
+
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.ast
+
+MAPFILES= ../mapfile-vers
+
+# Specify the MACH we currently use to build and test ksh
+LIBSHELLMACH= $(TARGETMACH)
+LIBSHELLBASE=..
+
+LIBS= $(DYNLIB)
+LDLIBS += -lcmd -ldll -last -lsocket -lsecdb -lm -lc
+
+# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
+# case - it MUST come as the last element but future changes in -D options
+# may then cause silent breakage in the AST sources because the last -D
+# option specified overrides previous -D options so we prefer the current
+# way to explicitly list each single flag.
+CPPFLAGS= \
+ $(DTEXTDOM) $(DTS_ERRNO) \
+ $(LIBSHELLCPPFLAGS) \
+ -Iast -I.
+
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
+
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += -_gcc=-Wno-unused-variable
+CERRWARN += -_gcc=-Wno-unused-function
+CERRWARN += $(CNOWARN_UNINIT)
+CERRWARN += -_gcc=-Wno-clobbered
+CERRWARN += -_gcc=-Wno-char-subscripts
+
+# smatch gets out of memory on common/sh/macro.c
+SMATCH= off
+
+all: install_h mkpicdirs .WAIT $(LIBS)
+
+mkpicdirs:
+ mkdir -p $(LOBJDIRS:%=pics/%)
+
+include $(SRC)/lib/Makefile.targ
+
+pics/%.o: $(ASTSRC)/%.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ $(POST_PROCESS_O)
+
+######################################################################
+# Header file generation
+
+$(HEADERSRC:%=ast/%): FRC
+ $(MKDIR) -p $(@D)
+ $(CP) $(ASTSRC)/include/$(@F) $@
+
+CLOBBERFILES += ast/*
+
+install_h: $(HEADERSRC:%=ast/%)
+
+_feature: FRC
+ $(MAKE) -f Makefile.iffe generate
+
+include ../../Makefile.astmsg
+
+FRC:
diff --git a/usr/src/cmd/ast/libshell/Makefile.defs b/usr/src/cmd/ast/libshell/Makefile.defs
new file mode 100644
index 0000000000..e2153a5714
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/Makefile.defs
@@ -0,0 +1,96 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+# These macros should be kept synchronised with those in
+# usr/src/contrib/ast/src/cmd/ksh93/Makefile
+
+AST_LICENSE = since=1982,author=dgk
+ASTLIB= libshell
+ASTSRC= $(C_AST)/src/cmd/ksh93
+HDRGUARD= ksh93
+
+FEATURES= cmds dynamic externs locale math options poll rlimits setjmp \
+ sigfeatures time ttys \
+ acct execargs pstat
+HEADERSRC= history.h nval.h shell.h
+HEADERGEN=
+HEADERINSTALL= $(HEADERSRC) $(HEADERGEN)
+LOBJDIRS= bltins data edit sh
+LIBOBJS= \
+ bltins/alarm.o \
+ bltins/cd_pwd.o \
+ bltins/cflow.o \
+ bltins/enum.o \
+ bltins/getopts.o \
+ bltins/hist.o \
+ bltins/lib.o \
+ bltins/misc.o \
+ bltins/poll_solaris.o \
+ bltins/print.o \
+ bltins/read.o \
+ bltins/regress.o \
+ bltins/shiocmd_solaris.o \
+ bltins/sleep.o \
+ bltins/test.o \
+ bltins/trap.o \
+ bltins/typeset.o \
+ bltins/ulimit.o \
+ bltins/umask.o \
+ bltins/whence.o \
+ data/aliases.o \
+ data/builtins.o \
+ data/keywords.o \
+ data/lexstates.o \
+ data/limits.o \
+ data/msg.o \
+ data/options.o \
+ data/signals.o \
+ data/strdata.o \
+ data/testops.o \
+ data/variables.o \
+ edit/completion.o \
+ edit/edit.o \
+ edit/emacs.o \
+ edit/hexpand.o \
+ edit/history.o \
+ edit/vi.o \
+ sh/args.o \
+ sh/arith.o \
+ sh/array.o \
+ sh/defs.o \
+ sh/deparse.o \
+ sh/expand.o \
+ sh/fault.o \
+ sh/fcin.o \
+ sh/init.o \
+ sh/io.o \
+ sh/jobs.o \
+ sh/lex.o \
+ sh/macro.o \
+ sh/main.o \
+ sh/name.o \
+ sh/nvdisc.o \
+ sh/nvtree.o \
+ sh/nvtype.o \
+ sh/parse.o \
+ sh/path.o \
+ sh/streval.o \
+ sh/string.o \
+ sh/subshell.o \
+ sh/tdump.o \
+ sh/timers.o \
+ sh/trestore.o \
+ sh/waitevent.o \
+ sh/xec.o
diff --git a/usr/src/lib/libshell/Makefile.demo b/usr/src/cmd/ast/libshell/Makefile.demo
index 0365970d0e..e1a81f07c2 100644
--- a/usr/src/lib/libshell/Makefile.demo
+++ b/usr/src/cmd/ast/libshell/Makefile.demo
@@ -21,39 +21,13 @@
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
+DEMOFILESRCDIR= $(ASTSRC)
ROOTDEMODIRBASE= $(ROOT)/usr/demo/ksh
-DEMOFILES= \
- bin/cpvprint \
- bin/crawlsrccomments \
- bin/filemutexdemo1 \
- bin/filetree1 \
- bin/gnaw \
- bin/mandelbrotset1 \
- bin/multifollow \
- bin/numtree1 \
- bin/primenumbers1 \
- bin/rssread \
- bin/shcalc \
- bin/shircbot \
- bin/shlint \
- bin/shman \
- bin/shnote \
- bin/shpiano \
- bin/shtinyurl \
- bin/shtwitter \
- bin/simplefileattributetree1 \
- bin/simplefiletree1 \
- bin/svcproptree1 \
- bin/termclock \
- bin/test_net_sctp \
- bin/xmldocumenttree1 \
- fun/dirs \
- fun/popd \
- fun/pushd \
- fun/title \
+DF_SRC= \
src/cpvprint.sh \
src/crawlsrccomments.sh \
src/filemutexdemo1.sh \
@@ -77,8 +51,16 @@ DEMOFILES= \
src/svcproptree1.sh \
src/termclock.sh \
src/test_net_sctp.sh \
- src/xmldocumenttree1.sh \
- tests/README.tests \
+ src/xmldocumenttree1.sh
+
+DF_BIN= $(DF_SRC:src/%.sh=bin/%)
+
+DF_FUN= \
+ fun/dirs \
+ fun/popd \
+ fun/pushd
+
+DF_TESTS= \
tests/shtests \
tests/alias.sh \
tests/append.sh \
@@ -91,6 +73,7 @@ DEMOFILES= \
tests/builtins.sh \
tests/case.sh \
tests/comvar.sh \
+ tests/comvario.sh \
tests/coprocess.sh \
tests/cubetype.sh \
tests/enum.sh \
@@ -101,12 +84,18 @@ DEMOFILES= \
tests/grep.sh \
tests/heredoc.sh \
tests/io.sh \
+ tests/leaks.sh \
+ tests/locale.sh \
+ tests/math.sh \
tests/nameref.sh \
+ tests/namespace.sh \
tests/options.sh \
tests/path.sh \
tests/pointtype.sh \
+ tests/pty.sh \
tests/quoting.sh \
tests/quoting2.sh \
+ tests/readcsv.sh \
tests/recttype.sh \
tests/restricted.sh \
tests/return.sh \
@@ -116,6 +105,18 @@ DEMOFILES= \
tests/statics.sh \
tests/subshell.sh \
tests/substring.sh \
+ tests/tilde.sh \
+ tests/timetype.sh \
+ tests/treemove.sh \
+ tests/types.sh \
+ tests/variables.sh \
+ tests/vartree1.sh \
+ tests/vartree2.sh
+
+
+DF_XTESTS= \
+ tests/README.tests \
+ tests/illumos_13434_chunked_heredoc.sh \
tests/sun_solaris_array_default_datatype.sh \
tests/sun_solaris_builtin_poll.sh \
tests/sun_solaris_builtin_sum.sh \
@@ -157,14 +158,9 @@ DEMOFILES= \
tests/sun_solaris_staticvariables.sh \
tests/sun_solaris_vartree001.sh \
tests/sun_solaris_vartree002.sh \
- tests/sun_solaris_vartree003.sh \
- tests/tilde.sh \
- tests/timetype.sh \
- tests/treemove.sh \
- tests/types.sh \
- tests/variables.sh \
- tests/vartree1.sh \
- tests/vartree2.sh
+ tests/sun_solaris_vartree003.sh
+
+DEMOFILES= $(DF_SRC) $(DF_BIN) $(DF_FUN) $(DF_TESTS) $(DF_XTESTS)
# Rules for executables
$(ROOTDEMODIRBASE)/tests/shtests := FILEMODE= 755
@@ -178,11 +174,15 @@ $(ROOTDEMODIRBASE)/bin/%: common/scripts/%.sh
$(ROOTDEMODIRBASE)/src/%.sh: common/scripts/%.sh
$(INS.file)
-
+
+$(ROOTDEMODIRBASE)/tests/%: common/tests/%
+ $(INS.file)
+
ROOTDEMODIRS= $(ROOTDEMODIRBASE) .WAIT \
$(ROOTDEMODIRBASE)/bin \
$(ROOTDEMODIRBASE)/fun \
$(ROOTDEMODIRBASE)/src \
$(ROOTDEMODIRBASE)/tests
-install: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
+_demoinstall: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
+install: _demoinstall
diff --git a/usr/src/lib/libshell/Makefile.doc b/usr/src/cmd/ast/libshell/Makefile.doc
index 5f507d28d9..2020c89dd8 100644
--- a/usr/src/lib/libshell/Makefile.doc
+++ b/usr/src/cmd/ast/libshell/Makefile.doc
@@ -23,6 +23,8 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
ROOTDOCDIRBASE= $(ROOT)/usr/share/doc/ksh
@@ -53,7 +55,7 @@ DOCFILES= \
images/callouts/10.png
# Documentation rules
-$(ROOTDOCDIRBASE)/%: common/%
+$(ROOTDOCDIRBASE)/%: $(ASTSRC)/%
$(INS.file)
$(ROOTDOCDIRBASE)/%: misc/%
@@ -74,4 +76,5 @@ $(ROOTDOCDIRS) := DIRMODE = 755
$(ROOTDOCDIRS):
$(INS.dir)
-install: $(ROOTDOCDIRS) .WAIT $(ROOTDOCFILES)
+_docinstall: $(ROOTDOCDIRS) .WAIT $(ROOTDOCFILES)
+install: _docinstall
diff --git a/usr/src/cmd/ast/libshell/Makefile.iffe b/usr/src/cmd/ast/libshell/Makefile.iffe
new file mode 100644
index 0000000000..cb9c916475
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/Makefile.iffe
@@ -0,0 +1,27 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.com
+include ../../Makefile.iffe
+
+FEATURE/acct FEATURE/execargs FEATURE/pstat:
+ PATH=$(AST_TOOLS):$$PATH \
+ $(AST_IFFE) $(IFFEFLAGS) -c '$(IFFEC)' def $(@F)
+FEATURE/math := IFFE_EXTRA = $(ASTSRC)/data/math.tab
+
+cleaniffe: FRC
+ $(RM) $(FEATURES:%=FEATURE/%)
+
+generate: cleaniffe $(FEATURES:%=FEATURE/%)
diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/acct b/usr/src/cmd/ast/libshell/amd64/FEATURE/acct
new file mode 100644
index 0000000000..ca587e66ea
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/acct
@@ -0,0 +1,8 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_acct_amd64
+#define _def_acct_amd64 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _dat_acct 1 /* acct in default lib(s) */
+#define _lib_acct 1 /* acct() in default lib(s) */
+#define _sys_acct 1 /* #include <sys/acct.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/cmds b/usr/src/cmd/ast/libshell/amd64/FEATURE/cmds
new file mode 100644
index 0000000000..9c8159bf36
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/cmds
@@ -0,0 +1,22 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/cmds by iffe version 2012-07-17 : : */
+#ifndef _def_cmds_ksh93
+#define _def_cmds_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _cmd_newgrp 1
+#define _usr_bin_newgrp 1
+#define _cmd_test 1
+#define _usr_bin_test 1
+#define _cmd_id 1
+#define _usr_bin_id 1
+#define _cmd_wc 1
+#define _usr_bin_wc 1
+#define _cmd_cut 1
+#define _usr_bin_cut 1
+#define _cmd_logname 1
+#define _usr_bin_logname 1
+#define _cmd_pfexec 1
+#define _usr_bin_pfexec 1
+#define _cmd_tput 1
+#define _usr_bin_tput 1
+#define _pth_ed "/usr/bin/ed"
+#endif
diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/dynamic b/usr/src/cmd/ast/libshell/amd64/FEATURE/dynamic
new file mode 100644
index 0000000000..96c308357b
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/dynamic
@@ -0,0 +1,16 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/dynamic by iffe version 2012-07-17 : : */
+#ifndef _def_dynamic_ksh93
+#define _def_dynamic_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#if SHOPT_DYNAMIC
+#include <dlldefs.h>
+#endif
+#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
+# define SHOPT_FS_3D 1
+#endif /* !SHOPT_FS_3D */
+#if SHOPT_FS_3D
+# undef mount
+# include <fs3d.h>
+#endif /* SHOPT_FS_3D */
+
+#endif
diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/execargs b/usr/src/cmd/ast/libshell/amd64/FEATURE/execargs
new file mode 100644
index 0000000000..a3488f6cf7
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/execargs
@@ -0,0 +1,5 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_execargs_amd64
+#define _def_execargs_amd64 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs b/usr/src/cmd/ast/libshell/amd64/FEATURE/externs
index c1fa9f9ee1..8828c30ba8 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/externs
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/externs
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/externs by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/cmd/ksh93/features/externs by iffe version 2012-07-17 : : */
+
#ifndef _def_externs_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,12 +63,6 @@
#define _def_externs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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 */
#define _hdr_math 1 /* #include <math.h> ok */
#define _mem_name_exception 1 /* name is a member of struct exception */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale b/usr/src/cmd/ast/libshell/amd64/FEATURE/locale
index 92a8838fc4..6b5aba0a08 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/locale
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/locale
@@ -1,19 +1,22 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/locale by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/locale by iffe version 2012-07-17 : : */
#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_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_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 */
#define _hdr_wchar 1 /* #include <wchar.h> ok */
+#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _lib_localeconv 1 /* localeconv() in default lib(s) */
#define _lib_wctype 1 /* wctype() in default lib(s) */
#define _lib_iswctype 1 /* iswctype() in default lib(s) */
#define _lib_iswblank 1 /* iswblank() in default lib(s) */
+#define _lib_wctrans 1 /* wctrans() in default lib(s) */
+#define _lib_towctrans 1 /* towctrans() in default lib(s) */
+#define _hdr_time 1 /* #include <time.h> ok */
+#define _sys_time 1 /* #include <sys/time.h> ok */
+#define _sys_times 1 /* #include <sys/times.h> ok */
+#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _typ_wctrans_t 1 /* wctrans_t is a type */
#if _PACKAGE_ast
# undef _hdr_locale
# define _hdr_locale 1
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math b/usr/src/cmd/ast/libshell/amd64/FEATURE/math
index c6ec7ce3d6..b86d8d56ac 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/math
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/math.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/math.sh by iffe version 2012-07-17 : : */
#ifndef _def_math_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,24 +62,18 @@
#define _def_math_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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_20100309/build_i386_64bit/src/cmd/ksh93/data/math.tab : : */
+
+/* : : generated by cmd/ast/tools/iffe from contrib/ast/src/cmd/ksh93/data/math.tab : : */
typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
-#include <ast_standards.h>
#include <math.h>
#include <ieeefp.h>
static Sfdouble_t local_finite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return finite(a1);}
static int local_fpclassify __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclassify(a1);}
+static int local_fpclass __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclass(a1);}
static int local_isfinite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isfinite(a1);}
static int local_isgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreater(a1,a2);}
static int local_isgreaterequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreaterequal(a1,a2);}
@@ -88,13 +82,9 @@ static int local_isless __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTO
static int local_islessequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessequal(a1,a2);}
static int local_islessgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessgreater(a1,a2);}
static int local_isnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isnormal(a1);}
-#ifdef FP_SUBNORMAL
-static int local_issubnormal __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_SUBNORMAL; }
-#endif
+static int local_issubnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_SUBNORMAL; }
static int local_isunordered __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isunordered(a1,a2);}
-#ifdef FP_ZERO
-static int local_iszero __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_ZERO; }
-#endif
+static int local_iszero __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_ZERO; }
static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return signbit(a1);}
/*
@@ -103,35 +93,36 @@ static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a
*/
const struct mathtab shtab_math[] =
{
- "\001acos", (Math_f)acosl,
- "\001acosh", (Math_f)acoshl,
- "\001asin", (Math_f)asinl,
- "\001asinh", (Math_f)asinhl,
- "\001atan", (Math_f)atanl,
- "\002atan2", (Math_f)atan2l,
- "\001atanh", (Math_f)atanhl,
- "\001cbrt", (Math_f)cbrtl,
- "\001ceil", (Math_f)ceill,
- "\002copysign", (Math_f)copysignl,
- "\001cos", (Math_f)cosl,
- "\001cosh", (Math_f)coshl,
- "\001erf", (Math_f)erfl,
- "\001erfc", (Math_f)erfcl,
- "\001exp", (Math_f)expl,
- "\001exp2", (Math_f)exp2l,
- "\001expm1", (Math_f)expm1l,
- "\001fabs", (Math_f)fabsl,
- "\001abs", (Math_f)fabsl,
- "\002fdim", (Math_f)fdiml,
- "\001finite", (Math_f)local_finite,
- "\001floor", (Math_f)floorl,
- "\001int", (Math_f)floorl,
- "\003fma", (Math_f)fmal,
- "\002fmax", (Math_f)fmaxl,
- "\002fmin", (Math_f)fminl,
- "\002fmod", (Math_f)fmodl,
+ "\001acos", (Math_f)(uintptr_t)acosl,
+ "\001acosh", (Math_f)(uintptr_t)acoshl,
+ "\001asin", (Math_f)(uintptr_t)asinl,
+ "\001asinh", (Math_f)(uintptr_t)asinhl,
+ "\001atan", (Math_f)(uintptr_t)atanl,
+ "\002atan2", (Math_f)(uintptr_t)atan2l,
+ "\001atanh", (Math_f)(uintptr_t)atanhl,
+ "\001cbrt", (Math_f)(uintptr_t)cbrtl,
+ "\001ceil", (Math_f)(uintptr_t)ceill,
+ "\002copysign", (Math_f)(uintptr_t)copysignl,
+ "\001cos", (Math_f)(uintptr_t)cosl,
+ "\001cosh", (Math_f)(uintptr_t)coshl,
+ "\001erf", (Math_f)(uintptr_t)erfl,
+ "\001erfc", (Math_f)(uintptr_t)erfcl,
+ "\001exp", (Math_f)(uintptr_t)expl,
+ "\001exp2", (Math_f)(uintptr_t)exp2l,
+ "\001expm1", (Math_f)(uintptr_t)expm1l,
+ "\001fabs", (Math_f)(uintptr_t)fabsl,
+ "\001abs", (Math_f)(uintptr_t)fabsl,
+ "\002fdim", (Math_f)(uintptr_t)fdiml,
+ "\001finite", (Math_f)(uintptr_t)local_finite,
+ "\001floor", (Math_f)(uintptr_t)floorl,
+ "\001int", (Math_f)(uintptr_t)floorl,
+ "\003fma", (Math_f)(uintptr_t)fmal,
+ "\002fmax", (Math_f)(uintptr_t)fmaxl,
+ "\002fmin", (Math_f)(uintptr_t)fminl,
+ "\002fmod", (Math_f)(uintptr_t)fmodl,
"\011fpclassify", (Math_f)(uintptr_t)local_fpclassify,
- "\002hypot", (Math_f)hypotl,
+ "\011fpclass", (Math_f)(uintptr_t)local_fpclass,
+ "\002hypot", (Math_f)(uintptr_t)hypotl,
"\011ilogb", (Math_f)(uintptr_t)ilogbl,
"\011isfinite", (Math_f)(uintptr_t)local_isfinite,
"\012isgreater", (Math_f)(uintptr_t)local_isgreater,
@@ -142,41 +133,38 @@ const struct mathtab shtab_math[] =
"\012islessgreater", (Math_f)(uintptr_t)local_islessgreater,
"\011isnan", (Math_f)(uintptr_t)isnanl,
"\011isnormal", (Math_f)(uintptr_t)local_isnormal,
-#ifdef FP_SUBNORMAL
"\011issubnormal", (Math_f)(uintptr_t)local_issubnormal,
-#endif
"\012isunordered", (Math_f)(uintptr_t)local_isunordered,
-#ifdef FP_ZERO
"\011iszero", (Math_f)(uintptr_t)local_iszero,
-#endif
- "\001j0", (Math_f)j0l,
- "\001j1", (Math_f)j1l,
+ "\001j0", (Math_f)(uintptr_t)j0l,
+ "\001j1", (Math_f)(uintptr_t)j1l,
"\002jn", (Math_f)(uintptr_t)jnl,
- "\001lgamma", (Math_f)lgammal,
- "\001log", (Math_f)logl,
- "\001log10", (Math_f)log10l,
- "\001log1p", (Math_f)log1pl,
- "\001log2", (Math_f)log2l,
- "\001logb", (Math_f)logbl,
- "\001nearbyint", (Math_f)nearbyintl,
- "\002nextafter", (Math_f)nextafterl,
- "\002nexttoward", (Math_f)nexttowardl,
- "\002pow", (Math_f)powl,
- "\002remainder", (Math_f)remainderl,
- "\001rint", (Math_f)rintl,
- "\001round", (Math_f)roundl,
- "\002scalb", (Math_f)scalbl,
- "\002scalbn", (Math_f)scalbnl,
+ "\042ldexp", (Math_f)(uintptr_t)ldexpl,
+ "\001lgamma", (Math_f)(uintptr_t)lgammal,
+ "\001log", (Math_f)(uintptr_t)logl,
+ "\001log10", (Math_f)(uintptr_t)log10l,
+ "\001log1p", (Math_f)(uintptr_t)log1pl,
+ "\001log2", (Math_f)(uintptr_t)log2l,
+ "\001logb", (Math_f)(uintptr_t)logbl,
+ "\001nearbyint", (Math_f)(uintptr_t)nearbyintl,
+ "\002nextafter", (Math_f)(uintptr_t)nextafterl,
+ "\002nexttoward", (Math_f)(uintptr_t)nexttowardl,
+ "\002pow", (Math_f)(uintptr_t)powl,
+ "\002remainder", (Math_f)(uintptr_t)remainderl,
+ "\001rint", (Math_f)(uintptr_t)rintl,
+ "\001round", (Math_f)(uintptr_t)roundl,
+ "\002scalb", (Math_f)(uintptr_t)scalbl,
+ "\002scalbn", (Math_f)(uintptr_t)scalbnl,
"\011signbit", (Math_f)(uintptr_t)local_signbit,
- "\001sin", (Math_f)sinl,
- "\001sinh", (Math_f)sinhl,
- "\001sqrt", (Math_f)sqrtl,
- "\001tan", (Math_f)tanl,
- "\001tanh", (Math_f)tanhl,
- "\001tgamma", (Math_f)tgammal,
- "\001trunc", (Math_f)truncl,
- "\001y0", (Math_f)y0l,
- "\001y1", (Math_f)y1l,
+ "\001sin", (Math_f)(uintptr_t)sinl,
+ "\001sinh", (Math_f)(uintptr_t)sinhl,
+ "\001sqrt", (Math_f)(uintptr_t)sqrtl,
+ "\001tan", (Math_f)(uintptr_t)tanl,
+ "\001tanh", (Math_f)(uintptr_t)tanhl,
+ "\001tgamma", (Math_f)(uintptr_t)tgammal,
+ "\001trunc", (Math_f)(uintptr_t)truncl,
+ "\001y0", (Math_f)(uintptr_t)y0l,
+ "\001y1", (Math_f)(uintptr_t)y1l,
"\002yn", (Math_f)(uintptr_t)ynl,
"", (Math_f)0
};
diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/options b/usr/src/cmd/ast/libshell/amd64/FEATURE/options
new file mode 100644
index 0000000000..24978488cd
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/options
@@ -0,0 +1,21 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/options by iffe version 2012-07-17 : : */
+#ifndef _def_options_ksh93
+#define _def_options_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define SHELLMAGIC 1
+#ifndef SHOPT_DEVFD
+# define SHOPT_DEVFD 1
+#endif
+#ifndef SHOPT_PFSH
+# define SHOPT_PFSH 1
+#endif
+#undef SHOPT_TEST_L
+#ifndef SHOPT_SYSRC
+# define SHOPT_SYSRC 1
+#endif
+#undef SHOPT_UCB
+#if !_PACKAGE_ast && ( (MB_LEN_MAX-1)<=0 || !defined(_lib_mbtowc) )
+# undef SHOPT_MULTIBYTE
+#endif
+
+#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll b/usr/src/cmd/ast/libshell/amd64/FEATURE/poll
index 6626a56a90..c76d76c633 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/poll
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/poll
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/poll by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/poll by iffe version 2012-07-17 : : */
#ifndef _def_poll_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,12 +62,8 @@
#define _def_poll_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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_socket 1 /* -lsocket is a library */
#define _hdr_poll 1 /* #include <poll.h> ok */
#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
#define _sys_poll 1 /* #include <sys/poll.h> ok */
@@ -86,8 +82,9 @@
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
#define _sys_select 1 /* #include <sys/select.h> ok */
#define _typ_fd_set 1 /* fd_set is a type */
-#define _socketpair_devfd 1 /* /dev/fd/N handles socketpair() */
-
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _typ_socklen_t 1 /* socklen_t is a type */
+
#ifdef _lib_poll
# define poll _SYS_poll
#else
diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/pstat b/usr/src/cmd/ast/libshell/amd64/FEATURE/pstat
new file mode 100644
index 0000000000..a82763d595
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/pstat
@@ -0,0 +1,5 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_pstat_amd64
+#define _def_pstat_amd64 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/rlimits b/usr/src/cmd/ast/libshell/amd64/FEATURE/rlimits
new file mode 100644
index 0000000000..6dc4d85bd9
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/rlimits
@@ -0,0 +1,37 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/rlimits by iffe version 2012-07-17 : : */
+#ifndef _def_rlimits_ksh93
+#define _def_rlimits_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _sys_time 1 /* #include <sys/time.h> ok */
+#define _sys_resource 1 /* #include <sys/resource.h> ok */
+#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
+#define _lib_ulimit 1 /* ulimit() in default lib(s) */
+#define _hdr_time 1 /* #include <time.h> ok */
+#define _sys_times 1 /* #include <sys/times.h> ok */
+#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _typ_rlim_t 1 /* rlim_t is a type */
+#define _typ_rlim64_t 1 /* rlim64_t is a type */
+
+#if _sys_resource
+# include <sys/resource.h>
+# if _lib_getrlimit64
+# undef getrlimit
+# define getrlimit getrlimit64
+# undef setrlimit
+# define setrlimit setrlimit64
+# if _typ_rlim64_t
+# undef rlimit
+# define rlimit rlimit64
+# undef rlim_t
+# define rlim_t rlim64_t
+# endif
+# ifdef RLIM64_INFINITY
+# undef RLIM_INFINITY
+# define RLIM_INFINITY RLIM64_INFINITY
+# endif
+# endif
+#endif
+
+
+#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp b/usr/src/cmd/ast/libshell/amd64/FEATURE/setjmp
index bd4a7ccd92..2e57e9cd18 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/setjmp
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/setjmp
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/setjmp by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/setjmp by iffe version 2012-07-17 : : */
#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_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_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) */
#define _lib__setjmp 1 /* _setjmp() in default lib(s) */
#define _lib__longjmp 1 /* _longjmp() in default lib(s) */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures b/usr/src/cmd/ast/libshell/amd64/FEATURE/sigfeatures
index 0b40374d91..39231bc866 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/sigfeatures
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/sigfeatures
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/sigfeatures by iffe version 2012-07-17 : : */
#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_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_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) */
#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
#define _hdr_time 1 /* #include <time.h> ok */
@@ -15,7 +9,6 @@
#define _sys_times 1 /* #include <sys/times.h> ok */
#define _hdr_stddef 1 /* #include <stddef.h> ok */
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_ast 1 /* #include <ast.h> ok */
#define _hdr_signal 1 /* #include <signal.h> ok */
#define _typ_sigset_t 1 /* sigset_t is a type */
#ifndef _mem_sigvec_sv_mask
@@ -49,7 +42,7 @@
#endif /* _lib_sigprocmask */
#undef _SIGRTMIN
-#define _SIGRTMIN 41
+#define _SIGRTMIN 42
#undef _SIGRTMAX
-#define _SIGRTMAX 48
+#define _SIGRTMAX 73
#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time b/usr/src/cmd/ast/libshell/amd64/FEATURE/time
index cb3d0aeb3d..0e1c2627b6 100644
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/time
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/time
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/cmd/ksh93/features/time by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/time by iffe version 2012-07-17 : : */
#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_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_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 */
#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */
#define _lib_setitimer 1 /* setitimer() in default lib(s) */
diff --git a/usr/src/cmd/ast/libshell/amd64/FEATURE/ttys b/usr/src/cmd/ast/libshell/amd64/FEATURE/ttys
new file mode 100644
index 0000000000..f9748cf4c3
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/FEATURE/ttys
@@ -0,0 +1,14 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/ttys by iffe version 2012-07-17 : : */
+#ifndef _def_ttys_ksh93
+#define _def_ttys_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_termios 1 /* #include <termios.h> ok */
+#define _hdr_termio 1 /* #include <termio.h> ok */
+#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
+#define _sys_termios 1 /* #include <sys/termios.h> ok */
+#define _sys_termio 1 /* #include <sys/termio.h> ok */
+#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
+#define _sys_filio 1 /* #include <sys/filio.h> ok */
+#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
+#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
+#endif
diff --git a/usr/src/lib/libsum/sparcv9/Makefile b/usr/src/cmd/ast/libshell/amd64/Makefile
index 9f293be4fa..d6a7d68d4f 100644
--- a/usr/src/lib/libsum/sparcv9/Makefile
+++ b/usr/src/cmd/ast/libshell/amd64/Makefile
@@ -25,6 +25,6 @@
#
include ../Makefile.com
-include ../../Makefile.lib.64
+include $(SRC)/lib/Makefile.lib.64
install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/cmd/ast/libshell/amd64/Makefile.iffe b/usr/src/cmd/ast/libshell/amd64/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/amd64/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/lib/libshell/common/data/solaris_cmdlist.h b/usr/src/cmd/ast/libshell/common/illumos_cmdlist.h
index ba724a15b1..cb18d84ae6 100644
--- a/usr/src/lib/libshell/common/data/solaris_cmdlist.h
+++ b/usr/src/cmd/ast/libshell/common/illumos_cmdlist.h
@@ -21,25 +21,26 @@
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
*/
-#ifndef _SOLARIS_KSH_CMDLIST_H
-#define _SOLARIS_KSH_CMDLIST_H
+#ifndef _ILLUMOS_KSH_CMDLIST_H
+#define _ILLUMOS_KSH_CMDLIST_H
#ifdef __cplusplus
extern "C" {
#endif
/*
- * List builtins for Solaris.
+ * List builtins for illumos.
* The list here is partially autogenerated and partially hand-picked
- * based on compatibility with the native Solaris versions of these
+ * based on compatibility with the native illumos versions of these
* tools
*/
/*
- * Commands which are 100% compatible with native Solaris versions (/bin is
- * a softlink to ./usr/bin, ksh93 takes care about the lookup)
+ * Commands which are 100% compatible with native illumos versions (/bin is
+ * a softlink to ./usr/bin, ksh93 takes care of the lookup)
*/
#define BINCMDLIST(f) \
{ "/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
@@ -103,20 +104,14 @@ ASTCMDLIST(date)
ASTCMDLIST(dirname)
BINCMDLIST(dirname)
GNUCMDLIST(dirname)
-ASTCMDLIST(egrep)
-XPG4CMDLIST(egrep)
ASTCMDLIST(expr)
GNUCMDLIST(expr)
XPG6CMDLIST(expr)
ASTCMDLIST(fds)
-ASTCMDLIST(fgrep)
-XPG4CMDLIST(fgrep)
ASTCMDLIST(fmt)
ASTCMDLIST(fold)
BINCMDLIST(fold)
GNUCMDLIST(fold)
-ASTCMDLIST(grep)
-XPG4CMDLIST(grep)
ASTCMDLIST(head)
BINCMDLIST(head)
ASTCMDLIST(id)
@@ -147,7 +142,6 @@ GNUCMDLIST(paste)
ASTCMDLIST(pathchk)
BINCMDLIST(pathchk)
GNUCMDLIST(pathchk)
-ASTCMDLIST(readlink)
ASTCMDLIST(rev)
BINCMDLIST(rev)
ASTCMDLIST(rm)
@@ -181,8 +175,6 @@ GNUCMDLIST(uniq)
ASTCMDLIST(wc)
BINCMDLIST(wc)
GNUCMDLIST(wc)
-ASTCMDLIST(xgrep)
-BINCMDLIST(xgrep)
/* Mandatory for ksh93 test suite and AST scripts */
BINCMDLIST(getconf)
@@ -191,4 +183,4 @@ BINCMDLIST(getconf)
}
#endif
-#endif /* !_SOLARIS_KSH_CMDLIST_H */
+#endif /* !_ILLUMOS_KSH_CMDLIST_H */
diff --git a/usr/src/lib/libshell/common/scripts/cpvprint.sh b/usr/src/cmd/ast/libshell/common/scripts/cpvprint.sh
index 1257d24876..5c8c706579 100644
--- a/usr/src/lib/libshell/common/scripts/cpvprint.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/cpvprint.sh
@@ -116,7 +116,7 @@ format [ arguments ]
[+SEE ALSO?\bksh93\b(1), \bcpvlint\b(1)]
'
-while getopts -a "${progname}" "${cpvprint_usage}" OPT ; do
+while getopts -a "${progname}" "${cpvprint_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
diff --git a/usr/src/lib/libshell/common/scripts/crawlsrccomments.sh b/usr/src/cmd/ast/libshell/common/scripts/crawlsrccomments.sh
index bcc6bec0ae..109a69f0ab 100644
--- a/usr/src/lib/libshell/common/scripts/crawlsrccomments.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/crawlsrccomments.sh
@@ -79,7 +79,7 @@ function attrstrtoattrarray
(( currattrlen++ ))
done
s="${s:currattrlen:${#s}}"
-
+
# anything left ?
(( ${#s} == 0 )) && break
@@ -97,14 +97,14 @@ function attrstrtoattrarray
tagstr="${s:0:currattrlen}"
if [[ "${tagstr}" == *=* ]] ; then
# normal case: attribute with value
-
+
tagval="${tagstr#*=}"
-
+
# strip quotes ('' or "")
if [[ "${tagval}" == ~(Elr)(\'.*\'|\".*\") ]] ; then
tagval="${tagval:1:${#tagval}-2}"
fi
-
+
aa[${aa_count}]=( name="${tagstr%%=*}" value="${tagval}" )
else
# special case for HTML where you have something like <foo baz>
@@ -126,17 +126,17 @@ function handle_xml_document
nameref doc=${callbacks["arg_tree"]}
nameref nodepath="${stack.items[stack.pos]}"
nameref nodesnum="${stack.items[stack.pos]}num"
-
+
case "${tag_type}" in
tag_comment)
- nodepath[${nodesnum}]+=(
+ nodepath[${nodesnum}]+=(
typeset tagtype="comment"
typeset tagvalue="${tag_value}"
)
(( nodesnum++ ))
;;
esac
-
+
# print "xmltok: '${tag_type}' = '${tag_value}'"
}
@@ -149,19 +149,19 @@ function xml_tok
typeset isendtag # bool: true/false
typeset issingletag # bool: true/false (used for tags like "<br />")
nameref callbacks=${1}
-
+
[[ ! -z "${callbacks["document_start"]}" ]] && ${callbacks["document_start"]} "${1}" "document_start"
while IFS='' read -r -N 1 c ; do
isendtag=false
-
+
if [[ "$c" == "<" ]] ; then
# flush any text content
if [[ "$buf" != "" ]] ; then
[[ ! -z "${callbacks["tag_text"]}" ]] && ${callbacks["tag_text"]} "${1}" "tag_text" "$buf"
buf=""
fi
-
+
IFS='' read -r -N 1 c
if [[ "$c" == "/" ]] ; then
isendtag=true
@@ -170,7 +170,7 @@ function xml_tok
fi
IFS='' read -r -d '>' c
buf+="$c"
-
+
# handle comments
if [[ "$buf" == ~(El)!-- ]] ; then
# did we read the comment completely ?
@@ -181,12 +181,12 @@ function xml_tok
buf+="$c"
done
fi
-
+
[[ ! -z "${callbacks["tag_comment"]}" ]] && ${callbacks["tag_comment"]} "${1}" "tag_comment" "${buf:3:${#buf}-5}"
buf=""
continue
fi
-
+
# check if the tag starts and ends at the same time (like "<br />")
if [[ "${buf}" == ~(Er).*/ ]] ; then
issingletag=true
@@ -194,7 +194,7 @@ function xml_tok
else
issingletag=false
fi
-
+
# check if the tag has attributes (e.g. space after name)
if [[ "$buf" == ~(E)[[:space:][:blank:]] ]] ; then
namebuf="${buf%%~(E)[[:space:][:blank:]].*}"
@@ -203,7 +203,7 @@ function xml_tok
namebuf="$buf"
attrbuf=""
fi
-
+
if ${isendtag} ; then
[[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf"
else
@@ -221,7 +221,7 @@ function xml_tok
done
[[ ! -z "${callbacks["document_end"]}" ]] && ${callbacks["document_end"]} "${1}" "document_end" "exit_success"
-
+
print # final newline to make filters like "sed" happy
}
@@ -242,14 +242,14 @@ function enumerate_comments_shell
while (( res == 0 )) ; do
IFS='' read -r line
(( res=$? ))
-
+
if [[ "${line}" == ~(El)#.* ]] ; then
comment+="${line#\#}${ch.newline}"
else
if [[ "$comment" != "" ]] ; then
comment_array[ca++]="${comment}"
comment=""
-
+
if (( ca > max_num_comments )) ; then
break
fi
@@ -278,14 +278,14 @@ function enumerate_comments_troff
while (( res == 0 )) ; do
IFS='' read -r line
(( res=$? ))
-
+
if [[ "${line}" == ~(El)\.*\\\" ]] ; then
comment+="${line#~(El)\.*\\\"}${ch.newline}"
else
if [[ "$comment" != "" ]] ; then
comment_array[ca++]="${comment}"
comment=""
-
+
if (( ca > max_num_comments )) ; then
break
fi
@@ -333,7 +333,7 @@ function enumerate_comments_cpp
typeset comment_continued=false
# position of current //-pos
compound comment_pos=(
- integer x=-1
+ integer x=-1
integer y=-1
)
# position of previous //-pos
@@ -368,22 +368,22 @@ function enumerate_comments_cpp
for (( file_pos=0 ; file_pos <= content_length ; file_pos++ )) ; do
c2="${content:file_pos:2}"
c="${c2:0:1}"
-
+
if [[ "$c" == "${ch.newline}" ]] ; then
(( line_pos.x=0, line_pos.y++ ))
else
(( line_pos.x++ ))
fi
-
+
if ${state.in_c_comment} ; then
if [[ "$c2" == "*/" ]] ; then
(( file_pos++, line_pos.x++ ))
state.in_c_comment=false
-
+
# flush comment text
comment_array[ca++]="${comment}"
comment=""
-
+
if (( ca > max_num_comments )) ; then
break
fi
@@ -393,7 +393,7 @@ function enumerate_comments_cpp
elif ${state.cxx.in_comment} ; then
if [[ "$c" == "${ch.newline}" || "$c" == "" ]] ; then
state.cxx.in_comment=false
-
+
# flush comment text
if ${state.cxx.comment_continued} ; then
comment_array[ca-1]+="${ch.newline}${comment}"
@@ -405,7 +405,7 @@ function enumerate_comments_cpp
state.cxx.comment_prev_pos.y=state.cxx.comment_pos.y ))
fi
comment=""
-
+
if (( ca > max_num_comments )) ; then
break
fi
@@ -482,11 +482,11 @@ function get_file_format
nameref file_format="$2"
typeset fileeval # evaluation result of /usr/bin/file
-
+
# check whether "filename" is a plain, readable file
[[ ! -f "$filename" ]] && return 1
[[ ! -r "$filename" ]] && return 1
-
+
# In theory this code would exclusively look at the contents of
# the file to figure out it's file format - unfortunately
# /usr/bin/file is virtually useless (the heuristics, matching
@@ -494,7 +494,7 @@ function get_file_format
# we have to do a multi-stage approach which looks
# at the file's content if possible and at the filename
# otherwise. Fun... ;-(
-
+
# pass one: Find matches for file formats where /usr/bin/file
# is known to be unreliable:
case "$filename" in
@@ -592,7 +592,7 @@ function get_file_format
return 0
;;
esac
-
+
return 1
}
@@ -612,13 +612,13 @@ function extract_comments
typeset fileformat_found="false" # "true" or "false"
typeset file_format=""
-
+
typeset -A hashsum
typeset comments_parsed="false" # "true" or "false"
typeset -a comments
)
-
+
records[${filename}].hashsum["md5"]="$(sum -x md5 < "$filename")"
records[${filename}].hashsum["sha1"]="$(sum -x sha1 < "$filename")"
@@ -628,7 +628,7 @@ function extract_comments
else
return 1
fi
-
+
case "$datatype" in
c_source|imakefile)
enumerate_comments_cpp "${filename}" "records[${filename}].comments" ${max_num_comments} ${max_filesize_for_scan} && \
@@ -648,7 +648,7 @@ function extract_comments
# records[${filename}].comments_parsed=true
# ;;
esac
-
+
return 0
}
@@ -657,14 +657,14 @@ function parse_http_response
{
nameref response="$1"
typeset h statuscode statusmsg i
-
+
# we use '\r' as additional IFS to filter the final '\r'
IFS=$' \t\r' read -r h statuscode statusmsg # read HTTP/1.[01] <code>
[[ "$h" != ~(Eil)HTTP/.* ]] && { print -u2 -f $"%s: HTTP/ header missing\n" "$0" ; return 1 ; }
[[ "$statuscode" != ~(Elr)[0-9]* ]] && { print -u2 -f $"%s: invalid status code\n" "$0" ; return 1 ; }
response.statuscode="$statuscode"
response.statusmsg="$statusmsg"
-
+
# skip remaining headers
while IFS='' read -r i ; do
[[ "$i" == $'\r' ]] && break
@@ -692,8 +692,8 @@ function cat_http_body
{
typeset emode="$1"
typeset hexchunksize="0"
- integer chunksize=0
-
+ integer chunksize=0
+
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\r' read hexchunksize &&
[[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] &&
@@ -711,7 +711,7 @@ function cat_url
{
typeset protocol="${1%://*}"
typeset path1="${1#*://}" # "http://foo.bat.net/x/y.html" ----> "foo.bat.net/x/y.html"
-
+
if [[ "${protocol}" == "file" ]] ; then
cat "${path1}"
return $?
@@ -719,7 +719,7 @@ function cat_url
typeset host="${path1%%/*}"
typeset path="${path1#*/}"
typeset port="${host##*:}"
-
+
integer netfd
compound httpresponse # http response
@@ -734,9 +734,9 @@ function cat_url
else
host="${host%:*}"
fi
-
+
printmsg "protocol=${protocol} port=${port} host=${host} path=${path}"
-
+
# prechecks
[[ "${protocol}" != "" ]] || { print -u2 -f "%s: protocol not set.\n" "$0" ; return 1 ; }
[[ "${port}" != "" ]] || { print -u2 -f "%s: port not set.\n" "$0" ; return 1 ; }
@@ -749,51 +749,51 @@ function cat_url
sslfifo.dir="$(mktemp -d)"
sslfifo.in="${sslfifo.dir}/in"
sslfifo.out="${sslfifo.dir}/out"
-
+
# register an EXIT trap and use "errexit" to leave it at the first error
# (this saves lots of if/fi tests for error checking)
- trap "rm -r \"${sslfifo.dir}\"" EXIT
+ trap "rm -r \"${sslfifo.dir}\"" EXIT
set -o errexit
-
+
mkfifo "${sslfifo.in}" "${sslfifo.out}"
# create async openssl child to handle https
openssl s_client -quiet -connect "${host}:${port}" <"${sslfifo.in}" >>"${sslfifo.out}" &
- # send HTTP request
+ # send HTTP request
request="GET /${path} HTTP/1.1\r\n"
request+="Host: ${host}\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}"
-
+
# collect response and send it to stdout
{
parse_http_response httpresponse
cat_http_body "${httpresponse.transfer_encoding}"
} <"${sslfifo.out}"
-
+
wait || { print -u2 -f "%s: openssl failed.\n" ; exit 1 ; }
-
+
return 0
else
redirect {netfd}<> "/dev/tcp/${host}/${port}"
(( $? != 0 )) && { print -u2 -f "%s: Could not open %s\n" "$0" "${1}" ; return 1 ; }
- # send HTTP request
+ # send HTTP request
request="GET /${path} HTTP/1.1\r\n"
request+="Host: ${host}\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}
-
+
# collect response and send it to stdout
parse_http_response httpresponse <&${netfd}
cat_http_body "${httpresponse.transfer_encoding}" <&${netfd}
-
+
# close connection
redirect {netfd}<&-
-
+
return 0
fi
else
@@ -847,14 +847,14 @@ function print_stats
function print_comments_plain
{
set -o errexit
-
+
nameref records=$1
nameref options=$2
typeset i j
for i in $(printf "%s\n" "${!records[@]}" | sort) ; do
nameref node=records[$i]
-
+
if [[ "${options.filepattern.accept}" != "" ]] && \
[[ "${node.filename}" != ${options.filepattern.accept} ]] ; then
continue
@@ -873,13 +873,13 @@ function print_comments_plain
for j in "${!node.comments[@]}" ; do
typeset s="${node.comments[$j]}"
typeset match=false
-
+
if [[ "${options.commentpattern.accept}" != "" ]] && \
- [[ "$s" == ${options.commentpattern.accept} ]] ; then
+ [[ "$s" == ${options.commentpattern.accept} ]] ; then
match=true
fi
if [[ "${options.commentpattern.reject}" != "" ]] && \
- [[ "$s" == ${options.commentpattern.reject} ]] ; then
+ [[ "$s" == ${options.commentpattern.reject} ]] ; then
match=false
fi
@@ -889,7 +889,7 @@ function print_comments_plain
node.license_info_found=true
fi
done
-
+
if ! "${node.license_info_found}" ; then
printf "## no match found in '%s'," "${node.filename}"
printf "comments_parsed=%s, fileformat_found=%s, file_format=%s\n" \
@@ -898,7 +898,7 @@ function print_comments_plain
"${node.file_format}"
fi
done
-
+
return 0
}
@@ -911,10 +911,10 @@ function print_comments_duplicates_compressed
typeset i j
typeset -A hashed_comments
integer num_hashed_comments
-
+
for i in $(printf "%s\n" "${!records[@]}" | sort) ; do
nameref node=records[$i]
-
+
if [[ "${options.filepattern.accept}" != "" ]] && \
[[ "${node.filename}" != ${options.filepattern.accept} ]] ; then
continue
@@ -933,16 +933,16 @@ function print_comments_duplicates_compressed
for j in "${!node.comments[@]}" ; do
typeset s="${node.comments[$j]}"
typeset match=false
-
+
if [[ "${options.commentpattern.accept}" != "" ]] && \
- [[ "$s" == ${options.commentpattern.accept} ]] ; then
+ [[ "$s" == ${options.commentpattern.accept} ]] ; then
match=true
fi
if [[ "${options.commentpattern.reject}" != "" ]] && \
- [[ "$s" == ${options.commentpattern.reject} ]] ; then
+ [[ "$s" == ${options.commentpattern.reject} ]] ; then
match=false
fi
-
+
if "${match}" ; then
typeset -l hashstring # lowercase
@@ -959,15 +959,15 @@ function print_comments_duplicates_compressed
typeset -a hc_node.fileids
typeset hc_node.comment="$s"
fi
-
+
hc_node.fileids+=( "$(printf "%s (md5='%s', sha1='%s')\n" "${node.filename}" "${node.hashsum["md5"]}" "${node.hashsum["sha1"]}")" )
node.license_info_found=true
fi
done
-
+
if ! "${node.license_info_found}" ; then
- printf "## no match found in "
+ printf "## no match found in "
printf "%s (md5='%s', sha1='%s'), " "${node.filename}" "${node.hashsum["md5"]}" "${node.hashsum["sha1"]}"
printf "comments_parsed=%s, fileformat_found=%s, file_format=%s\n" \
"${node.comments_parsed}" \
@@ -985,7 +985,7 @@ function print_comments_duplicates_compressed
printf "\n... applies to the following files:\n"
printf "\t%s\n" "${hashed_comments[${i}].fileids[@]}" # printf repeats the format string for each array memeber
done
-
+
return 0
}
@@ -999,7 +999,7 @@ function do_crawl
)
shift
- while getopts -a "${progname}" "${do_crawl_usage}" OPT "$@" ; do
+ while getopts -a "${progname}" "${do_crawl_usage}" OPT "$@" ; do
printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
S) options.max_filesize_for_scan="${OPTARG}" ;;
@@ -1008,7 +1008,7 @@ function do_crawl
esac
done
shift $((OPTIND-1))
-
+
compound scan=(
typeset -A records
)
@@ -1021,7 +1021,7 @@ function do_crawl
# print compound variable array (we strip the "typeset -A records" for now)
print -v scan >"crawlsrccomments_extracted_comments.cpv"
-
+
print "# Wrote results to crawlsrccomments_extracted_comments.cpv"
return 0
@@ -1052,7 +1052,7 @@ function do_getcomments
)
shift
- while getopts -a "${progname}" "${do_getcomments_usage}" OPT "$@" ; do
+ while getopts -a "${progname}" "${do_getcomments_usage}" OPT "$@" ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
c) options.commentpattern.accept="${OPTARG}" ;;
@@ -1090,7 +1090,7 @@ function do_getcomments
# Support for compressed database files
case "$(LC_ALL=C /usr/bin/file "${database}")" in
- *bzip2*)
+ *bzip2*)
tmp="/tmp/extract_license_bzcat_${PPID}_$$.tmp"
tmpfiles+=( "${tmp}" )
print -u2 "# Uncompressing data (bzip2) ..."
@@ -1098,7 +1098,7 @@ function do_getcomments
print -u2 "# Uncompression done."
database="${tmp}"
;;
- *gzip*)
+ *gzip*)
tmp="/tmp/extract_license_bzcat_${PPID}_$$.tmp"
tmpfiles+=( "${tmp}" )
print -u2 "# Uncompressing data (gzip) ..."
@@ -1211,7 +1211,7 @@ set -o errexit
typeset progname="${ basename "${0}" ; }"
-while getopts -a "${progname}" "${crawlsrccomments_usage}" OPT ; do
+while getopts -a "${progname}" "${crawlsrccomments_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage crawlsrccomments_usage ;;
diff --git a/usr/src/lib/libshell/common/scripts/filemutexdemo1.sh b/usr/src/cmd/ast/libshell/common/scripts/filemutexdemo1.sh
index 1d09e4aeb3..bbfc84825c 100644
--- a/usr/src/lib/libshell/common/scripts/filemutexdemo1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/filemutexdemo1.sh
@@ -50,19 +50,19 @@ export LC_NUMERIC=C
# Definition for a mutex which uses the filesystem for locking
typeset -T filemutex_t=(
typeset name
-
+
typeset lock_dirname
-
+
typeset locked_exclusive="false"
typeset locked_shared="false"
-
+
# keep track of subshell level. The problem is that we do not know a
# way to figure out whether someone calls "unlock" in a subshell and then
# leaves the subshell and calls "unlock" again
integer subshell=-1
-
+
typeset lock_dirname
-
+
# create a filemutex instance (including lock directory)
function create
{
@@ -70,18 +70,18 @@ typeset -T filemutex_t=(
set -o errexit
[[ "$1" == "" ]] && return 1
-
+
_.name="$1"
_.lock_dirname="/tmp/filemutex_t_${_.name}.lock"
-
+
mkdir "${_.lock_dirname}"
-
+
# last entry, used to mark the mutex as initalised+valid
(( _.subshell=.sh.subshell ))
return 0
}
- # use a filemutex instance (same as "create" but without creating
+ # use a filemutex instance (same as "create" but without creating
# the lock directory)
function create_child
{
@@ -89,15 +89,15 @@ typeset -T filemutex_t=(
set -o errexit
[[ "$1" == "" ]] && return 1
-
+
_.name="$1"
_.lock_dirname="/tmp/filemutex_t_${_.name}.lock"
-
+
# last entry, used to mark the mutex as initalised+valid
(( _.subshell=.sh.subshell ))
return 0
}
-
+
function check_subshell
{
(( _.subshell == .sh.subshell )) && return 0
@@ -108,18 +108,18 @@ typeset -T filemutex_t=(
function try_lock_shared
{
_.check_subshell "try_lock_shared" || return 1
-
+
mkdir "${_.lock_dirname}/shared_${PPID}_$$" 2>/dev/null || return 1
_.locked_shared="true"
return 0
}
-
+
function lock_shared
{
float interval=0.2
_.check_subshell "lock_shared" || return 1
-
+
while ! _.try_lock_shared ; do sleep ${interval} ; (( interval+=interval/10. )) ; done
return 0
}
@@ -127,36 +127,36 @@ typeset -T filemutex_t=(
function try_lock_exclusive
{
_.check_subshell "try_lock_exclusive" || return 1
-
+
rmdir "${_.lock_dirname}" 2>/dev/null || return 1
_.locked_exclusive="true"
return 0
}
-
+
function lock_exclusive
{
float interval=0.2
-
+
_.check_subshell "lock_exclusive" || return 1
-
+
while ! _.try_lock_exclusive ; do sleep ${interval} ; (( interval+=interval/10. )) ; done
return 0
}
-
+
# critical section support (like java's "synchronized" keyword)
function synchronized
{
integer retcode
_.check_subshell "synchronized" || return 1
-
+
_.lock_exclusive
-
+
"$@"
(( retcode=$? ))
_.unlock
-
+
return ${retcode}
}
@@ -166,22 +166,22 @@ typeset -T filemutex_t=(
integer retcode
_.check_subshell "synchronized_shared" || return 1
-
+
_.lock_shared
-
+
"$@"
(( retcode=$? ))
_.unlock
-
+
return ${retcode}
}
-
+
function unlock
{
# return an error if rmdir/mkdir/check_subshell fail...
set -o errexit
-
+
_.check_subshell "unlock"
if ${_.locked_shared} ; then
@@ -197,7 +197,7 @@ typeset -T filemutex_t=(
print -u2 -f "filemutex_t.unlock(%s): mutex '%s' not locked." "$1" "${_.name}"
return 1
}
-
+
# destroy mutex if noone is using it anymore (not the same as "unset" !!))
function destroy
{
@@ -224,7 +224,7 @@ fs.create "${mymutexname}" || print -u2 "Mutex init failed."
print "# Starting child which keeps an exclusive lock for 10 seconds..."
(
filemutex_t child_fs
-
+
child_fs.create_child "${mymutexname}"
child_fs.lock_exclusive
@@ -245,7 +245,7 @@ ls -lad /tmp/filemutex*/*
printf "%T: # Executing child which runs printf '|%%s|\\\n' 'hello' 'world' inside a synchronized section\n"
(
filemutex_t child_fs
-
+
child_fs.create_child "${mymutexname}"
child_fs.synchronized printf '|%s|\n' 'hello' 'world'
diff --git a/usr/src/lib/libshell/common/scripts/filetree1.sh b/usr/src/cmd/ast/libshell/common/scripts/filetree1.sh
index 9cbcb0c35d..595e081cdb 100644
--- a/usr/src/lib/libshell/common/scripts/filetree1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/filetree1.sh
@@ -53,19 +53,19 @@ function do_directory
{
nameref tree=$1
typeset basedir="$2"
-
+
typeset basename
typeset dirname
typeset i
typeset dummy
-
+
typeset -C -A tree.files
typeset -C -A tree.dirs
find "${basedir}"/* -prune 2>/dev/null | while read i ; do
dirname="$(dirname "$i")"
basename="$(basename "$i")"
-
+
# define "node"
if [[ -d "$i" ]] ; then
typeset -C tree.dirs["${basename}"]
@@ -77,7 +77,7 @@ function do_directory
typeset -C tree.files["${basename}"]
nameref node=tree.files["${basename}"]
typeset -C node.flags
-
+
node.flags.dir="false"
node.flags.file="true"
fi
@@ -88,7 +88,7 @@ function do_directory
basename="${basename}"
path="${i}"
)
-
+
nameref nflags=node.flags
[[ -r "$i" ]] && nflags.readable="true" || nflags.readable="false"
[[ -w "$i" ]] && nflags.writeable="true" || nflags.writeable="false"
@@ -111,7 +111,7 @@ function do_directory
node.owner.gid \
node.size \
dummy
-
+
typeset -C node.extended_attributes
if [[ ${node.mask} == ~(Er)@ ]] ; then
node.extended_attributes.hasattrs="true"
@@ -121,7 +121,7 @@ function do_directory
else
node.extended_attributes.hasattrs="false"
fi
-
+
if ${nflags.readable} ; then
# note that /usr/xpg4/bin/file does not use $'\t' as seperator - we
# have to use ':' instead.
@@ -132,7 +132,7 @@ function do_directory
do_directory "${!node}" "$i"
fi
done
-
+
# remove empty lists
(( ${#tree.files[@]} == 0 )) && unset tree.files
(( ${#tree.dirs[@]} == 0 )) && unset tree.dirs
@@ -145,7 +145,7 @@ function pathtovartree
{
nameref tree=$1
typeset basedir="$2"
-
+
do_directory tree "${basedir}"
return 0
@@ -183,7 +183,7 @@ viewmode dirs
[+SEE ALSO?\bksh93\b(1), \bfile\b(1)]
'
-while getopts -a "${progname}" "${filetree1_usage}" OPT ; do
+while getopts -a "${progname}" "${filetree1_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
diff --git a/usr/src/lib/libshell/common/scripts/gnaw.sh b/usr/src/cmd/ast/libshell/common/scripts/gnaw.sh
index 25445e7a4d..9876d9c5dd 100644
--- a/usr/src/lib/libshell/common/scripts/gnaw.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/gnaw.sh
@@ -73,10 +73,10 @@ function fatal_error
function get_term_size
{
nameref rect=$1
-
+
rect.columns=${ tput cols ; } || return 1
rect.lines=${ tput lines ; } || return 1
-
+
return 0
}
@@ -99,7 +99,7 @@ function print_levelmap
print -- "${line} "
done
-
+
# print lines filled with spaces for each line not filled
# by the level map
line="${vtcode["spaceline"]:0:${levelmap["max_x"]}}"
@@ -207,14 +207,14 @@ function run_logo
ENDOFTEXT
)"
print -- "${vtcode["clear"]}${render_buffer}"
-
+
# wait two seconds and swallow any user input
for (( i=0 ; i < 20 ; i++ )) ; do
read -r -t 0.1 -n 1 dummy
done
print "\n (The KornShell 93 maze game)"
-
+
attract_mode
return 0
}
@@ -232,7 +232,7 @@ function attract_mode
while true ; do
(
redirect 5<&0
-
+
(cat <<ENDOFTEXT
@@ -268,19 +268,19 @@ function attract_mode
- ##############
- ########################
+ ##############
+ ########################
#################**############
################################
- ############################
- ######################
- ################
- ######################
- ############################
+ ############################
+ ######################
+ ################
+ ######################
+ ############################
################################
- ##############################
- ########################
- ##############
+ ##############################
+ ########################
+ ##############
@@ -289,7 +289,7 @@ function attract_mode
High scores:
-
+
* 'chin' 8200 pt
* 'gisburn' 7900 pt
* 'tpenta' 5520 pt
@@ -300,7 +300,7 @@ function attract_mode
* 'noname' 3000 pt
* 'noname' 2000 pt
* 'noname' 1000 pt
-
+
ENDOFTEXT
# clear screen, line-by-line
@@ -313,7 +313,7 @@ ENDOFTEXT
(( $? == magic_return_code )) && exit ${magic_return_code}
)
(( $? == magic_return_code )) && return 0
-
+
sleep 2
done
)
@@ -324,7 +324,7 @@ function run_menu
integer numlevels=0
integer selected_level=0
typeset l
-
+
# built list of available levels based on the "function levelmap_.*"
# built into this script
typeset -f | egrep "^function.*levelmap_.*" | sed 's/^function //' |
@@ -332,17 +332,17 @@ function run_menu
levellist[numlevels]="$l"
numlevels+=1
done
-
+
# swallow any queued user input (e.g. drain stdin)
read -r -t 0.1 -n 100 dummy
-
+
while true ; do
# menu loop with timeout (which switches to "attract mode")
while true ; do
print -n -- "${vtcode["clear"]}"
cat <<ENDOFTEXT
->======================================\
+>======================================\
> /-\ .--. |
> | OO| / _.-' .-. .-. .-. .-. |
> | | \ '-. '-' '-' '-' '-' |
@@ -389,14 +389,14 @@ ENDOFTEXT
else
exit 0
fi
- ;;
+ ;;
~(Fi)u) (( game_use_unicode=(game_use_unicode+2+1) % 2)) ;;
~(Fi)c) (( game_use_colors=(game_use_colors+2+1) % 2)) ;;
"") break ;; # timeout, switch to attract mode
*) beep ;;
esac
done
-
+
print -n -- "${vtcode["clear"]}"
attract_mode
done
@@ -420,7 +420,7 @@ cat <<ENDOFLEVEL
######## ############ ######### #
# #### ############ ######### #
# #.................. ......# #
-# ############################### #
+# ############################### #
# #
###################################
ENDOFLEVEL
@@ -574,11 +574,11 @@ function read_levelmap
integer numdots=0
typeset line
typeset c
-
+
while read -r line ; do
for (( x=0 ; x < ${#line} ; x++ )) ; do
c="${line:x:1}"
-
+
case $c in
".") numdots+=1 ;;
"M")
@@ -603,7 +603,7 @@ function read_levelmap
levelmap["max_x"]=${maxx}
levelmap["max_y"]=${y}
levelmap["numdots"]=${numdots}
-
+
# consistency checks
if [[ "${levelmap["monsterstartpos_x"]}" == "" ]] ; then
fatal_error "read_levelmap: monsterstartpos_x is empty."
@@ -611,12 +611,12 @@ function read_levelmap
if [[ "${levelmap["playerstartpos_x"]}" == "" ]] ; then
fatal_error "read_levelmap: playerstartpos_x is empty."
fi
-
+
return 0
}
-
+
function player.set
-{
+{
case "${.sh.subscript}" in
pos_y)
if [[ "${levelmap["${player["pos_x"]}_${.sh.value}"]}" == "#" ]] ; then
@@ -636,7 +636,7 @@ function player.set
}
function monster.set
-{
+{
case "${.sh.subscript}" in
*_pos_y)
if [[ "${levelmap["${monster[${currmonster}_"pos_x"]}_${.sh.value}"]}" == "#" ]] ; then
@@ -711,11 +711,11 @@ function main_loop
float seconds_before_read
integer num_cycles=0
float rs
-
+
print -n -- "${vtcode["clear"]}"
read_levelmap "$1"
-
+
# player init
player["pos_x"]=${levelmap["playerstartpos_x"]}
player["pos_y"]=${levelmap["playerstartpos_y"]}
@@ -732,14 +732,14 @@ function main_loop
monster[${currmonster}_"xstep"]=0
monster[${currmonster}_"ystep"]=0
monster[${currmonster}_"homing"]=0
- done
+ done
# main game cycle loop
while true ; do
num_cycles+=1
seconds_before_read=${SECONDS}
c="" ; read -r -t ${sleep_per_cycle} -n 1 c
-
+
if [[ "$c" != "" ]] ; then
# special case handling for cursor keys which are usually composed
# of three characters (e.g. "<ESC>[D"). If only <ESC> is hit we
@@ -759,7 +759,7 @@ function main_loop
# if the user hit a key the "read" above was interrupted
# and didn't wait exactly |sleep_per_cycle| seconds.
# We wait here some moments (|rs|="remaining seconds") to
- # avoid that the game gets "faster" when more user input
+ # avoid that the game gets "faster" when more user input
# is given.
(( rs=sleep_per_cycle-(SECONDS-seconds_before_read) ))
(( rs > 0.001 )) && sleep ${rs}
@@ -796,7 +796,7 @@ function main_loop
if (( player["lives"] <= 0 )) ; then
game_over
return 0
- fi
+ fi
# move monsters
for currmonster in ${monsterlist} ; do
@@ -804,7 +804,7 @@ function main_loop
if (( monster[${currmonster}_"homing"] > 0 )) ; then
(( (num_cycles%2) > 0 )) && continue
fi
-
+
if [[ ${monster[${currmonster}_"pos_x"]} == ${player["pos_x"]} ]] ; then
if (( (monster[${currmonster}_"pos_y"]-player["pos_y"]) > 0 )) ; then
(( monster[${currmonster}_"xstep"]=+0 , monster[${currmonster}_"ystep"]=-1 ))
@@ -820,7 +820,7 @@ function main_loop
(( monster[${currmonster}_"xstep"]=-1 , monster[${currmonster}_"ystep"]=-0 ))
else
(( monster[${currmonster}_"xstep"]=+1 , monster[${currmonster}_"ystep"]=+0 ))
- fi
+ fi
monster[${currmonster}_"homing"]=1
if (( player["invulnerable"] <= 0 )) ; then
player["message"]="Attention: ${currmonster} is chasing you"
@@ -836,10 +836,10 @@ function main_loop
esac
fi
fi
-
+
(( monster[${currmonster}_"pos_x"]=monster[${currmonster}_"pos_x"]+monster[${currmonster}_"xstep"] ))
(( monster[${currmonster}_"pos_y"]=monster[${currmonster}_"pos_y"]+monster[${currmonster}_"ystep"] ))
-
+
# check if a monster hit the player
if (( player["invulnerable"] <= 0 )) ; then
if (( monster[${currmonster}_"pos_x"] == player["pos_x"] && \
@@ -853,8 +853,8 @@ function main_loop
beep ; beep ; sleep 0.2 ; beep ; beep
fi
- fi
- done
+ fi
+ done
render_game
done
@@ -904,7 +904,7 @@ function exit_trap
{
# restore stty settings
stty ${saved_stty}
-
+
print "bye."
return 0
}
@@ -955,7 +955,7 @@ typeset -r gnaw_usage=$'+
[+SEE ALSO?\bksh93\b(1)]
'
-while getopts -a "${progname}" "${gnaw_usage}" OPT ; do
+while getopts -a "${progname}" "${gnaw_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
q) quiet=true ;;
diff --git a/usr/src/lib/libshell/common/scripts/mandelbrotset1.sh b/usr/src/cmd/ast/libshell/common/scripts/mandelbrotset1.sh
index 082d519abe..726a577850 100644
--- a/usr/src/lib/libshell/common/scripts/mandelbrotset1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/mandelbrotset1.sh
@@ -63,10 +63,10 @@ function fatal_error
function get_term_size
{
nameref rect=$1
-
+
rect.columns=${ tput cols ; } || return 1
rect.lines=${ tput lines ; } || return 1
-
+
return 0
}
@@ -112,9 +112,9 @@ function loop_serial
line+=$'\n'
done
-
+
print -r -- "${line}"
-
+
return 0
}
@@ -162,7 +162,7 @@ function loop_parallel
line+=$'\n'
done
print -r -- "${line}" >"${filename}"
-
+
exit 0
) &
done
@@ -247,7 +247,7 @@ typeset -r mandelbrotset1_usage=$'+
[+SEE ALSO?\bjuliaset1\b(1), \bksh93\b(1)]
'
-while getopts -a "${progname}" "${mandelbrotset1_usage}" OPT ; do
+while getopts -a "${progname}" "${mandelbrotset1_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
w) m_width="${OPTARG}" ;;
diff --git a/usr/src/lib/libshell/common/scripts/multifollow.sh b/usr/src/cmd/ast/libshell/common/scripts/multifollow.sh
index a14d34ee97..c3d6e3740d 100644
--- a/usr/src/lib/libshell/common/scripts/multifollow.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/multifollow.sh
@@ -74,7 +74,7 @@ typeset -r multifollow_usage=$'+
[+SEE ALSO?\bksh93\b(1), \btail\b(1)]
'
-while getopts -a "${progname}" "${multifollow_usage}" OPT ; do
+while getopts -a "${progname}" "${multifollow_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
@@ -114,7 +114,7 @@ for (( ; $# > 0 ; numfiles++ )) ; do
files[${numfiles}].childpid=$!
rm "${files[${numfiles}].pipename}"
-
+
shift
done
@@ -129,7 +129,7 @@ while true ; do
poll files
fi
do_poll=true
-
+
for ((i=0 ; i < numfiles ; i++ )) ; do
if [[ "${files[i].revents}" != "" ]] ; then
# todo: investigate why we have to use "do_poll" at all - AFAIK it
@@ -137,7 +137,7 @@ while true ; do
# are any remaining data...
if read -t0 -u${files[i].fd} line ; then
print -- "#${i}: ${line}"
- do_poll=false
+ do_poll=false
fi
fi
done
diff --git a/usr/src/lib/libshell/common/scripts/numtree1.sh b/usr/src/cmd/ast/libshell/common/scripts/numtree1.sh
index ba7783e91e..e736bc61b9 100644
--- a/usr/src/lib/libshell/common/scripts/numtree1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/numtree1.sh
@@ -75,15 +75,15 @@ function add_number_to_tree
nodepath="${treename}"
for (( i=0 ; i < ${#pe[@]} ; i++ )) ; do
nameref x="${nodepath}"
-
+
# [[ -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 (leaf)
nameref node="${nodepath}"
[[ "${ typeset +p node.elements ;}" == "" ]] && integer -a node.elements
@@ -99,7 +99,7 @@ function add_number_to_tree
[[ "${!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
}
@@ -133,7 +133,7 @@ function floatseq
return 1
;;
esac
-
+
return 0
}
@@ -179,7 +179,7 @@ method [ arguments ]
[+SEE ALSO?\bksh93\b(1), \bseq\b(1)]
'
-while getopts -a "${progname}" "${numtree1_usage}" OPT ; do
+while getopts -a "${progname}" "${numtree1_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
diff --git a/usr/src/lib/libshell/common/scripts/primenumbers1.sh b/usr/src/cmd/ast/libshell/common/scripts/primenumbers1.sh
index b408eb3049..abb00a9ade 100644
--- a/usr/src/lib/libshell/common/scripts/primenumbers1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/primenumbers1.sh
@@ -55,7 +55,7 @@ function is_prime
float max_pn
(( max_pn=sqrt(num)+1. ))
-
+
for (( i=0 ; i < num_pn && pn[i] < max_pn ; i++)) ; do
(( num % pn[i] == 0 )) && return 1;
done
diff --git a/usr/src/lib/libshell/common/scripts/rssread.sh b/usr/src/cmd/ast/libshell/common/scripts/rssread.sh
index 05e703ac2c..97d391de98 100644
--- a/usr/src/lib/libshell/common/scripts/rssread.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/rssread.sh
@@ -60,7 +60,7 @@ typeset -T urlconnection_t=(
typeset host
typeset path
typeset port
-
+
compound netfd=(
integer in=-1 # incoming traffic
integer out=-1 # outgoing traffic
@@ -75,7 +75,7 @@ typeset -T urlconnection_t=(
)
integer openssl_client_pid=-1
)
-
+
# parse HTTP return code, cookies etc.
function parse_http_response
{
@@ -116,7 +116,7 @@ typeset -T urlconnection_t=(
{
typeset emode="$1"
typeset hexchunksize="0"
- integer chunksize=0
+ integer chunksize=0
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\n' read hexchunksize ; do
@@ -133,7 +133,7 @@ typeset -T urlconnection_t=(
return 0
}
-
+
function init_url
{
_.protocol="${1%://*}"
@@ -144,20 +144,20 @@ typeset -T urlconnection_t=(
_.path="${_.path1#*/}"
_.port="${_.host##*:}"
fi
-
+
return 0
}
-
+
# close connection
function close_connection
{
integer ret
-
+
if (( _.netfd.in != -1 )) ; then
redirect {_.netfd.in}<&-
(( _.netfd.in=-1 ))
fi
-
+
if (( _.netfd.in != _.netfd.out && _.netfd.out != -1 )) ; then
redirect {_.netfd.out}<&-
(( _.netfd.out=-1 ))
@@ -166,14 +166,14 @@ typeset -T urlconnection_t=(
if [[ "${_.protocol}" == "https" ]] ; then
wait ${_.ssl.openssl_client_pid} || { print -u2 -f "%s: openssl failed.\n" ; return 1 ; }
(( _.ssl.openssl_client_pid=-1 ))
-
+
rm -r \"${_.ssl.fifo.dir}\"
_.ssl.fifo.dir=""
fi
-
+
return 0
}
-
+
function open_connection
{
if [[ "${_.protocol}" == "https" ]] ; then
@@ -189,7 +189,7 @@ typeset -T urlconnection_t=(
# create async openssl child to handle https
openssl s_client -quiet -connect "${_.host}:${_.port}" <"${_.ssl.fifo.in}" >>"${_.ssl.fifo.out}" &
-
+
_.ssl.openssl_client_pid=$!
else
redirect {_.netfd.in}<> "/dev/tcp/${_.host}/${_.port}"
@@ -202,9 +202,9 @@ typeset -T urlconnection_t=(
function send_request
{
typeset request="$1"
-
+
set -o errexit
-
+
if [[ "${_.protocol}" == "https" ]] ; then
print -n -- "${request}\r\n" >> "${_.ssl.fifo.in}"
@@ -214,9 +214,9 @@ typeset -T urlconnection_t=(
fi
return 0
}
-
+
function cat_url
- {
+ {
if [[ "${_.protocol}" == "file" ]] ; then
cat "${_.path1}"
return $?
@@ -245,7 +245,7 @@ typeset -T urlconnection_t=(
_.open_connection || return 1
- # send HTTP request
+ # send HTTP request
request="GET /${_.path} HTTP/1.1\r\n"
request+="Host: ${_.host}\r\n"
request+="User-Agent: ${_.user_agent}\r\n"
@@ -257,9 +257,9 @@ typeset -T urlconnection_t=(
_.parse_http_response httpresponse
_.cat_http_body "${httpresponse.transfer_encoding}"
} <&${_.netfd.in}
-
+
_.close_connection
-
+
return 0
else
return 1
@@ -289,14 +289,14 @@ function html_entity_to_ascii
["quot"]='"'
["apos"]="'"
)
-
+
buf=""
while IFS='' read -r -N 1 c ; do
if [[ "$c" != "&" ]] ; then
print -n -r -- "${c}"
continue
fi
-
+
entity=""
while IFS='' read -r -N 1 c ; do
case "$c" in
@@ -316,7 +316,7 @@ function html_entity_to_ascii
;;
esac
done
-
+
value=""
if [[ "${entity_cache["${entity}"]}" != "" ]] ; then
# debugmsg "match #${entity}# = #${entity_cache["${entity}"]}#"
@@ -426,7 +426,7 @@ function handle_rss
printf $"<br />%s<br />" "${item["description"]}"
printf $"<br />## end description<br />"
print # extra newline to make sure the sed pipeline gets flushed
- ) |
+ ) |
html_entity_to_ascii | # convert XML entities (e.g. decode RSS content to HTML code)
xml_tok "xhtmltok_cb" | # convert HTML to plain text
html_entity_to_ascii # convert HTML entities
@@ -457,19 +457,19 @@ function xml_tok
typeset isendtag # bool: true/false
typeset issingletag # bool: true/false (used for tags like "<br />")
nameref callbacks=${1}
-
+
[[ ! -z "${callbacks["document_start"]}" ]] && ${callbacks["document_start"]} "${1}" "document_start"
while IFS='' read -r -N 1 c ; do
isendtag=false
-
+
if [[ "$c" == "<" ]] ; then
# flush any text content
if [[ "$buf" != "" ]] ; then
[[ ! -z "${callbacks["tag_text"]}" ]] && ${callbacks["tag_text"]} "${1}" "tag_text" "$buf"
buf=""
fi
-
+
IFS='' read -r -N 1 c
if [[ "$c" == "/" ]] ; then
isendtag=true
@@ -478,7 +478,7 @@ function xml_tok
fi
IFS='' read -r -d '>' c
buf+="$c"
-
+
# handle comments
if [[ "$buf" == ~(El)!-- ]] ; then
# did we read the comment completely ?
@@ -489,12 +489,12 @@ function xml_tok
buf+="$c"
done
fi
-
+
[[ ! -z "${callbacks["tag_comment"]}" ]] && ${callbacks["tag_comment"]} "${1}" "tag_comment" "${buf:3:${#buf}-5}"
buf=""
continue
fi
-
+
# check if the tag starts and ends at the same time (like "<br />")
if [[ "${buf}" == ~(Er).*/ ]] ; then
issingletag=true
@@ -502,7 +502,7 @@ function xml_tok
else
issingletag=false
fi
-
+
# check if the tag has attributes (e.g. space after name)
if [[ "$buf" == ~(E)[[:space:][:blank:]] ]] ; then
namebuf="${buf%%~(E)[[:space:][:blank:]].*}"
@@ -511,7 +511,7 @@ function xml_tok
namebuf="$buf"
attrbuf=""
fi
-
+
if ${isendtag} ; then
[[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf"
else
@@ -529,7 +529,7 @@ function xml_tok
done
[[ ! -z "${callbacks["document_end"]}" ]] && ${callbacks["document_end"]} "${1}" "document_end" "exit_success"
-
+
print # final newline to make filters like "sed" happy
}
@@ -564,13 +564,13 @@ function do_rssread
urlconnection_t hc
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'
# to make "xml_tok" happy
data="${ hc.cat_url ; print ; }"
-
+
print -u2 -f "# Got %d lines of RSS data, processing...\n" "${ wc -l <<< "${data}" ; }"
-
+
xml_tok "rsstok_cb" <<< "${data}"
return 0
@@ -643,7 +643,7 @@ typeset -r rssread_usage=$'+
typeset noiconv=false
-while getopts -a "${progname}" "${rssread_usage}" OPT ; do
+while getopts -a "${progname}" "${rssread_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
I) noiconv=true ;;
diff --git a/usr/src/lib/libshell/common/scripts/shcalc.sh b/usr/src/cmd/ast/libshell/common/scripts/shcalc.sh
index 50c9317ad4..6858ba12a1 100644
--- a/usr/src/lib/libshell/common/scripts/shcalc.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/shcalc.sh
@@ -90,22 +90,22 @@ typeset -r shcalc_usage=$'+
[+DESCRIPTION?\bsshcalc\b is a small calculator application which
prints the results of ISO C99 math expressions read from either
arguments or stdin if no arguments are given.]
-[+SEE ALSO?\bksh93\b(1),\bceil\b(3M), \bcopysign\b(3M), \bcos\b(3M),
- \bcosh\b(3M), \berf\b(3M), \berfc\b(3M), \bexp\b(3M),
- \bexp2\b(3M), \bexpm1\b(3M), \bfabs abs\b(3M), \bfdim\b(3M),
- \bfinite\b(3M), \bfloor int\b(3M), \bfma\b(3M), \bfmax\b(3M), \bfmin\b(3M),
- \bfmod\b(3M), \bfpclassify\b(3M), \bhypot\b(3M), \bilogb\b(3M),
- \bisfinite\b(3M), \bisgreater\b(3M), \bisgreaterequal\b(3M), \bisinf\b(3M),
- \bisless\b(3M), \bislessequal\b(3M), \bislessgreater\b(3M), \bisnan\b(3M),
- \bisnormal\b(3M), \bissubnormal\b(3M), \bisunordered\b(3M), \biszero\b(3M),
- \blgamma\b(3M), \blog\b(3M), \blog1p\b(3M), \blog2\b(3M),
- \blogb\b(3M), \bnearbyint\b(3M), \bnextafter\b(3M), \bnexttoward\b(3M),
- \bpow\b(3M), \bremainder\b(3M), \brint\b(3M), \bround\b(3M),
- \bscalb\b(3M), \bscalbn\b(3M), \bsignbit\b(3M), \bsin\b(3M),
- \bsinh\b(3M), \bsqrt\b(3M), \btan\b(3M), \btanh\b(3M),
+[+SEE ALSO?\bksh93\b(1),\bceil\b(3M), \bcopysign\b(3M), \bcos\b(3M),
+ \bcosh\b(3M), \berf\b(3M), \berfc\b(3M), \bexp\b(3M),
+ \bexp2\b(3M), \bexpm1\b(3M), \bfabs abs\b(3M), \bfdim\b(3M),
+ \bfinite\b(3M), \bfloor int\b(3M), \bfma\b(3M), \bfmax\b(3M), \bfmin\b(3M),
+ \bfmod\b(3M), \bfpclassify\b(3M), \bhypot\b(3M), \bilogb\b(3M),
+ \bisfinite\b(3M), \bisgreater\b(3M), \bisgreaterequal\b(3M), \bisinf\b(3M),
+ \bisless\b(3M), \bislessequal\b(3M), \bislessgreater\b(3M), \bisnan\b(3M),
+ \bisnormal\b(3M), \bissubnormal\b(3M), \bisunordered\b(3M), \biszero\b(3M),
+ \blgamma\b(3M), \blog\b(3M), \blog1p\b(3M), \blog2\b(3M),
+ \blogb\b(3M), \bnearbyint\b(3M), \bnextafter\b(3M), \bnexttoward\b(3M),
+ \bpow\b(3M), \bremainder\b(3M), \brint\b(3M), \bround\b(3M),
+ \bscalb\b(3M), \bscalbn\b(3M), \bsignbit\b(3M), \bsin\b(3M),
+ \bsinh\b(3M), \bsqrt\b(3M), \btan\b(3M), \btanh\b(3M),
\btgamma\b(3M), \btrunc\b(3M)]
'
-while getopts -a "${progname}" "${shcalc_usage}" OPT ; do
+while getopts -a "${progname}" "${shcalc_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
@@ -117,19 +117,19 @@ integer res
if (( $# == 0 )) ; then
# No arguments ? Switch to interactive mode...
-
+
# make sure "read" below uses "gmacs"-like editor keys and "multiline" mode
-
+
set -o gmacs
set -o multiline
while read "calcline?calc> " ; do
# quit ?
[[ "${calcline}" == ~(Elri)(exit|quit|eof) ]] && break
-
+
# empty line ?
[[ "${calcline}" == ~(Elri)([[:space:]]*) ]] && continue
-
+
do_calculate "$calcline"
(( res=$? ))
done
@@ -141,7 +141,7 @@ else
(( res=$? ))
shift
done
-
+
exit ${res}
fi
diff --git a/usr/src/lib/libshell/common/scripts/shircbot.sh b/usr/src/cmd/ast/libshell/common/scripts/shircbot.sh
index 82903c53b1..7d415d2505 100644
--- a/usr/src/lib/libshell/common/scripts/shircbot.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/shircbot.sh
@@ -58,26 +58,26 @@ typeset -T ircsession_t=(
typeset name
integer port
)
-
+
typeset nick="ksh93irc"
-
+
typeset running=true
-
+
integer fd=-1
-
+
function createsession
{
set -o xtrace
-
+
_.server.name=$1
_.server.port=$2
_.nick=$3
-
+
redirect {_.fd}<> "/dev/tcp/${_.server.name}/${_.server.port}"
(( $? == 0 )) || { print -n2 $"Could not open server connection." ; return 1 ; }
-
+
printf "fd=%d\n" _.fd
-
+
return 0
}
@@ -87,17 +87,17 @@ typeset -T ircsession_t=(
printf "USER %s %s %s %s\n" "${_.nick}" "${_.nick}" "${_.nick}" "${_.nick}"
printf "NICK %s\n" "${_.nick}"
} >&${_.fd}
-
+
return 0
}
function join_channel
{
printf "JOIN %s\n" "$1" >&${_.fd}
-
+
return 0
}
-
+
function mainloop
{
typeset line
@@ -110,9 +110,9 @@ typeset -T ircsession_t=(
linebuf_t serverbuf
linebuf_t clientbuf
integer fd=${_.fd}
-
+
_.login
-
+
while ${_.running} ; do
while serverbuf.readbuf line <&${fd} ; do
_.dispatch_serverevent "$line"
@@ -122,7 +122,7 @@ typeset -T ircsession_t=(
printf "client: %q\n" "${line}"
printf "%s\n" "${line}" >&${fd}
done
-
+
# call mainloop_tick function in intervals to handle
# async events (e.g. automatic /join etc.)
if (( (SECONDS-last_tick) > 5. )) ; then
@@ -130,19 +130,19 @@ typeset -T ircsession_t=(
_.mainloop_tick
fi
done
-
+
return 0
}
-
+
function mainloop_tick
{
return 0
}
-
+
function dispatch_serverevent
{
typeset line="$1"
-
+
case "${line}" in
~(El)PING)
compound ping_args=(
@@ -172,42 +172,42 @@ typeset -T ircsession_t=(
printf "server: %q\n" "${line}"
;;
esac
-
+
return 0
}
-
+
function serverevent_privmsg
{
nameref args=$1
typeset msguser="${args.msguser}"
typeset msgchannel="${args.msgchannel}"
typeset msg="${args.msg}"
-
+
printf "#privms: user=%q, channel=%q, msg=%q\n" "$msguser" "$msgchannel" "$msg"
-
+
return 0
}
function serverevent_invite
{
nameref args=$1
-
+
printf "JOIN %s\n" "${args.invitechannel/:/}" >&${_.fd}
-
+
return 0
}
-
+
function send_privmsg
{
typeset channel="$1"
typeset msg="$2"
- # Do we have to escape any characters in "msg" ?
+ # Do we have to escape any characters in "msg" ?
printf "PRIVMSG %s :%s\n" "${channel}" "${msg}" >&${_.fd}
return 0
}
-
+
function serverevent_ping
{
nameref args=$1
@@ -223,13 +223,13 @@ typeset -T ircsession_t=(
# it has read a whole line.
typeset -T linebuf_t=(
typeset buf
-
+
function reset
{
_.buf=""
return 0
}
-
+
function readbuf
{
nameref var=$1
@@ -237,16 +237,16 @@ typeset -T linebuf_t=(
while IFS='' read -t 0.2 -N 1 ch ; do
[[ "$ch" == $'\r' ]] && continue
-
+
if [[ "$ch" == $'\n' ]] ; then
var="${_.buf}"
_.reset
return 0
fi
-
+
_.buf+="$ch"
done
-
+
return 1
}
)
@@ -286,7 +286,7 @@ compound config=(
typeset -a join_channels
)
-while getopts -a "${progname}" "${shircbot_usage}" OPT ; do
+while getopts -a "${progname}" "${shircbot_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
n) config.nickname="${OPTARG}" ;;
@@ -322,9 +322,9 @@ function mybot.serverevent_privmsg
typeset msguser="${args.msguser}"
typeset msgchannel="${args.msgchannel}"
typeset msg="${args.msg}"
-
+
printf "#message: user=%q, channel=%q, msg=%q\n" "$msguser" "$msgchannel" "$msg"
-
+
# Check if we get a private message
if [[ "${msgchannel}" == "${_.nick}" ]] ; then
# ${msgchannel} point to our own nick if we got a private message,
@@ -335,12 +335,12 @@ function mybot.serverevent_privmsg
# check if this is a command for this bot
[[ "$msg" != ~(Eli):${_.nick}:[[:space:]] ]] && return 0
fi
-
+
# strip beginning (e.g. ":<nick>:" or ":") plus extra spaces
msg="${msg/~(Eli)(:${_.nick})*:[[:space:]]*/}"
-
+
printf "botmsg=%q\n" "$msg"
-
+
case "$msg" in
~(Eli)date)
_.send_privmsg "$msgchannel" "${
@@ -391,7 +391,7 @@ function mybot.serverevent_privmsg
}"
;;
esac
-
+
return 0
}
@@ -401,7 +401,7 @@ function mybot.mainloop_tick
{
integer -S autojoin_done=2
integer i
-
+
if (( autojoin_done-- == 0 && ${#config.join_channels[@]} > 0 )) ; then
print "# Autojoin channels..."
@@ -409,7 +409,7 @@ function mybot.mainloop_tick
mybot.join_channel "${config.join_channels[i]}"
done
fi
-
+
return 0
}
diff --git a/usr/src/lib/libshell/common/scripts/shlint.sh b/usr/src/cmd/ast/libshell/common/scripts/shlint.sh
index 7b6b609ac8..23df1805c2 100644
--- a/usr/src/lib/libshell/common/scripts/shlint.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/shlint.sh
@@ -73,7 +73,7 @@ typeset -r shlint_usage=$'+
[+SEE ALSO?\bshcomp\b(1), \bksh93\b(1)]
'
-while getopts -a "${progname}" "${shlint_usage}" OPT ; do
+while getopts -a "${progname}" "${shlint_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
diff --git a/usr/src/lib/libshell/common/scripts/shman.sh b/usr/src/cmd/ast/libshell/common/scripts/shman.sh
index 1044d6a1bb..6d40ddd66e 100644
--- a/usr/src/lib/libshell/common/scripts/shman.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/shman.sh
@@ -66,7 +66,7 @@ function enumerate_mandirs
nameref md=$1
typeset manpath_element dir sect manlang
integer i=0
-
+
if [[ "${LC_MESSAGES}" != "" ]] ; then
manlang="${LC_MESSAGES}"
else
@@ -78,7 +78,7 @@ function enumerate_mandirs
dir="${manpath_element/~(E)(.*),(.*)/\1}"
sect="${manpath_element/~(E)(.*),(.*)/\2}"
[[ "${sect}" == "${dir}" ]] && sect=""
-
+
if [[ "${manlang}" != "" && -d "${dir}/${manlang}" ]] ; then
md+=(
manpath_element="${manpath_element}"
@@ -94,7 +94,7 @@ function enumerate_mandirs
)
fi
done
-
+
return 0
}
@@ -104,7 +104,7 @@ function enumerate_mansects
nameref mandir_node=$2
typeset mancf="${mandir_node.dir}/man.cf"
typeset x s l
-
+
if [[ "${mandir_node.sect}" != "" ]] ; then
x="${mandir_node.sect}"
elif [[ "${MANSECTS}" != "" ]] ; then
@@ -122,12 +122,12 @@ function enumerate_mansects
print -r -- "$s" ; \
done)"
fi
-
+
while read l ; do
[[ "${l}" != ~(Elr)[[:blank:]]* ]] && ms+=( "${l}" )
# print -- "sect=$l"
done <<<"${x}"
-
+
# printf "enumerate_mansects: found %d entries.\n" ${#ms[@]}
return 0
@@ -139,7 +139,7 @@ function browse_manpage
typeset tmpdirname
typeset doc_filename="$1"
typeset doc_title="$2"
-
+
# squish characters in filename which are not allowed in a filesystem
# (currently '/')
doc_title="${doc_title//\//}"
@@ -148,7 +148,7 @@ function browse_manpage
if which less >/dev/null 2>&1 ; then
# 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
+ else
tmpdirname="$(mktemp -t -d "shman_${PPID}_$$_XXXXXX")"
mkdir -p "${tmpdirname}" || { print -u2 -f $"Couldn't create tmp. dir %s\n" "${tmpdirname}" ; return 1 ; }
@@ -166,7 +166,7 @@ function browse_manpage
rmdir "${tmpdirname}"
fi
-
+
return 0
}
@@ -184,7 +184,7 @@ function show_manpage
for ((i=0 ; i < num_mandirs ; i++ )) ; do
typeset mandir="${mandirs[i].dir}"
-
+
typeset -a mansects
enumerate_mansects mansects "mandirs[$i]"
@@ -198,21 +198,21 @@ function show_manpage
typeset match="${mandir}/sman${mansect}/${manname}.${mansect}"
if [[ -r "${match}" ]] ; then
typeset note nlink
-
+
# follow SGML links if needed (needs rework, including protection against link loops)
while true ; do
debug_print -f "match: %s\n" "${match}"
-
+
tmp="$(cd "${mandir}" ; LC_MESSAGES=C /usr/lib/sgml/sgml2roff "${match}")"
read note nlink <<<"${tmp}"
-
+
if [[ "${note}" == ".so" ]] ; then
match="${nlink}"
else
break
fi
done
-
+
tbl <<<"${tmp}" | eqn | nroff -u0 -Tlp -man - | col -x | browse_manpage /dev/stdin "${manname}(${mansect})"
return 0
fi
@@ -227,7 +227,7 @@ function show_manpage
done
unset mansects num_mansects
done
-
+
printf $"No manual entry for %s.\n" "${manname}"
return 0
}
@@ -288,19 +288,19 @@ function list_keywords
for ((i=0 ; i < num_mandirs ; i++ )) ; do
typeset mandir="${mandirs[i].dir}"
typeset windexfile="${mandir}/windex"
-
+
if [[ ! -r "${windexfile}" ]] ; then
print -u2 -f $"%s: Can't open %s.\n" "${progname}" "${windexfile}"
continue
fi
-
+
while IFS=$'\t' read name namesec title ; do
if [[ "${name}${namesec}${title}" == ~(Fi)${manname} ]] ; then
printf "%s\t%s\t%s\n" "${name}" "${namesec}" "${title}"
fi
done <"${windexfile}"
done
-
+
return 0
}
@@ -348,7 +348,7 @@ typeset -r man_usage=$'+
a comma. This option overrides the MANPATH environment variable and the man.cf
file.
See Search Path below for an explanation of how man conducts its search.]:[section]
-
+
name
[+SEE ALSO?\bksh93\b(1), \bman\b(1)]
@@ -357,13 +357,13 @@ name
typeset do_list=false
typeset do_keyword=false
-while getopts -a "${progname}" "${man_usage}" OPT ; do
+while getopts -a "${progname}" "${man_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
M) MANPATH="${OPTARG}" ;;
l) do_list=true ;;
k) do_keyword=true ;;
- s) MANSECTS="${OPTARG}" ;;
+ s) MANSECTS="${OPTARG}" ;;
*) usage ;;
esac
done
diff --git a/usr/src/lib/libshell/common/scripts/shnote.sh b/usr/src/cmd/ast/libshell/common/scripts/shnote.sh
index 217fc7daae..06e28a219f 100644
--- a/usr/src/lib/libshell/common/scripts/shnote.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/shnote.sh
@@ -55,9 +55,9 @@ function encode_multipart_form_data
integer numformelements=${#formdata.form[*]}
integer i
typeset tmp
-
+
content=""
-
+
# todo: add support to upload files
for (( i=0 ; i < numformelements ; i++ )) ; do
nameref element="formdata.form[${i}]"
@@ -69,7 +69,7 @@ function encode_multipart_form_data
# "print" when putting the content on the wire.
content+="${element.data//\\/\\\\}\n" # fixme: may need encoding for non-ASCII data
done
-
+
# we have to de-quote the content before we can count the real numer of bytes in the payload
tmp="$(print -- "${content}")"
formdata.content_length=${#tmp}
@@ -85,14 +85,14 @@ function parse_http_response
{
nameref response="$1"
typeset h statuscode statusmsg i
-
+
# we use '\r' as additional IFS to filter the final '\r'
IFS=$' \t\r' read -r h statuscode statusmsg # read HTTP/1.[01] <code>
[[ "$h" != ~(Eil)HTTP/.* ]] && { print -u2 -f $"%s: HTTP/ header missing\n" "$0" ; return 1 ; }
[[ "$statuscode" != ~(Elr)[0-9]* ]] && { print -u2 -f $"%s: invalid status code\n" "$0" ; return 1 ; }
response.statuscode="$statuscode"
response.statusmsg="$statusmsg"
-
+
# skip remaining headers
while IFS='' read -r i ; do
[[ "$i" == $'\r' ]] && break
@@ -120,8 +120,8 @@ function cat_http_body
{
typeset emode="$1"
typeset hexchunksize="0"
- integer chunksize=0
-
+ integer chunksize=0
+
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\r' read hexchunksize &&
[[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] &&
@@ -147,7 +147,7 @@ function history_write_record
integer histfd
mkdir -p "${HOME}/.shnote"
-
+
{
# write a single-line record which can be read
# as a compound variable back into the shell
@@ -157,7 +157,7 @@ function history_write_record
"$(date)" \
"${rec.provider}" \
"${rec.providertoken}" \
- "${rec.url}"
+ "${rec.url}"
} >>"${history_file}"
return $?
@@ -174,7 +174,7 @@ function print_history
# <access url>/<title> <date> <access url>
[[ "$1" == "-l" ]] || printf "# %s\t\t\t\t\t%s\t%s\n" "<url>" "<title>" "<date>"
- # no history file ?
+ # no history file ?
if [[ ! -f "${history_file}" ]] ; then
return 0
fi
@@ -182,24 +182,24 @@ function print_history
# open history file
redirect {histfd}<> "${history_file}"
(( $? != 0 )) && { print -u2 "Could not open history file." ; return 1 ; }
-
+
while read -u${histfd} line ; do
compound rec
-
+
printf "( %s )\n" "${line}" | read -C rec
-
- if [[ "$1" == "-l" ]] ; then
+
+ if [[ "$1" == "-l" ]] ; then
print -- "${rec}"
else
printf "%q\t%q\t%q\n" "${rec.url}" "${rec.title}" "${rec.date}"
fi
-
+
unset rec
done
-
+
# close history file
redirect {histfd}<&-
-
+
return 0
}
@@ -213,7 +213,7 @@ function put_note_pastebin_ca
typeset url="http://${url_host}${url_path}"
integer netfd # http stream number
compound httpresponse
-
+
(( $# != 1 )) && { print -u2 -f $"%s: Wrong number of arguments.\n" "$0" ; return 1 ; }
(( ${#1} == 0 )) && { print -u2 -f $"%s: No data.\n" "$0" ; return 1 ; }
@@ -226,7 +226,7 @@ function put_note_pastebin_ca
typeset content
integer content_length
)
-
+
typeset request=""
typeset content=""
@@ -241,7 +241,7 @@ function put_note_pastebin_ca
[4]=( name="content" data="$1" )
)
encode_multipart_form_data mimeform
-
+
content="${mimeform.content}"
request="POST ${url_path} HTTP/1.1\r\n"
@@ -251,7 +251,7 @@ function put_note_pastebin_ca
request+="Content-Type: multipart/form-data; boundary=${boundary}\r\n"
request+="Content-Length: $(( mimeform.content_length ))\r\n"
- redirect {netfd}<> "/dev/tcp/${url_host}/80"
+ redirect {netfd}<> "/dev/tcp/${url_host}/80"
(( $? != 0 )) && { print -u2 -f $"%s: Could not open connection to %s.\n" "$0" "${url_host}" ; return 1 ; }
# send http post
@@ -266,12 +266,12 @@ function put_note_pastebin_ca
# close connection
redirect {netfd}<&-
-
+
if [[ "${response}" == ~(E).*SUCCESS.* ]] ; then
typeset response_token="${response/~(E).*SUCCESS:/}"
printf "SUCCESS: http://opensolaris.pastebin.ca/%s\n" "${response_token}"
-
+
# write history entry
compound histrec=(
title="${mimeform.form[0].data}"
@@ -279,7 +279,7 @@ function put_note_pastebin_ca
providertoken="${response_token}"
provider="opensolaris.pastebin.ca"
url="http://opensolaris.pastebin.ca/${response_token}"
- )
+ )
history_write_record histrec
return 0
@@ -287,7 +287,7 @@ function put_note_pastebin_ca
printf "ERROR: %s\n" "${response}"
return 1
fi
-
+
# not reached
}
@@ -297,7 +297,7 @@ function get_note_pastebin_ca
integer netfd # http stream number
(( $# != 1 )) && { print -u2 -f $"%s: No key or key URL.\n" "$0" ; return 1 ; }
-
+
case "${recordname}" in
~(Elr)[0-9][0-9]*)
# pass-through
@@ -311,7 +311,7 @@ function get_note_pastebin_ca
*)
fatal_error $"Unsupported record name ${recordname}."
esac
-
+
print -u2 -f "# Record name is '%s'\n" "${recordname}"
typeset url_host="opensolaris.pastebin.ca"
@@ -323,22 +323,22 @@ function get_note_pastebin_ca
redirect {netfd}<> "/dev/tcp/${url_host}/80"
(( $? != 0 )) && { print -u2 -f $"%s: Could not open connection to %s.\n" "$0" "${url_host}" ; return 1 ; }
- # send HTTP request
+ # send HTTP request
request="GET ${url_path} HTTP/1.1\r\n"
request+="Host: ${url_host}\r\n"
request+="User-Agent: ${http_user_agent}\r\n"
request+="Connection: close\r\n"
print -u${netfd} -- "${request}\r\n"
-
+
# collect response and send it to stdout
parse_http_response httpresponse <&${netfd}
cat_http_body "${httpresponse.transfer_encoding}" <&${netfd}
-
+
# close connection
redirect {netfd}<&-
-
+
print # add newline
-
+
return 0
}
@@ -386,7 +386,7 @@ method [ string ]
[+SEE ALSO?\bksh93\b(1), \brssread\b(1), \bshtwitter\b(1), \bshtinyurl\b(1), http://opensolaris.pastebin.ca]
'
-while getopts -a "${progname}" "${shnote_usage}" OPT ; do
+while getopts -a "${progname}" "${shnote_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
diff --git a/usr/src/lib/libshell/common/scripts/shpiano.sh b/usr/src/cmd/ast/libshell/common/scripts/shpiano.sh
index b6d511a6ba..d144af8bed 100644
--- a/usr/src/lib/libshell/common/scripts/shpiano.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/shpiano.sh
@@ -54,7 +54,7 @@ function beep
return 0
}
-# array which holds frequency and sample data
+# array which holds frequency and sample data
# (the data are created on demand, "sample_set" indicates whether the "sample" variable
# needs to be filled or not)
compound -A tones=(
@@ -118,7 +118,7 @@ compound -r -A notes=(
["C5"]=( val=tones["C5"] )
)
-# array used to convert a 14-bit unsigned PCM value to
+# array used to convert a 14-bit unsigned PCM value to
# inverted 8-bit u-law
# (values were "stolen" from usr/src/cmd/audio/utilities/g711.c
integer -r -a audio_pcmulinear14bittoulaw8bit=(
@@ -1257,9 +1257,9 @@ function print_piano_layout
| | | | | | | |
/\-----/\-----/\-----/\-----/\-----/\-----/\-----/\-
-Keys:
- R T U I O
- D F G H J K L
+Keys:
+ R T U I O
+ D F G H J K L
ENDOFTEXT
return 0
}
@@ -1290,7 +1290,7 @@ typeset -r shpiano_usage=$'+
'
typeset babymode=false
-while getopts -a "${progname}" "${shpiano_usage}" OPT ; do
+while getopts -a "${progname}" "${shpiano_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
b) babymode=true ;;
@@ -1321,7 +1321,7 @@ if ${babymode} ; then
nameref curr_note=tones["A#4"]
(( freq=curr_note.freq ))
-
+
trap "" INT
fi
@@ -1369,7 +1369,7 @@ while read -r -N 1 key?$'\r > ' ; do
(( freq=1.*(1./duration) ))
fi
fi
-
+
# babymode: print "keys" to screen via /usr/bin/banner
if ${babymode} ; then
lastkeys="${lastkeys/~(Er).*(........)/\1}${key}"
@@ -1398,7 +1398,7 @@ while read -r -N 1 key?$'\r > ' ; do
curr_note.sample=${ bytearraytobase64 audio.data ; }
curr_note.sample_set="true"
fi
-
+
# output sample
{
printf "%B" curr_note.sample
diff --git a/usr/src/lib/libshell/common/scripts/shtinyurl.sh b/usr/src/cmd/ast/libshell/common/scripts/shtinyurl.sh
index debd28949b..38f5e393d7 100644
--- a/usr/src/lib/libshell/common/scripts/shtinyurl.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/shtinyurl.sh
@@ -53,14 +53,14 @@ function parse_http_response
{
nameref response="$1"
typeset h statuscode statusmsg i
-
+
# we use '\r' as additional IFS to filter the final '\r'
IFS=$' \t\r' read -r h statuscode statusmsg # read HTTP/1.[01] <code>
[[ "$h" != ~(Eil)HTTP/.* ]] && { print -u2 -f $"%s: HTTP/ header missing\n" "$0" ; return 1 ; }
[[ "$statuscode" != ~(Elr)[0-9]* ]] && { print -u2 -f $"%s: invalid status code\n" "$0" ; return 1 ; }
response.statuscode="$statuscode"
response.statusmsg="$statusmsg"
-
+
# skip remaining headers
while IFS='' read -r i ; do
[[ "$i" == $'\r' ]] && break
@@ -88,8 +88,8 @@ function cat_http_body
{
typeset emode="$1"
typeset hexchunksize="0"
- integer chunksize=0
-
+ integer chunksize=0
+
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\r' read hexchunksize &&
[[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] &&
@@ -123,7 +123,7 @@ function request_tinyurl
request+="User-Agent: ${http_user_agent}\r\n"
request+="Connection: close\r\n"
- redirect {netfd}<> "/dev/tcp/${url_host}/80"
+ redirect {netfd}<> "/dev/tcp/${url_host}/80"
(( $? != 0 )) && { print -u2 -f $"%s: Could not open connection to %s.\n" "$0" "${url_host}" ; return 1 ; }
# send http post
@@ -137,7 +137,7 @@ function request_tinyurl
# close connection
redirect {netfd}<&-
-
+
if (( httpresponse.statuscode >= 200 && httpresponse.statuscode <= 299 )) ; then
print -r -- "${response}"
return 0
@@ -145,7 +145,7 @@ function request_tinyurl
print -u2 -f $"tinyurl response was (%s,%s):\n%s\n" "${httpresponse.statuscode}" "${httpresponse.statusmsg}" "${response}"
return 1
fi
-
+
# not reached
}
@@ -169,7 +169,7 @@ function request_trimurl
request+="User-Agent: ${http_user_agent}\r\n"
request+="Connection: close\r\n"
- redirect {netfd}<> "/dev/tcp/${url_host}/80"
+ redirect {netfd}<> "/dev/tcp/${url_host}/80"
(( $? != 0 )) && { print -u2 -f $"%s: Could not open connection to %s.\n" "$0" "${url_host}" ; return 1 ; }
# send http post
@@ -183,7 +183,7 @@ function request_trimurl
# close connection
redirect {netfd}<&-
-
+
if (( httpresponse.statuscode >= 200 && httpresponse.statuscode <= 299 )) ; then
# the statement below should really parse the XML...
print -r -- "${response/~(Elr).*(\<url\>)(.*)(\<\/url\>).*/\2}"
@@ -192,7 +192,7 @@ function request_trimurl
print -u2 -f $"tr.im response was (%s,%s):\n%s\n" "${httpresponse.statuscode}" "${httpresponse.statusmsg}" "${response}"
return 1
fi
-
+
# not reached
}
@@ -232,7 +232,7 @@ url
typeset service_provider="tr.im"
-while getopts -a "${progname}" "${shtinyurl_usage}" OPT ; do
+while getopts -a "${progname}" "${shtinyurl_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
P) service_provider="${OPTARG}" ;;
diff --git a/usr/src/lib/libshell/common/scripts/shtwitter.sh b/usr/src/cmd/ast/libshell/common/scripts/shtwitter.sh
index 217b821e6a..d088a1d01a 100644
--- a/usr/src/lib/libshell/common/scripts/shtwitter.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/shtwitter.sh
@@ -54,9 +54,9 @@ function encode_x_www_form_urlencoded
nameref content="formdata.content"
integer numformelements=${#formdata.form[*]}
integer i j
-
+
content=""
-
+
for (( i=0 ; i < numformelements ; i++ )) ; do
nameref element="formdata.form[${i}]"
typeset data="${element.data}"
@@ -64,9 +64,9 @@ function encode_x_www_form_urlencoded
typeset c
[[ "$content" != "" ]] && content+="&"
-
+
content+="${element.name}="
-
+
for ((j=0 ; j < datalen ; j++)) ; do
c="${data:j:1}"
case "$c" in
@@ -96,7 +96,7 @@ function encode_x_www_form_urlencoded
content+="$c"
done
done
-
+
formdata.content_length=${#content}
return 0
@@ -107,14 +107,14 @@ function parse_http_response
{
nameref response="$1"
typeset h statuscode statusmsg i
-
+
# we use '\r' as additional IFS to filter the final '\r'
IFS=$' \t\r' read -r h statuscode statusmsg # read HTTP/1.[01] <code>
[[ "$h" != ~(Eil)HTTP/.* ]] && { print -u2 -f $"%s: HTTP/ header missing\n" "$0" ; return 1 ; }
[[ "$statuscode" != ~(Elr)[0-9]* ]] && { print -u2 -f $"%s: invalid status code\n" "$0" ; return 1 ; }
response.statuscode="$statuscode"
response.statusmsg="$statusmsg"
-
+
# skip remaining headers
while IFS='' read -r i ; do
[[ "$i" == $'\r' ]] && break
@@ -142,8 +142,8 @@ function cat_http_body
{
typeset emode="$1"
typeset hexchunksize="0"
- integer chunksize=0
-
+ integer chunksize=0
+
if [[ "${emode}" == "chunked" ]] ; then
while IFS=$'\r' read hexchunksize &&
[[ "${hexchunksize}" == ~(Elri)[0-9abcdef]+ ]] &&
@@ -164,7 +164,7 @@ function encode_http_basic_auth
typeset s
integer s_len
typeset -b base64var
-
+
# ksh93 binary variables use base64 encoding, the same as the
# HTTP basic authentification. We only have to read the
# plaintext user:passwd string into the binary variable "base64var"
@@ -172,9 +172,9 @@ function encode_http_basic_auth
s="${user}:${passwd}"
s_len="${#s}"
print -n "${s}" | read -N${s_len} base64var
-
+
print -- "${base64var}" # print ASCII (base64) representation of binary var
-
+
return 0
}
@@ -203,12 +203,12 @@ function put_twitter_message
typeset content
integer content_length
)
-
+
typeset request=""
typeset content=""
encode_x_www_form_urlencoded urlform
-
+
content="${urlform.content}"
request="POST ${url_path} HTTP/1.1\r\n"
@@ -219,7 +219,7 @@ function put_twitter_message
request+="Content-Type: application/x-www-form-urlencoded\r\n"
request+="Content-Length: $(( urlform.content_length ))\r\n"
- redirect {netfd}<> "/dev/tcp/${url_host}/80"
+ redirect {netfd}<> "/dev/tcp/${url_host}/80"
(( $? != 0 )) && { print -u2 -f "%s: Could not open connection to %s\n." "$0" "${url_host}" ; return 1 ; }
# send http post
@@ -234,9 +234,9 @@ function put_twitter_message
# close connection
redirect {netfd}<&-
-
+
printf $"twitter response was (%s,%s): %s\n" "${httpresponse.statuscode}" "${httpresponse.statusmsg}" "${response}"
-
+
if (( httpresponse.statuscode >= 200 && httpresponse.statuscode <= 299 )) ; then
return 0
else
@@ -270,7 +270,7 @@ function verify_twitter_credentials
request+="Content-Type: application/x-www-form-urlencoded\r\n"
request+="Content-Length: 0\r\n" # dummy
- redirect {netfd}<> "/dev/tcp/${url_host}/80"
+ redirect {netfd}<> "/dev/tcp/${url_host}/80"
(( $? != 0 )) && { print -u2 -f $"%s: Could not open connection to %s.\n" "$0" "${url_host}" ; return 1 ; }
# send http post
@@ -284,9 +284,9 @@ function verify_twitter_credentials
# close connection
redirect {netfd}<&-
-
+
printf $"twitter response was (%s,%s): %s\n" "${httpresponse.statuscode}" "${httpresponse.statusmsg}" "${response}"
-
+
if (( httpresponse.statuscode >= 200 && httpresponse.statuscode <= 299 )) ; then
return 0
else
@@ -331,7 +331,7 @@ method [ string ]
[+SEE ALSO?\bksh93\b(1), \brssread\b(1), \bshtinyurl\b(1), http://www.twitter.com]
'
-while getopts -a "${progname}" "${shtwitter_usage}" OPT ; do
+while getopts -a "${progname}" "${shtwitter_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
diff --git a/usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh b/usr/src/cmd/ast/libshell/common/scripts/simplefileattributetree1.sh
index a7bc41097e..8be1f0acf3 100644
--- a/usr/src/lib/libshell/common/scripts/simplefileattributetree1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/simplefileattributetree1.sh
@@ -60,7 +60,7 @@ function add_file_to_tree
# (e.g. "foo/var/baz"" results in an array containing "( 'foo' 'bar' 'baz' )")
typeset IFS='/'
pe+=( ${filename} )
-
+
[[ ${pe[0]} == '' ]] && pe[0]='/'
# walk path described via the "pe" array and build nodes if
@@ -73,19 +73,19 @@ function add_file_to_tree
# 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}"
[[ "${ typeset +p node.elements ; }" == "" ]] && compound -A node.elements
node.elements[${pe[i]}]=(
filepath="${filename}"
)
-
+
destnodename="${!node}.elements[${pe[i]}]"
-
+
return 0
}
@@ -93,7 +93,7 @@ function parse_findls
{
nameref out=$1
typeset str="$2"
-
+
# find -ls on Solaris uses the following output format by default:
#604302 3 -rw-r--r-- 1 test001 users 2678 May 9 00:46 ./httpsresdump
@@ -152,7 +152,7 @@ typeset -r simplefileattributetree1_usage=$'+
[-?\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
+[+DESCRIPTION?\bsimplefileattributetree1\b is a simple variable tree
demo which builds a compound variable tree based on the output
of /usr/xpg4/bin/file which contains the file name, the file attributes
and optionally file type and content]
@@ -165,7 +165,7 @@ path
[+SEE ALSO?\bksh93\b(1), \bfile\b(1), \bfind\b(1)]
'
-while getopts -a "${progname}" "${simplefileattributetree1_usage}" OPT ; do
+while getopts -a "${progname}" "${simplefileattributetree1_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
b) appconfig.do_benchmarking="true" ;;
@@ -203,26 +203,26 @@ ${appconfig.do_benchmarking} && (( bench.start=SECONDS ))
for (( i=0 ; i < ${#findls_lines[@]} ; i++ )) ; do
compound parseddata
typeset treenodename
-
+
# parse "find -ls" output
parse_findls parseddata "${findls_lines[i]}"
-
+
# add node to tree and return it's absolute name in "treenodename"
add_file_to_tree filetree "${parseddata.filepath}" treenodename
-
+
# merge parsed "find -ls" output into tree node
nameref treenode="${treenodename}"
treenode+=parseddata
-
+
# extras (calculated from the existing values in "parseddata")
typeset treenode.dirname="${ dirname "${treenode.filepath}" ; }"
typeset treenode.basename="${ basename "${treenode.filepath}" ; }"
-
+
if ${appconfig.do_record.filetype} ; then
# Using /usr/(xpg4/)*/bin/file requires a |fork()|+|exec()| which makes the script a few hundred times slower... ;-(
typeset treenode.filetype="$(file "${treenode.filepath}")"
fi
-
+
if ${appconfig.do_record.content} ; then
if [[ -r "${treenode.filepath}" ]] ; then
# We use an array of compound variables here to support
@@ -245,7 +245,7 @@ for (( i=0 ; i < ${#findls_lines[@]} ; i++ )) ; do
[md5]="$(sum -x md5 < "${treenode.filepath}")"
[sha512]="$(sum -x sha512 < "${treenode.filepath}")"
)
-
+
# we do this for internal debugging only
if [[ "${ {
integer j
diff --git a/usr/src/lib/libshell/common/scripts/simplefiletree1.sh b/usr/src/cmd/ast/libshell/common/scripts/simplefiletree1.sh
index d2308394cf..d3c75d3652 100644
--- a/usr/src/lib/libshell/common/scripts/simplefiletree1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/simplefiletree1.sh
@@ -59,7 +59,7 @@ function add_file_to_tree
# (e.g. "foo/var/baz"" results in an array containing "( 'foo' 'bar' 'baz' )")
typeset IFS='/'
pe+=( ${filename} )
-
+
[[ ${pe[0]} == '' ]] && pe[0]='/'
# walk path described via the "pe" array and build nodes if
@@ -72,15 +72,15 @@ function add_file_to_tree
# 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}"
[[ "${ 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/cmd/ast/libshell/common/scripts/svcproptree1.sh
index 60974a361f..11ee1577f6 100644
--- a/usr/src/lib/libshell/common/scripts/svcproptree1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/svcproptree1.sh
@@ -74,7 +74,7 @@ function svcproptovartree
propname="${name#~(El).*:properties/}"
[[ "${ typeset +p "tree[${servicename}].properties" ; }" == "" ]] && compound -A tree[${servicename}].properties
-
+
nameref node=tree[${servicename}].properties[${propname}]
node=(
@@ -82,7 +82,7 @@ function svcproptovartree
typeset valuelist="true"
typeset -a values
)
-
+
for (( i=2 ; i < num_fields ; i++ )) ; do
node.values+=( "${fields[i]}" )
done
@@ -121,7 +121,7 @@ pattern viewmode
[+SEE ALSO?\bksh93\b(1), \bsvcprop\b(1)]
'
-while getopts -a "${progname}" "${svcproptree1_usage}" OPT ; do
+while getopts -a "${progname}" "${svcproptree1_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
diff --git a/usr/src/lib/libshell/common/scripts/termclock.sh b/usr/src/cmd/ast/libshell/common/scripts/termclock.sh
index c1c4cb8092..e9b84a70a1 100644
--- a/usr/src/lib/libshell/common/scripts/termclock.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/termclock.sh
@@ -60,7 +60,7 @@ function tput_cup
integer y="$1" x="$2"
nameref c="tput_cup_cache[\"${y}_${x}\"]"
-
+
if [[ "$c" == "" ]] ; then
# fast path for known terminal types
if [[ ${TERM} == ~(Elr)(vt100|vt220|xterm|xterm-color|dtterm) ]] ; then
@@ -69,7 +69,7 @@ function tput_cup
c="${ tput cup $y $x ; }"
fi
fi
-
+
print -r -n -- "$c"
return 0
}
@@ -79,10 +79,10 @@ function tput_cup
function get_term_size
{
nameref rect=$1
-
+
rect.columns=${ tput cols ; } || return 1
rect.lines=${ tput lines ; } || return 1
-
+
return 0
}
@@ -101,7 +101,7 @@ function draw_clock
))
tput_cup $(( y+clock.middle_y )) $(( x+clock.middle_x ))
-
+
# add "mark" every 30 degrees
if (( int(angle)%30 == 0 )) ; then
print -r -n "$(((++i)%12+1))"
@@ -118,7 +118,7 @@ function draw_hand
typeset ch="$2"
float length="$3"
float x y
-
+
(( a=angle/360.*(2*M_PI) ))
for (( s=0.0 ; s < 10. ; s+=0.5 )) ; do
@@ -150,7 +150,7 @@ function clear_clock_hand
function main_loop
{
typeset c
-
+
# note: we can't use subshells when writing to the double-buffer file because this
# will render the tput value cache useless
while true ; do
@@ -184,7 +184,7 @@ function main_loop
draw_clock_hand seconds
draw_clock_hand minutes
draw_clock_hand hours
-
+
# move cursor to home position
tput_cup 0 0
} >&6
@@ -279,7 +279,7 @@ typeset -r termclock_usage=$'+
[+SEE ALSO?\bksh93\b(1), \bxclock\b(1)]
'
-while getopts -a "${progname}" "${termclock_usage}" OPT ; do
+while getopts -a "${progname}" "${termclock_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
u) update_interval=${OPTARG} ;;
diff --git a/usr/src/lib/libshell/common/scripts/test_net_sctp.sh b/usr/src/cmd/ast/libshell/common/scripts/test_net_sctp.sh
index 97de72a9c6..6b863d5fbc 100644
--- a/usr/src/lib/libshell/common/scripts/test_net_sctp.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/test_net_sctp.sh
@@ -46,7 +46,7 @@ print "# (via fetching the main page of http://www.sctp.org/ via SCTP)"
redirect {netfd}<> /dev/sctp/www.sctp.org/80
print "sctp fd=${netfd}"
-# send HTTP request
+# send HTTP request
request="GET / HTTP/1.1\r\n"
request+="Host: www.sctp.org\r\n"
request+="User-Agent: ksh93/test_net_sctp (2009-04-08; $(uname -s -r -p))\r\n"
diff --git a/usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh b/usr/src/cmd/ast/libshell/common/scripts/xmldocumenttree1.sh
index fe7783b21c..e527fed85f 100644
--- a/usr/src/lib/libshell/common/scripts/xmldocumenttree1.sh
+++ b/usr/src/cmd/ast/libshell/common/scripts/xmldocumenttree1.sh
@@ -52,7 +52,7 @@ function attrstrtoattrarray
(( currattrlen++ ))
done
s="${s:currattrlen:${#s}}"
-
+
# anything left ?
(( ${#s} == 0 )) && break
@@ -70,14 +70,14 @@ function attrstrtoattrarray
tagstr="${s:0:currattrlen}"
if [[ "${tagstr}" == *=* ]] ; then
# normal case: attribute with value
-
+
tagval="${tagstr#*=}"
-
+
# strip quotes ('' or "")
if [[ "${tagval}" == ~(Elr)(\'.*\'|\".*\") ]] ; then
tagval="${tagval:1:${#tagval}-2}"
fi
-
+
aa[${aa_count}]=( name="${tagstr%%=*}" value="${tagval}" )
else
# special case for HTML where you have something like <foo baz>
@@ -99,10 +99,10 @@ function handle_document
nameref doc=${callbacks["arg_tree"]}
nameref nodepath="${stack.items[stack.pos]}"
nameref nodesnum="${stack.items[stack.pos]}num"
-
+
case "${tag_type}" in
tag_begin)
- nodepath[${nodesnum}]+=(
+ nodepath[${nodesnum}]+=(
typeset tagtype="element"
typeset tagname="${tag_value}"
compound -A tagattributes
@@ -114,7 +114,7 @@ function handle_document
if [[ "${tag_attributes}" != "" ]] ; then
attrstrtoattrarray "${tag_attributes}" "nodepath[${nodesnum}].tagattributes"
fi
-
+
(( stack.pos++ ))
stack.items[stack.pos]="${stack.items[stack.pos-1]}[${nodesnum}].nodes"
(( nodesnum++ ))
@@ -123,14 +123,14 @@ function handle_document
(( stack.pos-- ))
;;
tag_text)
- nodepath[${nodesnum}]+=(
+ nodepath[${nodesnum}]+=(
typeset tagtype="text"
typeset tagvalue="${tag_value}"
)
(( nodesnum++ ))
;;
tag_comment)
- nodepath[${nodesnum}]+=(
+ nodepath[${nodesnum}]+=(
typeset tagtype="comment"
typeset tagvalue="${tag_value}"
)
@@ -141,7 +141,7 @@ function handle_document
document_end)
;;
esac
-
+
# print "xmltok: '${tag_type}' = '${tag_value}'"
}
@@ -154,19 +154,19 @@ function xml_tok
typeset isendtag # bool: true/false
typeset issingletag # bool: true/false (used for tags like "<br />")
nameref callbacks=${1}
-
+
[[ ! -z "${callbacks["document_start"]}" ]] && ${callbacks["document_start"]} "${1}" "document_start"
while IFS='' read -r -N 1 c ; do
isendtag=false
-
+
if [[ "$c" == "<" ]] ; then
# flush any text content
if [[ "$buf" != "" ]] ; then
[[ ! -z "${callbacks["tag_text"]}" ]] && ${callbacks["tag_text"]} "${1}" "tag_text" "$buf"
buf=""
fi
-
+
IFS='' read -r -N 1 c
if [[ "$c" == "/" ]] ; then
isendtag=true
@@ -175,7 +175,7 @@ function xml_tok
fi
IFS='' read -r -d '>' c
buf+="$c"
-
+
# handle comments
if [[ "$buf" == ~(El)!-- ]] ; then
# did we read the comment completely ?
@@ -186,12 +186,12 @@ function xml_tok
buf+="$c"
done
fi
-
+
[[ ! -z "${callbacks["tag_comment"]}" ]] && ${callbacks["tag_comment"]} "${1}" "tag_comment" "${buf:3:${#buf}-5}"
buf=""
continue
fi
-
+
# check if the tag starts and ends at the same time (like "<br />")
if [[ "${buf}" == ~(Er).*/ ]] ; then
issingletag=true
@@ -199,7 +199,7 @@ function xml_tok
else
issingletag=false
fi
-
+
# check if the tag has attributes (e.g. space after name)
if [[ "$buf" == ~(E)[[:space:][:blank:]] ]] ; then
namebuf="${buf%%~(E)[[:space:][:blank:]].*}"
@@ -208,7 +208,7 @@ function xml_tok
namebuf="$buf"
attrbuf=""
fi
-
+
if ${isendtag} ; then
[[ ! -z "${callbacks["tag_end"]}" ]] && ${callbacks["tag_end"]} "${1}" "tag_end" "$namebuf"
else
@@ -226,7 +226,7 @@ function xml_tok
done
[[ ! -z "${callbacks["document_end"]}" ]] && ${callbacks["document_end"]} "${1}" "document_end" "exit_success"
-
+
print # final newline to make filters like "sed" happy
}
@@ -280,7 +280,7 @@ file viewmode
[+SEE ALSO?\bksh93\b(1)]
'
-while getopts -a "${progname}" "${xmldocumenttree1_usage}" OPT ; do
+while getopts -a "${progname}" "${xmldocumenttree1_usage}" OPT ; do
# printmsg "## OPT=|${OPT}|, OPTARG=|${OPTARG}|"
case ${OPT} in
*) usage ;;
diff --git a/usr/src/lib/libshell/common/tests/README.tests b/usr/src/cmd/ast/libshell/common/tests/README.tests
index c78d32d9b1..91a83d4394 100644
--- a/usr/src/lib/libshell/common/tests/README.tests
+++ b/usr/src/cmd/ast/libshell/common/tests/README.tests
@@ -1,26 +1,28 @@
#### ksh93 test suite
-## Intro
+## Introduction
+
The directory /usr/demo/ksh/tests/ contains the ksh93 test suite
which is used to verify the correct behaviour of ksh93.
The test suite is split into modules with the ending *.sh
and a frontend called "shtests" which is used to run the tests.
-
## Basic description:
+
/usr/demo/ksh/tests/shtests <options> <varname=value> <testmodule>
+By default, with no <options>, each test is run three times:
+
+ o In the posix/C locale;
+ o In the C.UTF-8 locale;
+ o As a compiled script using $SHCOMP.
+
<options> may be:
- -a execute test module one time as normal script code
- and a 2nd time as compiled shell script. The env
- variable SHCOMP defines the version of the shell
- compiler being used (default is "${SHELL%/*}/shcomp",
- however it is recommended to explicitly set SHCOMP
- to /usr/bin/shcomp).
- -c execute test module as compiled shell script
- -s execute test module as normal shell script
+ -c execute test module as compiled shell script only
+ -p execute test module as normal shell script in posix/C only
+ -u execute test module as normal shell script in c.UTF-8 only
-t do not print timing information
-v use VMDEBUG
<varname=value>
@@ -28,26 +30,22 @@ and a frontend called "shtests" which is used to run the tests.
<testmodule>
file name of test module
+## Basic usage in illumos:
-## Basic usage in Solaris >= 11 and OpenSolaris/Indiana:
The tests can be executed like this:
$ export SHELL=<path-to-ksh93-executable>
$ export SHCOMP=/usr/bin/shcomp
for t in /usr/demo/ksh/tests/*.sh ; do
- $SHELL /usr/demo/ksh/tests/shtests -a "$t"
+ $SHELL /usr/demo/ksh/tests/shtests "$t"
done
Note that you MUST NOT use "/usr/bin/ksh93" as value for
-SHELL since /usr/bin/ksh93 on Solaris is a wrapper which
+SHELL since /usr/bin/ksh93 on illumos is a wrapper which
selects a suitable executable in /usr/bin/<isa>/ksh93
based on the hardware capabilities defined via /usr/bin/isalist
Valid values for SHELL are:
-- SHELL=/usr/bin/i86/ksh93 # 32bit i386
-- SHELL=/usr/bin/amd64/ksh93 # 64bit AMD64
-- SHELL=/usr/bin/sparcv7/ksh93 # 32bit SPARC
-- SHELL=/usr/bin/sparcv9/ksh93 # 64bit SPARC
-- SHELL=/usr/bin/s390/ksh93 # 32bit SystemZ
-- SHELL=/usr/bin/s390x/ksh93 # 64bit SystemZ
-
-# EOF.
+- SHELL=/usr/bin/i86/ksh93 # 32-bit i386
+- SHELL=/usr/bin/amd64/ksh93 # 64-bit AMD64
+- SHELL=/usr/bin/sparcv7/ksh93 # 32-bit SPARC
+- SHELL=/usr/bin/sparcv9/ksh93 # 64-bit SPARC
diff --git a/usr/src/cmd/ast/libshell/common/tests/illumos_13434_chunked_heredoc.sh b/usr/src/cmd/ast/libshell/common/tests/illumos_13434_chunked_heredoc.sh
new file mode 100644
index 0000000000..bdb8ded6ce
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/common/tests/illumos_13434_chunked_heredoc.sh
@@ -0,0 +1,157 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+#
+# Test whether ksh mishandles a heredoc that spans a 8K chunk and has
+# a backslash as the last character of the first chunk.
+# See https://www.illumos.org/issues/13434
+#
+
+# test setup
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+set -o nounset
+Command=${0##*/}
+integer Errors=0
+
+# .........................................................................
+# This comment introduces the correct number of padding characters to that
+# the \ in the second heredoc below occurs at byte position 8192 of the
+# script.
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................................
+# .........................................................
+
+t1=`mktemp`
+t2=`mktemp`
+if [[ ! -f "$t1" || ! -f "$t2" ]]; then
+ # Don't use the global err _ exit function as the test harness uses
+ # calls to that to compute the number of tests present in this file.
+ echo "Could not create temporary files"
+ exit 1
+fi
+
+cat > "$t1" << EOF
+\$
+EOF
+cat > "$t2" << EOF
+\$
+EOF
+
+if ! cmp -s "$t1" "$t2"; then
+ err_exit "Shell truncates heredoc over chunk boundary"
+ #/bin/od -t x1 "$t1"
+ #/bin/od -t x1 "$t2"
+fi
+
+rm -f "$t1" "$t2"
+
+# tests done
+exit $Errors
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_array_default_datatype.sh
index b2efb2c2a4..97e6e3e784 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_array_default_datatype.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_array_default_datatype.sh
@@ -23,7 +23,7 @@
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
-#
+#
# This test module checks whether indexed+associative arrays
# set the default datatype correctly if someone uses the "+="
# operator to add a value to an array element which does not
@@ -61,9 +61,9 @@ function count_brackets
[[ "$c" == "(" ]] && (( bracketstat.bopen++ ))
[[ "$c" == ")" ]] && (( bracketstat.bclose++ ))
done
-
+
(( bracketstat.bopen != bracketstat.bclose )) && return 1
-
+
return 0
}
@@ -72,9 +72,9 @@ function count_brackets
function add_float
{
nameref arr=$1
-
+
arr[34]+=1.1
-
+
return 0
}
@@ -82,9 +82,9 @@ function add_float
function add_compound
{
nameref arr=$1
-
+
arr[34]+=( float val=1.1 )
-
+
return 0
}
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_poll.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_poll.sh
index 5dc5f5cce1..5dc5f5cce1 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_poll.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_poll.sh
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_sum.sh
index 9dd209cc74..9dd209cc74 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_sum.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_sum.sh
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_tail.sh
index 4506698058..cf10a8fb01 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_builtin_tail.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_builtin_tail.sh
@@ -57,35 +57,32 @@ function waitpidtimeout
float -r STEP=0.5 # const
(( timeout=timeout/STEP ))
-
+
for (( i=0 ; i < timeout ; i+=STEP )) ; do
isvalidpid ${pid} || break
sleep ${STEP}
done
-
+
return 0
}
function myintseq
{
integer i
- float arg1=$1
- float arg2=$2
- float arg3=$3
case $# in
1)
- for (( i=1 ; i <= arg1 ; i++ )) ; do
+ for (( i=1 ; i <= $1 ; i++ )) ; do
printf "%d\n" i
done
;;
2)
- for (( i=arg1 ; i <= arg2 ; i++ )) ; do
+ for (( i=$1 ; i <= $2 ; i++ )) ; do
printf "%d\n" i
done
;;
3)
- for (( i=arg1 ; i <= arg3 ; i+=arg2 )) ; do
+ for (( i=$1 ; i <= $3 ; i+=$2 )) ; do
printf "%d\n" i
done
;;
@@ -94,7 +91,7 @@ function myintseq
return 1
;;
esac
-
+
return 0
}
@@ -152,7 +149,7 @@ compound -a testcases=(
input=$'1\n2\n3\n4'
compound -A tail_args=(
[legacy]=( argv=( "-0" ) )
- [std_like]=( argv=( "-n" "0" ) )
+ [std_like]=( argv=( "-n" "0" ) )
)
expected_output=$''
)
@@ -294,19 +291,19 @@ for testid in "${!testcases[@]}" ; do
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}")"
done
done
# test2: test "tail -r </etc/profile | rev -l" vs. "cat </etc/profile"
-[[ "$(tail -r </etc/profile | rev -l)" == "$( cat /etc/profile )" ]] || err_exit "'tail -r </etc/profile | rev -l' output does not match 'cat /etc/profile'"
+[[ "$(tail -r </etc/profile | rev -l)" == "$( cat /etc/profile )" ]] || err_exit "'tail -r </etc/profile | rev -l' output does not match 'cat /etc/profile'"
# test 3: ast-ksh.2009-05-05 "tail" builtin may crash if we pass unsupported long options
$SHELL -o errexit -c 'builtin tail ; print "hello" | tail --attack_of_chicken_monsters' >/dev/null 2>&1
-(( $? == 2 )) || err_exit "expected exit code 2 for unsupported long option, got $?"
+(( $? == 2 )) || err_exit "expected exit code 2 for unsupported long option, got $?"
# test 4: FIFO tests
@@ -318,7 +315,7 @@ function test_tail_fifo_1
typeset tail_cmd="$1"
integer i
integer tail_pid=-1
-
+
# cleanup trap
trap "rm -f tailtestfifo tailout" EXIT
@@ -338,7 +335,7 @@ function test_tail_fifo_1
fi
wait || err_exit "tail child returned non-zero exit code=$?"
-
+
[[ "$(cat tailout)" == $'11\n12\n13\n14\n15\n16\n17\n18\n19\n20' ]] || err_exit "test_tail_fifo_1: Expected $(doublebackslashquote '11\n12\n13\n14\n15\n16\n17\n18\n19\n20'), got $(doublebackslashquote "$(cat tailout)")"
return 0
@@ -349,7 +346,7 @@ function test_tail_fifo_2
typeset tail_cmd="$1"
integer i
integer tail_pid=-1
-
+
# cleanup trap
trap "rm -f tailtestfifo tailout" EXIT
@@ -378,7 +375,7 @@ function test_tail_fifo_2
fi
wait || err_exit "tail child returned non-zero exit code=$?"
-
+
[[ "$(cat tailout)" == $'5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15' ]] || err_exit "test_tail_fifo_2: Expected $(doublebackslashquote $'5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15'), got $(doublebackslashquote "$(cat tailout)")"
return 0
@@ -406,7 +403,7 @@ function followtest1
if ${usenewline} ; then
newline=$'\n'
fi
-
+
rm -f "${FOLLOWFILE}" "${OUTFILE}"
print -n "${newline}" > "${FOLLOWFILE}"
@@ -424,14 +421,14 @@ function followtest1
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
-
+
rm -f "${FOLLOWFILE}" "${OUTFILE}"
return 0
@@ -462,24 +459,24 @@ function followtest2
${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}")""
-
+ [[ "${outstr}" == 49991*50000 ]] || err_exit "${title}: Expected match for 49991*50000, got "$(singlebackslashquote "${outstr}")""
+
rm -f "${FOLLOWFILE}" "${OUTFILE}"
return 0
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_command_substitution.sh
index 468b533900..7a1b0dab46 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_command_substitution.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_command_substitution.sh
@@ -93,7 +93,7 @@ for (( testfilesize=1*1024 ; testfilesize <= 1024*1024 ; testfilesize*=2 )) ; do
# wait up to log2(i) seconds for the child to terminate
# (this is 10 seconds for 1KB and 19 seconds for 512KB)
(( maxwait=log2(testfilesize) ))
-
+
for testid in "${!test1.testcases[@]}" ; do
nameref currtst=test1.testcases[testid]
${SHELL} -o errexit -c "${currtst.cmd}" >"${tmpfile}.out" &
@@ -137,7 +137,7 @@ testbody=$(
# <CS> means command substitution start, <CE> means command substitution end
cat <<EOF
myfunc ()
-{
+{
pipedcmd=<CS> printf "hi" | tr "h" "H" <CE>
echo \$pipedcmd
@@ -176,7 +176,7 @@ testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ulimit -c 0 ; /g;s/<CE>/)/g'
testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ( /g;s/<CE>/) )/g' | ${SHELL} 2>&1 || err_exit "command returned exit code $?" }
[[ "${testout}" == "command substitution calling myfunc successfully returned 0" ]] || err_exit "Expected 'command substitution calling myfunc successfully returned 0', got ${testout}"
-# Test 002/e: Same as test002/b but uses extra subshell after "${ "
+# Test 002/e: Same as test002/b but uses extra subshell after "${ "
testout=${ printf "%B\n" testbody | sed 's/<CS>/${ ( /g;s/<CE>/) ; }/g' | ${SHELL} 2>&1 || err_exit "command returned exit code $?" }
[[ "${testout}" == "command substitution calling myfunc successfully returned 0" ]] || err_exit "Expected 'command substitution calling myfunc successfully returned 0', got ${testout}"
@@ -220,7 +220,7 @@ testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ulimit -c 0 ; /g;s/<CE>/)/g'
testout=${ printf "%B\n" testbody | sed 's/<CS>/$( ( /g;s/<CE>/) )/g' | ${SHELL} 2>&1 || err_exit "command returned exit code $?" }
[[ "${testout}" == "xok" ]] || err_exit "Expected 'xok', got ${testout}"
-# Test 003/e: Same as test003/b but uses extra subshell after "${ "
+# Test 003/e: Same as test003/b but uses extra subshell after "${ "
testout=${ printf "%B\n" testbody | sed 's/<CS>/${ ( /g;s/<CE>/) ; }/g' | ${SHELL} 2>&1 || err_exit "command returned exit code $?" }
[[ "${testout}" == "xok" ]] || err_exit "Expected 'xok', got ${testout}"
@@ -240,7 +240,7 @@ testout=$( ${SHELL} -c 'pipedcmd=${ printf "hi" | /bin/cat ; } ; print $pipedcmd
# Test whether the shell may hang in a
# 'exec 5>/dev/null; print $(eval ls -d . 2>&1 1>&5)'
# Originally discovered with ast-ksh.2009-05-05 which hung in
-# the "configure" script of postgresql-8.3.7.tar.gz (e.g.
+# the "configure" script of postgresql-8.3.7.tar.gz (e.g.
# configure --enable-thread-safety --without-readline)
compound test5=(
compound -a testcases=(
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_misc.sh
index 96009acafc..a512d85f41 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_compound_misc.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_misc.sh
@@ -61,9 +61,9 @@ function count_brackets
[[ "$c" == "(" ]] && (( bracketstat.bopen++ ))
[[ "$c" == ")" ]] && (( bracketstat.bclose++ ))
done
-
+
(( bracketstat.bopen != bracketstat.bclose )) && return 1
-
+
return 0
}
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_nameref.sh
index 59ad028af8..8179e478b7 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_compound_nameref.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compound_nameref.sh
@@ -67,7 +67,7 @@ cat <<EOF
function2 compound_var
- printf "x=%d, y=%d\n" compound_var.x compound_var.y
+ printf "x=%d, y=%d\n" compound_var.x compound_var.y
}
x="\$(function1)"
@@ -118,9 +118,9 @@ cat <<EOF
compound -A addrsp
nameref sp=addrsp
-
+
sp[14]=( size=1 )
-
+
if [[ -v sp[19] ]] ; then
print "should not happen"
else
@@ -139,13 +139,13 @@ EOF
(
cat <<EOF
compound -A addrsp
-
+
function t1
{
nameref sp=\$1
-
+
sp[14]=( size=1 )
-
+
if [[ -v sp[19] ]] ; then
print "should not happen"
else
@@ -169,9 +169,9 @@ cat <<EOF
compound -a addrsp
nameref sp=addrsp
-
+
sp[14]=( size=1 )
-
+
if [[ -v sp[19] ]] ; then
print "should not happen"
else
@@ -190,13 +190,13 @@ EOF
(
cat <<EOF
compound -a addrsp
-
+
function t1
{
nameref sp=\$1
-
+
sp[14]=( size=1 )
-
+
if [[ -v sp[19] ]] ; then
print "should not happen"
else
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compoundvario.sh
index b36d07e7ee..d16019ba59 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_compoundvario.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_compoundvario.sh
@@ -55,9 +55,9 @@ function count_brackets
[[ "$c" == "(" ]] && (( bracketstat.bopen++ ))
[[ "$c" == ")" ]] && (( bracketstat.bclose++ ))
done
-
+
(( bracketstat.bopen != bracketstat.bclose )) && return 1
-
+
return 0
}
@@ -66,7 +66,7 @@ function cpvcat1
{
set -o errexit
compound tmp
-
+
while read -C tmp ; do printf "%B\n" tmp ; done
return 0
}
@@ -76,7 +76,7 @@ function cpvcat2
{
set -o errexit
compound tmp
-
+
while read -C tmp ; do printf "%#B\n" tmp ; done
return 0
}
@@ -86,7 +86,7 @@ function cpvcat3
{
set -o errexit
compound tmp
-
+
while read -C tmp ; do print -C tmp ; done
return 0
}
@@ -96,7 +96,7 @@ function cpvcat4
{
set -o errexit
compound tmp
-
+
while read -C tmp ; do print -v tmp ; done
return 0
}
@@ -221,7 +221,7 @@ s=${
read s
read -C y2
}
-
+
print "x${s}x"
} || err_exit "test returned exit code $?"
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh
index a5d14f9fce..28c7f8dde7 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh
@@ -30,15 +30,15 @@
# -- snip --
# The following one-liner (including back ticks) causes ksh93 to spin
# out of control consuming all memory at a *very* rapid pace:
-#
+#
# `exec program > file`
-#
-# If "file" is a real file (as opposed to /dev/null), the file will
-# also grow without bound. "program" need not exist, i.e.
+#
+# If "file" is a real file (as opposed to /dev/null), the file will
+# also grow without bound. "program" need not exist, i.e.
#
# `exec > file`
#
-# has the same result. Using $() instead of `` also has the same
+# has the same result. Using $() instead of `` also has the same
# effect.
#
# This works fine under all other bourne-compatible shells.
@@ -90,7 +90,7 @@ if isvalidpid ${childpid} ; then
kill -STOP ${childpid}
err_exit "Child still active after 5 seconds (hang ?)"
-
+
# Get sample stack trace
pstack ${childpid}
kill -KILL ${childpid}
@@ -124,7 +124,7 @@ if isvalidpid ${childpid} ; then
kill -STOP ${childpid}
err_exit "Child still active after 5 seconds (hang ?)"
-
+
# Get sample stack trace
pstack ${childpid}
kill -KILL ${childpid}
@@ -157,7 +157,7 @@ if isvalidpid ${childpid} ; then
kill -STOP ${childpid}
err_exit "Child still active after 5 seconds (hang ?)"
-
+
# Get sample stack trace
pstack ${childpid}
kill -KILL ${childpid}
@@ -191,7 +191,7 @@ if isvalidpid ${childpid} ; then
kill -STOP ${childpid}
err_exit "Child still active after 5 seconds (hang ?)"
-
+
# Get sample stack trace
pstack ${childpid}
kill -KILL ${childpid}
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh
index 08568ae179..d2e8c79284 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh
@@ -37,7 +37,7 @@
# ( )
# -- snip --
# The first bracket pair is Ok since it's coming from $ print "$l" # , however the 2nd pair comes from the print $l _outside_ the subshell where the variable "l" should no longer exist.
-#
+#
# Workaround:
# Force ksh93 to call |fork()| for the matching subshell using $ ulimit -c #, e.g. ...
# -- snip --
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh
index 6da73f9d7e..4197088e0d 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6722134_background_CHLD_trap.sh
@@ -67,7 +67,7 @@ sleep 7 &
for ((i=0 ; i < 15 ; i++)) ; do
print $i
sleep 1
-
+
# external, non-background command for which a SIGCHLD should
# _not_ be fired
/bin/true >/dev/null
@@ -101,7 +101,7 @@ sleep 9 &
for ((i=0 ; i < 15 ; i++)) ; do
print $i
sleep 1
-
+
# external, non-background command for which a SIGCHLD should
# _not_ be fired
/bin/true >/dev/null
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh
index d6407c9ae0..399c256354 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh
@@ -27,7 +27,7 @@
# Test whether CR #6753538 ("umask modification leaks out of a ksh93
# subshell") has been fixed.
#
-# Quote from CR #6753538:
+# Quote from CR #6753538:
# -- snip --
# I discovered that Solaris 11's /bin/sh exhibits the following
# surprising behavior:
@@ -56,7 +56,7 @@ integer Errors=0
#
# test set 1: Simple umask in subshell
#
-x=$(${SHELL} -c 'umask 22; (umask 0); umask')
+x=$(${SHELL} -c 'umask 22; (umask 0); umask')
[[ "$x" == "0022" ]] || err_exit "expected umask 0022, got $x"
x=$(${SHELL} -c 'umask 20; (umask 0); umask')
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh
index d6da9e99a4..96285378b3 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh
@@ -27,18 +27,18 @@
# Test whether CR #6754020 ("ksh93 does weird '[' expansion") has
# been fixed.
#
-# Quote from CR #6754020:
+# Quote from CR #6754020:
# ---- snip ----
# The problem is that subprocess uses /bin/sh as the shell when it
# spins off the process. As Brad demonstrated:
# /bin/sh -c 'echo F[[O]'
# F[[O][
-#
+#
# In short, this bug only appears when run through the test suite,
# or by people running /bin/sh who don't understand how their shell
# treats special characters.
# -- snip --
-#
+#
# In this case ksh93 has a bug which causes "F[[O]" to be expanded
# in a wrong way.
# ---- snip ----
@@ -75,6 +75,6 @@ s="$(${SHELL} -c 'print F[[O]')"
s="$(${SHELL} -c 'print F[[[O]]')"
[[ "$s" == 'F[[[O]]' ]] || err_exit "Expected 'F[[[O]]', got $s"
-
+
# tests done
exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh
index cd9342ddd9..cb6e5f956d 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh
@@ -27,7 +27,7 @@
# Test whether CR #6763594 ('ksh93 executes command after "command"
# builtin twice on failure') has been fixed.
#
-# Quote from CR #6763594:
+# Quote from CR #6763594:
# ---- snip ----
# ksh93 has a bug which causes shell to execute the command after the
# "command" builtin to be executed twice if "command" fails:
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh
index 606a8b6585..64526125ef 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6766246_pattern_matching_bug.sh
@@ -25,8 +25,8 @@
#
# Test whether CR #6766246 ("bug in pattern matching") has been fixed.
-#
-# Quote from CR #6766246:
+#
+# Quote from CR #6766246:
# ---- snip ----
# The bootstrap script of pkgsrc contains this code
# checkarg_sane_absolute_path() {
@@ -44,7 +44,7 @@
# or "@" are accepted, but paths containing "-" are rejected.
# Note that this interpretation makes the whole pattern
# syntactically wrong, which isn't noticed either.
-#
+#
# Test case:
# -- snip --
# !/bin/sh
@@ -120,17 +120,17 @@ pat="@foobar" ; [[ "$(do_match "${pat}")" == "match" ]] || err_exit "${pat} no
## test 2 (gsf's test chain):
# Make sure LC_COLLATE has a value
-if [[ "${LC_COLLATE}" == "" ]] ; then
- if [[ ${LANG} != "" && "${LC_ALL}" == "" ]] ; then
+if [[ ! -v LC_COLLATE ]] ; then
+ if [[ -v LANG && ! -v LC_ALL ]]; then
LC_COLLATE="${LANG}"
fi
fi
-if [[ "${LC_ALL}" != "" ]] ; then
+if [[ -v LC_ALL ]] ; then
LC_COLLATE="${LC_ALL}"
fi
-[[ "${LC_COLLATE}" != "" ]] || err_exit "LC_COLLATE empty."
+[[ -v LC_COLLATE ]] || LC_COLLATE=C
set -- \
'A' 0 1 1 0 1 1 1 0 0 1 0 0 \
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh
index fbe90c29cf..57de58997f 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh
@@ -89,7 +89,7 @@ Command=${0##*/}
integer Errors=0
#
-# test1: Testcase from CR #6769332
+# test1: Testcase from CR #6769332
#
(
cat <<EOF
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh
index d18a8c1513..d18a8c1513 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh
index d8e4107835..8585613222 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6778077_sigthaw_trap.sh
@@ -32,14 +32,14 @@
# -- snip --
# While ksh93 understand THAW in the list of signals for kill it does
# not understand it for "trap'
-#
+#
# : pod5.eu TS 6 $; kill -l | egrep '(THAW|FREEZE)'
# FREEZE
# THAW
# : pod5.eu TS 7 $; trap "echo THAW" THAW
# ksh93: trap: THAW: bad trap
# : pod5.eu TS 8 $;
-#
+#
# Using the signal number (35) works around this.
# -- snip --
#
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh
index 17bede815e..c54733cba6 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh
@@ -36,10 +36,10 @@
# The bug description for Solaris libc says this:
# > The first line of output from this program is correct. The second line
# > is not.
-# >
+# >
# > leviathan% cat a.c
# > #include <stdio.h>
-# >
+# >
# > int main()
# > {
# > printf("%.0a\n", 1.5);
@@ -55,7 +55,7 @@
# matches ast-open.2008-11-04) I get this:
# -- snip --
# $ cc -xc99=%all -I/usr/include/ast -last a.c -o a &&
-# ./a
+# ./a
# 0x1p+00
# 0x1p+00
# -- snip --
@@ -72,7 +72,7 @@
# Compile and run testcase like this:
# -- snip --
# $ cc -xc99=%all -I/usr/include/ast -last a.c -o a &&
-# ./a
+# ./a
# -- snip --
# Expected Result
# 0x1p+1
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh
index b808ef17b3..8159526bda 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh
@@ -25,16 +25,16 @@
#
# Test whether CR #6800929 ("snv_106 ksh93 update breaks Install(1M)") has been fixed.
-#
-# Quote from CR #6800929:
+#
+# Quote from CR #6800929:
# ---- snip ----
# so i just upgraded this morning from snv_105 to snv_106. now
# Install(1M) is hanging whenever i run it. i'm running it as follows:
# Install -o debug -k i86xpv -T domu-219:/tmp
-#
+#
# and here's where it's hung:
# ---8<---
-# Edward Pilatowicz <edward.pilatowicz@sun.com>
+# Edward Pilatowicz <edward.pilatowicz@sun.com>
# $ pstack 204600
# 204600: /bin/ksh /opt/onbld/bin/Install -o debug -k i86xpv -T domu-219:/tmp
# fffffd7fff2e3d1a write (1, 4154c0, 64)
@@ -64,10 +64,10 @@
# 0000000000400e72 main () + 52
# 0000000000400ccc ????
# ---8<---
-#
+#
# there is only one place where Install(1M) invokes "uniq":
# set -- `grep "^CONF" $modlist | sort | uniq`;
-#
+#
# as it turns out, i can easily reproduce this problem as follows:
# ---8<---
# $ ksh93
@@ -136,7 +136,7 @@ for (( testfilesize=1*1024 ; testfilesize <= 1024*1024 ; testfilesize*=2 )) ; do
# wait up to log2(i) seconds for the child to terminate
# (this is 10 seconds for 1KB and 19 seconds for 512KB)
(( maxwait=log2(testfilesize) ))
-
+
for testid in "${!testcases[@]}" ; do
nameref currtst=testcases[testid]
${SHELL} -o errexit -c "${currtst.cmd}" >"${tmpfile}.out" &
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh
index ca8f832d1a..be2037260b 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805792_varmovetest1.sh
@@ -36,17 +36,17 @@
# function f1
# {
# nameref tr=$1
-#
+#
# typeset -A tr.subtree
-#
+#
# typeset -C node
-#
+#
# node.one="hello"
# node.two="world"
-#
+#
# # move local note into the array
# typeset -m tr.subtree["a_node"]=node
-#
+#
# return 0
# }
# f1 tree
@@ -100,14 +100,14 @@ compound tree1 tree2
function f1
{
nameref tr=$1
-
+
typeset -A tr.subtree
-
+
compound node
-
+
node.one="dummy1"
node.two="dummy2"
-
+
# We use the nameref's here since ast-ksh,2008-12-12 crashes
# when this function returns because "nodeone" and "nodetwo"
# still reference "node" which was renamed.
@@ -117,10 +117,10 @@ function f1
nameref nodetwo=node.two
nodeone="hello"
nodetwo="world"
-
+
# move local note into the array
typeset -m tr.subtree["a_node"]=node
-
+
return 0
}
@@ -128,14 +128,14 @@ function f1
function f2
{
nameref tr=$1
-
+
typeset -A tr.subtree
-
+
nameref node=tr.subtree["a_node"]
-
+
node.one="hello"
node.two="world"
-
+
return 0
}
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh
index 4176b62015..4176b62015 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh
index b0390a24ab..5d3e50b486 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6805795_negative_zero.sh
@@ -89,10 +89,10 @@ str=$(
float a
float b
float c
-
+
a=0.
b=-5.
-
+
(( c=copysign(a, b) ))
print -- "$c"
@@ -103,11 +103,11 @@ str=$(
# test 3: test "signbit()"
str=$(
set -o errexit
-
+
float a
-
+
a=-0.
-
+
print -- $(( signbit(a) ))
) || err_exit "test failed."
[[ "${str}" == "1" ]] || err_exit "Expected signbit(a, b) == 1, got ${str}"
@@ -116,12 +116,12 @@ str=$(
# test 4: test "signbit()"
str=$(
set -o errexit
-
+
float a
float c
-
+
a=-0.
-
+
(( c=signbit(a) ))
print -- "$c"
@@ -133,15 +133,15 @@ str=$(
# negative zero assigned from a "float"
str=$(
set -o errexit
-
+
float a # float
typeset -X c # hexfloat
-
+
a=-0.
-
+
# copy value from "float" to "hexfloat"
(( c=a ))
-
+
print -- "$c"
) || err_exit "test failed."
[[ "${str}" == -0x* ]] || err_exit "Expected c == -0x*, got ${str}"
@@ -151,15 +151,15 @@ str=$(
# a C99 "hexfloat" value
str=$(
set -o errexit
-
+
typeset -X a # hexfloat
float c # float
-
+
a=-0x0.0000000000000000000000000000p+00
-
+
# copy value from "hexfloat" to "float"
(( c=a ))
-
+
print -- "$c"
) || err_exit "test failed."
[[ "${str}" == "-0" ]] || err_exit "Expected c == -0, got ${str}"
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh
index 79b0c24f85..79b0c24f85 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh
index 6945b64985..6945b64985 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh
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/cmd/ast/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh
index 13dff15526..f4e6096d22 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh
@@ -39,7 +39,7 @@
# $ ksh93
# jl138328@gir:~$ echo $test
#
-# jl138328@gir:~$ echo ${test}
+# jl138328@gir:~$ echo ${test}
# Segmentation Fault (core dumped)
# ------------ snip ------------
#
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh
index fa3f32da1b..fa3f32da1b 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh
index 90008a5c44..11ccdc7572 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh
@@ -40,7 +40,7 @@
# Regression
# No
# Steps to Reproduce
-# $ cat test1.sh
+# $ cat test1.sh
# print hello
# printf "args=%s\n" "$@"
# $ shcomp test1.sh test1
@@ -49,7 +49,7 @@
# # never worked)
# $ bash -c './test1 "a b" "c" "d"'
# Expected Result
-# hello
+# hello
# args=a a1
# args=b
# args=c
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh
index c4a16ad646..28da9597db 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh
@@ -31,20 +31,20 @@
# open preventing callers from exiting"):
# ------------ snip ------------
# The following scenario hangs with snv_122, 100% reproducible:
-#
+#
# Create a script hangit:
# -----
# #!/bin/ksh
# ( sleep 100000 </dev/null >/dev/null 2>&1 & )
# exit 0
# -----
-#
+#
# Run the following command:
# hangit | tee -a /tmp/log
-#
+#
# The hang can be eliminated either by removing the "exit 0" line (?!?), or by
# redirecting the subshell output to /dev/null.
-#
+#
# This is pretty nasty. I've whittled it down to this simple case but am seeing
# it in a much more subtle and complex environment where there are several
# intermediate calling scripts which have exited and eventually the parent pipes
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/cmd/ast/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh
index 93e559c0a7..4c17d4785f 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh
@@ -31,19 +31,19 @@
# 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 ------------
@@ -82,7 +82,7 @@ cat <<EOF
#!/bin/sh
#
# Test derived from Sun's SnapShots Functional Suite
-#
+#
export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin
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/cmd/ast/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh
index aa8cd9f862..018c80b635 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh
@@ -31,30 +31,30 @@
# 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:
+#
+# 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 ------------
@@ -93,7 +93,7 @@ function test1
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}"
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/cmd/ast/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh
index c657a07899..05c1095957 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh
@@ -30,29 +30,29 @@
# 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
+# $ od -tx1 mb.eucjp
# 0000000 a4 a2 a4 a4 a4 a4 a4 a6 a4 a8 0a
# 0000013
-# $ od -tx1 delim
+# $ 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
+#
+# $ /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 ------------
#
@@ -91,7 +91,7 @@ function test1
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}"
@@ -126,22 +126,22 @@ function test1
testname="${cut_cmd}/${tc.name}"
if [[ "${tc.locale}" == "<unicode>" ]] ; then
- if [[ "$LC_ALL" != *.UTF-8 ]] ; then
+ if [[ ! -v LC_ALL || $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 $?"
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/cmd/ast/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh
index 4a7da66794..2892401ede 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh
@@ -30,25 +30,25 @@
# 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
+# $ 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 ------------
#
@@ -87,7 +87,7 @@ function test1
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}"
@@ -123,18 +123,18 @@ function test1
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"
@@ -142,7 +142,7 @@ function test1
[[ "${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
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh
index b9240e5f32..117cde1283 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh
@@ -30,29 +30,29 @@
# ------------ 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
@@ -65,7 +65,7 @@
# 1>& 2
# + 1>> log
# + print TRAP B
-#
+#
# + 1>> log
# + print TRAP A
# + 1>> log
@@ -73,17 +73,17 @@
# + 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
@@ -167,7 +167,7 @@ cat >"testscript.sh" <<EOF
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"
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh
index b1c40f22f5..b1c40f22f5 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_cr_xxxxxxxx_template.sh
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_getconf.sh
index 2b1243c5c0..cabd0566b7 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_getconf.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_getconf.sh
@@ -24,7 +24,7 @@
#
#
-# sun_solaris_getconf.sh - test the ksh93 getconf builtin for compatibility
+# sun_solaris_getconf.sh - test the ksh93 getconf builtin for compatibility
# with /usr/bin/getconf
#
@@ -69,7 +69,7 @@ integer Errors=0
function compare_normal
{
mismach=0 getconf_keys=0
- /usr/bin/getconf -a |
+ /usr/bin/getconf -a |
while read i ; do
(( getconf_keys++ ))
t="\${i%:*}"
@@ -88,7 +88,7 @@ function compare_normal
function compare_path
{
mismach=0 getconf_keys=0
- /usr/bin/getconf -a |
+ /usr/bin/getconf -a |
while read i ; do
(( getconf_keys++ ))
t="\${i%:*}"
@@ -138,7 +138,7 @@ do
compare_normal
(( getconf_keys == 0 )) && err_exit "getconf/normal not working (PATH=${PATH})."
(( mismatch > 0 )) && err_exit "getconf/normal test found ${mismatch} differences (PATH=${PATH})."
-
+
# run the same test in a seperate shell
# (we explicitly test this because ast-ksh.2007-01-11 picks up /usr/xpg6/bin/getconf
# if /usr/xpg6/bin/ comes in ${PATH} before /usr/bin (this happens only of ${PATH}
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_local_compound_nameref001.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_local_compound_nameref001.sh
index e95a502daf..c069717412 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_local_compound_nameref001.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_local_compound_nameref001.sh
@@ -45,7 +45,7 @@ integer Errors=0
function function2
{
nameref v=$1
-
+
v.x=19
v.y=20
}
@@ -53,10 +53,10 @@ function function2
function function1
{
typeset compound_var=()
-
+
function2 compound_var
-
- printf "x=%d, y=%d\n" compound_var.x compound_var.y
+
+ printf "x=%d, y=%d\n" compound_var.x compound_var.y
}
x="$(function1)"
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_locale_misc.sh
index bb3314fe49..6775cf85db 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_locale_misc.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_locale_misc.sh
@@ -59,10 +59,10 @@ 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
}
@@ -90,7 +90,7 @@ function test_lc_all_override1
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
+ while read -N1 c ; do
(( ch_val='${c} ))
(( ch_val >= 0xac00 && ch_val <= 0xdfff )) && (( korean_count++ ))
@@ -98,7 +98,7 @@ function test_lc_all_override1
# 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))
@@ -169,9 +169,9 @@ function test_lc_l10n_scope1
fi
done
done
-
+
rm "out"
-
+
return 0
}
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_staticvariables.sh
index 64574c2733..4264d9cab5 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_staticvariables.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_staticvariables.sh
@@ -36,9 +36,9 @@ function testfunc
typeset cmd="$2"
typeset expected_output="$3"
typeset output
-
+
output="$($SHELL -c "${cmd}" 2>&1 )"
-
+
[[ "${output}" != "${expected_output}" ]] && err_exit2 ${line_number} "${output} != ${expected_output}"
}
alias testfunc='testfunc $LINENO'
@@ -68,9 +68,9 @@ testfunc '(function l { float -S x=0.5 ; (( x+=.5 )) ; $1 && print "$x" ; } ;
function l
{
typeset -S s=( a=0 b=0 )
-
+
(( s.a++, s.b++ ))
-
+
$1 && printf 'a=%d, b=%d\n' s.a s.b
}
l false ; l false ; l true
@@ -82,9 +82,9 @@ testfunc '(function l { float -S x=0.5 ; (( x+=.5 )) ; $1 && print "$x" ; } ;
function ar
{
typeset -a -S s=( "hello" )
-
+
s+=( "an element" )
-
+
$1 && { printf '%s' "${s[@]}" ; printf '\n' ; }
}
ar false ; ar false ; ar true
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree001.sh
index 9e11cc23d2..55be05fd13 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_vartree001.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree001.sh
@@ -27,13 +27,13 @@
# variable tree test #001
# Propose of this test is whether ksh93 crashes or not - ast-ksh.2008-05-14
# crashes like this when running this test:
-#
+#
# program terminated by signal ILL (illegal opcode)
# 0xffffffffffffffff: <bad address 0xffffffffffffffff>
# Current function is nv_diropen
# 123 dp->hp = (Namval_t*)dtprev(dp->root,&fake);
# (dbx) where
-# [1] 0x100381e80(0x100381e80, 0xffffffff7fffe690, 0x10, 0x61, 0x0, 0x100381ec9), at 0x100381e80
+# [1] 0x100381e80(0x100381e80, 0xffffffff7fffe690, 0x10, 0x61, 0x0, 0x100381ec9), at 0x100381e80
# =>[2] nv_diropen(np = (nil), name = 0x100381ebc "mysrcdata"), line 123 in "nvtree.c"
# [3] walk_tree(np = 0x1003809e0, dlete = 524289), line 743 in "nvtree.c"
# [4] put_tree(np = 0x1003809e0, val = (nil), flags = 524289, fp = 0x100381db0), line 814 in "nvtree.c"
@@ -47,7 +47,7 @@
# [12] exfile(shp = 0x10033e900, iop = 0x100379a20, fno = 10), line 589 in "main.c"
# [13] sh_main(ac = 2, av = 0xffffffff7ffffa08, userinit = (nil)), line 364 in "main.c"
# [14] main(argc = 2, argv = 0xffffffff7ffffa08), line 46 in "pmain.c"
-#
+#
# test setup
function err_exit
@@ -71,7 +71,7 @@ function build_tree
typeset i
typeset dummy
typeset a b c d e f
-
+
nameref dest_tree="$1" # destination tree
nameref srcdata="$2" # source data
typeset tree_mode="$3" # mode to define the type of leads
@@ -83,15 +83,15 @@ function build_tree
for i in "${node.xlfd[@]}" ; do
IFS='-' read dummy a b c d e f <<<"$i"
-
+
if [[ "$a" == "" ]] ; then
a="$dummy"
fi
-
+
[[ "$a" == "" ]] && a='-'
[[ "$b" == "" ]] && b='-'
[[ "$c" == "" ]] && c='-'
-
+
if [[ "${dest_tree.l1["$a"]}" == "" ]] ; then
#if ! (unset dest_tree.l1["$a"]) ; then
typeset -A dest_tree.l1["$a"].l2
@@ -105,7 +105,7 @@ function build_tree
if [[ "${!dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[*]}" == "" ]] ; then
typeset -A dest_tree.l1["$a"].l2["$b"].l3["$c"].entries
fi
-
+
#dest_tree.l1["$a"].l2["$b"].l3["$c"].entries+=( "$index" )
typeset new_index
if [[ "${tree_mode}" == "leaf_name" ]] ; then
@@ -118,12 +118,12 @@ function build_tree
continue
fi
fi
-
+
add_tree_leaf dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}] "${index}" "${tree_mode}"
done
done
-
- return 0
+
+ return 0
}
function add_tree_leaf
@@ -131,7 +131,7 @@ function add_tree_leaf
nameref tree_leafnode="$1"
nameref data_node=srcdata.hashnodes["$2"]
typeset add_mode="$3"
-
+
case "${add_mode}" in
"leaf_name")
tree_leafnode="${data_node.name}"
@@ -151,7 +151,7 @@ function add_tree_leaf
return 1
;;
esac
-
+
# not reached
return 1
}
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree002.sh
index ea7d7bd274..04d8862995 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_vartree002.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree002.sh
@@ -44,7 +44,7 @@ Command=${0##*/}
integer Errors=0
# "built_tree1" and "built_tree2" are identical except the way how they test
-# whether a variable exists:
+# whether a variable exists:
# - "built_tree1" uses "${varname}" != "", e.g. looking whether the variable
# as non-zero length content
# - "built_tree2" uses "! ([[ -v varname ]] ; res=$? ; unset varname ; exit $res)", e.g. "unset" in a subshell.
@@ -56,7 +56,7 @@ function build_tree1
typeset i
typeset dummy
typeset a b c d e f
-
+
nameref dest_tree="$1" # destination tree
nameref srcdata="$2" # source data
typeset tree_mode="$3" # mode to define the type of leads
@@ -68,15 +68,15 @@ function build_tree1
for i in "${node.xlfd[@]}" ; do
IFS='-' read dummy a b c d e f <<<"$i"
-
+
if [[ "$a" == "" ]] ; then
a="$dummy"
fi
-
+
[[ "$a" == "" ]] && a='-'
[[ "$b" == "" ]] && b='-'
[[ "$c" == "" ]] && c='-'
-
+
if [[ "${dest_tree.l1["$a"]}" == "" ]] ; then
#if ! (unset dest_tree.l1["$a"]) ; then
typeset -A dest_tree.l1["$a"].l2
@@ -90,7 +90,7 @@ function build_tree1
if [[ "${!dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[*]}" == "" ]] ; then
typeset -A dest_tree.l1["$a"].l2["$b"].l3["$c"].entries
fi
-
+
typeset new_index
if [[ "${tree_mode}" == "leaf_name" ]] ; then
new_index=$(( ${#dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[@]}+1 ))
@@ -102,16 +102,16 @@ function build_tree1
continue
fi
fi
-
+
add_tree_leaf dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}] "${index}" "${tree_mode}"
done
done
-
- return 0
+
+ return 0
}
# "built_tree1" and "built_tree2" are identical except the way how they test
-# whether a variable exists:
+# whether a variable exists:
# - "built_tree1" uses "${varname}" != "", e.g. looking whether the variable
# as non-zero length content
# - "built_tree2" uses "! ([[ -v varname ]] ; res=$? ; unset varname ; exit $res)", e.g. "unset" in a subshell.
@@ -123,7 +123,7 @@ function build_tree2
typeset i
typeset dummy
typeset a b c d e f
-
+
nameref dest_tree="$1" # destination tree
nameref srcdata="$2" # source data
typeset tree_mode="$3" # mode to define the type of leads
@@ -135,15 +135,15 @@ function build_tree2
for i in "${node.xlfd[@]}" ; do
IFS='-' read dummy a b c d e f <<<"$i"
-
+
if [[ "$a" == "" ]] ; then
a="$dummy"
fi
-
+
[[ "$a" == "" ]] && a='-'
[[ "$b" == "" ]] && b='-'
[[ "$c" == "" ]] && c='-'
-
+
#if [[ "${dest_tree.l1["$a"]}" == "" ]] ; then
if ! ([[ -v dest_tree.l1["$a"] ]] ; res=$? ; unset dest_tree.l1["$a"] ; exit $res) ; then
typeset -A dest_tree.l1["$a"].l2
@@ -157,7 +157,7 @@ function build_tree2
if [[ "${!dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[*]}" == "" ]] ; then
typeset -A dest_tree.l1["$a"].l2["$b"].l3["$c"].entries
fi
-
+
typeset new_index
if [[ "${tree_mode}" == "leaf_name" ]] ; then
new_index=$(( ${#dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[@]}+1 ))
@@ -169,12 +169,12 @@ function build_tree2
continue
fi
fi
-
+
add_tree_leaf dest_tree.l1["$a"].l2["$b"].l3["$c"].entries[${new_index}] "${index}" "${tree_mode}"
done
done
-
- return 0
+
+ return 0
}
@@ -183,7 +183,7 @@ function add_tree_leaf
nameref tree_leafnode="$1"
nameref data_node=srcdata.hashnodes["$2"]
typeset add_mode="$3"
-
+
case "${add_mode}" in
"leaf_name")
tree_leafnode="${data_node.name}"
@@ -203,7 +203,7 @@ function add_tree_leaf
return 1
;;
esac
-
+
# not reached
return 1
}
@@ -234,7 +234,7 @@ typeset mysrcdata_global=(
mytree_global1=()
mytree_global2=()
-
+
function main
{
# "mysrcdata_local" and "mysrcdata_global" must be identical
@@ -283,7 +283,7 @@ function main
err_exit 'build_tree2 mytree_local2 mysrcdata_local leaf_compound returned an error'
(( $(print -r -- "${mytree_local2}" | wc -l) > 10 )) || err_exit "Compound tree 'mytree_local2' too small."
-
+
#### Compare treess
if [[ "${mytree_global1}" != "${mytree_local1}" ]] ; then
err_exit "Compound trees 'mytree_global1' and 'mytree_local1' not identical"
@@ -303,53 +303,53 @@ function main
#### test "unset" in a subshell
( [[ -v 'mytree_global1.l1[urw].l2[itc zapfdingbats]' ]] ; res=$? ; unset 'mytree_global1.l1[urw].l2[itc zapfdingbats]' ; exit $res ) || \
- err_exit "Try 1: Variable 'mytree_global1.l1[urw].l2[itc zapfdingbats]' not found."
+ err_exit "Try 1: Variable 'mytree_global1.l1[urw].l2[itc zapfdingbats]' not found."
( [[ -v 'mytree_global1.l1[urw].l2[itc zapfdingbats]' ]] ; res=$? ; unset 'mytree_global1.l1[urw].l2[itc zapfdingbats]' ; exit $res ) || \
- err_exit "Try 2: Variable 'mytree_global1.l1[urw].l2[itc zapfdingbats]' not found."
+ err_exit "Try 2: Variable 'mytree_global1.l1[urw].l2[itc zapfdingbats]' not found."
# remove parent node (array element) and then check whether the child is gone, too:
(
set -o errexit
unset 'mytree_global1.l1[urw].l2[itc zapfdingbats]'
! [[ -v 'mytree_global1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' ]]
- ) || err_exit "Global: Parent node removed (array element), child still exists"
+ ) || err_exit "Global: Parent node removed (array element), child still exists"
(
set -o errexit
unset 'mytree_local1.l1[urw].l2[itc zapfdingbats]'
! [[ -v 'mytree_local1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' ]]
- ) || err_exit "Local: Parent node removed (array element), child still exists"
-
+ ) || err_exit "Local: Parent node removed (array element), child still exists"
+
# remove parent node (array variable) and then check whether the child is gone, too:
(
set -o errexit
unset 'mytree_local1.l1[urw].l2'
! [[ -v 'mytree_local1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' ]]
- ) || err_exit "Global: Parent node removed (array variable), child still exists"
+ ) || err_exit "Global: Parent node removed (array variable), child still exists"
(
set -o errexit
unset 'mytree_local1.l1[urw].l2'
! [[ -v 'mytree_local1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' ]]
- ) || err_exit "Local: Parent node removed (array variable), child still exists"
+ ) || err_exit "Local: Parent node removed (array variable), child still exists"
#### test "unset" and compare trees
[[ -v 'mytree_global1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' ]] ; res=$?
unset 'mytree_global1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]'
(( res == 0 )) ||
- err_exit "Variable 'mytree_global1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' not found."
-
+ err_exit "Variable 'mytree_global1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' not found."
+
[[ "${mytree_global1}" != "${mytree_local1}" ]] || err_exit "mytree_global1 and mytree_local1 should differ"
[[ -v 'mytree_local1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' ]] ; res=$?
unset 'mytree_local1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]'
(( res == 0 )) ||
- err_exit "Variable 'mytree_local1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' not found."
-
+ err_exit "Variable 'mytree_local1.l1[urw].l2[itc zapfdingbats].l3[medium].entries[abcd].filenames[0]' not found."
+
# Compare trees (after "unset")
if [[ "${mytree_global1}" != "${mytree_local1}" ]] ; then
err_exit "Compound trees 'mytree_local1' and 'mytree_global1' not identical after unset"
diff -u <( printf "%s\n" "${mytree_global1}" ) <( printf "%s\n" "${mytree_local1}" )
- fi
+ fi
}
main
diff --git a/usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree003.sh
index 834234a44c..5255f09c7d 100644
--- a/usr/src/lib/libshell/common/tests/sun_solaris_vartree003.sh
+++ b/usr/src/cmd/ast/libshell/common/tests/sun_solaris_vartree003.sh
@@ -160,12 +160,12 @@ EOF
function main
{
set -o errexit
-
+
typeset xlfd_tree=()
typeset -A xlfd_tree.l1
-
+
eval "xlfd_tree=$( example_tree )"
-
+
typeset i j k l fn
# filter chain begin
@@ -173,10 +173,10 @@ function main
for j in "${!xlfd_tree.l1["$i"].l2[@]}" ; do
for k in "${!xlfd_tree.l1["$i"].l2["$j"].l3[@]}" ; do
nameref vndnode=xlfd_tree.l1["$i"].l2["$j"].l3["$k"]
-
+
for l in "${!vndnode.entries[@]}" ; do
nameref node=vndnode.entries["$l"]
-
+
for fn in "${node.filenames[@]}" ; do
if [[ "${fn}" != ~(E)x-re_gate_XW_NV_MWS ]] ; then
unset "${!node}"
diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/acct b/usr/src/cmd/ast/libshell/i386/FEATURE/acct
new file mode 100644
index 0000000000..716d3af544
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/acct
@@ -0,0 +1,8 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_acct_i386
+#define _def_acct_i386 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _dat_acct 1 /* acct in default lib(s) */
+#define _lib_acct 1 /* acct() in default lib(s) */
+#define _sys_acct 1 /* #include <sys/acct.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/cmds b/usr/src/cmd/ast/libshell/i386/FEATURE/cmds
new file mode 100644
index 0000000000..9c8159bf36
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/cmds
@@ -0,0 +1,22 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/cmds by iffe version 2012-07-17 : : */
+#ifndef _def_cmds_ksh93
+#define _def_cmds_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _cmd_newgrp 1
+#define _usr_bin_newgrp 1
+#define _cmd_test 1
+#define _usr_bin_test 1
+#define _cmd_id 1
+#define _usr_bin_id 1
+#define _cmd_wc 1
+#define _usr_bin_wc 1
+#define _cmd_cut 1
+#define _usr_bin_cut 1
+#define _cmd_logname 1
+#define _usr_bin_logname 1
+#define _cmd_pfexec 1
+#define _usr_bin_pfexec 1
+#define _cmd_tput 1
+#define _usr_bin_tput 1
+#define _pth_ed "/usr/bin/ed"
+#endif
diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/dynamic b/usr/src/cmd/ast/libshell/i386/FEATURE/dynamic
new file mode 100644
index 0000000000..96c308357b
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/dynamic
@@ -0,0 +1,16 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/dynamic by iffe version 2012-07-17 : : */
+#ifndef _def_dynamic_ksh93
+#define _def_dynamic_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#if SHOPT_DYNAMIC
+#include <dlldefs.h>
+#endif
+#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
+# define SHOPT_FS_3D 1
+#endif /* !SHOPT_FS_3D */
+#if SHOPT_FS_3D
+# undef mount
+# include <fs3d.h>
+#endif /* SHOPT_FS_3D */
+
+#endif
diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/execargs b/usr/src/cmd/ast/libshell/i386/FEATURE/execargs
new file mode 100644
index 0000000000..8e37978257
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/execargs
@@ -0,0 +1,5 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_execargs_i386
+#define _def_execargs_i386 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs b/usr/src/cmd/ast/libshell/i386/FEATURE/externs
index 87d724ff31..8828c30ba8 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/externs
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/externs
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/externs by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/cmd/ksh93/features/externs by iffe version 2012-07-17 : : */
+
#ifndef _def_externs_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,12 +63,6 @@
#define _def_externs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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 */
#define _hdr_math 1 /* #include <math.h> ok */
#define _mem_name_exception 1 /* name is a member of struct exception */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale b/usr/src/cmd/ast/libshell/i386/FEATURE/locale
index 58f37b7293..6b5aba0a08 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/locale
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/locale
@@ -1,19 +1,22 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/locale by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/locale by iffe version 2012-07-17 : : */
#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_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_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 */
#define _hdr_wchar 1 /* #include <wchar.h> ok */
+#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _lib_localeconv 1 /* localeconv() in default lib(s) */
#define _lib_wctype 1 /* wctype() in default lib(s) */
#define _lib_iswctype 1 /* iswctype() in default lib(s) */
#define _lib_iswblank 1 /* iswblank() in default lib(s) */
+#define _lib_wctrans 1 /* wctrans() in default lib(s) */
+#define _lib_towctrans 1 /* towctrans() in default lib(s) */
+#define _hdr_time 1 /* #include <time.h> ok */
+#define _sys_time 1 /* #include <sys/time.h> ok */
+#define _sys_times 1 /* #include <sys/times.h> ok */
+#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _typ_wctrans_t 1 /* wctrans_t is a type */
#if _PACKAGE_ast
# undef _hdr_locale
# define _hdr_locale 1
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math b/usr/src/cmd/ast/libshell/i386/FEATURE/math
index d425e09207..b86d8d56ac 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/math
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/math.sh by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/math.sh by iffe version 2012-07-17 : : */
#ifndef _def_math_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,24 +62,18 @@
#define _def_math_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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_20100309/build_i386_32bit/src/cmd/ksh93/data/math.tab : : */
+
+/* : : generated by cmd/ast/tools/iffe from contrib/ast/src/cmd/ksh93/data/math.tab : : */
typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
-#include <ast_standards.h>
#include <math.h>
#include <ieeefp.h>
static Sfdouble_t local_finite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return finite(a1);}
static int local_fpclassify __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclassify(a1);}
+static int local_fpclass __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclass(a1);}
static int local_isfinite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isfinite(a1);}
static int local_isgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreater(a1,a2);}
static int local_isgreaterequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreaterequal(a1,a2);}
@@ -88,13 +82,9 @@ static int local_isless __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTO
static int local_islessequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessequal(a1,a2);}
static int local_islessgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessgreater(a1,a2);}
static int local_isnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isnormal(a1);}
-#ifdef FP_SUBNORMAL
-static int local_issubnormal __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_SUBNORMAL; }
-#endif
+static int local_issubnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_SUBNORMAL; }
static int local_isunordered __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isunordered(a1,a2);}
-#ifdef FP_ZERO
-static int local_iszero __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_ZERO; }
-#endif
+static int local_iszero __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_ZERO; }
static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return signbit(a1);}
/*
@@ -103,35 +93,36 @@ static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a
*/
const struct mathtab shtab_math[] =
{
- "\001acos", (Math_f)acosl,
- "\001acosh", (Math_f)acoshl,
- "\001asin", (Math_f)asinl,
- "\001asinh", (Math_f)asinhl,
- "\001atan", (Math_f)atanl,
- "\002atan2", (Math_f)atan2l,
- "\001atanh", (Math_f)atanhl,
- "\001cbrt", (Math_f)cbrtl,
- "\001ceil", (Math_f)ceill,
- "\002copysign", (Math_f)copysignl,
- "\001cos", (Math_f)cosl,
- "\001cosh", (Math_f)coshl,
- "\001erf", (Math_f)erfl,
- "\001erfc", (Math_f)erfcl,
- "\001exp", (Math_f)expl,
- "\001exp2", (Math_f)exp2l,
- "\001expm1", (Math_f)expm1l,
- "\001fabs", (Math_f)fabsl,
- "\001abs", (Math_f)fabsl,
- "\002fdim", (Math_f)fdiml,
- "\001finite", (Math_f)local_finite,
- "\001floor", (Math_f)floorl,
- "\001int", (Math_f)floorl,
- "\003fma", (Math_f)fmal,
- "\002fmax", (Math_f)fmaxl,
- "\002fmin", (Math_f)fminl,
- "\002fmod", (Math_f)fmodl,
+ "\001acos", (Math_f)(uintptr_t)acosl,
+ "\001acosh", (Math_f)(uintptr_t)acoshl,
+ "\001asin", (Math_f)(uintptr_t)asinl,
+ "\001asinh", (Math_f)(uintptr_t)asinhl,
+ "\001atan", (Math_f)(uintptr_t)atanl,
+ "\002atan2", (Math_f)(uintptr_t)atan2l,
+ "\001atanh", (Math_f)(uintptr_t)atanhl,
+ "\001cbrt", (Math_f)(uintptr_t)cbrtl,
+ "\001ceil", (Math_f)(uintptr_t)ceill,
+ "\002copysign", (Math_f)(uintptr_t)copysignl,
+ "\001cos", (Math_f)(uintptr_t)cosl,
+ "\001cosh", (Math_f)(uintptr_t)coshl,
+ "\001erf", (Math_f)(uintptr_t)erfl,
+ "\001erfc", (Math_f)(uintptr_t)erfcl,
+ "\001exp", (Math_f)(uintptr_t)expl,
+ "\001exp2", (Math_f)(uintptr_t)exp2l,
+ "\001expm1", (Math_f)(uintptr_t)expm1l,
+ "\001fabs", (Math_f)(uintptr_t)fabsl,
+ "\001abs", (Math_f)(uintptr_t)fabsl,
+ "\002fdim", (Math_f)(uintptr_t)fdiml,
+ "\001finite", (Math_f)(uintptr_t)local_finite,
+ "\001floor", (Math_f)(uintptr_t)floorl,
+ "\001int", (Math_f)(uintptr_t)floorl,
+ "\003fma", (Math_f)(uintptr_t)fmal,
+ "\002fmax", (Math_f)(uintptr_t)fmaxl,
+ "\002fmin", (Math_f)(uintptr_t)fminl,
+ "\002fmod", (Math_f)(uintptr_t)fmodl,
"\011fpclassify", (Math_f)(uintptr_t)local_fpclassify,
- "\002hypot", (Math_f)hypotl,
+ "\011fpclass", (Math_f)(uintptr_t)local_fpclass,
+ "\002hypot", (Math_f)(uintptr_t)hypotl,
"\011ilogb", (Math_f)(uintptr_t)ilogbl,
"\011isfinite", (Math_f)(uintptr_t)local_isfinite,
"\012isgreater", (Math_f)(uintptr_t)local_isgreater,
@@ -142,41 +133,38 @@ const struct mathtab shtab_math[] =
"\012islessgreater", (Math_f)(uintptr_t)local_islessgreater,
"\011isnan", (Math_f)(uintptr_t)isnanl,
"\011isnormal", (Math_f)(uintptr_t)local_isnormal,
-#ifdef FP_SUBNORMAL
"\011issubnormal", (Math_f)(uintptr_t)local_issubnormal,
-#endif
"\012isunordered", (Math_f)(uintptr_t)local_isunordered,
-#ifdef FP_ZERO
"\011iszero", (Math_f)(uintptr_t)local_iszero,
-#endif
- "\001j0", (Math_f)j0l,
- "\001j1", (Math_f)j1l,
+ "\001j0", (Math_f)(uintptr_t)j0l,
+ "\001j1", (Math_f)(uintptr_t)j1l,
"\002jn", (Math_f)(uintptr_t)jnl,
- "\001lgamma", (Math_f)lgammal,
- "\001log", (Math_f)logl,
- "\001log10", (Math_f)log10l,
- "\001log1p", (Math_f)log1pl,
- "\001log2", (Math_f)log2l,
- "\001logb", (Math_f)logbl,
- "\001nearbyint", (Math_f)nearbyintl,
- "\002nextafter", (Math_f)nextafterl,
- "\002nexttoward", (Math_f)nexttowardl,
- "\002pow", (Math_f)powl,
- "\002remainder", (Math_f)remainderl,
- "\001rint", (Math_f)rintl,
- "\001round", (Math_f)roundl,
- "\002scalb", (Math_f)scalbl,
- "\002scalbn", (Math_f)scalbnl,
+ "\042ldexp", (Math_f)(uintptr_t)ldexpl,
+ "\001lgamma", (Math_f)(uintptr_t)lgammal,
+ "\001log", (Math_f)(uintptr_t)logl,
+ "\001log10", (Math_f)(uintptr_t)log10l,
+ "\001log1p", (Math_f)(uintptr_t)log1pl,
+ "\001log2", (Math_f)(uintptr_t)log2l,
+ "\001logb", (Math_f)(uintptr_t)logbl,
+ "\001nearbyint", (Math_f)(uintptr_t)nearbyintl,
+ "\002nextafter", (Math_f)(uintptr_t)nextafterl,
+ "\002nexttoward", (Math_f)(uintptr_t)nexttowardl,
+ "\002pow", (Math_f)(uintptr_t)powl,
+ "\002remainder", (Math_f)(uintptr_t)remainderl,
+ "\001rint", (Math_f)(uintptr_t)rintl,
+ "\001round", (Math_f)(uintptr_t)roundl,
+ "\002scalb", (Math_f)(uintptr_t)scalbl,
+ "\002scalbn", (Math_f)(uintptr_t)scalbnl,
"\011signbit", (Math_f)(uintptr_t)local_signbit,
- "\001sin", (Math_f)sinl,
- "\001sinh", (Math_f)sinhl,
- "\001sqrt", (Math_f)sqrtl,
- "\001tan", (Math_f)tanl,
- "\001tanh", (Math_f)tanhl,
- "\001tgamma", (Math_f)tgammal,
- "\001trunc", (Math_f)truncl,
- "\001y0", (Math_f)y0l,
- "\001y1", (Math_f)y1l,
+ "\001sin", (Math_f)(uintptr_t)sinl,
+ "\001sinh", (Math_f)(uintptr_t)sinhl,
+ "\001sqrt", (Math_f)(uintptr_t)sqrtl,
+ "\001tan", (Math_f)(uintptr_t)tanl,
+ "\001tanh", (Math_f)(uintptr_t)tanhl,
+ "\001tgamma", (Math_f)(uintptr_t)tgammal,
+ "\001trunc", (Math_f)(uintptr_t)truncl,
+ "\001y0", (Math_f)(uintptr_t)y0l,
+ "\001y1", (Math_f)(uintptr_t)y1l,
"\002yn", (Math_f)(uintptr_t)ynl,
"", (Math_f)0
};
diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/options b/usr/src/cmd/ast/libshell/i386/FEATURE/options
new file mode 100644
index 0000000000..24978488cd
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/options
@@ -0,0 +1,21 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/options by iffe version 2012-07-17 : : */
+#ifndef _def_options_ksh93
+#define _def_options_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define SHELLMAGIC 1
+#ifndef SHOPT_DEVFD
+# define SHOPT_DEVFD 1
+#endif
+#ifndef SHOPT_PFSH
+# define SHOPT_PFSH 1
+#endif
+#undef SHOPT_TEST_L
+#ifndef SHOPT_SYSRC
+# define SHOPT_SYSRC 1
+#endif
+#undef SHOPT_UCB
+#if !_PACKAGE_ast && ( (MB_LEN_MAX-1)<=0 || !defined(_lib_mbtowc) )
+# undef SHOPT_MULTIBYTE
+#endif
+
+#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll b/usr/src/cmd/ast/libshell/i386/FEATURE/poll
index b964d0401a..c76d76c633 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/poll
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/poll
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/poll by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/poll by iffe version 2012-07-17 : : */
#ifndef _def_poll_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,12 +62,8 @@
#define _def_poll_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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_socket 1 /* -lsocket is a library */
#define _hdr_poll 1 /* #include <poll.h> ok */
#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
#define _sys_poll 1 /* #include <sys/poll.h> ok */
@@ -86,8 +82,9 @@
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
#define _sys_select 1 /* #include <sys/select.h> ok */
#define _typ_fd_set 1 /* fd_set is a type */
-#define _socketpair_devfd 1 /* /dev/fd/N handles socketpair() */
-
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _typ_socklen_t 1 /* socklen_t is a type */
+
#ifdef _lib_poll
# define poll _SYS_poll
#else
diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/pstat b/usr/src/cmd/ast/libshell/i386/FEATURE/pstat
new file mode 100644
index 0000000000..88b37cf9fc
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/pstat
@@ -0,0 +1,5 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_pstat_i386
+#define _def_pstat_i386 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/rlimits b/usr/src/cmd/ast/libshell/i386/FEATURE/rlimits
new file mode 100644
index 0000000000..1e60399571
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/rlimits
@@ -0,0 +1,38 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/rlimits by iffe version 2012-07-17 : : */
+#ifndef _def_rlimits_ksh93
+#define _def_rlimits_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _sys_time 1 /* #include <sys/time.h> ok */
+#define _sys_resource 1 /* #include <sys/resource.h> ok */
+#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
+#define _lib_getrlimit64 1 /* getrlimit64() in default lib(s) */
+#define _lib_ulimit 1 /* ulimit() in default lib(s) */
+#define _hdr_time 1 /* #include <time.h> ok */
+#define _sys_times 1 /* #include <sys/times.h> ok */
+#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _typ_rlim_t 1 /* rlim_t is a type */
+#define _typ_rlim64_t 1 /* rlim64_t is a type */
+
+#if _sys_resource
+# include <sys/resource.h>
+# if _lib_getrlimit64
+# undef getrlimit
+# define getrlimit getrlimit64
+# undef setrlimit
+# define setrlimit setrlimit64
+# if _typ_rlim64_t
+# undef rlimit
+# define rlimit rlimit64
+# undef rlim_t
+# define rlim_t rlim64_t
+# endif
+# ifdef RLIM64_INFINITY
+# undef RLIM_INFINITY
+# define RLIM_INFINITY RLIM64_INFINITY
+# endif
+# endif
+#endif
+
+
+#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp b/usr/src/cmd/ast/libshell/i386/FEATURE/setjmp
index 52ddecf760..2e57e9cd18 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/setjmp
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/setjmp
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/setjmp by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/setjmp by iffe version 2012-07-17 : : */
#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_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_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) */
#define _lib__setjmp 1 /* _setjmp() in default lib(s) */
#define _lib__longjmp 1 /* _longjmp() in default lib(s) */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures b/usr/src/cmd/ast/libshell/i386/FEATURE/sigfeatures
index 25b4198fd1..39231bc866 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/sigfeatures
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/sigfeatures
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/sigfeatures by iffe version 2012-07-17 : : */
#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_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_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) */
#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
#define _hdr_time 1 /* #include <time.h> ok */
@@ -15,7 +9,6 @@
#define _sys_times 1 /* #include <sys/times.h> ok */
#define _hdr_stddef 1 /* #include <stddef.h> ok */
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_ast 1 /* #include <ast.h> ok */
#define _hdr_signal 1 /* #include <signal.h> ok */
#define _typ_sigset_t 1 /* sigset_t is a type */
#ifndef _mem_sigvec_sv_mask
@@ -49,7 +42,7 @@
#endif /* _lib_sigprocmask */
#undef _SIGRTMIN
-#define _SIGRTMIN 41
+#define _SIGRTMIN 42
#undef _SIGRTMAX
-#define _SIGRTMAX 48
+#define _SIGRTMAX 73
#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time b/usr/src/cmd/ast/libshell/i386/FEATURE/time
index 2c56a3523c..0e1c2627b6 100644
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/time
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/time
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/cmd/ksh93/features/time by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/time by iffe version 2012-07-17 : : */
#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_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_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 */
#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */
#define _lib_setitimer 1 /* setitimer() in default lib(s) */
diff --git a/usr/src/cmd/ast/libshell/i386/FEATURE/ttys b/usr/src/cmd/ast/libshell/i386/FEATURE/ttys
new file mode 100644
index 0000000000..f9748cf4c3
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/FEATURE/ttys
@@ -0,0 +1,14 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/ttys by iffe version 2012-07-17 : : */
+#ifndef _def_ttys_ksh93
+#define _def_ttys_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_termios 1 /* #include <termios.h> ok */
+#define _hdr_termio 1 /* #include <termio.h> ok */
+#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
+#define _sys_termios 1 /* #include <sys/termios.h> ok */
+#define _sys_termio 1 /* #include <sys/termio.h> ok */
+#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
+#define _sys_filio 1 /* #include <sys/filio.h> ok */
+#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
+#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
+#endif
diff --git a/usr/src/lib/libshell/i386/Makefile b/usr/src/cmd/ast/libshell/i386/Makefile
index 6c35d1fc88..6c35d1fc88 100644
--- a/usr/src/lib/libshell/i386/Makefile
+++ b/usr/src/cmd/ast/libshell/i386/Makefile
diff --git a/usr/src/cmd/ast/libshell/i386/Makefile.iffe b/usr/src/cmd/ast/libshell/i386/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/i386/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/lib/libshell/mapfile-vers b/usr/src/cmd/ast/libshell/mapfile-vers
index 4120084852..de5e85d7c1 100644
--- a/usr/src/lib/libshell/mapfile-vers
+++ b/usr/src/cmd/ast/libshell/mapfile-vers
@@ -21,6 +21,7 @@
#
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
#
@@ -41,83 +42,84 @@ $mapfile_version 2
SYMBOL_VERSION SUNWprivate_1.1 {
global:
+ plugin_version;
+
+ sh_access;
+ sh_addbuiltin;
sh_bltin_tree;
- sh_subfork;
- sh_init;
- sh_reinit;
- sh_eval;
+ sh_close;
sh_delay;
- sh_parse;
- sh_tdump;
- sh_trap;
+ sh_dup;
+ sh_eval;
+ sh_exec;
+ sh_exit;
+ sh_fcntl;
+ sh_fmtq;
+ sh_fmtqf;
sh_fun;
sh_funscope;
+ sh_getinterp;
+ sh_getscope;
+ sh_init;
sh_iogetiop;
+ sh_isoption;
sh_main;
sh_menu;
- sh_addbuiltin;
- sh_fmtq;
- sh_fmtqf;
- sh_strnum;
- sh_access;
- sh_close;
- sh_dup;
- sh_exit;
- sh_fcntl;
- sh_getinterp;
+ sh_offoption;
+ sh_onoption;
sh_open;
+ sh_parse;
sh_pathopen;
+ sh_pipe;
sh_read;
- sh_write;
+ sh_reinit;
sh_seek;
- sh_pipe;
- sh_waitnotify;
- sh_getscope;
sh_setscope;
sh_sigcheck;
- sh_isoption;
- sh_onoption;
- sh_offoption;
+ sh_strnum;
+ sh_subfork;
+ sh_tdump;
+ sh_trap;
+ sh_waitnotify;
sh_waitsafe;
- sh_exec;
- sh_getliblist;
-
- nv_setarray;
- nv_associative;
- nv_aindex;
- nv_nextsub;
- nv_getsub;
- nv_putsub;
- nv_opensub;
+ sh_write;
+
nv_adddisc;
+ nv_aindex;
+ nv_associative;
nv_clone;
nv_close;
nv_context;
nv_create;
nv_dict;
+ nv_disc;
+ nv_discfun;
nv_getn;
nv_getnum;
+ nv_getsub;
nv_getv;
nv_getval;
nv_hasdisc;
nv_isnull;
nv_lastdict;
+ nv_name;
nv_newattr;
+ nv_nextsub;
nv_open;
- nv_putval;
+ nv_opensub;
+ nv_putsub;
nv_putv;
+ nv_putval;
nv_scan;
+ nv_search;
+ nv_setarray;
nv_setdisc;
nv_setref;
+ nv_setsize;
nv_settype;
nv_setvec;
nv_setvtree;
- nv_setsize;
- nv_disc;
nv_unset;
- nv_search;
- nv_name;
- nv_discfun;
# semi-private, needed for shcomp
sh;
@@ -177,7 +179,7 @@ SYMBOL_VERSION SUNWprivate_1.1 {
b_unset;
b_vpath;
b_wait;
- b_whence;
+ b_whence;
local:
*;
};
diff --git a/usr/src/lib/libshell/misc/images/callouts/1.png b/usr/src/cmd/ast/libshell/misc/images/callouts/1.png
index 608fad3596..608fad3596 100644
--- a/usr/src/lib/libshell/misc/images/callouts/1.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/1.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/10.png b/usr/src/cmd/ast/libshell/misc/images/callouts/10.png
index 39e55197cf..39e55197cf 100644
--- a/usr/src/lib/libshell/misc/images/callouts/10.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/10.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/2.png b/usr/src/cmd/ast/libshell/misc/images/callouts/2.png
index 5444738841..5444738841 100644
--- a/usr/src/lib/libshell/misc/images/callouts/2.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/2.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/3.png b/usr/src/cmd/ast/libshell/misc/images/callouts/3.png
index 64b87c7151..64b87c7151 100644
--- a/usr/src/lib/libshell/misc/images/callouts/3.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/3.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/4.png b/usr/src/cmd/ast/libshell/misc/images/callouts/4.png
index c308193ac4..c308193ac4 100644
--- a/usr/src/lib/libshell/misc/images/callouts/4.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/4.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/5.png b/usr/src/cmd/ast/libshell/misc/images/callouts/5.png
index 24799f0a43..24799f0a43 100644
--- a/usr/src/lib/libshell/misc/images/callouts/5.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/5.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/6.png b/usr/src/cmd/ast/libshell/misc/images/callouts/6.png
index 8919a670cd..8919a670cd 100644
--- a/usr/src/lib/libshell/misc/images/callouts/6.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/6.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/7.png b/usr/src/cmd/ast/libshell/misc/images/callouts/7.png
index e30e8a70cb..e30e8a70cb 100644
--- a/usr/src/lib/libshell/misc/images/callouts/7.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/7.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/8.png b/usr/src/cmd/ast/libshell/misc/images/callouts/8.png
index 3e35c8827c..3e35c8827c 100644
--- a/usr/src/lib/libshell/misc/images/callouts/8.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/8.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/callouts/9.png b/usr/src/cmd/ast/libshell/misc/images/callouts/9.png
index ed2f14b4eb..ed2f14b4eb 100644
--- a/usr/src/lib/libshell/misc/images/callouts/9.png
+++ b/usr/src/cmd/ast/libshell/misc/images/callouts/9.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/tag_bourne.png b/usr/src/cmd/ast/libshell/misc/images/tag_bourne.png
index f1f78e3a25..f1f78e3a25 100644
--- a/usr/src/lib/libshell/misc/images/tag_bourne.png
+++ b/usr/src/cmd/ast/libshell/misc/images/tag_bourne.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/tag_i18n.png b/usr/src/cmd/ast/libshell/misc/images/tag_i18n.png
index 559929df2a..559929df2a 100644
--- a/usr/src/lib/libshell/misc/images/tag_i18n.png
+++ b/usr/src/cmd/ast/libshell/misc/images/tag_i18n.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/tag_ksh.png b/usr/src/cmd/ast/libshell/misc/images/tag_ksh.png
index b33d5a7aa1..b33d5a7aa1 100644
--- a/usr/src/lib/libshell/misc/images/tag_ksh.png
+++ b/usr/src/cmd/ast/libshell/misc/images/tag_ksh.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/tag_ksh88.png b/usr/src/cmd/ast/libshell/misc/images/tag_ksh88.png
index d36dc0f5f5..d36dc0f5f5 100644
--- a/usr/src/lib/libshell/misc/images/tag_ksh88.png
+++ b/usr/src/cmd/ast/libshell/misc/images/tag_ksh88.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/tag_ksh93.png b/usr/src/cmd/ast/libshell/misc/images/tag_ksh93.png
index 357ee3c50a..357ee3c50a 100644
--- a/usr/src/lib/libshell/misc/images/tag_ksh93.png
+++ b/usr/src/cmd/ast/libshell/misc/images/tag_ksh93.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/tag_l10n.png b/usr/src/cmd/ast/libshell/misc/images/tag_l10n.png
index be89f7a163..be89f7a163 100644
--- a/usr/src/lib/libshell/misc/images/tag_l10n.png
+++ b/usr/src/cmd/ast/libshell/misc/images/tag_l10n.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/images/tag_perf.png b/usr/src/cmd/ast/libshell/misc/images/tag_perf.png
index fcb2960852..fcb2960852 100644
--- a/usr/src/lib/libshell/misc/images/tag_perf.png
+++ b/usr/src/cmd/ast/libshell/misc/images/tag_perf.png
Binary files differ
diff --git a/usr/src/lib/libshell/misc/shell_styleguide.docbook b/usr/src/cmd/ast/libshell/misc/shell_styleguide.docbook
index 74bc7501b5..74bc7501b5 100644
--- a/usr/src/lib/libshell/misc/shell_styleguide.docbook
+++ b/usr/src/cmd/ast/libshell/misc/shell_styleguide.docbook
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/acct b/usr/src/cmd/ast/libshell/sparc/FEATURE/acct
new file mode 100644
index 0000000000..d3859cc147
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/acct
@@ -0,0 +1,8 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_acct_sparc
+#define _def_acct_sparc 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _dat_acct 1 /* acct in default lib(s) */
+#define _lib_acct 1 /* acct() in default lib(s) */
+#define _sys_acct 1 /* #include <sys/acct.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/cmds b/usr/src/cmd/ast/libshell/sparc/FEATURE/cmds
new file mode 100644
index 0000000000..9c8159bf36
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/cmds
@@ -0,0 +1,22 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/cmds by iffe version 2012-07-17 : : */
+#ifndef _def_cmds_ksh93
+#define _def_cmds_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _cmd_newgrp 1
+#define _usr_bin_newgrp 1
+#define _cmd_test 1
+#define _usr_bin_test 1
+#define _cmd_id 1
+#define _usr_bin_id 1
+#define _cmd_wc 1
+#define _usr_bin_wc 1
+#define _cmd_cut 1
+#define _usr_bin_cut 1
+#define _cmd_logname 1
+#define _usr_bin_logname 1
+#define _cmd_pfexec 1
+#define _usr_bin_pfexec 1
+#define _cmd_tput 1
+#define _usr_bin_tput 1
+#define _pth_ed "/usr/bin/ed"
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/dynamic b/usr/src/cmd/ast/libshell/sparc/FEATURE/dynamic
new file mode 100644
index 0000000000..96c308357b
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/dynamic
@@ -0,0 +1,16 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/dynamic by iffe version 2012-07-17 : : */
+#ifndef _def_dynamic_ksh93
+#define _def_dynamic_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#if SHOPT_DYNAMIC
+#include <dlldefs.h>
+#endif
+#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
+# define SHOPT_FS_3D 1
+#endif /* !SHOPT_FS_3D */
+#if SHOPT_FS_3D
+# undef mount
+# include <fs3d.h>
+#endif /* SHOPT_FS_3D */
+
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/execargs b/usr/src/cmd/ast/libshell/sparc/FEATURE/execargs
new file mode 100644
index 0000000000..cd7ec05f25
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/execargs
@@ -0,0 +1,5 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_execargs_sparc
+#define _def_execargs_sparc 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs b/usr/src/cmd/ast/libshell/sparc/FEATURE/externs
index 227e9c3448..8828c30ba8 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/externs
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/externs
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/externs by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/cmd/ksh93/features/externs by iffe version 2012-07-17 : : */
+
#ifndef _def_externs_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,12 +63,6 @@
#define _def_externs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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 */
#define _hdr_math 1 /* #include <math.h> ok */
#define _mem_name_exception 1 /* name is a member of struct exception */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale b/usr/src/cmd/ast/libshell/sparc/FEATURE/locale
index d72fc310ef..6b5aba0a08 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/locale
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/locale
@@ -1,19 +1,22 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/locale by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/locale by iffe version 2012-07-17 : : */
#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_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_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 */
#define _hdr_wchar 1 /* #include <wchar.h> ok */
+#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _lib_localeconv 1 /* localeconv() in default lib(s) */
#define _lib_wctype 1 /* wctype() in default lib(s) */
#define _lib_iswctype 1 /* iswctype() in default lib(s) */
#define _lib_iswblank 1 /* iswblank() in default lib(s) */
+#define _lib_wctrans 1 /* wctrans() in default lib(s) */
+#define _lib_towctrans 1 /* towctrans() in default lib(s) */
+#define _hdr_time 1 /* #include <time.h> ok */
+#define _sys_time 1 /* #include <sys/time.h> ok */
+#define _sys_times 1 /* #include <sys/times.h> ok */
+#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _typ_wctrans_t 1 /* wctrans_t is a type */
#if _PACKAGE_ast
# undef _hdr_locale
# define _hdr_locale 1
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/math b/usr/src/cmd/ast/libshell/sparc/FEATURE/math
new file mode 100644
index 0000000000..b86d8d56ac
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/math
@@ -0,0 +1,171 @@
+
+/* : : generated by proto : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/math.sh by iffe version 2012-07-17 : : */
+#ifndef _def_math_ksh93
+#if !defined(__PROTO__)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
+# if defined(__cplusplus)
+# define __LINKAGE__ "C"
+# else
+# define __LINKAGE__
+# endif
+# define __STDARG__
+# define __PROTO__(x) x
+# define __OTORP__(x)
+# define __PARAM__(n,o) n
+# if !defined(__STDC__) && !defined(__cplusplus)
+# if !defined(c_plusplus)
+# define const
+# endif
+# define signed
+# define void int
+# define volatile
+# define __V_ char
+# else
+# define __V_ void
+# endif
+# else
+# define __PROTO__(x) ()
+# define __OTORP__(x) x
+# define __PARAM__(n,o) o
+# define __LINKAGE__
+# define __V_ char
+# define const
+# define signed
+# define void int
+# define volatile
+# endif
+# define __MANGLE__ __LINKAGE__
+# if defined(__cplusplus) || defined(c_plusplus)
+# define __VARARG__ ...
+# else
+# define __VARARG__
+# endif
+# if defined(__STDARG__)
+# define __VA_START__(p,a) va_start(p,a)
+# else
+# define __VA_START__(p,a) va_start(p)
+# endif
+# if !defined(__INLINE__)
+# if defined(__cplusplus)
+# define __INLINE__ extern __MANGLE__ inline
+# else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define __INLINE__ __inline
+# endif
+# endif
+# endif
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+
+#define _def_math_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+
+
+/* : : generated by cmd/ast/tools/iffe from contrib/ast/src/cmd/ksh93/data/math.tab : : */
+
+typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
+
+#include <math.h>
+#include <ieeefp.h>
+
+static Sfdouble_t local_finite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return finite(a1);}
+static int local_fpclassify __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclassify(a1);}
+static int local_fpclass __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclass(a1);}
+static int local_isfinite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isfinite(a1);}
+static int local_isgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreater(a1,a2);}
+static int local_isgreaterequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreaterequal(a1,a2);}
+static int local_isinf __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isinf(a1);}
+static int local_isless __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isless(a1,a2);}
+static int local_islessequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessequal(a1,a2);}
+static int local_islessgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessgreater(a1,a2);}
+static int local_isnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isnormal(a1);}
+static int local_issubnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_SUBNORMAL; }
+static int local_isunordered __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isunordered(a1,a2);}
+static int local_iszero __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_ZERO; }
+static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return signbit(a1);}
+
+/*
+ * first byte is two-digit octal number. Last digit is number of args
+ * first digit is 0 if return value is double, 1 for integer
+ */
+const struct mathtab shtab_math[] =
+{
+ "\001acos", (Math_f)(uintptr_t)acosl,
+ "\001acosh", (Math_f)(uintptr_t)acoshl,
+ "\001asin", (Math_f)(uintptr_t)asinl,
+ "\001asinh", (Math_f)(uintptr_t)asinhl,
+ "\001atan", (Math_f)(uintptr_t)atanl,
+ "\002atan2", (Math_f)(uintptr_t)atan2l,
+ "\001atanh", (Math_f)(uintptr_t)atanhl,
+ "\001cbrt", (Math_f)(uintptr_t)cbrtl,
+ "\001ceil", (Math_f)(uintptr_t)ceill,
+ "\002copysign", (Math_f)(uintptr_t)copysignl,
+ "\001cos", (Math_f)(uintptr_t)cosl,
+ "\001cosh", (Math_f)(uintptr_t)coshl,
+ "\001erf", (Math_f)(uintptr_t)erfl,
+ "\001erfc", (Math_f)(uintptr_t)erfcl,
+ "\001exp", (Math_f)(uintptr_t)expl,
+ "\001exp2", (Math_f)(uintptr_t)exp2l,
+ "\001expm1", (Math_f)(uintptr_t)expm1l,
+ "\001fabs", (Math_f)(uintptr_t)fabsl,
+ "\001abs", (Math_f)(uintptr_t)fabsl,
+ "\002fdim", (Math_f)(uintptr_t)fdiml,
+ "\001finite", (Math_f)(uintptr_t)local_finite,
+ "\001floor", (Math_f)(uintptr_t)floorl,
+ "\001int", (Math_f)(uintptr_t)floorl,
+ "\003fma", (Math_f)(uintptr_t)fmal,
+ "\002fmax", (Math_f)(uintptr_t)fmaxl,
+ "\002fmin", (Math_f)(uintptr_t)fminl,
+ "\002fmod", (Math_f)(uintptr_t)fmodl,
+ "\011fpclassify", (Math_f)(uintptr_t)local_fpclassify,
+ "\011fpclass", (Math_f)(uintptr_t)local_fpclass,
+ "\002hypot", (Math_f)(uintptr_t)hypotl,
+ "\011ilogb", (Math_f)(uintptr_t)ilogbl,
+ "\011isfinite", (Math_f)(uintptr_t)local_isfinite,
+ "\012isgreater", (Math_f)(uintptr_t)local_isgreater,
+ "\012isgreaterequal", (Math_f)(uintptr_t)local_isgreaterequal,
+ "\011isinf", (Math_f)(uintptr_t)local_isinf,
+ "\012isless", (Math_f)(uintptr_t)local_isless,
+ "\012islessequal", (Math_f)(uintptr_t)local_islessequal,
+ "\012islessgreater", (Math_f)(uintptr_t)local_islessgreater,
+ "\011isnan", (Math_f)(uintptr_t)isnanl,
+ "\011isnormal", (Math_f)(uintptr_t)local_isnormal,
+ "\011issubnormal", (Math_f)(uintptr_t)local_issubnormal,
+ "\012isunordered", (Math_f)(uintptr_t)local_isunordered,
+ "\011iszero", (Math_f)(uintptr_t)local_iszero,
+ "\001j0", (Math_f)(uintptr_t)j0l,
+ "\001j1", (Math_f)(uintptr_t)j1l,
+ "\002jn", (Math_f)(uintptr_t)jnl,
+ "\042ldexp", (Math_f)(uintptr_t)ldexpl,
+ "\001lgamma", (Math_f)(uintptr_t)lgammal,
+ "\001log", (Math_f)(uintptr_t)logl,
+ "\001log10", (Math_f)(uintptr_t)log10l,
+ "\001log1p", (Math_f)(uintptr_t)log1pl,
+ "\001log2", (Math_f)(uintptr_t)log2l,
+ "\001logb", (Math_f)(uintptr_t)logbl,
+ "\001nearbyint", (Math_f)(uintptr_t)nearbyintl,
+ "\002nextafter", (Math_f)(uintptr_t)nextafterl,
+ "\002nexttoward", (Math_f)(uintptr_t)nexttowardl,
+ "\002pow", (Math_f)(uintptr_t)powl,
+ "\002remainder", (Math_f)(uintptr_t)remainderl,
+ "\001rint", (Math_f)(uintptr_t)rintl,
+ "\001round", (Math_f)(uintptr_t)roundl,
+ "\002scalb", (Math_f)(uintptr_t)scalbl,
+ "\002scalbn", (Math_f)(uintptr_t)scalbnl,
+ "\011signbit", (Math_f)(uintptr_t)local_signbit,
+ "\001sin", (Math_f)(uintptr_t)sinl,
+ "\001sinh", (Math_f)(uintptr_t)sinhl,
+ "\001sqrt", (Math_f)(uintptr_t)sqrtl,
+ "\001tan", (Math_f)(uintptr_t)tanl,
+ "\001tanh", (Math_f)(uintptr_t)tanhl,
+ "\001tgamma", (Math_f)(uintptr_t)tgammal,
+ "\001trunc", (Math_f)(uintptr_t)truncl,
+ "\001y0", (Math_f)(uintptr_t)y0l,
+ "\001y1", (Math_f)(uintptr_t)y1l,
+ "\002yn", (Math_f)(uintptr_t)ynl,
+ "", (Math_f)0
+};
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/options b/usr/src/cmd/ast/libshell/sparc/FEATURE/options
new file mode 100644
index 0000000000..24978488cd
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/options
@@ -0,0 +1,21 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/options by iffe version 2012-07-17 : : */
+#ifndef _def_options_ksh93
+#define _def_options_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define SHELLMAGIC 1
+#ifndef SHOPT_DEVFD
+# define SHOPT_DEVFD 1
+#endif
+#ifndef SHOPT_PFSH
+# define SHOPT_PFSH 1
+#endif
+#undef SHOPT_TEST_L
+#ifndef SHOPT_SYSRC
+# define SHOPT_SYSRC 1
+#endif
+#undef SHOPT_UCB
+#if !_PACKAGE_ast && ( (MB_LEN_MAX-1)<=0 || !defined(_lib_mbtowc) )
+# undef SHOPT_MULTIBYTE
+#endif
+
+#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll b/usr/src/cmd/ast/libshell/sparc/FEATURE/poll
index 3cbe11692f..c76d76c633 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/poll
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/poll
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/poll by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/poll by iffe version 2012-07-17 : : */
#ifndef _def_poll_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,12 +62,8 @@
#define _def_poll_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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_socket 1 /* -lsocket is a library */
#define _hdr_poll 1 /* #include <poll.h> ok */
#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
#define _sys_poll 1 /* #include <sys/poll.h> ok */
@@ -86,8 +82,9 @@
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
#define _sys_select 1 /* #include <sys/select.h> ok */
#define _typ_fd_set 1 /* fd_set is a type */
-#define _socketpair_devfd 1 /* /dev/fd/N handles socketpair() */
-
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _typ_socklen_t 1 /* socklen_t is a type */
+
#ifdef _lib_poll
# define poll _SYS_poll
#else
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/pstat b/usr/src/cmd/ast/libshell/sparc/FEATURE/pstat
new file mode 100644
index 0000000000..13910c1642
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/pstat
@@ -0,0 +1,5 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_pstat_sparc
+#define _def_pstat_sparc 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/rlimits b/usr/src/cmd/ast/libshell/sparc/FEATURE/rlimits
new file mode 100644
index 0000000000..1e60399571
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/rlimits
@@ -0,0 +1,38 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/rlimits by iffe version 2012-07-17 : : */
+#ifndef _def_rlimits_ksh93
+#define _def_rlimits_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _sys_time 1 /* #include <sys/time.h> ok */
+#define _sys_resource 1 /* #include <sys/resource.h> ok */
+#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
+#define _lib_getrlimit64 1 /* getrlimit64() in default lib(s) */
+#define _lib_ulimit 1 /* ulimit() in default lib(s) */
+#define _hdr_time 1 /* #include <time.h> ok */
+#define _sys_times 1 /* #include <sys/times.h> ok */
+#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _typ_rlim_t 1 /* rlim_t is a type */
+#define _typ_rlim64_t 1 /* rlim64_t is a type */
+
+#if _sys_resource
+# include <sys/resource.h>
+# if _lib_getrlimit64
+# undef getrlimit
+# define getrlimit getrlimit64
+# undef setrlimit
+# define setrlimit setrlimit64
+# if _typ_rlim64_t
+# undef rlimit
+# define rlimit rlimit64
+# undef rlim_t
+# define rlim_t rlim64_t
+# endif
+# ifdef RLIM64_INFINITY
+# undef RLIM_INFINITY
+# define RLIM_INFINITY RLIM64_INFINITY
+# endif
+# endif
+#endif
+
+
+#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp b/usr/src/cmd/ast/libshell/sparc/FEATURE/setjmp
index 0ab47cb0f0..2e57e9cd18 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/setjmp
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/setjmp
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/setjmp by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/setjmp by iffe version 2012-07-17 : : */
#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_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_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) */
#define _lib__setjmp 1 /* _setjmp() in default lib(s) */
#define _lib__longjmp 1 /* _longjmp() in default lib(s) */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures b/usr/src/cmd/ast/libshell/sparc/FEATURE/sigfeatures
index 0951a434a1..39231bc866 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/sigfeatures
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/sigfeatures
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/sigfeatures by iffe version 2012-07-17 : : */
#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_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_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) */
#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
#define _hdr_time 1 /* #include <time.h> ok */
@@ -15,7 +9,6 @@
#define _sys_times 1 /* #include <sys/times.h> ok */
#define _hdr_stddef 1 /* #include <stddef.h> ok */
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_ast 1 /* #include <ast.h> ok */
#define _hdr_signal 1 /* #include <signal.h> ok */
#define _typ_sigset_t 1 /* sigset_t is a type */
#ifndef _mem_sigvec_sv_mask
@@ -49,7 +42,7 @@
#endif /* _lib_sigprocmask */
#undef _SIGRTMIN
-#define _SIGRTMIN 41
+#define _SIGRTMIN 42
#undef _SIGRTMAX
-#define _SIGRTMAX 48
+#define _SIGRTMAX 73
#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time b/usr/src/cmd/ast/libshell/sparc/FEATURE/time
index 95b62e121b..0e1c2627b6 100644
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/time
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/time
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/cmd/ksh93/features/time by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/time by iffe version 2012-07-17 : : */
#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_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_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 */
#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */
#define _lib_setitimer 1 /* setitimer() in default lib(s) */
diff --git a/usr/src/cmd/ast/libshell/sparc/FEATURE/ttys b/usr/src/cmd/ast/libshell/sparc/FEATURE/ttys
new file mode 100644
index 0000000000..f9748cf4c3
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/FEATURE/ttys
@@ -0,0 +1,14 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/ttys by iffe version 2012-07-17 : : */
+#ifndef _def_ttys_ksh93
+#define _def_ttys_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_termios 1 /* #include <termios.h> ok */
+#define _hdr_termio 1 /* #include <termio.h> ok */
+#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
+#define _sys_termios 1 /* #include <sys/termios.h> ok */
+#define _sys_termio 1 /* #include <sys/termio.h> ok */
+#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
+#define _sys_filio 1 /* #include <sys/filio.h> ok */
+#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
+#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
+#endif
diff --git a/usr/src/lib/libshell/sparc/Makefile b/usr/src/cmd/ast/libshell/sparc/Makefile
index b858cee431..b858cee431 100644
--- a/usr/src/lib/libshell/sparc/Makefile
+++ b/usr/src/cmd/ast/libshell/sparc/Makefile
diff --git a/usr/src/cmd/ast/libshell/sparc/Makefile.iffe b/usr/src/cmd/ast/libshell/sparc/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparc/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/acct b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/acct
new file mode 100644
index 0000000000..044ed76df4
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/acct
@@ -0,0 +1,8 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_acct_sparcv9
+#define _def_acct_sparcv9 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _dat_acct 1 /* acct in default lib(s) */
+#define _lib_acct 1 /* acct() in default lib(s) */
+#define _sys_acct 1 /* #include <sys/acct.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/cmds b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/cmds
new file mode 100644
index 0000000000..9c8159bf36
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/cmds
@@ -0,0 +1,22 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/cmds by iffe version 2012-07-17 : : */
+#ifndef _def_cmds_ksh93
+#define _def_cmds_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _cmd_newgrp 1
+#define _usr_bin_newgrp 1
+#define _cmd_test 1
+#define _usr_bin_test 1
+#define _cmd_id 1
+#define _usr_bin_id 1
+#define _cmd_wc 1
+#define _usr_bin_wc 1
+#define _cmd_cut 1
+#define _usr_bin_cut 1
+#define _cmd_logname 1
+#define _usr_bin_logname 1
+#define _cmd_pfexec 1
+#define _usr_bin_pfexec 1
+#define _cmd_tput 1
+#define _usr_bin_tput 1
+#define _pth_ed "/usr/bin/ed"
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/dynamic b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/dynamic
new file mode 100644
index 0000000000..96c308357b
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/dynamic
@@ -0,0 +1,16 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/dynamic by iffe version 2012-07-17 : : */
+#ifndef _def_dynamic_ksh93
+#define _def_dynamic_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#if SHOPT_DYNAMIC
+#include <dlldefs.h>
+#endif
+#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
+# define SHOPT_FS_3D 1
+#endif /* !SHOPT_FS_3D */
+#if SHOPT_FS_3D
+# undef mount
+# include <fs3d.h>
+#endif /* SHOPT_FS_3D */
+
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/execargs b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/execargs
new file mode 100644
index 0000000000..be4c236501
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/execargs
@@ -0,0 +1,5 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_execargs_sparcv9
+#define _def_execargs_sparcv9 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/externs
index 18685dcd89..8828c30ba8 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/externs
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/externs
@@ -1,7 +1,7 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/externs by iffe version 2009-12-04 : : */
-
+/* : : generated from contrib/ast/src/cmd/ksh93/features/externs by iffe version 2012-07-17 : : */
+
#ifndef _def_externs_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -63,12 +63,6 @@
#define _def_externs_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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 */
#define _hdr_math 1 /* #include <math.h> ok */
#define _mem_name_exception 1 /* name is a member of struct exception */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/locale
index c316c2772f..6b5aba0a08 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/locale
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/locale
@@ -1,19 +1,22 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/locale by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/locale by iffe version 2012-07-17 : : */
#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_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_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 */
#define _hdr_wchar 1 /* #include <wchar.h> ok */
+#define _hdr_wctype 1 /* #include <wctype.h> ok */
#define _lib_localeconv 1 /* localeconv() in default lib(s) */
#define _lib_wctype 1 /* wctype() in default lib(s) */
#define _lib_iswctype 1 /* iswctype() in default lib(s) */
#define _lib_iswblank 1 /* iswblank() in default lib(s) */
+#define _lib_wctrans 1 /* wctrans() in default lib(s) */
+#define _lib_towctrans 1 /* towctrans() in default lib(s) */
+#define _hdr_time 1 /* #include <time.h> ok */
+#define _sys_time 1 /* #include <sys/time.h> ok */
+#define _sys_times 1 /* #include <sys/times.h> ok */
+#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _typ_wctrans_t 1 /* wctrans_t is a type */
#if _PACKAGE_ast
# undef _hdr_locale
# define _hdr_locale 1
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/math b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/math
new file mode 100644
index 0000000000..b86d8d56ac
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/math
@@ -0,0 +1,171 @@
+
+/* : : generated by proto : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/math.sh by iffe version 2012-07-17 : : */
+#ifndef _def_math_ksh93
+#if !defined(__PROTO__)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
+# if defined(__cplusplus)
+# define __LINKAGE__ "C"
+# else
+# define __LINKAGE__
+# endif
+# define __STDARG__
+# define __PROTO__(x) x
+# define __OTORP__(x)
+# define __PARAM__(n,o) n
+# if !defined(__STDC__) && !defined(__cplusplus)
+# if !defined(c_plusplus)
+# define const
+# endif
+# define signed
+# define void int
+# define volatile
+# define __V_ char
+# else
+# define __V_ void
+# endif
+# else
+# define __PROTO__(x) ()
+# define __OTORP__(x) x
+# define __PARAM__(n,o) o
+# define __LINKAGE__
+# define __V_ char
+# define const
+# define signed
+# define void int
+# define volatile
+# endif
+# define __MANGLE__ __LINKAGE__
+# if defined(__cplusplus) || defined(c_plusplus)
+# define __VARARG__ ...
+# else
+# define __VARARG__
+# endif
+# if defined(__STDARG__)
+# define __VA_START__(p,a) va_start(p,a)
+# else
+# define __VA_START__(p,a) va_start(p)
+# endif
+# if !defined(__INLINE__)
+# if defined(__cplusplus)
+# define __INLINE__ extern __MANGLE__ inline
+# else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define __INLINE__ __inline
+# endif
+# endif
+# endif
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+
+#define _def_math_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+
+
+/* : : generated by cmd/ast/tools/iffe from contrib/ast/src/cmd/ksh93/data/math.tab : : */
+
+typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
+
+#include <math.h>
+#include <ieeefp.h>
+
+static Sfdouble_t local_finite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return finite(a1);}
+static int local_fpclassify __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclassify(a1);}
+static int local_fpclass __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclass(a1);}
+static int local_isfinite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isfinite(a1);}
+static int local_isgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreater(a1,a2);}
+static int local_isgreaterequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreaterequal(a1,a2);}
+static int local_isinf __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isinf(a1);}
+static int local_isless __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isless(a1,a2);}
+static int local_islessequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessequal(a1,a2);}
+static int local_islessgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessgreater(a1,a2);}
+static int local_isnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isnormal(a1);}
+static int local_issubnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_SUBNORMAL; }
+static int local_isunordered __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isunordered(a1,a2);}
+static int local_iszero __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){ int q = fpclassify(a1); return q == FP_ZERO; }
+static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return signbit(a1);}
+
+/*
+ * first byte is two-digit octal number. Last digit is number of args
+ * first digit is 0 if return value is double, 1 for integer
+ */
+const struct mathtab shtab_math[] =
+{
+ "\001acos", (Math_f)(uintptr_t)acosl,
+ "\001acosh", (Math_f)(uintptr_t)acoshl,
+ "\001asin", (Math_f)(uintptr_t)asinl,
+ "\001asinh", (Math_f)(uintptr_t)asinhl,
+ "\001atan", (Math_f)(uintptr_t)atanl,
+ "\002atan2", (Math_f)(uintptr_t)atan2l,
+ "\001atanh", (Math_f)(uintptr_t)atanhl,
+ "\001cbrt", (Math_f)(uintptr_t)cbrtl,
+ "\001ceil", (Math_f)(uintptr_t)ceill,
+ "\002copysign", (Math_f)(uintptr_t)copysignl,
+ "\001cos", (Math_f)(uintptr_t)cosl,
+ "\001cosh", (Math_f)(uintptr_t)coshl,
+ "\001erf", (Math_f)(uintptr_t)erfl,
+ "\001erfc", (Math_f)(uintptr_t)erfcl,
+ "\001exp", (Math_f)(uintptr_t)expl,
+ "\001exp2", (Math_f)(uintptr_t)exp2l,
+ "\001expm1", (Math_f)(uintptr_t)expm1l,
+ "\001fabs", (Math_f)(uintptr_t)fabsl,
+ "\001abs", (Math_f)(uintptr_t)fabsl,
+ "\002fdim", (Math_f)(uintptr_t)fdiml,
+ "\001finite", (Math_f)(uintptr_t)local_finite,
+ "\001floor", (Math_f)(uintptr_t)floorl,
+ "\001int", (Math_f)(uintptr_t)floorl,
+ "\003fma", (Math_f)(uintptr_t)fmal,
+ "\002fmax", (Math_f)(uintptr_t)fmaxl,
+ "\002fmin", (Math_f)(uintptr_t)fminl,
+ "\002fmod", (Math_f)(uintptr_t)fmodl,
+ "\011fpclassify", (Math_f)(uintptr_t)local_fpclassify,
+ "\011fpclass", (Math_f)(uintptr_t)local_fpclass,
+ "\002hypot", (Math_f)(uintptr_t)hypotl,
+ "\011ilogb", (Math_f)(uintptr_t)ilogbl,
+ "\011isfinite", (Math_f)(uintptr_t)local_isfinite,
+ "\012isgreater", (Math_f)(uintptr_t)local_isgreater,
+ "\012isgreaterequal", (Math_f)(uintptr_t)local_isgreaterequal,
+ "\011isinf", (Math_f)(uintptr_t)local_isinf,
+ "\012isless", (Math_f)(uintptr_t)local_isless,
+ "\012islessequal", (Math_f)(uintptr_t)local_islessequal,
+ "\012islessgreater", (Math_f)(uintptr_t)local_islessgreater,
+ "\011isnan", (Math_f)(uintptr_t)isnanl,
+ "\011isnormal", (Math_f)(uintptr_t)local_isnormal,
+ "\011issubnormal", (Math_f)(uintptr_t)local_issubnormal,
+ "\012isunordered", (Math_f)(uintptr_t)local_isunordered,
+ "\011iszero", (Math_f)(uintptr_t)local_iszero,
+ "\001j0", (Math_f)(uintptr_t)j0l,
+ "\001j1", (Math_f)(uintptr_t)j1l,
+ "\002jn", (Math_f)(uintptr_t)jnl,
+ "\042ldexp", (Math_f)(uintptr_t)ldexpl,
+ "\001lgamma", (Math_f)(uintptr_t)lgammal,
+ "\001log", (Math_f)(uintptr_t)logl,
+ "\001log10", (Math_f)(uintptr_t)log10l,
+ "\001log1p", (Math_f)(uintptr_t)log1pl,
+ "\001log2", (Math_f)(uintptr_t)log2l,
+ "\001logb", (Math_f)(uintptr_t)logbl,
+ "\001nearbyint", (Math_f)(uintptr_t)nearbyintl,
+ "\002nextafter", (Math_f)(uintptr_t)nextafterl,
+ "\002nexttoward", (Math_f)(uintptr_t)nexttowardl,
+ "\002pow", (Math_f)(uintptr_t)powl,
+ "\002remainder", (Math_f)(uintptr_t)remainderl,
+ "\001rint", (Math_f)(uintptr_t)rintl,
+ "\001round", (Math_f)(uintptr_t)roundl,
+ "\002scalb", (Math_f)(uintptr_t)scalbl,
+ "\002scalbn", (Math_f)(uintptr_t)scalbnl,
+ "\011signbit", (Math_f)(uintptr_t)local_signbit,
+ "\001sin", (Math_f)(uintptr_t)sinl,
+ "\001sinh", (Math_f)(uintptr_t)sinhl,
+ "\001sqrt", (Math_f)(uintptr_t)sqrtl,
+ "\001tan", (Math_f)(uintptr_t)tanl,
+ "\001tanh", (Math_f)(uintptr_t)tanhl,
+ "\001tgamma", (Math_f)(uintptr_t)tgammal,
+ "\001trunc", (Math_f)(uintptr_t)truncl,
+ "\001y0", (Math_f)(uintptr_t)y0l,
+ "\001y1", (Math_f)(uintptr_t)y1l,
+ "\002yn", (Math_f)(uintptr_t)ynl,
+ "", (Math_f)0
+};
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/options b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/options
new file mode 100644
index 0000000000..24978488cd
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/options
@@ -0,0 +1,21 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/options by iffe version 2012-07-17 : : */
+#ifndef _def_options_ksh93
+#define _def_options_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define SHELLMAGIC 1
+#ifndef SHOPT_DEVFD
+# define SHOPT_DEVFD 1
+#endif
+#ifndef SHOPT_PFSH
+# define SHOPT_PFSH 1
+#endif
+#undef SHOPT_TEST_L
+#ifndef SHOPT_SYSRC
+# define SHOPT_SYSRC 1
+#endif
+#undef SHOPT_UCB
+#if !_PACKAGE_ast && ( (MB_LEN_MAX-1)<=0 || !defined(_lib_mbtowc) )
+# undef SHOPT_MULTIBYTE
+#endif
+
+#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/poll
index 86bb35630a..c76d76c633 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/poll
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/poll
@@ -1,6 +1,6 @@
/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/poll by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/poll by iffe version 2012-07-17 : : */
#ifndef _def_poll_ksh93
#if !defined(__PROTO__)
# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
@@ -62,12 +62,8 @@
#define _def_poll_ksh93 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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_socket 1 /* -lsocket is a library */
#define _hdr_poll 1 /* #include <poll.h> ok */
#define _hdr_netinet_in 1 /* #include <netinet/in.h> ok */
#define _sys_poll 1 /* #include <sys/poll.h> ok */
@@ -86,8 +82,9 @@
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
#define _sys_select 1 /* #include <sys/select.h> ok */
#define _typ_fd_set 1 /* fd_set is a type */
-#define _socketpair_devfd 1 /* /dev/fd/N handles socketpair() */
-
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _typ_socklen_t 1 /* socklen_t is a type */
+
#ifdef _lib_poll
# define poll _SYS_poll
#else
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/pstat b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/pstat
new file mode 100644
index 0000000000..8aaa84467e
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/pstat
@@ -0,0 +1,5 @@
+/* : : generated by iffe version 2012-07-17 : : */
+#ifndef _def_pstat_sparcv9
+#define _def_pstat_sparcv9 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/rlimits b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/rlimits
new file mode 100644
index 0000000000..6dc4d85bd9
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/rlimits
@@ -0,0 +1,37 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/rlimits by iffe version 2012-07-17 : : */
+#ifndef _def_rlimits_ksh93
+#define _def_rlimits_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _sys_time 1 /* #include <sys/time.h> ok */
+#define _sys_resource 1 /* #include <sys/resource.h> ok */
+#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
+#define _lib_ulimit 1 /* ulimit() in default lib(s) */
+#define _hdr_time 1 /* #include <time.h> ok */
+#define _sys_times 1 /* #include <sys/times.h> ok */
+#define _hdr_stddef 1 /* #include <stddef.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _typ_rlim_t 1 /* rlim_t is a type */
+#define _typ_rlim64_t 1 /* rlim64_t is a type */
+
+#if _sys_resource
+# include <sys/resource.h>
+# if _lib_getrlimit64
+# undef getrlimit
+# define getrlimit getrlimit64
+# undef setrlimit
+# define setrlimit setrlimit64
+# if _typ_rlim64_t
+# undef rlimit
+# define rlimit rlimit64
+# undef rlim_t
+# define rlim_t rlim64_t
+# endif
+# ifdef RLIM64_INFINITY
+# undef RLIM_INFINITY
+# define RLIM_INFINITY RLIM64_INFINITY
+# endif
+# endif
+#endif
+
+
+#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/setjmp
index b1b967ccb9..2e57e9cd18 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/setjmp
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/setjmp
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/setjmp by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/setjmp by iffe version 2012-07-17 : : */
#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_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_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) */
#define _lib__setjmp 1 /* _setjmp() in default lib(s) */
#define _lib__longjmp 1 /* _longjmp() in default lib(s) */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/sigfeatures
index 23d83928ae..39231bc866 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/sigfeatures
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/sigfeatures
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/sigfeatures by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/sigfeatures by iffe version 2012-07-17 : : */
#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_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_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) */
#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
#define _hdr_time 1 /* #include <time.h> ok */
@@ -15,7 +9,6 @@
#define _sys_times 1 /* #include <sys/times.h> ok */
#define _hdr_stddef 1 /* #include <stddef.h> ok */
#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_ast 1 /* #include <ast.h> ok */
#define _hdr_signal 1 /* #include <signal.h> ok */
#define _typ_sigset_t 1 /* sigset_t is a type */
#ifndef _mem_sigvec_sv_mask
@@ -49,7 +42,7 @@
#endif /* _lib_sigprocmask */
#undef _SIGRTMIN
-#define _SIGRTMIN 41
+#define _SIGRTMIN 42
#undef _SIGRTMAX
-#define _SIGRTMAX 48
+#define _SIGRTMAX 73
#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/time
index 94e0aff156..0e1c2627b6 100644
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/time
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/time
@@ -1,13 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/cmd/ksh93/features/time by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/cmd/ksh93/features/time by iffe version 2012-07-17 : : */
#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_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_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 */
#define _lib_gettimeofday 1 /* gettimeofday() in default lib(s) */
#define _lib_setitimer 1 /* setitimer() in default lib(s) */
diff --git a/usr/src/cmd/ast/libshell/sparcv9/FEATURE/ttys b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/ttys
new file mode 100644
index 0000000000..f9748cf4c3
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/FEATURE/ttys
@@ -0,0 +1,14 @@
+/* : : generated from contrib/ast/src/cmd/ksh93/features/ttys by iffe version 2012-07-17 : : */
+#ifndef _def_ttys_ksh93
+#define _def_ttys_ksh93 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_termios 1 /* #include <termios.h> ok */
+#define _hdr_termio 1 /* #include <termio.h> ok */
+#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
+#define _sys_termios 1 /* #include <sys/termios.h> ok */
+#define _sys_termio 1 /* #include <sys/termio.h> ok */
+#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
+#define _sys_filio 1 /* #include <sys/filio.h> ok */
+#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
+#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
+#endif
diff --git a/usr/src/lib/libshell/sparcv9/Makefile b/usr/src/cmd/ast/libshell/sparcv9/Makefile
index 929761d138..8547cdf6f2 100644
--- a/usr/src/lib/libshell/sparcv9/Makefile
+++ b/usr/src/cmd/ast/libshell/sparcv9/Makefile
@@ -25,7 +25,7 @@
#
include ../Makefile.com
-include ../../Makefile.lib.64
+include $(SRC)/lib/Makefile.lib.64
# Use -KPIC since libshell is too big for -Kpic on 64bit
# (and on 32bit it is close to the barrier)
diff --git a/usr/src/cmd/ast/libshell/sparcv9/Makefile.iffe b/usr/src/cmd/ast/libshell/sparcv9/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libshell/sparcv9/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/lib/libsum/Makefile b/usr/src/cmd/ast/libsum/Makefile
index bcf6063972..aecfc268e9 100644
--- a/usr/src/lib/libsum/Makefile
+++ b/usr/src/cmd/ast/libsum/Makefile
@@ -23,41 +23,41 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
-include ../Makefile.lib
+include $(SRC)/lib/Makefile.lib
-SUBDIRS = $(MACH)
+SUBDIRS= $(MACH)
$(BUILD64)SUBDIRS += $(MACH64)
all := TARGET= all
clean := TARGET= clean
clobber := TARGET= clobber
install := TARGET= install
+install_h := TARGET= install_h
_msg := TARGET= _msg
+_feature := TARGET= _feature
.KEEP_STATE:
+.PARALLEL: $(SUBDIRS)
-all clean clobber install _msg: $(SUBDIRS)
-
-LIBRARY= libsum.a
-
-HDRS= \
- sum.h
+all clean clobber install _feature: $(SUBDIRS)
+_msg: $(MACH)
-HDRDIR32= $(MACH)/include/ast
-HDRDIR64= $(MACH64)/include/ast
+include Makefile.defs
+HDRS= $(HEADERINSTALL)
+HDRDIR32= $(MACH)/ast
+HDRDIR64= $(MACH64)/ast
include ../Makefile.asthdr
-install_h: $(ROOTHDRS)
-
-# We don't check these header files because they're owned by AT&T/AST
-check:
+install_h: $(SUBDIRS) .WAIT $(ROOTHDRS)
+install: install_h
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
-
FRC:
-include ../Makefile.targ
+include $(SRC)/lib/Makefile.targ
diff --git a/usr/src/lib/libsum/Makefile.com b/usr/src/cmd/ast/libsum/Makefile.com
index 9302987f7b..0195c0d862 100644
--- a/usr/src/lib/libsum/Makefile.com
+++ b/usr/src/cmd/ast/libsum/Makefile.com
@@ -24,35 +24,25 @@
# Use is subject to license terms.
#
# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
-LIBRARY= libsum.a
-VERS= .1
+LIBRARY= libsum.a
+VERS= .1
-OBJECTS= \
- sumlib.o
+include ../Makefile.defs
-include ../../Makefile.astmsg
-
-include ../../Makefile.lib
-
-# mapfile-vers does not live with the sources in in common/ to make
-# automated code updates easier.
-MAPFILES= ../mapfile-vers
+OBJECTS += $(LIBOBJS)
-# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
-include ../../../Makefile.ast
+include $(SRC)/lib/Makefile.lib
+include ../../Makefile.ast
-LIBS = $(DYNLIB)
+MAPFILES= ../mapfile-vers
-LDLIBS += \
- -last \
- -lmd \
- -lc
+LIBS= $(DYNLIB)
-
-SRCDIR = ../common
+LDLIBS += -last -lmd -lc
# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
# case - it MUST come as the last element but future changes in -D options
@@ -60,36 +50,49 @@ SRCDIR = ../common
# option specified overrides previous -D options so we prefer the current
# way to explicitly list each single flag.
# Notes:
-# - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
-CPPFLAGS = \
+CPPFLAGS= \
$(DTEXTDOM) $(DTS_ERRNO) \
- -Isrc/lib/libsum \
+ -Iast -I. \
-I$(ROOT)/usr/include/ast \
-I$(ROOT)/usr/include \
-D_PACKAGE_ast \
-D_BLD_DLL
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
-CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-parentheses
SMOFF += all_func_returns
# This codepath is performance-critical
-sparc_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
-sparcv9_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
-i386_COPTFLAG=-_cc=-xO5 -_cc=-xprefetch=auto,explicit
-amd64_COPTFLAG=-_cc=-xO5 -_cc=-xprefetch=auto,explicit
+sparc_COPTFLAG = -xO5 -_cc=-xprefetch=auto,explicit
+sparcv9_COPTFLAG = $(sparc_COPTFLAG)
+i386_COPTFLAG = -_cc=-xO5 -_cc=-xprefetch=auto,explicit
+amd64_COPTFLAG = $(i386_COPTFLAG)
+
+all: install_h .WAIT $(LIBS)
+
+include $(SRC)/lib/Makefile.targ
-# Suppress this one warning as the fix would break old gcc, which upstream
-# still supports. This needs a better fix (later).
-pics/sumlib.o := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
+pics/%.o: $(ASTSRC)/%.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ $(POST_PROCESS_O)
-.KEEP_STATE:
+######################################################################
+# Header file generation
-all: $(LIBS)
+$(HEADERSRC:%=ast/%): FRC
+ $(MKDIR) -p $(@D)
+ $(CP) $(ASTSRC)/$(@F) $@
+
+install_h: $(HEADERSRC:%=ast/%)
+
+CLOBBERFILES += ast/*
+
+_feature: FRC
+ $(MAKE) -f Makefile.iffe generate
+
+include ../../Makefile.astmsg
-include ../../Makefile.targ
+FRC:
diff --git a/usr/src/cmd/ast/libsum/Makefile.defs b/usr/src/cmd/ast/libsum/Makefile.defs
new file mode 100644
index 0000000000..1ee6ba6a93
--- /dev/null
+++ b/usr/src/cmd/ast/libsum/Makefile.defs
@@ -0,0 +1,29 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+# These macros should be kept synchronised with those in
+# usr/src/contrib/ast/src/lib/libsum/Makefile
+
+AST_LICENSE = since=1996,author=gsf
+ASTLIB= libsum
+ASTSRC= $(C_AST)/src/lib/$(ASTLIB)
+HDRGUARD= sum
+
+FEATURES= sum
+HEADERSRC= sum.h
+HEADERGEN=
+HEADERINSTALL= $(HEADERSRC) $(HEADERGEN)
+LOBJDIRS=
+LIBOBJS= sumlib.o
diff --git a/usr/src/cmd/ast/libsum/Makefile.iffe b/usr/src/cmd/ast/libsum/Makefile.iffe
new file mode 100644
index 0000000000..0a12069bf4
--- /dev/null
+++ b/usr/src/cmd/ast/libsum/Makefile.iffe
@@ -0,0 +1,22 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.com
+include ../../Makefile.iffe
+
+cleaniffe: FRC
+ $(RM) $(FEATURES:%=FEATURE/%)
+
+generate: cleaniffe $(FEATURES:%=FEATURE/%)
diff --git a/usr/src/lib/libsum/amd64/src/lib/libsum/FEATURE/sum b/usr/src/cmd/ast/libsum/amd64/FEATURE/sum
index 15ef9799e1..7902fa3d5e 100644
--- a/usr/src/lib/libsum/amd64/src/lib/libsum/FEATURE/sum
+++ b/usr/src/cmd/ast/libsum/amd64/FEATURE/sum
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libsum/features/sum by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libsum/features/sum by iffe version 2012-07-17 : : */
#ifndef _def_sum_sum
#define _def_sum_sum 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_md4 1 /* #include <md4.h> ok */
#define _LIB_md 1 /* -lmd is a library */
#define _lib_MD4Init 1 /* MD4Init() in default lib(s) */
diff --git a/usr/src/lib/libshell/amd64/Makefile b/usr/src/cmd/ast/libsum/amd64/Makefile
index 9f293be4fa..d6a7d68d4f 100644
--- a/usr/src/lib/libshell/amd64/Makefile
+++ b/usr/src/cmd/ast/libsum/amd64/Makefile
@@ -25,6 +25,6 @@
#
include ../Makefile.com
-include ../../Makefile.lib.64
+include $(SRC)/lib/Makefile.lib.64
install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/cmd/ast/libsum/amd64/Makefile.iffe b/usr/src/cmd/ast/libsum/amd64/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libsum/amd64/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/lib/libsum/i386/src/lib/libsum/FEATURE/sum b/usr/src/cmd/ast/libsum/i386/FEATURE/sum
index f106d43c71..7902fa3d5e 100644
--- a/usr/src/lib/libsum/i386/src/lib/libsum/FEATURE/sum
+++ b/usr/src/cmd/ast/libsum/i386/FEATURE/sum
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libsum/features/sum by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libsum/features/sum by iffe version 2012-07-17 : : */
#ifndef _def_sum_sum
#define _def_sum_sum 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_md4 1 /* #include <md4.h> ok */
#define _LIB_md 1 /* -lmd is a library */
#define _lib_MD4Init 1 /* MD4Init() in default lib(s) */
diff --git a/usr/src/lib/libsum/i386/Makefile b/usr/src/cmd/ast/libsum/i386/Makefile
index 6c35d1fc88..6c35d1fc88 100644
--- a/usr/src/lib/libsum/i386/Makefile
+++ b/usr/src/cmd/ast/libsum/i386/Makefile
diff --git a/usr/src/cmd/ast/libsum/i386/Makefile.iffe b/usr/src/cmd/ast/libsum/i386/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libsum/i386/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/lib/libsum/mapfile-vers b/usr/src/cmd/ast/libsum/mapfile-vers
index c17c8e8001..1f8f6486bf 100644
--- a/usr/src/lib/libsum/mapfile-vers
+++ b/usr/src/cmd/ast/libsum/mapfile-vers
@@ -21,6 +21,7 @@
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
#
diff --git a/usr/src/lib/libsum/sparc/src/lib/libsum/FEATURE/sum b/usr/src/cmd/ast/libsum/sparc/FEATURE/sum
index c21ba3916a..7902fa3d5e 100644
--- a/usr/src/lib/libsum/sparc/src/lib/libsum/FEATURE/sum
+++ b/usr/src/cmd/ast/libsum/sparc/FEATURE/sum
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libsum/features/sum by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libsum/features/sum by iffe version 2012-07-17 : : */
#ifndef _def_sum_sum
#define _def_sum_sum 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_md4 1 /* #include <md4.h> ok */
#define _LIB_md 1 /* -lmd is a library */
#define _lib_MD4Init 1 /* MD4Init() in default lib(s) */
diff --git a/usr/src/lib/libsum/sparc/Makefile b/usr/src/cmd/ast/libsum/sparc/Makefile
index 6c35d1fc88..6c35d1fc88 100644
--- a/usr/src/lib/libsum/sparc/Makefile
+++ b/usr/src/cmd/ast/libsum/sparc/Makefile
diff --git a/usr/src/cmd/ast/libsum/sparc/Makefile.iffe b/usr/src/cmd/ast/libsum/sparc/Makefile.iffe
new file mode 100644
index 0000000000..fd4acde716
--- /dev/null
+++ b/usr/src/cmd/ast/libsum/sparc/Makefile.iffe
@@ -0,0 +1,16 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
diff --git a/usr/src/lib/libsum/sparcv9/src/lib/libsum/FEATURE/sum b/usr/src/cmd/ast/libsum/sparcv9/FEATURE/sum
index 6347c2a327..7902fa3d5e 100644
--- a/usr/src/lib/libsum/sparcv9/src/lib/libsum/FEATURE/sum
+++ b/usr/src/cmd/ast/libsum/sparcv9/FEATURE/sum
@@ -1,9 +1,7 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libsum/features/sum by iffe version 2009-12-04 : : */
+/* : : generated from contrib/ast/src/lib/libsum/features/sum by iffe version 2012-07-17 : : */
#ifndef _def_sum_sum
#define _def_sum_sum 1
#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_md4 1 /* #include <md4.h> ok */
#define _LIB_md 1 /* -lmd is a library */
#define _lib_MD4Init 1 /* MD4Init() in default lib(s) */
diff --git a/usr/src/lib/libsum/amd64/Makefile b/usr/src/cmd/ast/libsum/sparcv9/Makefile
index 9f293be4fa..d6a7d68d4f 100644
--- a/usr/src/lib/libsum/amd64/Makefile
+++ b/usr/src/cmd/ast/libsum/sparcv9/Makefile
@@ -25,6 +25,6 @@
#
include ../Makefile.com
-include ../../Makefile.lib.64
+include $(SRC)/lib/Makefile.lib.64
install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/cmd/ast/libsum/sparcv9/Makefile.iffe b/usr/src/cmd/ast/libsum/sparcv9/Makefile.iffe
new file mode 100644
index 0000000000..ff23738b70
--- /dev/null
+++ b/usr/src/cmd/ast/libsum/sparcv9/Makefile.iffe
@@ -0,0 +1,17 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+include ../Makefile.iffe
+include $(SRC)/lib/Makefile.lib.64
diff --git a/usr/src/cmd/ast/msgcc/Makefile b/usr/src/cmd/ast/msgcc/Makefile
index 70a1f3f25b..6f3e7f035c 100644
--- a/usr/src/cmd/ast/msgcc/Makefile
+++ b/usr/src/cmd/ast/msgcc/Makefile
@@ -23,30 +23,32 @@
# Use is subject to license terms.
#
# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
include ../../Makefile.cmd
.KEEP_STATE:
# Set common AST build flags (e.g., needed to support the math stuff).
-include ../../../Makefile.ast
+include ../Makefile.ast
+
+ASTSRC= $(C_AST)/src/cmd/msgcc
# build rules
-CPPFLAGS = \
+CPPFLAGS= \
$(DTEXTDOM) $(DTS_ERRNO) \
-I$(ROOT)/usr/include/ast \
-I$(ROOT)/usr/include \
-D_PACKAGE_ast \
'-DUSAGE_LICENSE=\
- "[-author?Glenn Fowler <gsf@research.att.com>]"\
- "[-copyright?Copyright (c) 1986-2009 AT&T Intellectual Property]"\
- "[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
- "[--catalog?msgcc]"'
+ "[-author?Glenn Fowler <gsf@research.att.com>]"\
+ "[-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property]"\
+ "[-license?http://www.eclipse.org/org/documents/epl-v10.html]" \
+ "[--catalog?msgcc]"'
-CFLAGS += \
- $(ASTCFLAGS)
+CFLAGS += $(ASTCFLAGS)
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-empty-body
@@ -58,25 +60,38 @@ SMATCH=off
LDLIBS += -last
msgcpp := LDLIBS += -lpp
+CPROG= msgcvt msggen msgget msgcpp
+PROG= msgcc $(CPROG)
+
+all: $(PROG)
+
# This target should use "shcomp" in the future
-msgcc: msgcc.sh
+msgcc: $(ASTSRC)/msgcc.sh
rm -f msgcc ; \
{ \
print "#!/usr/bin/ksh93" ; \
print "export PATH=/usr/ast/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:\$${PATH}" ; \
print "builtin date" ; \
- cat "msgcc.sh" ; \
+ cat "$(ASTSRC)/msgcc.sh" ; \
} >msgcc ; \
chmod a+rx msgcc
ROOTCMDDIR=$(ROOT)/usr/ast/bin
-PROG= msgcvt msggen msgget msgcpp msgcc
+install: all $(ROOTCMD)
+check clean install_h _feature:
-all: $(PROG)
+include ../../Makefile.targ
+POFILE= msgcpp.po
-install: all $(ROOTCMD)
+# Create dummy file since AST/ksh/msgcc doesn't use *.po files
+msgcpp.po:
+ $(RM) $@
+ $(TOUCH) $(@)
-clean lint:
+$(CPROG):
+ $(LINK.c) -o $@ $(ASTSRC)/$@.c $(LDLIBS)
+ $(POST_PROCESS)
-include ../../Makefile.targ
+FRC:
+.PARALLEL: $(PROG)
diff --git a/usr/src/cmd/shcomp/Makefile b/usr/src/cmd/ast/shcomp/Makefile
index 568d9c70f1..b941f59d09 100644
--- a/usr/src/cmd/shcomp/Makefile
+++ b/usr/src/cmd/ast/shcomp/Makefile
@@ -24,43 +24,40 @@
# Use is subject to license terms.
#
# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
-SHELL=/usr/bin/ksh93
+SHELL= /usr/bin/ksh93
-include ../Makefile.cmd
-$(SPARC_BLD)include ../Makefile.cmd.64
+include ../../Makefile.cmd
+$(SPARC_BLD)include ../../Makefile.cmd.64
.KEEP_STATE:
# Set common AST build flags (e.g., needed to support the math stuff).
-include ../../Makefile.ast
+include ../Makefile.ast
-OBJECTS= \
- shcomp.o
+OBJECTS= shcomp.o
-LIBSHELLMACH=$(MACH)
-LIBSHELLBASE=../../lib/libshell
-LIBSHELLSRC=$(LIBSHELLBASE)/common/sh
+ASTSRC= $(C_AST)/src/cmd/ksh93
+LIBSHELLMACH= $(MACH)
+LIBSHELLBASE= ../libshell
+LIBSHELLSRC= $(ASTSRC)/sh
SRCS= $(OBJECTS:%.o=$(LIBSHELLSRC)/%.c)
LDLIBS += -lshell -last
-# 1. Make sure that the -D/-U defines in CFLAGS below are in sync
-# with usr/src/lib/libshell/Makefile.com
-# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
+# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
# case - it MUST come as the last element but future changes in -D options
# may then cause silent breakage in the AST sources because the last -D
# option specified overrides previous -D options so we prefer the current
# way to explicitly list each single flag.
-CPPFLAGS = \
+CPPFLAGS= \
$(DTEXTDOM) $(DTS_ERRNO) \
$(LIBSHELLCPPFLAGS)
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
+CFLAGS += $(ASTCFLAGS)
+CFLAGS64 += $(ASTCFLAGS64)
CERRWARN += -_gcc=-Wno-parentheses
@@ -78,13 +75,13 @@ all: $(PROG)
# dummy file since AST/ksh/shcomp doesn't use *.po files
# (and "shcomp" is just a frontend which calls directly into libshell,
-# e.g. there are no l10n strings here)
+# i.e. there are no l10n strings here)
$(PROG).po:
$(RM) $(PROG).po ; \
$(TOUCH) $(PROG).po
-
install: all $(ROOTCMD)
+install_h _feature:
$(PROG): $(OBJECTS)
$(RM) shcomp
@@ -94,6 +91,4 @@ $(PROG): $(OBJECTS)
clean:
$(RM) $(OBJECTS)
-lint:
-
-include ../Makefile.targ
+include ../../Makefile.targ
diff --git a/usr/src/cmd/ast/tools/Makefile b/usr/src/cmd/ast/tools/Makefile
new file mode 100644
index 0000000000..69408eeaea
--- /dev/null
+++ b/usr/src/cmd/ast/tools/Makefile
@@ -0,0 +1,90 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+#
+
+CTOOLS= mamake ratz release proto lcgen
+SHTOOLS= iffe mamprobe mprobe package gentab
+
+TOOLS= $(CTOOLS) $(SHTOOLS) probe
+OBJS= $(CTOOLS:%=%.o)
+
+include $(SRC)/cmd/Makefile.cmd
+include ../Makefile.ast
+
+CC= $(NATIVECC)
+LD= $(NATIVELD)
+CFLAGS= $(NATIVE_CFLAGS)
+
+all install install_h: $(TOOLS)
+_msg _feature:
+
+clean clobber:
+ $(RM) $(OBJS) $(TOOLS)
+
+package: FRC
+ $(RM) $@
+ # The string returned by 'package' must match the value used by
+ # AT&T upstream, which is "i386" or "sun4", regardless of whether
+ # building 32- or 64-bit objects.
+ { \
+ print "#!/bin/sh"; \
+ [[ $(MACH) == i386 ]] && arch=i386 || arch=sun4; \
+ print "echo sol11.$$arch"; \
+ } >; $@
+ $(CHMOD) +x $@
+
+%.o: $(C_ASTINIT)/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+%.o: $(C_AST)/src/lib/libast/port/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+%: $(C_ASTINIT)/%.sh
+ $(RM) $@
+ { \
+ echo 'USAGE_LICENSE="[-author?ATT]"'; \
+ cat $<; \
+ } >; $@
+ $(CHMOD) +x $@
+
+%: $(C_AST)/src/lib/libpp/%.sh
+ $(RM) $@
+ { \
+ echo 'USAGE_LICENSE="[-author?ATT]"'; \
+ cat $<; \
+ } >; $@
+ $(CHMOD) +x $@
+
+$(CTOOLS): $(OBJS)
+ $(LINK.c) $@.o -o $@ $(LDLIBS)
+ $(POST_PROCESS)
+
+probe: $(C_ASTINIT)/C+probe $(C_ASTINIT)/make.probe
+ $(CAT) $(C_ASTINIT)/C+probe $(C_ASTINIT)/make.probe > $@
+ $(CHMOD) +x $@
+
+STACKPROTECT= none
+
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-implicit-fallthrough
+CERRWARN += -_gcc=-Wno-unused-but-set-variable
+CERRWARN += -_gcc=-Wno-unused-value
+CERRWARN += $(CNOWARN_UNINIT)
+SMATCH= off
+
+.PARALLEL: $(TOOLS)
+
+FRC:
diff --git a/usr/src/contrib/ast/LICENSE b/usr/src/contrib/ast/LICENSE
new file mode 100644
index 0000000000..0a90386e7e
--- /dev/null
+++ b/usr/src/contrib/ast/LICENSE
@@ -0,0 +1,210 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+ 1. DEFINITIONS
+
+ "Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+
+ i) changes to the Program, and
+
+ ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from
+a Contributor if it was added to the Program by such Contributor itself or
+anyone acting on such Contributor's behalf. Contributions do not include additions
+to the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are
+not derivative works of the Program.
+
+ "Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including
+all Contributors.
+
+ 2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce,
+prepare derivative works of, publicly display, publicly perform, distribute
+and sublicense the Contribution of such Contributor, if any, and such derivative
+works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and
+the Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered by
+the Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses
+to its Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth
+in this Agreement.
+
+ 3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under
+its own license agreement, provided that:
+
+ a) it complies with the terms and conditions of this Agreement; and
+
+ b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages,
+such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered
+by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor,
+and informs licensees how to obtain it in a reasonable manner on or through
+a medium customarily used for software exchange.
+
+ When the Program is made available in source code form:
+
+ a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within
+the Program.
+
+Each Contributor must identify itself as the originator of its Contribution,
+if any, in a manner that reasonably allows subsequent Recipients to identify
+the originator of the Contribution.
+
+ 4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor
+who includes the Program in a commercial product offering should do so in
+a manner which does not create potential liability for other Contributors.
+Therefore, if a Contributor includes the Program in a commercial product offering,
+such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor
+to the extent caused by the acts or omissions of such Commercial Contributor
+in connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense
+and any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If
+that Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such Commercial
+Contributor's responsibility alone. Under this section, the Commercial Contributor
+would have to defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other Contributor
+to pay any damages as a result, the Commercial Contributor must pay those
+damages.
+
+ 5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON
+AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS
+OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+Each Recipient is solely responsible for determining the appropriateness of
+using and distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement, including but not limited to the
+risks and costs of program errors, compliance with applicable laws, damage
+to or loss of data, programs or equipment, and unavailability or interruption
+of operations.
+
+ 6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
+LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ 7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of
+the terms of this Agreement, and without further action by the parties hereto,
+such provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+(excluding combinations of the Program with other software or hardware) infringes
+such Recipient's patent(s), then such Recipient's rights granted under Section
+2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and
+does not cure such failure in a reasonable period of time after becoming aware
+of such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as reasonably
+practicable. However, Recipient's obligations under this Agreement and any
+licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but
+in order to avoid inconsistency the Agreement is copyrighted and may only
+be modified in the following manner. The Agreement Steward reserves the right
+to publish new versions (including revisions) of this Agreement from time
+to time. No one other than the Agreement Steward has the right to modify this
+Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse
+Foundation may assign the responsibility to serve as the Agreement Steward
+to a suitable separate entity. Each new version of the Agreement will be given
+a distinguishing version number. The Program (including Contributions) may
+always be distributed subject to the version of the Agreement under which
+it was received. In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its Contributions)
+under the new version. Except as expressly stated in Sections 2(a) and 2(b)
+above, Recipient receives no rights or licenses to the intellectual property
+of any Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual
+property laws of the United States of America. No party to this Agreement
+will bring a legal action under this Agreement more than one year after the
+cause of action arose. Each party waives its rights to a jury trial in any
+resulting litigation. \ No newline at end of file
diff --git a/usr/src/contrib/ast/LICENSE.descrip b/usr/src/contrib/ast/LICENSE.descrip
new file mode 100644
index 0000000000..807cf59d34
--- /dev/null
+++ b/usr/src/contrib/ast/LICENSE.descrip
@@ -0,0 +1 @@
+AT&T Software Technology (AST) toolkit from AT&T Research
diff --git a/usr/src/contrib/ast/README b/usr/src/contrib/ast/README
new file mode 100644
index 0000000000..275fa33b55
--- /dev/null
+++ b/usr/src/contrib/ast/README
@@ -0,0 +1,6 @@
+
+This area contains selected components of the AT&T Software Technology (AST)
+toolkit from AT&T Research. It is populated from the illumos-specific branch
+at https://github.com/illumos/ast using the 'copy_to_gate.sh' script at the
+top level of that repository.
+
diff --git a/usr/src/contrib/ast/lib/package/INIT.pkg b/usr/src/contrib/ast/lib/package/INIT.pkg
new file mode 100644
index 0000000000..32f1456de0
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/INIT.pkg
@@ -0,0 +1,12 @@
+INIT :PACKAGE:
+
+:CATEGORY: admin utils
+
+:INDEX: the package command with support scripts and utilities
+
+:DESCRIPTION:
+ The INIT package is required by all but the standalone
+ and self extracting archive packages. It contains
+ the package command, support scripts, and utilities.
+ The package command installs binary packages, makes
+ source packages, and generates new package tarballs.
diff --git a/usr/src/contrib/ast/lib/package/INIT.req b/usr/src/contrib/ast/lib/package/INIT.req
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/INIT.req
diff --git a/usr/src/contrib/ast/lib/package/INIT.ver b/usr/src/contrib/ast/lib/package/INIT.ver
new file mode 100644
index 0000000000..8dc5177fc0
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/INIT.ver
@@ -0,0 +1 @@
+INIT 2012-08-01 2012-08-01 1
diff --git a/usr/src/contrib/ast/lib/package/ast-ast.pkg b/usr/src/contrib/ast/lib/package/ast-ast.pkg
new file mode 100644
index 0000000000..4d49fb4d61
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-ast.pkg
@@ -0,0 +1,11 @@
+ast-ast :PACKAGE: libast
+
+:LICENSE: *.open
+
+:CATEGORY: devel libs
+
+:INDEX: the ast library, period
+
+:DESCRIPTION:
+ The AT&T Software Technology ast-ast package from AT&T Research
+ contains the ast library.
diff --git a/usr/src/contrib/ast/lib/package/ast-base.pkg b/usr/src/contrib/ast/lib/package/ast-base.pkg
new file mode 100644
index 0000000000..505b1dfc48
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-base.pkg
@@ -0,0 +1,22 @@
+ast-base :PACKAGE: \
+ ksh93 pax html proto bzip tw builtin libast libardir libcmd \
+ libdll libexpr libodelta librecsort libsum libuu libvdelta \
+ libbz libz tests 3d coshell cpp cs mam msgcc nmake probe ss \
+ libcoshell libcs libmam libpp libcodex paxlib codexlib \
+ libdss libpz dsslib libtaso
+
+:COVERS: ast-make ast-ksh ast-ast
+
+:LICENSE: *.open
+
+:CATEGORY: devel libs shells
+
+:INDEX: ksh, ksh builtin commands, pax, nmake, tw, sfio, and ast libraries
+
+:DESCRIPTION:
+ The AT&T Software Technology ast-base package from AT&T Research
+ contains commands and libraries required by all other ast based
+ packages. Included are ksh93, ksh93 builtin commands, a pax that
+ generates compact delta archives, nmake, the 3d user level versioning
+ filesystem, coshell for network execution, a multi-dialect C preprocessor
+ and companion library, and libraries shared by the other ast packages.
diff --git a/usr/src/contrib/ast/lib/package/ast-base.req b/usr/src/contrib/ast/lib/package/ast-base.req
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-base.req
diff --git a/usr/src/contrib/ast/lib/package/ast-base.ver b/usr/src/contrib/ast/lib/package/ast-base.ver
new file mode 100644
index 0000000000..0b7d4a1f8d
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-base.ver
@@ -0,0 +1 @@
+ast-base 2012-08-01 2012-08-01 1
diff --git a/usr/src/contrib/ast/lib/package/ast-dss.pkg b/usr/src/contrib/ast/lib/package/ast-dss.pkg
new file mode 100644
index 0000000000..e090ae4a98
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-dss.pkg
@@ -0,0 +1,13 @@
+ast-dss :PACKAGE: dss libdss libpz dsslib
+
+:REQUIRES: ast-base
+
+:LICENSE: *.(open|proprietary|special)
+
+:CATEGORY: algorithms database utils
+
+:INDEX: data stream scan command and support libraries
+
+:DESCRIPTION:
+ The AT&T Software Technology ast-dss package from AT&T Research
+ contains the dss command, plugins and support libraries.
diff --git a/usr/src/contrib/ast/lib/package/ast-ksh.pkg b/usr/src/contrib/ast/lib/package/ast-ksh.pkg
new file mode 100644
index 0000000000..6f2fec866f
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-ksh.pkg
@@ -0,0 +1,89 @@
+ast-ksh :PACKAGE: ksh93 libast libcmd libcoshell libsum libdll
+
+:COVERS: ksh
+
+:LICENSE: *.open
+
+:CATEGORY: shells
+
+:INDEX: ksh and support libraries
+
+:DESCRIPTION:
+ The AT&T Software Technology ast-ksh package from AT&T Research
+ contains ksh and support libraries. This is the minimal set of
+ components needed to build ksh.
+
+:DETAILS: cyg
+ :README:
+ This package installs a standalone ksh93 executable ksh93.exe
+ and its man page ksh93.1. If /bin/ksh.exe does not exist then
+ these symlinks
+ /bin/ksh.exe => ksh93.exe
+ /usr/share/man/man1/ksh93.1 => ksh.1
+ are created. This allows alternative ksh impelementations,
+ e.g., /bin/pdksh.exe, to be selected by changing the ksh.exe
+ and ksh.1 symbolic links. In addition, ksh and ksh93 paths are
+ added to /etc/shells if not already present.
+ $()
+ Each builtin or special command accepts the --man and --html
+ options to list the man page on the standard error. The --???
+ option describes the self documenting options available to all
+ builtin and special commands.
+ $()
+ The stanadlone ksh is statically linked with the ast libcmd
+ library which provides several builtin versions of /bin
+ commands. "builtin | grep /opt/ast/bin" lists the libcmd
+ builtins on the standard output. /opt/ast/bin/FOO accesses
+ the FOO builtin, whether the /opt/ast/bin directory exists
+ or not. "builtin FOO" allows /opt/ast/bin/FOO to be accessed
+ as FOO, bypassing the $PATH setting. To enable all libcmd
+ builtins do one of the following:
+ (a) create the directory /opt/ast/bin and the file
+ /opt/ast/bin/.paths with this line
+ BUILTIN_LIB=.
+ and place /opt/ast/bin before /bin and /usr/bin in $PATH
+ (this will affect all ksh subshells and scripts)
+ (b) run "builtin $( builtin | sed -e '/\//!d' -e 's,.*/,,' )"
+ (this will affect only the current shell)
+ Some scripts may run significantly faster with libcmd builtins
+ enabled.
+ $()
+ The ast library checks the DOSPATHVARS environment variable
+ for variable path values to convert to and from native windows
+ format when cross-executing between cygwin and non-cygwin
+ programs. The value is a space separated list of environment
+ variables to convert. PATH is handled by cygwin so it is not
+ converted by the ast library.
+ $()
+ The astksh cygwin source package provides a bootstrap build
+ environment that is not suited for an edit/build/debug cycle.
+ If you want to explore and modify the source then you should
+ install the (non-cygwinized) ast-base package which includes
+ AT&T nmake. With ast-base you will also be able to regenerate
+ the astksh cygwin source and binary packages.
+ $()
+ For more information on ksh and other AT&T ast tools see
+ http://www.research.att.com/sw/download/
+ :EXPORT:
+ SHOPT_CMDLIB_DIR=1
+ bin/ksh93.exe :INSTALL: bin/ksh.exe
+ share/man/man1/ksh93.1 :INSTALL: man/man1/sh.1
+ :POSTINSTALL:
+ if [ ! -e /bin/ksh.exe ]
+ then ln -fs ksh93.exe /bin/ksh.exe
+ ln -fs ksh93.1 /usr/share/man/man1/ksh.1
+ else echo "/bin/ksh.exe already exists"
+ fi
+ if [ -f /etc/shells ]
+ then for i in /bin/ksh93 /bin/ksh /usr/bin/ksh93 /usr/bin/ksh
+ do if grep $i /etc/shells >/dev/null 2>&1
+ then echo "$i already in /etc/shells"
+ else echo $i >> /etc/shells
+ echo "$i added to /etc/shells"
+ fi
+ done
+ else echo "no /etc/shells file"
+ fi
+ exit 0
+ :TEST: bin/ksh
+ KSH=$<; cd src/cmd/ksh93/tests; CYGWIN="$$CYGWIN ntsec binmode" SHELL=$$KSH $$KSH shtests
diff --git a/usr/src/contrib/ast/lib/package/ast-ksh.req b/usr/src/contrib/ast/lib/package/ast-ksh.req
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-ksh.req
diff --git a/usr/src/contrib/ast/lib/package/ast-ksh.ver b/usr/src/contrib/ast/lib/package/ast-ksh.ver
new file mode 100644
index 0000000000..45271967b3
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-ksh.ver
@@ -0,0 +1 @@
+ast-ksh 2012-08-01 2012-08-01 1
diff --git a/usr/src/contrib/ast/lib/package/ast-make.pkg b/usr/src/contrib/ast/lib/package/ast-make.pkg
new file mode 100644
index 0000000000..ec2c1bf8bc
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-make.pkg
@@ -0,0 +1,19 @@
+ast-make :PACKAGE: \
+ nmake cpp probe 3d ksh93 coshell cs ss pax paxlib tw \
+ libast libardir libcmd libsum libdll libcoshell libpp
+
+:AUXILIARY: bin/proto bin/pax
+
+:LICENSE: *.open
+
+:COVERS: ast-ksh ast-ast
+
+:CATEGORY: devel libs shells
+
+:INDEX: ksh, pax, nmake
+
+:DESCRIPTION:
+ The AT&T Software Technology ast-make package from AT&T Research
+ contains an almost minimal set of commands and libraries required
+ to run ast nmake. ksh, coshell, pax, tw, and the 3d user-level
+ filesystem are also included.
diff --git a/usr/src/contrib/ast/lib/package/ast-open.pkg b/usr/src/contrib/ast/lib/package/ast-open.pkg
new file mode 100644
index 0000000000..ada0d14743
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-open.pkg
@@ -0,0 +1,20 @@
+ast-open :PACKAGE: \
+ ksh93 kshlib pax html proto bzip libast libardir libcmd libdll \
+ libexpr libodelta librecsort libsum libuu libvdelta libbz \
+ libz tests 3d coshell cpp cs mam msgcc nmake probe ss \
+ libcoshell libcs libmam libpp libcodex paxlib codexlib \
+ at builtin codex dss dsslib ie mailx mam ncsl pack pzip \
+ re sort sortlib std tksh tw warp libdss libpz \
+ libtksh libtk vczip libvcodex libvgraph libtaso jcl libjcl
+
+:COVERS: ast-base ast-dss
+
+:LICENSE: *.open
+
+:CATEGORY: devel libs mail shells utils
+
+:INDEX: ksh, pax, nmake, sfio, and ast open source commands and libraries
+
+:DESCRIPTION:
+ The AT&T Software Technology ast-open package from AT&T Research
+ contains all of the ast open source commands and libraries.
diff --git a/usr/src/contrib/ast/lib/package/ast-open.req b/usr/src/contrib/ast/lib/package/ast-open.req
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-open.req
diff --git a/usr/src/contrib/ast/lib/package/ast-open.ver b/usr/src/contrib/ast/lib/package/ast-open.ver
new file mode 100644
index 0000000000..de483d2159
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast-open.ver
@@ -0,0 +1 @@
+ast-open 2012-08-01 2012-08-01 1
diff --git a/usr/src/contrib/ast/lib/package/ast.def b/usr/src/contrib/ast/lib/package/ast.def
new file mode 100644
index 0000000000..c5b77229ed
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast.def
@@ -0,0 +1,49 @@
+#
+# ast default license info
+#
+
+message_set=3
+
+contributor+=(
+ [gsf]="Glenn Fowler <gsf@research.att.com>"
+ [dgk]="David Korn <dgk@research.att.com>"
+ [kpv]="Phong Vo <kpv@research.att.com>"
+
+ [aedgar]="Adam Edgar <aedgar@research.att.com>"
+ [alb]="Adam Buchsbaum <alb@adambuchsbaum.com>"
+ [ashaikh]="Aman Shaikh <ashaikh@research.att.com>"
+ [bala]="Bala Krishnamurthy <bala@research.att.com>"
+ [brussell]="Brian Russell <brussell@research.att.com>"
+ [chen]="Robin Chen <chen@research.att.com>"
+ [dfwc]="Don Caldwell <dfwc@research.att.com>"
+ [ek]="Lefty Koutsofios <ek@research.att.com>"
+ [gruber]="Bob Gruber <bob.gruber@gmail.com>"
+ [jiawang]="Jia Wang <jiawang@research.att.com>"
+ [jkf]="Jeff Fellin <jkf@research.att.com>"
+ [jlk]="Jeff Korn <@google.com>"
+ [kfisher]="Kathleen Fisher <kfisher@research.att.com>"
+ [kwc]="Ken Church <@microsoft.com>"
+
+ [bwk]="Brian Kernigham <bwk@research.bell-labs.com>"
+ [dmr]="Dennis Ritchie <dmr@research.bell-labs.com>"
+ [doug]="Doug McIlroy <doug@research.bell-labs.com>"
+ [ekrell]="Eduardo Krell <ekrell@adexus.cl>"
+ [jjs]="John Snyder <jjs@adexus.cl>"
+ [rao]="Herman Rao <rao@fareastone.att.com.tw>"
+
+ [ast-users]="AST users mailgroup <ast-users@research.att.com>"
+ [ast-developers]="AST developers mailgroup <ast-developers@research.att.com>"
+)
+
+license+=(
+ organization="Information and Software Systems Research"
+ domain=research.att.com
+ parent="AT&T"
+ corporation="Intellectual Property"
+ company="Research"
+ location="Florham Park NJ"
+
+ package=ast
+ since=1986
+ author=gsf+dgk+kpv
+)
diff --git a/usr/src/contrib/ast/lib/package/ast.lic b/usr/src/contrib/ast/lib/package/ast.lic
new file mode 100644
index 0000000000..225faa6fff
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ast.lic
@@ -0,0 +1,5 @@
+. ast.def
+. epl.def
+license+=(
+ start=2011
+)
diff --git a/usr/src/contrib/ast/lib/package/bsd.def b/usr/src/contrib/ast/lib/package/bsd.def
new file mode 100644
index 0000000000..21a6e33a1c
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/bsd.def
@@ -0,0 +1,45 @@
+message_set=18
+
+contributor+=(
+ [bj]="Bill Joy"
+)
+
+license+=(
+ company="The Regents of the University of California"
+
+ package=BSD
+ since=1979
+
+ type=bsd
+ name="${license.package} Open Source"
+ url=http://www.opensource.org/licenses/bsd-license
+ urlmd5=5bfd485a7ffdb6249d1097da94ae75fc
+
+ notice='
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+3. Neither the name of the University nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+'
+)
diff --git a/usr/src/contrib/ast/lib/package/bsd.lic b/usr/src/contrib/ast/lib/package/bsd.lic
new file mode 100644
index 0000000000..874a89d822
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/bsd.lic
@@ -0,0 +1 @@
+. bsd.def
diff --git a/usr/src/contrib/ast/lib/package/epl.def b/usr/src/contrib/ast/lib/package/epl.def
new file mode 100644
index 0000000000..60eea6b85b
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/epl.def
@@ -0,0 +1,8 @@
+license+=(
+ type=epl
+ id=eclipse
+ name="Eclipse Public License"
+ version=1.0
+ url=http://www.eclipse.org/org/documents/${license.type}-v${license.version//./}.html
+ urlmd5=b35adb5213ca9657e911e9befb180842
+)
diff --git a/usr/src/contrib/ast/lib/package/ksh.pkg b/usr/src/contrib/ast/lib/package/ksh.pkg
new file mode 100644
index 0000000000..4783527e4c
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/ksh.pkg
@@ -0,0 +1,14 @@
+ksh :PACKAGE:
+
+:LICENSE: *.open
+
+:CATEGORY: shells
+
+:INDEX: standalone AT&T ksh executable
+
+:DESCRIPTION:
+ The AT&T Software Technology ksh package from AT&T Research
+ contains the AT&T ksh executable implemented by David Korn.
+ The download file is a gzipped ksh executable. If you want
+ to build ksh from the source then download one of the ast-ksh,
+ ast-base or ast-open packages.
diff --git a/usr/src/contrib/ast/lib/package/package.mk b/usr/src/contrib/ast/lib/package/package.mk
new file mode 100644
index 0000000000..921fa2d4df
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/package.mk
@@ -0,0 +1,1537 @@
+/*
+ * source and binary package support
+ *
+ * @(#)package.mk (AT&T Research) 2012-02-14
+ *
+ * usage:
+ *
+ * cd $INSTALLROOT/lib/package
+ * nmake -f name [closure] [cyg|exp|lcl|pkg|rpm|tgz] [base|delta] type
+ *
+ * where:
+ *
+ * name package description file or component
+ *
+ * type source build source archive, generates
+ * $(PACKAGEDIR)/name.version.release.suffix
+ * binary build binary archive, generates
+ * $(PACKAGEDIR)/name.version.hosttype.release.suffix
+ * runtime build binary archive, generates
+ * $(PACKAGEDIR)/name-run.version.hosttype.release.suffix
+ *
+ * NOTE: $(PACKAGEDIR) is in the lowest view and is shared among all views
+ *
+ * generated archive member files are $(PACKAGEROOT) relative
+ *
+ * main assertions:
+ *
+ * NAME [ name=value ] :PACKAGE: component ...
+ * :OMIT: component ...
+ * :LICENSE: license-class-pattern
+ * :CATEGORY: category-id ...
+ * :COVERS: package ...
+ * :REQURES: package ...
+ * :INDEX: index description line
+ * :DESCRIPTION:
+ * [ verbose description ]
+ * :DETAILS: style
+ * :README:
+ * readme lines
+ * :EXPORT:
+ * name=value
+ * target :INSTALL: [ source ]
+ *
+ * option variables, shown with default values
+ *
+ * format=tgz
+ * archive format
+ *
+ * version=YYYY-MM-DD
+ * package base version (overrides current date)
+ *
+ * release=YYYY-MM-DD
+ * package delta release (overrides current date)
+ *
+ * license=type.class
+ * :LICENSE: type.class pattern override
+ *
+ * notice=1
+ * include the conspicuous empty notice file
+ *
+ * copyright=0
+ * do not prepend source file copyright notice
+ *
+ * strip=0
+ * don't strip non-lcl binary package members
+ *
+ * variants=pattern
+ * include variants matching pattern in binary packages
+ *
+ * incremental=[source:1 binary:0]
+ * if a base archive is generated then also generate an
+ * incremental delta archive from the previous base
+ *
+ * NOTE: the Makerules.mk :PACKAGE: operator defers to :package: when
+ * a target is specified
+ */
+
+/* these are ast centric -- we'll parameterize another day */
+
+org = ast
+url = http://www.research.att.com/sw/download
+
+/* generic defaults */
+
+base =
+category = utils
+checksum = md5
+closure =
+copyright = 1
+delta =
+format = tgz
+incremental =
+index =
+init = INIT
+license =
+licenses = $(org)
+mamfile = 1
+opt =
+name =
+notice =
+release =
+strip = 0
+style = tgz
+suffix = tgz
+type =
+variants = !(cc-g)
+vendor =
+version = $("":T=R%Y-%m-%d)
+
+SUM = sum
+
+package.notice = ------------ NOTICE -- LICENSED SOFTWARE -- SEE README FOR DETAILS ------------
+
+package.readme = $(@.package.readme.)
+
+.package.readme. :
+ This is a package root directory $PACKAGEROOT. Source and binary
+ packages in this directory tree are controlled by the command
+ $()
+ bin/package
+ $()
+ Binary files may be in this directory or in the install root directory
+ $()
+ INSTALLROOT=$PACKAGEROOT/arch/`bin/package`
+ $()
+ For more information run
+ $()
+ bin/package help
+ $()
+ Many of the packaged commands self-document via the --man and --html
+ options; those that do have no separate man page.
+ $()
+ Each package is covered by one of the license files
+ $()
+ $(PACKAGELIB)/LICENSES/<license>
+ $()
+ where <license> is the license type for the package. At the top
+ of each license file is a URL; the license covers all software that
+ refers to this URL. For details run
+ $()
+ bin/package license [<package>]
+ $()
+ Any archives, distributions or packages made from source or
+ binaries covered by license(s) must contain the corresponding
+ license file(s)$(notice:?, this README file, and the empty file$$("\n")$$(package.notice)?.?)
+
+.package.licenses. : .FUNCTION
+ local I F L R T all save text
+ L := $(%)
+ while L == "--*"
+ I := $(L:O=1)
+ if I == "--all"
+ all = 1
+ elif I == "--save"
+ save = 1
+ elif I == "--text"
+ text = 1
+ end
+ L := $(L:O>1)
+ end
+ if "$(L)" == "*-*"
+ L += $(L:/[^-]*-//) $(L:/-.*//)
+ end
+ L += $(licenses)
+ for I $(L:U)
+ if I == "gpl"
+ I = gnu
+ all =
+ end
+ if F = "$(I:D=$(PACKAGESRC):B:S=.lic:T=F)"
+ R += $(F)
+ if save || text
+ T := $(.FIND. lib/package .lic $(F):P=W,query=type)
+ R += $(T:D=$(PACKAGESRC)/LICENSES:B)
+ end
+ if save
+ R += $(F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F)
+ elif ! all
+ break
+ end
+ end
+ end
+ return $(R)
+
+/*
+ * glob(3) doesn't handle / in alternation -- should it?
+ */
+
+.package.glob. : .FUNCTION
+ local A D I P S
+ for I $(%)
+ if I == "*/*"
+ D := $(I:C,/.*,,)
+ if ! "$(A:N=$(D))"
+ local S.$(D)
+ A += $(D)
+ end
+ S.$(D) += $(I:C,[^/]*/,,)
+ else
+ P := $(P)$(S)$(I)
+ end
+ S = |
+ end
+ if P == "*\|*"
+ P := ($(P))
+ end
+ for I $(A)
+ P += $(I)/$(.package.glob. $(S.$(I)))
+ end
+ return $(P)
+
+
+.MAKEINIT : .package.init
+
+.package.init : .MAKE .VIRTUAL .FORCE
+ local V
+ V := $(VROOT:T=F:P=L*)
+ if ! PACKAGEROOT
+ PACKAGEROOT := $(V:N!=*/arch/+([!/]):O=1)
+ end
+ if V == "$(PACKAGEROOT)"
+ V :=
+ end
+ V += $(INSTALLROOT) $(PACKAGEROOT)
+ PACKAGEVIEW := $(V:H=RU)
+ INSTALLOFFSET := $(INSTALLROOT:C%$(PACKAGEROOT)/%%)
+ if license
+ license := $(license)|none.none
+ end
+
+PACKAGELIB = lib/package
+PACKAGESRC = $(PACKAGEROOT)/$(PACKAGELIB)
+PACKAGEBIN = $(INSTALLROOT)/$(PACKAGELIB)
+PACKAGEDIR = $(PACKAGESRC)/$(style)
+INSTALLOFFSET = $(INSTALLROOT:C%$(PACKAGEROOT)/%%)
+
+package.omit = -|*/$(init)
+package.glob.all = $(INSTALLROOT)/src/*/*/($(MAKEFILES:/:/|/G))
+package.all = $(package.glob.all:P=G:W=O=$(?$(name):A=.VIRTUAL):N!=$(package.omit):T=F:$(PACKAGEVIEW:C,.*,C;^&/;;,:/ /:/G):U)
+package.glob.pkg = $(.package.glob. $(~$(name):P=U):C%.*%$(INSTALLROOT)/src/*/&/($(MAKEFILES:/:/|/G))%) $(~$(name):P=U:N=$(name):?$$(INSTALLROOT)/src/$$(name)/($$(MAKEFILES:/:/|/G))??)
+package.pkg = $(package.glob.pkg:P=G:D:N!=$(package.omit):T=F:$(PACKAGEVIEW:C,.*,C;^&/;;,:/ /:/G):U)
+package.closure = $(closure:?$$(package.all)?$$(package.pkg)?)
+
+package.init = $(.package.glob. $("$(init)$(name)":P=U):C%.*%$(INSTALLROOT)/src/*/&/($(MAKEFILES:/:/|/G))%:P=G:T=F:D::B)
+package.ini = ignore mamprobe manmake package silent
+package.src.pat = $(PACKAGESRC)/($(name).(ini|pkg))
+package.src = $(package.src.pat:P=G) $(.package.licenses. --save $(name))
+package.bin = $(PACKAGEBIN)/$(name).ini
+
+package.mam = --never --force --mam=static --corrupt=accept --clobber --compare --link='lib*.a*' CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test
+
+op = current
+stamp = [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
+source = $(PACKAGEDIR)/$(name).$(version)$(release:?.$(release)??).$(suffix)
+binary = $(PACKAGEDIR)/$(name).$(version)$(release:?.$(release)??).$(CC.HOSTTYPE).$(suffix)
+runtime = $(PACKAGEDIR)/$(name)-run.$(version)$(release:?.$(release)??).$(CC.HOSTTYPE).$(suffix)
+old.new.source = $(PACKAGEDIR)/$(name).$(version).$(old.version).$(suffix)
+old.new.binary = $(PACKAGEDIR)/$(name).$(version).$(old.version).$(CC.HOSTTYPE).$(suffix)
+old.new.runtime = $(PACKAGEDIR)/$(name)-run.$(version).$(old.version).$(CC.HOSTTYPE).$(suffix)
+
+source.list = $("$(PACKAGEDIR)/$(name).*$(stamp).$(suffix)":P=G:H=R)
+binary.list = $("$(PACKAGEDIR)/$(name).*$(stamp).$(CC.HOSTTYPE).$(suffix)":P=G:H=R)
+runtime.list = $("$(PACKAGEDIR)/$(name)-run.*$(stamp).$(CC.HOSTTYPE).$(suffix)":P=G:H>)
+
+source.ratz = $("$(INSTALLROOT)/src/cmd/$(init)/ratz.c":T=F)
+binary.ratz = $("$(INSTALLROOT)/src/cmd/$(init)/ratz":T=F)
+
+$(init) : .VIRTUAL $(init)
+
+package.requires = 0
+
+":package:" : .MAKE .OPERATOR
+ local P I R V
+ P := $(<:O=1)
+ $(P) : $(>:V)
+ if ! package.requires
+ if ! name
+ name := $(P)
+ .PACKAGE. := $(P)
+ if name == "$(init)"
+ package.omit = -
+ package.src += $(package.ini:C,^,$(PACKAGEROOT)/bin/,) $(PACKAGESRC)/package.mk
+ else
+ $(P) : $(package.init)
+ end
+ for I $(<:O>1)
+ if I == "*=*"
+ eval
+ $(I)
+ end
+ else
+ version := $(I)
+ end
+ end
+ LICENSEFILEDEFAULT := $(.package.licenses. $(name):@/ /:/G)
+ export LICENSEFILEDEFAULT
+ end
+ if "$(>)"
+ for I $(>:V)
+ $(I) : .VIRTUAL
+ if I == "/*"
+ package.dir += $(I:V)
+ end
+ end
+ end
+ if "$(@)"
+ $(P).README := $(@)
+ else
+ $(P).README := This is the $(P) package.
+ end
+ end
+
+":AUXILIARY:" : .MAKE .OPERATOR
+ package.auxiliary.$(style) += $(>:N=/*:T=F) $(>:N!=/*:C%^%$(INSTALLROOT)/%:T=F)
+
+":CATEGORY:" : .MAKE .OPERATOR
+ if ! package.requires
+ category := $(>)
+ end
+
+.covers. : .FUNCTION
+ local I C D F K=0 L
+ for I $(%)
+ if ! "$(~covers:N=$(I:B))"
+ if F = "$(I:D:B:S=.pkg:T=F)"
+ if D = "$(F:T=I)"
+ covers : $(I:B)
+ for L $(D)
+ if L == ":COVERS:"
+ K = 1
+ elif L == ":*:"
+ if K
+ break
+ end
+ elif K
+ : $(.covers. $(L))
+ end
+ end
+ end
+ else
+ error $(--exec:?3?1?) $(I): unknown package $(I)
+ end
+ end
+ end
+
+":COVERS:" : .MAKE .OPERATOR
+ if ! package.requires
+ : $(.covers. $(>))
+ end
+
+":DESCRIPTION:" : .MAKE .OPERATOR
+ if ! package.requires
+ $(name).README := $(@:V)
+ end
+
+":DETAILS:" : .MAKE .OPERATOR
+ if ! package.requires
+ details.$(>:O=1) := $(@:V)
+ end
+
+":EXPORT:" : .MAKE .OPERATOR
+ if ! package.requires
+ export.$(style) := $(@:/$$("\n")/ /G)
+ end
+
+":INDEX:" : .MAKE .OPERATOR
+ if ! package.requires
+ index := $(>)
+ end
+
+":INSTALL:" : .MAKE .OPERATOR
+ if ! package.requires
+ local T S F X
+ S := $(>)
+ T := $(<)
+ if "$(exe.$(style))" && "$(T)" == "bin/*([!./])"
+ T := $(T).exe
+ end
+ if ! "$(S)"
+ S := $(T)
+ elif "$(exe.$(style))" && "$(S)" == "bin/*([!./])"
+ S := $(S).exe
+ end
+ install.$(style) := $(install.$(style):V)$("\n")install : $$(ROOT)/$(T)$("\n")$$(ROOT)/$(T) : $$(ARCH)/$(S)$("\n\t")cp $< $@
+ if strip && "$(T:N=*.exe)"
+ install.$(style) := $(install.$(style):V)$("\n\t")strip $@ 2>/dev/null
+ end
+ X := $(PACKAGEROOT)/arch/$(CC.HOSTTYPE)/$(S)
+ if strip && "$(X:T=Y)" == "*/?(x-)(dll|exe)"
+ F := filter $(STRIP) $(STRIPFLAGS) $(X)
+ end
+ if "$(filter.$(style):V)"
+ filter.$(style) := $(filter.$(style):V)$$("\n")
+ end
+ filter.$(style) := $(filter.$(style):V);;$(F);$(X);usr/$(T)
+ end
+
+":LICENSE:" : .MAKE .OPERATOR
+ if ! package.requires && ! license
+ license := $(>)
+ end
+
+":OMIT:" : .MAKE .OPERATOR
+ if ! package.requires
+ package.omit := $(package.omit)|$(>:C,^,*/,:/ /|/G)
+ end
+
+":POSTINSTALL:" : .MAKE .OPERATOR
+ if ! package.requires
+ postinstall.$(style) := $(@:V)
+ end
+
+":README:" : .MAKE .OPERATOR
+ if ! package.requires
+ readme.$(style) := $(@:V)
+ end
+
+.requires. : .FUNCTION
+ local I C D F K=0 L V T M=0
+ for I $(%)
+ if ! "$(~requires:N=$(I:B))"
+ if F = "$(I:D:B:S=.pkg:T=F)"
+ if I == "$(init)"
+ package.omit = -
+ else
+ requires : $(I:B)
+ end
+ if V = "$(I:D:B=gen/$(I:B):S=.ver:T=F)"
+ req : $(I:B)
+ else
+ error 1 $(I): package should be written before $(P)
+ end
+ let package.requires = package.requires + 1
+ include "$(F)"
+ let package.requires = package.requires - 1
+ else
+ error 1 $(I): package not found
+ end
+ end
+ end
+
+":REQUIRES:" : .MAKE .OPERATOR
+ : $(.requires. $(>))
+
+":TEST:" : .MAKE .OPERATOR
+ if ! package.requires
+ local T
+ T := $(>)
+ if "$(T)" == "bin/*([!./])"
+ if "$(exe.$(style))"
+ T := $(T).exe
+ end
+ T := $$(PWD)/$$(ARCH)/$(T)
+ end
+ test.$(style) := $(test.$(style):V)$("\n")test : $(T:V)$("\n\t")$(@)
+ end
+
+base delta : .MAKE .VIRTUAL .FORCE
+ op := $(<)
+
+closure : .MAKE .VIRTUAL .FORCE
+ $(<) := 1
+
+cyg exp lcl pkg rpm tgz : .MAKE .VIRTUAL .FORCE
+ style := $(<)
+
+source : .source.init .source.gen .source.$$(style)
+
+.source.init : .MAKE
+ local A B D P V I
+ type := source
+ if ! "$(incremental)"
+ incremental = 1
+ end
+ if "$(source.$(name))"
+ suffix = c
+ end
+ : $(.init.$(style))
+ : $(details.$(style):V:R) :
+ A := $(source.list)
+ B := $(A:N=*.$(stamp).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+ P := $(A:N=*.$(stamp).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+ D := $(A:N=*.$(stamp).$(stamp).$(suffix):O=1:T=F)
+ if op == "delta"
+ if ! B
+ error 3 delta requires a base archive
+ end
+ base := -z $(B)
+ deltaversion := $(B:B:/$(name).//)
+ let deltasince = $(deltaversion:/.*-//) + 1
+ deltasince := $(deltaversion:/[^-]*$/$(deltasince:F=%02d)/)
+ if "$(release)" != "$(stamp)"
+ release := $("":T=R%Y-%m-%d)
+ end
+ source := $(B:D:B:S=.$(release).$(suffix))
+ version := $(source:B:B:/$(name).//)
+ elif B || op == "base"
+ if op == "base"
+ for I $(B) $(P)
+ V := $(I:B:/$(name)\.\([^.]*\).*/\1/)
+ if V == "$(stamp)" && V != "$(version)"
+ old.version := $(V)
+ old.source := $(I)
+ if "$(old.version)" >= "$(version)"
+ error 3 $(name): previous base $(old.version) is newer than $(version)
+ end
+ break
+ end
+ end
+ else
+ source := $(B)
+ end
+ if B == "$(source)"
+ if "$(B:D:B:B)" == "$(D:D:B:B)" && "$(B:B::S)" != "$(D:B::S)"
+ error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+ end
+ error 1 $(B:B:S): replacing current base
+ end
+ version := $(source:B:S:/^$(name).\(.*\).$(suffix)$/\1/)
+ end
+ PACKAGEGEN := $(PACKAGESRC)/gen
+
+.source.gen : $$(PACKAGEDIR) $$(PACKAGEGEN) $$(PACKAGEGEN)/SOURCE.html $$(PACKAGEGEN)/BINARY.html $$(PACKAGEGEN)/DETAILS.html
+
+BINPACKAGE := $(PATH:/:/ /G:X=package:T=F:O=1)
+
+$$(PACKAGEDIR) $$(PACKAGEGEN) : .IGNORE
+ [[ -d $(<) ]] || mkdir $(<)
+
+$$(PACKAGEGEN)/SOURCE.html : $(BINPACKAGE)
+ $(*) html source > $(<)
+
+$$(PACKAGEGEN)/BINARY.html : $(BINPACKAGE)
+ $(*) html binary > $(<)
+
+$$(PACKAGEGEN)/DETAILS.html : $(BINPACKAGE)
+ $(*) html intro > $(<)
+
+.source.exp .source.pkg .source.rpm : .MAKE
+ error 3 $(style): source package style not supported yet
+
+exe.cyg = .exe
+vendor.cyg = gnu
+
+.name.cyg : .FUNCTION
+ local N
+ N := $(%)
+ if N == "*-*"
+ vendor := $(N:/-.*//)
+ if vendor == "$(vendor.cyg)"
+ vendor :=
+ N := $(N:/[^-]*-//)
+ end
+ N := $(N:/-//G)
+ end
+ return $(N)
+
+.init.cyg : .FUNCTION
+ local N O
+ closure = 1
+ init = .
+ strip = 1
+ suffix = tar.bz2
+ format = tbz
+ vendor := $(licenses:N!=$(vendor.cyg):O=1)
+ package.ini := $(package.ini)
+ package.src.pat := $(package.src.pat)
+ package.src := $(package.src)
+ package.bin := $(package.bin)
+ .source.gen : .CLEAR $(*.source.gen:V:N!=*.html)
+ name.original := $(name)
+ name := $(.name.cyg $(name))
+ if name != "$(name.original)"
+ $(name) : $(~$(name.original))
+ O := $(~covers)
+ covers : .CLEAR
+ for N $(O)
+ covers : $(.name.cyg $(N))
+ end
+ end
+ stamp = [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9]
+ version.original := $(version)
+ version := $(version:/-//G)-1
+ if opt
+ opt := $(opt)/$(vendor)/
+ else
+ opt := $(name)-$(version)/
+ end
+ if type == "source"
+ version := $(version)-src
+ source = $(PACKAGEDIR)/$(name)-$(version)$(release:?.$(release)??).$(suffix)
+ else
+ binary = $(PACKAGEDIR)/$(name)-$(version)$(release:?.$(release)??).$(suffix)
+ end
+
+.source.cyg :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ integer m=0 o
+ cat > $tmp/configure <<'!'
+ echo "you didn't have to do that"
+ !
+ chmod +x $tmp/configure
+ echo ";;;$tmp/configure;configure"
+ cat > $tmp/Makefile0 <<'!'
+ HOSTTYPE := $$(shell bin/package)
+ ROOT = ../..
+ ARCH = arch/$$(HOSTTYPE)
+ all :
+ PACKAGEROOT= CYGWIN="$$CYGWIN ntsec binmode" bin/package make $(export.$(style))
+ install : all
+ $(install.$(style):V)
+ $(test.$(style):V)
+ !
+ echo ";;;$tmp/Makefile0;Makefile"
+ cat > $tmp/CYGWIN-README <<'!'
+ $(readme.$(style):@?$$(readme.$$(style))$$("\n\n")??)To build binaries from source into the ./arch/`bin/package` tree run:
+ $()
+ make
+ $()
+ $(test.$(style):@?To test the binaries after building/installing run:$$("\n\n\t")make test$$("\n\n")??)To build and/or install the binaries run:
+ $()
+ make install
+ $()
+ The bin/package command provides a command line interface for all package
+ operations. The $(opt:/.$//) source and binary packages were generated by:
+ $()
+ package write cyg base source version=$(version.original) $(name.original)
+ package write cyg base binary version=$(version.original) $(name.original)
+ $()
+ using the $(org)-base package. To download and install the latest
+ $(org)-base source package in /opt/$(org) run:
+ $()
+ PATH=/opt/$(org)/bin:$PATH
+ cd /opt/$(org)
+ package authorize "NAME" password "PASSWORD" setup flat source $("\\")
+ $(url) $("\\")
+ $(org)-base
+ package make
+ $()
+ and export /opt/$(org)/bin in PATH to use. The NAME and PASSWORD signify your
+ agreement to the software license(s). All users get the same NAME and PASSWORD.
+ See $(url) for details. If multiple architectures may be built under
+ /opt/$(org) then drop "flat" and export /opt/$(org)/arch/`package`/bin in PATH
+ to use. To update previously downloaded packages from the same url simply run:
+ $()
+ cd /opt/$(org)
+ package setup
+ package make
+ $()
+ To download and install the latest $(org)-base binary package in
+ /opt/$(org) change "source" to "binary" and omit "package make".
+ !
+ echo ";;;$tmp/CYGWIN-README;CYGWIN-PATCHES/README"
+ cat > $(source:/-src.$(suffix)//).setup.hint <<'!'
+ category: $(category:/\(.\).*/\1/U)$(category:/.\(.*\)/\1/L)
+ requires: cygwin
+ sdesc: "$(index)"
+ ldesc: "$($(name.original).README)"
+ !
+ echo ";;;$(source:/-src.$(suffix)//).setup.hint;CYGWIN-PATCHES/setup.hint"
+ echo ";;;$(BINPACKAGE);bin/package"
+ cat > $tmp/Makefile <<'!'
+ :MAKE:
+ !
+ echo ";;;$tmp/Makefile;src/Makefile"
+ echo ";;;$tmp/Makefile;src/cmd/Makefile"
+ echo ";;;$tmp/Makefile;src/lib/Makefile"
+ if [[ '$(mamfile)' == 1 ]]
+ then cat > $tmp/Mamfile1 <<'!'
+ info mam static
+ note source level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ echo ";;;$tmp/Mamfile1;src/Mamfile"
+ cat > $tmp/Mamfile2 <<'!'
+ info mam static
+ note component level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ echo ";;;$tmp/Mamfile2;src/cmd/Mamfile"
+ echo ";;;$tmp/Mamfile2;src/lib/Mamfile"
+ fi
+ $(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+ echo ";;;$(PACKAGEGEN)/$(name.original).req"
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+ then if [[ '$(mamfile)' == 1 ]]
+ then (( o=m ))
+ s=$( $(MAKE) --noexec --recurse=list recurse 2>/dev/null )
+ if [[ $s ]]
+ then for j in $s
+ do if [[ -d $j ]]
+ then cd $j
+ if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+ then (( m++ ))
+ $(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
+ fi
+ cd $(INSTALLROOT)/$i
+ fi
+ done
+ if (( o != m ))
+ then (( m++ ))
+ cat > $tmp/$m.mam <<'!'
+ info mam static
+ note subcomponent level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ echo ";;;$tmp/$m.mam;$i/Mamfile"
+ fi
+ else (( m++ ))
+ $(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/Mamfile"
+ fi
+ fi
+ $(MAKE) --noexec $(-) $(=) recurse list.package.$(type) package.license.class=$(license:Q)
+ fi
+ done
+ set -- $(package.dir:P=G)
+ for i
+ do tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+ done
+ } |
+ {
+ : > $tmp/HEAD
+ cat > $tmp/README <<'!'
+ $(package.readme)
+ !
+ echo ";;;$tmp/README;README"
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ --format=$(format) \
+ --local \
+ -wvf $(source) $(base) \
+ $(PACKAGEVIEW:C%.*%-s",^&/,,"%) \
+ $(vendor:?-s",^[^/],$(opt)&,"??)
+ $(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+ rm -rf $tmp
+ fi
+
+.source.lcl :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ integer m=0 o
+ $(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ $(MAKE) --noexec $(-) $(=) .FILES.+=Mamfile recurse list.package.local
+ done
+ set -- $(package.dir:P=G)
+ for i
+ do tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+ done
+ } |
+ sort -t';' -k5,5 -u |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ -wvf $(source) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ $(PACKAGEVIEW:C%.*%-s",^&/,,"%)
+ rm -rf $tmp
+ fi
+
+.source.tgz :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ integer m=0 o
+ if [[ '$(init)' == '$(name)' ]]
+ then cat > $tmp/Makefile <<'!'
+ :MAKE:
+ !
+ $(CMP) $(CMPFLAGS) $tmp/Makefile $(PACKAGEROOT)/src/Makefile && touch -r $(PACKAGEROOT)/src/Makefile $tmp/Makefile
+ echo ";;;$tmp/Makefile;src/Makefile"
+ cp $tmp/Makefile $tmp/Makefile1
+ $(CMP) $(CMPFLAGS) $tmp/Makefile1 $(PACKAGEROOT)/src/cmd/Makefile && touch -r $(PACKAGEROOT)/src/cmd/Makefile $tmp/Makefile1
+ echo ";;;$tmp/Makefile1;src/cmd/Makefile"
+ cp $tmp/Makefile $tmp/Makefile2
+ $(CMP) $(CMPFLAGS) $tmp/Makefile2 $(PACKAGEROOT)/src/lib/Makefile && touch -r $(PACKAGEROOT)/src/lib/Makefile $tmp/Makefile2
+ echo ";;;$tmp/Makefile2;src/lib/Makefile"
+ if [[ '$(mamfile)' == 1 ]]
+ then cat > $tmp/Mamfile1 <<'!'
+ info mam static
+ note source level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ $(CMP) $(CMPFLAGS) $tmp/Mamfile1 $(PACKAGEROOT)/src/Mamfile && touch -r $(PACKAGEROOT)/src/Mamfile $tmp/Mamfile1
+ echo ";;;$tmp/Mamfile1;src/Mamfile"
+ cat > $tmp/Mamfile2 <<'!'
+ info mam static
+ note component level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ $(CMP) $(CMPFLAGS) $tmp/Mamfile2 $(PACKAGEROOT)/src/cmd/Mamfile && touch -r $(PACKAGEROOT)/src/cmd/Mamfile $tmp/Mamfile2
+ echo ";;;$tmp/Mamfile2;src/cmd/Mamfile"
+ cp $tmp/Mamfile2 $tmp/Mamfile3
+ $(CMP) $(CMPFLAGS) $tmp/Mamfile3 $(PACKAGEROOT)/src/lib/Mamfile && touch -r $(PACKAGEROOT)/src/lib/Mamfile $tmp/Mamfile3
+ echo ";;;$tmp/Mamfile3;src/lib/Mamfile"
+ fi
+ fi
+ $(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+ if [[ '$(~covers)' ]]
+ then for i in $(~covers)
+ do for j in lib pkg
+ do if [[ -f $(PACKAGESRC)/$i.$j ]]
+ then echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ for j in ver req
+ do if [[ -f $(PACKAGEGEN)/$i.$j ]]
+ then echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ done
+ for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+ do echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+ done
+ fi
+ if [[ '$(PACKAGEDIR:B)' == '$(style)' ]]
+ then echo $(name) $(version) $(release|version) 1 > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).ver || cp $tmp/t $(PACKAGEGEN)/$(name).ver
+ echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+ sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).req || cp $tmp/t $(PACKAGEGEN)/$(name).req
+ echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).inx || cp $tmp/t $(PACKAGEGEN)/$(name).inx
+ {
+ {
+ echo '$($(name).README)'
+ if [[ '$(~covers)' ]]
+ then echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+ fi
+ if [[ '$(~requires)' ]]
+ then echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+ fi
+ } | fmt
+ package help source
+ package release $(name)
+ } > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).README || cp $tmp/t $(PACKAGEGEN)/$(name).README
+ echo ";;;$(PACKAGEGEN)/$(name).README;$(PACKAGELIB)/$(name).README"
+ {
+ echo '.xx title="$(name) package"'
+ echo '.xx meta.description="$(name) package"'
+ echo '.xx meta.keywords="software, package"'
+ echo '.MT 4'
+ echo '.TL'
+ echo '$(name) package'
+ echo '.H 1 "$(name) package"'
+ echo '$($(name).README)'
+ set -- $(package.closure:C,.*,$(INSTALLROOT)/&/PROMO.mm,:T=F:D::B)
+ hot=
+ for i
+ do hot="$hot -e s/\\(\\<$i\\>\\)/\\\\h'0*1'\\1\\\\h'0'/"
+ done
+ set -- $(package.closure:B)
+ if (( $# ))
+ then echo 'Components in this package:'
+ echo '.P'
+ echo '.TS'
+ echo 'center expand;'
+ echo 'l l l l l l.'
+ if [[ $hot ]]
+ then hot="sed $hot"
+ else hot=cat
+ fi
+ for i
+ do echo $i
+ done |
+ pr -6 -t -s' ' |
+ $hot
+ echo '.TE'
+ fi
+ echo '.P'
+ if [[ '$(~covers)' ]]
+ then echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+ fi
+ if [[ '$(~requires)' ]]
+ then echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+ fi
+ set -- $(.package.licenses. --all $(name))
+ case $# in
+ 0) ;;
+ *) case $# in
+ 1) echo 'The software is covered by this license:' ;;
+ *) echo 'The software is covered by these licenses:' ;;
+ esac
+ echo .BL
+ for j
+ do i=$( $(PROTO) -l $j -p -h -o type=usage /dev/null | sed -e 's,.*\[-license?\([^]]*\).*,\1,' )
+ echo .LI
+ echo ".xx link=\"$i\""
+ done
+ echo .LE
+ echo 'Individual components may be covered by separate licenses;'
+ echo 'refer to the component source and/or binaries for more information.'
+ echo .P
+ ;;
+ esac
+ echo 'A recent'
+ echo '.xx link="release change log"'
+ echo 'is also included.'
+ cat $(package.closure:C,.*,$(INSTALLROOT)/&/PROMO.mm,:T=F) < /dev/null
+ echo '.H 1 "release change log"'
+ echo '.xx index'
+ echo '.nf'
+ package release $(name) |
+ sed -e 's/:::::::: \(.*\) ::::::::/.fi\$("\n").H 1 "\1 changes"\$("\n").nf/'
+ echo '.fi'
+ } |
+ $(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $tmp/t
+ $(STDED) $(STDEDFLAGS) $tmp/t <<'!'
+ /^<!--LABELS-->$/,/^<!--\/LABELS-->$/s/ changes</</
+ /^<!--LABELS-->$/,/^<!--\/LABELS-->$/m/<A name="release change log">/
+ w
+ q
+ !
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).html || cp $tmp/t $(PACKAGEGEN)/$(name).html
+ echo ";;;$(PACKAGEGEN)/$(name).html;$(PACKAGELIB)/$(name).html"
+ if [[ '$(deltasince)' ]]
+ then {
+ echo '.xx title="$(name) package"'
+ echo '.xx meta.description="$(name) package $(version) delta $(release)"'
+ echo '.xx meta.keywords="software, package, delta"'
+ echo '.MT 4'
+ echo '.TL'
+ echo '$(name) package $(deltaversion) delta $(release)'
+ echo '.H 1 "$(name) package $(deltaversion) delta $(release) changes"'
+ echo '.nf'
+ package release $(deltasince) $(name) |
+ sed -e 's/:::::::: \(.*\) ::::::::/.H 2 \1/'
+ echo '.fi'
+ } |
+ $(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).$(release).html || cp $tmp/t $(PACKAGEGEN)/$(name).$(release).html
+ echo ";;;$(PACKAGEGEN)/$(name).$(release).html;$(PACKAGELIB)/$(name).$(release).html"
+ fi
+ fi
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+ then if [[ '$(mamfile)' == 1 ]]
+ then (( o=m ))
+ s=$( $(MAKE) --noexec --recurse=list recurse 2>/dev/null )
+ if [[ $s ]]
+ then for j in $s
+ do if [[ -d $j ]]
+ then cd $j
+ if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+ then (( m++ ))
+ $(MAKE) $(package.mam) > $tmp/$m.mam
+ $(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/$j/Mamfile && touch -r $(PACKAGEROOT)/$i/$j/Mamfile $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
+ fi
+ cd $(INSTALLROOT)/$i
+ fi
+ done
+ if (( o != m ))
+ then (( m++ ))
+ cat > $tmp/$m.mam <<'!'
+ info mam static
+ note subcomponent level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ $(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/Mamfile && touch -r $(PACKAGEROOT)/$i/Mamfile $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/Mamfile"
+ fi
+ else (( m++ ))
+ $(MAKE) $(package.mam) > $tmp/$m.mam
+ $(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/Mamfile && touch -r $(PACKAGEROOT)/$i/Mamfile $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/Mamfile"
+ fi
+ fi
+ $(MAKE) --noexec $(-) $(=) recurse list.package.$(type) package.license.class=$(license:Q) $(copyright:N=1:??LICENSE=?)
+ fi
+ done
+ set -- $(package.dir:P=G)
+ for i
+ do tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+ done
+ } |
+ {
+ : > $tmp/HEAD
+ [[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+ cat > $tmp/README <<'!'
+ $(package.readme)
+ !
+ echo ";;;$tmp/README;README"
+ $(CMP) $(CMPFLAGS) $tmp/README $(PACKAGEROOT)/README && touch -r $(PACKAGEROOT)/README $tmp/README
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ -wvf $(source) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ $(PACKAGEVIEW:C%.*%-s",^&/,,"%)
+ $(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+ echo local > $(source:D:B=$(name):S=.tim)
+ if [[ '$(incremental)' == 1 && '$(old.source)' ]]
+ then $(PAX) -rf $(source) -wvf $(old.new.source) -z $(old.source)
+ $(SUM) -x $(checksum) < $(old.new.source) > $(old.new.source:D:B:S=.$(checksum))
+ fi
+ rm -rf $tmp
+ else if [[ '$(old.source)' ]] && $(CMP) $(CMPFLAGS) $(source.$(name)) $(source)
+ then : $(name) is up to date
+ else echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+ : > $(PACKAGEGEN)/$(name).req
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $(PACKAGEGEN)/$(name).inx
+ {
+ echo '.xx title="$(name) package"'
+ echo '.xx meta.description="$(name) package"'
+ echo '.xx meta.keywords="software, package"'
+ echo '.MT 4'
+ echo '.TL'
+ echo '$(name) package'
+ echo '.H 1'
+ echo '$($(name).README)'
+ } |
+ $(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $(PACKAGEGEN)/$(name).html
+ if [[ '$(source.$(name))' ]]
+ then {
+ echo '$($(name).README)'
+ package help source
+ } > $(PACKAGEGEN)/$(name).README
+ cp $(source.$(name)) $(source)
+ $(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+ fi
+ echo local > $(source:D:B=$(name):S=.tim)
+ fi
+ fi
+
+binary : .binary.init .binary.gen .binary.$$(style)
+
+.binary.init : .MAKE
+ local A B D I P V
+ type := binary
+ if ! "$(incremental)"
+ incremental = 0
+ end
+ if ! "$(~$(name))"
+ if name == "ratz"
+ suffix = exe
+ else
+ suffix = gz
+ end
+ end
+ : $(.init.$(style)) :
+ : $(details.$(style):V:R) :
+ A := $(binary.list)
+ B := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+ P := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+ D := $(A:N=*.$(stamp).$(stamp).$(CC.HOSTTYPE).$(suffix):O=1:T=F)
+ if op == "delta"
+ if ! B
+ error 3 delta requires a base archive
+ end
+ base := -z $(B)
+ if "$(release)" != "$(stamp)"
+ release := $("":T=R%Y-%m-%d)
+ end
+ binary := $(B:/$(CC.HOSTTYPE).$(suffix)$/$(release).&/)
+ version := $(binary:B:B:/$(name).//)
+ elif B || op == "base"
+ if op == "base"
+ for I $(B) $(P)
+ V := $(I:B:/$(name)\.\([^.]*\).*/\1/)
+ if V == "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" && V != "$(version)"
+ old.version := $(V)
+ old.binary := $(I)
+ if "$(old.version)" >= "$(version)"
+ error 3 $(name): previous base $(old.version) is newer than $(version)
+ end
+ break
+ end
+ end
+ else
+ binary := $(B)
+ end
+ if B == "$(binary)"
+ if "$(B:D:B)" == "$(D:D:B)" && "$(B:S)" != "$(D:S)"
+ error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+ end
+ error 1 $(B:B:S): replacing current base
+ end
+ version := $(binary:B:/$(name).//:/\..*//)
+ end
+ PACKAGEGEN := $(PACKAGEBIN)/gen
+
+.binary.gen : $$(PACKAGEDIR) $$(PACKAGEGEN)
+
+.binary.exp .binary.pkg .binary.rpm : .MAKE
+ error 3 $(style): binary package style not supported yet
+
+.binary.cyg :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ integer m=0 o
+ {
+ echo '$($(name.original).README)' | fmt
+ cat <<'!'
+ $(readme.$(style):@?$$("\n")$$(readme.$$(style))??)
+ !
+ } > $tmp/README1
+ echo ";;;$tmp/README1;usr/share/doc/Cygwin/$(opt:/.$//).README"
+ {
+ echo '$($(name.original).README)' | fmt
+ cat <<'!'
+ $()
+ The remainder of this file is the README from the source package
+ that was used to generate this binary package. It describes
+ the source build hierarchy, not the current directory.
+ $()
+ $(package.readme)
+ !
+ } > $tmp/README2
+ echo ";;;$tmp/README2;usr/share/doc/$(opt)README"
+ package release $(name.original) > $tmp/RELEASE
+ echo ";;;$tmp/RELEASE;usr/share/doc/$(opt)RELEASE"
+ cat > $(binary:/.$(suffix)//).setup.hint <<'!'
+ category: $(category:/\(.\).*/\1/U)$(category:/.\(.*\)/\1/L)
+ requires: cygwin
+ sdesc: "$(index)"
+ ldesc: "$($(name.original).README)"
+ !
+ set -- $(.package.licenses. --text $(name.original):N!=*.lic)
+ for i
+ do echo ";;;${i};usr/share/doc/$(opt)LICENSE-${i##*/}"
+ done
+ cat <<'!'
+ $(filter.$(style))
+ !
+ if [[ '$(postinstall.$(style):V:O=1:?1??)' ]]
+ then cat >$tmp/postinstall <<'!'
+ $("#")!/bin/sh
+ $(postinstall.$(style))
+ !
+ echo ";;;$tmp/postinstall;etc/postinstall/$(name).sh"
+ fi
+ } |
+ {
+ : > $tmp/HEAD
+ [[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ --format=$(format) \
+ --local \
+ -wvf $(binary)
+ $(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+ rm -rf $tmp
+ fi
+
+.binary.lcl :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ $(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+ $(package.bin:U:T=F:/.*/echo ";;;&"$("\n")/)
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ $(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+ done
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ --checksum=md5:$(PACKAGEGEN)/$(name).sum \
+ --install=$(PACKAGEGEN)/$(name).ins \
+ -wvf $(binary) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ -s",^$tmp/,$(INSTALLOFFSET)/," \
+ $(PACKAGEROOT:C%.*%-s",^&/,,"%)
+ $(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+ echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+ rm -rf $tmp
+ fi
+
+.binary.tgz :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ if [[ '$(init)' == '$(name)' ]]
+ then for i in lib32 lib64
+ do if [[ -d $(INSTALLROOT)/$i ]]
+ then echo ";physical;;$(INSTALLROOT)/$i"
+ fi
+ done
+ fi
+ $(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+ $(package.bin:U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+ $(package.auxiliary.$(style):U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+ if [[ '$(PACKAGEDIR:B)' == '$(style)' ]]
+ then echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+ echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+ if [[ '$(~covers)' ]]
+ then for i in $(~covers)
+ do for j in lic pkg
+ do if [[ -f $(PACKAGESRC)/$i.$j ]]
+ then echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ for j in ver req
+ do if [[ -f $(PACKAGEGEN)/$i.$j ]]
+ then echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ done
+ for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+ do echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+ done
+ fi
+ sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $(PACKAGEGEN)/$(name).req
+ echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $(PACKAGEGEN)/$(name).inx
+ {
+ {
+ echo '$($(name).README)'
+ if [[ '$(~covers)' ]]
+ then echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+ fi
+ if [[ '$(~requires)' ]]
+ then echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+ fi
+ } | fmt
+ package help binary
+ package release $(name)
+ } > $(PACKAGEGEN)/$(name).README
+ echo ";;;$(PACKAGEGEN)/$(name).README;$(PACKAGELIB)/$(name).README"
+ fi
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ $(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) package.strip=$(strip) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+ done
+ } |
+ {
+ : > $tmp/HEAD
+ [[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+ cat > $tmp/README <<'!'
+ $(package.readme)
+ !
+ echo ";;;$tmp/README;README"
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ --checksum=md5:$(PACKAGEGEN)/$(name).sum \
+ --install=$(PACKAGEGEN)/$(name).ins \
+ -wvf $(binary) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ -s",^$tmp/,$(INSTALLOFFSET)/," \
+ $(PACKAGEROOT:C%.*%-s",^&/,,"%)
+ echo $(binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ $(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+ echo $(binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+ if [[ '$(incremental)' == 1 && '$(old.binary)' ]]
+ then $(PAX) -rf $(binary) -wvf $(old.new.binary) -z $(old.binary)
+ echo $(old.new.binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ $(SUM) -x $(checksum) < $(old.new.binary) > $(old.new.binary:D:B:S=.$(checksum))
+ echo $(old.new.binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ fi
+ rm -rf $tmp
+ else if [[ '$(binary.$(name))' ]]
+ then exe=$(binary.$(name))
+ else exe=$(INSTALLROOT)/bin/$(name)
+ fi
+ if [[ '$(old.binary)' ]] && $(CMP) $(CMPFLAGS) $exe $(binary)
+ then : $(name) is up to date
+ else echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+ : > $(PACKAGEGEN)/$(name).req
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $(PACKAGEGEN)/$(name).inx
+ {
+ echo '$($(name).README)'
+ package help binary
+ } > $(PACKAGEGEN)/$(name).README
+ case "$(binary)" in
+ *.gz) gzip < $exe > $(binary) ;;
+ *) cp $exe $(binary) ;;
+ esac
+ $(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+ echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+ fi
+ echo $(binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ echo $(binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ fi
+
+runtime : .runtime.init .runtime.gen .runtime.$$(style)
+
+.runtime.init : .MAKE
+ local A B D I P V
+ type := runtime
+ if ! "$(incremental)"
+ incremental = 0
+ end
+ if ! "$(~$(name))"
+ if name == "ratz"
+ suffix = exe
+ else
+ suffix = gz
+ end
+ end
+ : $(.init.$(style)) :
+ : $(details.$(style):V:R) :
+ A := $(runtime.list)
+ B := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+ P := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+ D := $(A:N=*.$(stamp).$(stamp).$(CC.HOSTTYPE).$(suffix):O=1:T=F)
+ if op == "delta"
+ if ! B
+ error 3 delta requires a base archive
+ end
+ base := -z $(B)
+ if "$(release)" != "$(stamp)"
+ release := $("":T=R%Y-%m-%d)
+ end
+ runtime := $(B:/$(CC.HOSTTYPE).$(suffix)$/$(release).&/)
+ version := $(runtime:B:B:/$(name).//)
+ elif B || op == "base"
+ if op == "base"
+ for I $(B) $(P)
+ V := $(I:B:/$(name)-run\.\([^.]*\).*/\1/)
+ if V == "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" && V != "$(version)"
+ old.version := $(V)
+ old.runtime := $(I)
+ if "$(old.version)" >= "$(version)"
+ error 3 $(name): previous base $(old.version) is newer than $(version)
+ end
+ break
+ end
+ end
+ else
+ runtime := $(B)
+ end
+ if B == "$(runtime)"
+ if "$(B:D:B)" == "$(D:D:B)" && "$(B:S)" != "$(D:S)"
+ error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+ end
+ error 1 $(B:B:S): replacing current base
+ end
+ version := $(runtime:B:/$(name)-run.//:/\..*//)
+ end
+ PACKAGEGEN := $(PACKAGESRC)/gen
+
+.runtime.gen : $$(PACKAGEDIR) $$(PACKAGEGEN)
+
+.runtime.cyg .runtime.exp .runtime.lcl .runtime.pkg .runtime.rpm : .MAKE
+ error 3 $(style): runtime package style not supported yet
+
+.runtime.tgz :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ if [[ '$(init)' == '$(name)' ]]
+ then for i in lib32 lib64
+ do if [[ -d $(INSTALLROOT)/$i ]]
+ then echo ";physical;;$(INSTALLROOT)/$i"
+ fi
+ done
+ fi
+ $(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+ $(package.bin:U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+ $(package.auxiliary.$(style):U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+ echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+ echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+ if [[ '$(~covers)' ]]
+ then for i in $(~covers)
+ do for j in lic pkg
+ do if [[ -f $(PACKAGESRC)/$i.$j ]]
+ then echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ for j in ver req
+ do if [[ -f $(PACKAGEGEN)/$i.$j ]]
+ then echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ done
+ for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+ do echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+ done
+ fi
+ sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $(PACKAGEGEN)/$(name).req
+ echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $(PACKAGEGEN)/$(name).inx
+ {
+ {
+ echo '$($(name).README)'
+ if [[ '$(~covers)' ]]
+ then echo
+ echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+ fi
+ if [[ '$(~requires)' ]]
+ then echo
+ echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+ fi
+ echo
+ echo "To install this $(type) package read the tarball into a directory"
+ echo "suitable for containing bin and lib subdirectories, and run the"
+ echo "$(PACKAGELIB)/gen/$(name)-run.ins script to fix up permissions."
+ echo
+ echo "To use the package export the bin directory in PATH. The commands and"
+ echo "libraries use \$PATH to locate dynamic libraries and related data files."
+ echo
+ } | fmt
+ } > $(PACKAGEGEN)/$(name)-run.README
+ echo ";;;$(PACKAGEGEN)/$(name)-run.README;$(PACKAGELIB)/$(name)-run.README"
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ $(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) package.strip=$(strip) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+ done
+ } |
+ {
+ : > $tmp/HEAD
+ [[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+ cat > $tmp/README <<'!'
+ $(package.readme)
+ !
+ echo ";;;$tmp/README;README"
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ --checksum=md5:$(PACKAGEGEN)/$(name)-run.sum \
+ --install=$(PACKAGEGEN)/$(name)-run.ins \
+ -wvf $(runtime) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ -s",^$tmp/,$(INSTALLOFFSET)/," \
+ $(PACKAGEROOT:C%.*%-s",^&/,,"%)
+ echo $(runtime) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ $(SUM) -x $(checksum) < $(runtime) > $(runtime:D:B:S=.$(checksum))
+ echo $(runtime:D:B:S=.$(checksum)) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ echo local > $(runtime:D:B=$(name)-run:S=.$(CC.HOSTTYPE).tim)
+ if [[ '$(incremental)' == 1 && '$(old.runtime)' ]]
+ then $(PAX) -rf $(runtime) -wvf $(old.new.runtime) -z $(old.runtime)
+ echo $(old.new.runtime) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ $(SUM) -x $(checksum) < $(old.new.runtime) > $(old.new.runtime:D:B:S=.$(checksum))
+ echo $(old.new.runtime:D:B:S=.$(checksum)) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ fi
+ rm -rf $tmp
+ fi
+
+list.installed list.manifest :
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ ignore $(MAKE) --noexec $(-) $(=) $(<)
+ done
diff --git a/usr/src/contrib/ast/lib/package/zlib.def b/usr/src/contrib/ast/lib/package/zlib.def
new file mode 100644
index 0000000000..f82f1be53b
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/zlib.def
@@ -0,0 +1,39 @@
+message_set=20
+
+contributor+=(
+ [jlg]="Jean-loup Gailly"
+ [ma]="Mark Adler"
+)
+
+license+=(
+ company="Jean-loup Gailly and Mark Adler"
+
+ package=zlib
+ since=1995
+
+ type=zlib
+ name="${license.package} Open Source"
+ url=http://www.opensource.org/licenses/Zlib
+ urlmd5=4cfd2c17b0340c2f3c80b577a8e45bee
+
+ notice='
+This software is provided "as-is", without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would
+ be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not
+ be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+ distribution.
+'
+)
diff --git a/usr/src/contrib/ast/lib/package/zlib.lic b/usr/src/contrib/ast/lib/package/zlib.lic
new file mode 100644
index 0000000000..7b7c520662
--- /dev/null
+++ b/usr/src/contrib/ast/lib/package/zlib.lic
@@ -0,0 +1 @@
+. zlib.def
diff --git a/usr/src/contrib/ast/src/cmd/INIT/C+probe b/usr/src/contrib/ast/src/cmd/INIT/C+probe
new file mode 100644
index 0000000000..f42774233c
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/C+probe
@@ -0,0 +1,870 @@
+:
+### this script contains archaic constructs that work with all sh variants ###
+# Glenn Fowler
+# AT&T Research
+#
+# @(#)C probe (AT&T Research) 2012-02-29
+#
+# probe [ -d ] c-compiler-path [ attributes ]
+#
+# common C probe preamble for the tool specific probes
+#
+# NOTE: some cc -E's do syntax analysis!
+
+#
+# probe_* are first eval'd and then attempted from left to right
+#
+
+probe_binding="-dy -dn -Bdynamic -Bstatic '-Wl,-ashared -Wl,+s' -Wl,-aarchive -call_shared -non_shared -dynamic -static -bshared -bstatic '' -static"
+probe_env="CC_OPTIONS CCOPTS LD_OPTIONS LDOPTS LIBPATH LPATH"
+probe_include="stdio.h iostream.h complex.h ctype.h plot.h stdarg.h varargs.h ranlib.h hash.h sys/types.h stab.h cmath cstdio iostream string"
+probe_longlong="long 'long long'"
+probe_longlong_t="__int64_t _int64_t __int64 _int64 int64"
+probe_l="l yyreject m sin mopt sin"
+probe_lxx="C exit ++ exit g++ exit"
+probe_ppprefix="a n"
+probe_size="size"
+probe_src="cxx C cc c"
+probe_sa=".sa"
+probe_sd=".dll .lib .dll .x"
+probe_sdb=".pdb"
+probe_so=".dylib .so .sl"
+probe_symprefix="_"
+probe_verbose="'-v -v' '-# -#' '-d -d' -dryrun '-V -V'"
+probe_version="--version -V -version -v"
+
+#
+# the following are set by the preamble for the tool specific probe
+#
+
+cc=cc
+debug=
+dir=.
+dll=.dll
+dynamic=
+exe=exe
+executable="test -x"
+hosted=
+ifs=${IFS-'
+ '}
+obj=o
+ppenv=
+ppopt=
+predef=
+prepred=
+sa=
+sd=
+sdb=
+so=
+sov=
+static=
+stdlib=
+stdpp=
+suffix_command=
+if test "" != "$TMPDIR" -a -d "$TMPDIR"
+then tmpdir=$TMPDIR
+else tmpdir=/tmp
+fi
+tmpdir=$tmpdir/probe$$
+undef="define defined elif else endif error if ifdef ifndef include line pragma undef __STDC__ __STDPP__ __ARGC__ __BASE__ __BASE_FILE__ __DATE__ __FILE__ __FUNCTION__ __INCLUDE_LEVEL__ __LINE__ __PATH__ __TIME__ __TIMESTAMP__ __VERSION__"
+version_flags=
+version_stamp=
+version_string=
+
+#
+# constrain the environment
+#
+
+DISPLAY=
+LC_ALL=C
+export DISPLAY LC_ALL
+
+#
+# now the common probes
+#
+
+while :
+do case $1 in
+ -d) debug=1 ;;
+ -*) set ''; break ;;
+ *) break ;;
+ esac
+ shift
+done
+
+cc=$1
+case $cc in
+[\\/]*|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\*)
+ ;;
+*) echo "Usage: $0 [ -d ] c-compiler-path [ attributes ]" >&2
+ exit 1
+ ;;
+esac
+ATTRIBUTES=
+eval $2
+_probe_PATH=$PATH
+PATH=/usr/bin:/bin:$PATH
+
+case $0 in
+*[\\/]*) dir=`echo $0 | sed -e 's,[\\/][\\/]*[^\\/]*\$,,'` ;;
+esac
+
+$executable . 2>/dev/null || executable='test -r'
+
+case $SHELL in
+[\\/]*|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\*)
+ sh=$SHELL
+ ;;
+*) sh=/bin/sh
+ ;;
+esac
+
+trap 'code=$?; cd ..; rm -rf $tmpdir; exit $code' 0 1 2 3
+mkdir $tmpdir
+cd $tmpdir
+
+exec 3>&1 4>&2 </dev/null
+case $debug in
+"") exec >/dev/null 2>&1
+ (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0
+ ;;
+*) PS4='+$LINENO+ '
+ set -x
+ ;;
+esac
+
+if (xxx=xxx; unset xxx)
+then UNSET=1
+else UNSET=
+fi
+eval set x $probe_env
+while :
+do shift
+ case $# in
+ 0) break ;;
+ esac
+ eval x='$'$1
+ case $x in
+ '') continue ;;
+ esac
+ case $1 in
+ *PATH) _probe_export="$_probe_export $1='$x'" ;;
+ esac
+ case $UNSET in
+ '') eval $1=
+ export $1
+ ;;
+ *) unset $1
+ ;;
+ esac
+done
+
+if test -f "$dir/probe.ini"
+then . "$dir/probe.ini"
+ IFS=$ifs
+fi
+
+mkdir suffix
+cd suffix
+for src in $probe_src
+do echo "int main(){return 0;}" > ../test.$src
+ rm -f test*
+ if $cc -c ../test.$src
+ then set test.*
+ if test -f "$1"
+ then o="$*"
+ mv $* ..
+ for i in $o
+ do if $cc -o test.exe ../$i
+ then obj=`echo "$i" | sed -e 's,test.,,'`
+ $executable test.exe || executable="test -r"
+ set test*
+ rm *
+ if $cc -o test ../$i
+ then rm $*
+ set test.*
+ if $executable "$1"
+ then exe=`echo "$1" | sed -e 's,test.,,'`
+ suffix_command=.$exe
+ fi
+ fi
+ break 2
+ fi
+ done
+ fi
+ fi
+done
+cd ..
+
+case $src in
+c) ;;
+*) echo '// (
+int
+main()
+{
+ class { public: int i; } j;
+ j.i = 0;
+ int k = j.i + 1;
+ return k;
+}' > dialect.$src
+ if $cc -c dialect.$src && $cc -o dialect.$exe dialect.$obj && $executable dialect.$exe
+ then mv dialect.$src dialect.c
+ rm -f dialect.$obj dialect.$exe
+ if $cc -c dialect.c && $cc -o dialect.$exe dialect.$obj && $executable dialect.$exe
+ then src=c
+ else set x $cc
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ *=*) continue ;;
+ esac
+ case `echo $1 | sed -e 's,.*/,,'` in
+ *CC*|*++*|*[xX][xX]*|*[pP][lL][uU][sS]*) ;;
+ *) src=c ;;
+ esac
+ break
+ done
+ fi
+ else src=c
+ fi
+ ;;
+esac
+
+set x x '(' 1 'int x;' 0
+while :
+do shift
+ shift
+ case $# in
+ [01]) break ;;
+ esac
+ rm -f test.$obj
+ echo "$1" > test.$src
+ $cc -c test.$src
+ r=$?
+ case $r in
+ 0) test -f test.$obj || r=1 ;;
+ *) r=1 ;;
+ esac
+ case $2:$r in
+ 0:0) ;;
+ 0:1) echo "$cc: not a C compiler: failed to compile \`\`$1''" >&4
+ exit 1
+ ;;
+ 1:0) echo "$cc: not a C compiler: successfully compiled \`\`$1''" >&4
+ exit 1
+ ;;
+ esac
+done
+
+hosttype=`package CC="$cc" || $SHELL -c "package CC='$cc'"`
+case $hosttype in
+*[Uu][Ss][Aa][Gg][Ee]:*)
+ hosttype=`PATH=$_probe_PATH; export PATH; package CC="$cc" || $SHELL -c "package CC='$cc'"`
+ ;;
+esac
+
+echo '#include <stdio.h>
+int main(){printf("hello");return 0;}' > dynamic.$src
+echo 'extern int sfclose() { return 0; }' > fun.$src
+if $cc -c dynamic.$src && $cc -c fun.$src
+then eval set x $probe_so
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ for i in foo junk
+ do rm -f dynamic.$exe
+ if $cc -L. -o dynamic.$exe dynamic.$obj -l$i
+ then : "there's really a -l$i"?
+ else rm -f dynamic.$exe
+ cat fun.$obj > lib$i$1
+ $cc -L. -o dynamic.$exe dynamic.$obj -l$i && $executable dynamic.$exe
+ x=$?
+ rm lib$i$1
+ case $x in
+ 0) so=$1
+ rm -f dynamic.$exe > lib$i$1.1
+ $cc -L. -o dynamic.$exe dynamic.$obj -l$i && $executable dynamic.$exe
+ x=$?
+ rm lib$i$1.1
+ case $x in
+ 0) sov=1 ;;
+ esac
+ break 2
+ ;;
+ *) break
+ ;;
+ esac
+ fi
+ done
+ k=
+ for i in "" .1 .2 .3 .4 .5 .6 .7 .8 .9
+ do rm -f dynamic.$exe > libc$1$i
+ $cc -L. -o dynamic.$exe dynamic.$obj && $executable dynamic.$exe
+ x=$?
+ (cd ..; rm $tmpdir/libc$1$i)
+ case $x in
+ 0) ;;
+ *) k=X$k
+ case $k in
+ XXX) break ;;
+ esac
+ ;;
+ esac
+ done
+ case $k in
+ XXX) so=$1
+ sov=1
+ break
+ ;;
+ ?*) so=$1
+ break
+ ;;
+ esac
+ done
+ rm -f dynamic.$exe
+ if $cc -o dynamic.$exe dynamic.$obj 2>e && $executable dynamic.$exe
+ then e=`wc -l e`
+ maybe=
+ eval set x x $probe_binding
+ while :
+ do shift
+ shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f dynamic.$exe
+ $cc -o dynamic.$exe $1 dynamic.$obj 2>e && $executable dynamic.$exe || continue
+ case $1 in
+ ?*) case $maybe in
+ "") maybe=$1 ;;
+ *) maybe=-- ;;
+ esac
+ ;;
+ esac
+ case `wc -l e` in
+ $e) ;;
+ *) continue ;;
+ esac
+ d=`ls -s dynamic.$exe`
+ rm -f dynamic.$exe
+ $cc -o dynamic.$exe $2 dynamic.$obj 2>e && $executable dynamic.$exe || continue
+ case `wc -l e` in
+ $e) ;;
+ *) continue ;;
+ esac
+ case `ls -s dynamic.$exe` in
+ $d) ;;
+ *) dynamic=$1
+ static=$2
+ maybe=
+ break
+ ;;
+ esac
+ done
+ case $maybe in
+ ""|--) ;;
+ *) rm -f dynamic.$exe
+ if $cc -o dynamic.$exe $maybe dynamic.$obj 2>e && $executable dynamic.$exe
+ then e=`wc -l e`
+ if $cc -o dynamic.$exe $maybe-bogus-bogus-bogus dynamic.$obj 2>e && $executable dynamic.$exe
+ then case `wc -l e` in
+ $e) ;;
+ *) dynamic=$maybe ;;
+ esac
+ else dynamic=$maybe
+ fi
+ fi
+ ;;
+ esac
+ fi
+fi
+
+eval set x $probe_version
+shift
+for o in "$@"
+do if $cc $o > version.out 2>&1
+ then version_string=`sed -e '/ is /d' -e 's/;/ /g' version.out | sed -e 1q`
+ case $version_string in
+ ''|*[Ee][Rr][Rr][Oo][Rr]*|*[Ff][Aa][Tt][Aa][Ll]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*)
+ ;;
+ *) version_flags=$o
+ version_stamp=";VERSION;$o;$version_string;PATH;$cc"
+ break
+ ;;
+ esac
+ fi
+done
+case $version_stamp in
+'') eval set x $probe_version
+ shift
+ echo 'int main() { return 0; }' > version.i
+ for o in "$@"
+ do if $cc -c $o version.i > version.out 2>&1
+ then version_string=`sed -e '/ is /d' -e 's/;/ /g' version.out | sed -e 1q`
+ case $version_string in
+ ''|*[Ee][Rr][Rr][Oo][Rr]*|*[Ff][Aa][Tt][Aa][Ll]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*)
+ ;;
+ *) version_flags=$o
+ break
+ ;;
+ esac
+ fi
+ done
+ ;;
+esac
+
+echo 'int main(){return 0;}' > hosted.$src
+$cc -o hosted.$exe hosted.$src && ./hosted.$exe && hosted=1
+
+echo '#!'$sh'
+echo "" $@' > cpp
+chmod +x cpp
+case `./cpp -Dprobe` in
+*-Dprobe*)
+ ;;
+*) cp /bin/echo cpp
+ chmod u+w cpp
+ ;;
+esac
+for prefix in $probe_ppprefix `echo $cc | sed -e '/cc\$/!d' -e 's,cc\$,,' -e 's,.*/,,'`
+do cp cpp ${prefix}cpp
+done
+
+echo "" > flags.$src
+echo '#pragma pp:version' > libpp.$src
+
+if test `realcppC=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppenv='realcppC=${ppcmd}'
+elif test `cppC=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppenv='cppC=${ppcmd}'
+elif test `_CPPNAME=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppenv='_CPPNAME=${ppcmd}'
+elif test `_CPP=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppenv='_CPP=${ppcmd}'
+elif test `$cc -Dprobe -E -%p+. flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 && test `$cc -Dprobe -E -%p+. flags.$src | wc -l` -eq 1
+then ppopt='-%p+${ppdir}'
+elif test `$cc -Dprobe -E -Yp,. flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppopt='-Yp,${ppdir}'
+elif test `$cc -Dprobe -E -Qpath $tmpdir flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppopt='-Qpath ${ppdir}'
+elif test `$cc -Dprobe -E -tp -B./ flags.$src 2>err.out | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -a ! -s err.out
+then ppopt='-tp -B${ppdir}/'
+elif test `$cc -Dprobe -E -B./ flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppopt='-B${ppdir}/'
+elif test `$cc -Dprobe -E -tp -h./ -B flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppopt='-tp -h${ppdir}/ -B'
+elif test `$cc -Dprobe -E -t p,./cpp flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then ppopt='-t p,${ppcmd}'
+else {
+ eval set x $probe_verbose
+ shift
+ for o in "$@"
+ do $cc -E $o flags.$src
+ done
+ } 2>&1 | sed -e "s/['\"]//g" > cpp.out
+fi
+
+set x `sed -e 's,[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\\\,/,g' -e 's,\\\\,/,g' cpp.out`
+def=
+definclude="-I+C -I-H"
+stdinclude=$definclude
+case $hosted in
+"") usrinclude= ;;
+esac
+cmdinclude=
+while :
+do case $# in
+ 0|1) break ;;
+ esac
+ shift
+ case $1 in
+ -A) case $2 in
+ *\(*\)) shift
+ prepred="$prepred `echo $1 | sed 's/\(.*\)(\(.*\))/\1 \2/'`"
+ ;;
+ esac
+ ;;
+ -A\(*\))
+ prepred="$prepred `echo $1 | sed 's/-A\(.*\)(\(.*\))/\1 \2/'`"
+ ;;
+ -[DI][-+][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
+ stdpp=1
+ case $1 in
+ -I?[CH]) case $def in
+ ?*) definclude="$definclude $1" ;;
+ *) stdinclude="$stdinclude $1" ;;
+ esac
+ ;;
+ -I-S*|-YI,*) usrinclude="`echo $1 | sed 's/....//'`" ;;
+ -Y?,*) ;;
+ -Y*) usrinclude="`echo $1 | sed 's/..//'`" ;;
+ esac
+ ;;
+ -D) shift
+ case $1 in
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*=*)
+ predef="$predef
+`echo $1 | sed -e 's/=.*//'`"
+ ;;
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*)
+ predef="$predef
+$1"
+ ;;
+ esac
+ ;;
+ -Dprobe);;
+ -D*) case $1 in
+ -D[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*=*)
+ predef="$predef
+`echo $1 | sed -e 's/^-D//' -e 's/=.*//'`"
+ ;;
+ -D[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*)
+ predef="$predef
+`echo $1 | sed -e 's/^-D//'`"
+ ;;
+ esac
+ ;;
+ -I) shift
+ case $1 in
+ /*) case $def in
+ ?*) definclude="$definclude $1" ;;
+ *) stdinclude="$stdinclude $1" ;;
+ esac
+ cmdinclude="$cmdinclude $1"
+ ;;
+ esac
+ ;;
+ -I/*) f=`echo X$1 | sed 's/X-I//'`
+ case $def in
+ ?*) definclude="$definclude $f" ;;
+ *) stdinclude="$stdinclude $f" ;;
+ esac
+ cmdinclude="$cmdinclude $f"
+ ;;
+ -U) shift
+ undef="$undef $1"
+ ;;
+ -U*) undef="$undef `echo $1 | sed 's/^-U//'`"
+ ;;
+ flags.$src)def=
+ ;;
+ esac
+done
+stdinclude="$stdinclude $definclude"
+case " $stdinclude " in
+*\ $usrinclude\ *)
+ case $usrinclude in
+ /usr/include)
+ usrinclude=
+ ;;
+ *) case " $stdinclude " in
+ *\ /usr/include\ *)
+ usrinclude=
+ ;;
+ *) usrinclude=/usr/include
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+tstinclude=`$cc -v -E flags.$src 2>&1 | sed -e '1,/[iI][nN][cC][lL][uU][dD][eE][ ]*<[.][.][.]>/d' -e '/^[eE][nN][dD] [oO][fF] [sS][eE][aA][rR][cC][hH]/,\$d'`
+j=$tstinclude
+case $j in
+*/*) ;;
+*) j=$cmdinclude ;;
+esac
+tstinclude=
+good=
+nogood=
+c_hdr="stdio.h ctype.h"
+C_hdr="libc.h"
+for i in $j
+do if test -d "$i"
+ then tstinclude="$tstinclude $i"
+ h=
+ for f in $c_hdr
+ do if test -f "$i/$f"
+ then case $i in
+ */CC) nogood=1 ;;
+ *) good=1 ;;
+ esac
+ else h="$h $f"
+ fi
+ done
+ c_hdr=$h
+ h=
+ for f in $C_hdr
+ do if test -f "$i/$f"
+ then case $i in
+ */CC) nogood=1 ;;
+ *) good=1 ;;
+ esac
+ else h="$h $f"
+ fi
+ done
+ C_hdr=$h
+ fi
+done
+case $nogood in
+1) good=0 ;;
+esac
+case $good in
+1) case $c_hdr in
+ ?*) bad=1
+ usrinclude=/usr/include
+ set '' $tstinclude /usr/include
+ ;;
+ *) set '' $tstinclude
+ ;;
+ esac
+ shift
+ stdinclude=$*
+ echo "#include <sys/types.h>" > include.$src
+ $cc -E include.$src | sed -e '/# 1 "[\\/]/!d' -e 's,[^"]*",,' -e 's,[\\/][^\\/]*".*,,' -e 's,[\\/]sys,,' > include.out
+ for f in `cat include.out`
+ do if test -d "$f"
+ then g=`echo $f | sed -e 's,[\\/][\\/]*[^\\/]*$,,'`
+ case " $stdinclude " in
+ *\ $f\ *|*\ $g\ *)
+ ;;
+ *) stdinclude="$stdinclude $f"
+ case $f in
+ /usr/include) usrinclude=$f ;;
+ esac
+ bad=1
+ ;;
+ esac
+ fi
+ done
+ ;;
+*) case $ppopt$ppenv in
+ ?*) echo '#!'$sh'
+ echo $VIRTUAL_ROOT | sed "s/:.*//"' > cpp
+ chmod +x cpp
+ ppcmd=cpp
+ ppdir=.
+ eval x='`'$ppenv '$'cc -E $ppopt flags.$src'`'
+ case $x in
+ ?*) tstinclude=$x/usr/include
+ ;;
+ esac
+ cp /bin/echo cpp
+ chmod u+w cpp
+ ;;
+ esac
+
+ eval set x $probe_include
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ echo "#include <$1>" > include.$src
+ $cc -E include.$src
+ done > include.out
+
+ ccinclude=
+ x=$stdinclude
+ stdinclude=
+ subinclude=
+ for f in $x $tstinclude `sed -e 's,\\\\,/,g' -e 's,///*,/,g' -e 's,"[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/,"/,g' -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[\\/]/!d' -e 's/^#[line ]*[0123456789][0123456789]*[ ][ ]*"\(.*\)[\\/].*".*/\1/' include.out | sort -u`
+ do case $f in
+ -*) ;;
+ */) f=`echo $f | sed -e 's,//*\$,,'` ;;
+ */.) f=`echo $f | sed -e 's,//*.\$,,'` ;;
+ esac
+ case $f in
+ -I*) ;;
+ */cc) ccinclude=1
+ ;;
+ */sys) continue
+ ;;
+ */include/*/*)
+ ;;
+ */include/*)
+ subinclude="$subinclude $f"
+ continue
+ ;;
+ esac
+ if test -d "$f"
+ then case " $stdinclude " in
+ *\ $f\ *) ;;
+ *) stdinclude="$stdinclude $f" ;;
+ esac
+ fi
+ done
+ rm include.out
+ case $ccinclude in
+ ?*) eval set x $probe_include
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ echo "#include <cc/$1>" > include.$src
+ if $cc -E include.$src > /dev/null
+ then break
+ fi
+ done
+ case $# in
+ 0) ;;
+ *) x=$stdinclude
+ stdinclude=
+ for f in $x
+ do case $f in
+ */cc) ;;
+ *) stdinclude="$stdinclude $f" ;;
+ esac
+ done
+ ;;
+ esac
+ ;;
+ esac
+ case $subinclude in
+ ?*) for i in $subinclude
+ do for j in $stdinclude
+ do case $i in
+ $j/*/*) ;;
+ $j/*) both=
+ eval set x $probe_include
+ while :
+ do shift
+ case $# in
+ 0) for k in $both
+ do echo "#include <$k>" > include.$src
+ $cc -E include.$src > include.out
+ I=`grep -c $i/$k < include.out`
+ J=`grep -c $j/$k < include.out`
+ case $I:$J in
+ 0:*) ;;
+ *:0) stdinclude="$i $stdinclude"
+ break
+ ;;
+ esac
+ done
+ continue 3
+ ;;
+ esac
+ if test -f $i/$1
+ then if test ! -f $j/$1
+ then break 2
+ fi
+ both="$both $1"
+ fi
+ done
+ ;;
+ $j) continue 2
+ ;;
+ esac
+ done
+ stdinclude="$i $stdinclude"
+ done
+ ;;
+ esac
+
+ {
+
+ for i in $stdinclude
+ do
+ case $i in
+ $usrinclude) ;;
+ *) echo $i $i ;;
+ esac
+ done
+
+ eval set x $probe_include
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ echo "#include <$1>" > t.c
+ p=
+ for j in `$cc -E t.c | grep "$1" | sed -e 's,\\\\,/,g' -e 's,"[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/,"/,g' -e '/^#[line ]*1[ ][ ]*"[\\/]/!d' -e 's/^#[line ]*1[ ][ ]*"\(.*\)[\\/].*".*/\1/'`
+ do j=`echo $j | sed -e 's,///*,/,g' -e 's,/$,,'`
+ case $p in
+ ?*) echo $p $j ;;
+ esac
+ p=$j
+ done
+ done
+
+ case $usrinclude in
+ ?*) echo $usrinclude $usrinclude ;;
+ esac
+
+ } | tsort > tmp.tmp
+ tstinclude=`cat tmp.tmp`
+ bad=
+ for i in $stdinclude
+ do case "
+$tstinclude
+" in
+ *"
+$i
+"*) ;;
+ *) bad=1
+ break
+ ;;
+ esac
+ done
+ ;;
+esac
+
+case $bad in
+"") x=$stdinclude
+ stdinclude=
+ z=
+ for i in $tstinclude
+ do case " $x " in
+ *" $i "*)
+ stdinclude="$stdinclude $i"
+ z=$i
+ ;;
+ esac
+ done
+ case $usrinclude in
+ '') usrinclude=$z ;;
+ esac
+ ;;
+esac
+case $hosted in
+"") case $usrinclude in
+ /usr/include) usrinclude= ;;
+ esac
+ ;;
+esac
+
+case $usrinclude in
+?*) case " $stdinclude " in
+ *\ $usrinclude\ *)
+ x=$stdinclude
+ stdinclude=
+ for f in $x
+ do case $f in
+ $usrinclude) ;;
+ *) stdinclude="$stdinclude $f" ;;
+ esac
+ done
+ ;;
+ esac
+ ;;
+esac
+
+# drop dups -- they creep in somehow
+
+x=$stdinclude
+stdinclude=
+for f in $x
+do case " $stdinclude $usrinclude " in
+ *" $f "*) ;;
+ *) stdinclude="$stdinclude $f" ;;
+ esac
+done
diff --git a/usr/src/contrib/ast/src/cmd/INIT/CONVERT.mk b/usr/src/contrib/ast/src/cmd/INIT/CONVERT.mk
new file mode 100644
index 0000000000..63a60ef5f5
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/CONVERT.mk
@@ -0,0 +1,260 @@
+/*
+ * {automake|configure} => {nmake|iffe} conversion support
+ *
+ * The first command line target overrides the default original source
+ * directory name $(MAKEFILE:D). The hard work is in the makefile using
+ * these assertions, since it must (manually) provide the nmake makefiles
+ * and config equivalent iffe scripts. The conversion makefile is typically
+ * named lib/package/PACKAGE.cvt in an ast package $PACKAGEROOT directory,
+ * and the conversion is run from the $PACKAGEROOT directory, e.g.:
+ *
+ * nmake -I lib/package -f PACKAGE-VERSION/PACKAGE.cvt
+ *
+ * The conversion requires the ast nmake, pax and tw commands.
+ *
+ * After the conversion you will be liberated from ./configure, *.in,
+ * *.am, automake, autom4te, libtool, make depend, and makefile
+ * recursion ordering. You can build from $PACKAGEROOT using the ast
+ * package(1) (which sets up the { HOSTTYPE PATH VPATH } environment):
+ *
+ * package make
+ *
+ * or cd into any arch/$HOSTTYPE/src subdirectory and rebuild that portion
+ * of the hierarchy with the ast nmake(1) (after setting PATH and VPATH):
+ *
+ * nmake
+ *
+ * The conversion assertions are:
+ *
+ * package :CONVERT: file ...
+ *
+ * files in the original source directory are copied
+ * and converted into the ./src and ./lib subdirectories
+ * the default original source directory is ./original
+ *
+ * package package name
+ * file original source file that must exist
+ *
+ * :OMIT: pattern
+ *
+ * files matching pattern are not copied into the converted
+ * directory
+ *
+ * pattern ksh pattern of files to omit
+ *
+ * :COPY: from to [ file ... ]
+ *
+ * files in the from directory are copied to the to directory
+ * the action may contain :MOVE: exceptions to the copy
+ *
+ * from original directory subdirectory
+ * . names the original directory
+ * .. names the
+ * to converted subdirectory
+ * libNAME => src/lib/libNAME
+ * NAME => src/cmd/NAME
+ * file files or files in subdirectories to be copied;
+ * explicit files are copied to the to directory;
+ * if no files are specified then the from hierarchy
+ * is recursively copied to the converted directory
+ *
+ * :MOVE: to file ...
+ *
+ * :COPY: assertion exceptions placed in the assertion's action
+ *
+ * to files or subdirectory files are copied to this directory
+ * file file or files in subdirectories to be copied
+ *
+ * :FILE: to file <<!
+ * contents
+ * !
+ *
+ * the :FILE: action is copied to the named file in the to directory
+ * the :FILE: action is usually specified using the here syntax to
+ * avoid make comment, quote and variable expansion
+ *
+ * :EDIT: to file ... | - pattern <<!
+ * edit script
+ * !
+ *
+ * the :EDIT: action is an ed(1) script applied to each file in the
+ * to directory after it has been copied from the original source
+ * directory; if to is - then the :EDIT: action is a sed(1) script
+ * that is applied to all files matching the file pattern during the
+ * copy from the original source directory; a file may be subject to
+ * both a sed(1) and ed(1) :EDIT:; the :EDIT: action is usually
+ * specified using the here syntax to avoid make comment, quote and
+ * variable expansion
+ */
+
+.CONVERT.ID. = "@(#)$Id: CONVERT (AT&T Research) 2004-03-19 $"
+
+set nojobs noscan nowriteobject writestate=$$(MAKEFILE).ms
+
+package = $(PWD:B)
+here = !-=-=-=-=-!
+hierarchy = src src/cmd src/lib
+omit = .*|*.?(l)[ao]
+original = $(MAKEFILE:D)
+showedit = $(-debug:?p??)
+
+CPFLAGS = -u
+PAXFLAGS = -u -v
+STDEDFLAGS = -
+TW = tw
+TWFLAGS = -CP
+
+all : .VIRTUAL file
+file : .VIRTUAL edit
+edit : .VIRTUAL copy
+copy : .VIRTUAL init
+init : .VIRTUAL
+
+.MAKEINIT : .cvt.init
+
+.cvt.init : .MAKE .VIRTUAL .FORCE
+ local D
+ if D = "$(~.ARGS:O=1)"
+ if "$(D:T>FD)"
+ original := $(D)
+ .ARGS : .CLEAR $(~.ARGS:O>1)
+ end
+ end
+
+.cvt.filter =
+.cvt.package =
+
+.cvt.atom : .FUNCTION
+ local N V
+ V := $(%:O=1)
+ let .cvt.$(V) = .cvt.$(V) + 1
+ return .cvt.$(V).$(.cvt.$(V))
+
+.cvt.omit : .FUNCTION
+ return -s',^\(\(?K)?(*/)($(omit))?(/*))$,,$(showedit)'
+
+.cvt.to : .FUNCTION
+ if "$(%)" == "."
+ return src
+ end
+ if "$(%)" == "*/*"
+ return src/$(%)
+ end
+ if "$(%)" == "lib*"
+ return src/lib/$(%)
+ end
+ return src/cmd/$(%)
+
+":CONVERT:" : .MAKE .OPERATOR
+ local I
+ package := $(<)
+ I := $(hierarchy:C,$,/Makefile)
+ init : .cvt.verify $(I)
+ $(I) : .ACCEPT
+ test -d $(<:D) || $(MKDIR) -p $(<:D)
+ echo :MAKE: > $(<)
+ .cvt.verify : .MAKE .FORCE .REPEAT
+ local I
+ if I = "$(.cvt.package:T!=F)"
+ error 3 $(original): not a $(package) source directory: missing $(I)
+ end
+ .cvt.package := $(>:C,^,$$(original)/,)
+
+":COPY:" : .MAKE .OPERATOR
+ local F T I A
+ F := $(>:O=1)
+ T := $(.cvt.to $(>:O=2))
+ A := $(.cvt.atom copy)
+ copy : $(A)
+ $(A) : .VIRTUAL
+ if F == "."
+ $(A) : $(T)
+ $(T) :
+ test -d $(<) || $(MKDIR) -p $(<)
+ for I $(>:O>2)
+ eval
+ $$(A) : $(I:D=$(T):B:S)
+ $(I:D=$(T):B:S) : $$(original)/$(I)
+ $$(CP) $$(CPFLAGS) $$(*) $$(<)
+ end
+ end
+ elif "$(F:T=FF)" || "$(F:N=*.(pax|t[bg]z))"
+ eval
+ $$(A) : $$(F)
+ test -d $(T) || $$(MKDIR) -p $(T)
+ cd $(T)
+ $$(PAX) $$(PAXFLAGS) -rf $$(*:P=A) -s ',^$(>:O=2)/*,,' $(.cvt.omit) $(.cvt.filter)
+ end
+ else
+ F := $$(original)/$(F)
+ if ! "$(@:V)"
+ eval
+ $$(A) : .FORCE
+ test -d $(T) || $$(MKDIR) -p $(T)
+ cd $(F:V)
+ $$(TW) $$(TWFLAGS) | $$(PAX) $$(PAXFLAGS) -rw $(.cvt.omit) $(.cvt.filter) $(T:P=A)
+ end
+ else
+ .cvt.move =
+ : $(@:V:@R)
+ eval
+ $$(A) : .FORCE
+ test -d $(T) || $$(MKDIR) -p $(T)
+ cd $(F:V)
+ $$(TW) $$(TWFLAGS) | $$(PAX) $$(PAXFLAGS) -rw $(.cvt.omit) $(.cvt.move) $(.cvt.filter) $(T:P=A)
+ end
+ end
+ end
+
+":EDIT:" : .MAKE .OPERATOR
+ local A D F
+ D := $(>:O=1)
+ if D == "-"
+ A := ^$(>:O=2)^$$(SED) -e $(@:Q:/'\n'/ -e /G)
+ .cvt.filter += --action=$(A:@Q)
+ else
+ D := $(.cvt.to $(D))
+ F := $(>:O>1:C,^,$(D)/,)
+ edit : $(F)
+ eval
+ $$(F) :
+ $$(STDED) $$(STDEDFLAGS) $$(<) <<'$(here)'
+ $(@:V)
+ w
+ q
+ $(here)
+ end
+ end
+
+":FILE:" : .MAKE .OPERATOR
+ local ( D F ) $(>)
+ local A
+ A := $(.cvt.atom file)
+ $(A) := $(@:V)
+ D := $(.cvt.to $(D))
+ file : $(D)/$(F)
+ eval
+ $$(D)/$$(F) :
+ test -d $$(<:D) || $$(MKDIR) -p $$(<:D)
+ cat > $$(<) <<'$(here)'
+ $$($(A):V)
+ $(here)
+ end
+
+":MOVE:" : .MAKE .OPERATOR
+ local T I
+ T := ../../../$(.cvt.to $(>:O=1))
+ for I $(>:O>1)
+ if I == "*/"
+ .cvt.move += -s',^\(\(?K)$(I)),$(T)/,$(showedit)'
+ .cvt.move += -s',^\(\(?K)$(I:C%/$%%))$,,$(showedit)'
+ else
+ .cvt.move += -s',^\(\(?K)$(I))$,$(T)/$(I:B:S),$(showedit)'
+ end
+ end
+
+":OMIT:" : .MAKE .OPERATOR
+ local P
+ for P $(>)
+ omit := $(omit)|$(P)
+ end
diff --git a/usr/src/contrib/ast/src/cmd/INIT/MAPLIB.mk b/usr/src/contrib/ast/src/cmd/INIT/MAPLIB.mk
new file mode 100644
index 0000000000..5761035981
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/MAPLIB.mk
@@ -0,0 +1,45 @@
+/*
+ * normalize local -l* library conventions
+ *
+ * L [ [ G11 ... G1n ] ... [ Gg1 ... Ggn ] ] :MAPLIB: T1.c ... Tn.c
+ *
+ * if Giji not specified then G11 == L
+ * the first Ti.c that compiles/links with group -lGi1 ... -lGin
+ * but does not compile/link with no libraries maps
+ * -lL to to require -lGi1 ... -lGin
+ * otherwise -lL is not required and maps to "no library required"
+ */
+
+":MAPLIB:" : .MAKE .OPERATOR
+ local L P
+ L := $(<:B:O=1)
+ if ! ( P = "$(<:B:O>1)" )
+ P := $(L)
+ end
+ $(LIBDIR)/lib/$(L) :INSTALL: $(L).req
+ eval
+ $(L).req : (CC) $$(>)
+ set -
+ r='-'
+ for i in $$(*)
+ do if $$(CC) -c $i > /dev/null
+ then g=
+ for p in $(P) -
+ do case $p in
+ -) if $$(CC) -o $$(<:B:S=.exe) $i $g > /dev/null 2>&1
+ then $$(CC) -o $$(<:B:S=.exe) $i > /dev/null 2>&1 || {
+ r="$g"
+ break 2
+ }
+ fi
+ g=
+ ;;
+ *) g="$g -l$p"
+ ;;
+ esac
+ done
+ fi
+ done 2>/dev/null
+ echo " $r" > $$(<)
+ rm -f $$(<:B:S=.exe) $$(*:B:S=$$(CC.SUFFIX.OBJECT))
+ end
diff --git a/usr/src/contrib/ast/src/cmd/INIT/MSGFUN.mk b/usr/src/contrib/ast/src/cmd/INIT/MSGFUN.mk
new file mode 100644
index 0000000000..0888d00495
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/MSGFUN.mk
@@ -0,0 +1,2 @@
+/* stub for pre-2000-05-01 nmake */
+":MSGFUN:" : .MAKE .OPERATOR
diff --git a/usr/src/contrib/ast/src/cmd/INIT/MSGKEY.mk b/usr/src/contrib/ast/src/cmd/INIT/MSGKEY.mk
new file mode 100644
index 0000000000..db18559642
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/MSGKEY.mk
@@ -0,0 +1,2 @@
+/* stub for pre-2000-05-01 nmake */
+":MSGKEY:" : .MAKE .OPERATOR
diff --git a/usr/src/contrib/ast/src/cmd/INIT/Makefile b/usr/src/contrib/ast/src/cmd/INIT/Makefile
new file mode 100644
index 0000000000..6224c09d6b
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/Makefile
@@ -0,0 +1,346 @@
+/*
+ * initialization for all packages
+ */
+
+ID = ast
+SILENT = /* this component builds silent -- this prevents us from using it while building it */
+
+:PACKAGE: license=$(ID)
+
+LICENSE = since=1994,author=gsf
+
+PACKAGEROOT = $(INSTALLROOT:T=F:P=L*:O=n)
+
+hurl :: hurl.sh LICENSE=since=2003,author=gsf
+
+iffe :: iffe.sh LICENSE=since=1994,author=gsf+kpv
+
+mktest :: mktest.sh LICENSE=since=2005,author=gsf
+
+package :: package.sh
+
+regress :: regress.sh LICENSE=since=1995,author=gsf
+
+rt :: rt.sh LICENSE=since=2005,author=gsf
+
+$(PACKAGEROOT)/bin :INSTALLDIR: execrate ignore mamprobe package silent
+
+crossexec :: crossexec.sh
+
+ditto :: ditto.sh LICENSE=since=2001,author=gsf+ek
+
+execrate :: execrate.sh LICENSE=since=2002,author=gsf
+
+filter :: filter.sh
+
+ignore :: ignore.sh
+
+silent :: silent.sh
+
+$(PACKAGEROOT)/lib/package :INSTALLDIR: package.mk CONVERT.mk
+
+$(LIBDIR)/make :INSTALLDIR: package.mk PROBE.mk TEST.mk WWW.mk \
+ MSGFUN.mk MSGKEY.mk MAPLIB.mk
+
+:TEST: iffe mamake
+
+cc ld ldd :PACKAGE_INIT: mamake.c proto.c ratz.c release.c
+
+:: RELEASE hosttype.tst p.c hello.c \
+ ar.ibm.risc \
+ cc.specialize cc.pentium4 \
+ ldd.cygwin.i386 \
+ cc.darwin.i386 cc.darwin.i386-64 cc.darwin ldd.darwin \
+ cc.hp.ia64 cc.hp.pa cc.hp.pa64 ld.hp.pa ldd.hp.pa \
+ cc.ibm.risc cc.ibm.risc.gcc ldd.ibm.risc \
+ cc.linux.ia64-icc cc.linux.i386-icc cc.linux.i386-64-icc \
+ cc.lynxos.i386 cc.lynxos.ppc ldd.lynxos \
+ cc.mvs.390 cc.next.i386 cc.next.m68k ldd.mvs.390 \
+ cc.osf.alpha \
+ cc.sco.i386 \
+ cc.sgi.mips2 cc.sgi.mips3 cc.sgi.mips3-o32 cc.sgi.mips4 \
+ cc.sgi.mips4-n32 ldd.sgi \
+ cc.unix.mc68k
+
+LICENSE : .DONTCARE
+
+if ! CC.HOSTTYPE
+ CC.HOSTTYPE := $(_hosttype_|HOSTTYPE)
+end
+
+$(BINDIR)/mkdir :INSTALL: mkdir.sh
+ if test ! -x $(<) -a -x /bin/mkdir
+ then mkdir -p 2>/dev/null || :
+ if test -d ./-p
+ then rmdir ./-p
+ cp $(*) $(<)
+ chmod +x $(<)
+ fi
+ fi
+
+/*
+ * ksh93 function search on PATH
+ * ksh93 builtin command library -lcmd
+ * ksh93 ld library path search on PATH
+ */
+
+$(BINDIR)/.paths :INSTALL: (CC.DIALECT)
+ if test ! -f $(<) -o -w $(<)
+ then N='$("\n")'
+ H=$(CC.HOSTTYPE)
+ P="$(-mam:??$(.GETCONF LIBPATH:/:/ /G:/,/ : /G:Q)?)"
+ b= f= h= l= n= p= u= B= L=
+ set : $P
+ while :
+ do while :
+ do case $1 in
+ '') break 2 ;;
+ :) shift; break ;;
+ esac
+ shift
+ done
+ case $# in
+ 0|1) break ;;
+ esac
+ case $L in
+ ?*) L="$L|" ;;
+ esac
+ L="$L$2=*"
+ B=$1
+ done
+ if test -f $(<)
+ then while read x
+ do case $x in
+ *\$\(\"*) break # to fix 2012-06-18 edit botch #
+ ;;
+ '#'?*) case $h in
+ '') h=$x ;;
+ esac
+ ;;
+ $L) l=$x
+ ;;
+ *BUILTIN_LIB=*) b=$x
+ ;;
+ *FPATH=*) f=$x
+ ;;
+ *PLUGIN_LIB=*) p=$x
+ ;;
+ *) case $u in
+ ?*) u=$u$N ;;
+ esac
+ u=$u$x
+ ;;
+ esac
+ done < $(<)
+ fi
+ ifs=$IFS
+ m=
+ case $p in
+ ?*) b=
+ ;;
+ esac
+ case $b in
+ ?*) IFS='='
+ set $b
+ IFS=$ifs
+ shift
+ p="PLUGIN_LIB=$*"
+ case $b in
+ [Nn][Oo]*) p=no$p ;;
+ esac
+ m=1
+ ;;
+ esac
+ case $f in
+ '') f="FPATH=../fun"
+ m=1
+ ;;
+ esac
+ case $h in
+ '') h='# use { no NO } prefix to permanently disable #' ;;
+ esac
+ case $l in
+ '') set x x : $P
+ l=
+ while :
+ do while :
+ do case $# in
+ 0) break ;;
+ esac
+ x=$1
+ shift
+ case $x in
+ :) break ;;
+ esac
+ done
+ case $# in
+ 0|1) break
+ ;;
+ 2) l=$2
+ ;;
+ *) case "$H" in
+ $3) l=$2; break ;;
+ esac
+ ;;
+ esac
+ done
+ case $l in
+ '') if test -x /lib/dld.sl
+ then l=SHLIB_PATH
+ elif test -x /usr/lib/dyld
+ then l=DYLD_LIBRARY_PATH
+ else case "$H" in
+ ibm.*|mvs.*)
+ l=LIBPATH
+ ;;
+ sgi.mips3)
+ l=LD_LIBRARYN32_PATH
+ ;;
+ sgi.mips4)
+ l=LD_LIBRARYN64_PATH
+ ;;
+ *) l=LD_LIBRARY_PATH
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ case $l in
+ ?*) case $B in
+ '') B=lib ;;
+ esac
+ l="$l=../$B"
+ m=1
+ ;;
+ esac
+ ;;
+ esac
+ case $p in
+ '') p="PLUGIN_LIB=cmd"
+ case '$(CC.DIALECT:N=*EXPORT=[AD]LL*)' in
+ '') p=no$p ;;
+ esac
+ m=1
+ ;;
+ esac
+ case $m in
+ 1) case $u in
+ ?*) u=$N$u ;;
+ esac
+ echo "$h$N$p$N$f$N$l$u" > $(<)
+ ;;
+ esac
+ fi
+
+/*
+ * probe initialization
+ */
+
+for T C+probe C+make+probe.lcl C+pp+probe.lcl
+ if T == "*.lcl"
+ $(T) : .DONTCARE
+ end
+ $(LIBDIR)/probe/$(T:C,+,/,G) :INSTALL: $(T)
+end
+
+$(LIBDIR)/probe/C/mam/probe :INSTALL: mprobe
+
+mprobe :: mprobe.sh
+
+$(LIBDIR)/probe/C/make :INSTALLDIR: probe probe.ini
+
+probe.sh : C+probe make.probe
+ cat $(*) > $(<)
+
+probe :: probe.sh
+
+probe.ini : (CC.HOSTTYPE) probe.win32
+ t=$(CC.HOSTTYPE)
+ ifs=$IFS
+ IFS=.
+ set x $t
+ IFS=$ifs
+ t=$2
+ set x $(*)
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ *probe.$t)
+ break
+ esac
+ done
+ case $1 in
+ ?*) cmp -s $1 $(<) || cp $1 $(<) ;;
+ *) : > $(<)
+ esac
+
+/*
+ * proto initialization
+ */
+
+$(INCLUDEDIR)/$(ID) :INSTALLDIR: prototyped.h
+
+prototyped.h : $(BINDIR)/proto
+ proto -f /dev/null > h.$(tmp).h
+ if $(CMP) -s h.$(tmp).h $(<)
+ then $(RM) -f h.$(tmp).h
+ else $(MV) h.$(tmp).h $(<)
+ fi
+
+/*
+ * check if -ldl is required
+ * this allows makefiles to use -ldl on all systems
+ *
+ * NOTE: this works around the sgi botch:
+ * (1) irix 5.* made -ldl optional but warned
+ * (2) irix 6.* has no -ldl
+ * (3) dynamic progs built on irix 5.* and using -ldl fail
+ * at runtime on irix 6.* because -ldl is not there
+ */
+
+dl :MAPLIB: dl.c
+
+/*
+ * requiring these is a botch
+ */
+
+iconv :MAPLIB: iconv.c
+
+w :MAPLIB: w.c w2.c
+
+/*
+ * miscellaneous -l* checks
+ */
+
+intl :MAPLIB: intl.c
+
+m :MAPLIB: m.c m2.c m3.c m4.c m5.c m6.c
+
+nsl :MAPLIB: nsl.c
+
+/*
+ * what was sco smoking
+ * almost all of gethost* are in -lnsl except gethostbyname which
+ * is in -lsocket which isn't needed to resolve socket() but seems
+ * to do the -lnsl job
+ */
+
+socket :MAPLIB: socket.c nsl.c
+
+/*
+ * more substance abuse
+ * gdbm's ndbm "compatibility" doesn't supply <ndbm.h>, instead supplies
+ * <gdbm/ndbm.h> which provides K&R prototypes *and* it requires -lgdbm
+ * some <ndbm.h> implementations use -lndbm, others -ldbm, still others -lc
+ * this is why unix is starting to look like windows
+ * this map allows makefiles to use -ldbm on all systems
+ *
+ * and this just in: sometimes its <gdbm-ndbm.h> and possibly -lgdbm_compat
+ *
+ * at least the -l* buck stops here
+ */
+
+dbm db - gdbm_compat - gdbm - ndbm - dbm :MAPLIB: db.c gdbm.c gdbm1.c gdbm2.c
diff --git a/usr/src/contrib/ast/src/cmd/INIT/Mamfile b/usr/src/contrib/ast/src/cmd/INIT/Mamfile
new file mode 100644
index 0000000000..ea9b8e7f0e
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/Mamfile
@@ -0,0 +1,1383 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+setv INSTALLROOT ../../..
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+make hurl
+make hurl.sh
+done hurl.sh
+meta hurl %.sh>% hurl.sh hurl
+prev hurl.sh
+setv LICENSE -DLICENSE="since=2003,author=gsf"
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : hurl contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n hurl.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 184 in
+exec - 0) cp hurl.sh hurl
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < hurl.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - hurl.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2003-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > hurl
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - hurl.sh > hurl <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2003-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w hurl -a -x hurl || chmod u+w,+x hurl
+done hurl generated
+make iffe
+make iffe.sh
+done iffe.sh
+meta iffe %.sh>% iffe.sh iffe
+prev iffe.sh
+setv LICENSE -DLICENSE="since=1994,author=gsf+kpv"
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : iffe contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n iffe.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 225 in
+exec - 0) cp iffe.sh iffe
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < iffe.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - iffe.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-author?Phong Vo <kpv@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > iffe
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - iffe.sh > iffe <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-author?Phong Vo <kpv@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w iffe -a -x iffe || chmod u+w,+x iffe
+done iffe generated
+make mktest
+make mktest.sh
+done mktest.sh
+meta mktest %.sh>% mktest.sh mktest
+prev mktest.sh
+setv LICENSE -DLICENSE="since=2005,author=gsf"
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : mktest contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n mktest.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 184 in
+exec - 0) cp mktest.sh mktest
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < mktest.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - mktest.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > mktest
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - mktest.sh > mktest <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w mktest -a -x mktest || chmod u+w,+x mktest
+done mktest generated
+make package
+make package.sh
+done package.sh
+meta package %.sh>% package.sh package
+prev package.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : package contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n package.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 184 in
+exec - 0) cp package.sh package
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < package.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - package.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > package
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - package.sh > package <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w package -a -x package || chmod u+w,+x package
+done package generated
+make regress
+make regress.sh
+done regress.sh
+meta regress %.sh>% regress.sh regress
+prev regress.sh
+setv LICENSE -DLICENSE="since=1995,author=gsf"
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : regress contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n regress.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 184 in
+exec - 0) cp regress.sh regress
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < regress.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - regress.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1995-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > regress
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - regress.sh > regress <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1995-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w regress -a -x regress || chmod u+w,+x regress
+done regress generated
+make rt
+make rt.sh
+done rt.sh
+meta rt %.sh>% rt.sh rt
+prev rt.sh
+setv LICENSE -DLICENSE="since=2005,author=gsf"
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : rt contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n rt.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 184 in
+exec - 0) cp rt.sh rt
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < rt.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - rt.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > rt
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - rt.sh > rt <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w rt -a -x rt || chmod u+w,+x rt
+done rt generated
+make crossexec
+make crossexec.sh
+done crossexec.sh
+meta crossexec %.sh>% crossexec.sh crossexec
+prev crossexec.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : crossexec contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n crossexec.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 184 in
+exec - 0) cp crossexec.sh crossexec
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < crossexec.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - crossexec.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > crossexec
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - crossexec.sh > crossexec <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w crossexec -a -x crossexec || chmod u+w,+x crossexec
+done crossexec generated
+make ditto
+make ditto.sh
+done ditto.sh
+meta ditto %.sh>% ditto.sh ditto
+prev ditto.sh
+setv LICENSE -DLICENSE="since=2001,author=gsf+ek"
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : ditto contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n ditto.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 232 in
+exec - 0) cp ditto.sh ditto
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < ditto.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - ditto.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-author?Lefty Koutsofios <ek@research.att.com>][-copyright?Copyright (c) 2001-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > ditto
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - ditto.sh > ditto <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-author?Lefty Koutsofios <ek@research.att.com>][-copyright?Copyright (c) 2001-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w ditto -a -x ditto || chmod u+w,+x ditto
+done ditto generated
+make execrate
+make execrate.sh
+done execrate.sh
+meta execrate %.sh>% execrate.sh execrate
+prev execrate.sh
+setv LICENSE -DLICENSE="since=2002,author=gsf"
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : execrate contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n execrate.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 184 in
+exec - 0) cp execrate.sh execrate
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < execrate.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - execrate.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2002-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > execrate
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - execrate.sh > execrate <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2002-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w execrate -a -x execrate || chmod u+w,+x execrate
+done execrate generated
+make filter
+make filter.sh
+done filter.sh
+meta filter %.sh>% filter.sh filter
+prev filter.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : filter contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n filter.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 184 in
+exec - 0) cp filter.sh filter
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < filter.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - filter.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - } > filter
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - filter.sh > filter <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+exec - !
+exec - ;;
+exec - esac
+exec - test -w filter -a -x filter || chmod u+w,+x filter
+done filter generated
+make ignore
+make ignore.sh
+done ignore.sh
+meta ignore %.sh>% ignore.sh ignore
+prev ignore.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : ignore contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n ignore.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 0 in
+exec - 0) cp ignore.sh ignore
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < ignore.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - ignore.sh <<'!'
+exec -
+exec - !
+exec - } > ignore
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - ignore.sh > ignore <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec -
+exec - !
+exec - ;;
+exec - esac
+exec - test -w ignore -a -x ignore || chmod u+w,+x ignore
+done ignore generated
+make silent
+make silent.sh
+done silent.sh
+meta silent %.sh>% silent.sh silent
+prev silent.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : silent contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n silent.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 0 in
+exec - 0) cp silent.sh silent
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < silent.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - silent.sh <<'!'
+exec -
+exec - !
+exec - } > silent
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - silent.sh > silent <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec -
+exec - !
+exec - ;;
+exec - esac
+exec - test -w silent -a -x silent || chmod u+w,+x silent
+done silent generated
+make mamake
+make mamake.o
+make mamake.c
+make shlib-compat.h implicit
+done shlib-compat.h dontcare virtual
+make ast.h implicit
+done ast.h dontcare virtual
+done mamake.c
+meta mamake.o %.c>%.o mamake.c mamake
+prev mamake.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"\" -c mamake.c
+done mamake.o generated
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o mamake mamake.o
+done mamake generated
+make proto
+make proto.o
+make proto.c
+done proto.c
+meta proto.o %.c>%.o proto.c proto
+prev proto.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c proto.c
+done proto.o generated
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o proto proto.o
+done proto generated
+make ratz
+make ratz.o
+make ratz.c
+make unix.h implicit
+done unix.h dontcare virtual
+make alloc.h implicit
+done alloc.h dontcare virtual
+make unixio.h implicit
+done unixio.h dontcare virtual
+make ast_std.h implicit
+done ast_std.h dontcare virtual
+make windows.h implicit
+done windows.h dontcare virtual
+make io.h implicit
+done io.h dontcare virtual
+make direct.h implicit
+done direct.h dontcare virtual
+prev ast.h implicit
+done ratz.c
+meta ratz.o %.c>%.o ratz.c ratz
+prev ratz.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c ratz.c
+done ratz.o generated
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o ratz ratz.o
+done ratz generated
+make release
+make release.o
+make release.c
+prev ast.h implicit
+done release.c
+meta release.o %.c>%.o release.c release
+prev release.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"\" -c release.c
+done release.o generated
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o release release.o
+done release generated
+make mprobe
+make mprobe.sh
+done mprobe.sh
+meta mprobe %.sh>% mprobe.sh mprobe
+prev mprobe.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : mprobe contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n mprobe.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 0 in
+exec - 0) cp mprobe.sh mprobe
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < mprobe.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - mprobe.sh <<'!'
+exec -
+exec - !
+exec - } > mprobe
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - mprobe.sh > mprobe <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec -
+exec - !
+exec - ;;
+exec - esac
+exec - test -w mprobe -a -x mprobe || chmod u+w,+x mprobe
+done mprobe generated
+make probe
+make probe.sh
+make C+probe
+done C+probe
+make make.probe
+done make.probe
+exec - cat C+probe make.probe > probe.sh
+done probe.sh generated
+meta probe %.sh>% probe.sh probe
+prev probe.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : probe contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n probe.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 0 in
+exec - 0) cp probe.sh probe
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < probe.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - probe.sh <<'!'
+exec -
+exec - !
+exec - } > probe
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - probe.sh > probe <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec -
+exec - !
+exec - ;;
+exec - esac
+exec - test -w probe -a -x probe || chmod u+w,+x probe
+done probe generated
+make ${INSTALLROOT}/bin
+exec - if test ! -d ${INSTALLROOT}/bin
+exec - then mkdir -p ${INSTALLROOT}/bin
+exec - fi
+done ${INSTALLROOT}/bin generated
+make ${INSTALLROOT}/bin/hurl
+prev ${INSTALLROOT}/bin
+prev hurl
+exec - test '' = 'hurl' || ${STDCMP} 2>/dev/null -s hurl ${INSTALLROOT}/bin/hurl || { ${STDMV} ${INSTALLROOT}/bin/hurl ${INSTALLROOT}/bin/hurl.old 2>/dev/null || true; ${STDCP} hurl ${INSTALLROOT}/bin/hurl ;}
+done ${INSTALLROOT}/bin/hurl generated
+make ${INSTALLROOT}/bin/iffe
+prev iffe
+exec - test '' = 'iffe' || ${STDCMP} 2>/dev/null -s iffe ${INSTALLROOT}/bin/iffe || { ${STDMV} ${INSTALLROOT}/bin/iffe ${INSTALLROOT}/bin/iffe.old 2>/dev/null || true; ${STDCP} iffe ${INSTALLROOT}/bin/iffe ;}
+done ${INSTALLROOT}/bin/iffe generated
+make ${INSTALLROOT}/bin/mktest
+prev mktest
+exec - test '' = 'mktest' || ${STDCMP} 2>/dev/null -s mktest ${INSTALLROOT}/bin/mktest || { ${STDMV} ${INSTALLROOT}/bin/mktest ${INSTALLROOT}/bin/mktest.old 2>/dev/null || true; ${STDCP} mktest ${INSTALLROOT}/bin/mktest ;}
+done ${INSTALLROOT}/bin/mktest generated
+make ${INSTALLROOT}/bin/package
+prev package
+exec - test '' = 'package' || ${STDCMP} 2>/dev/null -s package ${INSTALLROOT}/bin/package || { ${STDMV} ${INSTALLROOT}/bin/package ${INSTALLROOT}/bin/package.old 2>/dev/null || true; ${STDCP} package ${INSTALLROOT}/bin/package ;}
+done ${INSTALLROOT}/bin/package generated
+make ${INSTALLROOT}/bin/regress
+prev regress
+exec - test '' = 'regress' || ${STDCMP} 2>/dev/null -s regress ${INSTALLROOT}/bin/regress || { ${STDMV} ${INSTALLROOT}/bin/regress ${INSTALLROOT}/bin/regress.old 2>/dev/null || true; ${STDCP} regress ${INSTALLROOT}/bin/regress ;}
+done ${INSTALLROOT}/bin/regress generated
+make ${INSTALLROOT}/bin/rt
+prev rt
+exec - test '' = 'rt' || ${STDCMP} 2>/dev/null -s rt ${INSTALLROOT}/bin/rt || { ${STDMV} ${INSTALLROOT}/bin/rt ${INSTALLROOT}/bin/rt.old 2>/dev/null || true; ${STDCP} rt ${INSTALLROOT}/bin/rt ;}
+done ${INSTALLROOT}/bin/rt generated
+make ${PACKAGEROOT}/bin
+exec - if test ! -d ${PACKAGEROOT}/bin
+exec - then mkdir -p ${PACKAGEROOT}/bin
+exec - fi
+done ${PACKAGEROOT}/bin generated
+make ${PACKAGEROOT}/bin/execrate
+prev ${PACKAGEROOT}/bin
+prev execrate
+exec - test '' = 'execrate' || ${STDCMP} 2>/dev/null -s execrate ${PACKAGEROOT}/bin/execrate || { ${STDMV} ${PACKAGEROOT}/bin/execrate ${PACKAGEROOT}/bin/execrate.old 2>/dev/null || true; ${STDCP} execrate ${PACKAGEROOT}/bin/execrate ;}
+done ${PACKAGEROOT}/bin/execrate generated
+make ${PACKAGEROOT}/bin/ignore
+prev ignore
+exec - test '' = 'ignore' || ${STDCMP} 2>/dev/null -s ignore ${PACKAGEROOT}/bin/ignore || { ${STDMV} ${PACKAGEROOT}/bin/ignore ${PACKAGEROOT}/bin/ignore.old 2>/dev/null || true; ${STDCP} ignore ${PACKAGEROOT}/bin/ignore ;}
+done ${PACKAGEROOT}/bin/ignore generated
+make ${PACKAGEROOT}/bin/mamprobe
+make mamprobe
+meta mamprobe %.sh>% mamprobe.sh mamprobe
+make mamprobe.sh
+done mamprobe.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : mamprobe contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n mamprobe.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 0 in
+exec - 0) cp mamprobe.sh mamprobe
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < mamprobe.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - mamprobe.sh <<'!'
+exec -
+exec - !
+exec - } > mamprobe
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - mamprobe.sh > mamprobe <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec -
+exec - !
+exec - ;;
+exec - esac
+exec - test -w mamprobe -a -x mamprobe || chmod u+w,+x mamprobe
+done mamprobe generated
+exec - test '' = 'mamprobe' || ${STDCMP} 2>/dev/null -s mamprobe ${PACKAGEROOT}/bin/mamprobe || { ${STDMV} ${PACKAGEROOT}/bin/mamprobe ${PACKAGEROOT}/bin/mamprobe.old 2>/dev/null || true; ${STDCP} mamprobe ${PACKAGEROOT}/bin/mamprobe ;}
+done ${PACKAGEROOT}/bin/mamprobe generated
+make ${PACKAGEROOT}/bin/package
+prev package
+exec - test '' = 'package' || ${STDCMP} 2>/dev/null -s package ${PACKAGEROOT}/bin/package || { ${STDMV} ${PACKAGEROOT}/bin/package ${PACKAGEROOT}/bin/package.old 2>/dev/null || true; ${STDCP} package ${PACKAGEROOT}/bin/package ;}
+done ${PACKAGEROOT}/bin/package generated
+make ${PACKAGEROOT}/bin/silent
+prev silent
+exec - test '' = 'silent' || ${STDCMP} 2>/dev/null -s silent ${PACKAGEROOT}/bin/silent || { ${STDMV} ${PACKAGEROOT}/bin/silent ${PACKAGEROOT}/bin/silent.old 2>/dev/null || true; ${STDCP} silent ${PACKAGEROOT}/bin/silent ;}
+done ${PACKAGEROOT}/bin/silent generated
+make ${INSTALLROOT}/bin/crossexec
+prev crossexec
+exec - test '' = 'crossexec' || ${STDCMP} 2>/dev/null -s crossexec ${INSTALLROOT}/bin/crossexec || { ${STDMV} ${INSTALLROOT}/bin/crossexec ${INSTALLROOT}/bin/crossexec.old 2>/dev/null || true; ${STDCP} crossexec ${INSTALLROOT}/bin/crossexec ;}
+done ${INSTALLROOT}/bin/crossexec generated
+make ${INSTALLROOT}/bin/ditto
+prev ditto
+exec - test '' = 'ditto' || ${STDCMP} 2>/dev/null -s ditto ${INSTALLROOT}/bin/ditto || { ${STDMV} ${INSTALLROOT}/bin/ditto ${INSTALLROOT}/bin/ditto.old 2>/dev/null || true; ${STDCP} ditto ${INSTALLROOT}/bin/ditto ;}
+done ${INSTALLROOT}/bin/ditto generated
+make ${INSTALLROOT}/bin/filter
+prev filter
+exec - test '' = 'filter' || ${STDCMP} 2>/dev/null -s filter ${INSTALLROOT}/bin/filter || { ${STDMV} ${INSTALLROOT}/bin/filter ${INSTALLROOT}/bin/filter.old 2>/dev/null || true; ${STDCP} filter ${INSTALLROOT}/bin/filter ;}
+done ${INSTALLROOT}/bin/filter generated
+make ${PACKAGEROOT}/lib/package
+exec - if test ! -d ${PACKAGEROOT}/lib/package
+exec - then mkdir -p ${PACKAGEROOT}/lib/package
+exec - fi
+done ${PACKAGEROOT}/lib/package generated
+make ${PACKAGEROOT}/lib/package/package.mk
+prev ${PACKAGEROOT}/lib/package
+make package.mk
+done package.mk
+exec - test '' = 'package.mk' || ${STDCMP} 2>/dev/null -s package.mk ${PACKAGEROOT}/lib/package/package.mk || { ${STDMV} ${PACKAGEROOT}/lib/package/package.mk ${PACKAGEROOT}/lib/package/package.mk.old 2>/dev/null || true; ${STDCP} package.mk ${PACKAGEROOT}/lib/package/package.mk ;}
+done ${PACKAGEROOT}/lib/package/package.mk generated
+make ${PACKAGEROOT}/lib/package/CONVERT.mk
+make CONVERT.mk
+done CONVERT.mk
+exec - test '' = 'CONVERT.mk' || ${STDCMP} 2>/dev/null -s CONVERT.mk ${PACKAGEROOT}/lib/package/CONVERT.mk || { ${STDMV} ${PACKAGEROOT}/lib/package/CONVERT.mk ${PACKAGEROOT}/lib/package/CONVERT.mk.old 2>/dev/null || true; ${STDCP} CONVERT.mk ${PACKAGEROOT}/lib/package/CONVERT.mk ;}
+done ${PACKAGEROOT}/lib/package/CONVERT.mk generated
+make ${INSTALLROOT}/lib/make
+exec - if test ! -d ${INSTALLROOT}/lib/make
+exec - then mkdir -p ${INSTALLROOT}/lib/make
+exec - fi
+done ${INSTALLROOT}/lib/make generated
+make ${INSTALLROOT}/lib/make/package.mk
+prev ${INSTALLROOT}/lib/make
+prev package.mk
+exec - test '' = 'package.mk' || ${STDCMP} 2>/dev/null -s package.mk ${INSTALLROOT}/lib/make/package.mk || { ${STDMV} ${INSTALLROOT}/lib/make/package.mk ${INSTALLROOT}/lib/make/package.mk.old 2>/dev/null || true; ${STDCP} package.mk ${INSTALLROOT}/lib/make/package.mk ;}
+done ${INSTALLROOT}/lib/make/package.mk generated
+make ${INSTALLROOT}/lib/make/PROBE.mk
+make PROBE.mk
+done PROBE.mk
+exec - test '' = 'PROBE.mk' || ${STDCMP} 2>/dev/null -s PROBE.mk ${INSTALLROOT}/lib/make/PROBE.mk || { ${STDMV} ${INSTALLROOT}/lib/make/PROBE.mk ${INSTALLROOT}/lib/make/PROBE.mk.old 2>/dev/null || true; ${STDCP} PROBE.mk ${INSTALLROOT}/lib/make/PROBE.mk ;}
+done ${INSTALLROOT}/lib/make/PROBE.mk generated
+make ${INSTALLROOT}/lib/make/TEST.mk
+make TEST.mk
+done TEST.mk
+exec - test '' = 'TEST.mk' || ${STDCMP} 2>/dev/null -s TEST.mk ${INSTALLROOT}/lib/make/TEST.mk || { ${STDMV} ${INSTALLROOT}/lib/make/TEST.mk ${INSTALLROOT}/lib/make/TEST.mk.old 2>/dev/null || true; ${STDCP} TEST.mk ${INSTALLROOT}/lib/make/TEST.mk ;}
+done ${INSTALLROOT}/lib/make/TEST.mk generated
+make ${INSTALLROOT}/lib/make/WWW.mk
+make WWW.mk
+done WWW.mk
+exec - test '' = 'WWW.mk' || ${STDCMP} 2>/dev/null -s WWW.mk ${INSTALLROOT}/lib/make/WWW.mk || { ${STDMV} ${INSTALLROOT}/lib/make/WWW.mk ${INSTALLROOT}/lib/make/WWW.mk.old 2>/dev/null || true; ${STDCP} WWW.mk ${INSTALLROOT}/lib/make/WWW.mk ;}
+done ${INSTALLROOT}/lib/make/WWW.mk generated
+make ${INSTALLROOT}/lib/make/MSGFUN.mk
+make MSGFUN.mk
+done MSGFUN.mk
+exec - test '' = 'MSGFUN.mk' || ${STDCMP} 2>/dev/null -s MSGFUN.mk ${INSTALLROOT}/lib/make/MSGFUN.mk || { ${STDMV} ${INSTALLROOT}/lib/make/MSGFUN.mk ${INSTALLROOT}/lib/make/MSGFUN.mk.old 2>/dev/null || true; ${STDCP} MSGFUN.mk ${INSTALLROOT}/lib/make/MSGFUN.mk ;}
+done ${INSTALLROOT}/lib/make/MSGFUN.mk generated
+make ${INSTALLROOT}/lib/make/MSGKEY.mk
+make MSGKEY.mk
+done MSGKEY.mk
+exec - test '' = 'MSGKEY.mk' || ${STDCMP} 2>/dev/null -s MSGKEY.mk ${INSTALLROOT}/lib/make/MSGKEY.mk || { ${STDMV} ${INSTALLROOT}/lib/make/MSGKEY.mk ${INSTALLROOT}/lib/make/MSGKEY.mk.old 2>/dev/null || true; ${STDCP} MSGKEY.mk ${INSTALLROOT}/lib/make/MSGKEY.mk ;}
+done ${INSTALLROOT}/lib/make/MSGKEY.mk generated
+make ${INSTALLROOT}/lib/make/MAPLIB.mk
+make MAPLIB.mk
+done MAPLIB.mk
+exec - test '' = 'MAPLIB.mk' || ${STDCMP} 2>/dev/null -s MAPLIB.mk ${INSTALLROOT}/lib/make/MAPLIB.mk || { ${STDMV} ${INSTALLROOT}/lib/make/MAPLIB.mk ${INSTALLROOT}/lib/make/MAPLIB.mk.old 2>/dev/null || true; ${STDCP} MAPLIB.mk ${INSTALLROOT}/lib/make/MAPLIB.mk ;}
+done ${INSTALLROOT}/lib/make/MAPLIB.mk generated
+make ${INSTALLROOT}/bin/mamake
+prev mamake
+exec - test '' = 'mamake' || ${STDCMP} 2>/dev/null -s mamake ${INSTALLROOT}/bin/mamake || { ${STDMV} ${INSTALLROOT}/bin/mamake ${INSTALLROOT}/bin/mamake.old 2>/dev/null || true; ${STDCP} mamake ${INSTALLROOT}/bin/mamake ;}
+done ${INSTALLROOT}/bin/mamake generated
+make ${INSTALLROOT}/bin/proto
+prev proto
+exec - test '' = 'proto' || ${STDCMP} 2>/dev/null -s proto ${INSTALLROOT}/bin/proto || { ${STDMV} ${INSTALLROOT}/bin/proto ${INSTALLROOT}/bin/proto.old 2>/dev/null || true; ${STDCP} proto ${INSTALLROOT}/bin/proto ;}
+done ${INSTALLROOT}/bin/proto generated
+make ${INSTALLROOT}/bin/ratz
+prev ratz
+exec - test '' = 'ratz' || ${STDCMP} 2>/dev/null -s ratz ${INSTALLROOT}/bin/ratz || { ${STDMV} ${INSTALLROOT}/bin/ratz ${INSTALLROOT}/bin/ratz.old 2>/dev/null || true; ${STDCP} ratz ${INSTALLROOT}/bin/ratz ;}
+done ${INSTALLROOT}/bin/ratz generated
+make ${INSTALLROOT}/bin/release
+prev release
+exec - test '' = 'release' || ${STDCMP} 2>/dev/null -s release ${INSTALLROOT}/bin/release || { ${STDMV} ${INSTALLROOT}/bin/release ${INSTALLROOT}/bin/release.old 2>/dev/null || true; ${STDCP} release ${INSTALLROOT}/bin/release ;}
+done ${INSTALLROOT}/bin/release generated
+make ${INSTALLROOT}/bin/mkdir
+make mkdir.sh
+done mkdir.sh
+exec - if test ! -x ${INSTALLROOT}/bin/mkdir -a -x /bin/mkdir
+exec - then mkdir -p 2>/dev/null || :
+exec - if test -d ./-p
+exec - then rmdir ./-p
+exec - cp mkdir.sh ${INSTALLROOT}/bin/mkdir
+exec - chmod +x ${INSTALLROOT}/bin/mkdir
+exec - fi
+exec - fi
+done ${INSTALLROOT}/bin/mkdir generated
+make ${INSTALLROOT}/bin/.paths
+exec - if test ! -f ${INSTALLROOT}/bin/.paths -o -w ${INSTALLROOT}/bin/.paths
+exec - then N='
+exec - '
+exec - H=${mam_cc_HOSTTYPE}
+exec - P=""
+exec - b= f= h= l= n= p= u= B= L=
+exec - set : $P
+exec - while :
+exec - do while :
+exec - do case $1 in
+exec - '') break 2 ;;
+exec - :) shift; break ;;
+exec - esac
+exec - shift
+exec - done
+exec - case $# in
+exec - 0|1) break ;;
+exec - esac
+exec - case $L in
+exec - ?*) L="$L|" ;;
+exec - esac
+exec - L="$L$2=*"
+exec - B=$1
+exec - done
+exec - if test -f ${INSTALLROOT}/bin/.paths
+exec - then while read x
+exec - do case $x in
+exec - *\$\(\"*) break
+exec - ;;
+exec - '#'?*) case $h in
+exec - '') h=$x ;;
+exec - esac
+exec - ;;
+exec - $L) l=$x
+exec - ;;
+exec - *BUILTIN_LIB=*) b=$x
+exec - ;;
+exec - *FPATH=*) f=$x
+exec - ;;
+exec - *PLUGIN_LIB=*) p=$x
+exec - ;;
+exec - *) case $u in
+exec - ?*) u=$u$N ;;
+exec - esac
+exec - u=$u$x
+exec - ;;
+exec - esac
+exec - done < ${INSTALLROOT}/bin/.paths
+exec - fi
+exec - ifs=$IFS
+exec - m=
+exec - case $p in
+exec - ?*) b=
+exec - ;;
+exec - esac
+exec - case $b in
+exec - ?*) IFS='='
+exec - set $b
+exec - IFS=$ifs
+exec - shift
+exec - p="PLUGIN_LIB=$*"
+exec - case $b in
+exec - [Nn][Oo]*) p=no$p ;;
+exec - esac
+exec - m=1
+exec - ;;
+exec - esac
+exec - case $f in
+exec - '') f="FPATH=../fun"
+exec - m=1
+exec - ;;
+exec - esac
+exec - case $h in
+exec - '') h='# use { no NO } prefix to permanently disable #' ;;
+exec - esac
+exec - case $l in
+exec - '') set x x : $P
+exec - l=
+exec - while :
+exec - do while :
+exec - do case $# in
+exec - 0) break ;;
+exec - esac
+exec - x=$1
+exec - shift
+exec - case $x in
+exec - :) break ;;
+exec - esac
+exec - done
+exec - case $# in
+exec - 0|1) break
+exec - ;;
+exec - 2) l=$2
+exec - ;;
+exec - *) case "$H" in
+exec - $3) l=$2; break ;;
+exec - esac
+exec - ;;
+exec - esac
+exec - done
+exec - case $l in
+exec - '') if test -x /lib/dld.sl
+exec - then l=SHLIB_PATH
+exec - elif test -x /usr/lib/dyld
+exec - then l=DYLD_LIBRARY_PATH
+exec - else case "$H" in
+exec - ibm.*|mvs.*)
+exec - l=LIBPATH
+exec - ;;
+exec - sgi.mips3)
+exec - l=LD_LIBRARYN32_PATH
+exec - ;;
+exec - sgi.mips4)
+exec - l=LD_LIBRARYN64_PATH
+exec - ;;
+exec - *) l=LD_LIBRARY_PATH
+exec - ;;
+exec - esac
+exec - fi
+exec - ;;
+exec - esac
+exec - case $l in
+exec - ?*) case $B in
+exec - '') B=lib ;;
+exec - esac
+exec - l="$l=../$B"
+exec - m=1
+exec - ;;
+exec - esac
+exec - ;;
+exec - esac
+exec - case $p in
+exec - '') p="PLUGIN_LIB=cmd"
+exec - case '' in
+exec - '') p=no$p ;;
+exec - esac
+exec - m=1
+exec - ;;
+exec - esac
+exec - case $m in
+exec - 1) case $u in
+exec - ?*) u=$N$u ;;
+exec - esac
+exec - echo "$h$N$p$N$f$N$l$u" > ${INSTALLROOT}/bin/.paths
+exec - ;;
+exec - esac
+exec - fi
+done ${INSTALLROOT}/bin/.paths generated
+make ${INSTALLROOT}/lib/probe/C
+exec - if test ! -d ${INSTALLROOT}/lib/probe/C
+exec - then mkdir -p ${INSTALLROOT}/lib/probe/C
+exec - fi
+done ${INSTALLROOT}/lib/probe/C generated
+make ${INSTALLROOT}/lib/probe/C/probe
+prev ${INSTALLROOT}/lib/probe/C
+prev C+probe
+exec - test '' = 'C+probe' || ${STDCMP} 2>/dev/null -s C+probe ${INSTALLROOT}/lib/probe/C/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/probe ${INSTALLROOT}/lib/probe/C/probe.old 2>/dev/null || true; ${STDCP} C+probe ${INSTALLROOT}/lib/probe/C/probe ;}
+done ${INSTALLROOT}/lib/probe/C/probe generated
+make ${INSTALLROOT}/lib/probe/C/make
+exec - if test ! -d ${INSTALLROOT}/lib/probe/C/make
+exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/make
+exec - fi
+done ${INSTALLROOT}/lib/probe/C/make generated
+prev ${INSTALLROOT}/lib/probe/C/make
+make ${INSTALLROOT}/lib/probe/C/pp
+exec - if test ! -d ${INSTALLROOT}/lib/probe/C/pp
+exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/pp
+exec - fi
+done ${INSTALLROOT}/lib/probe/C/pp generated
+prev ${INSTALLROOT}/lib/probe/C/pp
+make ${INSTALLROOT}/lib/probe/C/mam
+exec - if test ! -d ${INSTALLROOT}/lib/probe/C/mam
+exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/mam
+exec - fi
+done ${INSTALLROOT}/lib/probe/C/mam generated
+make ${INSTALLROOT}/lib/probe/C/mam/probe
+prev ${INSTALLROOT}/lib/probe/C/mam
+prev mprobe
+exec - test '' = 'mprobe' || ${STDCMP} 2>/dev/null -s mprobe ${INSTALLROOT}/lib/probe/C/mam/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/mam/probe ${INSTALLROOT}/lib/probe/C/mam/probe.old 2>/dev/null || true; ${STDCP} mprobe ${INSTALLROOT}/lib/probe/C/mam/probe ;}
+done ${INSTALLROOT}/lib/probe/C/mam/probe generated
+make ${INSTALLROOT}/lib/probe/C/mam/mprobe
+prev mprobe
+exec - test '' = 'mprobe' || ${STDCMP} 2>/dev/null -s mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/mam/mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe.old 2>/dev/null || true; ${STDCP} mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe ;}
+done ${INSTALLROOT}/lib/probe/C/mam/mprobe generated
+make ${INSTALLROOT}/lib/probe/C/make/probe
+prev probe
+exec - test '' = 'probe' || ${STDCMP} 2>/dev/null -s probe ${INSTALLROOT}/lib/probe/C/make/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/make/probe ${INSTALLROOT}/lib/probe/C/make/probe.old 2>/dev/null || true; ${STDCP} probe ${INSTALLROOT}/lib/probe/C/make/probe ;}
+done ${INSTALLROOT}/lib/probe/C/make/probe generated
+make ${INSTALLROOT}/lib/probe/C/make/probe.ini
+make probe.ini
+make probe.win32
+done probe.win32
+exec - t=${mam_cc_HOSTTYPE}
+exec - ifs=$IFS
+exec - IFS=.
+exec - set x $t
+exec - IFS=$ifs
+exec - t=$2
+exec - set x probe.win32
+exec - while :
+exec - do shift
+exec - case $# in
+exec - 0) break ;;
+exec - esac
+exec - case $1 in
+exec - *probe.$t)
+exec - break
+exec - esac
+exec - done
+exec - case $1 in
+exec - ?*) cmp -s $1 probe.ini || cp $1 probe.ini ;;
+exec - *) : > probe.ini
+exec - esac
+done probe.ini generated
+exec - test '' = 'probe.ini' || ${STDCMP} 2>/dev/null -s probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini || { ${STDMV} ${INSTALLROOT}/lib/probe/C/make/probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini.old 2>/dev/null || true; ${STDCP} probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini ;}
+done ${INSTALLROOT}/lib/probe/C/make/probe.ini generated
+make ${INSTALLROOT}/include/ast
+exec - if test ! -d ${INSTALLROOT}/include/ast
+exec - then mkdir -p ${INSTALLROOT}/include/ast
+exec - fi
+done ${INSTALLROOT}/include/ast generated
+make ${INSTALLROOT}/include/ast/prototyped.h
+prev ${INSTALLROOT}/include/ast
+make prototyped.h
+prev ${INSTALLROOT}/bin/proto
+exec - proto -f /dev/null > h.${COTEMP}.h
+exec - if cmp 2>/dev/null -s h.${COTEMP}.h prototyped.h
+exec - then rm -f h.${COTEMP}.h
+exec - else mv h.${COTEMP}.h prototyped.h
+exec - fi
+done prototyped.h generated
+exec - test '' = 'prototyped.h' || ${STDCMP} 2>/dev/null -s prototyped.h ${INSTALLROOT}/include/ast/prototyped.h || { ${STDMV} ${INSTALLROOT}/include/ast/prototyped.h ${INSTALLROOT}/include/ast/prototyped.h.old 2>/dev/null || true; ${STDCP} prototyped.h ${INSTALLROOT}/include/ast/prototyped.h ;}
+done ${INSTALLROOT}/include/ast/prototyped.h generated
+make ${INSTALLROOT}/lib/lib
+exec - if test ! -d ${INSTALLROOT}/lib/lib
+exec - then mkdir -p ${INSTALLROOT}/lib/lib
+exec - fi
+done ${INSTALLROOT}/lib/lib generated
+make ${INSTALLROOT}/lib/lib/dl
+prev ${INSTALLROOT}/lib/lib
+make dl.req
+make dl.c
+done dl.c
+exec - set -
+exec - r='-'
+exec - for i in dl.c
+exec - do if ${CC} -c $i > /dev/null
+exec - then g=
+exec - for p in dl -
+exec - do case $p in
+exec - -) if ${CC} -o dl.exe $i $g > /dev/null 2>&1
+exec - then ${CC} -o dl.exe $i > /dev/null 2>&1 || {
+exec - r="$g"
+exec - break 2
+exec - }
+exec - fi
+exec - g=
+exec - ;;
+exec - *) g="$g -l$p"
+exec - ;;
+exec - esac
+exec - done
+exec - fi
+exec - done 2>/dev/null
+exec - echo " $r" > dl.req
+exec - rm -f dl.exe dl
+done dl.req generated
+exec - test '' = 'dl.req' || ${STDCMP} 2>/dev/null -s dl.req ${INSTALLROOT}/lib/lib/dl || { ${STDMV} ${INSTALLROOT}/lib/lib/dl ${INSTALLROOT}/lib/lib/dl.old 2>/dev/null || true; ${STDCP} dl.req ${INSTALLROOT}/lib/lib/dl ;}
+done ${INSTALLROOT}/lib/lib/dl generated
+make ${INSTALLROOT}/lib/lib/iconv
+make iconv.req
+make iconv.c
+done iconv.c
+exec - set -
+exec - r='-'
+exec - for i in iconv.c
+exec - do if ${CC} -c $i > /dev/null
+exec - then g=
+exec - for p in iconv -
+exec - do case $p in
+exec - -) if ${CC} -o iconv.exe $i $g > /dev/null 2>&1
+exec - then ${CC} -o iconv.exe $i > /dev/null 2>&1 || {
+exec - r="$g"
+exec - break 2
+exec - }
+exec - fi
+exec - g=
+exec - ;;
+exec - *) g="$g -l$p"
+exec - ;;
+exec - esac
+exec - done
+exec - fi
+exec - done 2>/dev/null
+exec - echo " $r" > iconv.req
+exec - rm -f iconv.exe iconv
+done iconv.req generated
+exec - test '' = 'iconv.req' || ${STDCMP} 2>/dev/null -s iconv.req ${INSTALLROOT}/lib/lib/iconv || { ${STDMV} ${INSTALLROOT}/lib/lib/iconv ${INSTALLROOT}/lib/lib/iconv.old 2>/dev/null || true; ${STDCP} iconv.req ${INSTALLROOT}/lib/lib/iconv ;}
+done ${INSTALLROOT}/lib/lib/iconv generated
+make ${INSTALLROOT}/lib/lib/w
+make w.req
+make w.c
+done w.c
+make w2.c
+done w2.c
+exec - set -
+exec - r='-'
+exec - for i in w.c w2.c
+exec - do if ${CC} -c $i > /dev/null
+exec - then g=
+exec - for p in w -
+exec - do case $p in
+exec - -) if ${CC} -o w.exe $i $g > /dev/null 2>&1
+exec - then ${CC} -o w.exe $i > /dev/null 2>&1 || {
+exec - r="$g"
+exec - break 2
+exec - }
+exec - fi
+exec - g=
+exec - ;;
+exec - *) g="$g -l$p"
+exec - ;;
+exec - esac
+exec - done
+exec - fi
+exec - done 2>/dev/null
+exec - echo " $r" > w.req
+exec - rm -f w.exe w w2
+done w.req generated
+exec - test '' = 'w.req' || ${STDCMP} 2>/dev/null -s w.req ${INSTALLROOT}/lib/lib/w || { ${STDMV} ${INSTALLROOT}/lib/lib/w ${INSTALLROOT}/lib/lib/w.old 2>/dev/null || true; ${STDCP} w.req ${INSTALLROOT}/lib/lib/w ;}
+done ${INSTALLROOT}/lib/lib/w generated
+make ${INSTALLROOT}/lib/lib/intl
+make intl.req
+make intl.c
+done intl.c
+exec - set -
+exec - r='-'
+exec - for i in intl.c
+exec - do if ${CC} -c $i > /dev/null
+exec - then g=
+exec - for p in intl -
+exec - do case $p in
+exec - -) if ${CC} -o intl.exe $i $g > /dev/null 2>&1
+exec - then ${CC} -o intl.exe $i > /dev/null 2>&1 || {
+exec - r="$g"
+exec - break 2
+exec - }
+exec - fi
+exec - g=
+exec - ;;
+exec - *) g="$g -l$p"
+exec - ;;
+exec - esac
+exec - done
+exec - fi
+exec - done 2>/dev/null
+exec - echo " $r" > intl.req
+exec - rm -f intl.exe intl
+done intl.req generated
+exec - test '' = 'intl.req' || ${STDCMP} 2>/dev/null -s intl.req ${INSTALLROOT}/lib/lib/intl || { ${STDMV} ${INSTALLROOT}/lib/lib/intl ${INSTALLROOT}/lib/lib/intl.old 2>/dev/null || true; ${STDCP} intl.req ${INSTALLROOT}/lib/lib/intl ;}
+done ${INSTALLROOT}/lib/lib/intl generated
+make ${INSTALLROOT}/lib/lib/m
+make m.req
+make m.c
+done m.c
+make m2.c
+done m2.c
+make m3.c
+done m3.c
+make m4.c
+done m4.c
+make m5.c
+done m5.c
+make m6.c
+done m6.c
+exec - set -
+exec - r='-'
+exec - for i in m.c m2.c m3.c m4.c m5.c m6.c
+exec - do if ${CC} -c $i > /dev/null
+exec - then g=
+exec - for p in m -
+exec - do case $p in
+exec - -) if ${CC} -o m.exe $i $g > /dev/null 2>&1
+exec - then ${CC} -o m.exe $i > /dev/null 2>&1 || {
+exec - r="$g"
+exec - break 2
+exec - }
+exec - fi
+exec - g=
+exec - ;;
+exec - *) g="$g -l$p"
+exec - ;;
+exec - esac
+exec - done
+exec - fi
+exec - done 2>/dev/null
+exec - echo " $r" > m.req
+exec - rm -f m.exe m m2 m3 m4 m5 m6
+done m.req generated
+exec - test '' = 'm.req' || ${STDCMP} 2>/dev/null -s m.req ${INSTALLROOT}/lib/lib/m || { ${STDMV} ${INSTALLROOT}/lib/lib/m ${INSTALLROOT}/lib/lib/m.old 2>/dev/null || true; ${STDCP} m.req ${INSTALLROOT}/lib/lib/m ;}
+done ${INSTALLROOT}/lib/lib/m generated
+make ${INSTALLROOT}/lib/lib/nsl
+make nsl.req
+make nsl.c
+done nsl.c
+exec - set -
+exec - r='-'
+exec - for i in nsl.c
+exec - do if ${CC} -c $i > /dev/null
+exec - then g=
+exec - for p in nsl -
+exec - do case $p in
+exec - -) if ${CC} -o nsl.exe $i $g > /dev/null 2>&1
+exec - then ${CC} -o nsl.exe $i > /dev/null 2>&1 || {
+exec - r="$g"
+exec - break 2
+exec - }
+exec - fi
+exec - g=
+exec - ;;
+exec - *) g="$g -l$p"
+exec - ;;
+exec - esac
+exec - done
+exec - fi
+exec - done 2>/dev/null
+exec - echo " $r" > nsl.req
+exec - rm -f nsl.exe nsl
+done nsl.req generated
+exec - test '' = 'nsl.req' || ${STDCMP} 2>/dev/null -s nsl.req ${INSTALLROOT}/lib/lib/nsl || { ${STDMV} ${INSTALLROOT}/lib/lib/nsl ${INSTALLROOT}/lib/lib/nsl.old 2>/dev/null || true; ${STDCP} nsl.req ${INSTALLROOT}/lib/lib/nsl ;}
+done ${INSTALLROOT}/lib/lib/nsl generated
+make ${INSTALLROOT}/lib/lib/socket
+make socket.req
+make socket.c
+done socket.c
+prev nsl.c
+exec - set -
+exec - r='-'
+exec - for i in socket.c nsl.c
+exec - do if ${CC} -c $i > /dev/null
+exec - then g=
+exec - for p in socket -
+exec - do case $p in
+exec - -) if ${CC} -o socket.exe $i $g > /dev/null 2>&1
+exec - then ${CC} -o socket.exe $i > /dev/null 2>&1 || {
+exec - r="$g"
+exec - break 2
+exec - }
+exec - fi
+exec - g=
+exec - ;;
+exec - *) g="$g -l$p"
+exec - ;;
+exec - esac
+exec - done
+exec - fi
+exec - done 2>/dev/null
+exec - echo " $r" > socket.req
+exec - rm -f socket.exe socket nsl
+done socket.req generated
+exec - test '' = 'socket.req' || ${STDCMP} 2>/dev/null -s socket.req ${INSTALLROOT}/lib/lib/socket || { ${STDMV} ${INSTALLROOT}/lib/lib/socket ${INSTALLROOT}/lib/lib/socket.old 2>/dev/null || true; ${STDCP} socket.req ${INSTALLROOT}/lib/lib/socket ;}
+done ${INSTALLROOT}/lib/lib/socket generated
+make ${INSTALLROOT}/lib/lib/dbm
+make dbm.req
+make db.c
+done db.c
+make gdbm.c
+done gdbm.c
+make gdbm1.c
+make gdbm-ndbm.h implicit
+done gdbm-ndbm.h dontcare virtual
+done gdbm1.c
+make gdbm2.c
+make ndbm.h implicit
+done ndbm.h dontcare virtual
+done gdbm2.c
+exec - set -
+exec - r='-'
+exec - for i in db.c gdbm.c gdbm1.c gdbm2.c
+exec - do if ${CC} -c $i > /dev/null
+exec - then g=
+exec - for p in db - gdbm_compat - gdbm - ndbm - dbm -
+exec - do case $p in
+exec - -) if ${CC} -o dbm.exe $i $g > /dev/null 2>&1
+exec - then ${CC} -o dbm.exe $i > /dev/null 2>&1 || {
+exec - r="$g"
+exec - break 2
+exec - }
+exec - fi
+exec - g=
+exec - ;;
+exec - *) g="$g -l$p"
+exec - ;;
+exec - esac
+exec - done
+exec - fi
+exec - done 2>/dev/null
+exec - echo " $r" > dbm.req
+exec - rm -f dbm.exe db gdbm gdbm1 gdbm2
+done dbm.req generated
+exec - test '' = 'dbm.req' || ${STDCMP} 2>/dev/null -s dbm.req ${INSTALLROOT}/lib/lib/dbm || { ${STDMV} ${INSTALLROOT}/lib/lib/dbm ${INSTALLROOT}/lib/lib/dbm.old 2>/dev/null || true; ${STDCP} dbm.req ${INSTALLROOT}/lib/lib/dbm ;}
+done ${INSTALLROOT}/lib/lib/dbm generated
+done install virtual
+make test
+make test.iffe
+prev iffe
+make iffe.tst
+done iffe.tst
+exec - regress iffe.tst iffe
+done test.iffe virtual
+make test.mamake
+prev mamake
+make mamake.tst
+meta mamake.tst %.rt>%.tst mamake.rt mamake
+make mamake.rt
+done mamake.rt
+exec - if [[ "1" || "mamake.rt" -nt "mamake.tst" ]]
+exec - then mktest --style=regress mamake.rt > mamake.tst
+exec - fi
+done mamake.tst generated
+exec - regress mamake.tst mamake
+done test.mamake virtual
+done test dontcare virtual
diff --git a/usr/src/contrib/ast/src/cmd/INIT/PROBE.mk b/usr/src/contrib/ast/src/cmd/INIT/PROBE.mk
new file mode 100644
index 0000000000..9a8553f2df
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/PROBE.mk
@@ -0,0 +1,13 @@
+/*
+ * @(#)probe (AT&T Bell Laboratories) 11/11/91
+ *
+ * <lang> <tool> :PROBE: *.probe *.sh *
+ *
+ * common probe script installation
+ * generates probe.sh and probe in .
+ */
+
+":PROBE:" : .MAKE .OPERATOR
+ probe.sh : $(LIBDIR)/probe/$(<:O=1)/probe $(>:N=*.(probe|sh))
+ cat $(*) > $(<)
+ $(LIBDIR)/probe/$(<:O=1)/$(<:O=2) :INSTALLDIR: probe $(>:N!=*.(probe|sh))
diff --git a/usr/src/contrib/ast/src/cmd/INIT/RELEASE b/usr/src/contrib/ast/src/cmd/INIT/RELEASE
new file mode 100644
index 0000000000..894fe3710c
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/RELEASE
@@ -0,0 +1,934 @@
+12-07-17 iffe.sh: add C code NOTE("...") to ammend --verbose output
+12-06-26 iffe.sh: fix "npt foo" to handle function-like macro foo()
+12-06-20 package.sh: use $KSH for rt in "results test"
+12-06-15 Makefile: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB
+12-06-15 package.sh: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB
+12-06-13 package.sh: handle admin.db column output
+12-06-08 iffe.sh: fix 12-06-06 typo
+12-06-06 iffe.sh: check for -l* in reverse and accumulative order (e.g., for -last & -lm)
+12-06-04 package.sh: always check $INSTALLROOT/lib/package/profile
+12-05-31 Makefile: ID=ast; $(INSTALLROOT)/prototyped.h => $(INSTALLROOT)/$(ID)/prototyped.h
+12-05-28 iffe.sh: api foo YYYYMMDD => FOOAPI(rel) test macro
+12-05-24 package.sh: change admin.db comment => owner attributes
+12-04-25 ratz.c: add sear -k option to keep installation tmp dir on exit
+12-04-17 package.sh: skip sh version logic for ``use''
+12-04-17 cc.ibm.risc*: _LARGEFILE64_SOURCE => _LARGE_FILE_API moved to libast/features
+12-04-09 cc.ibm.risc*: speak aixese for _LARGEFILE64_SOURCE
+12-02-29 cc.darwin.i386*: handle default cc vs kernel bittedness
+12-02-29 C+probe: add __TIMESTAMP__ to the nopredefined list
+12-02-29 package.sh: don't assume grep -q or /usr/local/lib in LD_LIBRARY_PATH
+12-02-29 package.sh: fix ksh vs -lcmd compatibility checks
+12-02-23 iffe.sh: checkcc() before checkread() for sensible diagnostics
+12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static
+12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE
+12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts
+12-02-07 package.sh: add { clean clobber } actions
+12-02-02 regress.sh: fix ulimit -c defaults for --nokeep
+12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison
+12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib
+12-01-21 Makefile: :PACKAGE: license=ast -- oops
+12-01-20 cc.darwin,cc.mvs.390: tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+12-01-12 package.sh: add admin make share closure to handle alternate HOSTTYPEs
+11-12-13 iffe.sh: add /*<NOSTDIO>*/ test code comment to disable default #include <stdio.h>
+11-11-11 C+probe: test for .so before .sl
+11-10-26 package.sh: don't forget about *.pkg for admin update
+11-10-18 cc.*-icc: update and add more
+11-10-11 package.sh: handle package make|view when no source installed
+11-09-11 package.sh: count admin '*** termination code' errors
+11-08-31 mamake.c: add -e, ignore use recursive prereq timestamps
+11-08-29 iffe.sh: add ``set stdio try1.h - try2.h ...''
+11-08-29 iffe.sh: trap EXIT => trap 0 for ancient sh
+11-08-11 iffe.sh: handle ancient sort that doesn't have -k
+11-06-01 make.probe: add more /lib64 logic
+11-05-01 package.sh: fix admin ditto to sync LICENSES too
+11-03-25 package.sh: initialize { $SED $TR } before first use!
+11-03-21 package.sh: fix vpath probes
+11-03-17 iffe.sh: fix cleanup to rm $tmp* instead of $tmp*.*
+11-02-24 package.sh: change curl usage to "curl -L ..."
+11-02-11 package.sh,C+probe,make.probe,mamprobe.sh: add ###.*archiac.*###
+11-02-02 Makefile: add :MAPLIB: check for ancient -lw
+11-02-02 make.probe: handle -print-multi-directory => 64 => /usr/lib64 /lib64
+11-02-02 package.sh: HOSTTYPE=*,*cc*[,-*,...] sets CC [ and CCFLAGS ]
+11-02-02 make.probe: handle gcc $ORIGIN link but exec failure -- gee thanks
+11-01-25 cc.hp.ia64: bundled cc is a pile of shaving cream
+11-01-07 iffe.sh: check debug==3 for is_hdr() failure
+10-11-22 ditto.sh: fix timing problem between |& and exec &p
+10-11-10 package.sh: fix cc cross compile check to use checkcc absolute path
+10-10-10 package.sh: list main env vars at start of make action
+10-10-10 ratz.c: tweak widnows delays
+10-09-10 ratz.c: add _SEAR_ARGS for _SEAR_EXEC
+10-09-01 package.sh: fix ratz from source logic
+10-08-25 package.mk: consolidate license file search in .package.licenses.
+10-08-22 ratz.c: run sear bootstrap command detached
+10-08-20 C+probe: version_stamp only if version_flags works
+10-08-17 package.sh: unset makerules *DIR variables in env
+10-08-15 package.sh: "make" action now lists some env values
+10-08-11 mktest.sh: add "DO command ..."
+10-07-27 rt.sh: handle "rt X=Y ..."
+10-06-29 ratz.c: non-option sear args passed to sear_exec()
+10-06-25 iffe.sh: "api" op changed to not do "map-libc" type mappings
+10-06-25 package.sh: "force admin ditto" => no ditto --update option
+10-06-22 C+probe: handle cc that require .[ci] input for version info
+10-06-21 ditto.sh: change default remote access to ssh (about time)
+10-06-12 regress.sh: DISGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
+10-06-09 package.sh: add AT&T to usable nmake check
+10-06-06 iffe.sh,iffe.tst: add { api ver } ops
+10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info
+10-04-15 iffe.sh: don't forget candidate headers for hdr|sys!
+10-04-11 WWW.mk: disable man page metarule -- now done by admin-man(1)
+10-02-14 package.sh: $CC verification needs $INSTALLROOT/bin in PATH
+10-02-11 package.sh: fix package admin make report error count
+10-02-02 package.sh: fix write binary bug that did scp on local fs
+10-02-02 package.mk: up to date binary targets must still be in PACKAGE.*.lst
+10-01-01 package.sh: fix premature $INSTALLROOT/bin during cross compile check
+10-01-01 make.probe: handle ['"] in CC.VERSION.STRING
+09-12-04 iffe.sh: add "opt name" to check for name in $PACKAGE_OPTIONS
+09-11-30 mktest.sh: change RESET to STATE.RESET to make it global
+09-11-14 make.probe: use gcc { -print-multi-directory -print-search-dirs }
+09-11-11 package.sh: re-order and combine cc checks
+09-10-27 C+probe,make.probe,probe.win32: add CC.SUFFIX.DEBUG
+09-10-21 iffe.sh,Makefile: test -e is not in ksh88!
+09-10-06 iffe.sh: handle cc -E #error with 0 exit status (sgi)
+09-10-06 package.sh: stub in ar intercept checks -- not used yet
+09-10-06 ar.ibm.risc: add ar intercept because some aix require -Xfoo first!!
+09-09-24 regress.sh: fix UMASK logic to create test support files before umask
+09-08-28 release.c: change docs to mention stdin if no file operands
+09-08-24 package.sh: fix isascii() bug that failed on od(1) trailing space
+09-08-20 make.probe: add CC.SHARED.NAME
+09-08-20 regress.sh: add { JOB CONTINUE EXITED KILL FIFO }
+09-08-11 package.sh: filter lines containing : for package results
+09-07-31 make.probe: add CC.AR.ARFLAGS (for aix ar -xany)
+09-07-31 package.sh,cc.*: fix -dumpmachine to handle 32/64/* bit options
+09-06-24 package.sh: fix admin.db output formatting
+09-05-05 package.sh: export dll hackery environment vars
+09-05-05 package.sh: handle non-identifier hostnames
+09-05-05 mamake.c: pass undefined ${...} identifiers to the shell
+09-05-05 mamake.rt: add macro expansion regression tests
+09-05-01 iffe.sh: fix output initialization *again*
+09-04-28 package.sh: handle admin.db contact field $9
+09-04-15 iffe.sh: add implicit "ini" op to initialize io for subsequent ops
+09-03-31 regress.sh: EXPORT before test => global ENVIRON[]
+09-03-26 package.sh: test fail pattern is 'fail[es]'
+09-03-26 UNIT - ... appends (options) to command line
+09-03-19 TEST.mk: x.tst => x only if x is command target
+09-03-15 regress.sh: add ${MAIN} for base name of main unit
+09-03-10 TEST.mk: add .SOURCE:tests if tests is a dir
+09-03-03 regress.sh: allow command line unit to override UNIT
+09-03-03 mktest.sh: handle IO == $'\n'
+09-02-02 package.sh: delay $INSTALLROOT/bin/.paths generation until mamprobe runs
+09-01-30 cc.mvs.390: c89 balks at [ ()] in -Dname="..."!
+09-01-27 package.sh: add isascii() to use ratz instead of tar
+09-01-20 hurl.sh: add --size=bytes option
+09-01-08 TEST.mk: add test.* prereqs, multiple arg lists with :T=*: binding
+09-01-03 regress.sh: fix UNIT to allow command line override
+09-01-03 mktest.sh: handle TWD
+08-12-24 package.sh: fix cross-compile HOSTTYPE logic
+08-12-15 package.sh,hurl.sh: handle http codes { 301 302 303 }
+08-10-16 make.probe '-fno-stack-protector -fno-stack-protector-all' to cop out!!
+08-09-30 rt.sh: fix ksh93 regression test signal count
+08-09-26 regress.sh: ignore SIGPIPE for SET pipe-input
+08-09-24 package.sh: package only test foo => make --recurse=only recurse tests foo
+08-09-20 make.probe: handle another /usr/bin/file shared lib description
+08-09-20 regress.sh: add --pipefail for SET pipe-input ...
+08-09-17 Makefile: add gdbm1.c for <gdbm-ndbm.h>
+08-09-10 make.probe: add CC.NOPROTECT
+08-08-08 mktest.sh: add --width=width
+08-08-05 dbm.req: favor sleepycat ndbm compatibility
+08-08-04 C+probe: fix stdlib initialization logic
+08-06-24 package.sh: fix $INSTALLROOT/bin/cc intercept time stamp file typo
+08-06-20 TEST.mk: make the localyunit before *.rt => *.tst -- doh
+08-06-20 mktest.sh: prepend $PWD onto PATH for local units -- doh^2
+08-06-11 regress.sh: fix bug that skipped the last test
+08-05-20 regress.sh: add --local to put *.tmp dir in local fs
+08-05-05 regress.sh: add IF command ... ELIF command ... ELSE ... FI
+08-05-01 package.sh: package test => ulimit -c 0
+08-04-28 regress.sh: fix EXPORT quoting
+08-04-28 regress.sh: fix UNIT set check args too
+08-04-24 rt.sh: exit code > 256 => signal termination
+08-04-10 C+probe: change probe_so order to check .so last (macos ld workaround)
+08-04-01 package.sh: handle multiple admin HOSTTYPEs per HOST
+08-03-28 C+probe: add C++ #include <iostream> (no extension) dir probes
+08-03-17 regress.sh: fix trap on EXIT, add terminated note to final tally
+08-02-28 make.probe: fix probe_warn to include ld!
+08-02-02 make.probe: add CC.RUNPATH to match default -L order
+08-01-31 package.sh: check lib64 for LD_LIBRARY_PATH
+08-01-31 iffe.sh: tweak ancient /bin/sh workarounds
+08-01-28 make.probe: darwin ld export dynamic is -force_flat_namespace
+08-01-28 C+probe: handle sgi cc error message but exit 0 botch(es)
+08-01-23 package.sh: fix checksum doc typo
+08-01-09 C+probe: add __FUNCTION__ to the undef (don't check) list
+07-12-14 iffe.sh: add set nooptimize
+07-12-03 package.sh: add LC_ALL=C
+07-11-27 package.sh: fix overaggressive *.md5 cleanup
+07-11-20 iffe.sh: treat exit status >= 250 as normal error with no signal
+07-11-05 package.sh: fix write op error count pattern
+07-11-05 package.mk: fix $(~req) .ver binding
+07-08-11 probe.win32: add cl.exe setuid workaround, CC.VERSION[.STRING]
+07-08-01 package.sh: handle 'package read lcl|tgz'
+07-05-08 regress.sh: execute basename instead of absolute path for short $0
+07-04-27 cc.sgi.mips[34]: for #error to exit non-zero -- a no brainer
+07-04-20 mktest.sh: defer to systems without 'grep -q' -- sigh
+07-04-11 mamprobe.sh: handle $(CC.*) => ${mam_cc_*}, $(...) => ${...}
+07-04-11 make.probe: fix CC.PICBIG probe, default { CC.PIC CC.DLL } to BIG
+07-04-04 iffe.sh: prepend ${tst}${ext} to each .c probe
+07-03-28 package.sh: fix binary tgz architecture type duplication
+07-03-28 package.mk: add binary write PACKAGE.$HOSTTYPE.lst
+07-03-28 iffe.sh: add -F header to mac test
+07-03-23 make.probe: handle file(1) that returns 'archive' for .so
+07-03-22 mamprobe.sh: fix STDED probe for implementations that ignore EOF
+07-03-11 package.sh: add nocopyright and tst => nocopyright
+07-03-11 package.mk: add copyright=0
+07-03-08 C+probe: restore IFS after probe.ini
+07-02-26 mamake.c: expand first of ${mam_lib*} for ${AR}
+07-01-05 package.sh: fix "admin write binary" logic
+07-01-01 iffe.sh: add "cmd" --verbose trace
+07-01-01 iffe.sh: sort => LC_ALL=C sort
+07-01-01 C+probe: LC_ALL=C
+06-12-22 make.probe: lean on gcc -v for stdlib, but preserve /usr/local!
+06-11-23 package.sh: *.md5 are not tarballs -- doh
+06-11-23 iffe.sh: add -F, --features=feature-test-header
+06-11-11 make.probe: favor lib64 over lib for hosttype==*64
+06-10-31 make.probe: add "-ignore-source-dir -iquote" test
+06-10-31 iffe.sh: add status{...} code block
+06-10-11 regress.sh: fix DO to handle {...} (time for regress.tst?)
+06-10-11 package.sh: handle already gunzip'd *.tgz
+06-10-06 iffe.sh: add reference for header content tests
+06-09-27 regress.sh: fix UMASK to do DO too (duh)
+06-09-22 iffe.sh: drop -O for npt tests (for msvc intrinsics)
+06-09-14 cc.darwin: drop -O until gcc 4.* gets its act together
+06-09-11 package.sh: { cc ld ldd } intercepts check ${HOSTTYPE%.*} too
+06-09-08 regress.sh: add PIPE INPUT|OUTPUT for pipe io
+06-09-05 C+probe: add { probe_version version_stamp version_string }
+06-09-05 make.probe: add version stamp comment, CC.VERSION[.STRING]
+06-08-27 regress.sh,mktest.sh: add UMASK
+06-08-25 regress.sh: add -b,--ignore-space,IGNORESPACE
+06-08-25 mktest.sh: add IGNORESPACE
+06-08-24 mktest.sh: handle \000 in data
+06-08-24 regress.sh: handle -f* for INPUT|OUTPUT|ERROR
+06-08-16 package.sh: fix 'install flat' logic
+06-08-11 rt.sh: handle style=shell %K date format
+06-07-17 ratz.c: fix __MVS__ FAR definition
+06-07-17 iffe.sh: "header x.h" -- deprecate "include x.h" for .SCAN.iffe
+06-07-17 package.sh: differentiate urls vs. assignments
+06-06-27 rt.sh: add --failed, --heading
+06-06-27 C+probe,TEST.mk,make.probe,mktest.sh,regress.sh: 'ulimit -c 0'
+06-06-26 cc.darwin.ppc: handle -lcc_dynamic disappearance
+06-06-25 mktest.sh: implement PROG
+06-06-11 Makefile: add -ldbm :MAPLIB:, provide public MAPLIB.mk
+06-05-06 package.sh: add PACKAGE_admin_tail_timeout
+06-05-22 ratz.c: upgrade to zlib-1.2.3
+06-05-09 package.sh: fix admin.db docs
+06-03-11 package.sh: fix `package use - command ...'
+06-03-05 make.probe: work around pedantic bash 3.1 mismatched " in `.`
+06-02-14 package.sh: "results failed test" == "results test failed"
+ cc.sgi.*: add _AST_cc_OPTIONS parameterization, -OPT:Olimit=0
+ cc.linux.ia64-icc: add for intel cc
+06-02-02 package.sh: freebsd stuck with os version for all arch
+06-02-01 package.mk: fix locale logic (tw -d requires dir arg)
+06-01-31 package.sh: require $CC only for make|test
+06-01-30 package.sh,hurl.sh: use the backwards-compatible --http-passwd
+ package.sh: add more pdksh => /bin/sh checks
+06-01-26 package.sh: wget --http-pass => --http-password
+ package.sh: fix wget error logic
+ hurl.sh: wget --http-pass => --http-password
+06-01-11 package.mk: pass package.license.class to make --mam too
+ package.mk: variants=pattern => --variants=pattern
+ package.sh: darwin rel<=7 => darwin7.ppc
+ package.sh: freebsd rel<=4 => freebsd4
+ package.sh: freebsd rel<=5 => freebsd5
+05-12-07 iffe.sh: don't emit <stdio.h> if <sfio.h>|<ast.h> (XXX)
+05-12-05 make.probe: disable readonly.exe core dump via ulimit -c 0
+05-09-22 mktest.sh: add EXEC [ ++NOOUTPUT ++NOERROR ++NOEXIT ]
+05-09-21 mktest.sh: fix --style=shell compare to ignore \r
+05-09-12 TEST.mk: all --force to force %.rt regeneration
+05-09-05 TEST.mk: regenerate from %.rt only if newer, :SAVE: %.tst
+05-08-25 mktest.sh: add
+ TEST.mk: add %.rt=>%.tst for mktest
+05-08-18 package.sh: 'package host cpu' now checks $NPROC first
+05-07-17 iffe.sh: add { define extern include print } ops
+ iffe.sh: accept output{...}end output on success only -- doh
+05-07-01 package.sh: add TARPROBE for tar B flag probe
+05-06-24 package.sh: fix binary read chmod via *.sum
+05-06-06 package.sh: fix KEEP_HOSTTYPE logic to handle synthesized types
+05-06-01 make.probe: verify that cc_pic works for hosted cc
+ cc.lynxos.ppc: make -mshared the default
+ package.sh: note $INSTALLROOT/bin/@(cc|ld|ldd) installation
+05-05-25 make.probe: add CC.INCLUDE.LOCAL instead of -I- in CC.DIALECT
+05-05-24 iffe.sh: really fix grouping logic -- with tests this time
+ package.sh: pipe/socket configuration mismatches => use /bin/sh
+05-04-28 TEST.mk: add $(TESTS)
+05-04-19 package.sh: package results test uses rt if possible
+ iffe.sh: fix 'op var - ... - ...' grouping logic
+05-04-15 rt.sh: handle autom4ate style
+05-04-11 regress.sh: fix unit name when command line unit also specified
+ rt.sh: handle all ast package test output formats
+ package.sh: fix make docs for options passed to underlying make
+05-04-08 package.sh: cp -p makerules.mo to $OK to preserve mtime
+ regress.sh: add "TITLE name" to change TEST output title
+05-04-01 rt.sh: add pretty make test + regress.sh wrapper
+05-03-29 package.sh: test -e path => test -f path -o -d path
+05-03-24 make.probe: fix CC.PICBIG probe to prefer -fPIC over -fpic -- doh
+05-03-19 mamake.c: command line name=var also defines name.FORCE=var
+05-03-11 regress.sh: unset LC_ALL when LC_* EXPORT'd
+ package.sh: old make.out saved in circular make.out.[1-9]
+ mamake.c: sync with nmake :W=O:
+05-03-01 package.sh: fix flat hierarchy initialization
+ package.sh: admin action now properly resets sibling remote logs
+ package.mk: relax unknown/unwritten package messages to warnings
+ package.sh: handle space in command line name=value
+ make.probe: add mvs -Wc,dll,exportall,longname,rent to CC.DLL probe
+05-02-24 package.sh: hosttype *.powerpc => *.ppc
+ cc.lynxos.ppc,ldd.lynxos.ppc: add
+05-02-22 mamake.c: fix { -G --debug-symbols -S --strip-symbols } MAMAKEFLAGS bug
+05-02-20 probe.win32: handle /platformsdk mount
+05-02-19 package.sh,package.mk: add write tst for tgz in tst subdir
+05-02-18 package.sh: accept cc -dumpmachine with 0 or 1 -
+05-02-14 package.sh: handle mutiple architectures per host in admin.db
+ Makefile,package.sh: honor $INSTALLROOT/bin/.paths overrides
+ package.sh: normalize trailing [-_]bits in host type
+ iffe.sh: some ksh-compatible shells don't do *(pattern)
+05-02-11 iffe.sh: back out 05-01-11 child process stdin hijack
+ cc.lynxos.i386: -dynamic instead of -static default
+05-02-10 package.sh: cyg usr/doc => usr/share/doc
+05-02-08 package.sh: drop -m with pax -- delta bug fixed 2005-02-08
+ iffe.sh: work around old bash 0<... redirection bug
+05-02-06 package.mk: source.tgz: update generated files only when they change
+05-02-02 *.sh,*probe: IFS may be unset and { ash bsh } don't on startup -- wow
+05-01-11 package.sh: update setup docs to include authorize+password
+ package.mk: fix .source.cyg final directory edit
+ package.mk: notice=1 for conspicuous empty NOTICE file
+ WWW.mk: fix *-index.html installation
+ filter.sh: retain input file suffix in tmp copy
+ mamexec.c: fix non-contiguous "exec" bug that skipped lines
+ iffe.sh: fix candidate lib test to try grouping subsequent libs
+ iffe.sh: fix child process stdin hijack that skipped input lines
+ iffe.sh: --shell=osh to force read -r compatibility command
+ iffe.sh: chop iffe input leading space before # for KnR compatibility
+05-01-05 package.sh: add ${TAR} ${TARFLAGS} and tar B flag for pipes
+ mamake.c: fix makefile scan to ignore lib*.[hH]
+ iffe.sh: immunize function/symbol tests from aggressive -O
+04-12-28 WWW.mk: add :WWWPAGE: faq.*.mm index generator
+04-12-21 ratz.c: make sure tmp dir is writable -- doh
+04-12-08 iffe.sh: fix dat test for aggressive -O
+04-12-01 iffe.sh: add `include file' to pull in #define's for `exp'
+04-11-11 package.sh: default MAKESKIP is "*[-.]*"
+04-10-22 ratz.c: change docs to note zlib license
+ mamake.c: handle --debug-symbols and --strip-symbols
+ package.sh: make (debug|strip)=1 => --(debug|strip)-symbols
+ package.mk: add :LICENSE: => package.license.class
+ mamake.c: fix recursive order logic
+04-10-18 package.mk: add :LICENSE:, :OMIT: to omit package subdirs
+04-10-11 package.sh: add 'authorize name' and 'password password'
+04-10-01 iffe.sh: double check $static link with ! $static
+ Makefile: add BUILTIN_LIB to $INSTALLROOT/bin/.paths
+ make.probe: add CC.DIALECT EXPORT={ALL,REF,EXT,DLL}
+ package.sh: add BUILTIN_LIB to $INSTALLROOT/bin/.paths
+04-09-21 package.mk: $(init)$(name) is now an implicit prereq
+04-09-09 package.sh: copy makerules.mo to $INSTALLROOT/bin/ok
+04-09-01 package.mk,package.sh: rename *.txt => *.README
+ package.mk: add the runtime package type (no *.[ah])
+ iffe.sh: fix key test reports
+04-08-26 Makefile: { add m2.c m3.c } -lm tests for { frexp[l] ldexp[l] }
+04-08-11 package.mk: handle HOSTTYPE for solaris > 9
+ package.sh: add `checkaout proto' for { make view }
+ package.sh: check for { md5sum md5 }
+ iffe.sh: add {if|elif|else|endif} test ...
+ iffe.sh: add 'exp - expression' and '( expression )'
+ iffe.sh: add 'name = test ...' user defined macros
+ iffe.sh: add '! test ...' negation
+ TEST.mk: add implied { .c .sh } generated prereq
+ cc.darwin.ppc: handle 10.3 -dylib mess
+04-08-01 package.mk: let include handle nested requirements -- duh
+04-07-31 package.sh: attempt a second ping before admin assumes host down
+04-07-26 package.sh: fix hp.ia64 HOSTTYPE
+04-07-23 probe.win32: generalize #include dir order search
+04-07-17 regress.sh: add INPUT -x for chmod +x
+04-07-01 regress.sh: TMP => TWD
+04-06-29 regress.sh: put COMMAND in $TWD too
+04-06-21 regress.sh: mkdir -p INPUT and OUTPUT intermediate dirs
+ TEST.mk: add :TEST: -- to disable .c .sh search
+04-06-18 TEST.mk: add .SCAN.tst
+04-06-17 regress.sh: TEST returns true if active, false otherwise
+ regress.sh: add CD to change test pwd from $TWD
+04-06-16 regress.sh: add TWD for ./unit.tmp override
+ regress.sh: DO now flushes previous test
+ regress.sh: INPUT and OUTPUT handle -f for printf instead of print
+04-06-11 package.sh: make sure $INSTALLROOT/bin is in front of $PATH
+ package.sh: skip nmake if older than 2000-10-31
+04-05-20 package.sh: fix arg vs. package parse with - or '' to disambuguate
+04-05-11 package.sh: package verbose update lists closure for package setup
+ package.sh: add src/lib/libardir to nmake proto bootstrap
+ regress.sh: probe for rm -u vs. chmod -R u+rwx
+04-05-01 package.sh: $CC must be C, not C++; allow release command on $PATH
+04-04-15 make.probe: check probe_libdir false positives
+ package.sh: add lib/package/*.lic src package subdirs
+ package.mk: add mamfile=0 to inhibit Mamfile generation
+ iffe.sh: config name_DECLARED => HAVE_name_DECL
+ iffe.sh: fix mac to handle default value
+04-04-11 iffe.sh: normalize sed [\\\\/] quoting
+04-04-04 package.mk: only checksum generated tarballs
+ mamprobe.sh: add STDCHMOD
+04-04-01 C+probe: set export LANG=C for uniform error messages
+ make.probe: another CC.STDLIB tweak
+ package.sh: fix regress core dump pattern, expand [a-z] match ranges
+04-03-31 Makefile: add intl :MAPLIB: test
+ make.probe: fix CC.STDLIB search; drop CC.* path duplicates
+04-03-28 iffe.sh: drop unused exec $stdin<&0 dup
+04-03-25 Makefile: add iconv :MAPLIB:
+ package.sh: use ${PING:-ping -c 1 -w 4}, allowing admin.db override
+04-03-24 package.mk: add *.md5 checksum for each *.(c|exe|tgz)
+ package.sh: update base change on md5 sum instead of size
+ iffe.sh: adjust case label \ and keyword quoting for ancient /bin/sh
+04-03-22 probe.win32: ncc => nld
+04-03-19 CONVERT.mk: change the instructions and old source dir default
+ package.mk: fix recurse=list check
+ package.mk: add *.md5 checksum for each *.(c|exe|tgz)
+ package.sh: fix update base/delta/sync existence check
+04-03-18 iffe.sh: -d2 does not remove core dumps on exit
+04-03-17 package.sh: fix make recurse arg/action order
+04-02-29 package.sh: add regress action to compare current and previous tests
+ package.sh: fix sgi.mips[23] HOSTTYPE test for old irix cc
+ package.sh: add `export variable ...'
+ package.sh: admin action now handles host name with non-id chars
+ package.sh: non-numeric M T W in admin.db disables that action
+ package.sh: fix admin write binary local vs. shared clash
+ cc.hp.pa: add _AST_CC_hp_pa_DEFAULT=+DAportable
+ cc.hp.pa64: sync with cc.hp.pa
+ cc.ibm.risc: -bnolibpath => -blibpath:/usr/lib:/lib
+ probe.win32: sync with make.probe
+ make.probe: fix last chance dynamic test
+ make.probe: add hp.pa CC.EXPORT.DYNAMIC -Wl,-E
+ make.probe: add ibm.risc CC.EXPORT.DYNAMIC -bexpall
+ make.probe: move probe_dll_def to the end of probe_dll
+ package.mk: capture subcomponent mamfile recursion
+04-02-24 make.probe: strip "..." from cc/ld traces
+ iffe.sh: add ``set [no]define'' to disable macro #define/#undef
+04-02-23 make.probe: rework CC.LD search
+04-02-14 make.probe: add CC.EXPORT.DYNAMIC for main dynamic sym export
+ make.probe: resurrect CC.PIC with separate semantics from CC.DLL
+ make.probe: add CC.SHARED.LD for CC.SHARED linker
+ C+probe: clear DISPLAY to stifle interactive windows
+04-02-11 iffe.sh: handle ``siz void*'', add cross{ ... }end
+ make.probe: add { CC.AR CC.SIZE }, fix cross command search
+ cc.darwin.ppc: change $cc => $CC for old ksh + libast conf bug
+04-02-09 make.probe: drop -nostartfiles from CC.SHARED for C++
+04-02-04 package.sh: fix cross compilation bug that mixed binary formats
+04-02-02 package.sh: package admin now ditto's bin/package too
+04-01-30 cc.sgi.mips3: drop warning 3421
+04-01-11 regress.sh: output label#count for tests in loops
+04-01-05 regress.sh: fix bug that ignored the first SAME
+04-01-04 crossexec.sh: fix typo that did not recognize rcp
+03-12-19 mamake.c: add `foolib:foo:libfoo' to recurse()
+03-10-11 regress.sh: add EXPORT, export COLUMNS=80 for message consistency
+03-09-23 ratz.c: fix tar header number parse bug that skipped to next number
+ regress.sh: rm cleanup now handles files matching -*
+03-09-11 iffe.sh: add unnamed { ... } blocks
+ regress.sh: add COPY from to, like MOVE but comprison still done
+ regress.sh: rm -rfu to handle test dirs w/o u+rwx
+03-08-14 Makfile: add hello.c to the manifest
+03-08-11 package.sh: fix `html binary' generation
+03-06-21 package.sh: fix INITROOT initialization bug
+ package.sh: make sure admin logs exists before tail'ing
+03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make
+ cc.mvs.390: return code 4 yields exit code 3 but its *really* ok
+ package.sh: fix onpath function global var conflict
+ make.probe: add CC.DIALECT { GNU -dD }
+ package.mk: add Mamfile to lcl manifest
+03-06-10 package.sh: fix setup action typo that only checked the INIT package
+ package.sh: *.s390x => *.s390-64
+03-06-09 package.mk: add cyg :POSTINSTALL:
+03-06-08 make.probe: fix CC.STDLIB logic
+ hurl.sh: add User-Agent identification
+ package.sh: tweak source and binary installation instructions
+ cc.hp.pa,ld.hp.pa: +-Wl,+cdp,${INSTALLROOT}/lib/: drops abs lib paths
+ ldd.hp.pa: add
+03-06-06 package.sh: fix $INSTALLROOT/bin/ldd check
+ make.probe: add CC.STDLIB verification
+03-06-04 make.probe: add +forceread +noforceread
+03-05-11 hurl.sh: handle http://host:port/path
+03-05-06 package.sh: fix setup action PACKAGEROOT and INIT logic
+03-05-05 package.mk: fix cygwin tarball names
+03-04-30 package.sh: move (cc|ld|ldd).$HOSTTYPE updates from Makefile
+03-04-27 make.probe: fix mvs CC.PREFIX.SHARED "lib" => ""
+ make.probe: add CC.DLL.DIR = $(BINDIR) or $(LIBDIR)
+ make.probe: add { CC.LD.LAZY CC.LD.NOLAZY CC.LD.RECORD CC.LD.NORECORD }
+ probe.win32: sync with latest CC.*
+03-04-25 mamprobe.sh: add args to `. $makeprobe' for ancient sh
+03-04-23 package.mk: fix dup "covered by" licenses
+03-04-22 probe.win32: CC.DIALECT += "LIBPP -I-" for all cc's
+ package.sh: fix admin write binary tarball snarf
+03-04-21 package.mk: package covered *.@(pkg|lic) too
+03-04-15 package.mk: don't generate incremental archives for lcl
+ package.mk: add incremental=[source:1 binary:0] archive control
+ package.sh: generate $INSTALLROOT/bin/cc wrapper for CC != cc
+ package.sh: admin must ditto lib/package/*.@(pkg|lic) too
+ mamake.c: ignore time of ignore prereqs
+ mamake.c: -D2 lists propagated times
+03-04-11 package.mk: tidy up cyg tarballs
+ package.sh: fix old shell clash between get() and $get
+03-04-05 package.mk: restore *.inx generation somehow lost during cyg additions
+ package.sh: add pthread_num_processors_np() last resort for cpu count
+ package.sh: use `make believe' to accept mamake generated files
+ package.sh: handle `make [make-flags] [target ...]'
+ mamake.c: ignore -e
+03-03-21 package.mk: fix cyg old make typo
+ package.sh: switch to `package setup' instructions
+03-03-19 package.sh: add registry checks for `host cpu'
+ package.sh: `results failed' now lists core dump messages
+03-03-17 package.sh: on cygwin verify 'ntsec binmode' in $CYGWIN or die
+ Makefile: install gcc wrapper if no cc
+ package.mk: add :DETAILS: { :README: :EXPORT: :INSTALL: :TEST: } ops
+03-03-12 package.mk: add :DETAILS: for style-specific details
+03-03-11 package.sh: add beta setup/update support
+ TEST.mk: add (TESTCC) prereq for .sh tests
+03-03-07 hurl.sh: add
+03-03-06 iffe.sh: fix lib win32 test cygwin vs native incompatibility
+ iffe.sh: change internal stdio.h guard to handle C++ inline vs. macro
+03-03-03 package.sh: check for curl or wget for update
+ package.sh: add setup action == update read make
+ package.sh: fix packageroot() typo that showed up in non ~user shells
+ mamake.c: treat name+=value args like name=value
+ mamake.c: add ${var?*|value?match?no-match?}
+ mamake.c: fix archive vs. dynamic bind logic
+03-02-28 package.sh: add the "cyg" (cygwin) package type
+ package.mk: add "cyg" stubs, :CATEGORY: for category name(s)
+03-02-25 mamake.c: add -D4 system(3) debug trace
+03-02-24 package.mk: change --mismatch to --corrupt=accept
+03-02-14 ratz.c: add _WIN32 setmode([01],O_BINARY) and fopen "rb"/"wb"
+03-02-12 Makefile: handle getconf LIBPATH with host pattern
+03-01-31 package.mk: fix .lic search
+03-01-30 package.sh: handle { INIT ksh nmake } already installed elsewhere
+ package.sh: admin handles command outside of $PACKAGEROOT/bin
+ Makefile: install $(INSTALLROOT)/lib/make/package.mk
+03-01-28 package.sh: admin remote commands on one line to please syslog
+03-01-23 probe.win32: borland and mingw32 tweaks
+03-01-22 package.sh: fix $CC test to ignore set -x trace -- duh
+03-01-16 ditto.sh: tw --chop on by default
+03-01-14 package.sh: use /bin/cp to copy previous binaries to bin/ok/
+ package.sh: admin now initiates remote exec and copy from local host
+03-01-12 package.sh: handle admin "xxx:" default root
+03-01-03 probe.win32: add /usr/include/borland path truncation workaround
+02-12-10 iffe.sh: add <&$nullin >&$nullout to checkread() $cc
+02-12-06 probe.win32: fix inlcude => include typo, add lcc lib
+ probe.win32: CC.MAKE.OPTIONS = nativepp=0
+02-12-04 mamake.c: fix ${foo-bar} to expand foo if defined
+02-11-28 probe.win32: add C++ and -I- CC.DIALECT checks
+02-11-26 package.sh: package release now checks for second level files
+02-11-22 package.sh: update action now uses HTTP/1.0
+02-11-21 probe.win32: update the vc include dir test
+02-11-20 make.probe: fix CC.LD.ORIGIN typo that expanded make var
+02-11-13 packahe.mk: fix list.install => list.installed typo
+02-11-12 make.probe: add CC.LD.ORIGIN for a.out origin dir relative dll search
+ make.probe: add CC.LD.STRIP for link time a.out strip
+ package.sh: fix package_use vs. PACKAGE_USE check
+02-10-24 WWW.mk: fix bug that required a :WWWBIN: assertion to post
+02-10-23 mamake.c: fix unuinitialized time in make()
+ ratz.c: fix meter buffer overflow
+02-10-20 package.sh: fix lib/probe/C/make/probe update test
+02-10-18 probe.win32: update for mingw
+ make.probe: add bash workaround to SHELLMAGIC test
+ package.sh: work around yet another cygwin hassle
+02-10-17 iffe.sh: short circuit id check for *[-+/\\]*
+02-10-08 regress.sh: unset FIGNORE to avoid rm . errors
+ package.sh: unset FIGNORE to avoid rm . errors
+ package.sh: $CC must at least compile and executable hello world
+02-10-04 package.sh: $INSTALLROOT/lib/package/tgz=>$PACKAGEROOT/lib/package/tgz
+ package.mk: $(ED) => $(STDED), $(EDFLAGS) => $(STDEDFLAGS)
+ iffe.sh: add identifier checks for tests that (implicitly) require them
+ iffe.sh: disambiguate a few --config macros
+02-10-02 iffe.sh: fix shell=bsh `hdr a/b'
+02-09-30 package.sh: handle chmod of -* files
+ package.sh: verify that $SHELL is Bourne compatible
+ package.sh: tighten PACKAGE_USE logic PATH,LIBPATH,etc. validation
+ iffe.sh: fix bug that didn't define mac variable on success
+02-09-22 package.sh: handle admin_action=ditto
+ iffe.sh: --config sizeof(foo) macro is SIZEOF_foo
+ iffe.sh: fix long.long test so it doesn't defeat uwin "typ long.long"
+ mamprobe.sh: convert $("foo") nmake string constants
+02-09-21 mamprobe.sh: "-" info-path writes probe info to stdout
+02-09-11 make.probe: move from nmake src to be part of mamprobe.sh
+ mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end
+ mamake.c: pass cc absolute path to mamprobe
+ package.sh: generate mamprobe -- yuk (at least its confined to INIT)
+ iffe.sh: lcl,nxt: drop default sys/ check
+ ditto.sh: tw --logical by default; add --physical
+02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey
+02-09-09 ditto.sh: test that remote .profile exists before sourcing
+02-09-06 package.sh: don't ditto nfs junk
+ ditto.sh: --show now lists directory ops instead of enumerating all
+02-09-05 ditto.sh: add --remote={rsh|ssh}
+ package.sh: add admin [[{rsh|ssh|-}]:]directory
+02-09-02 iffe.sh: change 'print -r --' to 'print -r -' for ksh86 compatibility
+02-09-01 cc.unix.mc68k: add for ancient 3b1
+02-08-22 package.sh: fix component() to test for components -- duh
+ Makefile: add LICENSE:.DONTCARE to workaround mam
+02-08-11 iffe.sh: provide defaults for LD_* additions
+02-08-07 ratz.c: change -m to use * instead of non-portable inverse video
+02-07-17 mamprobe.sh: close tmp file in trap before rm for cygwin
+ package.sh: fix "type" to handle i1586 (P4)
+ package.sh: add the view action
+02-06-28 package.sh: handle multiple packages for release action
+02-06-27 package.sh: catch sol*.sparc=>sol*.sun4 when CC=gcc
+02-06-14 package.sh: fix admin_action to not include qualifiers
+ package.sh: fix help/html doc typo
+02-06-11 package.sh: fix ditto update doc to `PACKAGEROOT field matching *:*'
+02-06-07 WWW.mk: change substitute $("\n") to \n
+02-06-06 package.sh: clarify output streams for help/html
+02-05-22 mamake.c: fix executable file check to use (S_IXUSR|S_IXGRP|S_IXOTH)
+02-04-04 package.sh: fix update to differentiate *.sun4 and sun4
+02-03-27 package.sh: yacc/bison warning only if both missing
+02-03-24 mamake.c: all shell actions wrapped with -c to avoid #! problems
+02-03-23 package.sh: recover $PACKAGEROOT/bin/package if not in INIT package
+ package.sh: precheck $CC, not `cc'
+ package.sh: fix install to use pax -ps to preserve set-uid/gid
+ package.sh: fix install to use list.installed for existing files only
+02-03-17 package.sh: fix PAX initialization that was sometimes omitted for read
+ package.sh: fix update delta sync fetch
+02-02-14 iffe.sh: fix macro{ }end docs to include "
+ iffe.sh: add dfn to extract #define from headers
+ iffe.sh: handle nxt #include ok but no line sync
+ iffe.sh: drop local header clash logic
+ iffe.sh: add -X, --exclude=dir to exclude -I dirs
+ iffe.sh: lcl,nxt now generate <...> headers instead of "..."
+ package.sh: admin.db root dir matching -* disables host
+ package.mk: fix package.src.pat typo -- too many )
+ package.mk: add { :COVERS: :DESCRIPTION: :REQUIRES: }
+ package.sh: handle { :COVERS: :DESCRIPTION: :REQUIRES: }
+ Makefile: move proto.c generation to the proto component dir
+02-02-02 execrate.sh: add for .exe challenged win32 systems/commands
+ mamprobe.sh: add STD* commands/flags
+ mamake.c: update mamprobe info when older than mamprobe executable
+ package.sh: move ed/ex workaround to mamprobe.sh
+ package.sh: fix `host type' bug that incorrectly assumed sun4 for sol
+ package.sh: add execrate(1) hooks for challenged systems
+ package.sh: add check for { cc ar nm yacc/bison } before make
+ ratz.c: fix "rb" vs. "r" macro tests
+ iffe.sh: add nxt, similar to lcl but defines _nxt_foo for #include
+ iffe.sh,package.sh: remove vaibale from sccs,cvs ident strings -- duh
+02-01-24 C+probe: check CC.DYNAMIC to handle cc that accept but ignore -B*
+ iffe.sh: handle 'mem struct.a.b'
+02-01-22 iffe.sh: cache (internal) `foo vs. struct foo' test results
+ package.sh: uts.370 => uts.390
+02-01-18 package.sh: fix uts hosttype
+02-01-17 package.sh: add 'results failed ...' to list failures only
+ package.sh: change ARCH internal var to all_types to avoid env conflict
+ iffe.sh: fix hdr/lib precheck that missed some -- ouch
+ iffe.sh: fix noexecute test that forgot to check compile first!
+02-01-15 ratz.c: fix path[] type typo
+02-01-01 package.mk: tighten license search
+02-01-08 package.sh: `pwd` => ${PWD:-`pwd`}
+ package.mk: expand license file pattern match
+02-01-04 iffe.sh: fix `exp name "value"' bug that duped "value"
+ iffe.sh: fix initial <sys/types.h> check to honor --config
+01-12-25 iffe.sh: fix bug where -o file restored old file
+01-12-23 package.mk: uniq the closure lists
+01-12-07 ratz.c: fix --meter to retain paths containing " -- "
+01-11-30 ratz.c: use sear_system() to execute; should work on all windows
+01-11-28 ratz.c: fix sear_rm_r() to check SetCurrentDirectory() status
+01-11-26 ditto.sh: drop n+=v for ksh compatibility
+01-11-21 ditto.sh: add rsync script replacement [hey, it works!]
+ package.sh: add [ditto]:directory notation to admin.db
+01-10-31 package.sh: handle *.sum paths with embedded space
+ package.sh: change executable() to onpath()
+ package.sh: executable([!] foo) replaces test [!] -x foo (.exe hack)
+ package.sh: add os2 fix to `host type'
+ mamake.c: add .exe hack
+ iffe.sh: fix intrinsic function lib test
+ mamprobe.sh: update pic probe to match make.probe for linux.ia64
+01-10-30 package.sh: make action skeleton view now checks subdirs
+01-10-20 package.sh: don't recurse into leaf dirs matching $MAKESKIP
+ package.mk: tarball package.notice replaces `license accepted' prompt
+ package.sh: eliminate `license accepted' prompt
+ package.sh: add update to download latest from a url
+ package.sh: use builtin arithmetic when we know its ksh
+ iffe.sh: unkown -> unknown
+01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN
+ package.mk: convert to YYYY-MM-DD delta releases instead of NNNN
+ ratz.c: fix -m for paths containing \f\n\r\v
+01-10-16 ratz.c: _SEA_* => SEAR_*
+ ratz.c: preserve stdin for sear_exec()
+ ratz.c: add recursive sear_rm_r() to sear_exec() tmp dir cleanup
+01-10-10 mamprobe.sh: add mam_cc_SHELLMAGIC
+ package.sh: add nfs wakeup call to admin to avoid stale file handles
+01-10-04 cc.darwin.ppc: -flat_namespace is not longer the default (huh)
+01-10-01 package make: prepend $INSTALLROOT/bin/ok to PATH
+ package read: save cpy of bin/package when reading the INIT package
+ mamprobe.sh: allow cc path with optional arguments
+01-09-24 Makefile,package.sh: add $INSTALLROOT/bin/.paths initialization
+01-09-19 package.mk: add recurse to list.package.*
+ package.sh: bootstrap build nmake with _BLD_STATIC for _WIN32
+01-09-11 ratz.c: add _SEA_SKIP & _SEA_COMMAND for self extracting archives
+01-09-07 package.mk: fix output capture to not generate files names with spaces
+01-09-07 package.mk: fix delta release number search
+01-08-11 package.mk: handle single gz executable packages (e.g., for ksh)
+ package.sh: fix package install to require nmake only if no *.sum
+ iffe.sh: drop ancient menu and prompt actions; check ./hdr.h clash
+01-07-17 package: fix use cross compile test to generate files in /tmp
+01-06-27 ratz: handle hard and soft links if possible
+01-06-07 Makefile: fix :MAPLIB: for sco
+01-05-31 crossexec.sh: add
+ iffe.sh: add -x crosstype to run crossexec
+ iffe.sh: exp test now handles pass{}end fail{}end yes{}end no{}end
+ package.sh: add package host canon external-host-type-name
+ package.sh: fix `use USER' lookup for shells that support ~USER
+ cc.*: add -dumpmachine to dump target HOSTTYPE
+01-05-18 iffe.sh: drop $HOME/tmp/t.sh debug trace -- oops
+01-05-01 mamake.c: scan() now handles :PACKAGE: foo:command
+01-04-26 *.sh: expand [a-z][A-Z][0-9] for non-contiguous character codes
+ iffe.sh: fix run *.sh for shells that don't $* across . command
+ cc.mvs.390: recode for /bin/sh
+01-04-25 package.mk: include non cc-g variants by default
+ package.sh: *[._]* => *?[_.]* for mvs.390 /bin/sh
+01-04-24 TEST.mk: no tests for VARIANT=="DLL"
+01-04-22 package.mk,package.sh: tarball text members are ascii encoded
+01-04-18 package.mk: allow package name to be the same as one of its components
+ cc.mvs.390: handle .C .cpp .cxx
+ cc.mvs.390: compensate for -o that does not overwrite
+01-04-01 regress: fix SAME that just skipped it -- we should regress regress!
+ iffe: fix bug that didn't emit _hdr_foo for internal hdr tests
+ iffe: fix lcl bug for cc -E that doesn't emit line syncs
+ ratz: add ascii=>ebcdic conversion for text archive members
+ mamake: fix buffer overlap bug that clobbered the probe file path
+01-03-17 iffe: handle : separator as first arg
+01-03-15 mamake.c,ratz.c,release.c: add <stdlib.h> and <string.h>
+01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op
+01-02-22 cc.ibm.risc: handle SF_CLOSE clash in <sfio.h>
+01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc
+ C+probe: quote "$cc" when its an argument!
+ mamake: execute actions with $SHELL, ignored signals back to default
+ package.sh: nmake check error output to /dev/null
+ package.sh: fix INIT a.out updates for knr cc
+ package.sh: package list now handles large tgz dirs
+ package.sh: *-ok executables moved to ok/* for *.dll systems
+ iffe.sh: change "exec >&-" to "exec >/dev/null" else linux mkdir fails!
+ mamake: handle `bind -lx [dontcare]'
+01-02-12 ratz.c: fix _PACKAGE_ast includes
+ package.sh: $HOSTTYPE env overrides if $PACKAGEROOT/arch/$HOSTTYPE/
+ package.sh: $CC ^HOSTTYPE=[A-Za-z_0-9.]*$ overrides HOSTTYPE
+ iffe.sh: fix dat code that used previous $tmp.exe
+ iffe.sh: fix dat code for _DLL imports
+01-02-09 iffe.sh: add copy() for shells with the dissappearing here doc bug
+01-02-08 Makefile: guard against null $(CC.HOSTTYPE)
+01-02-06 Makefile: separate out cc,ld,ldd workarounds (so they will be packaged)
+01-02-02 package.sh: fix package use for $INSTALLROOT != */$HOSTTYPE
+ package.sh: create intermediate recursion makefiles when needed
+ package.sh: add $SECONDS to the DEBUG trace prompt
+01-01-01 ratz.c: #ifdef for uwin ncc
+ iffe.sh,package.sh: check PACKAGE_PATH for local installations
+ package.sh: add psrinfo for osf.alpha host cpu
+ package.sh: change pax --meter probe; some hang on /dev/tty
+ package.sh: fix `install flat ARCH'
+ mamake: eliminate loops from scan order
+ C+probe: add probe_verbose -V for aix cc=xlc
+ cc.ibm.risc,ldd.ibm.risc: add
+ package.mk: list refs to top-level licenses only
+ package.mk: add local link table to change log html
+00-12-25 package.sh: `no package archives' is a hard error, duh
+ package.sh: reorder host type logic for lame shells
+ mamake.c: getcwd => getwd for NeXT -- how about posix==default guys
+ iffe.sh: really gross workaround for NeXT -lposix stdout null's
+ iffe.sh: handle cc -E that insists on compiling
+00-12-15 iffe.sh: ancient sh function call blows $*; call only when $# == 0
+ *.sh: `getopts 2>/dev/null` => `(getopts)2>/dev/null` for ancient sh
+ package.sh: fix LD_LIBRARY*_PATH initialization
+ cc.next.m68k: add for _POSIX_SOURCE and linker multiply defined syms
+00-12-12 ratz: add --meter
+ package.sh: a few VPATH fixes
+ Makefile: don't override *.mips* cc if -version not accepted
+00-12-11 package.mk: *.inx now contains name=value
+00-12-07 package.sh: handle PC netscape . => _ pathname mangle
+ WWW.mk: .tar.gz => .tgz
+00-11-27 package.sh: add checklicense() to do license checks at read time
+ package.mk: change component list from preformat to table
+00-10-31 package.mk: *.pkg must assert closure
+ package.mk: add cc- variants to list.package.binary
+ package.sh: omit dups from package list
+ package.sh: invalid arg gives one line Usage
+ package.sh: relax checkaout checks for non-owners
+ package.sh: package use sets NPROC if not already set or [01]
+ proto.c: add $(INSTALLROOT)/include/ast hack
+00-10-26 WWW.mk: add .SOURCE rhs to :WWWPAGE:
+00-10-25 package: fix install
+ package.mk: add list.install
+00-10-22 regress: fix VIEW to skip empty dirs
+00-10-19 package.mk: $(PACKAGEROOT)/bin/nmake => $(PACKAGEROOT)/bin/manmake
+ iffe: validate #define identifiers
+00-10-18 C+probe: mac os10 additions
+ package: add DYLD_LIBRARY_PATH initialization
+ add ldd.$(CC.HOSTTYPE)
+00-10-01 iffe: handle -I* -L* options
+00-09-21 mamake: add libxxx and xxx to makefile ordered prereqs
+00-09-19 C+probe: add probe_longlong
+00-09-11 package: drop manmake and $PACKAGEROOT/bin/nmake
+00-09-08 iffe: verfiy that $cc is a C compiler
+00-06-14 mamprobe: fix win32.* probe
+ mamake: fix bug that used lower view path for generation
+ package: don't clobber $PACKAGEROOT/bin/nmake
+00-06-01 C+probe: fix stdinclude *again*
+ package: fix write delta source to use default pax format
+ package: add disambiguating bias for sgi.mips3 over sgi.mips4
+ package.mk: fix for directory content packages lib ast-locale
+00-05-01 iffe: fix invalid _LIB_ macro identifier
+00-04-11 C+probe: uniq stdinclude and stdlib, fix usrinclude
+00-04-01 regress: fix explicit OUTPUT bug that didn't compare with expected
+00-03-17 package: all archives are .tgz for binary download
+ package: $(PACKAGEROOT)/LICENSES/* in source and binary archives
+ package: implement install and verify actions
+ iffe: add exp, pth file dir ..., fix lib - -lfoo, fix lib - - -la -lb
+ iffe: -L* must affect LD_LIBRARY* hacks for .exe tests -- yuk
+ package.mk: add *.pkg :INDEX:
+00-03-07 package: add admin action
+00-03-06 makefile: install optional make probe override script C+make+probe.lcl
+00-02-14 --- release 1.0 ---
+ ratz: treat "foo/" as a dir, not a regular file
+ package: clarify source and binary installation instructions
+ package: fix so binary packages can install without cc
+ package: "ratz" now a non-archive package (the only one) for bootstrap
+ package: handle VPATH=a:b arg
+ package.mk: "ratz" package adjustments
+ Makefile: use :PACKAGE_INIT: to support binary INIT packages
+ WWW.mk: add :WWWALL:
+ C.probe: fix .so check that let .dll slip through
+ iffe: fix config sh var assignment for HAVE_member_IN_struct
+ iffe: fix config sh var assignment for symbol_DECLARED
+ package: delay PATH export until dll hack exports complete
+ package: don't forget binary package $(INSTALLROOT)/lib(32|64)
+ package: add delta change log for source packages
+00-02-10 mamprobe: add mam_cc_DLLBIG
+ package: fix spelling typos
+ package: add html help output
+ package.mk: beef up source and binary help => html
+00-02-08 package: mkdir man/man[138] in the new arch to cover MAM bug
+00-01-28 package,release: add -rcount to release
+ package: fix linux "host cpu" and "host rating"
+ package: copy *.lic to $PACKAGEBIN for "make" and "write binary"
+ package: fix 'release change log' case match
+00-01-24 package: add copyright action
+ mamprobe: add -D_BLD_DLL to mam_cc_DLL
+00-01-11 package: tsort for package write
+ package: early verification that $CC works
+ package: add non-interactive command arg for use action
+ proto: fix -C intermediate mkdir()
+ mamprobe: unixware.i386 ksh workaround
+ C.probe: move hosttype to C.probe (with unixware.i386 workaround)
+ WWW.mk: fix mm2html option quoting
+ WWW.mk: add .SCAN.mm
+ WWW.mk: don't force static=1; grab dll's instead
+ *.sh: fix getopts test to handle botched implementations like osf.alpha
+ iffe.sh: fix read -r test
+99-12-25 iffe: tweak verbose messages
+ iffe: hand code non-optget getopts parse
+ iffe: fix bash quoting bug again
+ iffe: do test -w . after option parse
+ package: fix PACKAGEROOT search
+99-11-19 --- release 0.2 ---
+99-11-19 first working package & friends
+99-10-31 change from lib0ast to INIT; add MAM and package bootstrap
+ hostinfo: gobbled by package
+99-10-01 iffe: add --config, yes{...}end no{...}end, fix read -r workaround
+99-09-27 iffe: add --all --verbose, --* set options
+99-09-22 regress: -v disables long line truncation
+99-09-11 WWW.mk: WWWDIR and MM2HTMLINFO are now lists searched in $(HOME)
+99-08-11 hostinfo: fix type sgi.mips4
+99-06-24 WWW.mk: add
+99-06-08 hostinfo.sh: ${TMPDIR:-/tmp}
+99-06-07 TEST.mk: add
+99-06-01 iffe: add `siz type' for _siz_type == sizeof(type)
+99-05-11 hostinfo,iffe,regress,use: long options
+99-05-01 C.probe: fix over aggressive stdinclude, e.g., /usr/include/machine
+99-04-01 hostinfo: sgi.mips? -o32 and -n32 checks
+ iffe: check that . is writable
+99-03-17 hostinfo: fix for cc not found
+ dl.c,hello.c,m.c: headers in conditionals to force .DONTCARE
+ C.probe: extra check for include dirs pulled in by <sys/types.h>
+99-03-03 regress: add `UNIT - ...' for extra args
+ Makefile: add (_hosttype_) prereq for cc
+99-01-23 hostinfo: tweak rating, use /proc/cpuinfo if there
+99-01-11 C.probe: shlib before lib, /usr before /
+98-12-25 iffe: work around win32.alpha intrinsic clash with -O
+98-11-11 regress: fix UNIT PATH lookup
+98-11-01 regress: add PROG
+98-10-01 hostinfo: add unixware.*
+ use: export PACKAGE_*
+98-08-11 C.probe: add /usr/include check (for sco CC)
+ hostinfo: handle uwin uname update
+98-05-01 regress: fix bug sometimes didn't list last test
+98-04-01 hostinfo: add cc path arg
+ hostinfo: now works with /bin/sh
+ Makefile: strengthed -lm probe
+98-01-23 Makefile: check for -ldl -lm
+ C.probe: handle gcc -v -E phony include dirs
+ iffe: fix lcl by dropping sort -u -- we need the real first
+ iffe: `mem x' to test if x is a non-opaque struct
+98-01-11 $(INSTALLROOT)/lib32 for sgi.mips3
+ $(INSTALLROOT)/lib64 for sgi.mips4
+ add cc.hp.pa
+98-01-01 cc.sgi.mips*: turn off ld library multiply defined
+97-10-11 regress: add VIEW function for locating data
+97-10-01 Makefile: -ldl test moved to libdll Makefile
+97-08-11 regress: add MOVE
+ regress: add SAME
+ regress: use getopts
+ regress: `EXEC' repeats previous test
+97-07-17 use: tweak PATH and LIBPATH bootstrap order
+ iffe: fix lcl bug that botched pathnames with embedded spaces
+97-06-12 iffe: add npt `needs prototype' test
+97-05-09 hostinfo: mvs.* => mvs.390
+ Makefile: cc.$(_hosttype_) workaround installed here
+ iffe: fix nolink{ ... }end
+ iffe: add [no]static{ ... }end for static link test
+ C.probe: _probe_PATH => _probe_export which must be eval'd
+97-04-01 use: _RLD_ROOT set too
+97-03-17 mm2html: changed inner loop
+ mm2html: handle .if|.ie|.el, .so
+ mm2html: handle different man styles
+ mm2html: differentiate mm/man in some non-obvious cases
+ hostinfo: r5000 is not mips4
+97-02-14 hostinfo: validate type with cc
+96-12-25 C.probe: uwin tweaks
+ iffe: use `...` instead of $(...) for alpha /bin/sh
+ iffe: fix `typ' divide by 0
+ iffe: `lcl' now drops X: prefix
+ iffe: +l* -> -l*
+ iffe: eval around ${...#%...} for bsd /bin/sh
+ use: add sgi.mips LD_LIBRARY<abi>_PATH variants
+ use: add -e to list exports
+ iffe: lcl leaves leading [a-zA-Z]: for dos
+ iffe: fix no{link|output|execute} logic
+ C.probe: don't automatically add /usr/include for non-hosted compilers
+ C.probe: don't automatically place /usr/include last
+ C.probe: check gcc style -v -E for stdinclude usrinclude
+96-11-28 iffe: check BASH_VERSION for IFS botch
+ iffe: typ long.xxx only if sizeof(long xxx) != sizeof(xxx)
+ hostinfo: fix sgi.mips[234] tests
+ hostinfo: fix ncr.i386 tests
+96-10-31 iffe: work around old bsh here doc bug by running separate sh
+96-10-11 iffe: *.iffe and *.iff for iffe src files
+ hostinfo: tighten sgi.mips cpu type check
+96-10-01 C.probe: add probe_libdir to catch alpha /usr/shlib
+96-09-17 iffe: fix typ bug that failed for single id types!
+96-08-31 hostinfo: handle recent sgi hinv cpu changes
+96-07-17 make sure sizeof(long xxx)>sizeof(xxx) for typ long.xxx
+96-05-09 C.probe: drop multiple / in stdinclude
+96-02-29 use: package root must have bin and lib subdir
+ mm2html: add
+ C.probe: probe_members += -whole-archive for gcc
+ iffe: add + fix the blasted `...'...\\...'...`
+96-01-31 use: add pkg dir
+ hostinfo: add tandem
+96-01-01 hostinfo: windows_nt|windows[0-9][0-9] -> win32
+95-11-24 hostinfo: linux-aout.* for non-elf linux
+95-11-11 use: add aix LIBPATH
+95-10-11 hostinfo: no args prints type
+95-08-11 use: add
+95-05-09 save original PATH in _probe_PATH
+ beef up library dir probe
+95-04-01 use c source suffix if it still preserves the dialect
+ add hostinfo
+ add lib/hostinfo/typemap user type map
+ add sol.sun4 cpu count
+ fix C.probe to properly handle C/C++ combined compiler drivers
+ add NeXT to hostinfo
+ bummer: mach has /usr/bin/hostinfo
+95-03-19 fix dialect executable test
+95-03-19 --- release 0.0 ---
diff --git a/usr/src/contrib/ast/src/cmd/INIT/TEST.mk b/usr/src/contrib/ast/src/cmd/INIT/TEST.mk
new file mode 100644
index 0000000000..adc43908ca
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/TEST.mk
@@ -0,0 +1,197 @@
+/*
+ * regression test support
+ *
+ * @(#)TEST.mk (AT&T Research) 2010-05-19
+ *
+ * test management is still in the design phase
+ */
+
+/*
+ * three forms for :TEST:
+ *
+ * :TEST: xxx yyy ...
+ *
+ * $(REGRESS) $(REGRESSFLAGS) xxx.tst
+ * $(REGRESS) $(REGRESSFLAGS) yyy.tst
+ *
+ * :TEST: xxx.tst yyy ...
+ *
+ * $(REGRESS) $(REGRESSFLAGS) xxx.tst yyy ...
+ *
+ * :TEST: xxx.c [ :: test-prereq ... :: ] [ args [ : args ... ] ]
+ *
+ * :TEST: xxx.sh [ :: test-prereq ... :: ] [ args [ : args ... ] ]
+ *
+ * xxx :TEST: prereq ...
+ * [ action ]
+ *
+ * $(*) if no action
+ */
+
+":TEST:" : .MAKE .OPERATOR
+ local B G P S T
+ test : .INSERT .TESTINIT
+ if "$("tests":T=FD)"
+ .SOURCE : tests
+ end
+ P := $(>:O=1)
+ if "$(P:N=*.tst)" && ! "$(@:V)"
+ B := $(P:B)
+ if ! ( T = "$(<:V)" )
+ T := $(B)
+ end
+ test : - test.$(T)
+ eval
+ test.$$(T) : $$(B).tst
+ $$(REGRESS) $$(REGRESSFLAGS) $$(*) $(>:V:O>1)
+ :SAVE: $$(B).tst
+ end
+ elif "$(P:N=*@(.sh|$(.SUFFIX.c:/ /|/G)|$(.SUFFIX.C:/ /|/G)))"
+ B := $(P:B)
+ if ! ( T = "$(<:V)" )
+ T := $(B)
+ end
+ :INSTALLDIR: $(B)
+ $(B) :: $(P) $(*:-l*|*$(CC.SUFFIX.ARCHIVE))
+ if "$(P:N=*.sh)"
+ TESTCC == $(CC)
+ $(B) : (TESTCC)
+ end
+ test : - test.$(T)
+ if "$(@:V)"
+ eval
+ test.$$(T) : $$(B) $(>:V:O>1)
+ set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+ $(@:V)
+ end
+ elif "$(>:V:O>1)"
+ local I A V X S R=0
+ for A $(>:V:O>1)
+ if A == "::"
+ let R = !R
+ elif A == ":"
+ let I = I + 1
+ test.$(T).$(I) := $(V:V)
+ V =
+ X := $(X:V)$(S)$$(*) $$(test.$(T).$(I):T=*)
+ S = $("\n")
+ elif A != "-l*|*$(CC.SUFFIX.ARCHIVE)"
+ if R
+ test.$(A) : .VIRTUAL .FORCE
+ test.$(T) : test.$(A)
+ else
+ V += $(A:V)
+ end
+ end
+ end
+ if V
+ let I = I + 1
+ test.$(T).$(I) := $(V:V)
+ X := $(X:V)$(S)$$(*) $$(test.$(T).$(I):T=*)
+ end
+ eval
+ test.$$(T) : $$(B)
+ set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+ $(X:V)
+ end
+ else
+ eval
+ test.$$(T) : $$(B)
+ set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+ $$(*)
+ end
+ end
+ elif ! "$(<:V)"
+ G = 1
+ for B $(>)
+ if B == "-|--"
+ let G = !G
+ else
+ if ! G
+ T =
+ elif ! ( T = "$(B:A=.COMMAND)" ) && ! "$(B:A=.TARGET)"
+ for S .c .sh
+ if "$(B:B:S=$(S):T=F)"
+ :INSTALLDIR: $(B)
+ $(B) :: $(B:B:S=$(S))
+ T := $(B)
+ break
+ end
+ end
+ end
+ test : - test.$(B)
+ test.$(B) : $(T) - $(B).tst
+ $(REGRESS) $(REGRESSFLAGS) $(*:N=*.tst) $(*:N!=*.tst)
+ :SAVE: $(B).tst
+ end
+ end
+ else
+ if "$(>:V)" || "$(@:V)"
+ P := $(>)
+ T := $(P:O=1)
+ B := $(T:B)
+ if "$(T)" != "$(B)" && "$(T:G=$(B))"
+ :INSTALLDIR: $(B)
+ $(B) :: $(T) $(P:O>1:N=-*)
+ T := $(B)
+ P := $(B) $(P:O>1:N!=-*)
+ end
+ if "$(<:V)"
+ T := $(<:V)
+ end
+ test : - test.$(T)
+ if "$(@:V)"
+ eval
+ test.$$(T) : $$(P) $(>:V:O>1)
+ set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+ $(@:V)
+ end
+ else
+ test.$(T) : $(P)
+ set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+ $(*)
+ end
+ else
+ test : - test.$(<)
+ test.$(<) : $(<).tst $(<:A=.COMMAND)
+ $(REGRESS) $(REGRESSFLAGS) $(*)
+ end
+ end
+
+.TESTINIT : .MAKE .VIRTUAL .FORCE .REPEAT
+ if VARIANT == "DLL"
+ error 1 :DLL: tests skipped
+ exit 0
+ end
+ set keepgoing
+ REGRESSFLAGS &= $(TESTS:@/ /|/G:/.*/--test=&/:@Q)
+
+.SCAN.tst : .SCAN
+ $(@.SCAN.sh)
+ I| INCLUDE@ % |
+
+.ATTRIBUTE.%.tst : .SCAN.tst
+
+MKTEST = mktest
+MKTESTFLAGS = --style=regress
+
+/*
+ * test scripts are only regenerated from *.rt when --force
+ * is specified or the .rt file is newer than the script
+ * otherwise the script is accepted if it exists
+ *
+ * this avoids the case where a fresh build with no state
+ * would regenerate the test script and capture current
+ * behavior instead of expected behavior
+ */
+
+%.tst : %.rt
+ if [[ "$(-force)" || "$(>)" -nt "$(^|<)" ]]
+ then $(MKTEST) $(MKTESTFLAGS) $(>) > $(<)
+ fi
+
+test%.sh test%.out : %.rt
+ if [[ "$(-force)" || "$(>)" -nt "$(^|<:O=1)" ]]
+ then $(MKTEST) --style=shell $(>) > $(<:N=*.sh)
+ $(SHELL) $(<:N=*.sh) --accept > $(<:N=*.out)
+ fi
diff --git a/usr/src/contrib/ast/src/cmd/INIT/WWW.mk b/usr/src/contrib/ast/src/cmd/INIT/WWW.mk
new file mode 100644
index 0000000000..4542daeeaf
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/WWW.mk
@@ -0,0 +1,450 @@
+/*
+ * post stuff to WWWDIR for web access
+ * index generated from *.mm
+ */
+
+WWWDIR = wwwfiles public_html
+WWWSAVE =
+WWWSTYLE =
+WWWTYPES =
+
+.WWW.semaphore : .SEMAPHORE
+
+.EXPORT : WWWSTYLE WWWTYPES
+
+/*
+ * item :WWW: [style=frame] [save=pattern] file ...
+ *
+ * `item'.mm generates index.html
+ * other files copied to $(WWWDIR)/`item'
+ * sets up www.bin
+ */
+
+":WWW:" : .MAKE .OPERATOR
+ local A B D I J L X E P R M
+ .WWW.LOCAL .WWW.REMOTE : .DO.NOTHING
+ WWWDIR := $(HOME:X=$(WWWDIR):T=F:O=1)
+ B := $(*:N=*.mm::O=1:B)
+ D := $(WWWDIR)/$(B)
+ M := $(WWWDIR)/man/man1
+ R := $(>:N!=*=*)
+ for I $(>:N=*=*)
+ A := WWW$(I:/=.*//:F=%(upper)s)
+ $(A) := $(I:/.*=//)
+ end
+ (html_info) : $$(MM2HTMLINFO) $$(MM2HTMLINIT)
+ if WWWSTYLE == "frame"
+ %.html %-index.html : %.mm (html_info)
+ $(MM2HTML) $(MM2HTMLFLAGS) $(%:N=faq.*:?> $(<:O=1)?-f $(%) -x?) -o WWWTYPES=$(WWWTYPES:@Q:@Q) $(WWWSOURCE.$(%)) $(>)
+ else
+ %.html : %.mm (html_info)
+ $(MM2HTML) $(MM2HTMLFLAGS) -o WWWTYPES=$(WWWTYPES:@Q:@Q) $(>) $(WWWSOURCE.$(%)) > $(<)
+ end
+ %.html : %.1 (html_info)
+ $(MM2HTML) $(MM2HTMLFLAGS) $(>) $(WWWSOURCE.$(%)) > $(<)
+ %-man.html : $(BINDIR)/% (html_info)
+ ignore $(>) --html 2> $(<)
+ .DO.WWW.MAN : .USE
+ if { test '' = '$(*)' || { strings $(*) | egrep -q '\[\+NAME\?|libcmd\.|cmd[0-9][0-9]\.' ;} ;} && [[ "$( $(<:B) '--???html' -- 2>&1 )" == version=[1-9]* ]]
+ then ( $(<:B) '--??html' -- 2>$(<) ) || true
+ fi
+ if 0
+ $(M)/%.html : .DONTCARE $(INSTALLROOT)/bin/%
+ $(@.DO.WWW.MAN)
+ end
+ if "$(<)"
+ D := $(<)
+ elif ! "$(R)"
+ return
+ end
+ .WWW .WWW.BIN : $(D) $(M) -
+ $(D) $(M) :
+ $(SILENT) test -d $(<) || mkdir $(<)
+ if ( J = "$(R:N=*.mm)" )
+ for I $(J:G=%.html)
+ if I == "*-index.html"
+ O := $(D)/index.html
+ else
+ O := $(I:D=$(D):B:S)
+ end
+ .WWW : $(O)
+ $(O) :COPY: $(I)
+ end
+ end
+ .WWW.req : .FUNCTION
+ return $(*$(%:T=SR):N=-l*:T=F:P=B:N!=-l*|/*)
+ A = 0
+ for I $(R:N!=*.mm)
+ if I == "-"
+ let A = ! A
+ elif I == "-l*"
+ L := $(I:/-l//)
+ if J = "$(.DLL.NAME. $(L) $($(L).VERSION):T=F)"
+ X += $(J)
+ end
+ elif A || "$(I:A=.COMMAND|.ARCHIVE)" || "$(I:D:D:N=$(INSTALLROOT))" || "$(I:N=*-www)"
+ X += $(I)
+ if "$(I:A=.COMMAND)"
+ X += $$(.WWW.req $(I))
+ J := $(I:/-www$//)
+ eval
+ .WWW : $(J:D=$(M):B:S=.html)
+ $(J:D=$(M):B:S=.html) : $(I) $(I:B:S=.1:T=F:?$(I:B:S=.1)??)
+ if strings $$(*:O=1) | egrep -q '\[\+NAME\?|libcmd\.|cmd[0-9][0-9]\.'
+ then $$(IGNORE) $$(*:O=1) '--??html' -- 2>&1
+ elif test '' != '$$(*:N=*.1)'
+ then $$(MM2HTML) $$(*:N=*.1)
+ fi > $$(<)
+ end
+ end
+ else
+ if I == "*.html"
+ $(I) : .TERMINAL
+ end
+ .WWW : $(D)/$(I)
+ $(D)/$(I) :COPY: $(I)
+ end
+ end
+ if "$(X:V)"
+ .WWW.EDIT. : .FUNCTION
+ local E I J
+ for I $(.INSTALL.LIST.:C,^$(INSTALLROOT)/,,:N!=lib/lib/*)
+ for J $(%)
+ if "$(I:B:S)" == "$(J:B:S)"
+ E += -s ',^$(J)$,$(I),'
+ end
+ end
+ end
+ return $(E)
+ .WWW.LIST. : .FUNCTION
+ local E I J
+ for I $(.INSTALL.LIST.:C,^$(INSTALLROOT)/,,:N!=lib/lib/*)
+ for J $(%)
+ if "$(I:B:S)" == "$(J:B:S)"
+ E += $(I)
+ end
+ end
+ end
+ return $(E)
+ .WWW .WWW.BIN : $(D)/$(B)-$(CC.HOSTTYPE).tgz
+ $(D)/$(B)-$(CC.HOSTTYPE).tgz : $(X:V)
+ cat > X.$(tmp).X <<!
+ This archive contains $(CC.HOSTTYPE) binaries for
+ $(.WWW.LIST. $(*))
+ Add the bin directory to PATH and the lib directory
+ to LD_LIBRARY_PATH or its equivalent for your system.
+ Use the --?help and --man options for online help,
+ documentation and contact info.
+ !
+ $(PAX) -wvf $(<) -x tar:gzip -s "/X.$(tmp).X/README/" $(.WWW.EDIT. $(*)) -s ',\(.*\)-www$,bin/\1,' -s ',.*/lib/,lib/,' X.$(tmp).X $(*:N!=-l*)
+ $(RM) -f X.$(tmp).X
+ end
+
+/*
+ * item ... :WWWBIN: index.mm file ... host:arch ...
+ *
+ * home page control
+ * `host' of type `arch' for www.bin files
+ */
+
+":WWWBIN:" : .MAKE .OPERATOR
+ local HOST ITEM ARCH BINS DIRS G
+ .WWW.NOMAN. += $(<)
+ for HOST $(>)
+ TYPE := $(HOST:/.*://)
+ HOST := $(HOST:/:.*//)
+ WWWTYPES += $(TYPE)
+ ARCH := $(PWD:D:C,/$(CC.HOSTTYPE)/,/$(TYPE)/)
+ BINS :=
+ DIRS :=
+ for ITEM $(<)
+ if TYPE == "$(CC.HOSTTYPE)"
+ G := $("index.mm":G=%.html:D=$(WWWDIR)/$(ITEM):B:S)
+ .WWW.LOCAL : $(G)
+ eval
+ $(G) : .JOINT $(ARCH)/$(ITEM)/$(ITEM).mm (html_info) .WWW.semaphore .FORCE
+ cd $$(*:D)
+ $$(MAKE) $$(-) $$(=) www
+ end
+ else
+ BINS += $(WWWDIR)/$(ITEM)/$(ITEM)-$(TYPE).tgz
+ DIRS += $(ARCH)/$(ITEM)
+ end
+ end
+ .WWW.REMOTE : $(BINS)
+ ARCH := $(ARCH:C,/src/.*,,)
+ eval
+ $(BINS) :JOINT: .FORCE .WWW.semaphore
+ rsh $(HOST) "
+ eval \"\`bin/package debug use\`\"
+ PATH=\$PATH:$(PATH):/usr/ccs/bin
+ umask 022
+ for dir in $(DIRS)
+ do cd \$dir
+ $(MAKE) $(-) $(=) --errorid=\$dir www.bin
+ done
+ "
+ end
+ end
+
+/*
+ * :WWWPOST: [ host [ dir [ tmp ] ] ]
+ *
+ * post local $(WWWDIR) to host:dir putting archives in host:tmp/www-*.pax
+ * defaults: host=www dir=$(WWWDIR) tmp=tmp
+ */
+
+":WWWPOST:" : .MAKE .OPERATOR
+ local ( host dir tmp ignore ... ) $(>) www $(WWWDIR:B:S) tmp ignore
+ :ALL: delta.pax
+ .WWW.ALL : .WWW.REMOTE - .WWW.LOCAL
+ eval
+ .POST : .VIRTUAL base.pax delta.pax
+ case "$$(>)" in
+ '') ;;
+ *) $$(>:C,.*,rcp & $(host):$(tmp)/$(dir)-&;,)
+ rsh $(host) '
+ umask 022
+ PATH=$HOME/bin:$PATH
+ cd $(dir)
+ pax -rvf $HOME/$(tmp)/$(dir)-delta.pax -z $HOME/$(tmp)/$(dir)-base.pax
+ '
+ ;;
+ esac
+ end
+ base.pax :
+ cd $(WWWDIR)
+ pax -wvf $(<:P=A) .
+ .base.list. : .FUNCTION
+ local X
+ X := $(sh pax -f $(%:N=*.pax):C,\n, ,G:C,^,$$(WWWDIR)/,)
+ $(X) : .DONTCARE
+ return $(X)
+ delta.pax : .WWW.ALL base.pax $$(.base.list. $$(*))
+ cd $(WWWDIR)
+ pax -wvf $(<:P=A) -z $(*:N=*.pax:P=A) .
+
+.WWW.FAQ : .USE
+ {
+ set -o noglob
+ print .xx title=\"$(<:B:/\..*//) FAQ index\"
+ print .MT 4
+ print .TL
+ print
+ print .H 1 \"$(<:B:/\..*//) FAQ index\"
+ print .BL
+ for i in $(*)
+ do exec < $i || exit 1
+ e=0 l=0 x=y
+ while read -r op a1 a2
+ do case $op in
+ .H) case $e in
+ 0) e=1 ;;
+ 1) print .LE ;;
+ esac
+ print .sp
+ print .LI
+ a2=${a2//\"/}
+ a2=${a2%\ [Ff][Aa][Qq]}
+ f=${i%.*}.html
+ f=${f#*/}
+ print .xx link=\"$f' '$a2\"
+ print .sp
+ print .NL
+ ;;
+ .AL|.BL|.NL)
+ case $x in
+ y) x=x ;;
+ *) x=xx$x ;;
+ esac
+ ;;
+ .LE) x=${x%xx}
+ ;;
+ .LI) case $x in
+ x) x=
+ print .LI
+ ;;
+ esac
+ ;;
+ .sp) case $x in
+ '') x=x ;;
+ esac
+ ;;
+ *) case $x in
+ '') print -r -- $op $a1 $a2 ;;
+ esac
+ ;;
+ esac
+ done
+ case $e in
+ 1) print .LE ;;
+ esac
+ done
+ print .LE
+ } > $(<)
+
+/*
+ * [ dir ] :WWWPAGE: [ source ... ] file.mm file
+ *
+ * *.mm generates *.html
+ * faq.*.mm generates faq.mm
+ * other files copied to $(WWWDIR)[/dir]
+ * files after - (toggle) are just asserted on ::
+ */
+
+":WWWPAGE:" : .MAKE .OPERATOR
+ local B D I J O P Q S X G A
+ A = 0
+ D := $(<:O=1)
+ P := $(>:N!=*=*)
+ S := $(>:N=*=*)
+ if X = "$(P:B:S:N=faq.*.mm)"
+ Q := $(D:+$(D).)faq.mm
+ $(Q) : .WWW.FAQ $(X)
+ P += $(Q)
+ end
+ if D
+ B := $(D:B)
+ if D != "/*"
+ D := $(WWWDIR)/$(D)
+ $(D) :INSTALLDIR:
+ .WWW.LOCAL : $(D)
+ end
+ for I $(<:B)
+ .WWW.LOCAL : $(WWWDIR)/man/man1/$(I).html
+ $(WWWDIR)/man/man1/$(I).html : .DONTCARE
+ end
+ for I $(P)
+ if I == "-"
+ let A = !A
+ continue
+ end
+ if A || I == "$(WWWSAVE)"
+ :: $(I)
+ continue
+ end
+ if "$(I:T=FD)"
+ .SOURCE : $(I)
+ if "$(<)"
+ WWWSOURCE.$(<:O=1) += $(I:T=F:P=L=*)
+ end
+ continue
+ end
+ if I == "*.html"
+ $(I) : .TERMINAL
+ O := $(I)
+ X := $(I)
+ elif ( G = "$(I:G=%.html)" )
+ $(G) : .IMPLICIT $(S) $(I)
+ if $(G:O) > 1
+ for J $(G)
+ if J == "*-index.html"
+ if J == "faq.*.*"
+ continue
+ end
+ O := index.html
+ else
+ O := $(J)
+ end
+ .WWW.LOCAL : $(D)/$(O)
+ $(D)/$(O) :INSTALL: $(J)
+ end
+ continue
+ end
+ if X
+ X := $(I)
+ else
+ X := index
+ end
+ I := $(I:B:S=.html)
+ O := $(X:B:S=.html)
+ else
+ O := $(I)
+ end
+ $(D)/$(O) :INSTALL: $(I)
+ .WWW.LOCAL : $(D)/$(O)
+ end
+ else
+ for I $(P)
+ if I == "-"
+ let A = !A
+ continue
+ end
+ if A || I == "$(WWWSAVE)"
+ :: $(I)
+ continue
+ end
+ if "$(I:T=FD)"
+ .SOURCE : $(I)
+ continue
+ end
+ if I == "*.html"
+ $(I) : .TERMINAL
+ O := $(I)
+ elif ( O = "$(I:G=%.html)" )
+ $(O) : $(S) .IMPLICIT $(I)
+ end
+ for J $(O)
+ if J == "*-index.html"
+ X := index.html
+ else
+ X := $(J)
+ end
+ X := $(WWWDIR)/$(X)
+ .WWW.LOCAL : $(X)
+ $(X) :COPY: $(J)
+ end
+ end
+ end
+
+/*
+ * rhs done by default
+ */
+
+":WWWALL:" : .MAKE .OPERATOR
+ .WWW.ALL : $(>)
+
+":WWWMAN:" : .MAKE .OPERATOR
+ .INIT : .WWW.MAN
+ .WWW.MAN. := $(>)
+ .WWW.MAN : .MAKE .FORCE
+ local H I
+ for I $(.WWW.MAN.)
+ .WWW.LOCAL : $(WWWDIR)/man/man1/$(I:B).html
+ $(WWWDIR)/man/man1/$(I:B).html : .DO.WWW.MAN $(I)
+ end
+ for I $(sh builtin:B)
+ .WWW.LOCAL : $(WWWDIR)/man/man1/$(I).html
+ $(WWWDIR)/man/man1/$(I).html : .DO.WWW.MAN -
+ end
+ for I $("$(BINDIR)/*([!-.])":P=G:B)
+ if I != "*_*"
+ H := $(WWWDIR)/man/man1/$(I).html
+ if ! "$(*$(H))" && I != "$(.WWW.NOMAN.:/ /|/G)"
+ .WWW.LOCAL : $(H)
+ end
+ elif "$(PATH:/:/ /G:X=$(I:/.*_//):T=F:O=1)"
+ H := $(WWWDIR)/man/man1/$(I:/.*_//).html
+ .WWW.LOCAL : $(H)
+ $(H) : .DO.WWW.MAN $(BINDIR)/$(I)
+ end
+ end
+
+.WWW.SED. : .FUNCTION
+ local E T
+ E = s/^\(\.xx.link=.*\)%HOSTTYPE%\(.*\)%HOSTTYPE%\(.*\)/
+ for T $(%)
+ E := $(E:V)\$$("\n").LI\$$("\n")\1$(T)\2$(T)\3
+ end
+ return $(E:V)/
+
+/*
+ * mm scan support
+ */
+
+.SCAN.mm : .SCAN
+ O|S|
+ I|.sn %|A.DONTCARE|M$$(%)|
+ I|.so %|A.DONTCARE|M$$(%)|
+
+.ATTRIBUTE.%.mm : .SCAN.mm
diff --git a/usr/src/contrib/ast/src/cmd/INIT/crossexec.sh b/usr/src/contrib/ast/src/cmd/INIT/crossexec.sh
new file mode 100644
index 0000000000..9d73ee2a7f
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/crossexec.sh
@@ -0,0 +1,139 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: cross compiler a.out execution
+
+command=crossexec
+
+tmp=/tmp/cross$$
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) ARGV0="-a $command"
+ USAGE=$'
+[-?
+@(#)$Id: crossexec (AT&T Labs Research) 2004-01-04 $
+]
+'$USAGE_LICENSE$'
+[+NAME?crossexec - cross compiler a.out execution]
+[+DESCRIPTION?\bcrossexec\b runs a cross-compiled \acommand\a in an environment
+ that supports a cross-compilation architecture different from the
+ current host. The cross environment is determined by \acrosstype\a,
+ usually a host type name produced by \bpackage\b(1). \acrosstype\a
+ is used to find an entry in \b$HOME/.crossexec\b that specifies
+ the cross compiler host and access details.]
+[+?The exit status of \bcrossexec\b is the exit status of \acommand\a.]
+[+CROSS ENVIRONMENT FILE?\b$HOME/.crossexec\b contains one line for each
+ supported \acrosstype\a. Each line contains 5 tab separated fields.
+ Field default values are specified as \b-\b. The fields are:]{
+ [+crosstype?The host type produced by \bpackage\b(1).]
+ [+host?The host name.]
+ [+user?The user name on \ahost\a. The default is the current user.]
+ [+dir?The directory to copy \acommand\a and execute it. The default
+ is the \auser\a \b$HOME\b on \ahost\a.]
+ [+shell?The command used to get shell access to \ahost\a. Currently
+ only \brsh\b and \bssh\b are supported.]
+ [+copy?The command used to copy \acommand\a to \ahost\a. Currently
+ only \brcp\b and \bscp\b are supported.]
+}
+[n:show?Show the underlying commands but do not execute.]
+
+crosstype command [ option ... ] [ file ... ]
+
+[+SEE ALSO?\brcp\b(1), \brsh\b(1), \bscp\b(1), \bssh\b(1)]
+'
+ ;;
+*) ARGV0=""
+ USAGE="crosstype command [ option ... ] [ file ... ]"
+ ;;
+esac
+
+usage()
+{
+ OPTIND=0
+ getopts $ARGV0 "$USAGE" OPT '-?'
+ exit 2
+}
+
+exec=
+
+# get the options and operands
+
+while getopts $ARGV0 "$USAGE" OPT
+do case $OPT in
+ n) exec=echo ;;
+ *) usage ;;
+ esac
+done
+shift $OPTIND-1
+case $# in
+[01]) usage ;;
+esac
+
+type=$1
+shift
+cmd=$1
+shift
+
+# get the host info
+
+info=$HOME/.$command
+if test ! -r $info
+then echo "$command: $info: not found" >&2
+ exit 1
+fi
+ifs=${IFS-'
+ '}
+while :
+do IFS=' '
+ read hosttype hostname usr dir sh cp
+ code=$?
+ IFS=$ifs
+ case $code in
+ 0) ;;
+ *) echo "$command: $type: unknown cross compiler host type" >&2
+ exit 1
+ ;;
+ esac
+ case $hosttype in
+ $type) break ;;
+ esac
+done < $info
+
+# fill in the defaults
+
+case $usr in
+-) cpu= shu= ;;
+*) cpu=${usr}@ shu="-l $usr" ;;
+esac
+case $dir in
+-) dir= ;;
+esac
+case $sh in
+''|-) sh=ssh ;;
+esac
+case $cp in
+''|-) cp=scp ;;
+scp) cp="$cp -q" ;;
+esac
+
+trap "rm -f $tmp" 0 1 2 3 15
+$exec $cp $cmd $cpu$hostname:$dir </dev/null || exit 1
+cmd=./${cmd##*/}
+$exec $sh $shu $hostname "cd $dir; LD_LIBRARY_PATH=: $cmd $@ </dev/null 2>/dev/null; code=\$?; rm -f $cmd; echo $command: exit \$code >&2" </dev/null 2>$tmp
+exit `sed -e '/^'$command': exit [0-9][0-9]*$/!d' -e 's/.* //' $tmp`
diff --git a/usr/src/contrib/ast/src/cmd/INIT/db.c b/usr/src/contrib/ast/src/cmd/INIT/db.c
new file mode 100644
index 0000000000..5a3a7c1aea
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/db.c
@@ -0,0 +1,37 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * small test for sleepycat dbm compatibility
+ */
+
+#define DB_DBM_HSEARCH 1
+
+#if DB_DBM_HSEARCH
+#include <db.h>
+#endif
+
+int
+main()
+{
+ DBM* dbm = 0;
+
+ dbm_close(dbm);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/ditto.sh b/usr/src/contrib/ast/src/cmd/INIT/ditto.sh
new file mode 100644
index 0000000000..1141a0d7d0
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/ditto.sh
@@ -0,0 +1,460 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: replicate directory hierarchies
+
+COMMAND=ditto
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) ARGV0="-a $COMMAND"
+ USAGE=$'
+[-?
+@(#)$Id: ditto (AT&T Labs Research) 2010-11-22 $
+]
+'$USAGE_LICENSE$'
+[+NAME?ditto - replicate directory hierarchies]
+[+DESCRIPTION?\bditto\b replicates the \asource\a directory hierarchy
+ to the \adestination\a directory hierarchy. Both \asource\a and
+ \adestination\a may be of the form
+ [\auser\a@]][\ahost\a:]][\adirectory\a]]. At least one of
+ \ahost\a: or \adirectory\a must be specified. The current user is used
+ if \auser@\a is omitted, the local host is used if \ahost\a: is
+ omitted, and the user home directory is used if \adirectory\a is
+ omitted.]
+[+?Remote hosts and files are accessed via \bssh\b(1) or \brsh\b(1). \bksh\b(1),
+ \bpax\b(1), and \btw\b(1) must be installed on the local and remote hosts.]
+[+?For each source file \bditto\b does one of these actions:]{
+ [+chmod|chown?change the mode and/or ownership of the destination
+ file to match the source]
+ [+copy?copy the source file to the destination]
+ [+delete?delete the destination file]
+ [+skip?the destination file is not changed]
+}
+[+?The source and destination hierarchies are generated by \btw\b(1) with
+ the \b--logical\b option. An \b--expr\b option may
+ be specified to prune the search. The \btw\b searches are relative to
+ the \asource\a and \adestination\a directories.]
+[c:checksum?Copy if the \btw\b(1) 32x4 checksum mismatches.]
+[d:delete?Delete \adestination\a files that are not in the \asource\a.]
+[e:expr?\btw\b(1) select expression.]:[tw-expression]
+[m!:mode?Preserve file mode.]
+[n:show?Show the operations but do not exectute.]
+[o:owner?Preserve file user and group ownership.]
+[p:physical?Generate source and destination hierarchies by \btw\b(1) with
+ the \b--physical\b option.]
+[r:remote?The remote access protocol; either \bssh\b or
+ \brsh\b.]:[protocol:=ssh]
+[u:update?Copy only if the \asource\a file is newer than the
+ \adestination\a file.]
+[v:verbose?Trace the operations as they are executed.]
+[D:debug?Enable the debug trace.]
+
+source destination
+
+[+SEE ALSO?\brdist\b(1), \brsync\b(1), \brsh\b(1), \bssh\b(1), \btw\b(1)]
+'
+ ;;
+*) ARGV0=""
+ USAGE="de:[tw-expression]mnouvD source destination"
+ ;;
+esac
+
+usage()
+{
+ OPTIND=0
+ getopts $ARGV0 "$USAGE" OPT '-?'
+ exit 2
+}
+
+parse() # id user@host:dir
+{
+ typeset id dir user host
+ id=$1
+ dir=$2
+ (( debug || ! exec )) && print -r $id $dir
+ if [[ $dir == *@* ]]
+ then
+ user=${dir%%@*}
+ dir=${dir#${user}@}
+ else
+ user=
+ fi
+ if [[ $dir == *:* ]]
+ then
+ host=${dir%%:*}
+ dir=${dir#${host}:}
+ else
+ host=
+ fi
+ if [[ $user ]]
+ then
+ user="-l $user"
+ if [[ ! $host ]]
+ then
+ host=$(hostname)
+ fi
+ fi
+ eval ${id}_user='$user'
+ eval ${id}_host='$host'
+ eval ${id}_dir='$dir'
+}
+
+# initialize
+
+typeset -A chown chmod
+typeset tw cp rm link
+integer ntw=0 ncp=0 nrm=0 nlink=0 n
+
+typeset src_user src_host src_path src_type src_uid src_gid src_perm src_sum
+typeset dst_user dst_host dst_path dst_type dst_uid dst_gid dst_perm dst_sum
+integer src_size src_mtime src_eof
+integer dst_size dst_mtime dst_eof
+
+integer debug=0 delete=0 exec=1 mode=1 owner=0 update=0 verbose=0 logical
+
+typeset remote=ssh trace
+typeset checksum='"-"' pax="pax"
+typeset paxreadflags="" paxwriteflags="--write --format=tgz --nosummary"
+
+tw[ntw++]=tw
+(( logical=ntw ))
+tw[ntw++]=--logical
+tw[ntw++]=--chop
+tw[ntw++]=--ignore-errors
+tw[ntw++]=--expr=sort:name
+
+# grab the options
+
+while getopts $ARGV0 "$USAGE" OPT
+do case $OPT in
+ c) checksum=checksum ;;
+ d) delete=1 ;;
+ e) tw[ntw++]=--expr=\"$OPTARG\" ;;
+ m) mode=0 ;;
+ n) exec=0 verbose=1 ;;
+ o) owner=1 ;;
+ p) tw[logical]=--physical ;;
+ r) remote=$OPTARG ;;
+ u) update=1 ;;
+ v) verbose=1 ;;
+ D) debug=1 ;;
+ *) usage ;;
+ esac
+done
+shift $OPTIND-1
+if (( $# != 2 ))
+then usage
+fi
+tw[ntw++]=--expr=\''action:printf("%d\t%d\t%s\t%s\t%s\t%-.1s\t%o\t%s\t%s\n", size, mtime, '$checksum', uid, gid, mode, perm, path, symlink);'\'
+if (( exec ))
+then
+ paxreadflags="$paxreadflags --read"
+fi
+if (( verbose ))
+then
+ paxreadflags="$paxreadflags --verbose"
+fi
+
+# start the source and destination path list generators
+
+parse src "$1"
+parse dst "$2"
+
+# the |& command may exit before the exec &p
+# the print sync + read delays the |& until the exec &p finishes
+
+if [[ $src_host ]]
+then ($remote $src_user $src_host "{ test ! -f .profile || . ./.profile ;} && cd $src_dir && read && ${tw[*]}") 2>&1 |&
+else (cd $src_dir && read && eval "${tw[@]}") 2>&1 |&
+fi
+exec 5<&p 7>&p
+print -u7 sync
+exec 7>&-
+
+if [[ $dst_host ]]
+then ($remote $dst_user $dst_host "{ test ! -f .profile || . ./.profile ;} && cd $dst_dir && read && ${tw[*]}") 2>&1 |&
+else (cd $dst_dir && read && eval "${tw[@]}") 2>&1 |&
+fi
+exec 6<&p 7>&p
+print -u7 sync
+exec 7>&-
+
+# scan through the sorted path lists
+
+if (( exec ))
+then
+ src_skip=*
+ dst_skip=*
+else
+ src_skip=
+ dst_skip=
+fi
+src_path='' src_eof=0
+dst_path='' dst_eof=0
+ifs=${IFS-$' \t\n'}
+IFS=$'\t'
+while :
+do
+ # get the next source path
+
+ if [[ ! $src_path ]] && (( ! src_eof ))
+ then
+ if read -r -u5 text src_mtime src_sum src_uid src_gid src_type src_perm src_path src_link
+ then
+ if [[ $text != +([[:digit:]]) ]]
+ then
+ print -u2 $COMMAND: source: "'$text'"
+ src_path=
+ continue
+ fi
+ src_size=$text
+ elif (( dst_eof ))
+ then
+ break
+ elif (( src_size==0 ))
+ then
+ exit 1
+ else
+ src_path=
+ src_eof=1
+ fi
+ fi
+
+ # get the next destination path
+
+ if [[ ! $dst_path ]] && (( ! dst_eof ))
+ then
+ if read -r -u6 text dst_mtime dst_sum dst_uid dst_gid dst_type dst_perm dst_path dst_link
+ then
+ if [[ $text != +([[:digit:]]) ]]
+ then
+ print -u2 $COMMAND: destination: $text
+ dst_path=
+ continue
+ fi
+ dst_size=$text
+ elif (( src_eof ))
+ then
+ break
+ elif (( dst_size==0 ))
+ then
+ exit 1
+ else
+ dst_path=
+ dst_eof=1
+ fi
+ fi
+
+ # determine the { cp rm chmod chown } ops
+
+ if (( debug ))
+ then
+ [[ $src_path ]] && print -r -u2 -f $': src %8s %10s %s %s %s %s %3s %s\n' $src_size $src_mtime $src_sum $src_uid $src_gid $src_type $src_perm "$src_path"
+ [[ $dst_path ]] && print -r -u2 -f $': dst %8s %10s %s %s %s %s %3s %s\n' $dst_size $dst_mtime $dst_sum $dst_uid $dst_gid $dst_type $dst_perm "$dst_path"
+ fi
+ if [[ $src_path == $dst_path ]]
+ then
+ if [[ $src_type != $dst_type ]]
+ then
+ rm[nrm++]=$dst_path
+ if [[ $dst_path != $dst_skip ]]
+ then
+ if [[ $dst_type == d ]]
+ then
+ dst_skip="$dst_path/*"
+ print -r rm -r "'$dst_path'"
+ else
+ dst_skip=
+ print -r rm "'$dst_path'"
+ fi
+ fi
+ fi
+ if [[ $src_type == l ]]
+ then if [[ $src_link != $dst_link ]]
+ then
+ cp[ncp++]=$src_path
+ if [[ $src_path != $src_skip ]]
+ then
+ src_skip=
+ print -r cp "'$src_path'"
+ fi
+ fi
+ elif [[ $src_type != d ]] && { (( update && src_mtime > dst_mtime )) || (( ! update )) && { (( src_size != dst_size )) || [[ $src_sum != $dst_sum ]] ;} ;}
+ then
+ if [[ $src_path != . ]]
+ then
+ cp[ncp++]=$src_path
+ if [[ $src_path != $src_skip ]]
+ then
+ src_skip=
+ print -r cp "'$src_path'"
+ fi
+ fi
+ else
+ if (( owner )) && [[ $src_uid != $dst_uid || $src_gid != $dst_gid ]]
+ then
+ chown[$src_uid.$src_gid]="${chown[$src_uid.$src_gid]} '$src_path'"
+ if [[ $src_path != $src_skip ]]
+ then
+ src_skip=
+ print -r chown $src_uid.$src_gid "'$src_path'"
+ fi
+ if (( (src_perm & 07000) || mode && src_perm != dst_perm ))
+ then
+ chmod[$src_perm]="${chmod[$src_perm]} '$src_path'"
+ if [[ $src_path != $src_skip ]]
+ then
+ src_skip=
+ print -r chmod $src_perm "'$src_path'"
+ fi
+ fi
+ elif (( mode && src_perm != dst_perm ))
+ then
+ chmod[$src_perm]="${chmod[$src_perm]} '$src_path'"
+ if [[ $src_path != $src_skip ]]
+ then
+ src_skip=
+ print -r chmod $src_perm "'$src_path'"
+ fi
+ fi
+ fi
+ src_path=
+ dst_path=
+ elif [[ ! $dst_path || $src_path && $src_path < $dst_path ]]
+ then
+ if [[ $src_path != . ]]
+ then
+ cp[ncp++]=$src_path
+ if [[ $src_path != $src_skip ]]
+ then
+ if [[ $src_type == d ]]
+ then
+ src_skip="$src_path/*"
+ print -r cp -r "'$src_path'"
+ else
+ src_skip=
+ print -r cp "'$src_path'"
+ fi
+ fi
+ fi
+ src_path=
+ elif [[ $dst_path ]]
+ then
+ if (( delete ))
+ then
+ rm[nrm++]=$dst_path
+ if [[ $dst_path != $dst_skip ]]
+ then
+ if [[ $dst_type == d ]]
+ then
+ dst_skip="$dst_path/*"
+ print -r rm -r "'$dst_path'"
+ else
+ dst_skip=
+ print -r rm "'$dst_path'"
+ fi
+ fi
+ fi
+ dst_path=
+ fi
+done
+IFS=$ifs
+
+(( exec )) || exit 0
+
+# generate, transfer and execute the { rm chown chmod } script
+
+if (( ${#rm[@]} || ${#chmod[@]} || ${#chown[@]} ))
+then
+ {
+ if (( verbose ))
+ then
+ print -r -- set -x
+ fi
+ print -nr -- cd "'$dst_dir'"
+ n=0
+ for i in ${rm[@]}
+ do
+ if (( --n <= 0 ))
+ then
+ n=32
+ print
+ print -nr -- rm -rf
+ fi
+ print -nr -- " '$i'"
+ done
+ for i in ${!chown[@]}
+ do
+ n=0
+ for j in ${chown[$i]}
+ do
+ if (( --n <= 0 ))
+ then
+ n=32
+ print
+ print -nr -- chown $i
+ fi
+ print -nr -- " $j"
+ done
+ done
+ for i in ${!chmod[@]}
+ do
+ n=0
+ for j in ${chmod[$i]}
+ do
+ if (( --n <= 0 ))
+ then
+ n=32
+ print
+ print -nr -- chmod $i
+ fi
+ print -nr -- " $j"
+ done
+ done
+ print
+ } | {
+ if (( ! exec ))
+ then
+ cat
+ elif [[ $dst_host ]]
+ then
+ $remote $dst_user $dst_host sh
+ else
+ $SHELL
+ fi
+ }
+fi
+
+# generate, transfer and read back the { cp } tarball
+
+if (( ${#cp[@]} ))
+then
+ {
+ cd $src_dir &&
+ print -r -f $'%s\n' "${cp[@]}" |
+ $pax $paxwriteflags
+ } | {
+ if [[ $dst_host ]]
+ then
+ $remote $dst_user $dst_host "{ test ! -f .profile || . ./.profile ;} && { test -d \"$dst_dir\" || mkdir -p \"$dst_dir\" ;} && cd \"$dst_dir\" && gunzip | $pax $paxreadflags"
+ else
+ ( { test -d "$dst_dir" || mkdir -p "$dst_dir" ;} && cd "$dst_dir" && gunzip | $pax $paxreadflags )
+ fi
+ }
+ wait
+fi
diff --git a/usr/src/contrib/ast/src/cmd/INIT/dl.c b/usr/src/contrib/ast/src/cmd/INIT/dl.c
new file mode 100644
index 0000000000..c710ad6a52
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/dl.c
@@ -0,0 +1,33 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * small test for -ldl
+ */
+
+#ifndef dlopen
+#include <dlfcn.h>
+#endif
+
+int
+main()
+{
+ dlopen("libdl.so",0);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/execrate.sh b/usr/src/contrib/ast/src/cmd/INIT/execrate.sh
new file mode 100644
index 0000000000..71ba78d92f
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/execrate.sh
@@ -0,0 +1,179 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: wrapper for .exe challenged win32 systems/commands
+
+command=execrate
+
+bins='/bin /usr/bin /usr/sbin'
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) ARGV0="-a $command"
+ USAGE=$'
+[-?
+@(#)$Id: execrate (AT&T Labs Research) 2002-02-02 $
+]
+'$USAGE_LICENSE$'
+[+NAME?execrate - wrapper for .exe challenged commands]
+[+DESCRIPTION?\bexecrate\b runs \acommand\a after checking the \afile\a
+ operands for standard semantics with respect to \bwin32\b \b.exe\b
+ suffix conventions. This command is only needed on \bwin32\b
+ systems that inconsistently handle \b.exe\b across library and
+ command interfaces. \acommand\a may be one of \bcat\b(1), \bchmod\b(1),
+ \bcmp\b(1), \bcp\b(1), \bln\b(1), \bmv\b(1), or \brm\b(1).
+ Only the 2 argument forms of \bcp\b, \bln\b and \bmv\b are handled.
+ Unsupported commands and commands requiring no change are
+ silently executed.]
+[+?With no arguments \bexecrate\b exits with status 0 if the current system
+ is \b.exe\b challenged, 1 if the current system is normal.]
+[n:show?Show the underlying commands but do not execute.]
+
+command [ option ... ] file ...
+
+[+SEE ALSO?\bwebster\b(1)]
+'
+ usage()
+ {
+ OPTIND=0
+ getopts $ARGV0 "$USAGE" OPT '-?'
+ exit 2
+ }
+ exec=1
+ while getopts $ARGV0 "$USAGE" OPT
+ do case $OPT in
+ n) exec=0 ;;
+ *) usage ;;
+ esac
+ done
+ shift `expr $OPTIND - 1`
+ ;;
+*) usage()
+ {
+ echo "Usage: execrate [ -n ] [ command [ option ... ] file ... ]" >&2
+ exit 2
+ }
+ exec=1
+ while :
+ do case $1 in
+ -n) exec=0 ;;
+ -*) usage ;;
+ *) break ;;
+ esac
+ shift
+ done
+ ;;
+esac
+case $# in
+0) if test ! -x /bin/cat.exe
+ then exit 1 # normal
+ fi
+ if /bin/cat /bin/cat >/dev/null 2>&1
+ then exit 1 # normal
+ fi
+ exit 0 # challenged
+ ;;
+1) usage
+ ;;
+esac
+case $1 in
+*cat|*rm)
+ NUM=0
+ ;;
+*chgrp|*chmod)
+ NUM=1
+ ;;
+*cmp|*cp|*ln|*mv)
+ NUM=2
+ ;;
+*) case $exec in
+ 0) echo "$@" ;;
+ *) "$@" ;;
+ esac
+ exit
+ ;;
+esac
+CMD=$1
+shift
+case $CMD in
+*/*) ;;
+*) for d in $bins
+ do if test -x $d/$1 -o -x $d/$1.exe
+ then CMD=$d/$1
+ break
+ fi
+ done
+ ;;
+esac
+while :
+do case $1 in
+ -*) CMD="$CMD $1" ;;
+ *) break ;;
+ esac
+ shift
+done
+case $exec in
+0) CMD="echo $CMD" ;;
+esac
+case $NUM:$# in
+*:0) ;;
+1:*) CMD="$CMD $1"
+ NUM=0
+ shift
+ ;;
+esac
+case $NUM:$# in
+0:*) status=0
+ for f
+ do if test "$f" -ef "$f".exe
+ then f=$f.exe
+ fi
+ $CMD "$f"
+ case $? in
+ 0) ;;
+ *) status=$? ;;
+ esac
+ done
+ exit $status
+ ;;
+2:2) f=$1
+ case $f in
+ *.exe) ;;
+ *) if test "$f" -ef "$f".exe
+ then f=$f.exe
+ fi
+ ;;
+ esac
+ case $f in
+ *.exe) if test -d "$2"
+ then t=$2/$f
+ else t=$2
+ fi
+ case $t in
+ */*) b=`basename "$t"` ;;
+ *) b=$t ;;
+ esac
+ case $b in
+ *.*) $CMD "$f" "$t"; exit ;;
+ *) $CMD "$f" "$t".exe; exit ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+$CMD "$@"
diff --git a/usr/src/contrib/ast/src/cmd/INIT/filter.sh b/usr/src/contrib/ast/src/cmd/INIT/filter.sh
new file mode 100644
index 0000000000..2637a58486
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/filter.sh
@@ -0,0 +1,98 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: convert command that operates on file args to pipeline filter
+
+command=filter
+
+tmp=/tmp/$command$$
+suf=
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) ARGV0="-a $command"
+ USAGE=$'
+[-?
+@(#)$Id: filter (AT&T Labs Research) 2001-05-31 $
+]
+'$USAGE_LICENSE$'
+[+NAME?filter - run a command in stdin/stdout mode]
+[+DESCRIPTION?\bfilter\b runs \acommand\a in a mode that takes input from
+ the \afile\a operands, or from the standard input if no \afile\a
+ operands are specified, and writes the results to the standard output.
+ It can be used to run commands like \bsplit\b(1), that normally modify
+ \afile\a operands in-place, in pipelines. The \afile\a operands are
+ not modified; \acommand\a is run on copies in \b/tmp\b.]
+
+command [ option ... ] [ file ... ]
+
+[+SEE ALSO?\bstrip\b(1)]
+'
+ ;;
+*) ARGV0=""
+ USAGE="command [ option ... ] [ file ... ]"
+ ;;
+esac
+
+usage()
+{
+ OPTIND=0
+ getopts $ARGV0 "$USAGE" OPT '-?'
+ exit 2
+}
+
+while getopts $ARGV0 "$USAGE" OPT
+do case $OPT in
+ *) usage ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+case $# in
+0) usage ;;
+esac
+
+cmd=$1
+while :
+do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ -*) cmd="$cmd $1" ;;
+ *) break ;;
+ esac
+done
+trap 'rm -f $tmp$suf' 0 1 2 3 15
+case $# in
+0) cat > $tmp
+ $cmd $tmp
+ ;;
+*) for file
+ do suf=${file##*/}
+ case $suf in
+ *.*) suf=.${suf#*.} ;;
+ *) suf= ;;
+ esac
+ cp $file $tmp$suf || exit 1
+ chmod u+rwx $tmp$suf || exit 1
+ $cmd $tmp$suf || exit 1
+ cat $tmp$suf
+ rm -f $tmp$suf
+ done
+ ;;
+esac
diff --git a/usr/src/contrib/ast/src/cmd/INIT/gdbm.c b/usr/src/contrib/ast/src/cmd/INIT/gdbm.c
new file mode 100644
index 0000000000..cc0a9f617a
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/gdbm.c
@@ -0,0 +1,37 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * small test for -lgdbm
+ */
+
+#define _hdr_gdbm_ndbm 1
+
+#if _hdr_gdbm_ndbm
+#include <gdbm/ndbm.h>
+#endif
+
+int
+main()
+{
+ DBM* dbm = 0;
+
+ dbm_close(dbm);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/gdbm1.c b/usr/src/contrib/ast/src/cmd/INIT/gdbm1.c
new file mode 100644
index 0000000000..6ad2071402
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/gdbm1.c
@@ -0,0 +1,37 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * small test for -lgdbm
+ */
+
+#define _hdr_gdbm_ndbm 1
+
+#if _hdr_gdbm_ndbm
+#include <gdbm-ndbm.h>
+#endif
+
+int
+main()
+{
+ DBM* dbm = 0;
+
+ dbm_close(dbm);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/gdbm2.c b/usr/src/contrib/ast/src/cmd/INIT/gdbm2.c
new file mode 100644
index 0000000000..1b9a48f596
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/gdbm2.c
@@ -0,0 +1,37 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * small test for -lgdbm
+ */
+
+#define _hdr_ndbm 1
+
+#if _hdr_ndbm
+#include <ndbm.h>
+#endif
+
+int
+main()
+{
+ DBM* dbm = 0;
+
+ dbm_close(dbm);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/hello.c b/usr/src/contrib/ast/src/cmd/INIT/hello.c
new file mode 100644
index 0000000000..2a8e2d17af
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/hello.c
@@ -0,0 +1,23 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#ifndef printf
+#include <stdio.h>
+#endif
+int main() { int new = 0; printf("hello world\n"); return new;}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/hosttype.tst b/usr/src/contrib/ast/src/cmd/INIT/hosttype.tst
new file mode 100644
index 0000000000..7a6458848a
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/hosttype.tst
@@ -0,0 +1,6 @@
+hp.pa hostname 9000/730 hp9000s700 HP-UX hostname A.09.01 A
+linux-aout.i386 hostname i586 i386 linux hostname 1.1.59 #1
+sgi.mips2 hostname.domain IP22 mips IRIX hostname 5.2 02282016
+osf.alpha hostname.domain alpha alpha OSF1 hostname.domain V3.2 62
+sun4 hostname.domain sun4 sparc SunOS hostname.domain 4.1.1 1 sun4c
+sol.sun4 hostname.domain sun4 sparc SunOS hostname.domain 5.4 Generic_101945-13
diff --git a/usr/src/contrib/ast/src/cmd/INIT/hurl.sh b/usr/src/contrib/ast/src/cmd/INIT/hurl.sh
new file mode 100644
index 0000000000..60e8a6bac5
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/hurl.sh
@@ -0,0 +1,207 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: copy http url data
+
+command=hurl
+agent="$command/2009-01-20 (AT&T Research)"
+authorize=
+verbose=0
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) ARGV0="-a $command"
+ USAGE=$'
+[-?
+@(#)$Id: hurl (AT&T Research) 2009-01-20 $
+]
+'$USAGE_LICENSE$'
+[+NAME?hurl - copy http url data]
+[+DESCRIPTION?\bhurl\b copies the data for the \bhttp\b \aurl\a operand
+ to the standard output. The \aurl\a must be of the form
+ \b[http://]]\b\ahost\a[\b:\b\aport\a]]\b/\b\apath\a. The default
+ \aport\a is \b80\b.]
+[+?\bhurl\b is a shell script that attempts to access the \aurl\a by
+ these methods:]{
+ [+/dev/tcp/\ahost\a\b/80\b?Supported by \bksh\b(1) and recent
+ \bbash\b(1).]
+ [+wget -nv -O - \aurl\a?]
+ [+lynx -source \aurl\a?]
+ [+curl -s -L -o - \aurl\a?]
+}
+[a:authorize?The url authorization user name and password, separated
+ by \b:\b (one colon character.)]:[user::password]
+[s:size?Terminate the data transmission after \abytes\a have been
+ transferred.]:[bytes]
+[v:verbose?Verbose trace.]
+
+url
+
+[+SEE ALSO?\bcurl\b(1), \blynx\b(1), \bwget\b(1)]
+'
+ ;;
+*) ARGV0=""
+ USAGE="a:v"
+ ;;
+esac
+
+usage()
+{
+ OPTIND=0
+ getopts $ARGV0 "$USAGE" OPT '-?'
+ exit 2
+}
+
+integer limit=0 total=0 block=8*1024
+
+while getopts $ARGV0 "$USAGE" OPT
+do case $OPT in
+ a) authorize=$OPTARG ;;
+ s) limit=$OPTARG ;;
+ v) verbose=1 ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+
+url=$1
+AUTHORIZE=
+
+exec 9<&0
+
+while :
+do test 0 != $verbose && echo "$command: url=$url" >&2
+ case $url in
+ *://*/*)prot=${url%%:*}
+ url=${url#*://}
+ ;;
+ *) prot=http
+ ;;
+ esac
+ host=$url
+ path=/${host#*/}
+ host=${host%%/*}
+ case $host in
+ *:+([0-9]))
+ port=${host##*:}
+ host=${host%:*}
+ ;;
+ *) port=80
+ ;;
+ esac
+ test 0 != $verbose && echo "$command: prot=$prot host=$host port=$port path=$path" >&2
+ case $prot in
+ http) if (eval "exec >" || exit 0) 2>/dev/null &&
+ eval "exec 8<> /dev/tcp/\$host/$port" 2>/dev/null
+ then test 0 != $verbose && echo "$command: using /dev/tcp/$host/$port" >&2
+ if ! echo "GET $path HTTP/1.0
+Host: $host
+User-Agent: $agent ${AUTHORIZE}
+ " >&8
+ then echo "$command: $host: write error"
+ exit 1
+ fi
+ {
+ if ! read prot code text
+ then echo "$command: $host: read error" >&2
+ exit 1
+ fi
+ code=${code%:*}
+ type=Basic
+ realm=access
+ test 0 != $verbose && echo "$command: prot=$prot code=$code $text" >&2
+ while :
+ do if ! read head data
+ then echo "$command: $host: read error" >&2
+ exit 1
+ fi
+ test 0 != $verbose && echo "$command: head=$head $data" >&2
+ case $head in
+ Location:)
+ case $code in
+ 30[123])url=$data
+ continue 2
+ ;;
+ esac
+ ;;
+ WWW-Authenticate:)
+ set -- $data
+ type=$1
+ shift
+ eval "$@"
+ realm=${realm%$'\r'}
+ ;;
+ ''|?) break
+ ;;
+ esac
+ done
+ case $code in
+ 200) if (( limit ))
+ then (( limit = (limit + block - 1) / block))
+ dd bs=$block count=$limit silent=1
+ else cat
+ fi
+ exit
+ ;;
+ 401) {
+ if [[ $AUTHORIZE || $type != Basic ]]
+ then print authorization failed
+ exit 1
+ fi
+ if [[ ! $authorize ]]
+ then if [[ ! -t 0 ]]
+ then print authorization failed
+ exit 1
+ fi
+ print -n "Enter user name for $realm: "
+ read -u9 user
+ print -n "Password: "
+ trap 'stty echo <&9' 0 1 2 3 15
+ stty -echo
+ read password
+ stty echo
+ print
+ trap - 0 1 2 3 15
+ authorize=$user:$password
+ fi
+ AUTHORIZE=$'\nAuthorization: '$type' '$(print -n -r -- "$authorize" | uuencode -h -x base64)$'\r'
+ } <&9 >&2
+ continue 2
+ ;;
+ *) echo "$0: $url: $code: $text" >&2
+ exit 1
+ ;;
+ esac
+ } <&8
+ elif wget ${authorize:+--http-user="${authorize%:*}"} ${password:+--http-passwd="${password##*:}"} -nv -O - $url 2>/dev/null
+ then test 0 != $verbose && echo "$command: using wget" >&2
+ exit
+ elif lynx ${authorize:+-auth "$authorize"} -source $url 2>/dev/null
+ then test 0 != $verbose && echo "$command: using wget" >&2
+ exit
+ elif curl ${authorize:+-u "$authorize"} -s -L -o - $url 2>/dev/null
+ then test 0 != $verbose && echo "$command: using curl" >&2
+ exit
+ else echo "$command: $url: { /dev/tcp/$host/$port wget curl } failed" >&2
+ exit 1
+ fi
+ ;;
+ *) echo "$command: $prot: protocol not supported" >&2
+ exit 1
+ ;;
+ esac
+done
diff --git a/usr/src/contrib/ast/src/cmd/INIT/iconv.c b/usr/src/contrib/ast/src/cmd/INIT/iconv.c
new file mode 100644
index 0000000000..64f2797d53
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/iconv.c
@@ -0,0 +1,29 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#ifndef iconv
+#include <iconv.h>
+#endif
+
+int
+main()
+{
+ iconv(0, 0, 0, 0, 0);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/iffe.sh b/usr/src/contrib/ast/src/cmd/INIT/iffe.sh
new file mode 100644
index 0000000000..22b4f09781
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/iffe.sh
@@ -0,0 +1,4676 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+# Glenn Fowler & Phong Vo
+# AT&T Research
+#
+# test if feature exists
+# this script is written to make it through all sh variants
+#
+# NOTE: .exe a.out suffix and [\\/] in path patterns for dos/nt
+
+case $-:$BASH_VERSION in
+*x*:[0123456789]*) : bash set -x is broken :; set +ex ;;
+esac
+
+command=iffe
+version=2012-07-17 # update in USAGE too #
+
+compile() # $cc ...
+{
+ "$@" 2>$tmp.err
+ _compile_status=$?
+ if test -s $tmp.err
+ then cat $tmp.err >&2
+ case $_compile_status in
+ [1-9]|[1-9][0-9]|1[01][0-9]|12[0-7])
+ if egrep -i -c 'terminated with signal|core dump|segmentation fault' $tmp.err >&$nullout
+ then _compile_status=139
+ fi
+ ;;
+ esac
+ fi
+ case $_compile_status in
+ ?|??|1[01]?|12[0-8]|25?)
+ ;;
+ *) echo "$command: $@" >&$stderr
+ cat $tmp.err >&$stderr
+ echo "$command: $1: core dump or fatal interruption -- results inconclusive" >&$stderr
+ exit $_compile_status
+ ;;
+ esac
+ return $_compile_status
+}
+
+is_hdr() # [ - ] [ file.c ] hdr
+{
+ case $1 in
+ -) _is_hdr_flag=-; shift ;;
+ *) _is_hdr_flag= ;;
+ esac
+ case $1 in
+ *.c) _is_hdr_file=$1; shift ;;
+ *) _is_hdr_file=$tmp.c ;;
+ esac
+ is hdr $1
+ compile $cc -c $_is_hdr_file <&$nullin >&$nullout 2>$tmp.e
+ _is_hdr_status=$?
+ case $_is_hdr_status in
+ 0) if test -s $tmp.e
+ then case `grep '#.*error' $tmp.e` in
+ ?*) _is_hdr_status=1 ;;
+ esac
+ fi
+ ;;
+ esac
+ case $_is_hdr_status in
+ 0) success $_is_hdr_flag
+ ;;
+ *) case $debug in
+ 3) cat $tmp.e >&$stderr ;;
+ esac
+ failure $_is_hdr_flag
+ ;;
+ esac
+ return $_is_hdr_status
+}
+
+pkg() # package
+{
+ case $1 in
+ '') pth=''
+ case $pth in
+ '') pth="/bin /usr/bin" ;;
+ *:*) pth=`echo "$pth" | sed 's/:/ /g'` ;;
+ esac
+ return
+ ;;
+ '<') shift
+ ;;
+ *) return
+ ;;
+ esac
+ case $1 in
+ X|X11*) i="openwin"
+ case $1 in
+ X) set X11 ;;
+ esac
+ case $1 in
+ X11) case $# in
+ 1) set $1 6 5 4 ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) i=
+ ;;
+ esac
+ pth="{ usr . - . contrib local $i - . share - . lib - $1"
+ i=$1
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ '>') shift; break ;;
+ esac
+ pth="$pth ${i}R$1 ${i}.$1"
+ done
+ pth="$pth . } $*"
+}
+
+is() # op name
+{
+ case $verbose in
+ 1) case $complete in
+ 1) failure ;;
+ esac
+ oo=$1
+ shift
+ case $1 in
+ ?*) yy=is
+ ii=$1
+ complete=1
+ case $oo in
+ cmd) mm="a command" ;;
+ dat) mm="a library data symbol" ;;
+ dfn) mm="a macro with extractable value" ;;
+ exp) mm="true" ;;
+ hdr) mm="a header" ;;
+ id) mm="an identifier" ;;
+ lcl) mm="a native header" ;;
+ key) mm="a reserved keyword" ;;
+ lib) mm="a library function" ;;
+ LIB) case $2 in
+ "") mm="a library" ;;
+ *) ii=$*; mm="a library group" ;;
+ esac
+ ;;
+ mac) mm="a macro" ;;
+ mem) mm="a member of $2" ;;
+ mth) mm="a math library symbol" ;;
+ nos) mm="a non-opaque struct" ;;
+ npt) mm="a symbol that needs a prototype" ;;
+ num) mm="a numeric constant or enum" ;;
+ nxt) mm="an include path for the native header" ;;
+ opt) mm="set in \$PACKAGE_OPTIONS" ;;
+ pth) mm="a file" ;;
+ run) yy="capture output of" mm= ;;
+ siz) mm="a type with known size" ;;
+ sym) mm="a typed variable" ;;
+ sys) mm="a system header" ;;
+ typ) mm="a type or typedef" ;;
+ val) yy="determine" mm="value" ;;
+ *) yy= mm= ;;
+ esac
+ case $ii in
+ [abcdefghijklmnopqrstuvwxyz]*[abcdefghijklmnopqrstuvwxyz]'{') ii="$ii ... }end" ;;
+ esac
+ $show "$command: test:" $yy $ii $mm "...$SHOW" >&$stderr
+ complete=1
+ ;;
+ esac
+ ;;
+ esac
+}
+
+success()
+{
+ case $1 in
+ -) shift
+ ;;
+ *) case $result in
+ UNKNOWN) result=SUCCESS ;;
+ esac
+ case $1 in
+ +) return ;;
+ esac
+ ;;
+ esac
+ case $complete:$verbose in
+ 1:1) case $suspended in
+ 1) suspended=0
+ $show "$command: test:" $yy $ii $mm "...$SHOW" >&$stderr
+ ;;
+ esac
+ complete=0
+ case $# in
+ 0) mm="yes" ;;
+ *) mm="'$*'" ;;
+ esac
+ case $debug in
+ 0) echo " $mm" >&$stderr ;;
+ *) echo "$command: ... $mm" >&$stderr ;;
+ esac
+ ;;
+ esac
+}
+
+failure()
+{
+ case $1 in
+ -) shift ;;
+ *) result=FAILURE
+ case $1 in
+ +) return ;;
+ esac
+ ;;
+ esac
+ case $complete:$verbose in
+ 1:1) case $suspended in
+ 1) suspended=0
+ $show "$command: test:" $yy $ii $mm "...$SHOW" >&$stderr
+ ;;
+ esac
+ complete=0
+ case $group in
+ '') case $# in
+ 0) mm="no" ;;
+ *) mm=$* ;;
+ esac
+ ;;
+ *) mm=
+ ;;
+ esac
+ case $debug in
+ 0) echo " $mm" >&$stderr ;;
+ *) echo "$command: ... $mm" >&$stderr ;;
+ esac
+ ;;
+ esac
+}
+
+# report
+#
+# - ignore global status
+# -0 normal sense
+# -1 inverted sense if ! def
+# status test status 0:success *:failure
+# success success comment
+# failure failure comment
+# default default setting comment
+#
+# globals
+#
+# $not invert test sense
+# $M test variable
+# $m test macro
+# $v default macro
+
+report() # [-] [-0] [-1] status value success failure default
+{
+ case $1 in
+ -) _report_ignore=$1
+ shift
+ ;;
+ *) _report_ignore=
+ ;;
+ esac
+ _report_not=$not
+ case $1 in
+ -0) shift
+ ;;
+ -1) shift
+ case $def in
+ ''|-) case $_report_not in
+ 1) _report_not= ;;
+ *) _report_not=1 ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ _report_status=$1
+ case $_report_ignore:$_report_status in
+ -:*) ;;
+ *:0) success $_report_ignore
+ ;;
+ *) failure $_report_ignore
+ case $group in
+ ?*) return ;;
+ esac
+ ;;
+ esac
+ _report_value=$2
+ case $_report_not in
+ 1) case $_report_status in
+ 0) _report_status=1 ;;
+ *) _report_status=0 ;;
+ esac
+ _report_success=$4
+ _report_failure=$3
+ ;;
+ *) _report_success=$3
+ _report_failure=$4
+ ;;
+ esac
+ _report_default=$5
+ case $_report_status in
+ 0) case $M in
+ *-*) ;;
+ *) usr="$usr$nl#define $m $_report_value"
+ case $_report_success in
+ ''|-) ;;
+ *) case $define in
+ 1) echo "#define $m $_report_value /* $_report_success */" ;;
+ n) echo "$m=$_report_value"
+ esac
+ ;;
+ esac
+ eval $m=\'$_report_value\'
+ ;;
+ esac
+ ;;
+ *) case $M in
+ *-*) ;;
+ *) case $_report_failure in
+ ''|-) ;;
+ *) case $define$all$config$undef in
+ 1?1?|1??1)echo "#undef $m /* $_report_failure */" ;;
+ 11??) echo "#define $m 0 /* $_report_failure */" ;;
+ n1?1) echo "$m=" ;;
+ n1??) echo "$m=0" ;;
+ esac
+ ;;
+ esac
+ case $_report_default in
+ ''|-) ;;
+ *) case $define$set in
+ 1?*) echo "#define $v $set /* $_report_default */" ;;
+ n?*) echo "$v=$set" ;;
+ esac
+ ;;
+ esac
+ eval $m=0
+ ;;
+ esac
+ ;;
+ esac
+}
+
+noisy()
+{
+ case $complete:$verbose in
+ 1:1) suspended=1
+ echo >&$stderr
+ ;;
+ esac
+}
+
+here_broken=0
+
+literal() # line that echo might process
+{
+ if cat <<!
+$*
+!
+ then : old here doc botch not present
+ else case $here_broken in
+ 0) here_broken=1
+ echo "$command: your shell botches here documents; this was fixed back in the 80's" >&$stderr
+ ;;
+ esac
+ sh -c "cat <<!
+$*
+!
+"
+ fi
+}
+
+copy() # "output-file" "data-that-must-not-be-processed-by-echo"
+{
+ case $1 in
+ -) case $shell in
+ ksh) print -r - "$2"
+ ;;
+ *) if cat <<!
+$2
+!
+ then : ancient here doc botch not present
+ else case $here_broken in
+ 0) here_broken=1
+ echo "$command: your shell botches here documents; this was fixed back in the 80's" >&$stderr
+ ;;
+ esac
+ sh -c "cat <<!
+$2
+!
+"
+ fi
+ ;;
+ esac
+ ;;
+ *) case $shell in
+ ksh) print -r - "$2" > "$1"
+ ;;
+ *) if cat > "$1" <<!
+$2
+!
+ then : ancient here doc botch not present
+ else case $here_broken in
+ 0) here_broken=1
+ echo "$command: your shell botches here documents; this was fixed back in the 80's" >&$stderr
+ ;;
+ esac
+ sh -c "cat > \"$1\" <<!
+$2
+!
+"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# verify that cc is a C compiler
+
+checkcc()
+{
+ # check for local package root directories
+
+ case $PACKAGE_PATH in
+ ?*) for i in `echo $PACKAGE_PATH | sed 's,:, ,g'`
+ do if test -d $i/include
+ then cc="$cc -I$i/include"
+ occ="$occ -I$i/include"
+ fi
+ if test -d $i/lib
+ then cc="$cc -L$i/lib"
+ occ="$occ -L$i/lib"
+ for y in $libpaths
+ do eval $y=\"\$$y:\$i/lib\$${y}_default\"
+ eval export $y
+ done
+ fi
+ done
+ ;;
+ esac
+ echo "int i = 1;" > $tmp.c
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then echo "(;" > $tmp.c
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then cctest="should not compile '(;'"
+ fi
+ else cctest="should compile 'int i = 1;'"
+ fi
+ case $cctest in
+ "") cctest=0
+ ;;
+ *) echo "$command: $cc: not a C compiler: $cctest" >&$stderr
+ exit 1
+ ;;
+ esac
+}
+
+checkread()
+{
+ case $cctest in
+ "") checkcc ;;
+ esac
+ case $posix_read in
+ -no) ;;
+ *) posix_read=`(read -r _checkread_line; echo $_checkread_line) 2>/dev/null <<!
+a z
+!
+`
+ ;;
+ esac
+ case $posix_read in
+ "a z") posix_read=1
+ ;;
+ *) copy ${tmp}r.c "
+ extern int read();
+ extern int write();
+ int main()
+ {
+ char c;
+ char r;
+ int k;
+ char s[32];
+ k = 0;
+ while (read(0, &c, 1) == 1)
+ {
+ if (k >= 0)
+ {
+ if (c == ' ' || c == '\\t')
+ {
+ if (k < sizeof(s))
+ s[k++] = c;
+ continue;
+ }
+ if (k > 1 && c != '#' && c != '\\n' && c != '\\r')
+ write(1, s + 1, k - 1);
+ k = -1;
+ }
+ if (c == '\\r')
+ {
+ r = c;
+ if (read(0, &c, 1) == 1 && c != '\\n')
+ write(1, &r, 1);
+ }
+ write(1, &c, 1);
+ if (c == '\\n')
+ return 0;
+ }
+ return 1;
+ }"
+ if compile $cc -o ${tmp}r.exe ${tmp}r.c >&$nullout
+ then posix_read=${tmp}r.exe
+ else echo "$command: cannot compile read -r workaround" >&$stderr
+ exit 1
+ fi
+ ;;
+ esac
+}
+
+execute()
+{
+ case $verbose in
+ 0) noteout=$nullout ;;
+ *) noteout=$stderr ;;
+ esac
+ if test "" != "$cross"
+ then crossexec $cross "$@" 9>&$noteout
+ _execute_=$?
+ elif test -d /NextDeveloper
+ then "$@" <&$nullin >&$nullout 9>&$noteout
+ _execute_=$?
+ "$@" <&$nullin | cat
+ else "$@" 9>&$noteout
+ _execute_=$?
+ fi
+ return $_execute_
+}
+
+exclude()
+{
+ case $excludes in
+ '') return 0 ;;
+ esac
+ for _exclude_var
+ do eval _exclude_old=\$$_exclude_var
+ case $_exclude_old in
+ *" -I"*);;
+ *) continue ;;
+ esac
+ _exclude_new=
+ _exclude_sep=
+ for _exclude_arg in $_exclude_old
+ do _exclude_skip=
+ for _exclude_dir in $excludes
+ do case $_exclude_arg in
+ -I$_exclude_dir|-I*/$_exclude_dir)
+ _exclude_skip=1
+ break;
+ ;;
+ esac
+ done
+ case $_exclude_skip in
+ '') _exclude_new="$_exclude_new$_exclude_sep$_exclude_arg"
+ _exclude_sep=" "
+ ;;
+ esac
+ done
+ eval $_exclude_var=\$_exclude_new
+ case $debug in
+ 0) ;;
+ *) echo $command: exclude $_exclude_var: "$_exclude_old => $_exclude_new" >&$stderr
+ ;;
+ esac
+ done
+}
+
+all=0
+apis=
+binding="-dy -dn -Bdynamic -Bstatic -Wl,-ashared -Wl,-aarchive -call_shared -non_shared '' -static"
+complete=0
+config=0
+defhdr=
+define=1
+explicit=0
+iff=
+usr=
+cross=
+debug=0
+deflib=
+dir=FEATURE
+excludes=
+executable="test -x"
+exists="test -e"
+gothdr=
+gotlib=
+idno=
+idyes=
+ifs=${IFS-'
+ '}
+in=
+includes=
+intrinsic=
+libpaths="LD_LIBRARY_PATH LD_LIBRARYN32_PATH LD_LIBRARY64_PATH LIBPATH SHLIB_PATH"
+ LD_LIBRARY_PATH_default=:/lib:/usr/lib
+ LD_LIBRARYN32_PATH_default=:/lib32:/usr/lib32
+ LD_LIBRARY64_PATH_default=:/lib64:/usr/lib64
+ LIBPATH_default=:/lib:/usr/lib
+ SHLIB_PATH_default=:/shlib:/usr/shlib:/lib:/usr/lib
+nl="
+"
+optimize=1
+occ=cc
+one=
+out=
+posix_read=-check
+case `(set -f && set x * && echo $# && set +f) 2>/dev/null` in
+2) posix_noglob="set -f" posix_glob="set +f" ;;
+*) case `(set -F && set x * && echo $# && set +F) 2>/dev/null` in
+ 2) posix_noglob="set -F" posix_glob="set +F" ;;
+ *) posix_noglob=":" posix_glob=":" ;;
+ esac
+ ;;
+esac
+protoflags=
+puthdr=
+putlib=
+pragma=
+case $RANDOM in
+$RANDOM)shell=bsh
+ ($executable .) 2>/dev/null || executable='test -r'
+ ($exists .) 2>/dev/null || exists='test -r'
+ ;;
+*) case $BASH_VERSION in
+ ?*) shell=bash ;;
+ *) shell=ksh ;;
+ esac
+ ;;
+esac
+reallystatic=
+reallystatictest=
+regress=
+static=.
+statictest=
+case $COTEMP in
+"") case $HOSTNAME in
+ ""|?|??|???|????|????)
+ tmp=${HOSTNAME}
+ ;;
+ *) case $shell in
+ bsh) eval `echo $HOSTNAME | sed 's/\\(....\\).*/tmp=\\1/'` ;;
+ *) eval 'tmp=${HOSTNAME%${HOSTNAME#????}}' ;;
+ esac
+ ;;
+ esac
+ tmp=${tmp}$$
+ ;;
+*) tmp=x${COTEMP}
+ ;;
+esac
+COTEMP=${tmp}
+export COTEMP
+case $tmp in
+./*) ;;
+??????????*)
+ case $shell in
+ bsh) eval `echo $tmp | sed 's/\\(.........\\).*/tmp=\\1/'` ;;
+ *) eval 'tmp=${tmp%${tmp#?????????}}' ;;
+ esac
+ ;;
+?????????)
+ ;;
+????????)
+ tmp=F$tmp
+ ;;
+esac
+case $tmp in
+./*) ;;
+*) tmp=./$tmp ;;
+esac
+undef=0
+verbose=0
+vers=
+
+# options -- `-' for output to stdout otherwise usage
+
+case $1 in
+-) out=-; shift ;;
+esac
+set=
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) USAGE=$'
+[-?
+@(#)$Id: iffe (AT&T Research) 2012-07-17 $
+]
+'$USAGE_LICENSE$'
+[+NAME?iffe - C compilation environment feature probe]
+[+DESCRIPTION?\biffe\b is a command interpreter that probes the C
+ compilation environment for features. A feature is any file, option
+ or symbol that controls or is controlled by the C compiler. \biffe\b
+ tests features by generating and compiling C programs and observing
+ the behavior of the C compiler and generated programs.]
+[+?\biffe\b statements are line oriented. Statements may appear in the
+ operand list with the \b:\b operand or \bnewline\b as the line
+ delimiter. The standard input is read if there are no command
+ line statements or if \afile\a\b.iffe\b is omitted.]
+[+?Though similar in concept to \bautoconf\b(1) and \bconfig\b(1), there
+ are fundamental differences. The latter tend to generate global
+ headers accessed by all components in a package, whereas \biffe\b is
+ aimed at localized, self contained feature testing.]
+[+?Output is generated in \bFEATURE/\b\atest\a by default, where \atest\a is
+ the base name of \afile\a\b.iffe\b or the \biffe\b \brun\b
+ file operand. Output is first generated in a temporary file; the
+ output file is updated if it does not exist or if the temporary file
+ is different. If the first operand is \b-\b then the output is written
+ to the standard output and no update checks are done.]
+[+?Files with suffixes \b.iffe\b and \b.iff\b are assumed to contain
+ \biffe\b statements.]
+[a:all?Define failed test macros \b0\b. By default only successful test macros
+ are defined \b1\b.]
+[c:cc?Sets the C compiler name and flags to be used in the feature
+ tests.]:[C-compiler-name [C-compiler-flags ...]]]
+[C:config?Generate \bconfig\b(1) style \aHAVE_\a* macro names. This implies
+ \b--undef\b. Since \bconfig\b(1) has inconsistent naming conventions,
+ the \bexp\b op may be needed to translate from the (consistent)
+ \biffe\b names. Unless otherwise noted a \bconfig\b macro name
+ is the \biffe\b macro name prefixed with \bHAVE\b and converted to
+ upper case. \b--config\b is set by default if the command arguments
+ contain a \brun\b op on an input file with the base name \bconfig\b.]
+[d:debug?Sets the debug level. Level 0 inhibits most
+ error messages, level 1 shows compiler messages, and
+ level 2 traces internal \biffe\b \bsh\b(1) actions and does
+ not remove core dumps on exit.]#[level]
+[D:define?Successful test macro definitions are emitted. This is the default.]
+[E:explicit?Disable implicit test output.]
+[F:features?Sets the feature test header to \ahdr\a. This header typically
+ defines *_SOURCE feature test macros.]:[hdr:=NONE]
+[i:input?Sets the input file name to \afile\a, which
+ must contain \biffe\b statements.]:[file]
+[I:include?Adds \b-I\b\adir\a to the C compiler flags.]:[dir]
+[L:library?Adds \b-L\b\adir\a to the C compiler flags.]:[dir]
+[n:name-value?Output \aname\a=\avalue\a assignments only.]
+[N!:optimize?\b--nooptimize\b disables compiler optimization options.]
+[o:output?Sets the output file name to \afile\a.]:[file]
+[O:stdio?Sets the standard io header to \ahdr\a.]:[hdr:=stdio.h]
+[e:package?Sets the \bproto\b(1) package name to \aname\a.]:[name]
+[p:prototyped?Emits \b#pragma prototyped\b at the top of the
+ output file. See \bproto\b(1).]
+[P:pragma?Emits \b#pragma\b \atext\a at the top of the output file.]:[text]
+[r:regress?Massage output for regression testing.]
+[R:root?alternate root.]:[dir]
+[s:shell?Sets the internal shell name to \aname\a. Used for debugging
+ Bourne shell compatibility (otherwise \biffe\b uses \aksh\a constructs
+ if available). The supported names are \bksh\b, \bbsh\b, \bbash\b, and
+ \bosh\b. \bosh\b forces the \bread -r\b compatibility read command to
+ be compiled and used instead of \bread -r\b. The default is determined
+ by probing the shell at startup.]:[name]
+[S:static?Sets the C compiler flags that force static linking. If not set
+ then \biffe\b probes the compiler to determine the flags. \biffe\b
+ must use static linking (no dlls) because on some systems missing
+ library symbols are only detected when referenced at runtime from
+ dynamically linked executables.]:[flags]
+[u:undef?\b#undef\b failed test macros. By default only successful test macros
+ are defined \b1\b.]
+[v:verbose?Produce a message line on the standard error for each test as
+ it is performed.]
+[x:cross?Some tests compile an executable (\ba.out\b) and then run it.
+ If the C compiler is a cross compiler and the executable format is
+ incompatible with the execution environment then the generated
+ executables must be run in a different environment, possibly on
+ another host. \acrosstype\a is the HOSTTYPE for generated executables
+ (the \bpackage\b(1) command generates a consistent HOSTTYPE namespace).
+ Generated executables are run via \bcrossexec\b(1) with \acrosstype\a
+ as the first argument. \bcrossexec\b supports remote execution for
+ cross-compiled executables. See \bcrossexec\b(1) for
+ details.]:[crosstype]
+[X:exclude?Removes \b-I\b\adir\a and \b-I\b*/\adir\a C compiler flags.]:[dir]
+
+[ - ] [ file.iffe | statement [ : statement ... ] ]
+
+[+SYNTAX?\biffe\b input consists of a sequence of statement lines. Statements
+ that span more than one line contain \abegin\a\b{\b as the last
+ operand (where \abegin\a is command specific) and zero
+ or more data lines terminated by a line containing
+ \b}end\b as the first operand. The statement syntax is:
+ [\aname\a \b=\b]] [\b!\b]] \atest\a[,\atest\a...]] [\b-\b]]
+ [\aarg\a[,\aarg\a...]]]] [\aprereq\a ...]]
+ [\abegin\a{ ... |\bend\b ...]] [= [\adefault\a]]]].
+ \atest\as and \aarg\as may be combined, separated by commas, to perform
+ a set of tests on a set of arguments. \aname\a \b=\b before \atest\a
+ overrides the default test variable and macro name, and \b-\b after
+ \atest\a performs the test but does not define the test variable and
+ macro values. \b!\b before \atest\a inverts the test sense for \bif\b,
+ \belif\b, and \byes{\b and \bno{\b blocks.]
+[+?\aprereq\as are used when applying the features tests and may be
+ combinations of:]{
+ [+compiler options?\b-D\b*, \b-L\b*, etc.]
+ [+library references?\b-l\b*, *\b.a\b, etc. \b_LIB_\b\aname\a
+ is defined to be 1 if \b-l\b\aname\a is a library.]
+ [+header references?*\b.h\b. \a_dir_name\a is defined to be 1
+ if \adir/name\a\b.h\b is a header, or if \adir\a is
+ omitted, \b_hdr_\b\aname\a is defined to be 1 if
+ \aname\a\b.h\b is a header.]
+ [+-?Prereq grouping mark; prereqs before the first \b-\b are
+ passed to all feature tests. Subsequent groups
+ are attempted in left-to-right order until the first
+ successful group is found.]
+ }
+[+?\abegin\a\b{\b ... \b}end\b delimit multiline code blocks that override
+ or augment the default code provided by \biffe\b. User supplied code
+ blocks should be compatible with the K&R, ANSI, and C++ C language
+ dialects for maximal portability. Test code may call the function
+ \bNOTE("...")\b to emit short text in \b--verbose\b output; only one
+ \bNOTE()\b should be called per test for readability. In addition to
+ all macro definitions generated by previous tests, all generated
+ code contains the following at the top to hide dialect differences:]{
+ [+ ?#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)]
+ [+ ?#define _STD_ 1]
+ [+ ?#define _ARG_(x) x]
+ [+ ?#define _VOID_ void]
+ [+ ?#else]
+ [+ ?#define _STD_ 0]
+ [+ ?#define _ARG_(x) ()]
+ [+ ?#define _VOID_ char]
+ [+ ?#endif]
+ [+ ?#if defined(__cplusplus)]
+ [+ ?#define _BEGIN_EXTERNS_ extern "C" {]
+ [+ ?#define _END_EXTERNS_ }]
+ [+ ?#else]
+ [+ ?#define _BEGIN_EXTERNS_]
+ [+ ?#define _END_EXTERNS_]
+ [+ ?#endif]
+ [+ ?#define _NIL_(x) ((x)0)]
+ [+ ?#include <stdio.h>]
+ }
+[+?= \adefault\a may be specified for the \bkey\b, \blib\b, \bmac\b, \bmth\b
+ and \btyp\b tests. If the test fails for \aarg\a then
+ \b#define\b \aarg\a \adefault\a is emitted. \bkey\b accepts multiple
+ \b= \b\adefault\a values; the first valid one is used.]
+[+?Each test statement generates a portion of a C language header that contains
+ macro defintions, comments, and other text corresponding to the feature
+ tests. \b#ifndef _def_\b\aname\a\b_\b\adirectory\a ...
+ \b#endif\b guards the generated header from multiple \b#include\bs,
+ where \aname\a is determined by either the \brun\b statement input file
+ name if any, or the first \atest\a in the first statement, and \adirectory\a
+ is the basename component of either the \brun\b statement file, if any,
+ or the current working directory. The output file name is determined
+ in this order:]{
+ [+-?If the first command line operand is \b-\b then the output
+ is written to the standard output.]
+ [+--output=\afile\a?Output is \afile\a.]
+ [+set out \afile\a?Output is \afile\a.]
+ [+[run]] [\adirectory\a/]]\abase\a[\a.suffix\a]]?Output is
+ \bFEATURE/\b\abase\a.]
+ }
+[+?Generated \biffe\b headers are often referenced in C source as:
+ \b#include "FEATURE/\b\afile\a". The \bnmake\b(1) base rules contain
+ metarules for generating \bFEATURE/\b\afile\a from
+ \bfeatures/\b\afile\a[\asuffix\a]], where \asuffix\a may be omitted,
+ \b.c\b, or \b.sh\b (see the \brun\b test below). Because
+ \b#include\b prerequisites are automatically detected, \bnmake\b(1)
+ ensures that all prerequisite \biffe\b headers are generated before
+ compilation. Note that the directories are deliberately named
+ \bFEATURE\b and \bfeatures\b to keep case-ignorant file systems
+ happy.]
+[+?The feature tests are:]{
+ [+# \acomment\a?Comment line - ignored.]
+ [+api \aname\a \aYYYYMMDD\a \asymbol ...\a?Emit api compatibility tests
+ for \aname\a and \b#define\b \asymbol\a \asymbol\a_\aYYYYMMDD\a
+ when \aNAME\a_API is >= \aYYYYMMDD\a (\aNAME\a is \aname\a
+ converted to upper case). If \aNAME\a_API is not defined
+ then \asymbol\a maps to the newest \aYYYYMMDD\a for \aname\a.]
+ [+define \aname\a [ (\aarg,...\a) ]] [ \avalue\a ]]?Emit a macro
+ \b#define\b for \aname\a if it is not already defined. The
+ definition is passed to subsequent tests.]
+ [+extern \aname\a \atype\a [ (\aarg,...\a) | [\adimension\a]] ]]?Emit
+ an \bextern\b prototype for \aname\a if one is not already
+ defined. The prototype is passed to subsequent tests.]
+ [+header \aheader\a?Emit \b#include <\b\aheader\a\b>\b if \aheader\a
+ exists. The \b#include\b is passed to subsequent tests.]
+ [+print \atext\a?Copy \atext\a to the output file. \atext\a is passed
+ to subsequent tests.]
+ [+reference \aheader\a?If \aheader\a exists then add \b#include\b
+ \aheader\a to subsequent tests.]
+ [+ver \aname\a \aYYYYMMDD\a?\b#define\b \aNAME\a_VERSION \aYYYYMMDD\a
+ (\aNAME\a is \aname\a converted to upper case).]
+ [+cmd \aname\a?Defines \b_cmd_\b\aname\a if \aname\a is an executable
+ in one of the standard system directories (\b/bin, /etc,
+ /usr/bin, /usr/etc, /usr/ucb\b).
+ \b_\b\adirectory\a\b_\b\aname\a is defined for \adirectory\a
+ in which \aname\a is found (with \b/\b translated to \b_\b).]
+ [+dat \aname\a?Defines \b_dat_\b\aname\a if \aname\a is a data symbol
+ in the default libraries.]
+ [+def \aname\a?Equivalent to \bcmd,dat,hdr,key,lib,mth,sys,typ\b
+ \aname\a.]
+ [+dfn \aname\a?If \aname\a is a macro in the candidate headers then
+ a \b#define\b \aname\a \avalue\a statment is output for the
+ \avalue\a defined in the headers. The definition is \b#ifndef\b
+ guarded.]
+ [+exp \aname\a \aexpression\a?If \aexpression\a is a \"...\" string
+ then \aname\a is defined to be the string, else if the
+ \bexpr\b(1) evaluation of \aexpression\a is not 0 then \aname\a
+ is defined to be 1, otherwise \aname\a is defined to be 0.
+ Identifiers in \aexpression\a may be previously defined names
+ from other \biffe\b tests; undefined names evaluate to 0.
+ If \aname\a was defined in a previous successful test then
+ the current and subsequent \bexp\b test on \aname\a are
+ skipped. If \aname\a is \b-\b then the \aexpression\a is
+ simply evaluated.]
+ [+hdr \aname\a?Defines \b_hdr_\b\aname\a if the header
+ \b<\b\aname\a\b.h>\b exists. The \b--config\b macro name is
+ \bHAVE_\b\aNAME\a\b_H\b.]
+ [+if \astatement\a ... | \belif\b \astatement\a ... | \belse\b | \bendif\b?
+ Nested if-else test control.]
+ [+iff \aname\a?The generated header \b#ifndef-#endif\b macro guard is
+ \b_\b\aname\a\b_H\b.]
+ [+inc \afile\a [ re ]]?Read #define macro names from \afile\a
+ and arrange for those names to evaluate to 1 in \bexp\b
+ expressions. If \are\a is specified then macros not matching
+ \are\a are ignored.]
+ [+key \aname\a?Defines \b_key_\b\aname\a if \aname\a is a reserved
+ word (keyword).]
+ [+lcl \aname\a?Generates a \b#include\b statement for the native version
+ of the header \b<\b\aname\a\b.h>\b if it exists. Defines
+ \b_lcl_\b\aname\a on success. The \b--config\b macro name is
+ \bHAVE_\b\aNAME\a\b_H\b. The default \are\a is \b^HAVE_\b
+ for \b--config\b and \b^_\b otherwise.]
+ [+lib \aname\a?Defines \b_lib_\b\aname\a if \aname\a is an external
+ symbol in the default libraries.]
+ [+mac \aname\a?Defines \b_mac_\b\aname\a if \aname\a is a macro.]
+ [+mem \astruct.member\a?Defines \b_mem_\b\amember\a\b_\b\astruct\a
+ if \amember\a is a member of the structure \astruct\a.]
+ [+mth \aname\a?Defines \b_mth_\b\aname\a if \aname\a is an external
+ symbol in the math library.]
+ [+nop \aname\a?If this is the first test then \aname\a may be used
+ to name the output file and/or the output header guard macro.
+ Otherwise this test is ignored.]
+ [+npt \aname\a?Defines \b_npt_\b\aname\a if the \aname\a symbol
+ requires a prototype. The \b--config\b macro name is
+ \bHAVE_\aNAME\a\b_DECL\b with the opposite sense.]
+ [+num \aname\a?Defines \b_num_\b\aname\a if \aname\a is a numeric
+ constant \aenum\a or \amacro\a.]
+ [+nxt \aname\a?Defines a string macro \b_nxt_\b\aname\a suitable for
+ a \b#include\b statement to include the next (on the include
+ path) or native version of the header \b<\b\aname\a\b.h>\b
+ if it exists. Also defines the \"...\" form
+ \b_nxt_\b\aname\a\b_str\b. The \b--config\b macro name is
+ \bHAVE_\b\aNAME\a\b_NEXT\b.]
+ [+one \aheader\a ...?Generates a \b#include\b statement for the first
+ header found in the \aheader\a list.]
+ [+opt \aname\a?Defines \b_opt_\b\aname\a if \aname\a is a space-separated
+ token in the global environment variable \bPACKAGE_OPTIONS\b.]
+ [+pth \afile\a [ \adir\a ... | { \ag1\a - ... - \agn\a } | < \apkg\a [\aver\a ...]] > ]]?Defines
+ \b_pth_\b\afile\a, with embedded \b/\b chars translated to
+ \b_\b, to the path of the first instance of \afile\a in the
+ \adir\a directories. \b{\b ... \b}\b forms a directory list
+ from the cross-product of \b-\b separated directory groups
+ \ag1\a ... \agn\a. < ... > forms a directory list for the
+ package \apkg\a with optional versions. If no operands are
+ specified then the default PATH directories are used. The
+ \b--config\b macro name is \aNAME\a\b_PATH\b.]
+ [+run \afile\a?Runs the tests in \afile\a based on the \afile\a
+ suffix:]{
+ [+.c?\afile\a is compiled and executed and the output is copied
+ to the \biffe\b output file. Macros and headers supplied
+ to \bbegin{\b ... \b}end\b are also supplied to
+ \afile\a.]
+ [+.sh?\afile\a is executed as a shell script and the output is
+ copied to the \biffe\b output file.]
+ [+.iffe \bor no suffix?\afile\a contains \biffe\b
+ statements.]
+ }
+ [+set \aoption value\a?Sets option values. The options are described
+ above.]
+ [+siz \aname\a?Defines \b_siz_\b\aname\a to be \bsizeof\b(\aname\a) if
+ \aname\a is a type in any of \b<sys/types.h>, <times.h>,
+ <stddef.h>, <stdlib.h>\b. Any \b.\b characters in \aname\a are
+ translated to space before testing and are translated to \b_\b
+ in the output macro name.]
+ [+sym \aname\a?Defines \b_ary_\b\aname\a if \aname\a is an array,
+ \b_fun_\b\aname\a if \aname\a is a function pointer,
+ \b_ptr_\b\aname\a if \aname\a is a pointer, or
+ \b_reg_\b\aname\a if \aname\a is a scalar. In most cases
+ \aname\a is part of a macro expansion.]
+ [+sys \aname\a?Defines \b_sys_\b\aname\a if the header
+ \b<sys/\b\aname\a\b.h>\b exists. The \b--config\b macro name is
+ \bHAVE_SYS_\b\aNAME\a\b_H\b.]
+ [+tst \aname\a?A user defined test on name. A source block must be
+ supplied. Defines \b_\b\aname\a on success. \btst - ...\b is
+ treated as \btst - - ...\b.]
+ [+typ \aname\a?Defines \b_typ_\b\aname\a if \aname\a is a type in any
+ of \b<sys/types.h>, <times.h>, <stddef.h>, <stdlib.h>\b. Any
+ \b.\b characters in \aname\a are translated to space before
+ testing and are translated to \b_\b in the output macro name.]
+ [+val \aname\a?The output of \becho\b \aname\a is written to the
+ output file.]
+ [+var \aname\a?A user defined test on name. A source block must be
+ supplied. Sets the \bexp\b variable \b_\b\aname\a on success
+ but does not define a macro.]
+ [+(\aexpression\a)?Equivalent to \bexp -\b \aexpression\a.]
+}
+[+?Code block names may be prefixed by \bno\b to invert the test sense. The
+ block names are:]{
+ [+cat?The block is copied to the output file.]
+ [+compile?The block is compiled (\bcc -c\b).]
+ [+cross?The block is executed as a shell script using \bcrossexec\b(1)
+ if \b--cross\b is on, or on the local host otherwise, and the
+ output is copied to the output file. Test macros are not
+ exported to the script.]
+ [+execute?The block is compiled, linked, and executed. \b0\b exit
+ status means success.]
+ [+fail?If the test fails then the block text is evaluated by
+ \bsh\b(1).]
+ [+link?The block is compiled and linked (\bcc -o\b).]
+ [+macro?The block is preprocessed (\bcc -E\b) and lines containing
+ text bracketed by \b<<"\b ... \b">>\b (\aless-than less-than
+ double-quote ... double-quote greater-than greater-than\a)
+ are copied to the output file with the brackets omitted.]
+ [+no?If the test fails then the block text is copied to the
+ output file. Deprecated: use { \bif\b \belif\b \belse\b
+ \bendif\b } with unnamed \b{\b ... \b}\b blocks.]
+ [+note?If the test succeeds then the block is copied to the output
+ as a \b/*\b ... \b*/\b comment.]
+ [+output?The block is compiled, linked, and executed, and the output
+ is copied to the output file.]
+ [+pass?If the test succeeds then the block text is evaluated by
+ \bsh\b(1).]
+ [+preprocess?The block is preprocessed (\bcc -E\b).]
+ [+run?The block is executed as a shell script and the output is
+ copied to the output file. Succesful test macros are also
+ defined as shell variables with value \b1\b and are available
+ within the block. Likewise, failed test macros are defined
+ as shell variables with value \b0\b.]
+ [+status?The block is compiled, linked, and executed, and the exit
+ status is the test outcome, 0 for \afailure\a, the value
+ otherwise.]
+ [+yes?If the test succeeds then the block text is copied to the output
+ file. \byes{\b ... \b}end\b is equivalent to the unnamed block
+ \b{\b ... \b}\b. Deprecated: use { \bif\b \belif\b \belse\b
+ \bendif\b } with unnamed \b{\b ... \b}\b blocks.]
+}
+[+SEE ALSO?\bautoconf\b(1), \bconfig\b(1), \bgetconf\b(1), \bcrossexec\b(1),
+ \bnmake\b(1), \bpackage\b(1), \bproto\b(1), \bsh\b(1)]
+'
+ while getopts -a "$command" "$USAGE" OPT
+ do case $OPT in
+ a) set="$set set all :" ;;
+ c) set="$set set cc $OPTARG :" ;;
+ C) set="$set set config :" ;;
+ d) set="$set set debug $OPTARG :" ;;
+ D) set="$set set define :" ;;
+ E) set="$set set explicit :" ;;
+ F) set="$set set features $OPTARG :" ;;
+ i) set="$set set input $OPTARG :" ;;
+ I) set="$set set include $OPTARG :" ;;
+ L) set="$set set library $OPTARG :" ;;
+ n) set="$set set namval $OPTARG :" ;;
+ N) set="$set set nooptimize $OPTARG :" ;;
+ o) set="$set set output $OPTARG :" ;;
+ e) set="$set set package $OPTARG :" ;;
+ p) set="$set set prototyped :" ;;
+ P) set="$set set pragma $OPTARG :" ;;
+ r) set="$set set regress :" ;;
+ R) set="$set set altroot $OPTARG :" ;;
+ s) set="$set set shell $OPTARG :" ;;
+ S) set="$set set static $OPTARG :" ;;
+ O) set="$set set stdio $OPTARG :" ;;
+ u) set="$set set undef :" ;;
+ v) set="$set set verbose :" ;;
+ x) set="$set set cross $OPTARG :" ;;
+ X) set="$set set exclude $OPTARG :" ;;
+ esac
+ done
+ shift `expr $OPTIND - 1`
+ ;;
+*) while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ -) break
+ ;;
+ --) shift
+ break
+ ;;
+ --a|--al|--all)
+ REM=a
+ ;;
+ --cc=*) REM=c`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --co|--con|--conf|--confi|--config)
+ REM=C
+ ;;
+ --cr=*|--cro=*|--cros=*|--cross=*)
+ REM=x`echo X$1 | sed -e 's,[^=]*=,,'`
+ ;;
+ --d=*|--de=*|--deb=*|--debu=*|--debug=*)
+ REM=d`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --def|--defi|--defin|--define)
+ REM=D
+ ;;
+ --e=*|--ex=*|--exc=*|--excl=*|--exclu=*|--exclud=*|--exclude=*)
+ REM=X`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --e|--ex|--exp|--expl|--expli|--explic|--explici|--explicit)
+ REM=E
+ ;;
+ --f=*|--fe=*|--fea=*|--feat=*|--featu=*|--featur=*|--feature=*|--features=*)
+ REM=F`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --inp=*|--inpu=*|--input=*)
+ REM=i`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --inc=*|--incl=*|--inclu=*|--includ=*|--include=*)
+ REM=I`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --l=*|--li=*|--lib=*|--libr=*|--libra=*|--librar=*|--library=*)
+ REM=L`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --n|--na|--nam|--name|--name-v|--name-va|--name-val|--name-valu|--name-value)
+ REM=n
+ ;;
+ --o=*|--ou=*|--out=*|--outp=*|--outpu=*|--output=*)
+ REM=o`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --pa=*|--pac=*|--pack=*|--packa=*|--packag=*|--package=*)
+ REM=e`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --pro|--prot|--proto|--protot|--prototy|--prototyp|--prototype|--prototyped)
+ REM=p
+ ;;
+ --pra=*|--prag=*|--pragma=*)
+ REM=P`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --r|--re|--reg|--regre|--regres|--regress)
+ REM=r
+ ;;
+ --sh=*|--she=*|--shel=*|--shell=*)
+ REM=s`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --sta=*|--stat=*|--stati=*|--static=*)
+ REM=S`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --std=*|--stdi=*|--stdio=*)
+ REM=O`echo X$1 | sed 's,[^=]*=,,'`
+ ;;
+ --u|--un|--und|--unde|--undef)
+ REM=u
+ ;;
+ --v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
+ REM=v
+ ;;
+ --*) echo $command: $1: unknown option >&2
+ exit 2
+ ;;
+ -*) REM=`echo X$1 | sed 's,X-,,'`
+ ;;
+ *) break
+ ;;
+ esac
+ shift
+ while :
+ do case $REM in
+ '') break ;;
+ esac
+ eval `echo $REM | sed "s,\(.\)\(.*\),OPT='\1' REM='\2',"`
+ case $OPT in
+ [cdFiILoOePsSxX])
+ case $REM in
+ '') case $# in
+ 0) echo $command: -$OPT: option argument expected >&2
+ exit 1
+ ;;
+ esac
+ OPTARG=$1
+ shift
+ ;;
+ *) OPTARG=$REM
+ REM=''
+ ;;
+ esac
+ esac
+ case $OPT in
+ a) set="$set set all :" ;;
+ c) set="$set set cc $OPTARG :" ;;
+ C) set="$set set config :" ;;
+ d) set="$set set debug $OPTARG :" ;;
+ D) set="$set set define :" ;;
+ E) set="$set set explicit :" ;;
+ F) set="$set set features $OPTARG :" ;;
+ i) set="$set set input $OPTARG :" ;;
+ I) set="$set set include $OPTARG :" ;;
+ L) set="$set set library $OPTARG :" ;;
+ n) set="$set set namval $OPTARG :" ;;
+ N) set="$set set nooptimize $OPTARG :" ;;
+ o) set="$set set output $OPTARG :" ;;
+ e) set="$set set package $OPTARG :" ;;
+ p) set="$set set prototyped :" ;;
+ P) set="$set set pragma $OPTARG :" ;;
+ r) set="$set set regress :" ;;
+ s) set="$set set shell $OPTARG :" ;;
+ S) set="$set set static $OPTARG :" ;;
+ O) set="$set set stdio $OPTARG :" ;;
+ u) set="$set set undef :" ;;
+ v) set="$set set verbose :" ;;
+ x) set="$set set cross $OPTARG :" ;;
+ X) set="$set set exclude $OPTARG :" ;;
+ *) echo "Usage: $command [-aCDEnpruv] [-c C-compiler-name [C-compiler-flags ...]] [-d level]
+ [-F features-header] [-i file] [-o file] [-O stdio-header] [-e name] [-P text]
+ [-s shell-path] [-S[flags]] [-x cross-exec-prefix] [-I dir] [-L dir] [-X dir] [ - ]
+ [ file.iffe | statement [ : statement ... ] ]" >&2
+ exit 2
+ ;;
+ esac
+ done
+ done
+ ;;
+esac
+case $1 in
+-) out=-; shift ;;
+esac
+case $# in
+0) in=- ;;
+esac
+set -- $set "$@"
+case " $* " in
+*' set config '*|*' run config.'*|*' run '*' config.'*|*' run '*'/config.'*)
+ config=1
+ ;;
+esac
+
+# standard error to /dev/null unless debugging
+# standard output to the current output file
+#
+# stdout original standard output
+# stderr original standard error
+# nullin /dev/null input
+# nullout /dev/null output
+
+stdout=5 stderr=6 nullin=7 nullout=8
+eval "exec $nullin</dev/null $nullout>/dev/null $stdout>&1 $stderr>&2"
+case " $* " in
+*" set debug "[3456789]*)
+ ;;
+*) eval "exec 2>&$nullout"
+ ;;
+esac
+
+# prompt complications
+
+case `print -n aha </dev/null 2>/dev/null` in
+aha) show='print -n' SHOW='' ;;
+*) case `echo -n aha 2>/dev/null` in
+ -n*) show=echo SHOW='\c' ;;
+ *) show='echo -n' SHOW='' ;;
+ esac
+ ;;
+esac
+
+# tmp files cleaned up on exit
+# status: 0:success 1:failure 2:interrupt
+
+status=1
+case $debug in
+2) core=
+ ;;
+*) if (ulimit -c 0) >/dev/null 2>&1
+ then ulimit -c 0
+ core=
+ else core="core core.??*"
+ fi
+ ;;
+esac
+trap "rm -f $core $tmp*" 0
+if (:>$tmp.c) 2>/dev/null
+then rm -f $tmp.c
+else echo "$command: cannot create tmp files in current dir" >&2
+ exit 1
+fi
+status=2
+
+# standard header for c source
+
+std='#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
+#define _STD_ 1
+#define _ARG_(x) x
+#define _VOID_ void
+#else
+#define _STD_ 0
+#define _ARG_(x) ()
+#define _VOID_ char
+#endif
+#if defined(__cplusplus)
+#define _BEGIN_EXTERNS_ extern "C" {
+#define _END_EXTERNS_ }
+#else
+#define _BEGIN_EXTERNS_
+#define _END_EXTERNS_
+#endif
+#define _NIL_(x) ((x)0)'
+tst=
+ext="#include <stdio.h>"
+noext='*[<"][Ss][Tt][Dd][Ii][Oo].[Hh][">]*|*<ast.h>*|*<sfio.h>*|*/[*]<NOSTDIO>[*]/*'
+
+# loop on op [ arg [ ... ] ] [ : op [ arg [ ... ] ] ]
+
+argx=0
+cur=.
+can=
+cansep=
+cctest=
+file=
+hdrtest=
+ifelse=NONE
+ifstack=
+ini=
+init=1
+line=0
+nan=
+prototyped=
+while :
+do case $in in
+ "") case $argx:$* in
+ 1:$argv);;
+ 1:*) argx=0
+ set x $argv
+ shift
+ ;;
+ esac
+ ;;
+ *) case $ini in
+ '') if read lin
+ then case $shell in
+ ksh) let line=line+1 ;;
+ *) line=`expr $line + 1` ;;
+ esac
+ $posix_noglob
+ set x $lin
+ $posix_glob
+ case $# in
+ 1) continue ;;
+ esac
+ else set x
+ fi
+ ;;
+ *) $posix_noglob
+ set x $ini
+ $posix_glob
+ ini=
+ ;;
+ esac
+ shift
+ case $init in
+ 1) case $1 in
+ iff) init=0
+ ;;
+ print|ref|set)
+ ;;
+ *) init=0
+ ini=$*
+ set ini
+ ;;
+ esac
+ esac
+ ;;
+ esac
+ case $# in
+ 0) case $ifstack in
+ ?*) echo "$command: $file$line: missing endif" >&$stderr
+ exit 1
+ ;;
+ esac
+ set set out +
+ ;;
+ esac
+
+ # if nesting
+
+ while :
+ do case $1 in
+ "if") ifstack="$ifelse:$ifstack"
+ case $ifelse in
+ KEEP|NONE)
+ ifelse=TEST
+ ;;
+ TEST) ;;
+ *) ifelse=DONE
+ ;;
+ esac
+ shift
+ case $explicit in
+ 1) set '' - "$@"; shift ;;
+ esac
+ ;;
+ "elif") case $ifelse in
+ SKIP) ifelse=TEST
+ ;;
+ TEST) ;;
+ *) ifelse=DONE
+ ;;
+ NONE) echo "$command: $file$line: $1: no matching if" >&$stderr
+ exit 1
+ ;;
+ esac
+ shift
+ case $explicit in
+ 1) set '' - "$@"; shift ;;
+ esac
+ ;;
+ "else") case $ifelse in
+ KEEP) ifelse=DONE
+ ;;
+ SKIP|TEST)
+ ifelse=KEEP
+ ;;
+ NONE) echo "$command: $file$line: $1: no matching if" >&$stderr
+ exit 1
+ ;;
+ esac
+ shift
+ ;;
+ "endif")case $ifelse in
+ NONE) echo "$command: $file$line: $1: no matching if" >&$stderr
+ exit 1
+ ;;
+ esac
+ case $shell in
+ ksh) ifelse=${ifstack%%:*}
+ ifstack=${ifstack#*:}
+ ;;
+ *) eval `echo $ifstack | sed 's,\([^:]*\):\(.*\),ifelse=\1 ifstack=\2,'`
+ ;;
+ esac
+ shift
+ ;;
+ *) break
+ ;;
+ esac
+ done
+
+ # check if "run xxx" is equivalent to "set in xxx"
+
+ case $1 in
+ "("*) set exp - "$@" ;;
+ *.iffe|*.iff) set run "$@" ;;
+ esac
+ case $1 in
+ :) shift
+ continue
+ ;;
+ run) case $shell in
+ bsh) case $2 in
+ */*) x=`echo $2 | sed 's,.*[\\\\/],,'` ;;
+ *) x=$2 ;;
+ esac
+ ;;
+ *) eval 'x=${2##*[\\/]}'
+ ;;
+ esac
+ case $x in
+ *.iffe|*.iff)
+ set set in $2 ;;
+ *.*) ;;
+ *) set set in $2 ;;
+ esac
+ ;;
+ esac
+
+ # { inc set } drop out early
+
+ case $1 in
+ ""|"#"*)continue
+ ;;
+ inc) case $ifelse in
+ DONE|SKIP) set ''; shift; continue ;;
+ esac
+ shift
+ case $# in
+ 0) echo "$command: $file$line: path expected" >&$stderr
+ exit 1
+ ;;
+ esac
+ p=$1
+ shift
+ if test ! -f $p
+ then echo "$command: $file$line: $p: file not found" >&$stderr
+ exit 1
+ fi
+ case $# in
+ 0) case $config in
+ 1) e="^HAVE_" ;;
+ *) e="^_" ;;
+ esac
+ ;;
+ 1) e=$1
+ ;;
+ *) shift
+ echo "$command: $file$line: warning: $*: operands ignored" >&$stderr
+ ;;
+ esac
+ eval `sed -e '/^#define[ ]/!d' -e 's/#define[ ]//' -e 's/[ (].*//' ${e:+"-e/$e/!d"} -e 's/.*/&=1/' $p | LC_ALL=C sort -u`
+ continue
+ ;;
+ set) case $ifelse in
+ DONE|SKIP) set ''; shift; continue ;;
+ esac
+ shift
+ case $1 in
+ ""|"#"*)op=
+ ;;
+ *) arg=
+ op=$1
+ case $op in
+ --*) case $shell in
+ bsh) op=`echo X$op | sed 's/X--//'` ;;
+ *) op=${op#--} ;;
+ esac
+ ;;
+ -*) case $op in
+ -??*) case $shell in
+ bsh) arg=`echo X$op | sed 's/X-.//'`
+ op=`echo X$op | sed 's/X\\(-.\\).*/\\1/'`
+ ;;
+ *) arg=${op#-?}
+ op=${op%$arg}
+ ;;
+ esac
+ ;;
+ esac
+ case $op in
+ a) op=all ;;
+ c) op=cc ;;
+ C) op=config ;;
+ d) op=debug ;;
+ D) op=define ;;
+ E) op=explicit ;;
+ F) op=features ;;
+ i) op=input ;;
+ I) op=include ;;
+ L) op=library ;;
+ n) op=namval ;;
+ N) op=nooptimize ;;
+ o) op=output ;;
+ e) op=package ;;
+ p) op=prototyped ;;
+ P) op=pragma ;;
+ r) op=regress ;;
+ s) op=shell ;;
+ S) op=static ;;
+ O) op=stdio ;;
+ u) op=undef ;;
+ v) op=verbose ;;
+ x) op=cross ;;
+ X) op=exclude ;;
+ esac
+ ;;
+ esac
+ shift
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ *" "*) shift
+ continue
+ ;;
+ ""|"#"*)break
+ ;;
+ :) shift
+ break
+ ;;
+ esac
+ case $arg in
+ "") arg=$1 ;;
+ *) arg="$arg $1" ;;
+ esac
+ shift
+ done
+ ;;
+ esac
+ case $op in
+ all) all=1
+ continue
+ ;;
+ altroot) case $arg in
+ ""|-) altroot= ;;
+ *) altroot="$arg" ;;
+ esac
+ continue
+ ;;
+ cc) occ=
+ for x in $arg
+ do case $occ in
+ "") case $x in
+ *=*) case $shell in
+ bsh) eval $x
+ export `echo $x | sed 's/=.*//'`
+ ;;
+ *) export $x
+ ;;
+ esac
+ ;;
+ -O*) case $optimize in
+ 1) occ=$x ;;
+ esac
+ ;;
+ *) occ=$x
+ ;;
+ esac
+ ;;
+ *) occ="$occ $x"
+ ;;
+ esac
+ done
+ exclude occ
+ continue
+ ;;
+ config) config=1
+ continue
+ ;;
+ cross) case $arg in
+ ""|-) cross= ;;
+ *) cross="$arg" libpaths= ;;
+ esac
+ continue
+ ;;
+ debug) debug=$arg
+ case $arg in
+ 0) exec 2>&$nullout
+ set -
+ show=echo
+ SHOW=
+ ;;
+ ""|1) exec 2>&$stderr
+ set -
+ show=echo
+ SHOW=
+ ;;
+ 2|3) exec 2>&$stderr
+ case $shell in
+ ksh) eval 'PS4="${PS4%+*([ ])}+\$LINENO+ "'
+ esac
+ show=echo
+ SHOW=
+ set -x
+ ;;
+ *) echo "$command: $arg: debug levels are 0, 1, 2, 3" >&$stderr
+ ;;
+ esac
+ continue
+ ;;
+ define) define=1
+ continue
+ ;;
+ exclude)case $arg in
+ ""|-) excludes= ;;
+ *) excludes="$excludes $arg" ;;
+ esac
+ exclude includes occ
+ continue
+ ;;
+ explicit)
+ explicit=1
+ continue
+ ;;
+ features)case $arg in
+ '') tst= ;;
+ *) tst="#include \"$arg\"" ;;
+ esac
+ continue
+ ;;
+ "in"|input)
+ case $arg in
+ "") in=-
+ ;;
+ *) in=$arg
+ if test ! -r $in
+ then echo "$command: $in: not found" >&$stderr
+ exit 1
+ fi
+ exec < $in
+ file=$in:
+ case $out in
+ "") case $in in
+ *[.\\/]*)
+ case $shell in
+ bsh) eval `echo $in | sed -e 's,.*[\\\\/],,' -e 's/\\.[^.]*//' -e 's/^/out=/'`
+ ;;
+ *) eval 'out=${in##*[\\/]}'
+ eval 'out=${out%.*}'
+ ;;
+ esac
+ ;;
+ *) out=$in
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+ include)case $arg in
+ ""|-) includes= ;;
+ *) includes="$includes -I$arg" ;;
+ esac
+ exclude includes
+ continue
+ ;;
+ library)for y in $libpaths
+ do eval $y=\"\$$y:\$arg\$${y}_default\"
+ eval export $y
+ done
+ continue
+ ;;
+ namval) define=n
+ continue
+ ;;
+ nodebug)exec 2>&$nullout
+ set -
+ continue
+ ;;
+ nodefine)
+ define=0
+ continue
+ ;;
+ nooptimize)
+ optimize=0
+ case $occ in
+ *" -O"*)occ=`echo $occ | sed 's/ -O[^ ]*//g'`
+ cc=$occ
+ ;;
+ esac
+ ;;
+ optimize)
+ optimize=1
+ ;;
+ out|output)
+ out=$arg
+ defhdr=
+ usr=
+ deflib=
+ one=
+ puthdr=
+ putlib=
+ case $op in
+ output) continue ;;
+ esac
+ def=
+ test=
+ ;;
+ package)protoflags="$protoflags -e $arg"
+ continue
+ ;;
+ prototyped|noprototyped)
+ pragma="$pragma $op"
+ case $op in
+ prototyped) prototyped=1 ;;
+ *) prototyped= ;;
+ esac
+ continue
+ ;;
+ pragma) pragma="$pragma $arg"
+ continue
+ ;;
+ regress)regress=1
+ version=1995-03-19
+ continue
+ ;;
+ shell) case $arg in
+ osh) posix_read=-no
+ shell=bsh
+ ;;
+ esac
+ shell=$arg
+ continue
+ ;;
+ static) static=$arg
+ continue
+ ;;
+ stdio) case $arg in
+ '') ext=
+ ;;
+ *) ext=
+ sep=
+ for i in $arg
+ do case $i in
+ -) case $ext in
+ '') continue ;;
+ *) break ;;
+ esac
+ ;;
+ esac
+ echo "#include \"$i\"" > t.c
+ if $cc -E t.c > /dev/null 2>&1
+ then ext="$ext$sep#include \"$arg\""
+ sep=$nl
+ fi
+ done
+ ;;
+ esac
+ continue
+ ;;
+ undef) undef=1
+ continue
+ ;;
+ verbose)verbose=1
+ continue
+ ;;
+ *) echo "$command: $op: unknown option" >&$stderr
+ exit 1
+ ;;
+ esac
+ ;;
+ api|define|extern|header|include|print|reference|ver)
+ op=$1
+ shift
+ arg=
+ ;;
+ *) case $2 in
+ '=') def=$1
+ shift
+ shift
+ ;;
+ *) case $1 in
+ '-'|'?')def=-
+ shift
+ ;;
+ *) def=
+ ;;
+ esac
+ ;;
+ esac
+ case $1 in
+ '!') not=1
+ shift
+ ;;
+ *) not=
+ ;;
+ esac
+ case $1 in
+ *'{') op=-
+ ;;
+ '('*|'"'*'"'|'<'*'>')
+ op=exp
+ case $def in
+ '') def=- ;;
+ esac
+ ;;
+ *) op=$1
+ shift
+ ;;
+ esac
+ arg=
+ cc="$occ $includes"
+ group=
+ groups=
+ fail=
+ hdr=
+ lib=
+ mac=
+ no=
+ note=
+ opt=
+ pass=
+ pth=
+ run=
+ set=
+ src=
+ test=
+ yes=
+ case $# in
+ 0) ;;
+ *) case $1 in
+ "#"*) set x
+ shift
+ ;;
+ *) case $op in
+ ref) ;;
+ *) case $1 in
+ '-') case $op:$2 in
+ tst:*) arg=$1
+ case $2 in
+ -) shift ;;
+ esac
+ ;;
+ *:-*) arg=$1
+ shift
+ ;;
+ *) def=-
+ shift
+ case $1 in
+ '('*|*'{'|'"'*'"'|'<'*'>')
+ arg=-
+ ;;
+ *) arg=$1
+ case $# in
+ 0) ;;
+ *) shift ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ -*|+*|'('*|*'{'|'"'*'"'|'<'*'>')
+ arg=-
+ ;;
+ *) arg=$1
+ shift
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case $1 in
+ '('*|'"'*'"'|'<'*'>')
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ *[.{}]*)break ;;
+ esac
+ case $test in
+ '') test=$1 ;;
+ *) test="$test $1" ;;
+ esac
+ shift
+ done
+ case $arg in
+ '') arg=- ;;
+ esac
+ case $op in
+ exp) case $def in
+ ''|'-') ;;
+ *) arg=$def ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ sline=$line
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ "") ;;
+ "#"*) set x
+ ;;
+ "=") shift
+ set=$*
+ case $set in
+ "") set=" " ;;
+ esac
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ shift
+ done
+ break
+ ;;
+ [abcdefghijklmnopqrstuvwxyz]*'{'|'{')
+ v=$1
+ shift
+ x=
+ case $v in
+ "note{")
+ sep=" " ;;
+ *) sep=$nl ;;
+ esac
+ case $v in
+ '{') e='}' ;;
+ *) e='}end' ;;
+ esac
+ n=1
+ SEP=
+ while :
+ do case $# in
+ 0) case $posix_read in
+ -*) checkread ;;
+ esac
+ case $in in
+ "") echo "$command: $file$line: missing }end" >&$stderr
+ exit 1
+ ;;
+ esac
+ while :
+ do case $posix_read in
+ 1) case $shell in
+ ksh) IFS= read -r lin
+ eof=$?
+ while :
+ do lin="${lin#[' ']}"
+ case $lin in
+ [' ']*'#'*);;
+ *) break ;;
+ esac
+ done
+ ;;
+ *) IFS=
+ read -r lin
+ eof=$?
+ IFS=$ifs
+ case $lin in
+ [' ']*) lin=`sed -e 's,^[ ],,' -e 's,^[ ]*#,#,' <<!
+$lin
+!
+`
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) lin=`$posix_read`
+ eof=$?
+ ;;
+ esac
+ case $eof in
+ 0) case $shell in
+ ksh) let line=line+1 ;;
+ *) line=`expr $line + 1` ;;
+ esac
+ $posix_noglob
+ set x $lin
+ $posix_glob
+ case $2 in
+ $v) case $shell in
+ ksh) let n=n+1 ;;
+ *) n=`expr $n + 1` ;;
+ esac
+ ;;
+ $e|$e';')
+ case $n in
+ 1) shift
+ break 2
+ ;;
+ esac
+ case $shell in
+ ksh) let n=n-1 ;;
+ *) n=`expr $n - 1` ;;
+ esac
+ ;;
+ esac
+ x="$x$SEP$lin"
+ SEP=$sep
+ ;;
+ *) echo "$command: $file$line: missing $e" >&$stderr
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ esac
+ case $1 in
+ $v) case $shell in
+ ksh) let n=n+1 ;;
+ *) n=`expr $n + 1` ;;
+ esac
+ ;;
+ $e|$e';')
+ case $n in
+ 1) break ;;
+ esac
+ case $shell in
+ ksh) let n=n-1 ;;
+ *) n=`expr $n - 1` ;;
+ esac
+ ;;
+ esac
+ x="$x$SEP$1"
+ SEP=$sep
+ shift
+ done
+ case $v in
+ 'note{');;
+ *) x="$x$nl" # \r\n bash needs this barf # ;;
+ esac
+ case $v in
+ 'fail{') fail=$x ;;
+ 'nofail{') pass=$x v='pass{' ;;
+ 'nopass{') fail=$x v='fail{' ;;
+ 'no{') no=$x ;;
+ 'note{') note=$x ;;
+ 'pass{') pass=$x ;;
+ 'test{') test=$x ;;
+ 'yes{'|'{') yes=$x ;;
+ *) src=$x run=$v ;;
+ esac
+ ;;
+ :) shift
+ break
+ ;;
+ *[\"\'\(\)\{\}\ \ ]*)
+ case $op in
+ pth) pth="$pth $1"
+ ;;
+ *) case $test in
+ '') test=$1 ;;
+ *) test="$test $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ -) group=$group$1
+ case $group in
+ -) com_hdr=$hdr
+ com_lib=$lib
+ com_mac=$mac
+ com_opt=$opt
+ com_pth=$pth
+ com_test=$test
+ ;;
+ *) groups="$groups $1"
+ ;;
+ esac
+ ;;
+ -l*) case $group in
+ --*) groups="$groups $1" ;;
+ *) lib="$lib $1" ;;
+ esac
+ ;;
+ +l*) case $shell in
+ bsh) x=`echo X$1 | sed 's/X+/-/'` ;;
+ *) eval 'x=-${1#+}' ;;
+ esac
+ case $group in
+ --*) groups="$groups $x" ;;
+ *) lib="$lib $x" ;;
+ esac
+ ;;
+ -*|+*) case $op in
+ ref) cc="$cc $1"
+ occ="$occ $1"
+ case $1 in
+ -L*) case $shell in
+ ksh) x=${1#-L} ;;
+ *) x=`echo x$1 | sed 's,^x-L,,'` ;;
+ esac
+ for y in $libpaths
+ do eval $y=\"\$$y:\$x\$${y}_default\"
+ eval export $y
+ done
+ ;;
+ esac
+ ;;
+ *) case $group in
+ --*) groups="$groups $1"
+ ;;
+ *) case $op in
+ run) opt="$opt $1"
+ ;;
+ *) case $1 in
+ -D*) mac="$mac $1" ;;
+ *) cc="$cc $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *.[aAxX]|*.[dD][lL][lL]|*.[lL][iI][bB])
+ case $group in
+ --*) groups="$groups $1" ;;
+ *) lib="$lib $1" ;;
+ esac
+ ;;
+ *[.\\/]*)
+ case $group in
+ --*) groups="$groups $1"
+ ;;
+ *) case $op in
+ pth) pth="$pth $1" ;;
+ *) hdr="$hdr $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) case $group in
+ --*) groups="$groups $1"
+ ;;
+ *) case $op in
+ pth) pth="$pth $1"
+ ;;
+ *) case $test in
+ '') test=$1 ;;
+ *) test="$test $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ shift
+ done
+ case $group in
+ -) group= ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case $ifelse in
+ DONE|SKIP) continue ;;
+ esac
+
+ # make sure $cc compiles C
+
+ case $cc in
+ "") cc="$occ $includes" ;;
+ esac
+ case $cctest in
+ "") checkcc ;;
+ esac
+
+ # some ops allow no args
+
+ case $arg in
+ '') case $op in
+ api) arg=-
+ case $1:$2 in
+ [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*:[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
+ a=$1
+ shift
+ case " $apis " in
+ *" $a "*)
+ ;;
+ *) apis="$apis $a"
+ eval api_sym_${a}= api_ver_${a}=
+ ;;
+ esac
+ rel=
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
+ rel="$rel $1"
+ ;;
+ *) break
+ ;;
+ esac
+ shift
+ done
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ :) break ;;
+ esac
+ eval syms='$'api_sym_${a}
+ case $syms in
+ '') sep='' ;;
+ *) sep=$nl ;;
+ esac
+ for r in $rel
+ do syms=$syms$sep${1}:${r}
+ sep=$nl
+ done
+ eval api_sym_${a}='$'syms
+ shift
+ done
+ ;;
+ *) echo "$command: $op: expected: name YYYYMMDD symbol ..." >&$stderr
+ ;;
+ esac
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ :) break ;;
+ esac
+ shift
+ done
+ ;;
+ iff|ini)arg=-
+ ;;
+ comment)copy - "/* $* */"
+ continue
+ ;;
+ define) x=$1
+ shift
+ case $1 in
+ '('*')')
+ arg=$1
+ shift
+ ;;
+ esac
+ case $in in
+ "") v=
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ t=$1
+ shift
+ case $t in
+ ":") break ;;
+ esac
+ v="$v $t"
+ done
+ ;;
+ *) v=$*
+ ;;
+ esac
+ is mac $x
+ copy $tmp.c "$std
+$usr
+#ifndef $x
+(
+#endif
+int x;
+"
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then success -
+ else failure -
+ copy - "#define $x$arg $v"
+ usr="$usr${nl}#define $x$arg $v"
+ fi
+ continue
+ ;;
+ extern) x=$1
+ shift
+ t=$1
+ shift
+ is npt $x
+ copy $tmp.c "
+$std
+#include <sys/types.h>
+$usr
+_BEGIN_EXTERNS_
+struct _iffe_struct { int _iffe_member; };
+extern struct _iffe_struct* $x _ARG_((struct _iffe_struct*));
+_END_EXTERNS_
+"
+ # some compilers with -O only warn for invalid intrinsic prototypes
+ case " $cc " in
+ *" -O "*) xx=`echo $cc | sed 's/ -O / /g'` ;;
+ *) xx=$cc ;;
+ esac
+ if compile $xx -c $tmp.c <&$nullin >&$nullout
+ then success -
+ while :
+ do case $1 in
+ ''|'('*|'['*)
+ break
+ ;;
+ esac
+ t="$t $1"
+ shift
+ done
+ case $in in
+ "") v=
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ t=$1
+ shift
+ case $t in
+ ":") break ;;
+ esac
+ v="$v $t"
+ done
+ ;;
+ *) v=$*
+ ;;
+ esac
+ copy - "extern $t $x$v;"
+ # NOTE: technically if prototyped is on all tests should
+ # be run through proto(1), but we'd like iffe to
+ # work sans proto -- so we drop the extern's in
+ # the test headers
+ case $prototyped in
+ '') usr="$usr${nl}extern $t $x$v;" ;;
+ esac
+ else failure -
+ case $in in
+ "") while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ ":") break ;;
+ esac
+ done
+ ;;
+ esac
+ fi
+ continue
+ ;;
+ header|include|reference)
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ x=$1
+ shift
+ case $x in
+ ":") break ;;
+ esac
+ case " $gothdr " in
+ *" - $x "*)
+ ;;
+ *" + $x "*)
+ case $usr in
+ *"# include <"$x">"*)
+ ;;
+ *) case $op in
+ reference)
+ ;;
+ *) copy - "#include <$x>"
+ ;;
+ esac
+ usr="$usr${nl}#include <$x>"
+ ;;
+ esac
+ ;;
+ *) copy $tmp.c "$std
+$usr
+#include <$x>
+int x;
+"
+ if is_hdr - $x
+ then gothdr="$gothdr + $x"
+ case $op in
+ reference)
+ ;;
+ *) copy - "#include <$x>"
+ ;;
+ esac
+ usr="$usr${nl}#include <$x>"
+ else gothdr="$gothdr - $x"
+ fi
+ ;;
+ esac
+ done
+ continue
+ ;;
+ print) case $in in
+ "") v=
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ t=$1
+ shift
+ case $t in
+ ":") break ;;
+ esac
+ v="$v $t"
+ done
+ ;;
+ *) v=$*
+ ;;
+ esac
+ copy - "$*"
+ usr="$usr${nl}$v"
+ continue
+ ;;
+ ver) arg=-
+ case $1:$2 in
+ [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*:[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
+ vers="$vers$nl$1"
+ eval ver_$1=$2
+ ;;
+ *) echo "$command: $op: expected: name YYYYMMDD" >&$stderr
+ ;;
+ esac
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ :) break ;;
+ esac
+ shift
+ done
+ ;;
+ esac
+ ;;
+ esac
+
+ # NOTE() support
+
+ case $ext in
+ *"<stdio.h>"*)
+ case $ext in
+ *"#define NOTE("*)
+ ;;
+ *) ext="$ext
+#define NOTE(s) do{write(9,\" \",1);write(9,s,strlen(s));write(9,\" ...\",4);}while(0)"
+ ;;
+ esac
+ ;;
+ esac
+
+ # save $* for ancient shells
+
+ argx=1
+ argv=$*
+
+ # loop on all candidate groups
+
+ while :
+ do
+ # check the candidate macros
+
+ cc="$cc $mac"
+
+ # check for global default headers (some cc -E insist on compiling)
+
+ case $hdrtest in
+ '') hdrtest=1
+ allinc=
+ for x in types
+ do case $config in
+ 0) c=_sys_${x}
+ ;;
+ 1) case $shell in
+ ksh) typeset -u u=$x ;;
+ *) u=`echo $x | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;
+ esac
+ c=HAVE_SYS_${u}_H
+ ;;
+ esac
+ x=sys/$x.h
+ echo "${allinc}#include <$x>" > $tmp.c
+ if is_hdr $x
+ then gothdr="$gothdr + $x"
+ case $explicit in
+ 0) can="$can$cansep#define $c 1 /* #include <$x> ok */"
+ nan="$nan$cansep$c=1"
+ cansep=$nl
+ ;;
+ esac
+ eval $c=1
+ allinc="${allinc}#include <$x>$nl"
+ else gothdr="$gothdr - $x"
+ case $explicit$all$config$undef in
+ 0?1?|0??1)
+ can="$can$cansep#undef $c /* #include <$x> not ok */"
+ nan="$nan$cansep$c="
+ cansep=$nl
+ ;;
+ 01??) can="$can$cansep#define $c 0 /* #include <$x> not ok */"
+ nan="$nan$cansep$c=0"
+ cansep=$nl
+ ;;
+ esac
+ fi
+ done
+ ;;
+ esac
+
+ # add implicit headers/libraries before the checks
+
+ case $op in
+ npt) hdr="sys/types.h stdlib.h unistd.h $hdr"
+ ;;
+ siz|typ)hdr="sys/types.h time.h sys/time.h sys/times.h stddef.h stdlib.h $hdr"
+ ;;
+ esac
+
+ # check the candidate headers
+
+ case $hdr in
+ ?*) z=$hdr
+ hdr=
+ dis=0
+ for x in $z
+ do case $x in
+ *.h) case " $gothdr " in
+ *" - $x "*)
+ continue
+ ;;
+ *" + $x "*)
+ ;;
+ *) case $shell in
+ bsh) eval `echo $x | sed -e 's,^\\([^\\\\/]*\\).*[\\\\/]\\([^\\\\/]*\\)\$,\\1_\\2,' -e 's/\\..*//' -e 's/^/c=/'`
+ ;;
+ *) eval 'c=${x##*[\\/]}'
+ eval 'c=${c%%.*}'
+ case $x in
+ */*) eval 'c=${x%%[\\/]*}_${c}' ;;
+ esac
+ ;;
+ esac
+ case $explicit in
+ 0) dis=0
+ ;;
+ *) case $x in
+ */*) dis=$c ;;
+ *) dis=hdr ;;
+ esac
+ case ${dis}_ in
+ ${op}_*)dis=0 ;;
+ *) dis=1 ;;
+ esac
+ ;;
+ esac
+ case $config in
+ 0) case $x in
+ */*) c=_${c} ;;
+ *) c=_hdr_${c} ;;
+ esac
+ ;;
+ 1) case $shell in
+ ksh) typeset -u u=$c ;;
+ *) u=`echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;
+ esac
+ c=HAVE_${u}_H
+ ;;
+ esac
+ echo "${allinc}#include <$x>" > $tmp.c
+ if is_hdr $x
+ then gothdr="$gothdr + $x"
+ case $dis in
+ 0) can="$can$cansep#define $c 1 /* #include <$x> ok */"
+ nan="$nan$cansep$c=1"
+ cansep=$nl
+ ;;
+ esac
+ eval $c=1
+ else gothdr="$gothdr - $x"
+ case $dis$all$config$undef in
+ 0?1?|0??1)
+ can="$can$cansep#undef $c /* #include <$x> not ok */"
+ nan="$nan$cansep$c="
+ cansep=$nl
+ ;;
+ 01??) can="$can$cansep#define $c 0 /* #include <$x> not ok */"
+ nan="$nan$cansep$c=0"
+ cansep=$nl
+ ;;
+ esac
+ continue
+ fi
+ ;;
+ esac
+ ;;
+ *) test -r $x || continue
+ ;;
+ esac
+ hdr="$hdr $x"
+ done
+ ;;
+ esac
+
+ # check the candidate libraries
+
+ case $lib in
+ ?*) z=
+ for p in $lib
+ do z="$p $z"
+ done
+ lib=
+ p=
+ hit=0
+ echo "int main(){return(0);}" > $tmp.c
+ for x in $z
+ do p=$x
+ case " $gotlib " in
+ *"- $p "*)
+ failure +
+ p=
+ ;;
+ *"+ $p "*)
+ success +
+ lib="$p $lib"
+ ;;
+ *) rm -f $tmp.exe
+ is LIB $p
+ if compile $cc -o $tmp.exe $tmp.c $p $lib <&$nullin >&$nullout
+ then success
+ gotlib="$gotlib + $p"
+ lib="$p $lib"
+ e=0
+ else a=
+ e=1
+ for l in $z
+ do case $l in
+ -) a=
+ continue
+ ;;
+ $p) a=$p
+ continue
+ ;;
+ *) case $gotlib in
+ *" $l "*) continue ;;
+ esac
+ ;;
+ esac
+ case $a in
+ $p) a="$a $l"
+ if compile $cc -o $tmp.exe $tmp.c $a <&$nullin >&$nullout
+ then success
+ gotlib="$gotlib + $p"
+ lib="$p $lib"
+ e=0
+ break
+ fi
+ ;;
+ esac
+ done
+ case $e in
+ 1) failure
+ gotlib="$gotlib - $p"
+ ;;
+ esac
+ fi
+ y=
+ for x in $p
+ do case $shell in
+ bsh) c=`echo X$x | sed 's,X-l,,'` ;;
+ *) eval 'c=${x#-l}' ;;
+ esac
+ case $c in
+ *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*)
+ c=`echo '' $c | sed -e 's,.*[\\\\/],,' -e 's,\.[^.]*$,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g' -e '/^lib./s,^lib,,'`
+ ;;
+ esac
+ case $config in
+ 0) case $e$p in
+ 0*' '*) case " $gotlib " in
+ *[-+]" $x "*)
+ ;;
+ *) can="$can$cansep#define _LIB_$c 1 /* $x is a library */"
+ nan="$nan${cansep}_LIB_$c=1"
+ cansep=$nl
+ eval _LIB_$c=1
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ 1) case $shell in
+ ksh) typeset -u u=$c ;;
+ *) u=`echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;
+ esac
+ c=$u
+ case $e in
+ 0*' '*) case " $gotlib " in
+ *[-+]" $x "*)
+ ;;
+ *) can="$can$cansep#define HAVE_${c}_LIB 1 /* $x is a library */"
+ nan="$nan${cansep}HAVE_${c}_LIB=1"
+ cansep=$nl
+ eval HAVE_${c}_LIB=1
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ y=${y}_$c
+ done
+ case $config in
+ 0) c=_LIB${y} ;;
+ 1) c=HAVE${y}_LIB ;;
+ esac
+ case $p in
+ *' '*) q="a library group" ;;
+ *) q="a library" ;;
+ esac
+ case $e in
+ 0) can="$can$cansep#define $c 1 /* $p is $q */"
+ nan="$nan$cansep$c=1"
+ cansep=$nl
+ eval $c=1
+ case $hit in
+ 1) break ;;
+ esac
+ ;;
+ 1) case $all$config$undef in
+ ?1?|??1)can="$can$cansep#undef $c /* $p is not $q */"
+ nan="$nan$cansep$c="
+ cansep=$nl
+ ;;
+ 1??) can="$can$cansep#define $c 0 /* $p is not $q */"
+ nan="$nan$cansep$c=0"
+ cansep=$nl
+ ;;
+ esac
+ eval $c=0
+ ;;
+ esac
+ p=
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # last op precheck
+
+ case $op in
+ ref) deflib="$deflib $lib"
+ defhdr="$defhdr $hdr"
+ break
+ ;;
+ esac
+ IFS=" ,"
+ case $shell in
+ bash) op=`echo $op`
+ arg=`echo $arg`
+ ;;
+ *) eval op=\"$op\"
+ eval arg=\"$arg\"
+ ;;
+ esac
+ IFS=$ifs
+
+ # check for op aliases
+
+ x=
+ for o in $op
+ do case $o in
+ def|default) x="$x cmd dat hdr key lib mth sys typ" ;;
+ *) x="$x $o" ;;
+ esac
+ done
+
+ # loop on the ops o and args a
+
+ result=UNKNOWN
+ for o in $x
+ do for a in $arg
+ do c=
+ case $a in
+ *[.\\/]*)
+ case $o in
+ hdr|lcl|nxt|pth|sys)
+ x=$a
+ case $x in
+ *.lcl|*.nxt)
+ case $o in
+ sys) x=sys/$x ;;
+ esac
+ case $shell in
+ bsh) eval `echo $x | sed 's,\\(.*\\)\.\\([^.]*\\),x=\\1 o=\\2,'`
+ ;;
+ *) o=${x##*.}
+ x=${x%.${o}}
+ ;;
+ esac
+ v=$x
+ ;;
+ esac
+ case $x in
+ *[\\/]*)case $shell in
+ bsh) eval `echo $x | sed 's,\\(.*\\)[\\\\//]\\(.*\\),p=\\1 v=\\2,'`
+ ;;
+ *) eval 'p=${x%/*}'
+ eval 'v=${x##*/}'
+ ;;
+ esac
+ ;;
+ *.*) case $shell in
+ bsh) eval `echo $x | sed 's,\\(.*\\)\\.\\(.*\\),p=\\1 v=\\2,'`
+ ;;
+ *) eval 'p=${x%.*}'
+ eval 'v=${x##*.}'
+ ;;
+ esac
+ ;;
+ *) p=
+ ;;
+ esac
+ case $o in
+ lcl|nxt) c=$v.$o ;;
+ *) c=$v ;;
+ esac
+ ;;
+ *) case $shell in
+ bsh) eval `echo $a | sed -e 's,.*[\\\\/],,' -e 's/\\(.*\\)\\.\\(.*\\)/p=\\1 v=\\2/'`
+ ;;
+ *) eval 'p=${a%.*}'
+ eval 'p=${p##*[\\/]}'
+ eval 'v=${a##*.}'
+ eval 'v=${v##*[\\/]}'
+ ;;
+ esac
+ ;;
+ esac
+ case $p in
+ '') f=${v} ;;
+ *) f=${p}/${v} ;;
+ esac
+ case $o in
+ run) v=$p
+ p=
+ m=_${v}
+ ;;
+ mem) case $p in
+ *.*) case $shell in
+ bsh) eval `echo $p | sed 's/\\([^.]*\\)\\.\\(.*\\)/p=\\1 m=\\2/'`
+ ;;
+ *) eval 'm=${p#*.}'
+ eval 'p=${p%%.*}'
+ ;;
+ esac
+ v=${m}.${v}
+ esac
+ case $config in
+ 0) m=_${v}_${p} ;;
+ 1) m=_${v}_in_${p} ;;
+ esac
+ ;;
+ *) case $p in
+ '') m=_${v} ;;
+ *) m=_${p}_${v} ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) p=
+ v=$a
+ f=$a
+ m=_${v}
+ ;;
+ esac
+ case $c in
+ '') c=$v ;;
+ esac
+ M=$m
+ case $o in
+ out) case $a in
+ -) a=-
+ ;;
+ ?*) test="$a $test"
+ a=
+ ;;
+ esac
+ ;;
+ *) case " $idyes " in
+ *" $m "*)
+ i=1
+ ;;
+ *) case " $idno " in
+ *" $m "*)
+ i=0
+ ;;
+ *) case $m in
+ *'*') m=`echo "$m" | sed 's,\*,_ptr,g'` ;;
+ esac
+ case $m in
+ *[-+/\\]*)
+ i=0
+ ;;
+ *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*)
+ is id $m
+ copy $tmp.c "int $m = 0;"
+ if compile $cc -c $tmp.c
+ then success -
+ idyes="$idyes $m"
+ i=1
+ else failure -
+ idno="$idno $m"
+ i=0
+ fi
+ ;;
+ *) i=1
+ ;;
+ esac
+ ;;
+ esac
+ case $i in
+ 0) case $o in
+ dat|dfn|key|lib|mac|mth|nos|npt|siz|sym|typ|val)
+ continue
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case $m in
+ *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*)
+ m=`echo "X$m" | sed -e 's,^.,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g'`
+ ;;
+ esac
+
+ # check output redirection
+
+ case $out in
+ $cur) ;;
+ *) case $cur in
+ $a|$c) ;;
+ *) case $cur in
+ .) ;;
+ *) case $vers in
+ ?*) echo
+ for api in $vers
+ do API=`echo $api | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
+ eval ver='${'ver_${api}'}'
+ echo "#define ${API}_VERSION ${ver}"
+ done
+ esac
+ case $apis in
+ ?*) for api in $apis
+ do API=`echo $api | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
+ echo "#define ${API}API(rel) ( _BLD_${api} || !_API_${api} || _API_${api} >= rel )"
+ map=
+ sep=
+ eval syms='"${'api_sym_${api}'}"'
+ # old solaris requires -k<space><junk> #
+ set x x `echo "$syms" | sort -t: -u -k 1,1 -k 2,2nr 2>/dev/null | sed 's/:/ /'`
+ case $# in
+ 2) # ancient sort doesn't have -k #
+ set x x `echo "$syms" | sort -t: -u +0 -1 +1 -2nr 2>/dev/null | sed 's/:/ /'`
+ ;;
+ esac
+ sym=
+ while :
+ do shift 2
+ case $# in
+ [01]) break ;;
+ esac
+ prv=$sym
+ sym=$1
+ rel=$2
+ case $prv in
+ $sym) echo "#elif _API_${api} >= $rel"
+ ;;
+ *) case $prv in
+ '') echo
+ echo "#if !defined(_API_${api}) && defined(_API_DEFAULT)"
+ echo "#define _API_${api} _API_DEFAULT"
+ echo "#endif"
+ ;;
+ *) echo "#endif"
+ ;;
+ esac
+ echo
+ echo "#if ${API}API($rel)"
+ ;;
+ esac
+ echo "#undef ${sym}"
+ echo "#define ${sym} ${sym}_${rel}"
+ map=$map$sep${sym}_${rel}
+ sep=' '
+ done
+ echo "#endif"
+ echo
+ echo "#define _API_${api}_MAP \"$map\""
+ done
+ echo
+ ;;
+ esac
+ case $iff in
+ ?*) echo "#endif" ;;
+ esac
+ case $cur in
+ -) ;;
+ *) exec >/dev/null
+ case $cur in
+ *[\\/]*|*.h) x=$cur ;;
+ *) x=$dir/$cur ;;
+ esac
+ case $define in
+ n) sed '/^#/d' $tmp.h > $tmp.c
+ sed '/^#/d' $x > $tmp.t
+ ;;
+ *) (proto -r $protoflags $tmp.h) >/dev/null 2>&1
+ sed 's,/\*[^/]*\*/, ,g' $tmp.h > $tmp.c
+ sed 's,/\*[^/]*\*/, ,g' $x > $tmp.t
+ ;;
+ esac
+ if cmp -s $tmp.c $tmp.t
+ then rm -f $tmp.h
+ case $verbose in
+ 1) echo "$command: $x: unchanged" >&$stderr ;;
+ esac
+ else case $x in
+ ${dir}[\\/]$cur) test -d $dir || mkdir $dir || exit 1 ;;
+ esac
+ mv $tmp.h $x
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ case $out in
+ +) case $status in
+ 1) ;;
+ *) status=0 ;;
+ esac
+ exit $status
+ ;;
+ -) eval "exec >&$stdout"
+ ;;
+ *) exec >$tmp.h
+ ;;
+ esac
+ case $out in
+ "") case $a in
+ *[\\/]*|???????????????*) cur=$c ;;
+ *) cur=$a ;;
+ esac
+ ;;
+ *) cur=$out
+ ;;
+ esac
+ case $in in
+ ""|-|+) case $o in
+ run) x=" from $a" ;;
+ *) x= ;;
+ esac
+ ;;
+ *) x=" from $in"
+ ;;
+ esac
+
+ # output header comments
+
+ case $define in
+ n) ;;
+ ?) echo "/* : : generated$x by $command version $version : : */"
+ for x in $pragma
+ do echo "#pragma $x"
+ done
+ case $out in
+ ""|-|+) x=$m
+ ;;
+ *.*) case $shell in
+ bsh) eval `echo $in | sed -e 's,\\.,_,g' -e 's/^/x=/'`
+ ;;
+ *) i=$out
+ x=_
+ while :
+ do case $i in
+ *.*) eval 'x=$x${i%%.*}_'
+ eval 'i=${i#*.}'
+ ;;
+ *) x=$x$i
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+ ;;
+ *) x=_$out
+ ;;
+ esac
+ case $o in
+ iff) case $M in
+ ""|*-*) ;;
+ *) iff=${m}_H ;;
+ esac
+ ;;
+ *) case $regress in
+ '') case $x in
+ *-*) ;;
+ *) x=`pwd | sed -e 's,.*[\\\\/],,' -e 's,\\..*,,' -e 's,^lib,,' -e 's,^,'${x}_',' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g'`
+ # ksh n+ bug workaround
+ case $x in
+ *[!_]*) ;;
+ *) x=_$$ ;;
+ esac
+ iff=_def${x}
+ ;;
+ esac
+ ;;
+ *) case $x in
+ *-*) ;;
+ *) iff=_REGRESS
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case $iff in
+ ?*) echo "#ifndef $iff"
+ echo "#define $iff 1"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case $can in
+ ?*) case $define in
+ 1) echo "$can" ;;
+ n) echo "$nan" ;;
+ esac
+ can=
+ nan=
+ cansep=
+ ;;
+ esac
+
+ # set up the candidate include list
+
+ pre=
+ inc=
+ for x in $defhdr - $hdr
+ do case $x in
+ -) case $pre in
+ ?*) continue ;;
+ esac
+ case $v in
+ *.*) for x in `echo $v | sed 's,\\., ,g'`
+ do pre="$pre
+#undef $x"
+ done
+ ;;
+ *) case $o in
+ siz|typ)case $v in
+ char|short|int|long)
+ ;;
+ *) pre="#undef $v"
+ ;;
+ esac
+ ;;
+ *) pre="#undef $v"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *.h) case $shell in
+ bsh) eval `echo $x | sed -e 's,^\\([^\\\\/]*\\).*[\\\\/]\\([^\\\\/]*\\)\$,\\1_\\2,' -e 's/\\..*//' -e 's/^/c=/'`
+ ;;
+ *) eval 'c=${x##*[\\/]}'
+ eval 'c=${c%%.*}'
+ case $x in
+ */*) eval 'c=${x%%[\\/]*}_${c}' ;;
+ esac
+ ;;
+ esac
+ case $config in
+ 0) case $x in
+ */*) c=_${c} ;;
+ *) c=_hdr_${c} ;;
+ esac
+ ;;
+ 1) case $shell in
+ ksh) typeset -u u=$c ;;
+ *) u=`echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;
+ esac
+ c=HAVE_${u}_H
+ ;;
+ esac
+ case " $puthdr " in
+ *" $c "*)
+ ;;
+ *) puthdr="$puthdr $c"
+ usr="$usr$nl#define $c 1"
+ ;;
+ esac
+ inc="$inc
+#include <$x>"
+ ;;
+ esac
+ done
+
+ # set up the candidate lib list
+
+ for x in $lib $deflib
+ do case $shell in
+ ksh) eval 'c=${x#-l}' ;;
+ *) c=`echo X$x | sed 's,X-l,,'` ;;
+ esac
+ case $c in
+ *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*)
+ c=`echo '' $c | sed -e 's,.*[\\\\/],,' -e 's,\.[^.]*$,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g' -e '/^lib./s,^lib,,'`
+ ;;
+ esac
+ case $config in
+ 0) c=_LIB_${c}
+ ;;
+ 1) case $shell in
+ ksh) typeset -u u=$c ;;
+ *) u=`echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;
+ esac
+ c=HAVE_${u}_LIB
+ ;;
+ esac
+ case " $putlib " in
+ *" $c "*)
+ ;;
+ *) putlib="$putlib $c"
+ usr="$usr$nl#define $c 1"
+ ;;
+ esac
+ done
+
+ # src overrides builtin test
+
+ case $config:$def in
+ 0:) case $o in
+ tst|var);;
+ *) m=_${o}${m} ;;
+ esac
+ ;;
+ 1:) case $o in
+ tst|var)m=${v} ;;
+ esac
+ case $shell in
+ ksh) typeset -u u=$m ;;
+ *) u=`echo $m | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;
+ esac
+ case $o in
+ tst|var)case $m in
+ $u) ;;
+ *) case $m in
+ hdr_*|lib_*|sys_*)
+ case $shell in
+ ksh) u=${u#????} ;;
+ *) u=`echo $u | sed 's/....//'` ;;
+ esac
+ ;;
+ esac
+ m=HAVE_${u}
+ ;;
+ esac
+ ;;
+ dat) m=HAVE${u}_DATA ;;
+ hdr|lcl)m=HAVE${u}_H ;;
+ key) m=HAVE${u}_RESERVED ;;
+ mth) m=HAVE${u}_MATH ;;
+ npt) m=HAVE${u}_DECL ;;
+ pth) m=${u}_PATH
+ case $shell in
+ ksh) m=${m#_} ;;
+ *) m=`echo $m | sed 's,^_,,'` ;;
+ esac
+ ;;
+ nxt) m=HAVE${u}_NEXT ;;
+ siz) m=SIZEOF${u} ;;
+ sys) m=HAVE_SYS${u}_H ;;
+ *) m=HAVE${u} ;;
+ esac
+ ;;
+ *) m=$def
+ M=$m
+ ;;
+ esac
+ case $src in
+ ?*) case $src in
+ $noext) EXT= ;;
+ *) EXT="$tst
+$ext"
+ ;;
+ esac
+ copy $tmp.c "$std
+$EXT
+$usr
+$inc
+$src
+"
+ V=1
+ e=0
+ is tst "${note:-$run}"
+ case $run in
+ cat*|nocat*)
+ copy - "$src"
+ ;;
+ cross*|nocross*)
+ copy $tmp.sh "$src"
+ chmod +x $tmp.sh
+ execute $tmp.sh <&$nullin || e=1
+ ;;
+ run*|norun*)
+ (eval "$src") <&$nullin || e=1
+ ;;
+ mac*|nomac*)
+ if compile $cc -E -P $tmp.c <&$nullin >$tmp.i
+ then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i
+ else e=1
+ fi
+ ;;
+ p*|nop*)compile $cc -DTEST=$p -DID=$v -E $tmp.c <&$nullin >&$nullout || e=1
+ ;;
+ c*|noc*)compile $cc -DTEST=$p -DID=$v -c $tmp.c <&$nullin >&$nullout || e=1
+ ;;
+ *) case $run in
+ status*)ccflags=
+ ;;
+ s*|nos*)case $reallystatictest in
+ '') #UNDENT...
+
+ reallystatictest=.
+ echo "$tst
+$ext
+int main(){printf("hello");return(0);}" > ${tmp}s.c
+ rm -f ${tmp}s.exe
+ if compile $cc -c ${tmp}s.c <&$nullin >&$nullout &&
+ compile $cc -o ${tmp}s.exe ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e &&
+ $executable ${tmp}s.exe
+ then e=`wc -l ${tmp}s.e`
+ eval set x x $binding
+ while :
+ do shift
+ shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f ${tmp}s.exe
+ compile $cc -o ${tmp}s.exe $1 ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e && $executable ${tmp}s.exe || continue
+ case `wc -l ${tmp}s.e` in
+ $e) ;;
+ *) continue ;;
+ esac
+ d=`ls -s ${tmp}s.exe`
+ rm -f ${tmp}s.exe
+ compile $cc -o ${tmp}s.exe $2 ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e && $executable ${tmp}s.exe || continue
+ case `wc -l ${tmp}s.e` in
+ $e) ;;
+ *) continue ;;
+ esac
+ case `ls -s ${tmp}s.exe` in
+ $d) ;;
+ *) reallystatic=$2
+ set x
+ shift
+ break
+ ;;
+ esac
+ done
+ fi
+ rm -f ${tmp}s.*
+ #...INDENT
+ ;;
+ esac
+ ccflags=$reallystatic
+ ;;
+ *) ccflags=
+ ;;
+ esac
+ set x $mac
+ e=1
+ while :
+ do o=
+ shift
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ -) break ;;
+ esac
+ o="$o $1"
+ shift
+ done
+ rm -f $tmp.exe
+ if compile $cc $ccflags $o -DTEST=$p -DID=$v -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout && $executable $tmp.exe
+ then case $run in
+
+ status*)execute $tmp.exe <&$nullin >&$nullout
+ V=$?
+ case $V in
+ 0) e=1 ;;
+ *) e=0 ;;
+ esac
+ break
+ ;;
+ no[ls]*);;
+ [ls]*) e=0 && break ;;
+ noo*) execute $tmp.exe <&$nullin >$tmp.out || break ;;
+ o*) execute $tmp.exe <&$nullin >$tmp.out && e=0 && break ;;
+ no*) execute $tmp.exe <&$nullin >&$nullout || break ;;
+ *) execute $tmp.exe <&$nullin >&$nullout && e=0 && break ;;
+
+ esac
+ else case $run in
+ no[els]*)e=1 && break ;;
+ esac
+ fi
+ case $# in
+ 0) case $run in
+ no*) e=0 ;;
+ esac
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+ o=1
+ case $run in
+ no*) case $e in
+ 0) e=1 ;;
+ *) e=0 ;;
+ esac
+ ;;
+ esac
+ case $run in
+ o*|noo*)case $e in
+ 0) cat $tmp.out ;;
+ esac
+ rm -f $tmp.out
+ ;;
+ esac
+ report $e $V "${note:-$run\ passed}" "${note:-$run} failed"
+ continue
+ ;;
+ esac
+
+ # initialize common builtin state
+
+ case $o in
+ dat|lib|mth|run)
+ case $statictest in
+ "") statictest=FoobaR
+ copy $tmp.c "
+$tst
+$ext
+$std
+$usr
+_BEGIN_EXTERNS_
+extern int $statictest;
+_END_EXTERNS_
+int main(){char* i = (char*)&$statictest; return ((unsigned int)i)^0xaaaa;}
+"
+ rm -f $tmp.exe
+ if compile $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout && $executable $tmp.exe
+ then case $static in
+ .) static=
+ copy $tmp.c "
+$tst
+$ext
+int main(){printf("hello");return(0);}
+"
+ rm -f $tmp.exe
+ if compile $cc -c $tmp.c <&$nullin >&$nullout &&
+ compile $cc -o $tmp.exe $tmp.o <&$nullin >&$nullout &&
+ $executable $tmp.exe
+ then e=`wc -l $tmp.e`
+ eval set x x $binding
+ while :
+ do shift
+ shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f $tmp.exe
+ compile $cc -o $tmp.exe $1 $tmp.o <&$nullin >&$nullout && $executable $tmp.exe || continue
+ case `wc -l $tmp.e` in
+ $e) ;;
+ *) continue ;;
+ esac
+ d=`ls -s $tmp.exe`
+ rm -f $tmp.exe
+ compile $cc -o $tmp.exe $2 $tmp.o <&$nullin >&$nullout && $executable $tmp.exe || continue
+ case `wc -l $tmp.e` in
+ $e) ;;
+ *) continue ;;
+ esac
+ case `ls -s $tmp.exe` in
+ $d) ;;
+ *) static=$2
+ set x
+ shift
+ break
+ ;;
+ esac
+ done
+ fi
+ ;;
+ esac
+ else static=
+ fi
+ ;;
+ esac
+ ;;
+ esac
+
+ # builtin tests
+
+ case $o in
+ api) ;;
+ cmd) case $p in
+ ?*) continue ;;
+ esac
+ is $o $a
+ k=1
+ for j in "" usr
+ do case $j in
+ "") d= s= ;;
+ *) d=/$j s=_$j ;;
+ esac
+ for i in bin etc ucb
+ do if test -f $altroot/$d/$i/$a
+ then case $k in
+ 1) k=0
+ case $M in
+ *-*) ;;
+ *) usr="$usr$nl#define $m 1"
+ case $define in
+ 1) echo "#define $m 1 /* $a in ?(/usr)/(bin|etc|ucb) */" ;;
+ n) echo "$m=1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ c=${s}_${i}_${v}
+ usr="$usr$nl#define $c 1"
+ case $define in
+ 1) echo "#define $c 1 /* $d/$i/$a found */" ;;
+ n) echo "$c=1" ;;
+ esac
+ fi
+ done
+ done
+ case $k in
+ 0) success ;;
+ 1) failure ;;
+ esac
+ ;;
+ dat) case $p in
+ ?*) continue ;;
+ esac
+ {
+ copy - "
+$tst
+$ext
+$std
+$usr
+$pre
+"
+ case $inc in
+ ?*) echo "$inc"
+ ;;
+ *) echo "_BEGIN_EXTERNS_
+extern int $v;
+_END_EXTERNS_"
+ ;;
+ esac
+ echo "
+#ifdef _DLL
+#define _REF_
+#else
+#define _REF_ &
+#endif
+int main(){char* i = (char*) _REF_ $v; return ((unsigned int)i)^0xaaaa;}"
+ } > $tmp.c
+ is $o $v
+ rm -f $tmp.exe
+ compile $cc -c $tmp.c <&$nullin >&$nullout &&
+ compile $cc $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout &&
+ $executable $tmp.exe
+ report $? 1 "$v in default lib(s)" "$v not in default lib(s)"
+ ;;
+ dfn) case $p in
+ ?*) continue ;;
+ esac
+ is dfn $v
+ echo "$pre
+$tst
+$ext
+$inc
+#ifdef $v
+<<\"#ifndef $v\">>
+<<\"#define $v\">> $v <<\"/* native $v */\">>
+<<\"#endif\">>
+#endif" > $tmp.c
+ if compile $cc -E -P $tmp.c <&$nullin >$tmp.i
+ then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i > $tmp.t
+ if test -s $tmp.t
+ then success
+ cat $tmp.t
+ else failure
+ fi
+ else failure
+ fi
+ ;;
+ exp) case $test in
+ '') echo "$command: $file$sline: test expression expected for $o" >&$stderr
+ exit 1
+ ;;
+ esac
+ case $a in
+ -|'') ;;
+ *) eval x='$'$a
+ case $x in
+ 1) result=FAILURE
+ continue
+ ;;
+ esac
+ ;;
+ esac
+ case $test in
+ [01]|'"'*'"'|'<'*'>')
+ case $a in
+ -|'') ;;
+ *) case $define$note in
+ 1) echo "#define $a $test" ;;
+ 1*) echo "#define $a $test /* $note */" ;;
+ n) echo "$a=$test" ;;
+ esac
+ eval $a='$test'
+ ;;
+ esac
+ ;;
+ *) case $note in
+ '') note=$test ;;
+ esac
+ case $test in
+ '') c=1
+ ;;
+ *) is exp "$note"
+ x=
+ for i in `echo '' $test | sed 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_], & ,g'`
+ do case $i in
+ [\ \ ])
+ ;;
+ [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]*)
+ eval i='${'$i'}'
+ case $i in
+ '') i=0
+ ;;
+ '"'*'"');;
+ *[!-+0123456789]*)
+ case $i in
+ *'"'*) i=1 ;;
+ *) i='"'$i'"' ;;
+ esac
+ ;;
+ esac
+ x="$x $i"
+ ;;
+ '!') x="$x 0 ="
+ ;;
+ '&'|'|')case $x in
+ *"$i") ;;
+ *) x="$x \\$i" ;;
+ esac
+ ;;
+ *) x="$x \\$i"
+ ;;
+ esac
+ done
+ c=`eval expr $x 2>&$stderr`
+ ;;
+ esac
+ case $c in
+ 0) c=1 ;;
+ *) c=0 ;;
+ esac
+ M=$a
+ m=$a
+ report $c 1 "$note is true" "$note is false"
+ ;;
+ esac
+ ;;
+ hdr|lcl|nxt|sys)
+ case $o in
+ lcl|nxt)case $M in
+ *-*) continue ;;
+ esac
+ eval x='$'_$m
+ case $x in
+ ?*) continue ;;
+ esac
+ eval _$m=1
+ is $o $f
+ echo "$pre
+$tst
+$ext
+$inc
+#include <$f.h>" > $tmp.c
+ case $f in
+ sys/*) e= ;;
+ *) e='-e /[\\\\\/]sys[\\\\\/]'$f'\\.h"/d' ;;
+ esac
+ if compile $cc -E $tmp.c <&$nullin >$tmp.i
+ then i=`sed -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:]*[\\\\\/].*[\\\\\/]'$f'\\.h"/!d' $e -e s'/.*"\\(.*\\)".*/\\1/' -e 's,\\\\,/,g' -e 's,///*,/,g' $tmp.i | sed 1q`
+ case $i in
+ [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]:[\\/]*)
+ ;;
+ */*/*) k=`echo "$i" | sed 's,.*/\([^/]*/[^/]*\)$,../\1,'`
+ echo "$pre
+$tst
+$ext
+$inc
+#include <$k>" > $tmp.c
+ if compile $cc -E $tmp.c <&$nullin >$tmp.i
+ then j=`sed -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:]*[\\\\\/].*[\\\\\/]'$f'\\.h"/!d' $e -e s'/.*"\\(.*\\)".*/\\1/' -e 's,\\\\,/,g' -e 's,///*,/,g' $tmp.i | sed 1q`
+ wi=`wc < "$i"`
+ wj=`wc < "$j"`
+ case $wi in
+ $wj) i=$k ;;
+ esac
+ fi
+ ;;
+ *) echo "$pre
+$tst
+$ext
+$inc
+#include <../include/$f.h>" > $tmp.c
+ if compile $cc -E $tmp.c <&$nullin >&$nullout
+ then i=../include/$f.h
+ fi
+ ;;
+ esac
+ else i=
+ fi
+ case $i in
+ [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]:[\\/]*|[\\/]*)
+ success
+ case $o in
+ lcl) echo "#if defined(__STDPP__directive)"
+ echo "__STDPP__directive pragma pp:hosted"
+ echo "#endif"
+ echo "#include <$i> /* the native <$f.h> */"
+ echo "#undef $m"
+ usr="$usr$nl#define $m 1"
+ echo "#define $m 1"
+ ;;
+ nxt) echo "#define $m <$i> /* include path for the native <$f.h> */"
+ echo "#define ${m}_str \"$i\" /* include string for the native <$f.h> */"
+ usr="$usr$nl#define $m <$i>$nl#define ${m}_str \"$i\""
+ eval $m=\\\<$i\\\>
+ ;;
+ esac
+ break
+ ;;
+ ../*/*) success
+ case $o in
+ lcl) echo "#include <$i> /* the native <$f.h> */"
+ echo "#undef $m"
+ usr="$usr$nl#define $m 1"
+ echo "#define $m 1"
+ eval $m=1
+ ;;
+ nxt) echo "#define $m <$i> /* include path for the native <$f.h> */"
+ echo "#define ${m}_str \"$i\" /* include string for the native <$f.h> */"
+ usr="$usr$nl#define $m <$i>$nl#define ${m}_str \"$i\""
+ eval $m=\\\<$i\\\>
+ ;;
+ esac
+ break
+ ;;
+ *) failure
+ case $o in
+ lcl) case $all$config$undef in
+ ?1?|??1)echo "#undef $m /* no native <$f.h> */" ;;
+ 1??) echo "#define $m 0 /* no native <$f.h> */" ;;
+ esac
+ eval $m=0
+ ;;
+ nxt) case $all$config$undef in
+ ?1?|??1)echo "#undef $m /* no include path for the native <$f.h> */" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) case $o in
+ hdr) x=$f.h ;;
+ sys) x=sys/$f.h ;;
+ esac
+ case " $gothdr " in
+ *" - $x "*)
+ failure +
+ ;;
+ *" + $x "*)
+ success +
+ ;;
+ *) echo "
+$tst
+$ext
+$allinc
+$inc
+#include <$x>" > $tmp.c
+ if is_hdr $x
+ then gothdr="$gothdr + $x"
+ case $M in
+ *-*) ;;
+ *) case " $puthdr " in
+ *" $m "*)
+ ;;
+ *) puthdr="$puthdr $m"
+ usr="$usr$nl#define $m 1"
+ ;;
+ esac
+ case $define in
+ 1) echo "#define $m 1 /* #include <$x> ok */" ;;
+ n) echo "$m=1" ;;
+ esac
+ eval $m=1
+ ;;
+ esac
+ else gothdr="$gothdr - $x"
+ case $M in
+ *-*) ;;
+ *) case $define$all$config$undef in
+ 1?1?|1??1)echo "#undef $m /* #include <$x> not ok */" ;;
+ 11??) echo "#define $m 0 /* #include <$x> not ok */" ;;
+ n1?1) echo "$m=" ;;
+ n1??) echo "$m=0" ;;
+ esac
+ eval $m=0
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ esac
+ ;;
+ iff) ;;
+ ini) ;;
+ key) case $p in
+ ?*) continue ;;
+ esac
+ w=$v
+ while :
+ do is $o $w
+ echo "$pre
+$tst
+$ext
+int f(){int $w = 1;return($w);}" > $tmp.c
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then failure
+ case $set in
+ *" ="|*" = "*)
+ set x $set
+ shift
+ w=
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ =) break ;;
+ esac
+ case $w in
+ '') w=$1 ;;
+ *) w="$w $1" ;;
+ esac
+ shift
+ done
+ case $1 in
+ =) shift
+ case $# in
+ 0) set=" " ;;
+ *) set=$* ;;
+ esac
+ ;;
+ *) set=
+ ;;
+ esac
+ case $shell in
+ ksh) typeset -u u=$w ;;
+ *) u=`echo $w | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ;;
+ esac
+ u=_$u
+ M=$w
+ case $M in
+ *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*)
+ M=`echo "X$m" | sed -e 's,^.,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g'`
+ ;;
+ esac
+ case $config in
+ 1) m=HAVE${u}_RESERVED ;;
+ *) m=_key_${w} ;;
+ esac
+ continue
+ ;;
+ esac
+ report - 1 - - "$w is not a reserved keyword" "default for reserved keyword $v"
+ else report 0 1 "$w is a reserved keyword" -
+ case $M in
+ *-*) ;;
+ *) case $define$w in
+ 1$v) ;;
+ 1*) echo "#define $v $w /* alternate for reserved keyword $v */" ;;
+ n*) echo "$v=$w" ;;
+ esac
+ ;;
+ esac
+ fi
+ break
+ done
+ ;;
+ lib|mth)case $p in
+ ?*) continue ;;
+ esac
+ case $v in
+ -) continue ;;
+ esac
+ is $o $v
+ copy $tmp.c "
+$tst
+$ext
+$std
+$usr
+$pre
+$inc
+typedef int (*_IFFE_fun)();
+#ifdef _IFFE_extern
+_BEGIN_EXTERNS_
+extern int $v();
+_END_EXTERNS_
+#endif
+static _IFFE_fun i=(_IFFE_fun)$v;int main(){return ((unsigned int)i)^0xaaaa;}
+"
+ d=-D_IFFE_extern
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then d=
+ elif compile $cc $d -c $tmp.c <&$nullin >&$nullout
+ then :
+ else d=error
+ fi
+ if test error != "$d"
+ then rm -f $tmp.exe
+ if compile $cc $d $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout &&
+ $executable $tmp.exe
+ then case $o in
+ lib) c=0 ;;
+ *) c=1 ;;
+ esac
+ report $c 1 "$v() in default lib(s)" "$v() not in default lib(s)" "default for function $v()"
+ else case $o in
+ mth) rm -f $tmp.exe
+ compile $cc $d $static -o $tmp.exe $tmp.o -lm <&$nullin >&$nullout &&
+ $executable $tmp.exe
+ report $? 1 "$v() in math lib" "$v() not in math lib" "default for function $v()"
+ ;;
+ *) report 1 1 - "$v() not in default lib(s)" "default for function $v()"
+ ;;
+ esac
+ fi
+ else case $intrinsic in
+ '') copy $tmp.c "
+$tst
+$ext
+$std
+$usr
+$pre
+$inc
+_BEGIN_EXTERNS_
+extern int foo();
+_END_EXTERNS_
+static int ((*i)())=foo;int main(){return(i==0);}
+"
+ compile $cc -c $tmp.c <&$nullin >&$nullout
+ intrinsic=$?
+ ;;
+ esac
+ case $o in
+ mth) report $intrinsic 1 "$v() in math lib" "$v() not in math lib" "default for function $v()" ;;
+ *) report $intrinsic 1 "$v() in default lib(s)" "$v() not in default lib(s)" "default for function $v()" ;;
+ esac
+ fi
+ ;;
+ mac) case $p in
+ ?*) continue ;;
+ esac
+ is mac $v
+ echo "
+$tst
+$ext
+$pre
+$inc
+#ifdef $v
+'$m:$v'
+#endif" > $tmp.c
+ compile $cc -E $tmp.c <&$nullin | grep -c "'$m:$v'" >&$nullout
+ report $? 1 "$v is a macro" "$v is not a macro" "default for macro $v"
+ ;;
+ mem) case $p in
+ ?*) eval i='$'_iffe_typedef_$p
+ case $i in
+ 0|1) ;;
+ *) echo "$pre
+$tst
+$ext
+$inc
+static $p i;
+int n = sizeof(i);" > $tmp.c
+ is typ $p
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then success -
+ eval _iffe_typedef_$p=1
+ i=1
+ else failure -
+ eval _iffe_typedef_$p=0
+ i=0
+ fi
+ ;;
+ esac
+ case $i in
+ 0) i="$v is not a member of $p" p="struct $p" ;;
+ *) i=- ;;
+ esac
+ is mem $v "$p"
+ echo "$pre
+$tst
+$ext
+$inc
+static $p i;
+int n = sizeof(i.$v);" > $tmp.c
+ compile $cc -c $tmp.c <&$nullin >&$nullout
+ report $? 1 "$v is a member of $p" "$i"
+ ;;
+ *) p=$v
+ eval i='$'_iffe_typedef_$p
+ case $i in
+ 0|1) ;;
+ *) echo "$pre
+$tst
+$ext
+$inc
+static $p i;
+int n = sizeof(i);" > $tmp.c
+ is typ $p
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then success -
+ eval _iffe_typedef_$p=1
+ i=1
+ else failure -
+ eval _iffe_typedef_$p=0
+ i=0
+ fi
+ ;;
+ esac
+ case $i in
+ 0) i="$p is not a non-opaque struct" p="struct $p" ;;
+ *) i=- ;;
+ esac
+ is nos "$p"
+ echo "$pre
+$tst
+$ext
+$inc
+static $p i;
+int n = sizeof(i);" > $tmp.c
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then echo "$pre
+$tst
+$ext
+$inc
+static $p i;
+unsigned long f() { return (unsigned long)i; }" > $tmp.c
+ if compile $cc -c $tmp.c <&$nullin >&$nullout
+ then c=1
+ else c=0
+ fi
+ else c=1
+ fi
+ report $c 1 "$p is a non-opaque struct" "$i"
+ esac
+ ;;
+ nop) ;;
+ npt) is npt $v
+ copy $tmp.c "
+$tst
+$ext
+$std
+$usr
+$pre
+$inc
+_BEGIN_EXTERNS_
+struct _iffe_struct { int _iffe_member; };
+#if _STD_
+extern struct _iffe_struct* $v(struct _iffe_struct*);
+#else
+extern struct _iffe_struct* $v();
+#endif
+_END_EXTERNS_
+"
+ # some compilers with -O only warn for invalid intrinsic prototypes
+ case " $cc " in
+ *" -O "*) xx=`echo $cc | sed 's/ -O / /g'` ;;
+ *) xx=$cc ;;
+ esac
+ compile $xx -c $tmp.c <&$nullin >&$nullout
+ report -$config $? 1 "$v() needs a prototype" "$v() does not need a prototype"
+ ;;
+ num) is num $v
+ copy $tmp.c "
+$tst
+$ext
+$std
+$usr
+$pre
+$inc
+_BEGIN_EXTERNS_
+int _iffe_int = $v / 2;
+_END_EXTERNS_
+"
+ compile $cc -c $tmp.c <&$nullin >&$nullout
+ report $? 1 "$v is a numeric constant" "$v is not a numeric constant"
+ ;;
+ one) for i in $a $hdr
+ do x="#include <$i>"
+ case " $gothdr " in
+ *" - $i "*)
+ continue
+ ;;
+ *" + $i "*)
+ ;;
+ *) echo "$x" > $tmp.c
+ if is_hdr $x
+ then gothdr="$gothdr + $x"
+ else gothdr="$gothdr - $x"
+ continue
+ fi
+ ;;
+ esac
+ case $one in
+ "") one=$x
+ ;;
+ *"$x"*) break
+ ;;
+ *) echo "$one" > $tmp.c
+ if compile $cc -E $tmp.c <&$nullin >$tmp.i
+ then c=$i
+ case $c in
+ *[\\/]*) c=`echo $c | sed 's,[\\\\/],[\\\\/],g'` ;;
+ esac
+ case `sed -e '/^#[line ]*1[ ][ ]*"[\\\\\/].*[\\\\\/]'$c'"/!d' $tmp.i` in
+ ?*) break ;;
+ esac
+ fi
+ one="$one$nl$x"
+ ;;
+ esac
+ echo "$x"
+ break
+ done
+ ;;
+ opt) M=$m
+ is opt $a
+ case " $PACKAGE_OPTIONS " in
+ *" $a "*) c=0 ;;
+ *) c=1 ;;
+ esac
+ report $c 1 "$a is set in \$PACKAGE_OPTIONS" "$a is not set in \$PACKAGE_OPTIONS"
+ ;;
+ out|output)
+ ;;
+ pth) is pth $a
+ pkg $pth
+ tab=" "
+ e=
+ f=
+ for i in $pth
+ do case $i in
+ '{') e="${nl}}"
+ l=
+ x=i
+ v="\$${x}"
+ t=${nl}${tab}
+ b="fnd()${nl}{${t}for ${x} in"
+ ;;
+ '}') b="${b}${t}do${tab}if $exists ${v}/\${1}${t}${tab}${tab}then${tab}f=${v}/\${1}${t}${tab}${tab}${tab}return${t}${tab}${tab}fi"
+ e="${t}done${e}"
+ eval "${b}${e}"
+ fnd $a
+ case $f in
+ ?*) break ;;
+ esac
+ ;;
+ -) b="${b}${t}do${tab}test \"${v}\" = '' -o -d \"${v}\" &&${t}${tab}${tab}"
+ x=${x}i
+ v="${v}\$${x}"
+ b="${b}for ${x} in"
+ e="${t}done${e}"
+ t="${t}${tab}${tab}"
+ ;;
+ *) case $e in
+ '') if $exists ${i}/${a}
+ then f=${i}/${a}
+ break
+ fi
+ ;;
+ *) case $i in
+ /|.) b="${b} ''" ;;
+ *) b="${b} /${i}" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ case $f in
+ '') case $set in
+ ' ') f=$a ;;
+ ?*) f=$set ;;
+ esac
+ ;;
+ esac
+ case $f in
+ '') c=1
+ ;;
+ *) c=0
+ f="\"$f\""
+ ;;
+ esac
+ report $c "$f" "${note:-$a path}" "$a path not found"
+ ;;
+ run) is run $a
+ if test ! -r $a
+ then failure not found
+ case $verbose in
+ 0) echo "$command: $file$line: $a: not found" >&$stderr ;;
+ esac
+ exit 1
+ fi
+ noisy
+ case $a in
+ *.c) rm -f $tmp.exe
+ {
+ echo "$tst
+$ext
+$std
+$usr
+$inc"
+ cat $a
+ } > $tmp.c
+ compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$stderr 2>&$stderr &&
+ $executable $tmp.exe &&
+ execute $tmp.exe $opt <&$nullin
+ ;;
+ *.sh) {
+ copy - ":
+set \"cc='$cc' executable='$executable' id='$m' static='$static' tmp='$tmp'\" $opt $hdr $test"
+ cat $a
+ } > $tmp.sh
+ chmod +x $tmp.sh
+ ( . $tmp.sh ) <&$nullin
+ ;;
+ *) false
+ ;;
+ esac
+ case $? in
+ 0) success
+ ;;
+ *) failure cannot run
+ case $verbose in
+ 0) echo "$command: $file$line: $a: cannot run" >&$stderr ;;
+ esac
+ exit 1
+ ;;
+ esac
+ ;;
+ siz) case $p in
+ "") x= ;;
+ *) x="$p " ;;
+ esac
+ is siz "$x$v"
+ {
+ case $p:$v in
+ long:*|*:*[_0123456789]int[_0123456789]*)
+ echo "$pre
+$tst
+$ext
+$inc
+static $x$v i;
+$x$v f() {
+$x$v v; i = 1; v = i;"
+ echo "i = v * i; i = i / v; v = v + i; i = i - v;"
+ case $v in
+ float|double) ;;
+ *) echo "v <<= 4; i = v >> 2; i = 10; i = v % i; i |= v; v ^= i; i = 123; v &= i;" ;;
+ esac
+ echo "return v; }"
+ ;;
+ *) echo "$pre
+$inc
+struct xxx { $x$v mem; };
+static struct xxx v;
+struct xxx* f() { return &v; }"
+ ;;
+ esac
+ case $x in
+ ""|"struct "|"union ")
+ echo "int g() { return 0; }"
+ ;;
+ *) echo "int g() { return sizeof($x$v)<=sizeof($v); }" ;;
+ esac
+ copy - "
+int main() {
+ f();
+ g();
+ printf(\"%u\\n\", sizeof($x$v));
+ return 0;
+}"
+ } > $tmp.c
+ rm -f $tmp.exe $tmp.dat
+ if compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout &&
+ $executable $tmp.exe &&
+ execute $tmp.exe > $tmp.dat
+ then z=`cat $tmp.dat`
+ c=0
+ else z=0
+ c=1
+ fi
+ report $c "$z" "sizeof($x$v)" "$x$v not a type with known size"
+ ;;
+ sym) case $test in
+ "") x=$v ;;
+ *) x=$test ;;
+ esac
+ echo "$pre
+$tst
+$ext
+$inc
+'=' $x '='" > $tmp.c
+ compile $cc -E $tmp.c <&$nullin \
+ | sed \
+ -e "/'='/!d" \
+ -e "s/'='//g" \
+ -e 's/[ ]//g' \
+ -e 's/((([^()]*)))->/->/g' \
+ -e 's/(([^()]*))->/->/g' \
+ -e 's/([^()]*)->/->/g' \
+ -e 's/\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\)\[/\
+ary \1[/g' \
+ -e 's/\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\)(/\
+fun \1[/g' \
+ -e 's/\*->\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]\)/->\
+ptr \1/g' \
+ -e 's/->\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]\)/->\
+reg \1/g' \
+ -e "/^$v\$/d" \
+ -e 's/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*$/\
+nam &/g' \
+ | sed \
+ -e '/^... /!d' \
+ | LC_ALL=C sort \
+ -u \
+ | sed \
+ -e 's/\(...\) \([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\).*/#ifndef _\1_'$v'\
+#define _\1_'$v' \2\
+#define _\1_'$v'_str "\2"\
+#endif/'
+ ;;
+ typ) case $p in
+ "") x= ;;
+ *) x="$p " ;;
+ esac
+ is typ "$x$v"
+ {
+ case $p:$v in
+ long:*|*:*[_0123456789]int[_0123456789]*)
+ echo "$pre
+$tst
+$ext
+$inc
+static $x$v i;
+$x$v f() {
+$x$v v; i = 1; v = i;"
+ echo "i = v * i; i = i / v; v = v + i; i = i - v;"
+ case $v in
+ float|double) ;;
+ *) echo "v <<= 4; i = v >> 2; i = 10; i = v % i; i |= v; v ^= i; i = 123; v &= i;" ;;
+ esac
+ echo "return v; }"
+ ;;
+ *) echo "$pre
+$tst
+$ext
+$inc
+struct xxx { $x$v mem; };
+static struct xxx v;
+struct xxx* f() { return &v; }"
+ ;;
+ esac
+ case $x in
+ ""|"struct "|"union ")
+ echo "int main() { f(); return 0; }" ;;
+ *) echo "int main() { f(); return sizeof($x$v)<=sizeof($v); }" ;;
+ esac
+ } > $tmp.c
+ rm -f $tmp.exe
+ compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout &&
+ $executable $tmp.exe &&
+ execute $tmp.exe
+ report $? 1 "$x$v is a type" "$x$v is not a type" "default for type $x$v"
+ ;;
+ val) case $arg in
+ '"'*'"')echo $arg=\'$val\' ;;
+ *) echo $arg=\"$val\" ;;
+ esac
+ ;;
+ ver) ;;
+ 0) result=FAILURE
+ ;;
+ 1) result=SUCCESS
+ ;;
+ :) ;;
+ -) ;;
+ *) echo "$command: $file$line: $o: unknown feature test" >&$stderr
+ status=1
+ ;;
+ esac
+ done
+ done
+ case $not in
+ 1) case $result in
+ FAILURE) result=SUCCESS ;;
+ *) result=FAILURE ;;
+ esac
+ ;;
+ esac
+ case $result in
+ FAILURE) user_pf=$fail user_yn=$no ;;
+ *) user_pf=$pass user_yn=$yes ;;
+ esac
+ case $user_pf in
+ ?*) eval "$user_pf" <&$nullin ;;
+ esac
+ case $user_yn in
+ ?*) case $def in
+ -) ;;
+ *) case $note in
+ ?*) case $user_yn in
+ *$nl*) user_yn="/* $note */$nl$user_yn" ;;
+ *) user_yn="$user_yn /* $note */" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ copy - "$user_yn"
+ ;;
+ esac
+ case $ifelse:$result in
+ TEST:SUCCESS) ifelse=KEEP ;;
+ TEST:*) ifelse=SKIP ;;
+ esac
+ case $group:$result in
+ :*|*:SUCCESS) break ;;
+ esac
+ set '' $groups '' "$@"
+ shift
+ case $1 in
+ '') shift; break ;;
+ esac
+ shift
+
+ # set up and try the next group
+
+ hdr=$com_hdr
+ lib=$com_lib
+ mac=$com_mac
+ opt=$com_opt
+ pth=$com_pth
+ test=$com_test
+ cc="$occ $includes"
+ group=
+ groups=
+ while :
+ do case $1 in
+ '') shift; break ;;
+ esac
+ case $1 in
+ *[\"\'\(\)\{\}\ \ ]*)
+ case $op in
+ pth) pth="$pth $1"
+ ;;
+ *) case $test in
+ '') test=$1 ;;
+ *) test="$test $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ -) group=$group$1
+ groups="$groups $1"
+ ;;
+ -l*) case $group in
+ -*) groups="$groups $1" ;;
+ *) lib="$lib $1" ;;
+ esac
+ ;;
+ +l*) case $shell in
+ bsh) x=`echo X$1 | sed 's/X+/-/'` ;;
+ *) eval 'x=-${1#+}' ;;
+ esac
+ case $group in
+ -*) groups="$groups $x" ;;
+ *) lib="$lib $x" ;;
+ esac
+ ;;
+ -*|+*) case $group in
+ -*) groups="$groups $1"
+ ;;
+ *) case $op in
+ run) opt="$opt $1"
+ ;;
+ *) case $1 in
+ -D*) mac="$mac $1" ;;
+ *) cc="$cc $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *.[aAxX]|*.[dD][lL][lL]|*.[lL][iI][bB])
+ case $group in
+ -*) groups="$groups $1" ;;
+ *) lib="$lib $1" ;;
+ esac
+ ;;
+ *[.\\/]*)
+ case $group in
+ -*) groups="$groups $1"
+ ;;
+ *) case $op in
+ pth) pth="$pth $1" ;;
+ *) hdr="$hdr $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) case $group in
+ -*) groups="$groups $1"
+ ;;
+ *) case $op in
+ pth) pth="$pth $1"
+ ;;
+ *) case $test in
+ '') test=$1 ;;
+ *) test="$test $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ shift
+ done
+ done
+done
diff --git a/usr/src/contrib/ast/src/cmd/INIT/iffe.tst b/usr/src/contrib/ast/src/cmd/INIT/iffe.tst
new file mode 100644
index 0000000000..75a916674e
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/iffe.tst
@@ -0,0 +1,1945 @@
+# regression tests for the iffe command
+
+TEST 01 'command line basics'
+
+ EXEC -r -v - hdr stdio
+ OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes'
+
+ EXEC -r -v -s bsh - hdr stdio
+
+ EXEC -r -v - hdr stdio,limits
+ OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _hdr_limits 1 /* #include <limits.h> ok */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is limits.h a header ... yes'
+
+ EXEC -r -v -s bsh - hdr stdio,limits
+
+ EXEC -r -v - hdr,lib no_foo_bar,no_bar_foo stdio.h
+ OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is no_foo_bar.h a header ... no
+iffe: test: is no_bar_foo.h a header ... no
+iffe: test: is no_foo_bar a library function ... no
+iffe: test: is no_bar_foo a library function ... no'
+
+ EXEC -r -v -s bsh - hdr,lib no_foo_bar,no_bar_foo stdio.h
+
+ EXEC -r -v - hdr no_foo_bar,no_bar_foo stdio.h : lib no_foo_bar,no_bar_foo stdio.h
+
+ EXEC -r -v -s bsh - hdr no_foo_bar,no_bar_foo stdio.h : lib no_foo_bar,no_bar_foo stdio.h
+
+TEST 02 'file input basics'
+
+ EXEC -r -v - t1.iffe
+ INPUT t1.iffe $'hdr stdio'
+ OUTPUT - $'/* : : generated from t1.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes'
+
+ EXEC -r -v -s bsh - t1.iffe
+
+ EXEC -r -v - t2.iffe
+ INPUT t2.iffe $'hdr stdio,limits'
+ OUTPUT - $'/* : : generated from t2.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _hdr_limits 1 /* #include <limits.h> ok */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is limits.h a header ... yes'
+
+ EXEC -r -v -s bsh - t2.iffe
+
+ EXEC -r -v - t3.iffe
+ INPUT t3.iffe $'hdr,lib no_foo_bar,no_bar_foo stdio.h'
+ OUTPUT - $'/* : : generated from t3.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is no_foo_bar.h a header ... no
+iffe: test: is no_bar_foo.h a header ... no
+iffe: test: is no_foo_bar a library function ... no
+iffe: test: is no_bar_foo a library function ... no'
+
+ EXEC -r -v -s bsh - t3.iffe
+
+ EXEC -r -v - t3.iffe
+ INPUT t3.iffe $'hdr no_foo_bar,no_bar_foo stdio.h
+lib no_foo_bar,no_bar_foo stdio.h'
+
+ EXEC -r -v -s bsh - t3.iffe
+
+TEST 03 'nested if'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if hdr stdio
+ if lib open {
+ HIT 1
+ }
+ elif lib close {
+ HIT 2
+ }
+ else {
+ HIT 3
+ }
+ endif
+elif hdr limits {
+ HIT 4
+}
+else {
+ HIT 5
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _lib_open 1 /* open() in default lib(s) */
+ HIT 1
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is open a library function ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if hdr _XXX_stdio
+ if lib open {
+ HIT 1
+ }
+ elif lib close {
+ HIT 2
+ }
+ else {
+ HIT 3
+ }
+ endif
+elif hdr limits {
+ HIT 4
+}
+else {
+ HIT 5
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_limits 1 /* #include <limits.h> ok */
+HIT 4
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is _XXX_stdio.h a header ... no
+iffe: test: is limits.h a header ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if hdr _XXX_stdio
+ if lib open {
+ HIT 1
+ }
+ elif lib close {
+ HIT 2
+ }
+ else {
+ HIT 3
+ }
+ endif
+elif hdr _XXX_limits {
+ HIT 4
+}
+else {
+ HIT 5
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+HIT 5
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is _XXX_stdio.h a header ... no
+iffe: test: is _XXX_limits.h a header ... no'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if hdr stdio
+ if lib _XXX_open {
+ HIT 1
+ }
+ elif lib close {
+ HIT 2
+ }
+ else {
+ HIT 3
+ }
+ endif
+elif hdr limits {
+ HIT 4
+}
+else {
+ HIT 5
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _lib_close 1 /* close() in default lib(s) */
+ HIT 2
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is _XXX_open a library function ... no
+iffe: test: is close a library function ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if hdr stdio
+ if lib _XXX_open {
+ HIT 1
+ }
+ elif lib _XXX_close {
+ HIT 2
+ }
+ else {
+ HIT 3
+ }
+ endif
+elif hdr limits {
+ HIT 4
+}
+else {
+ HIT 5
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+ HIT 3
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is _XXX_open a library function ... no
+iffe: test: is _XXX_close a library function ... no'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if mem stat.st_atime sys/types.h sys/stat.h {
+ #define ATIME 1
+}
+elif mem stat.st_ctime sys/types.h sys/stat.h {
+ #define CTIME 1
+}
+elif mem stat.st_mtime sys/types.h sys/stat.h {
+ #define MTIME 1
+}
+else pass{ no_stat_time=1 }end {
+ #define NOTIME 1
+}
+endif
+if ( !no_stat_time ) {
+ #define YESTIME 1
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _sys_stat 1 /* #include <sys/stat.h> ok */
+#define _mem_st_atime_stat 1 /* st_atime is a member of struct stat */
+#define ATIME 1
+
+#define YESTIME 1
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is sys/stat.h a header ... yes
+iffe: test: is stat a type or typedef ... no
+iffe: test: is st_atime a member of struct stat ... yes
+iffe: test: is ( !no_stat_time ) true ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if mem foo_stat.st_atime sys/types.h sys/stat.h {
+ #define ATIME 1
+}
+elif mem stat.st_ctime sys/types.h sys/stat.h {
+ #define CTIME 1
+}
+elif mem stat.st_mtime sys/types.h sys/stat.h {
+ #define MTIME 1
+}
+else pass{ no_stat_time=1 }end {
+ #define NOTIME 1
+}
+endif
+if ( !no_stat_time ) {
+ #define YESTIME 1
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _sys_stat 1 /* #include <sys/stat.h> ok */
+#define _mem_st_ctime_stat 1 /* st_ctime is a member of struct stat */
+#define CTIME 1
+
+#define YESTIME 1
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is sys/stat.h a header ... yes
+iffe: test: is foo_stat a type or typedef ... no
+iffe: test: is st_atime a member of struct foo_stat ... no
+iffe: test: is stat a type or typedef ... no
+iffe: test: is st_ctime a member of struct stat ... yes
+iffe: test: is ( !no_stat_time ) true ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if mem foo_stat.st_atime sys/types.h sys/stat.h {
+ #define ATIME 1
+}
+elif mem foo_stat.st_ctime sys/types.h sys/stat.h {
+ #define CTIME 1
+}
+elif mem stat.st_mtime sys/types.h sys/stat.h {
+ #define MTIME 1
+}
+else pass{ no_stat_time=1 }end {
+ #define NOTIME 1
+}
+endif
+if ( !no_stat_time ) {
+ #define YESTIME 1
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _sys_stat 1 /* #include <sys/stat.h> ok */
+#define _mem_st_mtime_stat 1 /* st_mtime is a member of struct stat */
+#define MTIME 1
+
+#define YESTIME 1
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is sys/stat.h a header ... yes
+iffe: test: is foo_stat a type or typedef ... no
+iffe: test: is st_atime a member of struct foo_stat ... no
+iffe: test: is st_ctime a member of struct foo_stat ... no
+iffe: test: is stat a type or typedef ... no
+iffe: test: is st_mtime a member of struct stat ... yes
+iffe: test: is ( !no_stat_time ) true ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff ifelse
+if mem foo_stat.st_atime sys/types.h sys/stat.h {
+ #define ATIME 1
+}
+elif mem foo_stat.st_ctime sys/types.h sys/stat.h {
+ #define CTIME 1
+}
+elif mem foo_stat.st_mtime sys/types.h sys/stat.h {
+ #define MTIME 1
+}
+else pass{ no_stat_time=1 }end {
+ #define NOTIME 1
+}
+endif
+if ( !no_stat_time ) {
+ #define YESTIME 1
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _ifelse_H
+#define _ifelse_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _sys_stat 1 /* #include <sys/stat.h> ok */
+#define NOTIME 1
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is sys/stat.h a header ... yes
+iffe: test: is foo_stat a type or typedef ... no
+iffe: test: is st_atime a member of struct foo_stat ... no
+iffe: test: is st_ctime a member of struct foo_stat ... no
+iffe: test: is st_mtime a member of struct foo_stat ... no
+iffe: test: is ( !no_stat_time ) true ... no'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'set explicit
+iff previous
+hdr stdio
+if hdr stdio {
+ OK
+}
+else {
+ OK
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _previous_H
+#define _previous_H 1
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+OK
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+TEST 04 'test variable/macro override'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+HAVE_STDIO = hdr stdio'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define HAVE_STDIO 1 /* #include <stdio.h> ok */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if hdr - stdio {
+ #define HIT 1
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define HIT 1
+
+#endif'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if - hdr stdio {
+ #define HIT 1
+}
+endif'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if ? hdr stdio {
+ #define HIT 1
+}
+endif'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if hdr - stdio {
+ #define HIT 1
+}
+endif'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if HAVE_STDIO = hdr stdio {
+ #define HIT 1
+}
+endif
+if ( HAVE_STDIO ) {
+ #define TOO ALSO
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define HAVE_STDIO 1 /* #include <stdio.h> ok */
+#define HIT 1
+
+#define TOO ALSO
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is ( HAVE_STDIO ) true ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if HAVE_STDIO = hdr stdio {
+ #define HIT 1
+}
+endif
+exp ALSO HAVE_STDIO'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define HAVE_STDIO 1 /* #include <stdio.h> ok */
+#define HIT 1
+
+#define ALSO 1 /* HAVE_STDIO is true */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is HAVE_STDIO true ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if HAVE_STDIO = hdr stdio {
+ #define HIT 1
+}
+endif
+ALSO = ( HAVE_STDIO )'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define HAVE_STDIO 1 /* #include <stdio.h> ok */
+#define HIT 1
+
+#define ALSO 1 /* ( HAVE_STDIO ) is true */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is ( HAVE_STDIO ) true ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+TEST 05 'test code option sequence'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+tst seq - -DA=1 - -DB=1 note{ long int type }end compile{
+ #if A == 1 && B == 0
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end'
+ OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _seq 1 /* long int type */
+#endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{
+ #if G == 1 && N == 1
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+tst seq - -DA=1 - -DB=1 note{ long int type }end compile{
+ #if A == 0 && B == 1
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ...
+iffe: test: long int type ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{
+ #if G == 1 && N == 2
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+tst seq - -DA=1 - -DB=1 note{ long int type }end compile{
+ #if A == 0 && B == 0
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end'
+ OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ...
+iffe: test: long int type ... no'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{
+ #if G == 1 && N == 0
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst - -DA=1 - -DB=1 note{ long int type }end compile{
+ #if A == 1 && B == 0
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+ OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* long int type */
+#define seq 1
+
+#endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{
+ #if G == 1 && N == 1
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst - -DA=1 - -DB=1 note{ long int type }end compile{
+ #if A == 0 && B == 1
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ...
+iffe: test: long int type ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{
+ #if G == 1 && N == 2
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst - -DA=1 - -DB=1 note{ long int type }end compile{
+ #if A == 0 && B == 0
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+ OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ...
+iffe: test: long int type ... no'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{
+ #if G == 1 && N == 0
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{
+ #if N == 1
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+ OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+/* long int type */
+#define seq 1
+
+#endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{
+ #if N == 2
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ...
+iffe: test: long int type ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{
+ #if N == 3
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ...
+iffe: test: long int type ...
+iffe: test: long int type ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff macro
+if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{
+ #if N == 0
+ #define t long
+ #else
+ #define t error
+ #endif
+ t n = 0;
+}end {
+ #define seq 1
+}
+endif'
+ OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _macro_H
+#define _macro_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif'
+ ERROR - 'iffe: test: is sys/types.h a header ... yes
+iffe: test: long int type ...
+iffe: test: long int type ...
+iffe: test: long int type ... no'
+
+ EXEC -r -v -s bsh - t.iffe
+
+TEST 06 'block side effects'
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'iff -
+tst output{
+ int
+ main()
+ {
+ printf("HIT\\n");
+ return 0;
+ }
+}end'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#define _sys_types 1 /* #include <sys/types.h> ok */
+HIT'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'iff
+tst - output{
+ int
+ main()
+ {
+ printf("HIT\\n");
+ return 0;
+ }
+}end'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'iff
+tst - output{
+ int
+ main()
+ {
+ printf("HIT\\n");
+ return 1;
+ }
+}end'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#define _sys_types 1 /* #include <sys/types.h> ok */'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'iff
+tst - nooutput{
+ int
+ main()
+ {
+ printf("HIT\\n");
+ return 1;
+ }
+}end'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#define _sys_types 1 /* #include <sys/types.h> ok */
+HIT'
+
+ EXEC -r -s bsh - t.iffe
+
+TEST 07 'diagnostics'
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'tst foo'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#endif'
+ ERROR - $'iffe: t.iffe:1: tst: unknown feature test'
+ EXIT 1
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'if (1)'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */'
+ ERROR - $'iffe: t.iffe:1: missing endif'
+ EXIT 1
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'if'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */'
+ ERROR - $'iffe: t.iffe:1: missing endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'endif'
+ ERROR - $'iffe: t.iffe:1: endif: no matching if'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'if {
+}end'
+ ERROR - $'iffe: t.iffe:2: missing }'
+
+ EXEC -r -s bsh - t.iffe
+
+TEST 08 'negation consternation'
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'npt fopen,fooon stdio.h'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _npt_fooon 1 /* fooon() needs a prototype */
+#endif'
+
+ EXEC -r -u - t.iffe
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#undef _npt_fopen /* fopen() does not need a prototype */
+#define _npt_fooon 1 /* fooon() needs a prototype */
+#endif'
+
+ EXEC -r -a - t.iffe
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define _npt_fopen 0 /* fopen() does not need a prototype */
+#define _npt_fooon 1 /* fooon() needs a prototype */
+#endif'
+
+ EXEC -r -C - t.iffe
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define HAVE_SYS_TYPES_H 1 /* #include <sys/types.h> ok */
+#define HAVE_STDLIB_H 1 /* #include <stdlib.h> ok */
+#define HAVE_UNISTD_H 1 /* #include <unistd.h> ok */
+#define HAVE_STDIO_H 1 /* #include <stdio.h> ok */
+#define HAVE_FOPEN_DECL 1 /* fopen() does not need a prototype */
+#undef HAVE_FOOON_DECL /* fooon() needs a prototype */
+#endif'
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'NEED_FOPEN = npt fopen stdio.h
+HAVE_FOPEN = ! npt fopen stdio.h
+NEED_FOOON = npt fooon stdio.h
+HAVE_FOOON = ! npt fooon stdio.h'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#define HAVE_FOPEN 1 /* fopen() does not need a prototype */
+#define NEED_FOOON 1 /* fooon() needs a prototype */
+#endif'
+
+ EXEC -r -u - t.iffe
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
+#define _hdr_unistd 1 /* #include <unistd.h> ok */
+#define _hdr_stdio 1 /* #include <stdio.h> ok */
+#undef NEED_FOPEN /* fopen() does not need a prototype */
+#define HAVE_FOPEN 1 /* fopen() does not need a prototype */
+#define NEED_FOOON 1 /* fooon() needs a prototype */
+#undef HAVE_FOOON /* fooon() needs a prototype */
+#endif'
+
+ EXEC -r -C - t.iffe
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define HAVE_SYS_TYPES_H 1 /* #include <sys/types.h> ok */
+#define HAVE_STDLIB_H 1 /* #include <stdlib.h> ok */
+#define HAVE_UNISTD_H 1 /* #include <unistd.h> ok */
+#define HAVE_STDIO_H 1 /* #include <stdio.h> ok */
+#undef NEED_FOPEN /* fopen() does not need a prototype */
+#define HAVE_FOPEN 1 /* fopen() does not need a prototype */
+#define NEED_FOOON 1 /* fooon() needs a prototype */
+#undef HAVE_FOOON /* fooon() needs a prototype */
+#endif'
+
+TEST 09 'exp vs. if'
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+exp _tst_hit !_tst_false {
+ ONE
+}
+exp _tst_hit !_tst_hit&_tst_true pass{
+cat <<!
+ TWO $_tst_false $_tst_true
+!
+}end
+exp _tst_hit !_tst_hit&_tst_true {
+ THREE
+}'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#define _tst_hit 1 /* !_tst_false is true */
+/* !_tst_false */
+ONE
+
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+exp _tst_hit !_tst_true {
+ ONE
+}
+exp _tst_hit !_tst_hit&_tst_true pass{
+cat <<!
+ TWO $_tst_false $_tst_true
+!
+}end
+exp _tst_hit !_tst_hit&_tst_true {
+ THREE
+}'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#define _tst_hit 1 /* !_tst_hit&_tst_true is true */
+TWO 0 1
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+exp _tst_hit !_tst_true {
+ ONE
+}
+exp _tst_hit !_tst_hit&_tst_false pass{
+cat <<!
+ TWO $_tst_false $_tst_true
+!
+}end
+exp _tst_hit !_tst_hit&_tst_true {
+ THREE
+}'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#define _tst_hit 1 /* !_tst_hit&_tst_true is true */
+/* !_tst_hit&_tst_true */
+THREE
+
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+exp _tst_hit !_tst_true {
+ ONE
+}
+exp _tst_hit !_tst_hit&_tst_false pass{
+cat <<!
+ TWO $_tst_false $_tst_true
+!
+}end
+exp _tst_hit !_tst_hit&_tst_false {
+ THREE
+}'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+exp _tst_hit !_tst_false {
+ ONE
+}
+exp _tst_hit !_tst_hit&&_tst_true pass{
+cat <<!
+ TWO $_tst_false $_tst_true
+!
+}end
+exp _tst_hit !_tst_hit&&_tst_true {
+ THREE
+}'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#define _tst_hit 1 /* !_tst_false is true */
+/* !_tst_false */
+ONE
+
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+exp _tst_hit !_tst_true {
+ ONE
+}
+exp _tst_hit !_tst_hit&&_tst_true pass{
+cat <<!
+ TWO $_tst_false $_tst_true
+!
+}end
+exp _tst_hit !_tst_hit&&_tst_true {
+ THREE
+}'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#define _tst_hit 1 /* !_tst_hit&&_tst_true is true */
+TWO 0 1
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+exp _tst_hit !_tst_true {
+ ONE
+}
+exp _tst_hit !_tst_hit&&_tst_false pass{
+cat <<!
+ TWO $_tst_false $_tst_true
+!
+}end
+exp _tst_hit !_tst_hit&&_tst_true {
+ THREE
+}'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#define _tst_hit 1 /* !_tst_hit&&_tst_true is true */
+/* !_tst_hit&&_tst_true */
+THREE
+
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+exp _tst_hit !_tst_true {
+ ONE
+}
+exp _tst_hit !_tst_hit&&_tst_false pass{
+cat <<!
+ TWO $_tst_false $_tst_true
+!
+}end
+exp _tst_hit !_tst_hit&&_tst_false {
+ THREE
+}'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+if ( ! _tst_false ) {
+ ONE
+}
+elif ( _tst_true ) pass{
+cat <<!
+ TWO
+!
+}end
+else {
+ THREE
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+ONE
+
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+if ( ! _tst_true ) {
+ ONE
+}
+elif ( _tst_true ) pass{
+cat <<!
+ TWO
+!
+}end
+else {
+ THREE
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+TWO
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+if ( ! _tst_true ) {
+ ONE
+}
+elif ( _tst_false ) pass{
+cat <<!
+ TWO
+!
+}end
+else {
+ THREE
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+THREE
+
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+if ( ! _tst_true ) yes{
+ typedef struct
+ {
+ int dd_fd; /* file descriptor */
+ } DIR;
+}end
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+if ( ! _tst_true ) {
+ typedef struct
+ {
+ int dd_fd; /* file descriptor */
+ } DIR;
+}
+else {
+ OK
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _tst_true 1 /* ( 1 ) is true */
+OK
+
+#endif'
+
+ EXEC -r -s bsh - t.iffe
+
+ EXEC -r - t.iffe
+ INPUT t.iffe $'_tst_false = ( 0 )
+_tst_true = ( 1 )
+if ( ! _tst_true ) {
+ typedef struct
+ {
+ int dd_fd; /* file descriptor */
+ };
+}
+else {
+ OK
+}
+endif'
+
+ EXEC -r -s bsh - t.iffe
+
+TEST 10 'exp details'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'_str = "string"
+_hdr = <header>
+_aaa = ( 0 )
+_zzz = ( 1 )
+( _str )
+( ! _str )
+( _hdr )
+( ! _hdr )
+( _aaa )
+( ! _aaa )
+( _zzz )
+( ! _zzz )'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _str "string"
+#define _hdr <header>
+#define _zzz 1 /* ( 1 ) is true */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is ( 0 ) true ... no
+iffe: test: is ( 1 ) true ... yes
+iffe: test: is ( _str ) true ... yes
+iffe: test: is ( ! _str ) true ... no
+iffe: test: is ( _hdr ) true ... yes
+iffe: test: is ( ! _hdr ) true ... no
+iffe: test: is ( _aaa ) true ... no
+iffe: test: is ( ! _aaa ) true ... yes
+iffe: test: is ( _zzz ) true ... yes
+iffe: test: is ( ! _zzz ) true ... no'
+
+ EXEC -r -v -s bsh - t.iffe
+
+TEST 11 'set [no]define'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'set nodefine
+mem stat.st_mtime sys/types.h sys/stat.h
+set define
+mem stat.st_mode sys/types.h sys/stat.h
+if ( _mem_st_mtime_stat ) {
+ 1
+}
+endif
+if ( _mem_st_mode_stat ) {
+ 2
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _mem_st_mode_stat 1 /* st_mode is a member of struct stat */
+1
+
+2
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is sys/stat.h a header ... yes
+iffe: test: is stat a type or typedef ... no
+iffe: test: is st_mtime a member of struct stat ... yes
+iffe: test: is st_mode a member of struct stat ... yes
+iffe: test: is ( _mem_st_mtime_stat ) true ... yes
+iffe: test: is ( _mem_st_mode_stat ) true ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+TEST 12 'non-opaque mem'
+
+ EXEC -r -v - mem OPAQUE -I. t.h
+ INPUT t.h $'typedef struct opaque OPAQUE;'
+ OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_t 1 /* #include <t.h> ok */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is t.h a header ... yes
+iffe: test: is OPAQUE a type or typedef ... no
+iffe: test: is struct OPAQUE a non-opaque struct ... no'
+
+ EXEC -r -v - mem NONOPAQUE -I. t.h
+ INPUT t.h $'struct nonopaque { int pad; };
+typedef struct nonopaque NONOPAQUE;'
+ OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _hdr_t 1 /* #include <t.h> ok */
+#define _mem_NONOPAQUE 1 /* NONOPAQUE is a non-opaque struct */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is t.h a header ... yes
+iffe: test: is NONOPAQUE a type or typedef ... yes
+iffe: test: is NONOPAQUE a non-opaque struct ... yes'
+
+TEST 13 'key states'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'key int
+key const =
+key foo
+key bar =
+key aha = huh = int
+key chr = char = int'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _key_int 1 /* int is a reserved keyword */
+#define _key_const 1 /* const is a reserved keyword */
+#define bar /* default for reserved keyword bar */
+#define aha int /* default for reserved keyword aha */
+#define _key_char 1 /* char is a reserved keyword */
+#define chr char /* alternate for reserved keyword chr */
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is int a reserved keyword ... yes
+iffe: test: is const a reserved keyword ... yes
+iffe: test: is foo a reserved keyword ... no
+iffe: test: is bar a reserved keyword ... no
+iffe: test: is aha a reserved keyword ... no
+iffe: test: is huh a reserved keyword ... no
+iffe: test: is chr a reserved keyword ... no
+iffe: test: is char a reserved keyword ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -u -r -v - t.iffe
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _key_int 1 /* int is a reserved keyword */
+#define _key_const 1 /* const is a reserved keyword */
+#undef _key_foo /* foo is not a reserved keyword */
+#undef _key_bar /* bar is not a reserved keyword */
+#define bar /* default for reserved keyword bar */
+#undef _key_huh /* huh is not a reserved keyword */
+#define aha int /* default for reserved keyword aha */
+#define _key_char 1 /* char is a reserved keyword */
+#define chr char /* alternate for reserved keyword chr */
+#endif'
+
+ EXEC -u -r -v -s bsh - t.iffe
+
+ EXEC -a -r -v - t.iffe
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define _key_int 1 /* int is a reserved keyword */
+#define _key_const 1 /* const is a reserved keyword */
+#define _key_foo 0 /* foo is not a reserved keyword */
+#define _key_bar 0 /* bar is not a reserved keyword */
+#define bar /* default for reserved keyword bar */
+#define _key_huh 0 /* huh is not a reserved keyword */
+#define aha int /* default for reserved keyword aha */
+#define _key_char 1 /* char is a reserved keyword */
+#define chr char /* alternate for reserved keyword chr */
+#endif'
+
+ EXEC -a -r -v -s bsh - t.iffe
+
+ EXEC -C -r -v - t.iffe
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define HAVE_SYS_TYPES_H 1 /* #include <sys/types.h> ok */
+#define HAVE_INT_RESERVED 1 /* int is a reserved keyword */
+#define HAVE_CONST_RESERVED 1 /* const is a reserved keyword */
+#undef HAVE_FOO_RESERVED /* foo is not a reserved keyword */
+#undef HAVE_BAR_RESERVED /* bar is not a reserved keyword */
+#define bar /* default for reserved keyword bar */
+#undef HAVE_HUH_RESERVED /* huh is not a reserved keyword */
+#define aha int /* default for reserved keyword aha */
+#define HAVE_CHAR_RESERVED 1 /* char is a reserved keyword */
+#define chr char /* alternate for reserved keyword chr */
+#endif'
+
+ EXEC -C -r -v -s bsh - t.iffe
+
+TEST 14 'inc file'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'inc t_lib.h
+if ( bar_foo ) {
+ #define all 1
+}
+elif ( _foo_bar ) {
+ #define some 1
+}
+endif'
+ INPUT t_lib.h '#define bar_foo ALL
+#define _foo_bar SOME'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define some 1
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is ( bar_foo ) true ... no
+iffe: test: is ( _foo_bar ) true ... yes'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'inc t_lib.h .
+if ( bar_foo ) {
+ #define all 1
+}
+elif ( _foo_bar ) {
+ #define ok 1
+}
+endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define all 1
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is ( bar_foo ) true ... yes'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'inc t_lib.h . ?
+if ( bar_foo ) {
+ #define all 1
+}
+elif ( _foo_bar ) {
+ #define ok 1
+}
+endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: t.iffe:1: warning: ?: operands ignored
+iffe: test: is ( bar_foo ) true ... yes'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'inc foo_lib.h'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: t.iffe:1: foo_lib.h: file not found'
+ EXIT 1
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'inc'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: t.iffe:1: path expected'
+
+TEST 15 'KnR compatibility'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'
+if ( 1 ) {
+ #define all 1
+}
+endif
+if ( 2 ) {
+ #define some 1
+}
+endif
+cat{
+#define a 1
+ #define b 2
+ #define c 3
+ #define d 4
+}end'
+#define _foo_bar SOME'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define some 1
+
+#endif'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#define all 1
+
+#define some 1
+
+#define a 1
+#define b 2
+#define c 3
+#define d 4
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is ( 1 ) true ... yes
+iffe: test: is ( 2 ) true ... yes
+iffe: test: cat{ ... }end ... yes'
+
+ EXEC -r -v -s bsh - t.iffe
+
+ EXEC -r -v -s osh - t.iffe
+
+TEST 16 '{ define extern include print }'
+
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'
+print /* test header */
+header stdio.h
+define EOF -1
+define FoobaR (a,b) ((a)+(b))
+define FoomaC -1
+extern fopen FILE* (char*, char*)
+extern BarfoO struct barfoo* (int)
+extern Tab_lE struct barfoo* [10]'
+ OUTPUT - $'/* test header */
+/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _REGRESS
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#include <stdio.h>
+#define FoobaR(a,b) ((a)+(b))
+#define FoomaC -1
+extern struct barfoo* BarfoO(int);
+extern struct barfoo* Tab_lE[10];
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes
+iffe: test: is EOF a macro ... yes
+iffe: test: is FoobaR a macro ... no
+iffe: test: is FoomaC a macro ... no
+iffe: test: is fopen a symbol that needs a prototype ... no
+iffe: test: is BarfoO a symbol that needs a prototype ... yes
+iffe: test: is Tab_lE a symbol that needs a prototype ... yes'
+
+TEST 17 'features/* => FEATURE/*'
+
+ EXEC -r -v run features/stdio
+ INPUT features/stdio $'set prototyped
+header stdio.h'
+ OUTPUT FEATURE/stdio $'
+/* : : generated by proto : : */
+/* : : generated from features/stdio by iffe version 1995-03-19 : : */
+
+#ifndef _REGRESS
+#if !defined(__PROTO__)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
+# if defined(__cplusplus)
+# define __LINKAGE__ "C"
+# else
+# define __LINKAGE__
+# endif
+# define __STDARG__
+# define __PROTO__(x) x
+# define __OTORP__(x)
+# define __PARAM__(n,o) n
+# if !defined(__STDC__) && !defined(__cplusplus)
+# if !defined(c_plusplus)
+# define const
+# endif
+# define signed
+# define void int
+# define volatile
+# define __V_ char
+# else
+# define __V_ void
+# endif
+# else
+# define __PROTO__(x) ()
+# define __OTORP__(x) x
+# define __PARAM__(n,o) o
+# define __LINKAGE__
+# define __V_ char
+# define const
+# define signed
+# define void int
+# define volatile
+# endif
+# define __MANGLE__ __LINKAGE__
+# if defined(__cplusplus) || defined(c_plusplus)
+# define __VARARG__ ...
+# else
+# define __VARARG__
+# endif
+# if defined(__STDARG__)
+# define __VA_START__(p,a) va_start(p,a)
+# else
+# define __VA_START__(p,a) va_start(p)
+# endif
+# if !defined(__INLINE__)
+# if defined(__cplusplus)
+# define __INLINE__ extern __MANGLE__ inline
+# else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define __INLINE__ __inline
+# endif
+# endif
+# endif
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+
+#define _REGRESS 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+#include <stdio.h>
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes
+iffe: test: is stdio.h a header ... yes'
+
+TEST 18 'api + ver'
+ EXEC -r -v - t.iffe
+ INPUT t.iffe $'iff api
+ver foo 20100606
+ver bar 19840919
+
+api foo 19991231 dis dat tother
+api foo 20100601 dat
+api foo 20100606 dis
+api bar 19991231 moe larry shemp
+api bar 20020202 curly
+api bar 20030303 shemp
+api bar 20040404 joe_b
+api bar 20050505 joe_d
+'
+ OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */
+#ifndef _api_H
+#define _api_H 1
+#define _sys_types 1 /* #include <sys/types.h> ok */
+
+#define FOO_VERSION 20100606
+#define BAR_VERSION 19840919
+#define FOOAPI(rel) ( _BLD_foo || !_API_foo || _API_foo >= rel )
+
+#if !defined(_API_foo) && defined(_API_DEFAULT)
+#define _API_foo _API_DEFAULT
+#endif
+
+#if FOOAPI(20100601)
+#undef dat
+#define dat dat_20100601
+#elif _API_foo >= 19991231
+#undef dat
+#define dat dat_19991231
+#endif
+
+#if FOOAPI(20100606)
+#undef dis
+#define dis dis_20100606
+#elif _API_foo >= 19991231
+#undef dis
+#define dis dis_19991231
+#endif
+
+#if FOOAPI(19991231)
+#undef tother
+#define tother tother_19991231
+#endif
+
+#define _API_foo_MAP "dat_20100601 dat_19991231 dis_20100606 dis_19991231 tother_19991231"
+#define BARAPI(rel) ( _BLD_bar || !_API_bar || _API_bar >= rel )
+
+#if !defined(_API_bar) && defined(_API_DEFAULT)
+#define _API_bar _API_DEFAULT
+#endif
+
+#if BARAPI(20020202)
+#undef curly
+#define curly curly_20020202
+#endif
+
+#if BARAPI(20040404)
+#undef joe_b
+#define joe_b joe_b_20040404
+#endif
+
+#if BARAPI(20050505)
+#undef joe_d
+#define joe_d joe_d_20050505
+#endif
+
+#if BARAPI(19991231)
+#undef larry
+#define larry larry_19991231
+#endif
+
+#if BARAPI(19991231)
+#undef moe
+#define moe moe_19991231
+#endif
+
+#if BARAPI(20030303)
+#undef shemp
+#define shemp shemp_20030303
+#elif _API_bar >= 19991231
+#undef shemp
+#define shemp shemp_19991231
+#endif
+
+#define _API_bar_MAP "curly_20020202 joe_b_20040404 joe_d_20050505 larry_19991231 moe_19991231 shemp_20030303 shemp_19991231"
+
+#endif'
+ ERROR - $'iffe: test: is sys/types.h a header ... yes'
diff --git a/usr/src/contrib/ast/src/cmd/INIT/ignore.sh b/usr/src/contrib/ast/src/cmd/INIT/ignore.sh
new file mode 100644
index 0000000000..2999645013
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/ignore.sh
@@ -0,0 +1,43 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+# non-ksh script for the nmake ignore prefix
+# @(#)ignore (AT&T Research) 1992-08-11
+
+case $-:$BASH_VERSION in
+*x*:[0123456789]*) : bash set -x is broken :; set +ex ;;
+esac
+
+while :
+do case $# in
+ 0) exit 0 ;;
+ esac
+ case $1 in
+ *=*) case $RANDOM in
+ $RANDOM)`echo $1 | sed "s/\\([^=]*\\)=\\(.*\\)/eval \\1='\\2'; export \\1/"` ;;
+ *) export "$1" ;;
+ esac
+ shift
+ ;;
+ *) break
+ ;;
+ esac
+done
+"$@"
+exit 0
diff --git a/usr/src/contrib/ast/src/cmd/INIT/intl.c b/usr/src/contrib/ast/src/cmd/INIT/intl.c
new file mode 100644
index 0000000000..1623dd6511
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/intl.c
@@ -0,0 +1,29 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#ifndef gettext
+#include <libintl.h>
+#endif
+
+int
+main()
+{
+ gettext(0);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/m.c b/usr/src/contrib/ast/src/cmd/INIT/m.c
new file mode 100644
index 0000000000..b56b99b7cc
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/m.c
@@ -0,0 +1,34 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * -lm test #1
+ */
+
+#ifndef sin
+#include <math.h>
+#endif
+
+int
+main()
+{
+ sin(0.0);
+ fmod(100.234, 11.0);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/m2.c b/usr/src/contrib/ast/src/cmd/INIT/m2.c
new file mode 100644
index 0000000000..cad12b11fd
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/m2.c
@@ -0,0 +1,36 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * -lm test #2
+ */
+
+#include <math.h>
+
+int
+main()
+{
+ double value = 0;
+ int exp = 0;
+ int r = 0;
+
+ r |= ldexp(value, exp) != 0;
+ r |= frexp(value, &exp) != 0;
+ return r;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/m3.c b/usr/src/contrib/ast/src/cmd/INIT/m3.c
new file mode 100644
index 0000000000..5d89991028
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/m3.c
@@ -0,0 +1,36 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * -lm test #3
+ */
+
+#include <math.h>
+
+int
+main()
+{
+ long double value = 0;
+ int exp = 0;
+ int r = 0;
+
+ r |= ldexpl(value, exp) != 0;
+ r |= frexpl(value, &exp) != 0;
+ return r;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/m4.c b/usr/src/contrib/ast/src/cmd/INIT/m4.c
new file mode 100644
index 0000000000..79b87f0402
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/m4.c
@@ -0,0 +1,32 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * -lm test #4
+ */
+
+#include <math.h>
+
+int
+main()
+{
+ double value = 0;
+
+ return isnan(value);
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/m5.c b/usr/src/contrib/ast/src/cmd/INIT/m5.c
new file mode 100644
index 0000000000..f85392169b
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/m5.c
@@ -0,0 +1,32 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * -lm test #5
+ */
+
+#include <math.h>
+
+int
+main()
+{
+ long double value = 0;
+
+ return isnanl(value);
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/m6.c b/usr/src/contrib/ast/src/cmd/INIT/m6.c
new file mode 100644
index 0000000000..4387ea0447
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/m6.c
@@ -0,0 +1,34 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * -lm test #6
+ */
+
+#define _ISOC99_SOURCE 1
+
+#include <math.h>
+
+int
+main()
+{
+ double value = -0.0;
+
+ return !signbit(value);
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/make.probe b/usr/src/contrib/ast/src/cmd/INIT/make.probe
new file mode 100644
index 0000000000..8a3c3833a4
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/make.probe
@@ -0,0 +1,2242 @@
+:
+### this script contains archaic constructs that work with all sh variants ###
+# Glenn Fowler
+# AT&T Research
+#
+# @(#)make.probe (AT&T Research) 2011-06-01
+#
+# C probe for make
+#
+# NOTE: C.probe must be included or .'d here
+#
+
+cc_dll_def=-D_BLD_DLL
+
+probe_ar_arflags="-Xany"
+probe_arflags="-xar"
+probe_ccs="strip size nm ld ar" # longest to shortest
+probe_debug="-g"
+probe_dll="'-G 0' -Wc,dll,exportall,longname,rent -Wc,exportall -dynamic $cc_dll_def"
+probe_export_dynamic="-rdynamic -export-dynamic -Wl,-export-dynamic -Wl,-E -bexpall -force_flat_namespace"
+probe_gcc_optimize="-O2"
+probe_gcc_version="*[Gg][Cc][Cc]*"
+probe_include_local="'-ignore-source-dir -iquote' -iquote -I-"
+probe_ldlazy='-zlazyload -znolazyload -Wl,-zlazyload -Wl,-znolazyload'
+probe_ldlib="LD_LIBRARY_PATH LIBPATH LPATH"
+probe_ldmap="'-Wl,-M' '-Qoption ld -M' '-Wl,-m' '-m'"
+probe_ldorigin="-Wl,-z,origin"
+probe_ldrecord='-zrecord -zignore -Wl,-zrecord -Wl,-zignore'
+probe_ldrunpath="-Wl,-R, -R -Wl,-rpath, -L"
+probe_ldstrip="'-s -mr' -Wl,-s"
+probe_lib="a lib"
+probe_lib_append="/usr/lib/pa1.1"
+probe_lib_all_undef="-all -notall -all -none -Bwhole-archive -Bno-whole-archive -whole-archive -no-whole-archive -Wl,-whole-archive -Wl,-no-whole-archive -all_load '' -Wl,-zallextract -Wl,-zdefaultextract +forceload +noforceload"
+probe_lib_multiple="-Wl,-zmuldefs"
+probe_libdir="shlib lib"
+probe_nmflags="'' -p -B"
+probe_optimize="-O"
+probe_pic="-Kpic -KPIC -fpic -fPIC -pic -PIC +z +Z"
+probe_no_protect="'-fno-stack-protector -fno-stack-protector-all' -GS-"
+probe_readonly="-R -Krodata -xMerge -Wa,-r"
+probe_shared="'' -G -b -c -shared -Wl,dll"
+probe_shared_name="-Wl,-soname= -h"
+probe_shared_nostart="-nostartfiles"
+probe_shared_registry='"-update_registry $probe_shared_registry_file"'
+probe_shared_registry_file='registry.ld'
+probe_shared_registry_path="\$(LIBDIR)/$probe_shared_registry_file"
+probe_strict="'-ansi -pedantic' '-ansi -strict' -strict -ansi"
+probe_stripflags="'-f -s' -f -s"
+probe_unresolved="'-expect_unresolved \"*\"'"
+probe_warn="-Wall -fullwarn -w3 '-A -A' +w1"
+
+echo '#pragma pp:version' > libpp.$src
+echo '#define dDflag on' > dDflag.$src
+echo 'int main(){return 0;}' > doti.$src
+echo 'int code(){return 0;} int main(){return code();}' > export.$src
+echo '#include <stdio.h>' > imstd.$src
+echo '#include "_i_.h"' > imusr.$src
+echo 'int x;' > _i_.h
+mkdir im
+echo '(' > im/stdio.h
+echo '#include "implc_x.h"
+int main(){f(1);return 0;}' > implc.$src
+echo 'template <class T> void f(T){}' > implc_x.$src
+echo 'template <class T> void f(T);' > implc_x.h
+echo 'extern int NotalL(){return(0);}' > notall.$src
+echo '#include <stdio.h>
+extern int i;
+int i = 1;
+extern int f(){return(!i);}
+int main(){FILE* fp=stdin;return(f());}' > pic.$src
+echo 'class x {int n;} m;' > plusplus.$src
+echo 'int prefix(){return 0;}' > prefix.$src
+echo 'template<class T> int gt(T a, T b);
+template<class T> int gt(T a, T b) { return a > b; }
+int main () { return gt(2,1); }' > ptr.$src
+echo 'int main(){return 0;}' > require.$src
+echo '#if mips && !sgi || __CYGWIN__
+( /* some systems choke on this probe */
+#else
+#if test_const
+#define CONST const
+#else
+#define CONST
+#endif
+CONST char x[]={1,2,3,4,5,6,7,8,9,0};
+int main(){*(char*)x=0; return x[0];}
+#endif' > readonly.$src
+# NOTE: sfclose() defined on uwin, not defined on all other systems
+echo 'extern int sfclose(); extern int ShareD(){return(sfclose());}' > shared.$src
+echo '#define g(a,b) a ## b
+volatile int a;
+const int g(x,y)=1;
+extern int c(int);' > stdc.$src
+echo 'extern int f(); int main() { return f(); }' > sovmain.$src
+echo 'int f() { return 0; }' > sovlib.$src
+echo '#include <stdio.h>
+int i;
+int main(){int j;j = i * 10;return j;}' > strip.$src
+echo 'template <class T> void f(T){}
+int main(){f(1);return 0;}' > toucho.$src
+echo '#if defined(__STDC__) || defined(__cplusplus)
+extern type call(int);
+#endif
+int main() {call(0);return(0);}' > tstlib.$src
+echo 'int main(){return 0;}' > warn.$src
+echo 'int f(){return 0;}' > warn1.$src
+echo 'int f(){}' > warn2.$src
+echo 'int f(){int i; return 0;}' > warn3.$src
+echo 'int f(){int i; return i;}' > warn4.$src
+echo 'int f(){return g();}' > warn5.$src
+warn_enum="1 2 3 4 5"
+
+chmod -w *.$src
+
+ar_arflags=
+arflags=
+cc_dll=
+cc_pic=
+cc_PIC=
+dDflag=
+debug=
+dialect=
+dll_dir='$(LIBDIR)'
+dll_libraries=
+dll_variants=
+doti=
+exectype=
+export_dynamic=
+gnu=
+implicitc=
+include_local=
+lddynamic=
+ldlazy=
+ldnolazy=
+ldnorecord=
+ldorigin=
+ldrecord=
+ldrunpath=
+ldscript=
+ldstatic=
+ldstrip=
+Lflag=
+lib_dll=
+lib_all=
+lib_undef=
+libpath=
+libpp=
+makeoptions=
+nmedit=
+nmflags=
+no_protect=
+optimize=
+plusplus=
+prefix_archive=lib
+prefix_dynamic=
+prefix_shared=lib
+ptrcopy=
+ptrimplicit=
+ptrmkdir=
+readonly=
+repository=
+require=
+runpath=
+shared=
+shared_name=
+shared_registry=
+shellmagic=
+soversion=
+stdc=
+strict=
+stripflags=
+symprefix=
+toucho=
+warn=
+
+set $probe_lib
+lib=$1
+
+d=
+for f in $stdinclude $usrinclude
+do case $f in
+ -I*) ;;
+ *) d="$d $f" ;;
+ esac
+done
+stdinclude=$d
+
+set x $cc
+cc_dir=`echo $2 | sed -e 's,/*[^/]*$,,'`
+for c in $probe_ccs
+do if $executable $cc_dir/$c
+ then x=$cc_dir/$c
+ else x=$c
+ fi
+ eval $c='$x'
+done
+ld_dir=
+rm -f doti.$obj
+if $cc -c doti.$src
+then eval set x $probe_verbose
+ shift
+ for o
+ do $cc $o doti.$obj
+ $cc $o doti.$obj -lF0oB@r
+ done 2>&1 | sed -e 's/^[+ ]*//' -e 's/[ ].*//' -e '/^\//!d' -e 's/:$//' -e '/ld[a-zA-Z0-9.]*$/!d' -e 's,///*,/,g' > t
+ for i in `cat t`
+ do rm -f t.$obj
+ if test -x $i && $i -r -o t.$obj doti.$obj && test -f t.$obj
+ then case $ld in
+ ld) ld=$i ;;
+ esac
+ ld_dir=`echo $i | sed 's,/[^/]*$,,'`
+ break
+ fi
+ done
+fi
+IFS=:
+set x $PATH
+IFS=$ifs
+path=$*
+m=
+for c in $probe_ccs
+do eval o='$'$c
+ case $o in
+ $c) ;;
+ *) continue ;;
+ esac
+ C='${c}'
+ for x in $cc_dir $ld_dir
+ do cd $x
+ for p in "${C}" "${C}[!a-zA-Z]*" "*[!a-zA-Z]${C}" "*[!a-zA-Z]${C}[!a-zA-Z]*"
+ do eval set x $p
+ case $# in
+ 2) if $executable $2
+ then case $2 in
+ *$c*$c*);;
+ *) m=$p
+ break 3
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ done
+ done
+done
+cd $tmpdir
+for c in $probe_ccs
+do eval o='$'$c
+ case $o in
+ $c) ;;
+ *) continue ;;
+ esac
+ for x in $cc_dir $ld_dir
+ do if $executable $x/$c
+ then eval $c='$x/$c'
+ continue 2
+ fi
+ case $m in
+ ?*) eval set x $x/$m
+ case $# in
+ 2) if $executable $2
+ then eval $c='$2'
+ continue 2
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ done
+ for x in $path
+ do if $executable $x/$c
+ then eval $c='$x/$c'
+ break
+ fi
+ done
+done
+dld=$cc
+
+rm -f dynamic.$exe
+if $cc -o dynamic.$exe dynamic.$obj && $executable dynamic.$exe
+then mkdir mylib
+ echo > mylib/libc.$lib
+ eval set x $probe_ldlib
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f dynamic.$exe
+ if eval $1=./mylib '$'cc -o dynamic.$exe dynamic.$obj
+ then :
+ else libpath=$1
+ break
+ fi
+ done
+fi
+test `$cc -E libpp.$src | grep -c '^#pragma pp:version "libpp '` -eq 1 && libpp=1
+$cc -E doti.$src > doti.i && $cc -c doti.i && test -s doti.$obj && doti=1
+if $cc -c imusr.$src
+then eval set x $probe_include_local
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ if $cc -c $1 imusr.$src
+ then : "$1 should skip \"_i_.h\" in ."
+ elif $cc -c imstd.$src
+ then if $cc -c -Iim imstd.$src
+ then : '-Idir should find <stdio.h> in dir'
+ elif $cc -c $1 -Iim imstd.$src
+ then : "$1 -Idir should find <stdio.h> in dir"
+ elif $cc -c -Iim $1 imstd.$src
+ then include_local=$1
+ break
+ else : "-Idir $1 should skip <stdio.h> in dir"
+ fi
+ else : should find stdio.h
+ fi
+ done
+else : 'should find "_i_.h" in .'
+fi
+
+if $cc -c pic.$src 2>e
+then e=`wc -l e`
+ s=`$size pic.$obj; wc pic.$obj`
+ eval set x $probe_pic
+ shift
+ while :
+ do case $# in
+ 0|1) break ;;
+ esac
+ pic=$1
+ shift
+ PIC=$1
+ shift
+ rm -f pic.$obj
+ $cc $pic -c pic.$src 2>e && test -f pic.$obj || continue
+ $cc $pic -o pic.$exe pic.$obj && test -f pic.$exe || {
+ rm -f pic.$exe
+ $cc -o pic.$exe pic.$obj && test -f pic.$exe && continue
+ }
+ case `wc -l e` in
+ $e) ;;
+ *) continue ;;
+ esac
+ case $pic in
+ ???*) m=`echo " $pic" | sed -e 's/^ [-+]//g' -e 's/./-& /g' -e 's/[-+] //g'`
+ rm -f pic.$obj pic1.$exe
+ if $cc $m -c pic.$src 2>e && test -f pic.$obj &&
+ $cc -o pic1.$exe pic.$obj && test -f pic1.$exe
+ then case `wc -l e` in
+ $e) cc_pic=$m
+ break
+ ;;
+ esac
+ fi
+ cc_pic=$pic
+ break
+ ;;
+ *) case `$size pic.$obj; wc pic.$obj` in
+ $s) ;;
+ *) cc_pic=$pic
+ break
+ ;;
+ esac
+ ;;
+ esac
+ done
+ # this works around gcc 2.95 sun4 -fpic a.out core dump after exit
+ case $hosted:$cc_pic in
+ 1:?*) if ./pic.$exe
+ then # this catches lynxos.ppc gcc that dumps -fpic and not -mshared
+ echo 'static int* f() { static int v; return &v; }
+int main() { f(); return 0; }' > picok.$src
+ $cc $cc_pic -o picok.$exe picok.$src && ./picok.$exe || cc_pic=
+ else cc_pic=
+ fi
+ ;;
+ esac
+ case $cc_pic in
+ ?*) rm -f pic.$obj
+ if $cc $PIC -c pic.$src 2>e && test -f pic.$obj
+ then cc_PIC=$PIC
+ else cc_PIC=$cc_pic
+ fi
+ ;;
+ *) eval set x $probe_dll
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f pic.$obj pic.$exe
+ $cc $1 -c pic.$src 2>e && test -f pic.$obj || continue
+ $cc $1 -o pic.$exe pic.$obj && test -f pic.$exe || {
+ rm -f pic.$exe
+ $cc -o pic.$exe pic.$obj && test -f pic.$exe && continue
+ }
+ case $1 in
+ -Wc,*exportall*)
+ # get specific since sgi gets this far too
+ rm -f pic.$exe pic.x
+ $cc -Wl,dll -o pic.$exe pic.$obj || continue
+ test -f pic.$exe || continue
+ test -f pic.x || continue
+ cc_dll="-D_SHARE_EXT_VARS $1"
+ so=.x
+ sd=.dll
+ dld=$cc
+ shared=-Wl,dll
+ prefix_shared=
+ probe_sd=
+ probe_shared=
+ #unused# lddynamic=-Bdynamic
+ #unused# ldstatic=-Bstatic
+ lib_dll=SYMBOL
+ break
+ ;;
+ esac
+ case `wc -l e` in
+ $e) cc_dll=$1
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+fi
+
+$cc -c plusplus.$src && plusplus=1
+$cc -E -dD dDflag.$src > t
+case `grep '#define[ ][ ]*dDflag[ ][ ]*on' t` in
+?*) dDflag=1 ;;
+esac
+case `grep '#define.*_GNUC_' t` in
+?*) gnu=1 ;;
+esac
+case $plusplus in
+"") $cc -c stdc.$src && stdc=1 ;;
+*) mkdir ptr
+ cd ptr
+ $cc -c ../ptr.$src &
+ NFS_locks_are_botched=$!
+ cd ..
+ if $cc -c require.$src && $cc require.$obj
+ then set x `$cc require.$obj 2>&1`
+ d=
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ -l*) d="$d $1" ;;
+ esac
+ done
+ for f in ++
+ do if $cc require.$obj -l$f
+ then set x `$cc require.$obj -l$f 2>&1`
+ r=
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ -l*) case " $d $r " in
+ *" "$1" "*) ;;
+ *) r="$r $1" ;;
+ esac
+ esac
+ done
+ case $r in
+ ?*) require="$require $f"
+ echo '' $r > req.$f
+ ;;
+ esac
+ fi
+ done
+ fi
+ cd ptr
+ for i in *
+ do if test -d $i
+ then repository=$i
+ break
+ fi
+ done
+ cd ..
+ kill -9 $NFS_locks_are_botched
+ rm -rf ptr
+ case $repository in
+ *?) mkdir ptr
+ cd ptr
+ i=PTR
+ case $repository in
+ $i) i=$i$i ;;
+ esac
+ $cc -ptr$i -c ../ptr.$src &
+ NFS_locks_are_botched=$!
+ cd ..
+ sleep 5
+ if test -d ptr/$i/$repository
+ then ptrimplicit=1
+ fi
+ kill -9 $NFS_locks_are_botched
+ rm -rf ptr
+ ;;
+ esac
+ $cc -o implc implc.$src && $executable implc && implicitc=1
+ if $cc -c toucho.$src && test -f toucho.$obj
+ then o=`ls -l toucho.$obj`
+ if $cc -o toucho toucho.$obj && $executable toucho
+ then n=`ls -l touch.$obj`
+ case $n in
+ "$o") ;;
+ *) toucho=1 ;;
+ esac
+ fi
+ fi
+ ;;
+esac
+
+if $cc -c pic.$src
+then eval set x $probe_nmflags
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case `$nm $1 pic.$obj | grep -c '[0123456789][ ][ ]*T[ ][ ]*[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]'` in
+ 0) ;;
+ *) nmflags=$1
+ break
+ ;;
+ esac
+ done
+ case $# in
+ 0) case `$nm -gh pic.$obj | grep -c '|\.*[TtDdBbC][EeAaSsOo][XxTtSsMm]'` in
+ 0) ;;
+ *) nmflags=-gh
+ nmedit="-e '/\.*[TtDdBbC][EeAaSsOo][XxTtSsMm]/!d' -e 's/[| ].*//'"
+ ;;
+ esac
+ ;;
+ *) nmedit="-e '/[ ]T[ ][ ]*[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]/!d' -e 's/.*[ ]T[ ][ ]*//'"
+ ;;
+ esac
+fi
+
+if $cc -c doti.$src
+then eval set x $probe_stripflags
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ if $strip $1 doti.$obj
+ then stripflags=$1
+ break
+ fi
+ done
+fi
+
+rm -f export.$obj export.exe
+if $cc -c export.$src
+then lm=
+ if $cc -o export.exe export.$obj -lm 2>e && lm=-lm ||
+ $cc -o export.exe export.$obj 2>e
+ then z=`wc -c < export.exe; $size export.exe 2>/dev/null`
+ eval set x $probe_export_dynamic
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f export.exe
+ if $cc -o export.exe $1 export.$obj $lm 2>f && $executable export.exe
+ then y=`wc -c < export.exe; $size export.exe 2>/dev/null`
+ case $y in
+ $z) ;;
+ *) if cmp -s e f
+ then export_dynamic=$1
+ break
+ fi
+ ;;
+ esac
+ fi
+ done
+ fi
+fi
+rm -f export.$obj export.exe
+
+rm -f strip.exe
+if $cc -o strip.exe strip.$src
+then z=`wc -c < strip.exe`
+ eval set x $probe_ldstrip
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f strip.exe
+ if $cc -o strip.exe $1 strip.$src
+ then case `wc -c < strip.exe` in
+ $z) ;;
+ *) ldstrip=$1
+ break
+ ;;
+ esac
+ fi
+ done
+fi
+
+rm -f strip.exe strip.$obj
+if $cc -c strip.$src && $cc -o strip.exe strip.$obj 2>e
+then eval set x x $probe_ldlazy
+ while :
+ do shift
+ shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f strip.$exe
+ $cc -o strip.$exe $1 strip.$obj $2 2>f && test -f strip.$exe || continue
+ cmp -s e f || continue
+ ldlazy=$1
+ ldnolazy=$2
+ break
+ done
+ eval set x x $probe_ldrecord
+ while :
+ do shift
+ shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f strip.$exe
+ $cc -o strip.$exe $1 strip.$obj $2 2>f && test -f strip.$exe || continue
+ cmp -s e f || continue
+ ldrecord=$1
+ ldnorecord=$2
+ break
+ done
+fi
+
+case $cc_dll:$cc_pic:$so:$dynamic:$static in
+::::|$cc_dll_def::::)
+ : last chance dynamic checks
+ while :
+ do
+ echo '__declspec(dllexport) int fun() { return 0; }' > exp.$src
+ if $cc -c $cc_dll_def exp.$src
+ then rm -f xxx.dll xxx.lib
+ if $cc -shared -Wl,--enable-auto-image-base -Wl,--out-implib=xxx.lib -o xxx.dll exp.$obj &&
+ test -f xxx.lib -a -f xxx.dll
+ then
+ : cygwin
+ cc_dll=$cc_dll_def
+ dll_dir='$(BINDIR)'
+ sd=.dll
+ so=.dll.a
+ ldscript=".def .exp .ign .res"
+ lib_dll=option
+ lib_all=-Wl,-whole-archive
+ lib_undef=-Wl,-no-whole-archive
+ dld=$cc
+ shared='-shared -Wl,--enable-auto-image-base -Wl,--out-implib=$(<:N=*'$so')'
+ prefix_dynamic=cyg
+ prefix_shared=lib
+ break
+ fi
+ fi
+ break
+ done
+ ;;
+*) if $cc -c $cc_dll $cc_pic shared.$src && $cc -c $cc_dll $cc_pic notall.$src
+ then for xx in "$cc" "$ld"
+ do eval set x $probe_shared
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f xxx$dll
+ # UNDENT ...
+
+ if $xx $1 -o xxx$dll shared.$obj 2>e && test -r xxx$dll
+ then if test -s e && egrep -i 'unknown|invalid|option' e > /dev/null
+ then continue
+ fi
+ case `PATH=/bin:/usr/bin:$PATH file xxx$dll` in
+ *lib*|*obj*|*shared*)
+ ;;
+ "") $executable xxx$dll || continue
+ ;;
+ *ELF*|*elf*)
+ $executable xxx$dll || continue
+ case `strings xxx$dll | sed -e 's,.*[ |],,' | sort -u | egrep -i '^([._](dynamic|dynstr|dynsym))$'` in
+ [012]) continue ;;
+ esac
+ ;;
+ *archive*not*stripped*|*data*dynamic*not*stripped*)
+ $executable xxx$dll || continue
+ ;;
+ *) continue
+ ;;
+ esac
+ dld=$xx
+ shared=$1
+ # does -nostartfiles make sense for C?
+ case $plusplus in
+ '') z=`wc -c < xxx$dll`
+ eval set x $probe_shared_nostart
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f xxx$dll
+ if $dld $shared $1 -o xxx$dll shared.$obj 2>e && test -r xxx$dll
+ then case `wc -c < xxx$dll` in
+ $z) ;;
+ *) if test -s e
+ then case `cat e` in
+ *[Ee][Rr][Rr][Oo][Rr]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*)
+ continue
+ ;;
+ esac
+ fi
+ case $shared in
+ '') shared=$1 ;;
+ *) shared="$shared $1" ;;
+ esac
+ break
+ ;;
+ esac
+ fi
+ done
+ ;;
+ esac
+ case $cc_dll in
+ "") cc_dll=$cc_dll_def ;;
+ esac
+ eval set x x $probe_sd
+ while :
+ do shift
+ shift
+ case $# in
+ [01]) break ;;
+ esac
+ rm -f xxx xxx$1 xxx$2
+ if $dld $shared -o xxx shared.$obj 2>e
+ then if test -f xxx$1 -a \( -f xxx$2 -o "$cc_dll" = "$cc_dll_def" \)
+ then sd=$1
+ so=$2
+ lddynamic=-Bdynamic
+ ldstatic=-Bstatic
+ break 2
+ elif test -f xxx -a -f xxx$2
+ then sd=$1
+ so=$2
+ break 2
+ else case $so in
+ '') so=$1 ;;
+ esac
+ break
+ fi
+ fi
+ done
+ rm -f libxxx.$lib
+ $ar cr libxxx.$lib shared.$obj
+ ranlib libxxx.$lib
+ eval set x x $probe_lib_all_undef
+ rm -f xxx$dll
+ if $dld $shared -o xxx$dll libxxx.$lib && test -r xxx$dll
+ then if $nm $nmflags xxx$dll | grep ShareD
+ then lib_dll=OPTION
+ set x x
+ fi
+ fi
+ while :
+ do shift
+ shift
+ case $# in
+ 0|1) break ;;
+ esac
+ rm -f xxx$dll
+ if $dld $shared -o xxx$dll $1 libxxx.$lib $2 && test -r xxx$dll
+ then if $nm $nmflags xxx$dll | grep ShareD
+ then lib_dll=option
+ lib_all=$1
+ lib_undef=$2
+ break
+ fi
+ fi
+ case $2 in
+ ?*) if $dld $shared -o xxx$dll $1 libxxx.$lib && test -r xxx$dll
+ then if $nm $nmflags xxx$dll | grep ShareD
+ then lib_dll=option
+ lib_all=$1
+ break
+ fi
+ fi
+ ;;
+ esac
+ done
+ case $lib_dll in
+ OPTION) lib_dll=option
+ ;;
+ option) case $lib_undef in
+ "") rm -f libyyy.$lib
+ $ar cr libyyy.$lib notall.$obj
+ ranlib libyyy.$lib
+ $cc -c prefix.$src
+ eval set x x $probe_lib_all_undef
+ while :
+ do shift
+ shift
+ case $# in
+ 0|1) break ;;
+ esac
+ rm -f xxx$dll
+ if $dld $shared -o xxx$dll prefix.$obj $lib_all libxxx.$lib $2 libyyy.$lib && test -r xxx$dll
+ then rm -f t
+ $nm $nmflags xxx$dll > t
+ case `grep -c ShareD t`:`grep -c NotalL t` in
+ 0:*) ;;
+ *:0) lib_undef=$2
+ break
+ ;;
+ esac
+ fi
+ done
+ ;;
+ esac
+ case $lib_undef in
+ "") eval set x $probe_lib_multiple
+ rm -f libyyy.$lib
+ cp libxxx.$lib libyyy.$lib
+ rm -f xxx$dll
+ if $dld $shared -o xxx$dll prefix.$obj $lib_all libxxx.$lib libyyy.$lib && test -r xxx$dll
+ then :
+ else while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f xxx$dll
+ if $dld $shared -o xxx$dll prefix.$obj $lib_all $1 libxxx.$lib libyyy.$lib && test -r xxx$dll
+ then rm -f t
+ $nm $nmflags xxx$dll > t
+ case `grep -c ShareD t` in
+ 0) ;;
+ *) lib_all="$lib_all $1"
+ break
+ ;;
+ esac
+ fi
+ done
+ fi
+ lib_dll=symbol
+ ;;
+ esac
+ ;;
+ *) lib_dll=symbol
+ ;;
+ esac
+ case `cat e` in
+ ?*) eval set x $probe_unresolved
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f xxx$dll
+ if eval '$dld $shared' $1 '-o xxx$dll shared.$obj 2>e && test -r xxx$dll'
+ then case `cat e` in
+ "") shared="$shared $1"; break ;;
+ esac
+ fi
+ done
+ ;;
+ esac
+ r=
+ eval set x $probe_shared_registry
+ while :
+ do shift
+ r=x$r
+ case $# in
+ 0) break ;;
+ esac
+ rm -f xxx$dll
+ if eval \$dld \$shared -o xxx\$dll $1 shared.\$obj &&
+ test -r xxx$dll -a -r $probe_shared_registry_file
+ then probe_shared_registry_file='$(CC.SHARED.REGISTRY.PATH)'
+ eval set x $probe_shared_registry
+ i=
+ while :
+ do shift
+ i=x$i
+ case $i in
+ $r) break ;;
+ esac
+ done
+ shared_registry=$1
+ fi
+ done
+ break 2
+ fi
+
+ # ... INDENT
+ done
+ done
+ fi
+ case $so in
+ ?*) rm -f xxx*
+ if $dld $shared -g -o xxx shared.$obj 2>e
+ then set x $probe_sdb
+ while :
+ do shift
+ case $1 in
+ 0) break ;;
+ esac
+ if test -f xxx$1
+ then sdb=$1
+ break
+ fi
+ done
+ fi
+ if $cc -c require.$src
+ then p='
+/usr/proberun/lib:/local/runprobe/lib
+'
+ eval set x $probe_ldrunpath
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f require.exe
+ if $cc -o require.exe $1"$p" require.$obj &&
+ grep -c /proberun/ require.exe >/dev/null &&
+ grep -c /runprobe/ require.exe > /dev/null
+ then ldrunpath=$1
+ eval set x $probe_ldorigin
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f origin.exe
+ if $cc -o origin.exe $1 $ldrunpath'$ORIGIN' require.$obj
+ then if ./origin.exe > /dev/null 2>&1
+ then ldorigin="$1 $ldrunpath"'\$ORIGIN/$(BINDIR:P=R=$(DLLDIR))'
+ fi
+ break
+ fi
+ done
+ break
+ fi
+ done
+ fi
+ rm -f libxxx$so
+ if $cc -c sovmain.$src &&
+ $cc -c $cc_dll $cc_pic sovlib.c &&
+ $dld $shared -o libxxx$so sovlib.$obj &&
+ $cc -o sovmain.$exe -L. sovmain.$obj -lxxx
+ then rm -f sovmain.$exe
+ mv libxxx$so libxxx$so.5.6
+ if $cc -o sovmain.$exe -L. sovmain.$obj -lxxx
+ then soversion=1
+ fi
+ fi
+ rm -f doti.$obj
+ std64=/lib64
+ lcl64=/usr/local/lib64
+ if test -d $std64 -a -d $lcl64 && $cc -c doti.$src
+ then for i in `cd $lcl64; ls *$so 2>/dev/null | sed 's/lib\([^.]*\).*/\1/'`
+ do if $cc -o runpath.$exe doti.$obj -l$i >/dev/null 2>&1
+ then LD_LIBRARY_PATH= ./runpath.$exe >/dev/null 2>&1 && continue
+ if LD_LIBRARY_PATH=$lcl64 ./runpath.$exe >/dev/null 2>&1
+ then runpath=$lcl64
+ break
+ elif LD_LIBRARY_PATH=$std64 ./runpath.$exe >/dev/null 2>&1
+ then runpath=$std64
+ break
+ elif LD_LIBRARY_PATH=$lcl64:$std64 ./runpath.$exe >/dev/null 2>&1
+ then runpath=$lcl64:$std64
+ break
+ fi
+ fi
+ done
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+rm -f shared.$obj
+if $cc -c shared.$src
+then eval set x $probe_ar_arflags
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f libxxx.$lib
+ if $ar $1 r libxxx.$lib shared.$obj && $ar $1 t libxxx.$lib 2>&1 | grep shared.$obj >/dev/null
+ then ar_arflags=$1
+ break
+ fi
+ done
+ eval set x $probe_arflags
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f libxxx.$lib
+ if $cc $1 -o libxxx.$lib shared.$obj && $ar t libxxx.$lib 2>&1 | grep shared.$obj >/dev/null
+ then arflags=$1
+ break
+ fi
+ done
+fi
+
+case $shared in
+-G) case $cc_dll in
+ "") cc_dll=$cc_dll_def ;;
+ esac
+ ;;
+*) case $lib_dll in
+ symbol) echo 'extern int f();
+ int main() { f(); return 0; }' > main.$src
+ echo '#include <stdio.h>
+ int f() { printf("hello world"); return 0; }' > member.$src
+ if $cc -c main.$src && $cc -c member.$src
+ then echo f > lib.exp
+ rm -f lib.$obj main.exe
+ if $ld -o lib.$obj -L: -bexport:lib.exp -berok -bmodtype:SRE -T512 -H512 -lm -lc member.$obj && $cc -o main.exe main.$obj lib.$obj
+ then dld=$ld
+ shared='-T512 -H512 -L$(LIBDIR): -berok -bmodtype:SRE'
+ lib_dll=export
+ dll_libraries='-lm -lc'
+ ldscript=.exp
+ case $cc_dll in
+ "") cc_dll=$cc_dll_def ;;
+ esac
+ case $so in
+ "") so=.$obj ;;
+ esac
+ fi
+ fi
+ ;;
+ esac
+ ;;
+esac
+case $shared in
+?*) if $cc -c $cc_dll $cc_pic shared.$src
+ then eval set x $probe_shared_name
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f xxx$dll
+ if $dld $shared ${1}libfoo.1.2 -o xxx$dll shared.$obj 2>e && test -r xxx$dll
+ then shared_name=$1
+ break
+ fi
+ done
+ fi
+ ;;
+esac
+case " $cc_dll " in
+*" $cc_dll_def "*)
+ ;;
+" ") ;;
+*) cc_dll="$cc_dll_def $cc_dll"
+ ;;
+esac
+
+case $hosttype in
+win32.*|cygwin.*|os2.*)
+ Lflag=1
+ ;;
+*) if $cc -c doti.$src
+ then if $cc -L. doti.$obj -lc >/dev/null
+ then case $cc_dll in
+ '') ;;
+ *) Lflag=1 ;;
+ esac
+ fi
+ fi
+ ;;
+esac
+
+case $lib_dll in
+option) case $hosttype in
+ linux.*) dll_libraries=-lc ;;
+ esac
+ ;;
+SYMBOL) lib_dll=symbol
+ ;;
+symbol) echo "#include <stdio.h>
+extern int fun()
+{
+ puts(\"fun\");
+ return 0;
+}" > dllib.$src
+ echo "extern int fun();
+int
+main()
+{
+ return fun();
+}" > dlmain.$src
+ pwd=`pwd`
+ while :
+ do
+ if $cc -c $cc_dll $cc_pic dlmain.$src &&
+ $cc -c $cc_dll $cc_pic dllib.$src
+ then rm -f libxxx$so
+ if $dld $shared -o libxxx$so dllib.$obj &&
+ chmod 555 libxxx$so
+ then rm -f dlmain.$exe
+ if $cc -o dlmain.$exe dlmain.$obj $pwd/libxxx$so &&
+ (./dlmain.$exe) >/dev/null 2>&1
+ then break
+ fi
+ fi
+ rm -f libxxx$so dlmain.$exe
+ if $dld $shared -o libxxx$so dllib.$obj -lm -lc &&
+ chmod 555 libxxx$so &&
+ $cc -o dlmain.$exe dlmain.$obj $pwd/libxxx$so &&
+ (./dlmain.$exe) >/dev/null 2>&1
+ then dll_libraries='-lm -lc'
+ fi
+ fi
+ break
+ done
+ # the dll_libraries probe is still lame
+ case $dll_libraries in
+ '') case $hosttype in
+ sco.*|sol*.*|sun*) ;;
+ *) dll_libraries='-lm -lc' ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+stdlib=
+a=`$cc -print-multi-directory 2>/dev/null`
+case $a in
+.) ;;
+*) for d in `$cc -print-search-dirs 2>/dev/null | sed -e '/^libraries:/!d' -e 's/.*=//' | tr : '\n' | grep /lib/`
+ do if [ -d ${d}${a} ]
+ then stdlib="$stdlib ${d}${a}"
+ else case $d in
+ */lib/) d=`echo '' $d | sed -e 's,/$,,'`
+ if [ -d ${d}${a} ]
+ then stdlib="$stdlib ${d}${a}"
+ fi
+ ;;
+ esac
+ fi
+ done
+ ;;
+esac
+case $stdlib in
+'') stdlib=`$cc -v doti.$src 2>&1 |
+ sed 's/ */\n/g' |
+ sed -e '/^-L/!d' -e 's/^-L//' |
+ while read dir
+ do if test -d "$dir"
+ then (cd "$dir"; pwd)
+ fi
+ done`
+ ;;
+*) eval set x $probe_verbose
+ shift
+ for o in "$@"
+ do stdlib="$stdlib "`$cc $o doti.$src 2>&1 |
+ sed 's/ */\n/g' |
+ sed -e '/^-L/!d' -e '/\/lib64$/!d' -e 's/^-L//'`
+ done
+ ;;
+esac
+case $stdlib in
+?*) keepstdlib=1
+ o=$stdlib
+ stdlib=
+ for dir in $o
+ do case " $stdlib " in
+ *" $o "*) continue ;;
+ esac
+ case $dir in
+ /usr/lib64)
+ i=/usr/local/lib64
+ a=/lib64
+ ;;
+ /lib64) i=/usr/local/lib64
+ a=/usr/lib64
+ ;;
+ /usr/lib)
+ i=/usr/local/lib
+ a=/lib
+ ;;
+ lib) i=/usr/local/lib
+ a=/usr/lib
+ ;;
+ *) i=
+ a=
+ ;;
+ esac
+ if test "" != "$i" -a -d "$i"
+ then case " $o " in
+ *" $i "*)
+ ;;
+ *) stdlib="$stdlib $i"
+ ;;
+ esac
+ fi
+ stdlib="$stdlib $dir"
+ if test "" != "$a" -a -d "$a"
+ then case " $o " in
+ *" $a "*)
+ ;;
+ *) stdlib="$stdlib $a"
+ ;;
+ esac
+ fi
+ done
+ case $hosted in
+ 1) case " $stdlib " in
+ *" /usr/lib "*)
+ ;;
+ *) case " $stdlib " in
+ *" /usr/local/lib "*)
+ ;;
+ *) stdlib="$stdlib /usr/local/lib"
+ ;;
+ esac
+ stdlib="$stdlib /usr/lib"
+ ;;
+ esac
+ case " $stdlib " in
+ *" /lib "*)
+ ;;
+ *) stdlib="$stdlib /lib"
+ ;;
+ esac
+ esac
+ ;;
+*) keepstdlib=0
+ case $dir in
+ */arch/$hosttype/lib/*)
+ notlib=`echo $dir | sed "s,/arch/$hosttype/lib/.*,/arch/$hosttype/lib,"`
+ ;;
+ *) notlib=////
+ ;;
+ esac
+ tstlib=
+ implib=
+ if $cc -c hosted.$src
+ then for f in `(
+ eval set x $probe_verbose
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ $cc $1 hosted.$obj
+ done
+ ) 2>&1 | sed -e 's/[ :]/\\
+ /g' -e 's/-L//g' -e 's/^P,//' -e "s/[\"']//g" -e 's,^[\\\\/]*[\\\\/],/,' | sed -e '/^\$/d' -e '/^[-+]/d' -e '/^[^\\\\\\/]/d' -e '/[\\\\\\/]tmp[\\\\\\/]/d' -e 's/:\$//' -e 's,//*$,,'`
+ do case " $tstlib $implib " in
+ *" $f "*) continue ;;
+ esac
+ case $f in
+ $notlib) continue ;;
+ esac
+ if test -d $f
+ then tstlib="$tstlib $f"
+ elif test -f $f
+ then d=`echo $f | sed -e 's,[\\\\/]*[^\\\\/]*\$,,'`
+ case " $tstlib $implib " in
+ *" $d "*) continue ;;
+ esac
+ case $d in
+ *[\\/]usr[\\/]lib)
+ x=$d
+ d="`echo $d | sed -e 's,[\\\\/][\\\\/]*usr[\\\\/]lib\$,/lib,'`"
+ case " $tstlib $implib " in
+ *" $d "*) ;;
+ *) implib="$implib $d" ;;
+ esac
+ implib="$implib $x"
+ ;;
+ *[\\/]lib)
+ implib="$implib $d"
+ d="`echo $d | sed -e 's,[\\\\/][\\\\/]*lib\$,/usr/lib,'`"
+ case " $tstlib $implib " in
+ *" $d "*) ;;
+ *) implib="$implib $d" ;;
+ esac
+ ;;
+ *) implib="$implib $d"
+ ;;
+ esac
+ fi
+ done
+ fi
+ tstlib="$tstlib $implib"
+ if $cc -Dtype=void -Dcall=exit -c tstlib.$src && mv tstlib.$obj tst.$obj
+ then case $plusplus in
+ '') probe_lxx= ;;
+ esac
+ l=
+ for sym in $probe_l $probe_lxx
+ do case $l in
+ "") l=$sym; continue ;;
+ esac
+ rm -f tstlib.$exe
+ if $cc -o tstlib.$exe tst.$obj -l$l
+ then eval set x $probe_ldmap
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ d=`$cc -Dtype=int -Dcall=$sym $static $1 tstlib.$src -l$l 2>&1 | sed -e '/[\\\\\\/].*[\\\\\\/]lib[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+]*\.[^\\\\\\/]*\$/!d' -e 's,^[^\\\\\/]*,,' -e 's,[\\\\\\/]lib[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+]*\.[^\\\\\\/]*\$,,' -e '/^[\\\\\\/]/!d' | sort -u`
+ case $d in
+ ?*) tstlib="$tstlib $d" ;;
+ esac
+ done
+ fi
+ l=
+ done
+ fi
+ libstd=
+ libset=
+ stdlibroot="/ /usr/"
+ for d in $tstlib
+ do case $d in
+ [\\/]lib|[\\/]usr[\\/]lib)
+ ;;
+ *) case " $stdlib " in
+ *\ $d\ *)
+ ;;
+ *) if ls $d ${PREROOT+$PREROOT/../$d} > tmp.tmp && test -s tmp.tmp
+ then for i in $probe_lib $obj
+ do if grep -i "\\.$i\$" tmp.tmp >/dev/null
+ then case " $probe_lib_append " in
+ *\ $d\ *)
+ libstd="$libstd $d"
+ ;;
+ *) stdlib="$stdlib $d"
+ case $d in
+ /usr/lib|/usr/lib/*)
+ ;;
+ /usr/lib?*)
+ e=`echo $d | sed -e 's,/usr,,'`
+ g=`echo $d/libc.* $e/libc.*`
+ case "$e $g " in
+ *".* "*);;
+ *) stdlib="$stdlib $e"
+ stdlibroot=
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case $libset in
+ "") case $i in
+ $obj) ;;
+ *) libset=1
+ lib=$i
+ ;;
+ esac
+ ;;
+ esac
+ break
+ fi
+ done
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ done
+ for d in `$ld --verbose 2>&1 | sed -e '/SEARCH_DIR/!d' -e 's/[ ][ ][ ]*/ /g' -e 's/SEARCH_DIR(\([^ ]*\));/\1/g' -e 's, //[^ ]*,,' -e 's,",,g'`
+ do if test -d $d
+ then case " $stdlib $libstd " in
+ *\ ${d}\ *)
+ ;;
+ *) libstd="$libstd $d"
+ ;;
+ esac
+ fi
+ done
+ case $hosted in
+ "") tstlib= ;;
+ *) tstlib="$stdlibroot /usr/ccs/ /usr/local/" ;;
+ esac
+ case $stdlibroot in
+ ?*) d=
+ for f in $stdinclude
+ do f=`echo $f | sed -e 's,[^\\\\/]*\$,,'`
+ d="$d $f"
+ done
+ tstlib="$d $tstlib"
+ ;;
+ esac
+ $cc -c doti.$src > all.tmp
+ for f in $probe_libdir
+ do for d in $stdlib $libstd $tstlib
+ do if test -d ${d}${f}
+ then ls ${d}${f} ${PREROOT:+$PREROOT/../${d}${f}} |
+ while read i
+ do for j in ${d}${f}/${i} ${PREROOT:+$PREROOT/../${d}${f}/${i}}
+ do if test -f $j -a -r $j -a -s $j
+ then echo $i
+ break
+ fi
+ done
+ done > tmp.tmp
+ if test -s tmp.tmp
+ then if egrep -i "^${prefix_archive}[abcdefghijklmnopqrstuvwxyz0123456789_][abcdefghijklmnopqrstuvwxyz0123456789_]*\\.$lib\$" tmp.tmp >lib.tmp ||
+ egrep -i "\\.$obj\$" tmp.tmp >/dev/null ||
+ egrep -i "^${prefix_shared}[abcdefghijklmnopqrstuvwxyz0123456789_][abcdefghijklmnopqrstuvwxyz0123456789_]*\\$so(.[0-9]+)*\$" tmp.tmp >>lib.tmp
+ then if test -s lib.tmp
+ then sed -e "s,.*/,," -e 's,^'${prefix_archive}'\(.*\)\.'$lib'$,\1,g' -e 's,^'${prefix_shared}'\(.*\)\'$so'[.0-9]*,\1,g' lib.tmp | sort -u > tmp.tmp
+ xs=`sort all.tmp all.tmp tmp.tmp | uniq -u`
+ case $xs in
+ '') continue ;;
+ esac
+ ok=0
+ for x in $xs
+ do case $x in
+ *_p) continue ;; # linux gcc known to hang for -lc_p
+ esac
+ if $cc -o doti.$exe doti.$obj -l$x 2>e
+ then ok=1
+ else if test -s e && egrep -i ":.*[ ](find|found|locate|search|-l$x)[ ]" e > /dev/null
+ then if egrep -i ":.*[ ](access|permission)[ ]" e
+ then : maybe
+ else ok=0
+ break
+ fi
+ fi
+ case $Lflag in
+ 1) if $cc -L${d}${f} -o doti.$exe doti.$obj -l$x
+ then ok=0
+ break
+ fi
+ ;;
+ esac
+ fi
+ done
+ case $ok in
+ 0) continue ;;
+ esac
+ sort -u all.tmp tmp.tmp > lib.tmp
+ mv lib.tmp all.tmp
+ fi
+ case " $stdlib $libstd " in
+ *" ${d}${f} "*)
+ ;;
+ *) if test -d ${d}${f}/fsoft
+ then stdlib="$stdlib ${d}${f}/"'$(FLOAT_OPTION)'
+ fi
+ stdlib="$stdlib ${d}${f}"
+ ;;
+ esac
+ fi
+ fi
+ fi
+ done
+ done
+ stdlib="$stdlib $libstd"
+ case $stdlib in
+ */shlib*)
+ dy=
+ st=
+ for i in $stdlib $libstd
+ do case $i in
+ */shlib) dy="$dy $i" ;;
+ *) st="$st $i" ;;
+ esac
+ done
+ for i in /var
+ do if test -d $i/shlib
+ then dy="$dy $i/shlib"
+ fi
+ done
+ stdlib="$dy $st"
+ ;;
+ esac
+ ;;
+esac
+
+if $cc -c prefix.$src
+then eval set x $probe_symprefix
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ if $nm $nmflags prefix.$obj | grep -c ${1}prefix >/dev/null
+ then symprefix=$1
+ break
+ fi
+ done
+fi
+
+if $cc -c warn.$src 2>e && test -f warn.$obj
+then e=`wc -c < e`
+
+ eval set x $probe_debug
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f warn.$obj
+ $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue
+ case `wc -c < e` in
+ $e) debug=$1; break ;;
+ esac
+ done
+
+ eval set x $probe_no_protect
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f warn.$obj
+ $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue
+ case `wc -c < e` in
+ $e) no_protect=$1; break ;;
+ esac
+ done
+
+ case $version_string in
+ $probe_gcc_version) probe_optimize="$probe_gcc_optimize $probe_optimize" ;;
+ esac
+ eval set x $probe_optimize
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f warn.$obj
+ $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue
+ case `wc -c < e` in
+ $e) optimize=$1; break ;;
+ esac
+ done
+
+ eval set x $probe_strict
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f warn.$obj
+ $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue
+ n=`wc -c < e`
+ if test $n -ge $e
+ then strict=$1
+ break
+ fi
+ done
+
+ $cc -c warn1.$src 2>e
+ o=`wc -c < e`
+ eval set x $probe_warn
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ rm -f warn.$obj warn.$exe
+ $cc -o warn.$exe $1 warn.$src 2>e && test -f warn.$exe || continue
+ n=`wc -c < e`
+ for i in $warn_enum
+ do rm -f warn$i.$obj
+ $cc -c $1 warn$i.$src 2>e && test -f warn$i.$obj || continue
+ n=`wc -c < e`
+ if test $n -gt $o
+ then warn=$1
+ break 2
+ fi
+ done
+ done
+
+fi
+
+while :
+do case $hosted in
+ 1) rm -f readonly.$exe
+ eval set x '""' $probe_readonly
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ for co in '' -Dtest_const
+ do rm -f readonly.$exe
+ if $cc -o readonly.$exe $co $1 readonly.$src && $executable readonly.$exe
+ then if ./readonly.$exe >/dev/null 2>&1
+ then :
+ else readonly=$1
+ break 3
+ fi
+ fi
+ done
+ done
+ rm -f readonly.$exe readonly.s
+ if $cc -S readonly.$src && test -f readonly.s
+ then if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)data/\1text/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)zero[ ][ ]*/\1set .,.+/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*1/\1byte 0/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*2/\1byte 0,0/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*3/\1byte 0,0,0/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*4/\1byte 0,0,0,0/' \
+ readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe
+ then if ./readonly.$exe >/dev/null 2>&1
+ then :
+ else readonly='-S.data'
+ break
+ fi
+ fi
+ rm -f readonly.$exe
+ if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)idat/\1code/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)zero[ ][ ]*/\1set .,.+/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*1/\1byte 0/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*2/\1byte 0,0/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*3/\1byte 0,0,0/' \
+ -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*4/\1byte 0,0,0,0/' \
+ readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe
+ then if ./readonly.$exe >/dev/null 2>&1
+ then :
+ else readonly='-S.idat'
+ break
+ fi
+ fi
+ if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)data/\1rdata/' \
+ readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe
+ then if ./readonly.$exe >/dev/null 2>&1
+ then :
+ else readonly='-S.rdata'
+ break
+ fi
+ fi
+ fi
+ ;;
+ esac
+ break
+done
+
+case $stdc in
+?*) dialect="$dialect ANSI" ;;
+esac
+case $plusplus in
+?*) dialect="$dialect C++" ;;
+esac
+case $hosted in
+"") dialect="$dialect CROSS" ;;
+esac
+case $doti in
+?*) dialect="$dialect DOTI" ;;
+esac
+case $gnu in
+?*) dialect="$dialect GNU" ;;
+esac
+case $so:$dynamic:$static in
+::) ;;
+*) dialect="$dialect DYNAMIC"
+ case $soversion in
+ ?*) dialect="$dialect VERSION" ;;
+ esac
+ ;;
+esac
+case $implicitc in
+?*) dialect="$dialect IMPLICITC" ;;
+esac
+case $ptrcopy in
+?*) dialect="$dialect PTRCOPY" ;;
+esac
+case $ptrimplicit in
+?*) dialect="$dialect PTRIMPLICIT" ;;
+esac
+case $ptrmkdir in
+?*) dialect="$dialect PTRMKDIR" ;;
+esac
+case $libpp in
+?*) dialect="$dialect LIBPP" ;;
+esac
+case $toucho in
+?*) dialect="$dialect TOUCHO" ;;
+esac
+case $dDflag in
+?*) dialect="$dialect -dD" ;;
+esac
+# 2005-05-25 use $(CC.INCLUDE.LOCAL) instead
+case $include_local in
+?*) dialect="$dialect -I-" ;;
+esac
+case $Lflag in
+?*) dialect="$dialect -L" ;;
+esac
+
+ppcmd='$(CPP)'
+ppdir='$(CPP:D)'
+eval ppopt='"'$ppopt'"'
+eval ppenv='"'$ppenv'"'
+
+set x "" .$exe
+shift
+exe=
+for i
+do rm -f require$i
+done
+if $cc -o require require.$src
+then for i
+ do if $executable require$i
+ then exe=$i
+ break
+ fi
+ done
+fi
+case $sa:$sd:$so in
+::?*) eval set x $probe_sa
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ for i in $stdlib
+ do eval j="'" $i/lib*$1 "'"
+ case $j in
+ " $i/lib*$1 ")
+ eval j="'" $i/lib*$1.[0123456789]* "'"
+ case $j in
+ " $i/lib*$1.[0123456789]* ")
+ continue
+ ;;
+ esac
+ ;;
+ esac
+ sa=$1
+ lddynamic=-Bdynamic
+ ldstatic=-Bstatic
+ break 2
+ done
+ done
+ ;;
+esac
+case $ldscript in
+"") case $so in
+ .lib) ldscript=".def .exp" ;;
+ *) ldscript=".ld" ;;
+ esac
+ ;;
+esac
+case $hosttype in
+'') hosttype=unknown ;;
+sgi.mips3) dll_variants='sgi.mips2:o32:-mips2 sgi.mips4:64:-mips4' ;;
+sgi.mips4) dll_variants='sgi.mips2:o32:-mips2 sgi.mips3:n32:-mips3' ;;
+esac
+
+case $hosted in
+"") ccnative=`echo $cc | sed -e 's,.*/,,'`
+ ccs=$ccnative
+ for c in cc gcc
+ do case " $ccs " in
+ *" $c "*) ;;
+ *) ccs="$ccs $c" ;;
+ esac
+ done
+ for p in $path
+ do for c in $ccs
+ do if $executable $p/$c
+ then rm -f native.$exe
+ if $p/$c -o native.$exe doti.$src && ./native.$exe
+ then ccnative=$p/$c
+ exectype=`package CC="$ccnative" || $SHELL -c "package CC='$ccnative'"`
+ case $exectype in
+ *[Uu][Ss][Aa][Gg][Ee]:*)
+ exectype=`PATH=$_probe_PATH; export PATH; package CC="$ccnative" || $SHELL -c "package CC='$ccnative'"`
+ ;;
+ esac
+ break 2
+ fi
+ fi
+ done
+ done
+ ;;
+*) ccnative=$cc
+ exectype=$hosttype
+ ;;
+esac
+
+# runtime shared lib exported symbol resolution
+
+case $cc_dll:$shared in
+:|:*|*:);;
+*) cat > cmd.c <<'!'
+#include <stdio.h>
+#include <dlfcn.h>
+typedef int (*Lib_f)(int**, int**, int**);
+int gbl_def = 1;
+int gbl_ref = 1;
+int gbl_ext;
+int main(int argc, char** argv)
+{
+ void* dll;
+ Lib_f lib;
+ int* def;
+ int* ref;
+ int* ext;
+
+ if (!(dll = dlopen(*++argv, RTLD_LAZY)))
+ fprintf(stderr, "library not found\n");
+ else if (!((lib = (Lib_f)dlsym(dll, "lib"))) && !(lib = (Lib_f)dlsym(dll, "_lib")))
+ fprintf(stderr, "symbol not found\n");
+ else if ((*lib)(&def, &ref, &ext))
+ fprintf(stderr, "function failed\n");
+ else if (def == &gbl_def && ref == &gbl_ref && ext == &gbl_ext)
+ printf("ALL\n");
+ else if (ref == &gbl_ref && ext == &gbl_ext)
+ printf("REF\n");
+ else if (ext == &gbl_ext)
+ printf("EXT\n");
+ return 0;
+}
+!
+ cat > lib.c <<'!'
+int gbl_def = 1;
+int gbl_ref;
+int gbl_ext;
+int lib(int** def, int** ref, int** ext)
+{
+ *def = &gbl_def;
+ *ref = &gbl_ref;
+ *ext = &gbl_ext;
+ return 0;
+}
+!
+ if $cc -c $cc_dll $cc_pic cmd.c &&
+ $cc -c $cc_dll $cc_pic lib.c && {
+ $cc $cc_dll $export_dynamic -o cmd.exe cmd.o ||
+ $cc $cc_dll $export_dynamic -o cmd.exe cmd.o -ldl
+ } &&
+ $dld $shared -o libgbl.dll lib.o
+ then x=`./cmd.exe ./libgbl.dll`
+ case $x in
+ ?*) dialect="$dialect EXPORT=$x" ;;
+ esac
+ else case $sd:$hosttype in
+ .dll:*win*) dialect="$dialect EXPORT=DLL" ;;
+ esac
+ fi
+ ;;
+esac
+
+# shellmagic defined if installed shell scripts need magic
+
+echo ': got magic :
+echo ok' > ok
+chmod +x ok
+case `(eval ./ok | /bin/sh) 2>/dev/null` in
+ok) ;;
+*) echo '#!/bin/env sh
+: got magic :
+echo ok' > ok
+ chmod +x ok
+ case `(eval ./ok | /bin/sh) 2>/dev/null` in
+ ok) shellmagic='$("#")!/bin/env sh'
+ ;;
+ *) for i in /emx/bin/bash.exe /emx/bin/sh.exe
+ do if test -x $i
+ then shellmagic='$("#")!'$i
+ break
+ fi
+ done
+ ;;
+ esac
+ ;;
+esac
+
+#
+# path cleanup
+#
+
+for i in ar ccnative dld ld nm size stdinclude stdlib strip
+do eval o='$'$i
+ v=$o
+ case $v in
+ *//*) v=`echo $v | sed 's,///*,/,g'` ;;
+ esac
+ if (test . -ef "`pwd`")
+ then k=
+ for x in $v
+ do case $x in
+ */../*|*/..)
+ case $x in
+ /*) a=/ ;;
+ *) a= ;;
+ esac
+ IFS=/
+ set '' $x
+ IFS=$ifs
+ r=
+ for d
+ do r="$d $r"
+ done
+ p=
+ g=
+ for d in $r
+ do case $d in
+ ..) g="$g $d" ;;
+ *) case $g in
+ '') case $p in
+ '') p=$d ;;
+ *) p=$d/$p ;;
+ esac
+ ;;
+ *) set $g
+ shift
+ g=$*
+ ;;
+ esac
+ ;;
+ esac
+ done
+ case $a in
+ '') for d in $g
+ do p=$d/$p
+ done
+ ;;
+ *) p=$a$p
+ ;;
+ esac
+ case $p in
+ /) continue ;;
+ esac
+ test $x -ef $p && x=$p
+ ;;
+ esac
+ k="$k $x"
+ done
+ set '' $k
+ shift
+ v=$1
+ case $# in
+ 0) ;;
+ *) shift
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ k=
+ for d
+ do for j in $v
+ do test $d -ef $j && continue 2
+ done
+ k="$k $d"
+ done
+ set '' $k
+ case $# in
+ 1) break ;;
+ esac
+ shift
+ v="$v $1"
+ shift
+ done
+ ;;
+ esac
+ fi
+ case $v in
+ $o) ;;
+ *) eval $i='$'v ;;
+ esac
+done
+
+case $keepstdlib in
+1) ;;
+*) #
+ # favor lib64 over lib
+ #
+ case $hosttype in
+ *64|*[!0-9]64[!a-zA-Z0-9]*)
+ o=$stdlib
+ stdlib=
+ for i in $o
+ do case " $stdlib " in
+ *" $i "*)
+ continue
+ ;;
+ esac
+ case $i in
+ *64) stdlib="$stdlib $i"
+ continue
+ ;;
+ esac
+ case " $o " in
+ *" ${i}64 "*)
+ case " $stdlib " in
+ *" ${i}64 "*)
+ ;;
+ *) stdlib="$stdlib ${i}64"
+ ;;
+ esac
+ ;;
+ esac
+ stdlib="$stdlib $i"
+ done
+ ;;
+ esac
+ ;;
+esac
+
+#
+# set up for local override
+#
+
+CC_VERSION_STAMP=$version_stamp
+CC_VERSION_STRING=$version_string
+CC_CC=$cc
+CC_NATIVE=$ccnative
+CC_EXECTYPE=$exectype
+CC_HOSTTYPE=$hosttype
+CC_ALTPP_FLAGS=$ppopt
+CC_ALTPP_ENV=$ppenv
+CC_AR=$ar
+CC_AR_ARFLAGS=$ar_arflags
+CC_ARFLAGS=$arflags
+CC_DEBUG=$debug
+CC_DIALECT=$dialect
+CC_PICBIG=$cc_PIC
+CC_PICSMALL=$cc_pic
+CC_PIC=$CC_PICBIG
+CC_DLL_ONLY=$cc_dll
+case $CC_DLL_ONLY in
+'') CC_DLLBIG=
+ CC_DLLSMALL=
+ CC_DLL=
+ ;;
+*) CC_DLLBIG="$CC_DLL_ONLY $CC_PICBIG"
+ CC_DLLSMALL="$CC_DLL_ONLY $CC_PICSMALL"
+ CC_DLL="$CC_DLL_ONLY $CC_PICBIG"
+ ;;
+esac
+CC_DLL_DIR=$dll_dir
+CC_DLL_LIBRARIES=$dll_libraries
+CC_DLL_VARIANTS=$dll_variants
+CC_DYNAMIC=$dynamic
+CC_EXPORT_DYNAMIC=$export_dynamic
+CC_INCLUDE_LOCAL=$include_local
+CC_LD=$ld
+CC_LD_DYNAMIC=$lddynamic
+CC_LD_LAZY=$ldlazy
+CC_LD_NOLAZY=$ldnolazy
+CC_LD_ORIGIN=$ldorigin
+CC_LD_RECORD=$ldrecord
+CC_LD_NORECORD=$ldnorecord
+CC_LD_RUNPATH=$ldrunpath
+CC_LD_STATIC=$ldstatic
+CC_LD_STRIP=$ldstrip
+CC_LIB_DLL=$lib_dll
+CC_LIB_ALL=$lib_all
+CC_LIB_UNDEF=$lib_undef
+CC_MAKE_OPTIONS=$makeoptions
+CC_NM=$nm
+CC_NMEDIT=$nmedit
+CC_NMFLAGS=$nmflags
+CC_NOPROTECT=$no_protect
+CC_OPTIMIZE=$optimize
+CC_READONLY=$readonly
+CC_REPOSITORY=$repository
+CC_REQUIRE=$require
+CC_RUNPATH=$runpath
+CC_SHARED=$shared
+CC_SHARED_LD=$dld
+CC_SHARED_NAME=$shared_name
+CC_SHARED_REGISTRY=$shared_registry
+CC_SHARED_REGISTRY_PATH=$probe_shared_registry_path
+CC_SHELLMAGIC=$shellmagic
+CC_SIZE=$size
+CC_STATIC=$static
+CC_STDINCLUDE=$stdinclude
+CC_STDLIB=$stdlib
+CC_STRICT=$strict
+CC_STRIP=$strip
+CC_STRIP_FLAGS=$stripflags
+CC_PREFIX_ARCHIVE=$prefix_archive
+CC_PREFIX_DYNAMIC=$prefix_dynamic
+CC_PREFIX_SHARED=$prefix_shared
+CC_PREFIX_SYMBOL=$symprefix
+CC_SUFFIX_ARCHIVE=.$lib
+CC_SUFFIX_COMMAND=$suffix_command
+CC_SUFFIX_DEBUG=$sdb
+CC_SUFFIX_DYNAMIC=$sd
+CC_SUFFIX_LD=$ldscript
+CC_SUFFIX_OBJECT=.$obj
+CC_SUFFIX_SHARED=$so
+CC_SUFFIX_SOURCE=.$src
+CC_SUFFIX_STATIC=$sa
+CC_VERSION=$version_flags
+CC_WARN=$warn
+CC_ATTRIBUTES=$ATTRIBUTES
+
+exec >&3
+
+#
+# check for local override
+# all CC_* but { CC_CC CC_VERSION_STAMP CC_VERSION_STRING } may be modified
+# additional CC.* may be printed on stdout
+#
+
+if test -f "$dir/probe.lcl"
+then . "$dir/probe.lcl"
+fi
+
+#
+# the payoff
+#
+
+case $version_stamp in
+?*) echo "# $version_stamp" ;;
+esac
+echo CC.CC = $cc
+echo CC.NATIVE = $CC_NATIVE
+echo CC.EXECTYPE = $CC_EXECTYPE
+echo CC.HOSTTYPE = $CC_HOSTTYPE
+echo CC.ALTPP.FLAGS = $CC_ALTPP_FLAGS
+echo CC.ALTPP.ENV = $CC_ALTPP_ENV
+echo CC.AR = $CC_AR
+echo CC.AR.ARFLAGS = $CC_AR_ARFLAGS
+echo CC.ARFLAGS = $CC_ARFLAGS
+echo CC.DEBUG = $CC_DEBUG
+echo CC.DIALECT = $CC_DIALECT
+echo CC.DLLBIG = $CC_DLLBIG
+echo CC.DLLSMALL = $CC_DLLSMALL
+echo CC.DLL = $CC_DLL
+echo CC.DLL.DEF = $cc_dll_def
+echo CC.DLL.DIR = $CC_DLL_DIR
+echo CC.DLL.LIBRARIES = $CC_DLL_LIBRARIES
+echo CC.DLL.VARIANTS = $CC_DLL_VARIANTS
+echo CC.DYNAMIC = $CC_DYNAMIC
+echo CC.EXPORT.DYNAMIC = $CC_EXPORT_DYNAMIC
+echo CC.INCLUDE.LOCAL = $CC_INCLUDE_LOCAL
+#
+# 2004-02-14 release workaround
+#
+case $CC_SHARED_LD in
+$CC_CC) echo if LDSHARED
+ echo CC.LD = $CC_LD
+ echo else
+ echo CC.LD = $CC_CC
+ echo end
+ ;;
+*) echo CC.LD = $CC_LD
+ ;;
+esac
+echo CC.LD.DYNAMIC = $CC_LD_DYNAMIC
+echo CC.LD.LAZY = $CC_LD_LAZY
+echo CC.LD.NOLAZY = $CC_LD_NOLAZY
+echo CC.LD.ORIGIN = $CC_LD_ORIGIN
+echo CC.LD.RECORD = $CC_LD_RECORD
+echo CC.LD.NORECORD = $CC_LD_NORECORD
+echo CC.LD.RUNPATH = $CC_LD_RUNPATH
+echo CC.LD.STATIC = $CC_LD_STATIC
+echo CC.LD.STRIP = $CC_LD_STRIP
+echo CC.LIB.DLL = $CC_LIB_DLL
+echo CC.LIB.ALL = $CC_LIB_ALL
+echo CC.LIB.UNDEF = $CC_LIB_UNDEF
+echo CC.MAKE.OPTIONS = $CC_MAKE_OPTIONS
+echo CC.NM = $CC_NM
+case $CC_NMEDIT in
+?*) CC_NMEDIT=" $CC_NMEDIT" ;;
+esac
+echo CC.NMEDIT ="$CC_NMEDIT"
+echo CC.NMFLAGS = $CC_NMFLAGS
+echo CC.NOPROTECT = $CC_NOPROTECT
+echo CC.OPTIMIZE = $CC_OPTIMIZE
+echo CC.PICBIG = $CC_PICBIG
+echo CC.PICSMALL = $CC_PICSMALL
+echo CC.PIC = $CC_PIC
+echo CC.READONLY = $CC_READONLY
+echo CC.REPOSITORY = $CC_REPOSITORY
+for f in $CC_REQUIRE
+do echo CC.REQUIRE.$f =`cat req.$f`
+done
+echo CC.RUNPATH = $CC_RUNPATH
+echo CC.SHARED = $CC_SHARED
+echo CC.SHARED.LD = $CC_SHARED_LD
+echo CC.SHARED.NAME = $CC_SHARED_NAME
+echo CC.SHARED.REGISTRY = $CC_SHARED_REGISTRY
+echo CC.SHARED.REGISTRY.PATH = $CC_SHARED_REGISTRY_PATH
+echo CC.SHELLMAGIC = $CC_SHELLMAGIC
+echo CC.SIZE = $CC_SIZE
+echo CC.STATIC = $CC_STATIC
+echo CC.STDINCLUDE = $CC_STDINCLUDE
+echo CC.STDLIB = $CC_STDLIB
+echo CC.STRICT = $CC_STRICT
+echo CC.STRIP = $CC_STRIP
+echo CC.STRIP.FLAGS = $CC_STRIP_FLAGS
+echo CC.PREFIX.ARCHIVE = $CC_PREFIX_ARCHIVE
+echo CC.PREFIX.DYNAMIC = $CC_PREFIX_DYNAMIC
+echo CC.PREFIX.SHARED = $CC_PREFIX_SHARED
+echo CC.PREFIX.SYMBOL = $CC_PREFIX_SYMBOL
+echo CC.SUFFIX.ARCHIVE = $CC_SUFFIX_ARCHIVE
+echo CC.SUFFIX.COMMAND = $CC_SUFFIX_COMMAND
+echo CC.SUFFIX.DEBUG = $CC_SUFFIX_DEBUG
+echo CC.SUFFIX.DYNAMIC = $CC_SUFFIX_DYNAMIC
+echo CC.SUFFIX.LD = $CC_SUFFIX_LD
+echo CC.SUFFIX.OBJECT = $CC_SUFFIX_OBJECT
+echo CC.SUFFIX.SHARED = $CC_SUFFIX_SHARED
+echo CC.SUFFIX.SOURCE = $CC_SUFFIX_SOURCE
+echo CC.SUFFIX.STATIC = $CC_SUFFIX_STATIC
+echo CC.VERSION = $CC_VERSION
+case $CC_VERSION_STRING in
+*\"*) i=`echo " $CC_VERSION_STRING" | sed -e 's,",\\\\",g' -e 's,^ ,,' -e 's,.*,"&",'` ;;
+*\'*) i=\"$CC_VERSION_STRING\" ;;
+*) i=$CC_VERSION_STRING ;;
+esac
+cat <<!
+CC.VERSION.STRING = $i
+!
+echo CC.WARN = $CC_WARN
+
+for i in $CC_ATTRIBUTES
+do eval echo CC.$i = \$$i
+done
diff --git a/usr/src/contrib/ast/src/cmd/INIT/mamake.c b/usr/src/contrib/ast/src/cmd/INIT/mamake.c
new file mode 100644
index 0000000000..5368676b08
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/mamake.c
@@ -0,0 +1,2375 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1990-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+/*
+ * mamake -- MAM make
+ *
+ * coded for portability
+ */
+
+static char id[] = "\n@(#)$Id: mamake (AT&T Research) 2011-08-31 $\0\n";
+
+#if _PACKAGE_ast
+
+#include <ast.h>
+#include <error.h>
+
+static const char usage[] =
+"[-?\n@(#)$Id: mamake (AT&T Research) 2011-08-31 $\n]"
+USAGE_LICENSE
+"[+NAME?mamake - make abstract machine make]"
+"[+DESCRIPTION?\bmamake\b reads \amake abstract machine\a target and"
+" prerequisite file descriptions from a mamfile (see \b-f\b) and executes"
+" actions to update targets that are older than their prerequisites."
+" Mamfiles are generated by the \b--mam\b option of \bnmake\b(1) and"
+" \bgmake\b(1) and are portable to environments that only have"
+" \bsh\b(1) and \bcc\b(1).]"
+"[+?In practice \bmamake\b is used to bootstrap build \bnmake\b(1) and"
+" \bksh\b(1) in new environments. Mamfiles are used rather than"
+" old-\bmake\b makefiles because some features are not reliably supported"
+" across all \bmake\b variants:]{"
+" [+action execution?Multi-line actions are executed as a"
+" unit by \b$SHELL\b. There are some shell constructs"
+" that cannot be expressed in an old-\bmake\b makefile.]"
+" [+viewpathing?\bVPATH\b is properly interpreted. This allows"
+" source to be separate from generated files.]"
+" [+recursion?Ordered subdirectory recursion over unrelated"
+" makefiles.]"
+" }"
+"[+?\bmamprobe\b(1) is called to probe and generate system specific variable"
+" definitions. The probe information is regenerated when it is older"
+" than the \bmamprobe\b command.]"
+"[+?For compatibility with \bnmake\b(1) the \b-K\b option and the"
+" \brecurse\b and \bcc-*\b command line targets are ignored.]"
+"[e:?Explain reason for triggering action. Ignored if -F is on.]"
+"[f:?Read \afile\a instead of the default.]:[file:=Mamfile]"
+"[i:?Ignore action errors.]"
+"[k:?Continue after error with sibling prerequisites.]"
+"[n:?Print actions but do not execute. Recursion actions (see \b-r\b) are still"
+" executed. Use \b-N\b to disable recursion actions too.]"
+"[r:?Recursively make leaf directories matching \apattern\a. Only leaf"
+" directories containing a makefile named \bNmakefile\b, \bnmakefile\b,"
+" \bMakefile\b or \bmakefile\b are considered. The first makefile"
+" found in each leaf directory is scanned for leaf directory"
+" prerequisites; the recusion order is determined by a topological sort"
+" of these prerequisites.]:[pattern]"
+"[C:?Do all work in \adirectory\a. All messages will mention"
+" \adirectory\a.]:[directory]"
+"[D:?Set the debug trace level to \alevel\a. Higher levels produce more"
+" output.]#[level]"
+"[F:?Force all targets to be out of date.]"
+"[K:?Ignored.]"
+"[N:?Like \b-n\b but recursion actions (see \b-r\b) are also disabled.]"
+"[V:?Print the program version and exit.]"
+"[G:debug-symbols?Compile and link with debugging symbol options enabled.]"
+"[S:strip-symbols?Strip link-time static symbols from executables.]"
+
+"\n"
+"\n[ target ... ] [ name=value ... ]\n"
+"\n"
+
+"[+SEE ALSO?\bgmake\b(1), \bmake\b(1), \bmamprobe\b(1),"
+" \bnmake\b(1), \bsh\b(1)]"
+;
+
+#else
+
+#define elementsof(x) (sizeof(x)/sizeof(x[0]))
+#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
+
+#define NiL ((char*)0)
+
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#if !_PACKAGE_ast && defined(__STDC__)
+#include <stdlib.h>
+#include <string.h>
+#endif
+
+#define delimiter(c) ((c)==' '||(c)=='\t'||(c)=='\n'||(c)==';'||(c)=='('||(c)==')'||(c)=='`'||(c)=='|'||(c)=='&'||(c)=='=')
+
+#define add(b,c) (((b)->nxt >= (b)->end) ? append(b, "") : NiL, *(b)->nxt++ = (c))
+#define get(b) ((b)->nxt-(b)->buf)
+#define set(b,o) ((b)->nxt=(b)->buf+(o))
+#define use(b) (*(b)->nxt=0,(b)->nxt=(b)->buf)
+
+#define CHUNK 1024
+#define KEY(a,b,c,d) ((((unsigned long)(a))<<15)|(((unsigned long)(b))<<10)|(((unsigned long)(c))<<5)|(((unsigned long)(d))))
+#define NOW ((unsigned long)time((time_t*)0))
+#define ROTATE(p,l,r,t) ((t)=(p)->l,(p)->l=(t)->r,(t)->r=(p),(p)=(t))
+
+#define RULE_active 0x0001 /* active target */
+#define RULE_dontcare 0x0002 /* ok if not found */
+#define RULE_error 0x0004 /* not found or not generated */
+#define RULE_exists 0x0008 /* target file exists */
+#define RULE_generated 0x0010 /* generated target */
+#define RULE_ignore 0x0020 /* ignore time */
+#define RULE_implicit 0x0040 /* implicit prerequisite */
+#define RULE_made 0x0080 /* already made */
+#define RULE_virtual 0x0100 /* not a file */
+
+#define STREAM_KEEP 0x0001 /* don't fclose() on pop() */
+#define STREAM_MUST 0x0002 /* push() file must exist */
+#define STREAM_PIPE 0x0004 /* pclose() on pop() */
+
+#ifndef S_IXUSR
+#define S_IXUSR 0100 /* owner execute permission */
+#endif
+#ifndef S_IXGRP
+#define S_IXGRP 0010 /* group execute permission */
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH 0001 /* other execute permission */
+#endif
+
+struct Rule_s;
+
+typedef struct stat Stat_t;
+typedef FILE Stdio_t;
+
+typedef struct Buf_s /* buffer stream */
+{
+ struct Buf_s* old; /* next dropped buffer */
+ char* end; /* 1 past end of buffer */
+ char* nxt; /* next char to add */
+ char* buf; /* buffer space */
+} Buf_t;
+
+typedef struct Dict_item_s /* dictionary item */
+{
+ struct Dict_item_s* left; /* left child */
+ struct Dict_item_s* right; /* right child */
+ void* value; /* user defined value */
+ char name[1];/* 0 terminated name */
+} Dict_item_t;
+
+typedef struct Dict_s /* dictionary handle */
+{
+ Dict_item_t* root; /* root item */
+} Dict_t;
+
+typedef struct List_s /* Rule_t list */
+{
+ struct List_s* next; /* next in list */
+ struct Rule_s* rule; /* list item */
+} List_t;
+
+typedef struct Rule_s /* rule item */
+{
+ char* name; /* unbound name */
+ char* path; /* bound path */
+ List_t* prereqs; /* prerequisites */
+ struct Rule_s* leaf; /* recursion leaf alias */
+ int flags; /* RULE_* flags */
+ int making; /* currently make()ing */
+ unsigned long time; /* modification time */
+} Rule_t;
+
+typedef struct Stream_s /* input file stream stack */
+{
+ Stdio_t* fp; /* read stream */
+ char* file; /* stream path */
+ unsigned long line; /* stream line */
+ int flags; /* stream flags */
+} Stream_t;
+
+typedef struct View_s /* viewpath level */
+{
+ struct View_s* next; /* next level in viewpath */
+ int node; /* viewpath node path length */
+ char dir[1]; /* viewpath level dir prefix */
+} View_t;
+
+static struct /* program state */
+{
+ Buf_t* buf; /* work buffer */
+ Buf_t* old; /* dropped buffers */
+ Buf_t* opt; /* option buffer */
+
+ Dict_t* leaf; /* recursion leaf dictionary */
+ Dict_t* libs; /* library dictionary */
+ Dict_t* rules; /* rule dictionary */
+ Dict_t* vars; /* variable dictionary */
+
+ View_t* view; /* viewpath levels */
+
+ char* directory; /* work in this directory */
+ char* id; /* command name */
+ char* file; /* first input file */
+ char* pwd; /* current directory */
+ char* recurse; /* recursion pattern */
+ char* shell; /* ${SHELL} */
+
+ int active; /* targets currently active */
+ int debug; /* negative of debug level */
+ int errors; /* some error(s) occurred */
+ int exec; /* execute actions */
+ int explain; /* explain actions */
+ int force; /* all targets out of date */
+ int ignore; /* ignore command errors */
+ int indent; /* debug indent */
+ int keepgoing; /* do siblings on error */
+ int never; /* never execute */
+ int peek; /* next line already in input */
+ int probed; /* probe already done */
+ int verified; /* don't bother with verify() */
+
+ Stream_t streams[4]; /* input file stream stack */
+ Stream_t* sp; /* input stream stack pointer */
+
+ char input[8*CHUNK]; /* input buffer */
+} state;
+
+static unsigned long make(Rule_t*);
+
+static char mamfile[] = "Mamfile";
+static char sh[] = "/bin/sh";
+
+extern char** environ;
+
+#if !_PACKAGE_ast
+
+#if defined(NeXT) || defined(__NeXT)
+#define getcwd(a,b) getwd(a)
+#endif
+
+/*
+ * emit usage message and exit
+ */
+
+static void
+usage()
+{
+ fprintf(stderr, "Usage: %s [-iknFKNV] [-f mamfile] [-r pattern] [-C directory] [-D level] [target ...] [name=value ...]\n", state.id);
+ exit(2);
+}
+
+#endif
+
+/*
+ * output error message identification
+ */
+
+static void
+identify(Stdio_t* sp)
+{
+ if (state.directory)
+ fprintf(sp, "%s [%s]: ", state.id, state.directory);
+ else
+ fprintf(sp, "%s: ", state.id);
+}
+
+/*
+ * emit error message
+ * level:
+ * <0 debug
+ * 0 info
+ * 1 warning
+ * 2 error
+ * >2 exit(level-2)
+ */
+
+static void
+report(int level, char* text, char* item, unsigned long stamp)
+{
+ int i;
+
+ if (level >= state.debug)
+ {
+ if (level)
+ identify(stderr);
+ if (level < 0)
+ {
+ fprintf(stderr, "debug%d: ", level);
+ for (i = 1; i < state.indent; i++)
+ fprintf(stderr, " ");
+ }
+ else
+ {
+ if (state.sp && state.sp->line)
+ {
+ if (state.sp->file)
+ fprintf(stderr, "%s: ", state.sp->file);
+ fprintf(stderr, "%ld: ", state.sp->line);
+ }
+ if (level == 1)
+ fprintf(stderr, "warning: ");
+ else if (level > 1)
+ state.errors = 1;
+ }
+ if (item)
+ fprintf(stderr, "%s: ", item);
+ fprintf(stderr, "%s", text);
+ if (stamp && state.debug <= -2)
+ fprintf(stderr, " %10lu", stamp);
+ fprintf(stderr, "\n");
+ if (level > 2)
+ exit(level - 2);
+ }
+}
+
+/*
+ * don't know how to make or exit code making
+ */
+
+static void
+dont(Rule_t* r, int code, int keepgoing)
+{
+ identify(stderr);
+ if (!code)
+ fprintf(stderr, "don't know how to make %s\n", r->name);
+ else
+ {
+ fprintf(stderr, "*** exit code %d making %s%s\n", code, r->name, state.ignore ? " ignored" : "");
+ unlink(r->name);
+ if (state.ignore)
+ return;
+ }
+ if (!keepgoing)
+ exit(1);
+ state.errors++;
+ r->flags |= RULE_error;
+}
+
+/*
+ * local strrchr()
+ */
+
+static char*
+last(register char* s, register int c)
+{
+ register char* r = 0;
+
+ for (r = 0; *s; s++)
+ if (*s == c)
+ r = s;
+ return r;
+}
+
+/*
+ * open a buffer stream
+ */
+
+static Buf_t*
+buffer(void)
+{
+ register Buf_t* buf;
+
+ if (buf = state.old)
+ state.old = state.old->old;
+ else if (!(buf = newof(0, Buf_t, 1, 0)) || !(buf->buf = newof(0, char, CHUNK, 0)))
+ report(3, "out of space [buffer]", NiL, (unsigned long)0);
+ buf->end = buf->buf + CHUNK;
+ buf->nxt = buf->buf;
+ return buf;
+}
+
+/*
+ * close a buffer stream
+ */
+
+static void
+drop(Buf_t* buf)
+{
+ buf->old = state.old;
+ state.old = buf;
+}
+
+/*
+ * append str length n to buffer and return the buffer base
+ */
+
+static char*
+appendn(Buf_t* buf, char* str, int n)
+{
+ int m;
+ int i;
+
+ if ((n + 1) >= (buf->end - buf->nxt))
+ {
+ i = buf->nxt - buf->buf;
+ m = (((buf->end - buf->buf) + n + CHUNK + 1) / CHUNK) * CHUNK;
+ if (!(buf->buf = newof(buf->buf, char, m, 0)))
+ report(3, "out of space [buffer resize]", NiL, (unsigned long)0);
+ buf->end = buf->buf + m;
+ buf->nxt = buf->buf + i;
+ }
+ memcpy(buf->nxt, str, n + 1);
+ buf->nxt += n;
+ return buf->buf;
+}
+
+/*
+ * append str to buffer and return the buffer base
+ * if str==0 then next pointer reset to base
+ */
+
+static char*
+append(Buf_t* buf, char* str)
+{
+ if (str)
+ return appendn(buf, str, strlen(str));
+ buf->nxt = buf->buf;
+ return buf->buf;
+}
+
+/*
+ * allocate space for s and return the copy
+ */
+
+static char*
+duplicate(char* s)
+{
+ char* t;
+ int n;
+
+ n = strlen(s);
+ if (!(t = newof(0, char, n, 1)))
+ report(3, "out of space [duplicate]", s, (unsigned long)0);
+ strcpy(t, s);
+ return t;
+}
+
+/*
+ * open a new dictionary
+ */
+
+static Dict_t*
+dictionary(void)
+{
+ Dict_t* dict;
+
+ if (!(dict = newof(0, Dict_t, 1, 0)))
+ report(3, "out of space [dictionary]", NiL, (unsigned long)0);
+ return dict;
+}
+
+/*
+ * return the value for item name in dictionary dict
+ * if value!=0 then name entry value is created if necessary and set
+ * uses top-down splaying (ala Tarjan and Sleator)
+ */
+
+static void*
+search(register Dict_t* dict, char* name, void* value)
+{
+ register int cmp;
+ register Dict_item_t* root;
+ register Dict_item_t* t;
+ register Dict_item_t* left;
+ register Dict_item_t* right;
+ register Dict_item_t* lroot;
+ register Dict_item_t* rroot;
+
+ root = dict->root;
+ left = right = lroot = rroot = 0;
+ while (root)
+ {
+ if (!(cmp = strcmp(name, root->name)))
+ break;
+ else if (cmp < 0)
+ {
+ if (root->left && (cmp = strcmp(name, root->left->name)) <= 0)
+ {
+ ROTATE(root, left, right, t);
+ if (!cmp)
+ break;
+ }
+ if (right)
+ right->left = root;
+ else
+ rroot = root;
+ right = root;
+ root = root->left;
+ right->left = 0;
+ }
+ else
+ {
+ if (root->right && (cmp = strcmp(name, root->right->name)) >= 0)
+ {
+ ROTATE(root, right, left, t);
+ if (!cmp)
+ break;
+ }
+ if (left)
+ left->right = root;
+ else
+ lroot = root;
+ left = root;
+ root = root->right;
+ left->right = 0;
+ }
+ }
+ if (root)
+ {
+ if (right)
+ right->left = root->right;
+ else
+ rroot = root->right;
+ if (left)
+ left->right = root->left;
+ else
+ lroot = root->left;
+ }
+ else if (value)
+ {
+ if (!(root = newof(0, Dict_item_t, 1, strlen(name))))
+ report(3, "out of space [dictionary]", name, (unsigned long)0);
+ strcpy(root->name, name);
+ }
+ if (root)
+ {
+ if (value)
+ root->value = value;
+ root->left = lroot;
+ root->right = rroot;
+ dict->root = root;
+ return value ? (void*)root->name : root->value;
+ }
+ if (left)
+ {
+ left->right = rroot;
+ dict->root = lroot;
+ }
+ else if (right)
+ {
+ right->left = lroot;
+ dict->root = rroot;
+ }
+ return 0;
+}
+
+/*
+ * low level for walk()
+ */
+
+static int
+apply(Dict_t* dict, Dict_item_t* item, int (*func)(Dict_item_t*, void*), void* handle)
+{
+ register Dict_item_t* right;
+
+ do
+ {
+ right = item->right;
+ if (item->left && apply(dict, item->left, func, handle))
+ return -1;
+ if ((*func)(item, handle))
+ return -1;
+ } while (item = right);
+ return 0;
+}
+
+/*
+ * apply func to each dictionary item
+ */
+
+static int
+walk(Dict_t* dict, int (*func)(Dict_item_t*, void*), void* handle)
+{
+ return dict->root ? apply(dict, dict->root, func, handle) : 0;
+}
+
+/*
+ * return a rule pointer for name
+ */
+
+static Rule_t*
+rule(char* name)
+{
+ Rule_t* r;
+
+ if (!(r = (Rule_t*)search(state.rules, name, NiL)))
+ {
+ if (!(r = newof(0, Rule_t, 1, 0)))
+ report(3, "out of space [rule]", name, (unsigned long)0);
+ r->name = (char*)search(state.rules, name, (void*)r);
+ }
+ return r;
+}
+
+/*
+ * prepend p onto rule r prereqs
+ */
+
+static void
+cons(Rule_t* r, Rule_t* p)
+{
+ register List_t* x;
+
+ for (x = r->prereqs; x && x->rule != p; x = x->next);
+ if (!x)
+ {
+ if (!(x = newof(0, List_t, 1, 0)))
+ report(3, "out of space [list]", r->name, (unsigned long)0);
+ x->rule = p;
+ x->next = r->prereqs;
+ r->prereqs = x;
+ }
+}
+
+/*
+ * initialize the viewpath
+ */
+
+static void
+view(void)
+{
+ register char* s;
+ register char* t;
+ register char* p;
+ register View_t* vp;
+
+ View_t* zp;
+ int c;
+ int n;
+
+ Stat_t st;
+ Stat_t ts;
+
+ char buf[CHUNK];
+
+ if (stat(".", &st))
+ report(3, "cannot stat", ".", (unsigned long)0);
+ if ((s = (char*)search(state.vars, "PWD", NiL)) && !stat(s, &ts) &&
+ ts.st_dev == st.st_dev && ts.st_ino == st.st_ino)
+ state.pwd = s;
+ if (!state.pwd)
+ {
+ if (!getcwd(buf, sizeof(buf) - 1))
+ report(3, "cannot determine PWD", NiL, (unsigned long)0);
+ state.pwd = duplicate(buf);
+ search(state.vars, "PWD", state.pwd);
+ }
+ if ((s = (char*)search(state.vars, "VPATH", NiL)) && *s)
+ {
+ zp = 0;
+ for (;;)
+ {
+ for (t = s; *t && *t != ':'; t++);
+ if (c = *t)
+ *t = 0;
+ if (!state.view)
+ {
+ /*
+ * determine the viewpath offset
+ */
+
+ if (stat(s, &st))
+ report(3, "cannot stat top view", s, (unsigned long)0);
+ if (stat(state.pwd, &ts))
+ report(3, "cannot stat", state.pwd, (unsigned long)0);
+ if (ts.st_dev == st.st_dev && ts.st_ino == st.st_ino)
+ p = ".";
+ else
+ {
+ p = state.pwd + strlen(state.pwd);
+ while (p > state.pwd)
+ if (*--p == '/')
+ {
+ if (p == state.pwd)
+ report(3, ". not under VPATH", s, (unsigned long)0);
+ *p = 0;
+ if (stat(state.pwd, &ts))
+ report(3, "cannot stat", state.pwd, (unsigned long)0);
+ *p = '/';
+ if (ts.st_dev == st.st_dev && ts.st_ino == st.st_ino)
+ {
+ p++;
+ break;
+ }
+ }
+ if (p <= state.pwd)
+ report(3, "cannot determine viewpath offset", s, (unsigned long)0);
+ }
+ }
+ n = strlen(s);
+ if (!(vp = newof(0, View_t, 1, strlen(p) + n + 1)))
+ report(3, "out of space [view]", s, (unsigned long)0);
+ vp->node = n + 1;
+ strcpy(vp->dir, s);
+ *(vp->dir + n) = '/';
+ strcpy(vp->dir + n + 1, p);
+ report(-4, vp->dir, "view", (unsigned long)0);
+ if (!state.view)
+ state.view = zp = vp;
+ else
+ zp = zp->next = vp;
+ if (!c)
+ break;
+ *t++ = c;
+ s = t;
+ }
+ }
+}
+
+/*
+ * return next '?' or '}' in nested '}'
+ */
+
+static char*
+cond(register char* s)
+{
+ register int n;
+
+ if (*s == '?')
+ s++;
+ n = 0;
+ for (;;)
+ {
+ switch (*s++)
+ {
+ case 0:
+ break;
+ case '{':
+ n++;
+ continue;
+ case '}':
+ if (!n--)
+ break;
+ continue;
+ case '?':
+ if (!n)
+ break;
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ return s - 1;
+}
+
+/*
+ * expand var refs from s into buf
+ */
+
+static void
+substitute(Buf_t* buf, register char* s)
+{
+ register char* t;
+ register char* v;
+ register char* q;
+ register char* b;
+ register int c;
+ register int n;
+ int a = 0;
+ int i;
+
+ while (c = *s++)
+ {
+ if (c == '$' && *s == '{')
+ {
+ b = s - 1;
+ i = 1;
+ for (n = *(t = ++s) == '-' ? 0 : '-'; (c = *s) && c != '?' && c != '+' && c != n && c != ':' && c != '=' && c != '[' && c != '}'; s++)
+ if (!isalnum(c) && c != '_')
+ i = 0;
+ *s = 0;
+ if (c == '[')
+ {
+ append(buf, b);
+ *s = c;
+ continue;
+ }
+ v = (char*)search(state.vars, t, NiL);
+ if ((c == ':' || c == '=') && (!v || c == ':' && !*v))
+ {
+ append(buf, b);
+ *s = c;
+ continue;
+ }
+ if (t[0] == 'A' && t[1] == 'R' && t[2] == 0)
+ a = 1;
+ *s = c;
+ if (c && c != '}')
+ {
+ n = 1;
+ for (t = ++s; *s; s++)
+ if (*s == '{')
+ n++;
+ else if (*s == '}' && !--n)
+ break;
+ }
+ switch (c)
+ {
+ case '?':
+ q = cond(t - 1);
+ if (v)
+ {
+ if (((q - t) != 1 || *t != '*') && strncmp(v, t, q - t))
+ v = 0;
+ }
+ else if (q == t)
+ v = s;
+ t = cond(q);
+ if (v)
+ {
+ if (t > q)
+ {
+ c = *t;
+ *t = 0;
+ substitute(buf, q + 1);
+ *t = c;
+ }
+ }
+ else
+ {
+ q = cond(t);
+ if (q > t)
+ {
+ c = *q;
+ *q = 0;
+ substitute(buf, t + 1);
+ *q = c;
+ }
+ }
+ break;
+ case '+':
+ case '-':
+ if ((v == 0 || *v == 0) == (c == '-'))
+ {
+ c = *s;
+ *s = 0;
+ substitute(buf, t);
+ *s = c;
+ break;
+ }
+ if (c != '-')
+ break;
+ /*FALLTHROUGH*/
+ case 0:
+ case '=':
+ case '}':
+ if (v)
+ {
+ if (a && t[0] == 'm' && t[1] == 'a' && t[2] == 'm' && t[3] == '_' && t[4] == 'l' && t[5] == 'i' && t[6] == 'b')
+ {
+ for (t = v; *t == ' '; t++);
+ for (; *t && *t != ' '; t++);
+ if (*t)
+ *t = 0;
+ else
+ t = 0;
+ substitute(buf, v);
+ if (t)
+ *t = ' ';
+ }
+ else
+ substitute(buf, v);
+ }
+ else if (i)
+ {
+ c = *s;
+ *s = 0;
+ append(buf, b);
+ *s = c;
+ continue;
+ }
+ break;
+ }
+ if (*s)
+ s++;
+ }
+ else
+ add(buf, c);
+ }
+}
+
+/*
+ * expand var refs from s into buf and return buf base
+ */
+
+static char*
+expand(Buf_t* buf, char* s)
+{
+ substitute(buf, s);
+ return use(buf);
+}
+
+/*
+ * stat() with .exe check
+ */
+
+static char*
+status(Buf_t* buf, int off, char* path, struct stat* st)
+{
+ int r;
+ char* s;
+ Buf_t* tmp;
+
+ if (!stat(path, st))
+ return path;
+ if (!(tmp = buf))
+ {
+ tmp = buffer();
+ off = 0;
+ }
+ if (off)
+ set(tmp, off);
+ else
+ append(tmp, path);
+ append(tmp, ".exe");
+ s = use(tmp);
+ r = stat(s, st);
+ if (!buf)
+ {
+ drop(tmp);
+ s = path;
+ }
+ if (r)
+ {
+ if (off)
+ s[off] = 0;
+ s = 0;
+ }
+ return s;
+}
+
+/*
+ * return path to file
+ */
+
+static char*
+find(Buf_t* buf, char* file, struct stat* st)
+{
+ char* s;
+ View_t* vp;
+ int node;
+ int c;
+ int o;
+
+ if (s = status(buf, 0, file, st))
+ {
+ report(-3, s, "find", (unsigned long)0);
+ return s;
+ }
+ if (vp = state.view)
+ {
+ node = 0;
+ if (*file == '/')
+ {
+ do
+ {
+ if (!strncmp(file, vp->dir, vp->node))
+ {
+ file += vp->node;
+ node = 2;
+ break;
+ }
+ } while (vp = vp->next);
+ }
+ else
+ vp = vp->next;
+ if (vp)
+ do
+ {
+ if (node)
+ {
+ c = vp->dir[vp->node];
+ vp->dir[vp->node] = 0;
+ append(buf, vp->dir);
+ vp->dir[vp->node] = c;
+ }
+ else
+ {
+ append(buf, vp->dir);
+ append(buf, "/");
+ }
+ append(buf, file);
+ o = get(buf);
+ s = use(buf);
+ if (s = status(buf, o, s, st))
+ {
+ report(-3, s, "find", (unsigned long)0);
+ return s;
+ }
+ } while (vp = vp->next);
+ }
+ return 0;
+}
+
+/*
+ * bind r to a file and return the modify time
+ */
+
+static unsigned long
+bind(Rule_t* r)
+{
+ char* s;
+ Buf_t* buf;
+ struct stat st;
+
+ buf = buffer();
+ if (s = find(buf, r->name, &st))
+ {
+ if (s != r->name)
+ r->path = duplicate(s);
+ r->time = st.st_mtime;
+ r->flags |= RULE_exists;
+ }
+ drop(buf);
+ return r->time;
+}
+
+/*
+ * pop the current input file
+ */
+
+static int
+pop(void)
+{
+ int r;
+
+ if (!state.sp)
+ report(3, "input stack underflow", NiL, (unsigned long)0);
+ if (!state.sp->fp || (state.sp->flags & STREAM_KEEP))
+ r = 0;
+ else if (state.sp->flags & STREAM_PIPE)
+ r = pclose(state.sp->fp);
+ else
+ r = fclose(state.sp->fp);
+ if (state.sp == state.streams)
+ state.sp = 0;
+ else
+ state.sp--;
+ return r;
+}
+
+/*
+ * push file onto the input stack
+ */
+
+static int
+push(char* file, Stdio_t* fp, int flags)
+{
+ char* path;
+ Buf_t* buf;
+ struct stat st;
+
+ if (!state.sp)
+ state.sp = state.streams;
+ else if (++state.sp >= &state.streams[elementsof(state.streams)])
+ report(3, "input stream stack overflow", NiL, (unsigned long)0);
+ if (state.sp->fp = fp)
+ state.sp->file = "pipeline";
+ else if (flags & STREAM_PIPE)
+ report(3, "pipe error", file, (unsigned long)0);
+ else if (!file || !strcmp(file, "-") || !strcmp(file, "/dev/stdin"))
+ {
+ flags |= STREAM_KEEP;
+ state.sp->file = "/dev/stdin";
+ state.sp->fp = stdin;
+ }
+ else
+ {
+ buf = buffer();
+ if (path = find(buf, file, &st))
+ {
+ if (!(state.sp->fp = fopen(path, "r")))
+ report(3, "cannot read", path, (unsigned long)0);
+ state.sp->file = duplicate(path);
+ drop(buf);
+ }
+ else
+ {
+ drop(buf);
+ pop();
+ if (flags & STREAM_MUST)
+ report(3, "not found", file, (unsigned long)0);
+ return 0;
+ }
+ }
+ state.sp->flags = flags;
+ state.sp->line = 0;
+ return 1;
+}
+
+/*
+ * return the next input line
+ */
+
+static char*
+input(void)
+{
+ char* e;
+
+ if (!state.sp)
+ report(3, "no input file stream", NiL, (unsigned long)0);
+ if (state.peek)
+ state.peek = 0;
+ else if (!fgets(state.input, sizeof(state.input), state.sp->fp))
+ return 0;
+ else if (*state.input && *(e = state.input + strlen(state.input) - 1) == '\n')
+ *e = 0;
+ state.sp->line++;
+ return state.input;
+}
+
+/*
+ * pass shell action s to ${SHELL:-/bin/sh}
+ * the -c wrapper ensures that scripts are run in the selected shell
+ * even on systems that otherwise demand #! magic (can you say cygwin)
+ */
+
+static int
+execute(register char* s)
+{
+ register int c;
+ Buf_t* buf;
+
+ if (!state.shell && (!(state.shell = (char*)search(state.vars, "SHELL", NiL)) || !strcmp(state.shell, sh)))
+ state.shell = sh;
+ buf = buffer();
+ append(buf, state.shell);
+ append(buf, " -c '");
+ while (c = *s++)
+ {
+ if (c == '\'')
+ {
+ add(buf, c);
+ for (s--; *s == c; s++)
+ {
+ add(buf, '\\');
+ add(buf, c);
+ }
+ }
+ add(buf, c);
+ }
+ add(buf, '\'');
+ s = use(buf);
+ report(-5, s, "exec", (unsigned long)0);
+ if ((c = system(s)) > 255)
+ c >>= 8;
+ drop(buf);
+ return c;
+}
+
+/*
+ * run action s to update r
+ */
+
+static unsigned long
+run(Rule_t* r, register char* s)
+{
+ register Rule_t* q;
+ register char* t;
+ register int c;
+ register View_t* v;
+ int i;
+ int j;
+ int x;
+ Stat_t st;
+ Buf_t* buf;
+
+ if (r->flags & RULE_error)
+ return r->time;
+ buf = buffer();
+ if (!strncmp(s, "mamake -r ", 10))
+ {
+ state.verified = 1;
+ x = !state.never;
+ }
+ else
+ x = state.exec;
+ if (x)
+ append(buf, "trap - 1 2 3 15\nPATH=.:$PATH\nset -x\n");
+ if (state.view)
+ {
+ do
+ {
+ for (; delimiter(*s); s++)
+ add(buf, *s);
+ for (t = s; *s && !delimiter(*s); s++);
+ c = *s;
+ *s = 0;
+ if (c == '=')
+ {
+ append(buf, t);
+ continue;
+ }
+ if ((q = (Rule_t*)search(state.rules, t, NiL)) && q->path && !(q->flags & RULE_generated))
+ append(buf, q->path);
+ else
+ {
+ append(buf, t);
+ if (*t == '-' && *(t + 1) == 'I' && (*(t + 2) || c))
+ {
+ if (*(t + 2))
+ i = 2;
+ else
+ {
+ for (i = 3; *(t + i) == ' ' || *(t + i) == '\t'; i++);
+ *s = c;
+ for (s = t + i; *s && *s != ' ' && *s != '\t' && *s != '\n'; s++);
+ c = *s;
+ *s = 0;
+ append(buf, t + 2);
+ }
+ if (*(t + i) && *(t + i) != '/')
+ {
+ v = state.view;
+ while (v = v->next)
+ {
+ add(buf, ' ');
+ for (j = 0; j < i; j++)
+ add(buf, *(t + j));
+ append(buf, v->dir);
+ if (*(t + i) != '.' || *(t + i + 1))
+ {
+ add(buf, '/');
+ append(buf, t + i);
+ }
+ }
+ }
+ }
+ }
+ } while (*s = c);
+ s = use(buf);
+ }
+ else if (x)
+ {
+ append(buf, s);
+ s = use(buf);
+ }
+ if (x)
+ {
+ if (c = execute(s))
+ dont(r, c, state.keepgoing);
+ if (status((Buf_t*)0, 0, r->name, &st))
+ {
+ r->time = st.st_mtime;
+ r->flags |= RULE_exists;
+ }
+ else
+ r->time = NOW;
+ }
+ else
+ {
+ fprintf(stdout, "%s\n", s);
+ if (state.debug)
+ fflush(stdout);
+ r->time = NOW;
+ r->flags |= RULE_exists;
+ }
+ drop(buf);
+ return r->time;
+}
+
+/*
+ * return the full path for s using buf workspace
+ */
+
+static char*
+path(Buf_t* buf, char* s, int must)
+{
+ register char* p;
+ register char* d;
+ register char* x;
+ char* e;
+ register int c;
+ int t;
+ int o;
+ Stat_t st;
+
+ for (e = s; *e && *e != ' ' && *e != '\t'; e++);
+ t = *e;
+ if ((x = status(buf, 0, s, &st)) && (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))
+ return x;
+ if (!(p = (char*)search(state.vars, "PATH", NiL)))
+ report(3, "variable not defined", "PATH", (unsigned long)0);
+ do
+ {
+ for (d = p; *p && *p != ':'; p++);
+ c = *p;
+ *p = 0;
+ if (*d && (*d != '.' || *(d + 1)))
+ {
+ append(buf, d);
+ add(buf, '/');
+ }
+ *p = c;
+ if (t)
+ *e = 0;
+ append(buf, s);
+ if (t)
+ *e = t;
+ o = get(buf);
+ x = use(buf);
+ if ((x = status(buf, o, x, &st)) && (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))
+ return x;
+ } while (*p++);
+ if (must)
+ report(3, "command not found", s, (unsigned long)0);
+ return 0;
+}
+
+/*
+ * generate (if necessary) and read the MAM probe information
+ * done on the first `setv CC ...'
+ */
+
+static void
+probe(void)
+{
+ register char* cc;
+ register char* s;
+ unsigned long h;
+ unsigned long q;
+ Buf_t* buf;
+ Buf_t* pro;
+ Buf_t* tmp;
+ struct stat st;
+
+ static char let[] = "ABCDEFGHIJKLMNOP";
+ static char cmd[] = "mamprobe";
+
+ if (!(cc = (char*)search(state.vars, "CC", NiL)))
+ cc = "cc";
+ buf = buffer();
+ s = path(buf, cmd, 1);
+ q = stat(s, &st) ? (unsigned long)0 : (unsigned long)st.st_mtime;
+ pro = buffer();
+ s = cc = path(pro, cc, 1);
+ for (h = 0; *s; s++)
+ h = h * 0x63c63cd9L + *s + 0x9c39c33dL;
+ if (!(s = (char*)search(state.vars, "INSTALLROOT", NiL)))
+ report(3, "variable must be defined", "INSTALLROOT", (unsigned long)0);
+ append(buf, s);
+ append(buf, "/lib/probe/C/mam/");
+ for (h &= 0xffffffffL; h; h >>= 4)
+ add(buf, let[h & 0xf]);
+ s = use(buf);
+ h = stat(s, &st) ? (unsigned long)0 : (unsigned long)st.st_mtime;
+ if (h < q || !push(s, (Stdio_t*)0, 0))
+ {
+ tmp = buffer();
+ append(tmp, cmd);
+ add(tmp, ' ');
+ append(tmp, s);
+ add(tmp, ' ');
+ append(tmp, cc);
+ if (execute(use(tmp)))
+ report(3, "cannot generate probe info", s, (unsigned long)0);
+ drop(tmp);
+ if (!push(s, (Stdio_t*)0, 0))
+ report(3, "cannot read probe info", s, (unsigned long)0);
+ }
+ drop(pro);
+ drop(buf);
+ make(rule(""));
+ pop();
+}
+
+/*
+ * add attributes in s to r
+ */
+
+static void
+attributes(register Rule_t* r, register char* s)
+{
+ register char* t;
+ register int n;
+
+ for (;;)
+ {
+ for (; *s == ' '; s++);
+ for (t = s; *s && *s != ' '; s++);
+ if (!(n = s - t))
+ break;
+ switch (*t)
+ {
+ case 'd':
+ if (n == 8 && !strncmp(t, "dontcare", n))
+ r->flags |= RULE_dontcare;
+ break;
+ case 'g':
+ if (n == 9 && !strncmp(t, "generated", n))
+ r->flags |= RULE_generated;
+ break;
+ case 'i':
+ if (n == 6 && !strncmp(t, "ignore", n))
+ r->flags |= RULE_ignore;
+ else if (n == 8 && !strncmp(t, "implicit", n))
+ r->flags |= RULE_implicit;
+ break;
+ case 'v':
+ if (n == 7 && !strncmp(t, "virtual", n))
+ r->flags |= RULE_virtual;
+ break;
+ }
+ }
+}
+
+/*
+ * define ${mam_libX} for library reference lib
+ */
+
+static char*
+require(char* lib, int dontcare)
+{
+ register int c;
+ char* s;
+ char* r;
+ FILE* f;
+ Buf_t* buf;
+ Buf_t* tmp;
+ struct stat st;
+
+ static int dynamic = -1;
+
+ if (dynamic < 0)
+ dynamic = (s = search(state.vars, "mam_cc_L", NiL)) ? atoi(s) : 0;
+ if (!(r = search(state.vars, lib, NiL)))
+ {
+ buf = buffer();
+ tmp = buffer();
+ s = 0;
+ for (;;)
+ {
+ if (s)
+ append(buf, s);
+ if (r = search(state.vars, "mam_cc_PREFIX_ARCHIVE", NiL))
+ append(buf, r);
+ append(buf, lib + 2);
+ if (r = search(state.vars, "mam_cc_SUFFIX_ARCHIVE", NiL))
+ append(buf, r);
+ r = expand(tmp, use(buf));
+ if (!stat(r, &st))
+ break;
+ if (s)
+ {
+ r = lib;
+ break;
+ }
+ s = "${INSTALLROOT}/lib/";
+ if (dynamic)
+ {
+ append(buf, s);
+ if (r = search(state.vars, "mam_cc_PREFIX_SHARED", NiL))
+ append(buf, r);
+ append(buf, lib + 2);
+ if (r = search(state.vars, "mam_cc_SUFFIX_SHARED", NiL))
+ append(buf, r);
+ r = expand(tmp, use(buf));
+ if (!stat(r, &st))
+ {
+ r = lib;
+ break;
+ }
+ }
+ }
+ if (r != lib)
+ r = duplicate(r);
+ search(state.vars, lib, r);
+ append(tmp, lib + 2);
+ append(tmp, ".req");
+ if (!(f = fopen(use(tmp), "r")))
+ {
+ append(tmp, "${INSTALLROOT}/lib/lib/");
+ append(tmp, lib + 2);
+ f = fopen(expand(buf, use(tmp)), "r");
+ }
+ if (f)
+ {
+ for (;;)
+ {
+ while ((c = fgetc(f)) == ' ' || c == '\t' || c == '\n');
+ if (c == EOF)
+ break;
+ do
+ {
+ add(tmp, c);
+ } while ((c = fgetc(f)) != EOF && c != ' ' && c != '\t' && c != '\n');
+ s = use(tmp);
+ if (s[0] && (s[0] != '-' || s[1]))
+ {
+ add(buf, ' ');
+ append(buf, require(s, 0));
+ }
+ }
+ fclose(f);
+ r = use(buf);
+ }
+ else if (dontcare)
+ {
+ append(tmp, "set -\n");
+ append(tmp, "cd /tmp\n");
+ append(tmp, "echo 'int main(){return 0;}' > x.${!-$$}.c\n");
+ append(tmp, "${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c ");
+ append(tmp, r);
+ append(tmp, " >/dev/null 2>&1\n");
+ append(tmp, "c=$?\n");
+ append(tmp, "rm -f x.${!-$$}.[cox]\n");
+ append(tmp, "exit $c\n");
+ if (execute(expand(buf, use(tmp))))
+ r = "";
+ }
+ r = duplicate(r);
+ search(state.vars, lib, r);
+ append(tmp, "mam_lib");
+ append(tmp, lib + 2);
+ search(state.vars, use(tmp), r);
+ drop(tmp);
+ drop(buf);
+ }
+ return r;
+}
+
+/*
+ * input() until `done r'
+ */
+
+static unsigned long
+make(Rule_t* r)
+{
+ register char* s;
+ register char* t;
+ register char* u;
+ register char* v;
+ register Rule_t* q;
+ unsigned long z;
+ unsigned long x;
+ Buf_t* buf;
+ Buf_t* cmd;
+
+ r->making++;
+ if (r->flags & RULE_active)
+ state.active++;
+ if (*r->name)
+ {
+ z = bind(r);
+ state.indent++;
+ report(-1, r->name, "make", r->time);
+ }
+ else
+ z = 0;
+ buf = buffer();
+ cmd = 0;
+ while (s = input())
+ {
+ for (; *s == ' '; s++);
+ for (; isdigit(*s); s++);
+ for (; *s == ' '; s++);
+ for (u = s; *s && *s != ' '; s++);
+ if (*s)
+ {
+ for (*s++ = 0; *s == ' '; s++);
+ for (t = s; *s && *s != ' '; s++);
+ if (*s)
+ for (*s++ = 0; *s == ' '; s++);
+ v = s;
+ }
+ else
+ t = v = s;
+ switch (KEY(u[0], u[1], u[2], u[3]))
+ {
+ case KEY('b','i','n','d'):
+ if ((t[0] == '-' || t[0] == '+') && t[1] == 'l' && (s = require(t, !strcmp(v, "dontcare"))) && strncmp(r->name, "FEATURE/", 8) && strcmp(r->name, "configure.h"))
+ for (;;)
+ {
+ for (t = s; *s && *s != ' '; s++);
+ if (*s)
+ *s = 0;
+ else
+ s = 0;
+ if (*t)
+ {
+ q = rule(expand(buf, t));
+ attributes(q, v);
+ x = bind(q);
+ if (z < x)
+ z = x;
+ if (q->flags & RULE_error)
+ r->flags |= RULE_error;
+ }
+ if (!s)
+ break;
+ for (*s++ = ' '; *s == ' '; s++);
+ }
+ continue;
+ case KEY('d','o','n','e'):
+ q = rule(expand(buf, t));
+ if (q != r)
+ report(2, "improper done statement", t, (unsigned long)0);
+ attributes(r, v);
+ if (cmd && state.active && (state.force || r->time < z || !r->time && !z))
+ {
+ if (state.explain && !state.force)
+ {
+ if (!r->time)
+ fprintf(stderr, "%s [not found]\n", r->name);
+ else
+ fprintf(stderr, "%s [%lu] older than prerequisites [%lu]\n", r->name, r->time, z);
+ }
+ substitute(buf, use(cmd));
+ x = run(r, use(buf));
+ if (z < x)
+ z = x;
+ }
+ r->flags |= RULE_made;
+ if (!(r->flags & (RULE_dontcare|RULE_error|RULE_exists|RULE_generated|RULE_implicit|RULE_virtual)))
+ dont(r, 0, state.keepgoing);
+ break;
+ case KEY('e','x','e','c'):
+ r->flags |= RULE_generated;
+ if (r->path)
+ {
+ free(r->path);
+ r->path = 0;
+ r->time = 0;
+ }
+ if (state.active)
+ {
+ if (cmd)
+ add(cmd, '\n');
+ else
+ cmd = buffer();
+ append(cmd, v);
+ }
+ continue;
+ case KEY('m','a','k','e'):
+ q = rule(expand(buf, t));
+ if (!q->making)
+ {
+ attributes(q, v);
+ x = make(q);
+ if (!(q->flags & RULE_ignore) && z < x)
+ z = x;
+ if (q->flags & RULE_error)
+ r->flags |= RULE_error;
+ }
+ continue;
+ case KEY('p','r','e','v'):
+ q = rule(expand(buf, t));
+ if (!q->making)
+ {
+ if (!(q->flags & RULE_ignore) && z < q->time)
+ z = q->time;
+ if (q->flags & RULE_error)
+ r->flags |= RULE_error;
+ state.indent++;
+ report(-2, q->name, "prev", q->time);
+ state.indent--;
+ }
+ continue;
+ case KEY('s','e','t','v'):
+ if (!search(state.vars, t, NiL))
+ {
+ if (*v == '"')
+ {
+ s = v + strlen(v) - 1;
+ if (*s == '"')
+ {
+ *s = 0;
+ v++;
+ }
+ }
+ search(state.vars, t, duplicate(expand(buf, v)));
+ }
+ if (!state.probed && t[0] == 'C' && t[1] == 'C' && !t[2])
+ {
+ state.probed = 1;
+ probe();
+ }
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ drop(buf);
+ if (cmd)
+ drop(cmd);
+ if (*r->name)
+ {
+ report(-1, r->name, "done", z);
+ state.indent--;
+ }
+ if (r->flags & RULE_active)
+ state.active--;
+ r->making--;
+ return r->time = z;
+}
+
+/*
+ * verify that active targets were made
+ */
+
+static int
+verify(Dict_item_t* item, void* handle)
+{
+ Rule_t* r = (Rule_t*)item->value;
+
+ if ((r->flags & (RULE_active|RULE_error|RULE_made)) == RULE_active)
+ dont(r, 0, 1);
+ return 0;
+}
+
+/*
+ * return 1 if name is an initializer
+ */
+
+static int
+initializer(char* name)
+{
+ register char* s;
+
+ if (s = last(name, '/'))
+ s++;
+ else
+ s = name;
+ return s[0] == 'I' && s[1] == 'N' && s[2] == 'I' && s[3] == 'T';
+}
+
+/*
+ * update recursion leaf r and its prerequisites
+ */
+
+static int
+update(register Rule_t* r)
+{
+ register List_t* x;
+ Buf_t* buf;
+
+ static char cmd[] = "${MAMAKE} -C ";
+ static char arg[] = " ${MAMAKEARGS}";
+
+ r->flags |= RULE_made;
+ if (r->leaf)
+ r->leaf->flags |= RULE_made;
+ for (x = r->prereqs; x; x = x->next)
+ if (x->rule->leaf && !(x->rule->flags & RULE_made))
+ update(x->rule);
+ buf = buffer();
+ substitute(buf, cmd);
+ append(buf, r->name);
+ substitute(buf, arg);
+ run(r, use(buf));
+ drop(buf);
+ return 0;
+}
+
+/*
+ * scan makefile prereqs
+ */
+
+static int
+scan(Dict_item_t* item, void* handle)
+{
+ register Rule_t* r = (Rule_t*)item->value;
+ register char* s;
+ register char* t;
+ register char* u;
+ register char* w;
+ Rule_t* q;
+ int i;
+ int j;
+ int k;
+ int p;
+ Buf_t* buf;
+
+ static char* files[] =
+ {
+ "Nmakefile",
+ "nmakefile",
+ "Makefile",
+ "makefile"
+ };
+
+ /*
+ * drop non-leaf rules
+ */
+
+ if (!r->leaf)
+ return 0;
+
+ /*
+ * always make initializers
+ */
+
+ if (initializer(r->name))
+ {
+ if (!(r->flags & RULE_made))
+ update(r);
+ return 0;
+ }
+ buf = buffer();
+ for (i = 0; i < elementsof(files); i++)
+ {
+ append(buf, r->name);
+ add(buf, '/');
+ append(buf, files[i]);
+ if (push(use(buf), (Stdio_t*)0, 0))
+ {
+ while (s = input())
+ {
+ j = p = 0;
+ while (*s)
+ {
+ for (k = 1; (i = *s) == ' ' || i == '\t' || i == '"' || i == '\''; s++);
+ for (t = s; (i = *s) && i != ' ' && i != '\t' && i != '"' && i != '\'' && i != '\\' && i != ':'; s++)
+ if (i == '/')
+ t = s + 1;
+ else if (i == '.' && *(s + 1) != 'c' && *(s + 1) != 'C' && *(s + 1) != 'h' && *(s + 1) != 'H' && t[0] == 'l' && t[1] == 'i' && t[2] == 'b')
+ *s = 0;
+ if (*s)
+ *s++ = 0;
+ if (!t[0])
+ k = 0;
+ else if ((t[0] == '-' || t[0] == '+') && t[1] == 'l' && t[2])
+ {
+ append(buf, "lib");
+ append(buf, t + 2);
+ t = use(buf);
+ }
+ else if (p)
+ {
+ if (t[0] == '+' && !t[1])
+ p = 2;
+ else if (p == 1)
+ {
+ if (i != ':' || strncmp(s, "command", 7))
+ {
+ append(buf, "lib");
+ append(buf, t);
+ t = use(buf);
+ }
+ if (i == ':')
+ while (*s && (*s == ' ' || *s == '\t'))
+ s++;
+ }
+ }
+ else if (i == ':')
+ {
+ if (j != ':' || !isupper(*t))
+ k = 0;
+ else if (!strcmp(t, "PACKAGE"))
+ {
+ p = 1;
+ k = 0;
+ }
+ else
+ for (u = t; *u; u++)
+ if (isupper(*u))
+ *u = tolower(*u);
+ else if (!isalnum(*u))
+ {
+ k = 0;
+ break;
+ }
+ }
+ else if (t[0] != 'l' || t[1] != 'i' || t[2] != 'b')
+ k = 0;
+ else
+ for (u = t + 3; *u; u++)
+ if (!isalnum(*u))
+ {
+ k = 0;
+ break;
+ }
+ if (k && ((q = (Rule_t*)search(state.leaf, t, NiL)) && q != r || *t++ == 'l' && *t++ == 'i' && *t++ == 'b' && *t && (q = (Rule_t*)search(state.leaf, t, NiL)) && q != r))
+ {
+ for (t = w = r->name; *w; w++)
+ if (*w == '/')
+ t = w + 1;
+ if (t[0] == 'l' && t[1] == 'i' && t[2] == 'b')
+ t += 3;
+ for (u = w = q->name; *w; w++)
+ if (*w == '/')
+ u = w + 1;
+ if (strcmp(t, u))
+ cons(r, q);
+ }
+ j = i;
+ }
+ }
+ pop();
+ for (s = 0, w = r->name; *w; w++)
+ if (*w == '/')
+ s = w;
+ if (s)
+ {
+ if ((s - r->name) > 3 && *(s - 1) == 'b' && *(s - 2) == 'i' && *(s - 3) == 'l' && *(s - 4) != '/')
+ {
+ /*
+ * foolib : foo : libfoo
+ */
+
+ *(s - 3) = 0;
+ q = (Rule_t*)search(state.leaf, r->name, NiL);
+ if (q && q != r)
+ cons(r, q);
+ for (t = w = r->name; *w; w++)
+ if (*w == '/')
+ t = w + 1;
+ append(buf, "lib");
+ append(buf, t);
+ q = (Rule_t*)search(state.leaf, use(buf), NiL);
+ if (q && q != r)
+ cons(r, q);
+ *(s - 3) = 'l';
+ }
+ else if (((s - r->name) != 3 || *(s - 1) != 'b' || *(s - 2) != 'i' || *(s - 3) != 'l') && (*(s + 1) != 'l' || *(s + 2) != 'i' || *(s + 3) != 'b'))
+ {
+ /*
+ * huh/foobar : lib/libfoo
+ */
+
+ s++;
+ t = s + strlen(s);
+ while (--t > s)
+ {
+ append(buf, "lib/lib");
+ appendn(buf, s, t - s);
+ q = (Rule_t*)search(state.leaf, use(buf), NiL);
+ if (q && q != r)
+ cons(r, q);
+ }
+ }
+ }
+ break;
+ }
+ }
+ drop(buf);
+ return 0;
+}
+
+/*
+ * descend into op and its prereqs
+ */
+
+static int
+descend(Dict_item_t* item, void* handle)
+{
+ Rule_t* r = (Rule_t*)item->value;
+
+ if (!state.active && (!(r->flags & RULE_active) || !(r = (Rule_t*)search(state.leaf, r->name, NiL))))
+ return 0;
+ return r->leaf && !(r->flags & RULE_made) ? update(r) : 0;
+}
+
+/*
+ * append the non-leaf active targets to state.opt
+ */
+
+static int
+active(Dict_item_t* item, void* handle)
+{
+ Rule_t* r = (Rule_t*)item->value;
+
+ if (r->flags & RULE_active)
+ {
+ if (r->leaf || search(state.leaf, r->name, NiL))
+ state.active = 0;
+ else
+ {
+ add(state.opt, ' ');
+ append(state.opt, r->name);
+ }
+ }
+ return 0;
+}
+
+/*
+ * recurse on mamfiles in subdirs matching pattern
+ */
+
+static int
+recurse(char* pattern)
+{
+ register char* s;
+ register char* t;
+ Rule_t* r;
+ Buf_t* buf;
+ Buf_t* tmp;
+ struct stat st;
+
+ /*
+ * first determine the MAM subdirs
+ */
+
+ tmp = buffer();
+ buf = buffer();
+ state.exec = !state.never;
+ state.leaf = dictionary();
+ append(buf, "ls -d ");
+ append(buf, pattern);
+ s = use(buf);
+ push("recurse", popen(s, "r"), STREAM_PIPE);
+ while (s = input())
+ {
+ append(buf, s);
+ add(buf, '/');
+ append(buf, mamfile);
+ if (find(tmp, use(buf), &st))
+ {
+ r = rule(s);
+ if (t = last(r->name, '/'))
+ t++;
+ else
+ t = r->name;
+ r->leaf = rule(t);
+ search(state.leaf, t, r);
+ }
+ }
+ pop();
+ drop(buf);
+ drop(tmp);
+
+ /*
+ * grab the non-leaf active targets
+ */
+
+ if (!state.active)
+ {
+ state.active = 1;
+ walk(state.rules, active, NiL);
+ }
+ search(state.vars, "MAMAKEARGS", duplicate(use(state.opt) + 1));
+
+ /*
+ * scan the makefile and descend
+ */
+
+ walk(state.rules, scan, NiL);
+ state.view = 0;
+ walk(state.rules, descend, NiL);
+ return 0;
+}
+
+int
+main(int argc, char** argv)
+{
+ register char** e;
+ register char* s;
+ register char* t;
+ register char* v;
+ Buf_t* tmp;
+ int c;
+
+ /*
+ * initialize the state
+ */
+
+ state.id = "mamake";
+ state.active = 1;
+ state.exec = 1;
+ state.file = mamfile;
+ state.opt = buffer();
+ state.rules = dictionary();
+ state.vars = dictionary();
+ search(state.vars, "MAMAKE", *argv);
+
+ /*
+ * parse the options
+ */
+
+#if _PACKAGE_ast
+ error_info.id = state.id;
+ for (;;)
+ {
+ switch (optget(argv, usage))
+ {
+ case 'e':
+ append(state.opt, " -e");
+ state.explain = 1;
+ continue;
+ case 'i':
+ append(state.opt, " -i");
+ state.ignore = 1;
+ continue;
+ case 'k':
+ append(state.opt, " -k");
+ state.keepgoing = 1;
+ continue;
+ case 'N':
+ state.never = 1;
+ /*FALLTHROUGH*/
+ case 'n':
+ append(state.opt, " -n");
+ state.exec = 0;
+ continue;
+ case 'F':
+ append(state.opt, " -F");
+ state.force = 1;
+ continue;
+ case 'K':
+ continue;
+ case 'V':
+ fprintf(stdout, "%s\n", id + 10);
+ exit(0);
+ case 'f':
+ append(state.opt, " -f ");
+ append(state.opt, opt_info.arg);
+ state.file = opt_info.arg;
+ continue;
+ case 'r':
+ state.recurse = opt_info.arg;
+ continue;
+ case 'C':
+ state.directory = opt_info.arg;
+ continue;
+ case 'D':
+ append(state.opt, " -D");
+ append(state.opt, opt_info.arg);
+ state.debug = -opt_info.num;
+ continue;
+ case 'G':
+ append(state.opt, " -G");
+ search(state.vars, "-debug-symbols", "1");
+ continue;
+ case 'S':
+ append(state.opt, " -S");
+ search(state.vars, "-strip-symbols", "1");
+ continue;
+ case '?':
+ error(ERROR_USAGE|4, "%s", opt_info.arg);
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ continue;
+ }
+ break;
+ }
+ if (error_info.errors)
+ error(ERROR_USAGE|4, "%s", optusage(NiL));
+ argv += opt_info.index;
+#else
+ while ((s = *++argv) && *s == '-')
+ {
+ if (*(s + 1) == '-')
+ {
+ if (!*(s + 2))
+ {
+ append(state.opt, " --");
+ argv++;
+ break;
+ }
+ for (t = s += 2; *t && *t != '='; t++);
+ if (!strncmp(s, "debug-symbols", t - s) && append(state.opt, " -G") || !strncmp(s, "strip-symbols", t - s) && append(state.opt, " -S"))
+ {
+ if (*t)
+ {
+ v = t + 1;
+ if (t > s && *(t - 1) == '+')
+ t--;
+ c = *t;
+ *t = 0;
+ }
+ else
+ {
+ c = 0;
+ v = "1";
+ }
+ search(state.vars, s - 1, v);
+ if (c)
+ *t = c;
+ continue;
+ }
+ usage();
+ break;
+ }
+ for (;;)
+ {
+ switch (*++s)
+ {
+ case 0:
+ break;
+ case 'e':
+ append(state.opt, " -e");
+ state.explain = 1;
+ continue;
+ case 'i':
+ append(state.opt, " -i");
+ state.ignore = 1;
+ continue;
+ case 'k':
+ append(state.opt, " -k");
+ state.keepgoing = 1;
+ continue;
+ case 'N':
+ state.never = 1;
+ /*FALLTHROUGH*/
+ case 'n':
+ append(state.opt, " -n");
+ state.exec = 0;
+ continue;
+ case 'F':
+ append(state.opt, " -F");
+ state.force = 1;
+ continue;
+ case 'G':
+ append(state.opt, " -G");
+ search(state.vars, "-debug-symbols", "1");
+ continue;
+ case 'K':
+ continue;
+ case 'S':
+ append(state.opt, " -S");
+ search(state.vars, "-strip-symbols", "1");
+ continue;
+ case 'V':
+ fprintf(stdout, "%s\n", id + 10);
+ exit(0);
+ case 'f':
+ case 'r':
+ case 'C':
+ case 'D':
+ t = s;
+ if (!*++s && !(s = *++argv))
+ {
+ report(2, "option value expected", t, (unsigned long)0);
+ usage();
+ }
+ else
+ switch (*t)
+ {
+ case 'f':
+ append(state.opt, " -f ");
+ append(state.opt, s);
+ state.file = s;
+ break;
+ case 'r':
+ state.recurse = s;
+ break;
+ case 'C':
+ state.directory = s;
+ break;
+ case 'D':
+ append(state.opt, " -D");
+ append(state.opt, s);
+ state.debug = -atoi(s);
+ break;
+ }
+ break;
+ default:
+ report(2, "unknown option", s, (unsigned long)0);
+ case '?':
+ usage();
+ break;
+ }
+ break;
+ }
+ }
+#endif
+
+ /*
+ * load the environment
+ */
+
+ for (e = environ; s = *e; e++)
+ for (t = s; *t; t++)
+ if (*t == '=')
+ {
+ *t = 0;
+ search(state.vars, s, t + 1);
+ *t = '=';
+ break;
+ }
+
+ /*
+ * grab the command line targets and variable definitions
+ */
+
+ while (s = *argv++)
+ {
+ for (t = s; *t; t++)
+ if (*t == '=')
+ {
+ v = t + 1;
+ if (t > s && *(t - 1) == '+')
+ t--;
+ c = *t;
+ *t = 0;
+ search(state.vars, s, v);
+ tmp = buffer();
+ append(tmp, s);
+ append(tmp, ".FORCE");
+ search(state.vars, use(tmp), v);
+ drop(tmp);
+ *t = c;
+ break;
+ }
+ if (!*t)
+ {
+ /*
+ * handle a few targets for nmake compatibility
+ */
+
+ if (*s == 'e' && !strncmp(s, "error 0 $(MAKEVERSION:", 22))
+ exit(1);
+ if (*s == 'r' && !strcmp(s, "recurse") || *s == 'c' && !strncmp(s, "cc-", 3))
+ continue;
+ rule(s)->flags |= RULE_active;
+ state.active = 0;
+ if (state.recurse)
+ continue;
+ }
+ add(state.opt, ' ');
+ add(state.opt, '\'');
+ append(state.opt, s);
+ add(state.opt, '\'');
+ }
+
+ /*
+ * initialize the views
+ */
+
+ if (state.directory && chdir(state.directory))
+ report(3, "cannot change working directory", NiL, (unsigned long)0);
+ view();
+
+ /*
+ * recursion drops out here
+ */
+
+ if (state.recurse)
+ return recurse(state.recurse);
+
+ /*
+ * read the mamfile(s) and bring the targets up to date
+ */
+
+ search(state.vars, "MAMAKEARGS", duplicate(use(state.opt) + 1));
+ push(state.file, (Stdio_t*)0, STREAM_MUST);
+ make(rule(""));
+ pop();
+
+ /*
+ * verify that active targets were made
+ */
+
+ if (!state.active && !state.verified)
+ walk(state.rules, verify, NiL);
+
+ /*
+ * done
+ */
+
+ return state.errors != 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/mamake.rt b/usr/src/contrib/ast/src/cmd/INIT/mamake.rt
new file mode 100644
index 0000000000..5f7603d54d
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/mamake.rt
@@ -0,0 +1,40 @@
+NOTE regression tests for the mamake command
+
+UNIT mamake
+
+TEST macros
+
+DATA Mamfile <<'!'
+info mam static 00000 1994-07-17 make (AT&T Research) 5.3 2009-05-05
+setv DEFINED defined
+setv EMPTY
+make all
+
+exec - echo DEFINED ${DEFINED}
+exec - echo DEFINED:VALUE ${DEFINED:VALUE}
+exec - echo DEFINED:-VALUE ${DEFINED:-VALUE}
+exec - echo DEFINED=VALUE ${DEFINED=VALUE}
+exec - echo DEFINED[VALUE] ${DEFINED[VALUE]}
+exec - echo DEFINED.COMPONENT ${DEFINED.COMPONENT}
+exec - echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]}
+
+exec - echo EMPTY ${EMPTY}
+exec - echo EMPTY:VALUE ${EMPTY:VALUE}
+exec - echo EMPTY:-VALUE ${EMPTY:-VALUE}
+exec - echo EMPTY=VALUE ${EMPTY=VALUE}
+exec - echo EMPTY[VALUE] ${EMPTY[VALUE]}
+exec - echo EMPTY.COMPONENT ${EMPTY.COMPONENT}
+exec - echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]}
+
+exec - echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__}
+exec - echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE}
+exec - echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE}
+exec - echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE}
+exec - echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]}
+exec - echo __NoT_DeFiNeD__.COMPONENT ${__NoT_DeFiNeD__.COMPONENT}
+exec - echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VALUE]}
+
+done all generated virtual
+!
+
+EXEC -n
diff --git a/usr/src/contrib/ast/src/cmd/INIT/mamake.tst b/usr/src/contrib/ast/src/cmd/INIT/mamake.tst
new file mode 100644
index 0000000000..3c7f94d64b
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/mamake.tst
@@ -0,0 +1,63 @@
+# : : generated from mamake.rt by mktest : : #
+
+# regression tests for the mamake command
+
+UNIT mamake
+
+TEST 01 macros
+
+ EXEC -n
+ INPUT -n -
+ INPUT Mamfile $'info mam static 00000 1994-07-17 make (AT&T Research) 5.3 2009-05-05
+setv DEFINED defined
+setv EMPTY
+make all
+
+exec - echo DEFINED ${DEFINED}
+exec - echo DEFINED:VALUE ${DEFINED:VALUE}
+exec - echo DEFINED:-VALUE ${DEFINED:-VALUE}
+exec - echo DEFINED=VALUE ${DEFINED=VALUE}
+exec - echo DEFINED[VALUE] ${DEFINED[VALUE]}
+exec - echo DEFINED.COMPONENT ${DEFINED.COMPONENT}
+exec - echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]}
+
+exec - echo EMPTY ${EMPTY}
+exec - echo EMPTY:VALUE ${EMPTY:VALUE}
+exec - echo EMPTY:-VALUE ${EMPTY:-VALUE}
+exec - echo EMPTY=VALUE ${EMPTY=VALUE}
+exec - echo EMPTY[VALUE] ${EMPTY[VALUE]}
+exec - echo EMPTY.COMPONENT ${EMPTY.COMPONENT}
+exec - echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]}
+
+exec - echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__}
+exec - echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE}
+exec - echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE}
+exec - echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE}
+exec - echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]}
+exec - echo __NoT_DeFiNeD__.COMPONENT ${__NoT_DeFiNeD__.COMPONENT}
+exec - echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VAL'\
+$'UE]}
+
+done all generated virtual'
+ OUTPUT - $'echo DEFINED defined
+echo DEFINED:VALUE
+echo DEFINED:-VALUE
+echo DEFINED=VALUE defined
+echo DEFINED[VALUE] ${DEFINED[VALUE]}
+echo DEFINED.COMPONENT
+echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]}
+echo EMPTY
+echo EMPTY:VALUE ${EMPTY:VALUE}
+echo EMPTY:-VALUE ${EMPTY:-VALUE}
+echo EMPTY=VALUE
+echo EMPTY[VALUE] ${EMPTY[VALUE]}
+echo EMPTY.COMPONENT
+echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]}
+echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__}
+echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE}
+echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE}
+echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE}
+echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]}
+echo __NoT_DeFiNeD__.COMPONENT
+echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VALUE]}'
+ ERROR -n -
diff --git a/usr/src/contrib/ast/src/cmd/INIT/mamprobe.sh b/usr/src/contrib/ast/src/cmd/INIT/mamprobe.sh
new file mode 100644
index 0000000000..6933bea5f4
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/mamprobe.sh
@@ -0,0 +1,267 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+### this script contains archaic constructs that work with all sh variants ###
+# mamprobe - generate MAM cc probe info
+# Glenn Fowler <gsf@research.att.com>
+
+case $-:$BASH_VERSION in
+*x*:[0123456789]*) : bash set -x is broken :; set +ex ;;
+esac
+
+command=mamprobe
+
+# check the options
+
+opt=
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) USAGE=$'
+[-?
+@(#)$Id: mamprobe (AT&T Labs Research) 2011-02-11 $
+]
+[+NAME?mamprobe - generate MAM cc probe info]
+[+DESCRIPTION?\bmamprobe\b generates MAM (make abstract machine) \bcc\b(1)
+ probe information for use by \bmamake\b(1). \acc-path\a is the
+ absolute path of the probed compiler and \ainfo-file\a is where
+ the information is placed. \ainfo-file\a is usually
+ \b$INSTALLROOT/lib/probe/C/mam/\b\ahash\a, where \ahash\a is a hash
+ of \acc-path\a. Any \ainfo-file\a directories are created if needed.
+ If \ainfo-file\a is \b-\b then the probe information is written to
+ the standard output.]
+[+?\bmamprobe\b and \bmamake\b are used in the bootstrap phase of
+ \bpackage\b(1) installation before \bnmake\b(1) is built. The
+ probed variable names are the \bnmake\b(1) names with a \bmam_\b
+ prefix, \bCC\b converted to \bcc\b, and \b.\b converted to \b_\b.
+ Additional variables are:]{
+ [+_hosttype_?the \bpackage\b(1) host type]
+ [+mam_cc_L?\b-L\b\adir\a supported]
+ [+STDCAT?command to execute for \bcat\b(1); prefixed by
+ \bexecrate\b(1) on \b.exe\b challenged systems]
+ [+STDCHMOD?command to execute for \bchmod\b(1); prefixed by
+ \bexecrate\b(1) on \b.exe\b challenged systems]
+ [+STDCMP?command to execute for \bcmp\b(1); prefixed by
+ \bexecrate\b(1) on \b.exe\b challenged systems]
+ [+STDCP?command to execute for \bcp\b(1); prefixed by
+ \bexecrate\b(1) on \b.exe\b challenged systems]
+ [+STDED?command to execute for \bed\b(1) or \bex\b(1)]
+ [+STDEDFLAGS?flags for \bSTDED\b]
+ [+STDLN?command to execute for \bln\b(1); prefixed by
+ \bexecrate\b(1) on \b.exe\b challenged systems]
+ [+STDMV?command to execute for \bmv\b(1); prefixed by
+ \bexecrate\b(1) on \b.exe\b challenged systems]
+ [+STDRM?command to execute for \brm\b(1); prefixed by
+ \bexecrate\b(1) on \b.exe\b challenged systems]
+}
+[d:debug?Enable probe script debug trace.]
+
+info-file cc-path
+
+[+SEE ALSO?\bexecrate\b(1), \bpackage\b(1), \bmamake\b(1), \bnmake\b(1),
+ \bprobe\b(1)]
+'
+ while getopts -a "$command" "$USAGE" OPT
+ do case $OPT in
+ d) opt=-d ;;
+ esac
+ done
+ shift `expr $OPTIND - 1`
+ ;;
+*) while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ --) shift
+ break
+ ;;
+ -) break
+ ;;
+ -d) opt=-d
+ ;;
+ -*) echo $command: $1: unknown option >&2
+ ;;
+ *) break
+ ;;
+ esac
+ set ''
+ break
+ done
+ ;;
+esac
+
+# check the args
+
+case $1 in
+-) ;;
+/*) ;;
+*) set '' ;;
+esac
+case $2 in
+/*) ;;
+*) set '' ;;
+esac
+case $# in
+0|1) echo "Usage: $command info-file cc-path" >&2; exit 2 ;;
+esac
+info=$1
+shift
+cc=$*
+
+# find the make probe script
+
+ifs=${IFS-'
+ '}
+IFS=:
+set $PATH
+IFS=$ifs
+script=lib/probe/C/make/probe
+while :
+do case $# in
+ 0) echo "$0: ../$script: probe script not found on PATH" >&2
+ exit 1
+ ;;
+ esac
+ case $1 in
+ '') continue ;;
+ esac
+ makeprobe=`echo $1 | sed 's,[^/]*$,'$script,`
+ if test -x $makeprobe
+ then break
+ fi
+ shift
+done
+
+# create the info dir if necessary
+
+case $info in
+/*) i=X$info
+ ifs=${IFS-'
+ '}
+ IFS=/
+ set $i
+ IFS=$ifs
+ while :
+ do i=$1
+ shift
+ case $i in
+ X) break ;;
+ esac
+ done
+ case $info in
+ //*) path=/ ;;
+ *) path= ;;
+ esac
+ while :
+ do case $# in
+ 0|1) break ;;
+ esac
+ comp=$1
+ shift
+ case $comp in
+ '') continue ;;
+ esac
+ path=$path/$comp
+ if test ! -d $path
+ then mkdir $path || exit
+ fi
+ done
+ ;;
+esac
+
+# generate info in a tmp file and rename when finished
+
+case $info in
+-) ;;
+*) tmp=/tmp/mam$$
+ trap "exec >/dev/null; rm -f $tmp" 0 1 2 3 15
+ exec > $tmp
+ echo "probing C language processor $cc for mam information" >&2
+ ;;
+esac
+
+echo "note generated by $0 for $cc"
+
+(
+ set '' $opt $cc
+ shift
+ . $makeprobe "$@"
+
+ case " $CC_DIALECT " in
+ *" -L "*) echo "CC.L = 1" ;;
+ esac
+
+) | sed \
+ -e '/^CC\./!d' \
+ -e 's/^CC./setv mam_cc_/' \
+ -e 's/^\([^=.]*\)\./\1_/' \
+ -e 's/^\([^=.]*\)\./\1_/' \
+ -e 's/ =//' \
+ -e 's/\$("\([^"]*\)")/\1/g' \
+ -e 's/\$(\([^)]*\))/${\1}/g' \
+ -e 's/\${CC\./${mam_cc_}/g'
+
+echo 'setv _hosttype_ ${mam_cc_HOSTTYPE}'
+
+# STD* are standard commands/flags with possible execrate(1)
+
+if (
+ed <<!
+q
+!
+) < /dev/null > /dev/null 2>&1
+then STDED=ed
+else STDED=ex
+fi
+STDEDFLAGS=-
+set STDCAT cat STDCHMOD chmod STDCMP cmp STDCP cp STDLN ln STDMV mv STDRM rm
+while :
+do case $# in
+ 0|1) break ;;
+ esac
+ p=$2
+ for d in /bin /usr/bin /usr/sbin
+ do if test -x $d/$p
+ then p=$d/$p
+ break
+ fi
+ done
+ eval $1=\$p
+ shift
+ shift
+done
+if execrate
+then for n in STDCAT STDCHMOD STDCMP STDCP STDLN STDMV STDRM
+ do eval $n=\"execrate \$$n\"
+ done
+fi
+for n in STDCAT STDCHMOD STDCMP STDCP STDED STDEDFLAGS STDLN STDMV STDRM
+do eval echo setv \$n \$$n
+done
+
+# all done
+
+case $info in
+-) ;;
+*) exec >/dev/null
+ test -f $info && rm -f $info
+ cp $tmp $info
+ chmod -w $info
+ ;;
+esac
diff --git a/usr/src/contrib/ast/src/cmd/INIT/mkdir.sh b/usr/src/contrib/ast/src/cmd/INIT/mkdir.sh
new file mode 100644
index 0000000000..c929e95177
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/mkdir.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: mkdir for systems that do not support -p : 2002-09-01 :
+MKDIR=/bin/mkdir
+CHMOD=chmod
+mode=
+parents=
+while :
+do case $1 in
+ -m) case $# in
+ 1) echo "mkdir: -m: mode argument expected" >&2
+ exit 1
+ ;;
+ esac
+ shift
+ mode=$1
+ ;;
+ -m*) mode=`echo X$1 | sed 's/X-m//'`
+ ;;
+ -p) parents=1
+ ;;
+ *) break
+ ;;
+ esac
+ shift
+done
+if test "" != "$parents"
+then for d
+ do if test ! -d $d
+ then ifs=${IFS-'
+ '}
+ IFS=/
+ set '' $d
+ IFS=$ifs
+ shift
+ dir=$1
+ shift
+ if test -n "$dir" -a ! -d "$dir"
+ then $MKDIR "$dir" || exit 1
+ if test "" != "$mode"
+ then $CHMOD "$mode" "$dir" || exit 1
+ fi
+ fi
+ for d
+ do dir=$dir/$d
+ if test ! -d "$dir"
+ then $MKDIR "$dir" || exit 1
+ if test "" != "$mode"
+ then $CHMOD "$mode" "$dir" || exit 1
+ fi
+ fi
+ done
+ fi
+ done
+else $MKDIR "$@" || exit 1
+ if test "" != "$mode"
+ then for d
+ do $CHMOD "$mode" "$d" || exit 1
+ done
+ fi
+fi
+exit 0
diff --git a/usr/src/contrib/ast/src/cmd/INIT/mktest.sh b/usr/src/contrib/ast/src/cmd/INIT/mktest.sh
new file mode 100755
index 0000000000..f24183eedd
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/mktest.sh
@@ -0,0 +1,641 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: mktest - generate regress or shell regression test scripts
+
+command=mktest
+stdin=8
+stdout=9
+PREFIX=test
+STYLE=regress
+WIDTH=80
+
+eval "exec $stdout>&1"
+
+case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
+0123) ARGV0="-a $command"
+ USAGE=$'
+[-?
+@(#)$Id: mktest (AT&T Labs Research) 2010-08-11 $
+]
+'$USAGE_LICENSE$'
+[+NAME?mktest - generate a regression test scripts]
+[+DESCRIPTION?\bmktest\b generates regression test scripts from test
+ template commands in the \aunit\a.\brt\b file. The generated test
+ script writes temporary output to '$PREFIX$'\aunit\a.tmp and compares
+ it to the expected output in '$PREFIX$'\aunit\a.out. Run the test
+ script with the \b--accept\b option to (re)generate the
+ '$PREFIX$'\aunit\a.out.]
+[s:style?The script style:]:[style:='$STYLE$']
+ {
+ [+regress?\bregress\b(1) command input.]
+ [+shell?Standalone test shell script.]
+ }
+[w:width?Set the output format width to approximately
+ \awidth\a.]:[width:='$WIDTH$']
+
+unit.rt [ unit [ arg ... ] ]
+
+[+INPUT FILES?The regression test command file \aunit\a\b.rt\b is a
+ \bksh\b(1) script that makes calls to the following functions:]
+ {
+ [+DATA \afile\a [ - | [ options ]] data]]?Create input data
+ \afile\a that is empty (-) or contains \adata\a subject to
+ \bprint\b(1) \aoptions\a or that is a copy of the DATA command
+ standard input. Set \afile\a to \b-\b to name the standard
+ input.]
+ [+DIAGNOSTICS?Diagnostic messages of unspecified format are
+ expected.]
+ [+DO \acommand\a [ \aarg\a ... ]]?Execute \acommand\a if the
+ current test is active.]
+ [+EXEC [ \aarg\a ... ]]?Run the command under test with
+ optional arguments. If the standard input is not specified then
+ the standard input of the previous EXEC is used. The standard
+ input of the first EXEC in a TEST group is an empty regular
+ file.]
+ [+EXPORT \aname\a=\avalue\a ...?Export list for subsequent
+ commands in the TEST group or for all TEST groups if before
+ the first TEST group.]
+ [+IGNORESPACE [ 0 | 1 ]
+ ?Ignore space differences when comparing expected output.]
+ [+KEEP \apattern\a ...?File match patterns of files to retain
+ between TEST groups.]
+ [+NOTE \acomment\a?\acomment\a is added to the current test
+ script.]
+ [+PROG \acommand\a [ \aarg\a ... ]]?Run \acommand\a with
+ optional arguments.]
+ [+TEST [ \anumber\a ]] [ \adescription\a ... ]]?Define a new
+ test group with optional \anumber\a and \adescripion\a.]
+ [+TWD [ \adir\a ... ]]?Set the temporary test dir to \adir\a.
+ The default is \aunit\a\b.tmp\b, where \aunit\a is the test
+ input file sans directory and suffix. If \adir\a matches \b/*\b
+ then it is the directory name; if \adir\a is non-null then the
+ prefix \b${TMPDIR:-/tmp}\b is added; otherwise if \adir\a is
+ omitted then
+ \b${TMPDIR:-/tmp}/tst-\b\aunit\a-$$-$RANDOM.\b\aunit\a is
+ used.]
+ [+UMASK [ \amask\a ]]?Run subsequent tests with \bumask\b(1)
+ \amask\a. If \amask\a is omitted then the original \bumask\b is
+ used.]
+ [+UNIT \acommand\a [ \aarg\a ... ]]?Define the command and
+ optional default arguments to be tested. \bUNIT\b explicitly
+ overrides the default command name derived from the test script
+ file name.]
+ [+WIDTH \awidth\a?Set the output format width to approximately
+ \awidth\a.]
+ }
+[+SEE ALSO?\bregress\b(1), \bksh\b(1)]
+'
+ ;;
+*) ARGV0=""
+ USAGE='s: unit.rt [ arg ... ]'
+ ;;
+esac
+
+typeset ARG SCRIPT UNIT TEMP=${TMPDIR:-/tmp}/$command.$$.tmp WORK
+typeset IO INPUT INPUT_N OUTPUT OUTPUT_N ERROR ERROR_N KEEP
+typeset -C STATE
+typeset -A DATA STATE.RESET REMOVE FORMAT
+integer KEEP_UNIT=0 SCRIPT_UNIT=0 TEST=0 CODE=0 EXIT=0 ACCEPT=0 DIAGNOSTICS=0 code
+
+while getopts $ARGV0 "$USAGE" OPT
+do case $OPT in
+ s) case $OPTARG in
+ regress|shell)
+ STYLE=$OPTARG
+ ;;
+ *) print -u2 -r -- $command: --style=$OPTARG: regress or shell expected
+ exit 1
+ ;;
+ esac
+ ;;
+ w) WIDTH=$OPTARG
+ ;;
+ *) OPTIND=0
+ getopts $ARGV0 "$USAGE" OPT '-?'
+ exit 2
+ ;;
+ esac
+done
+shift $OPTIND-1
+
+typeset SINGLE= quote='%${SINGLE}..${WIDTH}q'
+
+if [[ $1 == - ]]
+then shift
+fi
+if (( ! $# ))
+then
+ print -u2 -r -- $command: test command script path expected
+ exit 1
+fi
+SCRIPT=$1
+shift
+if [[ ! -r $SCRIPT ]]
+then print -u2 -r -- $command: $SCRIPT: cannot read
+ exit 1
+fi
+(ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0
+if (( $# ))
+then set -A UNIT -- "$@"
+ KEEP_UNIT=1
+else ARG=${SCRIPT##*/}
+ set -A UNIT -- "${ARG%.*}"
+fi
+WORK=${UNIT[0]}.tmp
+rm -rf $WORK
+mkdir $WORK || exit
+export PATH=$PWD:$PATH
+
+function LINE
+{
+ if [[ $STYLE == regress ]]
+ then print -u$stdout
+ fi
+}
+
+function NOTE
+{
+ case $STYLE in
+ regress)LINE
+ print -u$stdout -r -- '#' "$@"
+ ;;
+ shell) print -u$stdout -r -f ": $QUOTE"$'\n' -- "$*"
+ ;;
+ esac
+}
+
+function UNIT
+{
+ (( KEEP_UNIT )) || set -A UNIT -- "$@"
+ case $STYLE in
+ regress)LINE
+ print -u$stdout -r -f $'UNIT'
+ for ARG in "$@"
+ do print -u$stdout -r -f " $QUOTE" -- "$ARG"
+ done
+ print -u$stdout
+ ;;
+ shell) print -u$stdout -r -f $'set x'
+ for ARG in "$@"
+ do print -u$stdout -r -f " $QUOTE" -- "$ARG"
+ done
+ print -u$stdout
+ print -u$stdout shift
+ ;;
+ esac
+}
+
+function TEST
+{
+ typeset i
+ typeset -A REM
+ if (( ${#STATE.RESET[@]} ))
+ then unset ${!STATE.RESET[@]}
+ case $STYLE in
+ shell) print -u$stdout -r -- unset ${!STATE.RESET[@]} ;;
+ esac
+ unset STATE.RESET
+ typeset -A STATE.RESET
+ fi
+ if (( ${#REMOVE[@]} ))
+ then rm -f -- "${!REMOVE[@]}"
+ case $STYLE in
+ shell) print -u$stdout -r -f $'rm -f'
+ for i in ${!REMOVE[@]}
+ do print -u$stdout -r -f " $QUOTE" "$i"
+ done
+ print -u$stdout
+ ;;
+ esac
+ for i in ${!REMOVE[@]}
+ do unset REMOVE[$i]
+ done
+ fi
+ rm -rf $WORK/*
+ if [[ $1 == +([0-9]) ]]
+ then TEST=${1##0}
+ shift
+ else ((TEST++))
+ fi
+ LINE
+ case $STYLE in
+ regress)print -u$stdout -r -f "TEST %02d $QUOTE"$'\n' -- $TEST "$*"
+ ;;
+ shell) print -u$stdout -r -f ": TEST %02d $QUOTE"$'\n' -- $TEST "$*"
+ ;;
+ esac
+ : > $TEMP.INPUT > $TEMP.in
+ INPUT=
+ INPUT_N=
+ OUTPUT=
+ OUTPUT_N=
+ ERROR=
+ ERROR_N=
+ UMASK=$UMASK_ORIG
+ UMASK_DONE=$UMASK
+ CODE=0
+}
+
+function TWD
+{
+ case $STYLE in
+ regress)LINE
+ print -u$stdout -r -f $'TWD'
+ for ARG in "$@"
+ do print -u$stdout -r -f " $QUOTE" -- "$ARG"
+ done
+ print -u$stdout
+ ;;
+ esac
+}
+
+function RUN
+{
+ typeset i n p op unit sep output=1 error=1 exitcode=1
+ op=$1
+ shift
+ while :
+ do case $1 in
+ ++NOOUTPUT) output= ;;
+ ++NOERROR) error= ;;
+ ++NOEXIT) exitcode= ;;
+ ++*) print -u2 -r -- $command: $0: $1: unknown option; exit 1 ;;
+ *) break ;;
+ esac
+ shift
+ done
+ if [[ $op == PROG ]]
+ then unit=$1
+ shift
+ elif (( ! ${#UNIT[@]} ))
+ then print -u2 -r -- $command: $SCRIPT: UNIT statement or operand expected
+ exit 1
+ fi
+ LINE
+ case $STYLE in
+ regress)if [[ $op == PROG ]]
+ then print -u$stdout -r -f $'\t'"$op"$'\t'"$unit"
+ sep=$' '
+ else print -u$stdout -r -f $'\t'"$op"
+ sep=$'\t'
+ fi
+ for ARG in "$@"
+ do LC_CTYPE=C print -u$stdout -r -f "$sep$QUOTE" -- "$ARG"
+ sep=$' '
+ done
+ print -u$stdout
+ [[ ${DATA[-]} || /dev/fd/0 -ef /dev/fd/$stdin ]] || cat > $TEMP.in
+ IO=$(cat $TEMP.in; print :)
+ if [[ $IO == ?*$'\n:' ]]
+ then IO=${IO%??}
+ n=
+ else IO=${IO%?}
+ n=-n
+ fi
+ {
+ [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK
+ cd $WORK
+ if [[ $op == PROG ]]
+ then "$unit" "$@"
+ code=$?
+ else "${UNIT[@]}" "$@"
+ code=$?
+ fi
+ cd ..
+ [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG
+ } < $TEMP.in > $TEMP.out 2> $TEMP.err
+ if [[ $IO != "$INPUT" || $n != "$INPUT_N" ]]
+ then INPUT=$IO
+ INPUT_N=$n
+ if [[ ${FORMAT[-]} ]]
+ then print -u$stdout -n -r -- $'\t\tINPUT'
+ print -u$stdout -r -f " $QUOTE" -- "${FORMAT[-]}"
+ print -u$stdout -r -f " $QUOTE" -- -
+ unset FORMAT[-]
+ else print -u$stdout -n -r -- $'\t\tINPUT' $n -
+ [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO"
+ fi
+ print -u$stdout
+ unset DATA[-]
+ fi
+ for i in ${!DATA[@]}
+ do if [[ ${FORMAT[$i]} ]]
+ then print -u$stdout -n -r -- $'\t\tINPUT'
+ print -u$stdout -r -f " $QUOTE" -- "${FORMAT[$i]}"
+ print -u$stdout -r -f " $QUOTE" -- "$i"
+ unset FORMAT[$i]
+ else case $i in
+ -) p=$TEMP.in ;;
+ *) p=$WORK/$i ;;
+ esac
+ IO=$(cat $p; print :)
+ if [[ $IO == ?*$'\n:' ]]
+ then IO=${IO%??}
+ n=
+ else IO=${IO%?}
+ n=-n
+ fi
+ print -u$stdout -n -r -- $'\t\tINPUT' $n
+ print -u$stdout -r -f " $QUOTE" -- "$i"
+ [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO"
+ fi
+ print -u$stdout
+ unset DATA[$i]
+ done
+ IO=$(cat $TEMP.out; print :)
+ if [[ $IO == ?*$'\n:' ]]
+ then IO=${IO%??}
+ n=
+ else IO=${IO%?}
+ n=-n
+ fi
+ if [[ $IO != "$OUTPUT" || $n != "$OUTPUT_N" ]]
+ then OUTPUT=$IO
+ OUTPUT_N=$n
+ if [[ $output ]]
+ then if [[ ! -s $TEMP.out ]]
+ then print -u$stdout -n -r -- $'\t\tOUTPUT' -
+ elif cmp -s $TEMP.in $TEMP.out
+ then OUTPUT=not-$OUTPUT
+ print -u$stdout -n -r -- $'\t\tSAME OUTPUT INPUT'
+ else print -u$stdout -n -r -- $'\t\tOUTPUT' $n -
+ [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO"
+ fi
+ print -u$stdout
+ fi
+ fi
+ IO=$(cat $TEMP.err; print :)
+ IO=${IO//$command\[*([0-9])\]:\ .\[*([0-9])\]:\ @(EXEC|PROG)\[*([0-9])\]:\ /}
+ if [[ $IO == ?*$'\n:' ]]
+ then IO=${IO%??}
+ n=
+ else IO=${IO%?}
+ n=-n
+ fi
+ if [[ $IO != "$ERROR" || $n != "$ERROR_N" ]]
+ then ERROR=$IO
+ ERROR_N=$n
+ if [[ $error ]]
+ then print -u$stdout -n -r -- $'\t\tERROR' $n -
+ [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO"
+ print -u$stdout
+ fi
+ fi
+ case $output:$error in
+ :) OUTPUT=
+ OUTPUT_N=
+ ERROR=
+ ERROR_N=
+ print -u$stdout -r -- $'\t\tIGNORE OUTPUT ERROR'
+ ;;
+ :1) OUTPUT=
+ OUTPUT_N=
+ print -u$stdout -r -- $'\t\tIGNORE OUTPUT'
+ ;;
+ 1:) ERROR=
+ ERROR_N=
+ print -u$stdout -r -- $'\t\tIGNORE ERROR'
+ ;;
+ esac
+ if [[ $UMASK_DONE != $UMASK ]]
+ then UMASK_DONE=$UMASK
+ print -u$stdout -r -f $'\t\tUMASK %s\n' $UMASK
+ fi
+ if (( code != CODE ))
+ then (( CODE=code ))
+ if [[ $exitcode ]]
+ then print -u$stdout -r -f $'\t\tEXIT %d\n' $CODE
+ fi
+ fi
+ ;;
+ shell) [[ $UMASK != $UMASK_ORIG ]] && print -u$stdout -r -f "{ umask $UMASK; "
+ if [[ $op == PROG ]]
+ then print -u$stdout -r -f $'"'"$unit"$'"'
+ else print -u$stdout -r -f $'"$@"'
+ fi
+ for ARG in "$@"
+ do print -u$stdout -r -f " $QUOTE" -- "$ARG"
+ done
+ [[ $UMASK != $UMASK_ORIG ]] && print -u$stdout -r -f "umask $UMASK_ORIG; } "
+ if [[ ! $output ]]
+ then print -u$stdout -r -f " >/dev/null"
+ fi
+ if [[ ! $error ]]
+ then if [[ ! $output ]]
+ then print -u$stdout -r -f " 2>&1"
+ else print -u$stdout -r -f " 2>/dev/null"
+ fi
+ fi
+ IO=$(cat)
+ if [[ $IO ]]
+ then print -u$stdout -r -- "<<'!TEST-INPUT!'"
+ print -u$stdout -r -- "$IO"
+ print -u$stdout -r -- !TEST-INPUT!
+ else print -u$stdout
+ fi
+ if [[ $exitcode ]]
+ then print -u$stdout -r -- $'CODE=$?\ncase $CODE in\n0) ;;\n*) echo exit status $CODE ;;\nesac'
+ fi
+ ;;
+ esac
+}
+
+function DO
+{
+ LINE
+ print -r $'\t'DO "$@"
+}
+
+function EXEC
+{
+ RUN EXEC "$@"
+}
+
+function DATA
+{
+ typeset f p o
+ f=$1
+ shift
+ case $f in
+ -) p=$TEMP.in ;;
+ *) p=$WORK/$f ;;
+ esac
+ case $1 in
+ '') cat ;;
+ -) ;;
+ *) print -r "$@" ;;
+ esac > $p
+ DATA[$f]=1
+ if (( $# == 1 )) && [[ $1 == -?* ]]
+ then FORMAT[$f]=$1
+ else FORMAT[$f]=
+ fi
+ if [[ $f != $KEEP ]]
+ then REMOVE[$f]=1
+ fi
+ if [[ $STYLE == shell ]]
+ then {
+ print -r -f "cat > $QUOTE <<'!TEST-INPUT!'"$'\n' -- "$f"
+ cat "$p"
+ print -r -- !TEST-INPUT!
+ } >&$stdout
+ fi
+}
+
+function KEEP
+{
+ typeset p
+ for p
+ do if [[ $KEEP ]]
+ then KEEP=$KEEP'|'
+ fi
+ KEEP=$KEEP$p
+ done
+}
+
+function DIAGNOSTICS
+{
+ LINE
+ case $STYLE in
+ regress) print -u$stdout -r $'DIAGNOSTICS' ;;
+ shell) DIAGNOSTICS=1 ;;
+ esac
+}
+
+function EXPORT
+{
+ typeset x n v
+ LINE
+ case $STYLE in
+ regress) print -u$stdout -r -f $'EXPORT' ;;
+ shell) print -u$stdout -r -f $'export' ;;
+ esac
+ for x
+ do n=${x%%=*}
+ v=${x#*=}
+ export "$x"
+ print -u$stdout -r -f " %s=$QUOTE" "$n" "$v"
+ (( TEST )) && STATE.RESET["$n"]=1
+ done
+ print -u$stdout
+}
+
+function PROG
+{
+ RUN PROG "$@"
+}
+
+function WIDTH
+{
+ WIDTH=${1:-80}
+ eval QUOTE='"'$quote'"'
+}
+
+function IGNORESPACE
+{
+ IGNORESPACE=-b
+ LINE
+ print -u$stdout -r IGNORESPACE
+}
+
+function UMASK # [ mask ]
+{
+ [[ $UMASK_ORIG ]] || UMASK_ORIG=$(umask)
+ UMASK=$1
+ [[ $UMASK ]] || UMASK=$UMASK_ORIG
+}
+
+trap 'CODE=$?; rm -rf $TEMP.* $WORK; exit $CODE' 0 1 2 3 15
+
+typeset IGNORESPACE UMASK UMASK_ORIG UMASK_DONE
+UMASK_ORIG=$(umask)
+IFS=$IFS$'\n'
+
+print -u$stdout -r "# : : generated from $SCRIPT by $command : : #"
+case $STYLE in
+shell) cat <<!
+ACCEPT=0
+while :
+do case \$1 in
+ -a|--accept)
+ ACCEPT=1
+ ;;
+ --help|--man)
+ cat 1>&2 <<!!
+Usage: \\\$SHELL $PREFIX${UNIT[0]}.sh [ --accept ] [ unit ... ]
+
+${UNIT[0]} regression test script. Run this script to generate new
+results in $PREFIX${UNIT[0]}.tmp and compare with expected results in
+$PREFIX${UNIT[0]}.out. The --accept option generates $PREFIX${UNIT[0]}.tmp
+and moves it to $PREFIX${UNIT[0]}.out.
+!!
+ exit 2
+ ;;
+ -*) echo \$0: \$1: invalid option >&2
+ exit 1
+ ;;
+ *) break
+ ;;
+ esac
+ shift
+done
+export COLUMNS=80
+{
+!
+ ;;
+esac
+
+export COLUMNS=80
+
+case $STYLE in
+shell) SINGLE='#'
+ eval QUOTE='"'$quote'"'
+ . $SCRIPT < /dev/null | sed -e $'s,\\\\n,\n,g' -e $'s,\\\\t,\t,g' -e $'s,\\$\',\',g'
+ ;;
+*) eval QUOTE='"'$quote'"'
+ : > $TEMP.INPUT > $TEMP.in
+ eval "exec $stdin<$TEMP.INPUT"
+ . $SCRIPT <&$stdin
+ ;;
+esac
+
+case $STYLE in
+shell) cat <<!
+} > $PREFIX${UNIT[0]}.tmp 2>&1 < /dev/null
+case \$ACCEPT in
+0) if grep ' $' $PREFIX${UNIT[0]}.tmp >/dev/null
+ then mv $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.junk
+ sed 's/ $//' < $PREFIX${UNIT[0]}.junk > $PREFIX${UNIT[0]}.tmp
+ rm -f $PREFIX${UNIT[0]}.junk
+ fi
+ if cmp -s $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out
+ then echo ${UNIT[0]} tests PASSED
+ rm -f $PREFIX${UNIT[0]}.tmp
+ else echo ${UNIT[0]} tests FAILED
+ diff $IGNORESPACE $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out
+ fi
+ ;;
+
+*) mv $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out
+ ;;
+esac
+!
+ ;;
+esac
diff --git a/usr/src/contrib/ast/src/cmd/INIT/mprobe.sh b/usr/src/contrib/ast/src/cmd/INIT/mprobe.sh
new file mode 100644
index 0000000000..975ebb1c24
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/mprobe.sh
@@ -0,0 +1,30 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: mam probe script
+opt=
+while :
+do case $1 in
+ -d) opt=-d ;;
+ -*) ;;
+ *) break ;;
+ esac
+ shift
+done
+mamprobe $opt - "$1"
diff --git a/usr/src/contrib/ast/src/cmd/INIT/nsl.c b/usr/src/contrib/ast/src/cmd/INIT/nsl.c
new file mode 100644
index 0000000000..e961e01080
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/nsl.c
@@ -0,0 +1,31 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * small test for -lnsl
+ */
+
+
+extern void* gethostbyname();
+
+int
+main()
+{
+ return gethostbyname(0) == 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/p.c b/usr/src/contrib/ast/src/cmd/INIT/p.c
new file mode 100644
index 0000000000..387c4bbf45
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/p.c
@@ -0,0 +1,24 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * small test for prototyping cc
+ */
+
+int main(int argc, char** argv) { return argc || argv; }
diff --git a/usr/src/contrib/ast/src/cmd/INIT/package.mk b/usr/src/contrib/ast/src/cmd/INIT/package.mk
new file mode 100644
index 0000000000..921fa2d4df
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/package.mk
@@ -0,0 +1,1537 @@
+/*
+ * source and binary package support
+ *
+ * @(#)package.mk (AT&T Research) 2012-02-14
+ *
+ * usage:
+ *
+ * cd $INSTALLROOT/lib/package
+ * nmake -f name [closure] [cyg|exp|lcl|pkg|rpm|tgz] [base|delta] type
+ *
+ * where:
+ *
+ * name package description file or component
+ *
+ * type source build source archive, generates
+ * $(PACKAGEDIR)/name.version.release.suffix
+ * binary build binary archive, generates
+ * $(PACKAGEDIR)/name.version.hosttype.release.suffix
+ * runtime build binary archive, generates
+ * $(PACKAGEDIR)/name-run.version.hosttype.release.suffix
+ *
+ * NOTE: $(PACKAGEDIR) is in the lowest view and is shared among all views
+ *
+ * generated archive member files are $(PACKAGEROOT) relative
+ *
+ * main assertions:
+ *
+ * NAME [ name=value ] :PACKAGE: component ...
+ * :OMIT: component ...
+ * :LICENSE: license-class-pattern
+ * :CATEGORY: category-id ...
+ * :COVERS: package ...
+ * :REQURES: package ...
+ * :INDEX: index description line
+ * :DESCRIPTION:
+ * [ verbose description ]
+ * :DETAILS: style
+ * :README:
+ * readme lines
+ * :EXPORT:
+ * name=value
+ * target :INSTALL: [ source ]
+ *
+ * option variables, shown with default values
+ *
+ * format=tgz
+ * archive format
+ *
+ * version=YYYY-MM-DD
+ * package base version (overrides current date)
+ *
+ * release=YYYY-MM-DD
+ * package delta release (overrides current date)
+ *
+ * license=type.class
+ * :LICENSE: type.class pattern override
+ *
+ * notice=1
+ * include the conspicuous empty notice file
+ *
+ * copyright=0
+ * do not prepend source file copyright notice
+ *
+ * strip=0
+ * don't strip non-lcl binary package members
+ *
+ * variants=pattern
+ * include variants matching pattern in binary packages
+ *
+ * incremental=[source:1 binary:0]
+ * if a base archive is generated then also generate an
+ * incremental delta archive from the previous base
+ *
+ * NOTE: the Makerules.mk :PACKAGE: operator defers to :package: when
+ * a target is specified
+ */
+
+/* these are ast centric -- we'll parameterize another day */
+
+org = ast
+url = http://www.research.att.com/sw/download
+
+/* generic defaults */
+
+base =
+category = utils
+checksum = md5
+closure =
+copyright = 1
+delta =
+format = tgz
+incremental =
+index =
+init = INIT
+license =
+licenses = $(org)
+mamfile = 1
+opt =
+name =
+notice =
+release =
+strip = 0
+style = tgz
+suffix = tgz
+type =
+variants = !(cc-g)
+vendor =
+version = $("":T=R%Y-%m-%d)
+
+SUM = sum
+
+package.notice = ------------ NOTICE -- LICENSED SOFTWARE -- SEE README FOR DETAILS ------------
+
+package.readme = $(@.package.readme.)
+
+.package.readme. :
+ This is a package root directory $PACKAGEROOT. Source and binary
+ packages in this directory tree are controlled by the command
+ $()
+ bin/package
+ $()
+ Binary files may be in this directory or in the install root directory
+ $()
+ INSTALLROOT=$PACKAGEROOT/arch/`bin/package`
+ $()
+ For more information run
+ $()
+ bin/package help
+ $()
+ Many of the packaged commands self-document via the --man and --html
+ options; those that do have no separate man page.
+ $()
+ Each package is covered by one of the license files
+ $()
+ $(PACKAGELIB)/LICENSES/<license>
+ $()
+ where <license> is the license type for the package. At the top
+ of each license file is a URL; the license covers all software that
+ refers to this URL. For details run
+ $()
+ bin/package license [<package>]
+ $()
+ Any archives, distributions or packages made from source or
+ binaries covered by license(s) must contain the corresponding
+ license file(s)$(notice:?, this README file, and the empty file$$("\n")$$(package.notice)?.?)
+
+.package.licenses. : .FUNCTION
+ local I F L R T all save text
+ L := $(%)
+ while L == "--*"
+ I := $(L:O=1)
+ if I == "--all"
+ all = 1
+ elif I == "--save"
+ save = 1
+ elif I == "--text"
+ text = 1
+ end
+ L := $(L:O>1)
+ end
+ if "$(L)" == "*-*"
+ L += $(L:/[^-]*-//) $(L:/-.*//)
+ end
+ L += $(licenses)
+ for I $(L:U)
+ if I == "gpl"
+ I = gnu
+ all =
+ end
+ if F = "$(I:D=$(PACKAGESRC):B:S=.lic:T=F)"
+ R += $(F)
+ if save || text
+ T := $(.FIND. lib/package .lic $(F):P=W,query=type)
+ R += $(T:D=$(PACKAGESRC)/LICENSES:B)
+ end
+ if save
+ R += $(F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F)
+ elif ! all
+ break
+ end
+ end
+ end
+ return $(R)
+
+/*
+ * glob(3) doesn't handle / in alternation -- should it?
+ */
+
+.package.glob. : .FUNCTION
+ local A D I P S
+ for I $(%)
+ if I == "*/*"
+ D := $(I:C,/.*,,)
+ if ! "$(A:N=$(D))"
+ local S.$(D)
+ A += $(D)
+ end
+ S.$(D) += $(I:C,[^/]*/,,)
+ else
+ P := $(P)$(S)$(I)
+ end
+ S = |
+ end
+ if P == "*\|*"
+ P := ($(P))
+ end
+ for I $(A)
+ P += $(I)/$(.package.glob. $(S.$(I)))
+ end
+ return $(P)
+
+
+.MAKEINIT : .package.init
+
+.package.init : .MAKE .VIRTUAL .FORCE
+ local V
+ V := $(VROOT:T=F:P=L*)
+ if ! PACKAGEROOT
+ PACKAGEROOT := $(V:N!=*/arch/+([!/]):O=1)
+ end
+ if V == "$(PACKAGEROOT)"
+ V :=
+ end
+ V += $(INSTALLROOT) $(PACKAGEROOT)
+ PACKAGEVIEW := $(V:H=RU)
+ INSTALLOFFSET := $(INSTALLROOT:C%$(PACKAGEROOT)/%%)
+ if license
+ license := $(license)|none.none
+ end
+
+PACKAGELIB = lib/package
+PACKAGESRC = $(PACKAGEROOT)/$(PACKAGELIB)
+PACKAGEBIN = $(INSTALLROOT)/$(PACKAGELIB)
+PACKAGEDIR = $(PACKAGESRC)/$(style)
+INSTALLOFFSET = $(INSTALLROOT:C%$(PACKAGEROOT)/%%)
+
+package.omit = -|*/$(init)
+package.glob.all = $(INSTALLROOT)/src/*/*/($(MAKEFILES:/:/|/G))
+package.all = $(package.glob.all:P=G:W=O=$(?$(name):A=.VIRTUAL):N!=$(package.omit):T=F:$(PACKAGEVIEW:C,.*,C;^&/;;,:/ /:/G):U)
+package.glob.pkg = $(.package.glob. $(~$(name):P=U):C%.*%$(INSTALLROOT)/src/*/&/($(MAKEFILES:/:/|/G))%) $(~$(name):P=U:N=$(name):?$$(INSTALLROOT)/src/$$(name)/($$(MAKEFILES:/:/|/G))??)
+package.pkg = $(package.glob.pkg:P=G:D:N!=$(package.omit):T=F:$(PACKAGEVIEW:C,.*,C;^&/;;,:/ /:/G):U)
+package.closure = $(closure:?$$(package.all)?$$(package.pkg)?)
+
+package.init = $(.package.glob. $("$(init)$(name)":P=U):C%.*%$(INSTALLROOT)/src/*/&/($(MAKEFILES:/:/|/G))%:P=G:T=F:D::B)
+package.ini = ignore mamprobe manmake package silent
+package.src.pat = $(PACKAGESRC)/($(name).(ini|pkg))
+package.src = $(package.src.pat:P=G) $(.package.licenses. --save $(name))
+package.bin = $(PACKAGEBIN)/$(name).ini
+
+package.mam = --never --force --mam=static --corrupt=accept --clobber --compare --link='lib*.a*' CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test
+
+op = current
+stamp = [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
+source = $(PACKAGEDIR)/$(name).$(version)$(release:?.$(release)??).$(suffix)
+binary = $(PACKAGEDIR)/$(name).$(version)$(release:?.$(release)??).$(CC.HOSTTYPE).$(suffix)
+runtime = $(PACKAGEDIR)/$(name)-run.$(version)$(release:?.$(release)??).$(CC.HOSTTYPE).$(suffix)
+old.new.source = $(PACKAGEDIR)/$(name).$(version).$(old.version).$(suffix)
+old.new.binary = $(PACKAGEDIR)/$(name).$(version).$(old.version).$(CC.HOSTTYPE).$(suffix)
+old.new.runtime = $(PACKAGEDIR)/$(name)-run.$(version).$(old.version).$(CC.HOSTTYPE).$(suffix)
+
+source.list = $("$(PACKAGEDIR)/$(name).*$(stamp).$(suffix)":P=G:H=R)
+binary.list = $("$(PACKAGEDIR)/$(name).*$(stamp).$(CC.HOSTTYPE).$(suffix)":P=G:H=R)
+runtime.list = $("$(PACKAGEDIR)/$(name)-run.*$(stamp).$(CC.HOSTTYPE).$(suffix)":P=G:H>)
+
+source.ratz = $("$(INSTALLROOT)/src/cmd/$(init)/ratz.c":T=F)
+binary.ratz = $("$(INSTALLROOT)/src/cmd/$(init)/ratz":T=F)
+
+$(init) : .VIRTUAL $(init)
+
+package.requires = 0
+
+":package:" : .MAKE .OPERATOR
+ local P I R V
+ P := $(<:O=1)
+ $(P) : $(>:V)
+ if ! package.requires
+ if ! name
+ name := $(P)
+ .PACKAGE. := $(P)
+ if name == "$(init)"
+ package.omit = -
+ package.src += $(package.ini:C,^,$(PACKAGEROOT)/bin/,) $(PACKAGESRC)/package.mk
+ else
+ $(P) : $(package.init)
+ end
+ for I $(<:O>1)
+ if I == "*=*"
+ eval
+ $(I)
+ end
+ else
+ version := $(I)
+ end
+ end
+ LICENSEFILEDEFAULT := $(.package.licenses. $(name):@/ /:/G)
+ export LICENSEFILEDEFAULT
+ end
+ if "$(>)"
+ for I $(>:V)
+ $(I) : .VIRTUAL
+ if I == "/*"
+ package.dir += $(I:V)
+ end
+ end
+ end
+ if "$(@)"
+ $(P).README := $(@)
+ else
+ $(P).README := This is the $(P) package.
+ end
+ end
+
+":AUXILIARY:" : .MAKE .OPERATOR
+ package.auxiliary.$(style) += $(>:N=/*:T=F) $(>:N!=/*:C%^%$(INSTALLROOT)/%:T=F)
+
+":CATEGORY:" : .MAKE .OPERATOR
+ if ! package.requires
+ category := $(>)
+ end
+
+.covers. : .FUNCTION
+ local I C D F K=0 L
+ for I $(%)
+ if ! "$(~covers:N=$(I:B))"
+ if F = "$(I:D:B:S=.pkg:T=F)"
+ if D = "$(F:T=I)"
+ covers : $(I:B)
+ for L $(D)
+ if L == ":COVERS:"
+ K = 1
+ elif L == ":*:"
+ if K
+ break
+ end
+ elif K
+ : $(.covers. $(L))
+ end
+ end
+ end
+ else
+ error $(--exec:?3?1?) $(I): unknown package $(I)
+ end
+ end
+ end
+
+":COVERS:" : .MAKE .OPERATOR
+ if ! package.requires
+ : $(.covers. $(>))
+ end
+
+":DESCRIPTION:" : .MAKE .OPERATOR
+ if ! package.requires
+ $(name).README := $(@:V)
+ end
+
+":DETAILS:" : .MAKE .OPERATOR
+ if ! package.requires
+ details.$(>:O=1) := $(@:V)
+ end
+
+":EXPORT:" : .MAKE .OPERATOR
+ if ! package.requires
+ export.$(style) := $(@:/$$("\n")/ /G)
+ end
+
+":INDEX:" : .MAKE .OPERATOR
+ if ! package.requires
+ index := $(>)
+ end
+
+":INSTALL:" : .MAKE .OPERATOR
+ if ! package.requires
+ local T S F X
+ S := $(>)
+ T := $(<)
+ if "$(exe.$(style))" && "$(T)" == "bin/*([!./])"
+ T := $(T).exe
+ end
+ if ! "$(S)"
+ S := $(T)
+ elif "$(exe.$(style))" && "$(S)" == "bin/*([!./])"
+ S := $(S).exe
+ end
+ install.$(style) := $(install.$(style):V)$("\n")install : $$(ROOT)/$(T)$("\n")$$(ROOT)/$(T) : $$(ARCH)/$(S)$("\n\t")cp $< $@
+ if strip && "$(T:N=*.exe)"
+ install.$(style) := $(install.$(style):V)$("\n\t")strip $@ 2>/dev/null
+ end
+ X := $(PACKAGEROOT)/arch/$(CC.HOSTTYPE)/$(S)
+ if strip && "$(X:T=Y)" == "*/?(x-)(dll|exe)"
+ F := filter $(STRIP) $(STRIPFLAGS) $(X)
+ end
+ if "$(filter.$(style):V)"
+ filter.$(style) := $(filter.$(style):V)$$("\n")
+ end
+ filter.$(style) := $(filter.$(style):V);;$(F);$(X);usr/$(T)
+ end
+
+":LICENSE:" : .MAKE .OPERATOR
+ if ! package.requires && ! license
+ license := $(>)
+ end
+
+":OMIT:" : .MAKE .OPERATOR
+ if ! package.requires
+ package.omit := $(package.omit)|$(>:C,^,*/,:/ /|/G)
+ end
+
+":POSTINSTALL:" : .MAKE .OPERATOR
+ if ! package.requires
+ postinstall.$(style) := $(@:V)
+ end
+
+":README:" : .MAKE .OPERATOR
+ if ! package.requires
+ readme.$(style) := $(@:V)
+ end
+
+.requires. : .FUNCTION
+ local I C D F K=0 L V T M=0
+ for I $(%)
+ if ! "$(~requires:N=$(I:B))"
+ if F = "$(I:D:B:S=.pkg:T=F)"
+ if I == "$(init)"
+ package.omit = -
+ else
+ requires : $(I:B)
+ end
+ if V = "$(I:D:B=gen/$(I:B):S=.ver:T=F)"
+ req : $(I:B)
+ else
+ error 1 $(I): package should be written before $(P)
+ end
+ let package.requires = package.requires + 1
+ include "$(F)"
+ let package.requires = package.requires - 1
+ else
+ error 1 $(I): package not found
+ end
+ end
+ end
+
+":REQUIRES:" : .MAKE .OPERATOR
+ : $(.requires. $(>))
+
+":TEST:" : .MAKE .OPERATOR
+ if ! package.requires
+ local T
+ T := $(>)
+ if "$(T)" == "bin/*([!./])"
+ if "$(exe.$(style))"
+ T := $(T).exe
+ end
+ T := $$(PWD)/$$(ARCH)/$(T)
+ end
+ test.$(style) := $(test.$(style):V)$("\n")test : $(T:V)$("\n\t")$(@)
+ end
+
+base delta : .MAKE .VIRTUAL .FORCE
+ op := $(<)
+
+closure : .MAKE .VIRTUAL .FORCE
+ $(<) := 1
+
+cyg exp lcl pkg rpm tgz : .MAKE .VIRTUAL .FORCE
+ style := $(<)
+
+source : .source.init .source.gen .source.$$(style)
+
+.source.init : .MAKE
+ local A B D P V I
+ type := source
+ if ! "$(incremental)"
+ incremental = 1
+ end
+ if "$(source.$(name))"
+ suffix = c
+ end
+ : $(.init.$(style))
+ : $(details.$(style):V:R) :
+ A := $(source.list)
+ B := $(A:N=*.$(stamp).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+ P := $(A:N=*.$(stamp).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+ D := $(A:N=*.$(stamp).$(stamp).$(suffix):O=1:T=F)
+ if op == "delta"
+ if ! B
+ error 3 delta requires a base archive
+ end
+ base := -z $(B)
+ deltaversion := $(B:B:/$(name).//)
+ let deltasince = $(deltaversion:/.*-//) + 1
+ deltasince := $(deltaversion:/[^-]*$/$(deltasince:F=%02d)/)
+ if "$(release)" != "$(stamp)"
+ release := $("":T=R%Y-%m-%d)
+ end
+ source := $(B:D:B:S=.$(release).$(suffix))
+ version := $(source:B:B:/$(name).//)
+ elif B || op == "base"
+ if op == "base"
+ for I $(B) $(P)
+ V := $(I:B:/$(name)\.\([^.]*\).*/\1/)
+ if V == "$(stamp)" && V != "$(version)"
+ old.version := $(V)
+ old.source := $(I)
+ if "$(old.version)" >= "$(version)"
+ error 3 $(name): previous base $(old.version) is newer than $(version)
+ end
+ break
+ end
+ end
+ else
+ source := $(B)
+ end
+ if B == "$(source)"
+ if "$(B:D:B:B)" == "$(D:D:B:B)" && "$(B:B::S)" != "$(D:B::S)"
+ error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+ end
+ error 1 $(B:B:S): replacing current base
+ end
+ version := $(source:B:S:/^$(name).\(.*\).$(suffix)$/\1/)
+ end
+ PACKAGEGEN := $(PACKAGESRC)/gen
+
+.source.gen : $$(PACKAGEDIR) $$(PACKAGEGEN) $$(PACKAGEGEN)/SOURCE.html $$(PACKAGEGEN)/BINARY.html $$(PACKAGEGEN)/DETAILS.html
+
+BINPACKAGE := $(PATH:/:/ /G:X=package:T=F:O=1)
+
+$$(PACKAGEDIR) $$(PACKAGEGEN) : .IGNORE
+ [[ -d $(<) ]] || mkdir $(<)
+
+$$(PACKAGEGEN)/SOURCE.html : $(BINPACKAGE)
+ $(*) html source > $(<)
+
+$$(PACKAGEGEN)/BINARY.html : $(BINPACKAGE)
+ $(*) html binary > $(<)
+
+$$(PACKAGEGEN)/DETAILS.html : $(BINPACKAGE)
+ $(*) html intro > $(<)
+
+.source.exp .source.pkg .source.rpm : .MAKE
+ error 3 $(style): source package style not supported yet
+
+exe.cyg = .exe
+vendor.cyg = gnu
+
+.name.cyg : .FUNCTION
+ local N
+ N := $(%)
+ if N == "*-*"
+ vendor := $(N:/-.*//)
+ if vendor == "$(vendor.cyg)"
+ vendor :=
+ N := $(N:/[^-]*-//)
+ end
+ N := $(N:/-//G)
+ end
+ return $(N)
+
+.init.cyg : .FUNCTION
+ local N O
+ closure = 1
+ init = .
+ strip = 1
+ suffix = tar.bz2
+ format = tbz
+ vendor := $(licenses:N!=$(vendor.cyg):O=1)
+ package.ini := $(package.ini)
+ package.src.pat := $(package.src.pat)
+ package.src := $(package.src)
+ package.bin := $(package.bin)
+ .source.gen : .CLEAR $(*.source.gen:V:N!=*.html)
+ name.original := $(name)
+ name := $(.name.cyg $(name))
+ if name != "$(name.original)"
+ $(name) : $(~$(name.original))
+ O := $(~covers)
+ covers : .CLEAR
+ for N $(O)
+ covers : $(.name.cyg $(N))
+ end
+ end
+ stamp = [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9]
+ version.original := $(version)
+ version := $(version:/-//G)-1
+ if opt
+ opt := $(opt)/$(vendor)/
+ else
+ opt := $(name)-$(version)/
+ end
+ if type == "source"
+ version := $(version)-src
+ source = $(PACKAGEDIR)/$(name)-$(version)$(release:?.$(release)??).$(suffix)
+ else
+ binary = $(PACKAGEDIR)/$(name)-$(version)$(release:?.$(release)??).$(suffix)
+ end
+
+.source.cyg :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ integer m=0 o
+ cat > $tmp/configure <<'!'
+ echo "you didn't have to do that"
+ !
+ chmod +x $tmp/configure
+ echo ";;;$tmp/configure;configure"
+ cat > $tmp/Makefile0 <<'!'
+ HOSTTYPE := $$(shell bin/package)
+ ROOT = ../..
+ ARCH = arch/$$(HOSTTYPE)
+ all :
+ PACKAGEROOT= CYGWIN="$$CYGWIN ntsec binmode" bin/package make $(export.$(style))
+ install : all
+ $(install.$(style):V)
+ $(test.$(style):V)
+ !
+ echo ";;;$tmp/Makefile0;Makefile"
+ cat > $tmp/CYGWIN-README <<'!'
+ $(readme.$(style):@?$$(readme.$$(style))$$("\n\n")??)To build binaries from source into the ./arch/`bin/package` tree run:
+ $()
+ make
+ $()
+ $(test.$(style):@?To test the binaries after building/installing run:$$("\n\n\t")make test$$("\n\n")??)To build and/or install the binaries run:
+ $()
+ make install
+ $()
+ The bin/package command provides a command line interface for all package
+ operations. The $(opt:/.$//) source and binary packages were generated by:
+ $()
+ package write cyg base source version=$(version.original) $(name.original)
+ package write cyg base binary version=$(version.original) $(name.original)
+ $()
+ using the $(org)-base package. To download and install the latest
+ $(org)-base source package in /opt/$(org) run:
+ $()
+ PATH=/opt/$(org)/bin:$PATH
+ cd /opt/$(org)
+ package authorize "NAME" password "PASSWORD" setup flat source $("\\")
+ $(url) $("\\")
+ $(org)-base
+ package make
+ $()
+ and export /opt/$(org)/bin in PATH to use. The NAME and PASSWORD signify your
+ agreement to the software license(s). All users get the same NAME and PASSWORD.
+ See $(url) for details. If multiple architectures may be built under
+ /opt/$(org) then drop "flat" and export /opt/$(org)/arch/`package`/bin in PATH
+ to use. To update previously downloaded packages from the same url simply run:
+ $()
+ cd /opt/$(org)
+ package setup
+ package make
+ $()
+ To download and install the latest $(org)-base binary package in
+ /opt/$(org) change "source" to "binary" and omit "package make".
+ !
+ echo ";;;$tmp/CYGWIN-README;CYGWIN-PATCHES/README"
+ cat > $(source:/-src.$(suffix)//).setup.hint <<'!'
+ category: $(category:/\(.\).*/\1/U)$(category:/.\(.*\)/\1/L)
+ requires: cygwin
+ sdesc: "$(index)"
+ ldesc: "$($(name.original).README)"
+ !
+ echo ";;;$(source:/-src.$(suffix)//).setup.hint;CYGWIN-PATCHES/setup.hint"
+ echo ";;;$(BINPACKAGE);bin/package"
+ cat > $tmp/Makefile <<'!'
+ :MAKE:
+ !
+ echo ";;;$tmp/Makefile;src/Makefile"
+ echo ";;;$tmp/Makefile;src/cmd/Makefile"
+ echo ";;;$tmp/Makefile;src/lib/Makefile"
+ if [[ '$(mamfile)' == 1 ]]
+ then cat > $tmp/Mamfile1 <<'!'
+ info mam static
+ note source level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ echo ";;;$tmp/Mamfile1;src/Mamfile"
+ cat > $tmp/Mamfile2 <<'!'
+ info mam static
+ note component level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ echo ";;;$tmp/Mamfile2;src/cmd/Mamfile"
+ echo ";;;$tmp/Mamfile2;src/lib/Mamfile"
+ fi
+ $(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+ echo ";;;$(PACKAGEGEN)/$(name.original).req"
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+ then if [[ '$(mamfile)' == 1 ]]
+ then (( o=m ))
+ s=$( $(MAKE) --noexec --recurse=list recurse 2>/dev/null )
+ if [[ $s ]]
+ then for j in $s
+ do if [[ -d $j ]]
+ then cd $j
+ if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+ then (( m++ ))
+ $(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
+ fi
+ cd $(INSTALLROOT)/$i
+ fi
+ done
+ if (( o != m ))
+ then (( m++ ))
+ cat > $tmp/$m.mam <<'!'
+ info mam static
+ note subcomponent level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ echo ";;;$tmp/$m.mam;$i/Mamfile"
+ fi
+ else (( m++ ))
+ $(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/Mamfile"
+ fi
+ fi
+ $(MAKE) --noexec $(-) $(=) recurse list.package.$(type) package.license.class=$(license:Q)
+ fi
+ done
+ set -- $(package.dir:P=G)
+ for i
+ do tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+ done
+ } |
+ {
+ : > $tmp/HEAD
+ cat > $tmp/README <<'!'
+ $(package.readme)
+ !
+ echo ";;;$tmp/README;README"
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ --format=$(format) \
+ --local \
+ -wvf $(source) $(base) \
+ $(PACKAGEVIEW:C%.*%-s",^&/,,"%) \
+ $(vendor:?-s",^[^/],$(opt)&,"??)
+ $(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+ rm -rf $tmp
+ fi
+
+.source.lcl :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ integer m=0 o
+ $(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ $(MAKE) --noexec $(-) $(=) .FILES.+=Mamfile recurse list.package.local
+ done
+ set -- $(package.dir:P=G)
+ for i
+ do tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+ done
+ } |
+ sort -t';' -k5,5 -u |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ -wvf $(source) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ $(PACKAGEVIEW:C%.*%-s",^&/,,"%)
+ rm -rf $tmp
+ fi
+
+.source.tgz :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ integer m=0 o
+ if [[ '$(init)' == '$(name)' ]]
+ then cat > $tmp/Makefile <<'!'
+ :MAKE:
+ !
+ $(CMP) $(CMPFLAGS) $tmp/Makefile $(PACKAGEROOT)/src/Makefile && touch -r $(PACKAGEROOT)/src/Makefile $tmp/Makefile
+ echo ";;;$tmp/Makefile;src/Makefile"
+ cp $tmp/Makefile $tmp/Makefile1
+ $(CMP) $(CMPFLAGS) $tmp/Makefile1 $(PACKAGEROOT)/src/cmd/Makefile && touch -r $(PACKAGEROOT)/src/cmd/Makefile $tmp/Makefile1
+ echo ";;;$tmp/Makefile1;src/cmd/Makefile"
+ cp $tmp/Makefile $tmp/Makefile2
+ $(CMP) $(CMPFLAGS) $tmp/Makefile2 $(PACKAGEROOT)/src/lib/Makefile && touch -r $(PACKAGEROOT)/src/lib/Makefile $tmp/Makefile2
+ echo ";;;$tmp/Makefile2;src/lib/Makefile"
+ if [[ '$(mamfile)' == 1 ]]
+ then cat > $tmp/Mamfile1 <<'!'
+ info mam static
+ note source level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ $(CMP) $(CMPFLAGS) $tmp/Mamfile1 $(PACKAGEROOT)/src/Mamfile && touch -r $(PACKAGEROOT)/src/Mamfile $tmp/Mamfile1
+ echo ";;;$tmp/Mamfile1;src/Mamfile"
+ cat > $tmp/Mamfile2 <<'!'
+ info mam static
+ note component level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ $(CMP) $(CMPFLAGS) $tmp/Mamfile2 $(PACKAGEROOT)/src/cmd/Mamfile && touch -r $(PACKAGEROOT)/src/cmd/Mamfile $tmp/Mamfile2
+ echo ";;;$tmp/Mamfile2;src/cmd/Mamfile"
+ cp $tmp/Mamfile2 $tmp/Mamfile3
+ $(CMP) $(CMPFLAGS) $tmp/Mamfile3 $(PACKAGEROOT)/src/lib/Mamfile && touch -r $(PACKAGEROOT)/src/lib/Mamfile $tmp/Mamfile3
+ echo ";;;$tmp/Mamfile3;src/lib/Mamfile"
+ fi
+ fi
+ $(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+ if [[ '$(~covers)' ]]
+ then for i in $(~covers)
+ do for j in lib pkg
+ do if [[ -f $(PACKAGESRC)/$i.$j ]]
+ then echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ for j in ver req
+ do if [[ -f $(PACKAGEGEN)/$i.$j ]]
+ then echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ done
+ for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+ do echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+ done
+ fi
+ if [[ '$(PACKAGEDIR:B)' == '$(style)' ]]
+ then echo $(name) $(version) $(release|version) 1 > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).ver || cp $tmp/t $(PACKAGEGEN)/$(name).ver
+ echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+ sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).req || cp $tmp/t $(PACKAGEGEN)/$(name).req
+ echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).inx || cp $tmp/t $(PACKAGEGEN)/$(name).inx
+ {
+ {
+ echo '$($(name).README)'
+ if [[ '$(~covers)' ]]
+ then echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+ fi
+ if [[ '$(~requires)' ]]
+ then echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+ fi
+ } | fmt
+ package help source
+ package release $(name)
+ } > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).README || cp $tmp/t $(PACKAGEGEN)/$(name).README
+ echo ";;;$(PACKAGEGEN)/$(name).README;$(PACKAGELIB)/$(name).README"
+ {
+ echo '.xx title="$(name) package"'
+ echo '.xx meta.description="$(name) package"'
+ echo '.xx meta.keywords="software, package"'
+ echo '.MT 4'
+ echo '.TL'
+ echo '$(name) package'
+ echo '.H 1 "$(name) package"'
+ echo '$($(name).README)'
+ set -- $(package.closure:C,.*,$(INSTALLROOT)/&/PROMO.mm,:T=F:D::B)
+ hot=
+ for i
+ do hot="$hot -e s/\\(\\<$i\\>\\)/\\\\h'0*1'\\1\\\\h'0'/"
+ done
+ set -- $(package.closure:B)
+ if (( $# ))
+ then echo 'Components in this package:'
+ echo '.P'
+ echo '.TS'
+ echo 'center expand;'
+ echo 'l l l l l l.'
+ if [[ $hot ]]
+ then hot="sed $hot"
+ else hot=cat
+ fi
+ for i
+ do echo $i
+ done |
+ pr -6 -t -s' ' |
+ $hot
+ echo '.TE'
+ fi
+ echo '.P'
+ if [[ '$(~covers)' ]]
+ then echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+ fi
+ if [[ '$(~requires)' ]]
+ then echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+ fi
+ set -- $(.package.licenses. --all $(name))
+ case $# in
+ 0) ;;
+ *) case $# in
+ 1) echo 'The software is covered by this license:' ;;
+ *) echo 'The software is covered by these licenses:' ;;
+ esac
+ echo .BL
+ for j
+ do i=$( $(PROTO) -l $j -p -h -o type=usage /dev/null | sed -e 's,.*\[-license?\([^]]*\).*,\1,' )
+ echo .LI
+ echo ".xx link=\"$i\""
+ done
+ echo .LE
+ echo 'Individual components may be covered by separate licenses;'
+ echo 'refer to the component source and/or binaries for more information.'
+ echo .P
+ ;;
+ esac
+ echo 'A recent'
+ echo '.xx link="release change log"'
+ echo 'is also included.'
+ cat $(package.closure:C,.*,$(INSTALLROOT)/&/PROMO.mm,:T=F) < /dev/null
+ echo '.H 1 "release change log"'
+ echo '.xx index'
+ echo '.nf'
+ package release $(name) |
+ sed -e 's/:::::::: \(.*\) ::::::::/.fi\$("\n").H 1 "\1 changes"\$("\n").nf/'
+ echo '.fi'
+ } |
+ $(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $tmp/t
+ $(STDED) $(STDEDFLAGS) $tmp/t <<'!'
+ /^<!--LABELS-->$/,/^<!--\/LABELS-->$/s/ changes</</
+ /^<!--LABELS-->$/,/^<!--\/LABELS-->$/m/<A name="release change log">/
+ w
+ q
+ !
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).html || cp $tmp/t $(PACKAGEGEN)/$(name).html
+ echo ";;;$(PACKAGEGEN)/$(name).html;$(PACKAGELIB)/$(name).html"
+ if [[ '$(deltasince)' ]]
+ then {
+ echo '.xx title="$(name) package"'
+ echo '.xx meta.description="$(name) package $(version) delta $(release)"'
+ echo '.xx meta.keywords="software, package, delta"'
+ echo '.MT 4'
+ echo '.TL'
+ echo '$(name) package $(deltaversion) delta $(release)'
+ echo '.H 1 "$(name) package $(deltaversion) delta $(release) changes"'
+ echo '.nf'
+ package release $(deltasince) $(name) |
+ sed -e 's/:::::::: \(.*\) ::::::::/.H 2 \1/'
+ echo '.fi'
+ } |
+ $(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $tmp/t
+ $(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).$(release).html || cp $tmp/t $(PACKAGEGEN)/$(name).$(release).html
+ echo ";;;$(PACKAGEGEN)/$(name).$(release).html;$(PACKAGELIB)/$(name).$(release).html"
+ fi
+ fi
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+ then if [[ '$(mamfile)' == 1 ]]
+ then (( o=m ))
+ s=$( $(MAKE) --noexec --recurse=list recurse 2>/dev/null )
+ if [[ $s ]]
+ then for j in $s
+ do if [[ -d $j ]]
+ then cd $j
+ if [[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+ then (( m++ ))
+ $(MAKE) $(package.mam) > $tmp/$m.mam
+ $(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/$j/Mamfile && touch -r $(PACKAGEROOT)/$i/$j/Mamfile $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
+ fi
+ cd $(INSTALLROOT)/$i
+ fi
+ done
+ if (( o != m ))
+ then (( m++ ))
+ cat > $tmp/$m.mam <<'!'
+ info mam static
+ note subcomponent level :MAKE: equivalent
+ make install
+ make all
+ exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+ done all virtual
+ done install virtual
+ !
+ $(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/Mamfile && touch -r $(PACKAGEROOT)/$i/Mamfile $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/Mamfile"
+ fi
+ else (( m++ ))
+ $(MAKE) $(package.mam) > $tmp/$m.mam
+ $(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/Mamfile && touch -r $(PACKAGEROOT)/$i/Mamfile $tmp/$m.mam
+ echo ";;;$tmp/$m.mam;$i/Mamfile"
+ fi
+ fi
+ $(MAKE) --noexec $(-) $(=) recurse list.package.$(type) package.license.class=$(license:Q) $(copyright:N=1:??LICENSE=?)
+ fi
+ done
+ set -- $(package.dir:P=G)
+ for i
+ do tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+ done
+ } |
+ {
+ : > $tmp/HEAD
+ [[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+ cat > $tmp/README <<'!'
+ $(package.readme)
+ !
+ echo ";;;$tmp/README;README"
+ $(CMP) $(CMPFLAGS) $tmp/README $(PACKAGEROOT)/README && touch -r $(PACKAGEROOT)/README $tmp/README
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ -wvf $(source) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ $(PACKAGEVIEW:C%.*%-s",^&/,,"%)
+ $(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+ echo local > $(source:D:B=$(name):S=.tim)
+ if [[ '$(incremental)' == 1 && '$(old.source)' ]]
+ then $(PAX) -rf $(source) -wvf $(old.new.source) -z $(old.source)
+ $(SUM) -x $(checksum) < $(old.new.source) > $(old.new.source:D:B:S=.$(checksum))
+ fi
+ rm -rf $tmp
+ else if [[ '$(old.source)' ]] && $(CMP) $(CMPFLAGS) $(source.$(name)) $(source)
+ then : $(name) is up to date
+ else echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+ : > $(PACKAGEGEN)/$(name).req
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $(PACKAGEGEN)/$(name).inx
+ {
+ echo '.xx title="$(name) package"'
+ echo '.xx meta.description="$(name) package"'
+ echo '.xx meta.keywords="software, package"'
+ echo '.MT 4'
+ echo '.TL'
+ echo '$(name) package'
+ echo '.H 1'
+ echo '$($(name).README)'
+ } |
+ $(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $(PACKAGEGEN)/$(name).html
+ if [[ '$(source.$(name))' ]]
+ then {
+ echo '$($(name).README)'
+ package help source
+ } > $(PACKAGEGEN)/$(name).README
+ cp $(source.$(name)) $(source)
+ $(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+ fi
+ echo local > $(source:D:B=$(name):S=.tim)
+ fi
+ fi
+
+binary : .binary.init .binary.gen .binary.$$(style)
+
+.binary.init : .MAKE
+ local A B D I P V
+ type := binary
+ if ! "$(incremental)"
+ incremental = 0
+ end
+ if ! "$(~$(name))"
+ if name == "ratz"
+ suffix = exe
+ else
+ suffix = gz
+ end
+ end
+ : $(.init.$(style)) :
+ : $(details.$(style):V:R) :
+ A := $(binary.list)
+ B := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+ P := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+ D := $(A:N=*.$(stamp).$(stamp).$(CC.HOSTTYPE).$(suffix):O=1:T=F)
+ if op == "delta"
+ if ! B
+ error 3 delta requires a base archive
+ end
+ base := -z $(B)
+ if "$(release)" != "$(stamp)"
+ release := $("":T=R%Y-%m-%d)
+ end
+ binary := $(B:/$(CC.HOSTTYPE).$(suffix)$/$(release).&/)
+ version := $(binary:B:B:/$(name).//)
+ elif B || op == "base"
+ if op == "base"
+ for I $(B) $(P)
+ V := $(I:B:/$(name)\.\([^.]*\).*/\1/)
+ if V == "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" && V != "$(version)"
+ old.version := $(V)
+ old.binary := $(I)
+ if "$(old.version)" >= "$(version)"
+ error 3 $(name): previous base $(old.version) is newer than $(version)
+ end
+ break
+ end
+ end
+ else
+ binary := $(B)
+ end
+ if B == "$(binary)"
+ if "$(B:D:B)" == "$(D:D:B)" && "$(B:S)" != "$(D:S)"
+ error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+ end
+ error 1 $(B:B:S): replacing current base
+ end
+ version := $(binary:B:/$(name).//:/\..*//)
+ end
+ PACKAGEGEN := $(PACKAGEBIN)/gen
+
+.binary.gen : $$(PACKAGEDIR) $$(PACKAGEGEN)
+
+.binary.exp .binary.pkg .binary.rpm : .MAKE
+ error 3 $(style): binary package style not supported yet
+
+.binary.cyg :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ integer m=0 o
+ {
+ echo '$($(name.original).README)' | fmt
+ cat <<'!'
+ $(readme.$(style):@?$$("\n")$$(readme.$$(style))??)
+ !
+ } > $tmp/README1
+ echo ";;;$tmp/README1;usr/share/doc/Cygwin/$(opt:/.$//).README"
+ {
+ echo '$($(name.original).README)' | fmt
+ cat <<'!'
+ $()
+ The remainder of this file is the README from the source package
+ that was used to generate this binary package. It describes
+ the source build hierarchy, not the current directory.
+ $()
+ $(package.readme)
+ !
+ } > $tmp/README2
+ echo ";;;$tmp/README2;usr/share/doc/$(opt)README"
+ package release $(name.original) > $tmp/RELEASE
+ echo ";;;$tmp/RELEASE;usr/share/doc/$(opt)RELEASE"
+ cat > $(binary:/.$(suffix)//).setup.hint <<'!'
+ category: $(category:/\(.\).*/\1/U)$(category:/.\(.*\)/\1/L)
+ requires: cygwin
+ sdesc: "$(index)"
+ ldesc: "$($(name.original).README)"
+ !
+ set -- $(.package.licenses. --text $(name.original):N!=*.lic)
+ for i
+ do echo ";;;${i};usr/share/doc/$(opt)LICENSE-${i##*/}"
+ done
+ cat <<'!'
+ $(filter.$(style))
+ !
+ if [[ '$(postinstall.$(style):V:O=1:?1??)' ]]
+ then cat >$tmp/postinstall <<'!'
+ $("#")!/bin/sh
+ $(postinstall.$(style))
+ !
+ echo ";;;$tmp/postinstall;etc/postinstall/$(name).sh"
+ fi
+ } |
+ {
+ : > $tmp/HEAD
+ [[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ --format=$(format) \
+ --local \
+ -wvf $(binary)
+ $(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+ rm -rf $tmp
+ fi
+
+.binary.lcl :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ $(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+ $(package.bin:U:T=F:/.*/echo ";;;&"$("\n")/)
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ $(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+ done
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ --checksum=md5:$(PACKAGEGEN)/$(name).sum \
+ --install=$(PACKAGEGEN)/$(name).ins \
+ -wvf $(binary) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ -s",^$tmp/,$(INSTALLOFFSET)/," \
+ $(PACKAGEROOT:C%.*%-s",^&/,,"%)
+ $(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+ echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+ rm -rf $tmp
+ fi
+
+.binary.tgz :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ if [[ '$(init)' == '$(name)' ]]
+ then for i in lib32 lib64
+ do if [[ -d $(INSTALLROOT)/$i ]]
+ then echo ";physical;;$(INSTALLROOT)/$i"
+ fi
+ done
+ fi
+ $(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+ $(package.bin:U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+ $(package.auxiliary.$(style):U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+ if [[ '$(PACKAGEDIR:B)' == '$(style)' ]]
+ then echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+ echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+ if [[ '$(~covers)' ]]
+ then for i in $(~covers)
+ do for j in lic pkg
+ do if [[ -f $(PACKAGESRC)/$i.$j ]]
+ then echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ for j in ver req
+ do if [[ -f $(PACKAGEGEN)/$i.$j ]]
+ then echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ done
+ for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+ do echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+ done
+ fi
+ sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $(PACKAGEGEN)/$(name).req
+ echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $(PACKAGEGEN)/$(name).inx
+ {
+ {
+ echo '$($(name).README)'
+ if [[ '$(~covers)' ]]
+ then echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+ fi
+ if [[ '$(~requires)' ]]
+ then echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+ fi
+ } | fmt
+ package help binary
+ package release $(name)
+ } > $(PACKAGEGEN)/$(name).README
+ echo ";;;$(PACKAGEGEN)/$(name).README;$(PACKAGELIB)/$(name).README"
+ fi
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ $(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) package.strip=$(strip) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+ done
+ } |
+ {
+ : > $tmp/HEAD
+ [[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+ cat > $tmp/README <<'!'
+ $(package.readme)
+ !
+ echo ";;;$tmp/README;README"
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ --checksum=md5:$(PACKAGEGEN)/$(name).sum \
+ --install=$(PACKAGEGEN)/$(name).ins \
+ -wvf $(binary) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ -s",^$tmp/,$(INSTALLOFFSET)/," \
+ $(PACKAGEROOT:C%.*%-s",^&/,,"%)
+ echo $(binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ $(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+ echo $(binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+ if [[ '$(incremental)' == 1 && '$(old.binary)' ]]
+ then $(PAX) -rf $(binary) -wvf $(old.new.binary) -z $(old.binary)
+ echo $(old.new.binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ $(SUM) -x $(checksum) < $(old.new.binary) > $(old.new.binary:D:B:S=.$(checksum))
+ echo $(old.new.binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ fi
+ rm -rf $tmp
+ else if [[ '$(binary.$(name))' ]]
+ then exe=$(binary.$(name))
+ else exe=$(INSTALLROOT)/bin/$(name)
+ fi
+ if [[ '$(old.binary)' ]] && $(CMP) $(CMPFLAGS) $exe $(binary)
+ then : $(name) is up to date
+ else echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+ : > $(PACKAGEGEN)/$(name).req
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $(PACKAGEGEN)/$(name).inx
+ {
+ echo '$($(name).README)'
+ package help binary
+ } > $(PACKAGEGEN)/$(name).README
+ case "$(binary)" in
+ *.gz) gzip < $exe > $(binary) ;;
+ *) cp $exe $(binary) ;;
+ esac
+ $(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+ echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+ fi
+ echo $(binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ echo $(binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ fi
+
+runtime : .runtime.init .runtime.gen .runtime.$$(style)
+
+.runtime.init : .MAKE
+ local A B D I P V
+ type := runtime
+ if ! "$(incremental)"
+ incremental = 0
+ end
+ if ! "$(~$(name))"
+ if name == "ratz"
+ suffix = exe
+ else
+ suffix = gz
+ end
+ end
+ : $(.init.$(style)) :
+ : $(details.$(style):V:R) :
+ A := $(runtime.list)
+ B := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+ P := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+ D := $(A:N=*.$(stamp).$(stamp).$(CC.HOSTTYPE).$(suffix):O=1:T=F)
+ if op == "delta"
+ if ! B
+ error 3 delta requires a base archive
+ end
+ base := -z $(B)
+ if "$(release)" != "$(stamp)"
+ release := $("":T=R%Y-%m-%d)
+ end
+ runtime := $(B:/$(CC.HOSTTYPE).$(suffix)$/$(release).&/)
+ version := $(runtime:B:B:/$(name).//)
+ elif B || op == "base"
+ if op == "base"
+ for I $(B) $(P)
+ V := $(I:B:/$(name)-run\.\([^.]*\).*/\1/)
+ if V == "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" && V != "$(version)"
+ old.version := $(V)
+ old.runtime := $(I)
+ if "$(old.version)" >= "$(version)"
+ error 3 $(name): previous base $(old.version) is newer than $(version)
+ end
+ break
+ end
+ end
+ else
+ runtime := $(B)
+ end
+ if B == "$(runtime)"
+ if "$(B:D:B)" == "$(D:D:B)" && "$(B:S)" != "$(D:S)"
+ error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+ end
+ error 1 $(B:B:S): replacing current base
+ end
+ version := $(runtime:B:/$(name)-run.//:/\..*//)
+ end
+ PACKAGEGEN := $(PACKAGESRC)/gen
+
+.runtime.gen : $$(PACKAGEDIR) $$(PACKAGEGEN)
+
+.runtime.cyg .runtime.exp .runtime.lcl .runtime.pkg .runtime.rpm : .MAKE
+ error 3 $(style): runtime package style not supported yet
+
+.runtime.tgz :
+ if [[ '$(~$(name))' ]]
+ then tmp=/tmp/pkg$(tmp)
+ mkdir $tmp
+ {
+ if [[ '$(init)' == '$(name)' ]]
+ then for i in lib32 lib64
+ do if [[ -d $(INSTALLROOT)/$i ]]
+ then echo ";physical;;$(INSTALLROOT)/$i"
+ fi
+ done
+ fi
+ $(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+ $(package.bin:U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+ $(package.auxiliary.$(style):U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+ echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+ echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+ if [[ '$(~covers)' ]]
+ then for i in $(~covers)
+ do for j in lic pkg
+ do if [[ -f $(PACKAGESRC)/$i.$j ]]
+ then echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ for j in ver req
+ do if [[ -f $(PACKAGEGEN)/$i.$j ]]
+ then echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+ fi
+ done
+ done
+ for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+ do echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+ done
+ fi
+ sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $(PACKAGEGEN)/$(name).req
+ echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+ {
+ echo "name='$(name)'"
+ echo "index='$(index)'"
+ echo "covers='$(~covers)'"
+ echo "requires='$(~req)'"
+ } > $(PACKAGEGEN)/$(name).inx
+ {
+ {
+ echo '$($(name).README)'
+ if [[ '$(~covers)' ]]
+ then echo
+ echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+ fi
+ if [[ '$(~requires)' ]]
+ then echo
+ echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+ fi
+ echo
+ echo "To install this $(type) package read the tarball into a directory"
+ echo "suitable for containing bin and lib subdirectories, and run the"
+ echo "$(PACKAGELIB)/gen/$(name)-run.ins script to fix up permissions."
+ echo
+ echo "To use the package export the bin directory in PATH. The commands and"
+ echo "libraries use \$PATH to locate dynamic libraries and related data files."
+ echo
+ } | fmt
+ } > $(PACKAGEGEN)/$(name)-run.README
+ echo ";;;$(PACKAGEGEN)/$(name)-run.README;$(PACKAGELIB)/$(name)-run.README"
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ $(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) package.strip=$(strip) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+ done
+ } |
+ {
+ : > $tmp/HEAD
+ [[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+ cat > $tmp/README <<'!'
+ $(package.readme)
+ !
+ echo ";;;$tmp/README;README"
+ sort -t';' -k5,5 -u
+ : > $tmp/TAIL
+ [[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+ } |
+ $(PAX) --filter=- \
+ --to=ascii \
+ $(op:N=delta:??--format=$(format)?) \
+ --local \
+ --checksum=md5:$(PACKAGEGEN)/$(name)-run.sum \
+ --install=$(PACKAGEGEN)/$(name)-run.ins \
+ -wvf $(runtime) $(base) \
+ $(op:N=delta:?--format=gzip??) \
+ -s",^$tmp/,$(INSTALLOFFSET)/," \
+ $(PACKAGEROOT:C%.*%-s",^&/,,"%)
+ echo $(runtime) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ $(SUM) -x $(checksum) < $(runtime) > $(runtime:D:B:S=.$(checksum))
+ echo $(runtime:D:B:S=.$(checksum)) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ echo local > $(runtime:D:B=$(name)-run:S=.$(CC.HOSTTYPE).tim)
+ if [[ '$(incremental)' == 1 && '$(old.runtime)' ]]
+ then $(PAX) -rf $(runtime) -wvf $(old.new.runtime) -z $(old.runtime)
+ echo $(old.new.runtime) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ $(SUM) -x $(checksum) < $(old.new.runtime) > $(old.new.runtime:D:B:S=.$(checksum))
+ echo $(old.new.runtime:D:B:S=.$(checksum)) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+ fi
+ rm -rf $tmp
+ fi
+
+list.installed list.manifest :
+ set -- $(package.closure)
+ for i
+ do cd $(INSTALLROOT)/$i
+ ignore $(MAKE) --noexec $(-) $(=) $(<)
+ done
diff --git a/usr/src/contrib/ast/src/cmd/INIT/package.sh b/usr/src/contrib/ast/src/cmd/INIT/package.sh
new file mode 100644
index 0000000000..b2bb63f993
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/package.sh
@@ -0,0 +1,7347 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+### this script contains archaic constructs that work with all sh variants ###
+# package - source and binary package control
+# Glenn Fowler <gsf@research.att.com>
+
+command=package
+
+case $-:$BASH_VERSION in
+*x*:[0123456789]*) : bash set -x is broken :; set +ex ;;
+esac
+
+# ksh checks -- ksh between 2007-11-05 and 2011-11-11 conflict with new -lcmd -- wea culpa
+checksh()
+{
+ egrep 'Version.*(88|1993)' $1 >/dev/null 2>&1 ||
+ $1 -c '(( .sh.version >= 20111111 ))' >/dev/null 2>&1
+}
+
+case $_AST_BIN_PACKAGE_:$SHELL:$0 in
+1:*:*|*:/bin/sh:*)
+ ;;
+*:*/*:*/*)
+ _AST_BIN_PACKAGE_=1 # prevent non-interactive sh .rc referencing bin/package recursion #
+ export _AST_BIN_PACKAGE_
+ if checksh $SHELL
+ then : no -lcmd conflict :
+ else case " $* " in
+ *" debug "*|*" DEBUG "*|*" show "*)
+ echo $command: $SHELL: warning: possible -lcmd conflict -- falling back to /bin/sh >&2
+ ;;
+ esac
+ SHELL=/bin/sh
+ export SHELL
+ exec $SHELL "$0" "$@"
+ fi
+ ;;
+esac
+
+LC_ALL=C
+export LC_ALL
+
+src="cmd contrib etc lib"
+use="/usr/common /exp /usr/local /usr/add-on /usr/addon /usr/tools /usr /opt"
+usr="/home"
+lib="" # nee /usr/local/lib /usr/local/shlib
+ccs="/usr/kvm /usr/ccs/bin"
+org="gnu GNU"
+makefiles="Mamfile Nmakefile nmakefile Makefile makefile"
+env="HOSTTYPE NPROC PACKAGEROOT INSTALLROOT PATH"
+checksum=md5sum
+checksum_commands="$checksum md5"
+checksum_empty="d41d8cd98f00b204e9800998ecf8427e"
+
+package_use='=$HOSTTYPE=$PACKAGEROOT=$INSTALLROOT=$EXECROOT=$CC='
+
+PACKAGE_admin_tail_timeout=${PACKAGE_admin_tail_timeout:-"1m"}
+
+CROSS=0
+
+admin_db=admin.db
+admin_env=admin.env
+admin_ditto="ditto --checksum --delete --verbose"
+admin_ditto_update=--update
+admin_ditto_skip="OFFICIAL|core|old|*.core|*.tmp|.nfs*"
+admin_list='PACKAGE.$type.lst'
+admin_ping="ping -c 1 -w 5"
+
+default_url=default.url
+MAKESKIP=${MAKESKIP:-"*[-.]*"}
+RATZ=ratz
+SED=
+TAR=tar
+TARFLAGS=xv
+TARPROBE=B
+TR=
+
+all_types='*.*|sun4' # all but sun4 match *.*
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) USAGE=$'
+[-?
+@(#)$Id: package (AT&T Research) 2012-06-28 $
+]'$USAGE_LICENSE$'
+[+NAME?package - source and binary package control]
+[+DESCRIPTION?The \bpackage\b command controls source and binary
+ packages. It is a \bsh\b(1) script coded for maximal portability. All
+ package files are in the \b$PACKAGEROOT\b directory tree.
+ \b$PACKAGEROOT\b must at minumum contain a \bbin/package\b command or a
+ \blib/package\b directory. Binary package files are in the
+ \b$INSTALLROOT\b (\b$PACKAGEROOT/arch/\b\ahosttype\a) tree, where
+ \ahosttpe\a=`\bpackage\b`. All \aactions\a but \bhost\b and \buse\b
+ require the current directory to be under \b$PACKAGEROOT\b. See
+ \bDETAILS\b for more information.]
+[+?Note that no environment variables need be set by the user;
+ \bpackage\b determines the environment based on the current working
+ directory. The \buse\b action starts a \bsh\b(1) with the environment
+ initialized. \bCC\b, \bCCFLAGS\b, \bHOSTTYPE\b and \bSHELL\b may be set
+ by explicit command argument assignments to override the defaults.]
+[+?Packages are composed of components. Each component is built and
+ installed by an \bast\b \bnmake\b(1) makefile. Each package is also
+ described by an \bnmake\b makefile that lists its components and
+ provides a content description. The package makefile and component
+ makefiles provide all the information required to read, write, build
+ and install packages.]
+[+?Package recipients only need \bsh\b(1) and \bcc\b(1) to build and
+ install source packages, and \bsh\b to install binary packages.
+ \bnmake\b and \bksh93\b are required to write new packages. An
+ \b$INSTALLROOT/bin/cc\b script may be supplied for some architectures.
+ This script supplies a reasonable set of default options for compilers
+ that accept multiple dialects or generate multiple object/executable
+ formats.]
+[+?The command arguments are composed of a sequence of words: zero or
+ more \aqualifiers\a, one \aaction\a, and zero or more action-specific
+ \aarguments\a, and zero or more \aname=value\a definitions. \apackage\a
+ names a particular package. The naming scheme is a \b-\b separated
+ hierarchy; the leftmost parts describe ownership, e.g.,
+ \bgnu-fileutils\b, \bast-base\b. If no packages are specified then all
+ packages are operated on. \boptget\b(3) documentation options are also
+ supported. The default with no arguments is \bhost type\b.]
+[+?The qualifiers are:]
+ {
+ [+authorize \aname\a?Remote authorization user name or license
+ acceptance phrase.]
+ [+debug|environment?Show environment and actions but do not
+ execute.]
+ [+flat?Collapse \b$INSTALLROOT\b { bin fun include lib } onto
+ \b$PACKAGEROOT\b.]
+ [+force?Force the action to override saved state.]
+ [+never?Run make -N and show other actions.]
+ [+only?Only operate on the specified packages.]
+ [+password \apassword\a?Remote authorization or license
+ acceptance password.]
+ [+quiet?Do not list captured action output.]
+ [+show?Run make -n and show other actions.]
+ [+verbose?Provide detailed action output.]
+ [+DEBUG?Trace the package script actions in detail.]
+ }
+[+?The actions are:]
+ {
+ [+admin\b [\ball\b]] [\bdb\b \afile\a]] [\bon\b \apattern\a]][\aaction\a ...]]?Apply
+ \aaction\a ... to the hosts listed in \afile\a. If \afile\a is
+ omitted then \badmin.db\b is assumed. The caller must have
+ \brcp\b(1) and \brsh\b(1) or \bscp\b(1) and \bssh\b(1) access
+ to the hosts. Output for \aaction\a is saved per-host in the
+ file \aaction\a\b.log/\b\ahost\a. Logs can be viewed by
+ \bpackage admin\b [\bon\b \ahost\a]] \bresults\b [\aaction\a]].
+ By default only local PACKAGEROOT hosts are selected from
+ \afile\a; \ball\b selects all hosts. \bon\b \apattern\a selects
+ only hosts matching the \b|\b separated \apattern\a. \afile\a
+ contains four types of lines. Blank lines and lines beginning
+ with \b#\b are ignored. Lines starting with \aid\a=\avalue\a
+ are variable assignments. Set admin_ping to local conventions
+ if \"'$admin_ping$'\" fails. If a package list is not specified
+ on the command line the \aaction\a applies to all packages; a
+ variable assigment \bpackage\b=\"\alist\a\" applies \aaction\a
+ to the packages in \alist\a for subsequent hosts in \afile\a.
+ The remaining line type is a host description consisting of 6
+ tab separated fields. The first 3 are mandatory; the remaining
+ 3 are updated by the \badmin\b action. \afile\a is saved in
+ \afile\a\b.old\b before update. The fields are:]
+ {
+ [+hosttype?The host type as reported by
+ \"\bpackage\b\".]
+ [+[user@]]host?The host name and optionally user name
+ for \brcp\b(1) and \brsh\b(1) access.]
+ [+[remote::[[master]]::]]]]PACKAGEROOT?The absolute remote package
+ root directory and optionally the remote protocol (rsh
+ or ssh) if the directory is on a different server than
+ the master package root directory. If
+ \blib/package/admin/'$admin_env$'\b exists under this
+ directory then it is sourced by \bsh\b(1) before
+ \aaction\a is done. If this field begins with \b-\b
+ then the host is ignored. If this field contains \b:\b
+ then \bditto\b(1) is used to sync the remote \bsrc\b
+ directory hierarchy to the local one. If [\amaster\a]]:
+ is specified then the sync is deferred to the \amaster\a
+ host. If \amaster\a is omitted (two :) then the sync is
+ disabled. These directories must exist on the remote side:
+ \blib/package\b, \bsrc/cmd\b, \bsrc/lib\b.]
+ [+date?\aYYMMDD\a of the last action.]
+ [+time?Elapsed wall time for the last action.]
+ [+M T W?The \badmin\b action \bmake\b, \btest\b and
+ \bwrite\b action error counts. A non-numeric value in
+ any of these fields disables the corresponding action.]
+ [+owner?The owner contact information.]
+ [+attributes?\aname=value\a attributes. Should at least contain
+ \bcc\b=\acompiler-version\a.]
+ }
+ [+clean | clobber?Delete the \barch/\b\aHOSTTYPE\a hierarchy; this
+ deletes all generated files and directories for \aHOSTTYPE\a.
+ The heirarchy can be rebuilt by \bpackage make\b.]
+ [+contents\b [ \apackage\a ... ]]?List description and
+ components for \apackage\a on the standard output.]
+ [+copyright\b [ \apackage\a ... ]]?List the general copyright
+ notice(s) for \apackage\a on the standard output. Note that
+ individual components in \apackage\a may contain additional or
+ replacement notices.]
+ [+export\b [ \avariable\a ...]]?List \aname\a=\avalue\a for
+ \avariable\a, one per line. If the \bonly\b attribute is
+ specified then only the variable values are listed. If no
+ variables are specified then \b'$env$'\b are assumed.]
+ [+help\b [ \aaction\a ]]?Display help text on the standard
+ error (standard output for \aaction\a).]
+ [+host\b [ \aattribute\a ... ]]?List
+ architecture/implementation dependent host information on the
+ standard output. \btype\b is listed if no attributes are
+ specified. Information is listed on a single line in
+ \aattribute\a order. The attributes are:]
+ {
+ [+canon \aname\a?An external host type name to be
+ converted to \bpackage\b syntax.]
+ [+cpu?The number of cpus; 1 if the host is not a
+ multiprocessor.]
+ [+name?The host name.]
+ [+rating?The cpu rating in pseudo mips; the value is
+ useful useful only in comparisons with rating values of
+ other hosts. Other than a vax rating (mercifully) fixed
+ at 1, ratings can vary wildly but consistently from
+ vendor mips ratings. \bcc\b(1) may be required to
+ determine the rating.]
+ [+type?The host type, usually in the form
+ \avendor\a.\aarchitecture\a, with an optional trailing
+ -\aversion\a. The main theme is that type names within
+ a family of architectures are named in a similar,
+ predictable style. OS point release information is
+ avoided as much as possible, but vendor resistance to
+ release incompatibilities has for the most part been
+ futile.]
+ }
+ [+html\b [ \aaction\a ]]?Display html help text on the standard
+ error (standard output for \aaction\a).]
+ [+install\b [ \aarchitecture\a ... ]] \adirectory\a [ \apackage\a ... ]]?Copy
+ the package binary hierarchy to \adirectory\a. If
+ \aarchitecture\a is omitted then all architectures are
+ installed. If \bflat\b is specified then exactly one
+ \aarchitecture\a must be specified; this architecture will be
+ installed in \adirectory\a without the \barch/\b\aHOSTTYPE\a
+ directory prefixes. Otherwise each architecture will be
+ installed in a separate \barch/\b\aHOSTTYPE\a subdirectory of
+ \adirectory\a. The \aarchitecture\a \b-\b names the current
+ architecture. \adirectory\a must be an existing directory. If
+ \apackage\a is omitted then all binary packages are installed.
+ This action requires \bnmake\b.]
+ [+license\b [ \apackage\a ... ]]?List the source license(s) for
+ \apackage\a on the standard output. Note that individual
+ components in \apackage\a may contain additional or replacement
+ licenses.]
+ [+list\b [ \apackage\a ... ]]?List the name, version and
+ prerequisites for \apackage\a on the standard output.]
+ [+make\b [ \apackage\a ]] [ \aoption\a ... ]] [ \atarget\a ... ]]?Build
+ and install. The default \atarget\a is \binstall\b, which makes
+ and installs \apackage\a. If the standard output is a terminal
+ then the output is also captured in
+ \b$INSTALLROOT/lib/package/gen/make.out\b. The build is done in
+ the \b$INSTALLROOT\b directory tree viewpathed on top of the
+ \b$PACKAGEROOT\b directory tree. If \bflat\b is specified then
+ the \b$INSTALLROOT\b { bin fun include lib } directories are
+ linked to the same directories in the package root. Only one
+ architecture may be \bflat\b. Leaf directory names matching the
+ \b|\b-separated shell pattern \b$MAKESKIP\b are ignored. The
+ \bview\b action is done before making. \aoption\a operands are
+ passed to the underlying make command.]
+ [+read\b [ \apackage\a ... | \aarchive\a ... ]]?Read the named
+ package or archive(s). Must be run from the package root
+ directory. Archives are searched for in \b.\b and
+ \blib/package/tgz\b. Each package archive is read only once.
+ The file \blib/package/tgz/\b\apackage\a[.\atype\a]]\b.tim\b
+ tracks the read time. See the \bwrite\b action for archive
+ naming conventions. Text file archive member are assumed to be
+ ASCII or UTF-8 encoded.]
+ [+regress?\bdiff\b(1) the current and previous \bpackage test\b
+ results.]
+ [+release\b [ [\aCC\a]]\aYY-MM-DD\a [ [\acc\a]]\ayy-mm-dd\a ]]]] [ \apackage\a ]]?Display
+ recent changes for the date range [\aCC\a]]\aYY-MM-DD\a (up to
+ [\acc\a]]\ayy-mm-dd\a.), where \b-\b means lowest (or highest.)
+ If no dates are specified then changes for the last 4 months
+ are listed. \apackage\a may be a package or component name.]
+ [+remove\b [ \apackage\a ]]?Remove files installed for
+ \apackage\a.]
+ [+results\b [ \bfailed\b ]] [ \bpath\b ]] [ \bold\b ]] [\bmake\b | \btest\b | \bwrite\b ]]?List
+ results and interesting messages captured by the most recent
+ \bmake\b (default), \btest\b or \bwrite\b action. \bold\b
+ specifies the previous results, if any (current and previous
+ results are retained.) \b$HOME/.pkgresults\b, if it exists,
+ must contain an \begrep\b(1) expression of result lines to be
+ ignored. \bfailed\b lists failures only and \bpath\b lists the
+ results file path name only.]
+ [+setup\b [ beta ]] [ binary ]] [ source ]] [ \aarchitecture\a ... ]] [ \aurl\a ]] [ \apackage\a ... ]]?This
+ action initializes the current directory as a package root, runs the
+ \bupdate\b action to download new or out of date packages, and runs the
+ \bread\b action on those packages. If \bflat\b is specified then the
+ \b$INSTALLROOT\b { bin fun include lib } directories are linked to the
+ same directories in the package root. Only one architecture may be
+ \bflat\b. See the \bupdate\b and \bread\b action descriptions for
+ argument details.]
+ [+test\b [ \apackage\a ]]?Run the regression tests for
+ \apackage\a. If the standard output is a terminal then the
+ output is also captured in
+ \b$INSTALLROOT/lib/package/gen/test.out\b. In general a package
+ must be made before it can be tested. Components tested with
+ the \bregress\b(1) command require \bksh93\b. If \bonly\b is
+ also specified then only the listed package components are
+ tested, otherwise the closure of the components is tested.]
+ [+update\b [ beta ]] [ binary ]] [ source ]] [\aarchitecture\a ... ]] [ \aurl\a ]] [ \apackage\a ... ]]?Download
+ the latest release of the selected and required packages from \aurl\a
+ (e.g., \bhttp://www.research.att.com/sw/download\b) into the directory
+ \b$PACKAGEROOT/lib/package/tgz\b. \bbeta\b acesses beta packages;
+ download these at your own risk. If \aarchitecture\a is omitted then
+ only architectures already present in the \btgz\b directory will be
+ downloaded. If \aarchitecture\a is \b-\b then all posted architectures
+ will be downloaded. If \aurl\a matches \b*.url\b then it is interpreted
+ as a file containing shell variable assignments for \burl\b,
+ \bauthorize\b and \bpassword\b. If \aurl\a is omitted then the
+ definitions for \burl\b, \bauthorize\b and \bpassword\b in
+ \b$PACKAGEROOT/lib/package/tgz/default.url\b, if it exists, are used.
+ If \b$PACKAGEROOT/lib/package/tgz/default.url\b does not exist then it
+ is initialized with the current \burl\b, \bauthorize\b and \bpassword\b
+ values and read permission for the current user only. If \apackage\a is
+ omitted then only packages already present in the tgz directory will be
+ downloaded. If \apackage\a is \b-\b then all posted packages will be
+ downloaded. If \bsource\b and \bbinary\b are omitted then both source
+ and binary packages will be downloaded. If \bonly\b is specified then
+ only the named packages are updated; otherwise the closure of required
+ packages is updated. This action requires \bwget\b(1), \blynx\b(1),
+ \bcurl\b(1) or a shell that supports io to
+ \b/dev/tcp/\b\ahost\a/\aport\a.]
+ [+use\b [ \auid\a | \apackage\a | . [ 32 | 64 ]] | 32 | 64 | - ]] [ command ...]]?Run
+ \acommand\a, or an interactive shell if \acommand\a is omitted,
+ with the environment initialized for using the package (can you
+ say \ashared\a \alibrary\a or \adll\a without cussing?) If
+ \auid\a or \apackage\a or \a.\a is specified then it is used
+ to determine a \b$PACKAGEROOT\b, possibly different from
+ the current directory. For example, to try out bozo`s package:
+ \bpackage use bozo\b. The \buse\b action may be run from any
+ directory. If the file \b$INSTALLROOT/lib/package/profile\b is
+ readable then it is sourced to initialize the environment. 32 or 64
+ implies \b$PACKAGEROOT\b of . and specifies the target architecture
+ word size (which may be silently ignored.)]
+ [+verify\b [ \apackage\a ]]?Verify installed binary files
+ against the checksum files in
+ \b$INSTALLROOT/lib/\b\apackage\a\b/gen/*.sum\b. The checksum
+ files contain mode, user and group information. If the checksum
+ matches for a given file then the mode, user and group are
+ changed as necessary to match the checksum entry. A warning is
+ printed on the standard error for each mismatch. Requires the
+ \bast\b package \bcksum\b(1) command.]
+ [+view\b?Initialize the architecture specific viewpath
+ hierarchy. If \bflat\b is specified then the \b$INSTALLROOT\b {
+ bin fun include lib } directories are linked to the same
+ directories in the package root. Only one architecture may be
+ \bflat\b. The \bmake\b action implicitly calls this action.]
+ [+write\b [\aformat\a]] \atype\a ... [ \apackage\a ...]]?Write
+ a package archive for \apackage\a. All work is done in the
+ \b$PACKAGEROOT/lib/package\b directory. \aformat\a-specific
+ files are placed in the \aformat\a subdirectory. A
+ \apackage\a[.\atype\a]]\b.tim\b file in this directory tracks
+ the write time and prevents a package from being read in the
+ same root it was written. If more than one file is generated
+ for a particular \aformat\a then those files are placed in the
+ \aformat\a/\apackage\a subdirectory. File names in the
+ \aformat\a subdirectory will contain the package name, a
+ \ayyyy-mm-dd\a date, and for binary packages, \aHOSTTYPE\a. If
+ \apackage\a is omitted then an ordered list of previously
+ written packages is generated. If \bonly\b is specified then
+ only the named packages will be written; otherwise prerequisite
+ packages are written first. Package components must be listed
+ in \apackage\a\b.pkg\b. \aformat\a may be one of:]
+ {
+ [+cyg?Generate a \bcygwin\b package.]
+ [+exp?Generate an \bexptools\b maintainer source
+ archive and \aNPD\a file, suitable for \bexpmake\b(1)]
+ [+lcl?Generate a package archive suitable for
+ restoration into the local source tree (i.e., the
+ source is not annotated for licencing.)]
+ [+pkg?Generate a \bpkgmk\b(1) package suitable for
+ \bpkgadd\b(1).]
+ [+rpm?Generate an \brpm\b(1) package.]
+ [+tgz?Generate a \bgzip\b(1) \btar\b(1) package
+ archive. This is the default.]
+ [+tst?Generate a \btgz\b format package archive in the
+ \btst\b subdirectory. Version state files are not updated.]
+ }
+ [+?\btype\b specifies the package type which must be one of
+ \bsource\b, \bbinary\b or \bruntime\b. A source package
+ contains the source needed to build the corresponding binary
+ package. A binary package includes the libraries and headers
+ needed for compiling and linking against the public interfaces.
+ A runtime package contains the commands and required dynamic
+ libraries.]
+ [+?A package may be either a \bbase\b or \bdelta\b. A base
+ package contains a complete copy of all components. A delta
+ package contains only changes from a previous base package.
+ Delta recipients must have the \bast\b \bpax\b(1) command (in
+ the \bast-base\b package.) If neither \bbase\b nor \bdelta\b is
+ specified, then the current base is overwritten if there are no
+ deltas referring to the current base. Only the \btgz\b and
+ \blcl\b formats support \bdelta\b. If \bbase\b is specified
+ then a new base and two delta archives are generated: one delta
+ to generate the new base from the old, and one delta to
+ generate the old base from the new; the old base is then
+ removed. If \bdelta\b is specified then a new delta referring
+ to the current base is written.]
+ [+?\apackage\a\b.pkg\b may reference other packages. By default
+ a pointer to those packages is written. The recipient \bpackage
+ read\b will then check that all required packages have been
+ downloaded. If \bclosure\b is specified then the components for
+ all package references are included in the generated package.
+ This may be useful for \blcl\b and versioning.]
+ [+?All formats but \blcl\b annotate each \bsource\b file (not
+ already annotated) with a license comment as it is written to
+ the package archive using \bproto\b(1).]
+ }
+[+DETAILS?The package directory hierarchy is rooted at
+ \b$PACKAGEROOT\b. All source and binaries reside under this tree. A two
+ level viewpath is used to separate source and binaries. The top view is
+ architecture specific, the bottom view is shared source. All building
+ is done in the architecture specific view; no source view files are
+ intentionally changed. This means that many different binary
+ architectures can be made from a single copy of the source.]
+[+?Independent \b$PACKAGEROOT\b hierarchies can be combined by
+ appending \b$INSTALLROOT:$PACKAGEROOT\b pairs to \bVPATH\b. The
+ \bVPATH\b viewing order is from left to right. Each \b$PACKAGEROOT\b
+ must have a \b$PACKAGEROOT/lib/package\b directory.]
+[+?Each package contains one or more components. Component source for
+ the \afoo\a command is in \b$PACKAGEROOT/src/cmd/\b\afoo\a, and source
+ for the \abar\a library is in \b$PACKAGEROOT/src/lib/lib\b\abar\a. This
+ naming is for convenience only; the underlying makefiles handle
+ inter-component build order. The \bINIT\b component, which contains
+ generic package support files, is always made first, then the
+ components named \bINIT\b*, then the component order determined by the
+ closure of component makefile dependencies.]
+[+?\b$PACKAGEROOT/lib/package\b contains package specific files. The
+ package naming convention is \agroup\a[-\apart\a]]; e.g., \bast-base\b,
+ \bgnu-fileutils\b. The *\b.pkg\b files are ast \bnmake\b(1) makefiles
+ that contain the package name, package components, references to other
+ packages, and a short package description. *\b.pkg\b files are used by
+ \bpackage write\b to generate new source and binary packages.]
+[+?\b$PACKAGEROOT/lib/package/\b\agroup\a\b.lic\b files contain license
+ information that is used by the \bast\b \bproto\b(1) and \bnmake\b(1)
+ commands to generate source and binary license strings. \agroup\a is
+ determined by the first \b:PACKAGE:\b operator name listed in the
+ component \bnmake\b makefile. \agroup\a\b.lic\b files are part of the
+ licensing documentation. Each component may have its own \bLICENSE\b file
+ that overrides the \agroup\a\b.lic\b file. The full text of the licenses
+ are in the \b$PACKAGEROOT/lib/package/LICENSES\b and
+ \b$INSTALLROOT/lib/package/LICENSES\b directories.]
+[+?A few files are generated in \b$PACKAGEROOT/lib/package/gen\b and
+ \b$INSTALLROOT/lib/package/gen\b. \apackage\a\b.ver\b contains one line
+ consisting of \apackage version release\a \b1\b for the most recent
+ instance of \apackage\a read into \b$PACKAGEROOT\b, where \apackage\a
+ is the package name, \aversion\a is the \aYYYY-MM-DD\a base version,
+ and \arelease\a is \aversion\a for the base release or \aYYYY-MM-DD\a
+ for delta releases. \apackage\a\b.req\b contains *\b.ver\b entries for
+ the packages required by \apackage\a, except that the fourth field is
+ \b0\b instead of \b1\b. All packages except \bINIT\b require the
+ \bINIT\b package. A simple sort of \apackage\a\b.pkg\b and *\b.ver\b
+ determines if the required package have been read in. Finally,
+ \apackage\a\b.README\b and \apackage\a\a.html\b contain the README text
+ for \apackage\a and all its components. Included are all changes added
+ to the component \bRELEASE\b, \bCHANGES\b or \bChangeLog\b files dated
+ since the two most recent base releases. Component \bRELEASE\b files
+ contain tag lines of the form [\aYY\a]]\aYY-MM-DD\a [ \atext\a ]] (or
+ \bdate\b(1) format dates) followed by README text, in reverse
+ chronological order (newer entries at the top of the file.) \bpackage
+ release\b lists this information, and \bpackage contents ...\b lists
+ the descriptions and components.]
+[+?\b$HOSTYPE\b names the current binary architecture and is determined
+ by the output of \bpackage\b (no arguments.) The \b$HOSTTYPE\b naming
+ scheme is used to separate incompatible executable and object formats.
+ All architecture specific binaries are placed under \b$INSTALLROOT\b
+ (\b$PACKAGEROOT/arch/$HOSTTYPE\b.) There are a few places that match
+ against \b$HOSTTYPE\b when making binaries; these are limited to
+ makefile compiler workarounds, e.g., if \b$HOSTTYPE\b matches \bhp.*\b
+ then turn off the optimizer for these objects. All other architecture
+ dependent logic is handled either by the \bast\b \biffe\b(1) command or
+ by component specific configure scripts. Explicit \b$HOSTYPE\b
+ values matching *,*cc*[,-*,...]] optionally set the default \bCC\b and
+ \bCCFLAGS\b. This is handy for build farms that support different
+ compilers on the same architecture.]
+[+?Each component contains an \bast\b \bnmake\b(1) makefile (either
+ \bNmakefile\b or \bMakefile\b) and a \bMAM\b (make abstract machine)
+ file (\bMamfile\b.) A Mamfile contains a portable makefile description
+ that is used by \bmamake\b(1) to simulate \bnmake\b. Currently there is
+ no support for old-make/gnu-make makefiles; if the binaries are just
+ being built then \bmamake\b will suffice; if source or makefile
+ modifications are anticipated then \bnmake\b (in the \bast-base\b
+ package) should be used. Mamfiles are automatically generated by
+ \bpackage write\b.]
+[+?Most component C source is prototyped. If \b$CC\b (default value
+ \bcc\b) is not a prototyping C compiler then \bpackage make\b runs
+ \bproto\b(1) on portions of the \b$PACKAGEROOT/src\b tree and places
+ the converted output files in the \b$PACKAGEROOT/proto/src\b tree.
+ Converted files are then viewpathed over the original source.
+ \bproto\b(1) converts an ANSI C subset to code that is compatible with
+ K&R, ANSI, and C++ dialects.]
+[+?All scripts and commands under \b$PACKAGEROOT\b use \b$PATH\b
+ relative pathnames (via the \bast\b \bpathpath\b(3) function); there
+ are no imbedded absolute pathnames. This means that binaries generated
+ under \b$PACKAGEROOT\b may be copied to a different root; users need
+ only change their \b$PATH\b variable to reference the new installation
+ root \bbin\b directory. \bpackage install\b installs binary packages in
+ a new \b$INSTALLROOT\b.]
+
+[ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]
+
+[+SEE ALSO?\bautoconfig\b(1), \bcksum\b(1), \bexecrate\b(1), \bexpmake\b(1),
+ \bgzip\b(1), \bmake\b(1), \bmamake\b(1), \bnmake\b(1), \bpax\b(1),
+ \bpkgadd\b(1), \bpkgmk\b(1), \bproto\b(1), \bratz\b(1), \brpm\b(1),
+ \bsh\b(1), \btar\b(1), \boptget\b(3)]
+'
+ case $* in
+ help) set -- --man ;;
+ esac
+ while getopts -a $command "$USAGE" OPT
+ do :
+ done
+ shift $OPTIND-1
+ ;;
+esac
+
+# check the args
+
+case $AR in
+'') AR=ar ;;
+esac
+case $CC in
+'') CC=cc ;;
+esac
+case $LD in
+'') LD=ld ;;
+esac
+case $NM in
+'') NM=nm ;;
+esac
+
+action=
+admin_all=1
+admin_on=
+authorize=
+bit=
+exec=
+flat=0
+force=0
+global=
+hi=
+html=0
+ifs=${IFS-'
+ '}
+lo=
+make=
+makeflags='-k -K'
+nmakeflags=
+nmakesep=
+nl="
+"
+noexec=
+only=0
+output=
+package_src=
+password=
+quiet=0
+show=:
+tab=" "
+verbose=0
+AUTHORIZE=
+DEBUG=
+HURL=
+PROTOROOT=-
+SHELLMAGIC=-
+
+unset FIGNORE BINDIR DLLDIR ETCDIR FUNDIR INCLUDEDIR LIBDIR LOCALEDIR MANDIR SHAREDIR 2>/dev/null || true
+
+while :
+do case $# in
+ 0) set host type ;;
+ esac
+ case $1 in
+ admin|clean|clobber|contents|copyright|export|host|install|license|list|make|read|regress|release|remove|results|setup|test|update|use|verify|view|write|TEST)
+ action=$1
+ shift
+ break
+ ;;
+ authorize)
+ case $# in
+ 1) echo $command: $1: authorization user name argument expected >&2; exit 1 ;;
+ esac
+ shift
+ authorize=$1
+ shift
+ continue
+ ;;
+ debug|environment)
+ exec=echo make=echo show=echo
+ ;;
+ flat) flat=1
+ ;;
+ force) force=1
+ ;;
+ never) exec=echo noexec=-N
+ ;;
+ only) only=1
+ ;;
+ password)
+ case $# in
+ 1) echo $command: $1: authorization password argument expected >&2; exit 1 ;;
+ esac
+ shift
+ password=$1
+ shift
+ continue
+ ;;
+ quiet) quiet=1
+ ;;
+ show) exec=echo noexec=-n
+ ;;
+ verbose)verbose=1
+ ;;
+ DEBUG) DEBUG=1
+ PS4='+$LINENO:$SECONDS+ '
+ set -x
+ ;;
+ help|HELP|html|man|--[?m]*)
+ case $1 in
+ help) code=0
+ case $2 in
+ '') exec 1>&2 ;;
+ esac
+ ;;
+ html) code=0 html=1
+ ;;
+ *) code=2
+ exec 1>&2
+ ;;
+ esac
+ case $html in
+ 1) bO="<HTML>
+<HEAD>
+<TITLE>$2 package installation instructions</TITLE>
+<HEAD>
+<BODY bgcolor=white link=teal vlink=dimgray>"
+ eO='</BODY>
+</HTML>'
+ bH="<CENTER><H3><FONT face=courier color=red>"
+ eH='</FONT></H3></CENTER>'
+ bP='<P>'
+ bL='<P><TABLE cellpadding=0 cellspacing=2>'
+ bL2='<P><TABLE border=0 cellpadding=0 cellspacing=2>'
+ eL='</TABLE><P>'
+ bT='<TR><TD align=right valign=top><B>'
+ bD='</B></TD><TD align=left>' eD='</TD></TR>'
+ bB='<B>' eB='</B>'
+ bI='<I>' eI='</I>'
+ bX='<PRE>' eX='</PRE>'
+ bF='<TT>' eF='</TT>'
+ Camp='&amp;'
+ Mcurl='<A href=../../man/man1/curl.html>curl</A>(1)'
+ Mdate='<A href=../../man/man1/date.html>date</A>(1)'
+ Mfile='<A href=../../man/man1/file.html>file</A>(1)'
+ Mgunzip='<A href=../../man/man1/gzip.html>gunzip</A>(1)'
+ Mhurl='<A href=../../man/man1/hurl.html>hurl</A>(1)'
+ Mlynx='<A href=../../man/man1/lynx.html>lynx</A>(1)'
+ Mnmake='<A href=../../man/man1/nmake.html>nmake</A>(1)'
+ Mpackage='<A href=../../man/man1/package.html>package</A>(1)'
+ Mproto='<A href=../../man/man1/proto.html>proto</A>(1)'
+ Mratz='<A href=../../man/man1/ratz.html>ratz</A>'
+ Mtar='<A href=../../man/man1/tar.html>tar</A>(1)'
+ Mwget='<A href=../../man/man1/wget.html>wget</A>(1)'
+ ;;
+ *) bO='' eO=''
+ bH='' eH=':'
+ bP=''
+ bL='' eL=''
+ bL2=''
+ bT=' '
+ bD=' ' eD=''
+ bB='' eB=''
+ bI='' eI=''
+ bX='' eX=''
+ bF='"' eF='"'
+ Camp='&'
+ Mcurl='curl(1)'
+ Mdate='date(1)'
+ Mfile='file(1)'
+ Mgunzip='gunzip(1)'
+ Mhurl='hurl(1)'
+ Mlynx='lynx(1)'
+ Mnmake='nmake(1)'
+ Mpackage='package(1)'
+ Mproto='proto(1)'
+ Mratz='ratz'
+ Mtar='tar(1)'
+ Mwget='wget(1)'
+ ;;
+ esac
+ case $2 in
+ binary) echo "${bO}
+${bH}Binary Package Installation Instructions${eH}
+${bL}
+${bT}(1)${bD}Do not install packages as ${bI}root/super-user${eI}. Although some components may
+ have setuid executables, few must be owned by ${bI}root${eI}. These are best
+ changed manually when the security implications are understood.${eD}
+${bT}(2)${bD}Choose a package root directory and cd to it. This will be a local work
+ area for all packages.${eD}
+${bT}(3)${bD}These instructions bypass the ${bI}click to download${eI} package links on the
+ download site. If you already clicked, or if your system does not have
+ ${Mcurl}, ${Mhurl}, ${Mlynx} or ${Mwget} then use the alternate instructions
+ for (3),(4),(5) in plan ${bB}B${eB} below. Plan ${bB}B${eB} installs the ${Mhurl}
+ script which works with ksh and modern bash. The top level URL is:${bX}
+ URL=http://www.research.att.com/sw/download${eX}${eD}
+${bT}(4)${bD}If the ${bB}bin/package${eB} script does not exist then run:${bX}
+ test -d bin || mkdir bin
+ url=\$URL/package
+ (wget -O - \$url||curl -L \$url||hurl \$url) > bin/package
+ chmod +x bin/package${eX}${eD}
+${bT}(5)${bD}Determine the list of package names you want from the download site, then
+ use the ${Mpackage} command to do the actual download:${bX}
+ bin/package authorize \"${bI}NAME${eI}\" password \"${bI}PASSWORD${eI}\" \\
+ setup binary \$URL ${bI}PACKAGE${eI} ...${eX}
+ (Refer to the ${bB}AUTHORIZATION${eB} paragraph on the main download page for
+ ${bI}NAME${eI}/${bI}PASSWORD${eI} details.) This downloads the closure of the latest
+ binary package(s); covered and up-to-date packages are not downloaded again unless
+ ${bB}package force ...${eB} is specified. Package content is verified using ${bB}${checksum}${eB}.
+ If the package root will contain only one architecture then you can install in ${bB}bin${eB} and
+ ${bB}lib${eB} instead of ${bB}arch/${eB}${bI}HOSTTYPE${eI}${bB}/bin${eB} and ${bB}arch/${eB}${bI}HOSTTYPE${eI}${bB}/lib${eB} by running this
+ instead:${bX}
+ bin/package authorize \"${bI}NAME${eI}\" password \"${bI}PASSWORD${eI}\" \\
+ flat setup binary \$URL ${bB}PACKAGE${eB} ...${eX}
+ To update the same packages from the same URL run:${bX}
+ bin/package setup binary${eX}${eD}
+${bT}(6)${bD}The packaged binaries are position independent, i.e., they do not
+ contain hard-coded paths. However, commands with related files, like
+ ${Mfile} and ${Mnmake}, require the path of the bin directory to be
+ exported in ${bB}PATH${eb}.${eD}
+${bT}(7)${bD}You can run the binaries directly from the package root, or you can
+ install them in a public root (requires the ${bI}AT${Camp}T${eI} ${Mnmake} command):${bX}
+ bin/package flat install ${bI}DIRECTORY PACKAGE${eI}${eX}
+ This will install in ${bI}DIRECTORY${eI}${bB}/bin${eB} and ${bI}DIRECTORY${eI}${bB}/lib${eB}. If you want to
+ preserve the ${bB}arch/${eB}${bI}HOSTTYPE${eI} hierarchy under ${bI}DIRECTORY${eI} then omit the
+ ${bB}flat${eB} argument. If you don't have ${Mnmake} then the following will do a
+ flat install:${bX}
+ cd \$INSTALLROOT
+ cp -p -r bin lib include ${bI}DIRECTORY${eI}${eX}${eD}
+${bT}(8)${bD}To summarize, after the first time, the download cycle for the latest
+ binary release is:${bX}
+ bin/package setup binary${eX}${eD}${eL}
+
+${bH}Binary Package Installation Instructions -- Plan B${eH}
+${bL}
+${bT}(3)${bD}Create the subdirectory ${bB}lib/package/tgz${eB} and download all package archives
+ into that directory.${eD}
+${bT}(4)${bD}If the ${bB}bin/package${eB} script does not exist then manually read the ${bB}INIT${eB}
+ binary package:${bX}
+ gunzip < lib/package/tgz/INIT.${bI}YYYY-MM-DD.HOSTTYPE${eI}.tgz |
+ ${TAR} ${TARFLAGS}f -${eX}
+ Note that some browsers automatically unzip downloaded without warning.
+ If the gunzip fails try:
+ ${TAR} ${TARFLAGS}f -${eX} lib/package/tgz/INIT.${bI}YYYY-MM-DD.HOSTTYPE${eI}.tgz
+ If your system does not have ${Mtar} or ${Mgunzip} then download the ${Mratz}
+ binary package:${bX}
+ mkdir bin
+ cp lib/package/tgz/ratz.${bI}YYYY-MM-DD.HOSTTYPE${eI}.exe bin/ratz
+ chmod +x bin/ratz
+ bin/ratz -lm < lib/package/tgz/INIT.${bI}YYYY-MM-DD/HOSTTYPE${eI}.tgz
+${bT}(5)${bD}Read all unread package archive(s):${bX}
+ bin/package read${eX}
+ Both source and binary packages will be read by this step.${eD}${eL}${eO}"
+ ;;
+ intro) echo "${bO}
+${bH}Package Hierarchy Details${eH}
+${bP}
+The package directory hierarchy is rooted at ${bB}\$PACKAGEROOT${eB}. All source and
+binaries reside under this tree. A two level viewpath is used to separate
+source and binaries. The top view is architecture specific, the bottom view
+is shared source. All building is done in the architecture specific view;
+no source view files are intentionally changed. This means that many
+different binary architectures can be made from a single copy of the source.
+${bP}
+Each package contains one or more components. Component source for the ${bI}FOO${eI}
+command is in ${bB}\$PACKAGEROOT/src/cmd/${eB}${bI}FOO${eI}, and source for the ${bI}BAR${eI} library is
+in ${bB}\$PACKAGEROOT/src/lib/lib${eB}${bI}BAR${eI}. This naming is for convenience only; the
+underlying makefiles handle inter-component build order. The ${bB}INIT${eB} component,
+which contains generic package support files, is always made first, then the
+components named ${bB}INIT${eB}*, then the order determined by the closure of component
+makefile dependencies.
+${bP}
+${bB}\$PACKAGEROOT/lib/package${eB} contains package specific files. The package naming
+convention is ${bI}GROUP${eI}[${bI}-PART${eI}]; e.g., ${bB}ast-base${eB}, ${bB}gnu-fileutils${eB}. The *${bB}.pkg${eB} files
+are ${bB}ast${eB} ${Mnmake} makefiles that contain the package name, package components,
+references to other packages, and a short package description. *${bB}.pkg${eB} files
+are used by ${bF}package write${eF} to generate new source and binary packages.
+${bP}
+${bB}\$PACKAGEROOT/lib/package/${eB}${bI}GROUP${eI}${bB}.lic${eB} files contain license information that
+is used by the ${bB}ast${eB} ${Mproto} and ${Mnmake} commands to generate source and
+binary license strings. ${bI}GROUP${eI} is determined by the first ${bB}:PACKAGE:${eB} operator
+name listed in the component ${bB}nmake${eB} makefile. ${bI}GROUP${eI}${bB}.lic${eB} files are part of the
+licensing documentation. Each component may have its own ${bB}LICENSE${eB} file that
+overrides the ${bI}GROUP${eI}${bB}.lic${eB} file. The full text of the licenses are in the
+${bB}\$PACKAGEROOT/lib/package/LICENSES${eB} and ${bB}\$INSTALLROOT/lib/package/LICENSES${eB}
+directories.
+${bP}
+A few files are generated in ${bB}\$PACKAGEROOT/lib/package/gen${eB} and
+${bB}\$INSTALLROOT/lib/package/gen${eB}. ${bI}PACKAGE${eI}${bB}.ver${eB} contains one line consisting of${bX}
+ ${bI}PACKAGE VERSION RELEASE${eI} 1${eX}
+for the most recent instance of ${bI}PACKAGE${eI} read into ${bB}\$PACKAGEROOT${eB}, where
+${bI}PACKAGE${eI} is the package name, ${bI}VERSION${eI} is the ${bI}YYYY-MM-DD${eI} base version,
+and ${bI}RELEASE${eI} is ${bI}VERSION${eI} for the base release or ${bI}YYYY-MM-DD${eI} for delta releases.
+${bI}PACKAGE${eI}${bB}.req${eB} contains *${bB}.ver${eB} entries for the packages required by
+${bI}PACKAGE${eI}, except that the fourth field is 0 instead of 1. All packages
+except ${bB}INIT${eB} and ${Mratz} require the ${bB}INIT${eB} package. A simple sort of ${bI}PACKAGE${eI}${bB}.pkg${eB}
+and *${bB}.ver${eB} determines if the required package have been read in. Finally,
+${bI}PACKAGE${eI}${bB}.README${eB} contains the ${bB}README${eB} text for ${bI}PACKAGE${eI} and all its
+components. Included are all changes added to the component ${bB}RELEASE${eB},
+${bB}CHANGES${eB} or ${bB}ChangeLog${eB} files dated since the two most recent base
+releases. Component ${bB}RELEASE${eB} files contain tag lines of the form
+[${bI}CC${eI}]${bI}YY-MM-DD${eI} [ ${bI}TEXT${eI} ] (or ${Mdate} format dates) followed by README
+text, in reverse chronological order (newer entries at the top of the
+file.) ${bF}package release${eF} generates this information, and
+${bF}package contents ...${eF} lists the descriptions and components.
+${bP}
+${bB}\$HOSTYPE${eB} names the current binary architecture and is determined by the
+output of ${bF}package${eF} (no arguments.) The ${bB}\$HOSTTYPE${eB} naming scheme is used
+to separate incompatible executable and object formats. All architecture
+specific binaries are placed under ${bB}\$INSTALLROOT${eB} (${bB}\$PACKAGEROOT/arch/\$HOSTTYPE${eB}.)
+There are a few places that match against ${bB}\$HOSTTYPE${eB} when making binaries; these
+are limited to makefile compiler workarounds, e.g., if ${bB}\$HOSTTYPE${eB} matches
+'hp.*' then turn off the optimizer for these objects. All other architecture
+dependent logic is handled either by ${bB}\$INSTALLROOT/bin/iffe${eB} or by component
+specific configure scripts. Explicit ${bB}\$HOSTYPE${eB} values matching *,*cc*[,-*,...]
+optionally set the default ${bB}CC${eB} and ${bB}CCFLAGS${eB}. This is handy for build
+farms that support different compilers on the same architecture.
+${bP}
+Each component contains an ${bB}ast${eB} ${Mnmake} makefile (either ${bB}Nmakefile${eB} or ${bB}Makefile${eB})
+and a ${bI}MAM${eI} (make abstract machine) file (${bB}Mamfile${eB}.) A Mamfile contains a portable
+makefile description that is used by ${bB}\$INSTALLROOT/bin/mamake${eB} to simulate
+${bB}nmake${eB}. Currently there is no support for old-make/gnu-make makefiles; if
+the binaries are just being built then ${bB}mamake${eB} will suffice; if source or
+makefile modifications are anticipated then ${bB}nmake${eB} (from the ${bB}ast-open${eB} or
+${bB}ast-base${eB} package) should be used. Mamfiles are automatically generated by
+${bF}package write${eF}.
+${bP}
+Most component C source is prototyped. If ${bB}\$CC${eB} (default value ${bB}cc${eB}) is not a
+prototyping C compiler then ${bF}package make${eF} runs ${Mproto} on portions of the
+${bB}\$PACKAGEROOT/src${eB} tree and places the converted output files in the
+${bB}\$PACKAGEROOT/proto/src${eB} tree. Converted files are then viewpathed over the
+original source. The ${bB}ast${eB} ${Mproto} command converts an ANSI C subset to code
+that is compatible with K&R, ANSI, and C++ dialects.
+${bP}
+All scripts and commands under ${bB}\$PACKAGEROOT${eB} use ${bB}\$PATH${eB} relative pathnames;
+there are no imbedded absolute pathnames. This means that binaries generated
+under ${bB}\$PACKAGEROOT${eB} may be copied to a different root; users need only change
+their ${bB}\$PATH${eB} variable to reference the new instalation root bin directory.
+${bF}package install${eF} installs binary packages in a new ${bB}\$INSTALLROOT${eB}.
+${eO}"
+ ;;
+ source) echo "${bO}
+${bH}Source Package Installation Instructions${eH}
+${bL}
+${bT}(1)${bD}Do not install packages as ${bI}root/super-user${eI}. Although some components may
+ have setuid executables, few must be owned by ${bI}root${eI}. These are best
+ changed manually when the security implications are understood.${eD}
+${bT}(2)${bD}Choose a package root directory and cd to it. This will be a local work
+ area for all packages.
+${bT}(3)${bD}These instructions bypass the ${bI}click to download${eI} package links on the
+ download site. If you already clicked, or if your system does not have
+ ${Mcurl}, ${Mhurl}, ${Mlynx} or ${Mwget} then use the alternate instructions
+ for (3),(4),(5) in plan ${bB}B${eB} below. Plan ${bB}B${eB} installs the ${Mhurl}
+ script which works with ksh and modern bash. The top level URL is:${bX}
+ URL=http://www.research.att.com/sw/download${eX}${eD}
+${bT}(4)${bD}If the ${bB}bin/package${eB} script does not exist then run:${bX}
+ test -d bin || mkdir bin
+ url=\$URL/package
+ (wget -O - \$url||curl -L \$url||hurl \$url) > bin/package
+ chmod +x bin/package${eX}${eD}
+${bT}(5)${bD}Determine the list of package names you want from the download site, then
+ use the ${Mpackage} command to do the actual download:${bX}
+ bin/package authorize \"${bI}NAME${eI}\" password \"${bI}PASSWORD${eI}\" \\
+ setup source \$URL ${bB}PACKAGE${eB} ...${eX}
+ (Refer to the ${bB}AUTHORIZATION${eB} paragraph on the main download page for
+ ${bI}NAME${eI}/${bI}PASSWORD${eI} details.) This downloads the closure of the latest
+ source package(s); covered and up-to-date packages are not downloaded again unless
+ ${bB}package force ...${eB} is specified. Package content is verified using ${bB}${checksum}${eB}.
+ If the package root will contain only one architecture then you can install in ${bB}bin${eB} and
+ ${bB}lib${eB} instead of ${bB}arch/${eB}${bI}HOSTTYPE${eI}${bB}/bin${eB} and ${bB}arch/${eB}${bI}HOSTTYPE${eI}${bB}/lib${eB} by running this
+ instead:${bX}
+ bin/package authorize \"${bI}NAME${eI}\" password \"${bI}PASSWORD${eI}\" \\
+ flat setup source \$URL ${bB}PACKAGE${eB} ...${eX}
+ To update the same packages from the same URL run:${bX}
+ bin/package setup source${eX}${eD}
+${bT}(6)${bD}Build and install; all generated files are placed under ${bB}arch/${eB}${bI}HOSTTYPE${eI}
+ (${bB}\$INSTALLROOT${eB}), where ${bI}HOSTTYPE${eI} is the output of ${bB}bin/package${eB} (with no
+ arguments.) ${bI}name=value${eI} arguments are supported; ${bB}CC${eB} and ${bB}debug=1${eB} (compile
+ with -g instead of -O) are likely candidates. The output is written to
+ the terminal and captured in ${bB}\$INSTALLROOT/lib/package/gen/make.out${eB}:${bX}
+ bin/package make${eX}${eD}
+${bT}(7)${bD}List make results and interesting errors:${bX}
+ bin/package results${eX}
+ Run the regression tests:${bX}
+ bin/package test${eX}
+ List test results and errors:${bX}
+ bin/package results test${eX}${eD}
+${bT}(8)${bD}The generated binaries are position independent, i.e., they do not
+ contain hard-coded paths. However, commands with related files, like
+ ${Mfile} and ${Mnmake}, require the path of the bin directory to be
+ exported in ${bB}PATH${eb}.${eD}
+${bT}(9)${bD}You can run the binaries directly from the package root, or you can
+ install them in a public root after you are satisfied with the make and
+ test actions (requires the ${bI}AT${Camp}T${eI} ${Mnmake} command):${bX}
+ bin/package flat install ${bI}DIRECTORY PACKAGE${eI}${eX}
+ This will install in ${bI}DIRECTORY${eI}${bB}/bin${eB} and ${bI}DIRECTORY${eI}${bB}/lib${eB}. If you want to
+ preserve the ${bB}arch/${eB}${bI}HOSTTYPE${eI} hierarchy under ${bI}DIRECTORY${eI} then omit the
+ ${bB}flat${eB} argument. If you don't have ${Mnmake} then the following will do a
+ flat install:${bX}
+ cd \$INSTALLROOT
+ cp -p -r bin lib include ${bI}DIRECTORY${eI}${eX}${eD}
+${bT}(10)${bD}To summarize, after the first time the download, build, and test cycle
+ for the latest source release is:${bX}
+ bin/package setup source
+ bin/package make
+ bin/package test${eX}${eD}${eL}
+
+${bH}Source Package Installation Instructions -- Plan B${eH}
+${bL}
+${bT}(3)${bD}Create the subdirectory ${bB}lib/package/tgz${eB} and download all package archives
+ into that directory.${eD}
+${bT}(4)${bD}If the ${bB}bin/package${eB} script does not exist then manually read the ${bB}INIT${eB}
+ source package:${bX}
+ gunzip < lib/package/tgz/INIT.${bI}YYYY-MM-DD${eI}.tgz | ${TAR} ${TARFLAGS}f -${eX}
+ Note that some browsers automatically unzip downloaded without warning.
+ If the gunzip fails try:
+ ${TAR} ${TARFLAGS}f -${eX} lib/package/tgz/INIT.${bI}YYYY-MM-DD${eI}.tgz
+ If your system does not have ${Mtar} or ${Mgunzip} then download the ${Mratz}
+ source package, compile it, and manually read the ${bB}INIT${eB}
+ source package:${bX}
+ mkdir bin
+ cp lib/package/tgz/ratz.${bI}YYYY-MM-DD${eI}.c lib/package/tgz/ratz.c
+ cc -o bin/ratz lib/package/tgz/ratz.c
+ bin/ratz -lm < lib/package/tgz/INIT.${bI}YYYY-MM-DD${eI}.tgz
+${bT}(5)${bD}Read all unread package archive(s):${bX}
+ bin/package read${eX}
+ Both source and binary packages will be read by this step.${eD}${eL}${eO}"
+ ;;
+ *) echo "Usage: $command [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]
+
+ The $command command controls source and binary packages. It must be run
+ within the package root directory tree. See \"$command help intro\" for
+ details. In the following, PACKAGE names either a package or a component
+ within a package; if omitted, all packages are operated on. The default
+ action is \"host type\".
+
+ qualifier:
+ authorize NAME Remote authorization name or license acceptance phrase.
+ debug|environment Show environment and actions; do not execute.
+ flat Collapse \$INSTALLROOT { bin fun include lib } onto \$PACKAGEROOT.
+ force Force the action to override saved state.
+ never Run make -N; otherwise show other actions.
+ only Only operate on the specified packages.
+ password PASSWORD Remote authorization or license acceptance password.
+ quiet Do not list captured make and test action output.
+ show Run make -n; otherwise show other actions.
+ DEBUG Trace the package script actions in detail for debugging.
+ action:
+ admin [ all ] [ db FILE ] [ on PATTERN ] [ action ... ]
+ Apply ACTION ... to the hosts listed in FILE. If FILE is
+ omitted then "admin.db" is assumed. The caller must have rcp(1)
+ and rsh(1) or scp(1) and ssh(1) access to the hosts. Output
+ for the action is saved per-host in ACTION.log/HOST. Logs
+ can be viewed by \"package admin [on HOST] results [ACTION]\".
+ By default only local PACKAGEROOT hosts are selected from FILE;
+ \"all\" selects all hosts. \"on PATTERN\" selects only
+ hosts matching the | separated PATTERN. FILE contains four
+ types of lines. Blank lines and lines beginning with # are
+ ignored. Lines starting with id=value are variable assignments.
+ Set admin_ping to local conventions if \"$admin_ping\" fails.
+ If a package list is not specified on the command line the
+ action applies to all packages; a variable assigment
+ package=list applies action to the packages in list for
+ subsequent hosts in FILE. The remaining line type is a host
+ description consisting of 6 tab separated fields. The first 3
+ are mandatory; the remaining 3 are updated by the admin action:
+ hosttype
+ The host type as reported by package.
+ [user@]host
+ The host name and optionally user name for rcp(1)
+ and rsh(1) access.
+ [remote:[[master]:]]PACKAGEROOT
+ The absolute remote package root directory and
+ optionally the remote prorocol (rsh or ssh) if
+ the directory is on a different server than the
+ master package root directory. If
+ lib/package/admin/$admin_env exists under
+ this directory then it is sourced by sh(1)
+ before ACTION is done. If this field begins with -
+ then the host is ignored. If this field contains
+ : then ditto(1) is used to sync the remote src
+ directory hierarchy to the local one. If [master]:
+ is specified then the sync is deferred to the
+ master host. If master is omitted (two :) then
+ the sync is disabled. These directories must exist
+ on the remote side: lib/package, src/cmd, src/lib.
+ date YYMMDD of the last action.
+ date Elapsed wall time of the last action.
+ M T W The admin action make, test and write action error
+ counts. A non-numeric value in any of these fields
+ disables the corresponding action.
+ owner The owner contact information.
+ attributes
+ NAME=VALUE attributes. Should at least contain
+ cc=compiler-version.
+ clean | clobber
+ Delete the arch/HOSTTYPE hierarchy; this deletes all generated
+ files and directories for HOSTTYPE. The heirarchy can be rebuilt
+ by package make.]
+ contents [ package ... ]
+ List description and components for PACKAGE on the standard
+ output.
+ copyright [ package ... ]
+ List the general copyright notice(s) for PACKAGE on the
+ standard output. Note that individual components in PACKAGE
+ may contain additional or replacement notices.
+ export [ VARIABLE ... ]
+ List NAME=VALUE for each VARIABLE, one per line. If the
+ \"only\" attribute is specified then only the variable
+ values are listed. If no variables are specified then
+ $env are assumed.
+ help [ ACTION ]
+ Display help text on the standard error [ standard output
+ for ACTION ].
+ host [ canon cpu name rating type ... ]
+ List architecture/implementation dependent host information
+ on the standard output. type is listed if no attributes are
+ specified. Information is listed on a single line in attributes
+ order. The attributes are:
+ canon The next argument is a host type name to be
+ converted to package syntax.
+ cpu The number of cpus; 1 if the host is not a
+ multiprocessor.
+ name The host name.
+ rating The cpu rating in pseudo mips; the value is useful
+ useful only in comparisons with rating values of
+ other hosts. Other than a vax rating fixed at 1,
+ ratings can vary wildly but consistently from
+ vendor mips ratings. cc(1) may be required to
+ determine the rating.
+ type The host type, usually of the form
+ vendor.architecture, with an optional trailing
+ -version. The main theme is that type names within
+ a family of architectures are named in a similar,
+ predictable style. Os point release information is
+ avoided as much as possible, but vendor resistance
+ to release incompatibilities has for the most part
+ been futile.
+ html [ ACTION ]
+ Display html help text on the standard error [ standard output
+ for ACTION ].
+ install [ ARCHITECTURE ... ] DIR [ PACKAGE ... ]
+ Copy the package binary hierarchy to DIR. If ARCHITECTURE is
+ omitted then all architectures are installed. If the \"flat\"
+ attribute is specified then exactly one ARCHITECTURE must be
+ specified; this architecture will be installed in DIR without
+ the \"arch/HOSTTYPE\" directory prefixes. Otherwise each
+ architecture will be installed in a separate \"arch/HOSTTYPE\"
+ subdirectory of DIR. The ARCHITECTURE - names the current
+ architecture. DIR must be an existing directory. If PACKAGE
+ is omitted then all binary packages are installed. This action
+ requires nmake.
+ license [ package ... ]
+ List the source license(s) for PACKAGE on the standard output.
+ Note that individual components in PACKAGE may contain
+ additional or replacement licenses.
+ list [ PACKAGE ... ]
+ List the name, version and prerequisites for PACKAGE on the
+ standard output.
+ make [ PACKAGE ] [ OPTION ... ] [ TARGET ... ]
+ Build and install. The default TARGET is install, which
+ makes and installs all packages. If the standard output
+ is a terminal then the output is also captured in
+ \$INSTALLROOT/lib/package/gen/make.out. The build is done
+ in the \$INSTALLROOT directory tree viewpathed on top of
+ the \$PACKAGEROOT directory tree. If \"flat\" is specified then
+ the \$INSTALLROOT { bin fun include lib } directories are
+ linked to the same directories in the package root. Only
+ one architecture may be flat. Leaf directory names matching
+ the |-separated shell pattern \$MAKESKIP are ignored. The
+ view action is done before making. OPTION operands are
+ passed to the underlying make command.
+ read [ package ... | archive ... ]
+ Read the named package archive(s). Must be run from the
+ package root directory. Archives are searched for in .
+ and lib/package/tgz. Each package is read only once. The
+ file lib/package/tgz/package[.type].tim tracks the read time.
+ See the write action for archive naming conventions. Text
+ file archive member are assumed to be ASCII or UTF-8 encoded.
+ regress diff(1) the current and previous package test results.
+ release [ [CC]YY-MM-DD [ [cc]yy-mm-dd ] ] [ package ]
+ Display recent changes since [CC]YY-MM-DD (up to [cc]yy-mm-dd),
+ where - means lowest (or highest.) If no dates are specified
+ then changes for the last 4 months are listed. PACKAGE may
+ be a package or component name.
+ remove PACKAGE
+ Remove files installed for PACKAGE.
+ results [ path ] [ old ] [ make | test ]
+ List results and interesting messages captured by the most
+ recent make (default), test or write action. old specifies the
+ previous results, if any (current and previous results are
+ retained.) $HOME/.pkgresults, if it exists, must contain an
+ egrep(1) expression of result lines to be ignored. failed lists
+ failures only and path lists the results file path only.
+ setup [ beta ] [ binary ] [ source ] [ ARCHITECTURE ... ] [ URL ] [ PACKAGE ... ]
+ The action initializes the current directory as a package root,
+ runs the update action to download new or out of date packages,
+ and runs the read action on those packages. If \"flat\" is
+ specified then the \$INSTALLROOT { bin fun include lib }
+ directories are linked to the same directories in the package
+ root. Only one architecture may be flat. See the update and
+ read actions for argument details.
+ test [ PACKAGE ]
+ Run the regression tests for PACKAGE. If the standard output
+ is a terminal then the output is also captured in
+ \$INSTALLROOT/lib/package/gen/test.out. In general a package
+ must be made before it can be tested. Components tested with
+ the \bregress\b(1) command require \bksh93\b. If only is
+ also specified then only the listed package components are
+ tested, otherwise the closure of the components is tested.
+ update [ beta ] [ binary ] [ source ] [ ARCHITECTURE ... ] [ URL ] [ PACKAGE ... ]
+ Download the latest release of the selected and required
+ packages from URL (e.g.,
+ http://www.research.att.com/sw/download) into the directory
+ \$PACKAGEROOT/lib/package/tgz. beta acesses beta packages;
+ download these at your own risk. If ARCHITECTURE is omitted
+ then only architectures already present in the tgz directory
+ will be downloaded. If ARCHITECTURE is - then all posted
+ architectures will be downloaded. If URL matches *.url then
+ it is interpreted as a file containing shell variable
+ assignments for url, authorize and password. If URL is
+ omitted then the definitions for url, authorize and password
+ in \$PACKAGEROOT/lib/package/tgz/$default_url, if it exists,
+ are used. If \$PACKAGEROOT/lib/package/tgz/$default_url does
+ not exist then it is initialized with the current url,
+ authorize and password values and read permission for the
+ current user only. If PACKAGE is omitted then only
+ packages already present in the tgz directory will be
+ downloaded. If PACKAGE is - then all posted packages will be
+ downloaded. If source and binary are omitted then both source
+ and binary packages will be downloaded. If \bonly\b is
+ specified then only the named packages are updated; otherwise
+ the closure of required packages is updated. This action
+ requires wget(1), lynx(1), curl(1) or a shell that supports
+ io to /dev/tcp/HOST/PORT.
+ use [ uid | PACKAGE | . [ 32 | 64 ] | 32 | 64 | - ] [ COMMAND ... ]
+ Run COMMAND or an interactive shell if COMMAND is omitted, with
+ the environment initialized for using the package (can you say
+ shared library without cussing?) If uid or PACKAGE or . is
+ specified then it is used to determine a \$PACKAGEROOT,
+ possibly different from the current directory. For example, to
+ try out bozo's package: \"package use bozo\". In this case the
+ command may be run from any directory. If the file
+ \$INSTALLROOT/lib/package/profile is readable then it is
+ sourced to initialize the environment. 32 or 64 implies
+ \$PACKAGEROOT of . and specifies the target architecture word
+ size (which may be silently ignored.)
+ verify [ PACKAGE ]
+ Verify installed binary files against the checksum files in
+ \$INSTALLROOT/lib/package/gen/*.sum. The checksum files contain
+ mode, user and group information. If the checksum matches
+ for a given file then the mode, user and group are changed
+ as necessary to match the checksum entry. A warning is printed
+ on the standard error for each mismatch. Requires the ast
+ package cksum(1) command.
+ view
+ Initialize the architecture specific viewpath hierarchy. The
+ make action implicitly calls this action. If \"flat\" is specified
+ then the \$INSTALLROOT { bin fun include lib } directories are
+ linked to the same directories in the package root. Only one
+ architecture may be flat.
+ write [closure] [cyg|exp|lcl|pkg|rpm|tgz|tst] [base|delta]
+ [binary|runtime|source] PACKAGE
+ Write a package archive for PACKAGE. All work is done in the
+ \$PACKAGEROOT/lib/package directory. FORMAT-specific files
+ are placed in the FORMAT subdirectory. A PACKAGE[.TYPE].tim
+ file in this directory tracksthe write time and prevents a
+ package from being read in the same root it was written. If
+ more than one file is generated for a particular FORMAT then
+ those files are placed in the FORMAT/PACKAGE subdirectory.
+ File names in the FORMAT subdirectory will contain the package
+ name, a YYYY-MM-DD date, and for binary packages, HOSTTYPE.
+ If PACKAGE is omitted then an ordered list of previously
+ written packages is generated. If \"only\" is specified then
+ only the named packages will be written; otherwise
+ prerequisite packages are written first. Package components
+ must be listed in PACKAGE.pkg. FORMAT may be one of:
+ cyg generate a cygwin package
+ exp generate an exptools(1) maintainer source archive
+ and NPD file in the exp subdirectory, suitable for
+ expmake(1); support files are placed in the
+ exp/PACKAGE subdirectory
+ lcl generate a package archive or delta in the lcl
+ subdirectory, suitable for restoration into the
+ primary source tree (no source licence annotation)
+ pkg generate a pkgmk(1) package, suitable for pkgadd(1)
+ rpm generate an rpm(1) package
+ tgz generate a gzip(1) tar(1) package archive; this is
+ the default
+ tst generate tgz FORMAT package archive in the tst
+ subdirectory; version state files are not updated
+ The package type must be one of source, binary or runtime.
+ A source package contains the source needed to build the
+ corresponding binary package. A binary package includes the
+ libraries and headers needed for compiling and linking
+ against the public interfaces. A runtime package contains
+ the commands and required dynamic libraries. A package may
+ be either a base or delta. A base package contains a
+ complete copy of all components. A delta package contains
+ only changes from a previous base package. Delta recipients
+ must have the ast pax(1) command (in the ast-base package.)
+ If neither base nor delta is specified, then the current
+ base is overwritten if there are no deltas referring to the
+ current base. Only the tgz and lcl formats support delta.
+ If base is specified then a new base and two delta archives
+ are generated: one delta to generate the new base from the
+ old, and one delta to generate the old base from the new;
+ the old base is then removed. If delta is specified then a
+ new delta referring to the current base is written.
+ package.pkg may reference other packages. By default a
+ pointer to those packages is written. The recipient package
+ read will then check that all required packages have been
+ downloaded. If closure is specified then the components for
+ all package references are included in the generated
+ package. This may be useful for lcl and versioning. All
+ formats but lcl annotate each source file (not already
+ annotated) with a license comment as it is written to the
+ package archive using proto(1).
+ name=value:
+ variable definition: typically CC=cc or CCFLAGS=-g."
+ ;;
+ esac
+ exit $code
+ ;;
+ *=*) set DEFAULT host type "$@"
+ ;;
+ *) echo "Usage: $command [ options ] [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]" >&2
+ exit 2
+ ;;
+ esac
+ global="$global $1"
+ shift
+done
+
+# gather HOSTTYPE *,* options
+# ,*cc*,-*,... set CC and CCFLAGS
+
+hostopts()
+{
+ _ifs_=$IFS
+ IFS=,
+ set '' $HOSTTYPE
+ IFS=$_ifs_
+ shift
+ while :
+ do case $# in
+ 0|1) break ;;
+ esac
+ shift
+ case $1 in
+ *cc*) CC=$1
+ while :
+ do case $# in
+ 0|1) break ;;
+ esac
+ case $2 in
+ -*) case $assign_CCFLAGS in
+ ?*) assign_CCFLAGS="$assign_CCFLAGS " ;;
+ esac
+ assign_CCFLAGS="$assign_CCFLAGS$2"
+ shift
+ ;;
+ *) break
+ ;;
+ esac
+ done
+ ;;
+ esac
+ done
+}
+
+# collect command line targets and definitions
+
+case $_PACKAGE_HOSTTYPE_ in
+?*) HOSTTYPE=$_PACKAGE_HOSTTYPE_
+ KEEP_HOSTTYPE=1
+ ;;
+*) KEEP_HOSTTYPE=0
+ ;;
+esac
+KEEP_PACKAGEROOT=0
+KEEP_SHELL=0
+USER_VPATH=
+args=
+assign=
+assign_CCFLAGS=
+for i
+do case $i in
+ *:*=*) args="$args $i"
+ continue
+ ;;
+ *=*) eval `echo ' ' "$i" | sed 's,^[ ]*\([^=]*\)=\(.*\),n=\1 v='\''\2'\'','`
+ ;;
+ esac
+ case $i in
+ AR=*|LD=*|NM=*)
+ assign="$assign $n='$v'"
+ eval $n='$'v
+ ;;
+ CC=*) eval $n='$'v
+ ;;
+ CCFLAGS=*)
+ eval $n='$'v
+ assign_CCFLAGS="CCFLAGS=\"\$CCFLAGS\""
+ ;;
+ HOSTTYPE=*)
+ eval $n='$'v
+ case $HOSTTYPE in
+ ?*) KEEP_HOSTTYPE=1 ;;
+ esac
+ ;;
+ HURL=*) eval $n='$'v
+ ;;
+ PACKAGEROOT=*)
+ eval $n='$'v
+ case $PACKAGEROOT in
+ ?*) KEEP_PACKAGEROOT=1 ;;
+ esac
+ ;;
+ SHELL=*)eval $n='$'v
+ case $SHELL in
+ ?*) KEEP_SHELL=1 ;;
+ esac
+ ;;
+ TAR=*) eval $n='$'v
+ ;;
+ TARFLAGS=*)
+ eval $n='$'v
+ ;;
+ VPATH=*)eval USER_$n='$'v
+ ;;
+ 'debug=1')
+ makeflags="$makeflags --debug-symbols"
+ ;;
+ 'strip=1')
+ makeflags="$makeflags --strip-symbols"
+ ;;
+ *=*) assign="$assign $n='$v'"
+ ;;
+ *) args="$args $i"
+ ;;
+ esac
+done
+case $HOSTTYPE in
+*,*) hostopts $HOSTTYPE ;;
+esac
+case $assign_CCFLAGS in
+?*) assign="$assign $assign_CCFLAGS"
+esac
+case $CC in
+''|cc) ;;
+*) export CC ;;
+esac
+
+# grab action specific args
+
+case $action in
+admin) while :
+ do case $# in
+ 0) set list
+ break
+ ;;
+ esac
+ case $1 in
+ all) admin_all=1
+ ;;
+ db) case $# in
+ 1) echo $command: $action: $1: db file argument expected >&2
+ exit 1
+ ;;
+ esac
+ shift
+ admin_db=$1
+ ;;
+ on) case $# in
+ 1) echo $command: $action: $1: host pattern argument expected >&2
+ exit 1
+ ;;
+ esac
+ shift
+ admin_on=$1
+ ;;
+ *) break
+ ;;
+ esac
+ shift
+ done
+ admin_action=$1
+ admin_args=$*
+ for i
+ do case $i in
+ debug|environment|force|never|only|quiet|show|DEBUG)
+ ;;
+ *) admin_action=$i
+ break
+ ;;
+ esac
+ done
+ ;;
+setup) PACKAGEROOT=${PWD:-`pwd`}
+ export PACKAGEROOT
+ KEEP_PACKAGEROOT=1
+ ;;
+use) case $1 in
+ .|32|64)case $1 in
+ 32|64) bit=$1 ;;
+ esac
+ shift
+
+ # HOSTTYPE specific setup
+
+ case $HOSTTYPE in
+ win32.*)sys=uwin
+ wow=`uname -i`
+ case $bit in
+ 32) case $HOSTTYPE in
+ *-64) HOSTTYPE=${HOSTTYPE%-64} ;;
+ esac
+ case $wow in
+ */32) ;;
+ *) vpath / /$bit ;;
+ esac
+ ;;
+ 64) case $HOSTTYPE in
+ *-64) ;;
+ *) HOSTTYPE=$HOSTTYPE-64 ;;
+ esac
+ case $wow in
+ */32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;;
+ *) vpath / /$bit ;;
+ esac
+ ;;
+ esac
+ case $bit in
+ '') PS1="($sys) " ;;
+ *) PS1="($sys-$bit) " ;;
+ esac
+
+ $exec umask 002
+ $exec unset MAKESKIP
+
+ $exec export P=$PWD
+ $exec export A=$P/arch/$HOSTTYPE
+
+ $exec export CDPATH=:..:$A/src/cmd:$A/src/lib:$A/src/uwin:$P/lib/package
+ $exec export INSTALLROOT=$A
+ $exec export PACKAGEROOT=$P
+ $exec export PATH=$A/bin:$P/bin:$PATH
+ $exec export PS1="$PS1"
+ $exec export VPATH=$A:$P
+ $exec export nativepp=/usr/lib
+
+ if test '' != "$INSTALLROOT" -a -d $INSTALLROOT/include/ast
+ then $exec export PACKAGE_ast=$INSTALLROOT
+ elif test -d ${PWD%/*}/ast/arch/$HOSTTYPE
+ then $exec export PACKAGE_ast=${PWD%/*}/ast/arch/$HOSTTYPE
+ fi
+
+ # run the command
+
+ case $# in
+ 0) case $show in
+ ':') $exec exec $SHELL ;;
+ esac
+ ;;
+ *) $exec exec $SHELL -c "$@"
+ ;;
+ esac
+ exit
+ ;;
+ esac
+ PACKAGEROOT=${PWD:-`pwd`}
+ $show export PACKAGEROOT
+ esac
+ ;;
+esac
+
+# true if arg is a valid PACKAGEROOT
+
+packageroot() # dir
+{
+ test -d $1/lib/$command -o -x $1/bin/$command
+}
+
+# true if arg is executable
+
+executable() # [!] command
+{
+ case $1 in
+ '!') test ! -x "$2" -a ! -x "$2.exe"; return ;;
+ *) test -x "$1" -o -x "$1.exe"; return ;;
+ esac
+}
+
+# initialize SHELLMAGIC
+# tangible proof of cygwin's disdain for unix (well, this and execrate)
+
+shellmagic()
+{
+ case $SHELLMAGIC in
+ '') ;;
+ -) if test -f /emx/bin/sh.exe
+ then SHELLMAGIC='#!/emx/bin/sh.exe'$nl
+ elif test -f /bin/env.exe
+ then SHELLMAGIC='#!/bin/env sh'$nl
+ else SHELLMAGIC=
+ fi
+ ;;
+ esac
+}
+
+# true if arg is executable command on $PATH
+
+onpath() # command
+{
+ _onpath_b=$1
+ case $_onpath_b in
+ /*) if executable $_onpath_b
+ then _onpath_=$_onpath_b
+ return 0
+ fi
+ return 1
+ ;;
+ esac
+ IFS=':'
+ set '' $PATH
+ IFS=$ifs
+ shift
+ for _onpath_d
+ do case $_onpath_d in
+ '') _onpath_d=. ;;
+ esac
+ if executable "$_onpath_d/$_onpath_b"
+ then _onpath_=$_onpath_d/$_onpath_b
+ return 0
+ fi
+ done
+ return 1
+}
+
+# true if no nmake or nmake not from AT&T or nmake too old
+
+nonmake() # nmake
+{
+ _nonmake_version=`( $1 -n -f - 'print $(MAKEVERSION:@/.*AT&T.* //:/-//G:@/.* .*/19960101/)' . ) </dev/null 2>/dev/null || echo 19840919`
+ if test $_nonmake_version -lt 20001031
+ then return 0
+ fi
+ return 1
+}
+
+# determine local host attributes
+
+hostinfo() # attribute ...
+{
+ case $DEBUG in
+ 1) set -x ;;
+ esac
+ map=
+ something=
+ path=$PATH
+ for i in $ccs
+ do PATH=$PATH:$i
+ done
+ for i in $use
+ do for j in $org
+ do PATH=$PATH:$i/$j/bin
+ done
+ PATH=$PATH:$i/bin
+ done
+ # LD_LIBRARY_PATH may be out of sync with PATH here
+ case $SED in
+ '') SED=sed
+ $SED 1d < /dev/null > /dev/null 2>&1 ||
+ for dir in /bin /usr/bin
+ do if test -x $dir/$SED
+ then SED=$dir/$SED
+ break
+ fi
+ done
+ TR=tr
+ $TR < /dev/null > /dev/null 2>&1 ||
+ for dir in /bin /usr/bin
+ do if test -x $dir/$TR
+ then TR=$dir/$TR
+ break
+ fi
+ done
+ ;;
+ esac
+ case $PACKAGE_PATH in
+ ?*) for i in `echo $PACKAGE_PATH | $SED 's,:, ,g'`
+ do PATH=$PATH:$i/bin
+ done
+ ;;
+ esac
+
+ # validate the args
+
+ canon=
+ cc=$CC
+ for info
+ do case $canon in
+ -) canon=$info
+ ;;
+ *) case $info in
+ */*|*[cC][cC])
+ cc=$info
+ ;;
+ canon) canon=-
+ something=1
+ ;;
+ cpu|name|rating|type)
+ something=1
+ ;;
+ *) echo "$command: $action: $info: unknown attribute" >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ esac
+ done
+ case $canon in
+ -) echo "$command: $action: canon: host type name expected" >&2
+ exit 1
+ ;;
+ esac
+ case $something in
+ "") set "$@" type ;;
+ esac
+ case $DEBUG in
+ '') exec 9>&2
+ exec 2>/dev/null
+ ;;
+ esac
+
+ # compute the info
+
+ _hostinfo_=
+ for info
+ do
+ case $info in
+ cpu) case $NPROC in
+ [123456789]*)
+ _hostinfo_="$_hostinfo_ $NPROC"
+ continue
+ ;;
+ esac
+ cpu=`grep -ic '^processor[ ][ ]*:[ ]*[0123456789]' /proc/cpuinfo`
+ case $cpu in
+ [123456789]*)
+ _hostinfo_="$_hostinfo_ $cpu"
+ continue
+ ;;
+ esac
+ cpu=1
+ # exact match
+ set \
+ hinv '^Processor [0123456789]' \
+ psrinfo 'on-line' \
+ 'cat /reg/LOCAL_MACHINE/Hardware/Description/System/CentralProcessor' '.' \
+ 'cat /proc/registry/HKEY_LOCAL_MACHINE/Hardware/Description/System/CentralProcessor' '.' \
+
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ i=`$1 2>/dev/null | grep -c "$2"`
+ case $i in
+ [123456789]*)
+ cpu=$i
+ break
+ ;;
+ esac
+ shift;shift
+ done
+ case $cpu in
+ 0|1) set \
+ /bin/mpstat
+
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ if executable $1
+ then case `$1 | grep -ic '^cpu '` in
+ 1) cpu=`$1 | grep -ic '^ *[0123456789][0123456789]* '`
+ break
+ ;;
+ esac
+ fi
+ shift
+ done
+ ;;
+ esac
+ case $cpu in
+ 0|1) # token match
+ set \
+ /usr/kvm/mpstat 'cpu[0123456789]' \
+ /usr/etc/cpustatus 'enable' \
+ /usr/alliant/showsched 'CE' \
+ 'ls /config/hw/system/cpu' 'cpu' \
+ prtconf 'cpu-unit' \
+
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ i=`$1 2>/dev/null | $TR ' ' '
+
+' | grep -c "^$2"`
+ case $i in
+ [123456789]*)
+ cpu=$i
+ break
+ ;;
+ esac
+ shift;shift
+ done
+ ;;
+ esac
+ case $cpu in
+ 0|1) # special match
+ set \
+ \
+ hinv \
+ '/^[0123456789][0123456789]* .* Processors*$/' \
+ '/[ ].*//' \
+ \
+ /usr/bin/hostinfo \
+ '/^[0123456789][0123456789]* .* physically available\.*$/' \
+ '/[ ].*//' \
+
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ i=`$1 2>/dev/null | $SED -e "${2}!d" -e "s${3}"`
+ case $i in
+ [123456789]*)
+ cpu=$i
+ break
+ ;;
+ esac
+ shift;shift;shift
+ done
+ ;;
+ esac
+ case $cpu in
+ 0|1) cpu=`(
+ cd ${TMPDIR:-/tmp}
+ tmp=hi$$
+ trap 'rm -f $tmp.*' 0 1 2
+ cat > $tmp.c <<!
+#include <stdio.h>
+#include <pthread.h>
+int main()
+{
+ printf("%d\n", pthread_num_processors_np());
+ return 0;
+}
+!
+ for o in -lpthread ''
+ do if $CC $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1 ||
+ gcc $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1
+ then ./$tmp.exe
+ break
+ fi
+ done
+ )`
+ case $cpu in
+ [0123456789]*) ;;
+ *) cpu=1 ;;
+ esac
+ ;;
+ esac
+ _hostinfo_="$_hostinfo_ $cpu"
+ ;;
+ name) _name_=`hostname || uname -n || cat /etc/whoami || echo local`
+ _hostinfo_="$_hostinfo_ $_name_"
+ ;;
+ rating) for rating in `grep -i ^bogomips /proc/cpuinfo 2>/dev/null | $SED -e 's,.*:[ ]*,,' -e 's,\(...*\)\..*,\1,' -e 's,\(\..\).*,\1,'`
+ do case $rating in
+ [0123456789]*) break ;;
+ esac
+ done
+ case $rating in
+ [0123456789]*) ;;
+ *) cd ${TMPDIR:-/tmp}
+ tmp=hi$$
+ trap 'rm -f $tmp.*' 0 1 2
+ cat > $tmp.c <<!
+#include <stdio.h>
+#include <sys/types.h>
+#if TD || TZ
+#include <sys/time.h>
+#else
+extern time_t time();
+#endif
+int main()
+{
+ register unsigned long i;
+ register unsigned long j;
+ register unsigned long k;
+ unsigned long l;
+ unsigned long m;
+ unsigned long t;
+ int x;
+#if TD || TZ
+ struct timeval b;
+ struct timeval e;
+#if TZ
+ struct timezone z;
+#endif
+#endif
+ l = 500;
+ m = 890;
+ x = 0;
+ for (;;)
+ {
+#if TD || TZ
+#if TZ
+ gettimeofday(&b, &z);
+#else
+ gettimeofday(&b);
+#endif
+#else
+ t = (unsigned long)time((time_t*)0);
+#endif
+ k = 0;
+ for (i = 0; i < l; i++)
+ for (j = 0; j < 50000; j++)
+ k += j;
+#if TD || TZ
+#if TZ
+ gettimeofday(&e, &z);
+#else
+ gettimeofday(&e);
+#endif
+ t = (e.tv_sec - b.tv_sec) * 1000 + (e.tv_usec - b.tv_usec) / 1000;
+ if (!x++ && t < 1000)
+ {
+ t = 10000 / t;
+ l = (l * t) / 10;
+ continue;
+ }
+#else
+ t = ((unsigned long)time((time_t*)0) - t) * 1000;
+ if (!x++ && t < 20000)
+ {
+ t = 200000l / t;
+ l = (l * t) / 10;
+ continue;
+ }
+#endif
+#if PR
+ printf("[ k=%lu l=%lu m=%lu t=%lu ] ", k, l, m, t);
+#endif
+ if (t == 0)
+ t = 1;
+ break;
+ }
+ printf("%lu\n", ((l * m) / 10) / t);
+ return k == 0;
+}
+!
+ rating=
+ for o in -DTZ -DTD ''
+ do if $CC $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1 ||
+ gcc $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1
+ then rating=`./$tmp.exe`
+ break
+ fi
+ done
+ case $rating in
+ [0123456789]*) ;;
+ *) rating=1 ;;
+ esac
+ ;;
+ esac
+ _hostinfo_="$_hostinfo_ $rating"
+ ;;
+ type|canon)
+ case $CROSS:$canon in
+ 0:) case $cc in
+ cc) case $KEEP_HOSTTYPE:$HOSTTYPE in
+ 0:?*) if test -d ${PACKAGEROOT:-.}/arch/$HOSTTYPE
+ then KEEP_HOSTTYPE=1
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ case $KEEP_HOSTTYPE in
+ 1) _hostinfo_="$_hostinfo_ $HOSTTYPE"
+ continue
+ ;;
+ esac
+ ;;
+ esac
+ case $cc in
+ /*) a=`$cc -dumpmachine $CCFLAGS 2>/dev/null`
+ case $a in
+ '') case $CCFLAGS in
+ ?*) a=`$cc -dumpmachine 2>/dev/null` ;;
+ esac
+ ;;
+ esac
+ case $a in
+ ''|*' '*|*/*:*)
+ ;;
+ *.*-*) _hostinfo_="$_hostinfo_ $a"
+ continue
+ ;;
+ *-*-*) case $canon in
+ '') canon=$a ;;
+ esac
+ ;;
+ *) _hostinfo_="$_hostinfo_ $a"
+ continue
+ ;;
+ esac
+ ;;
+ esac
+ IFS=:
+ set /$IFS$PATH
+ IFS=$ifs
+ shift
+ f=../lib/hostinfo/typemap
+ for i
+ do case $i in
+ "") i=. ;;
+ esac
+ case $canon in
+ '') case $cc in
+ /*|cc) ;;
+ *) if executable $i/$cc
+ then a=`$i/$cc -dumpmachine $CCFLAGS 2>/dev/null`
+ case $a in
+ '') case $CCFLAGS in
+ ?*) a=`$cc -dumpmachine 2>/dev/null` ;;
+ esac
+ ;;
+ esac
+ case $a in
+ ''|*' '*|*/*:*)
+ ;;
+ *-*) canon=$a
+ ;;
+ *) _hostinfo_="$_hostinfo_ $a"
+ continue 2
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ if test -f "$i/$f"
+ then map="`grep -v '^#' $i/$f` $map"
+ fi
+ done
+
+ # inconsistent -dumpmachine filtered here
+
+ case -${canon}- in
+ --|*-powerpc-*)
+ h=`hostname || uname -n || cat /etc/whoami`
+ case $h in
+ '') h=local ;;
+ esac
+ a=`arch || uname -m || att uname -m || uname -s || att uname -s`
+ case $a in
+ *[\ \ ]*) a=`echo $a | $SED "s/[ ]/-/g"` ;;
+ esac
+ case $a in
+ '') a=unknown ;;
+ esac
+ m=`mach || machine || uname -p || att uname -p`
+ case $m in
+ *[\ \ ]*) m=`echo $m | $SED "s/[ ]/-/g"` ;;
+ esac
+ case $m in
+ '') m=unknown ;;
+ esac
+ x=`uname -a || att uname -a`
+ case $x in
+ '') x="unknown $host unknown unknown unknown unknown unknown" ;;
+ esac
+ set "" $h $a $m $x
+ expected=$1 host=$2 arch=$3 mach=$4 os=$5 sys=$6 rel=$7 ver=$8
+ ;;
+ *) case $canon in
+ *-*) IFS=-
+ set "" $canon
+ shift
+ IFS=$ifs
+ case $# in
+ 2) host= mach= arch=$1 os=$2 sys= rel= ;;
+ *) host= mach=$2 arch=$1 os=$3 sys= rel= ;;
+ esac
+ case $os in
+ [abcdefghijklmnopqrstuvwxyz]*[0123456789])
+ eval `echo $os | $SED -e 's/^\([^0123456789.]*\)\.*\(.*\)/os=\1 rel=\2/'`
+ ;;
+ esac
+ ;;
+ *) arch=$canon mach= os= sys= rel=
+ ;;
+ esac
+ ;;
+ esac
+ type=unknown
+ case $host in
+ *.*) host=`echo $host | $SED -e 's/\..*//'` ;;
+ esac
+ case $mach in
+ unknown)
+ mach=
+ ;;
+ [Rr][0123][0123456789][0123456789][0123456789])
+ mach=mips1
+ ;;
+ [Rr][4][0123456789][0123456789][0123456789])
+ mach=mips2
+ ;;
+ [Rr][56789][0123456789][0123456789][0123456789]|[Rr][123456789][0123456789][0123456789][0123456789][0123456789])
+ mach=mips4
+ ;;
+ pc) arch=i386
+ mach=
+ ;;
+ [Pp][Oo][Ww][Ee][Rr][Pp][Cc])
+ arch=ppc
+ mach=
+ ;;
+ *) case $arch in
+ 34[0123456789][0123456789])
+ os=ncr
+ arch=i386
+ ;;
+ esac
+ ;;
+ esac
+ case $canon in
+ '') set \
+ \
+ /NextDeveloper -d next - \
+ /config/hw/system/cpu -d tandem mach \
+
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ if test $2 $1
+ then os=$3
+ case $4 in
+ arch) mach=$arch ;;
+ mach) arch=$mach ;;
+ esac
+ break
+ fi
+ shift;shift;shift;shift
+ done
+ ;;
+ esac
+ case $os in
+ AIX*|aix*)
+ type=ibm.risc
+ ;;
+ HP-UX) case $arch in
+ 9000/[78]*)
+ type=hp.pa
+ ;;
+ */*) type=hp.`echo $arch | $SED 's,/,_,g'`
+ ;;
+ *) type=hp.$arch
+ ;;
+ esac
+ ;;
+ [Ii][Rr][Ii][Xx]*)
+ set xx `hinv | $SED -e '/^CPU:/!d' -e 's/CPU:[ ]*\([^ ]*\)[ ]*\([^ ]*\).*/\1 \2/' -e q | $TR ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ shift
+ type=$1
+ n=
+ case $2 in
+ r[0123][0123456789][0123456789][0123456789])
+ n=1
+ ;;
+ r[4][0123][0123456789][0123456789])
+ n=2
+ ;;
+ r[4][456789][0123456789][0123456789]|r[5][0123456789][0123456789][0123456789])
+ n=3
+ ;;
+ r[6789][0123456789][0123456789][0123456789]|r[123456789][0123456789][0123456789][0123456789][0123456789])
+ n=4
+ ;;
+ esac
+ case $rel in
+ [01234].*|5.[012]|5.[012].*)
+ case $n in
+ 1) ;;
+ *) n=2 ;;
+ esac
+ ;;
+ 5.*) case $n in
+ 2) n=3 ;;
+ esac
+ ;;
+ esac
+ if executable $cc
+ then a=$cc
+ else IFS=:
+ set /$IFS$PATH
+ IFS=$ifs
+ shift
+ for i
+ do a=$i/$cc
+ if executable $a
+ then break
+ fi
+ done
+ fi
+ split='
+'
+ a=`strings $a < /dev/null | $SED -e 's/[^abcdefghijklmnopqrstuvwxyz0123456789]/ /g' -e 's/[ ][ ]*/\'"$split"'/g' | $SED -e "/^${type}[0123456789]$/!d" -e "s/^${type}//" -e q`
+ case $a in
+ [0123456789]) n=$a ;;
+ esac
+ case $n in
+ 4) a=`$cc -${type}3 2>&1`
+ case $a in
+ *unknown*|*install*|*conflict*)
+ ;;
+ *) n=3
+ ;;
+ esac
+ ;;
+ esac
+ a=`$cc -show F0oB@r.c 2>&1`
+ case $n:$a in
+ [!2]:*mips2*) n=2 ;;
+ [!23]:*mips3*) n=3 ;;
+ [!234]:*mips4*) n=4 ;;
+ esac
+ case $n:$a in
+ [!2]:*[Oo]32*) abi=-o32 ;;
+ [!3]:*[Nn]32*) abi=-n32 ;;
+ esac
+ mach=${type}$n
+ type=sgi.$mach
+ ;;
+ OSx*|SMP*|pyramid)
+ type=pyr
+ ;;
+ OS/390) type=mvs.390
+ ;;
+ [Ss][Cc][Oo]*)
+ type=sco
+ ;;
+ [Ss]ol*)
+ v=`echo $rel | $SED -e 's/^[25]\.//' -e 's/\.[^.]*$//'`
+ case $v in
+ [6789]|[1-9][0-9])
+ ;;
+ *) v=
+ ;;
+ esac
+ case $arch in
+ '') case $mach in
+ '') arch=sun4 ;;
+ *) arch=$mach ;;
+ esac
+ ;;
+ esac
+ case $arch in
+ sparc) arch=sun4 ;;
+ esac
+ type=sol$v.$arch
+ ;;
+ [Ss]un*)type=`echo $arch | $SED -e 's/\(sun.\).*/\1/'`
+ case $type in
+ sparc) type=sun4 ;;
+ esac
+ case $rel in
+ [01234]*)
+ ;;
+ '') case $os in
+ *[Oo][Ss])
+ ;;
+ *) type=sol.$type
+ ;;
+ esac
+ ;;
+ *) case $type in
+ '') case $mach in
+ sparc*) type=sun4 ;;
+ *) type=$mach ;;
+ esac
+ ;;
+ esac
+ v=`echo $rel | $SED -e 's/^[25]\.//' -e 's/\.[^.]*$//'`
+ case $v in
+ [6789]|[1-9][0-9])
+ ;;
+ *) v=
+ ;;
+ esac
+ type=sol$v.$type
+ ;;
+ esac
+ case $type in
+ sun*|*.*)
+ ;;
+ *) type=sun.$type
+ ;;
+ esac
+ ;;
+ [Uu][Nn][Ii][Xx]_[Ss][Vv])
+ type=unixware
+ ;;
+ UTS*|uts*)
+ if test -x /bin/u370 -o -x /bin/u390
+ then type=uts.390
+ else case $arch in
+ '') arch=$mach ;;
+ esac
+ type=uts.$arch
+ fi
+ ;;
+ $host) type=$arch
+ case $type in
+ *.*|*[0123456789]*86|*68*)
+ ;;
+ *) case $mach in
+ *[0123456789]*86|*68*|mips)
+ type=$type.$mach
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ unknown)
+ case $arch in
+ ?*) case $arch in
+ sun*) mach= ;;
+ esac
+ type=$arch
+ case $mach in
+ ?*) type=$type.$mach ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) case $ver in
+ FTX*|ftx*)
+ case $mach in
+ *[0123456789][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
+ mach=`echo $mach | $SED -e 's/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*$//'`
+ ;;
+ esac
+ type=stratus.$mach
+ ;;
+ *) case $arch in
+ [Oo][Ss][-/.]2)
+ type=os2
+ arch=$rel
+ ;;
+ *) type=`echo $os | $SED -e 's/[0123456789].*//' -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789.].*//'`
+ ;;
+ esac
+ case $type in
+ [Cc][Yy][Gg][Ww][Ii][Nn]_*)
+ type=cygwin
+ ;;
+ [Uu][Ww][Ii][Nn]*|[Ww]indows_[0123456789][0123456789]|[Ww]indows_[Nn][Tt])
+ type=win32
+ arch=`echo $arch | $SED -e 's/_[^_]*$//'`
+ ;;
+ esac
+ case $arch in
+ '') case $mach in
+ ?*) type=$type.$mach ;;
+ esac
+ ;;
+ *) type=$type.$arch ;;
+ esac
+ ;;
+ esac
+ esac
+ case $type in
+ [0123456789]*)
+ case $mach in
+ ?*) type=$mach ;;
+ esac
+ case $type in
+ */MC) type=ncr.$type ;;
+ esac
+ ;;
+ *.*) ;;
+ *[0123456789]*86|*68*)
+ case $rel in
+ [34].[0123456789]*)
+ type=att.$type
+ ;;
+ esac
+ ;;
+ [abcdefghijklmnopqrstuvwxyz]*[0123456789])
+ ;;
+ [abcdefghijklmnopqrstuvwxyz]*) case $mach in
+ $type) case $ver in
+ Fault*|fault*|FAULT*)
+ type=ft.$type
+ ;;
+ esac
+ ;;
+ ?*) case $arch in
+ '') type=$type.$mach ;;
+ *) type=$type.$arch ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case $type in
+ *[-_]32|*[-_]64|*[-_]128)
+ bits=`echo $type | $SED 's,.*[-_],,'`
+ type=`echo $type | $SED 's,[-_][0-9]*$,,'`
+ ;;
+ *) bits=
+ ;;
+ esac
+ type=`echo $type | $SED -e 's%[-+/].*%%' | $TR ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ case $type in
+ *.*) lhs=`echo $type | $SED -e 's/\..*//'`
+ rhs=`echo $type | $SED -e 's/.*\.//'`
+ case $rhs in
+ [x0123456789]*86) rhs=i$rhs ;;
+ 68*) rhs=m$rhs ;;
+ esac
+ case $rhs in
+ i[x23456789]86|i?[x23456789]86|*86pc)
+ rhs=i386 ;;
+ powerpc) rhs=ppc ;;
+ s[0123456789]*[0123456789]x)
+ rhs=`echo $rhs | $SED -e 's/x$/-64/'` ;;
+ esac
+ case $rhs in
+ arm[abcdefghijklmnopqrstuvwxyz_][0123456789]*)
+ rhs=arm ;;
+ hppa) rhs=pa ;;
+ esac
+ case $lhs in
+ ?*coff|?*dwarf|?*elf)
+ case $lhs in
+ ?*coff) x=coff ;;
+ ?*dwarf)x=coff ;;
+ ?*elf) x=elf ;;
+ esac
+ lhs=`echo ${lhs}XXX | $SED -e "s/${x}XXX//"`
+ ;;
+ esac
+ case $lhs in
+ bsdi) lhs=bsd ;;
+ darwin) case $rel in
+ [01234567].*) lhs=${lhs}7 ;;
+ esac
+ ;;
+ freebsd) case $rel in
+ [01234].*) lhs=${lhs}4 ;;
+ [123456789]*.*) lhs=${lhs}`echo $rel | $SED -e 's/\..*//'` ;;
+ esac
+ ;;
+ hpux) lhs=hp ;;
+ mvs) rhs=390 ;;
+ esac
+ case $lhs in
+ '') type=$rhs ;;
+ $rhs) type=$lhs ;;
+ *) type=$lhs.$rhs ;;
+ esac
+ ;;
+ esac
+ case $type in
+ sgi.mips*)
+ case $mach in
+ mips2) type=sgi.$mach
+ abi=-o32
+ ;;
+ mips3) type=sgi.$mach
+ abi=-n32
+ ;;
+ mips[456789])
+ type=sgi.$mach
+ case $abi in
+ *-n32) ;;
+ *) abi=-64 ;;
+ esac
+ ;;
+ *) pwd=`pwd`
+ cd ${TMPDIR:-/tmp}
+ tmp=hi$$
+ trap 'rm -f $tmp.*' 0 1 2
+ cat > $tmp.a.c <<!
+extern int b();
+int main() { return b(); }
+!
+ cat > $tmp.b.c <<!
+int b() { return 0; }
+!
+ abi=
+ if $cc -c $tmp.a.c
+ then for i in -n32 -o32 -64
+ do if $cc $i -c $tmp.b.c &&
+ $cc -o $tmp.exe $tmp.a.o $tmp.b.o
+ then abi=$i
+ for i in 2 3 4 5 6 7 8 9
+ do case $i:$abi in
+ 2:-n32|2:-64|3:-64)
+ continue
+ ;;
+ esac
+ if $cc $abi -mips$i -c $tmp.b.c &&
+ $cc -o $tmp.exe $tmp.a.o $tmp.b.o
+ then type=`echo $type | $SED -e 's/.$//'`$i
+ break
+ fi
+ done
+ break
+ fi
+ done
+ fi </dev/null >/dev/null 2>&1
+ rm -f $tmp.*
+ trap - 0 1 2
+ cd $pwd
+ ;;
+ esac
+ case $type$abi in
+ sgi.mips2-o32)
+ ;;
+ sgi.mips3)
+ type=$type-o32
+ ;;
+ sgi.mips3-n32)
+ ;;
+ sgi.mips4)
+ type=$type-o32
+ ;;
+ sgi.mips[456789]-64)
+ ;;
+ *) type=$type$abi
+ ;;
+ esac
+ ;;
+ *) case $bits in
+ '') case `file /bin/sh 2>/dev/null` in
+ *universal*64*)
+ pwd=`pwd`
+ cd ${TMPDIR:-/tmp}
+ tmp=hi$$
+ trap 'rm -f $tmp.*' 0 1 2
+ cat > $tmp.a.c <<!
+int main() { return 0; }
+!
+ if $cc -o $tmp.a.exe $tmp.a.c
+ then case `file $tmp.a.exe` in
+ *64*) bits=64 ;;
+ esac
+ fi </dev/null >/dev/null 2>&1
+ rm -f $tmp.*
+ trap - 0 1 2
+ cd $pwd
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case $bits in
+ 32) case $type in
+ *.i386) bits= ;;
+ esac
+ ;;
+ esac
+ case $bits in
+ ?*) type=$type-$bits ;;
+ esac
+
+ # last chance mapping
+
+ set "" "" $map
+ while :
+ do case $# in
+ [012]) break ;;
+ esac
+ shift;shift
+ eval " case \$type in
+ $1) type=\$2; break ;;
+ esac"
+ done
+ _hostinfo_="$_hostinfo_ $type"
+ ;;
+ esac
+ done
+ set '' $_hostinfo_
+ shift
+ _hostinfo_=$*
+
+ # restore the global state
+
+ PATH=$path
+ case $DEBUG in
+ '') exec 2>&9
+ exec 9>&-
+ ;;
+ esac
+}
+
+# info message
+
+note() # message ...
+{
+ echo $command: "$@" >&2
+}
+
+# cc checks
+#
+# CC: compiler base name name
+# cc: full path, empty if not found
+
+checkcc()
+{
+ cc=
+ if onpath $CC
+ then cc=$_onpath_
+ else case $CC in
+ cc) if onpath gcc
+ then CC=gcc
+ cc=$_onpath_
+ fi
+ ;;
+ esac
+ fi
+ case $cc in
+ '') case $action in
+ make|test) note "$CC: not found"; exit 1 ;;
+ *) note "warning: $CC: not found" ;;
+ esac
+ ;;
+ esac
+}
+
+# some actions have their own PACKAGEROOT or kick out early
+
+case $action in
+host) eval u=$package_use
+ case $u in
+ $PACKAGE_USE)
+ ;;
+ *) if onpath $0
+ then case $_onpath_ in
+ */arch/$HOSTTYPE/bin/package)
+ KEEP_HOSTTYPE=1
+ ;;
+ *) KEEP_HOSTTYPE=0
+ ;;
+ esac
+ else KEEP_HOSTTYPE=0
+ fi
+ ;;
+ esac
+ hostinfo $args
+ echo $_hostinfo_
+ exit 0
+ ;;
+export|setup|use)
+ x=
+ ;;
+*) x=
+ eval u=$package_use
+ case $u in
+ $PACKAGE_USE)
+ case :$PATH: in
+ *:$INSTALLROOT/bin:*)
+ case $LIBPATH: in
+ $INSTALLROOT/bin:$INSTALLROOT/lib:*)
+ case $SHLIB_PATH: in
+ $INSTALLROOT/lib:*)
+ x=1
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+run=-
+case $x in
+1) : accept the current package use environment
+
+ OK=ok
+ KSH=$EXECROOT/bin/ksh
+ MAKE=nmake
+ NMAKE=$EXECROOT/bin/$MAKE
+ SUM=$EXECROOT/bin/sum
+ TEE=$EXECROOT/bin/tee
+ INITROOT=$PACKAGEROOT/src/cmd/INIT
+ checkcc
+ ;;
+*) hosttype=
+ case $KEEP_PACKAGEROOT in
+ 0) case $action in
+ use) PACKAGEROOT=
+ case $show in
+ echo) exec=echo make=echo show=echo ;;
+ esac
+ set '' $args
+ shift
+ case $# in
+ 0) ;;
+ *) case $1 in
+ -|.) ;;
+ /*) PACKAGEROOT=$1
+ ;;
+ *) i=`echo ~$1`
+ if packageroot $i
+ then PACKAGEROOT=$i
+ else for i in `echo $HOME | sed -e 's,/[^/]*$,,'` $usr $use
+ do if packageroot $i/$1
+ then PACKAGEROOT=$i/$1
+ break
+ fi
+ done
+ case $PACKAGEROOT in
+ '') hosttype=$1 ;;
+ esac
+ fi
+ ;;
+ esac
+ shift
+ ;;
+ esac
+ run="$@"
+ ;;
+ esac
+ case $PACKAGEROOT in
+ '') PACKAGEROOT=${PWD:-`pwd`} ;;
+ esac
+
+ # . must be within the PACKAGEROOT tree
+
+ i=X$PACKAGEROOT
+ IFS=/
+ set $i
+ IFS=$ifs
+ while :
+ do i=$1
+ shift
+ case $i in
+ X) break ;;
+ esac
+ done
+ case $PACKAGEROOT in
+ //*) d=/ ;;
+ *) d= ;;
+ esac
+ case $1 in
+ home) k=1 ;;
+ *) k=0 ;;
+ esac
+ for i
+ do case $i in
+ '') continue ;;
+ esac
+ d=$d/$i
+ case $k in
+ 2) k=1
+ ;;
+ 1) k=0
+ ;;
+ 0) case $i in
+ arch) k=2
+ ;;
+ *) if packageroot $d
+ then PACKAGEROOT=$d
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ done
+ ;;
+ esac
+ INITROOT=$PACKAGEROOT/src/cmd/INIT
+ $show PACKAGEROOT=$PACKAGEROOT
+ $show export PACKAGEROOT
+ export PACKAGEROOT
+
+ # initialize the architecture environment
+
+ case $KEEP_HOSTTYPE in
+ 0) hostinfo type
+ HOSTTYPE=$_hostinfo_
+ ;;
+ 1) _PACKAGE_HOSTTYPE_=$HOSTTYPE
+ export _PACKAGE_HOSTTYPE_
+ ;;
+ esac
+ $show HOSTTYPE=$HOSTTYPE
+ $show export HOSTTYPE
+ export HOSTTYPE
+ INSTALLROOT=$PACKAGEROOT/arch/$HOSTTYPE
+ case $action in
+ admin|install|make|read|remove|test|verify|view|write)
+ ;;
+ *) if test ! -d $INSTALLROOT
+ then INSTALLROOT=$PACKAGEROOT
+ fi
+ ;;
+ esac
+ $show INSTALLROOT=$INSTALLROOT
+ $show export INSTALLROOT
+ export INSTALLROOT
+
+ # check the basic package hierarchy
+
+ case $action in
+ export|use)
+ packageroot $PACKAGEROOT || {
+ echo "$command: $PACKAGEROOT: invalid package root directory" >&2
+ exit 1
+ }
+ case $KEEP_HOSTTYPE:$hosttype in
+ 0:?*) if test -d ${PACKAGEROOT:-.}/arch/$hosttype
+ then KEEP_HOSTTYPE=1
+ HOSTTYPE=$hosttype
+ else echo "$command: $hosttype: package root not found" >&2
+ exit 1
+ fi
+ ;;
+ esac
+ ;;
+ *) packageroot $PACKAGEROOT || {
+ case $KEEP_PACKAGEROOT in
+ 1) ;;
+ *) echo "$command: $PACKAGEROOT: must be in the package root directory tree" >&2
+ exit 1
+ ;;
+ esac
+ }
+
+ case $action in
+ admin) ;;
+ *) for i in arch arch/$HOSTTYPE
+ do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
+ done
+ for i in lib
+ do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit
+ done
+ ;;
+ esac
+
+ # no $INITROOT means INIT already installed elsewhere
+
+ if test -d $INITROOT
+ then
+ # update the basic package commands
+
+ for i in execrate ignore mamprobe silent
+ do test -h $PACKAGEROOT/bin/$i 2>/dev/null ||
+ case `ls -t $INITROOT/$i.sh $PACKAGEROOT/bin/$i 2>/dev/null` in
+ "$INITROOT/$i.sh"*)
+ note update $PACKAGEROOT/bin/$i
+ shellmagic
+ case $SHELLMAGIC in
+ '') $exec cp $INITROOT/$i.sh $PACKAGEROOT/bin/$i || exit
+ ;;
+ *) case $exec in
+ '') {
+ echo "$SHELLMAGIC"
+ cat $INITROOT/$i.sh
+ } > $PACKAGEROOT/bin/$i || exit
+ ;;
+ *) echo "{
+echo \"$SHELLMAGIC\"
+cat $INITROOT/$i.sh
+} > $PACKAGEROOT/bin/$i"
+ ;;
+ esac
+ ;;
+ esac
+ $exec chmod +x $PACKAGEROOT/bin/$i || exit
+ ;;
+ esac
+ done
+ fi
+ ;;
+ esac
+ path=$PATH
+ PATH=$INSTALLROOT/bin:$PACKAGEROOT/bin:$PATH
+ checkcc
+ PATH=$path
+ case $cc in
+ ?*) if test -f $INITROOT/hello.c
+ then
+ # check if $CC (full path $cc) is a cross compiler
+
+ (
+ cd /tmp || exit 3
+ cp $INITROOT/hello.c pkg$$.c || exit 3
+ $cc -o pkg$$.exe pkg$$.c > pkg$$.e 2>&1 || {
+ if $cc -Dnew=old -o pkg$$.exe pkg$$.c > /dev/null 2>&1
+ then echo "$command: ${warn}$CC: must be a C compiler (not C++)" >&2
+ else cat pkg$$.e
+ echo "$command: ${warn}$CC: failed to compile and link $INITROOT/hello.c -- is it a C compiler?" >&2
+ fi
+ exit 2
+ }
+ if ./pkg$$.exe >/dev/null 2>&1
+ then code=0
+ else code=1
+ fi
+ rm -f pkg$$.*
+ exit $code
+ )
+ code=$?
+ case $code in
+ 1) CROSS=1 ;;
+ esac
+ fi
+ ;;
+ esac
+ EXECTYPE=$HOSTTYPE
+ EXECROOT=$INSTALLROOT
+ case $CROSS in
+ 0) # dll hackery -- why is this so complicated?
+
+ abi=
+ case $HOSTTYPE in
+ sgi.mips[0123456789]*)
+ x=rld
+ if executable /lib32/$x || executable /lib64/$x
+ then case $INSTALLROOT in
+ */sgi.mips[0123456789]*)
+ u=`echo $INSTALLROOT | sed -e 's,-[^-/]*$,,' -e 's,.$,,'`
+ ;;
+ *) u=
+ ;;
+ esac
+ for a in "n=2 v= l=" "n=3 v=N32 l=lib32" "n=4-n32 v=N32 l=lib32" "n=4 v=64 l=lib64"
+ do eval $a
+ case $v in
+ N32) case $n:$HOSTTYPE in
+ *-n32:*-n32) ;;
+ *-n32:*) continue ;;
+ *:*-n32) continue ;;
+ esac
+ ;;
+ esac
+ case $l in
+ ?*) if executable ! /$l/$x
+ then continue
+ fi
+ ;;
+ esac
+ case $u in
+ '') case $HOSTTYPE in
+ sgi.mips$n|sgi.mips$n-*)
+ abi="$abi 'd=$INSTALLROOT v=$v'"
+ ;;
+ *) continue
+ ;;
+ esac
+ ;;
+ *) if test -d $u$n
+ then abi="$abi 'd=$u$n v=$v'"
+ fi
+ ;;
+ esac
+ done
+ fi
+ ;;
+ esac
+ case $abi in
+ '') abi="'d=$INSTALLROOT v='" ;;
+ esac
+ p=0
+ eval "
+ for a in $abi
+ do eval \$a
+ eval \"
+ case \\\$LD_LIBRARY\${v}_PATH: in
+ \\\$d/lib:*)
+ ;;
+ *) x=\\\$LD_LIBRARY\${v}_PATH
+ case \\\$x in
+ ''|:*) ;;
+ *) x=:\\\$x ;;
+ esac
+ LD_LIBRARY\${v}_PATH=\$d/lib\\\$x
+ export LD_LIBRARY\${v}_PATH
+ p=1
+ ;;
+ esac
+ \"
+ done
+ "
+ case $LD_LIBRARY_PATH in
+ '') ;;
+ *) for d in $lib
+ do case $HOSTTYPE in
+ *64) if test -d ${d}64
+ then d=${d}64
+ fi
+ ;;
+ esac
+ case :$LD_LIBRARY_PATH: in
+ *:$d:*) ;;
+ *) if test -d $d
+ then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$d
+ p=1
+ fi
+ ;;
+ esac
+ done
+ ;;
+ esac
+ case $p in
+ 1) $show LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+ $show export LD_LIBRARY_PATH
+ export LD_LIBRARY_PATH
+ ;;
+ esac
+ case $LIBPATH: in
+ $INSTALLROOT/bin:$INSTALLROOT/lib:*)
+ ;;
+ *) case $LIBPATH in
+ '') LIBPATH=/usr/lib:/lib ;;
+ esac
+ LIBPATH=$INSTALLROOT/bin:$INSTALLROOT/lib:$LIBPATH
+ $show LIBPATH=$LIBPATH
+ $show export LIBPATH
+ export LIBPATH
+ ;;
+ esac
+ case $SHLIB_PATH: in
+ $INSTALLROOT/lib:*)
+ ;;
+ *) SHLIB_PATH=$INSTALLROOT/lib${SHLIB_PATH:+:$SHLIB_PATH}
+ $show SHLIB_PATH=$SHLIB_PATH
+ $show export SHLIB_PATH
+ export SHLIB_PATH
+ ;;
+ esac
+ case $DYLD_LIBRARY_PATH: in
+ $INSTALLROOT/lib:*)
+ ;;
+ *) DYLD_LIBRARY_PATH=$INSTALLROOT/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
+ $show DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
+ $show export DYLD_LIBRARY_PATH
+ export DYLD_LIBRARY_PATH
+ ;;
+ esac
+ case $_RLD_ROOT in
+ $INSTALLROOT/arch*) ;;
+ ':') _RLD_ROOT=$INSTALLROOT/arch:/ ;;
+ /|*:/) _RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT ;;
+ *) _RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT:/ ;;
+ esac
+ $show _RLD_ROOT=$_RLD_ROOT
+ $show export _RLD_ROOT
+ export _RLD_ROOT
+
+ # now set up PATH
+ #
+ # NOTE: PACKAGEROOT==INSTALLROOT is possible for binary installations
+
+ case $PATH: in
+ $PACKAGEROOT/bin:*)
+ ;;
+ *) PATH=$PACKAGEROOT/bin:$PATH
+ ;;
+ esac
+ case $PATH: in
+ $INSTALLROOT/bin:*)
+ ;;
+ *) PATH=$INSTALLROOT/bin:$PATH
+ ;;
+ esac
+ $show PATH=$PATH
+ $show export PATH
+ export PATH
+ ;;
+ *) for i in package proto nmake
+ do if onpath $i
+ then EXECROOT=`echo $_onpath_ | sed -e 's,//*[^/]*//*[^/]*$,,'`
+ EXECTYPE=`echo $EXECROOT | sed -e 's,.*/,,'`
+ break
+ fi
+ done
+ case $HOSTTYPE in
+ $EXECTYPE)
+ OCC=$CC
+ CC=cc
+ hostinfo type
+ EXECTYPE=$_hostinfo_
+ case $HOSTTYPE in
+ $EXECTYPE)
+ echo "$command: $CC: seems to be a cross-compiler" >&2
+ echo "$command: set HOSTTYPE to something other than the native $EXECTYPE" >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ esac
+ $show EXECTYPE=$EXECTYPE
+ $show export EXECTYPE
+ export EXECTYPE
+ ;;
+ esac
+ $show EXECROOT=$EXECROOT
+ $show export EXECROOT
+ export EXECROOT
+
+ # use these if possible
+
+ OK=ok
+ KSH=$EXECROOT/bin/ksh
+ MAKE=nmake
+ NMAKE=$EXECROOT/bin/$MAKE
+ SUM=$EXECROOT/bin/sum
+ TEE=$EXECROOT/bin/tee
+
+ # grab a decent default shell
+
+ case $KEEP_SHELL in
+ 0) executable "$SHELL" || SHELL=
+ case $SHELL in
+ ?*) checksh $SHELL || SHELL= ;;
+ esac
+ case $SHELL in
+ ''|/bin/*|/usr/bin/*)
+ case $SHELL in
+ '') SHELL=/bin/sh ;;
+ esac
+ for i in ksh sh bash
+ do if onpath $i && checksh $_onpath_
+ then SHELL=$_onpath_
+ break
+ fi
+ done
+ ;;
+ */*ksh) if executable $KSH
+ then SHELL=$KSH
+ fi
+ ;;
+ esac
+ ;;
+ esac
+
+ # $SHELL must be /bin/sh compatible
+
+ case $SHELL in
+ /bin/sh);;
+ '') SHELL=/bin/sh
+ ;;
+ *) $SHELL -c 'trap "exit 0" 0; exit 1' 2>/dev/null
+ case $? in
+ 1) SHELL=/bin/sh
+ ;;
+ *) # catch (our own) pipe/socket configuration mismatches
+ $SHELL -c "date | $SHELL -c 'read x'"
+ case $? in
+ 0) ;;
+ *) SHELL=/bin/sh ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ export SHELL
+ $show SHELL=$SHELL
+ $show export SHELL
+ COSHELL=$SHELL
+ export COSHELL
+ $show COSHELL=$COSHELL
+ $show export COSHELL
+
+ # tame the environment
+
+ case $action in
+ use) ;;
+ *) ENV=
+ ERROR_OPTIONS=
+ export ENV ERROR_OPTIONS
+ ;;
+ esac
+
+ # finalize the views
+
+ case $USER_VPATH in
+ '') case $VPATH in
+ ?*) IFS=':'
+ set '' $VPATH
+ shift
+ IFS=$ifs
+ USER_VPATH=
+ for i
+ do case $i in
+ */arch/$HOSTTYPE) ;;
+ */arch/*/*) ;;
+ */arch/*) continue ;;
+ esac
+ if packageroot $i
+ then case $USER_VPATH in
+ '') USER_VPATH=$i ;;
+ ?*) USER_VPATH=$USER_VPATH:$i ;;
+ esac
+ fi
+ done
+ esac
+ ;;
+ esac
+ case $USER_VPATH in
+ ?*) IFS=':'
+ set '' $USER_VPATH
+ shift
+ IFS=$ifs
+ USER_VPATH=
+ USER_VPATH_CHAIN=
+ p=$PACKAGEROOT
+ for i
+ do case $i in
+ ''|$PACKAGEROOT|$INSTALLROOT)
+ ;;
+ ?*) USER_VPATH=$USER_VPATH:$i
+ USER_VPATH_CHAIN="$USER_VPATH_CHAIN $p $i"
+ p=$i
+ case $PROTOROOT in
+ -) executable $i/bin/mamake && PROTOROOT= ;;
+ esac
+ ;;
+ esac
+ done
+ ;;
+ esac
+ ;;
+esac
+
+PACKAGESRC=$PACKAGEROOT/lib/package
+PACKAGEBIN=$INSTALLROOT/lib/package
+case $action:$run in
+use:-) set '' $args
+ shift
+ case $# in
+ 0) ;;
+ *) shift ;;
+ esac
+ run="$@"
+ ;;
+esac
+
+# HOSTTYPE specific package profile
+
+if test -r $INSTALLROOT/lib/package/profile
+then . $INSTALLROOT/lib/package/profile
+fi
+
+# more cygwin hassles
+
+case $HOSTTYPE in
+cygwin.*)
+ lose=
+ case $CYGWIN in
+ *nontsec*)
+ lose=ntsec
+ ;;
+ *ntsec*);;
+ *) exe=/tmp/pkg$$.exe
+ rm -f $exe
+ : > $exe
+ if test -x $exe
+ then lose=ntsec
+ fi
+ ;;
+ esac
+ case $CYGWIN in
+ *nobinmode*)
+ case $lose in
+ '') lose=binmode ;;
+ *) lose="$lose binmode" ;;
+ esac
+ ;;
+ esac
+ case $lose in
+ ?*) echo "$command: $HOSTTYPE: export '$lose' in CYGWIN or languish in windows" >&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# set up the view state
+
+VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT"
+if (vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN) >/dev/null 2>&1 &&
+ vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
+then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
+else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
+ $show VPATH=$VPATH
+ $show export VPATH
+ export VPATH
+ IFS=':'
+ set '' $VPATH
+ shift
+ IFS=$ifs
+ for i
+ do case $i in
+ */arch/*/*)
+ VIEW_src="$VIEW_src $i"
+ ;;
+ */arch/*)
+ VIEW_bin="$VIEW_bin $i"
+ ;;
+ *)
+ VIEW_src="$VIEW_src $i"
+ ;;
+ esac
+ VIEW_all="$VIEW_all $i"
+ done
+fi
+
+# return 0 if arg in src|bin|all view
+
+view() # [test] [-|type] [src|bin|all] file
+{
+ case $1 in
+ -[dfsx])_view_T_=$1; shift ;;
+ *) _view_T_=-f ;;
+ esac
+ case $1 in
+ -) _view_t_= ;;
+ *) _view_t_=$1 ;;
+ esac
+ shift
+ case $1 in
+ all) shift; _view_v_=$VIEW_all ;;
+ bin) shift; _view_v_=$VIEW_bin ;;
+ src) shift; _view_v_=$VIEW_src ;;
+ *) _view_v_=$VIEW_all ;;
+ esac
+ case $1 in
+ /*) if test $_view_T_ $1
+ then _view_=$1
+ return 0
+ fi
+ ;;
+ *) for _view_d_ in $_view_v_
+ do if test $_view_T_ $_view_d_/$1
+ then _view_=$_view_d_/$1
+ return 0
+ fi
+ done
+ ;;
+ esac
+ _view_=
+ case $_view_t_ in
+ ?*) echo $command: $1: $_view_t_ not found >&2 ;;
+ esac
+ return 1
+}
+
+# determine the package and targets
+
+case $action in
+admin) case $admin_action in
+ results)action=$admin_action
+ set '' $admin_args
+ shift;shift
+ admin_args="admin $*"
+ case $admin_on in
+ '') target=$admin_args ;;
+ *) target="on $admin_on $admin_args" ;;
+ esac
+ ;;
+ esac
+ ;;
+release)set '' $args
+ target=
+ while :
+ do shift
+ case $1 in
+ -|[0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789])
+ target="$target $1"
+ ;;
+ *) break
+ ;;
+ esac
+ done
+ package=$*
+ ;;
+setup) # { update read } with optional (bin|fun|include|lib) symlinks
+ # flat option sets up { bin fun include lib } symlinks from
+ # $INSTALLROOT to $PACKAGEROOT
+
+ # . is the package root
+
+ set '' $args
+ shift
+ types=
+ url=
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ --) shift
+ break
+ ;;
+ flat) flat=1 # backwards compatibility -- documentation dropped
+ ;;
+ *://*|*.url)
+ url=$1
+ shift
+ break
+ ;;
+ *) types="$types $1"
+ ;;
+ esac
+ shift
+ done
+ if test ! -d $PACKAGEROOT/lib/package/tgz
+ then $exec mkdir -p $PACKAGEROOT/lib/package/tgz || exit
+ fi
+ case " $types " in
+ *" source "*)
+ case " $* " in
+ ' ') ;;
+ *" INIT "*)
+ ;;
+ *) view - all src/cmd/INIT ||
+ set INIT "$@"
+ ;;
+ esac
+ ;;
+ esac
+ packages=`$0 $global authorize "$authorize" password "$password" update setup $types $url "$@" PACKAGEROOT=$PACKAGEROOT`
+ case $packages in
+ ?*) $0 $global read $packages PACKAGEROOT=$PACKAGEROOT
+ esac
+ exit
+ ;;
+*) package=
+ target=
+ set '' $args
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ ''|-) target="$target $package"
+ package=
+ ;;
+ *) if view - src "lib/package/$1.pkg"
+ then package="$package $1"
+ else target="$target $package $1"
+ package=
+ fi
+ ;;
+ esac
+ done
+ ;;
+esac
+
+# flatten -- assumes symlink support
+
+case $flat in
+1) case $action in
+ make|read|setup|update|use|view)
+ if test ! -d $INSTALLROOT
+ then $exec mkdir -p $INSTALLROOT || exit
+ fi
+ for i in bin include lib fun man share
+ do if test ! -d $INSTALLROOT/../../$i
+ then $exec mkdir $INSTALLROOT/../../$i
+ fi
+ if test ! -d $INSTALLROOT/$i
+ then if test ! -h $INSTALLROOT/$i
+ then $exec ln -s ../../$i $INSTALLROOT/$i
+ fi
+ elif test ! -h $INSTALLROOT/$i
+ then for x in $INSTALLROOT/$i/.[a-z]* $INSTALLROOT/$i/*
+ do if test -f $x -o -d $x
+ then if test ! -d $INSTALLROOT/$i/$x || test ! -d $INSTALLROOT/../../$i/$x
+ then $exec mv $x $INSTALLROOT/../../$i
+ fi
+ fi
+ done
+ $exec rm -rf $INSTALLROOT/$i
+ $exec ln -s ../../$i $INSTALLROOT/$i
+ fi
+ done
+ ;;
+ esac
+ ;;
+esac
+
+# check that cmd args are up to date a.out's
+
+checkaout() # cmd ...
+{
+ case $PROTOROOT in
+ -) PROTOROOT=
+ case $* in
+ ratz) if test -f $INITROOT/ratz.c -a -w $PACKAGEROOT
+ then test -f $INITROOT/hello.c || {
+ cat > $INITROOT/hello.c <<'!'
+#ifndef printf
+#include <stdio.h>
+#endif
+int main() { int new = 0; printf("hello world\n"); return new;}
+!
+ }
+ test -f $INITROOT/p.c || {
+ cat > $INITROOT/p.c <<'!'
+/*
+ * small test for prototyping cc
+ */
+
+int main(int argc, char** argv) { return argc || argv; }
+!
+ }
+ fi
+ ;;
+ esac
+ test -f $INITROOT/hello.c -a -f $INITROOT/p.c -a -w $PACKAGEROOT || {
+ for i
+ do onpath $i || {
+ echo "$command: $i: command not found" >&2
+ return 1
+ }
+ done
+ return 0
+ }
+ case $cc in
+ '') _PACKAGE_cc=0
+ ;;
+ *) _PACKAGE_cc=1
+ test -f $INITROOT/hello.c -a -f $INITROOT/p.c || {
+ echo "$command: $INITROOT: INIT package source not found" >&2
+ return 1
+ }
+ executable $INSTALLROOT/bin/nmake || {
+ # check for prototyping cc
+ # NOTE: proto.c must be K&R compatible
+
+ $CC -c $INITROOT/p.c >/dev/null 2>&1
+ c=$?
+ rm -f p.*
+ test 0 != "$c" && {
+ checkaout proto || return
+ PROTOROOT=$PACKAGEROOT/proto
+ $show PROTOROOT=$PACKAGEROOT/proto
+ export PROTOROOT
+ INITPROTO=$PROTOROOT/src/cmd/INIT
+ note proto convert $PACKAGEROOT/src into $PROTOROOT/src
+ if test -d $PACKAGEROOT/src/cmd/nmake
+ then dirs="src/cmd/INIT src/lib/libast src/lib/libardir src/lib/libcoshell src/lib/libpp src/cmd/probe src/cmd/cpp src/cmd/nmake"
+ else dirs="src"
+ fi
+ (
+ if test -f $PROTOROOT/UPDATE
+ then newer="-newer $PROTOROOT/UPDATE"
+ else newer=""
+ fi
+ case $exec in
+ '') cd $PACKAGEROOT
+ find $dirs -name '*.[CcHh]' $newer -print | proto -v -L - -C proto
+ ;;
+ *) $exec cd $PACKAGEROOT
+ $exec "find $dirs -name '*.[CcHh]' $newer -print | proto -L - -C proto"
+ ;;
+ esac
+ $exec touch $PROTOROOT/UPDATE
+ )
+ if (vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT) >/dev/null 2>&1 &&
+ vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT
+ then $show vpath $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $USER_VPATH_CHAIN
+ else VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
+ $show VPATH=$VPATH
+ export VPATH
+ fi
+ }
+ }
+ for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
+ do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || return
+ done
+ ;;
+ esac
+ ;;
+ esac
+ case $_PACKAGE_cc in
+ '') case $cc in
+ '') _PACKAGE_cc=0 ;;
+ *) _PACKAGE_cc=1 ;;
+ esac
+ ;;
+ esac
+ for i
+ do eval j=\$_PACKAGE_AOUT_$i
+ case $j in
+ '') eval _PACKAGE_AOUT_$i=1 ;;
+ *) continue ;;
+ esac
+ k=$_PACKAGE_cc
+ if test -f $INITROOT/$i.c
+ then k=${k}1
+ else k=${k}0
+ fi
+ if executable $EXECROOT/bin/$i
+ then k=${k}1
+ else k=${k}0
+ fi
+ : $k : compiler : source : binary :
+ case $k in
+ *00) view - bin/$i && continue ;;
+ esac
+ case $k in
+ 000) echo "$command: $i: not found: download the INIT package $HOSTTYPE binary to continue" >&2
+ return 1
+ ;;
+ 010) echo "$command: $i: not found: set CC=C-compiler or download the INIT package $HOSTTYPE binary to continue" >&2
+ return 1
+ ;;
+ 100) echo "$command: $i: not found: download the INIT package source or $HOSTTYPE binary to continue" >&2
+ return 1
+ ;;
+ 110) case $CROSS in
+ 1) echo "$command: $i: not found: make the local $EXECTYPE binary package before $HOSTTYPE" >&2
+ return 1
+ ;;
+ esac
+ ;;
+ ?01) : accept binary
+ continue
+ ;;
+ 011) : accept binary
+ continue
+ ;;
+ ??1) case $CROSS in
+ 1) continue ;;
+ esac
+ ;;
+ esac
+ case `ls -t $INITROOT/$i.c $INSTALLROOT/bin/$i 2>/dev/null` in
+ "$INITROOT/$i.c"*)
+ note update $INSTALLROOT/bin/$i
+ if test proto != "$i" && executable $INSTALLROOT/bin/proto
+ then case $exec in
+ '') $INSTALLROOT/bin/proto -p $INITROOT/$i.c > $i.c || return ;;
+ *) $exec "$INSTALLROOT/bin/proto -p $INITROOT/$i.c > $i.c" ;;
+ esac
+ $exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $i.c || return
+ $exec rm -f $i.c
+ else if test ! -d $INSTALLROOT/bin
+ then for j in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
+ do test -d $PACKAGEROOT/$j || $exec mkdir $PACKAGEROOT/$j || return
+ done
+ fi
+ if test '' != "$PROTOROOT" -a -f $INITPROTO/$i.c
+ then $exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $INITPROTO/$i.c || return
+ else $exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $INITROOT/$i.c || return
+ fi
+ case $i:$exec in
+ proto:) test -d $INSTALLROOT/include || mkdir $INSTALLROOT/include
+ $INSTALLROOT/bin/proto -f /dev/null > $i.c
+ cmp -s $i.c $INSTALLROOT/include/prototyped.h 2>/dev/null || cp $i.c $INSTALLROOT/include/prototyped.h
+ rm $i.c
+ ;;
+ esac
+ fi
+ test -f $i.o && $exec rm -f $i.o
+ i=$PATH
+ PATH=/bin
+ PATH=$i
+ ;;
+ esac
+ done
+ return 0
+}
+
+# check package requirements against received packages
+
+requirements() # source|binary [ package ]
+{
+ case $1 in
+ binary) r=$VIEW_BIN ;;
+ source) r=$VIEW_SRC ;;
+ *) r=$VIEW_ALL ;;
+ esac
+ shift
+ case $1 in
+ '') x= ;;
+ *) x=$* ;;
+ esac
+ set ''
+ for d in $r
+ do set "$@" $d/gen/*.ver
+ case $x in
+ '') set "$@" $d/gen/*.req
+ ;;
+ *) for p in $x
+ do set "$@" $d/gen/$p.req
+ done
+ ;;
+ esac
+ done
+ shift
+ e=0
+ x=$*
+ y=
+ n=
+ set ''
+ for i in $x
+ do p=`echo $i | sed -e 's,.*/,,' -e 's,\....$,,'`
+ if test -f $i
+ then set "$@" $i
+ y="$y $p"
+ else case $p in
+ '*') ;;
+ *) n="$n $p" ;;
+ esac
+ fi
+ done
+ for i in $n
+ do case " $y " in
+ *" $i "*)
+ ;;
+ *) echo "$command: $i: must read or write package" >&2
+ e=1
+ ;;
+ esac
+ done
+ case $e in
+ 1) exit 1 ;;
+ esac
+ shift
+ test 0 != "$#" && release=`sort -r "$@" | {
+ q=
+ e=0
+ o=
+ while read p v r s
+ do q="$q
+$v $r"
+ case $p in
+ $o) continue ;;
+ esac
+ case $s in
+ 0) e=1
+ case $r in
+ base) echo "$command: base package $p.$v or newer required" >&2 ;;
+ *) echo "$command: delta package $p.$v.$r or newer required" >&2 ;;
+ esac
+ ;;
+ esac
+ o=$p
+ done
+ case $e in
+ 0) echo "$q" | sort | { read v r; read v r; echo $v; } ;;
+ 1) echo ERROR ;;
+ esac
+ }`
+ case $release in
+ ERROR) case $force in
+ 0) exit 1 ;;
+ esac
+ ;;
+ ?*) eval `echo $release | sed -e 's,\(.*\)-\(.*\)-\(.*\),yy=\1 mm=\2 dd=\3,'`
+ # slide back 4 months
+ case $mm in
+ 01) mm=09 dd=1 ;;
+ 02) mm=10 dd=1 ;;
+ 03) mm=11 dd=1 ;;
+ 04) mm=12 dd=1 ;;
+ 05) mm=01 dd=0 ;;
+ 06) mm=02 dd=0 ;;
+ 07) mm=03 dd=0 ;;
+ 08) mm=04 dd=0 ;;
+ 09) mm=05 dd=0 ;;
+ 10) mm=06 dd=0 ;;
+ 11) mm=07 dd=0 ;;
+ 12) mm=08 dd=0 ;;
+ esac
+ case $dd in
+ 1) yy=`expr $yy - 1` ;;
+ esac
+ release=$yy-$mm-01
+ count=1
+ lo=$release
+ release="-f $release -r $count"
+ ;;
+ esac
+}
+
+# write ordered package prerequisite list to the standard output
+
+order() # [ package ]
+{
+ _order_t_=lib/package/tgz
+ case $action in
+ binary) _order_a_=.$HOSTTYPE ;;
+ *) _order_a_= ;;
+ esac
+ _order_n_=$#
+ case $_order_n_ in
+ 0) _order_p_=
+ for _order_v_ in $VIEW_all
+ do for _order_f_ in $_order_v_/lib/package/*.pkg
+ do if test -f $_order_f_
+ then _order_p_="$_order_p_ $_order_f_"
+ fi
+ done
+ done
+ set '' $_order_p_
+ shift
+ esac
+ {
+ if test ratz != "$*"
+ then for _order_f_ in ratz INIT
+ do if view -s - src $_order_t_/$_order_f_$_order_a_.tim
+ then echo $_order_f_ $_order_f_
+ fi
+ done
+ fi
+ for _order_f_
+ do while :
+ do view - src $_order_f_ && break
+ case $_order_f_ in
+ *.pkg) ;;
+ *) _order_f_=$_order_f_.pkg; view - src $_order_f_ && break ;;
+ esac
+ case $_order_f_ in
+ */*) ;;
+ *) _order_f_=lib/package/$_order_f_; view - src $_order_f_ && break ;;
+ esac
+ echo "$command: $_order_f_: not a package" >&2
+ continue 2
+ done
+ _order_f_=$_view_
+ _order_p_=`echo $_order_f_ | sed -e 's,.*/,,' -e 's,\.pkg$,,'`
+ case $_order_n_ in
+ 0) view -s - src $_order_t_/$_order_p_$_order_a_.tim || continue ;;
+ esac
+ echo $_order_p_ $_order_p_
+ case $_order_p_ in
+ INIT|ratz)
+ ;;
+ *) echo INIT $_order_p_
+ ;;
+ esac
+ {
+ req= req_sep=
+ op=::
+ while read line
+ do IFS=' \\'
+ set '' $line
+ IFS=$ifs
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ :*:) op=$1
+ ;;
+ INIT|'$('*|*')')
+ ;;
+ *) case $op in
+ :REQUIRES:)
+ req="$req$req_sep$1"
+ req_sep=" "
+ ;;
+ esac
+ ;;
+ esac
+ done
+ done
+ for _order_i_ in $req
+ do if view - src lib/package/$_order_i_.pkg
+ then case $_order_u_ in
+ 0) view -s - src $_order_t_/$_order_i_$_order_a_.tim || continue ;;
+ esac
+ echo $_order_i_ $_order_i_; echo INIT $_order_i_; echo $_order_i_ $_order_p_
+ fi
+ done
+ } < $_order_f_
+ done
+ } | tsort
+}
+
+# generate the package component list in _components_
+
+components() # [ package ]
+{
+ _components_=
+ for p
+ do case $p in
+ '') ;;
+ INIT) case " $_components_ " in
+ *" $p "*) ;;
+ *) _components_="$_components_ $p" ;;
+ esac
+ ;;
+ *) if view - src lib/package/$p.pkg
+ then p=$_view_
+ op=::
+ exec < $p
+ while read line
+ do IFS=' \\'
+ set '' $line
+ IFS=$ifs
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ :*:) op=$1
+ ;;
+ INIT|'$('*|*')')
+ ;;
+ *) case $op in
+ :PACKAGE:)
+ case " $_components_ " in
+ *" $1 "*) ;;
+ *) _components_="$_components_ $1" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ done
+ exec < /dev/null
+ elif test -d $PACKAGEROOT/src/cmd/$p -o -d $PACKAGEROOT/src/lib/$p
+ then _components_="$_components_ $p"
+ else echo "$command: $p: package or component not found" >&2
+ exit 1
+ fi
+ ;;
+ esac
+ done
+}
+
+# list main environment values
+
+showenv()
+{
+ case $1 in
+ ''|make)for __i__ in CC SHELL $env
+ do eval echo $__i__='$'$__i__
+ done
+ ;;
+ esac
+}
+
+# capture command output
+
+capture() # file command ...
+{
+ case $make:$noexec in
+ :) case $action in
+ install|make|view)
+ o=$action
+ ;;
+ *) case $package in
+ ''|*' '*)
+ o=$action
+ ;;
+ *) o=$package
+ ;;
+ esac
+ ;;
+ esac
+ case $action in
+ write) d=$PACKAGESRC/gen ;;
+ *) d=$PACKAGEBIN/gen ;;
+ esac
+ test -d $d || $exec mkdir $d
+ o=$d/$o
+ case $o in
+ $output)o=$o.out
+ s=
+ ;;
+ *) output=$o
+ if test -f $o.old
+ then mv $o.old $o.out.1
+ if test -f $o.out
+ then mv $o.out $o.out.2
+ fi
+ elif test -f $o.out
+ then for i in `ls -t $o.out.? 2>/dev/null`
+ do break
+ done
+ case $i in
+ *.1) i=2 ;;
+ *.2) i=3 ;;
+ *.3) i=4 ;;
+ *.4) i=5 ;;
+ *.5) i=6 ;;
+ *.6) i=7 ;;
+ *.7) i=8 ;;
+ *.8) i=9 ;;
+ *) i=1 ;;
+ esac
+ mv $o.out $o.out.$i
+ fi
+ o=$o.out
+ : > $o
+ note $action output captured in $o
+ s="$command: $action start at `date` in $INSTALLROOT"
+ case $quiet in
+ 0) trap "echo \"$command: $action done at \`date\`\" in $INSTALLROOT 2>&1 | \$TEE -a $o" 0 1 2 ;;
+ *) trap "echo \"$command: $action done at \`date\`\" in $INSTALLROOT >> $o" 0 1 2 ;;
+ esac
+ ;;
+ esac
+ case $quiet in
+ 0) if executable ! $TEE
+ then TEE=tee
+ fi
+ {
+ case $s in
+ ?*) echo "$s" ;;
+ esac
+ showenv $action
+ "$@"
+ } < /dev/null 2>&1 | $TEE -a $o
+ ;;
+ *) {
+ case $s in
+ ?*) echo "$s" ;;
+ esac
+ showenv $action
+ "$@"
+ } < /dev/null > $o 2>&1
+ ;;
+ esac
+ ;;
+ *) $make "$@"
+ ;;
+ esac
+}
+
+package_install() # dest sum
+{
+ dest=$1 sum=$2
+ ot=
+ code=0
+ sed -e '/ /!d' -e 's,[^ ]* ,,' -e 's, \(arch/[^/]*\)/, \1 ,' -e '/ arch\//!s,^[^ ]* [^ ]* [^ ]*,& .,' -e 's,/\([^ /]*\)$, \1,' $sum |
+ while read mode user group arch dir file
+ do case $flat:$arch in
+ 1:*|?:.)t=$dest/$dir ;;
+ *) t=$dest/$arch/$dir ;;
+ esac
+ case $t in
+ $ot) ;;
+ *) if test ! -d "$t"
+ then $exec mkdir -p "$t" || exit
+ fi
+ ot=$t
+ ;;
+ esac
+ case $file in
+ ?*) case $arch in
+ .) f=$dir/$file ;;
+ *) f=$arch/$dir/$file ;;
+ esac
+ if test -f "$f"
+ then t=$t/$file
+ case $quiet in
+ 0) echo "$t" ;;
+ esac
+ $exec cp -f "$f" "$t" || code=1
+ $exec chmod $mode "$t" || code=1
+ fi
+ ;;
+ esac
+ done
+ return $code
+}
+
+package_verify() # sum
+{
+ $exec $SUM -cp $1
+}
+
+make_recurse() # dir
+{
+ for _make_recurse_j in $makefiles
+ do if view - $1/$_make_recurse_j
+ then return
+ fi
+ done
+ if test -d $1
+ then case $exec in
+ '') echo :MAKE: > $1/Makefile || exit ;;
+ *) $exec "echo :MAKE: > $1/Makefile" ;;
+ esac
+ fi
+}
+
+get() # host path [ file size ]
+{
+ case $HURL in
+ '') HURL=.
+ for i in wget lynx curl
+ do if onpath $i
+ then HURL=$i
+ break;
+ fi
+ done
+ AUTHORIZE="User-Agent: package AT&T Research\\r\\n"
+ case $HURL:$authorize in
+ .:?*) AUTHORIZE="${AUTHORIZE}Authorization: Basic `print -n -r -- $authorize:$password | uuencode -h -x base64`\\r\\n" ;;
+ esac
+ ;;
+ esac
+ getfd=8
+ case $3 in
+ '') case $HURL in
+ .) host=$1
+ path=$2
+ while :
+ do eval "exec $getfd<> /dev/tcp/$host/80" || exit
+ case $path in
+ /*) ;;
+ *) path=/$path ;;
+ esac
+ print "GET $path HTTP/1.0\\r\\nHost: $host\\r\\n$AUTHORIZE\\r" >&$getfd
+ cat <&8 > get.tmp
+ got=`sed -e 1q get.tmp`
+ case $got in
+ *" "200" "*)
+ got=`sed -e '1,/^.$/d' -e '/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]/!d' get.tmp`
+ : > get.err
+ code=0
+ break
+ ;;
+ *" "30[123]" "*)
+ got=`sed -e '/^Location: /!d' -e 's,^Location: \(.*\)://\([^/]*\)\(/.*\),prot='\''\1'\'' host='\''\2'\'' path='\''\3'\'',' get.tmp`
+ case $got in
+ '') rm get.tmp
+ echo "$command: $action: $url: redirect error" >&2
+ exit 1
+ ;;
+ esac
+ eval $got
+ ;;
+ *) rm get.tmp
+ echo "$command: $action: $url: $got" >&2
+ echo '' "$got" > get.err
+ code=1
+ break
+ ;;
+ esac
+ done
+ ;;
+ curl) case $authorize in
+ '') curl -s -L -o get.tmp http://$1/$2 2> get.err; code=$? ;;
+ *) curl -s -L -o get.tmp -u "$authorize":"$password" http://$1/$2 2> get.err; code=$? ;;
+ esac
+ got=`grep '^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]' get.tmp 2>/dev/null`
+ case $code in
+ 0) if grep '^<H1>Authorization Required</H1>' get.tmp > get.err
+ then code=1
+ fi
+ ;;
+ esac
+ ;;
+ hurl) case $authorize in
+ '') hurl http://$1/$2 > get.tmp 2> get.err; code=$? ;;
+ *) hurl -a "$authorize":"$password" http://$1/$2 > get.tmp 2> get.err; code=$? ;;
+ esac
+ got=`grep '^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]' get.tmp`
+ ;;
+ lynx) case $authorize in
+ '') lynx -source http://$1/$2 > get.tmp 2> get.err; code=$? ;;
+ *) lynx -source -auth "$authorize":"$password" http://$1/$2 > get.tmp 2> get.err; code=$? ;;
+ esac
+ got=`grep '^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]' get.tmp`
+ ;;
+ wget) wget -nv -O get.tmp ${authorize:+--http-user="$authorize"} ${password:+--http-passwd="$password"} http://$1/$2 2> get.err
+ code=$?
+ got=`grep '^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]' get.tmp 2>/dev/null`
+ ;;
+ *) echo $command: $action: $HURL: url get command not found >&2
+ exit 1
+ ;;
+ esac
+ if test 0 != "$code"
+ then case `cat get.err get.tmp 2>/dev/null` in
+ *[Aa][Uu][Tt][Hh][Oo][Rr][Ii][SsZz]*|*[Dd][Ee][Nn][Ii][Ee][Dd]*)
+ echo $command: $action: authorization required -- see $url for license acceptance authorization name and password >&2
+ ;;
+ *) cat get.err
+ ;;
+ esac
+ rm -f get.tmp get.err
+ echo $command: $action: $2: download failed >&2
+ exit 1
+ fi
+ rm -f get.tmp get.err
+ ;;
+ *) case $exec in
+ '') echo "$3 ($4 bytes):" >&2
+ case $HURL in
+ .) eval "exec $getfd<> /dev/tcp/$1/80" || exit
+ path=$2/$3
+ case $path in
+ /*) ;;
+ *) path=/$path ;;
+ esac
+ print "GET $path HTTP/1.0\\r\\nHost: $host\\r\\n$AUTHORIZE\\r" >&$getfd
+ read got <&$getfd
+ case $got in
+ *" 200 "*)
+ code=0
+ : > get.err
+ ;;
+ *) echo '' "$got" > get.err
+ code=1
+ ;;
+ esac
+ while read got <&$getfd
+ do case $got in
+ ''|?) break ;;
+ esac
+ done
+ cat <&$getfd > get.tmp
+ ;;
+ curl) case $authorize in
+ '') curl -s -L -o get.tmp http://$1/$2/$3 2> get.err; code=$? ;;
+ *) curl -s -L -o get.tmp -u "$authorize":"$password" http://$1/$2/$3 2> get.err; code=$?
+ esac
+ case $code in
+ 0) if grep '^<H1>Authorization Required</H1>' get.tmp > get.err
+ then code=1
+ fi
+ ;;
+ esac
+ ;;
+ hurl) case $authorize in
+ '') ksh -x hurl http://$1/$2/$3 > get.tmp 2> get.err; code=$? ;;
+ *) ksh -x hurl -a "$authorize":"$password" http://$1/$2/$3 > get.tmp 2> get.err; code=$? ;;
+ esac
+ ;;
+ lynx) case $authorize in
+ '') lynx -source http://$1/$2/$3 > get.tmp 2> get.err; code=$? ;;
+ *) lynx -source -auth "$authorize":"$password" http://$1/$2/$3 > get.tmp 2> get.err; code=$? ;;
+ esac
+ ;;
+ wget) wget -nv -O get.tmp ${authorize:+--http-user="$authorize"} ${password:+--http-passwd="$password"} http://$1/$2/$3 2> get.err
+ code=$?
+ ;;
+ *) echo $command: $action: $HURL: url get command not found >&2
+ exit 1
+ ;;
+ esac
+ if test 0 != "$code"
+ then case `cat get.err get.tmp` in
+ *[Aa][Uu][Tt][Hh][Oo][Rr][Ii][SsZz]*|*[Dd][Ee][Nn][Ii][Ee][Dd]*)
+ echo $command: $action: authorization required -- see $url for license acceptance authorization name and password >&2
+ ;;
+ *) cat get.err
+ ;;
+ esac
+ rm get.tmp get.err
+ echo $command: $action: $3: download failed >&2
+ exit 1
+ fi
+ rm get.err
+ case $checksum:$5 in
+ :*|*:-) z=`wc -c < get.tmp`
+ case " $z " in
+ *" $4 "*)
+ ;;
+ *) rm -f get.tmp
+ echo $command: $3: download error: expected $4 bytes, got $z >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ *) z=`$checksum < get.tmp | sed -e 's,^[ ][ ]*,,' -e 's,[ ].*,,'`
+ case " $z " in
+ *" $5 "*)
+ ;;
+ *) rm -f get.tmp
+ echo $command: $3: download $checksum error: expected $5, got $z >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ esac
+ mv get.tmp $3 || exit
+ ;;
+ *) echo "$3 ($4 bytes)" >&2
+ ;;
+ esac
+ esac
+}
+
+# generate copyright notice
+
+copyright()
+{
+ if test -f $1.lic
+ then echo $1 package general copyright notice
+ echo
+ proto -c'#' -p -s -l $1.lic -o type=verbose,author='*' /dev/null
+ return 0
+ fi
+ case $1 in
+ *-*) eval `echo '' $1 | sed 's/\([^-]*\)-\(.*\)/__j__="\1" __i__="\2"/'`
+ if copyright $__i__ || copyright $__j__
+ then return 0
+ fi
+ ;;
+ esac
+ return 1
+}
+
+# run remote make on host
+
+remote() # host no-exec-background
+{
+ host=$1
+ background=$2
+ eval name=\$${host}_name user=\$${host}_user snarf=\$${host}_snarf type=\$${host}_type rsh=\$${host}_rsh root=\$${host}_root keep=\$${host}_keep log=\$${host}_log
+ case $keep in
+ 1*) ;;
+ *) return ;;
+ esac
+ case $host in
+ $main) ;;
+ *) case $exec in
+ '') exec > $admin_log/$log 2>&1 ;;
+ *) echo "exec > $admin_log/$log 2>&1" ;;
+ esac
+ ;;
+ esac
+ if $admin_ping $name >/dev/null 2>&1 || $admin_ping $name >/dev/null 2>&1
+ then cmd=". ./.profile"
+ case $root in
+ .) root=
+ ;;
+ *) cmd="$cmd && cd $root"
+ root=$root/
+ ;;
+ esac
+ cmd="$cmd && { test -f lib/package/admin/$admin_env && . ./lib/package/admin/$admin_env || true ;} && PATH=\${PWD:-\`pwd\`}/bin:\$PATH \${SHELL:-/bin/sh} -c 'package $admin_args PACKAGEROOT=\${PWD:-\`pwd\`} HOSTTYPE=$type VPATH='"
+ case $admin_binary in
+ '') snarf= ;;
+ esac
+ case $snarf in
+ '') $exec $rsh $user$name "$cmd" $background
+ ;;
+ *?) rcp=`echo $rsh | sed 's/\(.\).*/\1/'`cp
+ case $background in
+ ?*) $exec "{" ;;
+ esac
+ $exec $rsh $user$name "$cmd"
+ eval lst=$admin_list
+ case $admin_pkgs in
+ '') filter=cat ;;
+ *) filter="egrep lib/package/tgz/($admin_pkgs)\\." ;;
+ esac
+ if $exec $rcp $user$name:${root}lib/package/tgz/$lst $PACKAGESRC/tgz
+ then $exec $rcp `$filter $PACKAGESRC/tgz/$lst | sed "s,^,$user$name:,"` $PACKAGESRC/tgz
+ else echo "$command: $user$name:${root}lib/package/tgz/$lst: not found" >&2
+ fi
+ case $background in
+ ?*) $exec "} $background" ;;
+ esac
+ ;;
+ esac
+ else echo "$command: $name: down" >&2
+ fi
+}
+
+# update package_src
+
+checksrc()
+{
+ case $package_src in
+ '') package_src=$src
+ for _i_ in `cd $PACKAGESRC; ls *.def *.lic *.pkg 2>/dev/null | sed 's/[-.].*//'`
+ do case " $package_src " in
+ *" $_i_ "*)
+ ;;
+ *) package_src="$package_src $_i_"
+ ;;
+ esac
+ done
+ ;;
+ esac
+}
+
+# check for native ascii 0:yes 1:no
+
+__isascii__=
+
+isascii()
+{
+ case $__isascii__ in
+ '') case `echo A | od -o | sed -e 's/[ ]*$//' -e '/[ ]/!d' -e 's/.*[ ]//'` in
+ 005101|040412) __isascii__=0 ;;
+ *) __isascii__=1 ;;
+ esac
+ esac
+ return $__isascii__
+}
+
+case $action in
+
+admin) while test ! -f $admin_db
+ do case $admin_db in
+ /*) echo $command: $action: $admin_db: data file not found >&2
+ exit 1
+ ;;
+ esac
+ view file src lib/package/admin/$admin_db || exit 1
+ admin_db=$_view_
+ done
+ admin_components=
+ case $admin_action in
+ list) cat $admin_db
+ exit
+ ;;
+ test) set $admin_args
+ while :
+ do case $# in
+ 1) break ;;
+ esac
+ shift
+ case $1 in
+ *=*) ;;
+ *) admin_components=-$1
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+ : all work done in $PACKAGESRC/admin
+ cd $PACKAGESRC/admin || exit
+ checksrc
+ packages=
+ admin_log=${admin_action}${admin_components}.log
+ exec < $admin_db || exit
+ test -d $admin_log || $exec mkdir $admin_log || exit
+ case $admin_on in
+ '') admin_on="*" ;;
+ esac
+ hostname=
+ hosts=
+ logs=
+ local_hosts=
+ local_types=
+ pids=
+ remote_hosts=
+ sync_hosts=
+ admin_host=_admin_host_
+ admin_out=
+ case " $admin_args " in
+ *" write binary "*|*" write "*" binary "*)
+ admin_binary=1
+ ;;
+ *) admin_binary=
+ ;;
+ esac
+ case $only in
+ 1) admin_args="only $admin_args" ;;
+ esac
+ trap 'kill $pids >/dev/null 2>&1' 1 2 3 15
+ index=0
+ while read type host root date time make test write owner attributes
+ do case $type in
+ ''|'#'*);;
+ *=*) eval "$type $host $root $date $time $make $test $write $owner $attributes"
+ ;;
+ *) case $admin_action in
+ make|test|write)
+ eval f='$'$admin_action
+ case $f in
+ *[!0123456789]*) continue ;;
+ esac
+ ;;
+ esac
+ rsh=rsh
+ case $host in
+ *@*) IFS=@
+ set '' $host
+ IFS=$ifs
+ user=${2}@
+ host=$3
+ ;;
+ *) user=
+ ;;
+ esac
+ : type=$type host=$host root=$root date=$date time=$time make=$make test=$test write=$write :
+ name=$host
+ host=`echo $name | sed 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789],__,g'`
+ eval x='$'${host}_index
+ eval ${host}_index=1
+ case $x in
+ 1) i=0
+ while :
+ do case $i in
+ $index) h=''
+ break
+ ;;
+ esac
+ i=`expr $i + 1`
+ eval h='$'${admin_host}${i}_name
+ case $h in
+ $host) host=${admin_host}${i}
+ eval user='$'${host}_user root='$'${host}_rsh:$host:'$'${host}_root
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+ case $root in
+ *:$name:*)root=`echo '' $root | sed 's,:.*,:,'` ;;
+ esac
+ case $root in
+ *:*:*) index=`expr $index + 1`
+ host=${admin_host}$index
+ ;;
+ *:*) case " $sync_hosts " in
+ *" $name ${admin_host}"*)
+ set '' '' $sync_hosts
+ while :
+ do shift
+ shift
+ case $1 in
+ $name) host=$2
+ break
+ ;;
+ esac
+ done
+ ;;
+ *) index=`expr $index + 1`
+ host=${admin_host}$index
+ sync_hosts="$sync_hosts $name $host"
+ ;;
+ esac
+ ;;
+ *) index=`expr $index + 1`
+ host=${admin_host}$index
+ ;;
+ esac
+ case $root in
+ -*) continue
+ ;;
+ *:*) case $admin_all in
+ 0) continue ;;
+ esac
+ case $root in
+ *:) root=${root}. ;;
+ esac
+ IFS=:
+ set '' $root
+ IFS=$ifs
+ sync=$host
+ case $hostname in
+ '') hostinfo name
+ hostname=$_hostinfo_
+ ;;
+ esac
+ shift
+ case $# in
+ 0) ;;
+ 1) root=$1
+ ;;
+ 2) rsh=$1 root=$2
+ ;;
+ *) rsh=$1 sync=$2 root=$3
+ case $sync in
+ ${admin_host}*)
+ ;;
+ ?*) case " $sync_hosts " in
+ *" $sync ${admin_host}"*)
+ set '' '' $sync_hosts
+ while :
+ do shift
+ shift
+ case $1 in
+ $sync) sync=$2
+ break
+ ;;
+ esac
+ done
+ ;;
+ *) index=`expr $index + 1`
+ x=${admin_host}$index
+ sync_hosts="$sync_hosts $sync $x"
+ sync=$x
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) sync=
+ ;;
+ esac
+ case $name in
+ $admin_on)
+ keep=1
+ ;;
+ *) case " $admin_on " in
+ *" $name "*) keep=1 ;;
+ *) keep=0 ;;
+ esac
+ ;;
+ esac
+ case " $admin_out " in
+ *" $name "*)
+ log=$name.$type
+ ;;
+ *) admin_out="$admin_out $name"
+ log=$name
+ ;;
+ esac
+ case $sync in
+ '') local_types="$local_types $type" ;;
+ esac
+ case $sync in
+ $host) remote_hosts="$remote_hosts $host"
+ ;;
+ ?*) eval ${sync}_share=\"\$${sync}_share $host\"
+ ;;
+ '') local_hosts="$local_hosts $host"
+ ;;
+ esac
+ eval ${host}_name='$'name ${host}_type='$'type ${host}_user='$'user ${host}_sync='$'sync ${host}_snarf='$'sync ${host}_rsh='$'rsh ${host}_root='$'root ${host}_keep='$'keep ${host}_log='$'log
+ ;;
+ esac
+ done
+ p=
+ for i in $admin_args
+ do p="$i $p"
+ done
+ admin_pkgs=
+ for i in $p
+ do if view - src "lib/package/$i.pkg"
+ then case $admin_pkgs in
+ '') admin_pkgs="$i" ;;
+ *) admin_pkgs="$admin_pkgs|$i" ;;
+ esac
+ fi
+ done
+ : "admin_binary :" $admin_binary
+ : "admin_args :" $admin_args
+ : "admin_pkgs :" $admin_pkgs
+ : "admin_on :" "$admin_on"
+ : "local_hosts :" $local_hosts
+ : "local_types :" $local_types
+ : "remote_hosts :" $remote_hosts
+ : "sync_hosts :" $sync_hosts
+ : "sync_share :" $sync_share
+ case $admin_binary in
+ 1) admin_bin_types=
+ admin_bin_main=
+ for main in $local_hosts $remote_hosts
+ do eval share=\$${main}_share keep=\$${main}_keep
+ case $keep in
+ 0*) continue ;;
+ esac
+ for host in $main $share
+ do case " $admin_bin_hosts " in
+ *" $host "*)
+ continue
+ ;;
+ esac
+ eval type=\$${host}_type
+ case " $admin_bin_types " in
+ *" $type "*)
+ continue
+ ;;
+ esac
+ case " $types " in
+ " ") ;;
+ *" $type "*)
+ ;;
+ *) continue
+ ;;
+ esac
+ admin_bin_hosts="$admin_bin_hosts $host"
+ admin_bin_types="$admin_bin_types $type"
+ case " $admin_bin_hosts " in
+ *" $main "*)
+ ;;
+ *) case " $admin_bin_main " in
+ *" $main "*)
+ ;;
+ *) admin_bin_main="$admin_bin_main $main"
+ ;;
+ esac
+ ;;
+ esac
+ done
+ done
+ local=
+ remote=
+ for host in $admin_bin_main $admin_bin_hosts
+ do case " $local_hosts " in
+ *" $host "*)
+ local="$local $host"
+ ;;
+ *) case " $remote_hosts " in
+ *" $host "*)
+ remote="$remote $host"
+ ;;
+ esac
+ ;;
+ esac
+ done
+ local_hosts=$local
+ remote_hosts=$remote
+ ;;
+ esac
+ for host in $remote_hosts $local_hosts
+ do eval share=\$${host}_share
+ case $share in
+ ?*) while :
+ do oshare=$share
+ for s in $share
+ do eval r='$'${s}_share
+ case $r in
+ ?*) case " $share " in
+ *" $r "*) ;;
+ *) share="$share $r" ;;
+ esac
+ ;;
+ esac
+ done
+ case $share in
+ $oshare) eval ${host}_share="'$share'"
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+ done
+ for host in $remote_hosts
+ do eval type=\$${host}_type
+ case " $local_types " in
+ *" $type "*)
+ eval ${host}_snarf=
+ ;;
+ esac
+ eval name=\$${host}_name keep=\$${host}_keep share=\$${host}_share
+ for share in $share
+ do eval type=\$${share}_type keep=\$keep\$${share}_keep
+ case " $local_types " in
+ *" $type "*)
+ eval ${share}_snarf=
+ ;;
+ esac
+ done
+ case $keep in
+ 0*1*) keep=2$keep ;;
+ *1*) ;;
+ *) keep=0 ;;
+ esac
+ eval ${host}_keep=$keep
+ done
+ for host in $remote_hosts $local_hosts
+ do eval name=\$${host}_name user=\$${host}_user type=\$${host}_type sync=\$${host}_sync snarf=\$${host}_snarf share=\$${host}_share rsh=\$${host}_rsh root=\$${host}_root keep=\$${host}_keep
+ case $keep in
+ 0*) continue ;;
+ esac
+ case $sync in
+ '') case $admin_action in
+ ditto) continue ;;
+ esac
+ case $admin_binary in
+ 1) case $keep in
+ 1*|?*1*);;
+ *) continue ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ eval main_log='$'${host}_log
+ main=
+ share_keep=
+ for i in $host $share
+ do eval n='$'${i}_name t='$'${i}_type q='$'${i}_sync s='$'${i}_snarf l='$'${i}_log k='$'${i}_keep
+ case $main:$k in
+ :*) ;;
+ *:0) continue ;;
+ esac
+ case $admin_binary in
+ 1) case $s:$q in
+ :?*) continue ;;
+ esac
+ case " $admin_bin_hosts " in
+ *" $i "*)
+ ;;
+ *) continue
+ ;;
+ esac
+ ;;
+ esac
+ case $main in
+ '') main=$i ;;
+ *) share_keep="$share_keep $i" ;;
+ esac
+ echo package "$admin_args" "[ $n $t ]"
+ case $exec in
+ '') : > $admin_log/$l ;;
+ *) $exec ": > $admin_log/$l" ;;
+ esac
+ done
+ host=$main
+ share=$share_keep
+ case $force in
+ 0) admin_ditto_update=--update ;;
+ *) admin_ditto_update= ;;
+ esac
+ case $exec in
+ '') {
+ case $admin_binary:$sync in
+ :?*) eval syncname='$'${sync}_name
+ test -x $PACKAGEROOT/bin/package && $admin_ditto $admin_ditto_update --remote=$rsh --expr="name=='package'" $PACKAGEROOT/bin $user$syncname:$root/bin
+ test -d $PACKAGESRC && $admin_ditto $admin_ditto_update --remote=$rsh --expr="if(level>1&&path!='LICENSES/*')status=SKIP;path=='LICENSES*|*.(pkg|lic|def)'" $PACKAGESRC $user$syncname:$root/lib/package
+ for dir in $package_src
+ do case $MAKESKIP in
+ '') expr="--expr=if(name=='$admin_ditto_skip')status=SKIP" ;;
+ *) expr="--expr=if(name=='$admin_ditto_skip'||level==1&&name=='$MAKESKIP')status=SKIP" ;;
+ esac
+ test -d $PACKAGEROOT/src/$dir && $admin_ditto $admin_ditto_update --remote=$rsh "$expr" $PACKAGEROOT/src/$dir $user$syncname:$root/src/$dir
+ done
+ ;;
+ esac
+ case $admin_action in
+ ditto) ;;
+ ?*) pids=
+ set '' $host $share
+ while :
+ do shift
+ case $# in
+ 0) break
+ ;;
+ 1) remote $1
+ ;;
+ *) remote $1 &
+ pids="$pids $!"
+ ;;
+ esac
+ done
+ case $pids in
+ ?*) wait $pids ;;
+ esac
+ ;;
+ esac
+ } < /dev/null > $admin_log/$main_log 2>&1 &
+ pids="$pids $!"
+ ;;
+ *) echo "{"
+ case $admin_binary:$sync in
+ :?*) eval syncname='$'${sync}_name
+ test -d $PACKAGESRC && echo $admin_ditto $admin_ditto_update --remote=$rsh --expr="if(level>1)status=SKIP;name=='*.(pkg|lic|def)'" $PACKAGESRC $user$syncname:$root/lib/package
+ for dir in $package_src
+ do case $MAKESKIP in
+ '') expr="--expr=if(name=='$admin_ditto_skip')status=SKIP" ;;
+ *) expr="--expr=if(name=='$admin_ditto_skip'||level==1&&name=='$MAKESKIP')status=SKIP" ;;
+ esac
+ test -d $PACKAGEROOT/src/$dir && echo $admin_ditto $admin_ditto_update --remote=$rsh "$expr" $PACKAGEROOT/src/$dir $user$syncname:$root/src/$dir
+ done
+ ;;
+ esac
+ case $admin_action in
+ ditto) ;;
+ ?*) pids=
+ set '' $host $share
+ while :
+ do shift
+ case $# in
+ 0) break
+ ;;
+ 1) remote $1
+ ;;
+ *) remote $1 "&"
+ pids=1
+ ;;
+ esac
+ done
+ case $pids in
+ 1) echo wait ;;
+ esac
+ ;;
+ esac
+ echo "} < /dev/null > $admin_log/$main_log 2>&1 &"
+ ;;
+ esac
+ eval name='$'${main}_name
+ hosts="$hosts $name"
+ logs="$logs $main_log"
+ for share in $share
+ do eval keep=\$${share}_keep
+ case $keep in
+ 1) eval name='$'${share}_name log='$'${share}_log
+ hosts="$hosts $name"
+ logs="$logs $log"
+ ;;
+ esac
+ done
+ done
+ case $exec in
+ '') # track the progress
+ case $quiet in
+ 0) cd $admin_log
+ tail -t $PACKAGE_admin_tail_timeout -f $logs
+ cd ..
+ ;;
+ esac
+ # wait for the remote actions to complete
+ wait
+ trap - 1 2 3 15
+ # update the db
+ exec < $admin_db || exit
+ exec 9>&1
+ D=`date +%y%m%d`
+ while read line
+ do set -- $line
+ case $1 in
+ ''|'#'*|*=*)
+ ;;
+ *) case " $hosts " in
+ *" $2 "*)
+ : ast date command assumed :
+ E=`eval date -E \`egrep '[ ](start|done)[ ][ ]*at[ ]' $admin_log/$2 | sed -e 's/.*[ ][ ]*at[ ][ ]*//' -e 's/[ ][ ]*in[ ].*$//' -e 's/.*/"&"/'\``
+ M=$6 T=$7 W=$8
+ case $admin_action in
+ make|view)
+ M=`egrep -c ']:.* (\*\*\*.* code|don'\''t know) | \*\*\* termination code ' $admin_log/$2` ;;
+ test) T=`grep -ci 'fail[es]' $admin_log/$2` ;;
+ *) W=`grep '^[abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyz]*:.' $admin_log/$2 | egrep -cv 'start at|done at|output captured|warning:|: package not found|whence: command not found'` ;;
+ esac
+ case $1 in
+ ?|??|???|????|?????|??????|???????)
+ t1=' '
+ ;;
+ ????????|?????????|??????????|???????????|????????????|?????????????|??????????????|???????????????)
+ t1=' '
+ ;;
+ *) t1=''
+ ;;
+ esac
+ case $2 in
+ ?|??|???|????|?????|??????|???????)
+ t2=' '
+ ;;
+ *) t2=''
+ ;;
+ esac
+ case $3 in
+ ?|??|???|????|?????|??????|???????)
+ t3=' '
+ ;;
+ *) t3=''
+ ;;
+ esac
+ case $E in
+ ?????) E=" $E" ;;
+ ????) E=" $E" ;;
+ ???) E=" $E" ;;
+ ??) E=" $E" ;;
+ ?) E=" $E" ;;
+ esac
+ case $M in
+ ???) M="$M" ;;
+ ??) M=" $M" ;;
+ ?) M=" $M" ;;
+ '') M=" 0" ;;
+ esac
+ case $T in
+ ???) T="$T" ;;
+ ??) T=" $T" ;;
+ ?) T=" $T" ;;
+ '') T=" 0" ;;
+ esac
+ case $W in
+ ???) W="$W" ;;
+ ??) W=" $W" ;;
+ ?) W=" $W" ;;
+ '') W=" 0" ;;
+ esac
+ A=$1$t1
+ H=$2$t2
+ R=$3$t3
+ case $# in
+ [0-8]) O=
+ K=
+ ;;
+ *) shift 8
+ O=$1
+ K=$2
+ case $O in
+ ''|?|??|???) K=" $K" ;;
+ esac
+ case $# in
+ [0-2]) ;;
+ *) K="$K $*" ;;
+ esac
+ ;;
+ esac
+ echo "$A $H $R $D $E $M $T $W $O $K"
+ echo "$A $H $R $D $E $M $T $W $O $K" >&9
+ continue
+ ;;
+ esac
+ ;;
+ esac
+ echo "$line"
+ done > $admin_db.new
+ mv $admin_db $admin_db.old
+ mv $admin_db.new $admin_db
+ ;;
+ esac
+ ;;
+
+clean|clobber)
+ cd $PACKAGEROOT
+ $exec rm -rf $INSTALLROOT
+ exit
+ ;;
+
+contents|list)
+ # all work in $PACKAGESRC
+
+ cd $PACKAGESRC
+
+ # generate the package list
+
+ set '' $target $package
+ shift
+ argc=$#
+ case $# in
+ 0) set '' *.pkg
+ case $2 in
+ '*.pkg')
+ echo $command: $action: no packages >&2
+ exit 1
+ ;;
+ esac
+ set '' `echo $* | sed 's,\.pkg,,g'`
+ shift
+ ;;
+ esac
+ sep="$nl "
+ echo packages in $PACKAGEROOT
+ case $action in
+ list) echo
+ echo "NAME${nl}VERSION${nl}RELEASE${nl}TYPE${nl}STATUS${nl}REQUIRES${nl}----${nl}-------${nl}-------${nl}----${nl}------${nl}--------" | pr -6 -a -o4 -t
+ ;;
+ esac
+ {
+ omit=:
+ for pkg
+ do if test ! -f $pkg.pkg
+ then echo $command: $action: $pkg: not a package >&2
+ else if test -f gen/$pkg.ver
+ then set '' `cat gen/$pkg.ver`
+ case $3 in
+ $2) ver=base ;;
+ *) ver=$3 ;;
+ esac
+ if test -s tgz/$pkg.tim
+ then sts=local
+ else sts=
+ fi
+ else ver=
+ sts=unwritten
+ fi
+ typ=
+ txt=
+ cmp= cmp_sep=
+ req= req_sep=
+ op=::
+ exec < $pkg.pkg
+ while read line
+ do IFS=' \\'
+ set '' $line
+ IFS=$ifs
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ :*:) op=$1
+ ;;
+ INIT|'$('*|*')')
+ ;;
+ *) case $op in
+ :DESCRIPTION:)
+ txt="$txt$sep$line"
+ break
+ ;;
+ :PACKAGE:)
+ cmp="$cmp$cmp_sep$1"
+ cmp_sep=$nl
+ ;;
+ :REQUIRES:)
+ req="$req$req_sep$1"
+ req_sep=" "
+ ;;
+ esac
+ ;;
+ esac
+ done
+ done
+ exec < /dev/null
+ case $txt in
+ ?*) txt="$nl$txt" ;;
+ esac
+ case :$ver: in
+ *::*) ;;
+ *) case $action in
+ list) case $sts in
+ '') case `ls -t "tgz/$pkg.$ver.base" "tgz/$pkg.tim" 2>/dev/null` in
+ "tgz/$pkg.tim"*)
+ sts=read
+ ;;
+ *) sts=unread
+ ;;
+ esac
+ ;;
+ esac
+ echo "$pkg${nl}$ver${nl}base${nl}$typ${nl}$sts${nl}$req"
+ case $typ in
+ '') omit=$omit$pkg.$ver.base: ;;
+ esac
+ ;;
+ *) case $req in
+ ?*) req=": $req" ;;
+ esac
+ echo
+ echo $pkg $ver $req "$txt"
+ case $cmp in
+ ?*) echo "${sep}Components in this package:$nl"
+ echo "$cmp" | pr -4 -o4 -t ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ case $argc:$action in
+ 0:list) if test -d tgz
+ then cd tgz
+ # f:file p:package v:version r:release t:type u:update
+ for f in `find . -name '*?[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]*' -print | sed 's,^\./,,' | sort -r`
+ do eval `echo "$f" | sed -e 's,\.c$,,' -e 's,\.gz$,,' -e 's,\.exe$,,' -e 's,\.tgz$,,' -e 's,\([^_.]*\)[_.]\([0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]\)[_.]\([0123456789][0123456789][0123456789][0123456789][^_.]*\)[_.]*\(.*\),p=\1 v=\2 r=\3 t=\4,' -e 's,\([^_.]*\)[_.]\([0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]\)[_.]*\(.*\),p=\1 v=\2 r=base t=\3,'`
+ case $t in
+ '') case $omit in
+ *:$p.$v.$r:*) continue ;;
+ esac
+ u=$p.tim
+ ;;
+ *) u=$p.$t.tim
+ ;;
+ esac
+ if test -s "$u"
+ then s=local
+ elif test -f "$u"
+ then case `ls -t "$f" "$u" 2>/dev/null` in
+ "$u"*) s=read ;;
+ *) s=unread ;;
+ esac
+ else s=unread
+ fi
+ echo "$p$nl$v$nl$r$nl$t$nl$s$nl"
+ done
+ fi
+ ;;
+ esac
+ } |
+ case $action in
+ list) pr -6 -a -o4 -t | sort -u ;;
+ *) cat ;;
+ esac
+ case $argc in
+ 0) if test -d $PACKAGEROOT/arch
+ then echo
+ echo architectures in $PACKAGEROOT
+ echo
+ for i in `ls $PACKAGEROOT/arch`
+ do if test -f $PACKAGEROOT/arch/$i/lib/package/gen/host
+ then h=`cat $PACKAGEROOT/arch/$i/lib/package/gen/host`
+ else h=
+ fi
+ echo $i
+ echo $h
+ echo
+ echo
+ done | pr -4 -a -o4 -t
+ fi
+ ;;
+ esac
+ ;;
+
+copyright)
+ # all work in $PACKAGESRC
+
+ cd $PACKAGESRC
+
+ # generate the package list
+
+ set '' $target $package
+ shift
+ argc=$#
+ case $# in
+ 0) set '' `echo *.lic | sed 's,\.lic,,g'`
+ shift
+ case $1 in
+ '*') echo $command: $action: no packages >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ esac
+ checkaout proto || exit
+ for i
+ do copyright $i
+ done
+ ;;
+
+export) case $INSTALLROOT in
+ $PACKAGEROOT)
+ INSTALLROOT=$INSTALLROOT/arch/$HOSTTYPE
+ ;;
+ esac
+ case $only in
+ 0) v='$i=' ;;
+ *) v= ;;
+ esac
+ set '' $target $package
+ case $# in
+ 1) set '' $env ;;
+ esac
+ while :
+ do case $# in
+ 1) break ;;
+ esac
+ shift
+ i=$1
+ eval echo ${v}'$'${i}
+ done
+ ;;
+
+install)cd $PACKAGEROOT
+ set '' $package
+ shift
+ case $only in
+ 0) set '' `order "$@"`
+ shift
+ ;;
+ esac
+ case $# in
+ 0) echo "$command: at least one package name expected" >&2
+ exit 1
+ ;;
+ esac
+ package=$*
+ requirements - $package
+ set '' $target
+ shift
+ case $1 in
+ flat) flat=1 # backwards compatibility -- documentation dropped
+ shift
+ ;;
+ esac
+ case $# in
+ 0) echo "$command: $action: target directory argument expected" >&2
+ exit 1
+ ;;
+ esac
+ target=
+ while :
+ do case $# in
+ 1) directory=$1
+ break
+ ;;
+ esac
+ target="$target $1"
+ shift
+ done
+ if test ! -d $directory
+ then echo "$command: $action: $directory: target directory not found" >&2
+ exit 1
+ fi
+ case $target in
+ '') cd arch
+ set '' *
+ shift
+ target=$*
+ cd ..
+ ;;
+ esac
+ code=0
+ makecheck=1
+ for a in $target
+ do case $a in
+ -) a=$HOSTTYPE ;;
+ esac
+ case $flat:$a in
+ 1:*|?:.)dest=$directory
+ ;;
+ *) dest=$directory/arch/$a
+ if test "" = "$exec" -a ! -d $dest
+ then mkdir -p $dest || {
+ echo "$command: $dest: destination directory must exist" >&2
+ exit 1
+ }
+ fi
+ ;;
+ esac
+ for i in $package
+ do if test "ratz" = "$i"
+ then : skip
+ elif test -f arch/$a/lib/package/gen/$i.sum
+ then package_install $directory arch/$a/lib/package/gen/$i.sum || code=1
+ elif test ! -d arch/$a/bin
+ then echo "$command: $a: invalid architecture" >&2
+ elif test ! -d $dest
+ then echo "$command: $dest: destination directory must exist" >&2
+ else if test "" != "$makecheck"
+ then if onpath $MAKE
+ then MAKE=$_onpath_
+ else echo "$command: $MAKE: not found" >&2
+ exit 1
+ fi
+ makecheck=
+ fi
+ if test "" != "$exec"
+ then (
+ trap - 0 1 2 15
+ echo "=== $i installation manifest ==="
+ cd arch/$a
+ (
+ cd lib/package
+ INSTALLROOT=$PACKAGEROOT/arch/$a
+ VPATH=$INSTALLROOT:$PACKAGEROOT:$VPATH
+ export INSTALLROOT VPATH
+ $MAKE -s $makeflags -f $i.pkg $qualifier list.installed $assign
+ ) | sort -u
+ )
+ else (
+ set -
+ cd arch/$a
+ (
+ cd lib/package
+ INSTALLROOT=$PACKAGEROOT/arch/$a
+ VPATH=$INSTALLROOT:$PACKAGEROOT:$VPATH
+ export INSTALLROOT VPATH
+ echo lib/$command
+ $MAKE -s $makeflags -f $i.pkg $qualifier list.installed $assign
+ ) | sort -u | pax -drw -ps $dest
+ )
+ fi
+ fi
+ done
+ done
+ exit $code
+ ;;
+
+license)# all work in $PACKAGESRC/LICENSES
+
+ cd $PACKAGESRC/LICENSES || exit
+
+ # generate the package list
+
+ set '' $target $package
+ shift
+ argc=$#
+ case $# in
+ 0) set '' *
+ shift
+ case $1 in
+ '*') echo $command: $action: no licenses >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ *) checkaout proto || exit
+ a=
+ for i
+ do while :
+ do if test -f ../$i.lic
+ then j=`proto -df -l ../$i.lic -o query=type /dev/null 2>/dev/null`
+ case $j in
+ ?*) if test -f $j
+ then case " $a " in
+ *" $j "*) ;;
+ *) a="$a $j" ;;
+ esac
+ fi
+ break
+ ;;
+ esac
+ fi
+ case $i in
+ *-*) i=`echo $i | sed 's/-[^-]*$//'`
+ ;;
+ *) echo "$command: $i: package license not found" >&2
+ break
+ ;;
+ esac
+ done
+ done
+ set '' $a
+ shift
+ ;;
+ esac
+ for i
+ do case $exec in
+ '') echo
+ echo " --- $i source license ---"
+ echo
+ cat $i
+ ;;
+ *) echo $PACKAGESRC/LICENSES/$i
+ ;;
+ esac
+ done
+ ;;
+
+make|view)
+ cd $PACKAGEROOT
+ case $package in
+ '') lic="lib/package/*.lic"
+ ;;
+ *) for i in $package
+ do lic="$lic lib/package/$i.lic"
+ case $i in
+ *-*) lic="$lic lib/package/"`echo $i | sed 's,-.*,,'`".lic" ;;
+ esac
+ done
+ ;;
+ esac
+ checksrc
+ requirements source $package
+ components $package
+ package=$_components_
+
+ # check for some required commands
+
+ must="$AR"
+ warn="$NM yacc bison"
+ test="$must $warn"
+ have=
+ IFS=:
+ set /$IFS$PATH
+ IFS=$ifs
+ shift
+ for t in $test
+ do if executable $t
+ then have="$have $t"
+ fi
+ done
+ for d
+ do for t in $test
+ do case " $have " in
+ *" $t "*)
+ ;;
+ *) if executable $d/$t
+ then have="$have $t"
+ fi
+ ;;
+ esac
+ done
+ done
+ case " $have " in
+ *" bison "*) ;;
+ *" yacc "*) have="$have bison" ;;
+ esac
+ case " $have " in
+ *" yacc "*) ;;
+ *" bison "*) have="$have yacc" ;;
+ esac
+ for t in $test
+ do case " $have " in
+ *" $t "*)
+ ;;
+ *) case " $must " in
+ *" $t "*)
+ echo "$command: $t: not found -- must be on PATH to $action" >&2
+ exit 1
+ ;;
+ *) echo "$command: warning: $t: not found -- some $action actions may fail" >&2
+ ;;
+ esac
+ ;;
+ esac
+ done
+
+ # verify the top view
+
+ if test ! -d $PACKAGEROOT/src
+ then note no source packages to make
+ exit 0
+ elif test ! -d $INSTALLROOT/src
+ then note initialize the $INSTALLROOT view
+ fi
+ for i in arch arch/$HOSTTYPE
+ do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
+ done
+ for i in bin bin/$OK bin/$OK/lib fun include lib lib/package lib/package/gen src man man/man1 man/man3 man/man8
+ do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit
+ done
+ make_recurse src
+ o= k=
+ for i in $makefiles
+ do case $o in
+ ?*) o="$o -o" k="$k|" ;;
+ esac
+ o="$o -name $i"
+ k="$k$i"
+ done
+ o="( $o ) -print"
+ for d in $package_src
+ do i=src/$d
+ if test -d $i
+ then test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit
+ make_recurse $i
+ for j in `cd $i; find . $o 2>/dev/null | sed -e 's,^\./,,' -e '/\//!d' -e 's,/[^/]*$,,' | sort -u`
+ do case $j in
+ $k|$MAKESKIP) continue ;;
+ esac
+ test -d $INSTALLROOT/$i/$j ||
+ $exec mkdir -p $INSTALLROOT/$i/$j || exit
+ done
+ fi
+ done
+ def=
+ for i in $lic
+ do test -f $i || continue
+ cmp -s $i $INSTALLROOT/$i 2>/dev/null ||
+ $exec cp $PACKAGEROOT/$i $INSTALLROOT/$i
+ for j in `grep '^. .*\.def$' $i`
+ do case $j in
+ .) ;;
+ *) case " $def " in
+ *" $i "*) ;;
+ *) def="$def $i" ;;
+ esac
+ ;;
+ esac
+ done
+ done
+ for i in $def
+ do i=lib/package/$i
+ test -f $i || continue
+ cmp -s $i $INSTALLROOT/$i 2>/dev/null ||
+ $exec cp $PACKAGEROOT/$i $INSTALLROOT/$i
+ done
+
+ # check $CC and { ar cc ld ldd } intercepts
+
+ h="${HOSTTYPE} ${HOSTTYPE}.*"
+ case $HOSTTYPE in
+ *.*) t=`echo $HOSTTYPE | sed 's/[.][^.]*//'`
+ h="$h $t"
+ ;;
+ *) t=$HOSTTYPE
+ ;;
+ esac
+ case $t in
+ *[0123456789])
+ t=`echo $t | sed 's/[0123456789]*$//'`
+ h="$h $t"
+ ;;
+ esac
+ case $CC in
+ cc) c=cc
+ b=$INSTALLROOT/bin/$c
+ t=$INSTALLROOT/lib/package/gen/$c.tim
+ intercept=0
+ for k in $h
+ do for s in $INITROOT/$c.$k
+ do test -x "$s" || continue
+ if cmp -s "$s" "$b" >/dev/null 2>&1
+ then intercept=1
+ break 2
+ fi
+ case `ls -t "$t" "$b" "$s" 2>/dev/null` in
+ $t*) ;;
+ $b*) cc=$b
+ ;;
+ $s*) cd $INSTALLROOT/lib/package/gen
+ tmp=pkg$$
+ eval '$'exec echo "'int main(){return 0;}' > $tmp.c"
+ if $exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 &&
+ test -x $tmp.exe
+ then case $HOSTTYPE in
+ *.mips*)$s -version >/dev/null 2>&1 || s= ;;
+ esac
+ case $s in
+ ?*) $exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit
+ $exec chmod +x "$b" || exit
+ cc=$b
+ intercept=1
+ note update $b
+ ;;
+ esac
+ fi
+ $exec rm -f $tmp.*
+ $exec touch "$t"
+ cd $PACKAGEROOT
+ ;;
+ esac
+ break 2
+ done
+ done
+ case $intercept in
+ 1) c=ld
+ b=$INSTALLROOT/bin/$c
+ for k in $h
+ do for s in $INITROOT/$c.$k
+ do test -x "$s" || continue
+ case `ls -t "$b" "$s" 2>/dev/null` in
+ $b*) ;;
+ $s*) $exec cp "$s" "$b"
+ note update $b
+ ;;
+ esac
+ done
+ done
+ ;;
+ esac
+ ;;
+ esac
+ c=ldd
+ b=$INSTALLROOT/bin/$c
+ for t in $h
+ do s=$INITROOT/$c.$t
+ test -x "$s" || continue
+ onpath $c ||
+ case `ls -t "$b" "$s" 2>/dev/null` in
+ $b*) ;;
+ $s*) $exec cp "$s" "$b"
+ note update $b
+ ;;
+ esac
+ done
+# following code stubbed out just in case ar.ibm.risc is needed
+# c=ar
+# b=$INSTALLROOT/bin/$c
+# for t in $h
+# do s=$INITROOT/$c.$t
+# test -x "$s" || continue
+# onpath $c ||
+# case `ls -t "$b" "$s" 2>/dev/null` in
+# $b*) ;;
+# $s*) x=`$s -tv /foo/bar.a 2>&1 | egrep -i 'option|usage'`
+# case $x in
+# '') $exec cp "$s" "$b"
+# note update $b
+# ;;
+# esac
+# ;;
+# esac
+# done
+ case $cc in
+ /*) ;;
+ *) echo "$command: $CC: not found -- set CC=C-compiler" >&2
+ exit 1
+ ;;
+ esac
+ case $exec in
+ '') cd $INSTALLROOT/lib/package/gen
+ tmp=pkg$$
+ echo 'int main(){return 0;}' > $tmp.c
+ if $CC -o $tmp.exe $tmp.c > /dev/null 2> $tmp.err &&
+ test -x $tmp.exe
+ then : ok
+ else echo "$command: $CC: failed to compile this program:" >&2
+ cat $tmp.c >&2
+ if test -s $tmp.err
+ then cat $tmp.err >&2
+ else echo "$command: $CC: not a C compiler" >&2
+ fi
+ rm -f $tmp.*
+ exit 1
+ fi
+ rm -f $tmp.*
+ cd $PACKAGEROOT
+ ;;
+ esac
+
+ # remember the default $CC
+
+ case $CC in
+ cc) ;;
+ *) if test -x $INSTALLROOT/bin/cc
+ then case `sed 1q $INSTALLROOT/bin/cc` in
+ ": $CC :")
+ CC=cc
+ export CC
+ ;;
+ *) assign="$assign CC=\"\$CC\""
+ ;;
+ esac
+ else case $CROSS in
+ 1) assign="$assign CC=\"\$CC\""
+ ;;
+ *) case $exec in
+ '') {
+ echo ": $CC :"
+ echo "$CC \"\$@\""
+ } > $INSTALLROOT/bin/cc
+ chmod +x $INSTALLROOT/bin/cc
+ ;;
+ *) note generate a $INSTALLROOT/bin/cc wrapper for $CC
+ ;;
+ esac
+ CC=cc
+ export CC
+ ;;
+ esac
+ fi
+ ;;
+ esac
+
+ # no $INITROOT means INIT already installed elsewhere
+
+ if test -d $INITROOT
+ then
+ # update probe scripts
+
+ for i in lib/probe lib/probe/C lib/probe/C/make
+ do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit
+ done
+ i=$INSTALLROOT/lib/probe/C/make/probe
+ j=$INITROOT/C+probe
+ k=$INITROOT/make.probe
+ case `ls -t $i $j $k 2>/dev/null` in
+ $i*) ;;
+ *) if test -f $j -a -f $k
+ then note update $i
+ shellmagic
+ case $exec in
+ '') {
+ case $SHELLMAGIC in
+ ?*) echo "$SHELLMAGIC" ;;
+ esac
+ cat $j $k
+ } > $i || exit
+ ;;
+ *) echo "{
+echo $SHELLMAGIC
+cat $j $k
+} > $i"
+ ;;
+ esac
+ $exec chmod +x $i || exit
+ fi
+ ;;
+ esac
+ fi
+
+ # initialize a few mamake related commands
+
+ checkaout mamake proto ratz release || exit
+
+ # execrate if necessary
+
+ if (execrate) >/dev/null 2>&1
+ then execrate=execrate
+ $make cd $INSTALLROOT/bin
+ for i in chmod chgrp cmp cp ln mv rm
+ do if test ! -x $OK/$i -a -x /bin/$i.exe
+ then shellmagic
+ case $exec in
+ '') echo "$SHELLMAGIC"'execrate /bin/'$i' "$@"' > $OK/$i
+ chmod +x $OK/$i
+ ;;
+ *) $exec echo \'"$SHELLMAGIC"'execrate /bin/'$i' "$@"'\'' >' $OK/$i
+ $exec chmod +x $OK/$i
+ ;;
+ esac
+ fi
+ done
+ PATH=$INSTALLROOT/bin/$OK:$PATH
+ export PATH
+ else execrate=
+ fi
+ case $action in
+ view) exit 0 ;;
+ esac
+
+ # all work under $INSTALLROOT/src
+
+ $make cd $INSTALLROOT/src
+
+ # record the build host name
+
+ case $noexec in
+ '') hostinfo name
+ echo "$_hostinfo_" | sed 's,\..*,,' > $PACKAGEBIN/gen/host
+ ;;
+ esac
+
+ # make in parallel if possible
+
+ case $NPROC in
+ '') hostinfo cpu
+ case $_hostinfo_ in
+ 0|1) ;;
+ *) NPROC=$_hostinfo_
+ $show NPROC=$NPROC
+ $show export NPROC
+ export NPROC
+ ;;
+ esac
+ ;;
+ esac
+
+ # separate flags from target list
+
+ case $target in
+ *-*) a=
+ for t in $target
+ do case $t in
+ -[eiknFKNV]*|--*-symbols)
+ makeflags="$makeflags $t"
+ ;;
+ -*) nmakeflags="$nmakeflags $t"
+ ;;
+ *) a="$a $t"
+ ;;
+ esac
+ done
+ target=$a
+ ;;
+ esac
+
+ # generate nmake first if possible
+
+ if executable ! $NMAKE && test -d $PACKAGEROOT/src/cmd/nmake
+ then if nonmake $MAKE
+ then note make $NMAKE with mamake
+ c=$CC
+ a=$assign
+ case $HOSTTYPE in
+ win32*|cygwin*)
+ CC="$CC -D_BLD_STATIC"
+ accept="libast"
+ case $assign in
+ *' CC='*) ;;
+ *) assign="$assign CC=\"\$CC\"" ;;
+ esac
+ ;;
+ *) accept=nmake
+ ;;
+ esac
+ eval capture mamake \$makeflags \$nmakeflags \$noexec install nmake $assign
+ assign=$a
+ CC=$c
+ case $make$noexec in
+ '') if executable ! $NMAKE
+ then echo "$command: $action: errors making $NMAKE" >&2
+ exit 1
+ fi
+ ;;
+ *) make=echo
+ ;;
+ esac
+ if test '' != "$PROTOROOT"
+ then if (vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT) >/dev/null 2>&1 &&
+ vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT
+ then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN
+ else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
+ $show VPATH=$VPATH
+ export VPATH
+ fi
+ fi
+ note believe generated files for $accept
+ eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign
+ $exec touch $INSTALLROOT/bin/.paths
+ note make the remaining targets with $NMAKE
+ else eval capture $MAKE \$makeflags \$nmakeflags \$noexec install nmake $assign
+ case $make$noexec in
+ '') if executable ! $NMAKE
+ then echo "$command: $action: errors making $NMAKE" >&2
+ exit 1
+ fi
+ ;;
+ *) make=echo
+ ;;
+ esac
+ fi
+ fi
+
+ # generate ksh next if possible
+
+ if nonmake $MAKE
+ then : no need to generate ksh next -- it could be the only package
+ elif test "$KEEP_SHELL" != 1 -a -d $PACKAGEROOT/src/cmd/ksh93 && executable ! $KSH
+ then eval capture nmake $nmakeflags \$makeflags \$noexec install ksh93 $assign
+ case $make$noexec in
+ '') if executable ! $KSH
+ then echo "$command: $action: errors making $KSH" >&2
+ exit 1
+ fi
+ ;;
+ *) make=echo
+ ;;
+ esac
+ fi
+
+ # mamprobe data should have been generated by this point
+
+ case $exec in
+ '') if test ! -f $INSTALLROOT/bin/.paths -o -w $INSTALLROOT/bin/.paths
+ then N='
+'
+ b= f= h= n= p= u= B= L=
+ if test -f $INSTALLROOT/bin/.paths
+ then exec < $INSTALLROOT/bin/.paths
+ while read x
+ do case $x in
+ '#'?*) case $h in
+ '') h=$x ;;
+ esac
+ ;;
+ *BUILTIN_LIB=*) b=$x
+ ;;
+ *FPATH=*) f=$x
+ ;;
+ *PLUGIN_LIB=*) p=$x
+ ;;
+ *) case $u in
+ ?*) u=$u$N ;;
+ esac
+ u=$u$x
+ ;;
+ esac
+ done
+ fi
+ ifs=$IFS
+ m=
+ case $p in
+ ?*) b=
+ ;;
+ esac
+ case $b in
+ ?*) IFS='='
+ set $b
+ IFS=$ifs
+ shift
+ p="PLUGIN_LIB=$*"
+ case $b in
+ [Nn][Oo]*) p=no$p ;;
+ esac
+ m=1
+ ;;
+ esac
+ case $f in
+ '') f="FPATH=../fun"
+ m=1
+ ;;
+ esac
+ case $h in
+ '') h='# use { no NO } prefix to permanently disable #' ;;
+ esac
+ case $p in
+ '') p="PLUGIN_LIB=cmd"
+ if grep '^setv mam_cc_DIALECT .* EXPORT=[AD]LL' $INSTALLROOT/lib/probe/C/mam/* >/dev/null 2>&1
+ then p=no$p
+ fi
+ m=1
+ ;;
+ esac
+ case $m in
+ 1) case $u in
+ ?*) u=$N$u ;;
+ esac
+ echo "$h$N$p$N$f$N$u" > $INSTALLROOT/bin/.paths
+ ;;
+ esac
+ fi
+ ;;
+ esac
+
+ # run from separate copies since nmake and ksh may be rebuilt
+
+ case $EXECROOT in
+ $INSTALLROOT)
+ $make cd $INSTALLROOT/bin
+ if executable /bin/cp
+ then cp=/bin/cp
+ else cp=cp
+ fi
+ if executable /bin/mv
+ then mv=/bin/mv
+ else mv=mv
+ fi
+ if executable /bin/rm
+ then rm=/bin/rm
+ else rm=rm
+ fi
+ for i in \
+ ksh nmake tee cp ln mv rm \
+ *ast*.dll *cmd*.dll *dll*.dll *shell*.dll
+ do executable $i && {
+ cmp -s $i $OK/$i 2>/dev/null || {
+ test -f $OK/$i &&
+ $exec $execrate $rm $OK/$i </dev/null
+ test -f $OK/$i &&
+ $exec $execrate $mv $OK/$i $OK/$i.old </dev/null
+ test -f $OK/$i &&
+ case $exec:$i in
+ :nmake|:ksh)
+ echo "$command: $OK/$i: cannot update [may be in use by a running process] remove manually and try again" >&2
+ exit 1
+ ;;
+ esac
+ $exec $execrate $cp $i $OK/$i
+ }
+ }
+ done
+ if test -f ../lib/make/makerules.mo
+ then cmp -s ../lib/make/makerules.mo $OK/lib/makerules.mo ||
+ $exec $execrate $cp -p ../lib/make/makerules.mo $OK/lib/makerules.mo ||
+ $exec $execrate $cp ../lib/make/makerules.mo $OK/lib/makerules.mo
+ fi
+ if executable $OK/nmake
+ then MAKE="$INSTALLROOT/bin/$OK/nmake LOCALRULESPATH=$INSTALLROOT/bin/$OK/lib"
+ fi
+ if executable $OK/tee
+ then TEE=$INSTALLROOT/bin/$OK/tee
+ fi
+ if test "$KEEP_SHELL" != 1 && executable $OK/ksh
+ then SHELL=$INSTALLROOT/bin/$OK/ksh
+ export SHELL
+ COSHELL=$SHELL
+ export COSHELL
+ fi
+ case :$PATH: in
+ *:$INSTALLROOT/bin/$OK:*)
+ ;;
+ *) PATH=$INSTALLROOT/bin/$OK:$PATH
+ export PATH
+ ;;
+ esac
+ $make cd $INSTALLROOT/src
+ ;;
+ esac
+
+ # fall back to mamake if nmake not found or too old
+
+ if nonmake $MAKE
+ then note make with mamake
+ case $target in
+ '') target="install" ;;
+ esac
+ eval capture mamake \$makeflags \$noexec \$target $assign
+ else case $target in
+ '') target="install cc-" ;;
+ esac
+ eval capture \$MAKE \$makeflags \$nmakeflags \$noexec recurse \$target \$nmakesep \$package $assign
+ fi
+ ;;
+
+read) case ${PWD:-`pwd`} in
+ $PACKAGEROOT)
+ ;;
+ *) echo "$command: must be in package root directory" >&2
+ exit 1
+ ;;
+ esac
+ PAX=
+ if onpath pax
+ then case `$_onpath_ -rw --?meter 2>&1` in
+ *--meter*) PAX=pax ;;
+ esac
+ fi
+ code=0
+ i=
+ x=
+ remove=
+ touch=
+ set '' $target
+ case $2 in
+ lcl|tgz)tgz=$2
+ shift 2
+ target=$*
+ ;;
+ *) tgz=tgz
+ ;;
+ esac
+ set '' $package $target
+ case $# in
+ 1) verbose=:
+ set '' `ls lib/package/$tgz/*?[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]* 2>/dev/null`
+ ;;
+ *) verbose=
+ ;;
+ esac
+ shift
+ files=
+ for f
+ do if test -f "$f"
+ then : ok
+ elif test -f "lib/package/$tgz/$f"
+ then f=lib/package/$tgz/$f
+ else set '' `ls -r ${f}[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]* 2>/dev/null`
+ if test '' != "$2" -a -f "$2"
+ then f=$2
+ else set '' `ls -r lib/package/$tgz/${f}[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]* 2>/dev/null`
+ if test '' != "$2" -a -f "$2"
+ then f=$2
+ else echo "$command: $f: package archive not found" >&2
+ continue
+ fi
+ fi
+ fi
+ files="$files $f"
+ done
+ case $files in
+ '') echo "$command: lib/package/$tgz: no package archives" >&2
+ exit 1
+ ;;
+ esac
+ set '' `ls -r $files 2>/dev/null`
+ shift
+ f1= f2= f3= f4=
+ for f
+ do case $f in
+ ratz.*|*/ratz.*)
+ f1="$f1 $f"
+ ;;
+ INIT.*|*/INIT.*)
+ f2="$f2 $f"
+ ;;
+ INIT*|*/INIT*)
+ f3="$f3 $f"
+ ;;
+ *) f4="$f4 $f"
+ ;;
+ esac
+ done
+ gen=
+ set '' $f1 $f2 $f3 $f4
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ f=$1
+ case $f in
+ *.gz) : standalone packages unbundled manually
+ continue
+ ;;
+ *.md5) : tarball checksum
+ continue
+ ;;
+ *?[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]*)
+ ;;
+ *) echo "$command: $f: not a package archive" >&2
+ code=1
+ continue
+ ;;
+ esac
+ case $f in
+ */*) eval `echo "$f" | sed -e 's,\(.*/\)\(.*\),d=\1 a=\2,'` ;;
+ *) d= a=$f ;;
+ esac
+ # f:file d:dir a:base p:package v:version r:release t:type
+ eval `echo "$a" | sed -e 's,\.c$,,' -e 's,\.gz$,,' -e 's,\.exe$,,' -e 's,\.tgz$,,' -e 's,\([^_.]*\)[_.]\([0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]\)[_.]\([0123456789][0123456789][0123456789][0123456789][^_.]*\)[_.]*\(.*\),p=\1 v=\2 r=\3 t=\4,' -e 's,\([^_.]*\)[_.]\([0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]\)[_.]*\(.*\),p=\1 v=\2 r=base t=\3,'`
+ case $r in
+ base) y=$p.base ;;
+ *) y=$p.delta ;;
+ esac
+ case " $x " in
+ *" $y "*)
+ continue
+ ;;
+ esac
+ case $t in
+ '') w=$PACKAGESRC
+ q=
+ Q=
+ m=
+ ;;
+ *) w=$PACKAGEROOT/arch/$t/lib/package
+ q=".$t"
+ Q="_$t"
+ m="[_.]$t"
+ ;;
+ esac
+ u=$d$p$q.tim
+ if test -s "$u"
+ then continue
+ else case $force in
+ 0) case `ls -t "$f" "$u" 2>/dev/null` in
+ "$u"*) case $verbose in
+ 1) note $p already read ;;
+ esac
+ continue
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ case $p in
+ INIT) if test -f $PACKAGEROOT/bin/package
+ then $exec mv $PACKAGEROOT/bin/package $PACKAGEROOT/bin/package.old
+ fi
+ ;;
+ esac
+ z=
+ case $r in
+ base) # base archive
+ if test ratz = "$p"
+ then # ratz packages are not archives
+ case $t in
+ '') for i in src src/cmd src/cmd/INIT
+ do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
+ done
+ $exec cp $f $PACKAGEROOT/src/cmd/INIT/$p.c
+ ;;
+ *) for i in arch arch/$t arch/$t/bin
+ do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
+ done
+ $exec cp $f $PACKAGEROOT/arch/$t/bin/$p &&
+ $exec chmod +x $PACKAGEROOT/arch/$t/bin/$p
+ ;;
+ esac
+ elif test "" != "$PAX"
+ then $exec pax -L --from=ascii --local -m -ps -rvf "$f" || {
+ code=1
+ continue
+ }
+ else if onpath gunzip && onpath $TAR && isascii
+ then case $TARPROBE in
+ ?*) for i in $TARPROBE
+ do if $TAR ${i}f - /dev/null > /dev/null 2>&1
+ then TARFLAGS=$TARFLAGS$i
+ fi
+ done
+ TARPROBE=
+ ;;
+ esac
+ if gunzip -l < "$f" > /dev/null 2>&1
+ then case $exec in
+ '') $exec gunzip < "$f" | $TAR ${TARFLAGS}f - ;;
+ *) $exec "gunzip < $f | $TAR ${TARFLAGS}f -" ;;
+ esac || {
+ code=1
+ continue
+ }
+ else $exec $TAR ${TARFLAGS}f "$f" || {
+ code=1
+ continue
+ }
+ fi
+ else checkaout ratz && onpath ratz || {
+ code=1
+ continue
+ }
+ RATZ=$_onpath_
+ case $exec in
+ '') echo $f:
+ $exec $RATZ -lm < "$f"
+ ;;
+ *) $exec "$RATZ -lm < $f"
+ ;;
+ esac || {
+ code=1
+ continue
+ }
+ fi
+ if test -f $PACKAGEBIN/gen/$p.sum
+ then while read md5 mode usr grp file
+ do case $file in
+ -*) file=./$file ;;
+ esac
+ case $mode in
+ [01234567][01234567][01234567][01234567])
+ case $grp in
+ -) ;;
+ *) $exec chgrp $grp "$file" ;;
+ esac
+ case $usr in
+ -) ;;
+ *) $exec chown $usr "$file" ;;
+ esac
+ $exec chmod $mode "$file"
+ ;;
+ esac
+ done < $PACKAGEBIN/gen/$p.sum
+ fi
+ fi
+ ;;
+ *) # delta archive
+ test "" != "$PAX" || {
+ echo "$command: $f: pax required to read delta archive" >&2
+ code=1
+ continue
+ }
+ case `echo "$v:
+$r:" | sort` in
+ $r:*) y=$p.base
+ b=${d}${p}_${r}${Q}.tgz
+ test -f "$b" || b=${d}${p}.${r}${q}.tgz
+ test -f "$b" || {
+ case " $gen " in
+ *" $b "*)
+ ;;
+ *) case $# in
+ 1) echo "$command: $f: base archive $b required to read delta" >&2
+ code=1
+ ;;
+ *) shift
+ y=$1
+ shift
+ set '' $y $f "$@"
+ esac
+ continue
+ ;;
+ esac
+ }
+ # -m with delta bug fixed 2005-02-08
+ $exec pax -L --from=ascii --local -ps -rvf "$f" -z "$b" || {
+ code=1
+ continue
+ }
+ note $f: generate new base $d$p.$v$q.tgz
+ $exec pax -rf "$f" -z "$b" -wf $d$p.$v$q.tgz -x tgz || {
+ code=1
+ continue
+ }
+ case $exec in
+ '') echo $p $v $v 1 > $w/gen/$p.ver
+ ;;
+ *) z=$d${p}[_.]$v$q.tgz
+ $exec "echo $p $v $v 1 > $w/gen/$p.ver"
+ gen="$gen $d$p.$v$q.tgz"
+ ;;
+ esac
+ case " $remove " in
+ *" $f "*) ;;
+ *) remove="$remove $f" ;;
+ esac
+ ;;
+ *) b=${d}${p}_${v}${Q}.tgz
+ test -f "$b" || b=${d}${p}.${v}${q}.tgz
+ test -f "$b" || {
+ case " $gen " in
+ *" $b "*)
+ ;;
+ *) case $# in
+ 1) echo "$command: $f: base archive $b required to read delta" >&2
+ code=1
+ ;;
+ *) shift
+ y=$1
+ shift
+ set '' $y $f "$@"
+ esac
+ continue
+ ;;
+ esac
+ }
+ # -m with delta bug fixed 2005-02-08
+ $exec pax -L --from=ascii --local -ps -rvf "$f" -z "$b" || {
+ code=1
+ continue
+ }
+ ;;
+ esac
+ ;;
+ *) echo "$command: $f: unknown archive type" >&2
+ code=1
+ continue
+ ;;
+ esac
+
+ # check for ini files
+
+ if executable $w/$p.ini
+ then $exec $w/$p.ini read || {
+ code=1
+ continue
+ }
+ fi
+
+ # add to the obsolete list
+
+ k=
+ for i in `ls $d$p[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]????$m* $z 2>/dev/null`
+ do case $i in
+ *.md5) continue
+ ;;
+ $d${p}[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]$m*)
+ ;;
+ $d${p}[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]$m*)
+ continue
+ ;;
+ esac
+ case $k in
+ ?*) case " $remove " in
+ *" $k "*) ;;
+ *) remove="$remove $k" ;;
+ esac
+ ;;
+ esac
+ k=$i
+ done
+ x="$x $y"
+ case " $touch " in
+ *" $u "*) ;;
+ *) touch="$touch $u" ;;
+ esac
+ done
+ if test ! -f $PACKAGEROOT/bin/package -a -f $PACKAGEROOT/bin/package.old
+ then $exec cp $PACKAGEROOT/bin/package.old $PACKAGEROOT/bin/package
+ fi
+
+ # drop obsolete archives
+
+ case $remove in
+ ?*) $exec rm -f $remove ;;
+ esac
+
+ # mark the updated archives
+
+ case $touch in
+ ?*) sleep 1; $exec touch $touch ;;
+ esac
+
+ # check the requirements
+
+ case $code$exec in
+ 0) requirements - $x ;;
+ esac
+ exit $code
+ ;;
+
+regress)if test ! -d $PACKAGEBIN/gen
+ then echo "$command: 'package make' and 'package test' required for regression" >&2
+ exit 1
+ fi
+ dir=$PACKAGEBIN/gen
+ cd $dir
+ for s in out old
+ do case `ls -t regress.$s test.$s 2>/dev/null` in
+ regress*)
+ ;;
+ test*) if test -f regress.$s
+ then $exec mv regress.$s regress.old
+ fi
+ case $exec in
+ '') egrep -i '\*\*\*|FAIL|^TEST.* [123456789][0123456789]* error|core.*dump' test.$s |
+ sed -e '/\*\*\* [0123456789]/d' \
+ -e '/^TEST.\//s,/[^ ]*/,,' \
+ -e 's,[ ][ ]*$,,' \
+ -e 's/[0123456789][0123456789]*:* \([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789 ]*([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789 ]*[Cc][Oo][Rr][Ee][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789 ]*)\)/\1/' \
+ -e 's/\.sh failed at .* with /.sh failed /' \
+ > regress.$s
+ ;;
+ *) $exec filter test failures from $dir/test.$s to $dir/regress.$s
+ ;;
+ esac
+ ;;
+ esac
+ done
+ if test -f regress.out -a -f regress.old
+ then $exec diff -b regress.out regress.old
+ else echo "$command: at least 2 test runs required for regression" >&2
+ exit 1
+ fi
+ ;;
+
+release)count= lo= hi=
+ checksrc
+ checkaout release || exit
+ requirements source $package
+ components $package
+ package=$_components_
+ set '' $target
+ shift
+ case $# in
+ 0) ;;
+ *) case $1 in
+ -|[0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789])
+ case $1 in
+ -) lo= release= ;;
+ *) lo=$1 release="-f $1" ;;
+ esac
+ shift
+ case $1 in
+ -|[0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789])
+ case $1 in
+ -) hi= ;;
+ *) hi=$1 release="$release -t $1" ;;
+ esac
+ shift
+ ;;
+ esac
+ ;;
+ [0123456789]|[0123456789][0123456789]|[0123456789][0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789][0123456789]*)
+ count=$1
+ release="-r $count"
+ shift
+ ;;
+ esac
+ ;;
+ esac
+ case $# in
+ 0) case $package in
+ '') package=* ;;
+ esac
+ ;;
+ *) case $package in
+ '') package=$*
+ ;;
+ *) echo $command: $*: lo-date hi-date arguments expected >&2
+ exit 1
+ ;;
+ esac
+ ;;
+ esac
+ echo
+ case $count:$lo:$hi in
+ ::) echo "All recorded changes follow." ;;
+ 1::) echo "Changes since the last release follow." ;;
+ ?*::) echo "Changes since the last $count releases follow." ;;
+ 1:?*:) echo "Changes since $lo or the last release follow." ;;
+ *:?*:*) echo "Changes since $lo follow." ;;
+ *::?*) echo "Changes before $hi follow." ;;
+ *) echo "Changes between $lo and $hi follow." ;;
+ esac
+ x=
+ for r in $INSTALLROOT $PACKAGEROOT
+ do for s in $package_src
+ do d=$r/src/$s
+ if test -d $d
+ then cd $d
+ for i in $package
+ do if test -h $i 2>/dev/null
+ then continue
+ fi
+ case " $x " in
+ *" $i "*) continue ;;
+ esac
+ for f in RELEASE CHANGES ChangeLog
+ do if test -f $i/$f
+ then $exec release $release $i/$f
+ x="$x $i"
+ for f in $i/*/$f
+ do if test -f $f
+ then $exec release $release $f
+ fi
+ done
+ break
+ fi
+ done
+ done
+ fi
+ done
+ done
+ ;;
+
+remove) echo "$command: $action: not implemented yet" >&2
+ exit 1
+ ;;
+
+results)set '' $target
+ shift
+ def=make
+ dir=$PACKAGEBIN/gen
+ case $verbose in
+ 0) filter=yes ;;
+ *) filter=cat ;;
+ esac
+ path=0
+ suf=out
+ on=
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ --) shift
+ break
+ ;;
+ admin) dir=$PACKAGESRC/admin
+ ;;
+ error*|fail*)
+ filter=errors
+ ;;
+ make|test|view|write)
+ def=$1
+ case $filter:$1:$SHELL in
+ errors:*:*) ;;
+ *:test:*/ksh*) filter=rt ;;
+ esac
+ ;;
+ old) suf=old
+ ;;
+ on) case $# in
+ 1) echo $command: $action: $1: host pattern argument expected >&2
+ exit 1
+ ;;
+ esac
+ shift
+ case $on in
+ ?*) on="$on|" ;;
+ esac
+ on="$on$1"
+ ;;
+ path) path=1
+ ;;
+ test) def=test
+ filter=rt
+ ;;
+ *) break
+ ;;
+ esac
+ shift
+ done
+ case $dir in
+ */admin)case $on in
+ '') on="*" ;;
+ *) on="@($on)" ;;
+ esac
+ def=$def.log/$on
+ ;;
+ esac
+ case $# in
+ 0) set "$def" ;;
+ esac
+ m=
+ t=
+ for i
+ do k=0
+ eval set '""' $i - $i.$suf - $dir/$i - $dir/$i.$suf -
+ shift
+ for j
+ do case $j in
+ -) case $k in
+ 1) continue 2 ;;
+ esac
+ ;;
+ *) if test -f $j
+ then k=1
+ case /$j in
+ */test.*) t="$t $j" ;;
+ *) m="$m $j" ;;
+ esac
+ fi
+ ;;
+ esac
+ done
+ echo "$command: $i action output not found" >&2
+ exit 1
+ done
+ sep=
+ case $t in
+ ?*) case $path in
+ 0) for j in $t
+ do echo "$sep==> $j <=="
+ sep=$nl
+ case $filter in
+ cat) $exec cat $j
+ ;;
+ errors) $exec egrep -i '\*\*\*|FAIL[ES]|^TEST.* [123456789][0123456789]* error|core.*dump' $j | sed -e '/^TEST.\//s,/[^ ]*/,,'
+ ;;
+ rt) $exec $KSH rt - $j
+ ;;
+ *) $exec egrep -i '^TEST|FAIL' $j
+ ;;
+ esac
+ done
+ ;;
+ 1) echo $t
+ ;;
+ esac
+ ;;
+ esac
+ case $m in
+ ?*) case $path in
+ 0) case $filter in
+ cat) cat $m
+ ;;
+ *) if test -f $HOME/.pkgresults
+ then i="`cat $HOME/.pkgresults`"
+ case $i in
+ '|'*) ;;
+ *) i="|$i" ;;
+ esac
+ else i=
+ fi
+ for j in $m
+ do echo "$sep==> $j <=="
+ sep=$nl
+ case $filter in
+ errors) $exeg egrep '^pax:|\*\*\*' $j
+ ;;
+ *) $exec egrep -iv '^($||[\+\[]|cc[^-:]|kill |make.*(file system time|has been replaced)|so|[0123456789]+ error|uncrate |[0123456789]+ block|ar: creat|iffe: test: |conf: (check|generate|test)|[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*=|gsf@research|ar:.*warning|cpio:|ld:.*(duplicate symbol|to obtain more information)|[0123456789]*$|(checking|creating|touch) [/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789])| obsolete predefined symbol | is (almost always misused|dangerous|deprecated|not implemented)| trigraph| assigned to | cast .* different size| integer overflow .*<<| optimization may be attained | passed as |::__builtin|pragma.*prototyped|^creating.*\.a$|warning.*not optimized|exceeds size thresh|ld:.*preempts|is unchanged|with value >=|(-l|lib)\*|/(ast|sys)/(dir|limits|param|stropts)\.h.*redefined|usage|base registers|`\.\.\.` obsolete'"$i" $j |
+ $exec grep :
+ ;;
+ esac
+ done
+ ;;
+ esac
+ ;;
+ 1) echo $m
+ ;;
+ esac
+ esac
+ ;;
+
+test) requirements source $package
+ components $package
+ package=$_components_
+ case $only in
+ 0) only= ;;
+ 1) only=--recurse=only ;;
+ esac
+
+ # must have nmake
+
+ if nonmake $MAKE
+ then echo $command: $action: must have $MAKE to test >&2
+ exit 1
+ fi
+
+ # all work under $INSTALLROOT/src
+
+ $make cd $INSTALLROOT/src
+
+ # disable core dumps (could be disasterous over nfs)
+
+ (ulimit -c 0) > /dev/null 2>&1 && ulimit -c 0
+
+ # do the tests
+
+ eval capture \$MAKE \$makeflags \$noexec \$only recurse test \$target \$nmakesep \$package $assign
+ ;;
+
+update) # download the latest release.version for selected packages
+
+ # all work in $PACKAGEROOT/lib/package/tgz
+
+ if test ! -d $PACKAGEROOT/lib/package/tgz
+ then $exec mkdir -p $PACKAGEROOT/lib/package/tgz || exit
+ $exec cd $PACKAGEROOT/lib/package/tgz
+ else cd $PACKAGEROOT/lib/package/tgz
+ fi
+
+ # get the architectures, update query url, and packages
+
+ set '' $args
+ op=update
+ tgz=tgz
+ source=
+ binary=
+ setup=
+ types=
+ url=
+ urlfile=$default_url
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ --) shift
+ break
+ ;;
+ beta) op=beta
+ tgz=beta
+ ;;
+ binary) binary=1
+ ;;
+ setup) setup=1
+ ;;
+ source) source=1
+ ;;
+ *://*) url=$1
+ shift
+ break
+ ;;
+ *.url) urlfile=$1
+ if test ! -s $urlfile
+ then echo $command: $urlfile: not found >&2; exit 1
+ fi
+ break
+ ;;
+ $all_types)
+ binary=1
+ types="$types $1"
+ ;;
+ *) break
+ ;;
+ esac
+ done
+ case $source:$binary in
+ :) source=1 binary=1
+ ;;
+ :1) case $types in
+ '') types=$HOSTTYPE ;;
+ esac
+ ;;
+ esac
+ case $url in
+ '') case $urlfile in
+ $default_url)
+ if test ! -s $urlfile
+ then echo $command: url argument expected >&2; exit 1
+ fi
+ ;;
+ *) default_url=
+ ;;
+ esac
+ url=
+ if grep '^url=' $urlfile >/dev/null
+ then a=$authorize
+ p=$password
+ case $urlfile in
+ */*) ;;
+ *) urlfile=./$urlfile ;;
+ esac
+ . $urlfile
+ case $a:$p in
+ $authorize:$password)
+ default_url=
+ ;;
+ *) case $a in
+ ?*) authorize=$a ;;
+ esac
+ case $p in
+ ?*) password=$p ;;
+ esac
+ ;;
+ esac
+ else url=`cat $urlfile`
+ fi
+ ;;
+ esac
+ case $exec in
+ ?*) default_url= ;;
+ esac
+
+ # get the update list
+
+ eval `echo $url | sed 's,\(.*\)://\([^/]*\)/\(.*\),prot=\"\1\" host=\"\2\" dir=\"\3\",'`
+ get $host $dir/$op.html
+
+ # get/check the package names
+
+ case " $* " in
+ *" - "*)case $source in
+ 1) source_packages=$* ;;
+ *) source_packages= ;;
+ esac
+ case $binary in
+ 1) binary_packages=$* ;;
+ *) binary_packages= ;;
+ esac
+ package_hit=$*
+ ;;
+ " ") nl="
+"
+ case $source in
+ 1) p=
+ for f in `ls *.????-??-??.* 2>/dev/null`
+ do case $f in
+ *.????-??-??.????-??-??.*.*)
+ ;;
+ *.????-??-??.????-??-??.*)
+ p=$p$nl$f
+ ;;
+ *.????-??-??.*.*)
+ ;;
+ *.????-??-??.*)
+ p=$p$nl$f
+ ;;
+ esac
+ done
+ set '' `echo "$p" | sed 's,\..*,,' | sort -u`
+ shift
+ source_packages=$*
+ ;;
+ *) source_packages=
+ ;;
+ esac
+ case $binary in
+ 1) p=
+ for f in `ls *.????-??-??.* 2>/dev/null`
+ do case $f in
+ *.????-??-??.????-??-??.*.*)
+ p=$p$nl$f
+ ;;
+ *.????-??-??.????-??-??.*)
+ ;;
+ *.????-??-??.*.*)
+ p=$p$nl$f
+ ;;
+ *.????-??-??.*)
+ ;;
+ esac
+ done
+ set '' `echo "$p" | sed 's,\..*,,' | sort -u`
+ shift
+ binary_packages=$*
+ ;;
+ *) binary_packages=
+ ;;
+ esac
+ package_hit="$source_packages $binary_packages"
+ ;;
+ *) case $source in
+ 1) source_packages=$* ;;
+ *) source_packages= ;;
+ esac
+ case $binary in
+ 1) binary_packages=$* ;;
+ *) binary_packages= ;;
+ esac
+ package_hit=
+ ;;
+ esac
+
+ # get the latest updates
+
+ types_test=
+ types_local=
+ dir=$dir/$tgz
+ case $default_url in
+ ?*) echo "url='$url' authorize='$authorize' password='$password'" > $default_url
+ case $authorize in
+ ?*) chmod go-rwx $default_url ;;
+ esac
+ ;;
+ esac
+ echo "$got" > got.tmp
+ case $only in
+ 0) exec < got.tmp
+ covered=
+ while read name suffix type base base_size delta delta_size sync sync_size requires covers base_sum delta_sum sync_sum comment
+ do case $requires in
+ ''|-*) continue ;;
+ esac
+ IFS=:
+ set '' $requires
+ IFS=$ifs
+ case $type in
+ -) case " $source_packages " in
+ *" $name "*|*" - "*)
+ for name
+ do case " $source_packages " in
+ *" $name "*)
+ ;;
+ *) source_packages="$source_packages $name"
+ covered=$covered:$covers
+ ;;
+ esac
+ done
+ ;;
+ esac
+ ;;
+ *) case " $binary_packages " in
+ *" $name "*|*" - "*)
+ for name
+ do case " $binary_packages " in
+ *" $name "*)
+ ;;
+ *) binary_packages="$binary_packages $name"
+ covered=$covered:$covers
+ ;;
+ esac
+ done
+ ;;
+ esac
+ ;;
+ esac
+ done
+ case $covered in
+ ?*) x=$source_packages
+ source_packages=
+ for name in $x
+ do case :$covered: in
+ *:$name:*) ;;
+ *) source_packages="$source_packages $name" ;;
+ esac
+ done
+ x=$binary_packages
+ binary_packages=
+ for name in $x
+ do case :$covered: in
+ *:$name:*) ;;
+ *) binary_packages="$binary_packages $name" ;;
+ esac
+ done
+ ;;
+ esac
+ ;;
+ esac
+ checksum=
+ for i in $checksum_commands
+ do case `( $i ) < /dev/null 2> /dev/null` in
+ ${checksum_empty}|${checksum_empty}[\ \ ]*)
+ checksum=$i
+ break
+ ;;
+ esac
+ done
+ case $checksum in
+ '') echo $command: warning: '{' $checksum_commands '}' command not found -- only download sizes will be checked >&2 ;;
+ esac
+ exec < got.tmp
+ while read name suffix type base base_size delta delta_size sync sync_size requires covers base_sum delta_sum sync_sum comment
+ do case $verbose in
+ 1) case $type in
+ -) i= ;;
+ *) i=.$type ;;
+ esac
+ j="$name.$base$i.$suffix"
+ case $delta in
+ -) j="$j -" ;;
+ *) j="$j $name.$base.$delta$i.$suffix" ;;
+ esac
+ case $sync in
+ -) j="$j -" ;;
+ *) j="$j $name.$base.$sync$i.$suffix" ;;
+ esac
+ echo $command: $j $base_size:$base_sum $delta_size:$delta_sum $sync_size:$sync_sum $requires >&2
+ esac
+ case " $package_hit " in
+ *" $name "*|*" - "*)
+ ;;
+ *) package_hit="$package_hit $name"
+ ;;
+ esac
+ case $type in
+ -) case " $source_packages " in
+ *" $name "*|*" - "*)
+ if test -s $name.tim
+ then continue
+ fi
+ lcl=$name.$base.$suffix
+ if test -f $lcl
+ then case $checksum:$base_sum in
+ :*|*:-) size=`wc -c < $lcl | sed 's, ,,g'` sum=$base_sum ;;
+ *) size=$base_size sum=`$checksum < $lcl | sed -e 's,^[ ][ ]*,,' -e 's,[ ].*,,'` ;;
+ esac
+ else size=X sum=X
+ fi
+ if test "0" != "$force" -a "X-" = "X$delta" -o "$base_size" != "$size" -o "$base_sum" != "$sum"
+ then rmt=
+ case $sync:$sync_size in
+ -*|*[-:])
+ ;;
+ *) lcl=$name.$base.$sync.$suffix
+ if test -f $lcl
+ then rmt=1
+ get $host $dir $lcl $sync_size $sync_sum
+ fi
+ ;;
+ esac
+ case $base:$base_size in
+ -*|*[-:])
+ ;;
+ *) case $rmt in
+ '') lcl=$name.$base.$suffix
+ get $host $dir $lcl $base_size $base_sum
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ case $delta:$delta_size in
+ -*|*[-:])
+ ;;
+ *) lcl=$name.$delta.$base.$suffix
+ if test -f $lcl
+ then case $checksum:$delta_sum in
+ :*|*:-) size=`wc -c < $lcl | sed 's, ,,g'` sum=$delta_sum ;;
+ *) size=$base_size sum=`$checksum < $lcl | sed -e 's,^[ ][ ]*,,' -e 's,[ ].*,,'` ;;
+ esac
+ else size=X sum=X
+ fi
+ if test "0" != "$force" -o "$delta_size" != "$size" -o "$delta_sum" != "$sum"
+ then get $host $dir $lcl $delta_size $delta_sum
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) case " $binary_packages " in
+ *" $name "*|*" - "*)
+ if test -s $name.$type.tim
+ then continue
+ fi
+ case " $types " in
+ *" - "*);;
+ " ") case " $types_test " in
+ *" $type "*)
+ ;;
+ *) types_test="$types_test $type"
+ for i in *.????-??-??.$type.* *.????-??-??.????-??-??.$type.*
+ do if test -f $i
+ then types_local="$types_local $type"
+ fi
+ break
+ done
+ ;;
+ esac
+ case " $types_local " in
+ *" $type "*)
+ ;;
+ *) continue
+ ;;
+ esac
+ ;;
+ *) case " $types " in
+ *" $type "*)
+ ;;
+ *) continue
+ ;;
+ esac
+ ;;
+ esac
+ lcl=$name.$base.$type.$suffix
+ if test -f $lcl
+ then case $checksum:$base_sum in
+ :*|*:-) size=`wc -c < $lcl | sed 's, ,,g'` sum=$base_sum ;;
+ *) size=$base_size sum=`$checksum < $lcl | sed -e 's,^[ ][ ]*,,' -e 's,[ ].*,,'` ;;
+ esac
+ else size=X sum=X
+ fi
+ if test "0" != "$force" -a "X-" = "X$delta" -o "$base_size" != "$size" -o "$base_sum" != "$sum"
+ then rmt=
+ case $sync:$sync_size in
+ -*|*[-:])
+ ;;
+ *) lcl=$name.$base.$sync.$type.$suffix
+ if test -f $lcl
+ then rmt=1
+ get $host $dir $lcl $sync_size $sync_sum
+ fi
+ ;;
+ esac
+ case $base:$base_size in
+ -*|*[-:])
+ ;;
+ *) case $rmt in
+ '') lcl=$name.$base.$type.$suffix
+ get $host $dir $lcl $base_size $base_sum
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ case $delta:$delta_size in
+ -*|*[-:])
+ ;;
+ *) lcl=$name.$delta.$base.$type.$suffix
+ if test -f $lcl
+ then sum=`$checksum < $lcl | sed -e 's,^[ ][ ]*,,' -e 's,[ ].*,,'`
+ else sum=X
+ fi
+ if test -f $lcl
+ then case $checksum:$delta_sum in
+ :*|*:-) size=`wc -c < $lcl | sed 's, ,,g'` sum=$delta_sum ;;
+ *) size=$base_size sum=`$checksum < $lcl | sed -e 's,^[ ][ ]*,,' -e 's,[ ].*,,'` ;;
+ esac
+ else size=X sum=X
+ fi
+ if test "0" != "$force" -o "$delta_size" != "$size" -o "$delta_sum" != "$sum"
+ then get $host $dir $lcl $delta_size $delta_sum
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ closure=
+ for name in $source_packages $binary_packages
+ do case $name in
+ -) ;;
+ *) case " $package_hit " in
+ *" $name "*)
+ case $setup in
+ 1) case " $closure " in
+ *" $name "*)
+ ;;
+ *) closure="$closure $name"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) echo $command: $name: unknown package >&2
+ ;;
+ esac
+ ;;
+ esac
+ done
+ exec <&-
+ rm -f got.tmp
+ case $closure in
+ ?*) echo $closure ;;
+ esac
+ ;;
+
+use) # finalize the environment
+
+ x=:..
+ for d in `( cd $PACKAGEROOT; ls src/*/Makefile src/*/Nmakefile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u )`
+ do x=$x:$INSTALLROOT/$d
+ done
+ x=$x:$INSTALLROOT
+ case $CDPATH: in
+ $x:*) ;;
+ *) CDPATH=$x:$CDPATH
+ $show CDPATH=$CDPATH
+ $show export CDPATH
+ export CDPATH
+ ;;
+ esac
+ P=$PACKAGEROOT
+ $show P=$P
+ $show export P
+ export P
+ A=$INSTALLROOT
+ $show A=$A
+ $show export A
+ export A
+ case $NPROC in
+ '') hostinfo cpu
+ case $_hostinfo_ in
+ 0|1) ;;
+ *) NPROC=$_hostinfo_
+ $show NPROC=$NPROC
+ $show export NPROC
+ export NPROC
+ ;;
+ esac
+ ;;
+ esac
+ eval PACKAGE_USE=$package_use
+ export PACKAGE_USE
+
+ # run the command
+
+ case $run in
+ '') case $show in
+ ':') $exec exec $SHELL ;;
+ esac
+ ;;
+ *) $exec exec $SHELL -c "$run"
+ ;;
+ esac
+ ;;
+
+verify) cd $PACKAGEROOT
+ requirements binary $package
+ if executable ! $SUM
+ then echo "$command: $action: $SUM command required" >&2
+ exit 1
+ fi
+ case $target in
+ '') cd arch
+ set '' *
+ shift
+ target=$*
+ cd ..
+ ;;
+ esac
+ code=0
+ for a in $target
+ do case $package in
+ '') set '' arch/$a/lib/package/gen/*.sum
+ shift
+ if test -f $1
+ then for i
+ do package_verify $i || code=1
+ done
+ else echo "$command: warning: $a: no binary packages" >&2
+ fi
+ ;;
+ *) for i in $package
+ do if test -f arch/$a/lib/package/gen/$i.sum
+ then package_verify arch/$a/lib/package/gen/$i.sum || code=1
+ else echo "$command: warning: $a: no binary package for $i" >&2
+ fi
+ done
+ ;;
+ esac
+ done
+ exit $code
+ ;;
+
+write) set '' $target
+ shift
+ action=
+ list=
+ qualifier=
+ while :
+ do case $1 in
+ base|closure|delta|exp|lcl|pkg|rpm|tgz)
+ qualifier="$qualifier $1"
+ ;;
+ binary) action=$1
+ type=$HOSTTYPE
+ eval list=$PACKAGESRC/tgz/$admin_list
+ ;;
+ cyg) qualifier="$qualifier $1"
+ assign="$assign closure=1"
+ only=1
+ ;;
+ runtime|source)
+ action=$1
+ ;;
+ tst) qualifier="$qualifier tgz"
+ assign="$assign copyright=0 'PACKAGEDIR=\$(PACKAGESRC)/tst'"
+ ;;
+ nocopyright)
+ assign="$assign copyright=0"
+ ;;
+ *) break
+ ;;
+ esac
+ shift
+ done
+ case $action in
+ '') echo "$command: binary or source operand expected" >&2
+ exit 1
+ ;;
+ esac
+ set '' "$@" $package
+ shift
+ case $only in
+ 0) set '' `order "$@"`
+ shift
+ ;;
+ esac
+ case $# in
+ 0) echo "$command: at least one package name expected" >&2
+ exit 1
+ ;;
+ esac
+ if nonmake $MAKE
+ then echo "$command: must have $MAKE to generate archives" >&2
+ exit 1
+ fi
+
+ # all work under $PACKAGEBIN
+
+ $make cd $PACKAGEBIN
+ case $list in
+ ?*) $exec rm -f $list ;;
+ esac
+
+ # go for it
+
+ for package
+ do if view - all $package.pkg || view - all lib/package/$package.pkg
+ then eval capture \$MAKE \$makeflags -X ignore \$noexec -f \$package.pkg \$qualifier \$action $assign
+ else echo "$command: $package: not a package" >&2
+ fi
+ done
+ ;;
+
+TEST) set '' $target $package
+ shift
+ case $1 in
+ binary|source)
+ action=$1
+ shift
+ ;;
+ esac
+ order "$@"
+ ;;
+
+*) echo "$command: $action: internal error" >&2
+ exit 1
+ ;;
+
+esac
diff --git a/usr/src/contrib/ast/src/cmd/INIT/probe.win32 b/usr/src/contrib/ast/src/cmd/INIT/probe.win32
new file mode 100644
index 0000000000..7939fccad5
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/probe.win32
@@ -0,0 +1,283 @@
+:
+# @(#)probe.win32 (AT&T Research) 2010-01-01
+#
+# win32 specific make C probe initialization
+# wrapped cc's are easy on uwin
+#
+# 2> easy.err to avoid mysterious hang with bcc
+
+# begin preamble shared with the pp probe.ini
+
+IFS=$'\n'
+
+chmod 777 . # cl.exe setuid workaround
+
+typeset -A header version
+
+# we are probing on behalf of libpp and nmake
+# so the native preprocessor must be forced in
+# order to bootstrap libpp and nmake
+
+nativepp=-1
+export nativepp
+
+probe_header="
+stddef.h
+"
+for inc in syslimits.h winerror.h ostream bits/ctype_base.h stream.h
+do echo "#include <$inc>" > easy.c
+ if $cc -E easy.c > /dev/null 2> easy.err
+ then probe_header="$probe_header
+$inc
+"
+ fi
+done
+
+{
+for i in $probe_header
+do echo "#include <$i>"
+done
+echo '#ifdef __cplusplus'
+echo "int _Pr0b3_cplus=__cplusplus;"
+echo '#endif'
+echo '#ifdef _UWIN'
+echo "int _Pr0b3_uwin=_UWIN;"
+echo '#endif'
+echo '#ifdef __BORLANDC__'
+echo "int _Pr0b3_version_BORLAND=__BORLANDC__;"
+echo '#endif'
+echo '#ifdef __DMC__'
+echo "int _Pr0b3_version_DM=__DMC__;"
+echo '#endif'
+echo '#ifdef _MSC_VER'
+echo "int _Pr0b3_version_MS=_MSC_VER;"
+echo '#endif'
+echo '#ifdef __ICL'
+echo "int _Pr0b3_version_ICL=__ICL;"
+echo '#endif'
+echo '#ifdef __LCC__'
+echo "int _Pr0b3_version_LCC=0+__LCC__;"
+echo '#endif'
+echo '#ifdef __MINGW32__'
+echo "int _Pr0b3_version_MINGW=__MINGW32__;"
+echo '#endif'
+echo '#ifdef __INTERIX'
+echo "int _Pr0b3_version_INTERIX=__INTERIX;"
+echo '#endif'
+echo '#ifdef __WATCOMC__'
+echo "int _Pr0b3_version_WATCOM=__WATCOMC__;"
+echo '#endif'
+} > easy.c
+
+include=
+uwin=
+cplus=
+
+$cc -E easy.c 2>&1 |
+egrep -i '^(#(line)? 1 .*\.[hH]| *int +_Pr0b3_[a-zA-Z_]* *= *[0-9])' |
+sed -e 's,_Pr0b3_,,' \
+ -e 's/.*"\(.*\)".*/\1/' \
+ -e 's,^ *,,' \
+ -e 's, *$,,' \
+ -e 's, *= *,=,' \
+ -e 's,^\(.\):[\\/]*,/\1/,' \
+ -e 's,[\\/][\\/]*,/,g' \
+ -e 's,^\(/.*\)/\(.*\)$,header[\2]="\1",' \
+ -e 's, *int *\(.*\);.*,\1,' \
+ -e 's,^version_\(.*\)=,version[\1]=,' \
+ > easy.sh
+. ./easy.sh
+
+include=
+for i in $probe_header
+do d=${header[$i]}
+ if [[ $d ]]
+ then include="$include
+$d"
+ elif [[ $i == */* ]]
+ then d=${header[${i##*/}]}
+ if [[ $d == */${i%/*} ]]
+ then include="$include
+${d%/${i%/*}}"
+ fi
+ fi
+done
+
+i=$($cc -V 2> easy.err)
+if test "" != "$i" -a -d "$i/include"
+then include="$i/include
+$include"
+fi
+
+stdinclude=
+for inc in $include
+do if [[ ${inc%/*} -ef /msdev/platformsdk ]]
+ then inc=/msdev/platformsdk/${inc##*/}
+ elif [[ ${inc%/*} -ef /platformsdk ]]
+ then inc=/platformsdk/${inc##*/}
+ fi
+ for dup in $stdinclude
+ do [[ $inc -ef $dup ]] && continue 2
+ done
+ stdinclude="$stdinclude
+$inc"
+done
+
+# end preamble shared with the pp probe.ini
+
+if [[ ${version[@]} == [0-9]* && $stdinclude ]]
+then : the payoff
+ set -- $cc
+ cmd=$1
+ shift
+ set -- $(whence $cmd) "$@"
+ typ=$(package)
+ dialect="ANSI CLOSURE DYNAMIC EXPORT=DLL LIBPP -I-"
+ case ${cc##*/} in
+ *CC*) dialect="$dialect C++"
+ cplus=1
+ ;;
+ esac
+ ld=${cc%cc}ld
+ if [[ ! -x $ld ]]
+ then ld=${cc%/*}/ld
+ if [[ ! -x $ld ]]
+ then case $cc in
+ */ncc) ld=/usr/bin/nld ;;
+ *) ld=/usr/bin/ld ;;
+ esac
+ fi
+ fi
+ {
+ if $cc -v >/dev/null 2>&1
+ then v=$($cc -v 2>/dev/null)
+ if [[ $v ]]
+ then print "# ;VERSION;-v;$v;PATH;$cc"
+ fi
+ else v=
+ fi
+ cat <<!
+CC.CC = $*
+CC.NATIVE = $*
+CC.EXECTYPE = $typ
+CC.HOSTTYPE = $typ
+CC.ALTPP.FLAGS = -Yp,\$(CPP:D)
+CC.ALTPP.ENV =
+CC.AR = ar
+CC.ARFLAGS =
+CC.DEBUG = -g
+CC.DIALECT = $dialect
+CC.DLL = -D_BLD_DLL
+CC.DLLBIG = -D_BLD_DLL
+CC.DLL.DEF = -D_BLD_DLL
+CC.DLL.DIR = \$(BINDIR)
+CC.DLL.LIBRARIES =
+CC.DLL.VARIANTS =
+CC.DYNAMIC =
+CC.EXPORT.DYNAMIC =
+CC.LD = $ld
+CC.LD.DYNAMIC = -Bdynamic
+CC.LD.LAZY =
+CC.LD.NOLAZY =
+CC.LD.ORIGIN =
+CC.LD.RECORD =
+CC.LD.NORECORD =
+CC.LD.RUNPATH =
+CC.LD.STATIC = -Bstatic
+CC.LD.STRIP =
+CC.LIB.DLL = option
+CC.LIB.ALL = -Bwhole-archive
+CC.LIB.UNDEF = -Bno-whole-archive
+CC.MAKE.OPTIONS = nativepp=0
+CC.NM = nm
+CC.NMEDIT =
+CC.NMFLAGS =
+CC.OPTIMIZE = -O
+CC.PIC =
+CC.PICBIG =
+CC.READONLY =
+CC.REPOSITORY =
+CC.SHARED = -G
+CC.SHARED.LD = $ld
+CC.SHARED.REGISTRY =
+CC.SHARED.REGISTRY.PATH =
+CC.SHELLMAGIC =
+CC.SIZE = size
+CC.STATIC = -Bstatic
+!
+ inc=
+ lib=
+ if [[ ${version[LCC]} ]]
+ then lib=/lcc
+ fi
+ if [[ $stdinclude == *' '* ]]
+ then stdinclude=${stdinclude//' '/''}
+ fi
+ stdinc=
+ stdlib=
+ for inc in $stdinclude
+ do stdinc="$stdinc $inc"
+ d=${inc%/*}/lib
+ if [[ -d $d ]]
+ then stdlib="$stdlib $d"
+ fi
+ done
+ case $uwin in
+ [0-9]*) cat <<!
+CC.STDINCLUDE = /usr/include $stdinc
+CC.STDLIB = /usr/lib$lib $stdlib
+!
+ ;;
+ *) cat <<!
+CC.STDINCLUDE = $stdinc
+CC.STDLIB = $stdlib
+!
+ ;;
+ esac
+ cat <<!
+CC.STRICT =
+CC.STRIP = strip
+CC.STRIP.FLAGS =
+CC.PREFIX.ARCHIVE = lib
+CC.PREFIX.DYNAMIC =
+CC.PREFIX.SHARED =
+CC.PREFIX.SYMBOL = _
+CC.SUFFIX.ARCHIVE = .a
+CC.SUFFIX.COMMAND =
+CC.SUFFIX.DEBUG = .pdb
+CC.SUFFIX.DYNAMIC = .dll
+CC.SUFFIX.LD = .def .exp .ign .res
+CC.SUFFIX.OBJECT = .o
+CC.SUFFIX.SHARED = .lib
+CC.SUFFIX.SOURCE = .c
+CC.SUFFIX.STATIC =
+!
+ if [[ $v ]]
+ then case $v in
+ *\"*) v=$(print -r -- | sed -e 's,",\\",g' -e 's,^ ,,' -e 's,.*,"&",') ;;
+ *\'*) v=\"$v\" ;;
+ esac
+ cat <<!
+CC.VERSION = -v
+CC.VERSION.STRING = $v
+!
+ else cat <<!
+CC.VERSION =
+CC.VERSION.STRING =
+!
+ fi
+ if [[ ${version[MINGW]} || ${version[MS]} ]]
+ then cat <<!
+CC.WARN = -Wall
+!
+ else cat <<!
+CC.WARN =
+!
+ fi
+ cat <<!
+CC.PREROOT =
+CC.UNIVERSE = att
+!
+ } >&3
+ exit 0
+fi
diff --git a/usr/src/contrib/ast/src/cmd/INIT/proto.c b/usr/src/contrib/ast/src/cmd/INIT/proto.c
new file mode 100644
index 0000000000..6a7e0a0572
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/proto.c
@@ -0,0 +1,5286 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1990-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+
+/* : : generated by proto : : */
+
+#if !defined(__PROTO__)
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
+# if defined(__cplusplus)
+# define __LINKAGE__ "C"
+# else
+# define __LINKAGE__
+# endif
+# define __STDARG__
+# define __PROTO__(x) x
+# define __OTORP__(x)
+# define __PARAM__(n,o) n
+# if !defined(__STDC__) && !defined(__cplusplus)
+# if !defined(c_plusplus)
+# define const
+# endif
+# define signed
+# define void int
+# define volatile
+# define __V_ char
+# else
+# define __V_ void
+# endif
+# else
+# define __PROTO__(x) ()
+# define __OTORP__(x) x
+# define __PARAM__(n,o) o
+# define __LINKAGE__
+# define __V_ char
+# define const
+# define signed
+# define void int
+# define volatile
+# endif
+# define __MANGLE__ __LINKAGE__
+# if defined(__cplusplus) || defined(c_plusplus)
+# define __VARARG__ ...
+# else
+# define __VARARG__
+# endif
+# if defined(__STDARG__)
+# define __VA_START__(p,a) va_start(p,a)
+# else
+# define __VA_START__(p,a) va_start(p)
+# endif
+# if !defined(__INLINE__)
+# if defined(__cplusplus)
+# define __INLINE__ extern __MANGLE__ inline
+# else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define __INLINE__ __inline
+# endif
+# endif
+# endif
+#endif
+#if !defined(__LINKAGE__)
+#define __LINKAGE__ /* 2004-08-11 transition */
+#endif
+#line 1 "proto.c"
+
+
+#line 151
+# ifndef __STDC__
+# ifndef creat
+# define creat _huh_creat
+# endif
+# if 1
+# ifndef access
+# define access _huh_access
+# endif
+# ifndef ctime
+# define ctime _huh_ctime
+# endif
+# ifndef mkdir
+# define mkdir _huh_mkdir
+# endif
+# endif
+# endif
+
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <fcntl.h>
+# if 1
+# include <stdio.h>
+# else
+# include <time.h>
+# endif
+
+# ifndef __STDC__
+# undef access
+# undef ctime
+# undef creat
+# undef mkdir
+# endif
+
+# ifndef O_RDONLY
+# define O_RDONLY 0
+# endif
+
+# ifndef S_IRUSR
+# define S_IRUSR 0400
+# endif
+# ifndef S_IWUSR
+# define S_IWUSR 0200
+# endif
+# ifndef S_IXUSR
+# define S_IXUSR 0100
+# endif
+# ifndef S_IRGRP
+# define S_IRGRP 0040
+# endif
+# ifndef S_IWGRP
+# define S_IWGRP 0020
+# endif
+# ifndef S_IXGRP
+# define S_IXGRP 0010
+# endif
+# ifndef S_IROTH
+# define S_IROTH 0004
+# endif
+# ifndef S_IWOTH
+# define S_IWOTH 0002
+# endif
+# ifndef S_IXOTH
+# define S_IXOTH 0001
+# endif
+
+# ifndef __STDC__
+# if !_WIN32 && !_WINIX
+# define remove(x) unlink(x)
+# define rename(x,y) ((link(x,y)||remove(x))?-1:0)
+# endif
+
+# if 1
+extern __MANGLE__ int access __PROTO__((const char*, int));
+extern __MANGLE__ int mkdir __PROTO__((const char*, int));
+# endif
+
+# endif
+
+# if 1
+extern __MANGLE__ int utime __PROTO__((const char*, time_t*));
+# endif
+
+
+
+
+
+
+int
+replace __PARAM__((const char* newfile, const char* oldfile, int preserve), (newfile, oldfile, preserve)) __OTORP__(const char* newfile; const char* oldfile; int preserve;){
+ struct stat st;
+ time_t ut[2];
+
+ if (stat(oldfile, &st))
+ {
+ if (preserve)
+ return -1;
+ st.st_mode = 0;
+ }
+ if (remove(oldfile) || rename(newfile, oldfile))
+ return -1;
+ if (st.st_mode &= (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH))
+ chmod(oldfile, st.st_mode);
+ if (preserve)
+ {
+ ut[0] = st.st_atime;
+ ut[1] = st.st_mtime;
+ preserve = utime(oldfile, ut);
+ }
+ return preserve;
+}
+
+# undef utime
+# define utime ______utime
+
+#line 1 "../../lib/libpp/ppproto.c"
+
+#line 13
+static const char id[] = "\n@(#)$Id: proto (AT&T Research) 2012-04-14 $\000\n";
+
+#line 1 "../../lib/libpp/ppfsm.c"
+
+#line 1 "../../lib/libpp/pplib.h"
+
+#line 108
+struct ppsymbol;
+struct ppindex;
+
+typedef char* (*PPBUILTIN) __PROTO__((char*, const char*, const char*));
+typedef void (*PPCOMMENT) __PROTO__((const char*, const char*, const char*, int));
+typedef void (*PPINCREF) __PROTO__((const char*, const char*, int, int));
+typedef void (*PPLINESYNC) __PROTO__((int, const char*));
+typedef void (*PPMACREF) __PROTO__((struct ppsymbol*, const char*, int, int, unsigned long));
+typedef int (*PPOPTARG) __PROTO__((int, int, const char*));
+typedef void (*PPPRAGMA) __PROTO__((const char*, const char*, const char*, const char*, int));
+
+struct ppinstk
+{
+ char* nextchr;
+ struct ppinstk* next;
+ struct ppinstk* prev;
+ long* control;
+ char* buffer;
+ char* file;
+ char* prefix;
+ struct ppsymbol* symbol;
+
+ struct ppindex* index;
+ int buflen;
+
+ int line;
+ int vendor;
+ short fd;
+ short hide;
+ short flags;
+ char type;
+};
+
+
+
+
+
+
+
+
+
+struct pplist
+{
+ char* value;
+ struct pplist* next;
+};
+
+struct oplist
+{
+ int op;
+ char* value;
+ struct oplist* next;
+};
+
+struct pphide
+{
+ struct ppmacro* macro;
+ unsigned long flags;
+ int level;
+};
+
+struct ppmacstk
+{
+ struct ppmacstk* next;
+ struct ppmacstk* prev;
+ int line;
+ char* arg[1];
+};
+
+struct ppmember
+{
+ struct ppdirs* archive;
+ unsigned long offset;
+ unsigned long size;
+};
+
+struct counter
+{
+ int candidate;
+ int function;
+ int macro;
+ int pplex;
+ int push;
+ int terminal;
+ int token;
+};
+
+struct pptuple
+{
+ struct pptuple* nomatch;
+ struct pptuple* match;
+ char token[1];
+};
+
+struct ppfileid
+{
+ unsigned long st_dev;
+ unsigned long st_ino;
+};
+
+struct pathid
+{
+ char* path;
+ struct ppfileid id;
+};
+
+#line 1 "../../lib/libpp/pp.h"
+
+#line 206
+
+#line 217
+
+#line 329
+struct ppdirs
+{
+ char* name;
+ struct ppdirs* next;
+
+
+ unsigned char c; unsigned char index; unsigned char type; union { char* buffer; char* sp; struct ppdirs* subdir; } info; struct ppfileid id;
+
+
+};
+
+struct ppkeyword
+{
+ char* name;
+ int value;
+};
+
+struct ppmacro
+{
+ int arity;
+ char* value;
+
+
+ struct pptuple* tuple; char* formals; int size;
+
+
+};
+
+struct ppsymbol
+{
+ int hash_header;
+ unsigned long flags;
+ struct ppmacro* macro;
+ __V_* value;
+
+
+ struct pphide* hidden;
+
+
+};
+
+#line 378
+struct ppglobals
+{
+ const char* version;
+ char* lineid;
+ char* outfile;
+ char* pass;
+ char* token;
+ struct ppsymbol* symbol;
+
+
+
+ char* outb;
+ char* outbuf;
+ char* outp;
+ char* oute;
+ unsigned long offset;
+
+
+ struct ppdirs* lcldirs; struct ppdirs* stddirs; int flags; char* symtab;
+
+
+
+ struct ppcontext* context; long state; long mode; long option; long test; struct { char* sp; long flags; } filedeps; struct ppdirs* firstdir; struct ppdirs* lastdir; int hide; int column; int pending; char* firstfile; char* lastfile; char* ignore; char* probe; char* filtab; char* prdtab; char* date; char* time; char* maps; long ro_state; long ro_mode; long ro_option; long ro_op[2]; struct pathid cdir; struct pathid hostdir; char* ppdefault; struct ppindex* firstindex; struct ppindex* lastindex; struct oplist* firstop; struct oplist* lastop; struct oplist* firsttx; struct oplist* lasttx; unsigned char arg_file; unsigned char arg_mode; unsigned char arg_style; unsigned char c; unsigned char hosted; unsigned char ignoresrc; unsigned char initialized; unsigned char standalone; unsigned char spare_1;
+
+
+
+ char* checkpoint; int constack; struct ppinstk* in; char* addp; char* args; char* addbuf; char* catbuf; char* hdrbuf; char* hidebuf; char* path; char* tmpbuf; char* valbuf; char* optflags; int lastout; char* include; char* prefix; struct ppmember* member; int hidden; int hiding; int level; struct { int input; int output; } pool; struct { long ro_state; long ro_mode; long ro_option; long ro_op[2]; int on; char* symtab; } reset; int truncate; struct ppmacstk* macp; char* maxmac; char* mactop; char* toknxt; long* control; long* maxcon; struct oplist* chop; struct ppfile* insert; struct ppfile* original; struct ppdirs* found; int vendor; char* dirtab; char* strtab; PPBUILTIN builtin; PPCOMMENT comment; PPINCREF incref; PPLINESYNC linesync; PPLINESYNC olinesync; PPMACREF macref; PPOPTARG optarg; PPPRAGMA pragma; struct counter counter; char funbuf[256];
+
+
+};
+
+
+
+
+
+
+
+extern __MANGLE__ struct ppglobals pp;
+extern __MANGLE__ char _pp_ctype[];
+
+extern __MANGLE__ int ppargs __PROTO__((char**, int));
+extern __MANGLE__ void ppcpp __PROTO__((void));
+extern __MANGLE__ void ppcomment __PROTO__((char*, char*, char*, int));
+extern __MANGLE__ __V_* ppcontext __PROTO__((__V_*, int));
+extern __MANGLE__ void pperror __PROTO__((int, ...));
+extern __MANGLE__ void ppincref __PROTO__((char*, char*, int, int));
+extern __MANGLE__ void ppinput __PROTO__((char*, char*, int));
+extern __MANGLE__ int pplex __PROTO__((void));
+extern __MANGLE__ void ppline __PROTO__((int, char*));
+extern __MANGLE__ void ppmacref __PROTO__((struct ppsymbol*, char*, int, int, unsigned long));
+extern __MANGLE__ void ppop __PROTO__((int, ...));
+extern __MANGLE__ void pppragma __PROTO__((char*, char*, char*, char*, int));
+extern __MANGLE__ int ppprintf __PROTO__((char*, ...));
+extern __MANGLE__ int ppsync __PROTO__((void));
+
+#line 368 "../../lib/libpp/pplib.h"
+
+#line 1 "../../lib/libpp/ppdef.h"
+
+#line 369 "../../lib/libpp/pplib.h"
+
+#line 1 "../../lib/libpp/ppkey.h"
+
+#line 16
+
+#line 125
+extern __MANGLE__ struct ppkeyword ppkey[];
+
+#line 370 "../../lib/libpp/pplib.h"
+
+#line 683
+struct ppcontext
+{
+ struct ppdirs* lcldirs; struct ppdirs* stddirs; int flags; char* symtab;
+ struct ppcontext* context; long state; long mode; long option; long test; struct { char* sp; long flags; } filedeps; struct ppdirs* firstdir; struct ppdirs* lastdir; int hide; int column; int pending; char* firstfile; char* lastfile; char* ignore; char* probe; char* filtab; char* prdtab; char* date; char* time; char* maps; long ro_state; long ro_mode; long ro_option; long ro_op[2]; struct pathid cdir; struct pathid hostdir; char* ppdefault; struct ppindex* firstindex; struct ppindex* lastindex; struct oplist* firstop; struct oplist* lastop; struct oplist* firsttx; struct oplist* lasttx; unsigned char arg_file; unsigned char arg_mode; unsigned char arg_style; unsigned char c; unsigned char hosted; unsigned char ignoresrc; unsigned char initialized; unsigned char standalone; unsigned char spare_1;
+};
+
+struct ppfile
+{
+ int hash_header;
+ struct ppsymbol* guard;
+ struct ppfile* bound[4];
+ int flags;
+};
+
+
+
+struct ppindex
+{
+ struct ppindex* next;
+ struct ppfile* file;
+ unsigned long begin;
+ unsigned long end;
+};
+
+
+
+struct ppsymkey
+{
+ struct ppsymbol sym;
+ int lex;
+};
+
+#line 729
+# ifdef __STDC__
+
+# include <stdlib.h>
+# include <unistd.h>
+# include <time.h>
+# include <string.h>
+
+# else
+
+# define size_t int
+
+extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
+extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
+extern __MANGLE__ char* ctime __PROTO__((time_t*));
+extern __MANGLE__ void free __PROTO__((__V_*));
+
+# ifndef O_RDONLY
+
+extern __MANGLE__ int access __PROTO__((const char*, int));
+extern __MANGLE__ int close __PROTO__((int));
+extern __MANGLE__ int creat __PROTO__((const char*, int));
+extern __MANGLE__ void exit __PROTO__((int));
+extern __MANGLE__ int link __PROTO__((const char*, const char*));
+extern __MANGLE__ int open __PROTO__((const char*, int, ...));
+extern __MANGLE__ int read __PROTO__((int, __V_*, int));
+extern __MANGLE__ time_t time __PROTO__((time_t*));
+extern __MANGLE__ int unlink __PROTO__((const char*));
+extern __MANGLE__ int write __PROTO__((int, const __V_*, int));
+
+# endif
+
+# endif
+
+#line 802
+extern __MANGLE__ void ppassert __PROTO__((int, char*, char*));
+extern __MANGLE__ void ppbuiltin __PROTO__((void));
+extern __MANGLE__ int ppcall __PROTO__((struct ppsymbol*, int));
+extern __MANGLE__ int ppcontrol __PROTO__((void));
+extern __MANGLE__ void ppdump __PROTO__((void));
+extern __MANGLE__ char* ppexpand __PROTO__((char*));
+extern __MANGLE__ long ppexpr __PROTO__((int*));
+extern __MANGLE__ void ppfsm __PROTO__((int, char*));
+extern __MANGLE__ char* ppinstr __PROTO__((struct ppinstk*));
+extern __MANGLE__ char* ppkeyname __PROTO__((int, int));
+extern __MANGLE__ char* pplexstr __PROTO__((int));
+extern __MANGLE__ void ppload __PROTO__((char*));
+extern __MANGLE__ void ppmapinclude __PROTO__((char*, char*));
+extern __MANGLE__ char* ppmodestr __PROTO__((long));
+extern __MANGLE__ int ppmultiple __PROTO__((struct ppfile*, struct ppsymbol*));
+extern __MANGLE__ void ppnest __PROTO__((void));
+extern __MANGLE__ int ppoption __PROTO__((char*));
+extern __MANGLE__ char* ppoptionstr __PROTO__((long));
+extern __MANGLE__ void pppclose __PROTO__((char*));
+extern __MANGLE__ int pppdrop __PROTO__((char*));
+extern __MANGLE__ char* pppopen __PROTO__((char*, int, char*, char*, char*, char*, int));
+extern __MANGLE__ int pppread __PROTO__((char*));
+extern __MANGLE__ int pppredargs __PROTO__((void));
+extern __MANGLE__ void pppush __PROTO__((int, char*, char*, int));
+extern __MANGLE__ struct ppsymbol* pprefmac __PROTO__((char*, int));
+extern __MANGLE__ int ppsearch __PROTO__((char*, int, int));
+extern __MANGLE__ int ppset __PROTO__((long*, long, int));
+extern __MANGLE__ char* ppstatestr __PROTO__((long));
+extern __MANGLE__ char* pptokstr __PROTO__((char*, int));
+extern __MANGLE__ void pptrace __PROTO__((int));
+
+#line 11 "../../lib/libpp/ppfsm.c"
+
+#line 1 "../../lib/libpp/ppfsm.h"
+
+#line 185
+
+#line 249
+extern __MANGLE__ short _pp_fsmtab[(0+28)+1][255+1];
+
+
+
+
+
+extern __MANGLE__ char _pp_trigraph[255+1];
+
+extern __MANGLE__ void _pp_refill __PROTO__((int));
+
+#line 12 "../../lib/libpp/ppfsm.c"
+
+
+#line 67
+struct fsminit
+{
+ int state;
+ unsigned char ch[4];
+ int nextstate;
+};
+
+static struct fsminit fsminit[] =
+{
+
+ { 0, { 023 }, ((0+28)+11), },
+ { 0, { 002 }, (0), },
+ { 0, { 001 }, (0+23), },
+ { 0, { '.' }, (0+25), },
+ { 0, { 021 }, (0+19), },
+ { 0, { 'L' }, (0+20), },
+ { 0, { 'd', 'e', 'f', 'i' }, (0+1), },
+ { 0, { 'r', 's', 't', 'v' }, (0+1), },
+ { 0, { 'w', 'N' }, (0+1), },
+ { 0, { '"', '\'' }, ((0+28)+3), },
+ { 0, { '/' }, (0+12), },
+ { 0, { '\n' }, ((0+28)+7), },
+ { 0, { ' ','\t','\f','\013' }, (0+27), },
+
+
+ { (0+1), { 023 }, ((0+28)+6), },
+ { (0+1), { 021, 001 }, (0+19), },
+ { (0+1), { 'a' }, (0+2), },
+ { (0+1), { 'e' }, (0+3), },
+ { (0+1), { 'f' }, (0+4), },
+ { (0+1), { 'h' }, (0+5), },
+ { (0+1), { 'l' }, (0+6), },
+ { (0+1), { 'n' }, (0+7), },
+ { (0+1), { 'o' }, (0+8), },
+ { (0+1), { 't' }, (0+9), },
+ { (0+1), { 'x' }, (0+10), },
+ { (0+1), { 'y' }, (0+11), },
+
+
+ { (0+2), { 023 }, (((0+28)+12)), },
+ { (0+2), { 021, 001 }, (0+19), },
+ { (0+2), { '_','s','t','a' }, (0+2), },
+ { (0+2), { 'r' }, (0+2), },
+
+
+ { (0+3), { 023 }, (((0+28)+12)), },
+ { (0+3), { 021, 001 }, (0+19), },
+ { (0+3), { 't','u','r','n' }, (0+3), },
+
+
+ { (0+4), { 023 }, (((0+28)+12)), },
+ { (0+4), { 021, 001 }, (0+19), },
+
+
+ { (0+5), { 023 }, (((0+28)+12)), },
+ { (0+5), { 021, 001 }, (0+19), },
+ { (0+5), { 'i','l','e' }, (0+5), },
+
+
+ { (0+6), { 023 }, (((0+28)+12)), },
+ { (0+6), { 021, 001 }, (0+19), },
+ { (0+6), { 's','e' }, (0+6), },
+
+
+ { (0+7), { 023 }, (((0+28)+12)), },
+ { (0+7), { 021, 001 }, (0+19), },
+ { (0+7), { 'l','i','n','e' }, (0+7), },
+
+
+ { (0+8), { 023 }, (((0+28)+12)), },
+ { (0+8), { 021, 001 }, (0+19), },
+ { (0+8), { 'r','i','d','N' }, (0+8), },
+
+
+ { (0+9), { 023 }, (((0+28)+12)), },
+ { (0+9), { 021, 001 }, (0+19), },
+ { (0+9), { 'a','t','i','c' }, (0+9), },
+
+
+ { (0+10), { 023 }, (((0+28)+12)), },
+ { (0+10), { 021, 001 }, (0+19), },
+ { (0+10), { 't','e','r','n' }, (0+10), },
+
+
+ { (0+11), { 023 }, (((0+28)+12)), },
+ { (0+11), { 021, 001 }, (0+19), },
+ { (0+11), { 'p','e','d','f' }, (0+11), },
+
+
+ { (0+12), { 023 }, ((0+28)+0), },
+ { (0+12), { '*' }, (0+13), },
+
+ { (0+12), { '/' }, (0+16), },
+
+
+
+ { (0+13), { 023 }, (0+13), },
+ { (0+13), { '\n', 002 }, ((0+28)+1), },
+ { (0+13), { '/' }, (0+15), },
+ { (0+13), { '*' }, (0+14), },
+ { (0+13), { '#', ';', ')' }, ((( (0+13))<<(7+1))|(((0+28)+8))), },
+
+
+ { (0+14), { 023 }, (0+13), },
+ { (0+14), { '\n', 002 }, ((0+28)+1), },
+ { (0+14), { '#', ';', ')' }, ((( (0+13))<<(7+1))|(((0+28)+8))), },
+ { (0+14), { '*' }, (0+14), },
+ { (0+14), { '/' }, ((0+28)+1), },
+
+
+ { (0+15), { 023 }, (0+13), },
+ { (0+15), { '*', '\n', 002 }, ((0+28)+1), },
+ { (0+15), { '/' }, (0+15), },
+
+
+ { (0+16), { 023 }, (0+16), },
+ { (0+16), { '\n', 002 }, ((0+28)+1), },
+ { (0+16), { '/' }, (0+17), },
+ { (0+16), { '*' }, (0+18), },
+
+
+ { (0+17), { 023 }, (0+16), },
+ { (0+17), { '*', '\n', 002 }, ((0+28)+1), },
+ { (0+17), { '/' }, (0+17), },
+
+
+ { (0+18), { 023 }, (0+16), },
+ { (0+18), { '\n', 002 }, ((0+28)+1), },
+ { (0+18), { '*' }, (0+18), },
+ { (0+18), { '/' }, ((0+28)+1), },
+
+
+ { (0+19), { 023 }, ((0+28)+6), },
+ { (0+19), { 021, 001 }, (0+19), },
+
+
+ { (0+25), { 023 }, ((0+28)+0), },
+ { (0+25), { '.' }, (0+26), },
+ { (0+25), { 001 }, (0+23), },
+
+
+ { (0+26), { 023 }, (((( (0401+1))-0401)<<(7+1))|( ((0+28)+14))), },
+ { (0+26), { '.' }, (((( (0401+29))-0401)<<(7+1))|( ((0+28)+13))), },
+
+
+ { (0+20), { 023 }, ((0+28)+6), },
+ { (0+20), { 021, 001 }, (0+19), },
+ { (0+20), { '"', '\'' }, ((( (0+21))<<(7+1))|(((0+28)+8))), },
+
+
+ { (0+21), { 023 }, (0+21), },
+ { (0+21), { '"', '\'' }, ((0+28)+4), },
+ { (0+21), { '\n', 002 }, ((0+28)+4), },
+ { (0+21), { '\\' }, (0+22), },
+
+
+ { (0+22), { 023 }, ((0+28)+5), },
+ { (0+22), { '\n', 002 }, ((0+28)+4), },
+
+
+ { (0+23), { 023 }, (((( (0401+1))-0401)<<(7+1))|( ((0+28)+14))), },
+ { (0+23), { 021, 001, '.' }, (0+23), },
+ { (0+23), { 'e', 'E' }, (0+24), },
+
+
+ { (0+24), { 023 }, (((( (0401+1))-0401)<<(7+1))|( ((0+28)+14))), },
+ { (0+24), { 021, 001, '.' }, (0+23), },
+ { (0+24), { '+', '-' }, (0+23), },
+
+
+ { (0+27), { 023 }, ((0+28)+15), },
+ { (0+27), { ' ', '\t' }, (0+27), },
+ { (0+27), { '\f', '\013' }, ((0+28)+10), },
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 528
+ { (-1), { 0 }, 0, }
+};
+
+short _pp_fsmtab[(0+28)+1][255+1];
+
+char _pp_trigraph[255+1];
+
+
+static char spl[] = { '\\', '\r', 0 };
+static char aln[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$@";
+
+
+
+
+static char* let = &aln[10];
+static char hex[] = "fedcbaFEDCBA9876543210";
+static char* dec = &hex[12];
+static char* oct = &hex[14];
+
+
+
+
+
+
+void
+ppfsm __PARAM__((int op, register char* s), (op, s)) __OTORP__(int op; register char* s;){
+ register int c;
+ register int n;
+ register int i;
+ register short* rp;
+ register struct fsminit* fp;
+
+
+
+
+
+ switch (op)
+ {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ case 4:
+ for (fp = fsminit;; fp++)
+ {
+ if ((n = fp->nextstate) >= (0+28)) n = ~n;
+ if (fp->state == (-1))
+ {
+
+
+
+
+
+
+
+
+
+
+
+
+
+ break;
+ }
+ rp = _pp_fsmtab[fp->state];
+ for (i = 0; i < sizeof(fp->ch) && (c = fp->ch[i]); i++)
+ {
+ switch (c)
+ {
+ case 023:
+ for (c = 0; c <= 255; c++)
+ rp[c] = n;
+
+
+ case 002:
+ _pp_fsmtab[(0+28)][fp->state+1] = n < 0 ? ~n : n;
+ continue;
+
+ case 021:
+ s = let;
+ break;
+
+ case 003:
+ s = hex;
+ break;
+
+ case 001:
+ s = dec;
+ break;
+
+ case 022:
+ s = oct;
+ break;
+
+ default:
+ rp[c] = n;
+ continue;
+ }
+ while (c = *s++)
+ rp[c] = n;
+ }
+ }
+
+
+
+
+
+
+ for (i = 0; i < (0+28); i++)
+ {
+ rp = _pp_fsmtab[i];
+ s = spl;
+ while (c = *s++)
+ if (c != '@' || !(( rp)>=_pp_fsmtab[(0+13)]&&( rp)<=_pp_fsmtab[(0+18)]))
+ {
+ if (rp[c] >= 0) rp[c] = ~rp[c];
+ rp[c] &= ~(1<<7);
+ }
+ rp[0] = ~((0+28)+2);
+ for (c = 0; c <= 255; c++)
+ if (rp[c] == i)
+ rp[c] = 0;
+ }
+ _pp_fsmtab[(0+28)][0] = ~((0+28)+2);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 707
+ break;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 860
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 18 "../../lib/libpp/ppproto.c"
+
+#line 1 "../../../include/ast/hashkey.h"
+
+#line 24
+
+
+#line 68
+extern __MANGLE__ long strkey __PROTO__((const char*));
+
+#line 20 "../../lib/libpp/ppproto.c"
+
+#line 41
+typedef struct Key_s
+{
+ const char* name;
+ size_t size;
+ int hit;
+ int val;
+} Key_t;
+
+typedef struct Proto_s
+{
+ int brace;
+ int call;
+ int fd;
+ char* file;
+ long flags;
+ long options;
+ char* package;
+ int line;
+ int test;
+
+ char* tp;
+
+ int iz;
+ char* ib;
+ char* ip;
+
+ int oz;
+ char* ob;
+ char* op;
+ char* ox;
+
+ char cc[3];
+ char pushback[4];
+
+ char variadic[256];
+
+
+
+
+} Proto_t;
+
+
+#line 171
+static const Key_t pragmas[] =
+{
+ { "prototyped",sizeof( "prototyped")-1, 0x01, 1},
+ { "noprototyped",sizeof( "noprototyped")-1, 0x01, 0},
+ { "noticed",sizeof( "noticed")-1, 0x02, 1},
+ { "nonoticed",sizeof( "nonoticed")-1, 0x02, 0},
+};
+
+static const Key_t notices[] =
+{
+ { "Copyright",sizeof( "Copyright")-1, 0x02, 1},
+ { "COPYRIGHT",sizeof( "COPYRIGHT")-1, 0x02, 1},
+ { "copyright",sizeof( "copyright")-1, 0x02, 1},
+ { "Public Domain",sizeof( "Public Domain")-1, 0x02, 0},
+ { "PUBLIC DOMAIN",sizeof( "PUBLIC DOMAIN")-1, 0x02, 0},
+};
+
+
+
+
+
+
+static char*
+number __PARAM__((register char* p, register long n), (p, n)) __OTORP__(register char* p; register long n;){
+ register long d;
+
+ for (d = 1000000; d > 1; d /= 10)
+ if (n >= d) *p++ = '0' + (n / d) % 10;
+ *p++ = '0' + n % 10;
+ return p;
+}
+
+
+
+static int errors;
+
+
+#line 224
+
+
+
+
+static int
+sstrlen __PARAM__((register const char* s), (s)) __OTORP__(register const char* s;){
+ register const char* b;
+
+ for (b = s; *s; s++);
+ return s - b;
+}
+
+
+
+
+
+static int
+sstrncmp __PARAM__((register const char* s, register const char* t, register int n), (s, t, n)) __OTORP__(register const char* s; register const char* t; register int n;){
+ register const char* e = s + n;
+
+ while (s < e)
+ {
+ if (*s != *t || !*s)
+ return *s - *t;
+ s++;
+ t++;
+ }
+ return 0;
+}
+
+
+
+
+
+static char*
+strcopy __PARAM__((register char* s, register const char* t), (s, t)) __OTORP__(register char* s; register const char* t;){
+ while (*s++ = *t++);
+ return s - 1;
+}
+
+
+
+static void
+proto_error __PARAM__((char* iob, int level, char* msg, char* arg), (iob, level, msg, arg)) __OTORP__(char* iob; int level; char* msg; char* arg;){
+ register char* p;
+ char buf[1024];
+
+ p = strcopy(buf, "proto: ");
+ if (iob)
+ {
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
+
+ if (proto->line)
+ {
+ if (proto->file)
+ {
+ *p++ = '"';
+ p = strcopy(p, proto->file);
+ *p++ = '"';
+ *p++ = ',';
+ *p++ = ' ';
+ }
+ p = strcopy(p, "line ");
+ p = number(p, proto->line);
+ }
+ else if (proto->file)
+ p = strcopy(p, proto->file);
+ }
+ else
+ {
+ p = strcopy(p, msg);
+ msg = arg;
+ arg = 0;
+ }
+ if (*(p - 1) != ' ')
+ {
+ *p++ = ':';
+ *p++ = ' ';
+ }
+ if (level == 1)
+ p = strcopy(p, "warning: ");
+ p = strcopy(p, msg);
+ if (arg)
+ {
+ *p++ = ' ';
+ p = strcopy(p, arg);
+ }
+ *p++ = '\n';
+ write(2, buf, p - buf);
+ if (level >= 3)
+ exit(level - 2);
+ if (level >= 2)
+ errors++;
+}
+
+
+
+
+
+static char*
+memcopy __PARAM__((register char* s, register char* t, int n), (s, t, n)) __OTORP__(register char* s; register char* t; int n;){
+ register char* e = t + n;
+
+ while (t < e) *s++ = *t++;
+ return s;
+}
+
+#line 1 "../../lib/libast/port/astlicense.c"
+
+
+
+#line 92
+typedef struct Buffer_s
+{
+ char* buf;
+ char* nxt;
+ char* end;
+ int siz;
+} Buffer_t;
+
+typedef struct Item_s
+{
+ char* data;
+ int size;
+ int quote;
+} Item_t;
+
+typedef struct Id_s
+{
+ Item_t name;
+ Item_t value;
+} Id_t;
+
+
+
+
+
+
+
+static const Item_t key[] =
+{
+ { "author",sizeof( "author")-1,0},
+ { "class",sizeof( "class")-1,0},
+ { "company",sizeof( "company")-1,0},
+ { "component",sizeof( "component")-1,0},
+ { "contributor",sizeof( "contributor")-1,0},
+ { "corporation",sizeof( "corporation")-1,0},
+ { "domain",sizeof( "domain")-1,0},
+ { "id",sizeof( "id")-1,0},
+ { "incorporation",sizeof( "incorporation")-1,0},
+ { "license",sizeof( "license")-1,0},
+ { "location",sizeof( "location")-1,0},
+ { "name",sizeof( "name")-1,0},
+ { "notice",sizeof( "notice")-1,0},
+ { "organization",sizeof( "organization")-1,0},
+ { "package",sizeof( "package")-1,0},
+ { "parent",sizeof( "parent")-1,0},
+ { "query",sizeof( "query")-1,0},
+ { "since",sizeof( "since")-1,0},
+ { "source",sizeof( "source")-1,0},
+ { "start",sizeof( "start")-1,0},
+ { "type",sizeof( "type")-1,0},
+ { "url",sizeof( "url")-1,0},
+ { "urlmd5",sizeof( "urlmd5")-1,0},
+ { "version",sizeof( "version")-1,0},
+ {0}
+};
+
+
+
+
+
+static const Item_t lic[] =
+{
+ { "none",sizeof( "none")-1, 0},
+ { "inline",sizeof( "inline")-1, 12},
+ { "test",sizeof( "test")-1, 2},
+ { "verbose",sizeof( "verbose")-1, 3},
+ { "usage",sizeof( "usage")-1, 4},
+ { "open",sizeof( "open")-1, 5},
+ { "cpl",sizeof( "cpl")-1, 5},
+ { "epl",sizeof( "epl")-1, 5},
+ { "bsd",sizeof( "bsd")-1, 5},
+ { "zlib",sizeof( "zlib")-1, 5},
+ { "mit",sizeof( "mit")-1, 5},
+ { "gpl",sizeof( "gpl")-1, 11},
+ { "special",sizeof( "special")-1, 12},
+ { "nonexclusive",sizeof( "nonexclusive")-1, 12},
+ { "noncommercial",sizeof( "noncommercial")-1, 12},
+ { "proprietary",sizeof( "proprietary")-1, 15},
+ {0}
+};
+
+typedef struct Notice_s
+{
+ int test;
+ int type;
+ int verbose;
+ int ids;
+ Item_t item[(sizeof(key)/sizeof(key[0])-1)];
+ Id_t id[64];
+ char cc[3];
+} Notice_t;
+
+
+
+
+
+static int
+lookup __PARAM__((register const Item_t* item, const char* name, int size), (item, name, size)) __OTORP__(register const Item_t* item; const char* name; int size;){
+ register int c;
+ register int i;
+
+ c = name[0];
+ for (i = 0; item[i].data; i++)
+ if (c == item[i].data[0] && size == item[i].size && !sstrncmp( name, item[i].data, size))
+ return i;
+ return -1;
+}
+
+
+
+
+
+
+static void
+copy __PARAM__((register Buffer_t* b, register char* s, int n), (b, s, n)) __OTORP__(register Buffer_t* b; register char* s; int n;){
+ if (n < 0)
+ n = sstrlen( s);
+ while (n--)
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( *s++)):(( *s++),(-1)));
+}
+
+
+#line 225
+static void
+comment __PARAM__((Notice_t* notice, register Buffer_t* b, register char* s, register int n, int u), (notice, b, s, n, u)) __OTORP__(Notice_t* notice; register Buffer_t* b; register char* s; register int n; int u;){
+ register int i;
+ register int m;
+ register int x;
+ int cc;
+
+ cc = notice->cc[1];
+ if (!s)
+ {
+ if (n)
+ {
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( notice->cc[n > 0 ? 0 : 1])):(( notice->cc[n > 0 ? 0 : 1]),(-1)));
+ for (i = 0; i < 70; i++)
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( cc)):(( cc),(-1)));
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( notice->cc[n > 0 ? 1 : 2])):(( notice->cc[n > 0 ? 1 : 2]),(-1)));
+ }
+ else
+ s = "";
+ }
+ if (s)
+ {
+ if (n > 70)
+ n = 70;
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( cc)):(( cc),(-1)));
+ m = (u < 0) ? 1 : (70 - n) / 2;
+ if ((x = 70 - m - n) < 0)
+ n--;
+ while (m-- > 0)
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
+ while (n-- > 0)
+ {
+ i = *s++;
+ if (u > 0 && i >= 'a' && i <= 'z')
+ i = i - 'a' + 'A';
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( i)):(( i),(-1)));
+ }
+ while (x-- > 0)
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( cc)):(( cc),(-1)));
+ }
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( '\n')):(( '\n'),(-1)));
+}
+
+
+
+
+
+static void
+expand __PARAM__((Notice_t* notice, register Buffer_t* b, const Item_t* item), (notice, b, item)) __OTORP__(Notice_t* notice; register Buffer_t* b; const Item_t* item;){
+ register char* t;
+ register char* e;
+ register int q;
+ register char* x;
+ register char* z;
+ register int c;
+ int m;
+ int i;
+ int k;
+
+ if (t = item->data)
+ {
+ q = item->quote;
+ e = t + item->size;
+ i = 0;
+ while (t < e)
+ {
+ if (*t == '$' && t < (e + 2) && *(t + 1) == '{')
+ {
+ k = m = 0;
+ x = t += 2;
+ while (t < e && (c = *t++) != '}')
+ if (c == '.')
+ x = t;
+ else if (c == '-')
+ {
+ k = 1;
+ break;
+ }
+ else if (c == '/')
+ {
+ m = 1;
+ break;
+ }
+ if ((c = lookup(key, x, t - x - 1)) >= 0 && (x = notice->item[c].data))
+ {
+ z = x + notice->item[c].size;
+ while (x < z)
+ {
+ c = *x++;
+ if (!m || c >= '0' && c <= '9')
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( c)):(( c),(-1)));
+ }
+ }
+ else if (k)
+ {
+ k = 0;
+ i++;
+ }
+ if (k || m)
+ {
+ k = 1;
+ while (t < e)
+ if ((c = *t++) == '{')
+ k++;
+ else if (c == '}' && !--k)
+ break;
+ }
+ }
+ else if (q > 0 && *t == '\\' && (*(t + 1) == q || *(t + 1) == '\\'))
+ t++;
+ else if (*t == '}' && i)
+ {
+ t++;
+ i--;
+ }
+ else
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( *t++)):(( *t++),(-1)));
+ }
+ }
+}
+
+
+
+
+
+static void
+copyright __PARAM__((Notice_t* notice, register Buffer_t* b), (notice, b)) __OTORP__(Notice_t* notice; register Buffer_t* b;){
+ register char* x;
+ register char* t;
+ time_t clock;
+
+ copy(b, "Copyright (c) ", -1);
+ if (notice->test)
+ {
+ clock = (time_t)1000212300;
+ t = ctime(&clock) + 20;
+ }
+ else if (!(t = notice->item[18].data))
+ {
+ time(&clock);
+ t = ctime(&clock) + 20;
+ }
+ if ((x = notice->item[19].data) && sstrncmp( t, x, 4) < 0)
+ t = x;
+ if ((x = notice->item[17].data) && sstrncmp( x, t, 4) < 0)
+ {
+ expand(notice, b, &notice->item[17]);
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( '-')):(( '-'),(-1)));
+ }
+ copy(b, t, 4);
+ if (notice->item[15].data)
+ {
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
+ expand(notice, b, &notice->item[15]);
+ }
+ if (notice->item[5].data)
+ {
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
+ expand(notice, b, &notice->item[5]);
+ if (notice->item[8].data)
+ {
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
+ expand(notice, b, &notice->item[8]);
+ }
+ }
+ else if (notice->item[2].data)
+ {
+ ((( b)->nxt<( b)->end)?(*( b)->nxt++=( ' ')):(( ' '),(-1)));
+ expand(notice, b, &notice->item[2]);
+ }
+}
+
+typedef struct Stack_s
+{
+ char* info;
+ char* file;
+ int line;
+ int size;
+} Stack_t;
+
+static int
+push __PARAM__((Stack_t* sp, char* file, char* parent, char* info, int size, Buffer_t* buf), (sp, file, parent, info, size, buf)) __OTORP__(Stack_t* sp; char* file; char* parent; char* info; int size; Buffer_t* buf;){
+ char* s;
+ char* t;
+ int i;
+ int n;
+ char path[1024];
+
+ if (size <= 8)
+ {
+ copy(buf, file, -1);
+ copy(buf, ": no space", -1);
+ ((( buf)->nxt<( buf)->end)?(*( buf)->nxt++=( 0)):(( 0),(-1)));
+ return -1;
+ }
+ if (*file != '/' && parent && (s = strrchr(parent, '/')))
+ {
+ n = s - parent + 1;
+ if ((sstrlen( file) + n + 1) <= sizeof(path))
+ {
+ memcopy( path, parent, n);
+ strcopy( path + n, file);
+ file = path;
+ }
+ }
+ if ((i = open(file, O_RDONLY|0)) < 0)
+ {
+
+ if (file == path)
+ for (s = path; *s; s++)
+ if (s[0] == '/' && s[1] == 'a' && s[2] == 'r' && s[3] == 'c' && s[4] == 'h' && s[5] == '/')
+ {
+ t = s;
+ for (s += 6; *s && *s != '/'; s++);
+ while (*t++ = *s++);
+ i = open(file, O_RDONLY|0);
+ }
+ if (i < 0)
+ {
+ copy(buf, file, -1);
+ copy(buf, ": cannot open", -1);
+ ((( buf)->nxt<( buf)->end)?(*( buf)->nxt++=( 0)):(( 0),(-1)));
+ return -1;
+ }
+ }
+ n = read(i, info, size - 1);
+ close(i);
+ if (n < 0)
+ {
+ copy(buf, file, -1);
+ copy(buf, ": cannot read", -1);
+ ((( buf)->nxt<( buf)->end)?(*( buf)->nxt++=( 0)):(( 0),(-1)));
+ return -1;
+ }
+ info[n++] = 0;
+ sp->file = file;
+ sp->info = info;
+ sp->line = 0;
+ sp->size = n;
+ return 0;
+}
+
+
+
+
+
+
+
+int
+astlicense __PARAM__((char* p, int size, char* file, char* options, int cc1, int cc2, int cc3), (p, size, file, options, cc1, cc2, cc3)) __OTORP__(char* p; int size; char* file; char* options; int cc1; int cc2; int cc3;){
+ register char* s;
+ register char* v;
+ register char* x;
+ register int c;
+ int i;
+ int h;
+ int k;
+ int n;
+ int q;
+ int contributor;
+ int first;
+ int level;
+ int quote;
+ char* data;
+ char tmpbuf[(70+4)];
+ char info[8 * 1024];
+ Stack_t input[4];
+ Notice_t notice;
+ Item_t item;
+ Buffer_t buf;
+ Buffer_t tmp;
+
+ buf.end = (buf.buf = buf.nxt = p) + size;
+ tmp.end = (tmp.buf = tmp.nxt = tmpbuf) + sizeof(tmpbuf);
+ level = 0;
+ data = info;
+ level = -1;
+ if (options)
+ {
+ level++;
+ input[level].file = "<options>";
+ input[level].info = options;
+ input[level].line = 0;
+ }
+ if (file && *file)
+ {
+ if (push(&input[++level], file, 0, data, &info[sizeof(info)] - data, &buf))
+ return -1;
+ data += input[level].size;
+ }
+ if (level < 0)
+ return 0;
+ s = input[level].info;
+ notice.test = 0;
+ notice.type = 0;
+ notice.verbose = 0;
+ notice.ids = 0;
+ notice.cc[0] = cc1;
+ notice.cc[1] = cc2;
+ notice.cc[2] = cc3;
+ for (i = 0; i < (sizeof(key)/sizeof(key[0])-1); i++)
+ notice.item[i].data = 0;
+ notice.item[20] = notice.item[1] = lic[notice.type];
+ notice.item[20].quote = notice.item[1].quote = 0;
+ contributor = i = k = 0;
+ for (;;)
+ {
+ first = 1;
+ while (c = *s)
+ {
+ while (c == ' ' || c == '\t' || c == '\n' && ++input[level].line || c == '\r' || c == ',' || c == ';' || c == ')')
+ c = *++s;
+ if (!c)
+ break;
+ if (c == '#')
+ {
+ while (*++s && *s != '\n');
+ if (*s)
+ s++;
+ input[level].line++;
+ continue;
+ }
+ if (c == '.')
+ {
+ while ((c = *++s) && (c == ' ' || c == '\t'));
+ file = s;
+ while (c && c != ' ' && c != '\t' && c != '\r' && c != '\n')
+ c = *++s;
+ *s = 0;
+ while (c && c != '\n')
+ c = *++s;
+ if (*file)
+ {
+ input[level].info = s + (c != 0);
+ if (++level >= (sizeof(input) / sizeof(input[0])) || push(&input[level], file, input[level-1].file, data, &info[sizeof(info)] - data, &buf))
+ return -1;
+ data += input[level].size;
+ s = input[level].info;
+ }
+ continue;
+ }
+ if (c == '\n')
+ {
+ s++;
+ input[level].line++;
+ continue;
+ }
+ if (c == '[')
+ c = *++s;
+ x = s;
+ n = 0;
+ while (c && c != '+' && c != '=' && c != ']' && c != ')' && c != ',' && c != ' ' && c != '\t' && c != '\n' && c != '\r')
+ c = *++s;
+ n = s - x;
+ h = lookup(key, x, n);
+ if (c == '+' || c == ']')
+ c = *++s;
+ quote = 0;
+ if (c == '=' || first)
+ {
+ if (c == '=')
+ {
+ q = ((c = *++s) == '"' || c == '\'') ? *s++ : 0;
+ if (c == '(')
+ {
+ s++;
+ if (h == 9)
+ contributor = 0;
+ else if (h == 4)
+ contributor = 1;
+ else
+ {
+ q = 1;
+ i = 0;
+ for (;;)
+ {
+ switch (*s++)
+ {
+ case 0:
+ s--;
+ break;
+ case '(':
+ if (!i)
+ q++;
+ continue;
+ case ')':
+ if (!i && !--q)
+ break;
+ continue;
+ case '"':
+ case '\'':
+ if (!i)
+ i = *(s - 1);
+ else if (i == *(s - 1))
+ i = 0;
+ continue;
+ case '\\':
+ if (*s == i && i == '"')
+ i++;
+ continue;
+ case '\n':
+ input[level].line++;
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ }
+ continue;
+ }
+ v = s;
+ while ((c = *s) && (q == '"' && (c == '\\' && (*(s + 1) == '"' || *(s + 1) == '\\') && s++ && (quote = q)) || q && c != q || !q && c != ' ' && c != '\t' && c != '\n' && c != '\r' && c != ',' && c != ';'))
+ {
+ if (c == '\n')
+ input[level].line++;
+ s++;
+ }
+ }
+ else
+ {
+ h = 20;
+ v = x;
+ }
+ if (c == '\n')
+ input[level].line++;
+ if (contributor)
+ {
+ for (i = 0; i < notice.ids; i++)
+ if (n == notice.id[i].name.size && !sstrncmp( x, notice.id[i].name.data, n))
+ break;
+ if (i < 64)
+ {
+ notice.id[i].name.data = x;
+ notice.id[i].name.size = n;
+ notice.id[i].name.quote = 0;
+ notice.id[i].value.data = v;
+ notice.id[i].value.size = s - v;
+ notice.id[i].value.quote = quote;
+ if (notice.ids <= i)
+ notice.ids = i + 1;
+ }
+ }
+ else if (h == 16)
+ {
+ if ((s - v) == 3 && v[0] == 'a' && v[1] == 'l' && v[2] == 'l')
+ {
+ for (i = 0; i < (sizeof(key)/sizeof(key[0])-1); i++)
+ if (notice.item[i].size)
+ {
+ expand(&notice, &buf, &key[i]);
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '=')):(( '='),(-1)));
+ for (h = 0;; h++)
+ if (h >= notice.item[i].size)
+ {
+ h = 0;
+ break;
+ }
+ else if (notice.item[i].data[h] == ' ' || notice.item[i].data[h] == '\t')
+ break;
+ if (h)
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\'')):(( '\''),(-1)));
+ expand(&notice, &buf, &notice.item[i]);
+ if (h)
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\'')):(( '\''),(-1)));
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\n')):(( '\n'),(-1)));
+ }
+ }
+ else
+ {
+ if ((h = lookup(key, v, s - v)) < 0)
+ {
+ item.data = v;
+ item.size = s - v;
+ item.quote = 0;
+ expand(&notice, &buf, &item);
+ }
+ else
+ expand(&notice, &buf, &notice.item[h]);
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\n')):(( '\n'),(-1)));
+ }
+ return (*(( &buf)->nxt>=( &buf)->end?(( &buf)->nxt=( &buf)->end-1):( &buf)->nxt)=0,( &buf)->nxt-( &buf)->buf);
+ }
+ else
+ {
+ if (h == 20)
+ switch (c = lookup(lic, v, s - v))
+ {
+ case 0:
+ return 0;
+ case 2:
+ notice.test = 1;
+ h = -1;
+ break;
+ case 3:
+ notice.verbose = 1;
+ h = -1;
+ break;
+ case 4:
+ notice.type = c;
+ h = -1;
+ break;
+ case -1:
+ c = 12;
+
+ default:
+ notice.type = c;
+ notice.item[1].data = lic[lic[c].quote].data;
+ notice.item[1].size = lic[lic[c].quote].size;
+ if (notice.item[20].data != lic[0].data)
+ h = -1;
+ break;
+ }
+ if (h >= 0)
+ {
+ notice.item[h].data = (notice.item[h].size = s - v) ? v : (char*)0;
+ notice.item[h].quote = quote;
+ k = 1;
+ }
+ }
+ }
+ else
+ {
+ if (input[level].file)
+ {
+ copy(&buf, "\"", -1);
+ copy(&buf, input[level].file, -1);
+ copy(&buf, "\", line ", -1);
+ x = &tmpbuf[sizeof(tmpbuf)];
+ *--x = 0;
+ n = ++input[level].line;
+ do *--x = ("0123456789")[n % 10]; while (n /= 10);
+ copy(&buf, x, -1);
+ copy(&buf, ": ", -1);
+ }
+ copy(&buf, "option error: assignment expected", -1);
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( 0)):(( 0),(-1)));
+ return -1;
+ }
+ if (*s)
+ s++;
+ first = 0;
+ }
+ if (!level--)
+ break;
+ s = input[level].info;
+ }
+ if (!k)
+ return 0;
+ if (notice.type == 1 && (!notice.verbose || !notice.item[12].data))
+ return 0;
+ if (notice.type != 4)
+ {
+ if (!notice.type)
+ notice.type = 12;
+ comment(&notice, &buf, ((char*)0), 1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ if (notice.item[14].data)
+ {
+ copy(&tmp, "This software is part of the ", -1);
+ expand(&notice, &tmp, &notice.item[14]);
+ copy(&tmp, " package", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ if (notice.type >= 5)
+ {
+ copyright(&notice, &tmp);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.type >= 12)
+ comment( &notice, &buf, "All Rights Reserved",sizeof( "All Rights Reserved")-1, 0);
+ }
+ if (notice.type == 6 || notice.type == 7)
+ {
+ copy(&tmp, notice.item[14].data ? "and": "This software", -1);
+ copy(&tmp, " is licensed under the", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.type == 7)
+ copy(&tmp, "Eclipse Public License", -1);
+ else
+ copy(&tmp, "Common Public License", -1);
+ if (notice.item[23].data)
+ {
+ copy(&tmp, ", Version ", -1);
+ expand(&notice, &tmp, &notice.item[23]);
+ }
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.item[5].data || notice.item[2].data)
+ {
+ copy(&tmp, "by ", -1);
+ if (notice.item[15].data)
+ {
+ expand(&notice, &tmp, &notice.item[15]);
+ copy(&tmp, " ", -1);
+ }
+ if (notice.item[5].data)
+ {
+ expand(&notice, &tmp, &notice.item[5]);
+ if (notice.item[8].data)
+ {
+ copy(&tmp, " ", -1);
+ expand(&notice, &tmp, &notice.item[8]);
+ }
+ }
+ else if (notice.item[2].data)
+ expand(&notice, &tmp, &notice.item[2]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "A copy of the License is available at",sizeof( "A copy of the License is available at")-1, 0);
+ if (notice.item[21].data)
+ {
+ expand(&notice, &tmp, &notice.item[21]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.item[22].data)
+ {
+ copy(&tmp, "(with md5 checksum ", -1);
+ expand(&notice, &tmp, &notice.item[22]);
+ copy(&tmp, ")", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ }
+ else if (notice.type == 7)
+ comment( &notice, &buf, "http://www.eclipse.org/org/documents/epl-v10.html",sizeof( "http://www.eclipse.org/org/documents/epl-v10.html")-1, 0);
+ else
+ comment( &notice, &buf, "http://www.opensource.org/licenses/cpl",sizeof( "http://www.opensource.org/licenses/cpl")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else if (notice.type == 5)
+ {
+ copy(&tmp, notice.item[14].data ? "and it": "This software", -1);
+ copy(&tmp, " may only be used by you under license from", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.item[i = 5].data)
+ {
+ if (notice.item[15].data)
+ {
+ expand(&notice, &tmp, &notice.item[i = 15]);
+ copy(&tmp, " ", -1);
+ }
+ expand(&notice, &tmp, &notice.item[5]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ else if (notice.item[i = 2].data)
+ {
+ if (notice.item[15].data)
+ {
+ expand(&notice, &tmp, &notice.item[i = 15]);
+ copy(&tmp, " ", -1);
+ }
+ expand(&notice, &tmp, &notice.item[2]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ else
+ i = -1;
+ if (notice.item[21].data)
+ {
+ comment( &notice, &buf, "A copy of the Source Code Agreement is available",sizeof( "A copy of the Source Code Agreement is available")-1, 0);
+ copy(&tmp, "at the ", -1);
+ if (i >= 0)
+ expand(&notice, &tmp, &notice.item[i]);
+ copy(&tmp, " Internet web site URL", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ expand(&notice, &tmp, &notice.item[21]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.item[22].data)
+ {
+ copy(&tmp, "(with an md5 checksum of ", -1);
+ expand(&notice, &tmp, &notice.item[22]);
+ copy(&tmp, ")", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ comment( &notice, &buf, "If you have copied or used this software without agreeing",sizeof( "If you have copied or used this software without agreeing")-1, 0);
+ comment( &notice, &buf, "to the terms of the license you are infringing on",sizeof( "to the terms of the license you are infringing on")-1, 0);
+ comment( &notice, &buf, "the license and copyright and are violating",sizeof( "the license and copyright and are violating")-1, 0);
+ if (i >= 0)
+ expand(&notice, &tmp, &notice.item[i]);
+ copy(&tmp, "'s", -1);
+ if (n >= (70-32))
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ else
+ ((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1)));
+ copy(&tmp, "intellectual property rights.", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else if (notice.type == 11)
+ {
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "This is free software; you can redistribute it and/or",sizeof( "This is free software; you can redistribute it and/or")-1, 0);
+ comment( &notice, &buf, "modify it under the terms of the GNU General Public License",sizeof( "modify it under the terms of the GNU General Public License")-1, 0);
+ comment( &notice, &buf, "as published by the Free Software Foundation;",sizeof( "as published by the Free Software Foundation;")-1, 0);
+ comment( &notice, &buf, "either version 2, or (at your option) any later version.",sizeof( "either version 2, or (at your option) any later version.")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "This software is distributed in the hope that it",sizeof( "This software is distributed in the hope that it")-1, 0);
+ comment( &notice, &buf, "will be useful, but WITHOUT ANY WARRANTY;",sizeof( "will be useful, but WITHOUT ANY WARRANTY;")-1, 0);
+ comment( &notice, &buf, "without even the implied warranty of MERCHANTABILITY",sizeof( "without even the implied warranty of MERCHANTABILITY")-1, 0);
+ comment( &notice, &buf, "or FITNESS FOR A PARTICULAR PURPOSE.",sizeof( "or FITNESS FOR A PARTICULAR PURPOSE.")-1, 0);
+ comment( &notice, &buf, "See the GNU General Public License for more details.",sizeof( "See the GNU General Public License for more details.")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "You should have received a copy of the",sizeof( "You should have received a copy of the")-1, 0);
+ comment( &notice, &buf, "GNU General Public License",sizeof( "GNU General Public License")-1, 0);
+ comment( &notice, &buf, "along with this software (see the file COPYING.)",sizeof( "along with this software (see the file COPYING.)")-1, 0);
+ comment( &notice, &buf, "If not, a copy is available at",sizeof( "If not, a copy is available at")-1, 0);
+ comment( &notice, &buf, "http://www.gnu.org/copyleft/gpl.html",sizeof( "http://www.gnu.org/copyleft/gpl.html")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else if (notice.type == 8)
+ {
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "Redistribution and use in source and binary forms, with or",sizeof( "Redistribution and use in source and binary forms, with or")-1, -1);
+ comment( &notice, &buf, "without modification, are permitted provided that the following",sizeof( "without modification, are permitted provided that the following")-1, -1);
+ comment( &notice, &buf, "conditions are met:",sizeof( "conditions are met:")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, " 1. Redistributions of source code must retain the above",sizeof( " 1. Redistributions of source code must retain the above")-1, -1);
+ comment( &notice, &buf, " copyright notice, this list of conditions and the",sizeof( " copyright notice, this list of conditions and the")-1, -1);
+ comment( &notice, &buf, " following disclaimer.",sizeof( " following disclaimer.")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, " 2. Redistributions in binary form must reproduce the above",sizeof( " 2. Redistributions in binary form must reproduce the above")-1, -1);
+ comment( &notice, &buf, " copyright notice, this list of conditions and the",sizeof( " copyright notice, this list of conditions and the")-1, -1);
+ comment( &notice, &buf, " following disclaimer in the documentation and/or other",sizeof( " following disclaimer in the documentation and/or other")-1, -1);
+ comment( &notice, &buf, " materials provided with the distribution.",sizeof( " materials provided with the distribution.")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ copy(&tmp, " 3. Neither the name of ", -1);
+ if (notice.item[i = 15].data || notice.item[i = 5].data || notice.item[i = 2].data)
+ expand(&notice, &tmp, &notice.item[i]);
+ else
+ copy(&tmp, "the copyright holder", -1);
+ copy(&tmp, " nor the", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), -1);
+ comment( &notice, &buf, " names of its contributors may be used to endorse or",sizeof( " names of its contributors may be used to endorse or")-1, -1);
+ comment( &notice, &buf, " promote products derived from this software without",sizeof( " promote products derived from this software without")-1, -1);
+ comment( &notice, &buf, " specific prior written permission.",sizeof( " specific prior written permission.")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND",sizeof( "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND")-1, -1);
+ comment( &notice, &buf, "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,",sizeof( "CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,")-1, -1);
+ comment( &notice, &buf, "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF",sizeof( "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF")-1, -1);
+ comment( &notice, &buf, "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE",sizeof( "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE")-1, -1);
+ comment( &notice, &buf, "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS",sizeof( "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS")-1, -1);
+ comment( &notice, &buf, "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,",sizeof( "BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,")-1, -1);
+ comment( &notice, &buf, "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED",sizeof( "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED")-1, -1);
+ comment( &notice, &buf, "TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,",sizeof( "TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,")-1, -1);
+ comment( &notice, &buf, "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON",sizeof( "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON")-1, -1);
+ comment( &notice, &buf, "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,",sizeof( "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,")-1, -1);
+ comment( &notice, &buf, "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY",sizeof( "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY")-1, -1);
+ comment( &notice, &buf, "OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE",sizeof( "OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE")-1, -1);
+ comment( &notice, &buf, "POSSIBILITY OF SUCH DAMAGE.",sizeof( "POSSIBILITY OF SUCH DAMAGE.")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else if (notice.type == 9)
+ {
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "This software is provided 'as-is', without any express or implied",sizeof( "This software is provided 'as-is', without any express or implied")-1, -1);
+ comment( &notice, &buf, "warranty. In no event will the authors be held liable for any",sizeof( "warranty. In no event will the authors be held liable for any")-1, -1);
+ comment( &notice, &buf, "damages arising from the use of this software.",sizeof( "damages arising from the use of this software.")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "Permission is granted to anyone to use this software for any",sizeof( "Permission is granted to anyone to use this software for any")-1, -1);
+ comment( &notice, &buf, "purpose, including commercial applications, and to alter it and",sizeof( "purpose, including commercial applications, and to alter it and")-1, -1);
+ comment( &notice, &buf, "redistribute it freely, subject to the following restrictions:",sizeof( "redistribute it freely, subject to the following restrictions:")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, " 1. The origin of this software must not be misrepresented;",sizeof( " 1. The origin of this software must not be misrepresented;")-1, -1);
+ comment( &notice, &buf, " you must not claim that you wrote the original software. If",sizeof( " you must not claim that you wrote the original software. If")-1, -1);
+ comment( &notice, &buf, " you use this software in a product, an acknowledgment in the",sizeof( " you use this software in a product, an acknowledgment in the")-1, -1);
+ comment( &notice, &buf, " product documentation would be appreciated but is not",sizeof( " product documentation would be appreciated but is not")-1, -1);
+ comment( &notice, &buf, " required.",sizeof( " required.")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, " 2. Altered source versions must be plainly marked as such,",sizeof( " 2. Altered source versions must be plainly marked as such,")-1, -1);
+ comment( &notice, &buf, " and must not be misrepresented as being the original",sizeof( " and must not be misrepresented as being the original")-1, -1);
+ comment( &notice, &buf, " software.",sizeof( " software.")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, " 3. This notice may not be removed or altered from any source",sizeof( " 3. This notice may not be removed or altered from any source")-1, -1);
+ comment( &notice, &buf, " distribution.",sizeof( " distribution.")-1, -1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else if (notice.type == 10)
+ {
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "Permission is hereby granted, free of charge, to any person",sizeof( "Permission is hereby granted, free of charge, to any person")-1, 0);
+ comment( &notice, &buf, "obtaining a copy of this software and associated",sizeof( "obtaining a copy of this software and associated")-1, 0);
+ comment( &notice, &buf, "documentation files (the \"Software\"), to deal in the",sizeof( "documentation files (the \"Software\"), to deal in the")-1, 0);
+ comment( &notice, &buf, "Software without restriction, including without limitation",sizeof( "Software without restriction, including without limitation")-1, 0);
+ comment( &notice, &buf, "the rights to use, copy, modify, merge, publish, distribute,",sizeof( "the rights to use, copy, modify, merge, publish, distribute,")-1, 0);
+ comment( &notice, &buf, "sublicense, and/or sell copies of the Software, and to",sizeof( "sublicense, and/or sell copies of the Software, and to")-1, 0);
+ comment( &notice, &buf, "permit persons to whom the Software is furnished to do so,",sizeof( "permit persons to whom the Software is furnished to do so,")-1, 0);
+ comment( &notice, &buf, "subject to the following conditions:",sizeof( "subject to the following conditions:")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "The above copyright notice and this permission notice shall",sizeof( "The above copyright notice and this permission notice shall")-1, 0);
+ comment( &notice, &buf, "be included in all copies or substantial portions of the",sizeof( "be included in all copies or substantial portions of the")-1, 0);
+ comment( &notice, &buf, "Software.",sizeof( "Software.")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ comment( &notice, &buf, "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY",sizeof( "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY")-1, 0);
+ comment( &notice, &buf, "KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE",sizeof( "KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE")-1, 0);
+ comment( &notice, &buf, "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR",sizeof( "WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR")-1, 0);
+ comment( &notice, &buf, "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS",sizeof( "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS")-1, 0);
+ comment( &notice, &buf, "OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR",sizeof( "OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR")-1, 0);
+ comment( &notice, &buf, "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR",sizeof( "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR")-1, 0);
+ comment( &notice, &buf, "OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE",sizeof( "OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE")-1, 0);
+ comment( &notice, &buf, "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",sizeof( "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else
+ {
+ if (notice.type == 15)
+ {
+ if (notice.item[i = 15].data || notice.item[i = 5].data || notice.item[i = 2].data)
+ {
+ expand(&notice, &tmp, &notice.item[i]);
+ copy(&tmp, " - ", -1);
+ }
+ else
+ i = -1;
+ copy(&tmp, "Proprietary", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ if (notice.item[21].data)
+ {
+ copy(&tmp, "This is proprietary source code", -1);
+ if (i >= 0)
+ copy(&tmp, " licensed by", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
+ if (notice.item[15].data)
+ {
+ expand(&notice, &tmp, &notice.item[15]);
+ copy(&tmp, " ", -1);
+ }
+ if (notice.item[5].data)
+ {
+ expand(&notice, &tmp, &notice.item[5]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
+ }
+ else if (notice.item[2].data)
+ {
+ expand(&notice, &tmp, &notice.item[2]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
+ }
+ }
+ else
+ {
+ copy(&tmp, "This is unpublished proprietary source code", -1);
+ if (i >= 0)
+ copy(&tmp, " of", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
+ if (notice.item[i = 15].data || notice.item[i = 5].data)
+ expand(&notice, &tmp, &notice.item[i]);
+ if (notice.item[2].data)
+ {
+ if ((( &tmp)->nxt-( &tmp)->buf))
+ ((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1)));
+ expand(&notice, &tmp, &notice.item[2]);
+ }
+ if ((( &tmp)->nxt-( &tmp)->buf))
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 1);
+ comment( &notice, &buf, "and is not to be disclosed or used except in",sizeof( "and is not to be disclosed or used except in")-1, 1);
+ comment( &notice, &buf, "accordance with applicable agreements",sizeof( "accordance with applicable agreements")-1, 1);
+ }
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else if (notice.type == 13)
+ {
+ comment( &notice, &buf, "For nonexclusive individual use",sizeof( "For nonexclusive individual use")-1, 1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else if (notice.type == 14)
+ {
+ comment( &notice, &buf, "For noncommercial use",sizeof( "For noncommercial use")-1, 1);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ if (notice.type >= 15 && !notice.item[21].data)
+ {
+ comment( &notice, &buf, "Unpublished & Not for Publication",sizeof( "Unpublished & Not for Publication")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ if (notice.item[21].data)
+ {
+ copy(&tmp, "This software is licensed", -1);
+ if (notice.item[5].data || notice.item[2].data)
+ {
+ copy(&tmp, " by", -1);
+ if ((notice.item[15].size + (notice.item[5].data ? (notice.item[5].size + notice.item[8].size) : notice.item[2].size)) >= ((70-32) - 6))
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ else
+ ((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1)));
+ if (notice.item[15].data)
+ {
+ expand(&notice, &tmp, &notice.item[15]);
+ copy(&tmp, " ", -1);
+ }
+ if (notice.item[5].data)
+ {
+ expand(&notice, &tmp, &notice.item[5]);
+ if (notice.item[8].data)
+ {
+ copy(&tmp, " ", -1);
+ expand(&notice, &tmp, &notice.item[8]);
+ }
+ }
+ else if (notice.item[2].data)
+ expand(&notice, &tmp, &notice.item[2]);
+ }
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ comment( &notice, &buf, "under the terms and conditions of the license in",sizeof( "under the terms and conditions of the license in")-1, 0);
+ expand(&notice, &tmp, &notice.item[21]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.item[22].data)
+ {
+ copy(&tmp, "(with an md5 checksum of ", -1);
+ expand(&notice, &tmp, &notice.item[22]);
+ copy(&tmp, ")", -1);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ else if (notice.type == 15)
+ {
+ comment( &notice, &buf, "The copyright notice above does not evidence any",sizeof( "The copyright notice above does not evidence any")-1, 0);
+ comment( &notice, &buf, "actual or intended publication of such source code",sizeof( "actual or intended publication of such source code")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ }
+ if (v = notice.item[12].data)
+ {
+ x = v + notice.item[12].size;
+ if (*v == '\n')
+ v++;
+ item.quote = notice.item[12].quote;
+ do
+ {
+ for (item.data = v; v < x && *v != '\n'; v++);
+ if ((item.size = v - item.data) && *item.data == '\t')
+ {
+ item.data++;
+ item.size--;
+ h = 0;
+ }
+ else
+ h = -1;
+ expand(&notice, &tmp, &item);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), h);
+ } while (v++ < x);
+ if (item.size)
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ if (notice.item[13].data)
+ {
+ expand(&notice, &tmp, &notice.item[13]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.item[i = 15].data || notice.item[i = 5].data)
+ expand(&notice, &tmp, &notice.item[i]);
+ if (notice.item[2].data)
+ {
+ if ((( &tmp)->nxt-( &tmp)->buf))
+ ((( &tmp)->nxt<( &tmp)->end)?(*( &tmp)->nxt++=( ' ')):(( ' '),(-1)));
+ expand(&notice, &tmp, &notice.item[2]);
+ }
+ if ((( &tmp)->nxt-( &tmp)->buf))
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ if (notice.item[10].data)
+ {
+ expand(&notice, &tmp, &notice.item[10]);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ }
+ if (v = notice.item[0].data)
+ {
+ x = v + notice.item[0].size;
+ q = (x - v) == 1 && (*v == '*' || *v == '-');
+ k = q && notice.type != 4 ? -1 : 0;
+ for (;;)
+ {
+ if (!q)
+ {
+ while (v < x && (*v == ' ' || *v == '\t' || *v == '\r' || *v == '\n' || *v == ',' || *v == '+'))
+ v++;
+ if (v >= x)
+ break;
+ item.data = v;
+ while (v < x && *v != ',' && *v != '+' && *v++ != '>');
+ item.size = v - item.data;
+ item.quote = notice.item[0].quote;
+ }
+ h = 0;
+ for (i = 0; i < notice.ids; i++)
+ if (q || item.size == notice.id[i].name.size && !sstrncmp( item.data, notice.id[i].name.data, item.size))
+ {
+ h = 1;
+ if (notice.type == 4)
+ {
+ copy(&buf, "[-author?", -1);
+ expand(&notice, &buf, &notice.id[i].value);
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1)));
+ }
+ else
+ {
+ if (k < 0)
+ {
+ comment( &notice, &buf, "CONTRIBUTORS",sizeof( "CONTRIBUTORS")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ k = 1;
+ expand(&notice, &tmp, &notice.id[i].value);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ if (!q)
+ break;
+ }
+ if (q)
+ break;
+ if (!h)
+ {
+ if (notice.type == 4)
+ {
+ copy(&buf, "[-author?", -1);
+ expand(&notice, &buf, &item);
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1)));
+ }
+ else
+ {
+ if (k < 0)
+ {
+ comment( &notice, &buf, "CONTRIBUTORS",sizeof( "CONTRIBUTORS")-1, 0);
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ k = 1;
+ expand(&notice, &tmp, &item);
+ comment(&notice, &buf, (( &tmp)->buf), (( &tmp)->siz=( &tmp)->nxt-( &tmp)->buf,( &tmp)->nxt=( &tmp)->buf,( &tmp)->siz), 0);
+ }
+ }
+ }
+ if (k > 0)
+ comment(&notice, &buf, ((char*)0), 0, 0);
+ }
+ if (notice.type == 4)
+ {
+ copy(&buf, "[-copyright?", -1);
+ copyright(&notice, &buf);
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1)));
+ if (notice.item[21].data)
+ {
+ copy(&buf, "[-license?", -1);
+ expand(&notice, &buf, &notice.item[21]);
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( ']')):(( ']'),(-1)));
+ }
+ ((( &buf)->nxt<( &buf)->end)?(*( &buf)->nxt++=( '\n')):(( '\n'),(-1)));
+ }
+ else
+ comment(&notice, &buf, ((char*)0), -1, 0);
+ return (*(( &buf)->nxt>=( &buf)->end?(( &buf)->nxt=( &buf)->end-1):( &buf)->nxt)=0,( &buf)->nxt-( &buf)->buf);
+}
+#line 336 "../../lib/libpp/ppproto.c"
+
+#line 348
+static char*
+linesync __PARAM__((register Proto_t* proto, register char* p, register long n), (proto, p, n)) __OTORP__(register Proto_t* proto; register char* p; register long n;){
+
+ if (proto->flags & (1L<<13))
+
+ {
+
+ p = strcopy(p, "\n#line ");
+
+
+
+ p = number(p, n);
+ *p++ = '\n';
+ }
+ return p;
+}
+
+
+
+
+
+
+static char*
+init __PARAM__((Proto_t* proto, char* op, int flags), (proto, op, flags)) __OTORP__(Proto_t* proto; char* op; int flags;){
+ register char* s;
+
+ if (flags & (1L<<10))
+ {
+ op = strcopy(op, "\
+\n\
+#if !defined(__PROTO__)\n\
+# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)\n\
+# if defined(__cplusplus)\n\
+# define __LINKAGE__ \"C\"\n\
+# else\n\
+# define __LINKAGE__\n\
+# endif\n\
+# define __STDARG__\n\
+# define __PROTO__(x) x\n\
+# define __OTORP__(x)\n\
+# define __PARAM__(n,o) n\n\
+# if !defined(__STDC__) && !defined(__cplusplus)\n\
+# if !defined(c_plusplus)\n\
+# define const\n\
+# endif\n\
+# define signed\n\
+# define void int\n\
+# define volatile\n\
+# define __V_ char\n\
+# else\n\
+# define __V_ void\n\
+# endif\n\
+# else\n\
+# define __PROTO__(x) ()\n\
+# define __OTORP__(x) x\n\
+# define __PARAM__(n,o) o\n\
+# define __LINKAGE__\n\
+# define __V_ char\n\
+# define const\n\
+# define signed\n\
+# define void int\n\
+# define volatile\n\
+# endif\n\
+# define __MANGLE__ __LINKAGE__\n\
+# if defined(__cplusplus) || defined(c_plusplus)\n\
+# define __VARARG__ ...\n\
+# else\n\
+# define __VARARG__\n\
+# endif\n\
+# if defined(__STDARG__)\n\
+# define __VA_START__(p,a) va_start(p,a)\n\
+# else\n\
+# define __VA_START__(p,a) va_start(p)\n\
+# endif\n\
+# if !defined(__INLINE__)\n\
+# if defined(__cplusplus)\n\
+# define __INLINE__ extern __MANGLE__ inline\n\
+# else\n\
+# if defined(_WIN32) && !defined(__GNUC__)\n\
+# define __INLINE__ __inline\n\
+# endif\n\
+# endif\n\
+# endif\n\
+#endif\n\
+#if !defined(__LINKAGE__)\n\
+#define __LINKAGE__ /* 2004-08-11 transition */\n\
+#endif\n\
+");
+ }
+ else
+ op = strcopy(op, "\
+\n\
+#if !defined(__PROTO__)\n\
+#include <prototyped.h>\n\
+#endif\n\
+#if !defined(__LINKAGE__)\n\
+#define __LINKAGE__ /* 2004-08-11 transition */\n\
+#endif\n\
+");
+ if (proto->package)
+ {
+ s = "\
+#ifndef __MANGLE_%_DATA__\n\
+# ifdef _BLD_%\n\
+# ifdef __EXPORT__\n\
+# define __MANGLE_%_DATA__ __MANGLE__ __EXPORT__\n\
+# else\n\
+# define __MANGLE_%_DATA__ __MANGLE__\n\
+# endif\n\
+# define __MANGLE_%_FUNC__ __MANGLE__\n\
+# else\n\
+# ifdef __IMPORT__\n\
+# define __MANGLE_%_DATA__ __MANGLE__ __IMPORT__\n\
+# else\n\
+# define __MANGLE_%_DATA__ __MANGLE__\n\
+# endif\n\
+# define __MANGLE_%_FUNC__ __MANGLE__\n\
+# endif\n\
+#endif\n\
+";
+ for (;;)
+ {
+ switch (*op++ = *s++)
+ {
+ case 0:
+ op--;
+ break;
+ case '%':
+ op = strcopy(op - 1, proto->package);
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ }
+ return op;
+}
+
+
+#line 422
+static char*
+nns __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
+ while (*s == ' ' || *s == '\t' || *s == '\n')
+ s++;
+ return s;
+}
+
+
+#line 439
+static int
+directive __PARAM__((register char* s, int dir), (s, dir)) __OTORP__(register char* s; int dir;){
+ switch (*(s = nns(s)))
+ {
+ case 'e':
+ case 'i':
+ dir <<= 2;
+ switch (*++s)
+ {
+ case 'f':
+ dir |= 01;
+ break;
+ case 'l':
+ dir |= 02;
+ break;
+ case 'n':
+ dir |= 03;
+ break;
+ }
+ break;
+ }
+ return dir;
+}
+
+
+
+
+
+
+
+static int
+lex __PARAM__((register Proto_t* proto, register long flags), (proto, flags)) __OTORP__(register Proto_t* proto; register long flags;){
+ register char* ip;
+ register char* op;
+ register int c;
+ register int state;
+ register short* rp;
+ char* m;
+ char* e;
+ char* t;
+ char* bp;
+ char* v;
+ char* im;
+ char* ko;
+ char* aom;
+ int n;
+ int line;
+ int quot;
+ int brack;
+ int sub;
+ int x;
+ int vc;
+
+ char* ie = 0;
+ char* om = 0;
+ char* aim = 0;
+ char* aie = 0;
+ char* func = 0;
+ int call = 0;
+ int dir = 0;
+ int group = 0;
+ int last = 0;
+ int paren = 0;
+
+ char* qe = 0;
+ int qn = 0;
+ int args = 0;
+
+
+ do{(ip=proto->ip);(op=proto->op);call=proto->call;}while(0);
+
+ if (flags & (1L<<5)) (ko=op);
+
+ fsm_start:
+ proto->tp = ip;
+ state = 0;
+ bp = ip;
+ do
+ {
+ rp = _pp_fsmtab[state];
+ fsm_get:
+ while (!(state = rp[c = (*(unsigned char*)ip++)]));
+ fsm_next:
+ ;
+ } while (state > 0);
+ if ((n = ip - bp - 1) > 0)
+ {
+ ip = bp;
+ do switch( n) { default : memcopy( op, ip, n); op += n; ip += n; break; case 7 : * op++ = * ip++; case 6 : * op++ = * ip++; case 5 : * op++ = * ip++; case 4 : * op++ = * ip++; case 3 : * op++ = * ip++; case 2 : * op++ = * ip++; case 1 : * op++ = * ip++; case 0 : break; } while (0);
+ ip++;
+ }
+ state = ~state;
+ fsm_terminal:
+ switch ((( state)&((1<<(7+1))-1)))
+ {
+ case ((0+28)+11):
+ if (op > proto->ob && *(op - 1) == '=' && (op == proto->ob + 1 || *(op - 2) != '=')) switch (c)
+ {
+ case '+':
+ case '-':
+ case '*':
+ case '&':
+ (*op++=( ' '));
+ break;
+ }
+ (*op++=( c));
+ break;
+
+ case ((0+28)+0):
+ (ip--);
+ c = (*(op-1));
+ break;
+
+ case ((0+28)+1):
+ switch (c)
+ {
+ case '\n':
+ if ((( rp)>=_pp_fsmtab[(0+16)]&&( rp)<=_pp_fsmtab[(0+18)])) goto fsm_newline;
+ (*op++=( c));
+ proto->line++;
+ rp = _pp_fsmtab[(0+13)];
+ break;
+ case '/':
+
+ if ((flags & ((1L<<5)|(1L<<15))) == (1L<<5)) (op=ko);
+ else
+
+ (*op++=( c));
+ if ((( rp)>=_pp_fsmtab[(0+16)]&&( rp)<=_pp_fsmtab[(0+18)]))
+ {
+ rp = _pp_fsmtab[(0+16)];
+ break;
+ }
+ goto fsm_start;
+ case (255+1):
+ break;
+ default:
+
+ if ((flags & ((1L<<5)|(1L<<15))) == (1L<<5)) (op=ko);
+ else
+
+ (*op++=( c));
+ rp = _pp_fsmtab[(( rp)>=_pp_fsmtab[(0+16)]&&( rp)<=_pp_fsmtab[(0+18)]) ? (0+16) : (0+14)];
+ break;
+ }
+ bp = ip;
+ goto fsm_get;
+
+ case ((0+28)+2):
+ if (c)
+ {
+ if (state = _pp_fsmtab[(0+28)][((( rp)-_pp_fsmtab[0])/(255+1))+1])
+ goto fsm_terminal;
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ return 0;
+ }
+ (ip--);
+ fsm_eob:
+ if ((flags & ((1L<<1)|((1L<<16))|(1L<<21))) == ((1L<<16)) && (proto->flags & (1L<<16)))
+ {
+
+ if (!(flags & (1L<<5)))
+
+ flags |= (1L<<24);
+ c = ip - proto->ib;
+ if (!(flags & (1L<<15)))
+ im = proto->tp;
+ if (ip > proto->ib)
+ {
+ n = ip - im;
+ if (ip - n < proto->ib)
+ proto->flags |= (1L<<4);
+ memcopy(proto->ib - n, ip - n, n);
+ ip = proto->ib;
+ }
+ proto->tp -= c;
+ if (flags & (1L<<15))
+ {
+ im -= c;
+ ie -= c;
+ }
+ if (aim)
+ aim -= c;
+ if (aie)
+ aie -= c;
+ if ((n = read(proto->fd, ip, proto->iz)) > 0)
+ {
+ if ((proto->options & (1L<<0)) && n < proto->iz)
+ {
+ proto->flags &= ~(1L<<16);
+ close(proto->fd);
+ }
+ *(ip + n) = 0;
+ if (state & (1<<7))
+ goto fsm_splice;
+ bp = ip;
+ goto fsm_get;
+ }
+ *ip = 0;
+ proto->flags &= ~(1L<<16);
+ close(proto->fd);
+ }
+ if (state & (1<<7))
+ goto fsm_splice;
+
+ if (!(flags & (1L<<21)) && (state = rp[c = (255+1)]))
+ {
+ bp = ip;
+ goto fsm_next;
+ }
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ return 0;
+
+ case ((0+28)+3):
+ quot = c;
+
+ if (c == '"' && qe)
+ {
+ for (n = 0, t = qe + 1; t < op && (*t == ' ' || *t == '\t' || *t == '\n' && ++n || *t >= 'A' && *t <= 'Z' || *t == '_'); t++);
+ if (t == op)
+ {
+ op = qe;
+ qe = 0;
+ qn = n;
+ }
+ else (*op++=( c));
+ }
+ else
+
+ (*op++=( c));
+ rp = _pp_fsmtab[(0+21)];
+ bp = ip;
+ goto fsm_get;
+
+ case ((0+28)+4):
+ if (c == quot)
+ {
+
+ if (!(flags & (1L<<3)))
+ qe = (c == '"') ? op : (char*)0;
+
+ (*op++=( c));
+
+ while (qn > 0)
+ {
+ qn--;
+ (*op++=( '\n'));
+ }
+
+ }
+ else if (c != '\n' && c != (255+1))
+ {
+ (*op++=( c));
+ bp = ip;
+ goto fsm_get;
+ }
+ else
+ {
+
+ while (qn > 0)
+ {
+ qn--;
+ (*op++=( '\n'));
+ }
+
+ (ip--);
+ }
+ c = (0401+1);
+ break;
+
+ case ((0+28)+5):
+
+ if (flags & (1L<<0)) (*op++=( c));
+ else
+
+ switch (c)
+ {
+ case 'a':
+ n = (('A'==0301)?0057:0007);
+ goto fsm_oct;
+ case 'E':
+ n = (('A'==0301)?0047:0033);
+ goto fsm_oct;
+ case 'v':
+ n = 0013;
+ goto fsm_oct;
+ case 'x':
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ lex(proto, (flags & ((1L<<16))) | (1L<<21));
+ for (n = x = 0; (c = (*(unsigned char*)ip++)), x < 3; x++) switch (c)
+ {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ n = (n << 4) + c - '0';
+ break;
+ case 'a': case 'b': case 'c': case 'd':
+ case 'e': case 'f':
+ n = (n << 4) + c - 'a' + 10;
+ break;
+ case 'A': case 'B': case 'C': case 'D':
+ case 'E': case 'F':
+ n = (n << 4) + c - 'A' + 10;
+ break;
+ default:
+ goto fsm_hex;
+ }
+ fsm_hex:
+ (ip--);
+ fsm_oct:
+ (*op++=( ((n >> 6) & 07) + '0'));
+ (*op++=( ((n >> 3) & 07) + '0'));
+ (*op++=( (n & 07) + '0'));
+ break;
+ default:
+ (*op++=( c));
+ break;
+ }
+ rp = _pp_fsmtab[(0+21)];
+ bp = ip;
+ goto fsm_get;
+
+ case ((0+28)+6):
+ (ip--);
+
+ if ((flags & (1L<<5)) && *proto->tp == 's' && !sstrncmp( proto->tp, "static", 6))
+ {
+ c = ((0500+4)+9);
+ break;
+ }
+
+ if (*proto->tp == '_' && !sstrncmp( proto->tp, "__STDPP__directive", 6)) c = '#';
+ else c = (0401+0);
+
+ break;
+
+ case ((0+28)+7):
+ fsm_newline:
+ proto->line++;
+
+ if (flags & (1L<<5))
+ {
+ if (op != proto->ob && (*(op-1)) != ' ' && (*(op-1)) != '\n')
+ (*op++=( ' '));
+ }
+ else
+
+ (*op++=( c));
+ if (flags & (1L<<3))
+ {
+
+ if (flags & (1L<<0))
+ {
+ if (flags & (1L<<5)) (op=ko);
+ if (flags & (1L<<12))
+ {
+ *(ip - 1) = 0;
+ op = strcopy(om, "/* ");
+ op = strcopy(op, im);
+ op = strcopy(op, " */\n");
+ }
+ flags &= ~((1L<<2)|(1L<<3)|(1L<<7)|(1L<<8)|(1L<<12)|(1L<<15)|(1L<<22)|(1L<<26));
+ }
+ else
+
+ {
+ if ((flags & ((1L<<2)|(1L<<22))) == ((1L<<2)|(1L<<22)))
+ {
+ *(ip - 1) = 0;
+ op = strcopy(om, "#if defined(__STDC__) || defined(__STDPP__)\n");
+ op = strcopy(op, im);
+ op = strcopy(op, "\n#else\n");
+ bp = ip;
+ ip = im;
+ *op++ = *ip++;
+ while (*op = *ip++)
+ if (*op++ == '#' && *ip != '(')
+ {
+ op--;
+ while (*--op == ' ' || *op == '\t');
+ if (*ip == '#')
+ {
+ op = strcopy(op + 1, "/**/");
+ while (*++ip == ' ' || *ip == '\t');
+ }
+ else
+ {
+ if (*op != '"') *++op = '"';
+ op++;
+ while (*ip == ' ' || *ip == '\t') ip++;
+ while ((c = *ip) >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c >= '0' && c <= '9' || c == '_') *op++ = *ip++;
+ while (*ip == ' ' || *ip == '\t') ip++;
+ if (*ip == '"') ip++;
+ else *op++ = '"';
+ }
+ }
+ ip = bp;
+ op = strcopy(op, "\n#endif\n");
+ op = linesync(proto, op, proto->line);
+ }
+ flags &= ~((1L<<2)|(1L<<3)|(1L<<7)|(1L<<8)|(1L<<15)|(1L<<17)|(1L<<22)|(1L<<23)|(1L<<25)|(1L<<26));
+ }
+ call = 0;
+ group = 0;
+ paren = 0;
+ last = '\n';
+ }
+ if (paren == 0 && (flags & ((1L<<15)|(1L<<21)|(1L<<23)|(1L<<24))) == (1L<<24))
+ {
+
+ if (flags & (1L<<5)) (op=ko);
+
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ return 0;
+ }
+ goto fsm_start;
+
+ case ((0+28)+8):
+ (*op++=( c));
+ rp = _pp_fsmtab[((( state)>>(7+1))&((1<<7)-1))];
+ bp = ip;
+ goto fsm_get;
+
+ case ((0+28)+13):
+ (*op++=( c));
+ c = (((( state)>>(7+1))&((1<<7)-1))+0401);
+ break;
+
+ case ((0+28)+14):
+ (ip--);
+ c = (((( state)>>(7+1))&((1<<7)-1))+0401);
+ break;
+
+ case (((0+28)+12)):
+ (ip--);
+ c = (0401+0);
+ if (!(flags & (1L<<1))) switch (((((long)( *proto->tp))<<16)|(((long)( *(ip - 1)))<<8)|((long)( ip - proto->tp))))
+ {
+ case ((((long)( 'N'))<<16)|(((long)( 'N'))<<8)|((long)( 3))):
+ if (proto->tp[1] == 'o')
+ c = ((0500+4)+6);
+ break;
+ case ((((long)( 'd'))<<16)|(((long)( 'o'))<<8)|((long)( 2))):
+ c = ((0500+4)+6);
+ break;
+ case ((((long)( 'e'))<<16)|(((long)( 'e'))<<8)|((long)( 4))):
+ if (!(flags & (1L<<21)) && (flags & ((1L<<3)|(1L<<25))) != (1L<<3) && !sstrncmp( proto->tp, "else", 4))
+ {
+ c = ((0500+4)+8);
+ goto fsm_id;
+ }
+ break;
+ case ((((long)( 'e'))<<16)|(((long)( 'n'))<<8)|((long)( 6))):
+ if (!sstrncmp( proto->tp, "extern", 6))
+ c = ((0500+4)+9);
+ break;
+ case ((((long)( 'f'))<<16)|(((long)( 'r'))<<8)|((long)( 3))):
+ if (!(flags & (1L<<21)) && !sstrncmp( proto->tp, "for", 3))
+ {
+ c = ((0500+4)+11);
+ goto fsm_id;
+ }
+ break;
+ case ((((long)( 'i'))<<16)|(((long)( 'f'))<<8)|((long)( 2))):
+ c = ((0500+4)+13);
+ break;
+ case ((((long)( 'i'))<<16)|(((long)( 'e'))<<8)|((long)( 6))):
+ if (!sstrncmp( proto->tp, "inline", 6) && !(flags & ((1L<<15)|(1L<<23)|(1L<<25)|(1L<<26))) && proto->brace == 0 && paren == 0 && group == 0 && (last == ';' || last == '}' || last == '\n' || last == 0))
+ {
+ flags |= (1L<<23);
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ line = proto->line;
+ op = strcopy(op - 6, "__INLINE__");
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ }
+ break;
+ case ((((long)( 'r'))<<16)|(((long)( 'n'))<<8)|((long)( 6))):
+ if (!(flags & (1L<<21)) && !sstrncmp( proto->tp, "return", 6))
+ {
+ c = ((0500+4)+17);
+ goto fsm_id;
+ }
+ break;
+ case ((((long)( 's'))<<16)|(((long)( 'c'))<<8)|((long)( 6))):
+ if ((proto->options & (1L<<6)) && !sstrncmp( proto->tp, "static", 6))
+ {
+ proto->ox = op - 6;
+ flags |= (1L<<6);
+ }
+ break;
+ case ((((long)( 't'))<<16)|(((long)( 'f'))<<8)|((long)( 7))):
+ if (!(flags & (1L<<21)) && !sstrncmp( proto->tp, "typedef", 7))
+ {
+ flags |= (1L<<26);
+ c = ((0500+4)+9);
+ }
+ break;
+ case ((((long)( 'v'))<<16)|(((long)( 't'))<<8)|((long)( 8))):
+ if (*ip == '(' && !sstrncmp( proto->tp, "va_start", 8)) c = (0500+1);
+ break;
+ case ((((long)( 'v'))<<16)|(((long)( 'd'))<<8)|((long)( 4))):
+ if (!sstrncmp( proto->tp, "void", 4))
+ {
+ if (flags & ((1L<<0)|(1L<<19)|(1L<<10)|(1L<<11))) c = ((0500+4)+30);
+ else
+ {
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ line = proto->line;
+ if (lex(proto, (flags & ((1L<<16))) | (1L<<21)) == '*')
+ {
+ memcopy(op - 4, "__V_", 4);
+ memcopy(ip - 4, "__V_", 4);
+ }
+ else c = ((0500+4)+30);
+ proto->line = line;
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ bp = ip;
+ }
+ }
+ break;
+ case ((((long)( 'w'))<<16)|(((long)( 'e'))<<8)|((long)( 5))):
+ if (!(flags & (1L<<21)) && !sstrncmp( proto->tp, "while", 5))
+ {
+ c = ((0500+4)+26);
+ goto fsm_id;
+ }
+ break;
+ }
+
+ if ((flags & (1L<<0)) && c != ((0500+4)+9))
+ c = (0401+0);
+
+ break;
+
+ case ((0+28)+10):
+ goto fsm_start;
+
+ case ((0+28)+15):
+ (ip--);
+
+ if ((flags & ((1L<<5)|(1L<<15))) == (1L<<5))
+ {
+ while (op > proto->ob && (*(op - 1) == ' ' || *(op - 1) == '\t'))
+ op--;
+ if (op > proto->ob && *(op - 1) != '\n') *op++ = ' ';
+ }
+
+ goto fsm_start;
+
+ default:
+ if (state & (1<<7))
+ {
+ if (c == '\\')
+ {
+ if (!(n = (*(unsigned char*)ip++)))
+ {
+ goto fsm_eob;
+ fsm_splice:
+ c = '\\';
+ n = (*(unsigned char*)ip++);
+ }
+ if (n == '\n')
+ {
+ proto->line++;
+ (*op++=( '\\'));
+ (*op++=( '\n'));
+ bp = ip;
+ goto fsm_get;
+ }
+ (ip--);
+ }
+ state &= ~(1<<7);
+ if (state >= (0+28))
+ goto fsm_terminal;
+ rp = _pp_fsmtab[state];
+ }
+ (*op++=( c));
+ bp = ip;
+ goto fsm_get;
+ }
+ if (!(flags & ((1L<<10)|(1L<<11)|(1L<<21))))
+ {
+ if (!(flags & (1L<<3))) switch (c)
+ {
+ case '(':
+
+ if (!(flags & (1L<<0)) || proto->brace == 0)
+
+ {
+ if (paren++ == 0)
+ {
+
+ if (!(flags & (1L<<0)) || group <= 1)
+
+ {
+
+ args = 0;
+
+ if (group++ == 0) group++;
+ else if (flags & (1L<<8)) call++;
+ flags |= (1L<<15);
+ im = ip - 1;
+ om = op - 1;
+ }
+ sub = 0;
+ }
+ else if (paren == 2 && !aim)
+ {
+ sub++;
+ if (last == '(')
+ {
+ flags &= ~(1L<<15);
+ om = 0;
+ }
+ else if (flags & (1L<<8))
+ {
+ aim = ip - 1;
+ aom = op - 1;
+ }
+ else if ((flags & ((1L<<15)|(1L<<25))) == (1L<<15))
+ {
+ for (m = ip - 2; m > im && (*m == ' ' || *m == '\t'); m--);
+ if (m != im && sub == 1)
+ {
+ m = im + (*nns(ip) == '*');
+ }
+ if (m == im)
+ {
+ flags &= ~(1L<<15);
+ om = 0;
+ }
+ }
+ else if ((flags & (1L<<15)) && sub == 1 && *nns(ip) != '*')
+ {
+ flags &= ~(1L<<15);
+ om = 0;
+ }
+ }
+ flags &= ~(1L<<25);
+ }
+ break;
+ case ')':
+
+ if (!(flags & (1L<<0)) || proto->brace == 0)
+
+ if (--paren == 0)
+ {
+
+ if (flags & (1L<<0))
+ {
+ if (group != 2)
+ {
+ c = (0401+0);
+ break;
+ }
+ group++;
+ }
+
+ ie = ip;
+ }
+ else if (paren == 1 && (flags & (1L<<8)) && !aie)
+ aie = ip;
+ break;
+ case '*':
+ if (last == '(' && group == 2)
+ {
+ group--;
+ if (paren == 1)
+ {
+ flags |= (1L<<8);
+ aim = aie = 0;
+ }
+ }
+ break;
+ case '#':
+ dir = directive(ip, dir);
+ if (proto->brace == 0 && paren == 0 && last != '=' && (flags & ((1L<<0)|(1L<<1)|(1L<<3)|(1L<<15)|(1L<<19)|(1L<<23)|(1L<<25))) == ((1L<<15)|(1L<<25)) && ((dir & 03) != 03 || ((dir>>2) & 03) != 01))
+ flags |= (1L<<3);
+ else if (!(flags & ((1L<<1)|(1L<<3))))
+ {
+ flags |= (1L<<3);
+ if (!(flags & (1L<<19)))
+ {
+ bp = ip;
+ while (*ip == ' ' || *ip == '\t') ip++;
+ if (*ip == 'l' && *++ip == 'i' && *++ip == 'n' && *++ip == 'e')
+ {
+ if (*++ip == ' ' || *ip == '\t')
+ {
+ proto->line = 0;
+ while (*++ip >= '0' && *ip <= '9')
+ proto->line = proto->line * 10 + *ip - '0';
+ proto->line--;
+ }
+ }
+
+ else if ((flags & ((1L<<0)|(1L<<5))) == (1L<<0))
+ {
+ n = 0;
+ t = ip + 6;
+ while (ip < t && *ip >= 'a' && *ip <= 'z')
+ n = ((( n)<<5)+(( *ip++)-('a'-1)));
+ switch (n)
+ {
+ case ((( ((( ((( (( 'e')-('a'-1)))<<5)+(( 'l')-('a'-1))))<<5)+(( 's')-('a'-1))))<<5)+(( 'e')-('a'-1))):
+ case ((( ((( ((( ((( (( 'e')-('a'-1)))<<5)+(( 'n')-('a'-1))))<<5)+(( 'd')-('a'-1))))<<5)+(( 'i')-('a'-1))))<<5)+(( 'f')-('a'-1))):
+ while (*ip == ' ' || *ip == '\t') ip++;
+ if (*ip != '\n' && *ip != '/' && *(ip + 1) != '*')
+ {
+ flags |= (1L<<12)|(1L<<15);
+ im = ip;
+ om = op + (ip - bp);
+ }
+ break;
+ case ((( ((( ((( (( 'e')-('a'-1)))<<5)+(( 'l')-('a'-1))))<<5)+(( 'i')-('a'-1))))<<5)+(( 'f')-('a'-1))):
+ case ((( ((( ((( ((( (( 'e')-('a'-1)))<<5)+(( 'r')-('a'-1))))<<5)+(( 'r')-('a'-1))))<<5)+(( 'o')-('a'-1))))<<5)+(( 'r')-('a'-1))):
+ case ((( (( 'i')-('a'-1)))<<5)+(( 'f')-('a'-1))):
+ case ((( ((( ((( ((( (( 'i')-('a'-1)))<<5)+(( 'f')-('a'-1))))<<5)+(( 'd')-('a'-1))))<<5)+(( 'e')-('a'-1))))<<5)+(( 'f')-('a'-1))):
+ case ((( ((( ((( ((( ((( (( 'i')-('a'-1)))<<5)+(( 'f')-('a'-1))))<<5)+(( 'n')-('a'-1))))<<5)+(( 'd')-('a'-1))))<<5)+(( 'e')-('a'-1))))<<5)+(( 'f')-('a'-1))):
+ case ((( ((( ((( ((( (( 'u')-('a'-1)))<<5)+(( 'n')-('a'-1))))<<5)+(( 'd')-('a'-1))))<<5)+(( 'e')-('a'-1))))<<5)+(( 'f')-('a'-1))):
+ break;
+ case ((( ((( ((( ((( ((( (( 'i')-('a'-1)))<<5)+(( 'n')-('a'-1))))<<5)+(( 'c')-('a'-1))))<<5)+(( 'l')-('a'-1))))<<5)+(( 'u')-('a'-1))))<<5)+(( 'd')-('a'-1))):
+ if (*ip == 'e') ip++;
+
+ case ((( ((( ((( ((( ((( (( 'd')-('a'-1)))<<5)+(( 'e')-('a'-1))))<<5)+(( 'f')-('a'-1))))<<5)+(( 'i')-('a'-1))))<<5)+(( 'n')-('a'-1))))<<5)+(( 'e')-('a'-1))):
+ case ((( ((( ((( ((( ((( (( 'p')-('a'-1)))<<5)+(( 'r')-('a'-1))))<<5)+(( 'a')-('a'-1))))<<5)+(( 'g')-('a'-1))))<<5)+(( 'm')-('a'-1))))<<5)+(( 'a')-('a'-1))):
+ if (*ip < 'a' || *ip > 'z') break;
+
+ default:
+ flags |= (1L<<12)|(1L<<15);
+ im = bp - 1;
+ om = op - 1;
+ break;
+ }
+ }
+ else
+
+ {
+ if (*ip == 'i' && *++ip == 'n' && *++ip == 'c' && *++ip == 'l' && *++ip == 'u' && *++ip == 'd' && *++ip == 'e')
+ {
+ while (*++ip == ' ' || *ip == '\t');
+ if (*ip++ == '<' && *ip++ == 's' && *ip++ == 't' && *ip++ == 'd' && *ip++ == 'a' && *ip++ == 'r' && *ip++ == 'g' && *ip++ == '.' && *ip++ == 'h' && *ip++ == '>')
+ {
+ op = strcopy(op, "\
+if !defined(va_start)\n\
+#if defined(__STDARG__)\n\
+#include <stdarg.h>\n\
+#else\n\
+#include <varargs.h>\n\
+#endif\n\
+#endif\n\
+");
+ op = linesync(proto, op, proto->line);
+ break;
+ }
+ }
+ else if (*ip == 'd' && *++ip == 'e' && *++ ip == 'f' && *++ip == 'i' && *++ip == 'n' && *++ip == 'e' && (*++ip == ' ' || *ip == '\t'))
+ {
+ while (*++ip == ' ' || *ip == '\t');
+ if (*ip == 'e' && *++ip == 'x' && *++ ip == 't' && *++ip == 'e' && *++ip == 'r' && *++ip == 'n' && (*++ip == ' ' || *ip == '\t'))
+ {
+ t = ip;
+ while (*++t == ' ' || *t == '\t');
+ if (*t == 'e' && *++t == 'x' && *++ t == 't' && *++t == 'e' && *++t == 'r' && *++t == 'n' && (*++t == ' ' || *t == '\t' || *t == '\n' || *t == '\r'))
+ ip = t;
+ t = ip;
+ while (*++t == ' ' || *t == '\t');
+ if (*t == '_' && *(t + 1) == '_')
+ {
+ op = strcopy(op, "undef __MANGLE__\n");
+ op = linesync(proto, op, proto->line);
+ op = strcopy(op, "#define __MANGLE__ __LINKAGE__");
+ break;
+ }
+ }
+ flags |= (1L<<2)|(1L<<15);
+ im = bp - 1;
+ om = op - 1;
+ }
+ else if (*ip == 'u' && *++ip == 'n' && *++ ip == 'd' && *++ip == 'e' && *++ip == 'f' && (*++ip == ' ' || *ip == '\t'))
+ {
+ while (*++ip == ' ' || *ip == '\t');
+ if (*ip == 'e' && *++ip == 'x' && *++ ip == 't' && *++ip == 'e' && *++ip == 'r' && *++ip == 'n' && (*++ip == ' ' || *ip == '\t' || *ip == '\n' || *ip == '\r'))
+ {
+ op = strcopy(op, "undef __MANGLE__\n");
+ op = linesync(proto, op, proto->line);
+ op = strcopy(op, "#define __MANGLE__ __LINKAGE__");
+ break;
+ }
+ flags |= (1L<<2)|(1L<<15);
+ im = bp - 1;
+ om = op - 1;
+ }
+ }
+ ip = bp;
+ }
+ break;
+ }
+ else
+ break;
+
+ case '{':
+ if (proto->brace++ == 0 && paren == 0)
+ {
+ if (last == '=') flags |= (1L<<9);
+
+ else if (flags & (1L<<0))
+ {
+ if ((flags & ((1L<<15)|(1L<<17)|(1L<<23))) == (1L<<15))
+ {
+ if (args)
+ {
+ v = number(op, args < 0 ? -args : args);
+ v = strcopy(v, " argument actual/formal mismatch");
+ *v++ = ' ';
+ v = memcopy(v, im, ie - im);
+ *v = 0;
+ proto_error((char*)proto + sizeof(Proto_t), 2, op, ((char*)0));
+ }
+ ip--;
+
+ v = ie;
+ while (ie < ip)
+ if (*ie++ == '/' && *ie == '*')
+ {
+ e = ie - 1;
+ while (++ie < ip)
+ {
+ if (*ie == '*')
+ {
+ while (ie < ip && *ie == '*') ie++;
+ if (ie < ip && *ie == '/')
+ {
+ while (++ie < ip && (*ie == ' ' || *ie == '\t'));
+ while (e > v && (*(e - 1) == ' ' || *(e - 1) == '\t')) e--;
+ if (e > v && *e != '\n') *e++ = ' ';
+ t = ie;
+ while (--e >= v)
+ *--t = *e;
+ v = t;
+ break;
+ }
+ }
+ }
+ }
+ ie = v;
+
+ op = om++;
+ if (flags & (1L<<5))
+ {
+ v = op;
+ while (v > ko && *--v != ' ');
+ if (*v != ' ')
+ {
+ om = (v = (op += 4)) + 1;
+ while (v >= ko + 4)
+ {
+ *v = *(v - 4);
+ v--;
+ }
+ memcopy(ko, "int ", 4);
+ }
+ if (*v == ' ')
+ {
+ while (*(v + 1) == '*')
+ *v++ = '*';
+ *v = '\t';
+ if ((v - ko) <= 8)
+ {
+ om = (e = ++op) + 1;
+ while (e > v)
+ {
+ *e = *(e - 1);
+ e--;
+ }
+ }
+ }
+ om = (v = (op += 7)) + 1;
+ while (v >= ko + 7)
+ {
+ *v = *(v - 7);
+ v--;
+ }
+ memcopy(ko, "extern ", 7);
+ }
+ (*op++=( '('));
+ t = op;
+ e = 0;
+
+ while (ie < ip)
+ {
+ if ((c = *ie) == ' ' || c == '\t' || c == '\n')
+ {
+ while ((c = *++ie) == ' ' || c == '\t' || c == '\n');
+ if (ie >= ip) break;
+ if (c != '*' && op > om) (*op++=( ' '));
+ }
+ if ((n = ((c = *ie) == ',')) || c == ';')
+ {
+ if (flags & (1L<<5))
+ {
+ m = op;
+ while (op > om && ((c = *(op - 1)) == '(' || c == ')' || c == '[' || c == ']'))
+ op--;
+ v = op;
+ while (op > om && (c = *(op - 1)) != ' ' && c != '*')
+ op--;
+ while (*(op - 1) == ' ')
+ op--;
+ if (!e)
+ {
+ e = op;
+ while (e > om && *(e - 1) == '*')
+ e--;
+ }
+
+
+
+
+ if (op <= om)
+ op = strcopy(op, "int");
+ else if (*(op - 1) == ',')
+ op = strcopy(op, " int");
+
+ while (v < m)
+ (*op++=( *v++));
+ }
+ (*op++=( ','));
+ if (n)
+ {
+ if (x = !e) e = op - 1;
+ (*op++=( ' '));
+ m = t;
+ while (m < e)
+ (*op++=( *m++));
+ if (x)
+ {
+ m = e;
+ while (*--e != ' ');
+ while (*(e - 1) == '*') e--;
+ op -= m - e;
+ }
+ }
+ while ((c = *++ie) == ' ' || c == '\t' || c == '\n');
+ if (ie >= ip) (op--);
+ else (*op++=( ' '));
+ if (!n)
+ {
+ t = op;
+ e = 0;
+ }
+ }
+ else if (*ie == '*')
+ {
+ if (op > om && (c = *(op - 1)) == ' ') op--;
+ while (*ie == '*') (*op++=( *ie++));
+ while (*ie == ' ' || *ie == '\t' || *ie == '\n') ie++;
+ if (c != '(') (*op++=( ' '));
+ }
+ else if (*ie == '(')
+ {
+ if (op > om && *(op - 1) == ' ') op--;
+ (*op++=( *ie++));
+ while (*ie == ' ' || *ie == '\t' || *ie == '\n') ie++;
+ }
+ else if (*ie == ')')
+ {
+ if (op > om && *(op - 1) == '(')
+ proto_error((char*)proto + sizeof(Proto_t), 1, "function pointer argument prototype omitted", ((char*)0));
+ (*op++=( *ie++));
+ while (*ie == ' ' || *ie == '\t' || *ie == '\n') ie++;
+ }
+ else if ((flags & (1L<<5)) && (op == om || *(op - 1) == ' ') && *ie == 'r' && !sstrncmp( ie, "register", 8) && (*(ie + 8) == ' ' || *(ie + 8) == '\t' || *(ie + 8) == '\n'))
+ {
+ ie += 8;
+ if (op > om) (op--);
+ }
+ else (*op++=( *ie++));
+ }
+
+ if (op <= om) op = strcopy(op, "void");
+ (*op++=( ')'));
+ if (flags & (1L<<5))
+ {
+ (*op++=( ';'));
+ (*op++=( '\n'));
+ (proto->op=op);
+ (ko=op);
+ }
+ else
+ {
+ (*op++=( '\n'));
+ (*op++=( *ip));
+ }
+ ip++;
+ flags &= ~((1L<<15)|(1L<<23));
+ }
+ }
+
+ else if ((flags & ((1L<<15)|(1L<<19)|(1L<<23)|(1L<<25))) == ((1L<<15)|(1L<<25)))
+ {
+ line = proto->line;
+ op = strcopy(om, " __PARAM__(");
+ op = memcopy(op, im, ie - im);
+ (*op++=( ','));
+ (*op++=( ' '));
+ (*op++=( '('));
+ flags &= ~((1L<<15)|(1L<<23));
+ if (flags & (1L<<27))
+ {
+ if ((vc = ie - im + 1) > sizeof(proto->variadic)) vc = sizeof(proto->variadic);
+ memcopy(proto->variadic, im, vc);
+ op = strcopy(op, "va_alist)) __OTORP__(va_dcl)\n{");
+ }
+ else
+ {
+ flags |= (1L<<23);
+ proto->ip = im;
+ proto->op = op;
+ group = 0;
+ brack = 0;
+ for (;;)
+ {
+ switch (lex(proto, (flags & ((1L<<16))) | (1L<<21)))
+ {
+ case '[':
+ brack++;
+ continue;
+ case ']':
+ brack--;
+ continue;
+ case '(':
+ if (paren++) group++;
+ continue;
+ case ')':
+ if (--paren == 0)
+ {
+ group = 0;
+ if (flags & (1L<<15))
+ {
+ flags &= ~((1L<<15)|(1L<<23));
+ op = memcopy(op, m, e - m);
+ }
+ break;
+ }
+ continue;
+ case ',':
+ if (paren == 1)
+ {
+ group = 0;
+ if (flags & (1L<<15))
+ {
+ flags &= ~((1L<<15)|(1L<<23));
+ op = memcopy(op, m, e - m);
+ }
+ (*op++=( ','));
+ (*op++=( ' '));
+ proto->op = op;
+ }
+ continue;
+ case (0401+0):
+ if (group <= 1 && !brack)
+ {
+ flags |= (1L<<15);
+ m = proto->tp;
+ e = proto->ip;
+ }
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ (*op++=( ')'));
+ (*op++=( ')'));
+ }
+ if (!(flags & (1L<<23)))
+ {
+ flags |= (1L<<23);
+ proto->op = strcopy(op, " __OTORP__(");
+ proto->ip = im + 1;
+ n = *(ie - 1);
+ *(ie - 1) = ';';
+ c = *ie;
+ *ie = 0;
+ lex(proto, (flags & ((1L<<16))) | (1L<<1));
+ *(ie - 1) = n;
+ *ie = c;
+ proto->ip = ie;
+ op = proto->op;
+ (*op++=( ')'));
+ }
+ if (flags & (1L<<6)) memcopy( proto->ox, "extern", 6);
+ op = linesync(proto, op, proto->line = line);
+ if (flags & (1L<<3))
+ {
+ proto->brace = 0;
+ (*op++=( '\n'));
+ (*op++=( '#'));
+ }
+ else if (!(flags & (1L<<27))) (*op++=( '{'));
+ }
+ }
+ flags &= ~((1L<<7)|(1L<<8)|(1L<<15)|(1L<<17)|(1L<<23));
+ call = 0;
+ group = 0;
+ break;
+ case '}':
+ flags &= ~((1L<<7)|(1L<<8)|(1L<<15)|(1L<<17)|(1L<<23)|(1L<<25));
+ if (--proto->brace == 0)
+ {
+ flags &= ~((1L<<9)|(1L<<27)|(1L<<28));
+
+ if (flags & (1L<<5)) (op=ko);
+
+ }
+ call = 0;
+ group = 0;
+ paren = 0;
+ break;
+ case '=':
+ if (last == '?') flags |= (1L<<3);
+ else if (paren == 0 && (flags & ((1L<<9)|(1L<<15)|(1L<<23))) == (1L<<15))
+ {
+ if (last == ')' && proto->brace && (group != 2 || call != 2)) flags |= (1L<<23);
+ else goto fsm_statement;
+ }
+ goto fsm_other;
+ case ',':
+
+ if (flags & (1L<<0))
+ {
+ if (paren == 1) args++;
+ else
+ {
+ args--;
+ flags &= ~(1L<<15);
+ }
+ break;
+ }
+
+ if (paren == 0 && (flags & (1L<<1))) *(op - 1) = c = ';';
+
+ case ';':
+ fsm_statement:
+ if (flags & (1L<<9)) ;
+
+ else if (flags & (1L<<0))
+ {
+ if (paren == 0)
+ {
+ if ((flags & (1L<<15)) && last == ')')
+ flags &= ~(1L<<15);
+ if (!(flags & (1L<<15)))
+ {
+ call = 0;
+ group = 0;
+ flags &= ~(1L<<23);
+ if (flags & (1L<<5)) (op=ko);
+ if (flags & (1L<<24))
+ {
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ return 0;
+ }
+ }
+ else
+ {
+ args--;
+ if ((flags & ((1L<<5)|(1L<<23))) == ((1L<<5)|(1L<<23)))
+ (op=ko);
+ }
+ }
+ }
+
+ else if (paren == 0)
+ {
+ if ((flags & ((1L<<15)|(1L<<17)|(1L<<23))) == (1L<<15) && call > 1)
+ {
+ if ((flags & (1L<<14)) && func)
+ {
+ func[0] = 'F';
+ func[1] = 'U';
+ func[2] = 'N';
+ func[3] = 'C';
+ func = 0;
+ }
+ if ((flags & ((1L<<1)|(1L<<8))) == (1L<<8) && aim && aie < im)
+ {
+ while (aie < ip && (*aie == ' ' || *aie == '\t' || *aie == '\n')) aie++;
+ v = aim;
+ while (v < aie)
+ if (*v++ == ')') break;
+ while (v < aie && (*v == ' ' || *v == '\t' || *v == '\n')) v++;
+ if (v == aie || !(flags & (1L<<20)))
+ {
+ if (flags & (1L<<20)) n = 3;
+ else if (v == aie && *v == '(') n = 10;
+ else n = 11;
+ ko = op;
+ om += n;
+ v = op += n;
+ while (v >= ko + n)
+ {
+ *v = *(v - n);
+ v--;
+ }
+ if (flags & (1L<<20)) memcopy(aom, "(...))", 6);
+ else if (n == 10) memcopy(aom, "(__VARARG__))", 13);
+ else
+ {
+ ko = strcopy(aom, " __PROTO__(");
+ ko = memcopy(ko, aim, aie - aim);
+ *ko = ')';
+ if (++ko >= om)
+ {
+ *ko++ = ')';
+ om = ko;
+ }
+ }
+ }
+ }
+ else if (flags & (1L<<26))
+ {
+ op = om;
+ while (*--op == ' ' || *op == '\t' || *op == '\n');
+ if (*op != ')')
+ {
+ op = om += 14;
+ *--op = ')';
+ while ((x = *(op - 14)) >= 'A' && x <= 'Z' || x >= 'a' && x <= 'z' || x >= '0' && x <= '9' || x == '_')
+ *--op = x;
+ memcopy(op - 13, "(__OTORP__(*)", 13);
+ }
+ }
+ if (flags & (1L<<17))
+ ;
+ else if (flags & (1L<<20))
+ {
+ op = om;
+ if (!(flags & (1L<<25))) op = strcopy(op, "(...)");
+ else op = memcopy(op, im, ie - im);
+ (*op++=( c));
+ }
+ else
+ {
+ if (flags & (1L<<1)) op = strcopy(om, "()");
+ else if (!(flags & (1L<<25))) op = strcopy(om, "(__VARARG__)");
+ else
+ {
+ op = strcopy(om, " __PROTO__(");
+ op = memcopy(op, im, ie - im);
+ (*op++=( ')'));
+ }
+ if (flags & (1L<<6)) memcopy( proto->ox, "extern", 6);
+ (*op++=( c));
+ }
+ flags &= ~((1L<<15)|(1L<<27)|(1L<<28));
+ if (c == ',' && !(flags & (1L<<8)))
+ {
+ call = 1;
+ group = 0;
+ break;
+ }
+ }
+ else if (flags & ((1L<<17)|(1L<<23))) call = 0;
+ if (c == ';')
+ {
+ flags &= ~((1L<<6)|(1L<<14)|(1L<<25)|(1L<<26));
+ call = 0;
+ if (flags & (1L<<24))
+ {
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ return 0;
+ }
+ }
+ else call = call > 1 && c == ',';
+ group = 0;
+ flags &= ~((1L<<7)|(1L<<8)|(1L<<15)|(1L<<17)|(1L<<23));
+ }
+ else if (paren == 1 && group == 1 && !(flags & ((1L<<7)|(1L<<14)))) flags |= (1L<<25)|(1L<<17);
+ break;
+ case ((0500+4)+6):
+ case ((0500+4)+13):
+ flags |= (1L<<25)|(1L<<23);
+ break;
+ case ((0500+4)+9):
+
+ if (flags & (1L<<0))
+ {
+ if (proto->brace == 0)
+ flags |= (1L<<23);
+ }
+ else
+
+ if (paren == 0 && !(flags & (1L<<26)))
+ {
+ flags |= (1L<<14);
+ if (!(flags & (1L<<19)) || proto->package)
+ {
+ op = strcopy(op, " __MANGLE__");
+ if (proto->package)
+ {
+ op = strcopy(op - 1, proto->package);
+ func = op + 1;
+ op = strcopy(op, "_DATA__");
+ }
+ }
+ else
+ func = 0;
+ }
+ break;
+ case (0401+29):
+ if (paren == 0 && (flags & ((1L<<1)|(1L<<27))) == (1L<<1))
+ {
+ op -= 3;
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ return c;
+ }
+ if (paren == 1 && !(flags & (1L<<23)))
+ flags |= (1L<<27);
+ flags |= (1L<<25);
+ break;
+ case ((0500+4)+30):
+ goto fsm_id;
+ case (0500+1):
+ if ((flags & ((1L<<19)|(1L<<27))) == (1L<<27))
+ {
+ flags &= ~(1L<<15);
+ line = proto->line;
+ op = strcopy(op - 8, "__VA_START__");
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ for (;;)
+ {
+ switch (lex(proto, (flags & ((1L<<16))) | (1L<<21)))
+ {
+ case 0:
+ case ';':
+ break;
+ case (0401+0):
+ if (!(flags & (1L<<15)))
+ {
+ flags |= (1L<<15);
+ m = proto->tp;
+ e = proto->ip;
+ }
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ do{(ip=proto->ip);(op=proto->op);call=proto->call;}while(0);
+ if (flags & (1L<<15))
+ {
+ v = m;
+ n = e - m;
+ }
+ else
+ {
+ v = "ap";
+ n = 2;
+ }
+ op = strcopy(op, " __OTORP__(");
+ proto->ip = proto->variadic;
+ proto->op = op;
+ flags &= ~(1L<<15);
+ group = 0;
+ bp = proto->ip + 1;
+ if (*bp == 'r' && !sstrncmp( bp, "register", 8) && (*(bp + 8) == ' ' || *(bp + 8) == '\t')) bp += 9;
+ for (;;)
+ {
+ switch (lex(proto, (flags & ((1L<<16))) | (1L<<21)))
+ {
+ case '(':
+ if (paren++) group++;
+ continue;
+ case ')':
+ if (--paren == 0)
+ {
+ if (flags & (1L<<15))
+ {
+ flags &= ~(1L<<15);
+ if (!(flags & (1L<<28)))
+ {
+ op = memcopy(op, m, e - m);
+ op = strcopy(op, " = ");
+ }
+ op = strcopy(op, "va_arg(");
+ op = memcopy(op, v, n);
+ (*op++=( ','));
+ (*op++=( ' '));
+ if (m > bp) op = memcopy(op, bp, m - bp);
+ else op = strcopy(op, "int ");
+ if (group > 1) op = strcopy(op, ")()");
+ else op = memcopy(op, e, proto->ip - e - 1);
+ (*op++=( ')'));
+ (*op++=( ';'));
+ }
+ group = 0;
+ break;
+ }
+ continue;
+ case ',':
+ if (paren == 1)
+ {
+ if (flags & (1L<<15))
+ {
+ flags &= ~(1L<<15);
+ if (!(flags & (1L<<28)))
+ {
+ op = memcopy(op, m, e - m);
+ op = strcopy(op, " = ");
+ }
+ op = strcopy(op, "va_arg(");
+ op = memcopy(op, v, n);
+ (*op++=( ','));
+ (*op++=( ' '));
+ if (m > bp) op = memcopy(op, bp, m - bp);
+ else op = strcopy(op, "int ");
+ if (group > 1) op = strcopy(op, ")()");
+ else op = memcopy(op, e, proto->ip - e - 1);
+ (*op++=( ')'));
+ (*op++=( ';'));
+ bp = proto->ip + 1;
+ if (*bp == 'r' && !sstrncmp( bp, "register", 8) && (*(bp + 8) == ' ' || *(bp + 8) == '\t')) bp += 9;
+ }
+ group = 0;
+ proto->op = op;
+ }
+ continue;
+ case (0401+0):
+ if (group <= 1)
+ {
+ flags |= (1L<<15);
+ m = proto->tp;
+ e = proto->ip;
+ }
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ op = strcopy(op, ")");
+ flags |= (1L<<28);
+ proto->line = line;
+ call = 0;
+ break;
+ }
+
+ case (0401+0):
+ fsm_id:
+
+ if (flags & (1L<<0))
+ {
+ if (!args && paren == 1) args++;
+ break;
+ }
+
+ if (paren == 0)
+ {
+ if (last == ')')
+ {
+ if (proto->brace == 0 && !(flags & (1L<<1))) flags |= (1L<<23);
+ call = !call;
+ }
+ else if ((flags & (1L<<23)) || c == (0401+0) || c == ((0500+4)+30)) call++;
+ else flags |= (1L<<23);
+ if (last == (0401+0)) flags |= (1L<<7);
+ }
+ c = (0401+0);
+ flags |= (1L<<25);
+ break;
+ case (0401+1):
+ if (*proto->tp >= '0' && *proto->tp <= '9')
+ {
+ n = 0;
+ for (;; op--)
+ {
+ switch (*(op - 1))
+ {
+ case 'f':
+ case 'F':
+ t = op;
+ while ((c = *--t) >= '0' && c <= '9' || c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z');
+ if (*t == '.')
+ op--;
+ n = 0;
+ break;
+ case 'l':
+ case 'L':
+ if (!(n & 01))
+ {
+ n |= 01;
+ t = op;
+ while ((c = *--t) >= '0' && c <= '9' || c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z');
+ if (*t == '.')
+ {
+ n = 0;
+ op--;
+ break;
+ }
+ }
+ continue;
+ case 'u':
+ case 'U':
+ n |= 02;
+ continue;
+ }
+ break;
+ }
+ if (n & 01)
+ *op++ = 'L';
+ if (n & 02)
+ {
+ m = op;
+ t = op = m + 10;
+ while ((c = *--m) >= '0' && c <= '9' || c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')
+ *--t = c;
+ c = *t;
+ strcopy(m + 1, "(unsigned)");
+ *t = c;
+ break;
+ }
+ }
+ goto fsm_other;
+
+ case '[':
+ if ((flags & (1L<<0)) && paren == 0 && group <= 2) flags |= (1L<<23);
+
+
+ default:
+ fsm_other:
+
+ if (flags & (1L<<0)) break;
+
+ flags |= (1L<<25);
+ if (paren == 0) flags |= (1L<<17);
+ break;
+ }
+ else if (c == '#' && *ip != '(') flags |= (1L<<22);
+ last = c;
+
+ if ((flags & ((1L<<5)|(1L<<15))) == ((1L<<5)|(1L<<15)) && ((flags & ((1L<<3)|(1L<<23))) || proto->brace || c != '(' && c != ')' && c != '*' && c != (0401+0)))
+ (op=proto->op);
+ else
+
+ (proto->op=op);
+ goto fsm_start;
+ }
+ else if (flags & ((1L<<10)|(1L<<11)))
+ {
+
+ if ((flags & (1L<<29)) && c == '%' && *ip == '{')
+ t = 0;
+ else
+
+ {
+ if (c == '#')
+ {
+ for (t = ip; *t == ' ' || *t == '\t'; t++);
+ if (*t++ == 'i' && *t++ == 'f' && *t++ == 'n' && *t++ == 'd' && *t++ == 'e' && *t++ == 'f')
+ {
+
+
+
+
+ t = 0;
+ }
+ }
+ else
+ t = "";
+ }
+ if (t)
+ {
+
+ n = ip - proto->tp;
+ ip -= n;
+ op -= n;
+
+
+
+
+ }
+ else
+ while (*ip != '\n')
+ *op++ = *ip++;
+ op = init(proto, op, flags);
+ op = linesync(proto, op, proto->line);
+ flags &= ~((1L<<10)|(1L<<11));
+ proto->flags &= ~((1L<<10)|(1L<<11));
+ goto fsm_start;
+ }
+ do{(proto->ip=ip);(proto->op=op);proto->flags&=~((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->flags|=flags&((1L<<5)|(1L<<9)|(1L<<17)|(1L<<27)|(1L<<28));proto->call=call;}while(0);
+ return c;
+}
+
+
+
+
+
+void
+pppclose __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
+
+ if (proto->flags & (1L<<16)) close(proto->fd);
+ free((char*)proto);
+}
+
+
+#line 2055
+char*
+pppopen __PARAM__((char* file, int fd, char* notice, char* options, char* package, char* comment, int flags), (file, fd, notice, options, package, comment, flags)) __OTORP__(char* file; int fd; char* notice; char* options; char* package; char* comment; int flags;){
+ register Proto_t* proto;
+ register char* iob;
+ register long n;
+ register char* s;
+ char* t;
+ int pragma;
+ int clr;
+ int hit;
+ int i;
+ int z;
+ char* b;
+
+ int comlen;
+ char com[80];
+
+ int m = 0;
+
+ static int retain;
+
+
+
+
+
+
+ if (flags & (1<<0)) flags &= ~(1<<5);
+
+ if (flags & (1<<11)) flags &= ~retain;
+ else retain &= (1<<6);
+ if (file && (fd = open(file, O_RDONLY)) < 0) return 0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+
+
+
+
+ n = (16*1024);
+ if (!(proto = (( 0)?( Proto_t*)realloc((char*)( 0),sizeof( Proto_t)*( 1)+( 5 * n + 2)):( Proto_t*)calloc(1,sizeof( Proto_t)*( 1)+( 5 * n + 2)))))
+ return 0;
+ proto->iz = n;
+ proto->oz = 3 * n;
+ proto->flags |= (1L<<16);
+ }
+ proto->fd = fd;
+ proto->package = package;
+ iob = (char*)proto + sizeof(Proto_t);
+ proto->op = proto->ob = iob;
+ proto->ip = proto->ib = iob + proto->oz + n;
+ if (m) proto->options |= (1L<<0);
+ if (!comment)
+ comment = "/*";
+ if (!(proto->cc[0] = comment[0]))
+ notice = options = 0;
+ else if (comment[1])
+ {
+ proto->cc[1] = comment[1];
+ proto->cc[2] = comment[2] ? comment[2] : comment[0];
+ }
+ else
+ proto->cc[1] = proto->cc[2] = comment[0];
+
+
+
+
+
+ n = read(fd, proto->ip, proto->iz);
+ if (!(proto->flags & (1L<<16)))
+ close(fd);
+ if (n < 0)
+ {
+ pppclose(iob);
+ return 0;
+ }
+ *(proto->ip + n) = 0;
+
+
+#line 2165
+ if (!notice && !options || (comlen = astlicense(com, sizeof(com), ((char*)0), "type=check", proto->cc[0], proto->cc[1], proto->cc[2])) <= 0)
+ *com = 0;
+
+ hit = (notice || options) ? 0 : 0x02;
+ pragma = -1;
+ s = proto->ip;
+ m = 80;
+ while (m-- > 0 && *s && hit != (0x01|0x02))
+ {
+ while (*s == ' ' || *s == '\t')
+ s++;
+ if (*s == '#')
+ {
+ b = s++;
+ while (*s == ' ' || *s == '\t')
+ s++;
+ if (*s == *"pragma"&& !sstrncmp( s, "pragma", sizeof("pragma") - 1) && (*(s += sizeof("pragma") - 1) == ' ' || *s == '\t'))
+ {
+ clr = 0;
+ while (*s && *s != '\r' && *s != '\n')
+ {
+ for (; *s == ' ' || *s == '\t'; s++);
+ for (t = s; *s && *s != ' ' && *s != '\t' && *s != '\r' && *s != '\n'; s++);
+ z = s - t;
+ for (i = 0; i < (sizeof( pragmas)/sizeof( pragmas[0])); i++)
+ if (pragmas[i].size == z && !sstrncmp( t, pragmas[i].name, z))
+ {
+ clr = 1;
+ hit |= pragmas[i].hit;
+ switch (pragmas[i].hit)
+ {
+ case 0x02:
+ notice = options = 0;
+ break;
+ case 0x01:
+ pragma = pragmas[i].val;
+ break;
+ }
+ }
+ }
+ if (clr)
+ {
+
+ if (!(flags & (1<<1)) || (flags & (1<<8)))
+
+ for (; b < s; *b++ = ' ');
+ }
+ }
+ }
+ else if (*s == *"/* : : generated by proto : : */\n"&& !sstrncmp( s, "/* : : generated by proto : : */\n", sizeof("/* : : generated by proto : : */\n") - 1))
+ {
+ pragma = 0;
+ break;
+ }
+
+ else if (*s == '%' && *(s + 1) == '{')
+ proto->flags |= (1L<<29);
+ else if (!(hit & 0x02))
+ {
+ if (*s == *com && !sstrncmp( s, com, comlen))
+ {
+ hit |= 0x02;
+ notice = options = 0;
+ }
+ else
+ for (; *s && *s != '\n' && !(hit & 0x02); s++)
+ for (i = 0; i < (sizeof( notices)/sizeof( notices[0])); i++)
+ if (*s == notices[i].name[0] && !sstrncmp( s, notices[i].name, notices[i].size))
+ {
+ s += notices[i].size;
+ if (notices[i].val)
+ {
+ while (*s == ' ' || *s == '\t')
+ s++;
+ if (*s == '(' && (*(s + 1) == 'c' || *(s + 1) == 'C') && *(s + 2) == ')' || *s >= '0' && *s <= '9' && *(s + 1) >= '0' && *(s + 1) <= '9')
+ {
+ hit |= notices[i].hit;
+ notice = options = 0;
+ }
+ }
+ else
+ {
+ hit |= notices[i].hit;
+ notice = options = 0;
+ }
+ break;
+ }
+ }
+
+ while (*s && *s++ != '\n');
+ }
+ if (flags & (1<<10)) proto->flags |= (1L<<20);
+ if (flags & (1<<12)) proto->test = 1;
+ if (flags & (1<<2)) proto->options |= (1L<<6);
+
+ if (flags & (1<<0)) pragma = -pragma;
+ if (flags & (1<<1)) pragma = 0;
+ if (flags & (1<<7)) proto->flags |= (1L<<13);
+ if (!(proto->flags & (1L<<29)) && file && (m = sstrlen( file)) > 2 && file[--m] == 'y' && file[--m] == '.')
+ proto->flags |= (1L<<29);
+
+ if (pragma <= 0)
+ {
+ if (flags & (1<<10))
+ {
+ flags &= ~((1<<4)|(1<<5));
+ proto->flags |= (1L<<19);
+ }
+ else if (!(flags & ((1<<3)|(1<<9))))
+ {
+ pppclose(iob);
+ return 0;
+ }
+ else if ((flags & ((1<<3)|(1<<9))) == (1<<9) || !pragma)
+ {
+ proto->flags |= (1L<<18);
+ if (proto->flags & (1L<<16))
+ proto->oz += proto->iz;
+ proto->iz = n;
+ if (notice || options)
+ {
+ if (proto->cc[0] == '#' && proto->ip[0] == '#' && proto->ip[1] == '!')
+ {
+ s = proto->ip;
+ while (*s && *s++ != '\n');
+ m = s - proto->ip;
+ proto->op = memcopy(proto->op, proto->ip, m);
+ proto->ip = s;
+ proto->iz = n -= m;
+ }
+
+ if (proto->cc[0])
+ {
+ if ((comlen = astlicense(proto->op, proto->oz, notice, options, proto->cc[0], proto->cc[1], proto->cc[2])) < 0)
+ proto_error((char*)proto + sizeof(Proto_t), 1, proto->op, ((char*)0));
+ else
+ proto->op += comlen;
+ }
+ if (!(flags & (1<<0)) && !(proto->flags & (1L<<29)))
+
+ proto->op = linesync(proto, proto->op, 1);
+ proto->iz += proto->op - proto->ob;
+ }
+ memcopy(proto->op, proto->ip, n);
+ return iob;
+ }
+ }
+
+ if (!(retain & (1<<6)))
+ {
+ retain |= (1<<6);
+ ppfsm(4, ((char*)0));
+ }
+
+ proto->line = 1;
+
+ if (notice || options || (flags & ((1<<4)|(1<<5))))
+ {
+
+ if (notice || options)
+ {
+ if ((comlen = astlicense(proto->op, proto->oz, notice, options, proto->cc[0], proto->cc[1], proto->cc[2])) < 0)
+ proto_error((char*)proto + sizeof(Proto_t), 1, proto->op, ((char*)0));
+ else
+ proto->op += comlen;
+ }
+
+ if (flags & (1<<5))
+ {
+ proto->flags |= (1L<<11);
+ if (flags & (1<<11))
+ retain |= (1<<5);
+ }
+ else if (flags & (1<<4))
+ {
+ if (flags & (1<<11)) retain |= (1<<4);
+
+ if (flags & (1<<0))
+ {
+ *proto->op++ = '#';
+ proto->op = strcopy(proto->op, "pragma");
+ *proto->op++ = ' ';
+ proto->op = strcopy(proto->op, pragmas[0].name);
+ *proto->op++ = '\n';
+ }
+ else
+
+ proto->flags |= (1L<<10);
+ }
+
+ if (!(flags & (1<<0)))
+ {
+ if (proto->flags & (1L<<29))
+ {
+ proto->op = strcopy(proto->op, "\n%{\n"+ !notice);
+ proto->op = strcopy(proto->op, "/* : : generated by proto : : */\n");
+ proto->op = strcopy(proto->op, "%}\n");
+ }
+ else
+ {
+ if (n || notice || options)
+ *proto->op++ = '\n';
+ proto->op = strcopy(proto->op, "/* : : generated by proto : : */\n");
+ if (n)
+ proto->op = linesync(proto, proto->op, proto->line);
+ else if (proto->flags & ((1L<<10)|(1L<<11)))
+ proto->op = init(proto, proto->op, proto->flags);
+ }
+ }
+
+ }
+
+
+ proto->file = file;
+ if (flags & (1<<0))
+ {
+ proto->flags |= (1L<<0);
+ if (!(flags & (1<<4))) proto->flags |= (1L<<5);
+ }
+
+ return iob;
+}
+
+
+
+
+
+
+int
+pppread __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
+ register int n;
+
+ if (proto->flags & (1L<<18))
+ {
+ if (proto->iz)
+ {
+ n = proto->iz;
+ proto->iz = 0;
+ }
+ else if (!(proto->flags & (1L<<16))) n = 0;
+ else if ((n = read(proto->fd, proto->ob, proto->oz)) <= 0 || (proto->options & (1L<<0)) && n < proto->oz)
+ {
+ proto->flags &= ~(1L<<16);
+ close(proto->fd);
+ }
+ }
+ else
+ {
+ if (proto->op == proto->ob)
+ {
+ if (proto->flags & (1L<<4)) return -1;
+
+ if (proto->flags & (1L<<29))
+ {
+ register char* ip = proto->ip;
+ register char* op = proto->ob;
+ register char* ep = proto->ob + proto->oz - 2;
+
+ if (!*ip)
+ {
+ ip = proto->ip = proto->ib;
+ if (!(proto->flags & (1L<<16))) n = 0;
+ else if ((n = read(proto->fd, ip, proto->iz)) <= 0 || (proto->options & (1L<<0)) && n < proto->iz)
+ {
+ if (n < 0) n = 0;
+ proto->flags &= ~(1L<<16);
+ close(proto->fd);
+ }
+ ip[n] = 0;
+ }
+ if (proto->flags & (1L<<30))
+ {
+ proto->flags &= ~(1L<<30);
+ if (*ip == '%')
+ {
+ *op++ = *ip++;
+ if (proto->flags & (1L<<31)) proto->flags &= ~(1L<<29);
+ else proto->flags |= (1L<<31);
+ }
+ }
+ if (proto->flags & (1L<<29))
+ while (op < ep && (n = *op++ = *ip))
+ {
+ ip++;
+ if (n == '%')
+ {
+ if (*ip == '%' && (ip == proto->ip + 1 || *(ip - 2) == '\n'))
+ {
+ *op++ = *ip++;
+ if (proto->flags & (1L<<31)) proto->flags &= ~(1L<<29);
+ else proto->flags |= (1L<<31);
+ break;
+ }
+ if (!*ip)
+ {
+ *op++ = '%';
+ proto->flags |= (1L<<30);
+ break;
+ }
+ }
+ else if (n == '\n') proto->line++;
+ }
+ proto->op = memcopy(proto->ob, proto->ip, ip - proto->ip);
+ proto->ip = ip;
+ }
+ else
+
+ lex(proto, proto->flags);
+ if ((proto->flags & ((1L<<4)|(1L<<16))) == (1L<<4))
+ proto->op = strcopy(proto->op, "/* NOTE: some constructs may not have been converted */\n");
+ }
+ n = proto->op - proto->ob;
+ proto->op = proto->ob;
+ }
+ return n;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+#line 269 "proto.c"
+
+
+
+
+
+static int
+proto __PARAM__((char* file, char* license, char* options, char* package, char* copy, char* comment, int flags), (file, license, options, package, copy, comment, flags)) __OTORP__(char* file; char* license; char* options; char* package; char* copy; char* comment; int flags;){
+ char* b;
+ char* e;
+ char* p;
+ int n;
+ int m;
+ int x;
+ int fd;
+ char buf[1024];
+
+ if (file && access(file, 4))
+ proto_error(((char*)0), 2, file, "not found");
+ else if (b = pppopen(file, 0, license, options, package, comment, flags))
+ {
+ if (!file)
+ fd = 1;
+ else if (flags & ((1<<13)<<1))
+ {
+ e = file + sstrlen( file) - 1;
+ x = *e;
+ *e = '_';
+ if ((fd = creat(file, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0)
+ {
+ proto_error(b, 2, file, "cannot create temporary file");
+ pppclose(b);
+ return flags | ((1<<13)<<0);
+ }
+ *e = x;
+ }
+ else if (copy)
+ {
+ if (((n = sstrlen( copy)) + sstrlen( file) + 2) > sizeof(buf))
+ {
+ proto_error(b, 2, copy, "copy path too long");
+ pppclose(b);
+ return flags | ((1<<13)<<0);
+ }
+ strcopy( buf, copy);
+ e = buf + n;
+ if (*file != '/')
+ *e++ = '/';
+ strcopy( e, file);
+ if ((fd = creat(buf, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0)
+ {
+ for (e = buf; *e == '/'; e++);
+ do
+ {
+ if (*e == '/')
+ {
+ *e = 0;
+ if (access(buf, 0) && mkdir(buf, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH))
+ {
+ proto_error(b, 2, buf, "cannot create copy directory");
+ pppclose(b);
+ return flags | ((1<<13)<<0);
+ }
+ *e = '/';
+ }
+ } while (*e++);
+ if ((fd = creat(buf, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0)
+ {
+ proto_error(b, 2, buf, "cannot create copy file");
+ pppclose(b);
+ return flags | ((1<<13)<<0);
+ }
+ }
+ file = buf;
+ }
+ else
+ fd = 1;
+ if (file && (flags & ((1<<13)<<2)))
+ proto_error(b, 0, "convert to", file);
+ while ((n = pppread(b)) > 0)
+ {
+ p = b;
+ for (;;)
+ {
+ if ((m = write(fd, p, n)) <= 0)
+ {
+ proto_error(b, 2, "write error", ((char*)0));
+ flags |= ((1<<13)<<0);
+ break;
+ }
+ if ((n -= m) <= 0)
+ break;
+ p += m;
+ }
+ if (m < 0)
+ break;
+ }
+ if (fd > 1)
+ close(fd);
+ if (file && (flags & ((1<<13)<<1)))
+ {
+ *e = '_';
+ strcopy( b, file);
+ *e = x;
+ if (replace(b, file, !(flags & (1<<0))))
+ proto_error(b, 2, "cannot rename to", file);
+ }
+ pppclose(b);
+ }
+ return flags;
+}
+
+
+
+
+
+typedef struct Sufcom_s
+{
+ char suffix[4];
+ char comment[4];
+} Sufcom_t;
+
+static const Sufcom_t sufcom[] =
+{
+ "c", "/*",
+ "cpp", "/*",
+ "cxx", "/*",
+ "c++", "/*",
+ "C", "/*",
+ "CPP", "/*",
+ "CXX", "/*",
+ "C++", "/*",
+ "f", "C",
+ "F", "C",
+ "h", "/*",
+ "hpp", "/*",
+ "hxx", "/*",
+ "H", "/*",
+ "HPP", "/*",
+ "HXX", "/*",
+ "ksh", "#",
+ "KSH", "#",
+ "l", "/*",
+ "L", "/*",
+ "p", "(*)",
+ "pas", "(*)",
+ "P", "(*)",
+ "PAS", "(*)",
+ "pl", "#",
+ "PL", "#",
+ "pl1", "/*",
+ "pli", "/*",
+ "PL1", "/*",
+ "PLI", "/*",
+ "sh", "#",
+ "SH", "#",
+ "sml", "(*)",
+ "SML", "(*)",
+ "y", "/*",
+ "Y", "/*",
+};
+
+
+
+
+
+static char*
+type __PARAM__((register char* file, char* comment), (file, comment)) __OTORP__(register char* file; char* comment;){
+ register char* suffix;
+ register int i;
+
+ if (file && (!comment || !*comment))
+ {
+ suffix = 0;
+ while (*file)
+ if (*file++ == '.')
+ suffix = file;
+ if (suffix && sstrlen( suffix) <= 3)
+ for (i = 0; i < sizeof(sufcom) / sizeof(sufcom[0]); i++)
+ if (!strcmp(suffix, sufcom[i].suffix))
+ return (char*)sufcom[i].comment;
+ }
+ return comment;
+}
+
+int
+main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
+ char* b;
+ char* file;
+ int fd;
+ int n;
+ char* op;
+ char* oe;
+ char* comment = 0;
+ char* copy = 0;
+ char* list = 0;
+ char* license = 0;
+ char* options = 0;
+ char* package = 0;
+ int flags = (1<<4);
+ char buf[1024];
+ char opt[4 * 1024];
+
+ ;
+
+ while ((file = *++argv) && *file == '-' && *(file + 1))
+ {
+ for (;;)
+ {
+ switch (*++file)
+ {
+ case 0:
+ break;
+ case 'c':
+ if (!*(comment = ++file))
+ comment = *++argv;
+ break;
+ case 'd':
+ flags |= (1<<1);
+ continue;
+ case 'e':
+ if (!*(package = ++file) && !(package = *++argv))
+ {
+ file = "??";
+ continue;
+ }
+ break;
+ case 'f':
+ flags |= (1<<3);
+ continue;
+ case 'h':
+ flags &= ~(1<<4);
+ continue;
+ case 'i':
+ flags |= (1<<0);
+ continue;
+ case 'l':
+ if (!*(license = ++file) && !(license = *++argv))
+ {
+ file = "??";
+ continue;
+ }
+ break;
+ case 'n':
+ flags |= (1<<7);
+ continue;
+ case 'o':
+ if (!*(b = ++file) && !(b = *++argv))
+ {
+ file = "??";
+ continue;
+ }
+ if (!options)
+ {
+ options = op = opt;
+ oe = op + sizeof(opt) - 1;
+ }
+ n = sstrlen( b);
+ if ((n + 1) >= (oe - op))
+ proto_error(((char*)0), 3, b, "too many options");
+ else
+ {
+ *op++ = '\n';
+ memcopy( op, b, n + 1);
+ op += n;
+ }
+ break;
+ case 'p':
+ flags |= (1<<9);
+ continue;
+ case 'r':
+ flags |= ((1<<13)<<1);
+ continue;
+ case 's':
+ flags |= (1<<5);
+ continue;
+ case 't':
+ flags |= (1<<12);
+ continue;
+ case 'v':
+ flags |= ((1<<13)<<2);
+ continue;
+ case 'x':
+ flags |= (1<<2);
+ continue;
+ case 'z':
+ flags |= (1<<1)|(1<<8);
+ continue;
+ case 'C':
+ if (!*(copy = ++file) && !(copy = *++argv))
+ {
+ file = "??";
+ continue;
+ }
+ break;
+ case 'L':
+ if (!*(list = ++file) && !(list = *++argv))
+ {
+ file = "??";
+ continue;
+ }
+ break;
+ case 'P':
+ case '+':
+ flags |= (1<<10);
+ continue;
+ case 'S':
+ comment = "#";
+ continue;
+ default:
+ proto_error(((char*)0), 2, file, "unknown option");
+
+ case '?':
+ b = "Usage: proto [-dfhinprstvzP+S] [-C directory] [-e package] [-l file]\n [-o \"name='value' ...\"] [-L file] file ...\n";
+ write(2, b, sstrlen( b));
+ return 2;
+ }
+ break;
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if (list)
+ {
+ if (*list == '-' && !*(list + 1))
+ fd = 0;
+ else if ((fd = open(list, O_RDONLY)) < 0)
+ proto_error(((char*)0), 3, list, "not found");
+ do
+ {
+ for (b = buf; (n = read(fd, b, 1)) > 0 && *b != '\n' && b < &buf[sizeof(buf) - 1]; b++);
+ if (b > buf)
+ {
+ *b = 0;
+ flags = proto(buf, license, options, package, copy, type(buf, comment), flags);
+ }
+ } while (n > 0);
+ if (fd > 0)
+ close(fd);
+ }
+ if (file)
+ do flags = proto(file, license, options, package, copy, type(file, comment), flags); while (file = *++argv);
+ else if (!list)
+ flags = proto(file, license, options, package, copy, type(file, comment), flags);
+ return errors ? 1 : (flags & ((1<<13)<<0)) ? 2 : 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/ratz.c b/usr/src/contrib/ast/src/cmd/INIT/ratz.c
new file mode 100644
index 0000000000..9a63327a1f
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/ratz.c
@@ -0,0 +1,5311 @@
+/*
+ * ratz -- read a tar gzip archive from the standard input
+ *
+ * coded for portability
+ * _SEAR_* macros for win32 self extracting archives -- see sear(1).
+ */
+
+static char id[] = "\n@(#)$Id: ratz (Jean-loup Gailly, Mark Adler, Glenn Fowler) 1.2.3 2010-10-10 $\0\n";
+
+#if _PACKAGE_ast
+
+#include <ast.h>
+#include <error.h>
+
+static const char usage[] =
+"[-?\n@(#)$Id: ratz (Jean-loup Gailly, Mark Adler, Glenn Fowler) 1.2.3 2010-10-10 $\n]"
+"[-author?Jean-loup Gailly]"
+"[-author?Mark Adler]"
+"[-author?Glenn Fowler <gsf@research.att.com>]"
+"[-copyright?Copyright (c) 1995-2005 Jean-loup Gailly and Mark Adler]"
+"[-license?http://www.opensource.org/licenses/zlib-license]"
+"[+NAME?ratz - read a tar gzip archive]"
+"[+DESCRIPTION?\bratz\b extracts files and directories from a tar gzip"
+" archive on the standard input. It is a standalone program for systems"
+" that do not have \bpax\b(1), \btar\b(1) or \bgunzip\b(1). Only regular"
+" files and directories are extracted; all other file types are ignored.]"
+"[+?\b.exe\b files generated by \bsear\b(1) are fully functional \bratz\b"
+" executables, so any \bratz\b option may be used on a \bsear\b file."
+" This allows \bsear\b file contents to be examined and extracted without"
+" executing any embedded installation scripts.]"
+"[c:cat|uncompress?Uncompress the standard input and copy it to the standard"
+" output.]"
+#if defined(_SEAR_EXEC) || defined(_SEAR_SEEK)
+"[i!:install?Execute the sear installation script.]"
+"[k:keep?Keep the installation temporary directory.]"
+#endif
+"[l:local?Reject files that traverse outside the current directory.]"
+"[m:meter?Display a one line text meter showing archive read progress.]"
+"[n!:convert?In ebcdic environments convert text archive members from ascii"
+" to the native ebcdic.]"
+"[t:list?List each file path on the standard output but do not extract.]"
+"[v:verbose?List each file path on the standard output as it is extracted.]"
+"[V?Print the program version and exit.]"
+"[+SEE ALSO?\bgunzip\b(1), \bpackage\b(1), \bpax\b(1), \bsear\b(1), \btar\b(1)]"
+;
+
+#else
+
+#define NiL ((char*)0)
+
+#endif
+
+#define METER_width 80
+#define METER_parts 20
+
+#ifndef _GUNZIP_H
+#define _GUNZIP_H 1
+
+/*
+ * stripped down zlib containing public gzfopen()+gzread() in one file
+ * USE THE REAL ZLIB AFTER BOOTSTRAP
+ */
+
+#define ZLIB_INTERNAL 1
+#define NO_GZCOMPRESS 1
+
+#define gz_headerp voidp
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#if _PACKAGE_ast || defined(__STDC__) || defined(_SEAR_EXEC) || defined(_WIN32)
+
+#define FOPEN_READ "rb"
+#define FOPEN_WRITE "wb"
+
+#else
+
+#define FOPEN_READ "r"
+#define FOPEN_WRITE "w"
+
+#endif
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+#if _PACKAGE_ast
+
+#ifndef setmode
+#define setmode(d,m)
+#endif
+
+#else
+
+#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
+#define _WINIX 1
+#endif
+
+#if _WIN32 && !_WINIX
+
+#include <direct.h>
+#include <io.h>
+#include <fcntl.h>
+#include <windows.h>
+
+#define access _access
+#define chmod _chmod
+#define close _close
+#define dup _dup
+#define lseek _lseek
+#define open _open
+#define read _read
+#define setmode _setmode
+#define unlink _unlink
+
+#define mkdir(a,b) _mkdir(a)
+
+#else
+
+#define HAVE_UNISTD_H 1
+
+#include <unistd.h>
+#include <errno.h>
+
+#ifndef setmode
+#define setmode(d,m)
+#endif
+
+#endif
+
+#if defined(__STDC__)
+
+#include <stdlib.h>
+#include <string.h>
+
+#endif
+
+#endif
+
+#ifndef _ZLIB_H
+#define _ZLIB_H 1
+
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.2.3, July 18th, 2005
+
+ Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef _ZCONF_H
+#define _ZCONF_H 1
+
+#if _PACKAGE_ast
+#include <ast_std.h> /* for { _WINIX __IMPORT__ __EXPORT__ } */
+#define z_off_t int32_t
+#if _typ_int64_t
+#define z_off64_t int64_t
+#endif
+#else
+#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
+#define _WINIX 1
+#endif
+#endif
+
+#if _BLD_z && defined(__EXPORT__)
+#define ZEXTERN __EXPORT__
+#define ZEXPORT
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+# define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#if HAVE_UNISTD_H
+# include <sys/types.h> /* for off_t */
+# include <unistd.h> /* for SEEK_* and off_t */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# define z_off_t off_t
+#endif
+#ifndef SEEK_SET
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if defined(__OS400__)
+# define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+# define NO_vsnprintf
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+# pragma map(deflateInit_,"DEIN")
+# pragma map(deflateInit2_,"DEIN2")
+# pragma map(deflateEnd,"DEEND")
+# pragma map(deflateBound,"DEBND")
+# pragma map(inflateInit_,"ININ")
+# pragma map(inflateInit2_,"ININ2")
+# pragma map(inflateEnd,"INEND")
+# pragma map(inflateSync,"INSY")
+# pragma map(inflateSetDictionary,"INSEDI")
+# pragma map(compressBound,"CMBND")
+# pragma map(inflate_table,"INTABL")
+# pragma map(inflate_fast,"INFA")
+# pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* _ZCONF_H */
+
+#define ZLIB_VERSION "1.2.3"
+#define ZLIB_VERNUM 0x1230
+
+/*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed
+ data. This version of the library supports only one compression method
+ (deflation) but other algorithms will be added later and will have the same
+ stream interface.
+
+ Compression can be done in a single step if the buffers are large
+ enough (for example if an input file is mmap'ed), or can be done by
+ repeated calls of the compression function. In the latter case, the
+ application must provide more input and/or consume the output
+ (providing more output space) before each call.
+
+ The compressed data format used by default by the in-memory functions is
+ the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+ around a deflate stream, which is itself documented in RFC 1951.
+
+ The library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio using the functions that start
+ with "gz". The gzip format is different from the zlib format. gzip is a
+ gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+ This library can optionally read and write gzip streams in memory as well.
+
+ The zlib format was designed to be compact and fast for use in memory
+ and on communications channels. The gzip format was designed for single-
+ file compression on file systems, has a larger header than zlib to maintain
+ directory information, and uses a different, slower check method than zlib.
+
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never
+ crash even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void (*free_func) OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+ uLong total_in; /* total nb of input bytes read so far */
+
+ Bytef *next_out; /* next output byte should be put there */
+ uInt avail_out; /* remaining free space at next_out */
+ uLong total_out; /* total nb of bytes output so far */
+
+ char *msg; /* last error message, NULL if no error */
+ struct internal_state FAR *state; /* not visible by applications */
+
+ alloc_func zalloc; /* used to allocate the internal state */
+ free_func zfree; /* used to free the internal state */
+ voidpf opaque; /* private data object passed to zalloc and zfree */
+
+ int data_type; /* best guess about the data type: binary or text */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+ /* constants */
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+#define Z_BLOCK 5
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative
+ * values are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_RLE 3
+#define Z_FIXED 4
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_TEXT 1
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+
+#endif /* _ZLIB_H */
+
+#ifndef _ZUTIL_H
+#define _ZUTIL_H 1
+
+#if !_PACKAGE_ast && !defined(STDC)
+#if defined(__STDC__)
+# include <stddef.h>
+#endif
+# include <string.h>
+# include <stdlib.h>
+#endif
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+typedef unsigned char uch;
+typedef uch FAR uchf;
+typedef unsigned short ush;
+typedef ush FAR ushf;
+typedef unsigned long ulg;
+
+ /* common constants */
+
+#ifndef DEF_WBITS
+# define DEF_WBITS MAX_WBITS
+#endif
+/* default windowBits for decompression. MAX_WBITS is for compression only */
+
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+/* default memLevel */
+
+#define STORED_BLOCK 0
+#define STATIC_TREES 1
+#define DYN_TREES 2
+/* The three kinds of block type */
+
+#define MIN_MATCH 3
+#define MAX_MATCH 258
+/* The minimum and maximum match lengths */
+
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+
+ /* target dependencies */
+
+#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
+# define OS_CODE 0x00
+# if defined(__TURBOC__) || defined(__BORLANDC__)
+# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+ /* Allow compilation with ANSI keywords only enabled */
+ void _Cdecl farfree( void *block );
+ void *_Cdecl farmalloc( unsigned long nbytes );
+# else
+# include <alloc.h>
+# endif
+# else /* MSC or DJGPP */
+# include <malloc.h>
+# endif
+#endif
+
+#ifdef AMIGA
+# define OS_CODE 0x01
+#endif
+
+#if defined(VAXC) || defined(VMS)
+# define OS_CODE 0x02
+# define F_OPEN(name, mode) \
+ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
+#endif
+
+#if defined(ATARI) || defined(atarist)
+# define OS_CODE 0x05
+#endif
+
+#ifdef OS2
+# define OS_CODE 0x06
+# ifdef M_I86
+ #include <malloc.h>
+# endif
+#endif
+
+#if defined(MACOS) || defined(TARGET_OS_MAC)
+# define OS_CODE 0x07
+# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+# include <unix.h> /* for fdopen */
+# else
+# ifndef fdopen
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# endif
+# endif
+#endif
+
+#ifdef TOPS20
+# define OS_CODE 0x0a
+#endif
+
+#ifdef WIN32
+# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
+# define OS_CODE 0x0b
+# endif
+#endif
+
+#ifdef __50SERIES /* Prime/PRIMOS */
+# define OS_CODE 0x0f
+#endif
+
+#if defined(_BEOS_) || defined(RISCOS)
+# define fdopen(fd,mode) NULL /* No fdopen() */
+#endif
+
+#if (defined(_MSC_VER) && (_MSC_VER > 600))
+# if defined(_WIN32_WCE)
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# ifndef _PTRDIFF_T_DEFINED
+ typedef int ptrdiff_t;
+# define _PTRDIFF_T_DEFINED
+# endif
+# else
+# define fdopen(fd,type) _fdopen(fd,type)
+# endif
+#endif
+
+ /* common defaults */
+
+#ifndef OS_CODE
+# define OS_CODE 0x03 /* assume Unix */
+#endif
+
+#ifndef F_OPEN
+# define F_OPEN(name, mode) fopen((name), (mode))
+#endif
+
+ /* functions */
+
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#if defined(__CYGWIN__)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#ifndef HAVE_VSNPRINTF
+# ifdef MSDOS
+ /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
+ but for now we just assume it doesn't. */
+# define NO_vsnprintf
+# endif
+# ifdef __TURBOC__
+# define NO_vsnprintf
+# endif
+# ifdef WIN32
+ /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
+# if !defined(vsnprintf) && !defined(NO_vsnprintf)
+# define vsnprintf _vsnprintf
+# endif
+# endif
+# ifdef __SASC
+# define NO_vsnprintf
+# endif
+#endif
+#ifdef VMS
+# define NO_vsnprintf
+#endif
+
+#if defined(pyr)
+# define NO_MEMCPY
+#endif
+#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
+ /* Use our own functions for small and medium model with MSC <= 5.0.
+ * You may have to use the same strategy for Borland C (untested).
+ * The __SC__ check is for Symantec.
+ */
+# define NO_MEMCPY
+#endif
+#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
+# define HAVE_MEMCPY
+#endif
+#ifdef HAVE_MEMCPY
+# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
+# define zmemcpy _fmemcpy
+# define zmemcmp _fmemcmp
+# define zmemzero(dest, len) _fmemset(dest, 0, len)
+# else
+# define zmemcpy memcpy
+# define zmemcmp memcmp
+# define zmemzero(dest, len) memset(dest, 0, len)
+# endif
+#else
+ extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+ extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+ extern void zmemzero OF((Bytef* dest, uInt len));
+#endif
+
+/* Diagnostic functions */
+#ifdef Z_DEBUG
+# include <stdio.h>
+ extern int z_verbose;
+ extern void z_error OF((char *m));
+# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
+# define Trace(x) {if (z_verbose>=0) fprintf x ;}
+# define Tracev(x) {if (z_verbose>0) fprintf x ;}
+# define Tracevv(x) {if (z_verbose>1) fprintf x ;}
+# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
+# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
+#else
+# define Assert(cond,msg)
+# define Trace(x)
+# define Tracev(x)
+# define Tracevv(x)
+# define Tracec(c,x)
+# define Tracecv(c,x)
+#endif
+
+
+voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
+void zcfree OF((voidpf opaque, voidpf ptr));
+
+#define ZALLOC(strm, items, size) \
+ (*((strm)->zalloc))((strm)->opaque, (items), (size))
+#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
+#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+#endif /* _ZUTIL_H */
+
+#ifndef _ZUTIL_C
+#define _ZUTIL_C
+
+#if 0 && !_PACKAGE_ast && !defined(STDC)
+extern void exit OF((int));
+#endif
+
+#ifndef HAVE_MEMCPY
+
+void zmemcpy(dest, source, len)
+ Bytef* dest;
+ const Bytef* source;
+ uInt len;
+{
+ if (len == 0) return;
+ do {
+ *dest++ = *source++; /* ??? to be unrolled */
+ } while (--len != 0);
+}
+
+int zmemcmp(s1, s2, len)
+ const Bytef* s1;
+ const Bytef* s2;
+ uInt len;
+{
+ uInt j;
+
+ for (j = 0; j < len; j++) {
+ if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
+ }
+ return 0;
+}
+
+void zmemzero(dest, len)
+ Bytef* dest;
+ uInt len;
+{
+ if (len == 0) return;
+ do {
+ *dest++ = 0; /* ??? to be unrolled */
+ } while (--len != 0);
+}
+#endif
+
+
+#ifdef SYS16BIT
+
+#ifdef __TURBOC__
+/* Turbo C in 16-bit mode */
+
+# define MY_ZCALLOC
+
+/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
+ * and farmalloc(64K) returns a pointer with an offset of 8, so we
+ * must fix the pointer. Warning: the pointer must be put back to its
+ * original form in order to free it, use zcfree().
+ */
+
+#define MAX_PTR 10
+/* 10*64K = 640K */
+
+local int next_ptr = 0;
+
+typedef struct ptr_table_s {
+ voidpf org_ptr;
+ voidpf new_ptr;
+} ptr_table;
+
+local ptr_table table[MAX_PTR];
+/* This table is used to remember the original form of pointers
+ * to large buffers (64K). Such pointers are normalized with a zero offset.
+ * Since MSDOS is not a preemptive multitasking OS, this table is not
+ * protected from concurrent access. This hack doesn't work anyway on
+ * a protected system like OS/2. Use Microsoft C instead.
+ */
+
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+{
+ voidpf buf = opaque; /* just to make some compilers happy */
+ ulg bsize = (ulg)items*size;
+
+ /* If we allocate less than 65520 bytes, we assume that farmalloc
+ * will return a usable pointer which doesn't have to be normalized.
+ */
+ if (bsize < 65520L) {
+ buf = farmalloc(bsize);
+ if (*(ush*)&buf != 0) return buf;
+ } else {
+ buf = farmalloc(bsize + 16L);
+ }
+ if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
+ table[next_ptr].org_ptr = buf;
+
+ /* Normalize the pointer to seg:0 */
+ *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
+ *(ush*)&buf = 0;
+ table[next_ptr++].new_ptr = buf;
+ return buf;
+}
+
+void zcfree (voidpf opaque, voidpf ptr)
+{
+ int n;
+ if (*(ush*)&ptr != 0) { /* object < 64K */
+ farfree(ptr);
+ return;
+ }
+ /* Find the original pointer */
+ for (n = 0; n < next_ptr; n++) {
+ if (ptr != table[n].new_ptr) continue;
+
+ farfree(table[n].org_ptr);
+ while (++n < next_ptr) {
+ table[n-1] = table[n];
+ }
+ next_ptr--;
+ return;
+ }
+ ptr = opaque; /* just to make some compilers happy */
+ Assert(0, "zcfree: ptr not found");
+}
+
+#endif /* __TURBOC__ */
+
+
+#ifdef M_I86
+/* Microsoft C in 16-bit mode */
+
+# define MY_ZCALLOC
+
+#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
+# define _halloc halloc
+# define _hfree hfree
+#endif
+
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+{
+ if (opaque) opaque = 0; /* to make compiler happy */
+ return _halloc((long)items, size);
+}
+
+void zcfree (voidpf opaque, voidpf ptr)
+{
+ if (opaque) opaque = 0; /* to make compiler happy */
+ _hfree(ptr);
+}
+
+#endif /* M_I86 */
+
+#endif /* SYS16BIT */
+
+
+#ifndef MY_ZCALLOC /* Any system without a special alloc function */
+
+#if 0 && !_PACKAGE_ast
+#ifndef STDC
+extern voidp malloc OF((uInt size));
+extern voidp calloc OF((uInt items, uInt size));
+extern void free OF((voidpf ptr));
+#endif
+#endif
+
+voidpf zcalloc (opaque, items, size)
+ voidpf opaque;
+ unsigned items;
+ unsigned size;
+{
+ if (opaque) items += size - size; /* make compiler happy */
+ return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
+ (voidpf)calloc(items, size);
+}
+
+void zcfree (opaque, ptr)
+ voidpf opaque;
+ voidpf ptr;
+{
+ free(ptr);
+ if (opaque) return; /* make compiler happy */
+}
+
+#endif /* MY_ZCALLOC */
+
+#endif /* _ZUTIL_C */
+
+#ifndef _CRC32_H
+#define _CRC32_H 1
+
+/* crc32.h -- tables for rapid CRC calculation
+ * Generated automatically by crc32.c
+ */
+
+#ifndef TBLS
+#define TBLS 1
+#endif
+
+local const unsigned long FAR crc_table[TBLS][256] =
+{
+ {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+ },
+};
+
+#endif /* _CRC32_H */
+
+#ifndef _CRC32_C
+#define _CRC32_C 1
+
+/* ========================================================================= */
+#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
+#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
+
+/* ========================================================================= */
+unsigned long ZEXPORT crc32(crc, buf, len)
+ unsigned long crc;
+ const unsigned char FAR *buf;
+ unsigned len;
+{
+ if (buf == Z_NULL) return 0;
+
+#ifdef DYNAMIC_CRC_TABLE
+ if (crc_table_empty)
+ make_crc_table();
+#endif /* DYNAMIC_CRC_TABLE */
+
+#ifdef BYFOUR
+ if (sizeof(void *) == sizeof(ptrdiff_t)) {
+ u4 endian;
+
+ endian = 1;
+ if (*((unsigned char *)(&endian)))
+ return crc32_little(crc, buf, len);
+ else
+ return crc32_big(crc, buf, len);
+ }
+#endif /* BYFOUR */
+ crc = crc ^ 0xffffffff;
+ while (len >= 8) {
+ DO8;
+ len -= 8;
+ }
+ if (len) do {
+ DO1;
+ } while (--len);
+ return crc ^ 0xffffffff;
+}
+
+#undef DO1
+#undef DO8
+
+#endif /* _CRC32_C */
+
+#ifndef _ADLER32_C
+#define _ADLER32_C 1
+
+#define BASE 65521 /* largest prime smaller than 65536 */
+#define NMAX 5552
+/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
+
+#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
+#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
+#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
+#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
+#define DO16(buf) DO8(buf,0); DO8(buf,8);
+
+/* use NO_DIVIDE if your processor does not do division in hardware */
+#ifdef NO_DIVIDE
+# define MOD(a) \
+ do { \
+ if (a >= (BASE << 16)) a -= (BASE << 16); \
+ if (a >= (BASE << 15)) a -= (BASE << 15); \
+ if (a >= (BASE << 14)) a -= (BASE << 14); \
+ if (a >= (BASE << 13)) a -= (BASE << 13); \
+ if (a >= (BASE << 12)) a -= (BASE << 12); \
+ if (a >= (BASE << 11)) a -= (BASE << 11); \
+ if (a >= (BASE << 10)) a -= (BASE << 10); \
+ if (a >= (BASE << 9)) a -= (BASE << 9); \
+ if (a >= (BASE << 8)) a -= (BASE << 8); \
+ if (a >= (BASE << 7)) a -= (BASE << 7); \
+ if (a >= (BASE << 6)) a -= (BASE << 6); \
+ if (a >= (BASE << 5)) a -= (BASE << 5); \
+ if (a >= (BASE << 4)) a -= (BASE << 4); \
+ if (a >= (BASE << 3)) a -= (BASE << 3); \
+ if (a >= (BASE << 2)) a -= (BASE << 2); \
+ if (a >= (BASE << 1)) a -= (BASE << 1); \
+ if (a >= BASE) a -= BASE; \
+ } while (0)
+# define MOD4(a) \
+ do { \
+ if (a >= (BASE << 4)) a -= (BASE << 4); \
+ if (a >= (BASE << 3)) a -= (BASE << 3); \
+ if (a >= (BASE << 2)) a -= (BASE << 2); \
+ if (a >= (BASE << 1)) a -= (BASE << 1); \
+ if (a >= BASE) a -= BASE; \
+ } while (0)
+#else
+# define MOD(a) a %= BASE
+# define MOD4(a) a %= BASE
+#endif
+
+/* ========================================================================= */
+uLong ZEXPORT adler32(adler, buf, len)
+ uLong adler;
+ const Bytef *buf;
+ uInt len;
+{
+ unsigned long sum2;
+ unsigned n;
+
+ /* split Adler-32 into component sums */
+ sum2 = (adler >> 16) & 0xffff;
+ adler &= 0xffff;
+
+ /* in case user likes doing a byte at a time, keep it fast */
+ if (len == 1) {
+ adler += buf[0];
+ if (adler >= BASE)
+ adler -= BASE;
+ sum2 += adler;
+ if (sum2 >= BASE)
+ sum2 -= BASE;
+ return adler | (sum2 << 16);
+ }
+
+ /* initial Adler-32 value (deferred check for len == 1 speed) */
+ if (buf == Z_NULL)
+ return 1L;
+
+ /* in case short lengths are provided, keep it somewhat fast */
+ if (len < 16) {
+ while (len--) {
+ adler += *buf++;
+ sum2 += adler;
+ }
+ if (adler >= BASE)
+ adler -= BASE;
+ MOD4(sum2); /* only added so many BASE's */
+ return adler | (sum2 << 16);
+ }
+
+ /* do length NMAX blocks -- requires just one modulo operation */
+ while (len >= NMAX) {
+ len -= NMAX;
+ n = NMAX / 16; /* NMAX is divisible by 16 */
+ do {
+ DO16(buf); /* 16 sums unrolled */
+ buf += 16;
+ } while (--n);
+ MOD(adler);
+ MOD(sum2);
+ }
+
+ /* do remaining bytes (less than NMAX, still just one modulo) */
+ if (len) { /* avoid modulos if none remaining */
+ while (len >= 16) {
+ len -= 16;
+ DO16(buf);
+ buf += 16;
+ }
+ while (len--) {
+ adler += *buf++;
+ sum2 += adler;
+ }
+ MOD(adler);
+ MOD(sum2);
+ }
+
+ /* return recombined sums */
+ return adler | (sum2 << 16);
+}
+
+#endif /* _ADLER32_C */
+
+#ifndef _DEFLATE_H
+#define _DEFLATE_H 1
+
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+#define LENGTH_CODES 29
+/* number of length codes, not counting the special END_BLOCK code */
+
+#define LITERALS 256
+/* number of literal bytes 0..255 */
+
+#define L_CODES (LITERALS+1+LENGTH_CODES)
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+#define D_CODES 30
+/* number of distance codes */
+
+#define BL_CODES 19
+/* number of codes used to transfer the bit lengths */
+
+#define HEAP_SIZE (2*L_CODES+1)
+/* maximum heap size */
+
+#define MAX_BITS 15
+/* All codes must not exceed MAX_BITS bits */
+
+#define INIT_STATE 42
+#define EXTRA_STATE 69
+#define NAME_STATE 73
+#define COMMENT_STATE 91
+#define HCRC_STATE 103
+#define BUSY_STATE 113
+#define FINISH_STATE 666
+/* Stream status */
+
+
+/* Data structure describing a single value and its code string. */
+typedef struct ct_data_s {
+ union {
+ ush freq; /* frequency count */
+ ush code; /* bit string */
+ } fc;
+ union {
+ ush dad; /* father node in Huffman tree */
+ ush len; /* length of bit string */
+ } dl;
+} FAR ct_data;
+
+#define Freq fc.freq
+#define Code fc.code
+#define Dad dl.dad
+#define Len dl.len
+
+typedef struct static_tree_desc_s static_tree_desc;
+
+typedef struct tree_desc_s {
+ ct_data *dyn_tree; /* the dynamic tree */
+ int max_code; /* largest code with non zero frequency */
+ static_tree_desc *stat_desc; /* the corresponding static tree */
+} FAR tree_desc;
+
+typedef ush Pos;
+typedef Pos FAR Posf;
+typedef unsigned IPos;
+
+/* A Pos is an index in the character window. We use short instead of int to
+ * save space in the various tables. IPos is used only for parameter passing.
+ */
+
+typedef struct internal_state {
+ z_streamp strm; /* pointer back to this zlib stream */
+ int status; /* as the name implies */
+ Bytef *pending_buf; /* output still pending */
+ ulg pending_buf_size; /* size of pending_buf */
+ Bytef *pending_out; /* next pending byte to output to the stream */
+ uInt pending; /* nb of bytes in the pending buffer */
+ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
+ gz_headerp gzhead; /* gzip header information to write */
+ uInt gzindex; /* where in extra, name, or comment */
+ Byte method; /* STORED (for zip only) or DEFLATED */
+ int last_flush; /* value of flush param for previous deflate call */
+
+ /* used by deflate.c: */
+
+ uInt w_size; /* LZ77 window size (32K by default) */
+ uInt w_bits; /* log2(w_size) (8..16) */
+ uInt w_mask; /* w_size - 1 */
+
+ Bytef *window;
+ /* Sliding window. Input bytes are read into the second half of the window,
+ * and move to the first half later to keep a dictionary of at least wSize
+ * bytes. With this organization, matches are limited to a distance of
+ * wSize-MAX_MATCH bytes, but this ensures that IO is always
+ * performed with a length multiple of the block size. Also, it limits
+ * the window size to 64K, which is quite useful on MSDOS.
+ * To do: use the user input buffer as sliding window.
+ */
+
+ ulg window_size;
+ /* Actual size of window: 2*wSize, except when the user input buffer
+ * is directly used as sliding window.
+ */
+
+ Posf *prev;
+ /* Link to older string with same hash index. To limit the size of this
+ * array to 64K, this link is maintained only for the last 32K strings.
+ * An index in this array is thus a window index modulo 32K.
+ */
+
+ Posf *head; /* Heads of the hash chains or NIL. */
+
+ uInt ins_h; /* hash index of string to be inserted */
+ uInt hash_size; /* number of elements in hash table */
+ uInt hash_bits; /* log2(hash_size) */
+ uInt hash_mask; /* hash_size-1 */
+
+ uInt hash_shift;
+ /* Number of bits by which ins_h must be shifted at each input
+ * step. It must be such that after MIN_MATCH steps, the oldest
+ * byte no longer takes part in the hash key, that is:
+ * hash_shift * MIN_MATCH >= hash_bits
+ */
+
+ long block_start;
+ /* Window position at the beginning of the current output block. Gets
+ * negative when the window is moved backwards.
+ */
+
+ uInt match_length; /* length of best match */
+ IPos prev_match; /* previous match */
+ int match_available; /* set if previous match exists */
+ uInt strstart; /* start of string to insert */
+ uInt match_start; /* start of matching string */
+ uInt lookahead; /* number of valid bytes ahead in window */
+
+ uInt prev_length;
+ /* Length of the best match at previous step. Matches not greater than this
+ * are discarded. This is used in the lazy match evaluation.
+ */
+
+ uInt max_chain_length;
+ /* To speed up deflation, hash chains are never searched beyond this
+ * length. A higher limit improves compression ratio but degrades the
+ * speed.
+ */
+
+ uInt max_lazy_match;
+ /* Attempt to find a better match only when the current match is strictly
+ * smaller than this value. This mechanism is used only for compression
+ * levels >= 4.
+ */
+# define max_insert_length max_lazy_match
+ /* Insert new strings in the hash table only if the match length is not
+ * greater than this length. This saves time but degrades compression.
+ * max_insert_length is used only for compression levels <= 3.
+ */
+
+ int level; /* compression level (1..9) */
+ int strategy; /* favor or force Huffman coding*/
+
+ uInt good_match;
+ /* Use a faster search when the previous match is longer than this */
+
+ int nice_match; /* Stop searching when current match exceeds this */
+
+ /* used by trees.c: */
+ /* Didn't use ct_data typedef below to supress compiler warning */
+ struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
+ struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+ struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
+
+ struct tree_desc_s l_desc; /* desc. for literal tree */
+ struct tree_desc_s d_desc; /* desc. for distance tree */
+ struct tree_desc_s bl_desc; /* desc. for bit length tree */
+
+ ush bl_count[MAX_BITS+1];
+ /* number of codes at each bit length for an optimal tree */
+
+ int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
+ int heap_len; /* number of elements in the heap */
+ int heap_max; /* element of largest frequency */
+ /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
+ * The same heap array is used to build all trees.
+ */
+
+ uch depth[2*L_CODES+1];
+ /* Depth of each subtree used as tie breaker for trees of equal frequency
+ */
+
+ uchf *l_buf; /* buffer for literals or lengths */
+
+ uInt lit_bufsize;
+ /* Size of match buffer for literals/lengths. There are 4 reasons for
+ * limiting lit_bufsize to 64K:
+ * - frequencies can be kept in 16 bit counters
+ * - if compression is not successful for the first block, all input
+ * data is still in the window so we can still emit a stored block even
+ * when input comes from standard input. (This can also be done for
+ * all blocks if lit_bufsize is not greater than 32K.)
+ * - if compression is not successful for a file smaller than 64K, we can
+ * even emit a stored file instead of a stored block (saving 5 bytes).
+ * This is applicable only for zip (not gzip or zlib).
+ * - creating new Huffman trees less frequently may not provide fast
+ * adaptation to changes in the input data statistics. (Take for
+ * example a binary file with poorly compressible code followed by
+ * a highly compressible string table.) Smaller buffer sizes give
+ * fast adaptation but have of course the overhead of transmitting
+ * trees more frequently.
+ * - I can't count above 4
+ */
+
+ uInt last_lit; /* running index in l_buf */
+
+ ushf *d_buf;
+ /* Buffer for distances. To simplify the code, d_buf and l_buf have
+ * the same number of elements. To use different lengths, an extra flag
+ * array would be necessary.
+ */
+
+ ulg opt_len; /* bit length of current block with optimal trees */
+ ulg static_len; /* bit length of current block with static trees */
+ uInt matches; /* number of string matches in current block */
+ int last_eob_len; /* bit length of EOB code for last block */
+
+#ifdef Z_DEBUG
+ ulg compressed_len; /* total bit length of compressed file mod 2^32 */
+ ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
+#endif
+
+ ush bi_buf;
+ /* Output buffer. bits are inserted starting at the bottom (least
+ * significant bits).
+ */
+ int bi_valid;
+ /* Number of valid bits in bi_buf. All bits above the last valid bit
+ * are always zero.
+ */
+
+} FAR deflate_state;
+
+/* Output a byte on the stream.
+ * IN assertion: there is enough room in pending_buf.
+ */
+#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
+
+
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+/* Minimum amount of lookahead, except at the end of the input file.
+ * See deflate.c for comments about the MIN_MATCH+1.
+ */
+
+#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
+/* In order to simplify the code, particularly on 16 bit machines, match
+ * distances are limited to MAX_DIST instead of WSIZE.
+ */
+
+ /* in trees.c */
+void _tr_init OF((deflate_state *s));
+int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
+void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
+ int eof));
+void _tr_align OF((deflate_state *s));
+void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
+ int eof));
+
+#define d_code(dist) \
+ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
+/* Mapping from a distance to a distance code. dist is the distance - 1 and
+ * must not have side effects. _dist_code[256] and _dist_code[257] are never
+ * used.
+ */
+
+#ifndef Z_DEBUG
+/* Inline versions of _tr_tally for speed: */
+
+#if defined(GEN_TREES_H) || !defined(STDC)
+ extern uch _length_code[];
+ extern uch _dist_code[];
+#else
+ extern const uch _length_code[];
+ extern const uch _dist_code[];
+#endif
+
+# define _tr_tally_lit(s, c, flush) \
+ { uch cc = (c); \
+ s->d_buf[s->last_lit] = 0; \
+ s->l_buf[s->last_lit++] = cc; \
+ s->dyn_ltree[cc].Freq++; \
+ flush = (s->last_lit == s->lit_bufsize-1); \
+ }
+# define _tr_tally_dist(s, distance, length, flush) \
+ { uch len = (length); \
+ ush dist = (distance); \
+ s->d_buf[s->last_lit] = dist; \
+ s->l_buf[s->last_lit++] = len; \
+ dist--; \
+ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
+ s->dyn_dtree[d_code(dist)].Freq++; \
+ flush = (s->last_lit == s->lit_bufsize-1); \
+ }
+#else
+# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
+# define _tr_tally_dist(s, distance, length, flush) \
+ flush = _tr_tally(s, distance, length)
+#endif
+
+#endif /* _DEFLATE_H */
+
+#ifndef _INFTREES_H
+#define _INFTREES_H 1
+
+typedef struct {
+ unsigned char op; /* operation, extra bits, table bits */
+ unsigned char bits; /* bits in this part of the code */
+ unsigned short val; /* offset in table or code value */
+} code;
+
+/* op values as set by inflate_table():
+ 00000000 - literal
+ 0000tttt - table link, tttt != 0 is the number of table index bits
+ 0001eeee - length or distance, eeee is the number of extra bits
+ 01100000 - end of block
+ 01000000 - invalid code
+ */
+
+/* Maximum size of dynamic tree. The maximum found in a long but non-
+ exhaustive search was 1444 code structures (852 for length/literals
+ and 592 for distances, the latter actually the result of an
+ exhaustive search). The true maximum is not known, but the value
+ below is more than safe. */
+#define ENOUGH 2048
+#define MAXD 592
+
+/* Type of code to build for inftable() */
+typedef enum {
+ CODES,
+ LENS,
+ DISTS
+} codetype;
+
+#endif /* _INFTREES_H */
+
+#ifndef _INFLATE_H
+#define _INFLATE_H 1
+
+/* Possible inflate modes between inflate() calls */
+typedef enum {
+ HEAD, /* i: waiting for magic header */
+ FLAGS, /* i: waiting for method and flags (gzip) */
+ TIME, /* i: waiting for modification time (gzip) */
+ OS, /* i: waiting for extra flags and operating system (gzip) */
+ EXLEN, /* i: waiting for extra length (gzip) */
+ EXTRA, /* i: waiting for extra bytes (gzip) */
+ NAME, /* i: waiting for end of file name (gzip) */
+ COMMENT, /* i: waiting for end of comment (gzip) */
+ HCRC, /* i: waiting for header crc (gzip) */
+ DICTID, /* i: waiting for dictionary check value */
+ DICT, /* waiting for inflateSetDictionary() call */
+ TYPE, /* i: waiting for type bits, including last-flag bit */
+ TYPEDO, /* i: same, but skip check to exit inflate on new block */
+ STORED, /* i: waiting for stored size (length and complement) */
+ COPY, /* i/o: waiting for input or output to copy stored block */
+ TABLE, /* i: waiting for dynamic block table lengths */
+ LENLENS, /* i: waiting for code length code lengths */
+ CODELENS, /* i: waiting for length/lit and distance code lengths */
+ LEN, /* i: waiting for length/lit code */
+ LENEXT, /* i: waiting for length extra bits */
+ DIST, /* i: waiting for distance code */
+ DISTEXT, /* i: waiting for distance extra bits */
+ MATCH, /* o: waiting for output space to copy string */
+ LIT, /* o: waiting for output space to write literal */
+ CHECK, /* i: waiting for 32-bit check value */
+ LENGTH, /* i: waiting for 32-bit length (gzip) */
+ DONE, /* finished check, done -- remain here until reset */
+ BAD, /* got a data error -- remain here until reset */
+ MEM, /* got an inflate() memory error -- remain here until reset */
+ SYNC /* looking for synchronization bytes to restart inflate() */
+} inflate_mode;
+
+/*
+ State transitions between above modes -
+
+ (most modes can go to the BAD or MEM mode -- not shown for clarity)
+
+ Process header:
+ HEAD -> (gzip) or (zlib)
+ (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
+ NAME -> COMMENT -> HCRC -> TYPE
+ (zlib) -> DICTID or TYPE
+ DICTID -> DICT -> TYPE
+ Read deflate blocks:
+ TYPE -> STORED or TABLE or LEN or CHECK
+ STORED -> COPY -> TYPE
+ TABLE -> LENLENS -> CODELENS -> LEN
+ Read deflate codes:
+ LEN -> LENEXT or LIT or TYPE
+ LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
+ LIT -> LEN
+ Process trailer:
+ CHECK -> LENGTH -> DONE
+ */
+
+/* state maintained between inflate() calls. Approximately 7K bytes. */
+struct inflate_state {
+ inflate_mode mode; /* current inflate mode */
+ int last; /* true if processing last block */
+ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
+ int havedict; /* true if dictionary provided */
+ int flags; /* gzip header method and flags (0 if zlib) */
+ unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */
+ unsigned long check; /* protected copy of check value */
+ unsigned long total; /* protected copy of output count */
+ gz_headerp head; /* where to save gzip header information */
+ /* sliding window */
+ unsigned wbits; /* log base 2 of requested window size */
+ unsigned wsize; /* window size or zero if not using window */
+ unsigned whave; /* valid bytes in the window */
+ unsigned write; /* window write index */
+ unsigned char FAR *window; /* allocated sliding window, if needed */
+ /* bit accumulator */
+ unsigned long hold; /* input bit accumulator */
+ unsigned bits; /* number of bits in "in" */
+ /* for string and stored block copying */
+ unsigned length; /* literal or length of data to copy */
+ unsigned offset; /* distance back to copy string from */
+ /* for table and code decoding */
+ unsigned extra; /* extra bits needed */
+ /* fixed and dynamic code tables */
+ code const FAR *lencode; /* starting table for length/literal codes */
+ code const FAR *distcode; /* starting table for distance codes */
+ unsigned lenbits; /* index bits for lencode */
+ unsigned distbits; /* index bits for distcode */
+ /* dynamic table building */
+ unsigned ncode; /* number of code length code lengths */
+ unsigned nlen; /* number of length code lengths */
+ unsigned ndist; /* number of distance code lengths */
+ unsigned have; /* number of code lengths in lens[] */
+ code FAR *next; /* next available space in codes[] */
+ unsigned short lens[320]; /* temporary storage for code lengths */
+ unsigned short work[288]; /* work area for code table building */
+ code codes[ENOUGH]; /* space for code tables */
+};
+#endif /* _INFLATE_H */
+
+#ifndef _INFTREES_C
+#define _INFTREES_C 1
+
+#define MAXBITS 15
+
+const char inflate_copyright[] =
+ " inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
+/*
+ If you use the zlib library in a product, an acknowledgment is welcome
+ in the documentation of your product. If for some reason you cannot
+ include such an acknowledgment, I would appreciate that you keep this
+ copyright string in the executable of your product.
+ */
+
+/*
+ Build a set of tables to decode the provided canonical Huffman code.
+ The code lengths are lens[0..codes-1]. The result starts at *table,
+ whose indices are 0..2^bits-1. work is a writable array of at least
+ lens shorts, which is used as a work area. type is the type of code
+ to be generated, CODES, LENS, or DISTS. On return, zero is success,
+ -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
+ on return points to the next available entry's address. bits is the
+ requested root table index bits, and on return it is the actual root
+ table index bits. It will differ if the request is greater than the
+ longest code or if it is less than the shortest code.
+ */
+int inflate_table(type, lens, codes, table, bits, work)
+codetype type;
+unsigned short FAR *lens;
+unsigned codes;
+code FAR * FAR *table;
+unsigned FAR *bits;
+unsigned short FAR *work;
+{
+ unsigned len; /* a code's length in bits */
+ unsigned sym; /* index of code symbols */
+ unsigned min, max; /* minimum and maximum code lengths */
+ unsigned root; /* number of index bits for root table */
+ unsigned curr; /* number of index bits for current table */
+ unsigned drop; /* code bits to drop for sub-table */
+ int left; /* number of prefix codes available */
+ unsigned used; /* code entries in table used */
+ unsigned huff; /* Huffman code */
+ unsigned incr; /* for incrementing code, index */
+ unsigned fill; /* index for replicating entries */
+ unsigned low; /* low bits for current root entry */
+ unsigned mask; /* mask for low root bits */
+ code this; /* table entry for duplication */
+ code FAR *next; /* next available space in table */
+ const unsigned short FAR *base; /* base value table to use */
+ const unsigned short FAR *extra; /* extra bits table to use */
+ int end; /* use base and extra for symbol > end */
+ unsigned short count[MAXBITS+1]; /* number of codes of each length */
+ unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
+ static const unsigned short lbase[31] = { /* Length codes 257..285 base */
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
+ static const unsigned short lext[31] = { /* Length codes 257..285 extra */
+ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
+ static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+ 8193, 12289, 16385, 24577, 0, 0};
+ static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
+ 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
+ 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
+ 28, 28, 29, 29, 64, 64};
+
+ /*
+ Process a set of code lengths to create a canonical Huffman code. The
+ code lengths are lens[0..codes-1]. Each length corresponds to the
+ symbols 0..codes-1. The Huffman code is generated by first sorting the
+ symbols by length from short to long, and retaining the symbol order
+ for codes with equal lengths. Then the code starts with all zero bits
+ for the first code of the shortest length, and the codes are integer
+ increments for the same length, and zeros are appended as the length
+ increases. For the deflate format, these bits are stored backwards
+ from their more natural integer increment ordering, and so when the
+ decoding tables are built in the large loop below, the integer codes
+ are incremented backwards.
+
+ This routine assumes, but does not check, that all of the entries in
+ lens[] are in the range 0..MAXBITS. The caller must assure this.
+ 1..MAXBITS is interpreted as that code length. zero means that that
+ symbol does not occur in this code.
+
+ The codes are sorted by computing a count of codes for each length,
+ creating from that a table of starting indices for each length in the
+ sorted table, and then entering the symbols in order in the sorted
+ table. The sorted table is work[], with that space being provided by
+ the caller.
+
+ The length counts are used for other purposes as well, i.e. finding
+ the minimum and maximum length codes, determining if there are any
+ codes at all, checking for a valid set of lengths, and looking ahead
+ at length counts to determine sub-table sizes when building the
+ decoding tables.
+ */
+
+ /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
+ for (len = 0; len <= MAXBITS; len++)
+ count[len] = 0;
+ for (sym = 0; sym < codes; sym++)
+ count[lens[sym]]++;
+
+ /* bound code lengths, force root to be within code lengths */
+ root = *bits;
+ for (max = MAXBITS; max >= 1; max--)
+ if (count[max] != 0) break;
+ if (root > max) root = max;
+ if (max == 0) { /* no symbols to code at all */
+ this.op = (unsigned char)64; /* invalid code marker */
+ this.bits = (unsigned char)1;
+ this.val = (unsigned short)0;
+ *(*table)++ = this; /* make a table to force an error */
+ *(*table)++ = this;
+ *bits = 1;
+ return 0; /* no symbols, but wait for decoding to report error */
+ }
+ for (min = 1; min <= MAXBITS; min++)
+ if (count[min] != 0) break;
+ if (root < min) root = min;
+
+ /* check for an over-subscribed or incomplete set of lengths */
+ left = 1;
+ for (len = 1; len <= MAXBITS; len++) {
+ left <<= 1;
+ left -= count[len];
+ if (left < 0) return -1; /* over-subscribed */
+ }
+ if (left > 0 && (type == CODES || max != 1))
+ return -1; /* incomplete set */
+
+ /* generate offsets into symbol table for each length for sorting */
+ offs[1] = 0;
+ for (len = 1; len < MAXBITS; len++)
+ offs[len + 1] = offs[len] + count[len];
+
+ /* sort symbols by length, by symbol order within each length */
+ for (sym = 0; sym < codes; sym++)
+ if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
+
+ /*
+ Create and fill in decoding tables. In this loop, the table being
+ filled is at next and has curr index bits. The code being used is huff
+ with length len. That code is converted to an index by dropping drop
+ bits off of the bottom. For codes where len is less than drop + curr,
+ those top drop + curr - len bits are incremented through all values to
+ fill the table with replicated entries.
+
+ root is the number of index bits for the root table. When len exceeds
+ root, sub-tables are created pointed to by the root entry with an index
+ of the low root bits of huff. This is saved in low to check for when a
+ new sub-table should be started. drop is zero when the root table is
+ being filled, and drop is root when sub-tables are being filled.
+
+ When a new sub-table is needed, it is necessary to look ahead in the
+ code lengths to determine what size sub-table is needed. The length
+ counts are used for this, and so count[] is decremented as codes are
+ entered in the tables.
+
+ used keeps track of how many table entries have been allocated from the
+ provided *table space. It is checked when a LENS table is being made
+ against the space in *table, ENOUGH, minus the maximum space needed by
+ the worst case distance code, MAXD. This should never happen, but the
+ sufficiency of ENOUGH has not been proven exhaustively, hence the check.
+ This assumes that when type == LENS, bits == 9.
+
+ sym increments through all symbols, and the loop terminates when
+ all codes of length max, i.e. all codes, have been processed. This
+ routine permits incomplete codes, so another loop after this one fills
+ in the rest of the decoding tables with invalid code markers.
+ */
+
+ /* set up for code type */
+ switch (type) {
+ case CODES:
+ base = extra = work; /* dummy value--not used */
+ end = 19;
+ break;
+ case LENS:
+ base = lbase;
+ base -= 257;
+ extra = lext;
+ extra -= 257;
+ end = 256;
+ break;
+ default: /* DISTS */
+ base = dbase;
+ extra = dext;
+ end = -1;
+ }
+
+ /* initialize state for loop */
+ huff = 0; /* starting code */
+ sym = 0; /* starting code symbol */
+ len = min; /* starting code length */
+ next = *table; /* current table to fill in */
+ curr = root; /* current table index bits */
+ drop = 0; /* current bits to drop from code for index */
+ low = (unsigned)(-1); /* trigger new sub-table when len > root */
+ used = ((unsigned int)1) << root; /* use root table entries */
+ mask = used - 1; /* mask for comparing low */
+
+ /* check available table space */
+ if (type == LENS && used >= ENOUGH - MAXD)
+ return 1;
+
+ /* process all codes and make table entries */
+ for (;;) {
+ /* create table entry */
+ this.bits = (unsigned char)(len - drop);
+ if ((int)(work[sym]) < end) {
+ this.op = (unsigned char)0;
+ this.val = work[sym];
+ }
+ else if ((int)(work[sym]) > end) {
+ this.op = (unsigned char)(extra[work[sym]]);
+ this.val = base[work[sym]];
+ }
+ else {
+ this.op = (unsigned char)(32 + 64); /* end of block */
+ this.val = 0;
+ }
+
+ /* replicate for those indices with low len bits equal to huff */
+ incr = ((unsigned int)1) << (len - drop);
+ fill = ((unsigned int)1) << curr;
+ min = fill; /* save offset to next table */
+ do {
+ fill -= incr;
+ next[(huff >> drop) + fill] = this;
+ } while (fill != 0);
+
+ /* backwards increment the len-bit code huff */
+ incr = ((unsigned int)1) << (len - 1);
+ while (huff & incr)
+ incr >>= 1;
+ if (incr != 0) {
+ huff &= incr - 1;
+ huff += incr;
+ }
+ else
+ huff = 0;
+
+ /* go to next symbol, update count, len */
+ sym++;
+ if (--(count[len]) == 0) {
+ if (len == max) break;
+ len = lens[work[sym]];
+ }
+
+ /* create new sub-table if needed */
+ if (len > root && (huff & mask) != low) {
+ /* if first time, transition to sub-tables */
+ if (drop == 0)
+ drop = root;
+
+ /* increment past last table */
+ next += min; /* here min is 1 << curr */
+
+ /* determine length of next table */
+ curr = len - drop;
+ left = (int)(1 << curr);
+ while (curr + drop < max) {
+ left -= count[curr + drop];
+ if (left <= 0) break;
+ curr++;
+ left <<= 1;
+ }
+
+ /* check for enough space */
+ used += ((unsigned int)1) << curr;
+ if (type == LENS && used >= ENOUGH - MAXD)
+ return 1;
+
+ /* point entry in root table to sub-table */
+ low = huff & mask;
+ (*table)[low].op = (unsigned char)curr;
+ (*table)[low].bits = (unsigned char)root;
+ (*table)[low].val = (unsigned short)(next - *table);
+ }
+ }
+
+ /*
+ Fill in rest of table for incomplete codes. This loop is similar to the
+ loop above in incrementing huff for table indices. It is assumed that
+ len is equal to curr + drop, so there is no loop needed to increment
+ through high index bits. When the current sub-table is filled, the loop
+ drops back to the root table to fill in any remaining entries there.
+ */
+ this.op = (unsigned char)64; /* invalid code marker */
+ this.bits = (unsigned char)(len - drop);
+ this.val = (unsigned short)0;
+ while (huff != 0) {
+ /* when done with sub-table, drop back to root table */
+ if (drop != 0 && (huff & mask) != low) {
+ drop = 0;
+ len = root;
+ next = *table;
+ this.bits = (unsigned char)len;
+ }
+
+ /* put invalid code marker in table */
+ next[huff >> drop] = this;
+
+ /* backwards increment the len-bit code huff */
+ incr = ((unsigned int)1) << (len - 1);
+ while (huff & incr)
+ incr >>= 1;
+ if (incr != 0) {
+ huff &= incr - 1;
+ huff += incr;
+ }
+ else
+ huff = 0;
+ }
+
+ /* set return parameters */
+ *table += used;
+ *bits = root;
+ return 0;
+}
+
+#endif /* _INFTREES_C */
+
+#ifndef _INFFAST_C
+#define _INFFAST_C 1
+
+/* Allow machine dependent optimization for post-increment or pre-increment.
+ Based on testing to date,
+ Pre-increment preferred for:
+ - PowerPC G3 (Adler)
+ - MIPS R5000 (Randers-Pehrson)
+ Post-increment preferred for:
+ - none
+ No measurable difference:
+ - Pentium III (Anderson)
+ - M68060 (Nikl)
+ */
+#undef OFF /* (ancient) sunos <locale.h> */
+#ifdef POSTINC
+# define OFF 0
+# define PUP(a) *(a)++
+#else
+# define OFF 1
+# define PUP(a) *++(a)
+#endif
+
+/*
+ Decode literal, length, and distance codes and write out the resulting
+ literal and match bytes until either not enough input or output is
+ available, an end-of-block is encountered, or a data error is encountered.
+ When large enough input and output buffers are supplied to inflate(), for
+ example, a 16K input buffer and a 64K output buffer, more than 95% of the
+ inflate execution time is spent in this routine.
+
+ Entry assumptions:
+
+ state->mode == LEN
+ strm->avail_in >= 6
+ strm->avail_out >= 258
+ start >= strm->avail_out
+ state->bits < 8
+
+ On return, state->mode is one of:
+
+ LEN -- ran out of enough output space or enough available input
+ TYPE -- reached end of block code, inflate() to interpret next block
+ BAD -- error in block data
+
+ Notes:
+
+ - The maximum input bits used by a length/distance pair is 15 bits for the
+ length code, 5 bits for the length extra, 15 bits for the distance code,
+ and 13 bits for the distance extra. This totals 48 bits, or six bytes.
+ Therefore if strm->avail_in >= 6, then there is enough input to avoid
+ checking for available input while decoding.
+
+ - The maximum bytes that a single length/distance pair can output is 258
+ bytes, which is the maximum length that can be coded. inflate_fast()
+ requires strm->avail_out >= 258 for each loop to avoid checking for
+ output space.
+ */
+void inflate_fast(strm, start)
+z_streamp strm;
+unsigned start; /* inflate()'s starting value for strm->avail_out */
+{
+ struct inflate_state FAR *state;
+ unsigned char FAR *in; /* local strm->next_in */
+ unsigned char FAR *last; /* while in < last, enough input available */
+ unsigned char FAR *out; /* local strm->next_out */
+ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
+ unsigned char FAR *end; /* while out < end, enough space available */
+#ifdef INFLATE_STRICT
+ unsigned dmax; /* maximum distance from zlib header */
+#endif
+ unsigned wsize; /* window size or zero if not using window */
+ unsigned whave; /* valid bytes in the window */
+ unsigned write; /* window write index */
+ unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
+ unsigned long hold; /* local strm->hold */
+ unsigned bits; /* local strm->bits */
+ code const FAR *lcode; /* local strm->lencode */
+ code const FAR *dcode; /* local strm->distcode */
+ unsigned lmask; /* mask for first level of length codes */
+ unsigned dmask; /* mask for first level of distance codes */
+ code this; /* retrieved table entry */
+ unsigned op; /* code bits, operation, extra bits, or */
+ /* window position, window bytes to copy */
+ unsigned len; /* match length, unused bytes */
+ unsigned dist; /* match distance */
+ unsigned char FAR *from; /* where to copy match from */
+
+ /* copy state to local variables */
+ state = (struct inflate_state FAR *)strm->state;
+ in = strm->next_in - OFF;
+ last = in + (strm->avail_in - 5);
+ out = strm->next_out - OFF;
+ beg = out - (start - strm->avail_out);
+ end = out + (strm->avail_out - 257);
+#ifdef INFLATE_STRICT
+ dmax = state->dmax;
+#endif
+ wsize = state->wsize;
+ whave = state->whave;
+ write = state->write;
+ window = state->window;
+ hold = state->hold;
+ bits = state->bits;
+ lcode = state->lencode;
+ dcode = state->distcode;
+ lmask = (((unsigned int)1) << state->lenbits) - 1;
+ dmask = (((unsigned int)1) << state->distbits) - 1;
+
+ /* decode literals and length/distances until end-of-block or not enough
+ input data or output space */
+ do {
+ if (bits < 15) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ this = lcode[hold & lmask];
+ dolen:
+ op = (unsigned)(this.bits);
+ hold >>= op;
+ bits -= op;
+ op = (unsigned)(this.op);
+ if (op == 0) { /* literal */
+ Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ "inflate: literal '%c'\n" :
+ "inflate: literal 0x%02x\n", this.val));
+ PUP(out) = (unsigned char)(this.val);
+ }
+ else if (op & 16) { /* length base */
+ len = (unsigned)(this.val);
+ op &= 15; /* number of extra bits */
+ if (op) {
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ len += (unsigned)hold & ((((unsigned int)1) << op) - 1);
+ hold >>= op;
+ bits -= op;
+ }
+ Tracevv((stderr, "inflate: length %u\n", len));
+ if (bits < 15) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ this = dcode[hold & dmask];
+ dodist:
+ op = (unsigned)(this.bits);
+ hold >>= op;
+ bits -= op;
+ op = (unsigned)(this.op);
+ if (op & 16) { /* distance base */
+ dist = (unsigned)(this.val);
+ op &= 15; /* number of extra bits */
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ }
+ dist += (unsigned)hold & ((((unsigned int)1) << op) - 1);
+#ifdef INFLATE_STRICT
+ if (dist > dmax) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+#endif
+ hold >>= op;
+ bits -= op;
+ Tracevv((stderr, "inflate: distance %u\n", dist));
+ op = (unsigned)(out - beg); /* max distance in output */
+ if (dist > op) { /* see if copy from window */
+ op = dist - op; /* distance back in window */
+ if (op > whave) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+ from = window - OFF;
+ if (write == 0) { /* very common case */
+ from += wsize - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ else if (write < op) { /* wrap around window */
+ from += wsize + write - op;
+ op -= write;
+ if (op < len) { /* some from end of window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = window - OFF;
+ if (write < len) { /* some from start of window */
+ op = write;
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ }
+ else { /* contiguous in window */
+ from += write - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ while (len > 2) {
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ len -= 3;
+ }
+ if (len) {
+ PUP(out) = PUP(from);
+ if (len > 1)
+ PUP(out) = PUP(from);
+ }
+ }
+ else {
+ from = out - dist; /* copy direct from output */
+ do { /* minimum length is three */
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ len -= 3;
+ } while (len > 2);
+ if (len) {
+ PUP(out) = PUP(from);
+ if (len > 1)
+ PUP(out) = PUP(from);
+ }
+ }
+ }
+ else if ((op & 64) == 0) { /* 2nd level distance code */
+ this = dcode[this.val + (hold & ((((unsigned int)1) << op) - 1))];
+ goto dodist;
+ }
+ else {
+ strm->msg = (char *)"invalid distance code";
+ state->mode = BAD;
+ break;
+ }
+ }
+ else if ((op & 64) == 0) { /* 2nd level length code */
+ this = lcode[this.val + (hold & ((((unsigned int)1) << op) - 1))];
+ goto dolen;
+ }
+ else if (op & 32) { /* end-of-block */
+ Tracevv((stderr, "inflate: end of block\n"));
+ state->mode = TYPE;
+ break;
+ }
+ else {
+ strm->msg = (char *)"invalid literal/length code";
+ state->mode = BAD;
+ break;
+ }
+ } while (in < last && out < end);
+
+ /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+ len = bits >> 3;
+ in -= len;
+ bits -= len << 3;
+ hold &= (((unsigned int)1) << bits) - 1;
+
+ /* update state and return */
+ strm->next_in = in + OFF;
+ strm->next_out = out + OFF;
+ strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
+ strm->avail_out = (unsigned)(out < end ?
+ 257 + (end - out) : 257 - (out - end));
+ state->hold = hold;
+ state->bits = bits;
+ return;
+}
+
+/*
+ inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
+ - Using bit fields for code structure
+ - Different op definition to avoid & for extra bits (do & for table bits)
+ - Three separate decoding do-loops for direct, window, and write == 0
+ - Special case for distance > 1 copies to do overlapped load and store copy
+ - Explicit branch predictions (based on measured branch probabilities)
+ - Deferring match copy and interspersed it with decoding subsequent codes
+ - Swapping literal/length else
+ - Swapping window/direct else
+ - Larger unrolled copy loops (three is about right)
+ - Moving len -= 3 statement into middle of loop
+ */
+
+#endif /* _INFFAST_C */
+
+#ifndef _INFLATE_C
+#define _INFLATE_C 1
+
+/* function prototypes */
+local void fixedtables OF((struct inflate_state FAR *state));
+local int updatewindow OF((z_streamp strm, unsigned out));
+#ifdef BUILDFIXED
+ void makefixed OF((void));
+#endif
+local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
+ unsigned len));
+
+int ZEXPORT inflateReset(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ strm->total_in = strm->total_out = state->total = 0;
+ strm->msg = Z_NULL;
+ strm->adler = 1; /* to support ill-conceived Java test suite */
+ state->mode = HEAD;
+ state->last = 0;
+ state->havedict = 0;
+ state->dmax = 32768;
+ state->head = Z_NULL;
+ state->wsize = 0;
+ state->whave = 0;
+ state->write = 0;
+ state->hold = 0;
+ state->bits = 0;
+ state->lencode = state->distcode = state->next = state->codes;
+ Tracev((stderr, "inflate: reset\n"));
+ return Z_OK;
+}
+
+int ZEXPORT inflatePrime(strm, bits, value)
+z_streamp strm;
+int bits;
+int value;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
+ value &= (1L << bits) - 1;
+ state->hold += value << state->bits;
+ state->bits += bits;
+ return Z_OK;
+}
+
+int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
+z_streamp strm;
+int windowBits;
+const char *version;
+int stream_size;
+{
+ struct inflate_state FAR *state;
+
+ if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
+ stream_size != (int)(sizeof(z_stream)))
+ return Z_VERSION_ERROR;
+ if (strm == Z_NULL) return Z_STREAM_ERROR;
+ strm->msg = Z_NULL; /* in case we return an error */
+ if (strm->zalloc == (alloc_func)0) {
+ strm->zalloc = zcalloc;
+ strm->opaque = (voidpf)0;
+ }
+ if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ state = (struct inflate_state FAR *)
+ ZALLOC(strm, 1, sizeof(struct inflate_state));
+ if (state == Z_NULL) return Z_MEM_ERROR;
+ Tracev((stderr, "inflate: allocated\n"));
+ strm->state = (struct internal_state FAR *)state;
+ if (windowBits < 0) {
+ state->wrap = 0;
+ windowBits = -windowBits;
+ }
+ else {
+ state->wrap = (windowBits >> 4) + 1;
+#ifdef GUNZIP
+ if (windowBits < 48) windowBits &= 15;
+#endif
+ }
+ if (windowBits < 8 || windowBits > 15) {
+ ZFREE(strm, state);
+ strm->state = Z_NULL;
+ return Z_STREAM_ERROR;
+ }
+ state->wbits = (unsigned)windowBits;
+ state->window = Z_NULL;
+ return inflateReset(strm);
+}
+
+int ZEXPORT inflateInit_(strm, version, stream_size)
+z_streamp strm;
+const char *version;
+int stream_size;
+{
+ return inflateInit2_(strm, DEF_WBITS, version, stream_size);
+}
+
+/*
+ Return state with length and distance decoding tables and index sizes set to
+ fixed code decoding. Normally this returns fixed tables from inffixed.h.
+ If BUILDFIXED is defined, then instead this routine builds the tables the
+ first time it's called, and returns those tables the first time and
+ thereafter. This reduces the size of the code by about 2K bytes, in
+ exchange for a little execution time. However, BUILDFIXED should not be
+ used for threaded applications, since the rewriting of the tables and virgin
+ may not be thread-safe.
+ */
+local void fixedtables(state)
+struct inflate_state FAR *state;
+{
+#ifndef _INFFIXED_H
+#define _INFFIXED_H 1
+ static const code lenfix[512] = {
+ {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
+ {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
+ {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
+ {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
+ {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
+ {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
+ {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
+ {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
+ {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
+ {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
+ {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
+ {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
+ {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
+ {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
+ {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
+ {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
+ {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
+ {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
+ {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
+ {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
+ {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
+ {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
+ {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
+ {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
+ {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
+ {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
+ {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
+ {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
+ {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
+ {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
+ {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
+ {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
+ {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
+ {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
+ {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
+ {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
+ {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
+ {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
+ {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
+ {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
+ {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
+ {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
+ {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
+ {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
+ {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
+ {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
+ {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
+ {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
+ {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
+ {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
+ {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
+ {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
+ {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
+ {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
+ {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
+ {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
+ {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
+ {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
+ {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
+ {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
+ {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
+ {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
+ {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
+ {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
+ {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
+ {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
+ {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
+ {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
+ {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
+ {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
+ {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
+ {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
+ {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
+ {0,9,255}
+ };
+
+ static const code distfix[32] = {
+ {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
+ {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
+ {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
+ {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
+ {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
+ {22,5,193},{64,5,0}
+ };
+#endif /* _INFFIXED_H */
+ state->lencode = lenfix;
+ state->lenbits = 9;
+ state->distcode = distfix;
+ state->distbits = 5;
+}
+
+/*
+ Update the window with the last wsize (normally 32K) bytes written before
+ returning. If window does not exist yet, create it. This is only called
+ when a window is already in use, or when output has been written during this
+ inflate call, but the end of the deflate stream has not been reached yet.
+ It is also called to create a window for dictionary data when a dictionary
+ is loaded.
+
+ Providing output buffers larger than 32K to inflate() should provide a speed
+ advantage, since only the last 32K of output is copied to the sliding window
+ upon return from inflate(), and since all distances after the first 32K of
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+local int updatewindow(strm, out)
+z_streamp strm;
+unsigned out;
+{
+ struct inflate_state FAR *state;
+ unsigned copy, dist;
+
+ state = (struct inflate_state FAR *)strm->state;
+
+ /* if it hasn't been done already, allocate space for the window */
+ if (state->window == Z_NULL) {
+ state->window = (unsigned char FAR *)
+ ZALLOC(strm, ((unsigned int)1) << state->wbits,
+ sizeof(unsigned char));
+ if (state->window == Z_NULL) return 1;
+ }
+
+ /* if window not in use yet, initialize */
+ if (state->wsize == 0) {
+ state->wsize = ((unsigned int)1) << state->wbits;
+ state->write = 0;
+ state->whave = 0;
+ }
+
+ /* copy state->wsize or less output bytes into the circular window */
+ copy = out - strm->avail_out;
+ if (copy >= state->wsize) {
+ zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
+ state->write = 0;
+ state->whave = state->wsize;
+ }
+ else {
+ dist = state->wsize - state->write;
+ if (dist > copy) dist = copy;
+ zmemcpy(state->window + state->write, strm->next_out - copy, dist);
+ copy -= dist;
+ if (copy) {
+ zmemcpy(state->window, strm->next_out - copy, copy);
+ state->write = copy;
+ state->whave = state->wsize;
+ }
+ else {
+ state->write += dist;
+ if (state->write == state->wsize) state->write = 0;
+ if (state->whave < state->wsize) state->whave += dist;
+ }
+ }
+ return 0;
+}
+
+/* Macros for inflate(): */
+
+/* check function to use adler32() for zlib or crc32() for gzip */
+#ifdef GUNZIP
+# define UPDATE(check, buf, len) \
+ (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
+#else
+# define UPDATE(check, buf, len) adler32(check, buf, len)
+#endif
+
+/* check macros for header crc */
+#ifdef GUNZIP
+# define CRC2(check, word) \
+ do { \
+ hbuf[0] = (unsigned char)(word); \
+ hbuf[1] = (unsigned char)((word) >> 8); \
+ check = crc32(check, hbuf, 2); \
+ } while (0)
+
+# define CRC4(check, word) \
+ do { \
+ hbuf[0] = (unsigned char)(word); \
+ hbuf[1] = (unsigned char)((word) >> 8); \
+ hbuf[2] = (unsigned char)((word) >> 16); \
+ hbuf[3] = (unsigned char)((word) >> 24); \
+ check = crc32(check, hbuf, 4); \
+ } while (0)
+#endif
+
+/* Load registers with state in inflate() for speed */
+#define LOAD() \
+ do { \
+ put = strm->next_out; \
+ left = strm->avail_out; \
+ next = strm->next_in; \
+ have = strm->avail_in; \
+ hold = state->hold; \
+ bits = state->bits; \
+ } while (0)
+
+/* Restore state from registers in inflate() */
+#define RESTORE() \
+ do { \
+ strm->next_out = put; \
+ strm->avail_out = left; \
+ strm->next_in = next; \
+ strm->avail_in = have; \
+ state->hold = hold; \
+ state->bits = bits; \
+ } while (0)
+
+/* Clear the input bit accumulator */
+#define INITBITS() \
+ do { \
+ hold = 0; \
+ bits = 0; \
+ } while (0)
+
+/* Get a byte of input into the bit accumulator, or return from inflate()
+ if there is no input available. */
+#define PULLBYTE() \
+ do { \
+ if (have == 0) goto inf_leave; \
+ have--; \
+ hold += (unsigned long)(*next++) << bits; \
+ bits += 8; \
+ } while (0)
+
+/* Assure that there are at least n bits in the bit accumulator. If there is
+ not enough available input to do that, then return from inflate(). */
+#define NEEDBITS(n) \
+ do { \
+ while (bits < (unsigned)(n)) \
+ PULLBYTE(); \
+ } while (0)
+
+/* Return the low n bits of the bit accumulator (n < 16) */
+#define BITS(n) \
+ ((unsigned)hold & ((((unsigned int)1) << (n)) - 1))
+
+/* Remove n bits from the bit accumulator */
+#define DROPBITS(n) \
+ do { \
+ hold >>= (n); \
+ bits -= (unsigned)(n); \
+ } while (0)
+
+/* Remove zero to seven bits as needed to go to a byte boundary */
+#define BYTEBITS() \
+ do { \
+ hold >>= bits & 7; \
+ bits -= bits & 7; \
+ } while (0)
+
+/* Reverse the bytes in a 32-bit value */
+#define REVERSE(q) \
+ ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
+ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
+
+/*
+ inflate() uses a state machine to process as much input data and generate as
+ much output data as possible before returning. The state machine is
+ structured roughly as follows:
+
+ for (;;) switch (state) {
+ ...
+ case STATEn:
+ if (not enough input data or output space to make progress)
+ return;
+ ... make progress ...
+ state = STATEm;
+ break;
+ ...
+ }
+
+ so when inflate() is called again, the same case is attempted again, and
+ if the appropriate resources are provided, the machine proceeds to the
+ next state. The NEEDBITS() macro is usually the way the state evaluates
+ whether it can proceed or should return. NEEDBITS() does the return if
+ the requested bits are not available. The typical use of the BITS macros
+ is:
+
+ NEEDBITS(n);
+ ... do something with BITS(n) ...
+ DROPBITS(n);
+
+ where NEEDBITS(n) either returns from inflate() if there isn't enough
+ input left to load n bits into the accumulator, or it continues. BITS(n)
+ gives the low n bits in the accumulator. When done, DROPBITS(n) drops
+ the low n bits off the accumulator. INITBITS() clears the accumulator
+ and sets the number of available bits to zero. BYTEBITS() discards just
+ enough bits to put the accumulator on a byte boundary. After BYTEBITS()
+ and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
+
+ NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
+ if there is no input available. The decoding of variable length codes uses
+ PULLBYTE() directly in order to pull just enough bytes to decode the next
+ code, and no more.
+
+ Some states loop until they get enough input, making sure that enough
+ state information is maintained to continue the loop where it left off
+ if NEEDBITS() returns in the loop. For example, want, need, and keep
+ would all have to actually be part of the saved state in case NEEDBITS()
+ returns:
+
+ case STATEw:
+ while (want < need) {
+ NEEDBITS(n);
+ keep[want++] = BITS(n);
+ DROPBITS(n);
+ }
+ state = STATEx;
+ case STATEx:
+
+ As shown above, if the next state is also the next case, then the break
+ is omitted.
+
+ A state may also return if there is not enough output space available to
+ complete that state. Those states are copying stored data, writing a
+ literal byte, and copying a matching string.
+
+ When returning, a "goto inf_leave" is used to update the total counters,
+ update the check value, and determine whether any progress has been made
+ during that inflate() call in order to return the proper return code.
+ Progress is defined as a change in either strm->avail_in or strm->avail_out.
+ When there is a window, goto inf_leave will update the window with the last
+ output written. If a goto inf_leave occurs in the middle of decompression
+ and there is no window currently, goto inf_leave will create one and copy
+ output to the window for the next call of inflate().
+
+ In this implementation, the flush parameter of inflate() only affects the
+ return code (per zlib.h). inflate() always writes as much as possible to
+ strm->next_out, given the space available and the provided input--the effect
+ documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers
+ the allocation of and copying into a sliding window until necessary, which
+ provides the effect documented in zlib.h for Z_FINISH when the entire input
+ stream available. So the only thing the flush parameter actually does is:
+ when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it
+ will return Z_BUF_ERROR if it has not reached the end of the stream.
+ */
+
+int ZEXPORT inflate(strm, flush)
+z_streamp strm;
+int flush;
+{
+ struct inflate_state FAR *state;
+ unsigned char FAR *next; /* next input */
+ unsigned char FAR *put; /* next output */
+ unsigned have, left; /* available input and output */
+ unsigned long hold; /* bit buffer */
+ unsigned bits; /* bits in bit buffer */
+ unsigned in, out; /* save starting available input and output */
+ unsigned copy; /* number of stored or match bytes to copy */
+ unsigned char FAR *from; /* where to copy match bytes from */
+ code this; /* current decoding table entry */
+ code last; /* parent table entry */
+ unsigned len; /* length to copy for repeats, bits to drop */
+ int ret; /* return code */
+#ifdef GUNZIP
+ unsigned char hbuf[4]; /* buffer for gzip header crc calculation */
+#endif
+ static const unsigned short order[19] = /* permutation of code lengths */
+ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
+
+ if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
+ (strm->next_in == Z_NULL && strm->avail_in != 0))
+ return Z_STREAM_ERROR;
+
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
+ LOAD();
+ in = have;
+ out = left;
+ ret = Z_OK;
+ for (;;)
+ switch (state->mode) {
+ case HEAD:
+ if (state->wrap == 0) {
+ state->mode = TYPEDO;
+ break;
+ }
+ NEEDBITS(16);
+#ifdef GUNZIP
+ if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */
+ state->check = crc32(0L, Z_NULL, 0);
+ CRC2(state->check, hold);
+ INITBITS();
+ state->mode = FLAGS;
+ break;
+ }
+ state->flags = 0; /* expect zlib header */
+ if (state->head != Z_NULL)
+ state->head->done = -1;
+ if (!(state->wrap & 1) || /* check if zlib header allowed */
+#else
+ if (
+#endif
+ ((BITS(8) << 8) + (hold >> 8)) % 31) {
+ strm->msg = (char *)"incorrect header check";
+ state->mode = BAD;
+ break;
+ }
+ if (BITS(4) != Z_DEFLATED) {
+ strm->msg = (char *)"unknown compression method";
+ state->mode = BAD;
+ break;
+ }
+ DROPBITS(4);
+ len = BITS(4) + 8;
+ if (len > state->wbits) {
+ strm->msg = (char *)"invalid window size";
+ state->mode = BAD;
+ break;
+ }
+ state->dmax = ((unsigned int)1) << len;
+ Tracev((stderr, "inflate: zlib header ok\n"));
+ strm->adler = state->check = adler32(0L, Z_NULL, 0);
+ state->mode = hold & 0x200 ? DICTID : TYPE;
+ INITBITS();
+ break;
+#ifdef GUNZIP
+ case FLAGS:
+ NEEDBITS(16);
+ state->flags = (int)(hold);
+ if ((state->flags & 0xff) != Z_DEFLATED) {
+ strm->msg = (char *)"unknown compression method";
+ state->mode = BAD;
+ break;
+ }
+ if (state->flags & 0xe000) {
+ strm->msg = (char *)"unknown header flags set";
+ state->mode = BAD;
+ break;
+ }
+ if (state->head != Z_NULL)
+ state->head->text = (int)((hold >> 8) & 1);
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ state->mode = TIME;
+ case TIME:
+ NEEDBITS(32);
+ if (state->head != Z_NULL)
+ state->head->time = hold;
+ if (state->flags & 0x0200) CRC4(state->check, hold);
+ INITBITS();
+ state->mode = OS;
+ case OS:
+ NEEDBITS(16);
+ if (state->head != Z_NULL) {
+ state->head->xflags = (int)(hold & 0xff);
+ state->head->os = (int)(hold >> 8);
+ }
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ state->mode = EXLEN;
+ case EXLEN:
+ if (state->flags & 0x0400) {
+ NEEDBITS(16);
+ state->length = (unsigned)(hold);
+ if (state->head != Z_NULL)
+ state->head->extra_len = (unsigned)hold;
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ }
+ else if (state->head != Z_NULL)
+ state->head->extra = Z_NULL;
+ state->mode = EXTRA;
+ case EXTRA:
+ if (state->flags & 0x0400) {
+ copy = state->length;
+ if (copy > have) copy = have;
+ if (copy) {
+ if (state->head != Z_NULL &&
+ state->head->extra != Z_NULL) {
+ len = state->head->extra_len - state->length;
+ zmemcpy(state->head->extra + len, next,
+ len + copy > state->head->extra_max ?
+ state->head->extra_max - len : copy);
+ }
+ if (state->flags & 0x0200)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ state->length -= copy;
+ }
+ if (state->length) goto inf_leave;
+ }
+ state->length = 0;
+ state->mode = NAME;
+ case NAME:
+ if (state->flags & 0x0800) {
+ if (have == 0) goto inf_leave;
+ copy = 0;
+ do {
+ len = (unsigned)(next[copy++]);
+ if (state->head != Z_NULL &&
+ state->head->name != Z_NULL &&
+ state->length < state->head->name_max)
+ state->head->name[state->length++] = len;
+ } while (len && copy < have);
+ if (state->flags & 0x0200)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ if (len) goto inf_leave;
+ }
+ else if (state->head != Z_NULL)
+ state->head->name = Z_NULL;
+ state->length = 0;
+ state->mode = COMMENT;
+ case COMMENT:
+ if (state->flags & 0x1000) {
+ if (have == 0) goto inf_leave;
+ copy = 0;
+ do {
+ len = (unsigned)(next[copy++]);
+ if (state->head != Z_NULL &&
+ state->head->comment != Z_NULL &&
+ state->length < state->head->comm_max)
+ state->head->comment[state->length++] = len;
+ } while (len && copy < have);
+ if (state->flags & 0x0200)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ if (len) goto inf_leave;
+ }
+ else if (state->head != Z_NULL)
+ state->head->comment = Z_NULL;
+ state->mode = HCRC;
+ case HCRC:
+ if (state->flags & 0x0200) {
+ NEEDBITS(16);
+ if (hold != (state->check & 0xffff)) {
+ strm->msg = (char *)"header crc mismatch";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ }
+ if (state->head != Z_NULL) {
+ state->head->hcrc = (int)((state->flags >> 9) & 1);
+ state->head->done = 1;
+ }
+ strm->adler = state->check = crc32(0L, Z_NULL, 0);
+ state->mode = TYPE;
+ break;
+#endif
+ case DICTID:
+ NEEDBITS(32);
+ strm->adler = state->check = REVERSE(hold);
+ INITBITS();
+ state->mode = DICT;
+ case DICT:
+ if (state->havedict == 0) {
+ RESTORE();
+ return Z_NEED_DICT;
+ }
+ strm->adler = state->check = adler32(0L, Z_NULL, 0);
+ state->mode = TYPE;
+ case TYPE:
+ if (flush == Z_BLOCK) goto inf_leave;
+ case TYPEDO:
+ if (state->last) {
+ BYTEBITS();
+ state->mode = CHECK;
+ break;
+ }
+ NEEDBITS(3);
+ state->last = BITS(1);
+ DROPBITS(1);
+ switch (BITS(2)) {
+ case 0: /* stored block */
+ Tracev((stderr, "inflate: stored block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = STORED;
+ break;
+ case 1: /* fixed block */
+ fixedtables(state);
+ Tracev((stderr, "inflate: fixed codes block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = LEN; /* decode codes */
+ break;
+ case 2: /* dynamic block */
+ Tracev((stderr, "inflate: dynamic codes block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = TABLE;
+ break;
+ case 3:
+ strm->msg = (char *)"invalid block type";
+ state->mode = BAD;
+ }
+ DROPBITS(2);
+ break;
+ case STORED:
+ BYTEBITS(); /* go to byte boundary */
+ NEEDBITS(32);
+ if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
+ strm->msg = (char *)"invalid stored block lengths";
+ state->mode = BAD;
+ break;
+ }
+ state->length = (unsigned)hold & 0xffff;
+ Tracev((stderr, "inflate: stored length %u\n",
+ state->length));
+ INITBITS();
+ state->mode = COPY;
+ case COPY:
+ copy = state->length;
+ if (copy) {
+ if (copy > have) copy = have;
+ if (copy > left) copy = left;
+ if (copy == 0) goto inf_leave;
+ zmemcpy(put, next, copy);
+ have -= copy;
+ next += copy;
+ left -= copy;
+ put += copy;
+ state->length -= copy;
+ break;
+ }
+ Tracev((stderr, "inflate: stored end\n"));
+ state->mode = TYPE;
+ break;
+ case TABLE:
+ NEEDBITS(14);
+ state->nlen = BITS(5) + 257;
+ DROPBITS(5);
+ state->ndist = BITS(5) + 1;
+ DROPBITS(5);
+ state->ncode = BITS(4) + 4;
+ DROPBITS(4);
+#ifndef PKZIP_BUG_WORKAROUND
+ if (state->nlen > 286 || state->ndist > 30) {
+ strm->msg = (char *)"too many length or distance symbols";
+ state->mode = BAD;
+ break;
+ }
+#endif
+ Tracev((stderr, "inflate: table sizes ok\n"));
+ state->have = 0;
+ state->mode = LENLENS;
+ case LENLENS:
+ while (state->have < state->ncode) {
+ NEEDBITS(3);
+ state->lens[order[state->have++]] = (unsigned short)BITS(3);
+ DROPBITS(3);
+ }
+ while (state->have < 19)
+ state->lens[order[state->have++]] = 0;
+ state->next = state->codes;
+ state->lencode = (code const FAR *)(state->next);
+ state->lenbits = 7;
+ ret = inflate_table(CODES, state->lens, 19, &(state->next),
+ &(state->lenbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid code lengths set";
+ state->mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: code lengths ok\n"));
+ state->have = 0;
+ state->mode = CODELENS;
+ case CODELENS:
+ while (state->have < state->nlen + state->ndist) {
+ for (;;) {
+ this = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if (this.val < 16) {
+ NEEDBITS(this.bits);
+ DROPBITS(this.bits);
+ state->lens[state->have++] = this.val;
+ }
+ else {
+ if (this.val == 16) {
+ NEEDBITS(this.bits + 2);
+ DROPBITS(this.bits);
+ if (state->have == 0) {
+ strm->msg = (char *)"invalid bit length repeat";
+ state->mode = BAD;
+ break;
+ }
+ len = state->lens[state->have - 1];
+ copy = 3 + BITS(2);
+ DROPBITS(2);
+ }
+ else if (this.val == 17) {
+ NEEDBITS(this.bits + 3);
+ DROPBITS(this.bits);
+ len = 0;
+ copy = 3 + BITS(3);
+ DROPBITS(3);
+ }
+ else {
+ NEEDBITS(this.bits + 7);
+ DROPBITS(this.bits);
+ len = 0;
+ copy = 11 + BITS(7);
+ DROPBITS(7);
+ }
+ if (state->have + copy > state->nlen + state->ndist) {
+ strm->msg = (char *)"invalid bit length repeat";
+ state->mode = BAD;
+ break;
+ }
+ while (copy--)
+ state->lens[state->have++] = (unsigned short)len;
+ }
+ }
+
+ /* handle error breaks in while */
+ if (state->mode == BAD) break;
+
+ /* build code tables */
+ state->next = state->codes;
+ state->lencode = (code const FAR *)(state->next);
+ state->lenbits = 9;
+ ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
+ &(state->lenbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid literal/lengths set";
+ state->mode = BAD;
+ break;
+ }
+ state->distcode = (code const FAR *)(state->next);
+ state->distbits = 6;
+ ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
+ &(state->next), &(state->distbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid distances set";
+ state->mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: codes ok\n"));
+ state->mode = LEN;
+ case LEN:
+ if (have >= 6 && left >= 258) {
+ RESTORE();
+ inflate_fast(strm, out);
+ LOAD();
+ break;
+ }
+ for (;;) {
+ this = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if (this.op && (this.op & 0xf0) == 0) {
+ last = this;
+ for (;;) {
+ this = state->lencode[last.val +
+ (BITS(last.bits + last.op) >> last.bits)];
+ if ((unsigned)(last.bits + this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ DROPBITS(last.bits);
+ }
+ DROPBITS(this.bits);
+ state->length = (unsigned)this.val;
+ if ((int)(this.op) == 0) {
+ Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ "inflate: literal '%c'\n" :
+ "inflate: literal 0x%02x\n", this.val));
+ state->mode = LIT;
+ break;
+ }
+ if (this.op & 32) {
+ Tracevv((stderr, "inflate: end of block\n"));
+ state->mode = TYPE;
+ break;
+ }
+ if (this.op & 64) {
+ strm->msg = (char *)"invalid literal/length code";
+ state->mode = BAD;
+ break;
+ }
+ state->extra = (unsigned)(this.op) & 15;
+ state->mode = LENEXT;
+ case LENEXT:
+ if (state->extra) {
+ NEEDBITS(state->extra);
+ state->length += BITS(state->extra);
+ DROPBITS(state->extra);
+ }
+ Tracevv((stderr, "inflate: length %u\n", state->length));
+ state->mode = DIST;
+ case DIST:
+ for (;;) {
+ this = state->distcode[BITS(state->distbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if ((this.op & 0xf0) == 0) {
+ last = this;
+ for (;;) {
+ this = state->distcode[last.val +
+ (BITS(last.bits + last.op) >> last.bits)];
+ if ((unsigned)(last.bits + this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ DROPBITS(last.bits);
+ }
+ DROPBITS(this.bits);
+ if (this.op & 64) {
+ strm->msg = (char *)"invalid distance code";
+ state->mode = BAD;
+ break;
+ }
+ state->offset = (unsigned)this.val;
+ state->extra = (unsigned)(this.op) & 15;
+ state->mode = DISTEXT;
+ case DISTEXT:
+ if (state->extra) {
+ NEEDBITS(state->extra);
+ state->offset += BITS(state->extra);
+ DROPBITS(state->extra);
+ }
+#ifdef INFLATE_STRICT
+ if (state->offset > state->dmax) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+#endif
+ if (state->offset > state->whave + out - left) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+ Tracevv((stderr, "inflate: distance %u\n", state->offset));
+ state->mode = MATCH;
+ case MATCH:
+ if (left == 0) goto inf_leave;
+ copy = out - left;
+ if (state->offset > copy) { /* copy from window */
+ copy = state->offset - copy;
+ if (copy > state->write) {
+ copy -= state->write;
+ from = state->window + (state->wsize - copy);
+ }
+ else
+ from = state->window + (state->write - copy);
+ if (copy > state->length) copy = state->length;
+ }
+ else { /* copy from output */
+ from = put - state->offset;
+ copy = state->length;
+ }
+ if (copy > left) copy = left;
+ left -= copy;
+ state->length -= copy;
+ do {
+ *put++ = *from++;
+ } while (--copy);
+ if (state->length == 0) state->mode = LEN;
+ break;
+ case LIT:
+ if (left == 0) goto inf_leave;
+ *put++ = (unsigned char)(state->length);
+ left--;
+ state->mode = LEN;
+ break;
+ case CHECK:
+ if (state->wrap) {
+ NEEDBITS(32);
+ out -= left;
+ strm->total_out += out;
+ state->total += out;
+ if (out)
+ strm->adler = state->check =
+ UPDATE(state->check, put - out, out);
+ out = left;
+ if ((
+#ifdef GUNZIP
+ state->flags ? hold :
+#endif
+ REVERSE(hold)) != state->check) {
+ strm->msg = (char *)"incorrect data check";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ Tracev((stderr, "inflate: check matches trailer\n"));
+ }
+#ifdef GUNZIP
+ state->mode = LENGTH;
+ case LENGTH:
+ if (state->wrap && state->flags) {
+ NEEDBITS(32);
+ if (hold != (state->total & 0xffffffff)) {
+ strm->msg = (char *)"incorrect length check";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ Tracev((stderr, "inflate: length matches trailer\n"));
+ }
+#endif
+ state->mode = DONE;
+ case DONE:
+ ret = Z_STREAM_END;
+ goto inf_leave;
+ case BAD:
+ ret = Z_DATA_ERROR;
+ goto inf_leave;
+ case MEM:
+ return Z_MEM_ERROR;
+ case SYNC:
+ default:
+ return Z_STREAM_ERROR;
+ }
+
+ /*
+ Return from inflate(), updating the total counts and the check value.
+ If there was no progress during the inflate() call, return a buffer
+ error. Call updatewindow() to create and/or update the window state.
+ Note: a memory error from inflate() is non-recoverable.
+ */
+ inf_leave:
+ RESTORE();
+ if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
+ if (updatewindow(strm, out)) {
+ state->mode = MEM;
+ return Z_MEM_ERROR;
+ }
+ in -= strm->avail_in;
+ out -= strm->avail_out;
+ strm->total_in += in;
+ strm->total_out += out;
+ state->total += out;
+ if (state->wrap && out)
+ strm->adler = state->check =
+ UPDATE(state->check, strm->next_out - out, out);
+ strm->data_type = state->bits + (state->last ? 64 : 0) +
+ (state->mode == TYPE ? 128 : 0);
+ if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
+ ret = Z_BUF_ERROR;
+ return ret;
+}
+
+int ZEXPORT inflateEnd(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+ if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
+ return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->window != Z_NULL) ZFREE(strm, state->window);
+ ZFREE(strm, strm->state);
+ strm->state = Z_NULL;
+ Tracev((stderr, "inflate: end\n"));
+ return Z_OK;
+}
+
+int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
+z_streamp strm;
+const Bytef *dictionary;
+uInt dictLength;
+{
+ struct inflate_state FAR *state;
+ unsigned long id;
+
+ /* check state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->wrap != 0 && state->mode != DICT)
+ return Z_STREAM_ERROR;
+
+ /* check for correct dictionary id */
+ if (state->mode == DICT) {
+ id = adler32(0L, Z_NULL, 0);
+ id = adler32(id, dictionary, dictLength);
+ if (id != state->check)
+ return Z_DATA_ERROR;
+ }
+
+ /* copy dictionary to window */
+ if (updatewindow(strm, strm->avail_out)) {
+ state->mode = MEM;
+ return Z_MEM_ERROR;
+ }
+ if (dictLength > state->wsize) {
+ zmemcpy(state->window, dictionary + dictLength - state->wsize,
+ state->wsize);
+ state->whave = state->wsize;
+ }
+ else {
+ zmemcpy(state->window + state->wsize - dictLength, dictionary,
+ dictLength);
+ state->whave = dictLength;
+ }
+ state->havedict = 1;
+ Tracev((stderr, "inflate: dictionary set\n"));
+ return Z_OK;
+}
+
+int ZEXPORT inflateGetHeader(strm, head)
+z_streamp strm;
+gz_headerp head;
+{
+ struct inflate_state FAR *state;
+
+ /* check state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
+
+ /* save header structure */
+ state->head = head;
+#ifdef GUNZIP
+ head->done = 0;
+#endif
+ return Z_OK;
+}
+
+/*
+ Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found
+ or when out of input. When called, *have is the number of pattern bytes
+ found in order so far, in 0..3. On return *have is updated to the new
+ state. If on return *have equals four, then the pattern was found and the
+ return value is how many bytes were read including the last byte of the
+ pattern. If *have is less than four, then the pattern has not been found
+ yet and the return value is len. In the latter case, syncsearch() can be
+ called again with more data and the *have state. *have is initialized to
+ zero for the first call.
+ */
+local unsigned syncsearch(have, buf, len)
+unsigned FAR *have;
+unsigned char FAR *buf;
+unsigned len;
+{
+ unsigned got;
+ unsigned next;
+
+ got = *have;
+ next = 0;
+ while (next < len && got < 4) {
+ if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
+ got++;
+ else if (buf[next])
+ got = 0;
+ else
+ got = 4 - got;
+ next++;
+ }
+ *have = got;
+ return next;
+}
+
+int ZEXPORT inflateSync(strm)
+z_streamp strm;
+{
+ unsigned len; /* number of bytes to look at or looked at */
+ unsigned long in, out; /* temporary to save total_in and total_out */
+ unsigned char buf[4]; /* to restore bit buffer to byte string */
+ struct inflate_state FAR *state;
+
+ /* check parameters */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
+
+ /* if first time, start search in bit buffer */
+ if (state->mode != SYNC) {
+ state->mode = SYNC;
+ state->hold <<= state->bits & 7;
+ state->bits -= state->bits & 7;
+ len = 0;
+ while (state->bits >= 8) {
+ buf[len++] = (unsigned char)(state->hold);
+ state->hold >>= 8;
+ state->bits -= 8;
+ }
+ state->have = 0;
+ syncsearch(&(state->have), buf, len);
+ }
+
+ /* search available input */
+ len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
+ strm->avail_in -= len;
+ strm->next_in += len;
+ strm->total_in += len;
+
+ /* return no joy or set up to restart inflate() on a new block */
+ if (state->have != 4) return Z_DATA_ERROR;
+ in = strm->total_in; out = strm->total_out;
+ inflateReset(strm);
+ strm->total_in = in; strm->total_out = out;
+ state->mode = TYPE;
+ return Z_OK;
+}
+
+/*
+ Returns true if inflate is currently at the end of a block generated by
+ Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
+ implementation to provide an additional safety check. PPP uses
+ Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
+ block. When decompressing, PPP checks that at the end of input packet,
+ inflate is waiting for these length bytes.
+ */
+int ZEXPORT inflateSyncPoint(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ return state->mode == STORED && state->bits == 0;
+}
+
+int ZEXPORT inflateCopy(dest, source)
+z_streamp dest;
+z_streamp source;
+{
+ struct inflate_state FAR *state;
+ struct inflate_state FAR *copy;
+ unsigned char FAR *window;
+ unsigned wsize;
+
+ /* check input */
+ if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
+ source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
+ return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)source->state;
+
+ /* allocate space */
+ copy = (struct inflate_state FAR *)
+ ZALLOC(source, 1, sizeof(struct inflate_state));
+ if (copy == Z_NULL) return Z_MEM_ERROR;
+ window = Z_NULL;
+ if (state->window != Z_NULL) {
+ window = (unsigned char FAR *)
+ ZALLOC(source, ((unsigned int)1) << state->wbits, sizeof(unsigned char));
+ if (window == Z_NULL) {
+ ZFREE(source, copy);
+ return Z_MEM_ERROR;
+ }
+ }
+
+ /* copy state */
+ zmemcpy(dest, source, sizeof(z_stream));
+ zmemcpy(copy, state, sizeof(struct inflate_state));
+ if (state->lencode >= state->codes &&
+ state->lencode <= state->codes + ENOUGH - 1) {
+ copy->lencode = copy->codes + (state->lencode - state->codes);
+ copy->distcode = copy->codes + (state->distcode - state->codes);
+ }
+ copy->next = copy->codes + (state->next - state->codes);
+ if (window != Z_NULL) {
+ wsize = ((unsigned int)1) << state->wbits;
+ zmemcpy(window, state->window, wsize);
+ }
+ copy->window = window;
+ dest->state = (struct internal_state FAR *)copy;
+ return Z_OK;
+}
+
+#endif /* _INFLATE_C */
+
+#ifndef _GZIO_C
+#define _GZIO_C 1
+
+typedef voidp gzFile;
+
+#ifndef Z_BUFSIZE
+# ifdef MAXSEG_64K
+# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */
+# else
+# define Z_BUFSIZE 16384
+# endif
+#endif
+#ifndef Z_PRINTF_BUFSIZE
+# define Z_PRINTF_BUFSIZE 4096
+#endif
+
+#ifdef __MVS__
+# pragma map (fdopen , "\174\174FDOPEN")
+ FILE *fdopen(int, const char *);
+#endif
+
+#if 0 && !_PACKAGE_ast
+#ifndef STDC
+extern voidp malloc OF((uInt size));
+extern void free OF((voidpf ptr));
+#endif
+#endif
+
+#define ALLOC(size) malloc(size)
+#define TRYFREE(p) {if (p) free(p);}
+
+static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
+
+/* gzip flag byte */
+#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
+#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
+#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
+#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
+#define COMMENT 0x10 /* bit 4 set: file comment present */
+#define RESERVED 0xE0 /* bits 5..7: reserved */
+
+typedef struct gz_stream {
+ z_stream stream;
+ int z_err; /* error code for last stream operation */
+ int z_eof; /* set if end of input file */
+ FILE *file; /* .gz file */
+ Byte *inbuf; /* input buffer */
+ Byte *outbuf; /* output buffer */
+ uLong crc; /* crc32 of uncompressed data */
+ char *msg; /* error message */
+ char *path; /* path name for debugging only */
+ int transparent; /* 1 if input file is not a .gz file */
+#if _PACKAGE_ast
+ int fatal; /* fatal stream error => all other ops fail */
+ int nocrc; /* 1 to skip 'r' crc checks */
+ int noclose; /* 1 to skip destroy fclose */
+ int verified;/* 2-byte magic read and verified ('v') */
+#endif
+ char mode; /* 'w' or 'r' */
+ z_off_t start; /* start of compressed data in file (header skipped) */
+ z_off_t in; /* bytes into deflate or inflate */
+ z_off_t out; /* bytes out of deflate or inflate */
+ int back; /* one character push-back */
+ int last; /* true if push-back is last character */
+} gz_stream;
+
+
+local gzFile gz_open OF((const char *path, const char *mode, FILE* fp));
+local int get_byte OF((gz_stream *s));
+local void check_header OF((gz_stream *s));
+local int destroy OF((gz_stream *s));
+local uLong getLong OF((gz_stream *s));
+
+/* ===========================================================================
+ Opens a gzip (.gz) file for reading or writing. The mode parameter
+ is as in fopen ("rb" or "wb"). The file is given either by FILE pointer
+ or path name (if fp == 0).
+ gz_open returns NULL if the file could not be opened or if there was
+ insufficient memory to allocate the (de)compression state; errno
+ can be checked to distinguish the two cases (if errno is zero, the
+ zlib error is Z_MEM_ERROR).
+*/
+local gzFile gz_open (path, mode, fp)
+ const char *path;
+ const char *mode;
+ FILE *fp;
+{
+ int err;
+ int level = Z_DEFAULT_COMPRESSION; /* compression level */
+ int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */
+ char *p = (char*)mode;
+ gz_stream *s;
+ char fmode[80]; /* copy of mode, without the compression level */
+ char *m = fmode;
+
+ if (!path || !mode) return Z_NULL;
+
+ s = (gz_stream *)ALLOC(sizeof(gz_stream));
+ if (!s) return Z_NULL;
+
+ s->stream.zalloc = (alloc_func)0;
+ s->stream.zfree = (free_func)0;
+ s->stream.opaque = (voidpf)0;
+ s->stream.next_in = s->inbuf = Z_NULL;
+ s->stream.next_out = s->outbuf = Z_NULL;
+ s->stream.avail_in = s->stream.avail_out = 0;
+ s->file = NULL;
+ s->z_err = Z_OK;
+ s->z_eof = 0;
+ s->in = 0;
+ s->out = 0;
+ s->back = EOF;
+ s->crc = crc32(0L, Z_NULL, 0);
+#if _PACKAGE_ast
+ s->fatal = 0;
+ s->nocrc = 0;
+ s->verified = 0;
+#endif
+ s->msg = NULL;
+ s->transparent = 0;
+
+ s->path = (char*)ALLOC(strlen(path)+1);
+ if (s->path == NULL) {
+ return destroy(s), (gzFile)Z_NULL;
+ }
+ strcpy(s->path, path); /* do this early for debugging */
+
+ s->mode = '\0';
+ do {
+ if (*p == 'r') s->mode = 'r';
+ if (*p == 'w' || *p == 'a') s->mode = 'w';
+ if (*p >= '0' && *p <= '9') {
+ level = *p - '0';
+ } else if (*p == 'f') {
+ strategy = Z_FILTERED;
+ } else if (*p == 'h') {
+ strategy = Z_HUFFMAN_ONLY;
+ } else if (*p == 'R') {
+ strategy = Z_RLE;
+#if _PACKAGE_ast
+ } else if (*p == 'n') {
+ s->nocrc = 1;
+ } else if (*p == 'o') {
+ s->noclose = 1;
+ } else if (*p == 'v') {
+ s->verified = 1;
+#endif
+ } else {
+ *m++ = *p; /* copy the mode */
+ }
+ } while (*p++ && m != fmode + sizeof(fmode));
+ if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
+
+ if (s->mode == 'w') {
+#ifdef NO_GZCOMPRESS
+ err = Z_STREAM_ERROR;
+#else
+#if _PACKAGE_ast
+ s->nocrc = 0;
+#endif
+ err = deflateInit2(&(s->stream), level,
+ Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);
+ /* windowBits is passed < 0 to suppress zlib header */
+
+ s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
+#endif
+ if (err != Z_OK || s->outbuf == Z_NULL) {
+ return destroy(s), (gzFile)Z_NULL;
+ }
+ } else {
+ s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
+
+ err = inflateInit2(&(s->stream), -MAX_WBITS);
+ /* windowBits is passed < 0 to tell that there is no zlib header.
+ * Note that in this case inflate *requires* an extra "dummy" byte
+ * after the compressed stream in order to complete decompression and
+ * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are
+ * present after the compressed stream.
+ */
+ if (err != Z_OK || s->inbuf == Z_NULL) {
+ return destroy(s), (gzFile)Z_NULL;
+ }
+ }
+ s->stream.avail_out = Z_BUFSIZE;
+
+ errno = 0;
+
+ if (!(s->file = fp) && !(s->file = F_OPEN(path, fmode))) {
+ return destroy(s), (gzFile)Z_NULL;
+ }
+ if (s->mode == 'w') {
+ /* Write a very simple .gz header:
+ */
+ fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
+ Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
+ s->start = 10L;
+ /* We use 10L instead of ftell(s->file) to because ftell causes an
+ * fflush on some systems. This version of the library doesn't use
+ * start anyway in write mode, so this initialization is not
+ * necessary.
+ */
+ } else {
+#if _PACKAGE_ast
+ sfsetbuf(s->file, (void*)s->file, SF_UNBOUND);
+#endif
+ check_header(s); /* skip the .gz header */
+ s->start = (z_off_t)(ftell(s->file) - s->stream.avail_in);
+ }
+
+ return (gzFile)s;
+}
+
+/* ===========================================================================
+ Associate a gzFile with the stdio stream fp.
+*/
+gzFile ZEXPORT gzfopen (fp, mode)
+ FILE* fp;
+ const char *mode;
+{
+ FILE* sp = (FILE*)fp;
+ char name[20];
+
+ if (!sp)
+ return (gzFile)Z_NULL;
+ sprintf(name, "<fd:%d>", fileno(sp)); /* for debugging */
+
+ return gz_open (name, mode, sp);
+}
+
+/* ===========================================================================
+ Read a byte from a gz_stream; update next_in and avail_in. Return EOF
+ for end of file.
+ IN assertion: the stream s has been sucessfully opened for reading.
+*/
+local int get_byte(s)
+ gz_stream *s;
+{
+ if (s->z_eof) return EOF;
+ if (s->stream.avail_in == 0) {
+ errno = 0;
+ s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
+ if (s->stream.avail_in == 0) {
+ s->z_eof = 1;
+ if (ferror(s->file)) s->z_err = Z_ERRNO;
+ return EOF;
+ }
+ s->stream.next_in = s->inbuf;
+ }
+ s->stream.avail_in--;
+ return *(s->stream.next_in)++;
+}
+
+/* ===========================================================================
+ Check the gzip header of a gz_stream opened for reading. Set the stream
+ mode to transparent if the gzip magic header is not present; set s->err
+ to Z_DATA_ERROR if the magic header is present but the rest of the header
+ is incorrect.
+ IN assertion: the stream s has already been created sucessfully;
+ s->stream.avail_in is zero for the first time, but may be non-zero
+ for concatenated .gz files.
+*/
+local void check_header(s)
+ gz_stream *s;
+{
+ int method; /* method byte */
+ int flags; /* flags byte */
+ uInt len;
+ int c;
+
+#if _PACKAGE_ast
+ if (!s->verified)
+ for (len = 0; len < 2; len++) {
+ c = get_byte(s);
+ if (c != gz_magic[len]) {
+ if (len != 0) s->stream.avail_in++, s->stream.next_in--;
+ if (c != EOF) {
+ s->stream.avail_in++, s->stream.next_in--;
+ s->transparent = 1;
+ }
+ s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END;
+ return;
+ }
+ }
+#else
+ /* Assure two bytes in the buffer so we can peek ahead -- handle case
+ where first byte of header is at the end of the buffer after the last
+ gzip segment */
+ len = s->stream.avail_in;
+ if (len < 2) {
+ if (len) s->inbuf[0] = s->stream.next_in[0];
+ errno = 0;
+ len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file);
+ if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO;
+ s->stream.avail_in += len;
+ s->stream.next_in = s->inbuf;
+ if (s->stream.avail_in < 2) {
+ s->transparent = s->stream.avail_in;
+ return;
+ }
+ }
+
+ /* Peek ahead to check the gzip magic header */
+ if (s->stream.next_in[0] != gz_magic[0] ||
+ s->stream.next_in[1] != gz_magic[1]) {
+ s->transparent = 1;
+ return;
+ }
+ s->stream.avail_in -= 2;
+ s->stream.next_in += 2;
+#endif
+
+ /* Check the rest of the gzip header */
+ method = get_byte(s);
+ flags = get_byte(s);
+ if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
+ s->z_err = Z_DATA_ERROR;
+ return;
+ }
+
+ /* Discard time, xflags and OS code: */
+ for (len = 0; len < 6; len++) (void)get_byte(s);
+
+ if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
+ len = (uInt)get_byte(s);
+ len += ((uInt)get_byte(s))<<8;
+ /* len is garbage if EOF but the loop below will quit anyway */
+ while (len-- != 0 && get_byte(s) != EOF) ;
+ }
+ if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
+ while ((c = get_byte(s)) != 0 && c != EOF) ;
+ }
+ if ((flags & COMMENT) != 0) { /* skip the .gz file comment */
+ while ((c = get_byte(s)) != 0 && c != EOF) ;
+ }
+ if ((flags & HEAD_CRC) != 0) { /* skip the header crc */
+ for (len = 0; len < 2; len++) (void)get_byte(s);
+ }
+ s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
+}
+
+ /* ===========================================================================
+ * Cleanup then free the given gz_stream. Return a zlib error code.
+ Try freeing in the reverse order of allocations.
+ */
+local int destroy (s)
+ gz_stream *s;
+{
+ int err = Z_OK;
+
+ if (!s) return Z_STREAM_ERROR;
+
+ TRYFREE(s->msg);
+
+ if (s->stream.state != NULL) {
+ if (s->mode == 'w') {
+#ifdef NO_GZCOMPRESS
+ err = Z_STREAM_ERROR;
+#else
+ err = deflateEnd(&(s->stream));
+#endif
+ } else if (s->mode == 'r') {
+ err = inflateEnd(&(s->stream));
+ }
+ }
+#if _PACKAGE_ast
+ if (s->file != NULL && (s->noclose ? (s->mode == 'r' ? 0 : fflush(s->file)) : fclose(s->file))) {
+#else
+ if (s->file != NULL && fclose(s->file)) {
+#endif
+#ifdef ESPIPE
+ if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */
+#endif
+ err = Z_ERRNO;
+ }
+ if (s->z_err < 0) err = s->z_err;
+
+ TRYFREE(s->inbuf);
+ TRYFREE(s->outbuf);
+ TRYFREE(s->path);
+ TRYFREE(s);
+ return err;
+}
+
+/* ===========================================================================
+ Reads the given number of uncompressed bytes from the compressed file.
+ gzread returns the number of bytes actually read (0 for end of file).
+*/
+int ZEXPORT gzread (file, buf, len)
+ gzFile file;
+ voidp buf;
+ unsigned len;
+{
+ gz_stream *s = (gz_stream*)file;
+ Bytef *start = (Bytef*)buf; /* starting point for crc computation */
+ Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */
+
+ if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
+
+ if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
+ if (s->z_err == Z_STREAM_END) return 0; /* EOF */
+
+ next_out = (Byte*)buf;
+ s->stream.next_out = (Bytef*)buf;
+ s->stream.avail_out = len;
+
+ if (s->stream.avail_out && s->back != EOF) {
+ *next_out++ = s->back;
+ s->stream.next_out++;
+ s->stream.avail_out--;
+ s->back = EOF;
+ s->out++;
+ start++;
+ if (s->last) {
+ s->z_err = Z_STREAM_END;
+ return 1;
+ }
+ }
+
+ while (s->stream.avail_out != 0) {
+
+ if (s->transparent) {
+ /* Copy first the lookahead bytes: */
+ uInt n = s->stream.avail_in;
+ if (n > s->stream.avail_out) n = s->stream.avail_out;
+ if (n > 0) {
+ zmemcpy(s->stream.next_out, s->stream.next_in, n);
+ next_out += n;
+ s->stream.next_out = next_out;
+ s->stream.next_in += n;
+ s->stream.avail_out -= n;
+ s->stream.avail_in -= n;
+ }
+ if (s->stream.avail_out > 0) {
+ s->stream.avail_out -=
+ (uInt)fread(next_out, 1, s->stream.avail_out, s->file);
+ }
+ len -= s->stream.avail_out;
+ s->in += len;
+ s->out += len;
+ if (len == 0) s->z_eof = 1;
+ return (int)len;
+ }
+ if (s->stream.avail_in == 0 && !s->z_eof) {
+
+ errno = 0;
+ s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
+ if (s->stream.avail_in == 0) {
+ s->z_eof = 1;
+ if (ferror(s->file)) {
+ s->z_err = Z_ERRNO;
+ break;
+ }
+ }
+ s->stream.next_in = s->inbuf;
+ }
+ s->in += s->stream.avail_in;
+ s->out += s->stream.avail_out;
+ s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
+ s->in -= s->stream.avail_in;
+ s->out -= s->stream.avail_out;
+
+ if (s->z_err == Z_STREAM_END) {
+ /* Check CRC and original size */
+#if _PACKAGE_ast
+ if (!s->nocrc)
+#endif
+ s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
+ start = s->stream.next_out;
+
+#if _PACKAGE_ast
+ if (getLong(s) != s->crc && !s->nocrc) {
+#else
+ if (getLong(s) != s->crc) {
+#endif
+ s->z_err = Z_DATA_ERROR;
+ } else {
+ (void)getLong(s);
+ /* The uncompressed length returned by above getlong() may be
+ * different from s->out in case of concatenated .gz files.
+ * Check for such files:
+ */
+ check_header(s);
+ if (s->z_err == Z_OK) {
+ inflateReset(&(s->stream));
+#if _PACKAGE_ast
+ if (!s->nocrc)
+#endif
+ s->crc = crc32(0L, Z_NULL, 0);
+#if _PACKAGE_ast
+ else
+ s->z_err = Z_STREAM_END;
+#endif
+ }
+ }
+ }
+ if (s->z_err != Z_OK || s->z_eof) break;
+ }
+#if _PACKAGE_ast
+ if (!s->nocrc)
+#endif
+ s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
+
+ if (len == s->stream.avail_out &&
+ (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO))
+ return -1;
+ return (int)(len - s->stream.avail_out);
+}
+
+/* ===========================================================================
+ Reads a long in LSB order from the given gz_stream. Sets z_err in case
+ of error.
+*/
+local uLong getLong (s)
+ gz_stream *s;
+{
+ uLong x = (uLong)get_byte(s);
+ int c;
+
+ x += ((uLong)get_byte(s))<<8;
+ x += ((uLong)get_byte(s))<<16;
+ c = get_byte(s);
+ if (c == EOF) s->z_err = Z_DATA_ERROR;
+ x += ((uLong)c)<<24;
+ return x;
+}
+
+#endif /* _GZIO_C */
+
+#endif /* _GUNZIP_H */
+
+#undef local
+
+#ifndef _RATZ_C
+#define _RATZ_C 1
+
+#include <sys/stat.h>
+
+#ifndef S_IRUSR
+#define S_IRUSR 0400
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR 0200
+#endif
+#ifndef S_IXUSR
+#define S_IXUSR 0100
+#endif
+#ifndef S_IRGRP
+#define S_IRGRP 0040
+#endif
+#ifndef S_IWGRP
+#define S_IWGRP 0020
+#endif
+#ifndef S_IXGRP
+#define S_IXGRP 0010
+#endif
+#ifndef S_IROTH
+#define S_IROTH 0004
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH 0002
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH 0001
+#endif
+
+/*
+ * Standard Archive Format
+ * USTAR - Uniform Standard Tape ARchive
+ */
+
+#define TBLOCK 512
+#define NAMSIZ 100
+#define PFXSIZ 155
+
+#define TMODLEN 8
+#define TUIDLEN 8
+#define TGIDLEN 8
+#define TSIZLEN 12
+#define TMTMLEN 12
+#define TCKSLEN 8
+
+#define TMAGIC "ustar" /* ustar and a null */
+#define TMAGLEN 6
+#define TVERSION "00" /* 00 and no null */
+#define TVERSLEN 2
+#define TUNMLEN 32
+#define TGNMLEN 32
+#define TDEVLEN 8
+#define TPADLEN 12
+
+/*
+ * values used in typeflag field
+ */
+
+#define REGTYPE '0' /* regular file */
+#define AREGTYPE 0 /* alternate REGTYPE */
+#define LNKTYPE '1' /* hard link */
+#define SYMTYPE '2' /* soft link */
+#define CHRTYPE '3' /* character special */
+#define BLKTYPE '4' /* block special */
+#define DIRTYPE '5' /* directory */
+#define FIFOTYPE '6' /* FIFO special */
+#define CONTTYPE '7' /* reserved */
+#define SOKTYPE '8' /* socket -- reserved */
+#define VERTYPE 'V' /* version -- reserved */
+#define EXTTYPE 'x' /* extended header -- reserved */
+
+/*
+ * bits used in mode field
+ */
+
+#define TSUID 04000 /* set uid on exec */
+#define TSGID 02000 /* set gid on exec */
+#define TSVTX 01000 /* sticky bit -- reserved */
+
+/*
+ * file permissions
+ */
+
+#define TUREAD 00400 /* read by owner */
+#define TUWRITE 00200 /* write by owner */
+#define TUEXEC 00100 /* execute by owner */
+#define TGREAD 00040 /* read by group */
+#define TGWRITE 00020 /* execute by group */
+#define TGEXEC 00010 /* write by group */
+#define TOREAD 00004 /* read by other */
+#define TOWRITE 00002 /* write by other */
+#define TOEXEC 00001 /* execute by other */
+
+#define TAR_SUMASK ((1L<<(TCKSLEN-1)*3)-1)
+
+typedef struct
+{
+ char name[NAMSIZ];
+ char mode[TMODLEN];
+ char uid[TUIDLEN];
+ char gid[TGIDLEN];
+ char size[TSIZLEN];
+ char mtime[TMTMLEN];
+ char chksum[TCKSLEN];
+ char typeflag;
+ char linkname[NAMSIZ];
+ char magic[TMAGLEN];
+ char version[TVERSLEN];
+ char uname[TUNMLEN];
+ char gname[TGNMLEN];
+ char devmajor[TDEVLEN];
+ char devminor[TDEVLEN];
+ char prefix[PFXSIZ];
+ char pad[TPADLEN];
+} Header_t;
+
+static struct
+{
+ char* id;
+ unsigned long blocks;
+ unsigned long files;
+} state;
+
+#if !_PACKAGE_ast
+
+static void
+usage()
+{
+#if defined(_SEAR_EXEC) || defined(_SEAR_SEEK)
+ fprintf(stderr, "Usage: %s [-ciklmntvV] [ [no]name[=value] ... ]\n", state.id);
+#else
+ fprintf(stderr, "Usage: %s [-clmntvV] < input.tgz\n", state.id);
+#endif
+ exit(2);
+}
+
+#endif
+
+/*
+ * the X/Open dd EBCDIC table
+ */
+
+static const unsigned char a2e[] =
+{
+ 0000,0001,0002,0003,0067,0055,0056,0057,
+ 0026,0005,0045,0013,0014,0015,0016,0017,
+ 0020,0021,0022,0023,0074,0075,0062,0046,
+ 0030,0031,0077,0047,0034,0035,0036,0037,
+ 0100,0132,0177,0173,0133,0154,0120,0175,
+ 0115,0135,0134,0116,0153,0140,0113,0141,
+ 0360,0361,0362,0363,0364,0365,0366,0367,
+ 0370,0371,0172,0136,0114,0176,0156,0157,
+ 0174,0301,0302,0303,0304,0305,0306,0307,
+ 0310,0311,0321,0322,0323,0324,0325,0326,
+ 0327,0330,0331,0342,0343,0344,0345,0346,
+ 0347,0350,0351,0255,0340,0275,0232,0155,
+ 0171,0201,0202,0203,0204,0205,0206,0207,
+ 0210,0211,0221,0222,0223,0224,0225,0226,
+ 0227,0230,0231,0242,0243,0244,0245,0246,
+ 0247,0250,0251,0300,0117,0320,0137,0007,
+ 0040,0041,0042,0043,0044,0025,0006,0027,
+ 0050,0051,0052,0053,0054,0011,0012,0033,
+ 0060,0061,0032,0063,0064,0065,0066,0010,
+ 0070,0071,0072,0073,0004,0024,0076,0341,
+ 0101,0102,0103,0104,0105,0106,0107,0110,
+ 0111,0121,0122,0123,0124,0125,0126,0127,
+ 0130,0131,0142,0143,0144,0145,0146,0147,
+ 0150,0151,0160,0161,0162,0163,0164,0165,
+ 0166,0167,0170,0200,0212,0213,0214,0215,
+ 0216,0217,0220,0152,0233,0234,0235,0236,
+ 0237,0240,0252,0253,0254,0112,0256,0257,
+ 0260,0261,0262,0263,0264,0265,0266,0267,
+ 0270,0271,0272,0273,0274,0241,0276,0277,
+ 0312,0313,0314,0315,0316,0317,0332,0333,
+ 0334,0335,0336,0337,0352,0353,0354,0355,
+ 0356,0357,0372,0373,0374,0375,0376,0377,
+};
+
+/*
+ * the X/Open dd IBM table
+ */
+
+static const unsigned char a2i[] =
+{
+ 0000,0001,0002,0003,0067,0055,0056,0057,
+ 0026,0005,0045,0013,0014,0015,0016,0017,
+ 0020,0021,0022,0023,0074,0075,0062,0046,
+ 0030,0031,0077,0047,0034,0035,0036,0037,
+ 0100,0132,0177,0173,0133,0154,0120,0175,
+ 0115,0135,0134,0116,0153,0140,0113,0141,
+ 0360,0361,0362,0363,0364,0365,0366,0367,
+ 0370,0371,0172,0136,0114,0176,0156,0157,
+ 0174,0301,0302,0303,0304,0305,0306,0307,
+ 0310,0311,0321,0322,0323,0324,0325,0326,
+ 0327,0330,0331,0342,0343,0344,0345,0346,
+ 0347,0350,0351,0255,0340,0275,0137,0155,
+ 0171,0201,0202,0203,0204,0205,0206,0207,
+ 0210,0211,0221,0222,0223,0224,0225,0226,
+ 0227,0230,0231,0242,0243,0244,0245,0246,
+ 0247,0250,0251,0300,0117,0320,0241,0007,
+ 0040,0041,0042,0043,0044,0025,0006,0027,
+ 0050,0051,0052,0053,0054,0011,0012,0033,
+ 0060,0061,0032,0063,0064,0065,0066,0010,
+ 0070,0071,0072,0073,0004,0024,0076,0341,
+ 0101,0102,0103,0104,0105,0106,0107,0110,
+ 0111,0121,0122,0123,0124,0125,0126,0127,
+ 0130,0131,0142,0143,0144,0145,0146,0147,
+ 0150,0151,0160,0161,0162,0163,0164,0165,
+ 0166,0167,0170,0200,0212,0213,0214,0215,
+ 0216,0217,0220,0232,0233,0234,0235,0236,
+ 0237,0240,0252,0253,0254,0255,0256,0257,
+ 0260,0261,0262,0263,0264,0265,0266,0267,
+ 0270,0271,0272,0273,0274,0275,0276,0277,
+ 0312,0313,0314,0315,0316,0317,0332,0333,
+ 0334,0335,0336,0337,0352,0353,0354,0355,
+ 0356,0357,0372,0373,0374,0375,0376,0377,
+};
+
+/*
+ * the mvs OpenEdition EBCDIC table
+ */
+
+static const unsigned char a2o[] =
+{
+ 0000,0001,0002,0003,0067,0055,0056,0057,
+ 0026,0005,0025,0013,0014,0015,0016,0017,
+ 0020,0021,0022,0023,0074,0075,0062,0046,
+ 0030,0031,0077,0047,0034,0035,0036,0037,
+ 0100,0132,0177,0173,0133,0154,0120,0175,
+ 0115,0135,0134,0116,0153,0140,0113,0141,
+ 0360,0361,0362,0363,0364,0365,0366,0367,
+ 0370,0371,0172,0136,0114,0176,0156,0157,
+ 0174,0301,0302,0303,0304,0305,0306,0307,
+ 0310,0311,0321,0322,0323,0324,0325,0326,
+ 0327,0330,0331,0342,0343,0344,0345,0346,
+ 0347,0350,0351,0255,0340,0275,0137,0155,
+ 0171,0201,0202,0203,0204,0205,0206,0207,
+ 0210,0211,0221,0222,0223,0224,0225,0226,
+ 0227,0230,0231,0242,0243,0244,0245,0246,
+ 0247,0250,0251,0300,0117,0320,0241,0007,
+ 0040,0041,0042,0043,0044,0045,0006,0027,
+ 0050,0051,0052,0053,0054,0011,0012,0033,
+ 0060,0061,0032,0063,0064,0065,0066,0010,
+ 0070,0071,0072,0073,0004,0024,0076,0377,
+ 0101,0252,0112,0261,0237,0262,0152,0265,
+ 0273,0264,0232,0212,0260,0312,0257,0274,
+ 0220,0217,0352,0372,0276,0240,0266,0263,
+ 0235,0332,0233,0213,0267,0270,0271,0253,
+ 0144,0145,0142,0146,0143,0147,0236,0150,
+ 0164,0161,0162,0163,0170,0165,0166,0167,
+ 0254,0151,0355,0356,0353,0357,0354,0277,
+ 0200,0375,0376,0373,0374,0272,0256,0131,
+ 0104,0105,0102,0106,0103,0107,0234,0110,
+ 0124,0121,0122,0123,0130,0125,0126,0127,
+ 0214,0111,0315,0316,0313,0317,0314,0341,
+ 0160,0335,0336,0333,0334,0215,0216,0337,
+};
+
+/*
+ * ascii text vs. control
+ */
+
+static const unsigned char ascii_text[] =
+{
+ 0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+};
+
+static int
+block(fp, gz, buf)
+FILE* fp;
+gzFile gz;
+char* buf;
+{
+ int r;
+
+ if (gz)
+ r = gzread(gz, buf, sizeof(Header_t)) == sizeof(Header_t);
+ else
+ r = fread(buf, sizeof(Header_t), 1, fp) == 1;
+ if (r)
+ state.blocks++;
+ return r;
+}
+
+static int
+skip(fp, gz, buf, n)
+FILE* fp;
+gzFile gz;
+char* buf;
+unsigned long n;
+{
+ while (n > 0)
+ {
+ if (!block(fp, gz, buf))
+ {
+ fprintf(stderr, "%s: unexpected EOF\n", state.id);
+ return 1;
+ }
+ if (n <= sizeof(Header_t))
+ break;
+ n -= sizeof(Header_t);
+ }
+ return 0;
+}
+
+static unsigned long
+number(s)
+register char* s;
+{
+ unsigned long n = 0;
+
+ while (*s == ' ')
+ s++;
+ while (*s >= '0' && *s <= '7')
+ n = (n << 3) + (*s++ - '0');
+ return n;
+}
+
+#if defined(_SEAR_EXEC) || defined(_SEAR_SEEK)
+
+#ifndef PATH_MAX
+#define PATH_MAX 256
+#endif
+
+#define EXIT(n) return(sear_exec((char*)0,(char**)0,(char*)0,(n)))
+
+static int sear_stdin;
+static char* sear_tmp;
+static char sear_buf[PATH_MAX];
+
+static int
+sear_seek(off_t offset, int tmp)
+{
+ int n;
+ char cmd[PATH_MAX];
+
+ GetModuleFileName(NULL, cmd, sizeof(cmd));
+ sear_stdin = dup(0);
+ close(0);
+ if (open(cmd, O_BINARY|O_RDONLY) || lseek(0, offset, 0) != offset)
+ {
+ fprintf(stderr, "%s: %s: cannot seek to data offset\n", state.id, cmd);
+ return -1;
+ }
+ if (tmp)
+ {
+ if ((n = GetTempPath(sizeof(cmd), cmd)) <= 0 || n > sizeof(cmd))
+ {
+ fprintf(stderr, "%s: cannot determine temporary directory path\n", state.id);
+ return -1;
+ }
+ if (!GetTempFileName(cmd, "SEA", 0, sear_buf))
+ {
+ fprintf(stderr, "%s: cannot determine temporary file path\n", state.id);
+ return -1;
+ }
+ sear_tmp = sear_buf;
+ if (!DeleteFile(sear_tmp))
+ {
+ fprintf(stderr, "%s: %s: cannot initialize temporary directory\n", state.id, sear_tmp);
+ return -1;
+ }
+ if (!CreateDirectory(sear_tmp, NULL))
+ {
+ fprintf(stderr, "%s: %s: cannot create temporary directory\n", state.id, sear_tmp);
+ return -1;
+ }
+ if (!SetCurrentDirectory(sear_tmp))
+ {
+ fprintf(stderr, "%s: %s: cannot cd to temporary directory\n", state.id, sear_tmp);
+ return -1;
+ }
+ }
+ return 0;
+}
+
+/*
+ * remove dir and its subdirs
+ */
+
+static void
+sear_rm_r(char* dir)
+{
+ WIN32_FIND_DATA info;
+ HANDLE hp;
+
+ if (!SetCurrentDirectory(dir))
+ return;
+ if ((hp = FindFirstFile("*.*", &info)) != INVALID_HANDLE_VALUE)
+ {
+ do
+ {
+ if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
+ {
+ if (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
+ SetFileAttributes(info.cFileName, info.dwFileAttributes & ~FILE_ATTRIBUTE_READONLY);
+ DeleteFile(info.cFileName);
+ }
+ else if (info.cFileName[0] != '.' || info.cFileName[1] != 0 && (info.cFileName[1] != '.' || info.cFileName[2] != 0))
+ sear_rm_r(info.cFileName);
+ } while(FindNextFile(hp, &info));
+ FindClose(hp);
+ }
+ if (SetCurrentDirectory(".."))
+ RemoveDirectory(dir);
+}
+
+/*
+ * system(3) without PATH search that should work on all windows variants
+ */
+
+static int
+sear_system(const char* command, int nowindow)
+{
+ PROCESS_INFORMATION pinfo;
+ STARTUPINFO sinfo;
+ char* cp;
+ char path[PATH_MAX];
+ int n = *command == '"';
+ DWORD flags = NORMAL_PRIORITY_CLASS;
+
+ strncpy(path, &command[n], PATH_MAX - 4);
+ n = n ? '"' : ' ';
+ for (cp = path; *cp; *cp++)
+ if (*cp == n)
+ break;
+ *cp = 0;
+ if (GetFileAttributes(path) == 0xffffffff && GetLastError() == ERROR_FILE_NOT_FOUND)
+ strcpy(cp, ".exe");
+ ZeroMemory(&sinfo, sizeof(sinfo));
+ if (nowindow)
+ flags |= CREATE_NO_WINDOW;
+ if (!CreateProcess(path, (char*)command, 0, 0, TRUE, flags, NULL, NULL, &sinfo, &pinfo))
+ n = GetLastError() == ERROR_FILE_NOT_FOUND ? 127 : 126;
+ else
+ {
+ CloseHandle(pinfo.hThread);
+ WaitForSingleObject(pinfo.hProcess, INFINITE);
+ if (!GetExitCodeProcess(pinfo.hProcess, &n))
+ n = 1;
+ CloseHandle(pinfo.hProcess);
+ Sleep(2 * 1000);
+ }
+ return n;
+}
+
+/*
+ * copy t to f but no farther than e
+ * next t returned
+ */
+
+static char*
+copy(char* t, const char* f, char* e)
+{
+ while (t < e && *f)
+ *t++ = *f++;
+ return t;
+}
+
+/*
+ * execute cmd, chdir .., and remove sear_tmp
+ */
+
+static int
+sear_exec(const char* cmd, char* const* arg, char* operands, int code)
+{
+ const char* a;
+ char* b;
+ char* e;
+ int r;
+ int sh;
+ int nowindow;
+ char buf[1024];
+
+ fflush(stdout);
+ fflush(stderr);
+ if (sear_tmp)
+ {
+ close(0);
+ dup(sear_stdin);
+ close(sear_stdin);
+ nowindow = 0;
+ if (cmd)
+ {
+ if (arg)
+ for (r = 0; arg[r]; r++)
+ if (!strcmp(arg[r], "remote"))
+ {
+ nowindow = 1;
+ break;
+ }
+ sh = 0;
+ for (a = cmd; *a && *a != ' '; a++)
+ if (a[0] == '.' && a[1] == 's' && a[2] == 'h' && (!a[3] || a[3] == ' '))
+ {
+ sh = 1;
+ break;
+ }
+ b = buf;
+ e = buf + sizeof(buf) - 1;
+ if (sh || arg)
+ {
+ if (sh)
+ {
+ b = copy(b, "ksh.exe ", e);
+ if (*cmd && *cmd != '/')
+ b = copy(b, "./", e);
+ }
+ b = copy(b, cmd, e);
+ while (a = *arg++)
+ {
+ if ((e - b) < 3)
+ break;
+ b = copy(b, " \"", e);
+ b = copy(b, a, e);
+ b = copy(b, "\"", e);
+ }
+ }
+ if (operands)
+ {
+ if (b == buf)
+ b = copy(b, cmd, e);
+ b = copy(b, " -- ", e);
+ b = copy(b, operands, e);
+ }
+ if (b > buf)
+ {
+ *b = 0;
+ cmd = (const char*)buf;
+ }
+ r = sear_system(cmd, nowindow);
+ }
+ else
+ r = code;
+ if (code >= 0)
+ sear_rm_r(sear_tmp);
+ }
+ else
+ r = cmd ? 0 : code;
+ return r;
+}
+
+#else
+
+#define EXIT(n) return(n)
+
+#endif
+
+int
+main(argc, argv)
+int argc;
+char** argv;
+{
+ register int c;
+ register char* s;
+ register char* t;
+ register char* e;
+ unsigned long n;
+ unsigned long m;
+ const unsigned char* a2x;
+ int clear;
+ int list;
+ int local;
+ int meter;
+ int unzip;
+ int verbose;
+ unsigned int mode;
+ unsigned long total;
+ off_t pos;
+ gzFile gz;
+ FILE* fp;
+ Header_t header;
+ unsigned char num[4];
+ char path[sizeof(header.prefix) + sizeof(header.name) + 4];
+ char buf[sizeof(header)];
+#if defined(_SEAR_OPTS)
+ char* opts[4];
+#endif
+
+#if defined(_SEAR_EXEC) || defined(_SEAR_SEEK)
+ int install = 1;
+#endif
+
+ setmode(0, O_BINARY);
+ setmode(1, O_BINARY);
+ clear = 0;
+ list = 0;
+ local = 0;
+ meter = 0;
+ unzip = 0;
+ verbose = 0;
+ if (s = *argv)
+ {
+ t = s;
+ while (*s)
+ if (*s++ == '/')
+ t = s;
+ if (!strcmp(t, "gunzip"))
+ unzip = 1;
+ state.id = t;
+ }
+ else
+ state.id = "ratz";
+ switch ('~')
+ {
+ case 0241:
+ switch ('\n')
+ {
+ case 0025:
+ a2x = a2o;
+ break;
+ default:
+ a2x = a2e;
+ break;
+ }
+ break;
+ case 0137:
+ a2x = a2i;
+ break;
+ default:
+ a2x = 0;
+ break;
+ }
+#if defined(_SEAR_OPTS)
+ opts[0] = argv[0];
+ opts[1] = _SEAR_OPTS;
+ opts[2] = argv[1];
+ opts[3] = 0;
+ argv = opts;
+#endif
+#if _PACKAGE_ast
+ error_info.id = state.id;
+ for (;;)
+ {
+ switch (optget(argv, usage))
+ {
+ case 'c':
+ unzip = 1;
+ continue;
+#if defined(_SEAR_EXEC) || defined(_SEAR_SEEK)
+ case 'i':
+ install = 0;
+ continue;
+ case 'k':
+ install = -1;
+ continue;
+#endif
+ case 'l':
+ local = 1;
+ continue;
+ case 'm':
+ meter = 1;
+ continue;
+ case 'n':
+ a2x = 0;
+ continue;
+ case 't':
+ list = 1;
+ continue;
+ case 'v':
+ verbose = 1;
+ continue;
+ case 'V':
+ sfprintf(sfstdout, "%s\n", id + 10);
+ return 0;
+ case '?':
+ error(ERROR_USAGE|4, "%s", opt_info.arg);
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ continue;
+ }
+ break;
+ }
+ if (error_info.errors)
+ error(ERROR_USAGE|4, "%s", optusage(NiL));
+ argv += opt_info.index;
+#else
+ while ((s = *++argv) && *s == '-' && *(s + 1))
+ {
+ if (*(s + 1) == '-')
+ {
+ if (!*(s + 2))
+ {
+ argv++;
+ break;
+ }
+ usage();
+ break;
+ }
+ for (;;)
+ {
+ switch (c = *++s)
+ {
+ case 0:
+ break;
+ case 'c':
+ unzip = 1;
+ continue;
+#if defined(_SEAR_EXEC) || defined(_SEAR_SEEK)
+ case 'i':
+ install = 0;
+ continue;
+ case 'k':
+ install = -1;
+ continue;
+#endif
+ case 'l':
+ local = 1;
+ continue;
+ case 'm':
+ meter = 1;
+ continue;
+ case 'n':
+ a2x = 0;
+ continue;
+ case 't':
+ list = 1;
+ continue;
+ case 'v':
+ verbose = 1;
+ continue;
+ case 'V':
+ fprintf(stdout, "%s\n", id + 10);
+ return 0;
+ default:
+ fprintf(stderr, "%s: -%c: unknown option\n", state.id, c);
+ /*FALLTHROUGH*/
+ case '?':
+ usage();
+ break;
+ }
+ break;
+ }
+ }
+#endif
+
+#if defined(_SEAR_SEEK)
+ if (sear_seek((off_t)_SEAR_SEEK, install && !list))
+ {
+ Sleep(2 * 1000);
+ return 1;
+ }
+#endif
+
+ /*
+ * commit on the first gzip magic char
+ */
+
+ if ((c = getchar()) == EOF)
+ EXIT(0);
+ ungetc(c, stdin);
+ if (c != gz_magic[0])
+ gz = 0;
+ else if (!(gz = gzfopen(stdin, FOPEN_READ)))
+ {
+ fprintf(stderr, "%s: gunzip open error\n", state.id);
+ EXIT(1);
+ }
+ if (unzip)
+ {
+ if (!gz)
+ {
+ fprintf(stderr, "%s: not a gzip file\n", state.id);
+ EXIT(1);
+ }
+ while ((c = gzread(gz, buf, sizeof(buf))) > 0)
+ if (fwrite(buf, c, 1, stdout) != 1)
+ {
+ fprintf(stderr, "%s: write error\n", state.id);
+ EXIT(1);
+ }
+ if (c < 0)
+ {
+ fprintf(stderr, "%s: read error\n", state.id);
+ EXIT(1);
+ }
+ if (fflush(stdout))
+ {
+ fprintf(stderr, "%s: flush error\n", state.id);
+ EXIT(1);
+ }
+ EXIT(0);
+ }
+ if (meter)
+ {
+ if ((pos = lseek(0, (off_t)0, SEEK_CUR)) < 0)
+ meter = 0;
+ else
+ {
+ if (lseek(0, (off_t)(-4), SEEK_END) < 0 || read(0, num, 4) != 4)
+ meter = 0;
+ else if (!(total = ((num[0]|(num[1]<<8)|(num[2]<<16)|(num[3]<<24)) + sizeof(Header_t) - 1) / sizeof(Header_t)))
+ total = 1;
+ lseek(0, pos, SEEK_SET);
+ }
+ }
+
+ /*
+ * loop on all the header blocks
+ */
+
+ while (block(stdin, gz, (char*)&header))
+ {
+ /*
+ * last 2 blocks are NUL
+ */
+
+ if (!*header.name)
+ break;
+
+ /*
+ * verify the checksum
+ */
+
+ s = header.chksum;
+ e = header.chksum + sizeof(header.chksum);
+ if (a2x)
+ {
+ for (; s < e; s++)
+ *s = a2x[*(unsigned char*)s];
+ s = header.chksum;
+ }
+ n = number(s) & TAR_SUMASK;
+ while (s < e)
+ *s++ = 040;
+ m = 0;
+ s = (char*)&header;
+ e = (char*)&header + sizeof(header);
+ while (s < e)
+ m += *(unsigned char*)s++;
+ m &= TAR_SUMASK;
+ if (m != n)
+ {
+ if (state.files)
+ fprintf(stderr, "%s: archive corrupted\n", state.id);
+ else
+ fprintf(stderr, "%s: not a tar archive\n", state.id);
+ fprintf(stderr, "check sum %lu != %lu\n", m, n);
+ EXIT(1);
+ }
+
+ /*
+ * convert to the native charset
+ */
+
+ if (a2x)
+ for (e = (s = (char*)&header) + sizeof(header); s < e; s++)
+ *s = a2x[*(unsigned char*)s];
+
+ /*
+ * get the pathname, type and size
+ */
+
+ state.files++;
+ t = path;
+ if (!strncmp(header.magic, TMAGIC, sizeof(header.magic)) && *header.prefix)
+ {
+ s = header.prefix;
+ e = header.prefix + sizeof(header.prefix);
+ while (s < e && (c = *s++))
+ *t++ = c;
+ *t++ = '/';
+ }
+ s = header.name;
+ e = header.name + sizeof(header.name);
+ while (s < e && (c = *s++))
+ *t++ = c;
+ *t = 0;
+
+ /*
+ * verify the dir prefix
+ */
+
+ t = 0;
+ s = path;
+ while (*s)
+ if (*s++ == '/')
+ t = s;
+ if (t)
+ {
+ *--t = 0;
+ if (!list && access(path, 0))
+ {
+ s = path;
+ do
+ {
+ if (!(c = *s) || c == '/')
+ {
+ *s = 0;
+ if (access(path, 0) && mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH))
+ {
+ fprintf(stderr, "%s: %s: cannot create directory\n", state.id, path);
+ EXIT(1);
+ }
+ *s = c;
+ }
+ } while (*s++);
+ }
+ if (*(t + 1))
+ *t = '/';
+ else
+ header.typeflag = DIRTYPE;
+ }
+
+ /*
+ * check for non-local paths
+ */
+
+ if (local && (path[0] == '/' || path[0] == '.' && path[1] == '.' && (!path[2] || path[2] == '/')))
+ {
+ fprintf(stderr, "%s: %s: non-local path rejected", state.id, path);
+ if ((header.typeflag == REGTYPE || header.typeflag == AREGTYPE) && (n = number(header.size)))
+ while (n > 0)
+ {
+ if (!block(stdin, gz, buf))
+ {
+ fprintf(stderr, "%s: unexpected EOF\n", state.id);
+ EXIT(1);
+ }
+ if (n <= sizeof(header))
+ break;
+ n -= sizeof(header);
+ }
+ continue;
+ }
+
+ /*
+ * create and grab the data
+ */
+
+ n = number(header.mode);
+ mode = 0;
+ if (n & TUREAD)
+ mode |= S_IRUSR;
+ if (n & TUWRITE)
+ mode |= S_IWUSR;
+ if (n & TUEXEC)
+ mode |= S_IXUSR;
+ if (n & TGREAD)
+ mode |= S_IRGRP;
+ if (n & TGWRITE)
+ mode |= S_IWGRP;
+ if (n & TGEXEC)
+ mode |= S_IXGRP;
+ if (n & TOREAD)
+ mode |= S_IROTH;
+ if (n & TOWRITE)
+ mode |= S_IWOTH;
+ if (n & TOEXEC)
+ mode |= S_IXOTH;
+ if (list || meter)
+ {
+ if (meter)
+ {
+ int i;
+ int j;
+ int k;
+ int n;
+ int p;
+ char bar[METER_parts + 1];
+
+ for (s = path; *s; s++)
+ if (s[0] == ' ' && s[1] == '-' && s[2] == '-' && s[3] == ' ')
+ break;
+ if (*s)
+ {
+ if (clear)
+ {
+ fprintf(stderr, "%*s", clear, "\r");
+ clear = 0;
+ }
+ fprintf(stderr, "\n%s\n\n", path);
+ }
+ else
+ {
+ n = (int)strlen(s = path);
+ p = (state.blocks * 100) / total;
+ if (n > (METER_width - METER_parts - 1))
+ {
+ s += n - (METER_width - METER_parts - 1);
+ n = METER_width - METER_parts - 1;
+ }
+ j = n + METER_parts + 2;
+ if (!clear)
+ clear = j + 5;
+ if ((k = clear - j - 5) < 0)
+ k = 0;
+ if ((i = (p / (100 / METER_parts))) >= sizeof(bar))
+ i = sizeof(bar) - 1;
+ n = 0;
+ while (n < i)
+ bar[n++] = '*';
+ while (n < sizeof(bar) - 1)
+ bar[n++] = ' ';
+ bar[n] = 0;
+ clear = fprintf(stderr, "%02d%% |%s| %s%*s", p, bar, s, k, "\r");
+ }
+ }
+ else
+ {
+ if (verbose)
+ {
+ switch (header.typeflag)
+ {
+ case REGTYPE:
+ case AREGTYPE:
+ c = '-';
+ break;
+ case DIRTYPE:
+ c = 'd';
+ break;
+ case LNKTYPE:
+ c = 'h';
+ break;
+ case SYMTYPE:
+ c = 'l';
+ break;
+ default:
+ c = '?';
+ break;
+ }
+ printf("%c", c);
+ m = 0400;
+ while (m)
+ {
+ printf("%c", (n & m) ? 'r' : '-');
+ m >>= 1;
+ printf("%c", (n & m) ? 'w' : '-');
+ m >>= 1;
+ printf("%c", (n & m) ? 'x' : '-');
+ m >>= 1;
+ }
+ printf(" %10lu ", number(header.size));
+ }
+ switch (header.typeflag)
+ {
+ case LNKTYPE:
+ printf("%s == %s\n", path, header.linkname);
+ break;
+ case SYMTYPE:
+ printf("%s => %s\n", path, header.linkname);
+ break;
+ default:
+ printf("%s\n", path);
+ break;
+ }
+ }
+ if (list)
+ {
+ if (skip(stdin, gz, buf, number(header.size)))
+ EXIT(1);
+ continue;
+ }
+ }
+ else if (verbose)
+ printf("%s\n", path);
+ switch (header.typeflag)
+ {
+ case REGTYPE:
+ case AREGTYPE:
+ while (!(fp = fopen(path, FOPEN_WRITE)))
+ if (unlink(path))
+ {
+ fprintf(stderr, "%s: warning: %s: cannot create file\n", state.id, path);
+ break;
+ }
+ n = number(header.size);
+ c = a2x ? 0 : -1;
+ while (n > 0)
+ {
+ if (!block(stdin, gz, buf))
+ {
+ fprintf(stderr, "%s: unexpected EOF\n", state.id);
+ EXIT(1);
+ }
+ switch (c)
+ {
+ case 0:
+ if ((m = n) < 4)
+ {
+ for (e = (s = buf) + m; s < e; s++)
+ if (a2x[*(unsigned char*)s] != '\n')
+ break;
+ }
+ else
+ {
+ if (m > 256)
+ m = 256;
+ for (e = (s = buf) + m; s < e; s++)
+ if (!ascii_text[*(unsigned char*)s])
+ break;
+ }
+ if (s < e)
+ {
+ c = -1;
+ break;
+ }
+ c = 1;
+ /*FALLTHROUGH*/
+ case 1:
+ for (e = (s = buf) + sizeof(header); s < e; s++)
+ *s = a2x[*(unsigned char*)s];
+ break;
+ }
+ if (fp && fwrite(buf, n > sizeof(header) ? sizeof(header) : n, 1, fp) != 1)
+ {
+ fprintf(stderr, "%s: %s: write error\n", state.id, path);
+ EXIT(1);
+ }
+ if (n <= sizeof(header))
+ break;
+ n -= sizeof(header);
+ }
+ if (fp && fclose(fp))
+ {
+ fprintf(stderr, "%s: %s: write error\n", state.id, path);
+ EXIT(1);
+ }
+ break;
+ case DIRTYPE:
+ if (access(path, 0) && mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH))
+ {
+ fprintf(stderr, "%s: %s: cannot create directory\n", state.id, path);
+ EXIT(1);
+ }
+ break;
+ case SYMTYPE:
+#if defined(S_IFLNK) || defined(S_ISLNK)
+ while (symlink(header.linkname, path))
+ if (unlink(path))
+ {
+ fprintf(stderr, "%s: %s: cannot symlink to %s\n", state.id, path, header.linkname);
+ EXIT(1);
+ }
+ continue;
+#endif
+#if !_WIN32 || _WINIX
+ case LNKTYPE:
+ while (link(header.linkname, path))
+ if (unlink(path))
+ {
+ fprintf(stderr, "%s: %s: cannot link to %s\n", state.id, path, header.linkname);
+ EXIT(1);
+ }
+ continue;
+#endif
+ default:
+ fprintf(stderr, "%s: %s: file type %c ignored\n", state.id, path, header.typeflag);
+ if (skip(stdin, gz, buf, number(header.size)))
+ EXIT(1);
+ continue;
+ }
+ if (chmod(path, mode))
+ fprintf(stderr, "%s: %s: cannot change mode to %03o\n", state.id, path, mode);
+ }
+ if (clear)
+ fprintf(stderr, "%*s", clear, "\r");
+ if (!state.files)
+ fprintf(stderr, "%s: warning: empty archive\n", state.id);
+ else if (verbose)
+ fprintf(stderr, "%lu file%s, %lu block%s\n", state.files, state.files == 1 ? "" : "s", state.blocks, state.blocks == 1 ? "" : "s");
+#if defined(_SEAR_EXEC)
+#if !defined(_SEAR_ARGS)
+#define _SEAR_ARGS 0
+#endif
+ if (install && sear_exec(_SEAR_EXEC, argv, _SEAR_ARGS, install))
+ {
+ Sleep(2 * 1000);
+ return 1;
+ }
+#endif
+ return 0;
+}
+
+#endif /* _RATZ_C */
diff --git a/usr/src/contrib/ast/src/cmd/INIT/regress.sh b/usr/src/contrib/ast/src/cmd/INIT/regress.sh
new file mode 100644
index 0000000000..5c5ab57a01
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/regress.sh
@@ -0,0 +1,1463 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: regress - run regression tests in command.tst
+
+command=regress
+case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in
+0123) USAGE=$'
+[-?
+@(#)$Id: regress (AT&T Research) 2012-02-02 $
+]
+'$USAGE_LICENSE$'
+[+NAME?regress - run regression tests]
+[+DESCRIPTION?\bregress\b runs the tests in \aunit\a, or
+ \aunit\a\b.tst\b if \aunit\a does not exist. If \acommand\a is omitted
+ then it is assumed to be the base name of \aunit\a. All testing is done
+ in the temporary directory \aunit\a\b.tmp\b.]
+[+?Default test output lists the \anumber\a and \adescription\a for
+ each active \bTEST\b group and the \anumber\a:\aline\a for each
+ individual \bEXEC\b test. Each test that fails results in a diagnostic
+ that contains the word \bFAILED\b; no other diagnostics contain this
+ word.]
+[b:ignore-space?Ignore space differences when comparing expected
+ output.]
+[i:pipe-input?Repeat each test with the standard input redirected through a
+ pipe.]
+[k:keep?Enable \bcore\b dumps, exit after the first test that fails,
+ and do not remove the temporary directory \aunit\a\b.tmp\b.]
+[l:local-fs?Force \aunit\a\b.tmp\b to be in a local filesystem.]
+[o:pipe-output?Repeat each test with the standard output redirected through
+ a pipe.]
+[p:pipe-io?Repeat each test with the standard input and standard output
+ redirected through pipes.]
+[q:quiet?Output information on \bFAILED\b tests only.]
+[r!:regular?Run each test with the standard input and standard output
+ redirected through regular files.]
+[t:test?Run only tests matching \apattern\a. Tests are numbered and
+ consist of at least two digits (0 filled if necessary.) Tests matching
+ \b+(0)\b are always run.]:[pattern]
+[x:trace?Enable debug tracing.]
+[v:verbose?List differences between actual (<) and expected (>) output,
+ errors and exit codes. Also disable long output line truncation.]
+
+unit [ command [ arg ... ] ]
+
+[+INPUT FILES?The regression test file \aunit\a\b.tst\b is a \bksh\b(1)
+ script that is executed in an environment with the following functions
+ defined:]
+ {
+ [+BODY \b{ ... }?Defines the test body; used for complex tests.]
+ [+CD \b\adirectory\a?Create and change to working directory for
+ one test.]
+ [+CLEANUP \b\astatus\a?Called at exit time to remove the
+ temporary directory \aunit\a\b.tmp\b, list the tests totals via
+ \bTALLY\b, and exit with status \astatus\a.]
+ [+COMMAND \b\aarg\a ...?Runs the current command under test with
+ \aarg\a ... appended to the default args.]
+ [+CONTINUE?The background job must be running.]
+ [+COPY \b\afrom to\a?Copy file \afrom\a to \ato\a. \afrom\a may
+ be a regular file or \bINPUT\b, \bOUTPUT\b or \bERROR\b. Post
+ test comparisons are still done for \afrom\a.]
+ [+DIAGNOSTICS \b[ \b1\b | \b0\b | \apattern\a ]]?No argument or an
+ argument of \b1\b declares that diagnostics are to expected for
+ the remainder of the current \bTEST\b; \b0\b reverts to the default
+ state that diagnostics are not expected; otherwise the argument
+ is a \bksh\b(1) pattern that must match the non-empty contents
+ of the standard error.]
+ [+DO \b\astatement\a?Defines additional statements to be executed
+ for the current test. \astatement\a may be a { ... } group.]
+ [+EMPTY \bINPUT|OUTPUT|ERROR|SAME?The corresponding file is
+ expected to be empty.]
+ [+ERROR \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The
+ standard error is expected to match either the contents
+ of \afile\a or the line \adata\a. \bERROR -n\b does not
+ append a newline to \adata\a. \afilter\a is a shell command
+ or pipeline that reads standard input and writes standard
+ output that is applied to ERROR before comparison with the
+ expected contents.]
+ [+EXEC \b[ \aarg\a ... ]]?Runs the command under test with
+ optional arguments. \bINPUT\b, \bOUTPUT\b, \bERROR\b, \bEXIT\b
+ and \bSAME\b calls following this \bEXEC\b up until the next
+ \bEXEC\b or the end of the script provide details for the
+ expected results. If no arguments are specified then the
+ arguments from the previious \bEXEC\b in the current \bTEST\b
+ group are used, or no arguments if this is the first \bEXEC\b
+ in the group.]
+ [+EXIT \b\astatus\a?The command exit status is expected to match
+ the pattern \astatus\a.]
+ [+EXITED?The background job must have exited.]
+ [+EXPORT \b[-]] \aname\a=\avalue\a ...?Export environment
+ variables for one test.]
+ [+FATAL \b\amessage\a ...?\amessage\a is printed on the standard
+ error and \bregress\b exits with status \b1\b.]
+ [+FIFO \bINPUT|OUTPUT|ERROR\b [ \b-n\b ]] \afile\a | - \adata\a ...?The
+ \bIO\B file is a fifo.]
+ [+IF \b\acommand\a [\anote\a]]?If the \bsh\b(1) \acommand\a exits
+ 0 then tests until the next \bELIF\b, \bELSE\b or \bFI\b are
+ enabled. Otherwise those tests are skipped. \bIF\b ... \bFI\b
+ may be nested, but must not cross \bTEST\b boundaries. \anote\a
+ is listed on the standard error if the correspoding test block
+ is enabled; \bIF\b, \bELIF\b, \bELSE\b may nave a \anote\a
+ operand.]
+ [+IGNORE \b\afile\a ...?\afile\a is ignored for subsequent result
+ comparisons. \afile\a may be \bOUTPUT\b or \bERROR\b.]
+ [+IGNORESPACE?Ignore space differences when comparing expected
+ output.]
+ [+INCLUDE \b\afile\a ...?One or more \afile\a operands are read
+ via the \bksh\b(1) \b.\b(1) command. \bVIEW\b is used to locate
+ the files.]
+ [+INFO \b\adescription\a?\adescription\a is printed on the
+ standard error.]
+ [+INITIALIZE?Called by \bregress\b to initialize a each
+ \bTEST\b group.]
+ [+INPUT \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The
+ standard input is set to either the contents of \afile\a
+ or the line \adata\a. \bINPUT -n\b does not append a newline
+ to \adata\a. \afilter\a is a shell command or pipeline that
+ reads standard input and writes standard output that is
+ applied to OUTPUT before comparison with the expected contents.]
+ [+INTRO?Called by \bregress\b to introduce all \bTEST\b
+ groups.]
+ [+IO \b[ \bFIFO\b | \bPIPE\b ]] \bINPUT|OUTPUT|ERROR\b [ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?Internal
+ support for the \bINPUT\b, \bOUTPUT\b and \bERROR\b functions.]
+ [+JOB \b\aop\a [ ... ]]?Like \bEXEC\b except the command is run
+ as a background job for the duration of the group or until it
+ is killed via \bKILL\b.]
+ [+KEEP \b\apattern\a ...?The temporary directory is cleared for
+ each test. Files matching \apattern\a are retained between
+ tests.]
+ [+KILL \b[ \asignal\a ]]?Kill the background job with \asignal\a
+ [ \bSIGKILL\b ]].]
+ [+MOVE \b\afrom to\a?Rename file \afrom\a to \ato\a. \afrom\a may
+ be a regular file or \bINPUT\b, \bOUTPUT\b or \bERROR\b. Post
+ test comparisons are ignored for \afrom\a.]
+ [+NOTE \b\acomment\a?\acomment\a is added to the current test
+ trace output.]
+ [+OUTPUT \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The
+ standard output is expected to match either the contents
+ of \afile\a or the line \adata\a. \bOUTPUT -n\b does not
+ append a newline to \adata\a. \afilter\a is a shell command
+ or pipeline that reads standard input and writes standard
+ output that is applied to ERROR before comparison with the
+ expected contents.]
+ [+PIPE \bINPUT|OUTPUT|ERROR\b [ \b-n\b ]] \afile\a | - \adata\a ...?The
+ \bIO\B file is a pipe.]
+ [+PROG \b\acommand\a [ \aarg\a ... ]]?\acommand\a is run with
+ optional arguments.]
+ [+REMOVE \b\afile\a ...?\afile\a ... are removed after the
+ current test is done.]
+ [+RUN?Called by \bregress\b to run the current test.]
+ [+SAME \b\anew old\a?\anew\a is expected to be the same as
+ \aold\a after the current test completes.]
+ [+SET \b[\bno\b]]\aname\a[=\avalue\a]]?Set the command line
+ option --\aname\a. The setting is in effect for all tests until
+ the next explicit \bSET\b.]
+ [+TALLY?Called by \bregress\b display the \bTEST\b results.]
+ [+TEST \b\anumber\a [ \adescription\a ... ]]?Define a new test
+ group labelled \anumber\a with optional \adescripion\a.]
+ [+TITLE \b[+]] \atext\a?Set the \bTEST\b output title to
+ \atext\a. If \b+\b is specified then \atext\a is appended to
+ the default title. The default title is the test file base
+ name, and, if different from the test file base name, the test
+ unit base name.]
+ [+TWD \b[ \adir\a ... ]]?Set the temporary test dir to \adir\a.
+ The default is \aunit\a\b.tmp\b, where \aunit\a is the test
+ input file sans directory and suffix. If \adir\a matches \b/*\b
+ then it is the directory name; if \adir\a is non-null then the
+ prefix \b${TMPDIR:-/tmp}\b is added; otherwise if \adir\a is
+ omitted then
+ \b${TMPDIR:-/tmp}/tst-\b\aunit\a-$$-$RANDOM.\b\aunit\a is
+ used.]
+ [+UMASK \b[ \amask\a ]]?Run subsequent tests with \bumask\b(1)
+ \amask\a. If \amask\a is omitted then the original \bumask\b is
+ used.]
+ [+UNIT \b\acommand\a [ \aarg\a ... ]]?Define the command and
+ optional default arguments to be tested. \bUNIT\b explicitly
+ overrides the default command name derived from the test script
+ file name. A \acommand\a operand with optional arguments
+ overrides the \bUNIT\b \acommand\a and arguments, with the
+ exception that if the \bUNIT\b \acommand\a is \b-\b or \b+\b
+ the \bUNIT\b arguments are appended to the operand or default
+ unit command and arguments.]
+ [+VIEW \b\avar\a [ \afile\a ]]?\avar\a is set to the full
+ pathname of \avar\a [ \afile\a ]] in the current \b$VPATH\b
+ view if defined.]
+ }
+[+SEE ALSO?\bnmake\b(1), \bksh\b(1)]
+'
+ ;;
+*) USAGE='ko:[[no]name[=value]]t:[test]v unit [path [arg ...]]'
+ ;;
+esac
+
+function FATAL # message
+{
+ print -r -u2 "$command: $*"
+ GROUP=FINI
+ exit 1
+}
+
+function EMPTY
+{
+ typeset i
+ typeset -n ARRAY=$1
+ for i in ${!ARRAY[@]}
+ do unset ARRAY[$i]
+ done
+}
+
+function INITIALIZE # void
+{
+ typeset i j
+ cd "$TWD"
+ case $KEEP in
+ "") RM *
+ ;;
+ *) for i in *
+ do case $i in
+ !($KEEP)) j="$j $i" ;;
+ esac
+ done
+ case $j in
+ ?*) RM $j ;;
+ esac
+ ;;
+ esac
+ : >INPUT >OUTPUT.ex >ERROR.ex
+ BODY=""
+ COPY=""
+ DIAGNOSTICS=""
+ DONE=""
+ ERROR=""
+ EXIT=0
+ IGNORE=""
+ INIT=""
+ INPUT=""
+ MOVE=""
+ OUTPUT=""
+ EMPTY FILE
+ EMPTY FILTER
+ EMPTY SAME
+ EMPTY TYPE
+}
+
+function INTRO
+{
+ typeset base command
+
+ if [[ ! $TEST_quiet ]]
+ then base=${REGRESS##*/}
+ base=${base%.tst}
+ command=${COMMAND##*/}
+ command=${command%' '*}
+ set -- $TITLE
+ TITLE=
+ case $1 in
+ ''|+) if [[ $command == $base ]]
+ then TITLE=$COMMAND
+ else TITLE="$COMMAND, $base"
+ fi
+ if (( $# ))
+ then shift
+ fi
+ ;;
+ esac
+ while (( $# ))
+ do if [[ $TITLE ]]
+ then TITLE="$TITLE, $1"
+ else TITLE="$1"
+ fi
+ shift
+ done
+ print -u2 "TEST $TITLE"
+ fi
+}
+
+function TALLY # extra message text
+{
+ typeset msg
+ case $GROUP in
+ INIT) ;;
+ *) msg="TEST $TITLE, $TESTS test"
+ case $TESTS in
+ 1) ;;
+ *) msg=${msg}s ;;
+ esac
+ msg="$msg, $ERRORS error"
+ case $ERRORS in
+ 1) ;;
+ *) msg=${msg}s ;;
+ esac
+ if (( $# ))
+ then msg="$msg, $*"
+ fi
+ print -u2 "$msg"
+ GROUP=INIT
+ TESTS=0
+ ERRORS=0
+ ;;
+ esac
+}
+
+function TITLE # text
+{
+ TITLE=$@
+}
+
+function UNWIND
+{
+ while (( COND > 1 ))
+ do print -r -u2 "$command: line $LINE: no matching FI for IF on line ${COND_LINE[COND]}"
+ (( COND-- ))
+ done
+ if (( COND > 0 ))
+ then (( COND = 0 ))
+ FATAL "line $LINE: no matching FI for IF on line ${COND_LINE[COND+1]}"
+ fi
+ if [[ $JOBPID ]]
+ then if [[ $JOBPID != 0 ]]
+ then kill -KILL $JOBPID 2>/dev/null
+ wait
+ fi
+ JOBPID=
+ fi
+ JOBSTATUS=
+ JOBOP=
+ wait
+}
+
+function CLEANUP # status
+{
+ typeset note
+
+ if [[ $GROUP != INIT ]]
+ then if [[ ! $TEST_keep ]]
+ then cd $SOURCE
+ if [[ $TEST_local ]]
+ then RM ${TEST_local}
+ fi
+ RM "$TWD"
+ fi
+ if (( $1 )) && [[ $GROUP != FINI ]]
+ then note=terminated
+ fi
+ fi
+ TALLY $note
+ [[ $TEST_keep ]] || UNWIND
+ exit $1
+}
+
+function RUN # [ op ]
+{
+ typeset i r=1
+ [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG
+#print -u2 AHA#$LINENO $0 GROUP=$GROUP ITEM=$ITEM FLUSHED=$FLUSHED JOBOP=$JOBOP
+ case $GROUP in
+ INIT) RM "$TWD"
+ if [[ $TEST_local ]]
+ then TEST_local=${TMPDIR:-/tmp}/rt-$$/${TWD##*/}
+ mkdir -p "$TEST_local" && ln -s "$TEST_local" "$TWD" || FATAL "$TWD": cannot create directory
+ TEST_local=${TEST_local%/*}
+ else mkdir "$TWD" || FATAL "$TWD": cannot create directory
+ fi
+ cd "$TWD"
+ TWD=$PWD
+ : > rmu
+ if rm -u rmu >/dev/null 2>&1
+ then TEST_rmu=-u
+ else rm rmu
+ fi
+ if [[ $UNIT ]]
+ then set -- "${ARGV[@]}"
+ case $1 in
+ ""|[-+]*)
+ UNIT $UNIT "${ARGV[@]}"
+ ;;
+ *) UNIT "${ARGV[@]}"
+ ;;
+ esac
+ fi
+ INTRO
+ ;;
+ FINI) ;;
+ $TEST_select)
+ if [[ $ITEM == $FLUSHED ]]
+ then return 0
+ fi
+ FLUSHED=$ITEM
+ if (( COND_SKIP[COND] ))
+ then return 1
+ fi
+ ((COUNT++))
+ if (( $ITEM <= $LASTITEM ))
+ then LABEL=$TEST#$COUNT
+ else LASTITEM=$ITEM
+ LABEL=$TEST:$ITEM
+ fi
+ TEST_file=""
+ exec >/dev/null
+ for i in $INPUT
+ do case " $OUTPUT " in
+ *" $i "*)
+ if [[ -f $i.sav ]]
+ then cp $i.sav $i
+ COMPARE="$COMPARE $i"
+ elif [[ -f $i ]]
+ then cp $i $i.sav
+ COMPARE="$COMPARE $i"
+ fi
+ ;;
+ esac
+ done
+ for i in $OUTPUT
+ do case " $COMPARE " in
+ *" $i "*)
+ ;;
+ *) COMPARE="$COMPARE $i"
+ ;;
+ esac
+ done
+ for i in $INIT
+ do $i $TEST INIT
+ done
+#print -u2 AHA#$LINENO $0 GROUP=$GROUP ITEM=$ITEM JOBOP=$JOBOP JOBPID=$JOBPID JOBSTATUS=$JOBSTATUS
+ if [[ $JOBPID != 0 && ( $JOBPID || $JOBSTATUS ) ]]
+ then if [[ ! $TEST_quiet ]]
+ then print -nu2 "$LABEL"
+ fi
+ RESULTS
+ elif [[ $BODY ]]
+ then SHOW=$NOTE
+ if [[ ! $TEST_quiet ]]
+ then print -r -u2 " $SHOW"
+ fi
+ for i in $BODY
+ do $i $TEST BODY
+ done
+ else SHOW=
+ if [[ ${TYPE[INPUT]} == PIPE ]]
+ then if [[ ${TYPE[OUTPUT]} == PIPE ]]
+ then if [[ ! $TEST_quiet ]]
+ then print -nu2 "$LABEL"
+ fi
+ cat <$TWD/INPUT | COMMAND "${ARGS[@]}" | cat >$TWD/OUTPUT
+ RESULTS 'pipe input'
+ else if [[ ! $TEST_quiet ]]
+ then print -nu2 "$LABEL"
+ fi
+ cat <$TWD/INPUT | COMMAND "${ARGS[@]}" >$TWD/OUTPUT
+ RESULTS 'pipe io'
+ fi
+ elif [[ ${TYPE[OUTPUT]} == PIPE ]]
+ then if [[ ! $TEST_quiet ]]
+ then print -nu2 "$LABEL"
+ fi
+ COMMAND "${ARGS[@]}" <$TWD/INPUT | cat >$TWD/OUTPUT
+ RESULTS 'pipe output'
+ else if [[ $TEST_regular ]]
+ then if [[ ! $TEST_quiet ]]
+ then print -nu2 "$LABEL"
+ fi
+ if [[ ${TYPE[INPUT]} == FIFO ]]
+ then COMMAND "${ARGS[@]}" >$TWD/OUTPUT
+ else COMMAND "${ARGS[@]}" <$TWD/INPUT >$TWD/OUTPUT
+ fi
+ RESULTS
+ fi
+ if [[ $TEST_pipe_input ]]
+ then if [[ ! $TEST_quiet ]]
+ then print -nu2 "$LABEL"
+ fi
+ (trap '' PIPE; cat <$TWD/INPUT 2>/dev/null; exit 0) | COMMAND "${ARGS[@]}" >$TWD/OUTPUT
+ STATUS=$?
+ RESULTS 'pipe input'
+ fi
+ if [[ $TEST_pipe_output ]]
+ then if [[ ! $TEST_quiet ]]
+ then print -nu2 "$LABEL"
+ fi
+ COMMAND "${ARGS[@]}" <$TWD/INPUT | cat >$TWD/OUTPUT
+ STATUS=$?
+ RESULTS 'pipe output'
+ fi
+ if [[ $TEST_pipe_io ]]
+ then if [[ ! $TEST_quiet ]]
+ then print -nu2 "$LABEL"
+ fi
+ (trap '' PIPE; cat <$TWD/INPUT 2>/dev/null; exit 0) | COMMAND "${ARGS[@]}" | cat >$TWD/OUTPUT
+ STATUS=$?
+ RESULTS 'pipe io'
+ fi
+ fi
+ set -- $COPY
+ COPY=""
+ while :
+ do case $# in
+ 0|1) break ;;
+ *) cp $1 $2 ;;
+ esac
+ shift 2
+ done
+ set -- $MOVE
+ MOVE=""
+ while (( $# > 1 ))
+ do mv $1 $2
+ shift 2
+ done
+ fi
+ for i in $DONE
+ do $i $TEST DONE $STATUS
+ done
+ COMPARE=""
+ r=0
+ ;;
+ esac
+ if [[ $COMMAND_ORIG ]]
+ then COMMAND=$COMMAND_ORIG
+ COMMAND_ORIG=
+ ARGS=(${ARGS_ORIG[@]})
+ fi
+ return $r
+}
+
+function DO # cmd ...
+{
+ [[ $GROUP == $TEST_select ]] || return 1
+ (( COND_SKIP[COND] )) && return 1
+ [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK
+ return 0
+}
+
+function UNIT # cmd arg ...
+{
+ typeset cmd=$1
+ case $cmd in
+ [-+]) shift
+ if (( UNIT_READONLY ))
+ then COMMAND="$COMMAND $*"
+ else #BUG# ARGV=("${ARGV[@]}" "$@")
+ set -- "${ARGV[@]}" "$@"
+ ARGV=("$@")
+ fi
+ return
+ ;;
+ esac
+ (( UNIT_READONLY )) && return
+ if [[ $UNIT ]] && (( $# <= 1 ))
+ then set -- "${ARGV[@]}"
+ case $1 in
+ "") set -- "$cmd" ;;
+ [-+]*) set -- "$cmd" "${ARGV[@]}" ;;
+ *) cmd=$1 ;;
+ esac
+ fi
+ UNIT=
+ COMMAND=$cmd
+ shift
+ typeset cmd=$(whence $COMMAND)
+ if [[ ! $cmd ]]
+ then FATAL $COMMAND: not found
+ elif [[ ! $cmd ]]
+ then FATAL $cmd: not found
+ fi
+ case $# in
+ 0) ;;
+ *) COMMAND="$COMMAND $*" ;;
+ esac
+}
+
+function TWD # [ dir ]
+{
+ case $1 in
+ '') TWD=${TWD##*/}; TWD=${TMPDIR:-/tmp}/tst-${TWD%.*}-$$-$RANDOM ;;
+ /*) TWD=$1 ;;
+ *) TWD=${TMPDIR:-/tmp}/$1 ;;
+ esac
+}
+
+function TEST # number description arg ...
+{
+ RUN
+ LINE=$TESTLINE
+ UNWIND
+ COUNT=0
+ LASTITEM=0
+ case $1 in
+ -) ((LAST++)); TEST=$LAST ;;
+ +([0123456789])) LAST=$1 TEST=$1 ;;
+ *) LAST=0${1/[!0123456789]/} TEST=$1 ;;
+ esac
+ NOTE=
+ if [[ ! $TEST_quiet && $TEST == $TEST_select ]] && (( ! COND_SKIP[COND] ))
+ then print -r -u2 "$TEST $2"
+ fi
+ unset ARGS
+ unset EXPORT
+ EXPORTS=0
+ TEST_file=""
+ if [[ $TEST != ${GROUP}* ]]
+ then GROUP=${TEST%%+([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ])}
+ if [[ $GROUP == $TEST_select ]] && (( ! COND_SKIP[COND] ))
+ then INITIALIZE
+ fi
+ fi
+ ((SUBTESTS=0))
+ [[ $TEST == $TEST_select ]] && (( ! COND_SKIP[COND] ))
+}
+
+function EXEC # arg ...
+{
+ if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] ))
+ then return
+ fi
+ if ((SUBTESTS++))
+ then RUN
+ fi
+ case $# in
+ 0) set -- "${ARGS[@]}" ;;
+ esac
+ ITEM=$LINE
+ NOTE="$(print -r -f '%q ' -- $COMMAND_ORIG "$@")${JOBPID:+&}"
+ ARGS=("$@")
+}
+
+function JOB # arg ...
+{
+ JOBPID=0
+ EXEC "$@"
+}
+
+function CONTINUE
+{
+ RUN || return
+ JOBOP=CONTINUE
+ ITEM=$LINE
+ NOTE="$(print -r -f '%q ' -- $JOBOP)"
+#print -u2 AHA#$LINENO JOBOP=$JOBOP ITEM=$ITEM NOTE=$NOTE
+}
+
+function EXITED
+{
+ RUN || return
+ JOBOP=EXITED
+ ITEM=$LINE
+ NOTE="$(print -r -f '%q ' -- $JOBOP)"
+#print -u2 AHA#$LINENO JOBOP=$JOBOP ITEM=$ITEM NOTE=$NOTE
+}
+
+function KILL # [ signal ]
+{
+ RUN || return
+ JOBOP=$2
+ [[ $JOBOP ]] || JOBOP=KILL
+ ITEM=$LINE
+ NOTE="$(print -r -f '%q ' -- $JOBOP)"
+}
+
+function CD
+{
+ RUN
+ if [[ $GROUP == $TEST_select ]] && (( ! COND_SKIP[COND] ))
+ then mkdir -p "$@" && cd "$@" || FATAL cannot initialize working directory "$@"
+ fi
+}
+
+function EXPORT
+{
+ typeset x n v
+ if [[ $GROUP == INIT ]]
+ then for x
+ do n=${x%%=*}
+ v=${x#*=}
+ ENVIRON[ENVIRONS++]=$n="'$v'"
+ done
+ else RUN
+ if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] ))
+ then return
+ fi
+ for x
+ do n=${x%%=*}
+ v=${x#*=}
+ EXPORT[EXPORTS++]=$n="'$v'"
+ done
+ fi
+}
+
+function FLUSH
+{
+ if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] ))
+ then return
+ fi
+ if ((SUBTESTS++))
+ then RUN
+ fi
+}
+
+function PROG # cmd arg ...
+{
+ typeset command args
+ if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] ))
+ then return
+ fi
+ ITEM=$LINE
+ NOTE="$(print -r -f '%q ' -- "$@")"
+ COMMAND_ORIG=$COMMAND
+ COMMAND=$1
+ shift
+ ARGS_ORIG=(${ARGS[@]})
+ ARGS=("$@")
+}
+
+function NOTE # description
+{
+ NOTE=$*
+}
+
+function IO # [ PIPE ] INPUT|OUTPUT|ERROR [-f*|-n] file|- data ...
+{
+ typeset op i v f file type x
+ if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] ))
+ then return
+ fi
+ [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG
+ while :
+ do case $1 in
+ FIFO|PIPE) type=$1; shift ;;
+ *) break ;;
+ esac
+ done
+ op=$1
+ shift
+ [[ $type ]] && TYPE[$op]=$type
+ FILTER[$op]=
+ file=$TWD/$op
+ while :
+ do case $1 in
+ -x) x=1
+ shift
+ ;;
+ -e) (( $# > 1 )) && shift
+ FILTER[$op]=$1
+ shift
+ ;;
+ -e*) FILTER[$op]=${1#-e}
+ shift
+ ;;
+ -f*|-n) f=$1
+ shift
+ ;;
+ *) break
+ ;;
+ esac
+ done
+ case $# in
+ 0) ;;
+ *) case $1 in
+ -) ;;
+ *) file=$1
+ eval i='$'$op
+ case " $i " in
+ *" $file "*)
+ ;;
+ *) eval $op='"$'$op' $file"'
+ ;;
+ esac
+ ;;
+ esac
+ shift
+ ;;
+ esac
+ case " $IGNORE " in
+ *" $file "*)
+ for i in $IGNORE
+ do case $i in
+ $file) ;;
+ *) v="$v $i" ;;
+ esac
+ done
+ IGNORE=$v
+ ;;
+ esac
+ FILE[$op]=$file
+ case $op in
+ OUTPUT|ERROR)
+ file=$file.ex
+ if [[ $file != /* ]]
+ then file=$TWD/$file
+ fi
+ ;;
+ esac
+ #unset SAME[$op]
+ SAME[$op]=
+ if [[ $file == /* ]]
+ then RM $file.sav
+ else RM $TWD/$file.sav
+ fi
+ if [[ $file == */* ]]
+ then mkdir -p ${file%/*}
+ fi
+ if [[ $file != */ ]]
+ then if [[ $type == FIFO ]]
+ then rm -f $file
+ mkfifo $file
+ fi
+ if [[ ${TYPE[$op]} != FIFO ]]
+ then if [[ $JOBOP ]]
+ then case $#:$f in
+ 0:) ;;
+ *:-f) printf -- "$@" ;;
+ *:-f*) printf -- "${f#-f}""$@" ;;
+ *) print $f -r -- "$@" ;;
+ esac >> $file
+ else case $#:$f in
+ 0:) ;;
+ *:-f) printf -- "$@" ;;
+ *:-f*) printf -- "${f#-f}""$@" ;;
+ *) print $f -r -- "$@" ;;
+ esac > $file
+ fi
+ elif [[ $#:$f != 0: ]]
+ then case $#:$f in
+ *:-f) printf -- "$@" ;;
+ *:-f*) printf -- "${f#-f}""$@" ;;
+ *) print $f -r -- "$@" ;;
+ esac >> $file &
+ fi
+ if [[ $x ]]
+ then chmod +x $file
+ fi
+ fi
+}
+
+function INPUT # file|- data ...
+{
+ IO $0 "$@"
+}
+
+function COPY # from to
+{
+ if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] ))
+ then return
+ fi
+ COPY="$COPY $@"
+}
+
+function MOVE # from to
+{
+ typeset f
+ if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] ))
+ then return
+ fi
+ for f
+ do case $f in
+ INPUT|OUTPUT|ERROR)
+ f=$TWD/$f
+ ;;
+ /*) ;;
+ *) f=$PWD/$f
+ ;;
+ esac
+ MOVE="$MOVE $f"
+ done
+}
+
+function SAME # new old
+{
+ typeset i file v
+ if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] ))
+ then return
+ fi
+ case $# in
+ 2) case $1 in
+ INPUT) cat $2 > $1; return ;;
+ esac
+ SAME[$1]=$2
+ file=$1
+ COMPARE="$COMPARE $1"
+ ;;
+ 3) SAME[$2]=$3
+ file=$2
+ eval i='$'$1
+ case " $i " in
+ *" $2 "*)
+ ;;
+ *) eval $1='"$'$1' $2"'
+ ;;
+ esac
+ COMPARE="$COMPARE $2"
+ ;;
+ esac
+ case " $IGNORE " in
+ *" $file "*)
+ for i in $IGNORE
+ do case $i in
+ $file) ;;
+ *) v="$v $i" ;;
+ esac
+ done
+ IGNORE=$v
+ ;;
+ esac
+}
+
+function OUTPUT # file|- data ...
+{
+ IO $0 "$@"
+}
+
+function ERROR # file|- data ...
+{
+ IO $0 "$@"
+}
+
+function RM # rm(1) args
+{
+ if [[ ! $TEST_rmu ]]
+ then chmod -R u+rwx "$@" >/dev/null 2>&1
+ fi
+ rm $TEST_rmu $TEST_rmflags "$@"
+}
+
+function REMOVE # file ...
+{
+ typeset i
+ for i
+ do RM $i $i.sav
+ done
+}
+
+function IGNORE # file ...
+{
+ typeset i
+ for i
+ do case $i in
+ INPUT|OUTPUT|ERROR)
+ i=$TWD/$i
+ ;;
+ esac
+ case " $IGNORE " in
+ *" $i "*)
+ ;;
+ *) IGNORE="$IGNORE $i"
+ ;;
+ esac
+ done
+}
+
+function KEEP # pattern ...
+{
+ typeset i
+ for i
+ do case $KEEP in
+ "") KEEP="$i" ;;
+ *) KEEP="$KEEP|$i" ;;
+ esac
+ done
+}
+
+function DIAGNOSTICS # [ 1 | 0 ]
+{
+ case $#:$1 in
+ 0:|1:1) DIAGNOSTICS=1
+ EXIT='*'
+ ;;
+ 1:|1:0) DIAGNOSTICS=""
+ EXIT=0
+ ;;
+ *) DIAGNOSTICS=$1
+ EXIT='*'
+ ;;
+ esac
+}
+
+function IGNORESPACE
+{
+ : ${IGNORESPACE=-b}
+}
+
+function EXIT # status
+{
+ EXIT=$1
+}
+
+function INFO # info description
+{
+ typeset -R15 info=$1
+ if [[ ! $1 ]]
+ then info=no
+ fi
+ shift
+ if [[ ! $TEST_quiet ]]
+ then print -r -u2 "$info " "$@"
+ fi
+}
+
+function COMMAND # arg ...
+{
+ typeset input
+ ((TESTS++))
+ case " ${ENVIRON[*]} ${EXPORT[*]}" in
+ *' 'LC_ALL=*)
+ ;;
+ *' 'LC_+([A-Z])=*)
+ EXPORT[EXPORTS++]="LC_ALL="
+ ;;
+ esac
+ if [[ $TEST_keep ]]
+ then (
+ PS4=''
+ set -x
+ print -r -- "${ENVIRON[@]}" "${EXPORT[@]}" "PATH=$PATH" $COMMAND "$@"
+ ) 2>&1 >/dev/null |
+ sed -e 's,^print -r -- ,,' -e 's,$, "$@",' >$TWD/COMMAND
+ chmod +x $TWD/COMMAND
+ fi
+ if [[ $UMASK != $UMASK_ORIG ]]
+ then : >$TWD/ERROR
+ umask $UMASK
+ fi
+ if [[ ${TYPE[INPUT]} == FIFO && ${FILE[INPUT]} == */INPUT ]]
+ then input="< ${FILE[INPUT]}"
+ fi
+ if [[ $TEST_trace ]]
+ then set +x
+ eval print -u2 "$PS4" "${ENVIRON[@]}" "${EXPORT[@]}" PATH='$PATH' '$'COMMAND '"$@"' '$input' '"2>$TWD/ERROR"' '"${JOBPID:+&}"'
+ fi
+ eval "${ENVIRON[@]}" "${EXPORT[@]}" PATH='$PATH' '$'COMMAND '"$@"' $input "2>$TWD/ERROR" "${JOBPID:+&}"
+ STATUS=$?
+ [[ $TEST_trace ]] && set -x
+ if [[ $JOBPID ]]
+ then JOBPID=$!
+ fi
+ [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG
+ return $STATUS
+}
+
+function RESULTS # pipe*
+{
+ typeset i j k s failed ignore io op
+ if [[ $1 ]]
+ then io="$1 "
+ fi
+ [[ $JOBOP || $JOBPID || $JOBSTATUS ]] && sleep 1
+ for i in $COMPARE $TWD/OUTPUT $TWD/ERROR
+ do case " $IGNORE $ignore $MOVE " in
+ *" $i "*) continue ;;
+ esac
+ ignore="$ignore $i"
+ op=${i##*/}
+ if [[ ${FILTER[$op]} ]]
+ then eval "{ ${FILTER[$op]} ;} < $i > $i.fi"
+ mv $i.fi $i
+ fi
+ j=${SAME[$op]}
+ if [[ ! $j ]]
+ then if [[ $i == /* ]]
+ then k=$i
+ else k=$TWD/$i
+ fi
+ for s in ex sav err
+ do [[ -f $k.$s ]] && break
+ done
+ j=$k.$s
+ fi
+ if [[ "$DIAGNOSTICS" && $i == */ERROR ]]
+ then if [[ $STATUS == 0 && ! -s $TWD/ERROR || $DIAGNOSTICS != 1 && $(<$i) != $DIAGNOSTICS ]]
+ then failed=$failed${failed:+,}DIAGNOSTICS
+ if [[ $TEST_verbose && $DIAGNOSTICS != 1 ]]
+ then print -u2 " ===" "diagnostic pattern '$DIAGNOSTICS' did not match" ${i#$TWD/} "==="
+ cat $i >&2
+ fi
+ fi
+ continue
+ fi
+ diff $IGNORESPACE $i $j >$i.diff 2>&1
+ if [[ -s $i.diff ]]
+ then failed=$failed${failed:+,}${i#$TWD/}
+ if [[ $TEST_verbose ]]
+ then print -u2 " ===" diff $IGNORESPACE ${i#$TWD/} "<actual >expected ==="
+ cat $i.diff >&2
+ fi
+ fi
+ done
+ if [[ $JOBOP ]]
+ then if [[ $JOBPID ]] && ! kill -0 $JOBPID 2>/dev/null
+ then wait $JOBPID
+ JOBSTATUS=$?
+ JOBPID=
+ fi
+#print -u2 AHA#$LINENO JOBOP=$JOBOP JOBPID=$JOBPID JOBSTATUS=$JOBSTATUS
+ case $JOBOP in
+ CONTINUE)
+ if [[ ! $JOBPID ]]
+ then failed=$failed${failed:+,}EXITED
+ fi
+ ;;
+ EXITED) if [[ $JOBPID ]]
+ then failed=$failed${failed:+,}RUNNING
+ fi
+ ;;
+ *) if [[ ! $JOBPID ]]
+ then failed=$failed${failed:+,}EXITED
+ fi
+ if ! kill -$JOBOP $JOBPID 2>/dev/null
+ then failed=$failed${failed:+,}KILL-$JOBOP
+ fi
+ ;;
+ esac
+ JOBOP=
+ fi
+ if [[ ! $failed && $STATUS != $EXIT ]]
+ then failed="exit code $EXIT expected -- got $STATUS"
+ fi
+ if [[ $failed ]]
+ then ((ERRORS++))
+ if [[ ! $TEST_quiet ]]
+ then SHOW="FAILED ${io}[ $failed ] $NOTE"
+ print -r -u2 " $SHOW"
+ fi
+ if [[ $TEST_keep ]]
+ then GROUP=FINI
+ exit
+ fi
+ elif [[ ! $TEST_quiet ]]
+ then SHOW=$NOTE
+ print -r -u2 " $SHOW"
+ fi
+}
+
+function SET # [no]name[=value]
+{
+ typeset i r
+ if [[ $TEST ]]
+ then RUN
+ fi
+ for i
+ do if [[ $i == - ]]
+ then r=1
+ elif [[ $i == + ]]
+ then r=
+ else if [[ $i == no?* ]]
+ then i=${i#no}
+ v=
+ elif [[ $i == *=* ]]
+ then v=${i#*=}
+ if [[ $v == 0 ]]
+ then v=
+ fi
+ i=${i%%=*}
+ else v=1
+ fi
+ i=${i//-/_}
+ if [[ $r ]]
+ then READONLY[$i]=1
+ elif [[ ${READONLY[$i]} ]]
+ then continue
+ fi
+ eval TEST_$i=$v
+ fi
+ done
+}
+
+function VIEW # var [ file ]
+{
+ nameref var=$1
+ typeset i bwd file pwd view root offset
+ if [[ $var ]]
+ then return 0
+ fi
+ case $# in
+ 1) file=$1 ;;
+ *) file=$2 ;;
+ esac
+ pwd=${TWD%/*}
+ bwd=${PMP%/*}
+ if [[ -r $file ]]
+ then if [[ ! -d $file ]]
+ then var=$PWD/$file
+ return 0
+ fi
+ for i in $file/*
+ do if [[ -r $i ]]
+ then var=$PWD/$file
+ return 0
+ fi
+ break
+ done
+ fi
+ for view in ${VIEWS[@]}
+ do case $view in
+ /*) ;;
+ *) view=$pwd/$view ;;
+ esac
+ case $offset in
+ '') case $pwd in
+ $view/*) offset=${pwd#$view} ;;
+ *) offset=${bwd#$view} ;;
+ esac
+ ;;
+ esac
+ if [[ -r $view$offset/$file ]]
+ then if [[ ! -d $view$offset/$file ]]
+ then var=$view$offset/$file
+ return 0
+ fi
+ for i in $view$offset/$file/*
+ do if [[ -f $i ]]
+ then var=$view$offset/$file
+ return 0
+ fi
+ break
+ done
+ fi
+ done
+ var=
+ return 1
+}
+
+function INCLUDE # file ...
+{
+ typeset f v x
+ for f
+ do if VIEW v $f || [[ $PREFIX && $f != /* ]] && VIEW v $PREFIX$f
+ then x=$x$'\n'". $v"
+ else FATAL $f: not found
+ fi
+ done
+ [[ $x ]] && trap "$x" 0
+}
+
+function UMASK # [ mask ]
+{
+ if (( $# ))
+ then UMASK=$1
+ else UMASK=$UMASK_ORIG
+ fi
+}
+
+function PIPE # INPUT|OUTPUT|ERROR file|- data ...
+{
+ IO $0 "$@"
+}
+
+function FIFO # INPUT|OUTPUT|ERROR file|- data ...
+{
+ IO $0 "$@"
+}
+
+function IF # command(s) [note]
+{
+ [[ $GROUP == $TEST_select ]] || return
+ RUN
+ (( COND++ ))
+ COND_LINE[COND]=$LINE
+ if (( COND > 1 && COND_SKIP[COND-1] ))
+ then (( COND_KEPT[COND] = 1 ))
+ (( COND_SKIP[COND] = 1 ))
+ elif eval "{ $1 ;} >/dev/null 2>&1"
+ then (( COND_KEPT[COND] = 1 ))
+ (( COND_SKIP[COND] = 0 ))
+ [[ $2 && ! $TEST_quiet ]] && print -u2 "NOTE $2"
+ else (( COND_KEPT[COND] = 0 ))
+ (( COND_SKIP[COND] = 1 ))
+ fi
+}
+
+function ELIF # command(s) [note]
+{
+ [[ $GROUP == $TEST_select ]] || return
+ RUN
+ if (( COND <= 0 ))
+ then FATAL line $LINE: no matching IF for ELIF
+ fi
+ if (( COND_KEPT[COND] ))
+ then (( COND_SKIP[COND] = 0 ))
+ elif eval "$* > /dev/null 2>&1"
+ then (( COND_KEPT[COND] = 1 ))
+ (( COND_SKIP[COND] = 0 ))
+ [[ $2 && ! $TEST_quiet ]] && print -u2 "NOTE $2"
+ else (( COND_SKIP[COND] = 1 ))
+ fi
+}
+
+function ELSE # [note]
+{
+ [[ $GROUP == $TEST_select ]] || return
+ RUN
+ if (( COND <= 0 ))
+ then FATAL line $LINE: no matching IF for ELSE
+ fi
+ if (( COND_KEPT[COND] ))
+ then (( COND_SKIP[COND] = 1 ))
+ else (( COND_KEPT[COND] = 1 ))
+ (( COND_SKIP[COND] = 0 ))
+ [[ $1 && ! $TEST_quiet ]] && print -u2 "NOTE $1"
+ fi
+}
+
+function FI
+{
+ [[ $GROUP == $TEST_select ]] || return
+ RUN
+ if (( COND <= 0 ))
+ then FATAL line $LINE: no matching IF for FI on line $LINE
+ fi
+ (( ! COND_KEPT[COND] )) && [[ $1 && ! $TEST_quiet ]] && print -u2 "NOTE $1"
+ (( COND-- ))
+}
+
+# main
+
+integer ERRORS=0 ENVIRONS=0 EXPORTS=0 TESTS=0 SUBTESTS=0 LINE=0 TESTLINE=0
+integer ITEM=0 LASTITEM=0 COND=0 UNIT_READONLY=0 COUNT
+typeset ARGS COMMAND COPY DIAGNOSTICS ERROR EXEC FLUSHED=0 GROUP=INIT
+typeset IGNORE INPUT KEEP OUTPUT TEST SOURCE MOVE NOTE UMASK UMASK_ORIG
+typeset ARGS_ORIG COMMAND_ORIG TITLE UNIT ARGV PREFIX OFFSET IGNORESPACE
+typeset COMPARE MAIN JOBPID='' JOBSTATUS=''
+typeset TEST_file TEST_keep TEST_pipe_input TEST_pipe_io TEST_pipe_output TEST_local
+typeset TEST_quiet TEST_regular=1 TEST_rmflags='-rf --' TEST_rmu TEST_select
+
+typeset -A SAME VIEWS FILE TYPE READONLY FILTER
+typeset -a COND_LINE COND_SKIP COND_KEPT ENVIRON EXPORT
+typeset -Z LAST=00
+
+unset FIGNORE
+
+while getopts -a $command "$USAGE" OPT
+do case $OPT in
+ b) (( $OPTARG )) && IGNORESPACE=-b
+ ;;
+ i) SET - pipe-input=$OPTARG
+ ;;
+ k) SET - keep=$OPTARG
+ ;;
+ l) SET - local
+ ;;
+ o) SET - pipe-output=$OPTARG
+ ;;
+ p) SET - pipe-io=$OPTARG
+ ;;
+ q) SET - quiet=$OPTARG
+ ;;
+ r) SET - regular=$OPTARG
+ ;;
+ t) if [[ $TEST_select ]]
+ then TEST_select="$TEST_select|${OPTARG//,/\|}"
+ else TEST_select="${OPTARG//,/\|}"
+ fi
+ ;;
+ x) SET - trace=$OPTARG
+ ;;
+ v) SET - verbose=$OPTARG
+ ;;
+ *) GROUP=FINI
+ exit 2
+ ;;
+ esac
+done
+shift $OPTIND-1
+case $# in
+0) FATAL test unit name omitted ;;
+esac
+export COLUMNS=80
+SOURCE=$PWD
+PATH=$SOURCE:${PATH#?(.):}
+PATH=${PATH%%:?(.)}:/bin:/usr/bin
+UNIT=$1
+shift
+if [[ -f $UNIT && ! -x $UNIT ]]
+then REGRESS=$UNIT
+else REGRESS=${UNIT%.tst}
+ REGRESS=$REGRESS.tst
+ [[ -f $REGRESS ]] || FATAL $REGRESS: regression tests not found
+fi
+UNIT=${UNIT##*/}
+UNIT=${UNIT%.tst}
+MAIN=$UNIT
+if [[ $VPATH ]]
+then set -A VIEWS ${VPATH//:/' '}
+ OFFSET=${SOURCE#${VIEWS[0]}}
+ if [[ $OFFSET ]]
+ then OFFSET=${OFFSET#/}/
+ fi
+fi
+if [[ $REGRESS == */* ]]
+then PREFIX=${REGRESS%/*}
+ if [[ ${#VIEWS[@]} ]]
+ then for i in ${VIEWS[@]}
+ do PREFIX=${PREFIX#$i/}
+ done
+ fi
+ PREFIX=${PREFIX#$OFFSET}
+ if [[ $PREFIX ]]
+ then PREFIX=$PREFIX/
+ fi
+fi
+TWD=$PWD/$UNIT.tmp
+PMP=$(pwd -P)/$UNIT.tmp
+UMASK_ORIG=$(umask)
+UMASK=$UMASK_ORIG
+ARGV=("$@")
+if [[ ${ARGV[0]} && ${ARGV[0]} != [-+]* ]]
+then UNIT "${ARGV[@]}"
+ UNIT_READONLY=1
+fi
+trap 'code=$?; CLEANUP $code' EXIT
+if [[ ! $TEST_select ]]
+then TEST_select="[0123456789]*"
+fi
+TEST_select="@($TEST_select|+(0))"
+if [[ $TEST_trace ]]
+then export PS4=':$LINENO: '
+ typeset -ft $(typeset +f)
+ set -x
+fi
+if [[ $TEST_verbose ]]
+then typeset SHOW
+else typeset -L70 SHOW
+fi
+if [[ ! $TEST_keep ]] && (ulimit -c 0) >/dev/null 2>&1
+then ulimit -c 0
+fi
+set --pipefail
+
+# some last minute shenanigans
+
+alias BODY='BODY=BODY; function BODY'
+alias CONTINUE='LINE=$LINENO; CONTINUE'
+alias DO='(( $ITEM != $FLUSHED )) && RUN DO; DO &&'
+alias DONE='DONE=DONE; function DONE'
+alias EXEC='LINE=$LINENO; EXEC'
+alias EXITED='LINE=$LINENO; EXITED'
+alias INIT='INIT=INIT; function INIT'
+alias JOB='LINE=$LINENO; JOB'
+alias KILL='LINE=$LINENO; KILL'
+alias PROG='LINE=$LINENO; FLUSH; PROG'
+alias TEST='TESTLINE=$LINENO; TEST'
+alias IF='LINE=$LINENO; FLUSH; IF'
+alias ELIF='LINE=$LINENO; FLUSH; ELIF'
+alias ELSE='LINE=$LINENO; FLUSH; ELSE'
+alias FI='LINE=$LINENO; FLUSH; FI'
+
+# do the tests
+
+. $REGRESS
+RUN
+GROUP=FINI
diff --git a/usr/src/contrib/ast/src/cmd/INIT/release.c b/usr/src/contrib/ast/src/cmd/INIT/release.c
new file mode 100644
index 0000000000..1ed245355c
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/release.c
@@ -0,0 +1,366 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1990-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+/*
+ * release -- list recent release changes
+ *
+ * coded for portability
+ */
+
+static char id[] = "\n@(#)$Id: release (AT&T Research) 2000-01-28 $\0\n";
+
+#if _PACKAGE_ast
+
+#include <ast.h>
+#include <error.h>
+
+static const char usage[] =
+"[-?\n@(#)$Id: release (AT&T Research) 2000-01-28 $\n]"
+USAGE_LICENSE
+"[+NAME?release - list recent changes]"
+"[+DESCRIPTION?\brelease\b lists the changes within the date range specified"
+" by the \b--from\b and \b--to\b options. The input files are assumed to"
+" contain date tag lines of the form [\acc\a]]\ayy-mm-dd\a [ \atext\a ]]"
+" (or \bdate\b(1) default format), where \acc\a is determined by a Y2K"
+" window year of 69 (we can produce an example coding dated 1991 - this"
+" can be patented?, how about 1+1=2?.) The date tag lines are followed by"
+" \areadme\a text in reverse chronological order (newer entries at the"
+" top of the file.) If no selection options are spcified then all"
+" changes are listed. If no \afile\a operands are specified then the"
+" standard input is read.]"
+"[+?The entries for each \afile\a are annotated with the file directory name.]"
+"[f:from?Entries older than \adate\a are omitted.]:[date]"
+"[r:release?List all changes that include the first \acount\a release marks."
+" A release mark has a date tag followed by optional space and at least"
+" three \b-\b characters. Changes from release mark \acount\a+1 are not"
+" listed. If there are no release marks then the date range is used;"
+" if there is at least one release mark then the date range is ignored"
+" and at most \acount\a release marks will be listed.]#[count]"
+"[t:to?Entries newer than \adate\a are omitted.]:[date]"
+"[V?Print the program version and exit.]"
+
+"\n"
+"\n[ file ... ]\n"
+"\n"
+
+"[+SEE ALSO?\bpackage\b(1)]"
+;
+
+#else
+
+#define elementsof(x) ((int)(sizeof(x)/sizeof(x[0])))
+
+#define NiL ((char*)0)
+
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <sys/types.h>
+
+#if !_PACKAGE_ast && defined(__STDC__)
+#include <stdlib.h>
+#include <string.h>
+#endif
+
+static char mon[] = "janfebmaraprmayjunjulaugsepoctnovdec";
+static char day[] = "sunmontuewedthufrisat";
+
+#if !_PACKAGE_ast
+
+static void
+usage()
+{
+ fprintf(stderr, "Usage: release [-V] [-h hi-date] [-l lo-date] [-r count] [ file ...]\n");
+ exit(2);
+}
+
+#endif
+
+static unsigned long
+number(register char* s, char** e)
+{
+ unsigned long q = 0;
+
+ while (isspace(*s))
+ s++;
+ while (isdigit(*s))
+ q = q * 10 + *s++ - '0';
+ if (e)
+ *e = s;
+ return q;
+}
+
+unsigned long
+string(register char* s, char* tab, int num, int siz, char** e)
+{
+ register int i;
+ register int j;
+ char buf[16];
+
+ while (isspace(*s))
+ s++;
+ for (i = 0; i < siz; i++)
+ buf[i] = isupper(s[i]) ? tolower(s[i]) : s[i];
+ for (i = 0; i < num; i += siz)
+ for (j = 0; j < siz && buf[j] == tab[j+i]; j++)
+ if (j == (siz - 1))
+ {
+ *e = s + siz;
+ return i / siz + 1;
+ }
+ return 0;
+}
+
+static unsigned long
+date(char* s, char** e)
+{
+ char* t;
+ unsigned long y;
+ unsigned long m;
+ unsigned long d;
+
+ if (isdigit(*s))
+ {
+ y = number(s, &t);
+ if (*t != '-')
+ return 0;
+ switch (t - s)
+ {
+ case 2:
+ y += 1900;
+ if (y <= 1969)
+ y += 100;
+ break;
+ case 4:
+ if (y < 1969)
+ return 0;
+ break;
+ }
+ if (!(m = number(++t, &s)))
+ return 0;
+ if ((s - t) != 2 || *s != '-' || m < 1 || m > 12)
+ return 0;
+ if (!(d = number(++s, &t)))
+ return 0;
+ if ((t - s) != 2 || d < 1 || d > 31)
+ return 0;
+ }
+ else
+ {
+ if (string(s, day, elementsof(day), 3, &t))
+ s = t;
+ if (!(m = string(s, mon, elementsof(mon), 3, &t)))
+ return 0;
+ if (!(d = number(t, &s)))
+ return 0;
+ for (y = 1969; *s; s++)
+ if ((y = number(s, &t)) && (t - s) == 4)
+ {
+ if (y < 1969)
+ return 0;
+ break;
+ }
+ }
+ if (e)
+ {
+ while (isspace(*t))
+ t++;
+ *e = t;
+ }
+ return ((y - 1969) * 13 + m) * 32 + d;
+}
+
+int
+main(int argc, char** argv)
+{
+ register char* s;
+ register char* u;
+ register char* v;
+ char* p;
+ char* e;
+ int i;
+ unsigned long t;
+ unsigned long lo;
+ unsigned long hi;
+ int mk;
+ FILE* f;
+ char buf[1024];
+
+ mk = 0;
+ lo = hi = 0;
+#if _PACKAGE_ast
+ error_info.id = "release";
+ for (;;)
+ {
+ switch (optget(argv, usage))
+ {
+ case 'f':
+ if (!(lo = date(opt_info.arg, &e)) || *e)
+ {
+ error(2, "%s: invalid from date [%s]", opt_info.arg, e);
+ return 1;
+ }
+ continue;
+ case 'r':
+ mk = opt_info.num + 1;
+ continue;
+ case 't':
+ if (!(hi = date(opt_info.arg, &e)) || *e)
+ {
+ error(2, "%s: invalid to date [%s]", opt_info.arg, e);
+ return 1;
+ }
+ continue;
+ case 'V':
+ sfprintf(sfstdout, "%s\n", id + 10);
+ return 0;
+ case '?':
+ error(ERROR_USAGE|4, "%s", opt_info.arg);
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ continue;
+ }
+ break;
+ }
+ if (error_info.errors)
+ error(ERROR_USAGE|4, "%s", optusage(NiL));
+ argv += opt_info.index;
+#else
+ while ((s = *++argv) && *s == '-' && *(s + 1))
+ {
+ if (*(s + 1) == '-')
+ {
+ if (!*(s + 2))
+ {
+ argv++;
+ break;
+ }
+ usage();
+ break;
+ }
+ for (;;)
+ {
+ switch (i = *++s)
+ {
+ case 0:
+ break;
+ case 'f':
+ case 't':
+ if (!*(v = ++s) && !(v = *++argv))
+ {
+ s = "??";
+ continue;
+ }
+ if (!(t = date(v, &e)) || *e)
+ {
+ fprintf(stderr, "release: -%c%s: invalid date [%s]\n", i, s, e);
+ return 1;
+ }
+ switch (i)
+ {
+ case 'f':
+ lo = t;
+ break;
+ case 't':
+ hi = t;
+ break;
+ }
+ break;
+ case 'r':
+ if (!*(v = ++s) && !(v = *++argv))
+ {
+ s = "??";
+ continue;
+ }
+ mk = number(v, &e) + 1;
+ if (*e)
+ {
+ fprintf(stderr, "release: -%c%s: invalid count\n", i, s);
+ return 1;
+ }
+ break;
+ case 'V':
+ fprintf(stdout, "%s\n", id + 10);
+ return 0;
+ default:
+ fprintf(stderr, "release: -%c: unknown option\n", i);
+ /*FALLTHROUGH*/
+ case '?':
+ usage();
+ break;
+ }
+ break;
+ }
+ }
+#endif
+ do
+ {
+ if (!(p = *argv++) || !*p || *p == '-' && !*(p + 1))
+ {
+ argv--;
+ p = "";
+ f = stdin;
+ }
+ else if (!(f = fopen(p, "r")))
+ {
+ fprintf(stderr, "release: %s: cannot read", p);
+ return 1;
+ }
+ while (s = fgets(buf, sizeof(buf), f))
+ {
+ if (t = date(s, &e))
+ {
+ if (mk && e[0] == '-' && e[1] == '-' && e[2] == '-' && !--mk)
+ break;
+ if (t < lo)
+ break;
+ if (hi && t > hi)
+ continue;
+ if (p)
+ {
+ if (*p)
+ {
+ for (u = v = p; *p; p++)
+ if (*p == '/')
+ {
+ v = u;
+ u = p + 1;
+ }
+ printf("\n:::::::: ");
+ while ((i = *v++) && i != '/')
+ fputc(i, stdout);
+ printf(" ::::::::\n\n");
+ }
+ p = 0;
+ }
+ }
+ if (!p)
+ fputs(s, stdout);
+ }
+ if (f == stdin)
+ break;
+ fclose(f);
+ } while (*argv);
+ return 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/rt.sh b/usr/src/contrib/ast/src/cmd/INIT/rt.sh
new file mode 100644
index 0000000000..2b8b8408b9
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/rt.sh
@@ -0,0 +1,479 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: rt - nmake test output filter
+
+command=rt
+flags='--silent --keepgoing'
+failed=0
+heading=1
+verbose=0
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) ARGV0="-a $command"
+ USAGE=$'
+[-?
+@(#)$Id: rt (AT&T Research) 2010-07-27 $
+]
+'$USAGE_LICENSE$'
+[+NAME?rt - run "nmake test" and filter output]
+[+DESCRIPTION?\brt\b runs \vnmake test\v and filters the regression
+ test output to contain only test summary lines. If no \atest\a
+ operands are specified then \btest\b is assumed. If \b-\b is
+ specified then the \afile\a operands, or the standard input
+ if no \afile\a operands are specified, are filtered instead
+ of the output from \bnmake\b.]
+[f:failed?Only list failed test results.]
+[h!:heading?Enable per-file heading when more than one \afile\a operand
+ follows \b-\b.]
+[v:verbose?Run with \vREGRESSFLAGS=-v\v.]
+
+[ test ... | - [ file ... ] ]
+
+[+SEE ALSO?\bnmake\b(1), \bregress\b(1)]
+[+CAVEATS?\brt\b guesses the regression test output style. Garbled
+ output indicates a bad guess.]
+'
+ ;;
+*) ARGV0=""
+ USAGE="fhv"
+ ;;
+esac
+
+function usage
+{
+ OPTIND=0
+ getopts $ARGV0 "$USAGE" OPT '-?'
+ exit 2
+}
+
+while getopts $ARGV0 "$USAGE" OPT
+do case $OPT in
+ f) failed=1 ;;
+ h) heading=0 ;;
+ v) (( verbose=$OPTARG )) && flags="$flags REGRESSFLAGS=-v" ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+
+ifs=${IFS:-$' \t\n'}
+set -o noglob
+component=
+dots='............................................'
+bad=' ***'
+style=unknown
+integer tests errors signals lineno=0 skip=0
+typeset -l lower
+
+function results # tests errors signals
+{
+ integer t=$1 e=$2 s=$3
+ typeset label note
+ if [[ $style != unknown ]] && (( errors >= 0 ))
+ then style=unknown
+ if (( !failed || errors ))
+ then if (( failed ))
+ then print -r -n -- "$unit"
+ fi
+ if (( t >= 0 ))
+ then if (( t == 1))
+ then label="test "
+ else label=tests
+ fi
+ printf $'%s%5d %s' "$prefix" "$t" "$label"
+ prefix=
+ else prefix="$prefix..........."
+ fi
+ if (( s ))
+ then label=signal
+ (( e=s ))
+ else label=error
+ fi
+ if (( e != 1))
+ then label=${label}s
+ fi
+ if (( e == 1 ))
+ then note=" $bad"
+ elif (( e > 1 ))
+ then note=$bad
+ fi
+ printf $'%s%5d %s%s\n' "$prefix" "$e" "$label" "$note"
+ fi
+ fi
+}
+
+function unit
+{
+ typeset x
+ if [[ $component ]]
+ then x=${component##*/}
+ if [[ " $x " != *' '$unit' '* && " $unit " != *' '$x' '* ]]
+ then if [[ $component == cmd/?*lib/* ]]
+ then unit="$unit $x"
+ else unit="$x $unit"
+ fi
+ fi
+ fi
+ unit="$unit ${dots:1:${#dots}-${#unit}}"
+ if [[ $1 ]]
+ then unit="$unit..........."
+ fi
+ if (( ! failed ))
+ then print -r -n -- "$unit"
+ fi
+}
+
+if [[ $1 == - ]]
+then shift
+ if (( $# <= 1 ))
+ then heading=0
+ fi
+ if (( heading ))
+ then for i
+ do print test heading $i
+ cat -- "$i"
+ done
+ else cat "$@"
+ fi
+else if [[ $1 == *=* ]]
+ then set test "$@"
+ elif (( ! $# ))
+ then set test
+ fi
+ nmake "$@" $flags 2>&1
+fi |
+while read -r line
+do set '' $line
+ shift
+ case $line in
+ TEST[' ']*', '*' error'*)
+ IFS=${IFS}","
+ set '' $line
+ IFS=$ifs
+ set '' $*
+ while :
+ do case $2 in
+ '') break
+ ;;
+ error|errors)
+ errors=$1
+ break
+ ;;
+ test|tests)
+ tests=$1
+ ;;
+ esac
+ shift
+ done
+ results $tests $errors
+ continue
+ ;;
+ TEST[' ']*)
+ results $tests $errors
+ IFS=${IFS}","
+ set '' $line
+ IFS=$ifs
+ set '' $*
+ unit=${3##*/}
+ case $4 in
+ [a-zA-Z]*) unit="$unit $4" ;;
+ esac
+ unit
+ prefix=
+ errors=0
+ signals=0
+ style=regress
+ continue
+ ;;
+ 'pathname and options of item under test')
+ read -r line || break
+ results $tests $errors $signals
+ set '' $line
+ unit=${2##*/}
+ unit
+ tests=0
+ errors=0
+ signals=0
+ style=script
+ continue
+ ;;
+ 'test heading '*)
+ if (( heading ))
+ then if (( heading > 1 ))
+ then print
+ else heading=2
+ fi
+ set '' $line
+ shift 3
+ print -r -- "==> $* <=="
+ fi
+ continue
+ ;;
+ 'test '*' begins at '????-??-??+??:??:??|'test '*' begins at '*' '*' '*' '*' '*)
+ results $tests $errors $signals
+ unit=${2##*/}
+ unit=${unit%.sh}
+ unit
+ prefix=
+ tests=-1
+ errors=0
+ signals=0
+ style=shell
+ continue
+ ;;
+ 'test '*' at '????-??-??+??:??:??' [ '*' ]'|'test '*' at '*' '*' '*' '*' '*)
+ case $line in
+ *' [ '*test*error*' ]')
+ while :
+ do case $1 in
+ '[') tests=$2
+ errors=$4
+ if (( errors > 256 ))
+ then (( signals++ ))
+ fi
+ break
+ ;;
+ esac
+ shift
+ done
+ ;;
+ *' [ '*test*signal*' ]')
+ while :
+ do case $1 in
+ '[') tests=$2
+ signals=$4
+ if (( signals ))
+ then (( errors++ ))
+ fi
+ break
+ ;;
+ esac
+ shift
+ done
+ ;;
+ *) if [[ $3 != passed ]]
+ then (( errors )) || (( errors++ ))
+ fi
+ ;;
+ esac
+ results $tests $errors $signals
+ continue
+ ;;
+ '## ---'*(-)'--- ##')
+ (( ++lineno > skip )) || continue
+ read -r line || break
+ lower=$line
+ set '' $lower
+ case $lower in
+ '##'*'test suite:'*'##')
+ results $tests $errors $signals
+ set -- ${lower//*suite:}
+ set -- ${*//[.#]/}
+ unit=$*
+ if [[ $unit == *' tests' ]]
+ then unit=${unit/' tests'/}
+ fi
+ main=$unit
+ prefix=
+ tests=0
+ errors=0
+ signals=0
+ category=
+ style=autotest
+ (( skip = lineno + 1 ))
+ unit
+ continue
+ ;;
+ esac
+ ;;
+ +(-)) case $style in
+ regress) continue ;;
+ esac
+ (( ++lineno > skip )) || continue
+ read -r line || break
+ set '' $line
+ case $line in
+ 'Running tests for '*)
+ results $tests $errors $signals
+ shift 4
+ unit=
+ while (( $# ))
+ do if [[ $1 == on ]]
+ then break
+ fi
+ if [[ $unit ]]
+ then unit="$unit "
+ fi
+ unit=$unit${1##*/}
+ shift
+ done
+ main=$unit
+ prefix=
+ tests=-1
+ errors=-1
+ category=
+ style=perl
+ (( skip = lineno + 1 ))
+ continue
+ ;;
+ *' : '*)results $tests $errors $signals
+ unit=${2##*/}
+ unit=${unit%.sh}
+ unit
+ prefix=
+ tests=0
+ errors=0
+ signals=0
+ style=timing
+ (( skip = lineno + 1 ))
+ continue
+ ;;
+ esac
+ ;;
+ +([0-9])*([a-zA-Z0-9])' '*)
+ case $style in
+ script) case $line in
+ *FAILED*|*failed*)
+ (( errors++ ))
+ ;;
+ *) (( tests++ ))
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ make:*|'make ['*']:'*)
+ case $line in
+ *': warning:'*|*'making test'*|*'action'?(s)' failed'*|*': *** '*)
+ ;;
+ *) results $tests $errors $signals
+ print -r -u2 -- "$line"
+ ;;
+ esac
+ continue
+ ;;
+ +([/a-zA-Z_0-9]):)
+ component=${line%:}
+ ;;
+ '') continue
+ ;;
+ esac
+ case $style in
+ autotest)
+ case $line in
+ +([0-9]):*ok)
+ (( tests++ ))
+ ;;
+ +([0-9]):*FAILED*)
+ (( tests++ ))
+ (( errors++ ))
+ if (( $verbose ))
+ then if [[ ! $prefix ]]
+ then prefix=$unit
+ print
+ fi
+ print -r -- " ${line//*'FAILED '/}"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ perl) case $line in
+ *'........ '*)
+ if [[ $1 == */* ]]
+ then cat=${1%%/*}
+ if [[ $cat != $category ]]
+ then results $tests $errors $signals
+ category=$cat
+ unit="$main $category"
+ unit
+ prefix=
+ tests=0
+ errors=0
+ signals=0
+ fi
+ (( tests++ ))
+ case $line in
+ *' ok') ;;
+ *) (( errors++ ))
+ if (( $verbose ))
+ then if [[ ! $prefix ]]
+ then prefix=$unit
+ print
+ fi
+ print -r -- "$line"
+ fi
+ ;;
+ esac
+ else results $tests $errors $signals
+ case $line in
+ *' ok') errors=0 ;;
+ *) errors=1 ;;
+ esac
+ unit="$main $1"
+ unit
+ if (( $verbose && errors ))
+ then prefix=$unit
+ print
+ shift 2
+ print -r -- "$@"
+ else prefix=
+ fi
+ results $tests $errors $signals
+ tests=-1
+ errors=-1
+ category=
+ fi
+ style=perl
+ ;;
+ esac
+ continue
+ ;;
+ esac
+ case $line in
+ *FAILED*|*failed*)
+ (( errors++ ))
+ ;;
+ *) case $style in
+ regress)case $line in
+ ['<>']*);;
+ *) continue ;;
+ esac
+ ;;
+ script) continue
+ ;;
+ shell) ((errors++ ))
+ ;;
+ timing) (( tests++ ))
+ continue
+ ;;
+ unknown)continue
+ ;;
+ esac
+ ;;
+ esac
+ if (( $verbose ))
+ then if [[ ! $prefix ]]
+ then prefix=$unit
+ print
+ fi
+ print -r -- "$line"
+ fi
+done
+results $tests $errors $signals
diff --git a/usr/src/contrib/ast/src/cmd/INIT/silent.sh b/usr/src/contrib/ast/src/cmd/INIT/silent.sh
new file mode 100644
index 0000000000..be99aa69a9
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/silent.sh
@@ -0,0 +1,42 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1994-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+# non-ksh stub for the nmake silent prefix
+# @(#)silent (AT&T Research) 1992-08-11
+
+case $-:$BASH_VERSION in
+*x*:[01234567899]*) : bash set -x is broken :; set +ex ;;
+esac
+
+while :
+do case $# in
+ 0) exit 0 ;;
+ esac
+ case $1 in
+ *=*) case $RANDOM in
+ $RANDOM)`echo $1 | sed "s/\\([^=]*\\)=\\(.*\\)/eval \\1='\\2'; export \\1/"` ;;
+ *) export "$1" ;;
+ esac
+ shift
+ ;;
+ *) break
+ ;;
+ esac
+done
+"$@"
diff --git a/usr/src/contrib/ast/src/cmd/INIT/socket.c b/usr/src/contrib/ast/src/cmd/INIT/socket.c
new file mode 100644
index 0000000000..51d74eb7ad
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/socket.c
@@ -0,0 +1,33 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * small test for -lnsl
+ */
+
+#ifndef socket
+#include <sys/types.h>
+#include <sys/socket.h>
+#endif
+
+int
+main()
+{
+ return socket(0, 0, 0) < 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/w.c b/usr/src/contrib/ast/src/cmd/INIT/w.c
new file mode 100644
index 0000000000..0f6bc7d3db
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/w.c
@@ -0,0 +1,30 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#ifndef DONTCARE
+#include <wchar.h>
+#include <wctype.h>
+#endif
+
+int
+main()
+{
+ wchar_t w = ' ';
+ return iswspace(w) == 0;
+}
diff --git a/usr/src/contrib/ast/src/cmd/INIT/w2.c b/usr/src/contrib/ast/src/cmd/INIT/w2.c
new file mode 100644
index 0000000000..00efd257c0
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/INIT/w2.c
@@ -0,0 +1,27 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1994-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#include <wchar.h>
+
+int
+main()
+{
+ wchar_t w = ' ';
+ return iswspace(w) == 0;
+}
diff --git a/usr/src/lib/libshell/common/COMPATIBILITY b/usr/src/contrib/ast/src/cmd/ksh93/COMPATIBILITY
index d4d645a99a..cf260763e8 100644
--- a/usr/src/lib/libshell/common/COMPATIBILITY
+++ b/usr/src/contrib/ast/src/cmd/ksh93/COMPATIBILITY
@@ -1,5 +1,5 @@
- KSH-93 VS. KSH-88
+ KSH-93 VS. KSH-88
The following is a list of known incompatibilities between ksh-93 and ksh-88.
@@ -79,7 +79,7 @@ omitted features that are completely upward compatible.
17. The POSIX standard requires that test "$arg" have exit status
of 0, if and only if $arg is null. However, since this breaks
- programs that use test -t, ksh93 treats an explicit test -t
+ programs that use test -t, ksh-93 treats an explicit test -t
as if the user had entered test -t 1.
18. The ^T directive of emacs mode has been changed to work the
@@ -93,7 +93,7 @@ omitted features that are completely upward compatible.
values.
21. Local variables defined by typeset are statically scoped in
- ksh93. In ksh88 they were dynamically scoped although this
+ ksh-93. In ksh-88 they were dynamically scoped although this
behavior was never documented.
22. The value of the variable given to getopts is set to ? when
@@ -101,34 +101,36 @@ omitted features that are completely upward compatible.
23. Since the POSIX standard requires that octal constants be
recongnized, doing arithmetic on typeset -Z variables can
- yield different results that with ksh88. Most of these
- differences were eliminated in ksh93o.
+ yield different results that with ksh-88. Most of these
+ differences were eliminated in ksh-93o. Starting in ksh-93u+, the
+ let command no longer recognizes octal constants starting with 0
+ for compatibility with ksh-88 unless the option letoctal is on.
-24. Starting after ksh93l, If you run ksh name, where name does
+24. Starting after ksh-93l, If you run ksh name, where name does
not contain a /, the current directory will be searched
before doing a path search on name as required by the POSIX
shell standard.
-25. In ksh93, cd - will output the directory that it changes
- to on standard output as required by X/Open. With ksh88,
+25. In ksh-93, cd - will output the directory that it changes
+ to on standard output as required by X/Open. With ksh-88,
this only happened for interactive shells.
26. As an undocumented feature of ksh-88, a leading 0 to an
assignment of an integer variable caused that variable
to be treated as unsigned. This behavior was removed
- starting in ksh93p.
+ starting in ksh-93p.
-27. The getopts builtin in ksh93 requires that optstring contain
+27. The getopts builtin in ksh-93 requires that optstring contain
a leading + to allow options to begin with a +.
28. In emacs/gmacs mode, control-v will not display the version when
the stty lnext character is set to control-v or is unset.
The sequence escape control-v will display the shell version.
-29. In ksh88, DEBUG traps were executed. after each command. In ksh93
+29. In ksh-88, DEBUG traps were executed. after each command. In ksh-93
DEBUG traps are exeucted before each command.
-30. In ksh88, a redirection to a file name given by an empty string was
- ignored. In ksh93, this is an error.
+30. In ksh-88, a redirection to a file name given by an empty string was
+ ignored. In ksh-93, this is an error.
I am interested in expanding this list so please let me know if you
uncover any others.
diff --git a/usr/src/lib/libshell/common/DESIGN b/usr/src/contrib/ast/src/cmd/ksh93/DESIGN
index c11c0aff1e..151957524e 100644
--- a/usr/src/lib/libshell/common/DESIGN
+++ b/usr/src/contrib/ast/src/cmd/ksh93/DESIGN
@@ -37,13 +37,13 @@ Directory layout:
where shell_path is an absolute pathname for the shell to
be tested.
- The top level directory contains the nmake Makefile, a README,
- and several documentation files. The RELEASE file contains
- the list of bug fixes and new features since the original
- ksh93 release. The file COMPATIBILITY is a list of all
- known incompatibilities with ksh88.
+ The top level directory contains the nmake Makefile, the
+ RELEASE file, the ksh93 man file (sh.1) and nval.3 and shell.3
+ documentation files. The RELEASE file contains the list of bug
+ fixes and new features since the original ksh93 release. The file
+ COMPATIBILITY is a list of all known incompatibilities with ksh88.
- The bash_pre_rc.sh is a startup script used when emulating
+ The data/bash_pre_rc.sh is a startup script used when emulating
bash if the shell is compiled with SHOPT_BASH and the shell
is invoked as bash. The bash emulation is not complete.
@@ -58,13 +58,13 @@ Include directory:
It also contains prototypes for many of the strings.
3. defs.h is the catch all for all definitions that
don't fit elsewhere and it includes several other
- headers. It defines a strucuture that contains ksh
+ headers. It defines a structure that contains ksh
global data, sh, and a structure that contains per
function data, sh.st.
4. edit.h contains definitions that are common to both
vi and emacs edit modes.
- 5. env.h contains interfaces for creating and modifying
- environment variables.
+ 5. env.h contains an alternative interfaces for creating and
+ modifying environment variables.
6. fault.h contains prototypes for signal related
functions and trap and fault handling.
7. fcin.h contains macro and function definitions for
@@ -102,6 +102,7 @@ Include directory:
23. ulimit.h includes the appropriate resource header.
24. variables.h contains symbolic constants for the built-in
shell variables.
+ 25. version.h contains the version string for this release.
sh directory:
1. args.c contains functions for parsing shell options
@@ -110,7 +111,7 @@ sh directory:
library and the interface to shell arithmetic.
3. array.c contains the code for indexed and associative
arrays.
- 4. bash.h contains code used when compiling with SHOPT_BASH
+ 4. bash.c contains code used when compiling with SHOPT_BASH
to add bash specific features such as shopt.
5. defs.c contains the data definitions for global symbols.
6. deparse.c contains code to generate shell script from
@@ -160,11 +161,20 @@ sh directory:
29. tdump.c contains the code to dump a parse tree into
a file.
30. timers.c contains code for multiple event timeouts.
- 31. trestore contians the code for restoring the parse
+ 31. trestore contains the code for restoring the parse
tree from the file created by tdump.
32. userinit.c contains a dummy userinit() function.
This is now obsolete with the new version of sh_main().
33. waitevent.c contains the sh_waitnotify function so
that builtins can handle processing events when the
shell is waiting for input or for process completion.
- 34. xec.c is the main shell executuion loop.
+ 34. xec.c is the main shell execution loop.
+edit directory:
+ 1. completion.c contains code for command and file generation and
+ completion.
+ 2. edit.c contains common editing and terminal code for vi and
+ emacs.
+ 3. emacs.c contains code for the emacs editor.
+ 4. hexpand.c contains code for C-shell style history expansions.
+ 5. history.c contains code for creating managing the history file.
+ 6. vi.c contains the code for the vi editor.
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/Makefile b/usr/src/contrib/ast/src/cmd/ksh93/Makefile
new file mode 100644
index 0000000000..f56a1e1cc0
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/Makefile
@@ -0,0 +1,251 @@
+/*
+ * ksh makefile
+ */
+
+SH := $(PWD:B:/[0-9]*$//:N=ksh*:-ksh) /* name of the shell program */
+VERSION = 1.1
+LICENSE = since=1982,author=dgk
+CATALOG = libshell
+ERROR_CONTEXT_T == Error_context_t /* workaround until switch from errorpush()/errorpop() => errorctx() */
+RELEASE := $(SH:/.*sh//)
+SHCOMP := shcomp$(RELEASE)
+
+/*
+ * set these variables to 1 to enable, 0 to disable, null to probe
+ * override SHOPT_foo=1 can be placed one per line in the build dir Makeargs
+ */
+
+SHOPT_2DMATCH == 1 /* two dimensional .sh.match for ${var//pat/str} */
+SHOPT_ACCT == /* accounting */
+SHOPT_ACCTFILE == /* per user accounting info */
+SHOPT_AUDIT == 1 /* enable auditing per SHOPT_AUDITFILE */
+SHOPT_AUDITFILE == "/etc/ksh_audit" /* auditing file */
+SHOPT_BASH == /* bash compatibility code */
+SHOPT_BGX == 1 /* one SIGCHLD trap per completed job */
+SHOPT_BRACEPAT == 1 /* C-shell {...,...} expansions (, required) */
+SHOPT_CMDLIB_HDR == /* -lcmd builtin list (<cmdlist.h>) */
+SHOPT_CMDLIB_DIR == /* SHOPT_CMDLIB_HDR directory prefix (default "/opt/ast/bin") */
+SHOPT_COSHELL == 1 /* build with connection to coshell */
+SHOPT_CRNL == /* accept <cr><nl> for <nl> */
+SHOPT_DYNAMIC == 1 /* dynamic loading for builtins */
+SHOPT_ECHOPRINT == /* make echo equivalent to print */
+SHOPT_EDPREDICT == 1 /* predictive editing */
+SHOPT_ESH == 1 /* emacs/gmacs edit mode */
+SHOPT_FILESCAN == 1 /* fast file scan */
+SHOPT_FIXEDARRAY == 1 /* fixed dimension indexed array */
+SHOPT_FS_3D == /* 3d file system */
+SHOPT_HISTEXPAND == 1 /* csh-style history file expansions */
+SHOPT_KIA == 1 /* shell information database generation */
+SHOPT_MULTIBYTE == 1 /* multibyte character handling */
+SHOPT_NAMESPACE == 1 /* allow namespaces */
+SHOPT_OLDTERMIO == /* support both TCGETA and TCGETS */
+SHOPT_OPTIMIZE == 1 /* optimize loop invariants */
+SHOPT_PFSH == 1 /* solaris exec_attr(4) profile execution */
+SHOPT_P_SUID == /* real uid's that require -p for set[ug]id */
+SHOPT_RAWONLY == 1 /* make viraw the only vi mode */
+SHOPT_REGRESS == /* enable __regress__ builtin and instrumented intercepts for testing */
+SHOPT_REMOTE == /* enable --rc if running as a remote shell */
+SHOPT_SEVENBIT == /* strip the eigth bit from characters */
+SHOPT_SPAWN == /* use spawnveg for fork/exec */
+SHOPT_STATS == 1 /* add .sh.stats variable */
+SHOPT_SUID_EXEC == 1 /* allow (safe) suid/sgid shell scripts */
+SHOPT_SYSRC == /* attempt . /etc/ksh.kshrc if interactive */
+SHOPT_TIMEOUT == /* number of seconds for shell timeout */
+SHOPT_TYPEDEF == 1 /* enable typeset type definitions */
+SHOPT_VSH == 1 /* vi edit mode */
+
+if CC.HOSTTYPE == "linux.alpha"
+ /* workaround for "BUG IN DYNAMIC LINKER ld.so" */
+ :PACKAGE: - m:static:noinclude /*noCC.EXPORT.DYNAMIC*/
+end
+
+if CC.HOSTTYPE == "*.s390-64"
+ CC.DLL = $(CC.DLLBIG)
+end
+
+if SHOPT_DYNAMIC && ( "$(CC.DIALECT:N=EXPORT=DLL)" || "$(PACKAGE_OPTIONS:N=optimize-space)" )
+ if "$(PACKAGE_OPTIONS:N=optimize-space)" && ! SHOPT_CMDLIB_HDR
+ SHOPT_CMDLIB_HDR == <cmdlist.h>
+ end
+ CCFLAGS += $$(CC.DLL) $$(CC.SUFFIX.DEBUG:+$$(CC.DEBUG))
+ LIBS_req = -lshell$(RELEASE)
+else
+ if VARIANT
+ SHOPT_DYNAMIC = 1
+ else
+ libtype = :static
+ end
+ if SHOPT_DYNAMIC
+ CCLDFLAGS += $$(CC.EXPORT.DYNAMIC)
+ end
+ LIBS_req = +lshell$(RELEASE)
+end
+
+:PACKAGE: ast$(libtype):20100309 coshell:order --clobber=!($(SH))
+
+.SOURCE : edit sh bltins data tests fun
+.SOURCE.h : include
+
+/* documentation files */
+DOCFILES = sh.memo builtins.mm README RELEASE TYPES PROMO.mm COMPATIBILITY \
+ DESIGN OBSOLETE RELEASE93 RELEASE88
+
+KSHELL == 1 /* this is ksh */
+
+SH_CMDLIB_DIR == /* SHOPT_CMDLIB_DIR dir prefix */
+SH_DICT == /* message catalog */
+DEBUG == /* debugging purposes only */
+
+if CC.HOSTTYPE == "win32*"
+ SHOPT_CRNL == 1 /* <cr><nl> is eqivalent to <nl> */
+end
+
+if SHOPT_BASH
+ BASH_HOSTTYPE == "$(CC.HOSTTYPE:S:/\.//)"
+ BASH_MACHTYPE == "$(BASH_HOSTTYPE)-unknown-$(CC.HOSTTYPE:B)"
+end
+
+/* use the following libraries only if they exist */
+LIBS_opt := +ljobs +li
+
+if CC.HOSTTYPE == "sol([89]|[1-9][0-9]).*"
+ LDFLAGS += $(CC.LD.LAZY) $(CC.LD.NORECORD)
+end
+
+if "$(-mam:N=static*)"
+ LIBS_opt += -lsocket -lnsl
+elif CC.HOSTTYPE == "sol?([789]|[1-9][0-9]).*"
+ LIBS_opt += +lsocket -lnsl
+elif CC.HOSTTYPE != "sgi.mips*"
+ LIBS_opt += +lsocket +lnsl
+end
+if CC.HOSTTYPE == "linux.sparc*"
+ /* the linux.sparc linker still has some problems */
+ LIBS_opt += -ldll
+end
+LIBS_opt += -lsecdb
+if CC.HOSTTYPE == "sol.*"
+ LIBS_opt += -lw
+end
+$(LIBS_opt) : .DONTCARE
+
+LDLIBRARIES = $(LIBS_opt)
+
+FILES_opt = /* optional file list enabled by vars above */
+if SHOPT_ESH
+ FILES_opt += emacs.c
+end
+if SHOPT_VSH
+ FILES_opt += vi.c
+end
+if SHOPT_BASH
+ FILES_opt += bash.c bash_pre_rc.c
+ SHOPT_HISTEXPAND == 1
+end
+if SHOPT_HISTEXPAND
+ FILES_opt += hexpand.c
+end
+if SHOPT_DYNAMIC
+ FILES_opt += -ldll
+end
+if SHOPT_X
+ LDFLAGS += -u _XtAppInitialize -L/usr/add-on/X11/lib
+end
+
+:ALL: $(SH) $(SHCOMP) $(SHOPT_SUID_EXEC:+suid_exec) $(SHOPT_BASH:+bash$(RELEASE))
+
+$(SH) :: sh.1 pmain.c $(LIBS_req)
+
+DATAFILES = limits.c msg.c strdata.c testops.c keywords.c options.c \
+ signals.c aliases.c builtins.c variables.c lexstates.c
+
+shell$(RELEASE) $(VERSION) id=shell :LIBRARY: shell.3 nval.3 alarm.c cd_pwd.c cflow.c deparse.c \
+ enum.c getopts.c hist.c misc.c print.c read.c sleep.c trap.c test.c \
+ typeset.c ulimit.c umask.c whence.c main.c nvdisc.c nvtype.c \
+ arith.c args.c array.c completion.c defs.c edit.c expand.c regress.c \
+ fault.c fcin.c history.c init.c io.c jobs.c lex.c macro.c name.c \
+ nvtree.c parse.c path.c string.c streval.c subshell.c tdump.c timers.c \
+ trestore.c waitevent.c xec.c env.c $(DATAFILES) $(FILES_opt) \
+ $(SHOPT_COSHELL:+-lcoshell) -lcmd -last -lm
+
+"sol*.i386*" :NOOPTIMIZE: main.c
+"win32*" :NOOPTIMIZE: strdata.c trestore.c
+
+if CC.HOSTTYPE == "win32*"
+:DLL: $(CC.DEBUG)
+else
+:DLL: $(CC.OPTIMIZE)
+end
+
+:READONLY: $(DATAFILES)
+
+$(INCLUDEDIR) :INSTALLPROTO: nval.h shell.h history.h
+
+LIBCMD = $(.LIB.NAME. cmd:T=F)
+
+if SHOPT_SUID_EXEC && ! "$(RELEASE)"
+suid_exec :: CC.DLL= suid_exec.c +last
+end
+
+$(SHCOMP) :: CC.DLL= SH_DICT='"libshell"' shcomp.c $(LIBS_req)
+
+$(FUNDIR) :INSTALLDIR: mode=+x dirs popd pushd
+
+shcomp.o : _BLD_DLL= $(CC.HOSTTYPE:N=cygwin.*:??_BLD_shell=?)
+
+if SHOPT_BASH
+
+bash$(RELEASE) :LINK: $(SH)
+
+bash_pre_rc.c : bash_pre_rc.sh
+ echo "const char bash_pre_rc[] = " > $(<)
+ sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/'"'"'/\\'"'"'/g' -e 's/^[[:space:]]*\(.*\)$/\"\1\\n\"/' $(*) >> $(<)
+ echo ";" >> $(<)
+
+end
+
+:: math.tab syscall.s mamexec mamstate.c $(DOCFILES) \
+ bash.c bash_pre_rc.sh hexpand.c mkservice.c \
+ shopen.mk shopen.c
+
+:: shtests \
+ alias.sh append.sh arith.sh arrays.sh arrays2.sh \
+ attributes.sh basic.sh bracket.sh builtins.sh case.sh \
+ comvar.sh comvario.sh coprocess.sh cubetype.sh enum.sh exit.sh \
+ expand.sh functions.sh glob.sh grep.sh heredoc.sh io.sh \
+ leaks.sh locale.sh math.sh nameref.sh namespace.sh options.sh \
+ path.sh pointtype.sh pty.sh quoting.sh quoting2.sh readcsv.sh \
+ recttype.sh restricted.sh return.sh select.sh shtests \
+ sigchld.sh signal.sh statics.sh subshell.sh substring.sh \
+ tilde.sh timetype.sh treemove.sh types.sh variables.sh \
+ vartree1.sh vartree2.sh
+
+:: ksh-regress.rt ksh-regress.tst
+
+if "$(PWD:B:N=cc-*)"
+
+test : .NULL
+
+else
+
+test : test.ksh
+
+test.ksh : $(BINDIR)/$(SH) $(SH) shtests
+ $(SILENT) $(CMP) $(CMPFLAGS) $(*:O=1) $(*:O=2) 2>/dev/null ||
+ echo "make install to run the tests on the latest $(SH)" >&2
+ cd $(*:O=3:P=L!:D)
+ SHELL=$(*:O=1:P=A) $(*:O=1:P=A) $(*:O=3:B) $(SHTESTSFLAGS)
+
+test.% : %.sh COSHELL_OPTIONS=separate $(BINDIR)/$(SH) $(SH) shtests
+ $(SILENT) $(CMP) $(CMPFLAGS) $(*:O=2) $(*:O=3) 2>/dev/null ||
+ echo "make install to run the tests on the latest $(SH)" >&2
+ cd $(*:O=4:P=L!:D)
+ SHELL=$(*:O=2:P=A) $(*:O=2:P=A) $(*:O=4:B) $(SHTESTSFLAGS) $(*:O=1:P=A)
+
+if RELEASE
+
+.INSTALL : .CLEAR $(*.INSTALL:N=*$(RELEASE)*([!/]))
+
+end
+
+end
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/Mamfile b/usr/src/contrib/ast/src/cmd/ksh93/Mamfile
new file mode 100644
index 0000000000..a0e9d564d0
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/Mamfile
@@ -0,0 +1,1525 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+setv INSTALLROOT ../../..
+setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
+setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+make ksh
+make pmain.o
+make sh/pmain.c
+make FEATURE/externs implicit
+meta FEATURE/externs features/%>FEATURE/% features/externs externs
+make features/externs
+done features/externs
+exec - set -
+exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c 1.${COTEMP}.c &&
+exec - x=`${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
+exec - {
+exec - case "" in
+exec - *?) echo " " ;;
+exec - esac
+exec - for i in shell dll coshell cmd ast m jobs i socket nsl secdb
+exec - do case $i in
+exec - "shell"|shell)
+exec - ;;
+exec - *) if test -f ${INSTALLROOT}/lib/lib/$i
+exec - then y=`cat ${INSTALLROOT}/lib/lib/$i`
+exec - case $y in
+exec - *-?*) echo "" $y ;;
+exec - esac
+exec - continue
+exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a
+exec - then case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) continue ;;
+exec - esac
+exec - ;;
+exec - esac
+exec - fi
+exec - ;;
+exec - esac
+exec - echo " -l$i"
+exec - done
+exec - } > shell.req
+exec - rm -f 1.${COTEMP}.*
+bind -ldll
+bind -lcoshell
+bind -lcmd
+bind -last
+bind -lm dontcare
+bind -lnsl dontcare
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/externs
+done FEATURE/externs generated
+make include/shell.h implicit
+make ${PACKAGE_ast_INCLUDE}/cmd.h implicit
+make ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit
+done ${PACKAGE_ast_INCLUDE}/dlldefs.h dontcare
+make ${PACKAGE_ast_INCLUDE}/cmdext.h implicit
+make ${PACKAGE_ast_INCLUDE}/shcmd.h implicit
+make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
+done ${PACKAGE_ast_INCLUDE}/shcmd.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/cmdext.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit
+make ${PACKAGE_ast_INCLUDE}/stak.h implicit
+make ${PACKAGE_ast_INCLUDE}/stk.h implicit
+make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare
+make ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare
+done ${PACKAGE_ast_INCLUDE}/endian.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+make ${PACKAGE_ast_INCLUDE}/regex.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare
+done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare
+make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare
+done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/regex.h dontcare
+make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
+prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare
+done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/stk.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/stak.h dontcare
+make ${PACKAGE_ast_INCLUDE}/error.h implicit
+make ${PACKAGE_ast_INCLUDE}/option.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/option.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/error.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/cmd.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit
+make include/nval.h implicit
+prev ${PACKAGE_ast_INCLUDE}/option.h implicit
+make ${PACKAGE_ast_INCLUDE}/cdt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/cdt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/nval.h dontcare
+make include/name.h implicit
+prev include/nval.h implicit
+prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/name.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/shell.h
+done sh/pmain.c
+meta pmain.o %.c>%.o sh/pmain.c pmain
+prev sh/pmain.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c sh/pmain.c
+done pmain.o generated
+make libshell.a archive
+prev shell.req
+make alarm.o
+make bltins/alarm.c
+make FEATURE/time implicit
+meta FEATURE/time features/%>FEATURE/% features/time time
+make features/time
+done features/time
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/time
+make ${PACKAGE_ast_INCLUDE}/times.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_time.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/times.h dontcare
+done FEATURE/time generated
+make include/builtins.h implicit
+make include/shtable.h implicit
+done include/shtable.h dontcare
+make FEATURE/dynamic implicit
+meta FEATURE/dynamic features/%>FEATURE/% features/dynamic dynamic
+make features/dynamic
+done features/dynamic
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/dynamic
+make ${PACKAGE_ast_INCLUDE}/fs3d.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/fs3d.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit
+done FEATURE/dynamic dontcare generated
+make FEATURE/options implicit
+meta FEATURE/options features/%>FEATURE/% features/options options
+make features/options
+done features/options
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/options
+done FEATURE/options dontcare generated
+prev ${PACKAGE_ast_INCLUDE}/option.h implicit
+done include/builtins.h
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+make include/defs.h implicit
+make include/regress.h implicit
+done include/regress.h dontcare
+prev include/shtable.h implicit
+prev include/shell.h implicit
+make include/env.h implicit
+done include/env.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev include/name.h implicit
+make include/argnod.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+done include/argnod.h dontcare
+make include/fault.h implicit
+make FEATURE/sigfeatures implicit
+meta FEATURE/sigfeatures features/%>FEATURE/% features/sigfeatures sigfeatures
+make features/sigfeatures
+done features/sigfeatures
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/sigfeatures
+done FEATURE/sigfeatures dontcare generated
+make FEATURE/setjmp implicit
+meta FEATURE/setjmp features/%>FEATURE/% features/setjmp setjmp
+make features/setjmp
+done features/setjmp
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/setjmp
+done FEATURE/setjmp dontcare generated
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+make ${PACKAGE_ast_INCLUDE}/sig.h implicit
+done ${PACKAGE_ast_INCLUDE}/sig.h dontcare
+done include/fault.h dontcare
+make include/history.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/history.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit
+prev FEATURE/options implicit
+prev FEATURE/externs implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/defs.h
+done bltins/alarm.c
+meta alarm.o %.c>%.o bltins/alarm.c alarm
+prev bltins/alarm.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DERROR_CONTEXT_T=Error_context_t -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c bltins/alarm.c
+done alarm.o generated
+make cd_pwd.o
+make bltins/cd_pwd.c
+make ${PACKAGE_ast_INCLUDE}/ls.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_mode.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ls.h
+prev include/builtins.h implicit
+prev include/name.h implicit
+make include/path.h implicit
+make FEATURE/acct implicit
+meta FEATURE/acct >FEATURE/% acct
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def acct
+done FEATURE/acct dontcare generated
+prev include/defs.h implicit
+prev include/nval.h implicit
+prev FEATURE/options implicit
+done include/path.h
+make include/variables.h implicit
+prev FEATURE/dynamic implicit
+prev FEATURE/options implicit
+prev ${PACKAGE_ast_INCLUDE}/option.h implicit
+done include/variables.h
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev include/defs.h implicit
+done bltins/cd_pwd.c
+meta cd_pwd.o %.c>%.o bltins/cd_pwd.c cd_pwd
+prev bltins/cd_pwd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -DSHOPT_FIXEDARRAY -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -c bltins/cd_pwd.c
+done cd_pwd.o generated
+make cflow.o
+make bltins/cflow.c
+prev include/builtins.h implicit
+make include/shnodes.h implicit
+prev include/argnod.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/shnodes.h
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev include/defs.h implicit
+done bltins/cflow.c
+meta cflow.o %.c>%.o bltins/cflow.c cflow
+prev bltins/cflow.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c bltins/cflow.c
+done cflow.o generated
+make deparse.o
+make sh/deparse.c
+make include/test.h implicit
+prev include/shtable.h implicit
+prev include/defs.h implicit
+prev FEATURE/options implicit
+done include/test.h
+prev include/shnodes.h implicit
+prev include/defs.h implicit
+done sh/deparse.c
+meta deparse.o %.c>%.o sh/deparse.c deparse
+prev sh/deparse.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c sh/deparse.c
+done deparse.o generated
+make enum.o
+make bltins/enum.c
+prev include/shell.h implicit
+done bltins/enum.c
+meta enum.o %.c>%.o bltins/enum.c enum
+prev bltins/enum.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libshell"\" -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c bltins/enum.c
+done enum.o generated
+make getopts.o
+make bltins/getopts.c
+prev include/builtins.h implicit
+prev include/nval.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+done bltins/getopts.c
+meta getopts.o %.c>%.o bltins/getopts.c getopts
+prev bltins/getopts.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_NAMESPACE -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -DSHOPT_STATS -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c bltins/getopts.c
+done getopts.o generated
+make hist.o
+make bltins/hist.c
+make include/edit.h implicit
+make include/national.h implicit
+done include/national.h dontcare
+make include/terminal.h implicit
+make FEATURE/ttys implicit
+meta FEATURE/ttys features/%>FEATURE/% features/ttys ttys
+make features/ttys
+done features/ttys
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/ttys
+done FEATURE/ttys dontcare generated
+done include/terminal.h dontcare
+prev FEATURE/setjmp implicit
+prev ${PACKAGE_ast_INCLUDE}/sig.h implicit
+make FEATURE/locale implicit
+meta FEATURE/locale features/%>FEATURE/% features/locale locale
+make features/locale
+done features/locale
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/locale
+done FEATURE/locale dontcare generated
+prev FEATURE/options implicit
+done include/edit.h dontcare
+prev include/builtins.h implicit
+prev include/history.h implicit
+prev include/name.h implicit
+make include/io.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/io.h
+prev include/variables.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev include/defs.h implicit
+done bltins/hist.c
+meta hist.o %.c>%.o bltins/hist.c hist
+prev bltins/hist.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_MULTIBYTE -DKSHELL -DSHOPT_ESH -DSHOPT_VSH -D_PACKAGE_ast -DSHOPT_PFSH -D_BLD_shell -DSHOPT_DYNAMIC -D_API_ast=20100309 -DSHOPT_FIXEDARRAY -DERROR_CONTEXT_T=Error_context_t -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -c bltins/hist.c
+done hist.o generated
+make misc.o
+make bltins/misc.c
+make include/jobs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev include/terminal.h implicit
+make ${PACKAGE_ast_INCLUDE}/coshell.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/coshell.h dontcare
+prev FEATURE/options implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/jobs.h
+prev include/builtins.h implicit
+prev include/history.h implicit
+prev include/name.h implicit
+prev include/io.h implicit
+prev include/path.h implicit
+prev include/shnodes.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+done bltins/misc.c
+meta misc.o %.c>%.o bltins/misc.c misc
+prev bltins/misc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_BGX -DSHOPT_COSHELL -DSHOPT_MULTIBYTE -DSHOPT_PFSH -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_ESH -DSHOPT_FIXEDARRAY -DKSHELL -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -c bltins/misc.c
+done misc.o generated
+make print.o
+make bltins/print.c
+make ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_ccode.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_ccode.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ccode.h
+make ${PACKAGE_ast_INCLUDE}/tmx.h implicit
+make ${PACKAGE_ast_INCLUDE}/tv.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done ${PACKAGE_ast_INCLUDE}/tv.h dontcare
+make ${PACKAGE_ast_INCLUDE}/tm.h implicit
+prev ${PACKAGE_ast_INCLUDE}/times.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/tm.h dontcare
+done ${PACKAGE_ast_INCLUDE}/tmx.h
+make include/streval.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_float.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_float.h dontcare
+prev include/defs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done include/streval.h
+prev include/builtins.h implicit
+prev include/history.h implicit
+prev include/name.h implicit
+prev include/io.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/defs.h implicit
+done bltins/print.c
+meta print.o %.c>%.o bltins/print.c print
+prev bltins/print.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_MULTIBYTE -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_DYNAMIC -DKSHELL -c bltins/print.c
+done print.o generated
+make read.o
+make bltins/read.c
+prev include/edit.h implicit
+prev include/terminal.h implicit
+prev include/history.h implicit
+prev include/builtins.h implicit
+prev include/name.h implicit
+prev include/io.h implicit
+make include/lexstates.h implicit
+prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+prev FEATURE/locale implicit
+done include/lexstates.h
+prev include/variables.h implicit
+prev include/defs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done bltins/read.c
+meta read.o %.c>%.o bltins/read.c read
+prev bltins/read.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_MULTIBYTE -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DKSHELL -DSHOPT_ESH -DSHOPT_VSH -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_FIXEDARRAY -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DERROR_CONTEXT_T=Error_context_t -c bltins/read.c
+done read.o generated
+make sleep.o
+make bltins/sleep.c
+make FEATURE/poll implicit
+meta FEATURE/poll features/%>FEATURE/% features/poll poll
+make features/poll
+done features/poll
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/poll
+done FEATURE/poll generated
+prev FEATURE/time implicit
+prev include/builtins.h implicit
+prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/defs.h implicit
+done bltins/sleep.c
+meta sleep.o %.c>%.o bltins/sleep.c sleep
+prev bltins/sleep.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DERROR_CONTEXT_T=Error_context_t -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c bltins/sleep.c
+done sleep.o generated
+make trap.o
+make bltins/trap.c
+prev include/builtins.h implicit
+prev include/jobs.h implicit
+prev include/defs.h implicit
+done bltins/trap.c
+meta trap.o %.c>%.o bltins/trap.c trap
+prev bltins/trap.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DSHOPT_BGX -DSHOPT_COSHELL -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c bltins/trap.c
+done trap.o generated
+make test.o
+make bltins/test.c
+prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit
+prev FEATURE/poll implicit
+prev FEATURE/externs implicit
+prev include/builtins.h implicit
+prev include/test.h implicit
+prev include/terminal.h implicit
+prev include/io.h implicit
+prev ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/defs.h implicit
+done bltins/test.c
+meta test.o %.c>%.o bltins/test.c test
+prev bltins/test.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DKSHELL -c bltins/test.c
+done test.o generated
+make typeset.o
+make bltins/typeset.c
+prev FEATURE/dynamic implicit
+prev include/variables.h implicit
+prev include/builtins.h implicit
+prev include/history.h implicit
+prev include/name.h implicit
+prev include/path.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/defs.h implicit
+done bltins/typeset.c
+meta typeset.o %.c>%.o bltins/typeset.c typeset
+prev bltins/typeset.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_FIXEDARRAY -DSHOPT_DYNAMIC -DSHOPT_NAMESPACE -DSHOPT_TYPEDEF -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -D_BLD_shell -DSHOPT_ESH -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -c bltins/typeset.c
+done typeset.o generated
+make ulimit.o
+make bltins/ulimit.c
+make include/ulimit.h implicit
+make FEATURE/rlimits implicit
+meta FEATURE/rlimits features/%>FEATURE/% features/rlimits rlimits
+make features/rlimits
+done features/rlimits
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/rlimits
+done FEATURE/rlimits dontcare generated
+prev FEATURE/time implicit
+done include/ulimit.h
+prev include/name.h implicit
+prev include/builtins.h implicit
+prev include/defs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done bltins/ulimit.c
+meta ulimit.o %.c>%.o bltins/ulimit.c ulimit
+prev bltins/ulimit.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_FIXEDARRAY -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -c bltins/ulimit.c
+done ulimit.o generated
+make umask.o
+make bltins/umask.c
+prev include/builtins.h implicit
+prev include/shell.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done bltins/umask.c
+meta umask.o %.c>%.o bltins/umask.c umask
+prev bltins/umask.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c bltins/umask.c
+done umask.o generated
+make whence.o
+make bltins/whence.c
+prev include/builtins.h implicit
+make include/shlex.h implicit
+prev include/lexstates.h implicit
+prev include/shtable.h implicit
+prev include/shnodes.h implicit
+prev FEATURE/options implicit
+prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit
+done include/shlex.h
+prev include/path.h implicit
+prev include/name.h implicit
+prev include/shtable.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/defs.h implicit
+done bltins/whence.c
+meta whence.o %.c>%.o bltins/whence.c whence
+prev bltins/whence.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DSHOPT_KIA -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c bltins/whence.c
+done whence.o generated
+make main.o
+make sh/main.c
+make execargs.h implicit
+done execargs.h dontcare virtual
+make nc.h implicit
+done nc.h dontcare virtual
+prev FEATURE/externs implicit
+make FEATURE/execargs implicit
+meta FEATURE/execargs >FEATURE/% execargs
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def execargs
+done FEATURE/execargs generated
+make FEATURE/pstat implicit
+meta FEATURE/pstat >FEATURE/% pstat
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def pstat
+done FEATURE/pstat generated
+prev FEATURE/time implicit
+make include/timeout.h implicit
+done include/timeout.h
+prev include/history.h implicit
+prev include/shnodes.h implicit
+prev include/shlex.h implicit
+prev include/jobs.h implicit
+prev include/io.h implicit
+prev include/path.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+make include/fcin.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+done include/fcin.h
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done sh/main.c
+meta main.o %.c>%.o sh/main.c main
+prev sh/main.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} ${SHOPT_TIMEOUT+-DSHOPT_TIMEOUT=${SHOPT_TIMEOUT}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SH_DICT+-DSH_DICT=${SH_DICT}} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_BASH+-DSHOPT_BASH=${SHOPT_BASH}} ${SHOPT_REMOTE+-DSHOPT_REMOTE=${SHOPT_REMOTE}} ${SHOPT_OLDTERMIO+-DSHOPT_OLDTERMIO=${SHOPT_OLDTERMIO}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${SHOPT_FS_3D+-DSHOPT_FS_3D=${SHOPT_FS_3D}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_ESH -D_BLD_shell -DSHOPT_KIA -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_BGX -DSHOPT_COSHELL -DKSHELL -DSHOPT_SUID_EXEC -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_DYNAMIC -c sh/main.c
+done main.o generated
+make nvdisc.o
+make sh/nvdisc.c
+prev include/path.h implicit
+prev include/builtins.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+done sh/nvdisc.c
+meta nvdisc.o %.c>%.o sh/nvdisc.c nvdisc
+prev sh/nvdisc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_TYPEDEF -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -D_BLD_shell -DSHOPT_STATS -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -DSHOPT_DYNAMIC -c sh/nvdisc.c
+done nvdisc.o generated
+make nvtype.o
+make sh/nvtype.c
+prev include/variables.h implicit
+prev include/io.h implicit
+prev include/defs.h implicit
+done sh/nvtype.c
+meta nvtype.o %.c>%.o sh/nvtype.c nvtype
+prev sh/nvtype.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_TYPEDEF -DSHOPT_FIXEDARRAY -DSHOPT_NAMESPACE -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -D_BLD_shell -DKSHELL -DSHOPT_STATS -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -c sh/nvtype.c
+done nvtype.o generated
+make arith.o
+make sh/arith.c
+prev include/builtins.h implicit
+prev include/variables.h implicit
+prev include/streval.h implicit
+prev include/name.h implicit
+prev include/lexstates.h implicit
+prev include/defs.h implicit
+done sh/arith.c
+meta arith.o %.c>%.o sh/arith.c arith
+prev sh/arith.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_FIXEDARRAY -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -c sh/arith.c
+done arith.o generated
+make args.o
+make sh/args.c
+prev include/io.h implicit
+prev include/shlex.h implicit
+prev FEATURE/poll implicit
+prev include/edit.h implicit
+prev include/terminal.h implicit
+prev include/builtins.h implicit
+prev include/path.h implicit
+prev include/defs.h implicit
+done sh/args.c
+meta args.o %.c>%.o sh/args.c args
+prev sh/args.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_OPTIMIZE -DSHOPT_RAWONLY -DSHOPT_HISTEXPAND -DSHOPT_PFSH -D_BLD_shell -DKSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_KIA -DSHOPT_MULTIBYTE -DSHOPT_EDPREDICT -DSHOPT_ESH -DSHOPT_VSH -DSHOPT_DYNAMIC -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c sh/args.c
+done args.o generated
+make array.o
+make sh/array.c
+prev include/name.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev include/defs.h implicit
+done sh/array.c
+meta array.o %.c>%.o sh/array.c array
+prev sh/array.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_TYPEDEF -DSHOPT_FIXEDARRAY -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -DSHOPT_MULTIBYTE -c sh/array.c
+done array.o generated
+make completion.o
+make edit/completion.c
+prev include/history.h implicit
+prev include/edit.h implicit
+prev include/io.h implicit
+prev include/path.h implicit
+prev include/lexstates.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+prev include/defs.h implicit
+done edit/completion.c
+meta completion.o %.c>%.o edit/completion.c completion
+prev edit/completion.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_MULTIBYTE -DSHOPT_ESH -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DKSHELL -DSHOPT_VSH -DSHOPT_PFSH -D_BLD_shell -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c edit/completion.c
+done completion.o generated
+make defs.o
+make sh/defs.c
+prev include/timeout.h implicit
+prev include/edit.h implicit
+prev include/shlex.h implicit
+prev include/jobs.h implicit
+prev include/defs.h implicit
+done sh/defs.c
+meta defs.o %.c>%.o sh/defs.c defs
+prev sh/defs.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_MULTIBYTE -DKSHELL -DSHOPT_ESH -DSHOPT_VSH -D_PACKAGE_ast -DSHOPT_PFSH -DSHOPT_KIA -D_API_ast=20100309 -D_BLD_shell -DSHOPT_BGX -DSHOPT_COSHELL -DSHOPT_STATS -DSHOPT_NAMESPACE -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c sh/defs.c
+done defs.o generated
+make edit.o
+make edit/edit.c
+prev include/edit.h implicit
+prev include/history.h implicit
+prev include/terminal.h implicit
+prev include/io.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+make FEATURE/cmds implicit
+meta FEATURE/cmds features/%>FEATURE/% features/cmds cmds
+make features/cmds
+done features/cmds
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/cmds
+done FEATURE/cmds generated
+prev FEATURE/time implicit
+prev FEATURE/options implicit
+prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done edit/edit.c
+meta edit.o %.c>%.o edit/edit.c edit
+prev edit/edit.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_EDPREDICT -DSHOPT_RAWONLY -DSHOPT_ESH -DSHOPT_VSH -DSHOPT_MULTIBYTE -DSHOPT_HISTEXPAND -DKSHELL -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c edit/edit.c
+done edit.o generated
+make expand.o
+make sh/expand.c
+prev include/path.h implicit
+prev include/io.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_dir.h implicit
+make ${PACKAGE_ast_INCLUDE}/dirent.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_dirent.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_dirent.h dontcare
+done ${PACKAGE_ast_INCLUDE}/dirent.h dontcare
+make dirlib.h implicit
+done dirlib.h dontcare virtual
+prev ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_dir.h
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+make ${PACKAGE_ast_INCLUDE}/glob.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/glob.h
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev include/test.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+done sh/expand.c
+meta expand.o %.c>%.o sh/expand.c expand
+prev sh/expand.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -DSHOPT_SUID_EXEC -D_BLD_shell -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -DKSHELL -DSHOPT_DYNAMIC -c sh/expand.c
+done expand.o generated
+make regress.o
+make bltins/regress.c
+prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit
+prev include/builtins.h implicit
+prev include/io.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/defs.h implicit
+done bltins/regress.c
+meta regress.o %.c>%.o bltins/regress.c regress
+prev bltins/regress.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DKSHELL -DERROR_CONTEXT_T=Error_context_t -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c bltins/regress.c
+done regress.o generated
+make fault.o
+make sh/fault.c
+prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev include/ulimit.h implicit
+prev include/builtins.h implicit
+prev include/path.h implicit
+prev include/jobs.h implicit
+prev include/variables.h implicit
+prev include/shlex.h implicit
+prev include/history.h implicit
+prev include/io.h implicit
+prev include/fcin.h implicit
+prev include/defs.h implicit
+done sh/fault.c
+meta fault.o %.c>%.o sh/fault.c fault
+prev sh/fault.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_KIA -DSHOPT_ESH -DSHOPT_VSH -DSHOPT_TYPEDEF -DSHOPT_BGX -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -DSHOPT_PFSH -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DKSHELL -c sh/fault.c
+done fault.o generated
+make fcin.o
+make sh/fcin.c
+prev include/fcin.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done sh/fcin.c
+meta fcin.o %.c>%.o sh/fcin.c fcin
+prev sh/fcin.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_MULTIBYTE -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/fcin.c
+done fcin.o generated
+make history.o
+make edit/history.c
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+prev include/history.h implicit
+prev include/io.h implicit
+prev include/builtins.h implicit
+prev include/path.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev FEATURE/time implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done edit/history.c
+meta history.o %.c>%.o edit/history.c history
+prev edit/history.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_VSH -DSHOPT_ESH -DSHOPT_MULTIBYTE -DSHOPT_AUDITFILE=\""/etc/ksh_audit"\" -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DSHOPT_DYNAMIC -DSHOPT_PFSH -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_AUDIT -c edit/history.c
+done history.o generated
+make init.o
+make sh/init.c
+prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+make include/version.h implicit
+done include/version.h
+prev include/lexstates.h implicit
+prev FEATURE/externs implicit
+prev FEATURE/dynamic implicit
+prev FEATURE/time implicit
+prev include/builtins.h implicit
+prev include/shlex.h implicit
+prev include/io.h implicit
+prev include/jobs.h implicit
+prev include/edit.h implicit
+prev include/name.h implicit
+prev include/fault.h implicit
+prev include/path.h implicit
+prev include/variables.h implicit
+prev ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev include/defs.h implicit
+done sh/init.c
+meta init.o %.c>%.o sh/init.c init
+prev sh/init.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_2DMATCH -DSHOPT_PFSH -DSHOPT_MULTIBYTE -DSHOPT_BGX -DSHOPT_COSHELL -DSHOPT_AUDIT -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_DYNAMIC -D_BLD_shell -DSHOPT_KIA -DKSHELL -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_ESH -DSHOPT_VSH -DSHOPT_FIXEDARRAY -DERROR_CONTEXT_T=Error_context_t -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -c sh/init.c
+done init.o generated
+make io.o
+make sh/io.c
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev FEATURE/poll implicit
+prev FEATURE/dynamic implicit
+prev FEATURE/externs implicit
+prev include/timeout.h implicit
+prev include/edit.h implicit
+prev include/history.h implicit
+prev include/shnodes.h implicit
+prev include/jobs.h implicit
+prev include/io.h implicit
+prev include/path.h implicit
+prev include/variables.h implicit
+prev ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev include/fcin.h implicit
+prev include/defs.h implicit
+done sh/io.c
+meta io.o %.c>%.o sh/io.c io
+prev sh/io.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_RAWONLY -DSHOPT_VSH -DSHOPT_ESH -DSHOPT_HISTEXPAND -DSHOPT_COSHELL -DSHOPT_DYNAMIC -DSHOPT_EDPREDICT -DSHOPT_MULTIBYTE -DKSHELL -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -D_BLD_shell -DSHOPT_BGX -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c sh/io.c
+done io.o generated
+make jobs.o
+make sh/jobs.c
+prev include/history.h implicit
+prev include/jobs.h implicit
+prev include/io.h implicit
+make ${PACKAGE_ast_INCLUDE}/wait.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wait.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_wait.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/wait.h
+prev include/defs.h implicit
+done sh/jobs.c
+meta jobs.o %.c>%.o sh/jobs.c jobs
+prev sh/jobs.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_VSH -DSHOPT_COSHELL -DSHOPT_BGX -DSHOPT_ESH -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_MULTIBYTE -DSHOPT_PFSH -D_BLD_shell -DKSHELL -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c sh/jobs.c
+done jobs.o generated
+make lex.o
+make sh/lex.c
+prev include/shlex.h implicit
+prev include/io.h implicit
+prev include/lexstates.h implicit
+prev include/test.h implicit
+prev include/argnod.h implicit
+prev include/shell.h implicit
+prev include/defs.h implicit
+prev FEATURE/options implicit
+prev include/nval.h implicit
+prev include/fcin.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done sh/lex.c
+meta lex.o %.c>%.o sh/lex.c lex
+prev sh/lex.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_TYPEDEF -DSHOPT_MULTIBYTE -DSHOPT_KIA -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DSHOPT_PFSH -DKSHELL -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c sh/lex.c
+done lex.o generated
+make macro.o
+make sh/macro.c
+prev include/streval.h implicit
+prev include/national.h implicit
+prev include/path.h implicit
+prev include/shnodes.h implicit
+prev include/jobs.h implicit
+prev include/io.h implicit
+prev include/shlex.h implicit
+prev include/variables.h implicit
+prev include/name.h implicit
+prev ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev include/fcin.h implicit
+prev include/defs.h implicit
+done sh/macro.c
+meta macro.o %.c>%.o sh/macro.c macro
+prev sh/macro.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -DKSHELL -DSHOPT_COSHELL -DSHOPT_OPTIMIZE -DSHOPT_FIXEDARRAY -DSHOPT_TYPEDEF -DSHOPT_FILESCAN -DSHOPT_MULTIBYTE -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -DSHOPT_SUID_EXEC -DSHOPT_BGX -DSHOPT_KIA -DSHOPT_DYNAMIC -c sh/macro.c
+done macro.o generated
+make name.o
+make sh/name.c
+prev include/builtins.h implicit
+prev include/shnodes.h implicit
+prev include/streval.h implicit
+prev FEATURE/externs implicit
+prev include/timeout.h implicit
+prev include/lexstates.h implicit
+prev include/path.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+done sh/name.c
+meta name.o %.c>%.o sh/name.c name
+prev sh/name.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_OPTIMIZE -DSHOPT_FIXEDARRAY -DSHOPT_NAMESPACE -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DSHOPT_TYPEDEF -DSHOPT_STATS -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -c sh/name.c
+done name.o generated
+make nvtree.o
+make sh/nvtree.c
+prev include/lexstates.h implicit
+prev include/argnod.h implicit
+prev include/name.h implicit
+prev include/defs.h implicit
+done sh/nvtree.c
+meta nvtree.o %.c>%.o sh/nvtree.c nvtree
+prev sh/nvtree.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_FIXEDARRAY -DSHOPT_MULTIBYTE -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -c sh/nvtree.c
+done nvtree.o generated
+make parse.o
+make sh/parse.c
+prev include/path.h implicit
+prev include/test.h implicit
+prev include/builtins.h implicit
+prev include/history.h implicit
+prev include/shlex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/fcin.h implicit
+prev include/shell.h implicit
+prev include/defs.h implicit
+done sh/parse.c
+meta parse.o %.c>%.o sh/parse.c parse
+prev sh/parse.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -D_BLD_shell -DSHOPT_STATS -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -DSHOPT_KIA -DSHOPT_DYNAMIC -DKSHELL -c sh/parse.c
+done parse.o generated
+make path.o
+make sh/path.c
+prev FEATURE/time implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_vfork.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_vfork.h dontcare
+make exec_attr.h implicit
+done exec_attr.h dontcare virtual
+prev FEATURE/externs implicit
+prev FEATURE/dynamic implicit
+prev include/test.h implicit
+prev include/history.h implicit
+prev include/jobs.h implicit
+prev include/io.h implicit
+prev include/path.h implicit
+prev include/variables.h implicit
+prev include/nval.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev include/fcin.h implicit
+prev include/defs.h implicit
+done sh/path.c
+meta path.o %.c>%.o sh/path.c path
+prev sh/path.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_SUID_EXEC -DSHOPT_DYNAMIC -DSHOPT_NAMESPACE -DSHOPT_PFSH -DSHOPT_STATS -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -DSHOPT_BGX -DKSHELL -DSHOPT_BRACEPAT -c sh/path.c
+done path.o generated
+make string.o
+make sh/string.c
+prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+prev include/national.h implicit
+prev include/lexstates.h implicit
+prev include/shtable.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev include/defs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done sh/string.c
+meta string.o %.c>%.o sh/string.c string
+prev sh/string.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_MULTIBYTE -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c sh/string.c
+done string.o generated
+make streval.o
+make sh/streval.c
+prev include/defs.h implicit
+prev FEATURE/externs implicit
+prev ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev include/streval.h implicit
+done sh/streval.c
+meta streval.o %.c>%.o sh/streval.c streval
+prev sh/streval.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c sh/streval.c
+done streval.o generated
+make subshell.o
+make sh/subshell.c
+prev include/path.h implicit
+prev include/variables.h implicit
+prev include/jobs.h implicit
+prev include/shlex.h implicit
+prev include/shnodes.h implicit
+prev include/fault.h implicit
+prev include/io.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev include/defs.h implicit
+done sh/subshell.c
+meta subshell.o %.c>%.o sh/subshell.c subshell
+prev sh/subshell.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_COSHELL -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -D_BLD_shell -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -DSHOPT_DYNAMIC -DSHOPT_BGX -DSHOPT_KIA -DKSHELL -c sh/subshell.c
+done subshell.o generated
+make tdump.o
+make sh/tdump.c
+prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+prev include/io.h implicit
+prev include/path.h implicit
+prev include/shnodes.h implicit
+prev include/defs.h implicit
+done sh/tdump.c
+meta tdump.o %.c>%.o sh/tdump.c tdump
+prev sh/tdump.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c sh/tdump.c
+done tdump.o generated
+make timers.o
+make sh/timers.c
+prev FEATURE/time implicit
+prev FEATURE/sigfeatures implicit
+prev include/defs.h implicit
+prev include/fault.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sig.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done sh/timers.c
+meta timers.o %.c>%.o sh/timers.c timers
+prev sh/timers.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c sh/timers.c
+done timers.o generated
+make trestore.o
+make sh/trestore.c
+prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+prev include/io.h implicit
+prev include/path.h implicit
+prev include/shnodes.h implicit
+prev include/defs.h implicit
+done sh/trestore.c
+meta trestore.o %.c>%.o sh/trestore.c trestore
+prev sh/trestore.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SHOPT_BASH+-DSHOPT_BASH=${SHOPT_BASH}} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} ${SH_DICT+-DSH_DICT=${SH_DICT}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c sh/trestore.c
+done trestore.o generated
+make waitevent.o
+make sh/waitevent.c
+prev include/defs.h implicit
+done sh/waitevent.c
+meta waitevent.o %.c>%.o sh/waitevent.c waitevent
+prev sh/waitevent.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c sh/waitevent.c
+done waitevent.o generated
+make xec.o
+make sh/xec.c
+prev ${PACKAGE_ast_INCLUDE}/ast_vfork.h implicit
+prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev include/streval.h implicit
+prev FEATURE/locale implicit
+prev FEATURE/externs implicit
+prev FEATURE/time implicit
+prev include/builtins.h implicit
+prev include/test.h implicit
+prev include/jobs.h implicit
+prev include/shnodes.h implicit
+prev include/io.h implicit
+prev include/name.h implicit
+prev include/path.h implicit
+prev include/variables.h implicit
+prev include/fcin.h implicit
+prev include/defs.h implicit
+done sh/xec.c
+meta xec.o %.c>%.o sh/xec.c xec
+prev sh/xec.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BGX -DSHOPT_TYPEDEF -DSHOPT_PFSH -DSHOPT_FILESCAN -DSHOPT_COSHELL -DSHOPT_NAMESPACE -DSHOPT_OPTIMIZE -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_STATS -DSHOPT_HISTEXPAND -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -DSHOPT_DYNAMIC -DKSHELL -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -c sh/xec.c
+done xec.o generated
+make env.o
+make sh/env.c
+prev include/env.h implicit
+prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done sh/env.c
+meta env.o %.c>%.o sh/env.c env
+prev sh/env.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -c sh/env.c
+done env.o generated
+make limits.o
+make data/limits.c
+prev include/ulimit.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done data/limits.c
+meta limits.o %.c>%.o data/limits.c limits
+prev data/limits.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -c data/limits.c
+done limits.o generated
+make msg.o
+make data/msg.c
+prev FEATURE/cmds implicit
+prev include/edit.h implicit
+prev include/jobs.h implicit
+prev include/builtins.h implicit
+prev include/history.h implicit
+prev include/timeout.h implicit
+prev include/shlex.h implicit
+prev include/io.h implicit
+prev include/path.h implicit
+prev include/defs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done data/msg.c
+meta msg.o %.c>%.o data/msg.c msg
+prev data/msg.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_SUID_EXEC -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_MULTIBYTE -DKSHELL -DSHOPT_ESH -DSHOPT_VSH -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DSHOPT_BGX -D_BLD_shell -DSHOPT_DYNAMIC -DSHOPT_KIA -DSHOPT_BRACEPAT -DSHOPT_STATS -DSHOPT_NAMESPACE -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c data/msg.c
+done msg.o generated
+make strdata.o
+make data/strdata.c
+make FEATURE/math implicit
+meta FEATURE/math features/%.sh>FEATURE/% features/math.sh math
+make features/math.sh
+make data/math.tab implicit
+done data/math.tab
+done features/math.sh dontcare
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/math.sh ${PACKAGEROOT}/src/cmd/ksh93/data/math.tab
+make ${PACKAGE_ast_INCLUDE}/ast_standards.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_standards.h dontcare
+done FEATURE/math generated
+prev include/streval.h implicit
+prev FEATURE/options implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_standards.h implicit
+done data/strdata.c
+meta strdata.o %.c>%.o data/strdata.c strdata
+prev data/strdata.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SHOPT_BASH+-DSHOPT_BASH=${SHOPT_BASH}} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} ${SH_DICT+-DSH_DICT=${SH_DICT}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c data/strdata.c
+done strdata.o generated
+make testops.o
+make data/testops.c
+prev include/test.h implicit
+prev include/defs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done data/testops.c
+meta testops.o %.c>%.o data/testops.c testops
+prev data/testops.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c data/testops.c
+done testops.o generated
+make keywords.o
+make data/keywords.c
+prev FEATURE/options implicit
+prev include/shlex.h implicit
+prev include/shell.h implicit
+done data/keywords.c
+meta keywords.o %.c>%.o data/keywords.c keywords
+prev data/keywords.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_NAMESPACE -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -DSHOPT_KIA -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c data/keywords.c
+done keywords.o generated
+make options.o
+make data/options.c
+prev include/shtable.h implicit
+prev include/name.h implicit
+prev include/defs.h implicit
+done data/options.c
+meta options.o %.c>%.o data/options.c options
+prev data/options.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_PFSH -DSHOPT_HISTEXPAND -DSHOPT_FIXEDARRAY -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -DSHOPT_MULTIBYTE -c data/options.c
+done options.o generated
+make signals.o
+make data/signals.c
+prev include/defs.h implicit
+done data/signals.c
+meta signals.o %.c>%.o data/signals.c signals
+prev data/signals.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -c data/signals.c
+done signals.o generated
+make aliases.o
+make data/aliases.c
+prev FEATURE/dynamic implicit
+prev FEATURE/options implicit
+prev include/defs.h implicit
+done data/aliases.c
+meta aliases.o %.c>%.o data/aliases.c aliases
+prev data/aliases.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_DYNAMIC -DSHOPT_MULTIBYTE -D_PACKAGE_ast -DSHOPT_PFSH -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -D_BLD_shell -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c data/aliases.c
+done aliases.o generated
+make builtins.o
+make data/builtins.c
+prev FEATURE/cmds implicit
+prev include/jobs.h implicit
+prev include/builtins.h implicit
+prev include/version.h implicit
+prev include/name.h implicit
+prev include/ulimit.h implicit
+prev include/shtable.h implicit
+prev include/defs.h implicit
+done data/builtins.c
+meta builtins.o %.c>%.o data/builtins.c builtins
+prev data/builtins.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_TYPEDEF -DSHOPT_KIA -DSHOPT_PFSH -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -DSHOPT_BRACEPAT -DSHOPT_HISTEXPAND -DSHOPT_COSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_BGX -DSHOPT_MULTIBYTE -D_BLD_shell -DSHOPT_DYNAMIC -DKSHELL -DSHOPT_FIXEDARRAY -DSHOPT_STATS -DSHOPT_NAMESPACE -DERROR_CONTEXT_T=Error_context_t -DSHOPT_ESH -c data/builtins.c
+done builtins.o generated
+make variables.o
+make data/variables.c
+prev include/builtins.h implicit
+prev include/variables.h implicit
+prev include/defs.h implicit
+prev include/name.h implicit
+prev include/shtable.h implicit
+prev include/shell.h implicit
+prev FEATURE/dynamic implicit
+prev FEATURE/options implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done data/variables.c
+meta variables.o %.c>%.o data/variables.c variables
+prev data/variables.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_STATS -DSHOPT_MULTIBYTE -D_BLD_shell -DSHOPT_DYNAMIC -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -c data/variables.c
+done variables.o generated
+make lexstates.o
+make data/lexstates.c
+prev include/lexstates.h implicit
+prev FEATURE/options implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done data/lexstates.c
+meta lexstates.o %.c>%.o data/lexstates.c lexstates
+prev data/lexstates.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -DSHOPT_TYPEDEF -DSHOPT_NAMESPACE -DSHOPT_MULTIBYTE -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_PFSH -c data/lexstates.c
+done lexstates.o generated
+make emacs.o
+make edit/emacs.c
+prev include/terminal.h implicit
+prev include/edit.h implicit
+prev include/history.h implicit
+prev include/io.h implicit
+prev include/defs.h implicit
+prev FEATURE/cmds implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done edit/emacs.c
+meta emacs.o %.c>%.o edit/emacs.c emacs
+prev edit/emacs.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_EDPREDICT -DSHOPT_MULTIBYTE -DSHOPT_HISTEXPAND -DKSHELL -DSHOPT_ESH -DSHOPT_VSH -D_PACKAGE_ast -DSHOPT_PFSH -D_API_ast=20100309 -D_BLD_shell -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c edit/emacs.c
+done emacs.o generated
+make vi.o
+make edit/vi.c
+prev include/lexstates.h implicit
+prev FEATURE/time implicit
+prev include/terminal.h implicit
+prev include/edit.h implicit
+prev include/history.h implicit
+prev include/io.h implicit
+prev FEATURE/options implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev include/defs.h implicit
+done edit/vi.c
+meta vi.o %.c>%.o edit/vi.c vi
+prev edit/vi.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_EDPREDICT -DSHOPT_RAWONLY -DSHOPT_MULTIBYTE -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_HISTEXPAND -DKSHELL -DSHOPT_ESH -DSHOPT_VSH -DSHOPT_PFSH -D_BLD_shell -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c edit/vi.c
+done vi.o generated
+make hexpand.o
+make edit/hexpand.c
+prev include/edit.h implicit
+prev include/defs.h implicit
+done edit/hexpand.c
+meta hexpand.o %.c>%.o edit/hexpand.c hexpand
+prev edit/hexpand.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_MULTIBYTE -DKSHELL -DSHOPT_ESH -DSHOPT_VSH -D_PACKAGE_ast -DSHOPT_PFSH -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -D_BLD_shell -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -c edit/hexpand.c
+done hexpand.o generated
+exec - ${AR} rc libshell.a alarm.o cd_pwd.o cflow.o deparse.o enum.o getopts.o hist.o misc.o print.o read.o sleep.o trap.o test.o typeset.o ulimit.o umask.o whence.o main.o nvdisc.o nvtype.o arith.o args.o array.o completion.o defs.o edit.o expand.o regress.o fault.o fcin.o
+exec - ${AR} rc libshell.a history.o init.o io.o jobs.o lex.o macro.o name.o nvtree.o parse.o path.o string.o streval.o subshell.o tdump.o timers.o trestore.o waitevent.o xec.o env.o limits.o msg.o strdata.o testops.o keywords.o options.o signals.o aliases.o builtins.o variables.o lexstates.o emacs.o vi.o hexpand.o
+exec - (ranlib libshell.a) >/dev/null 2>&1 || true
+done libshell.a generated
+bind -lshell
+prev +ljobs
+prev +li
+prev ${mam_libsocket}
+prev ${mam_libsecdb}
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o ksh pmain.o ${mam_libshell} ${mam_libnsl} ${mam_libast}
+done ksh generated
+make shcomp
+make shcomp.o
+make sh/shcomp.c
+prev include/shnodes.h implicit
+prev include/defs.h implicit
+prev include/shell.h implicit
+done sh/shcomp.c
+meta shcomp.o %.c>%.o sh/shcomp.c shcomp
+prev sh/shcomp.c
+setv CC.DLL -UCC.DLL
+setv SH_DICT -DSH_DICT="\"libshell\""
+setv _BLD_shell -U_BLD_shell
+setv _BLD_DLL -U_BLD_DLL
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSHOPT_BRACEPAT -DSH_DICT=\""libshell"\" -D_API_ast=20100309 -D_PACKAGE_ast -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_COSHELL -DSHOPT_PFSH -DSHOPT_HISTEXPAND -DERROR_CONTEXT_T=Error_context_t -DSHOPT_FIXEDARRAY -DSHOPT_ESH -DSHOPT_MULTIBYTE -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -c sh/shcomp.c
+done shcomp.o generated
+prev libshell.a archive
+prev +ljobs
+prev +li
+prev ${mam_libsocket}
+prev ${mam_libsecdb}
+setv CC.DLL -UCC.DLL
+setv SH_DICT -DSH_DICT="\"libshell\""
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o shcomp shcomp.o ${mam_libshell} ${mam_libnsl} ${mam_libast}
+done shcomp generated
+make suid_exec
+make suid_exec.o
+make sh/suid_exec.c
+prev include/version.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sig.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev FEATURE/externs implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done sh/suid_exec.c
+meta suid_exec.o %.c>%.o sh/suid_exec.c suid_exec
+prev sh/suid_exec.c
+setv CC.DLL -UCC.DLL
+setv _BLD_shell -U_BLD_shell
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CONTEXT_T=Error_context_t -D_API_ast=20100309 -D_PACKAGE_ast -c sh/suid_exec.c
+done suid_exec.o generated
+prev +ljobs
+prev +li
+prev ${mam_libsocket}
+prev ${mam_libsecdb}
+setv CC.DLL -UCC.DLL
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o suid_exec suid_exec.o ${mam_libast} ${mam_libnsl} ${mam_libast}
+done suid_exec generated
+make shell
+prev libshell.a archive
+done shell virtual
+prev libshell.a archive
+make ${INSTALLROOT}/bin
+exec - if silent test ! -d ${INSTALLROOT}/bin
+exec - then mkdir -p ${INSTALLROOT}/bin
+exec - fi
+done ${INSTALLROOT}/bin generated
+make ${INSTALLROOT}/bin/ksh
+prev ${INSTALLROOT}/bin
+prev ksh
+exec - test '' = 'ksh' || ${STDCMP} 2>/dev/null -s ksh ${INSTALLROOT}/bin/ksh || { ${STDMV} ${INSTALLROOT}/bin/ksh ${INSTALLROOT}/bin/ksh.old 2>/dev/null || true; ${STDCP} ksh ${INSTALLROOT}/bin/ksh ;}
+done ${INSTALLROOT}/bin/ksh generated
+make ${INSTALLROOT}/man/man1
+exec - if silent test ! -d ${INSTALLROOT}/man/man1
+exec - then mkdir -p ${INSTALLROOT}/man/man1
+exec - fi
+done ${INSTALLROOT}/man/man1 generated
+make ${INSTALLROOT}/man/man1/sh.1
+prev ${INSTALLROOT}/man/man1
+make sh.1
+done sh.1
+exec - test '' = 'sh.1' || ${STDCMP} 2>/dev/null -s sh.1 ${INSTALLROOT}/man/man1/sh.1 || { ${STDMV} ${INSTALLROOT}/man/man1/sh.1 ${INSTALLROOT}/man/man1/sh.1.old 2>/dev/null || true; ${STDCP} sh.1 ${INSTALLROOT}/man/man1/sh.1 ;}
+done ${INSTALLROOT}/man/man1/sh.1 generated
+make ${INSTALLROOT}/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib
+exec - then mkdir -p ${INSTALLROOT}/lib
+exec - fi
+done ${INSTALLROOT}/lib generated
+make ${INSTALLROOT}/lib/libshell.a archive
+prev ${INSTALLROOT}/lib
+prev libshell.a archive
+exec - test '' = 'libshell.a' || ${STDCMP} 2>/dev/null -s libshell.a ${INSTALLROOT}/lib/libshell.a || { ${STDMV} ${INSTALLROOT}/lib/libshell.a ${INSTALLROOT}/lib/libshell.a.old 2>/dev/null || true; ${STDCP} libshell.a ${INSTALLROOT}/lib/libshell.a ;}
+exec - (ranlib ${INSTALLROOT}/lib/libshell.a) >/dev/null 2>&1 || true
+done ${INSTALLROOT}/lib/libshell.a generated
+make ${INSTALLROOT}/man/man3
+exec - if silent test ! -d ${INSTALLROOT}/man/man3
+exec - then mkdir -p ${INSTALLROOT}/man/man3
+exec - fi
+done ${INSTALLROOT}/man/man3 generated
+make ${INSTALLROOT}/man/man3/shell.3
+prev ${INSTALLROOT}/man/man3
+make shell.3
+done shell.3
+exec - test '' = 'shell.3' || ${STDCMP} 2>/dev/null -s shell.3 ${INSTALLROOT}/man/man3/shell.3 || { ${STDMV} ${INSTALLROOT}/man/man3/shell.3 ${INSTALLROOT}/man/man3/shell.3.old 2>/dev/null || true; ${STDCP} shell.3 ${INSTALLROOT}/man/man3/shell.3 ;}
+done ${INSTALLROOT}/man/man3/shell.3 generated
+make ${INSTALLROOT}/man/man3/nval.3
+make nval.3
+done nval.3
+exec - test '' = 'nval.3' || ${STDCMP} 2>/dev/null -s nval.3 ${INSTALLROOT}/man/man3/nval.3 || { ${STDMV} ${INSTALLROOT}/man/man3/nval.3 ${INSTALLROOT}/man/man3/nval.3.old 2>/dev/null || true; ${STDCP} nval.3 ${INSTALLROOT}/man/man3/nval.3 ;}
+done ${INSTALLROOT}/man/man3/nval.3 generated
+make ${INSTALLROOT}/lib/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib/lib
+exec - then mkdir -p ${INSTALLROOT}/lib/lib
+exec - fi
+done ${INSTALLROOT}/lib/lib generated
+make ${INSTALLROOT}/lib/lib/shell
+prev ${INSTALLROOT}/lib/lib
+prev shell.req
+exec - test '' = 'shell.req' || ${STDCMP} 2>/dev/null -s shell.req ${INSTALLROOT}/lib/lib/shell || { ${STDMV} ${INSTALLROOT}/lib/lib/shell ${INSTALLROOT}/lib/lib/shell.old 2>/dev/null || true; ${STDCP} shell.req ${INSTALLROOT}/lib/lib/shell ;}
+done ${INSTALLROOT}/lib/lib/shell generated
+make ${PACKAGE_ast_INCLUDE}
+exec - if silent test ! -d ${PACKAGE_ast_INCLUDE}
+exec - then mkdir -p ${PACKAGE_ast_INCLUDE}
+exec - fi
+done ${PACKAGE_ast_INCLUDE} generated
+make ${PACKAGE_ast_INCLUDE}/nval.h
+prev ${PACKAGE_ast_INCLUDE}
+prev include/nval.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1982,author=dgk' include/nval.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/nval.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/nval.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/nval.h generated
+make ${PACKAGE_ast_INCLUDE}/shell.h
+prev include/shell.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1982,author=dgk' include/shell.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/shell.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/shell.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/shell.h generated
+make ${PACKAGE_ast_INCLUDE}/history.h
+prev include/history.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1982,author=dgk' include/history.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/history.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/history.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/history.h generated
+make ${INSTALLROOT}/bin/suid_exec
+prev suid_exec
+exec - test '' = 'suid_exec' || ${STDCMP} 2>/dev/null -s suid_exec ${INSTALLROOT}/bin/suid_exec || { ${STDMV} ${INSTALLROOT}/bin/suid_exec ${INSTALLROOT}/bin/suid_exec.old 2>/dev/null || true; ${STDCP} suid_exec ${INSTALLROOT}/bin/suid_exec ;}
+done ${INSTALLROOT}/bin/suid_exec generated
+make ${INSTALLROOT}/bin/shcomp
+prev shcomp
+exec - test '' = 'shcomp' || ${STDCMP} 2>/dev/null -s shcomp ${INSTALLROOT}/bin/shcomp || { ${STDMV} ${INSTALLROOT}/bin/shcomp ${INSTALLROOT}/bin/shcomp.old 2>/dev/null || true; ${STDCP} shcomp ${INSTALLROOT}/bin/shcomp ;}
+done ${INSTALLROOT}/bin/shcomp generated
+make ${INSTALLROOT}/fun
+exec - if silent test ! -d ${INSTALLROOT}/fun
+exec - then mkdir -p ${INSTALLROOT}/fun
+exec - fi
+done ${INSTALLROOT}/fun generated
+make ${INSTALLROOT}/fun/dirs
+prev ${INSTALLROOT}/fun
+make fun/dirs
+done fun/dirs
+setv mode -Dmode="+x"
+exec - test '' = 'fun/dirs' || ${STDCMP} 2>/dev/null -s fun/dirs ${INSTALLROOT}/fun/dirs || { ${STDMV} ${INSTALLROOT}/fun/dirs ${INSTALLROOT}/fun/dirs.old 2>/dev/null || true; ${STDCP} fun/dirs ${INSTALLROOT}/fun/dirs && chmod ugo+x ${INSTALLROOT}/fun/dirs ;}
+done ${INSTALLROOT}/fun/dirs generated
+make ${INSTALLROOT}/fun/popd
+make fun/popd
+done fun/popd
+setv mode -Dmode="+x"
+exec - test '' = 'fun/popd' || ${STDCMP} 2>/dev/null -s fun/popd ${INSTALLROOT}/fun/popd || { ${STDMV} ${INSTALLROOT}/fun/popd ${INSTALLROOT}/fun/popd.old 2>/dev/null || true; ${STDCP} fun/popd ${INSTALLROOT}/fun/popd && chmod ugo+x ${INSTALLROOT}/fun/popd ;}
+done ${INSTALLROOT}/fun/popd generated
+make ${INSTALLROOT}/fun/pushd
+make fun/pushd
+done fun/pushd
+setv mode -Dmode="+x"
+exec - test '' = 'fun/pushd' || ${STDCMP} 2>/dev/null -s fun/pushd ${INSTALLROOT}/fun/pushd || { ${STDMV} ${INSTALLROOT}/fun/pushd ${INSTALLROOT}/fun/pushd.old 2>/dev/null || true; ${STDCP} fun/pushd ${INSTALLROOT}/fun/pushd && chmod ugo+x ${INSTALLROOT}/fun/pushd ;}
+done ${INSTALLROOT}/fun/pushd generated
+done install virtual
+make test
+make test.ksh
+prev ${INSTALLROOT}/bin/ksh
+prev ksh
+make tests/shtests
+done tests/shtests
+exec - silent cmp 2>/dev/null -s ${INSTALLROOT}/bin/ksh ksh 2>/dev/null ||
+exec - echo "make install to run the tests on the latest ksh" >&2
+exec - cd
+exec - SHELL=${INSTALLROOT}/bin/ksh ${INSTALLROOT}/bin/ksh shtests
+done test.ksh virtual
+done test dontcare virtual
diff --git a/usr/src/lib/libshell/common/OBSOLETE b/usr/src/contrib/ast/src/cmd/ksh93/OBSOLETE
index c29cb8bb63..c29cb8bb63 100644
--- a/usr/src/lib/libshell/common/OBSOLETE
+++ b/usr/src/contrib/ast/src/cmd/ksh93/OBSOLETE
diff --git a/usr/src/lib/libshell/common/PROMO.mm b/usr/src/contrib/ast/src/cmd/ksh93/PROMO.mm
index def4552243..def4552243 100644
--- a/usr/src/lib/libshell/common/PROMO.mm
+++ b/usr/src/contrib/ast/src/cmd/ksh93/PROMO.mm
diff --git a/usr/src/lib/libshell/common/README b/usr/src/contrib/ast/src/cmd/ksh93/README
index 3a953df356..1feeec8a90 100644
--- a/usr/src/lib/libshell/common/README
+++ b/usr/src/contrib/ast/src/cmd/ksh93/README
@@ -53,7 +53,7 @@ The options have the following defaults and meanings:
using while < file;do ...; done and allowing fields in
each line to be accessed as positional parameters.
FS_3D off For use with 3-D file system. Enabled automatically for
- systems with dynamic linking.
+ sytems with dynamic linking.
KIA off Allow generation of shell cross reference database with -I.
MULTIBYTE on Multibyte character handling. Requires mblen() and
mbctowc().
diff --git a/usr/src/lib/libshell/common/RELEASE b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE
index b8fc92511a..691f9b4a18 100644
--- a/usr/src/lib/libshell/common/RELEASE
+++ b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE
@@ -1,7 +1,913 @@
+12-08-01 --- Release ksh93u+ ---
+12-08-01 A bug that ignored interrupts for some builtins (e.g. cmdtst::grep)
+ that read from stdin has been fixed.
+12-08-01 A bug that interpreted "cd .foo" as "cd foo" has been fixed.
+12-07-30 Added automatic restart for EINTR for ioctl, tcgetattr, and tcsetattr.
+12-07-23 A scoping error with namrefs to compound associative arrays has
+ been fixed.
+12-07-20 A bug where builtin -d /path/foo deleted foo has been fixed.
+12-07-18 A bug in which /dev/stdout did not work in command substitution on
+ some systems has been fixed.
+12-07-17 A bug in which the restricted option set in a subshell prevented
+ some variables from getting restored when the subshell completed
+ has been fixed.
+12-07-09 A bug in which the directory is not restored after a subshell changes
+ the name of the directory for subshells executed in the same process
+ has been fixed.
+12-07-09 A bug in which file descriptors created with {n}< file were not being
+ closed has been fixed.
+12-07-09 The 12-04-04 fix for cd .. was not correct causing cd /etc;cd .. to
+ remain in /etc. This has been fixed.
+12-07-02 A bug in which builtin name did now work for builtins found in a
+ library added by builtin -f lib has been fixed.
+12-07-02 A bug in the edit modes which <tab> after a directory did not refresh
+ the input line has been fixed.
+12-07-02 A bug in which an exit status > 256 corresponding to a signal was
+ not returned by a function to indicate a signal exit has been fixed.
+12-06-28 Fix ulimit -a to list (Kibytes) instead of (kbytes).
+12-06-27 Fix unitialized data reference for <CR> as first char in --vi mode.
+12-06-26 The formatting of printf "%q" for multibyte locales has changed to
+ output using \u[xxx] format for valid wide characters.
+12-06-25 The size limit for read -N and read -n has been raised to INT_MAX.
+12-06-22 A bug in which an exit trap set in a subshell might not be triggered
+ when the last command was a simple executable has been fixed.
+12-06-22 A bug which could cause the shell to hang when a coprocess exits
+ while a command inside a command substitution is reading from it has
+ been fixed.
+12-06-21 +ksh new accepts for commands of the form for i; <nl> do;...;done
+12-06-19 Tab completion after a / when there is only one match not completes
+ with that match rather than generating a menu of matches.
+12-06-19 A bug in which patterns containing {...} where not processed
+ correctly inside ${var/pattern/string} has been fixed.
+12-06-18 Code modified to eliminate fts_notify variable.
+12-06-15 Change the .paths plugin/builtin library variable name from
+ BUILTIN_LIB to PLUGIN_LIB to prevent new plugin_version() aware
+ -lcmd from causing older non-plugin_version() aware ksh to dump core.
+12-06-14 builtin without argument no longer lists .sh.tilde as a built-in.
+12-06-12 For assignments if the form x=(foo bar), foo is only check for an
+ alias if it is float, integer, compound, or nameref.
+12-06-12 +The shell supports 64 bit i-nodes even for 32 bit binaries.
+12-06-11 A bug wth >; redirection systems for which vfork() was the same a
+ fork() has been fixed.
+12-06-11 A bug in path lookup that ignored buffer boundaries has been fixed.
+12-06-08 typeset -a var and typeset -A var, first unset var when var is
+ a compound variable.
+12-06-08 A bug in which running shcomp on a program containg namespace
+ could core dump has been fixed.
+12-06-06 A bug in which unset of an associative array of compound variables
+ did not completely unset the variable has been fixed.
+12-06-06 A bug in which exporting left or right justfied fields could loose
+ the field width has been fixed.
+12-06-06 A bug on Solaris11 in which >; did not work for /dev/null was fixed.
+12-06-05 A race condition which occured when stopping a builtin command
+ invoked from a subshell has been fixed.
+12-06-05 A bug with appending elements to an empty indexed array has been
+ fixed.
+12-06-04 A bug in which continuing a stopped builtin could cause it to
+ terminate has been fixed.
+12-06-04 By default, builtins added at runtime will restore the current
+ directory if they are killed or stopped.
+12-06-04 A bug in handling \\ in read has been fixed.
+12-05-31 Use getrlimit64/setrlimit64 on systems that support it.
+12-05-31 Fix 64 bit big-endian arithmentic bug that mishandled nan and inf.
+12-05-31 Handle ECONNRESET like EPIPE.
+12-05-31 Change .paths parse to use only the last BUILTIN_LIB from the top
+ and treat BUILTIN_LIB value as a ':' separated list of lib names.
+12-05-29 Fix BUILTIN_LIB binding bug that ignored subsequent lookups.
+12-05-29 shtests: --nocompile omits the compile test and --compile does only
+ the compile test.
+12-05-25 A command subsitution containing a here-document that itself contains
+ a here-document no longer hangs.
+12-05-24 When the redirection operatory >; is directed to a symlink, it now
+ overwrites the file named by the link rather than the link.
+12-05-21 +Added printf formats %(type)q where type can be html, url, pattern,
+ ere, or csv.
+12-05-18 A bug with appending elements to an indexed array has been fixed.
+12-05-18 The exit status from getopts --man interactively was 0 instead of 2
+ and has been fixed.
+12-05-18 Another bug with SHOPT_EDPREDICT which could cause a core dump has
+ been fixed.
+12-05-17 A bug with fixed size arrays which could cause a core dump has been
+ fixed.
+12-05-17 A bug in which the here-document <<< $(<file) was not processed
+ correctly has been fixed.
+12-05-15 The default value for -L, -R, and -Z when the size was not set was
+ incorrectly defaulting to 1 and has been fixed.
+12-05-15 A bug in which a subshell of the form (name=value exec ...) could
+ coredump when name is an environment variable and xtrace is on has
+ been fixed.
+12-05-15 Fixed a .paths bug in which only the first BUILTIN_LIB assignment worked.
+12-05-14 Arithmetic expressions and subexpressions that are not floating point
+ now treat -0 as 0, so that $((-0)) is 0 and $((-0.0)) is -0.
+12-05-11 'unset .sh' now fails with readonly message instead of coredump.
+12-05-11 A bug which left an associative array arr containing one element in
+ the wrong state after expanding with ${arr[@]} has been fixed.
+12-05-10 A bug in which typeset -f did not display options that called getopts
+ has been fixed.
+12-05-08 Fixed a number of potential bugs uncovered by valgrind.
+12-05-08 A bug in which typeset -b -Z10 var did not initialize var to the
+ empty string has been fixed.
+12-05-07 A bug in which the exit value of an interactive shell could be
+ affected by the evaluation of the PS1 prompt has been fixed.
+12-05-04 A bug in which x=() was not unsetting the old value of x before
+ creating an empty compound variable has been fixed.
+12-05-01 A bug in vi edit mode in which after <ESC>^V, the terminal was not
+ restored to insert mode after a character is entered has been fixed.
+12-04-27 A bug in which old attributes were not cleared when assigning a
+ value using typeset has been fixed.
+12-04-26 +Enabled multiline editing by default. set +o multiline can disable.
+12-04-25 The 12-04-17 PATH fix created a new bug which was fixed.
+12-04-25 Fixed a big memory leak problem in which unsetting compound variables
+ did not free all the space.
+12-04-25 A bug in which test ! ! ! was treated as an error has been fixed.
+12-04-24 A bug with print -v for a compound variable that contained fixed
+ arrays which prevented the output from being used again as input
+ has been fixed.
+12-04-23 +kill provides the STKFLT signal on systems that support it.
+12-04-23 +The -L option was added to kill. The -L option is the same as -l
+ except that without arguments the output format is in the form of
+ a select menu.
+12-04-23 A bug in which the exit status for an interactive shell was always
+ 0 has been fixed.
+12-04-20 Entering blank lines interactively no longer resets the exit status.
+12-04-18 A bug in file completion in which the second tab completion on a file
+ would list the completion rather than inserting the completion has
+ been fixed.
+12-04-18 A bug in which "${arr[@]:i:j}" and "${@:i:j}" generated the empty
+ string when i was a valid subscript and j was <=0 rather than
+ generating nothing has been fixed.
+12-04-17 A bug in which read -d delim from a terminal did not respond to
+ interrupt and did not termrinate when the delimiter was entered
+ has been fixed.
+12-04-17 A bug in which a directory in PATH containing a .paths file that
+ contains a line with FPATH=dir, where dir does not exist could
+ cause the path search to fail has been fixed.
+12-04-16 A bug in which $(trap -p) did not display traps such as ERR and
+ DEBUG that are not associated with signals has been fixed.
+12-04-11 A bug in which unsetting a variable did not unset attributes when
+ the variable did not have a value has been fixed.
+12-04-11 A bug in which read -A for an array whose index is an enumeration
+ type, lost the enumeration type has been fixed.
+12-04-10 Shared libraries loaded from a library named by a BUILTIN_LIB= found
+ in a .paths file found in a directory on PATH now add builtins that
+ are associated with the directory in PATH containing the .paths file.
+12-04-09 Increased I/O buffer sizes for better performance.
+12-04-09 A bug in which the leading 0 was stripped from $x, when $x contained
+ a heximadecimal constant inside an arithmetic expression inside
+ a for or while loop.
+12-04-06 Modified namespaces to hand variabes FPATH, PATH, and OPTIND that
+ are defined in name spaces appropriately. This also fixed OPTIND
+ and OPTARG processing for functions.
+12-04-04 A bug in which cd .. fails when the current directory has been
+ renamed has been fixed.
+12-04-02 Made some namespace changes and added a regression test.
+12-03-30 A bug with namespaces in which PATH and FPATH set in a namespace was
+ not restored when leaving the namespace has been fixed.
+12-03-29 A bug in which appending an index array onto an array without elements
+ caused the first element to be 1 rather than 0 has been fixed.
+12-03-29 A bug which could cause a core dump when copying a large index array
+ has been fixed.
+12-03-28 The shell now generates an error message when the sizes with L, Z, and
+ R are > 32767 on 32 bit binaries instead of generating a core dump.
+12-03-28 A bug in left and right justification in which the width of invalid
+ characters was not taken as zero has been fixed.
+12-03-26 A bug in which typeset -p ref, when ref is a reference to an index
+ array element did not display the subscript has been fixed.
+12-03-23 A bug in lowercase and uppercase fields when expanding ${name:=val}
+ when name is the empty string has been fixed.
+12-03-22 A namespace bug in which a type t defined in namespace foo could not
+ be referenced outside the namespace as .foo.t has been fixed.
+12-03-22 A bug in name reference scoping in which a name function called from
+ another function is pass a name reference to a compound variable
+ instance to be created and the compound variable is in the global
+ scope.
+12-03-22 A bug in which ${ref[@}} did not behave like ${arr[i][@]} when
+ ref is a name reference to arr[i] has been fixed.
+12-03-21 A bug in which assigning a compound variable into arr[i], where
+ arr[i] is an array variable did not work correctly has been fixed.
+12-03-21 A bug with multi-dimenstional index arrays in which ${arr[i][j]}
+ could generate a bogus error message when i was > 9 has been fixed.
+12-03-21 A bug in which typeset v=foo, typeset -p v[0] generated a core dump
+ has been fixed.
+12-03-20 A bug in vi edit mode in which the sequence bar<ESC>0i<ESC>l left the
+ cursor on the b rather than the a has been fixed.
+12-03-20 A bug which caused a core dump when defining a type with a field
+ as ' integer -a data=([0]=0)' has been fixed.
+12-03-19 Using typeset -a array when array is an associative arry not
+ generated an error message.
+12-03-19 typeset +a, typeset +A, and typeset +C not displays the variables
+ with the attributes a, A, and C respectively instead of an error.
+12-03-19 A bug in which typeset -pC, typeset -pa, and typeset -pA output all
+ variables rather than those of type C, a, or A only has been fixed.
+12-03-18 A bug in which unset foo where foo is a name reference to a compound
+ variable defined inside a function is not unset has been fixed.
+12-03-18 A bug with SHOPT_EDPREDICT which could cause a core dump when the
+ list of matches became empty has been fixed.
+12-03-15 The assignment, typeset -C foo=(a b c) now generates a syntax
+ error since a is not an assignment command.
+12-03-16 A bug in which an unset discipline from a variable defined in a
+ subshell is not invoked in the subshell has been fixed.
+12-03-08 The assignment typeset -a (x=1 y=2) now creates an index array
+ of two elements rathern than an array of one element which is
+ a compound variable.
+12-03-02 +The vi and emacs edit modes now list all the entries in a directory
+ when entering a <tab> for completion after a /.
+12-03-02 A bug in which a program that exits with value 12 when called
+ from a command substitution in which standard output has been
+ redirected caused the shell to hang has been fixed.
+12-03-01 A bug in which the shell could not parse [[ ']' == ~(E)[]] ]]
+ has been fixed.
+
+12-02-29 --- Release ksh93u+ ---
+12-02-29 A bug in which ~user expanded first in a subshell prevented it
+ from expanding later in a program has been fixed.
+12-02-29 A bug which could lead to a core dump when more that four shared
+ libraries were added with the builtin command has been fixed.
+12-02-29 Fixed a few bugs which caused SIGCHLD to be blocked preventing
+ background jobs from being reaped until a foreground job was run.
+12-02-27 A bug in which sh -c for a simple command caused a fork() has been
+ fixed.
+12-02-27 A timing bug on systems such as AIX that doesn't support vfork()
+ that could cause the exist status to get lost has been fixed.
+12-02-22 A private file descriptor that was not close-on-exec for a command
+ substitution and has been fixed.
+12-02-14 A bug in which ^Z did not stop a pipeline when the last component
+ was a shell built-in has been fixed.
+12-02-14 getconf("PATH") used to initialize ed(1) path.
+12-02-13 +In earlier version read from standard input would fail when called
+ from the KEYBD trap. Now read options -N, -n, and -t should work
+ when called from a KEYBD trap.
+12-02-13 If FCEDIT is not set and fc is invoked without the -e option,
+ ed will be invoked if found instead of /bin/ed.
+12-02-10 Another bug in the saving and restoring of IFS in a subshell
+ that caused a core dump has been fixed.
+12-02-08 A bug in which .sh.fun disciplines could be cleared after a
+ function completes has been fixed.
+12-02-08 A bug in job control in which the foregroup process group was not
+ set correctly after restarting a stopped pipeline has been fixed.
+12-02-07 A bug in which numbers with leading zeros could be treated as
+ octal constants outside of ((...)) has been fixed.
+12-02-06 A bug in arithmetic with compound variables containing multiple
+ array elements has been fixed.
+12-02-02 A bug in the ulimit option table was fixed.
+12-01-26 A bug in which a set command that did not change monitor could
+ effect the behavior of the monitor when monitor mode is on is fixed.
+12-01-21 +You can now test whether the shell implements a math function using
+ typeset -f .sh.math.name, where name is the name of the function.
+12-01-21 A bug in which typeset -L and typeset -R did not handle multibyte
+ characters correctly has been fixed.
+12-01-20 A bug that could cause the shell to hang waiting for an incorrect
+ job pid has been fixed.
+12-01-19 A memory leak which occured for a nested command subtiution has been
+ fixed.
+12-01-17 A bug in which typeset -u PS1 could enable the uppercase attribute
+ for some other variables, for exampe, HISTFILE has been fixed.
+12-01-16 A bug in which .sh.match was not correct after a substring match when
+ the replacement string contained a substring match has been fixed.
+12-01-12 +Files that are sourced from profile files are now read and executed
+ one command at a time so that alias definitions take effect as they
+ do for profile files.
+12-01-12 A bug in which whence -p would find a function if one existed and
+ there was no command of that name on PATH.
+12-01-11 Change b_* prototype (int, char**, void*) => (int, char**, Shbltin_t*).
+12-01-05 A bug in which read was not terminating for a signal that had a trap
+ set has been fixed.
+12-01-01 A timing problem with >; has been fixed.
+12-01-01 A macro expansion memory leak has been fixed.
+11-12-26 A bug in array assignments of the form arr=( $arr[i] ...) in which
+ arr was not unset before the assignment has been fixed.
+11-12-20 A number of code changes were made based on the results of errors
+ indicated by static code analysis.
+11-12-13 In vi edit mode a lteral <TAB> can now be entered by preceding it
+ with a backshash.
+11-12-13 When tab is entered for completion after a ' or ", the ' and "
+ characters are no longer deleted.
+11-12-07 A bug in which a program in the current direcotry with a . in the
+ name could fail to execute when both PATH and FPATH end with :. has
+ been fixed.
+11-12-07 I fixed a bug in which a variable expansion in a large here-document
+ could be expanded to a null string.
+11-12-06 An optimization to read was added in the case the the read command
+ was redirected from a file.
+11-12-06 Changes were made to make the line limit for read unlimited by
+ default.
+11-12-05 A bug in which unsetting an array variable did not completely clear
+ the variable in some cases has been fixed.
+11-12-02 +The printf alternative character # when applied to the %q format will
+ quote argument in a form suitable for a field in a .csv format file.
+11-12-02 +A -S option was added to read to be able to read .csv format files.
+11-11-28 A bug in which redirection of standard error in a function called from
+ command substitution caused standard error to be lost has ben fixed.
+11-11-21 [[ (-n foo) ]] no longer requires a space before (.
+11-11-11 The readonly attribute for a variable now applies to compound
+ assignments to that variable.
+11-11-07 Changes were made to reduce the stack size to allow deeper function
+ recursion.
+11-10-10 +Added alternate flag to printf %H for encoding of URI's.
+11-10-10 A bug which could lead to a core dump when the shell was invoked
+ with more than twenty five open files has been fixed.
+11-10-06 A bug in the scoping of name references in functions called by other
+ functions has been fixed.
+11-10-05 A bug in which wait on a pid may return the exit status of an
+ earlier background job with that pid instead has been fixed.
+11-09-22 A bug in which a read timed out with TMOUT did not always restore
+ the terminal state has been fixed.
+11-09-21 An optimization that allowed the last command in a script to use
+ the same process id as the script has been eliminated.
+11-09-21 Added letoctal option that enables the let command to recognize
+ octal constants starting with 0.
+11-09-20 A bug in which ${var.} could cause a core dump has been fixed.
+11-09-20 A bug with SHOPT_EDPREDICT when neither vi or emacs was enabled for
+ lines beginning with # when in a multibyte locale has been fixed.
+11-09-20 A bug in emacs edit mode with SHOPT_EDPREDICT that would cause
+ history searches matching comments lines to generate predictions
+ has been fixed. Only user typed comment lines generate predictions.
+11-09-20 A bug in emacs edit mode with a search that matches a comment line
+ that could cause a core dump has been fixed.
+11-09-16 A bug in which a command name ending in .. could cause the shell to
+ abort has been fixed.
+11-09-16 The characters ! + - % and @ in file names are no longer escaped with
+ file name completion.
+11-09-13 The let command no longer treats numbers starting with 0 as octal
+ constants.
+11-09-08 A bug in which printf "%R" could cause a core dump for invalid shell
+ patterns has been fixed.
+11-08-09 With set -u, ${var#pattern} reported that var was unset for special
+ variables.
+11-08-03 A bug in which the shell did not preserve the exit status for a
+ coprocess has been fixed.
+11-08-02 A bug in the saving and restoring of IFS in command substitution that
+ caused a core dump has been fixed.
+11-07-21 Modified the 10-08-27 bug fix so that background jobs started in for
+ and while loops created interactively generate completion messages.
+11-07-20 I fixed a bug in here documents in which multi-byte characters that
+ crossed buffer boundaries were not processed correctly.
+11-06-22 The shell compiler now supports process substitution.
+11-06-22 +Added code to support process substitution on systems that do
+ not supply the /dev/fd directory.
+11-06-21 Fixed extraneous jobs Done messages when builtin is at the end of a
+ pipeline.
+11-06-20 Fixed two regression tests.
+11-06-20 Fixed a bug introduced on last update.
+11-06-14 A bug with pipefail in which the shell would wait for background
+ jobs to complete has been fixed.
+11-06-09 A bug which caused the options.sh regression test to fail on OS390
+ Linux has been fixed. The bug could also have affected other systems.
+11-06-07 +A number of changes to support the still undocuments namespace option
+ have been added.
+11-06-06 A bug in which command substitution of eval would hang when it had
+ standard error redirected to standard output has been fixed.
+11-06-01 A bug in case statement fall through (;&) ignoring set -e was fixed.
+11-06-01 A bug in which creating a left or right justified upper or lowercase
+ variable with an empty string has been fixed.
+11-06-01 A bug in which the .paths directory wasn't read when a subshell was
+ executed before any other command has been fixed.
+11-05-31 The shell now gives an error when a type variable is assigned to
+ an array instance when the array has been declared a compound variable
+ array.
+11-05-31 A bug in which typeset -m of an array instance did not remove the
+ original instance has been fixed.
+11-05-28 A bug in which typeset -m dest=src fails when src and are passed as
+ name references was fixed.
+11-05-28 A bug in which typeset -m "c.board[1][i]=el", where el is a compound
+ variable core dumps has been fixed.
+11-05-28 Two bugs in the display of arrays of compound variables with print -v
+ have been fixed.
+11-05-27 A bug with command substitution with the shift jis locale has been
+ fixed.
+11-05-25 A bug in which unset -f foo, called within function foo could cause
+ the shell to core dump has been fixed.
+11-05-24 A bug in unsetting arrays of compound variables that could lead to
+ a core dump has been fixed.
+11-05-24 A scoping bug in with typeset -m for variables passed as references
+ has been fixed.
+11-05-09 A bug in which 'typeset +p array[$i]' in a subshell could cause an
+ exception has been fixed.
+11-05-03 Two more scoping bugs with name references and read -C were fixed.
+11-05-03 A potential race condition which occurs when here-documents are
+ processed in asynchronous blocks has been eliminated.
+11-05-02 Another scoping bug with name references defined in a function has
+ been fixed.
+11-05-02 A bug in which the shell discards saved exit status of a job if it is
+ followed by a subshell execution has been fixed.
+11-04-28 The shell now checks for numerical overflows with process ids.
+11-04-28 Another scoping bug with compound variables defined by name references
+ inside a function has been fixed.
+11-04-28 A bug which caused a core dump on 32 bit systems with the basic.sh
+ regression test has been fixed.
+11-04-27 A scope binding error for name references has been fixed.
+11-04-27 Assignment of compound variable to compound array element by name
+ is now working.
+11-04-26 I fixed a bug with SHOPT_FIXEDARRAY compilation that could cause
+ an a core dump for not fixed arrays.
+11-04-25 A bug in the references to two dimensional compound arrays has
+ been fixed.
+11-04-20 A bug in which a name reference to a multidimentional index array
+ index, nameref x=foo[3][4], did not work correctly has been fixed.
+11-04-18 Changes were added to allow fixed size arrays of variable sized
+ objects when the SHOPT_FIXEDARRAY compile option defined on 10-09-28.
+11-04-18 A bug in which name references to array elements could fail has
+ been fixed.
+11-04-15 +A compile option, SHOPT_2DMATCH, has been added which causes
+ .sh.match to be a two dimensional array after ${var//pat/str}
+ where the first dimension is the pattern number and the second is
+ the match instance.
+11-04-11 A bug in which readonly var, where var is exported could cause var
+ to be unset has been fixed.
+11-04-06 A tokenizer bug in which ${x/{3}(\d)/ } would cause in infinite
+ loop has been fixed.
+11-04-05 A bug in which ${!x.} could cause a core dump has been fixed.
+11-04-04 A bug in which cleaning out the history file could terminate before
+ keeping all the recent history events has been fixed.
+11-03-29 A bug in which ${#array[@]} was 1 rather than 0 after issuing
+ typeset array[7] has been fixed.
+11-03-29 The subscript out or range message for fixed arrays has been fixed.
+11-03-29 A bug in which suspend could cause a core dump has been fixed.
+11-03-24 For the showme option added 09-09-09, commands beginning with a ;
+ inside an arithmetic for loop, no longer produce syntax errors.
+11-03-18 A bug in _WINIX ~domain/user expansion has been fixed.
+11-03-16 A bug in the pipefail option which could cause a script to hang
+ has been fixed.
+11-03-12 The shell no longer treats ${##pattern} as a syntax error.
+11-03-11 A bug in typeset -u on systems that don't supply the towctrans()
+ function has been fixed.
+11-03-11 A bug in which a compound assignment of the form var[sub]=(...)
+ would evaluate sub for each assignment has been fixed.
+11-03-07 A bug in which reassigning a compound variable to an associative
+ array index could incorrectly increase the count of the number
+ of elements has been fixed.
+11-03-04 +The tilde expansion on windows has been modified to handle user
+ names of the form domain/user so that ~domain/user now expands
+ to the home directory of that domain user.
+11-03-03 A bug in which the width of the prompt was calculated incorectly
+ which cause the wrong line length for edit commands has been fixed.
+11-03-02 A bug in which a global variables set from within a function inside
+ a subshell can leave side effects in parent shell has been fixed.
+11-03-01 A bug in which whence -a could dump core when the first match
+ was due to : in PATH and the program was in the current directory.
+11-02-28 A bug in emacs mode with SHOPT_EDPREDICT (added on 10-05-20) which
+ disabled prediction on a line starting with # when the cursor was not
+ at the end of line has been fixed.
+11-02-28 The output format for compound variables with set has been fixed.
+11-02-25 A bug which could lead to a core dump occurred when a shell script
+ without #! is invoked by name from a parent shell that has name
+ references defined and the script creates name references of the
+ same name.
+11-02-21 The shell now fails with a syntax error when a here-document in a
+ command substition is not completed before the closing ), for
+ example, $( foobar <<! )
+ here_doc
+ !.
+11-02-18 A bug in which the value of $0 in a function defined by name()
+ was changed to name has been fixed.
+11-02-17 A bug in which the declaration typeset var[100] did not work
+ correctly has been fixed.
+11-02-15 A bug in which [[ -v sh.match ]] did not work correctly has been
+ fixed.
+
+11-02-08 --- Release ksh93u ---
+11-02-08 A bug in which opening standard output after it has been closed with
+ exec 1>&- doesn't work has been fixed.
+11-02-07 A bug on some systems for which a command subtitution could hang
+ has been fixed.
+11-01-28 A bug in file name completion for files containing both multibyte
+ characters shell special characters has been fixed.
+11-01-18 The .sh.match variable now shows elements that do not match as
+ as not set rather than an empty string.
+11-01-18 A bug with typeset -m of an array into an element of an indexed
+ array has been fixed.
+11-01-13 A bug in handling of arrays of compound variables inside ((...)) which
+ reported a syntax error been fixed.
+11-01-10 A bug in arithmetic assignment operators of the form op= for array
+ variables when the same array was referenced on the left and the
+ right hand side with different indices has been fixed.
+11-01-10 A bug in which the output of time was lost when { time...;} 2>&1
+ occurred inside command substition has been fixed.
+11-01-07 [[ -v sh.match[i] ]] was returning false when sh.match[i] was set.
+11-01-05 Added and modified warning messages with sh -n.
+11-01-02 Fixed bugs with typeset -l/-u/-M and arrays.
+10-12-28 Fixed a bug with typeset -l/-u/-M values in arithmetic expressions.
+10-12-26 Fixed a time parsing bug in sleep and localeconv() initialization.
+10-12-23 Prevented the shell from generating a core dump when it sends itself
+ a termination signal because the last command terminated with that
+ signal. This prevents a core dump to be overwritten by the shell.
+10-12-22 A bug in the expansion of ${A[@]} ${B[@]}, introduced in 10-12-01
+ when A="" B=B has been fixed.
+10-12-21 +Use MS_3D in b_vpath() for setting win32 WoW mount defaults.
+10-12-17 A bug in the expansion of ${var:i:j} which caused a core dump when
+ i > ${#var} has been fixed.
+10-12-16 +sleep now treats . as decimal point even in locales that use comma.
+10-12-16 +typeset -M mapname was added to generalize on toupper and tolowwer
+ mapping as provided with wctrans().
+10-12-10 A bug in which typeset -l displayed namespaces as well as lower case
+ variables has been fixed.
+10-12-06 A bug in which a pipeline could terminate prematurely for a pipeline
+ whose right hand side is a builtin, and whose left hand side ends in
+ a simple command that has standard output redirected has been fixed.
+10-12-06 A bug in hexfloat assignments when the right hand side is a string
+ variable starting with 0x has been fixed.
+10-12-01 A bug in the expansion of ${$1+"$@"} which causes the last positional
+ parameter to disappear when it is empty has been fixed.
+10-12-01 A number of changes were made to reduce the startup time.
+10-11-29 When wait is interrupted by a signal that is caught, it now exits
+ with a non-zero exit status.
+10-11-29 When a variable is used directly in an arithmetic expression,
+ leading zeros no longer cause the value to be treated as an
+ octal constant. This was true in previous versions for justified
+ variables.
+10-11-29 An incorrect warning message was eliminated with the -n option for
+ arithmetic expressions with associative arrays.
+10-11-29 Some changes were made to slightly reduces startup time.
+10-11-24 A bug in which a name reference is make to arr[0] when arr is not
+ an array has been fixed.
+10-11-23 If a type definition is made without a compound variable assignment it
+ produces an error message and no longer shows up as a defined type.
+10-11-22 The handling of \ inside [...] for for shell and ~(E) patterns has
+ been fixed.
+10-11-22 A patch was made to pfsh to handle an error case.
+10-11-22 +Modified types defined in namespace so that they do not clash with
+ types in other namespaces. Types can be referenced using
+ .namespace.typename.
+10-11-22 A bug which caused functions addressed as .namespace.funct to not
+ work has been fixed.
+10-11-22 A bug in which if nr was a name reference to an unset associative
+ array subscript, then ${!nr} did not output the subscript correctly
+ has been fixed.
+10-11-18 A bug in which shcomp -n was not processing double quotes correctly
+ has been fixed.
+10-11-18 Fixed a bug in which typeset -T foo; typeset -T could cause a
+ core dump.
+10-11-17 Fixed a bug in which the error message for set -u could come out
+ garbelled.
+10-11-17 Modified the parser so that typeset -a var=(...) no longer checks
+ the first index for aliases and reserved words.
+10-11-17 A bug in which a subshell command consisted of only a for or until
+ command has been fixed.
+10-11-16 Fixed a bug in which typeset -u would display namespace variables
+ as well as upper case variables.
+10-11-16 A bug which could cause a core dump when unsetting a type variable
+ when there are references to type elements has been fixed.
+10-11-15 A bug which could cause a core dump when unsetting a compound
+ array variable when there are references to array subscripts has
+ been fixed.
+10-11-15 A bug in which using typeset -m to move an indexed array instance
+ to another array could cause the array to display incorrectly has
+ been fixed.
+10-11-12 A bug in which the unset discipline function for a type is called
+ when the type is initialized has been fixed.
+10-11-12 The sequences \< and \> are now preserved after patterns containing
+ ~(E) in ${var/pattern/string} expansions.
+10-11-11 A bug in typeset -m when the variables were compound arrary instances
+ has been fixed.
+10-11-10 A bug in output of a compound variable with types containing types
+ has been fixed.
+10-11-10 Fixed ``name=value export [-p]'' to list environment.
+10-11-09 shtests resets SIGPIPE to SIG_DFL for all tests.
+10-11-09 Fixed a bug in expansion of $"..." when used in assignments.
+10-11-09 Fixed a getaddrinfo() memory leak that didn't call freeaddrinfo()
+ after an interrupt.
+10-11-08 Modified the behavior of set -u so that the shell terminates with
+ error message when when var is unset with ${!var} and ${#var}.
+10-11-02 Fix a bug in which a signal received while in a subshell could be
+ ignored.
+10-10-26 Fix a bug where terminal interrupt was ignored while in vi/emacs
+ edit search mode.
+10-10-26 Fix $'a\0b'c to expand to 'ac'.
+10-10-26 Provide user defined round() if not in <math.h>.
+10-10-26 Fix bug where $((undefined_function(1))) dumped core.
+10-10-22 Provide user defined iszero() if not in <math.h>.
+10-10-22 Fixed a bug with BGX compile option that could cause the shell to
+ hang.
+10-10-22 Fixed a bug with user define math function on systems for which
+ char is unsigned.
+10-10-21 A bug in which function autoloaded in a function leaves a file open
+ has been fixed.
+10-10-20 Modified the behavior of set -u so that the shell terminates when
+ when var is unset with ${var op string} when op is #, % or /.
+10-10-20 Fixed a bug with the AUDIT option in which the audit file was not
+ not close-on-exec.
+10-10-20 +Made a number of changes and fixes for the NAMESPACE compile option
+ which as added on 10-06-09 but some problems still remain.
+10-10-15 Fixed a bug in which arithmetic functions (added on 10-03-24) did
+ not work when the function definition was in the same compound
+ command in which the function was referenced.
+10-10-13 A bug in which creating an associative array of compound variables
+ with no members as an element of a compound variable did not work
+ has been fixed.
+10-10-08 A bug in which killing the last command in a function defined
+ with function name, terminated the calling script has been fixed.
+10-10-08 A bug which could cause a core dump if IFS is unset inside a function
+ has been fixed.
+10-10-07 +To reduce unwanted side effects, invoking typeset without the export
+ option and without an assignment now causes the variables to be unset
+ if the variable is inherited from the environment.
+10-10-06 The closing brace for ${ command } is now a token no matter what
+ character follows it.
+10-10-04 The change for $'...' expansion on 10-08-09 did not expand parameters
+ contained in the error message and this has been fixed.
+10-10-04 A bug in which a declaration of indexed array (-a_ in a type
+ definition would be displayed as a compound indexed array (-C -a)
+ has been fixed.
+10-09-30 The C99 math function ldexp has been added.
+10-09-30 A bug with two dimensional arrays with expansion of the form
+ ${ref[0..5]} where ref is a nameref to array[i] has been fixed.
+10-09-29 A bug in which an eval with redirections invoked from a dot script
+ would not restore the file has been fixed.
+10-09-29 A bug in which loading a function from FPATH could leave a file
+ descriptor open has been fixed.
+10-09-28 +A new compile option SHOPT_FIXEDARRAY has been added and is being
+ evaluation. It allows fixed sized indexed arrays be to defined
+ using "typeset array[dim1][dim2]...[dimn]". Fixed sized arrays
+ are used the same way indexed arrays are. Currently, only fixed
+ arrays of fixed objects (float, int, and justifies objects) are
+ supported.
+10-09-22 A bug which could cause an exception when a function with static
+ variables was redefined has been fixed.
+10-09-21 A bug in the processing of (command&) which created a job in the
+ parent process has been fixed.
+10-09-21 A for loop optimization bug with arithmetic expression evaluation
+ has been fixed.
+10-09-21 A bug in which a recursive function containing a pipeline could
+ lead to an exception fixed after 8 levels of recursion has been
+ fixed.
+10-09-18 A bug in which the count of elements in an array was wrong leading
+ to an exception has been fixed.
+10-09-13 A bug which occurred when both xtrace and showme options where
+ specified in which the xtrace option disabled showme has been fixed.
+10-09-13 A bug in which creating a reference to an array variable with any
+ elements could cause subsequent array elements to be treated as
+ compound variables has been fixed.
+10-09-09 A bug which caused ((c.ar[x][y])) to be treated as a syntax error
+ has been fixed.
+10-09-08 A bug in the processing of references to multidimensional arrays
+ in arithmetic expressions has been fixed.
+10-09-08 A bug in the handling of multi-dimensional arrays which caused
+ the number of elements in each dimension to be incorrect has
+ been fixed.
+10-09-07 The change for messages on 10-08-09 did not handle message in
+ assignments and this has been fixed.
+10-09-07 A bug in the indentation of compound variables in arrays when
+ output with print -v has been fixed.
+10-09-07 A rare bug with indexed arrays when assigned a null string that could
+ cause a core dump has been fixed.
+10-09-03 A number of changes were made for jobs pools.
+10-08-31 typeset -p was modified to output name references after other
+ variables so that the output could be used as input.
+10-08-31 A bug with typeset -p in which variables with attributes but
+ without attributes were not displayed correctly has been fixed.
+10-08-27 +When running a subshell, the current pool is unset.
+10-08-27 A bug in which jobs started from within for or while lists in
+ interactive shells could generate completion messages has been fixed.
+10-08-25 Fixed a couple of bugs related to job pools.
+10-08-24 +[[ -e /dev/xxx/ ]] can be used to check whether special files of
+ those names are handled by the shell.
+10-08-24 A bug in the running of a compiled dot script in which only the
+ first command was executed has been fixed.
+10-08-23 A bug which sometimes caused a core dump with a configure script
+ has been fixed.
+10-08-20 A bug in command substitution which caused a configure script to
+ hang has been fixed.
+10-08-19 Eliminated unnecessary ; from output of compound variable with
+ typeset -p.
+10-08-17 Fixed a bug in command substitution in which under certain
+ circumstances a file whose size is a power of 2 plus one, and the last
+ character was not a new-line, could cause memory corruption.
+10-08-13 +Added static discipline functions to type similar to C++ static
+ class functions.
+10-08-11 A bug in time when applied to a pipeline in which the shell did
+ not wait for all elements of the pipeline to complete has been fixed.
+10-08-11 Restored sh_fmtq() quoting to not quote NAME= in NAME=VALUE.
+10-08-09 +Modified the expansion of message strings, $"...", so that they
+ are expanded each time they are referenced rather than expanding
+ them when the script is compiled or read in.
+10-08-06 +The process id for jobs in job pools is now of the form poolname.n
+ where n is the jobid in that pool. Commands that accept job names
+ or numbers now understand names in this format.
+10-08-05 A bug in which an assignment from within an arithmetic expression
+ inside a function would create a local variable has been fixed.
+10-08-04 A bug in the expanding of variables whose names contain multibyte
+ characters has been fixed.
+10-08-04 A bug which caused an exception when processing scripts compiled
+ with shcomp -n has been fixed.
+10-08-02 Tests using very small buffer sizes uncovered a number of bug most
+ connected with here documents which have been fixed.
+10-07-27 The format modifier , used for digit grouping with d and f formats
+ has been documented.
+10-07-26 cd '' now produces and error rather than changing to the current
+ directory.
+10-07-26 A bug in multi-byte locales which the last character of a
+ multi-byte character is a \ or pattern character which could occur
+ when the character was the last character of a command substitution
+ has been fixed.
+10-07-23 Another bug in the processing of ${var:offset;len} in multi-byte
+ locales when len is larger than the number of characters has been
+ fixed.
+10-07-23 Many coding changes have been made to eliminate most of the uses
+ of global variables in the shell code.
+10-07-22 Fixed a bug in which discipline functions were not being invoked
+ when it was invoked as ref.discipline where ref was a name reference
+ to an array instance.
+10-07-22 Fixed a bug in which discipline functions were not being invoked it
+ was invoked on a two dimensional array, i.e., arr[5][9].discipline.
+10-07-19 Fixed a buffering problem which occurred when running a script with
+ ssh and the parent ssh process is killed.
+10-07-14 Modified the parser to treat ((...)) inside [[...]] as ( (...) ) to
+ that it is a nested (...).
+10-07-09 A bug in the handling of process substitution inside command
+ substitution as part of a pipeline has been fixed.
+10-07-07 A bug in the output for compound variables containing
+ multi-dimensional arrays has been fixed.
+10-07-06 ksh now recovers from changes made by bash to the history file without
+ loosing history commands.
+10-06-25 A bug in which a large here document containing command substitutions
+ of a dynamically loaded function that contained a here document
+ could get truncated has been fixed.
+10-06-24 If after executing a script found in FPATH, if a function, builtin,
+ or type name corresponding to that script is not defined, the shell
+ now outputs an error message and returns value 126.
+10-06-23 Floating point functions that happened to return integer values
+ were being treated as if the function returned integers so that
+ integer division could be used instead of floating point division.
+10-06-22 Fixed a bug in earlier ksh93u in which an arithmetic assignment to a
+ variable in the global scope would instead create a local variable if
+ the variable had an attribute but did not have a value.
+10-06-18 Modified trap handling so that if the same signal is received when
+ executing the handler, it is deferred until the handler completes.
+10-06-16 Fixed a bug in which ulimit -v was setting the the cpu limit
+ on Linux.
+10-06-14 +The command 'typeset -T' now generates the list of type definitions
+ in a format that can be used as input to the shell.
+10-06-09 Put in patch from Solaris for output quoting with %q.
+10-06-09 +Made changes to the NAMESPACE compile option so that it now seems
+ to work. With this option, namespace <name> { command;} will
+ run command in the namespace .name so that all variables and
+ functions created by command are accessible outside the name
+ space via .name.var and .name.fun. Variables and functions that
+ are not in the namespace are not modified when running command.
+10-06-07 Change most internal interfaces to take Sh_t* argument.
+10-06-03 +Types can be loaded on first reference by putting definitions in
+ PFPATH.
+10-06-03 +The shell is now able to parse commands which use type statements
+ before the typeset -T command to define the type executes.
+10-06-03 A bug in the quoting for name reference declarations which did
+ not properly handle [ and ] in subscripts for associative arrays.
+10-06-02 A bug in which a discipline function defined by a type instance to
+ override the default was not being registered has been fixed.
+10-06-02 A bug in which read -C of an associative array of compound variables
+ was not working has been fixed.
+10-06-02 A bug in which the error message for an unset parameter with set -u
+ did not contain the name of the variable has been fixed.
+10-06-01 A bug in typeset -m for moving an indexed array instance to a variable
+ has been fixed.
+10-06-01 A bug in which caused memory to be freed twice when unset was called
+ for an indexed array that had get or set disciplines has been fixed.
+10-06-01 A bug in which the %b format of printf was not preserving NUL bytes
+ with \0 has been fixed.
+10-06-01 A bug in the handling of name references to array variables in
+ arithmetic expressions has been fixed.
+10-05-28 Fixed bugs in changing attributes for two dimensional arrays.
+10-05-28 Eliminated a few unreferenced variables and a reference to
+ uninitialized memory.
+10-05-27 Rewrote the subshell code to avoid using pipes an many cases.
+10-05-24 Fixed a bug which cause an exception when both -l and -s were
+ specified with typeset -i.
+10-05-21 Inputting of three dimensional indexed arrays with ( ( (...)...)...)
+ was not working and has been fixed.
+10-05-21 A bug in which adding the attributes -Ai to a variable via a name
+ reference could cause the value to display incorrectly has been fixed.
+10-05-21 A bug in which using $var inside ((...)) did not work when var was
+ a hex float variable.
+10-05-20 +The compile option SHOPT_EDPREDICT has been added. When this option
+ is on, as you type a line beginning with a # the following characters
+ are treated as a shell pattern and cause matching lines from the
+ history file to be displayed as a numbered list as you type.
+ You can scroll up and down this list or you can use <ESC>nTAB
+ to make this the current line (n defaults to 1 of omitted) or
+ <ESC>n<cr> to execute.
+10-05-20 A bug which caused an exception when multiple levels of composite
+ functions in arithemtic expressions has been fixed.
+10-05-19 <<< with an empty string no longer gives an error.
+10-05-19 A bug in arithmetic evaluation when a name reference to an array
+ instance was used has been fixed.
+10-05-14 A bug in which the shell treats a valid index array assignment,
+ typeset -a x=(foo (x=3;y=4) bar) as a syntax error has been fixed.
+10-05-13 A bug in creating name references to associative array variable
+ after a lookup of one of its elements has been fixed.
+10-05-12 Two bugs in the handling of function static type variables in
+ subshells have been fixed. One could cause an exception and the
+ other would leave side effects in the parent shell.
+10-05-10 A bug in which static variables in functions were not being saved and
+ restored properly when running subshells has been fixed.
+10-05-05 A bug in which print -v did not work correctly when an operand was an
+ indexed array element referring to a compound variable has been fixed.
+10-05-05 A change to improve performance by special casing empty string
+ assignments to avoid repeated malloc() and free().
+10-05-05 A bug in which creating a name reference to a non-existent associative
+ array element would create the array element has been fixed.
+10-05-04 A bug in which name references to static variables in the static
+ scope were not found has been fixed.
+10-04-30 Do not use socketpair() on systems that implement ioctl(I_PEEK)
+ on pipes.
+10-04-29 +When the current job pool is set, coprocess are run in a job pool.
+10-04-28 A type defined with a member foo that is an associative array without
+ elements followed by an expansion ${bar.foo[a]} and an assignment
+ bar.foo[a]=b, no longer indicates that ${#bar.foo[@]} has 0 members.
+10-04-27 Another bug in which a nested command substitution could hang if it
+ generated too much data has been fixed.
+10-04-26 A type defined with a member that is an indexed array without elements
+ would behave as if the 0th element of each instance was defined after
+ a non-zero element was specified and this has been fixed.
+10-04-26 A bug in which types defined in a subshell were not undefined when
+ the subshell completed has been fixed.
+10-04-23 For file completion in commmand line editing, file names starting
+ with # are now escaped so that they are not treated as comments.
+10-04-23 A bug in which ${t.var:=value}, where t is an instance of a type
+ variable, could assign value to the type variable rather than to
+ the type instance has been fixed.
+10-04-23 +Added &| which can be used in place of | to have portions of a
+ pipeline executed in the pool.
+10-04-22 +The .sh.pool variable was added for use with job pools.
+10-04-22 A bug in which a nested command substitution could hang if it
+ generated too much data has been fixed.
+10-04-20 A bug which corrupted one byte of memory when read was called with
+ reads that did not use a delimiter has been fixed.
+10-04-19 The display of a compound variable with an embedded array with
+ attributes was sometimes not working correctly and has been fixed.
+10-04-16 A bug in which attributes were not be propagated to elements in
+ an associative array has been fixed.
+10-04-15 A bug which caused scripts containing user defined math functions to
+ fail to compile with shcomp has been fixed.
+10-04-15 +Job pools have been added with the SHOPT_COSHELL compilation option.
+ A job pool allows a collection of background jobs to run either locally
+ or remotely and to be managed as a unit. The command '& name ...'
+ creates or uses a named job pool for subsequent background jobs.
+ kill, wait, and jobs allow the pool name as operands.
+10-04-14 A bug in which a coprocess connection could terminate prematurely
+ when running a nested subshell has been fixed.
+10-04-12 +Enumeration constants can be used in arithmetic expressions with the
+ ==, != and = operators when the left hand side is an enum variable
+ and the right hand side is an enumeration constant.
+10-04-07 A bug in which setting the trap on CHLD to ignore could cause
+ an incorrect exit status has been fixed.
+10-04-06 A bug in which LINENO was not incremented for a here-document when
+ the here-document word was followed by a comment has been fixed.
+10-04-06 The optimization that execs the last process of a script rather
+ than creating a new process has been removed when a trap on
+ interrupt has been set.
+10-04-06 Unsetting the 'C', 'A' or 'a' typeset attribute now produces an
+ error message rather than generating an exception.
+10-04-06 A bug in which .sh.name contained the subscript and .sh.subscript
+ was empty in some cases with discipline functions on array instances
+ has been fixed.
+10-04-05 A bug in the edit modes where preceding the interrupt character with
+ the literal next character did not work has been fixed.
+10-04-05 A bug in the creation of type instances of arrays which could cause
+ an exception has been fixed.
+10-03-30 A bug in the display of a compound variable containing an indexed
+ array of compound variables has been fixed.
+10-03-24 +Arithmetic functions can be defined using the shell function syntax,
+ 'function .sh.math.name x y z{...}' , where name is the function name
+ invoked within ((...)) and x y z are long double arguments passed
+ as name references. y and z are used for functions with two and
+ three arguments respectively. The value of the function is the value
+ of the long double .sh.value variable when the function returns.
+10-03-24 A bug in which integer division was mistakenly used when the
+ numerator was a binary operator with the first operand floating
+ point and the second integer, e.g. (.1**3)/3, has been fixed.
+10-03-24 The >; file operator was modified so that the temporary file is
+ created in the same physical directory as file.
+10-03-23 A warning message was added to sh -n when $var was used inside
+ ((...)) instead of var.
+10-03-19 fmin was added to the list of math function on the man page.
+10-03-19 Fixed the return value for unalias when the alias did not
+ exist.
+10-03-19 A bug in which the SHLVL variable exported the value it had on
+ input rather than the incremented value has been fixed.
+10-03-19 A bug which causes whence -q to go into an infinite loop has been
+ fixed.
+10-03-19 Removed space between Stopped message and (SIGTTIN) and (SIGTTOUT).
+10-03-17 Modified profile shell execution so that when builtins that
+ correspond to executable have extended attributes, they are
+ executed by pfksh instead of being treated as built-ins.
+10-03-16 A bug in whence -a which produced duplicate lines of output has
+ been fixed.
+10-03-16 A bug in the handling of process groups in monitor mode for
+ command substitutions has been fixed.
+10-03-15 Fixed a bug in which read -u[fd] could cause the shell to core
+ dump when fd was greater than open_max.
+10-03-15 +Modified the shell I/O so that the shell will not fail if the
+ ulimit for open_max is increased as part of the script.
+10-03-12 A bug in which a here-document containing command substitutions
+ that contained here-documents did not process correctly has been
+ fixed.
+10-03-12 A bug in which the terminal is not restored to canonical mode
+ after read times out when in a multibyte locale with no edit mode
+ enabled has been fixed.
+
10-03-05 --- Release ksh93t+ ---
-10-03-05 A varibale unset memory leak has been fixed and tests/leaks.sh
+10-03-05 A variable 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-03-04 Documentation, comment, and diagnostic 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.
@@ -43,10 +949,10 @@
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,
+09-11-19 When read from a terminal was called from with a while or for 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 +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.
@@ -85,7 +991,7 @@
pipefail option was on has been fixed.
09-09-09 A bug in the processing of line joining in here documents which
occurred when a buffer began with <escape><new-line> has been fixed.
-09-09-09 A leading ; with commands in a brace group or parenthesis group
+09-09-09 +A leading ; with commands in a brace group or parenthesis group
no longer causes an error. It now is used for the "showme" option.
09-09-09 A bug in which a subshell containing a background process could
block until the background process completed has been fixed.
@@ -105,7 +1011,7 @@
by name and didn't start with #! and this has been fixed.
09-08-25 A bug in which a function called to deeply from command substitution
did not display an error message has been fixed.
-09-08-24 When processing profiles, ksh93 now violates the POSIX standard and
+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 a
memory fault has been fixed.
@@ -129,7 +1035,7 @@
a script to hang has been fixed.
09-07-08 A bug in the processing of name reference assignments when it
contained pattern expansions with quoting has been fixed.
-09-06-22 The default width for typeset -X has been changed so that there
+09-06-22 +The default width for typeset -X has been changed so that there
should be no loss of precision when converting to a string.
09-06-19 A bug in the printing of array elements for binary variables with
printf %B has been fixed.
@@ -163,7 +1069,7 @@
one for the & and another for non-builtin has been fixed.
09-06-08 When var is an identifier and is unset, ${var} no longer tries to
run command substitution on the command var.
-09-06-08 Process substitution arguments of the form <(command) can now be
+09-06-08 +Process substitution arguments of the form <(command) can now be
used following the < redirection operator to redirect from command.
09-05-13 A bug in which redirections of the form 2>&1 1>&5 inside command
substitution could cause the command substitution to hang has been
@@ -175,7 +1081,7 @@
a function has been fixed.
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-22 +Default alias compound='typeset -C' added.
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 <>.
@@ -186,17 +1092,17 @@
then to the string $HOME/.kshrc.
09-03-31 A bug in which a nested command substitution with redirections could
leave a file descriptor open has been fixed.
-09-03-24 ksh now only uses the value of the _ variable on startup if it can
+09-03-24 +ksh now only uses the value of the _ variable on startup if it can
verify that it was set by the invoking process rather than being
inherited by some other ancestor.
-09-03-24 When ksh is invoked without -p and ruid!=euid, and the shell is
+09-03-24 +When ksh is invoked without -p and ruid!=euid, and the shell is
compiled without SHOPT_P_UID or ruid<SHOPT_P_UID, the shell now
enables the -p option. The previous version instead set the
euid to the ruid as it does for set +p.
-09-03-24 When SHOPT_P_UID is defined at compile time and the shell is started
+09-03-24 +When SHOPT_P_UID is defined at compile time and the shell is started
without -p and ruid!=euid and ruid>=SHOPT_P_UID then euid is set
to ruid. A bug that did the wrong test (ruid<SHOPT_P_UID) was fixed.
-09-03-17 The sleep(1) builtin now accept and ISO 8601 PnYnMnDTnHnMnS
+09-03-17 +The sleep(1) builtin now accept and ISO 8601 PnYnMnDTnHnMnS
duration or date(1) compatible date/time operand.
09-03-10 If a variable that was left or right justified or zero-filled was
changed with a typeset statement that was left or right justified
@@ -224,8 +1130,8 @@
of 127 when the pipefail option is enabled has been fixed.
09-01-26 ksh93 now generates an error message if you attempt to create
a global name reference to a local variable.
-09-01-26 The [[ -v var ]] operator was modified to test for array elements.
-09-01-23 The redirection operator <>; was added. It is similar to <>
+09-01-26 +The [[ -v var ]] operator was modified to test for array elements.
+09-01-23 +The redirection operator <>; was added. It is similar to <>
except that if the command it is applied to succeeds, the file
is truncated to the offset at the command completion.
09-01-23 The default file descriptor for <> was changed to 1.
@@ -236,9 +1142,9 @@
has been fixed.
09-01-19 A bug in which sending SIGWINCH to a process that reads from a pipe
could cause a memory fault has been fixed.
-09-01-16 The -R unary operator was added to [[...]] and test to check whether
+09-01-16 +The -R unary operator was added to [[...]] and test to check whether
a variable is a name reference.
-09-01-16 The -v unary operator was added to [[...]] and test to check whether
+09-01-16 +The -v unary operator was added to [[...]] and test to check whether
a variable is set.
09-01-14 The unset built-in was modified to return 0 exit status when
unsetting a variable that was unset to conform with the POSIX
@@ -279,7 +1185,7 @@
08-12-07 A timing bug on some systems (for example darwin), that could
cause the last process of a pipeline entered interactively to fail
with an "Exec format error" has been fixed.
-08-12-04 SHOPT_BGX enables background job extensions. Noted by "J" in
+08-12-04 +SHOPT_BGX enables background job extensions. Noted by "J" in
the version string when enabled. (1) JOBMAX=n limits the number
of concurrent & jobs to n; the n+1 & job will block until a
running background job completes. (2) SIGCHLD traps are queued
@@ -293,7 +1199,7 @@
output has been fixed.
08-12-04 A bug in which printf "%d\n" "'<euro>'" did not output the
numerical value of the EURO symbol, 8354, has been fixed.
-08-11-24 /dev/fd* and /dev/std* redirections are first attempted with
+08-11-24 + /dev/fd* and /dev/std* redirections are first attempted with
open() to preserve seek semantics; failing that the corresponding
file descriptors are dup()'d.
08-11-20 A bug which could cause a core dump if a function compiled with
@@ -305,7 +1211,7 @@
has been fixed.
08-11-11 A bug in which running a simple command & inside a function would
not return the correct process id has been fixed.
-08=11-10 A bug in which the exit status of a command could be lost if the pid
+08-11-10 A bug in which the exit status of a command could be lost if the pid
was that of the most recent command substitution that had completed
has been fixed.
08-11-10 The maximum depth for subshells has been increased from 256 to 65536.
@@ -316,11 +1222,11 @@
08-10-31 Variable scoping/initialization bugs that could dump core were fixed.
08-10-24 The lexer now accepts all RE characters for patterns prefixed
with a ksh ~(...) option expression.
-08-10-24 For ${var/pat/sub} \0 in sub expands to the text matched by pat.
+08-10-24 +For ${var/pat/sub} \0 in sub expands to the text matched by pat.
08-10-18 A bug in array scoping that could dump core has been fixed.
08-10-10 read -n and -N fixed to count characters in multibyte locales.
08-10-10 A bug that mishandled _.array[] type references has been fixed.
-08-10-09 ${.sh.version} now contains a concatenation of the following (after
+08-10-09 +${.sh.version} now contains a concatenation of the following (after
'Version') denoting compile time features:
A SHOPT_AUDIT
B SHOPT_BASH
@@ -357,9 +1263,9 @@
by writing 'not found' diagnostics to the standard error.
08-09-18 test and [...] were fixed to comply with POSIX in the case
of test '(' binop ')' where binop is a valid binary test operator.
-08-09-16 If a method discipline named create is specified when defining a
+08-09-16 +If a method discipline named create is specified when defining a
type, this function will be called when an instance is created.
-08-09-15 The variable _ is now set as a reference to the compound variable
+08-09-15 +The variable _ is now set as a reference to the compound variable
when defining a compound variable or a type.
08-09-10 The shell now prints an error message when the type name specified
for an indexed array subscript is not an enumeration type.
@@ -383,19 +1289,19 @@
the sub-variables has been fixed.
08-09-01 A bug in the subshell cleanup code that could cause SIGSEGV has
been fixed.
-06-08-26 The SHLVL variable which is an environment variable used by bash
+06-08-26 +The SHLVL variable which is an environment variable used by bash
and zsh that gets incremented when the shell starts.
-08-08-25 For an indexed array, a negative subscript now refers to offsets
+08-08-25 +For an indexed array, a negative subscript now refers to offsets
from the end so that -1 refers to the last element.
08-08-24 An alignment error for shorts on 64 bit architectures has been fixed.
08-08-22 If oldvar is a compound variable, typeset -C newvar=oldvar creates
newvar as a copy of oldvar.
-08-08-19 The ALRM signal no longer cause the sleep builtin to terminate.
+08-08-19 +The ALRM signal no longer cause the sleep builtin to terminate.
08-08-13 When used in an arithmetic expression, the .sh.version variable
now produces a number that will be increasing for each release.
08-08-11 A bug in which type instantiation with a compound assignment in
a dot script in which the type is defined has been fixed.
-08-08-07 The -m option has been added to typeset to move or rename a
+08-08-07 +The -m option has been added to typeset to move or rename a
variable. Not documented yet.
08-08-06 A bug in read when used in a loop when a prompt was specified
when reading from a terminal has been fixed.
@@ -410,14 +1316,14 @@
has been fixed.
08-07-17 A bug which occurred when a nameref was created from within a
function that was part of a pipeline has been fixed.
-08-07-14 The compile option SHOPT_STATS was added. With this option the
+08-07-14 +The compile option SHOPT_STATS was added. With this option the
compound variable .sh.stats keeps usage statistics that could help
with performance tuning.
-08-07-10 The output of set now always uses a single line for each variable.
+08-07-10 +The output of set now always uses a single line for each variable.
For array variables, the complete set of values is now displayed.
-08-07-09 The typeset -C option can be used with arrays to indicate that
+08-07-09 +The typeset -C option can be used with arrays to indicate that
each element should default to a compound variable.
-08-07-08 The %B format now outputs compound variables and arrays. The
+08-07-08 +The %B format now outputs compound variables and arrays. The
alternate flag # can be used to cause output into a single line.
08-07-03 When the window change signal, WINCH, is received, the current
edit line is redrawn in place.
@@ -427,7 +1333,7 @@
was three characters or less has been fixed.
08-06-23 A bug in which the SIGCLD was not be triggered when background
jobs completed has been fixed.
-08-06-23 KSH_VERSION added as a name reference to .sh.version.
+08-06-23 _KSH_VERSION added as a name reference to .sh.version.
08-06-20 type now outputs 'special builtin' for special builtins.
08-06-19 A couple of bugs in multi-dimensional arrays have been fixed.
08-06-19 A bug in which a syntax error in a dot script could generated
@@ -436,7 +1342,7 @@
on some architectures.
08-06-16 A bug in which printf "%B" could generate an exception when the
specified variable was not set has been fixed.
-08-06-16 When typeset -p is followed by variable names, it now displays
+08-06-16 +When typeset -p is followed by variable names, it now displays
the attributes names and values for the specific names.
08-06-14 A bug that could effect the drawing of the screen from multiline
emacs or gmacs mode when walking up the history file has been fixed.
@@ -444,15 +1350,15 @@
have side effects into the parent shell has been fixed.
08-06-13 A number of bugs related to using .sh.level to set the stack from
for DEBUG traps have been fixed.
-08-06-13 The .sh.lineno variable has been added. When .sh.level is changed
+08-06-13 +The .sh.lineno variable has been added. When .sh.level is changed
inside a DEBUG trap, the .sh.lineno contains the calling line number
for the specified stack frame.
08-06-13 The .sh.level variable has been documented and now works.
-08-06-11 The -C option has been added to read for reading compound command
+08-06-11 +The -C option has been added to read for reading compound command
definitions from a file.
-08-06-11 The . command is now permitted inside a compound command definition.
+08-06-11 +The . command is now permitted inside a compound command definition.
The dot script can contain declaration commands and dot commands.
-08-06-09 Add -C option to typeset so that typeset -C foo, is equivalent
+08-06-09 +Add -C option to typeset so that typeset -C foo, is equivalent
to foo=().
08-06-09 Added -n warning message for typeset option orderings that are valid
with ksh88 but not valid with ksh93, for example Lx5.
@@ -463,17 +1369,17 @@
has been fixed.
08-06-06 A bug when processing `` command substitution with the character
sequence \$' has been fixed.
-08-06-02 When defining a type, the typeset -r attribute causes this field
+08-06-02 +When defining a type, the typeset -r attribute causes this field
to be required to be specified for each instance of the type and
does not allow a default value.
08-06-02 Several bugs in which compound variables were modified by
subshells have been fixed.
-08-05-22 The ceil function has been added to the math functions.
+08-05-22 +The ceil function has been added to the math functions.
08-05-21 A bug in which a name reference defined in a function and passed
as an argument to another function could cause an incorrect binding.
08-05-21 A bug in freeing compound variables that are local to functions
has been fixed.
-08-05-19 The array expansions ${array[sub1..sub2]} and ${!array[sub1..sub2]}
+08-05-19 +The array expansions ${array[sub1..sub2]} and ${!array[sub1..sub2]}
to expand to the value (or subscripts) for array between sub1 and
sub2 inclusive. For associative arrays, the range is based on
location in the POSIX locale. The .. must be explicit and cannot
@@ -486,7 +1392,7 @@
fixed.
08-05-12 The unset built-in now returns non-zero when deleting an array
subscript that is not set.
-08-05-08 Changing the value of HISTFILE or HISTSIZE will cause the old
+08-05-08 +Changing the value of HISTFILE or HISTSIZE will cause the old
history file to be close and reopened with the new name or size.
08-05-08 When FPATH is changed functions that were found via a path search
will be searched for again.
@@ -495,7 +1401,7 @@
been fixed.
08-05-07 A bug in getopts when handling numerical option arguments has
been fixed.
-08-05-07 The typeset -S option was added for variables outside type
+08-05-07 +The typeset -S option was added for variables outside type
definitions to provide a storage class similar to C static
inside a function defined with function name. When outside
type definitions and outside a function, the -S option cause
@@ -516,7 +1422,7 @@
functions has been fixed.
08-04-30 A bug which could cause a coprocess to hang when the read end
is a builtin command has been fixed.
-08-04-30 The emacs and vi editors have been modified to handle window
+08-04-30 +The emacs and vi editors have been modified to handle window
change commands as soon as they happen rather than waiting for
the next command.
08-04-28 A bug in which ${!x} did not expand to x when x was unset has been
@@ -546,7 +1452,7 @@
not flushed before sleep has been fixed.
08-03-17 A bug in which a signal sent to $$ while in a subshell would be
sent to the subshell rather than the parent has been fixed.
-08-03-17 --default option added to set(1) to handle set +o POSIX semantics.
+08-03-17 + A --default option added to set(1) to handle set +o POSIX semantics.
set --state added as a long name alias for set +o.
08-03-14 A bug in which using monitor mode from within a script could
cause the terminal group to change has been fixed.
@@ -567,15 +1473,15 @@
08-03-03 A bug in which creating a name reference to an associative array
instance would fail when the subscript contained characters [ or
] has been fixed.
-08-02-29 The redirection operator >; has been added which for non-special
+08-02-29 +The redirection operator >; has been added which for non-special
files, generates the output in a temporary file and writes the
specified file only of the command has completed successfully.
08-02-15 A bug in ${var/pattern/string} for patterns of the form ?(*) and +(*)
has bee fixed.
08-02-07 A bug in which test \( ! -e \) produced an error has been fixed.
-08-02-14 The typeset -a option can now optionally be followed by the name
+08-02-14 +The typeset -a option can now optionally be followed by the name
of an enumeration type which allows subscripts to be enumerations.
-08-02-14 The enum builtin which creates enumeration types has been added.
+08-02-14 +The enum builtin which creates enumeration types has been added.
08-02-12 The backoff logic when there are no more processes has been fixed.
08-02-07 The -X option has been added to typeset. The -X option creates
a double precision number that gets displayed using the C99 %a
@@ -599,13 +1505,13 @@
07-09-18 The value of ${!var[sub]} was not expanding to var[sub] and this
was fixed. It also fixed ${name} where name is a name reference
to var[sub].
-07-09-18 It is now legal to create a name reference without an initialization.
+07-09-18 +It is now legal to create a name reference without an initialization.
It will be bound to a variable on the first assignment.
-07-08-30 A discipline function can be invoked as ${x.foo} and is equivalent
+07-08-30 +A discipline function can be invoked as ${x.foo} and is equivalent
to ${ x.foo;} and can be invoked as x.foo inside ((...)).
07-07-09 A bug in which typeset -a did not list indexed arrays has been
fixed.
-07-07-03 The command substitution ${ command;} has been added. It behaves
+07-07-03 +The command substitution ${ command;} has been added. It behaves
like $(command) except that command is executed in the current
shell environment. The ${ must be followed by a blank or an
operator.
@@ -666,7 +1572,7 @@
has been fixed.
07-11-15 Bugs in which shell arithmetic and the printf builtin mis-handled the
signs of { -NaN -Inf -0.0 } have been fixed.
-07-11-15 The full { SIGRTMIN SIGRTMIN+1 ... SIGRTMAX-1 SIGRTMAX } range
+07-11-15 +The full { SIGRTMIN SIGRTMIN+1 ... SIGRTMAX-1 SIGRTMAX } range
of signals, determined at runtime, are now supported.
07-11-15 A bug in which creating an index array with only subscript 0 created
only a simple variable has been fixed.
@@ -721,7 +1627,7 @@
has been fixed.
07-07-31 A bug in which a pipeline that completed correctly could have
an exit status of 127 when pipefail was enabled has been fixed.
-07-07-09 The SHOPT_AUDIT compile option has been added for keyboard logging.
+07-07-09 +The SHOPT_AUDIT compile option has been added for keyboard logging.
07-06-25 In vi insert mode, ksh no longer emits a backspace character
before the carriage return when the newline is entered.
07-06-25 A bug in which pipefail would cause a command to return 0
@@ -747,7 +1653,7 @@
07-04-30 A bug in which a pipeline with command substitution inside a
function could cause a pipeline that invokes this function to
hang when the pipefail option is on has been fixed.
-07-04-30 Added -q to whence.
+07-04-30 +Added -q to whence.
07-04-18 A small memory leak with each redirection of a non-builtin has
been fixed.
07-03-08 A bug in which set +o output command line options has been fixed.
@@ -761,10 +1667,10 @@
07-03-02 If a job is stopped, and subsequently restarted with a CONT
signal and exits normally, ksh93 was incorrectly exiting with
the exit status of the stop signal number.
-07-02-26 M-^L added to emacs mode to clear the screen.
+07-02-26 +M-^L added to emacs mode to clear the screen.
07-02-26 A bug in which setting a variable readonly in a subshell would
cause an unset error when the subshell completed has been fixed.
-07-02-19 The format with printf uses the new = flag to center the output.
+07-02-19 +The format with printf uses the new = flag to center the output.
07-02-19 A bug in which ksh93 did not allow multibyte characters in
identifier names has been fixed.
07-02-19 A bug introduced in ksh93 that causes global compound variable
@@ -779,9 +1685,9 @@
06-12-29 --- Release ksh93s ---
06-12-29 A bug in which the value of IFS could be changed after a command
substitution has been fixed.
-06-12-22 /dev/(tcp|udp|sctp)/HOST/SEVRICE now handles IPv6 addresses on
+06-12-22 +/dev/(tcp|udp|sctp)/HOST/SEVRICE now handles IPv6 addresses on
systems that provide getaddrinfo(3).
-06-12-19 A -v option was added to read. With this option the value of
+06-12-19 +A -v option was added to read. With this option the value of
the first variable name argument will become the default value
when read from a terminal device.
06-11-20 A bug in which "${foo[@]:1}}" expands a null argument (instead of
@@ -791,13 +1697,13 @@
be called when called from a discipline function of the same variable.
06-11-14 A bug which could cause a core dump if a file descriptor for
an internal file was closed from with a subshell has been fixed.
-06-10-30 The redirections <# pattern, and <## pattern have been added.
+06-10-30 +The redirections <# pattern, and <## pattern have been added.
Both seek forward to the beginning of the next line that contains
the pattern. The <## form copies the skipped portion to standard
output.
-06-10-26 On systems that support stream control transport, the virtual file
+06-10-26 +On systems that support stream control transport, the virtual file
name /dev/sctp/host/port can now be used to establish connections.
-06-10-26 The printf modifier # when used with d produces units in thousands
+06-10-26 +The printf modifier # when used with d produces units in thousands
with a single letter suffix added. The modifier # when used with
the i specification provides units of 1024 with a two letter suffix.
06-10-24 The value of $! is now set to the process id of a job put
@@ -805,7 +1711,7 @@
06-10-23 A bug in which the value of $! was affected by a background
job started from a subshell has been fixed.
06-10-23 A bug in ${var:offset:len} in multibyte locales has been fixed.
-06-10-15 The remaining math functions from C99 were added for any system
+06-10-15 +The remaining math functions from C99 were added for any system
that supports them.
06-10-13 The klockwork.com software detected a few coding errors that
have been fixed.
@@ -821,23 +1727,23 @@
cause the builtin to hang has been fixed.
06-10-03 A bug in the for loop optimizer which causes >(...) process
substitution to be ignored has been fixed.
-06-09-17 The -a option was added to typeset for indexed arrays. This
+06-09-17 +The -a option was added to typeset for indexed arrays. This
is only needed when using the ([subscript]=value ...) form.
-06-09-06 The showme option was added. Each simple command not beginning
+06-09-06 +The showme option was added. Each simple command not beginning
with a redirection and not occurring with in the while, until, if,
select condition can be preceded by a semi-colon which will
be ignored when showme is off. When showme is on, any command
preceded by a colon will be traced but not executed.
-06-08-16 As a new feature, a leading ~(N) on a pattern has no effect
+06-08-16 +As a new feature, a leading ~(N) on a pattern has no effect
except when used for file expansion. In this case if not
matches are found, the pattern is replaced by nothing rather
than itself.
06-08-11 A bug in the expansion of ${.sh.match[i]:${#.shmatch[i]}} has
been fixed.
-06-08-10 The read builtin options -n and -N have been modified to treat
+06-08-10 +The read builtin options -n and -N have been modified to treat
the size as characters rather than bytes unless storing into a
binary (typeset -B) variable.
-06-07-27 When the here document operator << is followed directly by a #
+06-07-27 +When the here document operator << is followed directly by a #
rather than a -, the first line of the here-document determines
how much whitespace is removed for each line.
06-07-26 A bug in the C-shell history (enabled with set -H) in which the
@@ -851,15 +1757,15 @@
shell patterns has been documented.
06-07-17 A bug with arithmetic command expressions for locales in which
the comma is a thousands separator has been fixed.
-06-07-13 The default HISTSIZE was increased from 128 to 512.
+06-07-13 +The default HISTSIZE was increased from 128 to 512.
06-07-13 A multibyte problem with locales that use shift codes has been fixed.
06-06-23 A number of bug fixes for command, file, and variable completion
have been mode.
-06-06-20 Floating point division by zero now yields the constant Inf or -Inf
+06-06-20 +Floating point division by zero now yields the constant Inf or -Inf
and floating functions with invalid arguments yield NaN.
-06-06-20 The floating point constants Inf and NaN can be used in arithmetic
+06-06-20 +The floating point constants Inf and NaN can be used in arithmetic
expressions.
-06-06-20 The functions isinf(), isnan(), tanhl() have been added for
+06-06-20 +The functions isinf(), isnan(), tanhl() have been added for
arithmetic expressions.
06-06-13 Internal change to use ordering for variables instead of hashing
to speed up prefix matching.
@@ -871,15 +1777,15 @@
06-06-04 Modified built-in binding so that for systems for which /bin
and /usr/bin are the same, a builtin bound to /bin will get
selected when either /bin or /usr/bin is scanned.
-06-06-04 Added literal-next character processing for emacs/gmacs mode.
+06-06-04 +Added literal-next character processing for emacs/gmacs mode.
This change is not compatible with earlier versions of ksh93
and ksh88 when the stty lnext is control-v. The sequence
escape-control-v will display the shell version.
-06-05-31 Modified emacs and vi mode so that entering a TAB after a partial
+06-05-31 +Modified emacs and vi mode so that entering a TAB after a partial
TAB completion, generates a listing of possible completions.
After the second TAB, a number followed by a TAB will perform
the completion with the corresponding item.
-06-05-19 Modified arithmetic so that conversions to strings default to
+06-05-19 +Modified arithmetic so that conversions to strings default to
the maximum number of precision digits.
06-05-16 Bug fixes for multibyte locales.
06-05-10 The =~ operator was added to [[...]] and [[ string ~= ERE ]]
@@ -890,7 +1796,7 @@
did not restore the localed correctly has been fixed.
06-04-04 A bug in which discipline functions could not be added to variables
whose names started with .sh has been fixed.
-06-03-28 The -s option to typeset was added to modify -i to indicate short
+06-03-28 +The -s option to typeset was added to modify -i to indicate short
integers.
06-03-28 A bug in which variables assignment lists before functions
defined with function name were not passed on the functions
@@ -916,11 +1822,11 @@
05-12-13 An arithmetic bug in which x+=y+=z was not working has been fixed.
05-12-13 An arithmetic bug in which x||y was returning x when x was non-zero
rather than 1 has been fixed.
-05-12-07 The aliases for integer and float have been changed to use attributes
+05-12-07 +The aliases for integer and float have been changed to use attributes
-li and -lE to handle long long and long double types.
-05-12-07 The histexpand (-H) option has been added which allows C-shell
+05-12-07 +The histexpand (-H) option has been added which allows C-shell
style history expansions using the history character !.
-05-12-07 The multiline option was added which changes that way the edit
+05-12-07 +The multiline option was added which changes that way the edit
modes handle lines longer than the window width. Instead of
horizontal scrolling, multiple lines on the screen are used.
05-12-05 The whence builtin now returns an absolute pathname when the
@@ -929,13 +1835,13 @@
report a syntax error has been fixed.
05-11-29 A bug when reading fixed length records into typeset -b variables
which caused a zero byte to terminate the value has been fixed.
-05-11-22 The ability to seek to an offset within a file has been added
+05-11-22 +The ability to seek to an offset within a file has been added
with the new I/O redirection operators, <# and >#. Currently,
these redirection operators must be followed by ((expr))
but in a future release, it should be able to used to seek forward
to the specified shell pattern. In addition $(n<#) expands to the
current byte offset for file descriptor n.
-05-11-22 The .sh.match array variable is now set after each [[ ... ]]
+05-11-22 +The .sh.match array variable is now set after each [[ ... ]]
pattern match. Previously it was only set for substring matches.
05-10-17 A bug in which the library path variable could be prefixed
with a directory when a .path file was not encountered in
@@ -944,10 +1850,10 @@
correctly expanded has been fixed.
05-09-05 A bug in which a history command that invoked a history
command could go into an infinite loop has been fixed.
-05-08-31 In the case that IFS contains to adjacent new-lines so that
+05-08-31 +In the case that IFS contains to adjacent new-lines so that
new-line is not treated as a space delimiter, only a single
new-line is deleted at the end of a command substitution.
-05-08-19 When a tilde substitution expands to the / directory and is
+05-08-19 +When a tilde substitution expands to the / directory and is
followed by a /, it is replaced by the empty string.
05-08-16 A bug in which n<&m did not synchronize m has been fixed.
05-08-16 A bug in which process substitution ( <() and >() ) was not
@@ -965,31 +1871,31 @@
05-06-21 A bug in the macro expander has been fixed which could cause a
syntax error for an expansion of the form ${x-$(...)} when
x is set and the command substitution contained certain strings.
-05-06-08 On systems for which echo does not do System V style \ expansions,
+05-06-08 +On systems for which echo does not do System V style \ expansions,
the -e option was added to enable these expansion.
05-06-08 A bug in which ${var op pattern} to not work when inside an
arithmetic expression has been fixed.
-05-05-23 An extension to shell patterns that allows matching of nested
+05-05-23 +An extension to shell patterns that allows matching of nested
groups while skipping over quoted strings has been added.
05-05-18 A bug in which the line number for errors was not correct for
functions loaded from FPATH has been fixed.
05-04-18 A bug in which the exit status $? is not set when a trap triggered
by the [[...]] command is executed has been fixed.
-05-04-08 Redirection operators can be directly preceded with {varname}
+05-04-08 +Redirection operators can be directly preceded with {varname}
with no intervening space, where varname is a variable name which
allows the shell to select a file descriptor > 10 and store it
into varname.
-05-04-08 SHOPT_CMDLIB_BLTIN=1 now includes <cmdlist.h> generated table.
-05-04-07 [[ -o ?option ]] is true if "option" is a supported option.
+05-04-08 +SHOPT_CMDLIB_BLTIN=1 now includes <cmdlist.h> generated table.
+05-04-07 +[[ -o ?option ]] is true if "option" is a supported option.
05-04-05 A bug in handling file completion with spaces in the names
has been fixed.
-05-03-25 The SIGWINCH signal is caught by default to keeps the LINES and
+05-03-25 +The SIGWINCH signal is caught by default to keeps the LINES and
COLUMNS variables in sync with the actual window size.
-05-03-25 Building ksh with SHOPT_REMOTE=1 causes ksh to set --rc if stdin is
+05-03-25 +Building ksh with SHOPT_REMOTE=1 causes ksh to set --rc if stdin is
a socket (presumably part of a remote shell invocation.)
-05-03-25 Building ksh with SHOPT_SYSRC=1 causes interactive ksh to source
+05-03-25 +Building ksh with SHOPT_SYSRC=1 causes interactive ksh to source
/etc/ksh.kshrc (if it exists) before sourcing the $ENV file.
-05-03-25 {first..last[..incr][%fmt]} sequences added to brace expansions
+05-03-25 +{first..last[..incr][%fmt]} sequences added to brace expansions
when braceexpand is enabled.
05-03-03 A bug where a SIGCHLD interrupt could cause a fifo open to fail has
been fixed.
@@ -998,9 +1904,9 @@
process to hang has been fixed.
05-02-24 A bug where builtin library commands (e.g., date and TZ) failed to
detect environment variable changes has been fixed.
-05-02-22 The read builtin and word splitting are now consistent with respect
+05-02-22 +The read builtin and word splitting are now consistent with respect
to IFS -- both treat IFS as field delimiters.
-05-02-22 The read builtin no longer strips off trailing delimiters that
+05-02-22 +The read builtin no longer strips off trailing delimiters that
are not space characters when there are fewer variables than fields.
05-02-17 A builtin bug on systems where dlsym(libcmd) returns link-time
bindings has been fixed.
@@ -1016,11 +1922,11 @@
05-01-11 --- Release ksh93q ---
05-01-11 A bug in the integral divide by zero check has been fixed.
-05-01-11 The -l option has been added to read /etc/profile and
+05-01-11 +The -l option has been added to read /etc/profile and
$HOME/.profile, if they exist, before the first command.
05-01-11 An argument parsing bug that caused `kill -s x -- n' to fail has
been fixed.
-05-01-11 The .paths file, introduced in ksh93m, which can appear in
+05-01-11 +The .paths file, introduced in ksh93m, which can appear in
any directory in PATH, now allows a line of the form 'BUILTIN_LIB=.'
When a command is searched for this directory, and the full path
matches the path of the built-in version of the command (listed
@@ -1040,31 +1946,31 @@
to /dev/stderr has been fixed.
04-11-17 A bug in which an expansion of the form ${array[@]:3} could expand
to ${array[0]} when ${array[3]} was not set has been fixed.
-04-10-22 The -E or -orc command line option reads ${ENV-$HOME/.kshrc} file.
-04-10-22 `-o foo' equivalent to `+o nofoo', `-o nobar' equivalent to `+o bar'.
+04-10-22 +The -E or -orc command line option reads ${ENV-$HOME/.kshrc} file.
+04-10-22 +`-o foo' equivalent to `+o nofoo', `-o nobar' equivalent to `+o bar'.
`--foo' equivalent to `-o foo', `--nofoo' equivalent to `+o foo'
-04-10-05 The .paths file, introduced in ksh93m, which can appear in
+04-10-05 +The .paths file, introduced in ksh93m, which can appear in
any directory in PATH, now allows a line of the form
'BUILTIN_LIB=libname'. When a command is searched for this directory,
the shared library named by libname will first be searched for a
built-in version of the command.
04-09-03 <<< here documents now handle quotes in the word token correctly.
-04-08-08 The maximum size for read -n and and read -N was increased from
+04-08-08 +The maximum size for read -n and and read -N was increased from
4095 to 32M.
-04-08-04 printf %q was modified so that if an no operand was supplied, no
+04-08-04 +printf %q was modified so that if an no operand was supplied, no
no output would be generated rather than a quoted empty string.
-04-08-01 The -n and -N options of the read builtin has been modified
+04-08-01 +The -n and -N options of the read builtin has been modified
when reading variables with the binary attribute so that the
data is stored directly rather than through assignment.
-04-08-01 The shcomp command has been modified to process alias commands
+04-08-01 +The shcomp command has been modified to process alias commands
under some conditions.
-04-07-31 The .sh.match variable added in ksh93l, now works like other
+04-07-31 +The .sh.match variable added in ksh93l, now works like other
indexed arrays.
04-07-08 A loop optimizer bug which occurs when typeset is used in
a for or while loop inside a function has been fixed.
-04-06-24 The number of subexpressions in a pattern was increased to 64
+04-06-24 +The number of subexpressions in a pattern was increased to 64
from the current number of 20.
-04-06-17 The -t option to read was modified to allow seconds to be
+04-06-17 +The -t option to read was modified to allow seconds to be
specified as any arithmetic expression rather than just
an integral number of seconds, for example even -t 'sin(.5)'
is now valid.
@@ -1080,14 +1986,14 @@
04-05-11 A bug in which an exec statement could close the script that
is being processed in a script that is run by name causing
a failure has been fixed.
-04-04-28 If the first character of assignment to an integer variable was 0,
+04-04-28 +If the first character of assignment to an integer variable was 0,
the variable had been treated as unsigned. This behavior was
undocumented and has been removed.
04-04-05 A bug in which the positioning of standard input could be incorrect
after reading from standard input from a subshell has been fixed.
04-03-30 A bug in the for loop optimizer which in rare cases could cause
memory corruption has been fixed.
-04-03-29 The preset alias source='command .' has been added.
+04-03-29 +The preset alias source='command .' has been added.
04-03-29 A bug introduced in ksh93p on some systems in which invoked by
name with #! on the first line would not get the signals handling
initialized correctly has been fixed.
@@ -1096,7 +2002,7 @@
its children has been fixed.
04-02-28 --- Release ksh93p ---
-04-02-28 The ability to apply an append discipline to any variable has
+04-02-28 +The ability to apply an append discipline to any variable has
been added.
04-02-14 A bug in which the exportall option (set -a) would cause incorrect
results for arrays has been fixed.
@@ -1114,7 +2020,7 @@
04-01-08 A bug in the vi edit mode in which the wrong repeat count on
multiple word replacements with the . directive has been fixed.
04-01-06 Backspace characters are now handled correctly in prompt strings.
-04-01-06 The getopts builtin has been modified to accept numerical
+04-01-06 +The getopts builtin has been modified to accept numerical
arguments of size long long on systems that support this.
04-01-06 A bug in which unsetting all elements of an associative array
would cause it to be treated as an indexed array has been fixed.
@@ -1130,7 +2036,7 @@
03-12-05 A problem in which a shell could core dump after receiving a signal
that should cause it to terminate while it was in the process
of acquiring more space has been fixed.
-03-12-05 If ENV is not specified, the shell will default to $HOME/.kshrc
+03-12-05 +If ENV is not specified, the shell will default to $HOME/.kshrc
for interactive shells.
03-11-21 A bug introduced in ksh93o in which the DEBUG trap could get
disabled after it triggered has been fixed.
@@ -1147,14 +2053,14 @@
03-09-22 A bug in which a script without a leading #! could get executed
by /bin/sh rather than the current shell on some systems has
been fixed.
-03-09-12 To improve conformance with ksh88, leading zeros will be ignored
+03-09-12 +To improve conformance with ksh88, leading zeros will be ignored
when getting the numerical value of a string variable so that
they will not be treated as octal constants.
-03-09-03 The builtin kill command now processes obsolete invocations
+03-09-03 +The builtin kill command now processes obsolete invocations
such as kill -1 -pid.
03-09-02 The restriction on modifying FPATH in a restricted shell (sh -r)
has been documented.
-03-09-02 The restricted shell (sh -r) has been modified to disallow
+03-09-02 +The restricted shell (sh -r) has been modified to disallow
executing command -p.
03-08-07 A bug in which the KEYBD trap was not being invoked when
characters with the 8th bit set has been fixed.
@@ -1163,7 +2069,7 @@
when reading from standard input has been fixed.
03-08-01 A bug in which "${foo#pattern}(x)" treated (x) as if it were
part of the pattern has been fixed.
-03-08-01 The command -x option has been modified so that any trailing
+03-08-01 +The command -x option has been modified so that any trailing
arguments that do expand to a single word will be included
on each invocation, so that commands like command -x mv * dir
work as expected.
@@ -1187,7 +2093,7 @@
were no arguments has been fixed.
03-96-23 A bug in which ${X[@]:offset:len} could core dump when X
was unset has been fixed.
-03-06-22 The -x option was added to the command builtin. If this
+03-06-22 +The -x option was added to the command builtin. If this
option is on, and the number of arguments would exceed ARG_MAX,
the command will be invoked multiple times with a subset of
the arguments. For example, with alias grep='command -x grep,
@@ -1200,12 +2106,12 @@
03-06-05 A bug in which the shell could core dump when a child process
that it is unaware of terminates while it is calling malloc()
has been fixed.
-03-06-02 An option named globstar (set -G) has been added. When enabled,
+03-06-02 +An option named globstar (set -G) has been added. When enabled,
during pathname expansion, any component that consists only of ** is
matches all files and any number of directory levels.
03-05-30 A bug in which the PATH search could give incorrect results when
run from directory foo and PATH contained .:foo:xxx has been fixed.
-03-05-29 Some changes were made to the code that displays the prompt in edit
+03-05-29 +Some changes were made to the code that displays the prompt in edit
mode to better handle escape sequences in the prompt.
03-05-27 I added = to the list of characters that mark the beginning of
a word for edit completion so that filenames in assignments
@@ -1222,7 +2128,7 @@
03-05-19 A job control timing bug introduced in ksh93o on some systems
which could cause a pipeline to hang if the first component
completed quickly has been fixed.
-03-05-13 The read builtin has been modified so that the builtin editors
+03-05-13 +The read builtin has been modified so that the builtin editors
will not overwrite output from a previous incomplete line.
03-05-13 A bug in which the name of an identifier could have the string
.sh. prefixed to it after expanding a variable whose name begins
@@ -1238,44 +2144,44 @@
did not follow x has been fixed.
03-03-18 --- Release ksh93o ---
-03-03-18 A -N unary operator was added to test and [[...]] which returns
+03-03-18 +A -N unary operator was added to test and [[...]] which returns
true if the file exists and the file has been modified since it
was last read.
-03-03-18 The TIMEFORMAT variable was added to control the format for
+03-03-18 +The TIMEFORMAT variable was added to control the format for
the time compound command. The formatting description is
described in the man page.
-03-03-06 A -N n option was added to read which causes exactly n bytes
+03-03-06 +A -N n option was added to read which causes exactly n bytes
to be read unlike -n n which causes at most n bytes to be read.
-03-03-03 Three new shell variables were added. The variable .sh.file
+03-03-03 +Three new shell variables were added. The variable .sh.file
stores the full pathname of the file that the current command
was found in. The variable .sh.fun names the current function
that is running. The variable .sh.subshell contains the depth
of the current subshell or command substitution.
-03-03-03 When the DEBUG trap is executed, the current command line after
+03-03-03 +When the DEBUG trap is executed, the current command line after
expansions is placed in the variable .sh.command. The trap
is also now triggered before each iteration of a for, select,
and case command and before each assignment and redirection.
-03-02-28 Function definitions are no longer stored in the history file so
+03-02-28 +Function definitions are no longer stored in the history file so
that set -o nolog no longer has any meaning.
-03-02-28 All function definitions can be displayed with typeset -f not
+03-02-28 +All function definitions can be displayed with typeset -f not
just those stored in the history file. In addition, typeset +f
displays the function name followed by a comment containing the
line number and the path name for the file that defined this function.
03-02-28 A bug in which the value of $LINENO was not correct when executing
command contained inside mult-line command substitutions has been
fixed.
-03-02-19 Since some existing ksh88 scripts use the undocumented and
+03-02-19 +Since some existing ksh88 scripts use the undocumented and
unintended ability to insert a : in front of the % and # parameter
expansion operators, ksh93 was modified to accept :% as equivalent
to % and :# as equivalent to # with ${name op word}.
03-02-14 A bug which could cause a core dump when reading from standard
error when standard error was a pty has been fixed.
-03-02-14 The shell arithmetic was modified to use long double on systems
+03-02-14 +The shell arithmetic was modified to use long double on systems
that provide this data type.
03-02-09 A bug in which a function located in the first directory in FPATH
would not be found when the last component of PATH was . and the
current directory was one of the directories in PATH has been fixed.
-03-02-07 The trap and kill builtin commands now accept a leading SIG prefix
+03-02-07 +The trap and kill builtin commands now accept a leading SIG prefix
on the signal names as documented.
03-02-05 A bug in the expansion of ${var/$pattern}, when pattern contained
\[ has been fixed.
@@ -1287,7 +2193,7 @@
a memory exception has been fixed.
03-01-06 A bug in the expansion of ${var/pattern/$string} in the case that
$string contains \digit has been fixed.
-03-01-02 A -P option was added for systems such as Solaris 8 that support
+03-01-02 +A -P option was added for systems such as Solaris 8 that support
profile shell.
03-01-02 For backward compatibility with ksh88, arithmetic expansion
with ((...)) and let has been modified so that if x is a zero-filled
@@ -1303,11 +2209,11 @@
02-11-18 A bug in which modifying array variables in a subshell could leave
side effects in the parent shell environment has been fixed.
02-11-18 A memory leak when unsetting an associative array has been fixed.
-02-11-14 The code to display compound objects was rewritten to make
+02-11-14 +The code to display compound objects was rewritten to make
it easier for runtime extensions to reuse this code.
-02-11-14 A change was made to allow runtime builtins to be notified when
+02-11-14 +A change was made to allow runtime builtins to be notified when
a signal is received so that cleanup can be performed.
-02-10-31 User applications can now trap the ALRM signal. Previously,
+02-10-31 +User applications can now trap the ALRM signal. Previously,
the ALRM signal was used internally and could not be used
by applications.
02-10-31 A bug in which signals received while reading from a coprocess
@@ -1325,7 +2231,7 @@
specified has been fixed.
02-09-30 --- Release ksh93n ---
-02-09-30 The maximum indexed array size was increased to 16Megs.
+02-09-30 +The maximum indexed array size was increased to 16Megs.
02-09-30 A bug which could cause a core dump when changing attributes
of associative array has been fixed.
02-09-30 A bug in which exporting an array variable would not export the
@@ -1348,7 +2254,7 @@
02-09-09 A bug in which a background job was not removed from the job list
when a subshell completed has been fixed, for example (prog&).
02-09-03 A bug in which an assignment of the form name=(integer x=3)
- could be interpretted as an array assignment rather than a
+ could be interpreted as an array assignment rather than a
compound variable assignment has been fixed.
02-08-19 A command completion bug which occurred on file systems that
are case insensitive has been fixed.
@@ -1378,7 +2284,7 @@
builtin to terminate prematurely has been fixed.
02-06-17 A bug in which the shell could core dump if getopts was called
when the OPTIND variable contained a negative value has been fixed.
-02-06-10 The edit mode prompt has been modified to handle escape sequences.
+02-06-10 +The edit mode prompt has been modified to handle escape sequences.
02-06-10 A bug which occurred for interactive shells in which the builtin
cat command was used in command substitution on a file whose
size was larger than PIPE_BUF has been fixed.
@@ -1398,7 +2304,7 @@
for multibyte character sets which occurred when a repeated search
was requested after a long line had been returned for the previous
search has been fixed.
-02-04-02 vi and emacs edit modes were modified so that tab completion is
+02-04-02 +vi and emacs edit modes were modified so that tab completion is
disabled when invoked from the read built-in.
02-03-26 --- Release ksh93m+ ---
@@ -1414,14 +2320,14 @@
02-01-08 A bug in which a shell script executed from within a subshell
could cause this script to have an invalid pointer leading
to a memory fault has been fixed.
-02-01-07 Added here documents of the form <<< word (as per zsh) which
+02-01-07 +Added here documents of the form <<< word (as per zsh) which
is equivalent to << delim\nword\ndelim.
02-01-07 A bug in which the first word of a compound assignment,
x=(word ...), was treated as a reserved word has been fixed.
02-01-07 A bug in the handling of \ when noglob was enabled and a
substitution of the form ${word op pattern} occurred in the
same word has been fixed.
-02-01-07 A compilation option, CMDLIB_BLTIN in the file OPTION, has
+02-01-07 +A compilation option, CMDLIB_BLTIN in the file OPTION, has
been added. When this options is set, all commands implemented
in libcmd become shell builtin commands by default.
02-01-07 A bug in which builtin foo, where foo is already a builtin
@@ -1432,9 +2338,9 @@
01-11-28 If the last command was of the form (...) and a trap on EXIT or
ERR was set, and the command inside () modified the trap, then
the original trap wasn't executed.
-01-11-26 The value for 0 is now preceded by the base number when
+01-11-26 +The value for 0 is now preceded by the base number when
the base was not 10.
-01-11-26 The default has compilation mode has been changes so that
+01-11-26 +The default has compilation mode has been changes so that
viraw mode will always be on.
01-10-31 --- Release ksh93m ---
@@ -1464,28 +2370,28 @@
converted to integer has been fixed.
01-09-26 Yet another bug in the optimization of for loops related to
recursive functions with break or continue statements has been fixed.
-01-09-25 The exponentiation operator ** was added to the shell arithmetic
+01-09-25 +The exponentiation operator ** was added to the shell arithmetic
evaluation. It has higher precedence than * and is left
associative.
01-09-25 The code was modified to use the ast multibyte macros
and functions for handing multibyte locales.
-01-09-25 The expansion ${parameter:offset:length} now handles negative
+01-09-25 +The expansion ${parameter:offset:length} now handles negative
offsets which cause offsets to be measured from the end.
01-09-25 Some spelling errors in the documentation were corrected.
-01-09-24 The /dev/tcp/host/port and /dev/udp/host/port now allow
+01-09-24 +The /dev/tcp/host/port and /dev/udp/host/port now allow
the ports to be specified by service name.
-01-09-24 The change staring with ksh93g in which the the appropriate
+01-09-24 +The change staring with ksh93g in which the the appropriate
library path variable is prepended with a corresponding library
directory has been modified. With the new method, only the
library path defined in the file named .paths in the directory
where the executable is found will be modified. See the
man page for more details.
-01-09-23 The .fpath file (see ksh93h) is no longer looked for in each
+01-09-23 +The .fpath file (see ksh93h) is no longer looked for in each
directory on the path to locate function directories. The
file named .paths is used instead.
01-09-23 A bug in which IFS was not being restored after being changed in
a subshell has been fixed.
-01-09-16 With the vi and emacs edit modes, after a list of command
+01-09-16 +With the vi and emacs edit modes, after a list of command
or functions is generated with = or M-= respectively,
any element from the list can be pasted on the command line
by preceding the = or M-= with a numeric parameter specifying
@@ -1536,26 +2442,26 @@
01-06-01 A small memory leak from subshells has been fixed.
01-05-22 A bug in which attributes for variables that did not have
values would be lost after a subshell has been fixed.
-01-05-22 The %R format has been added to convert a shell pattern into
+01-05-22 +The %R format has been added to convert a shell pattern into
an extended regular expression.
-01-05-22 The escape sequences \e, \cX, \C[.collating-element.], and
+01-05-22 +The escape sequences \e, \cX, \C[.collating-element.], and
\x{hex} have been added to ASCII-C strings and to printf format
strings.
-01-05-20 Patterns of the form {n}(pattern) and {m,n}(pattern) are now
+01-05-20 +Patterns of the form {n}(pattern) and {m,n}(pattern) are now
recognized. The first form matches exactly n of pattern whereas,
the second form matches from m to n instances of pattern.
-01-05-20 The shell allows *-(pattern), +-(pattern), ?-(pattern),
+01-05-20 +The shell allows *-(pattern), +-(pattern), ?-(pattern),
{m,n}-(pattern}, and @-(pattern) to cause the minimal
match of pattern to be selected whenever possible rather
than the maximal (greedy) match.
-01-05-20 The character class [:word:] has been added to patterns.
+01-05-20 +The character class [:word:] has been added to patterns.
The word class is the union of [:alnum:] and the character _.
-01-05-20 Inside (...) pattern groups, the \ character is now treated
+01-05-20 +Inside (...) pattern groups, the \ character is now treated
specially even when in an enclosing character class. The
sequences, \w, \d, \s are equivalent to the character classes
word, digit, and space respectively. The sequences \W, \D,
and \S are their complement sets.
-01-05-20 The shell now recognizes pattern groups of the form
+01-05-20 +The shell now recognizes pattern groups of the form
~(options:pattern) where options or :pattern can be omitted.
Options use the letters + and - to enable and disable options
respectively. The option letters g (greedy), i (ignore case)
@@ -1572,33 +2478,33 @@
01-05-14 A small memory leak from subshells has been fixed.
01-05-10 A bug in which open files were not restored after a subshell
that had used exec to replace a file has been fixed.
-01-05-10 Redirection to a null file name now generates an error message.
+01-05-10 +Redirection to a null file name now generates an error message.
01-05-09 The shell now rejects some invalid parameter substitutions that
were previously processed in undefined ways.
01-05-09 A bug in which the output of select was not flushed before the
read when input did not come from the terminal has been fixed.
01-05-08 A bug in which job ids would not be freed for interactive shells
when subshells ran built-ins in the background has been fixed.
-01-05-08 The FPATH variable now requires an explicit . to cause the
+01-05-08 +The FPATH variable now requires an explicit . to cause the
current directory to be treated as a function directory.
01-05-08 A bug in read -n when echo mode was disabled has been fixed.
01-05-07 A bug in which function definitions could be listed as part
of the history has been fixed.
-01-04-30 This release uses a new and often much faster pattern matcher than
+01-04-30 +This release uses a new and often much faster pattern matcher than
earlier releases.
-01-04-30 An optimizer now eliminates invariant parameter expansions from
+01-04-30 +An optimizer now eliminates invariant parameter expansions from
for while and until loops.
-01-04-30 The variable .sh.match is set after each pattern match (# % or /)
+01-04-30 +The variable .sh.match is set after each pattern match (# % or /)
in a variable substitution. The variable .sh.match is an
indexed array with element 0 being the complete match.
The array is only valid until the next subsequent pattern
match or until the value of the variable changes which ever
comes first.
-01-04-30 A self generating man page has been added to shcomp. Also,
+01-04-30 +A self generating man page has been added to shcomp. Also,
shcomp now stops compiling when it finds an exit or exec
command and copies the remainder so that it can be used
for standard input.
-01-04-30 The shcomp command was modified so that it can work in an
+01-04-30 +The shcomp command was modified so that it can work in an
EBCIDIC environment and that binary scripts are portable
across environments.
01-04-30 A bug in the handling of a trailing : in PATH has been fixed.
@@ -1619,7 +2525,7 @@
01-04-09 A bug in which invalid patterns, for example, ) by itself,
was not treated as a string has been fixed so that if i=')',
then [[ $i == $i ]] is true.
-01-04-09 The shell arithmetic now interprets C character constants.
+01-04-09 +The shell arithmetic now interprets C character constants.
01-04-09 A bug in which a non-zero return from a function defined
with the function reserved word did not trigger the ERR
trap or exit with set -e has been fixed.
@@ -1638,7 +2544,7 @@
01-03-20 A bug in which an syntax error in an arithmetic expression
entered interactively could cause the shell to go into
an infinite loop outputting the error message has been fixed.
-01-03-10 ksh93 accepts -l as a synonym for -L in test on systems for
+01-03-10 +ksh93 accepts -l as a synonym for -L in test on systems for
which /bin/test -l tests for symbolic links.
01-03-10 A bug in parsing scripts in which { and } are used in place of
in and esac in case statements embedded in compound commands
@@ -1670,18 +2576,18 @@
01-02-05 --- Release ksh93k+ ---
01-02-05 The sequence \<newline> inside $'...' was not incrementing
the line count and this has been fixed.
-01-02-05 Modified expansion of "${@-}" so that if no arguments are set
+01-02-05 +Modified expansion of "${@-}" so that if no arguments are set
it results in null string rather than nothing.
01-02-02 memory leak problem with local variables in functions fixed.
-01-01-25 allow arithmetic expressions with float%int and treat them
+01-01-25 +allow arithmetic expressions with float%int and treat them
as ((int)float)%int rather than as an error.
01-01-19 read -n1 was not working and has been fixed.
-01-01-17 ksh now handles the case in which a here document in command
+01-01-17 +ksh now handles the case in which a here document in command
substitution $() is terminated by the trailing ). Previously,
a new-line was needed at the end of the delimiter word.
01-01-02 A bug in which a KEYBD trap would cause a multi-line token
to be processed incorrectly has been fixed.
-00-12-10 Arithmetic integer constants can now have L and U suffices.
+00-12-10 +Arithmetic integer constants can now have L and U suffices.
00-12-10 A bug in the processing of arithmetic expressions with compound
variables when the -n option is on has been fixed.
00-12-08 A bug in M-f and M-b from emacs mode has been fixed. This
@@ -1705,7 +2611,7 @@
00-10-18 A bug in which expansions of the form ${var//pattern/string}
did not work correctly when pattern was '/' or "/" has
been fixed.
-00-10-18 The output format for indexed arrays in compound variables
+00-10-18 +The output format for indexed arrays in compound variables
has been modified so that it can be used as input.
00-10-18 Assignments with name references (typeset -n) will now
implicitly unreference an existing name reference.
@@ -1713,45 +2619,45 @@
is appended to a variable that is not an array has been fixed.
00-10-16 A bug in which the SIGCONT signal was being sent to
each process will kill -0 or kill -n 0 has been fixed.
-00-10-12 The arithmetic evaluation portion has been rewritten to
+00-10-12 +The arithmetic evaluation portion has been rewritten to
perform a number of optimizations.
00-10-10 A bug in which name prefix matching ${!name.*} was not
checking name to see if it was a name reference has been fixed.
00-09-26 A bug in the multibyte version in which the width of for
non-printing characters was not correct has been fixed.
-00-09-12 Made changes to get multibyte editing work on UWIN for windows
+00-09-12 +Made changes to get multibyte editing work on UWIN for windows
00-09-12 A bug in which multibyte characters would be displayed incorrectly
has been fixed.
00-08-08 Removed build dependency on iswprint() and iswalph().
00-07-20 In some cases the read builtin would read more than a single
line from a pipe on standard input and therefore leave the seek
position in the wrong location.
-00-07-05 If the directory / is on the path, a / will not be inserted
+00-07-05 +If the directory / is on the path, a / will not be inserted
between the directory and the file name during path searching
to avoid searching // for systems that treat this specially.
00-06-26 A bug in which on rare occasions wait could return before all
jobs have completed has been fixed.
00-06-21 A bug in which backspace did not work correctly during the
R replace directive in vi-mode has been fixed.
-00-06-12 Added variable name completion/expansion/listing to the set of
+00-06-12 +Added variable name completion/expansion/listing to the set of
completions. Variable name completions begin with $ or "$ followed
by a letter.
00-05-09 --- Release ksh93j ---
00-05-09 Modified command substitution to avoid using /tmp files when
run on read-only file systems.
-00-04-17 Modified printf to handle '%..Xc' and '%..Xs' options where X
+00-04-17 +Modified printf to handle '%..Xc' and '%..Xs' options where X
is not an alpha character. Previous versions core dumped with this.
-00-04-10 Changes to multibyte editing code were made to use standard
+00-04-10 +Changes to multibyte editing code were made to use standard
ISO C functions rather than methods devised before the standard.
00-04-09 Add %H options to printf to output strings with <"'&\t> properly
converted for use in HTML and XML documents.
-00-04-07 Modified getopts builtin to handle \f...\f in usage string
+00-04-07 +Modified getopts builtin to handle \f...\f in usage string
by invoking specified function.
00-04-04 Added self generating man pages for bg, fc, fg, disown, jobs,
hist, let, ., and ulimit.
-00-03-30 The append operator += has been added and can be used
+00-03-30 +The append operator += has been added and can be used
for all assignments, strings, arrays, and compound variables.
-00-03-30 Code was modified in several places to support automatic
+00-03-30 +Code was modified in several places to support automatic
generation of C locale dictionaries.
00-03-28 A bug in which the set and trap commands invoked with --name
type arguments would terminate the invoking script has
@@ -1767,11 +2673,11 @@
00-03-05 A prototype for ioctl() was removed from the vi edit mode.
00-01-28 --- Release ksh93i ---
-00-01-28 Most of the built-in commands and ksh itself are now
+00-01-28 +Most of the built-in commands and ksh itself are now
self documenting. Running command --man will produce
screen output. Running command --html produces the
man page in html format.
-00-01-28 The getopts builtin can process command description
+00-01-28 +The getopts builtin can process command description
strings to produce man pages.
00-01-28 A bug in which a script could terminate when getopts
encountered an error when invoked inside a function
@@ -1784,17 +2690,17 @@
to printf was not working has been fixed.
99-03-31 --- Release ksh93h ---
-99-03-31 The PATH search algorithm has been modified to look
+99-03-31 +The PATH search algorithm has been modified to look
for a file named .fpath in each bin directory and if
found, to search for functions in this directory if
it cannot find the command in that directory.
-99-03-31 When performing pathname expansion, the shell checks
+99-03-31 +When performing pathname expansion, the shell checks
to see whether each directory it reads is case sensitive
or not, and performs the matching accordingly.
-99-03-31 The %T format for printing formatted date/time.
-99-03-31 The emacs and vi modes now handle arrow keys when
+99-03-31 +The %T format for printing formatted date/time.
+99-03-31 +The emacs and vi modes now handle arrow keys when
they use standard ANSI escape sequences.
-99-03-31 The TAB key can be used for completion in emacs and viraw mode.
+99-03-31 +The TAB key can be used for completion in emacs and viraw mode.
99-03-31 A bug in setting .sh.editchar during the KEYBD trap
for the MULTIBYTE option was fixed in release ksh93h.
99-03-31 A bug in shcomp for compilation of unary operators with [[...]]
@@ -1822,19 +2728,19 @@
has been fixed.
98-04-30 --- Release ksh93g ---
-98-04-30 The pipefail option has been added. With pipefail
+98-04-30 +The pipefail option has been added. With pipefail
enabled, a pipeline will not complete until all
commands are complete, and the return value will
be that of the last command to fail, or zero if
all complete successfully.
-98-04-30 The name-value pair library uses the cdt library rather
+98-04-30 +The name-value pair library uses the cdt library rather
than the hash library. This change should be transparent
to applications.
-98-04-30 On the U/WIN version for Window 95 and Windows NT,
+98-04-30 +On the U/WIN version for Window 95 and Windows NT,
when a directory beginning with a letter followed by
a colon is given to cd, it is assumed to be an absolute
directory
-98-04-30 When an executable is found on a given path,
+98-04-30 +When an executable is found on a given path,
the appropriate library path variable is prepended
with a corresponding library directory.
98-04-30 A bug in which a name reference could be created to
@@ -1870,22 +2776,22 @@
error has been fixed.
98-04-30 A bug in here document expansion in which ${...} expansions
were split across buffer boundaries has been fixed.
-98-04-30 The sh_fun() function now takes third argument which
+98-04-30 +The sh_fun() function now takes third argument which
is an argument list for the invoked discipline function
or built-in.
-98-04-30 A callback function can be installed which will give
+98-04-30 +A callback function can be installed which will give
notification of file duplications and file closes.
98-04-30 When ksh is compiled on systems that do not use fork()
current option settings where not propagated to sub-shells.
97-06-30 --- Release ksh93f ---
-97-06-30 Hostnames in addition to host addresses can be given in
+97-06-30 +Hostnames in addition to host addresses can be given in
/dev/tcp/host/port virtual file names.
97-06-30 File name completion and expansion now quotes special
characters in file names from both emacs and vi edit modes.
97-06-30 An empty for list behave like a for list with null expansions.
It produces a warning message with sh -n.
-97-06-30 The code has been modified to work with EBCDIC as well as ASCII.
+97-06-30 +The code has been modified to work with EBCDIC as well as ASCII.
97-06-30 A bug which would cause the secondary prompt to be
displayed when a user entered a literal carriage
return has been fixed.
@@ -1935,8 +2841,8 @@
96-07-31 --- Release ksh93e ---
-96-07-31 The math functions, atan2, hypot, fmod, and pow were added.
-96-07-31 When a shared library is loaded, if the function lib_init()
+96-07-31 +The math functions, atan2, hypot, fmod, and pow were added.
+96-07-31 +When a shared library is loaded, if the function lib_init()
is defined in the library, it is invoked the first time that
the library is loaded with builtin -f library.
96-07-31 The k-shell information abstraction database option, KIA,
@@ -2003,7 +2909,7 @@
95-08-28 A bug in file name generation which sometimes
appended a . for filenames that ended in / has
been fixed.
-95-08-28 If a process is waited for after a status has
+95-08-28 +If a process is waited for after a status has
been returned by a previous wait, wait now
returns 127.
95-08-28 A bug with hist (fc) -e which prevented a command
@@ -2012,7 +2918,7 @@
of unary test operators has been fixed.
95-08-28 A bug with typeahead and KEYBOARD traps with the
MULTIBYTE option set has been fixed.
-95-08-28 Builtin functions can take a third argument which is
+95-08-28 +Builtin functions can take a third argument which is
a void*.
95-08-28 The nv_scan() function can restrict the scope of a walk
to the top scope.
@@ -2095,18 +3001,18 @@
changes allow disciplines to be shared by variables
and should make it possible to add new disciplines
without recompilation.
-95-04-31 The name-value library interface has undergone significant
+95-04-31 +The name-value library interface has undergone significant
change for this revision. See the new nval.3 man page.
94-12-31 --- Release ksh93b ---
-94-12-31 Variables inside functions are now statically scoped.
+94-12-31 +Variables inside functions are now statically scoped.
The previous behavior was never documented.
-94-12-31 If IFS contains two consecutive identical characters belonging
+94-12-31 +If IFS contains two consecutive identical characters belonging
to the [:space:] class, then this character is treated as
a non-space delimiter so that each instance will delimit
a field. For example, IFS=$'\t\t' will cause two consecutive
tabs to delimit a null field.
-94-12-31 The getopts command has a -a name option that specifies a
+94-12-31 +The getopts command has a -a name option that specifies a
name that will be used for usage messages.
94-12-31 A bug which caused unset RANDOM to dump core has been
fixed.
@@ -2126,7 +3032,7 @@
94-12-31 A bug which could cause a core dump when a discipline
function was unset within a discipline was fixed.
94-12-31 The typeset builtin now accepts a first argument of
- + or - for compatibility with ksh88.
+ + or - for compatibility with ksh88.
94-12-31 For compatibility with ksh88, the results of expansions
of command arguments will treat the extended character
match characters ()|& as ordinary characters.
@@ -2147,7 +3053,7 @@
strings now works.
94-12-31 A bug in chmod which caused the -R option to fail has
been fixed.
-94-12-31 More signal names have been added for Solaris
+94-12-31 +More signal names have been added for Solaris
94-06-30 --- Release ksh93a ---
94-06-30 An expansion bug which causes portions of a word after
diff --git a/usr/src/lib/libshell/common/RELEASE88 b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE88
index 2466e39781..2466e39781 100644
--- a/usr/src/lib/libshell/common/RELEASE88
+++ b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE88
diff --git a/usr/src/lib/libshell/common/RELEASE93 b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE93
index e99c8781c6..e99c8781c6 100644
--- a/usr/src/lib/libshell/common/RELEASE93
+++ b/usr/src/contrib/ast/src/cmd/ksh93/RELEASE93
diff --git a/usr/src/lib/libshell/common/TYPES b/usr/src/contrib/ast/src/cmd/ksh93/TYPES
index 6eb6f41b5e..6eb6f41b5e 100644
--- a/usr/src/lib/libshell/common/TYPES
+++ b/usr/src/contrib/ast/src/cmd/ksh93/TYPES
diff --git a/usr/src/lib/libshell/common/bltins/alarm.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/alarm.c
index a52130dd9f..1960fc3517 100644
--- a/usr/src/lib/libshell/common/bltins/alarm.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/alarm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -122,18 +122,18 @@ static void trap_timeout(void* handle)
tp->timeout = 0;
tp->flags |= L_FLAG;
tp->sh->sigflag[SIGALRM] |= SH_SIGALRM;
- if(sh_isstate(SH_TTYWAIT))
- sh_timetraps();
+ if(sh_isstate(SH_TTYWAIT) && !tp->sh->bltinfun)
+ sh_timetraps(tp->sh);
}
-void sh_timetraps(void)
+void sh_timetraps(Shell_t *shp)
{
register struct tevent *tp, *tpnext;
register struct tevent *tptop;
while(1)
{
- sh.sigflag[SIGALRM] &= ~SH_SIGALRM;
- tptop= (struct tevent*)sh.st.timetrap;
+ shp->sigflag[SIGALRM] &= ~SH_SIGALRM;
+ tptop= (struct tevent*)shp->st.timetrap;
for(tp=tptop;tp;tp=tpnext)
{
tpnext = tp->next;
@@ -150,7 +150,7 @@ void sh_timetraps(void)
}
}
}
- if(!(sh.sigflag[SIGALRM]&SH_SIGALRM))
+ if(!(shp->sigflag[SIGALRM]&SH_SIGALRM))
break;
}
}
@@ -182,8 +182,9 @@ static char *setdisc(Namval_t *np, const char *event, Namval_t* action, Namfun_t
*/
static void putval(Namval_t* np, const char* val, int flag, Namfun_t* fp)
{
- register struct tevent *tp;
+ register struct tevent *tp = (struct tevent*)fp;
register double d;
+ Shell_t *shp = tp->sh;
if(val)
{
double now;
@@ -196,24 +197,23 @@ static void putval(Namval_t* np, const char* val, int flag, Namfun_t* fp)
#endif /* timeofday */
nv_putv(np,val,flag,fp);
d = nv_getnum(np);
- tp = (struct tevent*)fp;
if(*val=='+')
{
double x = d + now;
- nv_putv(np,(char*)&x,NV_INTEGER,fp);
+ nv_putv(np,(char*)&x,NV_INTEGER|NV_DOUBLE,fp);
}
else
d -= now;
tp->milli = 1000*(d+.0005);
if(tp->timeout)
- sh.st.timetrap = time_delete(tp,sh.st.timetrap);
+ shp->st.timetrap = time_delete(tp,shp->st.timetrap);
if(tp->milli > 0)
- sh.st.timetrap = time_add(tp,sh.st.timetrap);
+ shp->st.timetrap = time_add(tp,shp->st.timetrap);
}
else
{
tp = (struct tevent*)nv_stack(np, (Namfun_t*)0);
- sh.st.timetrap = time_delete(tp,sh.st.timetrap);
+ shp->st.timetrap = time_delete(tp,shp->st.timetrap);
if(tp->action)
nv_close(tp->action);
nv_unset(np);
@@ -230,12 +230,12 @@ static const Namdisc_t alarmdisc =
setdisc,
};
-int b_alarm(int argc,char *argv[],void *extra)
+int b_alarm(int argc,char *argv[],Shbltin_t *context)
{
register int n,rflag=0;
register Namval_t *np;
register struct tevent *tp;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
while (n = optget(argv, sh_optalarm)) switch (n)
{
case 'r':
diff --git a/usr/src/lib/libshell/common/bltins/cd_pwd.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/cd_pwd.c
index 68b4fead8a..04e6296e5b 100644
--- a/usr/src/lib/libshell/common/bltins/cd_pwd.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/cd_pwd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -46,15 +46,15 @@ static void rehash(register Namval_t *np,void *data)
Pathcomp_t *pp = (Pathcomp_t*)np->nvalue.cp;
NOT_USED(data);
if(pp && *pp->name!='/')
- nv_unset(np);
+ _nv_unset(np,0);
}
-int b_cd(int argc, char *argv[],void *extra)
+int b_cd(int argc, char *argv[],Shbltin_t *context)
{
register char *dir;
Pathcomp_t *cdpath = 0;
register const char *dp;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
int saverrno=0;
int rval,flag=0;
char *oldpwd;
@@ -81,12 +81,12 @@ int b_cd(int argc, char *argv[],void *extra)
dir = argv[0];
if(error_info.errors>0 || argc >2)
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
- oldpwd = (char*)shp->pwd;
+ oldpwd = path_pwd(shp,0);
opwdnod = (shp->subshell?sh_assignok(OLDPWDNOD,1):OLDPWDNOD);
pwdnod = (shp->subshell?sh_assignok(PWDNOD,1):PWDNOD);
if(argc==2)
dir = sh_substitute(oldpwd,dir,argv[1]);
- else if(!dir || *dir==0)
+ else if(!dir)
dir = nv_getval(HOME);
else if(*dir == '-' && dir[1]==0)
dir = nv_getval(opwdnod);
@@ -98,30 +98,38 @@ int b_cd(int argc, char *argv[],void *extra)
if(*dir != '/')
#endif /* _WINIX */
{
- if(!(cdpath = (Pathcomp_t*)shp->cdpathlist) && (dp=(CDPNOD)->nvalue.cp))
+ if(!(cdpath = (Pathcomp_t*)shp->cdpathlist) && (dp=sh_scoped(shp,CDPNOD)->nvalue.cp))
{
- if(cdpath=path_addpath((Pathcomp_t*)0,dp,PATH_CDPATH))
+ if(cdpath=path_addpath(shp,(Pathcomp_t*)0,dp,PATH_CDPATH))
{
shp->cdpathlist = (void*)cdpath;
cdpath->shp = shp;
}
}
if(!oldpwd)
- oldpwd = path_pwd(1);
+ oldpwd = path_pwd(shp,1);
}
- if(*dir=='.')
+ if(*dir!='/')
{
- /* test for pathname . ./ .. or ../ */
- if(*(dp=dir+1) == '.')
- dp++;
- if(*dp==0 || *dp=='/')
- cdpath = 0;
+ /* check for leading .. */
+ char *cp;
+ sfprintf(shp->strbuf,"%s",dir);
+ cp = sfstruse(shp->strbuf);
+ pathcanon(cp, 0);
+ if(cp[0]=='.' && cp[1]=='.' && (cp[2]=='/' || cp[2]==0))
+ {
+ if(!shp->strbuf2)
+ shp->strbuf2 = sfstropen();
+ sfprintf(shp->strbuf2,"%s/%s",oldpwd,cp);
+ dir = sfstruse(shp->strbuf2);
+ pathcanon(dir, 0);
+ }
}
rval = -1;
do
{
dp = cdpath?cdpath->name:"";
- cdpath = path_nextcomp(cdpath,dir,0);
+ cdpath = path_nextcomp(shp,cdpath,dir,0);
#if _WINIX
if(*stakptr(PATH_OFFSET+1)==':' && isalpha(*stakptr(PATH_OFFSET)))
{
@@ -157,13 +165,13 @@ int b_cd(int argc, char *argv[],void *extra)
continue;
#endif /* SHOPT_FS_3D */
}
- if((rval=chdir(path_relative(stakptr(PATH_OFFSET)))) >= 0)
+ if((rval=chdir(path_relative(shp,stakptr(PATH_OFFSET)))) >= 0)
goto success;
if(errno!=ENOENT && saverrno==0)
saverrno=errno;
}
while(cdpath);
- if(rval<0 && *dir=='/' && *(path_relative(stakptr(PATH_OFFSET)))!='/')
+ if(rval<0 && *dir=='/' && *(path_relative(shp,stakptr(PATH_OFFSET)))!='/')
rval = chdir(dir);
/* use absolute chdir() if relative chdir() fails */
if(rval<0)
@@ -191,8 +199,6 @@ success:
if(*dir != '/')
return(0);
nv_putval(opwdnod,oldpwd,NV_RDONLY);
- if(oldpwd)
- free(oldpwd);
flag = strlen(dir);
/* delete trailing '/' */
while(--flag>0 && dir[flag]=='/')
@@ -201,20 +207,18 @@ success:
nv_onattr(pwdnod,NV_NOFREE|NV_EXPORT);
shp->pwd = pwdnod->nvalue.cp;
nv_scan(shp->track_tree,rehash,(void*)0,NV_TAGGED,NV_TAGGED);
- path_newdir(shp->pathlist);
- path_newdir(shp->cdpathlist);
+ path_newdir(shp,shp->pathlist);
+ path_newdir(shp,shp->cdpathlist);
+ if(oldpwd && (oldpwd!=e_dot))
+ free(oldpwd);
return(0);
}
-int b_pwd(int argc, char *argv[],void *extra)
+int b_pwd(int argc, char *argv[],Shbltin_t *context)
{
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
+ register Shell_t *shp = context->shp;
NOT_USED(argc);
while((n = optget(argv,sh_optpwd))) switch(n)
{
@@ -233,12 +237,12 @@ int b_pwd(int argc, char *argv[],void *extra)
}
if(error_info.errors)
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
- if(*(cp = path_pwd(0)) != '/')
+ if(*(cp = path_pwd(shp,0)) != '/')
errormsg(SH_DICT,ERROR_system(1), e_pwd);
if(flag)
{
#if SHOPT_FS_3D
- if(shp->lim.fs3d && (flag = mount(e_dot,NIL(char*),FS3D_GET|FS3D_VIEW,0))>=0)
+ if(shp->gd->lim.fs3d && (flag = mount(e_dot,NIL(char*),FS3D_GET|FS3D_VIEW,0))>=0)
{
cp = (char*)stakseek(++flag+PATH_MAX);
mount(e_dot,cp,FS3D_GET|FS3D_VIEW|FS3D_SIZE(flag),0);
diff --git a/usr/src/lib/libshell/common/bltins/cflow.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/cflow.c
index 4d9d10d7f1..d76f98532c 100644
--- a/usr/src/lib/libshell/common/bltins/cflow.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/cflow.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -41,12 +41,12 @@
*/
#if 0
/* for the dictionary generator */
- int b_exit(int n, register char *argv[],void *extra){}
+ int b_exit(int n, register char *argv[],Shbltin_t *context){}
#endif
-int b_return(register int n, register char *argv[],void *extra)
+int b_return(register int n, register char *argv[],Shbltin_t *context)
{
register char *arg;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
struct checkpt *pp = (struct checkpt*)shp->jmplist;
const char *options = (**argv=='r'?sh_optreturn:sh_optexit);
while((n = optget(argv,options))) switch(n)
@@ -64,7 +64,9 @@ done:
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
pp->mode = (**argv=='e'?SH_JMPEXIT:SH_JMPFUN);
argv += opt_info.index;
- n = (((arg= *argv)?(int)strtol(arg, (char**)0, 10)&SH_EXITMASK:shp->oldexit));
+ n = (((arg= *argv)?(int)strtol(arg, (char**)0, 10):shp->oldexit));
+ if(n<0 || n==256 || n > SH_EXITMASK+shp->gd->sigmax+1)
+ n &= ((unsigned int)n)&SH_EXITMASK;
/* return outside of function, dotscript and profile is exit */
if(shp->fn_depth==0 && shp->dot_depth==0 && !sh_isstate(SH_PROFILE))
pp->mode = SH_JMPEXIT;
@@ -78,13 +80,13 @@ done:
*/
#if 0
/* for the dictionary generator */
- int b_continue(int n, register char *argv[],void *extra){}
+ int b_continue(int n, register char *argv[],Shbltin_t *context){}
#endif
-int b_break(register int n, register char *argv[],void *extra)
+int b_break(register int n, register char *argv[],Shbltin_t *context)
{
char *arg;
register int cont= **argv=='c';
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
while((n = optget(argv,cont?sh_optcont:sh_optbreak))) switch(n)
{
case ':':
@@ -100,7 +102,7 @@ int b_break(register int n, register char *argv[],void *extra)
n=1;
if(arg= *argv)
{
- n = strtol(arg,&arg,10);
+ n = (int)strtol(arg,&arg,10);
if(n<=0 || *arg)
errormsg(SH_DICT,ERROR_exit(1),e_nolabels,*argv);
}
diff --git a/usr/src/lib/libshell/common/bltins/enum.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/enum.c
index 74c991b0ed..5cc749cc15 100644
--- a/usr/src/lib/libshell/common/bltins/enum.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/enum.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -135,10 +135,10 @@ static void put_enum(Namval_t* np,const char *val,int flags,Namfun_t *fp)
unsigned short i=0, n;
if(!val)
{
+ nv_putv(np, val, flags,fp);
nv_disc(np,&ep->hdr,NV_POP);
if(!ep->hdr.nofree)
free((void*)ep);
- nv_putv(np, val, flags,fp);
return;
}
if(flags&NV_INTEGER)
@@ -159,7 +159,8 @@ static void put_enum(Namval_t* np,const char *val,int flags,Namfun_t *fp)
}
i++;
}
- error(ERROR_exit(1), "%s: invalid value %s",nv_name(np),val);
+ if(nv_isattr(np,NV_NOFREE))
+ error(ERROR_exit(1), "%s: invalid value %s",nv_name(np),val);
}
static char* get_enum(register Namval_t* np, Namfun_t *fp)
@@ -181,9 +182,9 @@ static Sfdouble_t get_nenum(register Namval_t* np, Namfun_t *fp)
const Namdisc_t ENUM_disc = { 0, put_enum, get_enum, get_nenum, 0,0,clone_enum };
#ifdef STANDALONE
-static int enum_create(int argc, char** argv, void* context)
+static int enum_create(int argc, char** argv, Shbltin_t *context)
#else
-int b_enum(int argc, char** argv, void* context)
+int b_enum(int argc, char** argv, Shbltin_t *context)
#endif
{
int sz,i,n,iflag = 0;
@@ -191,7 +192,7 @@ int b_enum(int argc, char** argv, void* context)
Namarr_t *ap;
char *cp,*sp;
struct Enum *ep;
- Shell_t *shp = ((Shbltin_t*)context)->shp;
+ Shell_t *shp = context->shp;
struct {
Optdisc_t opt;
Namval_t *np;
diff --git a/usr/src/lib/libshell/common/bltins/getopts.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/getopts.c
index eb76ae3639..46e4797363 100644
--- a/usr/src/lib/libshell/common/bltins/getopts.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/getopts.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -37,7 +37,11 @@ static int infof(Opt_t* op, Sfio_t* sp, const char* s, Optdisc_t* dp)
{
Shell_t *shp = *(Shell_t**)(dp+1);
Stk_t *stkp = shp->stk;
- if(nv_search(s,sh.fun_tree,0))
+#if SHOPT_NAMESPACE
+ if((shp->namespace && sh_fsearch(shp,s,0)) || nv_search(s,shp->fun_tree,0))
+#else
+ if(nv_search(s,shp->fun_tree,0))
+#endif /* SHOPT_NAMESPACE */
{
int savtop = stktell(stkp);
char *savptr = stkfreeze(stkp,0);
@@ -50,14 +54,15 @@ static int infof(Opt_t* op, Sfio_t* sp, const char* s, Optdisc_t* dp)
return(1);
}
-int b_getopts(int argc,char *argv[],void *extra)
+int b_getopts(int argc,char *argv[],Shbltin_t *context)
{
register char *options=error_info.context->id;
register Namval_t *np;
- register int flag, mode, r=0;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register int flag, mode;
+ register Shell_t *shp = context->shp;
char value[2], key[2];
- int jmpval,extended;
+ int jmpval;
+ volatile int extended, r= -1;
struct checkpt buff, *pp;
struct {
Optdisc_t hdr;
@@ -104,11 +109,14 @@ int b_getopts(int argc,char *argv[],void *extra)
if(mode= (*options==':'))
options++;
extended = *options=='\n' && *(options+1)=='[' || *options=='[' && *(options+1)=='-';
- sh_pushcontext(&buff,1);
+ sh_pushcontext(shp,&buff,1);
jmpval = sigsetjmp(buff.buff,0);
if(jmpval)
{
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
+ shp->st.opterror = 1;
+ if(r==0)
+ return(2);
pp = (struct checkpt*)shp->jmplist;
pp->mode = SH_JMPERREXIT;
sh_exit(2);
@@ -163,12 +171,14 @@ int b_getopts(int argc,char *argv[],void *extra)
default:
options = opt_info.option + (*opt_info.option!='+');
}
+ if(r<0)
+ r = 0;
error_info.context->flags &= ~ERROR_SILENT;
shp->st.optindex = opt_info.index;
shp->st.optchar = opt_info.offset;
nv_putval(np, options, 0);
nv_close(np);
- np = nv_open(nv_name(OPTARGNOD),shp->var_tree,NV_NOSCOPE);
+ np = nv_open(nv_name(OPTARGNOD),shp->var_tree,0);
if(opt_info.num == LONG_MIN)
nv_putval(np, opt_info.arg, NV_RDONLY);
else if (opt_info.arg && opt_info.num > 0 && isalpha((char)opt_info.num) && !isdigit(opt_info.arg[0]) && opt_info.arg[0] != '-' && opt_info.arg[0] != '+')
@@ -186,7 +196,7 @@ int b_getopts(int argc,char *argv[],void *extra)
else
nv_putval(np, opt_info.arg, NV_RDONLY);
nv_close(np);
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
opt_info.disc = 0;
return(r);
}
diff --git a/usr/src/lib/libshell/common/bltins/hist.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/hist.c
index ccc60ab44d..1fa60260fe 100644
--- a/usr/src/lib/libshell/common/bltins/hist.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/hist.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -37,14 +37,14 @@ static void hist_subst(const char*, int fd, char*);
#if 0
/* for the benefit of the dictionary generator */
- int b_fc(int argc,char *argv[], void *extra){}
+ int b_fc(int argc,char *argv[], Shbltin_t *context){}
#endif
-int b_hist(int argc,char *argv[], void *extra)
+int b_hist(int argc,char *argv[], Shbltin_t *context)
{
register History_t *hp;
register char *arg;
register int flag,fdo;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
Sfio_t *outfile;
char *fname;
int range[2], incr, index2, indx= -1;
@@ -58,7 +58,7 @@ int b_hist(int argc,char *argv[], void *extra)
NOT_USED(argc);
if(!sh_histinit((void*)shp))
errormsg(SH_DICT,ERROR_system(1),e_histopen);
- hp = shp->hist_ptr;
+ hp = shp->gd->hist_ptr;
while((flag = optget(argv,sh_opthist))) switch(flag)
{
case 'e':
@@ -203,9 +203,9 @@ int b_hist(int argc,char *argv[], void *extra)
sfprintf(outfile,"%d\t",range[flag]);
else if(lflag)
sfputc(outfile,'\t');
- hist_list(shp->hist_ptr,outfile,hist_tell(shp->hist_ptr,range[flag]),0,arg);
+ hist_list(shp->gd->hist_ptr,outfile,hist_tell(shp->gd->hist_ptr,range[flag]),0,arg);
if(lflag)
- sh_sigcheck();
+ sh_sigcheck(shp);
if(range[flag] == range[1-flag])
break;
range[flag] += incr;
@@ -216,7 +216,11 @@ int b_hist(int argc,char *argv[], void *extra)
hist_eof(hp);
arg = edit;
if(!arg && !(arg=nv_getval(sh_scoped(shp,HISTEDIT))) && !(arg=nv_getval(sh_scoped(shp,FCEDNOD))))
+ {
arg = (char*)e_defedit;
+ if(*arg!='/')
+ errormsg(SH_DICT,ERROR_exit(1),"ed not found set FCEDIT");
+ }
#ifdef apollo
/*
* Code to support the FC using the pad editor.
diff --git a/usr/src/lib/libast/amd64/include/ast/wchar.h b/usr/src/contrib/ast/src/cmd/ksh93/bltins/lib.c
index 43c5ef1e98..f4627f0ca4 100644
--- a/usr/src/lib/libast/amd64/include/ast/wchar.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/lib.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -16,7 +16,10 @@
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-#include <ast_wchar.h>
+#pragma prototyped
+
+#include <cmd.h>
+
+SHLIB(shell)
diff --git a/usr/src/lib/libshell/common/bltins/misc.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/misc.c
index 04066e1a29..886f8fab52 100644
--- a/usr/src/lib/libshell/common/bltins/misc.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/misc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -57,14 +57,13 @@ struct login
char *arg0;
};
-int
-b_exec(int argc __unused, char *argv[], void *extra)
+int b_exec(int argc __unused, char *argv[], Shbltin_t *context)
{
struct login logdata;
register int n;
logdata.clear = 0;
logdata.arg0 = 0;
- logdata.sh = ((Shbltin_t*)extra)->shp;
+ logdata.sh = context->shp;
logdata.sh->st.ioset = 0;
while (n = optget(argv, sh_optexec)) switch (n)
{
@@ -86,7 +85,7 @@ b_exec(int argc __unused, char *argv[], void *extra)
if(error_info.errors)
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
if(*argv)
- B_login(0,argv,(void*)&logdata);
+ B_login(0,argv,(Shbltin_t*)&logdata);
return(0);
}
@@ -96,17 +95,17 @@ static void noexport(register Namval_t* np, void *data)
nv_offattr(np,NV_EXPORT);
}
-int B_login(int argc,char *argv[],void *extra)
+int B_login(int argc,char *argv[],Shbltin_t *context)
{
struct checkpt *pp;
register struct login *logp=0;
register Shell_t *shp;
const char *pname;
if(argc)
- shp = ((Shbltin_t*)extra)->shp;
+ shp = context->shp;
else
{
- logp = (struct login*)extra;
+ logp = (struct login*)context;
shp = logp->sh;
}
pp = (struct checkpt*)shp->jmplist;
@@ -151,18 +150,18 @@ int B_login(int argc,char *argv[],void *extra)
pp->mode = SH_JMPEXIT;
sh_sigreset(2);
sh_freeup(shp);
- path_exec(pname,argv,NIL(struct argnod*));
+ path_exec(shp,pname,argv,NIL(struct argnod*));
sh_done(shp,0);
}
return(1);
}
-int b_let(int argc,char *argv[],void *extra)
+int b_let(int argc,char *argv[],Shbltin_t *context)
{
register int r;
register char *arg;
+ Shell_t *shp = context->shp;
NOT_USED(argc);
- NOT_USED(extra);
while (r = optget(argv,sh_optlet)) switch (r)
{
case ':':
@@ -176,14 +175,14 @@ int b_let(int argc,char *argv[],void *extra)
if(error_info.errors || !*argv)
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
while(arg= *argv++)
- r = !sh_arith(arg);
+ r = !sh_arith(shp,arg);
return(r);
}
-int b_eval(int argc,char *argv[], void *extra)
+int b_eval(int argc,char *argv[], Shbltin_t *context)
{
register int r;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
NOT_USED(argc);
while (r = optget(argv,sh_opteval)) switch (r)
{
@@ -205,16 +204,17 @@ int b_eval(int argc,char *argv[], void *extra)
return(shp->exitval);
}
-int b_dot_cmd(register int n,char *argv[],void* extra)
+int b_dot_cmd(register int n,char *argv[],Shbltin_t *context)
{
register char *script;
register Namval_t *np;
register int jmpval;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
struct sh_scoped savst, *prevscope = shp->st.self;
- char *filename=0;
+ char *filename=0, *buffer=0;
int fd;
- struct dolnod *argsave=0, *saveargfor;
+ struct dolnod *saveargfor;
+ volatile struct dolnod *argsave=0;
struct checkpt buff;
Sfio_t *iop=0;
short level;
@@ -241,7 +241,7 @@ int b_dot_cmd(register int n,char *argv[],void* extra)
{
if(!np->nvalue.ip)
{
- path_search(script,NIL(Pathcomp_t**),0);
+ path_search(shp,script,NIL(Pathcomp_t**),0);
if(np->nvalue.ip)
{
if(nv_isattr(np,NV_FPOSIX))
@@ -255,9 +255,9 @@ int b_dot_cmd(register int n,char *argv[],void* extra)
np = 0;
if(!np)
{
- if((fd=path_open(script,path_get(script))) < 0)
+ if((fd=path_open(shp,script,path_get(shp,script))) < 0)
errormsg(SH_DICT,ERROR_system(1),e_open,script);
- filename = path_fullname(stkptr(shp->stk,PATH_OFFSET));
+ filename = path_fullname(shp,stkptr(shp->stk,PATH_OFFSET));
}
}
*prevscope = shp->st;
@@ -274,14 +274,13 @@ int b_dot_cmd(register int n,char *argv[],void* extra)
shp->st.self = &savst;
shp->topscope = (Shscope_t*)shp->st.self;
prevscope->save_tree = shp->var_tree;
- shp->st.cmdname = argv[0];
if(np)
shp->st.filename = np->nvalue.rp->fname;
nv_putval(SH_PATHNAMENOD, shp->st.filename ,NV_NOFREE);
shp->posix_fun = 0;
if(np || argv[1])
argsave = sh_argnew(shp,argv,&saveargfor);
- sh_pushcontext(&buff,SH_JMPDOT);
+ sh_pushcontext(shp,&buff,SH_JMPDOT);
jmpval = sigsetjmp(buff.buff,0);
if(jmpval == 0)
{
@@ -290,17 +289,20 @@ int b_dot_cmd(register int n,char *argv[],void* extra)
sh_exec((Shnode_t*)(nv_funtree(np)),sh_isstate(SH_ERREXIT));
else
{
- char buff[IOBSIZE+1];
- iop = sfnew(NIL(Sfio_t*),buff,IOBSIZE,fd,SF_READ);
- sh_eval(iop,0);
+ buffer = malloc(IOBSIZE+1);
+ iop = sfnew(NIL(Sfio_t*),buffer,IOBSIZE,fd,SF_READ);
+ sh_offstate(SH_NOFORK);
+ sh_eval(iop,sh_isstate(SH_PROFILE)?SH_FUNEVAL:0);
}
}
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
+ if(buffer)
+ free(buffer);
if(!np)
free((void*)shp->st.filename);
shp->dot_depth--;
if((np || argv[1]) && jmpval!=SH_JMPSCRIPT)
- sh_argreset(shp,argsave,saveargfor);
+ sh_argreset(shp,(struct dolnod*)argsave,saveargfor);
else
{
prevscope->dolc = shp->st.dolc;
@@ -312,8 +314,6 @@ int b_dot_cmd(register int n,char *argv[],void* extra)
memcpy((void*)&shp->st, (void*)prevscope, sizeof(Shscope_t));
shp->topscope = (Shscope_t*)prevscope;
nv_putval(SH_PATHNAMENOD, shp->st.filename ,NV_NOFREE);
- if(shp->exitval > SH_EXITSIG)
- sh_fault(shp->exitval&SH_EXITMASK);
if(jmpval && jmpval!=SH_JMPFUN)
siglongjmp(*shp->jmplist,jmpval);
return(shp->exitval);
@@ -322,29 +322,29 @@ int b_dot_cmd(register int n,char *argv[],void* extra)
/*
* null, true command
*/
-int b_true(int argc,register char *argv[],void *extra)
+int b_true(int argc,register char *argv[],Shbltin_t *context)
{
NOT_USED(argc);
NOT_USED(argv[0]);
- NOT_USED(extra);
+ NOT_USED(context);
return(0);
}
/*
* false command
*/
-int b_false(int argc,register char *argv[], void *extra)
+int b_false(int argc,register char *argv[], Shbltin_t *context)
{
NOT_USED(argc);
NOT_USED(argv[0]);
- NOT_USED(extra);
+ NOT_USED(context);
return(1);
}
-int b_shift(register int n, register char *argv[], void *extra)
+int b_shift(register int n, register char *argv[], Shbltin_t *context)
{
register char *arg;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
while((n = optget(argv,sh_optshift))) switch(n)
{
case ':':
@@ -357,7 +357,7 @@ int b_shift(register int n, register char *argv[], void *extra)
if(error_info.errors)
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
argv += opt_info.index;
- n = ((arg= *argv)?(int)sh_arith(arg):1);
+ n = ((arg= *argv)?(int)sh_arith(shp,arg):1);
if(n<0 || shp->st.dolc<n)
errormsg(SH_DICT,ERROR_exit(1),e_number,arg);
else
@@ -368,9 +368,9 @@ int b_shift(register int n, register char *argv[], void *extra)
return(0);
}
-int b_wait(int n,register char *argv[],void *extra)
+int b_wait(int n,register char *argv[],Shbltin_t *context)
{
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
while((n = optget(argv,sh_optwait))) switch(n)
{
case ':':
@@ -390,13 +390,13 @@ int b_wait(int n,register char *argv[],void *extra)
#ifdef JOBS
# if 0
/* for the dictionary generator */
- int b_fg(int n,char *argv[],void *extra){}
- int b_disown(int n,char *argv[],void *extra){}
+ int b_fg(int n,char *argv[],Shbltin_t *context){}
+ int b_disown(int n,char *argv[],Shbltin_t *context){}
# endif
-int b_bg(register int n,register char *argv[],void *extra)
+int b_bg(register int n,register char *argv[],Shbltin_t *context)
{
register int flag = **argv;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
register const char *optstr = sh_optbg;
if(*argv[0]=='f')
optstr = sh_optfg;
@@ -427,10 +427,10 @@ int b_bg(register int n,register char *argv[],void *extra)
return(shp->exitval);
}
-int b_jobs(register int n,char *argv[],void *extra)
+int b_jobs(register int n,char *argv[],Shbltin_t *context)
{
register int flag = 0;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
while((n = optget(argv,sh_optjobs))) switch(n)
{
case 'l':
@@ -466,11 +466,11 @@ int b_jobs(register int n,char *argv[],void *extra)
* There are several universe styles that are masked by the getuniv(),
* setuniv() calls.
*/
-int b_universe(int argc, char *argv[],void *extra)
+int b_universe(int argc, char *argv[],Shbltin_t *context)
{
register char *arg;
register int n;
- NOT_USED(extra);
+ NOT_USED(context);
while((n = optget(argv,sh_optuniverse))) switch(n)
{
case ':':
@@ -501,16 +501,19 @@ int b_universe(int argc, char *argv[],void *extra)
#endif /* cmd_universe */
#if SHOPT_FS_3D
+#if _UWIN
+#include <sys/mount.h>
+#endif
# if 0
/* for the dictionary generator */
- int b_vmap(int argc,char *argv[], void *extra){}
+ int b_vmap(int argc,char *argv[], Shbltin_t *context){}
# endif
- int b_vpath(register int argc,char *argv[], void *extra)
+ int b_vpath(register int argc,char *argv[], Shbltin_t *context)
{
register int flag, n;
register const char *optstr;
register char *vend;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
if(argv[0][1]=='p')
{
optstr = sh_optvpath;
@@ -532,8 +535,12 @@ int b_universe(int argc, char *argv[],void *extra)
}
if(error_info.errors)
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
- if(!shp->lim.fs3d)
+#ifdef MS_3D
+ flag |= MS_3D;
+#else
+ if(!shp->gd->lim.fs3d)
goto failed;
+#endif
argv += opt_info.index;
argc -= opt_info.index;
switch(argc)
@@ -571,22 +578,15 @@ int b_universe(int argc, char *argv[],void *extra)
errormsg(SH_DICT,ERROR_usage(2),"%s",optusage((char*)0));
/*FALLTHROUGH*/
case 2:
- if(!shp->lim.fs3d)
- goto failed;
if(shp->subshell && !shp->subshare)
sh_subfork();
for(n=0;n<argc;n+=2)
- {
if(mount(argv[n+1],argv[n],flag,0)<0)
goto failed;
- }
}
return(0);
failed:
- if(argc>1)
- errormsg(SH_DICT,ERROR_exit(1),e_cantset,flag==2?e_mapping:e_versions);
- else
- errormsg(SH_DICT,ERROR_exit(1),e_cantget,flag==2?e_mapping:e_versions);
+ errormsg(SH_DICT,ERROR_exit(1),(argc>1)?e_cantset:e_cantget,(flag&FS3D_VIEW)?e_mapping:e_versions);
return(1);
}
#endif /* SHOPT_FS_3D */
diff --git a/usr/src/lib/libshell/common/bltins/mkservice.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/mkservice.c
index 0a1eeb2bce..0cbba25eb2 100644
--- a/usr/src/lib/libshell/common/bltins/mkservice.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/mkservice.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -404,7 +404,7 @@ static const Namdisc_t servdisc =
setdisc
};
-int b_mkservice(int argc, char** argv, void* extra)
+int b_mkservice(int argc, char** argv, Shbltin_t *context)
{
register char* var;
register char* path;
@@ -413,7 +413,7 @@ int b_mkservice(int argc, char** argv, void* extra)
register int fd;
NOT_USED(argc);
- NOT_USED(extra);
+ NOT_USED(context);
for (;;)
{
switch (optget(argv, mkservice_usage))
@@ -438,7 +438,7 @@ int b_mkservice(int argc, char** argv, void* extra)
sp->actionf = Action;
sp->errorf = Error;
sp->refcount = 1;
- sp->context = extra;
+ sp->context = context;
sp->node = 0;
sp->fun.disc = &servdisc;
if((fd = sh_open(path, O_SERVICE|O_RDWR))<=0)
@@ -458,11 +458,11 @@ int b_mkservice(int argc, char** argv, void* extra)
return(0);
}
-int b_eloop(int argc, char** argv, void* extra)
+int b_eloop(int argc, char** argv, Shbltin_t *context)
{
register long timeout = -1;
NOT_USED(argc);
- NOT_USED(extra);
+ NOT_USED(context);
for (;;)
{
switch (optget(argv, eloop_usage))
diff --git a/usr/src/lib/libshell/common/bltins/poll_solaris.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/poll_solaris.c
index 1338b5df34..6d27940857 100644
--- a/usr/src/lib/libshell/common/bltins/poll_solaris.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/poll_solaris.c
@@ -139,7 +139,7 @@ static const char sh_optpoll[] =
"are available. A file descriptor for a socket that "
"is connecting asynchronously will indicate that it is ready "
"for writing, once a connection has been established.]"
-
+
"[+?Regular files always poll TRUE for reading and writing.]"
"[e:eventarray]:[fdcount?Upon successful completion, an indexed array "
@@ -186,7 +186,7 @@ Namval_t *nv_open_fmt(Dt_t *dict, int flags, const char *namefmt, ...)
va_start(ap, namefmt);
vsnprintf(varnamebuff, sizeof(varnamebuff), namefmt, ap);
va_end(ap);
-
+
return nv_open(varnamebuff, dict, flags);
}
@@ -194,7 +194,7 @@ static
int poll_strtoevents(const char *str)
{
int events = 0;
-
+
if (strstr(str, "POLLIN")) events |= POLLIN;
if (strstr(str, "POLLRDNORM")) events |= POLLRDNORM;
if (strstr(str, "POLLRDBAND")) events |= POLLRDBAND;
@@ -216,7 +216,7 @@ void poll_eventstostr(char *s, int events)
*s='\0';
if (!events)
return;
-
+
if (events & POLLIN) s=mystpcpy(s, "POLLIN|");
if (events & POLLRDNORM) s=mystpcpy(s, "POLLRDNORM|");
if (events & POLLRDBAND) s=mystpcpy(s, "POLLRDBAND|");
@@ -236,11 +236,11 @@ void poll_eventstostr(char *s, int events)
#undef getconf
#define getconf(x) strtol(astconf(x,NiL,NiL),NiL,0)
-
-extern int b_poll(int argc, char *argv[], void *extra)
+
+extern int b_poll(int argc, char *argv[], Shbltin_t *context)
{
Namval_t *np;
- Shell_t *shp = sh_contexttoshell(extra);
+ Shell_t *shp = context->shp;
char *varname;
int n;
int fd;
@@ -256,7 +256,7 @@ extern int b_poll(int argc, char *argv[], void *extra)
case 't':
case 'T':
errno = 0;
- timeout = strtod(opt_info.arg, (char **)NULL);
+ timeout = strtod(opt_info.arg, (char **)NULL);
if (errno != 0)
errormsg(SH_DICT, ERROR_system(1), "%s: invalid timeout", opt_info.arg);
@@ -341,10 +341,10 @@ extern int b_poll(int argc, char *argv[], void *extra)
nv_close(np);
pollfd[i].revents = 0;
-
+
i++;
} while( array_np_sub && nv_nextsub(array_np_sub) );
-
+
n = poll(pollfd, numpollfd, timeout);
/* FixMe: EGAIN and EINTR may require extra handling */
if (n < 0)
@@ -365,26 +365,26 @@ extern int b_poll(int argc, char *argv[], void *extra)
{
if (!(subname=nv_getsub(array_np_sub)))
break;
-
+
np = nv_open_fmt(shp->var_tree, NV_NOFAIL, "%s[%s].revents", varname, subname);
if (!np)
errormsg(SH_DICT, ERROR_system(1), "couldn't create pollfd %s[%s].revents", varname, subname);
poll_eventstostr(buff, pollfd[i].revents);
-
+
nv_putval(np, buff, 0);
nv_close(np);
-
+
if (eventarrayname && pollfd[i].revents)
{
sprintf(buff, "%s+=( '%s' )", eventarrayname, subname);
sh_trap(buff, 0);
}
-
+
i++;
} while( array_np_sub && nv_nextsub(array_np_sub) );
-
+
nv_close(array_np);
-
+
return(0);
}
diff --git a/usr/src/lib/libshell/common/bltins/print.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/print.c
index 8ac34de498..99a7bcd00f 100644
--- a/usr/src/lib/libshell/common/bltins/print.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/print.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -65,6 +65,25 @@ struct printf
Shell_t *sh;
};
+struct printmap
+{
+ size_t size;
+ char *name;
+ char map[3];
+ const char *description;
+};
+
+const struct printmap Pmap[] =
+{
+ 3, "csv", "q+", "Equivalent to %#q",
+ 4, "html", "H", "Equivalent to %H",
+ 3, "ere", "R", "Equivalent to %R",
+ 7, "pattern","P", "Equivalent to %#P",
+ 3, "url", "H+", "Equivalent to %#H",
+ 0, 0, 0,
+};
+
+
static int extend(Sfio_t*,void*, Sffmt_t*);
static const char preformat[] = "";
static char *genformat(char*);
@@ -82,13 +101,13 @@ struct print
static char* nullarg[] = { 0, 0 };
#if !SHOPT_ECHOPRINT
- int B_echo(int argc, char *argv[],void *extra)
+ int B_echo(int argc, char *argv[],Shbltin_t *context)
{
static char bsd_univ;
struct print prdata;
prdata.options = sh_optecho+5;
prdata.raw = prdata.echon = 0;
- prdata.sh = ((Shbltin_t*)extra)->shp;
+ prdata.sh = context->shp;
NOT_USED(argc);
/* This mess is because /bin/echo on BSD is different */
if(!prdata.sh->universe)
@@ -99,7 +118,7 @@ static char* nullarg[] = { 0, 0 };
prdata.sh->universe = 1;
}
if(!bsd_univ)
- return(b_print(0,argv,&prdata));
+ return(b_print(0,argv,(Shbltin_t*)&prdata));
prdata.options = sh_optecho;
prdata.raw = 1;
while(argv[1] && *argv[1]=='-')
@@ -119,18 +138,29 @@ static char* nullarg[] = { 0, 0 };
break;
argv++;
}
- return(b_print(0,argv,&prdata));
+ return(b_print(0,argv,(Shbltin_t*)&prdata));
}
#endif /* SHOPT_ECHOPRINT */
-int b_printf(int argc, char *argv[],void *extra)
+int b_printf(int argc, char *argv[],Shbltin_t *context)
{
struct print prdata;
NOT_USED(argc);
memset(&prdata,0,sizeof(prdata));
- prdata.sh = ((Shbltin_t*)extra)->shp;
+ prdata.sh = context->shp;
prdata.options = sh_optprintf;
- return(b_print(-1,argv,&prdata));
+ return(b_print(-1,argv,(Shbltin_t*)&prdata));
+}
+
+static int infof(Opt_t* op, Sfio_t* sp, const char* s, Optdisc_t* dp)
+{
+ const struct printmap *pm;
+ char c='%';
+ for(pm=Pmap;pm->size>0;pm++)
+ {
+ sfprintf(sp, "[+%c(%s)q?%s.]",c,pm->name,pm->description);
+ }
+ return(1);
}
/*
@@ -138,14 +168,18 @@ int b_printf(int argc, char *argv[],void *extra)
* argc==-1 when called from printf
*/
-int b_print(int argc, char *argv[], void *extra)
+int b_print(int argc, char *argv[], Shbltin_t *context)
{
register Sfio_t *outfile;
register int exitval=0,n, fd = 1;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
const char *options, *msg = e_file+4;
char *format = 0;
int sflag = 0, nflag=0, rflag=0, vflag=0;
+ Optdisc_t disc;
+ disc.version = OPT_VERSION;
+ disc.infof = infof;
+ opt_info.disc = &disc;
if(argc>0)
{
options = sh_optprint;
@@ -154,7 +188,7 @@ int b_print(int argc, char *argv[], void *extra)
}
else
{
- struct print *pp = (struct print*)extra;
+ struct print *pp = (struct print*)context;
shp = pp->sh;
options = pp->options;
if(argc==0)
@@ -181,7 +215,7 @@ int b_print(int argc, char *argv[], void *extra)
/* print to history file */
if(!sh_histinit((void*)shp))
errormsg(SH_DICT,ERROR_system(1),e_history);
- fd = sffileno(shp->hist_ptr->histfp);
+ fd = sffileno(shp->gd->hist_ptr->histfp);
sh_onstate(SH_HISTORY);
sflag++;
break;
@@ -195,9 +229,9 @@ int b_print(int argc, char *argv[], void *extra)
fd = (int)strtol(opt_info.arg,&opt_info.arg,10);
if(*opt_info.arg)
fd = -1;
- else if(fd<0 || fd >= shp->lim.open_max)
+ else if(!sh_iovalidfd(shp,fd))
fd = -1;
- else if(!(sh.inuse_bits&(1<<fd)) && (sh_inuse(fd) || (shp->hist_ptr && fd==sffileno(shp->hist_ptr->histfp))))
+ else if(!(shp->inuse_bits&(1<<fd)) && (sh_inuse(shp,fd) || (shp->gd->hist_ptr && fd==sffileno(shp->gd->hist_ptr->histfp))))
fd = -1;
break;
@@ -314,12 +348,12 @@ skip2:
/* echo style print */
if(nflag && !argv[0])
sfsync((Sfio_t*)0);
- else if(sh_echolist(outfile,rflag,argv) && !nflag)
+ else if(sh_echolist(shp,outfile,rflag,argv) && !nflag)
sfputc(outfile,'\n');
}
if(sflag)
{
- hist_flush(shp->hist_ptr);
+ hist_flush(shp->gd->hist_ptr);
sh_offstate(SH_HISTORY);
}
else if(n&SF_SHARE)
@@ -336,7 +370,7 @@ skip2:
* returns 0 for \c otherwise 1.
*/
-int sh_echolist(Sfio_t *outfile, int raw, char *argv[])
+int sh_echolist(Shell_t *shp,Sfio_t *outfile, int raw, char *argv[])
{
register char *cp;
register int n;
@@ -354,7 +388,7 @@ int sh_echolist(Sfio_t *outfile, int raw, char *argv[])
sfputr(outfile,cp,-1);
if(*argv)
sfputc(outfile,' ');
- sh_sigcheck();
+ sh_sigcheck(shp);
}
return(!pdata.cescape);
}
@@ -368,6 +402,9 @@ static char strformat(char *s)
register int c;
char* b;
char* p;
+#if SHOPT_MULTIBYTE && defined(FMT_EXP_WIDE)
+ int w;
+#endif
b = t = s;
for (;;)
@@ -377,14 +414,26 @@ static char strformat(char *s)
case '\\':
if(*s==0)
break;
+#if SHOPT_MULTIBYTE && defined(FMT_EXP_WIDE)
+ c = chrexp(s - 1, &p, &w, FMT_EXP_CHAR|FMT_EXP_LINE|FMT_EXP_WIDE);
+#else
c = chresc(s - 1, &p);
+#endif
s = p;
#if SHOPT_MULTIBYTE
+#if defined(FMT_EXP_WIDE)
+ if(w)
+ {
+ t += mbwide() ? mbconv(t, c) : wc2utf8(t, c);
+ continue;
+ }
+#else
if(c>UCHAR_MAX && mbwide())
{
- t += wctomb(t, c);
+ t += mbconv(t, c);
continue;
}
+#endif /* FMT_EXP_WIDE */
#endif /* SHOPT_MULTIBYTE */
if(c=='%')
*t++ = '%';
@@ -414,36 +463,49 @@ static char *genformat(char *format)
return(fp);
}
-static char *fmthtml(const char *string)
+static char *fmthtml(const char *string, int flags)
{
register const char *cp = string;
register int c, offset = staktell();
- while(c= *(unsigned char*)cp++)
+ if(!(flags&SFFMT_ALTER))
{
+ while(c= *(unsigned char*)cp++)
+ {
#if SHOPT_MULTIBYTE
- register int s;
- if((s=mbsize(cp-1)) > 1)
+ register int s;
+ if((s=mbsize(cp-1)) > 1)
+ {
+ cp += (s-1);
+ continue;
+ }
+#endif /* SHOPT_MULTIBYTE */
+ if(c=='<')
+ stakputs("&lt;");
+ else if(c=='>')
+ stakputs("&gt;");
+ else if(c=='&')
+ stakputs("&amp;");
+ else if(c=='"')
+ stakputs("&quot;");
+ else if(c=='\'')
+ stakputs("&apos;");
+ else if(c==' ')
+ stakputs("&nbsp;");
+ else if(!isprint(c) && c!='\n' && c!='\r')
+ sfprintf(stkstd,"&#%X;",CCMAPC(c,CC_NATIVE,CC_ASCII));
+ else
+ stakputc(c);
+ }
+ }
+ else
+ {
+ while(c= *(unsigned char*)cp++)
{
- cp += (s-1);
- continue;
+ if(strchr("!*'();@&+$,#[]<>~.\"{}|\\-`^% ",c) || (!isprint(c) && c!='\n' && c!='\r'))
+ sfprintf(stkstd,"%%%02X",CCMAPC(c,CC_NATIVE,CC_ASCII));
+ else
+ stakputc(c);
}
-#endif /* SHOPT_MULTIBYTE */
- if(c=='<')
- stakputs("&lt;");
- else if(c=='>')
- stakputs("&gt;");
- else if(c=='&')
- stakputs("&amp;");
- else if(c=='"')
- stakputs("&quot;");
- else if(c=='\'')
- stakputs("&apos;");
- else if(c==' ')
- stakputs("&nbsp;");
- else if(!isprint(c) && c!='\n' && c!='\r')
- sfprintf(stkstd,"&#%X;",CCMAPC(c,CC_NATIVE,CC_ASCII));
- else
- stakputc(c);
}
stakputc(0);
return(stakptr(offset));
@@ -459,6 +521,7 @@ static void *fmtbase64(char *string, ssize_t *sz, int alt)
Sfdouble_t d;
ssize_t size;
Namval_t *np = nv_open(string, NiL, NV_VARNAME|NV_NOASSIGN|NV_NOADD);
+ Namarr_t *ap;
static union types_t number;
if(!np || nv_isnull(np))
{
@@ -541,7 +604,7 @@ static void *fmtbase64(char *string, ssize_t *sz, int alt)
return(n?n:size);
}
}
- else if(nv_isarray(np) && nv_arrayptr(np))
+ else if(nv_isarray(np) && (ap=nv_arrayptr(np)) && array_elem(ap) && (ap->nelem&(ARRAY_UNDEF|ARRAY_SCAN)))
{
nv_outnode(np,iop,(alt?-1:0),0);
sfputc(iop,')');
@@ -551,7 +614,12 @@ static void *fmtbase64(char *string, ssize_t *sz, int alt)
{
if(alt && nv_isvtree(np))
nv_onattr(np,NV_EXPORT);
- if(!(cp = nv_getval(np)))
+ else
+ alt = 0;
+ cp = nv_getval(np);
+ if(alt)
+ nv_offattr(np,NV_EXPORT);
+ if(!cp)
return(0);
size = strlen(cp);
return(sfwrite(iop,cp,size));
@@ -595,6 +663,18 @@ static int varname(const char *str, int n)
return(n==0);
}
+static const char *mapformat(Sffmt_t *fe)
+{
+ const struct printmap *pm = Pmap;
+ while(pm->size>0)
+ {
+ if(pm->size==fe->n_str && memcmp(pm->name,fe->t_str,fe->n_str)==0)
+ return(pm->map);
+ pm++;
+ }
+ return(0);
+}
+
static int extend(Sfio_t* sp, void* v, Sffmt_t* fe)
{
char* lastchar = "";
@@ -607,10 +687,11 @@ static int extend(Sfio_t* sp, void* v, Sffmt_t* fe)
int fold = fe->base;
union types_t* value = (union types_t*)v;
struct printf* pp = (struct printf*)fe;
+ Shell_t *shp = pp->sh;
register char* argp = *pp->nextarg;
- char* w;
+ char *w,*s;
- if(fe->n_str>0 && varname(fe->t_str,fe->n_str) && (!argp || varname(argp,-1)))
+ if(fe->n_str>0 && (format=='T'||format=='Q') && varname(fe->t_str,fe->n_str) && (!argp || varname(argp,-1)))
{
if(argp)
pp->lastarg = argp;
@@ -690,8 +771,8 @@ static int extend(Sfio_t* sp, void* v, Sffmt_t* fe)
case 'n':
{
Namval_t *np;
- np = nv_open(argp,sh.var_tree,NV_VARNAME|NV_NOASSIGN|NV_NOARRAY);
- nv_unset(np);
+ np = nv_open(argp,shp->var_tree,NV_VARNAME|NV_NOASSIGN|NV_NOARRAY);
+ _nv_unset(np,0);
nv_onattr(np,NV_INTEGER);
if (np->nvalue.lp = new_of(int32_t,0))
*np->nvalue.lp = 0;
@@ -707,6 +788,17 @@ static int extend(Sfio_t* sp, void* v, Sffmt_t* fe)
break;
}
case 'q':
+ if(fe->n_str)
+ {
+ const char *fp = mapformat(fe);
+ if(fp)
+ {
+ format = *fp;
+ if(fp[1])
+ fe->flags |=SFFMT_ALTER;
+ }
+ }
+ /* FALLTHROUGH */
case 'b':
case 's':
case 'B':
@@ -871,33 +963,33 @@ static int extend(Sfio_t* sp, void* v, Sffmt_t* fe)
return -1;
}
value->s = stakptr(staktell());
+ fe->size = n;
}
break;
case 'B':
- if(!sh.strbuf2)
- sh.strbuf2 = sfstropen();
- fe->size = fmtbase64(sh.strbuf2,value->s, fe->flags&SFFMT_ALTER);
- value->s = sfstruse(sh.strbuf2);
+ if(!shp->strbuf2)
+ shp->strbuf2 = sfstropen();
+ fe->size = fmtbase64(shp->strbuf2,value->s, fe->flags&SFFMT_ALTER);
+ value->s = sfstruse(shp->strbuf2);
fe->flags |= SFFMT_SHORT;
break;
case 'H':
- value->s = fmthtml(value->s);
+ value->s = fmthtml(value->s, fe->flags);
break;
case 'q':
value->s = sh_fmtqf(value->s, !!(fe->flags & SFFMT_ALTER), fold);
break;
case 'P':
- {
- char *s = fmtmatch(value->s);
+ s = fmtmatch(value->s);
if(!s || *s==0)
errormsg(SH_DICT,ERROR_exit(1),e_badregexp,value->s);
value->s = s;
break;
- }
case 'R':
- value->s = fmtre(value->s);
- if(*value->s==0)
+ s = fmtre(value->s);
+ if(!s || *s==0)
errormsg(SH_DICT,ERROR_exit(1),e_badregexp,value->s);
+ value->s = s;
break;
case 'Q':
if (fe->n_str>0)
diff --git a/usr/src/lib/libshell/common/bltins/read.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/read.c
index 6abf7a82f6..c1c584b3ff 100644
--- a/usr/src/lib/libshell/common/bltins/read.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/read.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -46,6 +46,7 @@
#define V_FLAG 0x20 /* use default value */
#define C_FLAG 0x40 /* read into compound variable */
#define D_FLAG 8 /* must be number of bits for all flags */
+#define SS_FLAG 0x80 /* read .csv format file */
struct read_save
{
@@ -54,20 +55,22 @@ struct read_save
short fd;
short plen;
int flags;
+ ssize_t len;
long timeout;
};
-int b_read(int argc,char *argv[], void *extra)
+int b_read(int argc,char *argv[], Shbltin_t *context)
{
Sfdouble_t sec;
register char *name;
register int r, flags=0, fd=0;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
+ ssize_t len=0;
long timeout = 1000*shp->st.tmout;
- int save_prompt, fixargs=((Shbltin_t*)extra)->invariant;
+ int save_prompt, fixargs=context->invariant;
struct read_save *rp;
static char default_prompt[3] = {ESC,ESC};
- rp = (struct read_save*)(((Shbltin_t*)extra)->data);
+ rp = (struct read_save*)(context->data);
if(argc==0)
{
if(rp)
@@ -111,10 +114,7 @@ int b_read(int argc,char *argv[], void *extra)
case 'n': case 'N':
flags &= ((1<<D_FLAG)-1);
flags |= (r=='n'?N_FLAG:NN_FLAG);
- r = (int)opt_info.num;
- if((unsigned)r > (1<<((8*sizeof(int))-D_FLAG))-1)
- errormsg(SH_DICT,ERROR_exit(1),e_overlimit,opt_info.name);
- flags |= (r<< D_FLAG);
+ len = opt_info.num;
break;
case 'r':
flags |= R_FLAG;
@@ -123,9 +123,12 @@ int b_read(int argc,char *argv[], void *extra)
/* save in history file */
flags |= S_FLAG;
break;
+ case 'S':
+ flags |= SS_FLAG;
+ break;
case 'u':
fd = (int)opt_info.num;
- if(sh_inuse(fd))
+ if(sh_inuse(shp,fd))
fd = -1;
break;
case 'v':
@@ -152,13 +155,14 @@ int b_read(int argc,char *argv[], void *extra)
r = 0;
if(argc==fixargs && (rp=newof(NIL(struct read_save*),struct read_save,1,0)))
{
- ((Shbltin_t*)extra)->data = (void*)rp;
+ context->data = (void*)rp;
rp->fd = fd;
rp->flags = flags;
rp->timeout = timeout;
rp->argv = argv;
rp->prompt = name;
rp->plen = r;
+ rp->len = len;
}
bypass:
shp->prompt = default_prompt;
@@ -170,17 +174,13 @@ bypass:
shp->timeout = 0;
save_prompt = shp->nextprompt;
shp->nextprompt = 0;
- r=sh_readline(shp,argv,fd,flags,timeout);
+ r=sh_readline(shp,argv,fd,flags,len,timeout);
shp->nextprompt = save_prompt;
if(r==0 && (r=(sfeof(shp->sftable[fd])||sferror(shp->sftable[fd]))))
{
- if(fd == shp->cpipe[0])
- {
+ if(fd == shp->cpipe[0] && errno!=EINTR)
sh_pclose(shp->cpipe);
- return(1);
- }
}
- sfclrerr(shp->sftable[fd]);
return(r);
}
@@ -201,7 +201,7 @@ static void timedout(void *handle)
* <timeout> is number of milli-seconds until timeout
*/
-int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeout)
+int sh_readline(register Shell_t *shp,char **names, volatile int fd, int flags,ssize_t size,long timeout)
{
register ssize_t c;
register unsigned char *cp;
@@ -216,14 +216,17 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
char use_stak = 0;
volatile char was_write = 0;
volatile char was_share = 1;
+ volatile int keytrap;
int rel, wrd;
long array_index = 0;
void *timeslot=0;
int delim = '\n';
int jmpval=0;
- ssize_t size = 0;
int binary;
+ int oflags=NV_ASSIGN|NV_VARNAME;
+ char inquote = 0;
struct checkpt buff;
+ Edit_t *ep = (struct edit*)shp->gd->ed_context;
if(!(iop=shp->sftable[fd]) && !(iop=sh_iostream(shp,fd)))
return(1);
sh_stats(STAT_READS);
@@ -232,22 +235,32 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
Namval_t *mp;
if(val= strchr(name,'?'))
*val = 0;
- np = nv_open(name,shp->var_tree,NV_NOASSIGN|NV_VARNAME);
+ if(flags&C_FLAG)
+ oflags |= NV_ARRAY;
+ np = nv_open(name,shp->var_tree,oflags);
if(np && nv_isarray(np) && (mp=nv_opensub(np)))
np = mp;
- if((flags&V_FLAG) && shp->ed_context)
- ((struct edit*)shp->ed_context)->e_default = np;
+ if((flags&V_FLAG) && shp->gd->ed_context)
+ ((struct edit*)shp->gd->ed_context)->e_default = np;
if(flags&A_FLAG)
{
+ Namarr_t *ap;
flags &= ~A_FLAG;
array_index = 1;
+ if((ap=nv_arrayptr(np)) && !ap->fun)
+ ap->nelem++;
nv_unset(np);
+ if((ap=nv_arrayptr(np)) && !ap->fun)
+ ap->nelem--;
nv_putsub(np,NIL(char*),0L);
}
else if(flags&C_FLAG)
{
+ char *sp = np->nvenv;
delim = -1;
nv_unset(np);
+ if(!nv_isattr(np,NV_MINIMAL))
+ np->nvenv = sp;
nv_setvtree(np);
}
else
@@ -263,14 +276,18 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
else
np = REPLYNOD;
}
- if(flags>>D_FLAG) /* delimiter not new-line or fixed size read */
+ keytrap = ep?ep->e_keytrap:0;
+ if(size || (flags>>D_FLAG)) /* delimiter not new-line or fixed size read */
{
- if(flags&(N_FLAG|NN_FLAG))
- size = ((unsigned)flags)>>D_FLAG;
- else
- delim = ((unsigned)flags)>>D_FLAG;
- if(shp->fdstatus[fd]&IOTTY)
+ if((shp->fdstatus[fd]&IOTTY) && !keytrap)
tty_raw(fd,1);
+ if(!(flags&(N_FLAG|NN_FLAG)))
+ {
+ delim = ((unsigned)flags)>>D_FLAG;
+ ep->e_nttyparm.c_cc[VEOL] = delim;
+ ep->e_nttyparm.c_lflag |= ISIG;
+ tty_set(fd,TCSADRAIN,&ep->e_nttyparm);
+ }
}
binary = nv_isattr(np,NV_BINARY);
if(!binary && !(flags&(N_FLAG|NN_FLAG)))
@@ -282,20 +299,27 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
shp->ifstable['\\'] = 0;
else if(!(flags&R_FLAG) && shp->ifstable['\\']==0)
shp->ifstable['\\'] = S_ESC;
- shp->ifstable[delim] = S_NL;
+ if(delim>0)
+ shp->ifstable[delim] = S_NL;
if(delim!='\n')
{
shp->ifstable['\n'] = 0;
nv_putval(mp, ifs, NV_RDONLY);
}
shp->ifstable[0] = S_EOF;
+ if((flags&SS_FLAG))
+ {
+ shp->ifstable['"'] = S_QUOTE;
+ shp->ifstable['\r'] = S_ERR;
+ }
}
sfclrerr(iop);
for(nfp=np->nvfun; nfp; nfp = nfp->next)
{
if(nfp->disc && nfp->disc->readf)
{
- if((c=(*nfp->disc->readf)(np,iop,delim,nfp))>=0)
+ Namval_t *mp = nv_open(name,shp->var_tree,oflags|NV_NOREF);
+ if((c=(*nfp->disc->readf)(mp,iop,delim,nfp))>=0)
return(c);
}
}
@@ -306,10 +330,10 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
}
was_write = (sfset(iop,SF_WRITE,0)&SF_WRITE)!=0;
if(fd==0)
- was_share = (sfset(iop,SF_SHARE,1)&SF_SHARE)!=0;
+ was_share = (sfset(iop,SF_SHARE,shp->redir0!=2)&SF_SHARE)!=0;
if(timeout || (shp->fdstatus[fd]&(IOTTY|IONOSEEK)))
{
- sh_pushcontext(&buff,1);
+ sh_pushcontext(shp,&buff,1);
jmpval = sigsetjmp(buff.buff,0);
if(jmpval)
goto done;
@@ -343,20 +367,32 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
for (;;)
{
c = size;
- cp = sfreserve(iop,c,SF_LOCKR);
- f = 1;
- if(cp)
- m = sfvalue(iop);
- else if(flags&NN_FLAG)
+ if(keytrap)
{
- c = size;
- m = (cp = sfreserve(iop,c,0)) ? sfvalue(iop) : 0;
+ cp = 0;
f = 0;
+ m = 0;
+ while(c-->0 && (buf[m]=ed_getchar(ep,0)))
+ m++;
+ if(m>0)
+ cp = (unsigned char*)buf;
}
else
{
- c = sfvalue(iop);
- m = (cp = sfreserve(iop,c,SF_LOCKR)) ? sfvalue(iop) : 0;
+ f = 1;
+ if(cp = sfreserve(iop,c,SF_LOCKR))
+ m = sfvalue(iop);
+ else if(flags&NN_FLAG)
+ {
+ 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)))
{
@@ -382,7 +418,8 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
cur = var + cx;
up = var + ux;
}
- memcpy((void*)cur,cp,c);
+ if(cur!=(char*)cp)
+ memcpy((void*)cur,cp,c);
if(f)
sfread(iop,cp,c);
cur += c;
@@ -447,13 +484,17 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
else if(cp = (unsigned char*)sfgetr(iop,delim,0))
c = sfvalue(iop);
else if(cp = (unsigned char*)sfgetr(iop,delim,-1))
+ {
c = sfvalue(iop)+1;
+ if(!sferror(iop) && sfgetc(iop) >=0)
+ errormsg(SH_DICT,ERROR_exit(1),e_overlimit,"line length");
+ }
if(timeslot)
timerdel(timeslot);
- if((flags&S_FLAG) && !shp->hist_ptr)
+ if((flags&S_FLAG) && !shp->gd->hist_ptr)
{
sh_histinit((void*)shp);
- if(!shp->hist_ptr)
+ if(!shp->gd->hist_ptr)
flags &= ~S_FLAG;
}
if(cp)
@@ -466,7 +507,7 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
if(*(cpmax-1) != delim)
*(cpmax-1) = delim;
if(flags&S_FLAG)
- sfwrite(shp->hist_ptr->histfp,(char*)cp,c);
+ sfwrite(shp->gd->hist_ptr->histfp,(char*)cp,c);
c = shp->ifstable[*cp++];
#if !SHOPT_MULTIBYTE
if(!name && (flags&R_FLAG)) /* special case single argument */
@@ -523,6 +564,16 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
c = 0;
continue;
#endif /*SHOPT_MULTIBYTE */
+ case S_QUOTE:
+ c = shp->ifstable[*cp++];
+ inquote = !inquote;
+ if(val)
+ {
+ stakputs(val);
+ use_stak = 1;
+ *val = 0;
+ }
+ continue;
case S_ESC:
/* process escape character */
if((c = shp->ifstable[*cp++]) == S_NL)
@@ -538,6 +589,9 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
}
continue;
+ case S_ERR:
+ cp++;
+ /* FALLTHROUGH */
case S_EOF:
/* check for end of buffer */
if(val && *val)
@@ -567,7 +621,7 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
if(cp)
{
if(flags&S_FLAG)
- sfwrite(shp->hist_ptr->histfp,(char*)cp,c);
+ sfwrite(shp->gd->hist_ptr->histfp,(char*)cp,c);
cpmax = cp + c;
c = shp->ifstable[*cp++];
val=0;
@@ -625,6 +679,40 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
while((c=shp->ifstable[*cp++])==0)
if(!wrd)
wrd = 1;
+ if(inquote)
+ {
+ if(c==S_QUOTE)
+ {
+ if(shp->ifstable[*cp]==S_QUOTE)
+ {
+ if(val)
+ {
+ stakwrite(val,cp-(unsigned char*)val);
+ use_stak = 1;
+ }
+ val = (char*)++cp;
+ }
+ else
+ break;
+ }
+ if(c && c!=S_EOF)
+ {
+ if(c==S_NL)
+ {
+ if(val)
+ {
+ stakwrite(val,cp-(unsigned char*)val);
+ use_stak=1;
+ }
+ if(cp = (unsigned char*)sfgetr(iop,delim,0))
+ c = sfvalue(iop);
+ else if(cp = (unsigned char*)sfgetr(iop,delim,-1))
+ c = sfvalue(iop)+1;
+ val = (char*)cp;
+ }
+ continue;
+ }
+ }
if(!del&&c==S_DELIM)
del = cp - 1;
if(name || c==S_NL || c==S_ESC || c==S_EOF || c==S_MBYTE)
@@ -687,7 +775,7 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
if(sh_isoption(SH_ALLEXPORT)&&!strchr(nv_name(np),'.') && !nv_isattr(np,NV_EXPORT))
{
nv_onattr(np,NV_EXPORT);
- sh_envput(sh.env,np);
+ sh_envput(shp->env,np);
}
if(name)
{
@@ -712,16 +800,16 @@ int sh_readline(register Shell_t *shp,char **names, int fd, int flags,long timeo
}
done:
if(timeout || (shp->fdstatus[fd]&(IOTTY|IONOSEEK)))
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
if(was_write)
sfset(iop,SF_WRITE,1);
if(!was_share)
sfset(iop,SF_SHARE,0);
nv_close(np);
- if((flags>>D_FLAG) && (shp->fdstatus[fd]&IOTTY))
+ if((shp->fdstatus[fd]&IOTTY) && !keytrap)
tty_cooked(fd);
if(flags&S_FLAG)
- hist_flush(shp->hist_ptr);
+ hist_flush(shp->gd->hist_ptr);
if(jmpval > 1)
siglongjmp(*shp->jmplist,jmpval);
return(jmpval);
diff --git a/usr/src/lib/libshell/common/bltins/regress.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/regress.c
index d6d39bf5c9..25f3c2517e 100644
--- a/usr/src/lib/libshell/common/bltins/regress.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/regress.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -259,9 +259,9 @@ char* sh_regress_etc(const char* path, unsigned int line, const char* file)
* __regress__ builtin
*/
-int b___regress__(int argc, char** argv, void *extra)
+int b___regress__(int argc, char** argv, Shbltin_t *context)
{
- register Shell_t* shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t* shp = context->shp;
int n;
for (;;)
diff --git a/usr/src/lib/libshell/common/bltins/shiocmd_solaris.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/shiocmd_solaris.c
index 55e0e0357c..be9d664f44 100644
--- a/usr/src/lib/libshell/common/bltins/shiocmd_solaris.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/shiocmd_solaris.c
@@ -36,8 +36,8 @@
#define sh_contexttoshell(context) ((context)?(sh_contexttoshb(context)->shp):(NULL))
/*
- * time formatting related
-*/
+ * time formatting related
+*/
struct dctime
{
Namfun_t fun;
@@ -107,7 +107,7 @@ static Namval_t *make_time(Namval_t* np)
{
int offset = stktell(stkstd);
char *name = nv_name(np);
- struct dctime *dp = newof(NULL,struct dctime,1,0);
+ struct dctime *dp = newof(NULL,struct dctime,1,0);
if(!dp)
return((Namval_t*)0);
sfprintf(stkstd,"%s.format\0",name);
@@ -119,8 +119,8 @@ static Namval_t *make_time(Namval_t* np)
}
/*
- * mode formatting related
-*/
+ * mode formatting related
+*/
static char *get_mode(Namval_t* np, Namfun_t* nfp)
{
mode_t mode = nv_getn(np,nfp);
@@ -162,7 +162,7 @@ static const Namdisc_t modedisc =
static Namval_t *make_mode(Namval_t* np)
{
char *name = nv_name(np);
- Namfun_t *nfp = newof(NULL,Namfun_t,1,0);
+ Namfun_t *nfp = newof(NULL,Namfun_t,1,0);
if(!nfp)
return((Namval_t*)0);
nfp->disc = &modedisc;
@@ -374,7 +374,7 @@ static const Namdisc_t classdisc =
static int mkclass(Namval_t *np, Shclass_t *sp)
{
- struct dcclass *tcp = newof(NULL,struct dcclass,1,sp->nelem*sizeof(Namval_t*));
+ struct dcclass *tcp = newof(NULL,struct dcclass,1,sp->nelem*sizeof(Namval_t*));
if(!tcp)
return(0);
memset((void*)(tcp+1),0,sp->nelem*sizeof(Namval_t*));
@@ -428,8 +428,8 @@ static const char sh_optopen[] =
"[-author?David Korn <dgk@research.att.com>]"
"[-author?Roland Mainz <roland.mainz@nrubsig.org>]"
"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"
-"[+NAME? open - create a shell variable correspnding to a file]"
-"[+DESCRIPTION?\bopen\b creates the compound variable \avar\a correspinding "
+"[+NAME? open - create a shell variable corresponding to a file]"
+"[+DESCRIPTION?\bopen\b creates the compound variable \avar\a corresponding "
"to the file given by the pathname \afile\a. The elements of \avar\a "
"are the names of elements in the \astat\a structure with the \bst_\b "
"prefix removed.]"
@@ -487,11 +487,11 @@ static const char sh_optopen[] =
;
-extern int b_open(int argc, char *argv[], void *extra)
+extern int b_open(int argc, char *argv[], Shbltin_t *context)
{
register Namval_t *np;
register int n,oflag=0;
- Shell_t *shp = sh_contexttoshell(extra);
+ Shell_t *shp = context->shp;
struct filedata *fdp;
mode_t mode = 0666;
long flags = 0;
@@ -558,7 +558,7 @@ extern int b_open(int argc, char *argv[], void *extra)
argv += opt_info.index;
if(argc!=2 || !(flags&(letterbit('r')|letterbit('w'))))
errormsg(SH_DICT, ERROR_usage(2), optusage((char*)0));
-
+
if(flags&letterbit('r'))
{
if(flags&letterbit('w'))
@@ -572,7 +572,7 @@ extern int b_open(int argc, char *argv[], void *extra)
fd = sh_open(argv[1], oflag, mode);
if(fd<0)
errormsg(SH_DICT, ERROR_system(1), "%s: open failed", argv[1]);
-
+
if(!(flags&letterbit('i')))
fcntl(fd, F_SETFL, 0);
@@ -603,7 +603,7 @@ static const char sh_optclose[] =
"[+SEE ALSO?\bopen\b(1),\bdup\b(1),\btmpfile\b(1),\bpoll\b(1),\bstat\b(1)]"
;
-extern int b_close(int argc, char *argv[], void *extra)
+extern int b_close(int argc, char *argv[], Shbltin_t *context)
{
register int n=0;
int fd = -1;
@@ -640,8 +640,8 @@ static const char sh_opttmpfile[] =
"[-?\n@(#)$Id: tmpfile (AT&T Labs Research) 2007-05-07 $\n]"
"[-author?Roland Mainz <roland.mainz@nrubsig.org>]"
"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"
-"[+NAME? tmpfile - create a shell variable correspnding to a temporary file]"
-"[+DESCRIPTION?\btmpfile\b creates the compound variable \avar\a correspinding "
+"[+NAME? tmpfile - create a shell variable corresponding to a temporary file]"
+"[+DESCRIPTION?\btmpfile\b creates the compound variable \avar\a corresponding "
"to a temporary file. The elements of \avar\a "
"are the names of elements in the \astat\a structure with the \bst_\b "
"prefix removed.]"
@@ -658,11 +658,11 @@ static const char sh_opttmpfile[] =
;
-extern int b_tmpfile(int argc, char *argv[], void *extra)
+extern int b_tmpfile(int argc, char *argv[], Shbltin_t *context)
{
register Namval_t *np;
register int n;
- Shell_t *shp = sh_contexttoshell(extra);
+ Shell_t *shp = context->shp;
struct filedata *fdp;
bool inherit = false;
FILE *file = NULL;
@@ -734,11 +734,11 @@ static const char sh_optdup[] =
;
-extern int b_dup(int argc, char *argv[], void *extra)
+extern int b_dup(int argc, char *argv[], Shbltin_t *context)
{
register Namval_t *np;
register int n;
- Shell_t *shp = sh_contexttoshell(extra);
+ Shell_t *shp = context->shp;
struct filedata *fdp;
bool inherit = false;
int ffd, fd = -1;
@@ -792,7 +792,7 @@ static const char sh_optstat[] =
"[-author?Roland Mainz <roland.mainz@nrubsig.org>]"
"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"
"[+NAME? stat - get file status]"
-"[+DESCRIPTION?\bstat\b creates the compound variable \avar\a correspinding "
+"[+DESCRIPTION?\bstat\b creates the compound variable \avar\a corresponding "
"to the file given by the pathname \afile\a. The elements of \avar\a "
"are the names of elements in the \astat\a structure with the \bst_\b "
"prefix removed.]"
@@ -809,11 +809,11 @@ static const char sh_optstat[] =
;
-extern int b_stat(int argc, char *argv[], void *extra)
+extern int b_stat(int argc, char *argv[], Shbltin_t *context)
{
register Namval_t *np;
register int n;
- Shell_t *shp = sh_contexttoshell(extra);
+ Shell_t *shp = context->shp;
struct filedata *fdp;
long flags = 0;
struct stat statb;
@@ -875,9 +875,9 @@ static const char sh_optrewind[] =
;
-extern int b_rewind(int argc, char *argv[], void *extra)
+extern int b_rewind(int argc, char *argv[], Shbltin_t *context)
{
- Shell_t *shp = sh_contexttoshell(extra);
+ Shell_t *shp = context->shp;
int fd = -1;
register int n;
while (n = optget(argv, sh_optrewind)) switch (n)
diff --git a/usr/src/lib/libshell/common/bltins/sleep.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/sleep.c
index 8938dc536c..4e64be7a57 100644
--- a/usr/src/lib/libshell/common/bltins/sleep.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/sleep.c
@@ -42,11 +42,11 @@
# undef _lib_poll
#endif /* _lib_poll_notimer */
-int b_sleep(register int argc,char *argv[],void *extra)
+int b_sleep(register int argc,char *argv[],Shbltin_t *context)
{
register char *cp;
register double d=0;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
int sflag=0;
time_t tloc = 0;
char *last;
@@ -75,7 +75,16 @@ int b_sleep(register int argc,char *argv[],void *extra)
now = TMX_NOW;
if(*cp == 'P' || *cp == 'p')
ns = tmxdate(cp, &last, now);
- else
+ else if(*last=='.' && shp->decomma && d==(unsigned long)d)
+ {
+ *(pp=last) = ',';
+ if(!strchr(cp,'.'))
+ d = strtod(cp,&last);
+ *pp = '.';
+ if(*last==0)
+ goto skip;
+ }
+ else if(*last!='.' && *last!=',')
{
if(pp = sfprints("exact %s", cp))
ns = tmxdate(pp, &last, now);
@@ -87,6 +96,7 @@ int b_sleep(register int argc,char *argv[],void *extra)
d = ns - now;
d /= TMX_RESOLUTION;
}
+skip:
if(argv[1])
errormsg(SH_DICT,ERROR_exit(1),e_oneoperand);
}
@@ -107,12 +117,12 @@ int b_sleep(register int argc,char *argv[],void *extra)
sh_delay(d);
if(sflag || tloc==0 || errno!=EINTR || shp->lastsig)
break;
- sh_sigcheck();
+ sh_sigcheck(shp);
if(tloc < (now=time(NIL(time_t*))))
break;
d = (double)(tloc-now);
if(shp->sigflag[SIGALRM]&SH_SIGTRAP)
- sh_timetraps();
+ sh_timetraps(shp);
}
return(0);
}
@@ -125,7 +135,7 @@ static void completed(void * handle)
unsigned int sleep(unsigned int sec)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
pid_t newpid, curpid=getpid();
void *tp;
char expired = 0;
@@ -133,10 +143,10 @@ unsigned int sleep(unsigned int sec)
tp = (void*)sh_timeradd(1000*sec, 0, completed, (void*)&expired);
do
{
- if(!shp->waitevent || (*shp->waitevent)(-1,-1L,0)==0)
+ if(!shp->gd->waitevent || (*shp->gd->waitevent)(-1,-1L,0)==0)
pause();
if(shp->sigflag[SIGALRM]&SH_SIGTRAP)
- sh_timetraps();
+ sh_timetraps(shp);
if((newpid=getpid()) != curpid)
{
curpid = newpid;
@@ -152,7 +162,7 @@ unsigned int sleep(unsigned int sec)
while(!expired && shp->lastsig==0);
if(!expired)
timerdel(tp);
- sh_sigcheck();
+ sh_sigcheck(shp);
return(0);
}
@@ -170,4 +180,4 @@ void sh_delay(double t) {
if (shp->trapnote & (SH_SIGSET | SH_SIGTRAP)) return;
ts = tx;
}
-}
+ }
diff --git a/usr/src/lib/libshell/common/bltins/test.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/test.c
index 9329f8a538..19dc72b2cd 100644
--- a/usr/src/lib/libshell/common/bltins/test.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/test.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -31,6 +31,7 @@
#include "defs.h"
#include <error.h>
#include <ls.h>
+#include <regex.h>
#include "io.h"
#include "terminal.h"
#include "test.h"
@@ -81,9 +82,9 @@ static char *nxtarg(struct test*,int);
static int expr(struct test*,int);
static int e3(struct test*);
-static int test_strmatch(const char *str, const char *pat)
+static int test_strmatch(Shell_t *shp,const char *str, const char *pat)
{
- int match[2*(MATCH_MAX+1)],n;
+ regoff_t match[2*(MATCH_MAX+1)],n;
register int c, m=0;
register const char *cp=pat;
while(c = *cp++)
@@ -99,20 +100,20 @@ static int test_strmatch(const char *str, const char *pat)
match[0] = 0;
if(m > elementsof(match)/2)
m = elementsof(match)/2;
- n = strgrpmatch(str, pat, match, m, STR_MAXIMAL|STR_LEFT|STR_RIGHT);
+ n = strgrpmatch(str, pat, match, m, STR_GROUP|STR_MAXIMAL|STR_LEFT|STR_RIGHT);
if(m==0 && n==1)
match[1] = strlen(str);
if(n)
- sh_setmatch(str, -1, n, match);
+ sh_setmatch(shp, str, -1, n, match, 0);
return(n);
}
-int b_test(int argc, char *argv[],void *extra)
+int b_test(int argc, char *argv[],Shbltin_t *context)
{
struct test tdata;
register char *cp = argv[0];
register int not;
- tdata.sh = ((Shbltin_t*)extra)->shp;
+ tdata.sh = context->shp;
tdata.av = argv;
tdata.ap = 1;
if(c_eq(cp,'['))
@@ -152,12 +153,14 @@ int b_test(int argc, char *argv[],void *extra)
if(argc==5)
break;
if(not && cp[0]=='-' && cp[2]==0)
- return(test_unop(cp[1],argv[3])!=0);
+ return(test_unop(tdata.sh,cp[1],argv[3])!=0);
else if(argv[1][0]=='-' && argv[1][2]==0)
- return(!test_unop(argv[1][1],cp));
+ return(!test_unop(tdata.sh,argv[1][1],cp));
+ else if(not && c_eq(argv[2],'!'))
+ return(*argv[3]==0);
errormsg(SH_DICT,ERROR_exit(2),e_badop,cp);
}
- return(test_binop(op,argv[1],argv[3])^(argc!=5));
+ return(test_binop(tdata.sh,op,argv[1],argv[3])^(argc!=5));
}
case 3:
if(not)
@@ -177,7 +180,7 @@ int b_test(int argc, char *argv[],void *extra)
}
break;
}
- return(!test_unop(cp[1],argv[2]));
+ return(!test_unop(tdata.sh,cp[1],argv[2]));
case 2:
return(*cp==0);
}
@@ -289,7 +292,7 @@ static int e3(struct test *tp)
errormsg(SH_DICT,ERROR_exit(2),e_argument);
}
if(strchr(test_opchars,op))
- return(test_unop(op,cp));
+ return(test_unop(tp->sh,op,cp));
}
if(!cp)
{
@@ -304,10 +307,10 @@ skip:
errormsg(SH_DICT,ERROR_exit(2),e_badop,binop);
if(op==TEST_AND || op==TEST_OR)
tp->ap--;
- return(test_binop(op,arg,cp));
+ return(test_binop(tp->sh,op,arg,cp));
}
-int test_unop(register int op,register const char *arg)
+int test_unop(Shell_t *shp,register int op,register const char *arg)
{
struct stat statb;
int f;
@@ -406,10 +409,12 @@ int test_unop(register int op,register const char *arg)
if(op=='s')
return(statb.st_size>0);
else if(op=='O')
- return(statb.st_uid==sh.userid);
- return(statb.st_gid==sh.groupid);
+ return(statb.st_uid==shp->gd->userid);
+ return(statb.st_gid==shp->gd->groupid);
case 'a':
case 'e':
+ if(memcmp(arg,"/dev/",5)==0 && sh_open(arg,O_NONBLOCK))
+ return(1);
return(permission(arg, F_OK));
case 'o':
f=1;
@@ -429,7 +434,7 @@ int test_unop(register int op,register const char *arg)
Namval_t *np;
Namarr_t *ap;
int isref;
- if(!(np = nv_open(arg,sh.var_tree,NV_VARNAME|NV_NOFAIL|NV_NOADD|NV_NOREF)))
+ if(!(np = nv_open(arg,shp->var_tree,NV_VARNAME|NV_NOFAIL|NV_NOADD|NV_NOREF)))
return(0);
isref = nv_isref(np);
if(op=='R')
@@ -457,7 +462,7 @@ int test_unop(register int op,register const char *arg)
}
}
-int test_binop(register int op,const char *left,const char *right)
+int test_binop(Shell_t *shp,register int op,const char *left,const char *right)
{
register double lnum,rnum;
if(op&TEST_ARITH)
@@ -466,8 +471,8 @@ int test_binop(register int op,const char *left,const char *right)
left++;
while(*right=='0')
right++;
- lnum = sh_arith(left);
- rnum = sh_arith(right);
+ lnum = sh_arith(shp,left);
+ rnum = sh_arith(shp,right);
}
switch(op)
{
@@ -476,9 +481,9 @@ int test_binop(register int op,const char *left,const char *right)
case TEST_OR:
return(*left!=0);
case TEST_PEQ:
- return(test_strmatch(left, right));
+ return(test_strmatch(shp, left, right));
case TEST_PNE:
- return(!test_strmatch(left, right));
+ return(!test_strmatch(shp, left, right));
case TEST_SGT:
return(strcoll(left, right)>0);
case TEST_SLT:
@@ -553,34 +558,35 @@ int test_inode(const char *file1,const char *file2)
int sh_access(register const char *name, register int mode)
{
+ Shell_t *shp = sh_getinterp();
struct stat statb;
if(*name==0)
return(-1);
- if(strmatch(name,(char*)e_devfdNN))
+ if(sh_isdevfd(name))
return(sh_ioaccess((int)strtol(name+8, (char**)0, 10),mode));
/* can't use access function for execute permission with root */
- if(mode==X_OK && sh.euserid==0)
+ if(mode==X_OK && shp->gd->euserid==0)
goto skip;
- if(sh.userid==sh.euserid && sh.groupid==sh.egroupid)
+ if(shp->gd->userid==shp->gd->euserid && shp->gd->groupid==shp->gd->egroupid)
return(access(name,mode));
#ifdef _lib_setreuid
/* swap the real uid to effective, check access then restore */
/* first swap real and effective gid, if different */
- if(sh.groupid==sh.euserid || setregid(sh.egroupid,sh.groupid)==0)
+ if(shp->gd->groupid==shp->gd->euserid || setregid(shp->gd->egroupid,shp->gd->groupid)==0)
{
/* next swap real and effective uid, if needed */
- if(sh.userid==sh.euserid || setreuid(sh.euserid,sh.userid)==0)
+ if(shp->gd->userid==shp->gd->euserid || setreuid(shp->gd->euserid,shp->gd->userid)==0)
{
mode = access(name,mode);
/* restore ids */
- if(sh.userid!=sh.euserid)
- setreuid(sh.userid,sh.euserid);
- if(sh.groupid!=sh.egroupid)
- setregid(sh.groupid,sh.egroupid);
+ if(shp->gd->userid!=shp->gd->euserid)
+ setreuid(shp->gd->userid,shp->gd->euserid);
+ if(shp->gd->groupid!=shp->gd->egroupid)
+ setregid(shp->gd->groupid,shp->gd->egroupid);
return(mode);
}
- else if(sh.groupid!=sh.egroupid)
- setregid(sh.groupid,sh.egroupid);
+ else if(shp->gd->groupid!=shp->gd->egroupid)
+ setregid(shp->gd->groupid,shp->gd->egroupid);
}
#endif /* _lib_setreuid */
skip:
@@ -588,16 +594,16 @@ skip:
{
if(mode == F_OK)
return(mode);
- else if(sh.euserid == 0)
+ else if(shp->gd->euserid == 0)
{
if(!S_ISREG(statb.st_mode) || mode!=X_OK)
return(0);
/* root needs execute permission for someone */
mode = (S_IXUSR|S_IXGRP|S_IXOTH);
}
- else if(sh.euserid == statb.st_uid)
+ else if(shp->gd->euserid == statb.st_uid)
mode <<= 6;
- else if(sh.egroupid == statb.st_gid)
+ else if(shp->gd->egroupid == statb.st_gid)
mode <<= 3;
#ifdef _lib_getgroups
/* on some systems you can be in several groups */
@@ -642,6 +648,7 @@ skip:
static int test_mode(register const char *file)
{
struct stat statb;
+ statb.st_mode = 0;
if(file && (*file==0 || test_stat(file,&statb)<0))
return(0);
return(statb.st_mode);
@@ -657,7 +664,7 @@ static int test_stat(const char *name,struct stat *buff)
errno = ENOENT;
return(-1);
}
- if(strmatch(name,(char*)e_devfdNN))
+ if(sh_isdevfd(name))
return(fstat((int)strtol(name+8, (char**)0, 10),buff));
else
return(stat(name,buff));
diff --git a/usr/src/lib/libshell/common/bltins/trap.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/trap.c
index cd6a2e8d9b..6cb335c4d9 100644
--- a/usr/src/lib/libshell/common/bltins/trap.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/trap.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -38,14 +38,14 @@
static const char trapfmt[] = "trap -- %s %s\n";
-static int sig_number(const char*);
+static int sig_number(Shell_t*,const char*);
static void sig_list(Shell_t*,int);
-int b_trap(int argc,char *argv[],void *extra)
+int b_trap(int argc,char *argv[],Shbltin_t *context)
{
register char *arg = argv[1];
register int sig, clear = 0, dflag = 0, pflag = 0;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
NOT_USED(argc);
while (sig = optget(argv, sh_opttrap)) switch (sig)
{
@@ -82,7 +82,7 @@ int b_trap(int argc,char *argv[],void *extra)
* if function semantics can be worked out then it
* may merit a -d,--default option
*/
- else if(*action=='+' && action[1]==0 && sh.st.self == &sh.global)
+ else if(*action=='+' && action[1]==0 && shp->st.self == &shp->global)
{
clear++;
dflag++;
@@ -93,7 +93,7 @@ int b_trap(int argc,char *argv[],void *extra)
}
while(arg = *argv++)
{
- sig = sig_number(arg);
+ sig = sig_number(shp,arg);
if(sig<0)
{
errormsg(SH_DICT,2,e_trap,arg);
@@ -102,6 +102,7 @@ int b_trap(int argc,char *argv[],void *extra)
/* internal traps */
if(sig&SH_TRAP)
{
+ char **trap = (shp->st.otrap?shp->st.otrap:shp->st.trap);
sig &= ~SH_TRAP;
if(sig>SH_DEBUGTRAP)
{
@@ -110,10 +111,11 @@ int b_trap(int argc,char *argv[],void *extra)
}
if(pflag)
{
- if(arg=shp->st.trap[sig])
+ if(arg=trap[sig])
sfputr(sfstdout,sh_fmtq(arg),'\n');
continue;
}
+ shp->st.otrap = 0;
if(shp->st.trap[sig])
free(shp->st.trap[sig]);
shp->st.trap[sig] = 0;
@@ -125,10 +127,21 @@ int b_trap(int argc,char *argv[],void *extra)
shp->trapnote |= SH_SIGTRAP;
else
shp->trapnote = 0;
+
+ }
+ if(sig == SH_ERRTRAP)
+ {
+ if(clear)
+ shp->errtrap = 0;
+ else
+ {
+ if(!shp->fn_depth || shp->end_fn)
+ shp->errtrap = 1;
+ }
}
continue;
}
- if(sig>shp->sigmax)
+ if(sig>shp->gd->sigmax)
{
errormsg(SH_DICT,2,e_trap,arg);
return(1);
@@ -142,6 +155,8 @@ int b_trap(int argc,char *argv[],void *extra)
else if(clear)
{
sh_sigclear(sig);
+ if(sig == 0)
+ shp->exittrap = 0;
if(dflag)
signal(sig,SIG_DFL);
}
@@ -154,24 +169,30 @@ int b_trap(int argc,char *argv[],void *extra)
shp->st.trapcom[sig] = (shp->sigflag[sig]&SH_SIGOFF) ? Empty : strdup(action);
if(arg && arg != Empty)
free(arg);
+ if(sig == 0)
+ {
+ if(!shp->fn_depth || shp->end_fn)
+ shp->exittrap = 1;
+ }
}
}
}
else /* print out current traps */
- sig_list(shp,-1);
+ sig_list(shp,-2);
return(0);
}
-int b_kill(int argc,char *argv[],void *extra)
+int b_kill(int argc,char *argv[],Shbltin_t *context)
{
register char *signame;
register int sig=SIGTERM, flag=0, n;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
+ int usemenu = 0;
NOT_USED(argc);
while((n = optget(argv,sh_optkill))) switch(n)
{
case ':':
- if((signame=argv[opt_info.index++]) && (sig=sig_number(signame+1))>=0)
+ if((signame=argv[opt_info.index++]) && (sig=sig_number(shp,signame+1))>=0)
goto endopts;
opt_info.index--;
errormsg(SH_DICT,2, "%s", opt_info.arg);
@@ -183,6 +204,9 @@ int b_kill(int argc,char *argv[],void *extra)
flag |= S_FLAG;
signame = opt_info.arg;
goto endopts;
+ case 'L':
+ usemenu = -1;
+ /* FALLTHROUGH */
case 'l':
flag |= L_FLAG;
break;
@@ -201,14 +225,14 @@ endopts:
if(flag&L_FLAG)
{
if(!(*argv))
- sig_list(shp,0);
+ sig_list(shp,usemenu);
else while(signame = *argv++)
{
if(isdigit(*signame))
sig_list(shp,((int)strtol(signame, (char**)0, 10)&0177)+1);
else
{
- if((sig=sig_number(signame))<0)
+ if((sig=sig_number(shp,signame))<0)
{
shp->exitval = 2;
errormsg(SH_DICT,ERROR_exit(1),e_nosignal,signame);
@@ -220,7 +244,7 @@ endopts:
}
if(flag&S_FLAG)
{
- if((sig=sig_number(signame)) < 0 || sig > shp->sigmax)
+ if((sig=sig_number(shp,signame)) < 0 || sig > shp->gd->sigmax)
errormsg(SH_DICT,ERROR_exit(1),e_nosignal,signame);
}
if(job_walk(sfstdout,job_kill,sig,argv))
@@ -232,7 +256,7 @@ endopts:
* Given the name or number of a signal return the signal number
*/
-static int sig_number(const char *string)
+static int sig_number(Shell_t *shp,const char *string)
{
const Shtable_t *tp;
register int n,o,sig=0;
@@ -278,28 +302,28 @@ static int sig_number(const char *string)
n = tp->sh_number;
}
if((n>>SH_SIGBITS)&SH_SIGRUNTIME)
- n = sh.sigruntime[(n&((1<<SH_SIGBITS)-1))-1];
+ n = shp->gd->sigruntime[(n&((1<<SH_SIGBITS)-1))-1];
else
{
n &= (1<<SH_SIGBITS)-1;
if(n < SH_TRAP)
n--;
}
- if(n<0 && sh.sigruntime[1] && (name=stakptr(o)) && *name++=='R' && *name++=='T')
+ if(n<0 && shp->gd->sigruntime[1] && (name=stakptr(o)) && *name++=='R' && *name++=='T')
{
if(name[0]=='M' && name[1]=='I' && name[2]=='N' && name[3]=='+')
{
if((sig=(int)strtol(name+4,&name,10)) >= 0 && !*name)
- n = sh.sigruntime[SH_SIGRTMIN] + sig;
+ n = shp->gd->sigruntime[SH_SIGRTMIN] + sig;
}
else if(name[0]=='M' && name[1]=='A' && name[2]=='X' && name[3]=='-')
{
if((sig=(int)strtol(name+4,&name,10)) >= 0 && !*name)
- n = sh.sigruntime[SH_SIGRTMAX] - sig;
+ n = shp->gd->sigruntime[SH_SIGRTMAX] - sig;
}
else if((sig=(int)strtol(name,&name,10)) > 0 && !*name)
- n = sh.sigruntime[SH_SIGRTMIN] + sig - 1;
- if(n<sh.sigruntime[SH_SIGRTMIN] || n>sh.sigruntime[SH_SIGRTMAX])
+ n = shp->gd->sigruntime[SH_SIGRTMIN] + sig - 1;
+ if(n<shp->gd->sigruntime[SH_SIGRTMIN] || n>shp->gd->sigruntime[SH_SIGRTMAX])
n = -1;
}
}
@@ -310,29 +334,29 @@ static int sig_number(const char *string)
* synthesize signal name for sig in buf
* pfx!=0 prepends SIG to default signal number
*/
-static char* sig_name(int sig, char* buf, int pfx)
+static char* sig_name(Shell_t *shp,int sig, char* buf, int pfx)
{
register int i;
i = 0;
- if(sig>sh.sigruntime[SH_SIGRTMIN] && sig<sh.sigruntime[SH_SIGRTMAX])
+ if(sig>shp->gd->sigruntime[SH_SIGRTMIN] && sig<shp->gd->sigruntime[SH_SIGRTMAX])
{
buf[i++] = 'R';
buf[i++] = 'T';
buf[i++] = 'M';
- if(sig>sh.sigruntime[SH_SIGRTMIN]+(sh.sigruntime[SH_SIGRTMAX]-sh.sigruntime[SH_SIGRTMIN])/2)
+ if(sig>shp->gd->sigruntime[SH_SIGRTMIN]+(shp->gd->sigruntime[SH_SIGRTMAX]-shp->gd->sigruntime[SH_SIGRTMIN])/2)
{
buf[i++] = 'A';
buf[i++] = 'X';
buf[i++] = '-';
- sig = sh.sigruntime[SH_SIGRTMAX]-sig;
+ sig = shp->gd->sigruntime[SH_SIGRTMAX]-sig;
}
else
{
buf[i++] = 'I';
buf[i++] = 'N';
buf[i++] = '+';
- sig = sig-sh.sigruntime[SH_SIGRTMIN];
+ sig = sig-shp->gd->sigruntime[SH_SIGRTMIN];
}
}
else if(pfx)
@@ -349,7 +373,8 @@ static char* sig_name(int sig, char* buf, int pfx)
/*
* if <flag> is positive, then print signal name corresponding to <flag>
* if <flag> is zero, then print all signal names
- * if <flag> is negative, then print all traps
+ * if <flag> is -1, then print all signal names in menu format
+ * if <flag> is <-1, then print all traps
*/
static void sig_list(register Shell_t *shp,register int flag)
{
@@ -363,7 +388,7 @@ static void sig_list(register Shell_t *shp,register int flag)
if(flag<=0)
{
/* not all signals may be defined, so initialize */
- for(sig=shp->sigmax; sig>=0; sig--)
+ for(sig=shp->gd->sigmax; sig>=0; sig--)
names[sig] = 0;
for(sig=SH_DEBUGTRAP; sig>=0; sig--)
traps[sig] = 0;
@@ -371,7 +396,7 @@ static void sig_list(register Shell_t *shp,register int flag)
for(; *tp->sh_name; tp++)
{
sig = tp->sh_number&((1<<SH_SIGBITS)-1);
- if (((tp->sh_number>>SH_SIGBITS) & SH_SIGRUNTIME) && (sig = sh.sigruntime[sig-1]+1) == 1)
+ if (((tp->sh_number>>SH_SIGBITS) & SH_SIGRUNTIME) && (sig = shp->gd->sigruntime[sig-1]+1) == 1)
continue;
if(sig==flag)
{
@@ -384,8 +409,8 @@ static void sig_list(register Shell_t *shp,register int flag)
names[sig] = (char*)tp->sh_name;
}
if(flag > 0)
- sfputr(sfstdout, sig_name(flag-1,name,0), '\n');
- else if(flag<0)
+ sfputr(sfstdout, sig_name(shp,flag-1,name,0), '\n');
+ else if(flag<-1)
{
/* print the traps */
register char *trap,**trapcom;
@@ -396,13 +421,13 @@ static void sig_list(register Shell_t *shp,register int flag)
{
if(!(trap=trapcom[sig]))
continue;
- if(sig > shp->sigmax || !(sname=(char*)names[sig]))
- sname = sig_name(sig,name,1);
+ if(sig > shp->gd->sigmax || !(sname=(char*)names[sig]))
+ sname = sig_name(shp,sig,name,1);
sfprintf(sfstdout,trapfmt,sh_fmtq(trap),sname);
}
for(sig=SH_DEBUGTRAP; sig>=0; sig--)
{
- if(!(trap=shp->st.trap[sig]))
+ if(!(trap=shp->st.otrap?shp->st.otrap[sig]:shp->st.trap[sig]))
continue;
sfprintf(sfstdout,trapfmt,sh_fmtq(trap),traps[sig]);
}
@@ -410,11 +435,23 @@ static void sig_list(register Shell_t *shp,register int flag)
else
{
/* print all the signal names */
- for(sig=1; sig <= shp->sigmax; sig++)
+ for(sig=1; sig <= shp->gd->sigmax; sig++)
{
if(!(sname=(char*)names[sig]))
- sname = sig_name(sig,name,1);
- sfputr(sfstdout,sname,'\n');
+ {
+ sname = sig_name(shp,sig,name,1);
+ if(flag)
+ sname = stakcopy(sname);
+ }
+ if(flag)
+ names[sig] = sname;
+ else
+ sfputr(sfstdout,sname,'\n');
+ }
+ if(flag)
+ {
+ names[sig] = 0;
+ sh_menu(sfstdout,shp->gd->sigmax,(char**)names+1);
}
}
}
diff --git a/usr/src/lib/libshell/common/bltins/typeset.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/typeset.c
index f9beba7ed3..73545073a2 100644
--- a/usr/src/lib/libshell/common/bltins/typeset.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/typeset.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -46,6 +46,7 @@ struct tdata
{
Shell_t *sh;
Namval_t *tp;
+ const char *wctname;
Sfio_t *outfile;
char *prefix;
char *tname;
@@ -56,6 +57,8 @@ struct tdata
int scanmask;
Dt_t *scanroot;
char **argnam;
+ int indent;
+ int noref;
};
@@ -63,8 +66,8 @@ static int print_namval(Sfio_t*, Namval_t*, int, struct tdata*);
static void print_attribute(Namval_t*,void*);
static void print_all(Sfio_t*, Dt_t*, struct tdata*);
static void print_scan(Sfio_t*, int, Dt_t*, int, struct tdata*);
-static int b_unall(int, char**, Dt_t*, Shell_t*);
-static int b_common(char**, int, Dt_t*, struct tdata*);
+static int unall(int, char**, Dt_t*, Shell_t*);
+static int setall(char**, int, Dt_t*, struct tdata*);
static void pushname(Namval_t*,void*);
static void(*nullscan)(Namval_t*,void*);
@@ -79,16 +82,16 @@ static Namval_t *load_class(const char *name)
*/
#if 0
/* for the dictionary generator */
- int b_export(int argc,char *argv[],void *extra){}
+ int b_export(int argc,char *argv[],Shbltin_t *context){}
#endif
-int b_readonly(int argc,char *argv[],void *extra)
+int b_readonly(int argc,char *argv[],Shbltin_t *context)
{
register int flag;
char *command = argv[0];
struct tdata tdata;
NOT_USED(argc);
memset((void*)&tdata,0,sizeof(tdata));
- tdata.sh = ((Shbltin_t*)extra)->shp;
+ tdata.sh = context->shp;
tdata.aflag = '-';
while((flag = optget(argv,*command=='e'?sh_optexport:sh_optreadonly))) switch(flag)
{
@@ -126,11 +129,11 @@ int b_readonly(int argc,char *argv[],void *extra)
if(!tdata.sh->prefix)
tdata.sh->prefix = "";
}
- return(b_common(argv,flag,tdata.sh->var_tree, &tdata));
+ return(setall(argv,flag,tdata.sh->var_tree, &tdata));
}
-int b_alias(int argc,register char *argv[],void *extra)
+int b_alias(int argc,register char *argv[],Shbltin_t *context)
{
register unsigned flag = NV_NOARRAY|NV_NOSCOPE|NV_ASSIGN;
register Dt_t *troot;
@@ -138,7 +141,7 @@ int b_alias(int argc,register char *argv[],void *extra)
struct tdata tdata;
NOT_USED(argc);
memset((void*)&tdata,0,sizeof(tdata));
- tdata.sh = ((Shbltin_t*)extra)->shp;
+ tdata.sh = context->shp;
troot = tdata.sh->alias_tree;
if(*argv[0]=='h')
flag = NV_TAGGED;
@@ -177,7 +180,8 @@ int b_alias(int argc,register char *argv[],void *extra)
{
if(argv[1][1]=='r' && argv[1][2]==0)
{
- nv_putval(PATHNOD,nv_getval(PATHNOD),NV_RDONLY);
+ Namval_t *np = nv_search((char*)PATHNOD,tdata.sh->var_tree,HASH_BUCKET);
+ nv_putval(np,nv_getval(np),NV_RDONLY);
argv++;
if(!argv[1])
return(0);
@@ -193,25 +197,25 @@ int b_alias(int argc,register char *argv[],void *extra)
troot = tdata.sh->track_tree;
}
}
- return(b_common(argv,flag,troot,&tdata));
+ return(setall(argv,flag,troot,&tdata));
}
#if 0
/* for the dictionary generator */
- int b_local(int argc,char *argv[],void *extra){}
+ int b_local(int argc,char *argv[],Shbltin_t *context){}
#endif
-int b_typeset(int argc,register char *argv[],void *extra)
+int b_typeset(int argc,register char *argv[],Shbltin_t *context)
{
register int n, flag = NV_VARNAME|NV_ASSIGN;
struct tdata tdata;
const char *optstring = sh_opttypeset;
- Namdecl_t *ntp = (Namdecl_t*)((Shbltin_t*)extra)->ptr;
+ Namdecl_t *ntp = (Namdecl_t*)context->ptr;
Dt_t *troot;
int isfloat=0, shortint=0, sflag=0;
NOT_USED(argc);
memset((void*)&tdata,0,sizeof(tdata));
- tdata.sh = ((Shbltin_t*)extra)->shp;
+ tdata.sh = context->shp;
if(ntp)
{
tdata.tp = ntp->tp;
@@ -221,6 +225,8 @@ int b_typeset(int argc,register char *argv[],void *extra)
troot = tdata.sh->var_tree;
while((n = optget(argv,optstring)))
{
+ if(tdata.aflag==0)
+ tdata.aflag = *opt_info.option;
switch(n)
{
case 'a':
@@ -292,6 +298,16 @@ int b_typeset(int argc,register char *argv[],void *extra)
flag |= (n=='L'?NV_LJUST:NV_RJUST);
}
break;
+ case 'M':
+ if((tdata.wctname = opt_info.arg) && !nv_mapchar((Namval_t*)0,tdata.wctname))
+ errormsg(SH_DICT, ERROR_exit(1),e_unknownmap, tdata.wctname);
+ if(tdata.wctname && strcmp(tdata.wctname,e_tolower)==0)
+ flag |= NV_UTOL;
+ else
+ flag |= NV_LTOU;
+ if(!tdata.wctname)
+ flag |= NV_UTOL;
+ break;
case 'f':
flag &= ~(NV_VARNAME|NV_ASSIGN);
troot = tdata.sh->fun_tree;
@@ -302,11 +318,13 @@ int b_typeset(int argc,register char *argv[],void *extra)
flag |= NV_INTEGER;
break;
case 'l':
+ tdata.wctname = e_tolower;
flag |= NV_UTOL;
break;
case 'p':
tdata.prefix = argv[0];
tdata.pflag = 1;
+ flag &= ~NV_ASSIGN;
break;
case 'r':
flag |= NV_RDONLY;
@@ -326,6 +344,7 @@ int b_typeset(int argc,register char *argv[],void *extra)
flag |= NV_TAGGED;
break;
case 'u':
+ tdata.wctname = e_toupper;
flag |= NV_LTOU;
break;
case 'x':
@@ -340,8 +359,6 @@ int b_typeset(int argc,register char *argv[],void *extra)
opt_info.disc = 0;
return(2);
}
- if(tdata.aflag==0)
- tdata.aflag = *opt_info.option;
}
endargs:
argv += opt_info.index;
@@ -361,14 +378,27 @@ endargs:
error_info.errors++;
if((flag&NV_REF) && (flag&~(NV_REF|NV_IDENT|NV_ASSIGN)))
error_info.errors++;
+ if((flag&NV_TYPE) && (flag&~(NV_TYPE|NV_VARNAME|NV_ASSIGN)))
+ error_info.errors++;
if(troot==tdata.sh->fun_tree && ((isfloat || flag&~(NV_FUNCT|NV_TAGGED|NV_EXPORT|NV_LTOU))))
error_info.errors++;
+ if(sflag && troot==tdata.sh->fun_tree)
+ {
+ /* static function */
+ sflag = 0;
+ flag |= NV_STATICF;
+ }
if(error_info.errors)
errormsg(SH_DICT,ERROR_usage(2),"%s", optusage(NIL(char*)));
+ if(sizeof(char*)<8 && tdata.argnum > SHRT_MAX)
+ errormsg(SH_DICT,ERROR_exit(2),"option argument cannot be greater than %d",SHRT_MAX);
if(isfloat)
flag |= NV_DOUBLE;
if(shortint)
+ {
+ flag &= ~NV_LONG;
flag |= NV_SHORT|NV_INTEGER;
+ }
if(sflag)
{
if(tdata.sh->mktype)
@@ -378,15 +408,34 @@ endargs:
}
if(tdata.sh->fn_depth && !tdata.pflag)
flag |= NV_NOSCOPE;
+ if(tdata.help)
+ tdata.help = strdup(tdata.help);
if(flag&NV_TYPE)
{
Stk_t *stkp = tdata.sh->stk;
- int offset = stktell(stkp);
+ int off=0,offset = stktell(stkp);
+ if(!tdata.prefix)
+ return(sh_outtype(tdata.sh,sfstdout));
sfputr(stkp,NV_CLASS,-1);
+#if SHOPT_NAMESPACE
+ if(tdata.sh->namespace)
+ {
+ off = stktell(stkp)+1;
+ sfputr(stkp,nv_name(tdata.sh->namespace),'.');
+ }
+ else
+#endif /* SHOPT_NAMESPACE */
if(NV_CLASS[sizeof(NV_CLASS)-2]!='.')
sfputc(stkp,'.');
sfputr(stkp,tdata.prefix,0);
tdata.tp = nv_open(stkptr(stkp,offset),tdata.sh->var_tree,NV_VARNAME|NV_NOARRAY|NV_NOASSIGN);
+#if SHOPT_NAMESPACE
+ if(!tdata.tp && off)
+ {
+ *stkptr(stkp,off)=0;
+ tdata.tp = nv_open(stkptr(stkp,offset),tdata.sh->var_tree,NV_VARNAME|NV_NOARRAY|NV_NOASSIGN);
+ }
+#endif /* SHOPT_NAMESPACE */
stkseek(stkp,offset);
if(!tdata.tp)
errormsg(SH_DICT,ERROR_exit(1),"%s: unknown type",tdata.prefix);
@@ -394,12 +443,19 @@ endargs:
nv_newtype(tdata.tp);
tdata.tp->nvenv = tdata.help;
flag &= ~NV_TYPE;
+ if(nv_isattr(tdata.tp,NV_TAGGED))
+ {
+ nv_offattr(tdata.tp,NV_TAGGED);
+ return(0);
+ }
}
else if(tdata.aflag==0 && ntp && ntp->tp)
tdata.aflag = '-';
if(!tdata.sh->mktype)
tdata.help = 0;
- return(b_common(argv,flag,troot,&tdata));
+ if(tdata.aflag=='+' && (flag&(NV_ARRAY|NV_IARRAY|NV_COMVAR)) && argv[1])
+ errormsg(SH_DICT,ERROR_exit(1),e_nounattr);
+ return(setall(argv,flag,troot,&tdata));
}
static void print_value(Sfio_t *iop, Namval_t *np, struct tdata *tp)
@@ -412,6 +468,43 @@ static void print_value(Sfio_t *iop, Namval_t *np, struct tdata *tp)
return;
aflag = '+';
}
+ else if(nv_istable(np))
+ {
+ Dt_t *root = tp->sh->last_root;
+ Namval_t *nsp = tp->sh->namespace;
+ char *cp;
+ if(!tp->pflag)
+ return;
+ cp = name = nv_name(np);
+ if(*name=='.')
+ name++;
+ if(tp->indent)
+ sfnputc(iop,'\t',tp->indent);
+ sfprintf(iop,"namespace %s\n", name);
+ if(tp->indent)
+ sfnputc(iop,'\t',tp->indent);
+ sfprintf(iop,"{\n", name);
+ tp->indent++;
+ /* output types from namespace */
+ tp->sh->namespace = 0;
+ tp->sh->prefix = nv_name(np)+1;
+ sh_outtype(tp->sh,iop);
+ tp->sh->prefix = 0;
+ tp->sh->namespace = np;
+ tp->sh->last_root = root;
+ /* output variables from namespace */
+ print_scan(iop,NV_NOSCOPE,nv_dict(np),aflag=='+',tp);
+ tp->wctname = cp;
+ tp->sh->namespace = 0;
+ /* output functions from namespace */
+ print_scan(iop,NV_FUNCTION|NV_NOSCOPE,tp->sh->fun_tree,aflag=='+',tp);
+ tp->wctname = 0;
+ tp->sh->namespace = nsp;
+ if(--tp->indent)
+ sfnputc(iop,'\t',tp->indent);
+ sfwrite(iop,"}\n",2);
+ return;
+ }
sfputr(iop,nv_name(np),aflag=='+'?'\n':'=');
if(aflag=='+')
return;
@@ -432,7 +525,7 @@ static void print_value(Sfio_t *iop, Namval_t *np, struct tdata *tp)
}
}
-static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *tp)
+static int setall(char **argv,register int flag,Dt_t *troot,struct tdata *tp)
{
register char *name;
char *last = 0;
@@ -446,6 +539,8 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
}
else if(*shp->prefix==0)
shp->prefix = 0;
+ if(*argv[0]=='+')
+ nvflags |= NV_NOADD;
flag &= ~(NV_NOARRAY|NV_NOSCOPE|NV_VARNAME|NV_IDENT|NV_STATIC|NV_COMVAR|NV_IARRAY);
if(argv[1])
{
@@ -457,11 +552,13 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
nvflags |= NV_NOREF;
}
if(tp->pflag)
- nvflags |= NV_NOREF;
+ nvflags |= (NV_NOREF|NV_NOADD|NV_NOFAIL);
while(name = *++argv)
{
register unsigned newflag;
register Namval_t *np;
+ Namarr_t *ap;
+ Namval_t *mp;
unsigned curflag;
if(troot == shp->fun_tree)
{
@@ -475,13 +572,37 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
/* Function names cannot be special builtin */
if((np=nv_search(name,shp->bltin_tree,0)) && nv_isattr(np,BLT_SPC))
errormsg(SH_DICT,ERROR_exit(1),e_badfun,name);
+#if SHOPT_NAMESPACE
+ if(shp->namespace)
+ np = sh_fsearch(shp,name,NV_ADD|HASH_NOSCOPE);
+ else
+#endif /* SHOPT_NAMESPACE */
np = nv_open(name,sh_subfuntree(1),NV_NOARRAY|NV_IDENT|NV_NOSCOPE);
}
- else if((np=nv_search(name,troot,0)) && !is_afunction(np))
+ else
+ {
+ if(shp->prefix)
+ {
+ sfprintf(shp->strbuf,"%s.%s%c",shp->prefix,name,0);
+ name = sfstruse(shp->strbuf);
+ }
+#if SHOPT_NAMESPACE
np = 0;
+ if(shp->namespace)
+ np = sh_fsearch(shp,name,HASH_NOSCOPE);
+ if(!np)
+#endif /* SHOPT_NAMESPACE */
+ if(np=nv_search(name,troot,0))
+ {
+ if(!is_afunction(np))
+ np = 0;
+ }
+ else if(memcmp(name,".sh.math.",9)==0 && sh_mathstd(name+9))
+ continue;
+ }
if(np && ((flag&NV_LTOU) || !nv_isnull(np) || nv_isattr(np,NV_LTOU)))
{
- if(flag==0)
+ if(flag==0 && !tp->help)
{
print_namval(sfstdout,np,tp->aflag=='+',tp);
continue;
@@ -498,11 +619,15 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
if(tp->help)
{
int offset = stktell(shp->stk);
- sfputr(shp->stk,shp->prefix,'.');
- sfputr(shp->stk,name,0);
- if((np=nv_search(stkptr(shp->stk,offset),troot,0)) && np->nvalue.cp)
+ if(!np)
+ {
+ sfputr(shp->stk,shp->prefix,'.');
+ sfputr(shp->stk,name,0);
+ np = nv_search(stkptr(shp->stk,offset),troot,0);
+ stkseek(shp->stk,offset);
+ }
+ if(np && np->nvalue.cp)
np->nvalue.rp->help = tp->help;
- stkseek(shp->stk,offset);
}
continue;
}
@@ -510,13 +635,30 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
if(troot==shp->track_tree && tp->aflag=='-')
{
np = nv_search(name,troot,NV_ADD);
- path_alias(np,path_absolute(nv_name(np),NIL(Pathcomp_t*)));
+ path_alias(np,path_absolute(shp,nv_name(np),NIL(Pathcomp_t*)));
continue;
}
- np = nv_open(name,troot,nvflags|NV_ARRAY);
+ np = nv_open(name,troot,nvflags|((nvflags&NV_ASSIGN)?0:NV_ARRAY)|((iarray|(nvflags&(NV_REF|NV_NOADD)==NV_REF))?NV_FARRAY:0));
+ if(!np)
+ continue;
+ if(nv_isnull(np) && !nv_isarray(np) && nv_isattr(np,NV_NOFREE))
+ nv_offattr(np,NV_NOFREE);
+ else if(tp->tp && !nv_isattr(np,NV_MINIMAL|NV_EXPORT) && (mp=(Namval_t*)np->nvenv) && (ap=nv_arrayptr(mp)) && (ap->nelem&ARRAY_TREE))
+ errormsg(SH_DICT,ERROR_exit(1),e_typecompat,nv_name(np));
+ else if((ap=nv_arrayptr(np)) && nv_aindex(np)>0 && ap->nelem==1 && nv_getval(np)==Empty)
+ {
+ ap->nelem++;
+ _nv_unset(np,0);
+ ap->nelem--;
+ }
+ else if(iarray && ap && ap->fun)
+ errormsg(SH_DICT,ERROR_exit(1),"cannot change associative array %s to index array",nv_name(np));
+ else if( (iarray||(flag&NV_ARRAY)) && nv_isvtree(np) && !nv_type(np))
+ _nv_unset(np,NV_EXPORT);
if(tp->pflag)
{
- nv_attribute(np,sfstdout,tp->prefix,1);
+ if(!nv_istable(np))
+ nv_attribute(np,sfstdout,tp->prefix,1);
print_value(sfstdout,np,tp);
continue;
}
@@ -530,8 +672,13 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
if(!comvar && !iarray)
continue;
}
- if(troot==shp->var_tree && ((tp->tp && !nv_isarray(np)) || !shp->st.real_fun && (nvflags&NV_STATIC)) && !strchr(name,'=') && !(shp->envlist && nv_onlist(shp->envlist,name)))
- _nv_unset(np,0);
+ if(!nv_isarray(np) && !strchr(name,'=') && !(shp->envlist && nv_onlist(shp->envlist,name)))
+ {
+ if(comvar || (shp->last_root==shp->var_tree && (tp->tp || (!shp->st.real_fun && (nvflags&NV_STATIC)) || (!(flag&(NV_EXPORT|NV_RDONLY)) && nv_isattr(np,(NV_EXPORT|NV_IMPORT))==(NV_EXPORT|NV_IMPORT)))))
+{
+ _nv_unset(np,0);
+}
+ }
if(troot==shp->var_tree)
{
if(iarray)
@@ -542,7 +689,6 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
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);
@@ -577,12 +723,38 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
nv_settype(np,tp->tp,tp->aflag=='-'?0:NV_APPEND);
flag = (np->nvflag&NV_NOCHANGE);
}
- curflag = np->nvflag;
flag &= ~NV_ASSIGN;
if(last=strchr(name,'='))
*last = 0;
if (shp->typeinit)
continue;
+ curflag = np->nvflag;
+ if(!(flag&NV_INTEGER) && (flag&(NV_LTOU|NV_UTOL)))
+ {
+ Namfun_t *fp;
+ char *cp;
+ if(!tp->wctname)
+ errormsg(SH_DICT,ERROR_exit(1),e_mapchararg,nv_name(np));
+ cp = (char*)nv_mapchar(np,0);
+ if(fp=nv_mapchar(np,tp->wctname))
+ {
+ if(tp->aflag=='+')
+ {
+ if(cp && strcmp(cp,tp->wctname)==0)
+ {
+ nv_disc(np,fp,NV_POP);
+ if(!(fp->nofree&1))
+ free((void*)fp);
+ nv_offattr(np,flag&(NV_LTOU|NV_UTOL));
+ }
+ }
+ else if(!cp || strcmp(cp,tp->wctname))
+ {
+ nv_disc(np,fp,NV_LAST);
+ nv_onattr(np,flag&(NV_LTOU|NV_UTOL));
+ }
+ }
+ }
if (tp->aflag == '-')
{
if((flag&NV_EXPORT) && (strchr(name,'.') || nv_isvtree(np)))
@@ -603,13 +775,6 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
else if(!(flag&NV_LJUST))
newflag &= ~NV_LJUST;
}
- if(!(flag&NV_INTEGER))
- {
- if (flag & NV_UTOL)
- newflag &= ~NV_LTOU;
- else if (flag & NV_LTOU)
- newflag &= ~NV_UTOL;
- }
}
else
{
@@ -629,12 +794,6 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
int len=strlen(name);
if(tp->argnum==1 && newflag==NV_INTEGER && nv_isattr(np,NV_INTEGER))
tp->argnum = 10;
- /* use reference name for export */
- if((newflag^curflag)&NV_EXPORT)
- {
- oldname = np->nvname;
- np->nvname = name;
- }
if(np->nvfun && !nv_isarray(np) && name[len-1]=='.')
newflag |= NV_NODISC;
nv_newattr (np, newflag&~NV_ASSIGN,tp->argnum);
@@ -671,10 +830,10 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
nv_close(np);
}
}
- else if(!tp->sh->envlist)
+ else
{
if(shp->prefix)
- errormsg(SH_DICT,2, "%s: compound assignment requires sub-variable name",shp->prefix);
+ errormsg(SH_DICT,2, e_subcomvar,shp->prefix);
if(tp->aflag)
{
if(troot==shp->fun_tree)
@@ -685,10 +844,24 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
else if(troot==shp->var_tree)
{
flag |= (nvflags&NV_ARRAY);
- if(flag&NV_IARRAY)
- flag |= NV_ARRAY;
+ if(iarray)
+ flag |= NV_ARRAY|NV_IARRAY;
+ if(comvar)
+ flag |= NV_TABLE;
+ if(!(flag&~NV_ASSIGN))
+ tp->noref = 1;
+ }
+ if((flag&(NV_UTOL|NV_LTOU)) ==(NV_UTOL|NV_LTOU))
+ {
+ print_scan(sfstdout,flag&~NV_UTOL,troot,tp->aflag=='+',tp);
+ flag &= ~NV_LTOU;
}
print_scan(sfstdout,flag,troot,tp->aflag=='+',tp);
+ if(tp->noref)
+ {
+ tp->noref = 0;
+ print_scan(sfstdout,flag|NV_REF,troot,tp->aflag=='+',tp);
+ }
}
else if(troot==shp->alias_tree)
print_scan(sfstdout,0,troot,0,tp);
@@ -699,99 +872,119 @@ static int b_common(char **argv,register int flag,Dt_t *troot,struct tdata *
return(r);
}
-typedef void (*Iptr_t)(int,void*);
-typedef int (*Fptr_t)(int, char*[], void*);
+#if SHOPT_DYNAMIC
+
+typedef void (*Libinit_f)(int,void*);
+
+typedef struct Libcomp_s
+{
+ void* dll;
+ char* lib;
+ dev_t dev;
+ ino_t ino;
+ unsigned int attr;
+} Libcomp_t;
#define GROWLIB 4
-static void **liblist;
-static unsigned short *libattr;
+static Libcomp_t *liblist;
static int nlib;
static int maxlib;
/*
- * This allows external routines to load from the same library */
-void **sh_getliblist(void)
-{
- return(liblist);
-}
-
-/*
* add library to loaded list
* call (*lib_init)() on first load if defined
* always move to head of search list
* return: 0: already loaded 1: first load
*/
-#if SHOPT_DYNAMIC
-int sh_addlib(void* library)
+
+int sh_addlib(Shell_t* shp, void* dll, char* name, Pathcomp_t* pp)
{
register int n;
register int r;
- Iptr_t initfn;
- Shbltin_t *sp = &sh.bltindata;
+ Libinit_f initfn;
+ Shbltin_t *sp = &shp->bltindata;
sp->nosfio = 0;
for (n = r = 0; n < nlib; n++)
{
if (r)
- {
liblist[n-1] = liblist[n];
- libattr[n-1] = libattr[n];
- }
- else if (liblist[n] == library)
+ else if (liblist[n].dll == dll)
r++;
}
if (r)
nlib--;
- else if ((initfn = (Iptr_t)dlllook(library, "lib_init")))
+ else if ((initfn = (Libinit_f)dlllook(dll, "lib_init")))
(*initfn)(0,sp);
if (nlib >= maxlib)
{
maxlib += GROWLIB;
- if (liblist)
- {
- liblist = (void**)realloc((void*)liblist, (maxlib+1)*sizeof(void**));
- libattr = (unsigned short*)realloc((void*)liblist, (maxlib+1)*sizeof(unsigned short*));
- }
- else
- {
- liblist = (void**)malloc((maxlib+1)*sizeof(void**));
- libattr = (unsigned short*)malloc((maxlib+1)*sizeof(unsigned short*));
- }
+ liblist = newof(liblist, Libcomp_t, maxlib+1, 0);
+ }
+ liblist[nlib].dll = dll;
+ liblist[nlib].attr = (sp->nosfio?BLT_NOSFIO:0);
+ if (name)
+ liblist[nlib].lib = strdup(name);
+ if (pp)
+ {
+ liblist[nlib].dev = pp->dev;
+ liblist[nlib].ino = pp->ino;
}
- libattr[nlib] = (sp->nosfio?BLT_NOSFIO:0);
- liblist[nlib++] = library;
- liblist[nlib] = 0;
+ nlib++;
return !r;
}
+
+Shbltin_f sh_getlib(Shell_t* shp, char* sym, Pathcomp_t* pp)
+{
+ register int n;
+
+ for (n = 0; n < nlib; n++)
+ if (liblist[n].ino == pp->ino && liblist[n].dev == pp->dev)
+ return (Shbltin_f)dlllook(liblist[n].dll, sym);
+ return 0;
+}
+
#else
-int sh_addlib(void* library)
+
+int sh_addlib(Shell_t* shp, void* library, char* name, Pathcomp_t* pp)
+{
+ return 0;
+}
+
+Shbltin_f sh_getlib(Shell_t* shp, char* name, Pathcomp_t* pp)
{
return 0;
}
+
#endif /* SHOPT_DYNAMIC */
/*
* add change or list built-ins
* adding builtins requires dlopen() interface
*/
-int b_builtin(int argc,char *argv[],void *extra)
+int b_builtin(int argc,char *argv[],Shbltin_t *context)
{
register char *arg=0, *name;
register int n, r=0, flag=0;
register Namval_t *np;
long dlete=0;
struct tdata tdata;
- Fptr_t addr;
+ Shbltin_f addr;
Stk_t *stkp;
void *library=0;
char *errmsg;
+#ifdef SH_PLUGIN_VERSION
+ unsigned long ver;
+ int list = 0;
+ char path[1024];
+#endif
NOT_USED(argc);
memset(&tdata,0,sizeof(tdata));
- tdata.sh = ((Shbltin_t*)extra)->shp;
+ tdata.sh = context->shp;
stkp = tdata.sh->stk;
if(!tdata.sh->pathlist)
- path_absolute(argv[0],NIL(Pathcomp_t*));
+ path_absolute(tdata.sh,argv[0],NIL(Pathcomp_t*));
while (n = optget(argv,sh_optbuiltin)) switch (n)
{
case 's':
@@ -808,6 +1001,11 @@ int b_builtin(int argc,char *argv[],void *extra)
error_info.errors++;
#endif /* SHOPT_DYNAMIC */
break;
+ case 'l':
+#ifdef SH_PLUGIN_VERSION
+ list = 1;
+#endif
+ break;
case ':':
errormsg(SH_DICT,2, "%s", opt_info.arg);
break;
@@ -830,6 +1028,15 @@ int b_builtin(int argc,char *argv[],void *extra)
#if SHOPT_DYNAMIC
if(arg)
{
+#ifdef SH_PLUGIN_VERSION
+ if(!(library = dllplugin(SH_ID, arg, NiL, SH_PLUGIN_VERSION, &ver, RTLD_LAZY, path, sizeof(path))))
+ {
+ errormsg(SH_DICT,ERROR_exit(0),"%s: %s",arg,dllerror(0));
+ return(1);
+ }
+ if(list)
+ sfprintf(sfstdout, "%s %08lu %s\n", arg, ver, path);
+#else
#if (_AST_VERSION>=20040404)
if(!(library = dllplug(SH_ID,arg,NIL(char*),RTLD_LAZY,NIL(char*),0)))
#else
@@ -839,7 +1046,8 @@ int b_builtin(int argc,char *argv[],void *extra)
errormsg(SH_DICT,ERROR_exit(0),"%s: %s",arg,dlerror());
return(1);
}
- sh_addlib(library);
+#endif
+ sh_addlib(tdata.sh,library,arg,NiL);
}
else
#endif /* SHOPT_DYNAMIC */
@@ -857,33 +1065,37 @@ int b_builtin(int argc,char *argv[],void *extra)
sfputr(stkp,name,0);
errmsg = 0;
addr = 0;
- for(n=(nlib?nlib:dlete); --n>=0;)
- {
- /* (char*) added for some sgi-mips compilers */
+ if(dlete || liblist)
+ for(n=(nlib?nlib:dlete); --n>=0;)
+ {
#if SHOPT_DYNAMIC
- if(dlete || (addr = (Fptr_t)dlllook(liblist[n],stkptr(stkp,flag))))
+ if(!dlete && !liblist[n].dll)
+ continue;
+ if(dlete || (addr = (Shbltin_f)dlllook(liblist[n].dll,stkptr(stkp,flag))))
#else
- if(dlete)
+ if(dlete)
#endif /* SHOPT_DYNAMIC */
- {
- if(np = sh_addbuiltin(arg, addr,pointerof(dlete)))
{
- if(dlete || nv_isattr(np,BLT_SPC))
- errmsg = "restricted name";
- else
- nv_onattr(np,libattr[n]);
+ if(np = sh_addbuiltin(arg, addr,pointerof(dlete)))
+ {
+ if(dlete || nv_isattr(np,BLT_SPC))
+ errmsg = "restricted name";
+#if SHOPT_DYNAMIC
+ else
+ nv_onattr(np,liblist[n].attr);
+#endif /* SHOPT_DYNAMIC */
+ }
+ break;
}
- break;
}
- }
- if(!dlete && !addr)
+ if(!addr && (np = nv_search(arg,context->shp->bltin_tree,0)))
{
- np = sh_addbuiltin(arg, 0 ,0);
- if(np && nv_isattr(np,BLT_SPC))
+ if(nv_isattr(np,BLT_SPC))
errmsg = "restricted name";
- else if(!np)
- errmsg = "not found";
+ addr = (Shbltin_f)np->nvalue.bfp;
}
+ if(!dlete && !addr && !(np=sh_addbuiltin(arg,(Shbltin_f)0 ,0)))
+ errmsg = "not found";
if(errmsg)
{
errormsg(SH_DICT,ERROR_exit(0),"%s: %s",*argv,errmsg);
@@ -895,11 +1107,12 @@ int b_builtin(int argc,char *argv[],void *extra)
return(r);
}
-int b_set(int argc,register char *argv[],void *extra)
+int b_set(int argc,register char *argv[],Shbltin_t *context)
{
struct tdata tdata;
+ int was_monitor = sh_isoption(SH_MONITOR);
memset(&tdata,0,sizeof(tdata));
- tdata.sh = ((Shbltin_t*)extra)->shp;
+ tdata.sh = context->shp;
tdata.prefix=0;
if(argv[1])
{
@@ -909,9 +1122,9 @@ int b_set(int argc,register char *argv[],void *extra)
sh_onstate(SH_VERBOSE);
else
sh_offstate(SH_VERBOSE);
- if(sh_isoption(SH_MONITOR))
+ if(sh_isoption(SH_MONITOR) && !was_monitor)
sh_onstate(SH_MONITOR);
- else
+ else if(!sh_isoption(SH_MONITOR) && was_monitor)
sh_offstate(SH_MONITOR);
}
else
@@ -927,23 +1140,23 @@ int b_set(int argc,register char *argv[],void *extra)
* Non-existent items being deleted give non-zero exit status
*/
-int b_unalias(int argc,register char *argv[],void *extra)
+int b_unalias(int argc,register char *argv[],Shbltin_t *context)
{
- Shell_t *shp = ((Shbltin_t*)extra)->shp;
- return(b_unall(argc,argv,shp->alias_tree,shp));
+ Shell_t *shp = context->shp;
+ return(unall(argc,argv,shp->alias_tree,shp));
}
-int b_unset(int argc,register char *argv[],void *extra)
+int b_unset(int argc,register char *argv[],Shbltin_t *context)
{
- Shell_t *shp = ((Shbltin_t*)extra)->shp;
- return(b_unall(argc,argv,shp->var_tree,shp));
+ Shell_t *shp = context->shp;
+ return(unall(argc,argv,shp->var_tree,shp));
}
-static int b_unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp)
+static int unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp)
{
register Namval_t *np;
register const char *name;
- register int r;
+ volatile int r;
Dt_t *dp;
int nflag=0,all=0,isfun,jmpval;
struct checkpt buff;
@@ -992,13 +1205,20 @@ static int b_unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp)
dtclear(troot);
return(r);
}
- sh_pushcontext(&buff,1);
+ sh_pushcontext(shp,&buff,1);
while(name = *argv++)
{
jmpval = sigsetjmp(buff.buff,0);
np = 0;
if(jmpval==0)
+ {
+#if SHOPT_NAMESPACE
+ if(shp->namespace && troot!=shp->var_tree)
+ np = sh_fsearch(shp,name,nflag?HASH_NOSCOPE:0);
+ if(!np)
+#endif /* SHOPT_NAMESPACE */
np=nv_open(name,troot,NV_NOADD|nflag);
+ }
else
{
r = 1;
@@ -1016,7 +1236,12 @@ static int b_unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp)
isfun = is_afunction(np);
if(troot==shp->var_tree)
{
+ Namarr_t *ap;
+#if SHOPT_FIXEDARRAY
+ if((ap=nv_arrayptr(np)) && !ap->fixed && name[strlen(name)-1]==']' && !nv_getsub(np))
+#else
if(nv_isarray(np) && name[strlen(name)-1]==']' && !nv_getsub(np))
+#endif /* SHOPT_FIXEDARRAY */
{
r=1;
continue;
@@ -1025,16 +1250,25 @@ static int b_unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp)
if(shp->subshell)
np=sh_assignok(np,0);
}
- if(!nv_isnull(np))
- nv_unset(np);
- nv_close(np);
+ if(!nv_isnull(np) || nv_size(np) || nv_isattr(np,~(NV_MINIMAL|NV_NOFREE)))
+ _nv_unset(np,0);
if(troot==shp->var_tree && shp->st.real_fun && (dp=shp->var_tree->walk) && dp==shp->st.real_fun->sdict)
nv_delete(np,dp,NV_NOFREE);
- else if(isfun)
- nv_delete(np,troot,NV_NOFREE);
+ else if(isfun && !(np->nvalue.rp && np->nvalue.rp->running))
+ nv_delete(np,troot,0);
+#if 0
+ /* causes unsetting local variable to expose global */
+ else if(shp->var_tree==troot && shp->var_tree!=shp->var_base && nv_search((char*)np,shp->var_tree,HASH_BUCKET|HASH_NOSCOPE))
+ nv_delete(np,shp->var_tree,0);
+#endif
+ else
+ nv_close(np);
+
}
+ else if(troot==shp->alias_tree)
+ r = 1;
}
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
return(r);
}
@@ -1045,31 +1279,54 @@ static int b_unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp)
static int print_namval(Sfio_t *file,register Namval_t *np,register int flag, struct tdata *tp)
{
register char *cp;
- sh_sigcheck();
+ int indent=tp->indent, outname=0, isfun;
+ sh_sigcheck(tp->sh);
if(flag)
flag = '\n';
+ if(tp->noref && nv_isref(np))
+ return(0);
if(nv_isattr(np,NV_NOPRINT|NV_INTEGER)==NV_NOPRINT)
{
- if(is_abuiltin(np))
+ if(is_abuiltin(np) && strcmp(np->nvname,".sh.tilde"))
sfputr(file,nv_name(np),'\n');
return(0);
}
+ if(nv_istable(np))
+ {
+ print_value(file,np,tp);
+ return(0);
+ }
+ isfun = is_afunction(np);
if(tp->prefix)
{
- if(*tp->prefix=='t')
+ outname = (*tp->prefix=='t' && (!nv_isnull(np) || nv_isattr(np,NV_FLOAT|NV_RDONLY|NV_BINARY|NV_RJUST|NV_NOPRINT)));
+ if(indent && (isfun || outname || *tp->prefix!='t'))
+ {
+ sfnputc(file,'\t',indent);
+ indent = 0;
+ }
+ if(!isfun)
+ {
+ if(*tp->prefix=='t')
nv_attribute(np,tp->outfile,tp->prefix,tp->aflag);
- else
- sfputr(file,tp->prefix,' ');
+ else
+ sfputr(file,tp->prefix,' ');
+ }
}
- if(is_afunction(np))
+ if(isfun)
{
Sfio_t *iop=0;
char *fname=0;
+ if(nv_isattr(np,NV_NOFREE))
+ return(0);
if(!flag && !np->nvalue.ip)
sfputr(file,"typeset -fu",' ');
else if(!flag && !nv_isattr(np,NV_FPOSIX))
sfputr(file,"function",' ');
- sfputr(file,nv_name(np),-1);
+ cp = nv_name(np);
+ if(tp->wctname)
+ cp += strlen(tp->wctname)+1;
+ sfputr(file,cp,-1);
if(nv_isattr(np,NV_FPOSIX))
sfwrite(file,"()",2);
if(np->nvalue.ip && np->nvalue.rp->hoffset>=0)
@@ -1092,8 +1349,8 @@ static int print_namval(Sfio_t *file,register Namval_t *np,register int flag, st
}
else if(fname)
iop = sfopen(iop,fname,"r");
- else if(tp->sh->hist_ptr)
- iop = (tp->sh->hist_ptr)->histfp;
+ else if(tp->sh->gd->hist_ptr)
+ iop = (tp->sh->gd->hist_ptr)->histfp;
if(iop && sfseek(iop,(Sfoff_t)np->nvalue.rp->hoffset,SEEK_SET)>=0)
sfmove(iop,file, nv_size(np), -1);
else
@@ -1105,6 +1362,8 @@ static int print_namval(Sfio_t *file,register Namval_t *np,register int flag, st
}
if(nv_arrayptr(np))
{
+ if(indent)
+ sfnputc(file,'\t',indent);
print_value(file,np,tp);
return(0);
}
@@ -1112,6 +1371,8 @@ static int print_namval(Sfio_t *file,register Namval_t *np,register int flag, st
nv_onattr(np,NV_EXPORT);
if(cp=nv_getval(np))
{
+ if(indent)
+ sfnputc(file,'\t',indent);
sfputr(file,nv_name(np),-1);
if(!flag)
flag = '=';
@@ -1132,7 +1393,7 @@ static int print_namval(Sfio_t *file,register Namval_t *np,register int flag, st
}
return(1);
}
- else if(tp->scanmask && tp->scanroot==tp->sh->var_tree)
+ else if(outname || (tp->scanmask && tp->scanroot==tp->sh->var_tree))
sfputr(file,nv_name(np),'\n');
return(0);
}
@@ -1166,6 +1427,8 @@ static void print_scan(Sfio_t *file, int flag, Dt_t *root, int option,struct tda
register Namval_t *np;
register int namec;
Namval_t *onp = 0;
+ char *name=0;
+ int len;
tp->sh->last_table=0;
flag &= ~NV_ASSIGN;
tp->scanmask = flag&~NV_NOSCOPE;
@@ -1177,16 +1440,30 @@ static void print_scan(Sfio_t *file, int flag, Dt_t *root, int option,struct tda
#endif /* SHOPT_TYPEDEF */
if(flag&NV_INTEGER)
tp->scanmask |= (NV_DOUBLE|NV_EXPNOTE);
+ if(flag==NV_LTOU || flag==NV_UTOL)
+ tp->scanmask |= NV_UTOL|NV_LTOU;
namec = nv_scan(root,nullscan,(void*)tp,tp->scanmask,flag);
argv = tp->argnam = (char**)stkalloc(tp->sh->stk,(namec+1)*sizeof(char*));
namec = nv_scan(root, pushname, (void*)tp, tp->scanmask, flag&~NV_IARRAY);
if(mbcoll())
strsort(argv,namec,strcoll);
- while(namec--)
+ if(namec==0 && tp->sh->namespace && nv_dict(tp->sh->namespace)==root)
+ {
+ sfnputc(file,'\t',tp->indent);
+ sfwrite(file,":\n",2);
+ }
+ else while(namec--)
{
if((np=nv_search(*argv++,root,0)) && np!=onp && (!nv_isnull(np) || np->nvfun || nv_isattr(np,~NV_NOFREE)))
{
onp = np;
+ if(name)
+ {
+ char *newname = nv_name(np);
+ if(memcmp(name,newname,len)==0 && newname[len]== '.')
+ continue;
+ name = 0;
+ }
if(flag&NV_ARRAY)
{
if(nv_aindex(np)>=0)
@@ -1198,7 +1475,14 @@ static void print_scan(Sfio_t *file, int flag, Dt_t *root, int option,struct tda
continue;
}
+ tp->scanmask = flag&~NV_NOSCOPE;
+ tp->scanroot = root;
print_namval(file,np,option,tp);
+ if(!is_abuiltin(np) && nv_isvtree(np))
+ {
+ name = nv_name(np);
+ len = strlen(name);
+ }
}
}
}
diff --git a/usr/src/lib/libshell/common/bltins/ulimit.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/ulimit.c
index 77ce771195..c537a8100f 100644
--- a/usr/src/lib/libshell/common/bltins/ulimit.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/ulimit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -38,11 +38,11 @@
#endif
#ifdef _no_ulimit
- int b_ulimit(int argc,char *argv[],void *extra)
+ int b_ulimit(int argc,char *argv[],Shbltin_t *context)
{
NOT_USED(argc);
NOT_USED(argv);
- NOT_USED(extra);
+ NOT_USED(context);
errormsg(SH_DICT,ERROR_exit(2),e_nosupport);
return(0);
}
@@ -65,12 +65,12 @@ static int infof(Opt_t* op, Sfio_t* sp, const char* s, Optdisc_t* dp)
#define HARD 2
#define SOFT 4
-int b_ulimit(int argc,char *argv[],void *extra)
+int b_ulimit(int argc,char *argv[],Shbltin_t *context)
{
register char *limit;
register int mode=0, n;
register unsigned long hit = 0;
- Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ Shell_t *shp = context->shp;
#ifdef _lib_getrlimit
struct rlimit rlp;
#endif /* _lib_getrlimit */
@@ -139,9 +139,15 @@ int b_ulimit(int argc,char *argv[],void *extra)
else
{
char *last;
- if((i=sh_strnum(limit,&last,2))==INFINITY || *last)
- errormsg(SH_DICT,ERROR_system(1),e_number,limit);
- i *= unit;
+ /* an explicit suffix unit overrides the default */
+ if((i=strtol(limit,&last,0))!=INFINITY && !*last)
+ i *= unit;
+ else if((i=strton(limit,&last,NiL,0))==INFINITY || *last)
+ {
+ if((i=sh_strnum(limit,&last,2))==INFINITY || *last)
+ errormsg(SH_DICT,ERROR_system(1),e_number,limit);
+ i *= unit;
+ }
}
if(nosupport)
errormsg(SH_DICT,ERROR_system(1),e_readonly,tp->name);
diff --git a/usr/src/lib/libshell/common/bltins/umask.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/umask.c
index 0067c89dbe..19978ac6b4 100644
--- a/usr/src/lib/libshell/common/bltins/umask.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/umask.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -38,11 +38,11 @@
# define SH_DICT "libshell"
#endif
-int b_umask(int argc,char *argv[],void *extra)
+int b_umask(int argc,char *argv[],Shbltin_t *context)
{
register char *mask;
register int flag = 0, sflag = 0;
- NOT_USED(extra);
+ NOT_USED(context);
while((argc = optget(argv,sh_optumask))) switch(argc)
{
case 'S':
diff --git a/usr/src/lib/libshell/common/bltins/whence.c b/usr/src/contrib/ast/src/cmd/ksh93/bltins/whence.c
index 580753607a..7843ca762e 100644
--- a/usr/src/lib/libshell/common/bltins/whence.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/bltins/whence.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -49,10 +49,10 @@ static int whence(Shell_t *,char**, int);
* In this case return 0 when -v or -V or unknown option, otherwise
* the shift count to the command is returned
*/
-int b_command(register int argc,char *argv[],void *extra)
+int b_command(register int argc,char *argv[],Shbltin_t *context)
{
register int n, flags=0;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
opt_info.index = opt_info.offset = 0;
while((n = optget(argv,sh_optcommand))) switch(n)
{
@@ -92,10 +92,10 @@ int b_command(register int argc,char *argv[],void *extra)
/*
* for the whence command
*/
-int b_whence(int argc,char *argv[],void *extra)
+int b_whence(int argc,char *argv[],Shbltin_t *context)
{
register int flags=0, n;
- register Shell_t *shp = ((Shbltin_t*)extra)->shp;
+ register Shell_t *shp = context->shp;
NOT_USED(argc);
if(*argv[0]=='t')
flags = V_FLAG;
@@ -220,8 +220,12 @@ static int whence(Shell_t *shp,char **argv, register int flags)
}
do
{
- if(path_search(name,&pp,2+(aflag>1)))
+ if(path_search(shp,name,&pp,2+(aflag>1)))
+ {
cp = name;
+ if((flags&P_FLAG) && *cp!='/')
+ cp = 0;
+ }
else
{
cp = stakptr(PATH_OFFSET);
@@ -229,12 +233,15 @@ static int whence(Shell_t *shp,char **argv, register int flags)
cp = 0;
else if(*cp!='/')
{
- cp = path_fullname(cp);
+ cp = path_fullname(shp,cp);
tofree=1;
}
}
if(flags&Q_FLAG)
+ {
+ pp = 0;
r |= !cp;
+ }
else if(cp)
{
if(flags&V_FLAG)
@@ -242,7 +249,7 @@ static int whence(Shell_t *shp,char **argv, register int flags)
if(*cp!= '/')
{
if(!np && (np=nv_search(name,shp->track_tree,0)))
- sfprintf(sfstdout,"%s %s %s/%s\n",name,sh_translate(is_talias),path_pwd(0),cp);
+ sfprintf(sfstdout,"%s %s %s/%s\n",name,sh_translate(is_talias),path_pwd(shp,0),cp);
else if(!np || nv_isnull(np))
sfprintf(sfstdout,"%s%s\n",name,sh_translate(is_ufunction));
continue;
@@ -269,7 +276,10 @@ static int whence(Shell_t *shp,char **argv, register int flags)
else
pp = 0;
if(tofree)
+ {
free((char*)cp);
+ tofree = 0;
+ }
}
else if(aflag<=1)
{
diff --git a/usr/src/lib/libshell/common/builtins.mm b/usr/src/contrib/ast/src/cmd/ksh93/builtins.mm
index 5713c48eab..0a4ef7cdb5 100644
--- a/usr/src/lib/libshell/common/builtins.mm
+++ b/usr/src/contrib/ast/src/cmd/ksh93/builtins.mm
@@ -1,4 +1,5 @@
-.ds DT July 9, 1993 \" use troff -mm
+.fp 5 CW
+.ds DT January 9, 2012 \" use troff -mm
.nr C 3
.nr N 2
.SA 1 \" right justified
@@ -14,15 +15,13 @@ is the ability to add built-in commands at run time.
This feature only works on operating systems that have the ability
to load and link code into the current process at run time.
Some examples of the systems that have this feature
-are System V Release 4, Solaris, Sun OS, HP-UX Release 8 and above,
+are Linux, System V Release 4, Solaris, Sun OS, HP-UX Release 8 and above,
AIX 3.2 and above, and Microsoft Windows systems.
.P
This memo describes how to write and compile programs
-to can be loaded into \f5ksh\fP at run time as built-in
+that can be loaded into \f5ksh\fP at run time as built-in
commands.
.AE \" abstract end
-.OK Shell "Command interpreter" Language UNIX \" keyword
-.MT 1 \" memo type
.H 1 INTRODUCTION
A built-in command is executed without creating a separate process.
Instead, the command is invoked as a C function by \f5ksh\fP.
@@ -31,18 +30,17 @@ then the behavior of this built-in is identical to that of
the equivalent stand-alone command. The primary difference
in this case is performance. The overhead of process creation
is eliminated. For commands of short duration, the effect
-can be dramatic. For example, on SUN OS 4.1, the time do
+can be dramatic. For example, on SUN OS 4.1, the time to
run \f5wc\fP on a small file of about 1000 bytes, runs
about 50 times faster as a built-in command.
.P
-In addition, built-in commands that have side effects on the
-shell environment can be written.
+In addition, built-in commands may have side effects on the
+shell environment.
This is usually done to extend the application domain for
-shell programming. For example, an X-windows extension
-that makes heavy use of the shell variable namespace
-was added as a group of built-ins commands that
-are added at run time.
-The result is a windowing shell that can be used to write
+shell programming. For example, there is a group of X-windows extension
+built-ins that make heavy use of the shell variable namespace.
+These built-ins are added at run time and
+result in a windowing shell that can be used to write
X-windows applications.
.P
While there are definite advantages to adding built-in
@@ -56,15 +54,16 @@ a part of a larger entity.
The isolation provided by a separate process
guarantees that all resources used by the command
will be freed when the command completes.
-Also, since the address space of \f5ksh\fP will be larger,
-this may increase the time it takes \f5ksh\fP to fork() and
-exec() a non-builtin command.
+Resources used by a built-in must be meticulously maintained and freed.
+Also, since the address space of \f5ksh\fP will be larger when built-in are loaded,
+it may increase the time it takes \f5ksh\fP to fork() and
+exec() non-built-in commands.
It makes no sense to add a built-in command that takes
a long time to run or that is run only once, since the performance
benefits will be negligible.
Built-ins that have side effects in the current shell
environment have the disadvantage of increasing the
-coupling between the built-in and \f5ksh\fP making
+coupling between the built-in and \f5ksh\fP, making
the overall system less modular and more monolithic.
.P
Despite these drawbacks, in many cases extending
@@ -74,65 +73,89 @@ scripting ability in an application specific domain.
This memo describes how to write \f5ksh\fP extensions.
.H 1 "WRITING BUILT-IN COMMANDS"
There is a development kit available for writing \f5ksh\fP
-built-ins. The development kit has three directories,
+built-ins as part of the AST (AT&T Software Technology) Toolkit.
+The development kit has three directories,
\f5include\fP, \f5lib\fP, and \f5bin\fP.
+It is best to set the value of the environment variable
+\f5PACKAGE_ast\fP to the pathname of the directory
+containing the development kit.
The \f5include\fP directory contains a sub-directory
named \f5ast\fP that contains interface prototypes
for functions that you can call from built-ins. The \f5lib\fP
-directory contains the \fBast\fP library\*F
-.FS
-\fBast\fP stands for Advanced Software Technology
-.FE
-and a library named \fBlibcmd\fP that contains a version
+directory contains the \f5ast\fP library
+and a library named \f5cmd\fP that contains a version
of several of the standard POSIX\*(Rf
.RS
.I "POSIX \- Part 2: Shell and Utilities,"
IEEE Std 1003.2-1992, ISO/IEC 9945-2:1993.
.RF
utilities that can be made run time built-ins.
-It is best to set the value of the environment variable
-\fB\s-1PACKAGE_\s+1ast\fP to the pathname of the directory
-containing the development kit.
-Users of \f5nmake\fP\*(Rf
+The \f5lib/ksh\fP directory contains shared libraries
+that implement other \f5ksh\fP built-ins.
+The \f5bin\fP directory contains build tools such as \f5nmake\fP\*(Rf.
.RS
Glenn Fowler,
-Nmake reference needed
+.IR "A Case for make" ,
+Software - Practice and Experience, Vol. 20 No. S1, pp. 30-46, June 1990.
.RF
-2.3 and above will then be able to
-use the rule
-.nf
-.in .5i
-\f5:PACKAGE: ast\fP
-.in
-.fi
-in their makefiles and not have to specify any \f5-I\fP switches
-to the compiler.
+To add built-ins at runtime, it is necessary to build a shared library
+containing one or more built-ins that you wish to add.
+The built-ins are then added by running \f5builtin \-f\fP \fIshared_lib\fP.
+Since the procedure for building share libraries is system dependent,
+it is best to use
+\f5nmake\fP
+using the sample nmake makefile below as a prototype.
+The AST Toolkit also contains some examples of built-in libraries under
+the \f5src/cmd/kshlib\fP directory.
.P
+There are two ways to code adding built-ins. One method is to replace
+the function \f5main\fP with a function
+\f5b_\fP\fIname\fP, where \fIname\fP is the name
+of the built-in you wish to define.
A built-in command has a calling convention similar to
the \f5main\fP function of a program,
-.nf
-.in .5i
\f5int main(int argc, char *argv[])\fP.
-.in
-.fi
-However, instead of \f5main\fP, you must use the function name
-\f5b_\fP\fIname\fP, where \fIname\fP is the name
-of the built-in you wish to define.
-The built-in function takes a third
-\f5void*\fP argument which you can define as \f5NULL\fP.
+except that it takes a third argument of type \f5Shbltin_t*\fP which can
+be passed as \f5\s-1NULL\s+1\fP if it is not used. The definition for
+\f5Shbltin_t*\fP is in \f5<ast/shcmd.h>\fP.
Instead of \f5exit\fP, you need to use \f5return\fP
to terminate your command.
-The return value, will become the exit status of the command.
+The return value will become the exit status of the command.
+The \f5open\fP built-in, installed in \f5lib/ksh\fP in the AST Toolkit, uses this method.
+The \f5Shbltin_t\fP structure contains a field named \f5shp\fP which is
+a pointer the the shell data that is needed for \f5shell\fP library callbacks.
+It also contains the fields, \f5shrun\fP, \f5shtrap\fP, \f5shexit\fP,
+and \f5shbltin\fP
+that are function pointers to the \f5shell\fP library functions \f5sh_run\fP, \f5sh_trap\fP
+\f5sh_exit\fP, and \f5sh_addbuiltin\fP, respectively. These functions
+can be invoked without the need for runtime symbol lookup when the
+shell is statically linked with \f5libshell\fP.
+.P
+The alternative method is to create a function \f5lib_init\fP and
+use the \f5Shbltin_t.shbltin()\fP function to add one or more built-ins.
+The \f5lib_init\fP function will be called with two arguments. The
+first argument will be 0 when the library is loaded and the second
+argument will be of type \f5Shbltin_t*\fP.
+The \f5dbm_t\fP and \f5dss\fP shell built-ins use this method.
+.P
+No matter which way you add built-ins you should add the line
+\f5SHLIB(\fP\fIidentifier\fP\f5)\fP as the last line of one
+of the built-in source file, where \fIidentifier\fP is any C identifier.
+This line provides version information to the shell \f5builtin\fP command
+that it uses to verify compatibility between the built-in and \f5ksh\fP
+implementation versions. \f5builtin\fP fails with a diagnostic on version
+mismatch. The diagnostic helps determine whether \f5ksh\fP is out of
+date and requires an upgrade or the built-in is out of date and requires
+recompilation.
.P
The steps necessary to create and add a run time built-in are
illustrated in the following simple example.
-Suppose, you wish to add a built-in command named \f5hello\fP
+Suppose you wish to add a built-in command named \f5hello\fP
which requires one argument and prints the word hello followed
by its argument. First, write the following program in the file
\f5hello.c\fP:
-.nf
-.in .5i
-\f5#include <stdio.h>
+.EX
+#include <stdio.h>
int b_hello(int argc, char *argv[], void *context)
{
if(argc != 2)
@@ -142,51 +165,56 @@ int b_hello(int argc, char *argv[], void *context)
}
printf("hello %s\en",argv[1]);
return(0);
-}\fP
-.in
-.fi
+}
+SHLIB(hello)
+.EE
.P
Next, the program needs to be compiled.
-On some systems it is necessary to specify a compiler
-option to produce position independent code
-for dynamic linking.
-If you do not compile with \f5nmake\fP
-it is important to specify the a special include directory
-when compiling built-ins.
-.nf
-.in .5i
-\f5cc -pic -I$PACKAGE_ast/include -c hello.c\fP
-.in
-.fi
-since the special version of \f5<stdio.h>\fP
-in the development kit is required.
-This command generates \f5hello.o\fP in the current
-directory.
-.P
-On some systems, you cannot load \f5hello.o\fP directly,
-you must build a shared library instead.
-Unfortunately, the method for generating a shared library
-differs with operating system.
-However, if you are building with the AT\&T \f5nmake\fP
-program you can use the \f5:LIBRARY:\fP rule to specify
-this in a system independent fashion.
-In addition, if you have several built-ins, it is desirable
+If you are building with AT&T \f5nmake\fP use the following \f5Makefile\fP:
+.EX
+:PACKAGE: --shared ast
+hello plugin=ksh :LIBRARY: hello.c
+.EE
+and run \f5nmake install\fP to compile, link, and install the built-in shared library
+in \f5lib/ksh/\fP under \f5PACKAGE_ast\fP.
+If the built-in extension uses several \f5.c\fP files, list all of these on
+the \f5:LIBRARY:\fP line.
+.P
+Otherwise you will have to compile \f5hello.c\fP with an option
+to pick up the AST include directory
+(since the AST \f5<stdio.h>\fP is required for \f5ksh\fP compatibility)
+and options required for generating shared libraries.
+For example, on Linux use this to compile:
+.EX
+cc -fpic -I$PACKAGE_ast/include/ast -c hello.c
+.EE
+and use the appropriate link line.
+It really is best to use \f5nmake\fP because the 2 line Makefile above
+will work on all systems that have \f5ksh\fP installed.
+.P
+If you have several built-ins, it is desirable
to build a shared library that contains them all.
.P
The final step is using the built-in.
This can be done with the \f5ksh\fP command \f5builtin\fP.
-To load the shared library \f5hello.so\fP and to add
-the built-in \f5hello\fP, invoke the command,
-.nf
-.in .5i
-\f5builtin -f hello hello\fP
-.in
-.fi
-The suffix for the shared library can be omitted in
-which case the shell will add an appropriate suffix
+To load the shared library \f5libhello.so\fP from the current directory
+and add the built-in \f5hello\fP, invoke the command,
+.EX
+builtin -f ./libhello.so hello
+.EE
+The shared library prefix (\f5lib\fP here) and suffix (\f5.so\fP here) be omitted;
+the shell will add an appropriate suffix
for the system that it is loading from.
+If you install the shared library in \f5lib/ksh/\fP, where \f5../lib/ksh/\fP is
+a directory on \fB$PATH\fP, the command
+.EX
+builtin -f hello hello
+.EE
+will automatically find, load and install the built-in on any system.
Once this command has been invoked, you can invoke \f5hello\fP
as you do any other command.
+If you are using \f5lib_init\fP method to add built-ins then no arguments
+follow the \f5\-f\fP option.
.P
It is often desirable to make a command \fIbuilt-in\fP
the first time that it is referenced. The first
@@ -194,26 +222,23 @@ time \f5hello\fP is invoked, \f5ksh\fP should load and execute it,
whereas for subsequent invocations \f5ksh\fP should just execute the built-in.
This can be done by creating a file named \f5hello\fP
with the following contents:
-.nf
-.in .5i
-\f5function hello
+.EX
+function hello
{
unset -f hello
builtin -f hello hello
hello "$@"
-}\fP
-.in
-.fi
+}
+.EE
This file \f5hello\fP needs to be placed in a directory that is
-in your \fB\s-1FPATH\s+1\fP variable. In addition, the full
-pathname for \f5hello.so\fP should be used in this script
-so that the run time loader will be able to find this shared library
-no matter where the command \f5hello\fP is invoked.
+in your \fB\s-1FPATH\s+1\fP variable, and the built-in shared library
+should be installed in \f5lib/ksh/\fP, as described above.
.H 1 "CODING REQUIREMENTS AND CONVENTIONS"
-As mentioned above, the entry point for built-ins must be of
-the form \f5b_\fP\fIname\fP.
+As mentioned above, the entry point for built-ins must either be of
+the form \f5b_\fP\fIname\fP or else be loaded from a function named
+\f5lib_init\fP.
Your built-ins can call functions from the standard C library,
-the \fBast\fP library, interface functions provided by \f5ksh\fP,
+the \f5ast\fP library, interface functions provided by \f5ksh\fP,
and your own functions.
You should avoid using any global symbols beginning with
.BR sh_ ,
@@ -221,9 +246,9 @@ You should avoid using any global symbols beginning with
and
.B ed_
since these are used by \f5ksh\fP itself.
-In addition, \f5#define\fP constants in \f5ksh\fP interface
-files, use symbols beginning with \fBSH_\fP to that you should
-avoid using names beginning with \fBSH_\fP.
+\f5#define\fP constants in \f5ksh\fP interface
+files use symbols beginning with \f5SH_\fP and \f5NV_\fP,
+so avoid using names beginning with these too.
.H 2 "Header Files"
The development kit provides a portable interface
to the C library and to libast.
@@ -294,19 +319,19 @@ I/O library defined in ANSI-C.
If none of the additional functionality is required,
and if you are not familiar with \fBsfio\fP and
you do not want to spend the time learning it,
-then you can use \fBsfio\fP via the \fBstdio\fP library
+then you can use \f5sfio\fP via the \f5stdio\fP library
interface. The development kit contains the header \f5<stdio.h>\fP
-which maps \fBstdio\fP calls to \fBsfio\fP calls.
+which maps \f5stdio\fP calls to \f5sfio\fP calls.
In most instances the mapping is done
by macros or inline functions so that there is no overhead.
-The man page for the \fBsfio\fP library is in an Appendix.
+The man page for the \f5sfio\fP library is in an Appendix.
.P
However, there are some very nice extensions and
-performance improvements in \fBsfio\fP
+performance improvements in \f5sfio\fP
and if you plan any major extensions I recommend
that you use it natively.
.H 2 "Error Handling"
-For error messages it is best to use the \fBast\fP library
+For error messages it is best to use the \f5ast\fP library
function \f5errormsg()\fP rather that sending output to
\f5stderr\fP or the equivalent \f5sfstderr\fP directly.
Using \f5errormsg()\fP will make error message appear
@@ -348,7 +373,7 @@ For consistency with the rest of \f5ksh\fP, it is best
to use the \f5libast\fP functions \f5optget()\fP and
\f5optusage()\fPfor this
purpose.
-The header \f5<error.h>\fP included prototypes for
+The header \f5<error.h>\fP includes prototypes for
these functions.
The \f5optget()\fP function is similar to the
System V C library function \f5getopt()\fP,
@@ -357,11 +382,9 @@ Built-ins that use \f5optget()\fP provide a more
consistent user interface.
.P
The \f5optget()\fP function is invoked as
-.nf
-.in .5i
-\f5int optget(char *argv[], const char *optstring)\fP
-.in
-.fi
+.EX
+int optget(char *\fIargv\fP[], const char *\fIoptstring\fP)
+.EE
where \f5argv\fP is the argument list and \f5optstring\fP
is a string that specifies the allowable arguments and
additional information that is used to format \fIusage\fP
@@ -417,9 +440,8 @@ the usage message.
.P
The following is an example of the option parsing portion
of the \f5wc\fP utility.
-.nf
-.in +5
-\f5#include <shell.h>
+.EX
+#include <shell.h>
while(1) switch(n=optget(argv,"xf:[file]"))
{
case 'f':
@@ -431,9 +453,8 @@ while(1) switch(n=optget(argv,"xf:[file]"))
case '?':
error(ERROR_usage(2), opt_info.arg);
break;
-}\fP
-.in
-.fi
+}
+.EE
.H 2 "Storage Management"
It is important that any memory used by your built-in
be returned. Otherwise, if your built-in is called frequently,
@@ -464,22 +485,20 @@ but you may want to write functions that use this stack
are restore it when leaving the function.
The following coding convention will do this in
an efficient manner:
-.nf
-.in .5i
-\fIyourfunction\fP\f5()
+.EX
+\fIyourfunction\fP()
{
char *savebase;
int saveoffset;
if(saveoffset=staktell())
savebase = stakfreeze(0);
- \fP...\f5
+ \fR...\fP
if(saveoffset)
stakset(savebase,saveoffset);
else
stakseek(0);
-}\fP
-.in
-.fi
+}
+.EE
.H 1 "CALLING \f5ksh\fP SERVICES"
Some of the more interesting applications are those that extend
the functionality of \f5ksh\fP in application specific directions.
@@ -589,15 +608,13 @@ will be passed as an argument to
each of these functions whenever any of these functions are called.
To have private data, you need to define and allocate a structure
that looks like
-.nf
-.in .5i
-\f5struct \fIyours\fP
+.EX
+struct \fIyours\fP
{
Namfun_t fun;
\fIyour_data_fields\fP;
-};\fP
-.in
-.fi
+};
+.EE
.H 2 "The shell library"
There are several functions that are used by \f5ksh\fP itself
that can also be called from built-in commands.
diff --git a/usr/src/lib/libshell/common/data/aliases.c b/usr/src/contrib/ast/src/cmd/ksh93/data/aliases.c
index e3a7430540..8f3dc8510e 100644
--- a/usr/src/lib/libshell/common/data/aliases.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/aliases.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -18,12 +18,10 @@
* *
***********************************************************************/
#pragma prototyped
-#include <ast.h>
+#include "defs.h"
#include <signal.h>
#include "FEATURE/options"
#include "FEATURE/dynamic"
-#include "shtable.h"
-#include "name.h"
/*
* This is the table of built-in aliases. These should be exported.
@@ -32,28 +30,28 @@
const struct shtable2 shtab_aliases[] =
{
#if SHOPT_FS_3D
- "2d", NV_NOFREE, "set -f;_2d",
+ "2d", NV_NOFREE, "set -f;_2d",
#endif /* SHOPT_FS_3D */
- "autoload", NV_NOFREE, "typeset -fu",
- "command", NV_NOFREE, "command ",
- "compound", NV_NOFREE, "typeset -C",
- "fc", NV_NOFREE, "hist",
- "float", NV_NOFREE, "typeset -lE",
- "functions", NV_NOFREE, "typeset -f",
- "hash", NV_NOFREE, "alias -t --",
- "history", NV_NOFREE, "hist -l",
- "integer", NV_NOFREE, "typeset -li",
- "nameref", NV_NOFREE, "typeset -n",
- "nohup", NV_NOFREE, "nohup ",
- "r", NV_NOFREE, "hist -s",
- "redirect", NV_NOFREE, "command exec",
- "source", NV_NOFREE, "command .",
+ "autoload", NV_NOFREE, "typeset -fu",
+ "command", NV_NOFREE, "command ",
+ "compound", NV_NOFREE|BLT_DCL, "typeset -C",
+ "fc", NV_NOFREE, "hist",
+ "float", NV_NOFREE|BLT_DCL, "typeset -lE",
+ "functions", NV_NOFREE, "typeset -f",
+ "hash", NV_NOFREE, "alias -t --",
+ "history", NV_NOFREE, "hist -l",
+ "integer", NV_NOFREE|BLT_DCL, "typeset -li",
+ "nameref", NV_NOFREE|BLT_DCL, "typeset -n",
+ "nohup", NV_NOFREE, "nohup ",
+ "r", NV_NOFREE, "hist -s",
+ "redirect", NV_NOFREE, "command exec",
+ "source", NV_NOFREE, "command .",
#ifdef SIGTSTP
- "stop", NV_NOFREE, "kill -s STOP",
- "suspend", NV_NOFREE, "kill -s STOP $$",
+ "stop", NV_NOFREE, "kill -s STOP",
+ "suspend", NV_NOFREE, "kill -s STOP $$",
#endif /*SIGTSTP */
- "times", NV_NOFREE, "{ { time;} 2>&1;}",
- "type", NV_NOFREE, "whence -v",
- "", 0, (char*)0
+ "times", NV_NOFREE, "{ { time;} 2>&1;}",
+ "type", NV_NOFREE, "whence -v",
+ "", 0, (char*)0
};
diff --git a/usr/src/lib/libshell/common/data/bash_pre_rc.sh b/usr/src/contrib/ast/src/cmd/ksh93/data/bash_pre_rc.sh
index e5a7bd3736..4f8a451ea9 100644
--- a/usr/src/lib/libshell/common/data/bash_pre_rc.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/bash_pre_rc.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
diff --git a/usr/src/lib/libshell/common/data/builtins.c b/usr/src/contrib/ast/src/cmd/ksh93/data/builtins.c
index bfd390187c..31dbf39e61 100644
--- a/usr/src/lib/libshell/common/data/builtins.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/builtins.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,10 +19,10 @@
***********************************************************************/
#pragma prototyped
-#include <shell.h>
-#include <signal.h>
+
#include "defs.h"
#include "shtable.h"
+#include <signal.h>
#include "ulimit.h"
#include "name.h"
#include "version.h"
@@ -37,9 +37,14 @@
# define bltin(x) 0
#endif
-#if defined(SHOPT_CMDLIB_DIR) && !defined(SHOPT_CMDLIB_HDR)
+#ifndef SHOPT_CMDLIB_DIR
+# define SHOPT_CMDLIB_DIR SH_CMDLIB_DIR
+#else
+# ifndef SHOPT_CMDLIB_HDR
# define SHOPT_CMDLIB_HDR <cmdlist.h>
+# endif
#endif
+
#define Q(f) #f /* libpp cpp workaround -- fixed 2005-04-11 */
#define CMDLIST(f) SH_CMDLIB_DIR "/" Q(f), NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f),
@@ -73,8 +78,8 @@ const struct shtable3 shtab_builtins[] =
#if _bin_newgrp || _usr_bin_newgrp
"newgrp", NV_BLTIN|BLT_ENV|BLT_SPC, Bltin(login),
#endif /* _bin_newgrp || _usr_bin_newgrp */
- "alias", NV_BLTIN|BLT_SPC|BLT_DCL, bltin(alias),
- "hash", NV_BLTIN|BLT_SPC|BLT_DCL, bltin(alias),
+ "alias", NV_BLTIN|BLT_SPC, bltin(alias),
+ "hash", NV_BLTIN|BLT_SPC, bltin(alias),
"enum", NV_BLTIN|BLT_ENV|BLT_SPC|BLT_DCL,bltin(enum),
"eval", NV_BLTIN|BLT_ENV|BLT_SPC|BLT_EXIT,bltin(eval),
"exit", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(return),
@@ -123,6 +128,7 @@ const struct shtable3 shtab_builtins[] =
"type", NV_BLTIN|BLT_ENV, bltin(whence),
"whence", NV_BLTIN|BLT_ENV, bltin(whence),
#ifdef SHOPT_CMDLIB_HDR
+#undef mktemp /* undo possible map-libc mktemp => _ast_mktemp */
#include SHOPT_CMDLIB_HDR
#else
CMDLIST(basename)
@@ -145,6 +151,30 @@ const struct shtable3 shtab_builtins[] =
"", 0, 0
};
+#if SHOPT_COSHELL
+# define _JOB_ "[+?Each \ajob\a can be specified as one of the following:]{" \
+ "[+\anumber\a?\anumber\a refers to a process id.]" \
+ "[+-\anumber\a?\anumber\a refers to a process group id.]" \
+ "[+\apool\a.\anum\a?refers to job \anum\a in background pool named \apool\a.]" \
+ "[+\apool\a?refers to all jobs in background pool named \apool\a.]" \
+ "[+%\anumber\a?\anumber\a refer to a job number.]" \
+ "[+%\astring\a?Refers to a job whose name begins with \astring\a.]" \
+ "[+%??\astring\a?Refers to a job whose name contains \astring\a.]" \
+ "[+%+ \bor\b %%?Refers to the current job.]" \
+ "[+%-?Refers to the previous job.]" \
+ "}"
+#else
+# define _JOB_ "[+?Each \ajob\a can be specified as one of the following:]{" \
+ "[+\anumber\a?\anumber\a refers to a process id.]" \
+ "[+-\anumber\a?\anumber\a refers to a process group id.]" \
+ "[+%\anumber\a?\anumber\a refer to a job number.]" \
+ "[+%\astring\a?Refers to a job whose name begins with \astring\a.]" \
+ "[+%??\astring\a?Refers to a job whose name contains \astring\a.]" \
+ "[+%+ \bor\b %%?Refers to the current job.]" \
+ "[+%-?Refers to the previous job.]" \
+ "}"
+#endif
+
const char sh_set[] =
"[a?Set the export attribute for each variable whose name does not "
@@ -175,6 +205,9 @@ const char sh_set[] =
"their current settings will be written to standard output. When "
"invoked with a \b+\b the options will be written in a format "
"that can be reinput to the shell to restore the settings. "
+ "Options \b-o\b \aname\a can also be specified with \b--\b\aname\a "
+ "and \b+o \aname\a can be specifed with \b--no\b\aname\a except that "
+ "options names beginning with \bno\b are turned on by omitting \bno\b."
"This option can be repeated to enable/disable multiple options. "
"The value of \aoption\a must be one of the following:]{"
"[+allexport?Equivalent to \b-a\b.]"
@@ -199,6 +232,8 @@ const char sh_set[] =
"[+ignoreeof?Prevents an interactive shell from exiting on "
"reading an end-of-file.]"
"[+keyword?Equivalent to \b-k\b.]"
+ "[+letoctal?The \blet\b builtin recognizes octal constants "
+ "with leading 0.]"
"[+markdirs?A trailing \b/\b is appended to directories "
"resulting from pathname expansion.]"
"[+monitor?Equivalent to \b-m\b.]"
@@ -226,6 +261,7 @@ const char sh_set[] =
"command to exit with non-zero exit status, or will "
"be zero if all commands return zero exit status.]"
"[+privileged?Equivalent to \b-p\b.]"
+ "[+rc?Do not run the \b.kshrc\b file for interactive shells.]"
"[+showme?Simple commands preceded by a \b;\b will be traced "
"as if \b-x\b were enabled but not executed.]"
"[+trackall?Equivalent to \b-h\b.]"
@@ -348,7 +384,7 @@ USAGE_LICENSE
;
const char sh_optbuiltin[] =
-"[-1c?\n@(#)$Id: builtin (AT&T Research) 1999-07-10 $\n]"
+"[-1c?\n@(#)$Id: builtin (AT&T Research) 2010-08-04 $\n]"
USAGE_LICENSE
"[+NAME?builtin - add, delete, or display shell built-ins]"
"[+DESCRIPTION?\bbuiltin\b can be used to add, delete, or display "
@@ -381,13 +417,16 @@ USAGE_LICENSE
"[d?Deletes each of the specified built-ins. Special built-ins cannot be "
"deleted.]"
"[f]:[lib?On systems with dynamic linking, \alib\a names a shared "
- "library to load and search for built-ins. Libraries are search for in "
- "\b$PATH\b and system dependent library directories. The system "
+ "library to load and search for built-ins. Libraries are searched for "
+ "in \b../lib/ksh\b and \b../lib\b on \b$PATH\b and in system dependent "
+ "library directories. The system "
"dependent shared library prefix and/or suffix may be omitted. Once a "
"library is loaded, its symbols become available for the current and "
"subsequent invocations of \bbuiltin\b. Multiple libraries can be "
"specified with separate invocations of \bbuiltin\b. Libraries are "
"searched in the reverse order in which they are specified.]"
+"[l?List the library base name, plugin YYYYMMDD version stamp, and full "
+ "path for \b-f\b\alib\a on one line on the standard output.]"
"[s?Display only the special built-ins.]"
"\n"
"\n[pathname ...]\n"
@@ -726,7 +765,14 @@ USAGE_LICENSE
"\b--\b\alongname\a=\avalue\a. If the : or # is followed by ? then the "
"option argument is optional. If only the option character form is "
"specified then the optional argument value is not set if the next "
- "argument starts with - or +.]"
+ "argument starts with - or +. The special attributes are currently "
+ "informational with respect to \boptget\b(3), but may be useful to "
+ "applications that parse \b--api\b output. The special attributes are:]{"
+ "[+listof?zero or more of the possible option values may be specified, "
+ "separated by \b,\b or space.]"
+ "[+oneof?exactly one of the possible option values must be specified]"
+ "[+ignorecase?case ignored in matching the long option name]"
+ "}"
"[+4.?A option value description.]"
"[+5.?A argument specification. A list of valid option argument values "
"can be specified by enclosing them inside a {...} following "
@@ -778,6 +824,9 @@ USAGE_LICENSE
"[+?When the end of options is encountered, \bgetopts\b exits with a "
"non-zero return value and the variable \bOPTIND\b is set to the "
"index of the first non-option argument.]"
+"[+?The obsolete long option forms \aflag\a(\along-name\a) and "
+ "\aflag\a:(\along-name\a) for options that take arguments is supported "
+ "for backwards compatibility.]"
"a:[name?Use \aname\a instead of the command name in usage messages.]"
"\n"
"\nopstring name [args...]\n"
@@ -797,15 +846,7 @@ USAGE_LICENSE
"and sends them a \bCONT\b signal to start them running.]"
"[+?If \ajob\a is omitted, the most recently started or stopped "
"background job is resumed or continued in the background.]"
-"[+?Each \ajob\a can be specified as one of the following:]{"
- "[+\anumber\a?\anumber\a refers to a process id.]"
- "[+-\anumber\a?\anumber\a refers to a process group id.]"
- "[+%\anumber\a?\anumber\a refer to a job number.]"
- "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
- "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
- "[+%+ \bor\b %%?Refers to the current job.]"
- "[+%-?Refers to the previous job.]"
-"}"
+_JOB_
"\n"
"\n[job ...]\n"
"\n"
@@ -826,15 +867,7 @@ USAGE_LICENSE
"in sequence and sends them a \bCONT\b signal to start each running.]"
"[+?If \ajob\a is omitted, the most recently started or stopped "
"background job is moved to the foreground.]"
-"[+?Each \ajob\a can be specified as one of the following:]{"
- "[+\anumber\a?\anumber\a refers to a process id.]"
- "[+-\anumber\a?\anumber\a refers to a process group id.]"
- "[+%\anumber\a?\anumber\a refer to a job number.]"
- "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
- "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
- "[+%+ \bor\b %%?Refers to the current job.]"
- "[+%-?Refers to the previous job.]"
-"}"
+_JOB_
"\n"
"\n[job ...]\n"
"\n"
@@ -856,15 +889,7 @@ USAGE_LICENSE
"the current shell terminates a login session.]"
"[+?If \ajob\a is omitted, the most recently started or stopped "
"background job is used.]"
-"[+?Each \ajob\a can be specified as one of the following:]{"
- "[+\anumber\a?\anumber\a refers to a process id.]"
- "[+-\anumber\a?\anumber\a refers to a process group id.]"
- "[+%\anumber\a?\anumber\a refer to a job number.]"
- "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
- "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
- "[+%+ \bor\b %%?Refers to the current job.]"
- "[+%-?Refers to the previous job.]"
-"}"
+_JOB_
"\n"
"\n[job ...]\n"
"\n"
@@ -890,15 +915,7 @@ USAGE_LICENSE
"[+?When \bjobs\b reports the termination status of a job, the "
"shell removes the jobs from the list of known jobs in "
"the current shell environment.]"
-"[+?Each \ajob\a can be specified as one of the following:]{"
- "[+\anumber\a?\anumber\a refers to a process id.]"
- "[+-\anumber\a?\anumber\a refers to a process group id.]"
- "[+%\anumber\a?\anumber\a refer to a job number.]"
- "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
- "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
- "[+%+ \bor\b %%?Refers to the current job.]"
- "[+%-?Refers to the previous job.]"
-"}"
+_JOB_
"[l?\bjobs\b displays process id's after the job number in addition "
"to the usual information]"
"[n?Only the jobs whose status has changed since the last prompt "
@@ -984,22 +1001,14 @@ USAGE_LICENSE
;
const char sh_optkill[] =
-"[-1c?\n@(#)$Id: kill (AT&T Research) 1999-06-17 $\n]"
+"[-1c?\n@(#)$Id: kill (AT&T Research) 2012-04-13 $\n]"
USAGE_LICENSE
"[+NAME?kill - terminate or signal process]"
"[+DESCRIPTION?With the first form in which \b-l\b is not specified, "
"\bkill\b sends a signal to one or more processes specified by "
"\ajob\a. This normally terminates the processes unless the signal "
"is being caught or ignored.]"
-"[+?A \ajob\a can be specified as one of the following:]{"
- "[+\anumber\a?\anumber\a refers to a process id.]"
- "[+-\anumber\a?\anumber\a refers to a process group id.]"
- "[+%\anumber\a?\anumber\a refer to a job number.]"
- "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
- "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
- "[+%+ \bor\b %%?Refers to the current job.]"
- "[+%-?Refers to the previous job.]"
-"}"
+_JOB_
"[+?If the signal is not specified with either the \b-n\b or the \b-s\b "
"option, the \bSIGTERM\b signal is used.]"
"[+?If \b-l\b is specified, and no \aarg\a is specified, then \bkill\b "
@@ -1012,6 +1021,8 @@ USAGE_LICENSE
"[l?List signal names or signal numbers rather than sending signals as "
"described above. "
"The \b-n\b and \b-s\b options cannot be specified.]"
+"[L?Same as \b-l\b except that of no argument is specified the signals will "
+ "be listed in menu format as with select compound command.]"
"[n]#[signum?Specify a signal number to send. Signal numbers are not "
"portable across platforms, except for the following:]{"
"[+0?No signal]"
@@ -1144,13 +1155,16 @@ USAGE_LICENSE
"[+%q?Output \astring\a quoted in a manner that it can be read in "
"by the shell to get back the same string. However, empty "
"strings resulting from missing \astring\a operands will "
- "not be quoted.]"
+ "not be quoted. When \bq\b is preceded by the alternative "
+ "format specifier, \b#\b, the string is quoted in manner "
+ " suitable as a field in a \b.csv\b format file.]"
"[+%B?Treat the argument as a variable name and output the value "
"without converting it to a string. This is most useful for "
"variables of type \b-b\b.]"
"[+%H?Output \astring\a with characters \b<\b, \b&\b, \b>\b, "
"\b\"\b, and non-printable characters properly escaped for "
- "use in HTML and XML documents.]"
+ "use in HTML and XML documents. The alternate flag \b#\b "
+ "formats the output for use as a URI.]"
"[+%P?Treat \astring\a as an extended regular expression and "
"convert it to a shell pattern.]"
"[+%R?Treat \astring\a as an shell pattern expression and "
@@ -1160,7 +1174,11 @@ USAGE_LICENSE
"\adformat\a is a date format as defined by the \bdate\b "
"command.]"
"[+%Z?Output a byte whose value is \b0\b.]"
+ "\fextra\f"
"}"
+"[+?The format modifier flag \bL\b can precede the width and/or precision "
+ "specifiers for the \bc\b and \bs\b to cause the width and/or "
+ "precision to be measured in character width rather than byte count.]"
"[+?When performing conversions of \astring\a to satisfy a numeric "
"format specifier, if the first character of \astring\a "
"is \b\"\b or \b'\b, then the value will be the numeric value "
@@ -1179,11 +1197,15 @@ USAGE_LICENSE
"the collating element \aname\a.]"
"[+-?The escape sequence \b\\x{\b\ahex\a\b}\b expands to the "
"character corresponding to the hexidecimal value \ahex\a.]"
+ "[+-?The escape sequence \b\\u{\b\ahex\a\b}\b expands to the unicode "
+ "character corresponding to the hexidecimal value \ahex\a.]"
"[+-?The format modifier flag \b=\b can be used to center a field to "
"a specified width.]"
"[+-?The format modifier flag \bL\b can be used with the \bc\b and "
"\bs\b formats to treat precision as character width instead "
"of byte count.]"
+ "[+-?The format modifier flag \b,\b can be used with \bd\b and \bf\b "
+ "formats to cause group of digits.]"
"[+-?Each of the integral format specifiers can have a third "
"modifier after width and precision that specifies the "
"base of the conversion from 2 to 64. In this case the "
@@ -1257,6 +1279,8 @@ USAGE_LICENSE
"[+?If you specify \b?\b\aprompt\a after the first \avar\a, then \bread\b "
"will display \aprompt\a on standard error when standard input "
"is a terminal or pipe.]"
+"[+?If an end of file is encountered while reading a line the data is "
+ "read and processed but \bread\b returns with a non-zero exit status.]"
"[A?Unset \avar\a and then create an indexed array containing each field in "
"the line starting at index 0.]"
"[C?Unset \avar\a and read \avar\a as a compound variable.]"
@@ -1266,13 +1290,14 @@ USAGE_LICENSE
"can be created.]"
"[r?Do not treat \b\\\b specially when processing the input line.]"
"[s?Save a copy of the input as an entry in the shell history file.]"
+"[S?Treat the input as if it was saved from a spreasheet in csv format.]"
"[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]#[nchar?Read at most \anchar\a characters. For binary fields \asize\a "
- "will be in bytes.]"
-"[N]#[nchar?Read exactly \anchar\a characters. For binary fields \asize\a "
- "will be in bytes.]"
+"[n]#[count?Read at most \acount\a characters. For binary fields \acount\a "
+ "is the number of bytes.]"
+"[N]#[count?Read exactly \ancount\a characters. For binary fields \acount\a "
+ "is the number of bytes.]"
"[v?When reading from a terminal the value of the first variable is displayed "
"and used as a default value.]"
"\n"
@@ -1340,7 +1365,7 @@ USAGE_LICENSE
const char sh_optksh[] =
-"+[-1c?\n@(#)$Id: sh (AT&T Research) "SH_RELEASE" $\n]"
+"+[-1?\n@(#)$Id: sh (AT&T Research) "SH_RELEASE" $\n]"
USAGE_LICENSE
"[+NAME?\b\f?\f\b - Shell, the standard command language interpreter]"
"[+DESCRIPTION?\b\f?\f\b is a command language interpreter that "
@@ -1576,7 +1601,7 @@ USAGE_LICENSE
;
const char sh_opttypeset[] =
-"+[-1c?\n@(#)$Id: typeset (AT&T Research) 2008-08-04 $\n]"
+"+[-1c?\n@(#)$Id: typeset (AT&T Research) 2010-12-08 $\n]"
USAGE_LICENSE
"[+NAME?\f?\f - declare or display variables with attributes]"
"[+DESCRIPTION?Without the \b-f\b option, \b\f?\f\b sets, unsets, "
@@ -1626,8 +1651,8 @@ USAGE_LICENSE
"[f?Each of the options and \aname\as refers to a function.]"
"[i]#?[base:=10?An integer. \abase\a represents the arithmetic base "
"from 2 to 64.]"
-"[l?Convert uppercase character to lowercase. Unsets \b-u\b attribute. When "
- "used with \b-i\b, \b-E\b, or \b-F\b indicates long variant.]"
+"[l?Without \b-i\b, sets character mapping to \btolower\b. When used "
+ "with \b-i\b, \b-E\b, or \b-F\b indicates long variant.]"
"[m?Move. The value is the name of a variable whose value will be "
"moved to \aname\a. The orignal variable will be unset. Cannot be "
"used with any other options.]"
@@ -1642,8 +1667,8 @@ USAGE_LICENSE
"[t?When used with \b-f\b, enables tracing for each of the specified "
"functions. Otherwise, \b-t\b is a user defined attribute and "
"has no meaning to the shell.]"
-"[u?Without \b-f\b or \b-i\b, converts lowercase character to uppercase "
- "and unsets \b-l\b. With \b-f\b specifies that \aname\a is a function "
+"[u?Without \b-f\b or \b-i\b, sets character mapping to \btoupper\b. When "
+ "used with \b-f\b specifies that \aname\a is a function "
"that hasn't been loaded yet. With \b-i\b specifies that the "
"value will be displayed as an unsigned integer.]"
"[x?Puts each \aname\a on the export list. See \bexport\b(1). \aname\a "
@@ -1666,6 +1691,10 @@ USAGE_LICENSE
"[L]#?[n?Left justify. If \an\a is given it represents the field width. If "
"the \b-Z\b attribute is also specified, then leading zeros are "
"stripped.]"
+"[M]:?[mapping?\amapping\a is the name of a character mapping known by "
+ "\bwctrans\b(3) such as \btolower\b or \btoupper\b. When the option "
+ "value \bmapping\b is omitted and there are no operands, all mapped "
+ "variables are displayed.]"
"[R]#?[n?Right justify. If \an\a is given it represents the field width. If "
"the \b-Z\b attribute is also specified, then zeros will "
"be used as the fill character. Otherwise, spaces are used.]"
@@ -1682,7 +1711,7 @@ USAGE_LICENSE
"will have function static scope. Otherwise, the variable is "
"unset prior to processing the assignment list.]"
#endif
-"[T]:[tname?\atname\a is the name of a type name given to each \aname\a.]"
+"[T]:?[tname?\atname\a is the name of a type name given to each \aname\a.]"
"[Z]#?[n?Zero fill. If \an\a is given it represents the field width.]"
"\n"
"\n[name[=value]...]\n"
@@ -1815,15 +1844,7 @@ USAGE_LICENSE
"known to the invoking shell have terminated. If one or more "
"\ajob\a operands are specified, \bwait\b waits until all of them "
"have completed.]"
-"[+?Each \ajob\a can be specified as one of the following:]{"
- "[+\anumber\a?\anumber\a refers to a process id.]"
- "[+-\anumber\a?\anumber\a refers to a process group id.]"
- "[+%\anumber\a?\anumber\a refer to a job number.]"
- "[+%\astring\a?Refers to a job whose name begins with \astring\a.]"
- "[+%??\astring\a?Refers to a job whose name contains \astring\a.]"
- "[+%+ \bor\b %%?Refers to the current job.]"
- "[+%-?Refers to the previous job.]"
-"}"
+_JOB_
"[+?If one ore more \ajob\a operands is a process id or process group id "
"not known by the current shell environment, \bwait\b treats each "
"of them as if it were a process that exited with status 127.]"
diff --git a/usr/src/lib/libshell/common/data/keywords.c b/usr/src/contrib/ast/src/cmd/ksh93/data/keywords.c
index 8520af64d0..fed2cf018d 100644
--- a/usr/src/lib/libshell/common/data/keywords.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/keywords.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -18,8 +18,7 @@
* *
***********************************************************************/
#pragma prototyped
-#include "shtable.h"
-#include <shell.h>
+#include "shell.h"
#include "shlex.h"
#include "FEATURE/options"
diff --git a/usr/src/lib/libshell/common/data/lexstates.c b/usr/src/contrib/ast/src/cmd/ksh93/data/lexstates.c
index 7da677c1b8..d4a3628130 100644
--- a/usr/src/lib/libshell/common/data/lexstates.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/lexstates.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -214,7 +214,7 @@ static const char sh_lexstate5[256] =
S_GRAVE,0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, S_BRACE,S_META, S_POP, 0, 0
+ 0, 0, 0, S_BRACE,S_META, S_POP, S_TILDE,0
};
/*
@@ -274,7 +274,7 @@ static const char sh_lexstate7[256] =
S_ERR, S_ERR, S_ERR, S_ERR, S_ERR, S_ERR, S_ERR, S_ERR,
S_ERR, S_ERR, S_ERR, S_ERR, S_ERR, S_ERR, S_ERR, S_ERR,
- S_ERR, S_ERR, S_ERR, S_MOD2, S_ERR, S_MOD2, S_ERR, S_ERR,
+ S_ERR, 0, S_ERR, S_MOD2, 0, S_MOD2, S_ERR, S_ERR,
S_ERR, S_ERR, S_MOD1, S_MOD1, S_ERR, S_MOD1, S_DOT, S_MOD2,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, S_MOD1, S_ERR, S_ERR, S_MOD1, S_ERR, S_MOD1,
@@ -391,6 +391,9 @@ 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";
+const char e_lexsyntax4[] = "syntax error at line %d: invalid reference list";
+const char e_lexsyntax5[] = "syntax error at line %d: `<<%s' here-document not contained within command substitution";
+const char e_lexwarnvar[] = "line %d: variable expansion makes arithmetic evaluation less efficient";
const char e_lexlabignore[] = "line %d: label %s ignored";
const char e_lexlabunknown[] = "line %d: %s unknown label";
const char e_lexobsolete1[] = "line %d: `...` obsolete, use $(...)";
@@ -411,3 +414,4 @@ const char e_lexlongquote[] = "line %d: %c quote may be missing";
const char e_lexzerobyte[] = "zero byte";
const char e_lexemptyfor[] = "line %d: empty for list";
const char e_lextypeset[] = "line %d: %s invalid typeset option order";
+const char e_lexcharclass[] = "line %d: '^' as first character in character class not portable";
diff --git a/usr/src/lib/libshell/common/data/limits.c b/usr/src/contrib/ast/src/cmd/ksh93/data/limits.c
index 3bea9cc9e5..bb9f9a1495 100644
--- a/usr/src/lib/libshell/common/data/limits.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/limits.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -30,7 +30,7 @@
#ifndef _no_ulimit
const char e_unlimited[] = "unlimited";
-const char* e_units[] = { 0, "block", "byte", "kbyte", "second" };
+const char* e_units[] = { 0, "block", "byte", "Kibyte", "second" };
const int shtab_units[] = { 1, 512, 1, 1024, 1 };
@@ -41,14 +41,19 @@ const Limit_t shtab_limits[] =
"cpu", "cpu time", RLIMIT_CPU, 0, 't', LIM_SECOND,
"data", "data size", RLIMIT_DATA, 0, 'd', LIM_KBYTE,
"fsize", "file size", RLIMIT_FSIZE, 0, 'f', LIM_BLOCK,
-"locks", "number of file locks", RLIMIT_LOCKS, 0, 'L', LIM_COUNT,
+"locks", "number of file locks", RLIMIT_LOCKS, 0, 'x', LIM_COUNT,
"memlock", "locked address space", RLIMIT_MEMLOCK, 0, 'l', LIM_KBYTE,
+"msgqueue", "message queue size", RLIMIT_MSGQUEUE,0, 'q', LIM_KBYTE,
+"nice", "scheduling priority", RLIMIT_NICE, 0, 'e', LIM_COUNT,
"nofile", "number of open files", RLIMIT_NOFILE, "OPEN_MAX", 'n', LIM_COUNT,
"nproc", "number of processes", RLIMIT_NPROC, "CHILD_MAX", 'u', LIM_COUNT,
"pipe", "pipe buffer size", RLIMIT_PIPE, "PIPE_BUF", 'p', LIM_BYTE,
-"rss", "resident set size", RLIMIT_RSS, 0, 'm', LIM_KBYTE,
+"rss", "max memory size", RLIMIT_RSS, 0, 'm', LIM_KBYTE,
+"rtprio", "max real time priority",RLIMIT_RTPRIO, 0, 'r', LIM_COUNT,
"sbsize", "socket buffer size", RLIMIT_SBSIZE, "PIPE_BUF", 'b', LIM_BYTE,
+"sigpend", "signal queue size", RLIMIT_SIGPENDING,"SIGQUEUE_MAX",'i', LIM_COUNT,
"stack", "stack size", RLIMIT_STACK, 0, 's', LIM_KBYTE,
+"swap", "swap size", RLIMIT_SWAP, 0, 'w', LIM_KBYTE,
"threads", "number of threads", RLIMIT_PTHREAD, "THREADS_MAX", 'T', LIM_COUNT,
"vmem", "process size", RLIMIT_VMEM, 0, 'v', LIM_KBYTE,
{ 0 }
diff --git a/usr/src/lib/libshell/common/data/math.tab b/usr/src/contrib/ast/src/cmd/ksh93/data/math.tab
index 412154c23a..3750c159d3 100644
--- a/usr/src/lib/libshell/common/data/math.tab
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/math.tab
@@ -1,6 +1,6 @@
# <return type: i:integer f:floating-point> <#floating-point-args> <function-name> [<alias> ...]
# <function-name>l variants are handled by features/math.sh
-# @(#)math.tab (AT&T Research) 2009-08-18
+# @(#)math.tab (AT&T Research) 2010-10-26
f 1 acos
f 1 acosh
f 1 asin
@@ -27,6 +27,7 @@ f 2 fmax
f 2 fmin
f 2 fmod
i 1 fpclassify
+i 1 fpclass
f 2 hypot
i 1 ilogb
i 1 isfinite
@@ -41,10 +42,11 @@ i 1 isnan
i 1 isnormal
i 1 issubnormal fpclassify=FP_SUBNORMAL
i 2 isunordered
-i 1 iszero fpclassify=FP_ZERO
+i 1 iszero fpclassify=FP_ZERO fpclass=FP_NZERO|FP_PZERO {return a1==0.0||a1==-0.0;}
f 1 j0
f 1 j1
f 2 jn
+x 2 ldexp
f 1 lgamma
f 1 log
f 1 log10
@@ -57,7 +59,7 @@ f 2 nexttoward
f 2 pow
f 2 remainder
f 1 rint
-f 1 round
+f 1 round {Sfdouble_t r;Sflong_t y;y=floor(2*a1);r=rint(a1);if(2*a1==y)r+=(r<a1)-(a1<0);return r;}
f 2 scalb
f 2 scalbn
i 1 signbit
@@ -66,7 +68,7 @@ f 1 sinh
f 1 sqrt
f 1 tan
f 1 tanh
-f 1 tgamma
+f 1 tgamma {Sfdouble_t r=exp(lgamma(a1));return (signgam<0)?-r:r;}
f 1 trunc
f 1 y0
f 1 y1
diff --git a/usr/src/lib/libshell/common/data/msg.c b/usr/src/contrib/ast/src/cmd/ksh93/data/msg.c
index 27ce63a4ec..a4eead98f2 100644
--- a/usr/src/lib/libshell/common/data/msg.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/msg.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -39,6 +39,8 @@
#include "jobs.h"
#include "edit.h"
+#include "FEATURE/cmds"
+
/* error messages */
const char e_timewarn[] = "\r\n\ashell will timeout in 60 seconds due to inactivity";
const char e_runvi[] = "\\hist -e \"${VISUAL:-${EDITOR:-vi}}\" ";
@@ -101,6 +103,7 @@ const char e_badsubscript[] = "%c: invalid subscript in assignment";
const char e_noarray[] = "%s: cannot be an array";
const char e_badappend[] = "%s: invalid append to associative array";
const char e_noref[] = "%s: no reference name";
+const char e_nounattr[] = "cannot unset attribute C or A or a";
const char e_selfref[] = "%s: invalid self reference";
const char e_globalref[] = "%s: global reference cannot refer to local variable";
const char e_noalias[] = "%s: alias not found\n";
@@ -113,6 +116,11 @@ const char e_notimp[] = "%s: not implemented";
const char e_notelem[] = "%.*s: is not an element of %s";
const char e_notenum[] = "%s: not an enumeration type";
const char e_unknowntype[] = "%.*s: unknown type";
+const char e_unknownmap[] = "%s: unknown mapping name";
+const char e_mapchararg[] = "-M requires argument when operands are specified";
+const char e_subcomvar[] = "%s: compound assignment requires sub-variable name";
+const char e_badtypedef[] = "%s: type definition requires compound assignment";
+const char e_typecompat[] = "%s: array instance incompatible with type assignment";
const char e_nosupport[] = "not supported";
const char e_badrange[] = "%d-%d: invalid range";
const char e_eneedsarg[] = "-e - requires single argument";
@@ -121,6 +129,7 @@ const char e_loop[] = "%s: would cause loop";
const char e_overlimit[] = "%s: limit exceeded";
const char e_badsyntax[] = "incorrect syntax";
const char e_badwrite[] = "write to %d failed";
+const char e_staticfun[] = "%s: defined as a static function in type %s and cannot be redefined";
const char e_on [] = "on";
const char e_off[] = "off";
const char is_reserved[] = " is a keyword";
@@ -147,7 +156,12 @@ const char is_ufunction[] = " is an undefined function";
const char e_jobsrunning[] = "You have running jobs";
const char e_no_job[] = "no such job";
const char e_no_proc[] = "no such process";
- const char e_jobusage[] = "%s: Arguments must be %%job or process ids";
+ const char e_badpid[] = "%s: invalid process id";
+# if SHOPT_COSHELL
+ const char e_jobusage[] = "%s: Arguments must be %%job, process ids, or job pool names";
+# else
+ const char e_jobusage[] = "%s: Arguments must be %%job or process ids";
+# endif /* SHOPT_COSHELL */
#endif /* JOBS */
const char e_coredump[] = "(coredump)";
const char e_alphanum[] = "[_[:alpha:]]*([_[:alnum:]])";
@@ -164,8 +178,10 @@ const char e_signo[] = "Signal %d";
/* string constants */
const char e_heading[] = "Current option settings";
const char e_sptbnl[] = " \t\n";
+const char e_tolower[] = "tolower";
+const char e_toupper[] = "toupper";
const char e_defpath[] = "/bin:/usr/bin:";
-const char e_defedit[] = "/bin/ed";
+const char e_defedit[] = _pth_ed;
const char e_unknown [] = "<command unknown>";
const char e_devnull[] = "/dev/null";
const char e_traceprompt[] = "+ ";
@@ -196,3 +212,4 @@ const char e_dot[] = ".";
const char e_envmarker[] = "A__z";
const char e_timeformat[] = "\nreal\t%2lR\nuser\t%2lU\nsys\t%2lS";
const char e_dict[] = "libshell";
+const char e_funload[] = "function, built-in or type definition for %s not found in %s";
diff --git a/usr/src/lib/libshell/common/data/options.c b/usr/src/contrib/ast/src/cmd/ksh93/data/options.c
index 5643b86b5a..73617f19d9 100644
--- a/usr/src/lib/libshell/common/data/options.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/options.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -75,6 +75,7 @@ const Shtable_t shtab_options[] =
"interactive", SH_INTERACTIVE|SH_COMMANDLINE,
bashextra("interactive_comments", SH_INTERACTIVE_COMM)
"keyword", SH_KEYWORD,
+ "letoctal", SH_LETOCTAL,
bashopt("lithist", SH_LITHIST)
"nolog", SH_NOLOG,
"login_shell", SH_LOGIN_SHELL|SH_COMMANDLINE,
@@ -138,11 +139,11 @@ const Shtable_t shtab_attributes[] =
{"-iinteger", NV_INTEGER},
{"-Hfilename", NV_HOST},
{"-bbinary", NV_BINARY},
- {"-llowercase", NV_UTOL},
+ {"-ltolower", NV_UTOL},
+ {"-utoupper", NV_LTOU},
{"-Zzerofill", NV_ZFILL},
{"-Lleftjust", NV_LJUST},
{"-Rrightjust", NV_RJUST},
- {"-uuppercase", NV_LTOU},
{"++namespace", NV_TABLE},
{"", 0}
};
diff --git a/usr/src/lib/libshell/common/data/signals.c b/usr/src/contrib/ast/src/cmd/ksh93/data/signals.c
index 2eb4eda145..3e9922f6c7 100644
--- a/usr/src/lib/libshell/common/data/signals.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/signals.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -17,9 +17,7 @@
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
-#include <ast.h>
-#include "shtable.h"
-#include "fault.h"
+#include "defs.h"
#if defined(SIGCLD) && !defined(SIGCHLD)
# define SIGCHLD SIGCLD
@@ -105,7 +103,7 @@ const struct shtable2 shtab_signals[] =
"HUP", VAL(SIGHUP,SH_SIGDONE), S("Hangup"),
"ILL", VAL(SIGILL,SH_SIGDONE), S("Illegal instruction"),
#ifdef SIGINFO
- "INFO", VAL(SIGINFO,SH_SIGIGNORE), S("Information request"),
+ "INFO", VAL(SIGINFO,SH_SIGIGNORE), S("Information request"),
#endif /*SIGINFO */
#ifdef JOBS
"INT", VAL(SIGINT,SH_SIGINTERACTIVE), S("Interrupt"),
@@ -192,6 +190,9 @@ const struct shtable2 shtab_signals[] =
#ifdef SIGSYS
"SYS", VAL(SIGSYS,SH_SIGDONE), S("Bad system call"),
#endif /* SIGSYS */
+#ifdef SIGSTKFLT
+ "STKFLT", VAL(SIGSTKFLT,SH_SIGDONE), S("Stack Fault"),
+#endif /* SIGSTKFLT */
"TERM", VAL(SIGTERM,SH_SIGDONE|SH_SIGINTERACTIVE), S("Terminated"),
#ifdef SIGTHAW
"THAW", VAL(SIGTHAW,SH_SIGIGNORE), S("Special signal used by CPR"),
@@ -213,7 +214,7 @@ const struct shtable2 shtab_signals[] =
"TTIN", VAL(SIGTTIN,0), S("Stopped (SIGTTIN)"),
#endif /* SIGTTIN */
#ifdef SIGTTOU
- "TTOU", VAL(SIGTTOU,0), S("Stopped(SIGTTOU)"),
+ "TTOU", VAL(SIGTTOU,0), S("Stopped (SIGTTOU)"),
#endif /* SIGTTOU */
#ifdef SIGURG
"URG", VAL(SIGURG,SH_SIGIGNORE), S("Socket interrupt"),
diff --git a/usr/src/lib/libshell/common/data/strdata.c b/usr/src/contrib/ast/src/cmd/ksh93/data/strdata.c
index 05a88b095c..976c850780 100644
--- a/usr/src/lib/libshell/common/data/strdata.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/strdata.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/data/testops.c b/usr/src/contrib/ast/src/cmd/ksh93/data/testops.c
index a85f2ef46c..fa07d59196 100644
--- a/usr/src/lib/libshell/common/data/testops.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/testops.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -25,7 +25,7 @@
#include <ast.h>
-#include "shtable.h"
+#include "defs.h"
#include "test.h"
/*
diff --git a/usr/src/lib/libshell/common/data/variables.c b/usr/src/contrib/ast/src/cmd/ksh93/data/variables.c
index ba44b5cd87..3dce5b3f39 100644
--- a/usr/src/lib/libshell/common/data/variables.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/data/variables.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,6 +27,7 @@
#include "name.h"
#include "defs.h"
#include "variables.h"
+#include "builtins.h"
/*
* This is the list of built-in shell variables and default values
@@ -52,7 +53,7 @@ const struct shtable2 shtab_variables[] =
"HISTSIZE", 0, (char*)0,
"HISTEDIT", NV_NOFREE, (char*)0,
"HISTCMD", NV_NOFREE|NV_INTEGER, (char*)0,
- "FCEDIT", NV_NOFREE, "/bin/ed",
+ "FCEDIT", NV_NOFREE, &e_defedit[0],
"CDPATH", 0, (char*)0,
"MAILPATH", 0, (char*)0,
"PS3", NV_NOFREE, "#? ",
@@ -78,7 +79,7 @@ const struct shtable2 shtab_variables[] =
"FIGNORE", 0, (char*)0,
"KSH_VERSION", 0, (char*)0,
"JOBMAX", NV_NOFREE|NV_INTEGER, (char*)0,
- ".sh", NV_TABLE|NV_RDONLY|NV_NOFREE|NV_NOPRINT,(char*)0,
+ ".sh", NV_TABLE|NV_NOFREE|NV_NOPRINT, (char*)0,
".sh.edchar", 0, (char*)0,
".sh.edcol", 0, (char*)0,
".sh.edtext", 0, (char*)0,
@@ -94,8 +95,10 @@ const struct shtable2 shtab_variables[] =
".sh.fun", 0, (char*)0,
".sh.subshell", NV_INTEGER|NV_SHORT|NV_NOFREE, (char*)0,
".sh.level", 0, (char*)0,
- ".sh.lineno", NV_INTEGER|NV_RDONLY, (char*)0,
- ".sh.stats", NV_RDONLY, (char*)0,
+ ".sh.lineno", NV_INTEGER, (char*)0,
+ ".sh.stats", 0, (char*)0,
+ ".sh.math", 0, (char*)0,
+ ".sh.pool", 0, (char*)0,
"SHLVL", NV_INTEGER|NV_NOFREE|NV_EXPORT, (char*)0,
#if SHOPT_FS_3D
"VPATH", 0, (char*)0,
diff --git a/usr/src/lib/libshell/common/edit/completion.c b/usr/src/contrib/ast/src/cmd/ksh93/edit/completion.c
index 4c1b044942..7f74c20de0 100644
--- a/usr/src/lib/libshell/common/edit/completion.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/edit/completion.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,17 +40,23 @@ static char *fmtx(const char *string)
register const char *cp = string;
register int n,c;
unsigned char *state = (unsigned char*)sh_lexstates[2];
- int offset;
- while((c=mbchar(cp)),(c>UCHAR_MAX)||(n=state[c])==0);
- if(n==S_EOF)
+ int offset = staktell();
+ if(*cp=='#' || *cp=='~')
+ stakputc('\\');
+ while((c=mbchar(cp)),(c>UCHAR_MAX)||(n=state[c])==0 || n==S_EPAT);
+ if(n==S_EOF && *string!='#')
return((char*)string);
- offset = staktell();
stakwrite(string,--cp-string);
- while(c=mbchar(cp))
+ for(string=cp;c=mbchar(cp);string=cp)
{
- if(state[c])
- stakputc('\\');
- stakputc(c);
+ if((n=cp-string)==1)
+ {
+ if((n=state[c]) && n!=S_EPAT)
+ stakputc('\\');
+ stakputc(c);
+ }
+ else
+ stakwrite(string,n);
}
stakputc(0);
return(stakptr(offset));
@@ -137,10 +143,15 @@ static char *find_begin(char outbuff[], char *last, int endchar, int *type)
if((c= mbchar(cp)) , c!=dot && !isaname(c))
break;
}
- if(cp>=last && c!= '}')
+ if(cp>=last)
{
- *type='$';
- return(++xp);
+ if(c==dot || isaname(c))
+ {
+ *type='$';
+ return(++xp);
+ }
+ if(c!='}')
+ bp = cp;
}
}
else if(c=='(')
@@ -234,6 +245,11 @@ int ed_expand(Edit_t *ep, char outbuff[],int *cur,int *eol,int mode, int count)
}
#endif /* SHOPT_MULTIBYTE */
out = outbuff + *cur + (sh_isoption(SH_VI)!=0);
+ if(out[-1]=='"' || out[-1]=='\'')
+ {
+ rval = -(sh_isoption(SH_VI)!=0);
+ goto done;
+ }
comptr->comtyp = COMSCAN;
comptr->comarg = ap;
ap->argflag = (ARG_MAC|ARG_EXP);
@@ -289,7 +305,7 @@ int ed_expand(Edit_t *ep, char outbuff[],int *cur,int *eol,int mode, int count)
register int size='x';
while(cp>outbuff && ((size=cp[-1])==' ' || size=='\t'))
cp--;
- if(!var && !strchr(ap->argval,'/') && (((cp==outbuff&&sh.nextprompt==1) || (strchr(";&|(",size)) && (cp==outbuff+1||size=='('||cp[-2]!='>') && *begin!='~' )))
+ if(!var && !strchr(ap->argval,'/') && (((cp==outbuff&&ep->sh->nextprompt==1) || (strchr(";&|(",size)) && (cp==outbuff+1||size=='('||cp[-2]!='>') && *begin!='~' )))
{
cmd_completion=1;
sh_onstate(SH_COMPLETE);
@@ -310,7 +326,7 @@ int ed_expand(Edit_t *ep, char outbuff[],int *cur,int *eol,int mode, int count)
}
sh_offstate(SH_COMPLETE);
/* allow a search to be aborted */
- if(sh.trapnote&SH_SIGSET)
+ if(ep->sh->trapnote&SH_SIGSET)
{
rval = -1;
goto done;
@@ -321,6 +337,8 @@ int ed_expand(Edit_t *ep, char outbuff[],int *cur,int *eol,int mode, int count)
rval = -1;
goto done;
}
+ if(mode=='\\' && out[-1]=='/' && narg>1)
+ mode = '=';
if(mode=='=')
{
if (strip && !cmd_completion)
@@ -413,7 +431,7 @@ int ed_expand(Edit_t *ep, char outbuff[],int *cur,int *eol,int mode, int count)
Namval_t *np;
/* add as tracked alias */
Pathcomp_t *pp;
- if(*cp=='/' && (pp=path_dirfind(sh.pathlist,cp,'/')) && (np=nv_search(begin,sh.track_tree,NV_ADD)))
+ if(*cp=='/' && (pp=path_dirfind(ep->sh->pathlist,cp,'/')) && (np=nv_search(begin,ep->sh->track_tree,NV_ADD)))
path_alias(np,pp);
out = strcopy(begin,cp);
}
@@ -503,7 +521,7 @@ int ed_macro(Edit_t *ep, register int i)
ep->e_macro[2] = ed_getchar(ep,1);
else
ep->e_macro[2] = 0;
- if (isalnum(i)&&(np=nv_search(ep->e_macro,sh.alias_tree,HASH_SCOPE))&&(out=nv_getval(np)))
+ if (isalnum(i)&&(np=nv_search(ep->e_macro,ep->sh->alias_tree,HASH_SCOPE))&&(out=nv_getval(np)))
{
#if SHOPT_MULTIBYTE
/* copy to buff in internal representation */
@@ -534,7 +552,7 @@ int ed_macro(Edit_t *ep, register int i)
int ed_fulledit(Edit_t *ep)
{
register char *cp;
- if(!sh.hist_ptr)
+ if(!shgd->hist_ptr)
return(-1);
/* use EDITOR on current command */
if(ep->e_hline == ep->e_hismax)
@@ -545,9 +563,9 @@ int ed_fulledit(Edit_t *ep)
ep->e_inbuf[ep->e_eol+1] = 0;
ed_external(ep->e_inbuf, (char *)ep->e_inbuf);
#endif /* SHOPT_MULTIBYTE */
- sfwrite(sh.hist_ptr->histfp,(char*)ep->e_inbuf,ep->e_eol+1);
+ sfwrite(shgd->hist_ptr->histfp,(char*)ep->e_inbuf,ep->e_eol+1);
sh_onstate(SH_HISTORY);
- hist_flush(sh.hist_ptr);
+ hist_flush(shgd->hist_ptr);
}
cp = strcopy((char*)ep->e_inbuf,e_runvi);
cp = strcopy(cp, fmtbase((long)ep->e_hline,10,0));
diff --git a/usr/src/lib/libshell/common/edit/edit.c b/usr/src/contrib/ast/src/cmd/ksh93/edit/edit.c
index 7dab2368d6..dfb8bcffa3 100644
--- a/usr/src/lib/libshell/common/edit/edit.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/edit/edit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -52,6 +52,7 @@
#include "edit.h"
static char CURSOR_UP[20] = { ESC, '[', 'A', 0 };
+static char KILL_LINE[20] = { ESC, '[', 'J', 0 };
@@ -159,7 +160,7 @@ static char CURSOR_UP[20] = { ESC, '[', 'A', 0 };
*/
int tty_check(int fd)
{
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
struct termios tty;
ep->e_savefd = -1;
return(tty_get(fd,&tty)==0);
@@ -173,7 +174,7 @@ int tty_check(int fd)
int tty_get(register int fd, register struct termios *tty)
{
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
if(fd == ep->e_savefd)
*tty = ep->e_savetty;
else
@@ -201,7 +202,7 @@ int tty_get(register int fd, register struct termios *tty)
int tty_set(int fd, int action, struct termios *tty)
{
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
if(fd >=0)
{
#ifdef future
@@ -230,7 +231,8 @@ int tty_set(int fd, int action, struct termios *tty)
void tty_cooked(register int fd)
{
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
+ ep->e_keytrap = 0;
if(ep->e_raw==0)
return;
if(fd < 0)
@@ -266,7 +268,7 @@ int tty_raw(register int fd, int echomode)
#ifdef L_MASK
struct ltchars lchars;
#endif /* L_MASK */
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
if(ep->e_raw==RAWMODE)
return(echo?-1:0);
else if(ep->e_raw==ECHOMODE)
@@ -335,9 +337,9 @@ int tty_raw(register int fd, int echomode)
nttyparm.c_iflag |= (BRKINT|IGNPAR);
# endif /* u370 */
if(echo)
- nttyparm.c_lflag &= ~ICANON;
+ nttyparm.c_lflag &= ~(ICANON);
else
- nttyparm.c_lflag &= ~(ICANON|ECHO|ECHOK);
+ nttyparm.c_lflag &= ~(ICANON|ISIG|ECHO|ECHOK);
nttyparm.c_cc[VTIME] = 0;
nttyparm.c_cc[VMIN] = 1;
# ifdef VREPRINT
@@ -367,6 +369,7 @@ int tty_raw(register int fd, int echomode)
# else
ep->e_lnext = cntl('V');
# endif /* VLNEXT */
+ ep->e_intr = ttyparm.c_cc[VINTR];
ep->e_eof = ttyparm.c_cc[VEOF];
ep->e_erase = ttyparm.c_cc[VERASE];
ep->e_kill = ttyparm.c_cc[VKILL];
@@ -389,7 +392,7 @@ int tty_raw(register int fd, int echomode)
# ifdef TIOCGETC
int tty_alt(register int fd)
{
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
int mask;
struct tchars ttychars;
switch(ep->e_raw)
@@ -437,7 +440,7 @@ int tty_alt(register int fd)
int tty_alt(register int fd)
{
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
switch(ep->e_raw)
{
case ECHOMODE:
@@ -606,6 +609,11 @@ void ed_setup(register Edit_t *ep, int fd, int reedit)
shp->st.trapcom[SIGWINCH] = pp;
ep->sh->winch = 0;
#endif
+#if SHOPT_EDPREDICT
+ ep->hlist = 0;
+ ep->nhlist = 0;
+ ep->hoff = 0;
+#endif /* SHOPT_EDPREDICT */
#if KSHELL
ep->e_stkptr = stakptr(0);
ep->e_stkoff = staktell();
@@ -615,9 +623,9 @@ void ed_setup(register Edit_t *ep, int fd, int reedit)
#else
last = ep->e_prbuff;
#endif /* KSHELL */
- if(shp->hist_ptr)
+ if(shp->gd->hist_ptr)
{
- register History_t *hp = shp->hist_ptr;
+ register History_t *hp = shp->gd->hist_ptr;
ep->e_hismax = hist_max(hp);
ep->e_hismin = hist_min(hp);
}
@@ -644,7 +652,8 @@ void ed_setup(register Edit_t *ep, int fd, int reedit)
{
int skip=0;
ep->e_crlf = 0;
- *pp++ = c;
+ if (pp < ppmax)
+ *pp++ = c;
for(n=1; c = *last++; n++)
{
if(pp < ppmax)
@@ -652,7 +661,10 @@ void ed_setup(register Edit_t *ep, int fd, int reedit)
if(c=='\a' || c==ESC || c=='\r')
break;
if(skip || (c>='0' && c<='9'))
+ {
+ skip = 0;
continue;
+ }
if(n>1 && c==';')
skip = 1;
else if(n>2 || (c!= '[' && c!= ']'))
@@ -800,10 +812,10 @@ int ed_read(void *context, int fd, char *buff, int size, int reedit)
{
register Edit_t *ep = (Edit_t*)context;
register int rv= -1;
- register int delim = (ep->e_raw==RAWMODE?'\r':'\n');
+ register int delim = ((ep->e_raw&RAWMODE)?nttyparm.c_cc[VEOL]:'\n');
Shell_t *shp = ep->sh;
int mode = -1;
- int (*waitevent)(int,long,int) = shp->waitevent;
+ int (*waitevent)(int,long,int) = shp->gd->waitevent;
if(ep->e_raw==ALTMODE)
mode = 1;
if(size < 0)
@@ -813,7 +825,7 @@ int ed_read(void *context, int fd, char *buff, int size, int reedit)
}
sh_onstate(SH_TTYWAIT);
errno = EINTR;
- shp->waitevent = 0;
+ shp->gd->waitevent = 0;
while(rv<0 && errno==EINTR)
{
if(shp->trapnote&(SH_SIGSET|SH_SIGTRAP))
@@ -847,6 +859,8 @@ int ed_read(void *context, int fd, char *buff, int size, int reedit)
sh_delay(.05);
astwinsize(2,&rows,&newsize);
ep->e_winsz = newsize-1;
+ if(ep->e_winsz < MINWINDOW)
+ ep->e_winsz = MINWINDOW;
if(!ep->e_multiline && ep->e_wsize < MAXLINE)
ep->e_wsize = ep->e_winsz-2;
ep->e_nocrnl=1;
@@ -906,7 +920,7 @@ int ed_read(void *context, int fd, char *buff, int size, int reedit)
else if(rv>=0 && mode>0)
rv = read(fd,buff,rv>0?rv:1);
done:
- shp->waitevent = waitevent;
+ shp->gd->waitevent = waitevent;
sh_offstate(SH_TTYWAIT);
return(rv);
}
@@ -1035,8 +1049,14 @@ int ed_getchar(register Edit_t *ep,int mode)
/* check for possible key mapping */
if((c = ep->e_lbuf[--ep->e_lookahead]) < 0)
{
+ if(mode<=0 && -c == ep->e_intr)
+ {
+ sh_fault(SIGINT);
+ siglongjmp(ep->e_env, UINTR);
+ }
if(mode<=0 && ep->sh->st.trap[SH_KEYTRAP])
{
+ ep->e_keytrap = 1;
n=1;
if((readin[0]= -c) == ESC)
{
@@ -1069,6 +1089,7 @@ int ed_getchar(register Edit_t *ep,int mode)
}
else
c = ed_getchar(ep,mode);
+ ep->e_keytrap = 0;
}
else
c = -c;
@@ -1432,6 +1453,7 @@ void ed_genncpy(register genchar *dp,register const genchar *sp, int n)
while(n-->0 && (*dp++ = *sp++));
}
+#endif /* SHOPT_MULTIBYTE */
/*
* find the string length of <str>
*/
@@ -1443,7 +1465,6 @@ int ed_genlen(register const genchar *str)
while(*sp++);
return(sp-str-1);
}
-#endif /* SHOPT_MULTIBYTE */
#endif /* SHOPT_ESH || SHOPT_VSH */
#ifdef future
@@ -1477,7 +1498,7 @@ static int compare(register const char *a,register const char *b,register int n)
int tcgetattr(int fd, struct termios *tt)
{
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
register int r,i;
ep->e_tcgeta = 0;
ep->e_echoctl = (ECHOCTL!=0);
@@ -1499,7 +1520,7 @@ int tcgetattr(int fd, struct termios *tt)
int tcsetattr(int fd,int mode,struct termios *tt)
{
- register Edit_t *ep = (Edit_t*)(sh_getinterp()->ed_context);
+ register Edit_t *ep = (Edit_t*)(shgd->ed_context);
register int r;
if(ep->e_tcgeta)
{
@@ -1583,6 +1604,218 @@ static int keytrap(Edit_t *ep,char *inbuff,register int insize, int bufsize, int
}
#endif /* KSHELL */
+#if SHOPT_EDPREDICT
+static int ed_sortdata(const char *s1, const char *s2)
+{
+ Histmatch_t *m1 = (Histmatch_t*)s1;
+ Histmatch_t *m2 = (Histmatch_t*)s2;
+ return(strcmp(m1->data,m2->data));
+}
+
+static int ed_sortindex(const char *s1, const char *s2)
+{
+ Histmatch_t *m1 = (Histmatch_t*)s1;
+ Histmatch_t *m2 = (Histmatch_t*)s2;
+ return(m2->index-m1->index);
+}
+
+static int ed_histlencopy(const char *cp, char *dp)
+{
+ int c,n=1,col=1;
+ const char *oldcp=cp;
+ for(n=0;c = mbchar(cp);oldcp=cp,col++)
+ {
+ if(c=='\n' && *cp)
+ {
+ n += 2;
+ if(dp)
+ {
+ *dp++ = '^';
+ *dp++ = 'J';
+ col +=2;
+ }
+ }
+ else if(c=='\t')
+ {
+ n++;
+ if(dp)
+ *dp++ = ' ';
+ }
+ else
+ {
+ n += cp-oldcp;
+ if(dp)
+ {
+ while(oldcp < cp)
+ *dp++ = *oldcp++;
+ }
+ }
+
+ }
+ return(n);
+}
+
+int ed_histgen(Edit_t *ep,const char *pattern)
+{
+ Histmatch_t *mp,*mplast=0;
+ History_t *hp;
+ off_t offset;
+ int ac=0,l,n,index1,index2;
+ size_t m;
+ char *cp, **argv=0, **av, **ar;
+ static int maxmatch;
+ if(!(hp=ep->sh->gd->hist_ptr) && (!nv_getval(HISTFILE) || !sh_histinit(ep->sh)))
+ return(0);
+ if(ep->e_cur <=2)
+ maxmatch = 0;
+ else if(maxmatch && ep->e_cur > maxmatch)
+ {
+ ep->hlist = 0;
+ ep->hfirst = 0;
+ return(0);
+ }
+ hp = ep->sh->gd->hist_ptr;
+ if(*pattern=='#' && *++pattern=='#')
+ return(0);
+ cp = stakalloc(m=strlen(pattern)+6);
+ sfsprintf(cp,m,"@(%s)*%c",pattern,0);
+ if(ep->hlist)
+ {
+ m = strlen(ep->hpat)-4;
+ if(memcmp(pattern,ep->hpat+2,m)==0)
+ {
+ n = strcmp(cp,ep->hpat)==0;
+ for(argv=av=(char**)ep->hlist,mp=ep->hfirst; mp;mp= mp->next)
+ {
+ if(n || strmatch(mp->data,cp))
+ *av++ = (char*)mp;
+ }
+ *av = 0;
+ ep->hmax = av-argv;
+ if(ep->hmax==0)
+ maxmatch = ep->e_cur;
+ return(ep->hmax=av-argv);
+ }
+ stakset(ep->e_stkptr,ep->e_stkoff);
+ }
+ if((m=strlen(cp)) >= sizeof(ep->hpat))
+ m = sizeof(ep->hpat)-1;
+ memcpy(ep->hpat,cp,m);
+ ep->hpat[m] = 0;
+ pattern = cp;
+ index1 = (int)hp->histind;
+ for(index2=index1-hp->histsize; index1>index2; index1--)
+ {
+ offset = hist_tell(hp,index1);
+ sfseek(hp->histfp,offset,SEEK_SET);
+ if(!(cp = sfgetr(hp->histfp,0,0)))
+ continue;
+ if(*cp=='#')
+ continue;
+ if(strmatch(cp,pattern))
+ {
+ l = ed_histlencopy(cp,(char*)0);
+ mp = (Histmatch_t*)stakalloc(sizeof(Histmatch_t)+l);
+ mp->next = mplast;
+ mplast = mp;
+ mp->len = l;
+ ed_histlencopy(cp,mp->data);
+ mp->count = 1;
+ mp->data[l] = 0;
+ mp->index = index1;
+ ac++;
+ }
+ }
+ if(ac>0)
+ {
+ l = ac;
+ argv = av = (char**)stakalloc((ac+1)*sizeof(char*));
+ for(mplast=0; l>=0 && (*av= (char*)mp); mplast=mp,mp=mp->next,av++)
+ {
+ l--;
+ }
+ *av = 0;
+ strsort(argv,ac,ed_sortdata);
+ mplast = (Histmatch_t*)argv[0];
+ for(ar= av= &argv[1]; mp=(Histmatch_t*)*av; av++)
+ {
+ if(strcmp(mp->data,mplast->data)==0)
+ {
+ mplast->count++;
+ if(mp->index> mplast->index)
+ mplast->index = mp->index;
+ continue;
+ }
+ *ar++ = (char*)(mplast=mp);
+ }
+ *ar = 0;
+ mplast->next = 0;
+ ac = ar-argv;
+ strsort(argv,ac,ed_sortindex);
+ mplast = (Histmatch_t*)argv[0];
+ for(av= &argv[1]; mp=(Histmatch_t*)*av; av++, mplast=mp)
+ mplast->next = mp;
+ mplast->next = 0;
+ }
+ ep->hlist = (Histmatch_t**)argv;
+ ep->hfirst = ep->hlist?ep->hlist[0]:0;
+ return(ep->hmax=ac);
+}
+
+void ed_histlist(Edit_t *ep,int n)
+{
+ Histmatch_t *mp,**mpp = ep->hlist+ep->hoff;
+ int i,last=0,save[2];
+ if(n)
+ {
+ /* don't bother updating the screen if there is typeahead */
+ if(!ep->e_lookahead && sfpkrd(ep->e_fd,save,1,'\r',200L,-1)>0)
+ ed_ungetchar(ep,save[0]);
+ if(ep->e_lookahead)
+ return;
+ ed_putchar(ep,'\n');
+ ed_putchar(ep,'\r');
+ }
+ else
+ {
+ stakset(ep->e_stkptr,ep->e_stkoff);
+ ep->hlist = 0;
+ ep->nhlist = 0;
+ }
+ ed_putstring(ep,KILL_LINE);
+ if(n)
+ {
+ for(i=1; (mp= *mpp) && i <= 16 ; i++,mpp++)
+ {
+ last = 0;
+ if(mp->len >= ep->e_winsz-4)
+ {
+ last = ep->e_winsz-4;
+ save[0] = mp->data[last-1];
+ save[1] = mp->data[last];
+ mp->data[last-1] = '\n';
+ mp->data[last] = 0;
+ }
+ ed_putchar(ep,i<10?' ':'1');
+ ed_putchar(ep,i<10?'0'+i:'0'+i-10);
+ ed_putchar(ep,')');
+ ed_putchar(ep,' ');
+ ed_putstring(ep,mp->data);
+ if(last)
+ {
+ mp->data[last-1] = save[0];
+ mp->data[last] = save[1];
+ }
+ ep->nhlist = i;
+ }
+ last = i-1;
+ while(i-->0)
+ ed_putstring(ep,CURSOR_UP);
+ }
+ ed_flush(ep);
+}
+#endif /* SHOPT_EDPREDICT */
+
void *ed_open(Shell_t *shp)
{
Edit_t *ed = newof(0,Edit_t,1,0);
@@ -1590,3 +1823,51 @@ void *ed_open(Shell_t *shp)
strcpy(ed->e_macro,"_??");
return((void*)ed);
}
+
+#undef ioctl
+int sh_ioctl(int fd, int cmd, void* val, int sz)
+{
+ int r,err=errno;
+ if(sz == sizeof(void*))
+ {
+ while((r=ioctl(fd,cmd,val)) < 0 && errno==EINTR)
+ errno = err;
+ }
+ else
+ {
+ Sflong_t l = (Sflong_t)(uintptr_t)val;
+ if(sizeof(val)==sizeof(long))
+ {
+ while((r=ioctl(fd,cmd,(unsigned long)l)) < 0 && errno==EINTR)
+ errno = err;
+ }
+ else if(sizeof(int)!=sizeof(long))
+ {
+ while((r=ioctl(fd,cmd,(unsigned int)l)) < 0 && errno==EINTR)
+ errno = err;
+ }
+ }
+ return(r);
+}
+
+#ifdef _lib_tcgetattr
+# undef tcgetattr
+int
+ sh_tcgetattr(int fd, struct termios *tty)
+ {
+ int r,err = errno;
+ while((r=tcgetattr(fd,tty)) < 0 && errno==EINTR)
+ errno = err;
+ return(r);
+ }
+
+# undef tcsetattr
+int
+ sh_tcsetattr(int fd, int cmd, struct termios *tty)
+ {
+ int r,err = errno;
+ while((r=tcsetattr(fd,cmd,tty)) < 0 && errno==EINTR)
+ errno = err;
+ return(r);
+ }
+#endif
diff --git a/usr/src/lib/libshell/common/edit/emacs.c b/usr/src/contrib/ast/src/cmd/ksh93/edit/emacs.c
index be96eb1af4..69535c6a78 100644
--- a/usr/src/lib/libshell/common/edit/emacs.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/edit/emacs.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -90,6 +90,7 @@ One line screen editor for any program
static int print(int);
static int _isword(int);
# define isword(c) _isword(out[c])
+# define digit(c) ((c&~STRIP)==0 && isdigit(c))
#else
# define gencpy(a,b) strcpy((char*)(a),(char*)(b))
@@ -97,6 +98,7 @@ One line screen editor for any program
# define genlen(str) strlen(str)
# define print(c) isprint(c)
# define isword(c) (isalnum(out[c]) || (out[c]=='_'))
+# define digit(c) isdigit(c)
#endif /*SHOPT_MULTIBYTE */
typedef struct _emacs_
@@ -188,6 +190,7 @@ int ed_emacsread(void *context, int fd,char *buff,int scend, int reedit)
genchar *kptr;
char prompt[PRSIZE];
genchar Screen[MAXLINE];
+ memset(Screen,0,sizeof(Screen));
if(!ep)
{
ep = ed->e_emacs = newof(0,Emacs_t,1,0);
@@ -261,7 +264,7 @@ int ed_emacsread(void *context, int fd,char *buff,int scend, int reedit)
#ifdef ESH_NFIRST
ed_ungetchar(ep->ed,cntl('N'));
#else
- location = hist_locate(sh.hist_ptr,location.hist_command,location.hist_line,1);
+ location = hist_locate(shgd->hist_ptr,location.hist_command,location.hist_line,1);
if (location.hist_command < histlines)
{
hline = location.hist_command;
@@ -316,6 +319,8 @@ int ed_emacsread(void *context, int fd,char *buff,int scend, int reedit)
count = 1;
adjust = -1;
i = cur;
+ if(c!='\t' && c!=ESC && !digit(c))
+ ep->ed->e_tabcount = 0;
switch(c)
{
case LNEXTCHAR:
@@ -613,6 +618,18 @@ update:
search(ep,out,count);
goto drawline;
case cntl('P') :
+#if SHOPT_EDPREDICT
+ if(ep->ed->hlist)
+ {
+ if(ep->ed->hoff == 0)
+ {
+ beep();
+ continue;
+ }
+ ep->ed->hoff--;
+ goto hupdate;
+ }
+#endif /* SHOPT_EDPREDICT */
if (count <= hloff)
hloff -= count;
else
@@ -641,11 +658,26 @@ update:
c = '\n';
goto process;
case cntl('N') :
+#if SHOPT_EDPREDICT
+ if(ep->ed->hlist)
+ {
+ if(ep->ed->hoff >= ep->ed->hmax)
+ {
+ beep();
+ continue;
+ }
+ ep->ed->hoff++;
+ hupdate:
+ ed_histlist(ep->ed,*ep->ed->hlist!=0);
+ draw(ep,REFRESH);
+ continue;
+ }
+#endif /* SHOPT_EDPREDICT */
#ifdef ESH_NFIRST
hline = location.hist_command; /* start at saved position */
hloff = location.hist_line;
#endif /* ESH_NFIRST */
- location = hist_locate(sh.hist_ptr,hline,hloff,count);
+ location = hist_locate(shgd->hist_ptr,hline,hloff,count);
if (location.hist_command > histlines)
{
beep();
@@ -702,7 +734,7 @@ process:
#if SHOPT_MULTIBYTE
ed_external(out,buff);
#endif /* SHOPT_MULTIBYTE */
- i = strlen(buff);
+ i = (int)strlen(buff);
if (i)
return(i);
return(-1);
@@ -747,7 +779,7 @@ static int escape(register Emacs_t* ep,register genchar *out,int count)
int digit,ch;
digit = 0;
value = 0;
- while ((i=ed_getchar(ep->ed,0)),isdigit(i))
+ while ((i=ed_getchar(ep->ed,0)),digit(i))
{
value *= 10;
value += (i - '0');
@@ -935,8 +967,33 @@ static int escape(register Emacs_t* ep,register genchar *out,int count)
}
#if KSHELL
+#if SHOPT_EDPREDICT
+ case '\n': case '\t':
+ if(!ep->ed->hlist)
+ {
+ beep();
+ break;
+ }
+ if(ch=='\n')
+ ed_ungetchar(ep->ed,'\n');
+#endif /* SHOPT_EDPREDICT */
/* file name expansion */
case cntl('[') : /* filename completion */
+#if SHOPT_EDPREDICT
+ if(ep->ed->hlist)
+ {
+ value += ep->ed->hoff;
+ if(value > ep->ed->nhlist)
+ beep();
+ else
+ {
+ value = histlines - ep->ed->hlist[value-1]->index;
+ ed_histlist(ep->ed,0);
+ ed_ungetchar(ep->ed,cntl('P'));
+ return(value);
+ }
+ }
+#endif /* SHOPT_EDPREDICT */
i = '\\';
/* FALLTHROUGH */
case '*': /* filename expansion */
@@ -952,7 +1009,7 @@ static int escape(register Emacs_t* ep,register genchar *out,int count)
}
beep();
}
- else if(i=='=')
+ else if(i=='=' || (i=='\\' && out[cur-1]=='/'))
{
draw(ep,REFRESH);
if(count>0)
@@ -961,7 +1018,7 @@ static int escape(register Emacs_t* ep,register genchar *out,int count)
{
i=ed_getchar(ep->ed,0);
ed_ungetchar(ep->ed,i);
- if(isdigit(i))
+ if(digit(i))
ed_ungetchar(ep->ed,ESC);
}
}
@@ -1015,14 +1072,18 @@ static int escape(register Emacs_t* ep,register genchar *out,int count)
switch(i=ed_getchar(ep->ed,1))
{
case 'A':
+#if SHOPT_EDPREDICT
+ if(!ep->ed->hlist && cur>0 && eol==cur && (cur<(SEARCHSIZE-2) || ep->prevdirection == -2))
+#else
if(cur>0 && eol==cur && (cur<(SEARCHSIZE-2) || ep->prevdirection == -2))
+#endif /* SHOPT_EDPREDICT */
{
if(ep->lastdraw==APPEND && ep->prevdirection != -2)
{
out[cur] = 0;
- gencpy(&((genchar*)lstring)[1],out);
+ gencpy((genchar*)lstring+1,out);
#if SHOPT_MULTIBYTE
- ed_external(&((genchar*)lstring)[1],lstring+1);
+ ed_external((genchar*)lstring+1,lstring+1);
#endif /* SHOPT_MULTIBYTE */
*lstring = '^';
ep->prevdirection = -2;
@@ -1202,9 +1263,11 @@ static void search(Emacs_t* ep,genchar *out,int direction)
draw(ep,UPDATE);
}
else
- beep();
+ goto restore;
continue;
}
+ if(i == ep->ed->e_intr)
+ goto restore;
if (i==usrkill)
{
beep();
@@ -1241,11 +1304,12 @@ static void search(Emacs_t* ep,genchar *out,int direction)
ed_external(string,(char*)string);
#endif /* SHOPT_MULTIBYTE */
strncpy(lstring,((char*)string)+2,SEARCHSIZE);
+ lstring[SEARCHSIZE-1] = 0;
ep->prevdirection = direction;
}
else
direction = ep->prevdirection ;
- location = hist_find(sh.hist_ptr,(char*)lstring,hline,1,direction);
+ location = hist_find(shgd->hist_ptr,(char*)lstring,hline,1,direction);
i = location.hist_command;
if(i>0)
{
@@ -1341,6 +1405,34 @@ static void draw(register Emacs_t *ep,Draw_t option)
i = *(logcursor-1); /* last character inserted */
+#if SHOPT_EDPREDICT
+ if(option==FINAL)
+ {
+ if(ep->ed->hlist)
+ ed_histlist(ep->ed,0);
+ }
+ else if((option==UPDATE||option==APPEND) && drawbuff[0]=='#' && cur>1 && cur==eol && drawbuff[cur-1]!='*')
+ {
+ int n;
+ drawbuff[cur+1]=0;
+# if SHOPT_MULTIBYTE
+ ed_external(drawbuff,(char*)drawbuff);
+# endif /*SHOPT_MULTIBYTE */
+ n = ed_histgen(ep->ed,(char*)drawbuff);
+# if SHOPT_MULTIBYTE
+ ed_internal((char*)drawbuff,drawbuff);
+# endif /*SHOPT_MULTIBYTE */
+ if(ep->ed->hlist)
+ {
+ ed_histlist(ep->ed,n);
+ putstring(ep,Prompt);
+ ed_setcursor(ep->ed,ep->screen,0,ep->cursor-ep->screen, 0);
+ }
+ else
+ ed_ringbell();
+
+ }
+#endif /* SHOPT_EDPREDICT */
if ((option == APPEND)&&(ep->scvalid)&&(*logcursor == '\0')&&
print(i)&&((ep->cursor-ep->screen)<(w_size-1)))
diff --git a/usr/src/lib/libshell/common/edit/hexpand.c b/usr/src/contrib/ast/src/cmd/ksh93/edit/hexpand.c
index 9d434ae673..e335818214 100644
--- a/usr/src/lib/libshell/common/edit/hexpand.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/edit/hexpand.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -303,8 +303,8 @@ getline:
{
/* search history for string */
- hl = hist_find(sh.hist_ptr, str,
- sh.hist_ptr->histind,
+ hl = hist_find(shgd->hist_ptr, str,
+ shgd->hist_ptr->histind,
flag&HIST_QUESTION, -1);
if((n = hl.hist_command) == -1)
n = 0; /* not found */
@@ -312,10 +312,10 @@ getline:
if(n)
{
if(n < 0) /* determine index for backref */
- n = sh.hist_ptr->histind + n;
+ n = shgd->hist_ptr->histind + n;
/* search and use history file if found */
- if(n > 0 && hist_seek(sh.hist_ptr, n) != -1)
- ref = sh.hist_ptr->histfp;
+ if(n > 0 && hist_seek(shgd->hist_ptr, n) != -1)
+ ref = shgd->hist_ptr->histfp;
}
if(!ref)
diff --git a/usr/src/lib/libshell/common/edit/history.c b/usr/src/contrib/ast/src/cmd/ksh93/edit/history.c
index 4cc7c01a21..de5e4a8790 100644
--- a/usr/src/lib/libshell/common/edit/history.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/edit/history.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -89,7 +89,7 @@
#if !KSHELL
# define new_of(type,x) ((type*)malloc((unsigned)sizeof(type)+(x)))
# define NIL(type) ((type)0)
-# define path_relative(x) (x)
+# define path_relative(s,x) (s,x)
# ifdef __STDC__
# define nv_getval(s) getenv(#s)
# else
@@ -162,7 +162,7 @@ static History_t *hist_ptr;
acctfd = 0;
return(0);
}
- if(strmatch(acctfile,e_devfdNN))
+ if(sh_isdevfd(acctfile))
{
char newfile[16];
sfsprintf(newfile,sizeof(newfile),"%.8s%d\0",e_devfdNN,acctfd);
@@ -177,8 +177,7 @@ static History_t *hist_ptr;
#if SHOPT_AUDIT
static int sh_checkaudit(History_t *hp, const char *name, char *logbuf, size_t len)
{
- Shell_t *shp = (Shell_t*)hp->histshell;
- char *buff, *cp, *last;
+ char *cp, *last;
int id1, id2, r=0, n, fd;
if((fd=open(name, O_RDONLY)) < 0)
return(0);
@@ -196,9 +195,9 @@ static int sh_checkaudit(History_t *hp, const char *name, char *logbuf, size_t l
id1 = id2 = strtol(cp,&last,10);
if(*last=='-')
id1 = strtol(last+1,&last,10);
- if(shp->euserid >=id1 && shp->euserid <= id2)
+ if(shgd->euserid >=id1 && shgd->euserid <= id2)
r |= 1;
- if(shp->userid >=id1 && shp->userid <= id2)
+ if(shgd->userid >=id1 && shgd->userid <= id2)
r |= 2;
cp = last;
}
@@ -236,7 +235,7 @@ int sh_histinit(void *sh_context)
register char *cp;
register off_t hsize = 0;
- if(shp->hist_ptr=hist_ptr)
+ if(shgd->hist_ptr=hist_ptr)
return(1);
if(!(histname = nv_getval(HISTFILE)))
{
@@ -253,7 +252,7 @@ int sh_histinit(void *sh_context)
{
/* reuse history file if same name */
wasopen = 0;
- shp->hist_ptr = hist_ptr = hp;
+ shgd->hist_ptr = hist_ptr = hp;
if(strcmp(histname,hp->histname)==0)
return(1);
else
@@ -261,7 +260,7 @@ int sh_histinit(void *sh_context)
}
#endif
retry:
- cp = path_relative(histname);
+ cp = path_relative(shp,histname);
if(!histinit)
histmode = S_IRUSR|S_IWUSR;
if((fd=open(cp,O_BINARY|O_APPEND|O_RDWR|O_CREAT,histmode))>=0)
@@ -290,7 +289,7 @@ retry:
{
#if KSHELL
/* don't allow root a history_file in /tmp */
- if(shp->userid)
+ if(shgd->userid)
#endif /* KSHELL */
{
if(!(fname = pathtmp(NIL(char*),0,0,NIL(int*))))
@@ -312,7 +311,7 @@ retry:
close(fd);
return(0);
}
- shp->hist_ptr = hist_ptr = hp;
+ shgd->hist_ptr = hist_ptr = hp;
hp->histshell = (void*)shp;
hp->histsize = maxlines;
hp->histmask = histmask;
@@ -335,6 +334,7 @@ retry:
int first,last;
off_t mark,size = (HIST_MAX/4)+maxlines*HIST_LINE;
hp->histind = first = hist_nearend(hp,hp->histfp,hsize-size);
+ histinit = 1;
hist_eof(hp); /* this sets histind to last command */
if((hist_start = (last=(int)hp->histind)-maxlines) <=0)
hist_start = 1;
@@ -394,6 +394,7 @@ retry:
}
if(fd>=0)
{
+ fcntl(fd,F_SETFD,FD_CLOEXEC);
hp->tty = strdup(ttyname(2));
hp->auditfp = sfnew((Sfio_t*)0,NULL,-1,fd,SF_WRITE);
}
@@ -409,7 +410,6 @@ retry:
void hist_close(register History_t *hp)
{
- Shell_t *shp = (Shell_t*)hp->histshell;
sfclose(hp->histfp);
#if SHOPT_AUDIT
if(hp->auditfp)
@@ -421,7 +421,7 @@ void hist_close(register History_t *hp)
#endif /* SHOPT_AUDIT */
free((char*)hp);
hist_ptr = 0;
- shp->hist_ptr = 0;
+ shgd->hist_ptr = 0;
#if SHOPT_ACCTFILE
if(acctfd)
{
@@ -481,7 +481,10 @@ static History_t* hist_trim(History_t *hp, int n)
else
pathtmp(tmpname,".","hist",NIL(int*));
if(rename(name,tmpname) < 0)
+ {
+ free(tmpname);
tmpname = name;
+ }
fd = open(tmpname,O_RDONLY);
sfsetfd(hist_old->histfp,fd);
if(tmpname==name)
@@ -624,7 +627,17 @@ void hist_eof(register History_t *hp)
register char *cp,*first,*endbuff;
register int incmd = 0;
register off_t count = hp->histcnt;
- int n,skip=0;
+ int oldind,n,skip=0;
+ off_t last = sfseek(hp->histfp,(off_t)0,SEEK_END);
+ if(last < count)
+ {
+ last = -1;
+ count = 2+HIST_MARKSZ;
+ oldind = hp->histind;
+ if((hp->histind -= hp->histsize) < 0)
+ hp->histind = 1;
+ }
+again:
sfseek(hp->histfp,count,SEEK_SET);
while(cp=(char*)sfreserve(hp->histfp,SF_UNBOUND,0))
{
@@ -662,16 +675,11 @@ void hist_eof(register History_t *hp)
hp->histmarker=count+2;
cp += (HIST_MARKSZ-1);
hp->histind--;
-#ifdef future
- if(cp <= endbuff)
+ if(!histinit && (cp <= endbuff))
{
unsigned char *marker = (unsigned char*)(cp-4);
- int n = ((marker[0]<<16)
-|(marker[1]<<8)|marker[2]);
- if((n<count/2) && n != (hp->histind+1))
- errormsg(SH_DICT,2,"index=%d marker=%d", hp->histind, n);
+ hp->histind = ((marker[0]<<16)|(marker[1]<<8)|marker[2] -1);
}
-#endif
}
break;
case HIST_UNDO:
@@ -709,6 +717,31 @@ void hist_eof(register History_t *hp)
hp->histcmds[hist_ind(hp,++hp->histind)] = count;
}
hp->histcnt = count;
+ if(incmd && last)
+ {
+ sfputc(hp->histfp,0);
+ hist_cancel(hp);
+ count = 2;
+ skip = 0;
+ oldind -= hp->histind;
+ hp->histind = hp->histind-hp->histsize + oldind +2;
+ if(hp->histind<0)
+ hp->histind = 1;
+ if(last<0)
+ {
+ char buff[HIST_MARKSZ];
+ int fd = open(hp->histname,O_RDWR);
+ if(fd>=0)
+ {
+ hist_marker(buff,hp->histind);
+ write(fd,(char*)hist_stamp,2);
+ write(fd,buff,HIST_MARKSZ);
+ close(fd);
+ }
+ }
+ last = 0;
+ goto again;
+ }
}
/*
@@ -800,9 +833,8 @@ static int hist_write(Sfio_t *iop,const void *buff,register int insize,Sfdisc_t*
#if SHOPT_AUDIT
if(hp->auditfp)
{
- Shell_t *shp = (Shell_t*)hp->histshell;
time_t t=time((time_t*)0);
- sfprintf(hp->auditfp,"%u;%u;%s;%*s%c",sh_isoption(SH_PRIVILEGED)?shp->euserid:shp->userid,t,hp->tty,size,buff,0);
+ sfprintf(hp->auditfp,"%u;%u;%s;%*s%c",sh_isoption(SH_PRIVILEGED)?shgd->euserid:shgd->userid,t,hp->tty,size,buff,0);
sfsync(hp->auditfp);
}
#endif /* SHOPT_AUDIT */
@@ -1025,7 +1057,7 @@ int hist_match(register History_t *hp,off_t offset,char *string,int *coffset)
int hist_copy(char *s1,int size,int command,int line)
{
register int c;
- register History_t *hp = sh_getinterp()->hist_ptr;
+ register History_t *hp = shgd->hist_ptr;
register int count = 0;
register char *s1max = s1+size;
if(!hp)
diff --git a/usr/src/lib/libshell/common/edit/vi.c b/usr/src/contrib/ast/src/cmd/ksh93/edit/vi.c
index 2abcbd53e4..38bf4fda5d 100644
--- a/usr/src/lib/libshell/common/edit/vi.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/edit/vi.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -43,16 +43,11 @@
#include "terminal.h"
#include "FEATURE/time"
-#if SHOPT_OLDTERMIO
-# undef ECHOCTL
-# define echoctl (vp->ed->e_echoctl)
+#ifdef ECHOCTL
+# define echoctl ECHOCTL
#else
-# ifdef ECHOCTL
-# define echoctl ECHOCTL
-# else
-# define echoctl 0
-# endif /* ECHOCTL */
-#endif /*SHOPT_OLDTERMIO */
+# define echoctl 0
+#endif /* ECHOCTL */
#ifndef FIORDCHK
# define NTICKS 5 /* number of ticks for typeahead */
@@ -218,7 +213,7 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit
{
Edit_t *ed = (Edit_t*)context;
register int i; /* general variable */
- register int term_char; /* read() termination character */
+ register int term_char=0; /* read() termination character */
register Vi_t *vp = ed->e_vi;
char prompt[PRSIZE+2]; /* prompt */
genchar Physical[2*MAXLINE]; /* physical image */
@@ -231,7 +226,7 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit
#if SHOPT_RAWONLY
# define viraw 1
#else
- int viraw = (sh_isoption(SH_VIRAW) || sh.st.trap[SH_KEYTRAP]);
+ int viraw = (sh_isoption(SH_VIRAW) || ed->sh->st.trap[SH_KEYTRAP]);
# ifndef FIORDCHK
clock_t oldtime, newtime;
struct tms dummy;
@@ -267,7 +262,7 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit
#endif /* FIORDCHK */
#if KSHELL
/* abort of interrupt has occurred */
- if(sh.trapnote&SH_SIGSET)
+ if(ed->sh->trapnote&SH_SIGSET)
i = -1;
else
#endif /* KSHELL */
@@ -621,6 +616,10 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit
last_virt = ed_external(virtual,shbuf);
}
#endif /* SHOPT_MULTIBYTE */
+#if SHOPT_EDPREDICT
+ if(vp->ed->nhlist)
+ ed_histlist(vp->ed,0);
+#endif /* SHOPT_EDPREDICT */
return(last_virt);
}
else
@@ -733,6 +732,8 @@ static int cntlmode(Vi_t *vp)
/*** make sure cursor is at the last char ***/
sync_cursor(vp);
}
+ else if(last_virt > INVALID )
+ cur_virt++;
/*** Read control char until something happens to cause a ***/
/* return to APPEND/REPLACE mode */
@@ -824,6 +825,7 @@ static int cntlmode(Vi_t *vp)
refresh(vp,CONTROL);
ed_getchar(vp->ed,-1);
restore_v(vp);
+ ed_ungetchar(vp->ed,'a');
break;
}
@@ -855,6 +857,15 @@ static int cntlmode(Vi_t *vp)
case 'j': /** get next command **/
case '+': /** get next command **/
+#if SHOPT_EDPREDICT
+ if(vp->ed->hlist)
+ {
+ if(vp->ed->hoff >= vp->ed->hmax)
+ goto ringbell;
+ vp->ed->hoff++;
+ goto hupdate;
+ }
+#endif /* SHOPT_EDPREDICT */
curhline += vp->repeat;
if( curhline > histmax )
{
@@ -875,6 +886,19 @@ static int cntlmode(Vi_t *vp)
case 'k': /** get previous command **/
case '-': /** get previous command **/
+#if SHOPT_EDPREDICT
+ if(vp->ed->hlist)
+ {
+ if(vp->ed->hoff == 0)
+ goto ringbell;
+ vp->ed->hoff--;
+ hupdate:
+ ed_histlist(vp->ed,*vp->ed->hlist!=0);
+ vp->nonewline++;
+ ed_ungetchar(vp->ed,cntl('L'));
+ continue;
+ }
+#endif /* SHOPT_EDPREDICT */
if( curhline == histmax )
{
vp->u_space = tmp_u_space;
@@ -908,6 +932,17 @@ static int cntlmode(Vi_t *vp)
#endif /* SHOPT_MULTIBYTE */
if((last_virt=genlen(virtual)-1) >= 0 && cur_virt == INVALID)
cur_virt = 0;
+#if SHOPT_EDPREDICT
+ if(vp->ed->hlist)
+ {
+ ed_histlist(vp->ed,0);
+ if(c=='\n')
+ ed_ungetchar(vp->ed,c);
+ ed_ungetchar(vp->ed,cntl('L'));
+ vp->nonewline = 1;
+ cur_virt = 0;
+ }
+#endif /*SHOPT_EDPREDICT */
break;
@@ -994,8 +1029,21 @@ static int cntlmode(Vi_t *vp)
/* FALLTHROUGH */
case '\n': /** send to shell **/
+#if SHOPT_EDPREDICT
+ if(!vp->ed->hlist)
return(ENTER);
-
+ case '\t': /** bring choice to edit **/
+ if(vp->ed->hlist)
+ {
+ if(vp->repeat > vp->ed->nhlist-vp->ed->hoff)
+ goto ringbell;
+ curhline = vp->ed->hlist[vp->repeat+vp->ed->hoff-1]->index;
+ goto newhist;
+ }
+ goto ringbell;
+#else
+ return(ENTER);
+#endif /* SHOPT_EDPREDICT */
case ESC:
/* don't ring bell if next char is '[' */
if(!lookahead)
@@ -1321,7 +1369,6 @@ static void getline(register Vi_t* vp,register int mode)
register int tmp;
int max_virt=0, last_save=0;
genchar saveline[MAXLINE];
-
vp->addnl = 1;
if( mode == ESC )
@@ -1342,6 +1389,8 @@ static void getline(register Vi_t* vp,register int mode)
c = UWERASE;
else if( c == usrlnext )
c = ULNEXT;
+ else if(mode==SEARCH && c==editb.e_intr)
+ c = UINTR;
if( c == ULNEXT)
{
@@ -1351,6 +1400,8 @@ static void getline(register Vi_t* vp,register int mode)
refresh(vp,INPUT);
continue;
}
+ if(c!='\t')
+ vp->ed->e_tabcount = 0;
switch( c )
{
@@ -1404,6 +1455,11 @@ static void getline(register Vi_t* vp,register int mode)
}
break;
+ case UINTR:
+ first_virt = 0;
+ cdelete(vp,cur_virt+1, BAD);
+ cur_virt = -1;
+ return;
case UERASE: /** user erase char **/
/*** treat as backspace ***/
@@ -1486,12 +1542,17 @@ static void getline(register Vi_t* vp,register int mode)
if( mode != SEARCH )
save_last(vp);
refresh(vp,INPUT);
- last_phys++;
+ physical[++last_phys] = 0;
return;
case '\t': /** command completion **/
if(mode!=SEARCH && last_virt>=0 && (vp->ed->e_tabcount|| !isblank(cur_virt)) && vp->ed->sh->nextprompt)
{
+ if(virtual[cur_virt]=='\\')
+ {
+ virtual[cur_virt] = '\t';
+ break;
+ }
if(vp->ed->e_tabcount==0)
{
ed_ungetchar(vp->ed,'\\');
@@ -1572,7 +1633,11 @@ static int mvcursor(register Vi_t* vp,register int motion)
switch(motion=getcount(vp,ed_getchar(vp->ed,-1)))
{
case 'A':
+#if SHOPT_EDPREDICT
+ if(!vp->ed->hlist && cur_virt>=0 && cur_virt<(SEARCHSIZE-2) && cur_virt == last_virt)
+#else
if(cur_virt>=0 && cur_virt<(SEARCHSIZE-2) && cur_virt == last_virt)
+#endif /* SHOPT_EDPREDICT */
{
virtual[last_virt + 1] = '\0';
#if SHOPT_MULTIBYTE
@@ -1812,15 +1877,14 @@ static void putstring(register Vi_t *vp,register int col, register int nchars)
static void refresh(register Vi_t* vp, int mode)
{
register int p;
- register int regb;
+ register int v;
register int first_w = vp->first_wind;
int p_differ;
int new_lw;
int ncur_phys;
int opflag; /* search optimize flag */
-# define w regb
-# define v regb
+# define w v
/*** find out if it's necessary to start translating at beginning ***/
@@ -1831,6 +1895,31 @@ static void refresh(register Vi_t* vp, int mode)
mode = TRANSLATE;
}
v = cur_virt;
+#if SHOPT_EDPREDICT
+ if(mode==INPUT && v>0 && virtual[0]=='#' && v==last_virt && virtual[v]!='*' && sh_isoption(SH_VI))
+ {
+ int n;
+ virtual[last_virt+1] = 0;
+# if SHOPT_MULTIBYTE
+ ed_external(virtual,(char*)virtual);
+# endif /* SHOPT_MULTIBYTE */
+ n = ed_histgen(vp->ed,(char*)virtual);
+# if SHOPT_MULTIBYTE
+ ed_internal((char*)virtual,virtual);
+# endif /* SHOPT_MULTIBYTE */
+ if(vp->ed->hlist)
+ {
+ ed_histlist(vp->ed,n);
+ pr_string(vp,Prompt);
+ vp->ocur_virt = INVALID;
+ ed_setcursor(vp->ed,physical,0,cur_phys,0);
+ }
+ else
+ ed_ringbell();
+ }
+ else if(mode==INPUT && v<=1 && vp->ed->hlist)
+ ed_histlist(vp->ed,0);
+#endif /* SHOPT_EDPREDICT */
if( v<vp->ocur_virt || vp->ocur_virt==INVALID
|| ( v==vp->ocur_virt
&& (!is_print(virtual[v]) || !is_print(vp->o_v_char))) )
@@ -2114,7 +2203,7 @@ static void save_v(register Vi_t *vp)
*/
static int curline_search(Vi_t *vp, const char *string)
{
- register int len=strlen(string);
+ register size_t len=strlen(string);
register const char *dp,*cp=string, *dpmax;
#if SHOPT_MULTIBYTE
ed_external(vp->u_space,(char*)vp->u_space);
@@ -2191,10 +2280,11 @@ static int search(register Vi_t* vp,register int mode)
i = INVALID;
if( new_direction==1 && curhline >= histmax )
curhline = histmin + 1;
- location = hist_find(sh.hist_ptr,((char*)virtual)+1, curhline, 1, new_direction);
+ location = hist_find(shgd->hist_ptr,((char*)virtual)+1, curhline, 1, new_direction);
}
cur_virt = i;
strncpy(lsearch, ((char*)virtual)+1, SEARCHSIZE);
+ lsearch[SEARCHSIZE-1] = 0;
if( (curhline=location.hist_command) >=0 )
{
vp->ocur_virt = INVALID;
@@ -2351,7 +2441,7 @@ addin:
last_virt = i;
ed_ringbell();
}
- else if(c == '=' && !vp->repeat_set)
+ else if((c=='=' || (c=='\\'&&virtual[i]=='/')) && !vp->repeat_set)
{
last_virt = i;
vp->nonewline++;
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/features/cmds b/usr/src/contrib/ast/src/cmd/ksh93/features/cmds
new file mode 100644
index 0000000000..4d60e2cd7e
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/cmds
@@ -0,0 +1,27 @@
+#define _pth
+#cmd newgrp,test,id,wc,cut,logname,universe,pfexec,tput
+#pth ed fail{
+# echo '#define _pth_ed "ed" /* ed not found on standard PATH */'
+#}end
+
+# Statically define the available commands since detecting them inside
+# proto is a circular problem (cut, for example, is provided by ksh93)
+
+define _cmd_newgrp 1
+define _usr_bin_newgrp 1
+define _cmd_test 1
+define _usr_bin_test 1
+define _cmd_id 1
+define _usr_bin_id 1
+define _cmd_wc 1
+define _usr_bin_wc 1
+define _cmd_cut 1
+define _usr_bin_cut 1
+define _cmd_logname 1
+define _usr_bin_logname 1
+define _cmd_pfexec 1
+define _usr_bin_pfexec 1
+define _cmd_tput 1
+define _usr_bin_tput 1
+define _pth_ed "/usr/bin/ed"
+
diff --git a/usr/src/lib/libshell/common/features/dynamic b/usr/src/contrib/ast/src/cmd/ksh93/features/dynamic
index 33f2d138e9..33f2d138e9 100644
--- a/usr/src/lib/libshell/common/features/dynamic
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/dynamic
diff --git a/usr/src/lib/libshell/common/features/externs b/usr/src/contrib/ast/src/cmd/ksh93/features/externs
index bc267591d8..bc267591d8 100644
--- a/usr/src/lib/libshell/common/features/externs
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/externs
diff --git a/usr/src/lib/libshell/common/features/locale b/usr/src/contrib/ast/src/cmd/ksh93/features/locale
index ee9bcae6fe..4155b53075 100644
--- a/usr/src/lib/libshell/common/features/locale
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/locale
@@ -1,5 +1,7 @@
-hdr locale,wchar
+hdr locale,wchar,wctype
lib locale,localeconv,wctype,iswctype,iswblank
+lib wctrans,towctrans wctype.h
+typ wctrans_t wctype.h
cat{
#if _PACKAGE_ast
# undef _hdr_locale
diff --git a/usr/src/lib/libshell/common/features/math.sh b/usr/src/contrib/ast/src/cmd/ksh93/features/math.sh
index b06fcefbb2..d0b0667656 100644
--- a/usr/src/lib/libshell/common/features/math.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/math.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -20,11 +20,11 @@
: generate the ksh math builtin table
: include math.tab
-# @(#)math.sh (AT&T Research) 2009-08-18
+# @(#)math.sh (AT&T Research) 2012-06-13
command=$0
iffeflags="-n -v"
-iffehdrs="math.h ieeefp.h"
+iffehdrs="math.h"
iffelibs="-lm"
table=/dev/null
@@ -32,9 +32,6 @@ eval $1
shift
table=$1
-names=
-tests=
-
: check long double
eval `iffe $iffeflags -c "$cc" - typ long.double 2>&$stderr`
@@ -45,25 +42,63 @@ eval `iffe $iffeflags -F ast_standards.h -c "$cc" - tst use_ast_standards -lm 'n
case $_use_ast_standards in
1) iffeflags="$iffeflags -F ast_standards.h" ;;
esac
+eval `iffe $iffeflags -c "$cc" - tst use_ieeefp -lm 'note{' 'ieeefp.h plays nice' '}end' 'link{' '#include <math.h>' '#include <ieeefp.h>' 'int main() { return 0; }' '}end'`
+case $_use_ieeefp in
+1) iffehdrs="$iffehdrs ieeefp.h" ;;
+esac
: read the table
exec < $table
-while read type args name aka comment
+ifs=$IFS
+libs=
+names=
+nums=
+while read type args name aka
do case $type in
- [fi]) names="$names $name"
- tests="$tests,$name"
+ [fix]) names="$names $name"
+ libs="$libs,$name"
case $_typ_long_double in
- 1) tests="$tests,${name}l" ;;
+ 1) libs="$libs,${name}l" ;;
esac
- eval TYPE_$name=$type ARGS_$name=$args AKA_$name=$aka
+ for a in $aka
+ do case $a in
+ '{'*) break
+ ;;
+ *=*) IFS='=|'
+ set $a
+ IFS=$ifs
+ case ",$libs" in
+ *,$1,*) ;;
+ *) names="$names $1"
+ libs="$libs,$1"
+ case $_typ_long_double in
+ 1) libs="$libs,${1}l" ;;
+ esac
+ ;;
+ esac
+ shift
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ case ",$nums" in
+ *,$1,*) ;;
+ *) nums="$nums,$1" ;;
+ esac
+ shift
+ done
+ ;;
+ esac
+ done
+ eval TYPE_$name='$type' ARGS_$name='$args' AKA_$name='$aka'
;;
esac
done
: check the math library
-eval `iffe $iffeflags -c "$cc" - lib $tests $iffehdrs $iffelibs 2>&$stderr`
+eval `iffe $iffeflags -c "$cc" - lib $libs $iffehdrs $iffelibs 2>&$stderr`
lib=
for name in $names
do eval x='$'_lib_${name}l y='$'_lib_${name}
@@ -78,6 +113,7 @@ do eval x='$'_lib_${name}l y='$'_lib_${name}
esac
done
eval `iffe $iffeflags -c "$cc" - dat,npt,mac $lib $iffehdrs $iffelibs 2>&$stderr`
+eval `iffe $iffeflags -c "$cc" - num $nums $iffehdrs $iffelibs 2>&$stderr`
cat <<!
#pragma prototyped
@@ -104,6 +140,12 @@ ht=' '
tab=
for name in $names
do eval x='$'_lib_${name}l y='$'_lib_${name} r='$'TYPE_${name} a='$'ARGS_${name} aka='$'AKA_${name}
+ case $r in
+ i) L=int R=1 ;;
+ x) L=Sfdouble_t R=4 ;;
+ *) L=Sfdouble_t R=0 ;;
+ esac
+ F=local_$name
case $x:$y in
1:*) f=${name}l
t=Sfdouble_t
@@ -113,37 +155,104 @@ do eval x='$'_lib_${name}l y='$'_lib_${name} r='$'TYPE_${name} a='$'ARGS_${name}
t=double
local=$_typ_long_double
;;
- *) case $aka in
- *=*) f=${aka%%=*}
- v=${aka#*=}
- eval x='$'_lib_${f}l y='$'_lib_${f}
- case $x:$y in
- 1:*) f=${f}l
+ *) body=
+ for k in $aka
+ do case $body in
+ ?*) body="$body $k"
+ continue
+ ;;
+ esac
+ case $k in
+ '{'*) body=$k
+ ;;
+ *=*) IFS='=|'
+ set $k
+ IFS=$ifs
+ f=$1
+ shift
+ v=$*
+ eval x='$'_lib_${f}l y='$'_lib_${f}
+ case $x:$y in
+ 1:*) f=${f}l
+ ;;
+ *:1) ;;
+ *) continue
+ ;;
+ esac
+ y=
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ eval x='$'_num_$1
+ case $x in
+ 1) case $y in
+ ?*) y="$y || " ;;
+ esac
+ y="${y}q == $1"
+ ;;
+ esac
+ shift
+ done
+ case $y in
+ '') ;;
+ *) r=int R=1
+ echo "static $r $F(Sfdouble_t a1) { $r q = $f(a1); return $y; }"
+ tab="$tab$nl$ht\"\\0${R}${a}${name}\",$ht(Math_f)(uintptr_t)${F},"
+ break
+ ;;
+ esac
;;
- *:1) ;;
- *) continue
+ esac
+ done
+ case $body in
+ ?*) code="static $L $F("
+ sep=
+ ta=
+ tc=
+ td=
+ for p in 1 2 3 4 5 6 7 8 9
+ do case $R:$p in
+ 4:2) T=int ;;
+ *) T=Sfdouble_t ;;
+ esac
+ code="$code${sep}$T a$p"
+ ta="$ta${sep}a$p"
+ tc="$tc${sep}0"
+ td="${td}$T a$p;"
+ case $a in
+ $p) break ;;
+ esac
+ sep=","
+ done
+ _it_links_=0
+ eval `iffe $iffeflags -c "$cc" - tst it_links_ note{ $F function links }end link{ "static $L $F($ta)$td${body}int main(){return $F($tc)!=0;}" }end sfio.h $iffehdrs $iffelibs 2>&$stderr`
+ case $_it_links_ in
+ 1) code="$code)$body"
+ echo "$code"
+ tab="$tab$nl$ht\"\\0${R}${a}${name}\",$ht(Math_f)(uintptr_t)${F},"
;;
esac
- L=local_$name r=int R=1
- echo "#ifdef $v${nl}static $r $L(Sfdouble_t x) { return $f(x) == $v; }${nl}#endif"
- tab="$tab$nl#ifdef $v$nl$ht\"\\0${R}${a}${name}\",$ht(Math_f)${L},${nl}#endif"
;;
esac
continue
;;
esac
- eval n='$'_npt_$f m='$'_mac_$f d='$'_dat_$f
case $r in
- i) L=int r=int R=1 ;;
- *) L=Sfdouble_t r=$t R=0 ;;
+ i) r=int ;;
+ *) r=$t ;;
esac
+ eval n='$'_npt_$f m='$'_mac_$f d='$'_dat_$f
case $d:$m:$n in
1:*:*|*:1:*)
;;
*:*:1) code="extern $r $f("
sep=
for p in 1 2 3 4 5 6 7
- do code="$code${sep}$t"
+ do case $p:$f in
+ 2:ldexp*) code="$code${sep}int" ;;
+ *) code="$code${sep}$t" ;;
+ esac
case $a in
$p) break ;;
esac
@@ -160,7 +269,11 @@ do eval x='$'_lib_${name}l y='$'_lib_${name} r='$'TYPE_${name} a='$'ARGS_${name}
sep=
for p in 1 2 3 4 5 6 7 8 9
do args="$args${sep}a$p"
- code="$code${sep}Sfdouble_t a$p"
+ case $R:$p in
+ 4:2) T=int ;;
+ *) T=Sfdouble_t ;;
+ esac
+ code="$code${sep}$T a$p"
case $a in
$p) break ;;
esac
@@ -172,7 +285,13 @@ do eval x='$'_lib_${name}l y='$'_lib_${name} r='$'TYPE_${name} a='$'ARGS_${name}
;;
esac
for x in $name $aka
- do tab="$tab$nl$ht\"\\0${R}${a}${x}\",$ht(Math_f)$f,"
+ do case $x in
+ '{'*) break
+ ;;
+ *=*) continue
+ ;;
+ esac
+ tab="$tab$nl$ht\"\\0${R}${a}${x}\",$ht(Math_f)(uintptr_t)$f,"
done
done
tab="$tab$nl$ht\"\",$ht$ht(Math_f)0"
diff --git a/usr/src/lib/libshell/common/features/options b/usr/src/contrib/ast/src/cmd/ksh93/features/options
index c3f48b64d4..c3f48b64d4 100644..100755
--- a/usr/src/lib/libshell/common/features/options
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/options
diff --git a/usr/src/lib/libshell/common/features/poll b/usr/src/contrib/ast/src/cmd/ksh93/features/poll
index 6fa8fb308c..da219908c9 100644
--- a/usr/src/lib/libshell/common/features/poll
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/poll
@@ -1,8 +1,10 @@
+ref -lsocket -lnsl
hdr,sys poll,socket,netinet/in
lib select,poll,socket
lib htons,htonl sys/types.h sys/socket.h netinet/in.h
lib getaddrinfo sys/types.h sys/socket.h netdb.h
typ fd_set sys/socket.h sys/select.h
+typ socklen_t unistd.h sys/socket.h = unsigned int
tst pipe_socketpair note{ use socketpair() for peekable pipe() }end execute{
#include <ast.h>
#include <signal.h>
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/features/rlimits b/usr/src/contrib/ast/src/cmd/ksh93/features/rlimits
new file mode 100644
index 0000000000..9a340fee70
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/rlimits
@@ -0,0 +1,27 @@
+hdr,sys resource,vlimit sys/time.h
+lib getrlimit,getrlimit64,ulimit,vlimit
+typ rlim_t,rlim64_t sys/types.h sys/time.h sys/resource.h
+
+cat{
+
+#if _sys_resource
+# include <sys/resource.h>
+# if _lib_getrlimit64
+# undef getrlimit
+# define getrlimit getrlimit64
+# undef setrlimit
+# define setrlimit setrlimit64
+# if _typ_rlim64_t
+# undef rlimit
+# define rlimit rlimit64
+# undef rlim_t
+# define rlim_t rlim64_t
+# endif
+# ifdef RLIM64_INFINITY
+# undef RLIM_INFINITY
+# define RLIM_INFINITY RLIM64_INFINITY
+# endif
+# endif
+#endif
+
+}end
diff --git a/usr/src/lib/libshell/common/features/setjmp b/usr/src/contrib/ast/src/cmd/ksh93/features/setjmp
index a3504ee3e2..a3504ee3e2 100644
--- a/usr/src/lib/libshell/common/features/setjmp
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/setjmp
diff --git a/usr/src/lib/libshell/common/features/sigfeatures b/usr/src/contrib/ast/src/cmd/ksh93/features/sigfeatures
index 58beaf8daa..406131c8c6 100644
--- a/usr/src/lib/libshell/common/features/sigfeatures
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/sigfeatures
@@ -36,13 +36,13 @@ tst output{
#include <signal.h>
int main()
{
- #ifdef SIGRTMIN
+ #ifdef _SIGRTMIN
printf("#undef _SIGRTMIN\n");
- printf("#define _SIGRTMIN %d\n", SIGRTMIN);
+ printf("#define _SIGRTMIN %d\n", _SIGRTMIN);
#endif
- #ifdef SIGRTMAX
+ #ifdef _SIGRTMAX
printf("#undef _SIGRTMAX\n");
- printf("#define _SIGRTMAX %d\n", SIGRTMAX);
+ printf("#define _SIGRTMAX %d\n", _SIGRTMAX);
#endif
return 0;
}
diff --git a/usr/src/lib/libshell/common/features/time b/usr/src/contrib/ast/src/cmd/ksh93/features/time
index f8d2129841..f8d2129841 100644
--- a/usr/src/lib/libshell/common/features/time
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/time
diff --git a/usr/src/lib/libshell/common/features/ttys b/usr/src/contrib/ast/src/cmd/ksh93/features/ttys
index 693dbd1be1..693dbd1be1 100644
--- a/usr/src/lib/libshell/common/features/ttys
+++ b/usr/src/contrib/ast/src/cmd/ksh93/features/ttys
diff --git a/usr/src/lib/libshell/common/fun/dirs b/usr/src/contrib/ast/src/cmd/ksh93/fun/dirs
index 0329970f3b..0329970f3b 100644..100755
--- a/usr/src/lib/libshell/common/fun/dirs
+++ b/usr/src/contrib/ast/src/cmd/ksh93/fun/dirs
diff --git a/usr/src/lib/libshell/common/fun/popd b/usr/src/contrib/ast/src/cmd/ksh93/fun/popd
index 1bc9346f40..1bc9346f40 100644..100755
--- a/usr/src/lib/libshell/common/fun/popd
+++ b/usr/src/contrib/ast/src/cmd/ksh93/fun/popd
diff --git a/usr/src/lib/libshell/common/fun/pushd b/usr/src/contrib/ast/src/cmd/ksh93/fun/pushd
index 1bc9346f40..1bc9346f40 100644..100755
--- a/usr/src/lib/libshell/common/fun/pushd
+++ b/usr/src/contrib/ast/src/cmd/ksh93/fun/pushd
diff --git a/usr/src/lib/libshell/common/include/argnod.h b/usr/src/contrib/ast/src/cmd/ksh93/include/argnod.h
index e568efca63..2ed73026eb 100644
--- a/usr/src/lib/libshell/common/include/argnod.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/argnod.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/include/builtins.h b/usr/src/contrib/ast/src/cmd/ksh93/include/builtins.h
index 510f8e2330..b9b4233d40 100644
--- a/usr/src/lib/libshell/common/include/builtins.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/builtins.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -26,23 +26,23 @@
#include "FEATURE/dynamic"
#include "shtable.h"
-#define SYSLOGIN (sh.bltin_cmds)
-#define SYSEXEC (sh.bltin_cmds+1)
-#define SYSSET (sh.bltin_cmds+2)
-#define SYSTRUE (sh.bltin_cmds+4)
-#define SYSCOMMAND (sh.bltin_cmds+5)
-#define SYSCD (sh.bltin_cmds+6)
-#define SYSBREAK (sh.bltin_cmds+7)
-#define SYSCONT (sh.bltin_cmds+8)
-#define SYSTYPESET (sh.bltin_cmds+9)
-#define SYSTEST (sh.bltin_cmds+10)
-#define SYSBRACKET (sh.bltin_cmds+11)
-#define SYSLET (sh.bltin_cmds+12)
-#define SYSEXPORT (sh.bltin_cmds+13)
-#define SYSDOT (sh.bltin_cmds+14)
-#define SYSRETURN (sh.bltin_cmds+15)
+#define SYSLOGIN (shgd->bltin_cmds)
+#define SYSEXEC (shgd->bltin_cmds+1)
+#define SYSSET (shgd->bltin_cmds+2)
+#define SYSTRUE (shgd->bltin_cmds+4)
+#define SYSCOMMAND (shgd->bltin_cmds+5)
+#define SYSCD (shgd->bltin_cmds+6)
+#define SYSBREAK (shgd->bltin_cmds+7)
+#define SYSCONT (shgd->bltin_cmds+8)
+#define SYSTYPESET (shgd->bltin_cmds+9)
+#define SYSTEST (shgd->bltin_cmds+10)
+#define SYSBRACKET (shgd->bltin_cmds+11)
+#define SYSLET (shgd->bltin_cmds+12)
+#define SYSEXPORT (shgd->bltin_cmds+13)
+#define SYSDOT (shgd->bltin_cmds+14)
+#define SYSRETURN (shgd->bltin_cmds+15)
#if SHOPT_BASH
-# define SYSLOCAL (sh.bltin_cmds+16)
+# define SYSLOCAL (shgd->bltin_cmds+16)
#else
# define SYSLOCAL 0
#endif
@@ -53,60 +53,60 @@
# define extern __EXPORT__
#endif
-extern int b_alias(int, char*[],void*);
-extern int b_break(int, char*[],void*);
-extern int b_dot_cmd(int, char*[],void*);
-extern int b_enum(int, char*[],void*);
-extern int b_exec(int, char*[],void*);
-extern int b_eval(int, char*[],void*);
-extern int b_return(int, char*[],void*);
-extern int B_login(int, char*[],void*);
-extern int b_true(int, char*[],void*);
-extern int b_false(int, char*[],void*);
-extern int b_readonly(int, char*[],void*);
-extern int b_set(int, char*[],void*);
-extern int b_shift(int, char*[],void*);
-extern int b_trap(int, char*[],void*);
-extern int b_typeset(int, char*[],void*);
-extern int b_unset(int, char*[],void*);
-extern int b_unalias(int, char*[],void*);
+extern int b_alias(int, char*[],Shbltin_t*);
+extern int b_break(int, char*[],Shbltin_t*);
+extern int b_dot_cmd(int, char*[],Shbltin_t*);
+extern int b_enum(int, char*[],Shbltin_t*);
+extern int b_exec(int, char*[],Shbltin_t*);
+extern int b_eval(int, char*[],Shbltin_t*);
+extern int b_return(int, char*[],Shbltin_t*);
+extern int B_login(int, char*[],Shbltin_t*);
+extern int b_true(int, char*[],Shbltin_t*);
+extern int b_false(int, char*[],Shbltin_t*);
+extern int b_readonly(int, char*[],Shbltin_t*);
+extern int b_set(int, char*[],Shbltin_t*);
+extern int b_shift(int, char*[],Shbltin_t*);
+extern int b_trap(int, char*[],Shbltin_t*);
+extern int b_typeset(int, char*[],Shbltin_t*);
+extern int b_unset(int, char*[],Shbltin_t*);
+extern int b_unalias(int, char*[],Shbltin_t*);
/* The following are for job control */
#if defined(SIGCLD) || defined(SIGCHLD)
- extern int b_jobs(int, char*[],void*);
- extern int b_kill(int, char*[],void*);
+ extern int b_jobs(int, char*[],Shbltin_t*);
+ extern int b_kill(int, char*[],Shbltin_t*);
# ifdef SIGTSTP
- extern int b_bg(int, char*[],void*);
+ extern int b_bg(int, char*[],Shbltin_t*);
# endif /* SIGTSTP */
#endif
/* The following utilities are built-in because of side-effects */
-extern int b_builtin(int, char*[],void*);
-extern int b_cd(int, char*[],void*);
-extern int b_command(int, char*[],void*);
-extern int b_getopts(int, char*[],void*);
-extern int b_hist(int, char*[],void*);
-extern int b_let(int, char*[],void*);
-extern int b_read(int, char*[],void*);
-extern int b_ulimit(int, char*[],void*);
-extern int b_umask(int, char*[],void*);
+extern int b_builtin(int, char*[],Shbltin_t*);
+extern int b_cd(int, char*[],Shbltin_t*);
+extern int b_command(int, char*[],Shbltin_t*);
+extern int b_getopts(int, char*[],Shbltin_t*);
+extern int b_hist(int, char*[],Shbltin_t*);
+extern int b_let(int, char*[],Shbltin_t*);
+extern int b_read(int, char*[],Shbltin_t*);
+extern int b_ulimit(int, char*[],Shbltin_t*);
+extern int b_umask(int, char*[],Shbltin_t*);
#ifdef _cmd_universe
- extern int b_universe(int, char*[],void*);
+ extern int b_universe(int, char*[],Shbltin_t*);
#endif /* _cmd_universe */
#if SHOPT_FS_3D
- extern int b_vpath(int, char*[],void*);
+ extern int b_vpath(int, char*[],Shbltin_t*);
#endif /* SHOPT_FS_3D */
-extern int b_wait(int, char*[],void*);
-extern int b_whence(int, char*[],void*);
+extern int b_wait(int, char*[],Shbltin_t*);
+extern int b_whence(int, char*[],Shbltin_t*);
-extern int b_alarm(int, char*[],void*);
-extern int b_print(int, char*[],void*);
-extern int b_printf(int, char*[],void*);
-extern int b_pwd(int, char*[],void*);
-extern int b_sleep(int, char*[],void*);
-extern int b_test(int, char*[],void*);
+extern int b_alarm(int, char*[],Shbltin_t*);
+extern int b_print(int, char*[],Shbltin_t*);
+extern int b_printf(int, char*[],Shbltin_t*);
+extern int b_pwd(int, char*[],Shbltin_t*);
+extern int b_sleep(int, char*[],Shbltin_t*);
+extern int b_test(int, char*[],Shbltin_t*);
#if !SHOPT_ECHOPRINT
- extern int B_echo(int, char*[],void*);
+ extern int B_echo(int, char*[],Shbltin_t*);
#endif /* SHOPT_ECHOPRINT */
#undef extern
diff --git a/usr/src/lib/libshell/common/include/defs.h b/usr/src/contrib/ast/src/cmd/ksh93/include/defs.h
index 4520e31988..3010199832 100644
--- a/usr/src/lib/libshell/common/include/defs.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/defs.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -39,9 +39,6 @@
#include "argnod.h"
#include "name.h"
#include <ctype.h>
-#define _SH_PRIVATE
-#include <shcmd.h>
-#undef _SH_PRIVATE
#ifndef pointerof
#define pointerof(x) ((void*)((char*)0+(x)))
@@ -93,10 +90,13 @@ struct sh_scoped
int ioset;
unsigned short trapmax;
char *trap[SH_DEBUGTRAP+1];
+ char **otrap;
char **trapcom;
char **otrapcom;
void *timetrap;
struct Ufunction *real_fun; /* current 'function name' function */
+ int repl_index;
+ char *repl_arg;
};
struct limits
@@ -111,9 +111,43 @@ struct limits
unsigned char fs3d; /* non-zero for 3-d file system */
};
+#ifndef SH_wait_f_defined
+ typedef int (*Shwait_f)(int, long, int);
+# define SH_wait_f_defined
+#endif
+
+
+struct shared
+{
+ struct limits lim;
+ uid_t userid;
+ uid_t euserid;
+ gid_t groupid;
+ gid_t egroupid;
+ pid_t pid;
+ int32_t ppid;
+ unsigned char sigruntime[2];
+ Namval_t *bltin_nodes;
+ Namval_t *bltin_cmds;
+ History_t *hist_ptr;
+ char *shpath;
+ char *user;
+ char **sigmsg;
+ char *rcfile;
+ char **login_files;
+ void *ed_context;
+ void *init_context;
+ void *job_context;
+ int *stats;
+ int bltin_nnodes; /* number of bltins nodes */
+ int sigmax;
+ int nforks;
+ Shwait_f waitevent;
+};
+
#define _SH_PRIVATE \
+ struct shared *gd; /* global data */ \
struct sh_scoped st; /* scoped information */ \
- struct limits lim; /* run time limits */ \
Stk_t *stk; /* stack poiter */ \
Sfio_t *heredocs; /* current here-doc temp file */ \
Sfio_t *funlog; /* for logging function definitions */ \
@@ -124,6 +158,7 @@ struct limits
int path_err; /* last error on path search */ \
Dt_t *track_tree; /* for tracked aliases*/ \
Dt_t *var_base; /* global level variables */ \
+ Dt_t *openmatch; \
Namval_t *namespace; /* current active namespace*/ \
Namval_t *last_table; /* last table used in last nv_open */ \
Namval_t *prev_table; /* previous table used in nv_open */ \
@@ -132,32 +167,24 @@ struct limits
short curenv; /* current subshell number */ \
short jobenv; /* subshell number for jobs */ \
int infd; /* input file descriptor */ \
- int nextprompt; /* next prompt is PS<nextprompt> */ \
- int bltin_nnodes; /* number of bltins nodes */ \
- Namval_t *bltin_nodes; /* pointer to built-in variables */ \
- Namval_t *bltin_cmds; /* pointer to built-in commands */ \
+ short nextprompt; /* next prompt is PS<nextprompt> */ \
+ short poolfiles; \
Namval_t *posix_fun; /* points to last name() function */ \
char *outbuff; /* pointer to output buffer */ \
char *errbuff; /* pointer to stderr buffer */ \
char *prompt; /* pointer to prompt string */ \
char *shname; /* shell name */ \
- char *shpath; /* path name of shell */ \
- char *user; /* name of real user for pfsh */ \
char *comdiv; /* points to sh -c argument */ \
char *prefix; /* prefix for compound assignment */ \
sigjmp_buf *jmplist; /* longjmp return stack */ \
- char **sigmsg; /* points to signal messages */ \
+ char *fifo; /* fifo name for process sub */ \
int oldexit; \
- uid_t userid,euserid; /* real and effective user id */ \
- gid_t groupid,egroupid;/* real and effective group id */ \
- pid_t pid; /* process id of shell */ \
pid_t bckpid; /* background process id */ \
pid_t cpid; \
pid_t spid; /* subshell process id */ \
pid_t pipepid; \
- int32_t ppid; /* parent process id of shell */ \
+ pid_t outpipepid; \
int topfd; \
- int sigmax; /* maximum number of signals */ \
int savesig; \
unsigned char *sigflag; /* pointer to signal states */ \
char intrap; \
@@ -170,16 +197,22 @@ struct limits
char used_pos; /* used postional parameter */\
char universe; \
char winch; \
+ char inarith; /* set when in ((...)) */ \
char indebug; /* set when in debug trap */ \
+ unsigned char ignsig; /* ignored signal in subshell */ \
unsigned char lastsig; /* last signal received */ \
+ char pathinit; /* pathinit called from subshell */ \
+ char comsub; /* set when in $() comsub */ \
char subshare; /* set when in ${..} comsub */ \
char toomany; /* set when out of fd's */ \
char instance; /* in set_instance */ \
char decomma; /* decimal_point=',' */ \
+ char redir0; /* redirect of 0 */ \
char *readscript; /* set before reading a script */ \
+ int subdup; /* bitmask for dups of 1 */ \
int *inpipe; /* input pipe pointer */ \
int *outpipe; /* output pipe pointer */ \
- int cpipe[2]; \
+ int cpipe[3]; \
int coutpipe; \
int inuse_bits; \
struct argnod *envlist; \
@@ -193,13 +226,11 @@ struct limits
int xargexit; \
int nenv; \
mode_t mask; \
- long nforks; \
Env_t *env; \
void *init_context; \
void *mac_context; \
void *lex_context; \
void *arg_context; \
- void *ed_context; \
void *job_context; \
void *pathlist; \
void *defpathlist; \
@@ -211,35 +242,40 @@ struct limits
Shinit_f userinit; \
Shbltin_f bltinfun; \
Shbltin_t bltindata; \
- Shwait_f waitevent; \
char *cur_line; \
- char *rcfile; \
- char **login_files; \
int offsets[10]; \
Sfio_t **sftable; \
unsigned char *fdstatus; \
const char *pwd; \
- History_t *hist_ptr; \
void *jmpbuffer; \
void *mktype; \
Sfio_t *strbuf; \
Sfio_t *strbuf2; \
+ Dt_t *first_root; \
+ Dt_t *prefix_root; \
Dt_t *last_root; \
Dt_t *prev_root; \
Dt_t *fpathdict; \
Dt_t *typedict; \
+ Dt_t *inpool; \
+ Dt_t *transdict; \
char ifstable[256]; \
- unsigned char sigruntime[2]; \
unsigned long test; \
Shopt_t offoptions; \
Shopt_t glob_options; \
Namval_t *typeinit; \
- int *stats; \
Namfun_t nvfun; \
- struct Regress_s*regress;
+ char *mathnodes; \
+ void *coshell; \
+ char *bltin_dir; \
+ struct Regress_s*regress; \
+ char exittrap; \
+ char errtrap; \
+ char end_fn;
#include <shell.h>
+#include "shtable.h"
#include "regress.h"
/* error exits from various parts of shell */
@@ -352,8 +388,8 @@ struct limits
#define SH_READEVAL 0x4000 /* for sh_eval */
#define SH_FUNEVAL 0x10000 /* for sh_eval for function load */
+extern struct shared *shgd;
extern Shell_t *nv_shell(Namval_t*);
-extern int sh_addlib(void*);
extern void sh_applyopts(Shell_t*,Shopt_t);
extern char **sh_argbuild(Shell_t*,int*,const struct comnod*,int);
extern struct dolnod *sh_argfree(Shell_t *, struct dolnod*,int);
@@ -364,44 +400,58 @@ extern void sh_argreset(Shell_t*,struct dolnod*,struct dolnod*);
extern Namval_t *sh_assignok(Namval_t*,int);
extern struct dolnod *sh_arguse(Shell_t*);
extern char *sh_checkid(char*,char*);
+extern void sh_chktrap(Shell_t*);
+extern void sh_deparse(Sfio_t*,const Shnode_t*,int);
extern int sh_debug(Shell_t *shp,const char*,const char*,const char*,char *const[],int);
-extern int sh_echolist(Sfio_t*, int, char**);
+extern int sh_echolist(Shell_t*,Sfio_t*, int, char**);
extern struct argnod *sh_endword(Shell_t*,int);
extern char **sh_envgen(void);
#if SHOPT_ENV
extern void sh_envput(Env_t*, Namval_t*);
#endif
extern void sh_envnolocal(Namval_t*,void*);
-extern Sfdouble_t sh_arith(const char*);
-extern void *sh_arithcomp(char*);
-extern pid_t sh_fork(int,int*);
-extern pid_t _sh_fork(pid_t, int ,int*);
+extern Sfdouble_t sh_arith(Shell_t*,const char*);
+extern void *sh_arithcomp(Shell_t *,char*);
+extern pid_t sh_fork(Shell_t*,int,int*);
+extern pid_t _sh_fork(Shell_t*,pid_t, int ,int*);
extern char *sh_mactrim(Shell_t*,char*,int);
extern int sh_macexpand(Shell_t*,struct argnod*,struct argnod**,int);
extern int sh_macfun(Shell_t*,const char*,int);
extern void sh_machere(Shell_t*,Sfio_t*, Sfio_t*, char*);
extern void *sh_macopen(Shell_t*);
extern char *sh_macpat(Shell_t*,struct argnod*,int);
+extern Sfdouble_t sh_mathfun(Shell_t*, void*, int, Sfdouble_t*);
+extern int sh_outtype(Shell_t*, Sfio_t*);
extern char *sh_mactry(Shell_t*,char*);
+extern int sh_mathstd(const char*);
extern void sh_printopts(Shopt_t,int,Shopt_t*);
-extern int sh_readline(Shell_t*,char**,int,int,long);
+extern int sh_readline(Shell_t*,char**,volatile int,int,ssize_t,long);
extern Sfio_t *sh_sfeval(char*[]);
-extern void sh_setmatch(const char*,int,int,int[]);
+extern void sh_setmatch(Shell_t*,const char*,int,int,int[],int);
extern Dt_t *sh_subaliastree(int);
extern void sh_scope(Shell_t*, struct argnod*, int);
extern Namval_t *sh_scoped(Shell_t*, Namval_t*);
extern Dt_t *sh_subfuntree(int);
extern void sh_subjobcheck(pid_t);
extern int sh_subsavefd(int);
-extern void sh_subtmpfile(int);
+extern void sh_subtmpfile(Shell_t*);
extern char *sh_substitute(const char*,const char*,char*);
+extern void sh_timetraps(Shell_t*);
extern const char *_sh_translate(const char*);
-extern int sh_trace(char*[],int);
+extern int sh_trace(Shell_t*,char*[],int);
extern void sh_trim(char*);
extern int sh_type(const char*);
extern void sh_unscope(Shell_t*);
extern void sh_utol(const char*, char*);
extern int sh_whence(char**,int);
+#if SHOPT_COSHELL
+ extern int sh_coaddfile(Shell_t*,char*);
+ extern int sh_copipe(Shell_t*, int[], int);
+ extern int sh_coaccept(Shell_t*,int[],int);
+#endif /* SHOPT_COSHELL */
+#if SHOPT_NAMESPACE
+ extern Namval_t *sh_fsearch(Shell_t*,const char *,int);
+#endif /* SHOPT_NAMESPACE */
#ifndef ERROR_dictionary
# define ERROR_dictionary(s) (s)
@@ -426,7 +476,7 @@ extern int sh_whence(char**,int);
#define sh_getstate() (sh.st.states)
#define sh_setstate(x) (sh.st.states = (x))
-#define sh_sigcheck() do{if(sh.trapnote&SH_SIGSET)sh_exit(SH_EXITSIG);} while(0)
+#define sh_sigcheck(shp) do{if(shp->trapnote&SH_SIGSET)sh_exit(SH_EXITSIG);} while(0)
extern int32_t sh_mailchk;
extern const char e_dict[];
@@ -456,7 +506,7 @@ extern const char e_dict[];
# define STAT_SPAWN 12
# define STAT_SUBSHELL 13
extern const Shtable_t shtab_stats[];
-# define sh_stats(x) (sh.stats[(x)]++)
+# define sh_stats(x) (shgd->stats[(x)]++)
#else
# define sh_stats(x)
#endif /* SHOPT_STATS */
diff --git a/usr/src/lib/libshell/common/include/edit.h b/usr/src/contrib/ast/src/cmd/ksh93/include/edit.h
index 122c700e37..016d671231 100644
--- a/usr/src/lib/libshell/common/include/edit.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/edit.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -59,7 +59,7 @@
#endif /* SHOPT_MULTIBYTE */
#define TABSIZE 8
-#define PRSIZE 160
+#define PRSIZE 256
#define MAXLINE 1024 /* longest edit line permitted */
typedef struct _edit_pos
@@ -68,9 +68,23 @@ typedef struct _edit_pos
unsigned short col;
} Edpos_t;
+#if SHOPT_EDPREDICT
+typedef struct Histmatch
+{
+ struct Histmatch *next;
+ int index;
+ short len;
+ short count;
+ char data[1];
+} Histmatch_t;
+#endif /* SHOPT_EDPREDICT */
+
+
+
typedef struct edit
{
sigjmp_buf e_env;
+ int e_intr;
int e_kill;
int e_erase;
int e_werase;
@@ -80,6 +94,7 @@ typedef struct edit
int e_plen; /* length of prompt string */
char e_crlf; /* zero if cannot return to beginning of line */
char e_nocrnl; /* don't put a new-line with ^L */
+ char e_keytrap; /* set when in keytrap */
int e_llimit; /* line length limit */
int e_hline; /* current history line number */
int e_hloff; /* line number offset for command */
@@ -152,6 +167,15 @@ typedef struct edit
Namval_t *e_default; /* variable containing default value */
Namval_t *e_term; /* TERM variable */
char e_termname[80]; /* terminal name */
+#if SHOPT_EDPREDICT
+ Histmatch_t **hlist;
+ Histmatch_t *hfirst;
+ unsigned short nhlist;
+ unsigned short hoff;
+ unsigned short hmax;
+ char hpat[40];
+ char *hstak;
+#endif /* SHOPT_EDPREDICT */
} Edit_t;
#undef MAXWINDOW
@@ -220,6 +244,10 @@ extern int ed_setcursor(Edit_t*, genchar*, int, int, int);
extern int ed_genlen(const genchar*);
extern int ed_setwidth(const char*);
# endif /* SHOPT_MULTIBYTE */
+#if SHOPT_EDPREDICT
+ extern int ed_histgen(Edit_t*, const char*);
+ extern void ed_histlist(Edit_t*, int);
+#endif /* SHOPT_EDPREDICT */
extern const char e_runvi[];
#if !KSHELL
diff --git a/usr/src/lib/libshell/common/include/env.h b/usr/src/contrib/ast/src/cmd/ksh93/include/env.h
index e8317ad736..0224aa43a8 100644
--- a/usr/src/lib/libshell/common/include/env.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/env.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/include/fault.h b/usr/src/contrib/ast/src/cmd/ksh93/include/fault.h
index 97973b40bb..e3279030e8 100644
--- a/usr/src/lib/libshell/common/include/fault.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/fault.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -105,22 +105,20 @@ struct checkpt
#endif
};
-#define sh_pushcontext(bp,n) ( (bp)->mode=(n) , (bp)->olist=0, \
- (bp)->topfd=sh.topfd, (bp)->prev=sh.jmplist, \
+#define sh_pushcontext(shp,bp,n)( (bp)->mode=(n) , (bp)->olist=0, \
+ (bp)->topfd=shp->topfd, (bp)->prev=shp->jmplist, \
(bp)->err = *ERROR_CONTEXT_BASE, \
- sh.jmplist = (sigjmp_buf*)(&(bp)->buff) \
+ shp->jmplist = (sigjmp_buf*)(&(bp)->buff) \
)
-#define sh_popcontext(bp) (sh.jmplist=(bp)->prev, errorpop(&((bp)->err)))
+#define sh_popcontext(shp,bp) (shp->jmplist=(bp)->prev, errorpop(&((bp)->err)))
extern void sh_fault(int);
extern void sh_done(void*,int);
-extern void sh_chktrap(void);
extern void sh_sigclear(int);
extern void sh_sigdone(void);
extern void sh_siginit(void*);
extern void sh_sigtrap(int);
extern void sh_sigreset(int);
-extern void sh_timetraps(void);
extern void *sh_timeradd(unsigned long,int ,void (*)(void*),void*);
extern void timerdel(void*);
diff --git a/usr/src/lib/libshell/common/include/fcin.h b/usr/src/contrib/ast/src/cmd/ksh93/include/fcin.h
index 4923dc0737..1459a3acf9 100644
--- a/usr/src/lib/libshell/common/include/fcin.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/fcin.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -36,19 +36,27 @@ typedef struct _fcin
unsigned char *fclast; /* pointer to end of input buffer */
unsigned char *fcptr; /* pointer to next input char */
unsigned char fcchar; /* saved character */
+ short fclen; /* last multibyte char len */
void (*fcfun)(Sfio_t*,const char*,int,void*); /* advance function */
void *context; /* context pointer */
int fcleft; /* for multibyte boundary */
Sfoff_t fcoff; /* offset for last read */
} Fcin_t;
+#if SHOPT_MULTIBYTE
+# define fcmbget(x) (mbwide()?_fcmbget(x):fcget())
+#else
+# define fcmbget(x) (fcget())
+#endif
#define fcfile() (_Fcin._fcfile)
#define fcgetc(c) (((c=fcget()) || (c=fcfill())), c)
#define fcget() ((int)(*_Fcin.fcptr++))
#define fcpeek(n) ((int)_Fcin.fcptr[n])
#define fcseek(n) ((char*)(_Fcin.fcptr+=(n)))
#define fcfirst() ((char*)_Fcin.fcbuff)
-#define fcsopen(s) (_Fcin._fcfile=(Sfio_t*)0,_Fcin.fcbuff=_Fcin.fcptr=(unsigned char*)(s))
+#define fclast() ((char*)_Fcin.fclast)
+#define fcleft() (_Fcin.fclast-_Fcin.fcptr)
+#define fcsopen(s) (_Fcin._fcfile=(Sfio_t*)0,_Fcin.fclen=1,_Fcin.fcbuff=_Fcin.fcptr=(unsigned char*)(s))
#define fctell() (_Fcin.fcoff + (_Fcin.fcptr-_Fcin.fcbuff))
#define fcsave(x) (*(x) = _Fcin)
#define fcrestore(x) (_Fcin = *(x))
@@ -56,7 +64,7 @@ extern int fcfill(void);
extern int fcfopen(Sfio_t*);
extern int fcclose(void);
void fcnotify(void(*)(Sfio_t*,const char*,int,void*),void*);
-extern int fcmbstate(const char*,int*,int*);
+extern int _fcmbget(short*);
extern Fcin_t _Fcin; /* used by macros */
diff --git a/usr/src/lib/libshell/common/include/history.h b/usr/src/contrib/ast/src/cmd/ksh93/include/history.h
index 6faedafa07..034a3d3d90 100644
--- a/usr/src/lib/libshell/common/include/history.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/history.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/include/io.h b/usr/src/contrib/ast/src/cmd/ksh93/include/io.h
index 8ba4e0ecd4..076cd57cf3 100644
--- a/usr/src/lib/libshell/common/include/io.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/io.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -23,12 +23,15 @@
* David Korn
*
*/
+/*
+ * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ */
#include <ast.h>
#include <sfio.h>
#ifndef IOBSIZE
-# define IOBSIZE SF_BUFSIZE
+# define IOBSIZE (SF_BUFSIZE*sizeof(char*))
#endif /* IOBSIZE */
#define IOMAXTRY 20
@@ -52,6 +55,8 @@
#define IOCLOSE (IOSEEK|IONOSEEK)
#define IOSUBSHELL 0x8000 /* must be larger than any file descriptor */
+#define IOPICKFD 0x10000 /* file descriptor number was selected automatically */
+#define IOHERESTRING 0x20000 /* allow here documents to be string streams */
/*
* The remainder of this file is only used when compiled with shell
@@ -63,13 +68,12 @@
struct ionod;
#endif /* !ARG_RAW */
-#define sh_inuse(f2) (sh.fdptrs[f2])
-
extern int sh_iocheckfd(Shell_t*,int);
extern void sh_ioinit(Shell_t*);
extern int sh_iomovefd(int);
extern int sh_iorenumber(Shell_t*,int,int);
extern void sh_pclose(int[]);
+extern int sh_rpipe(int[]);
extern void sh_iorestore(Shell_t*,int,int);
#if defined(__EXPORT__) && defined(_BLD_DLL) && defined(_BLD_shell)
__EXPORT__
@@ -77,12 +81,22 @@ extern void sh_iorestore(Shell_t*,int,int);
extern Sfio_t *sh_iostream(Shell_t*,int);
extern int sh_redirect(Shell_t*,struct ionod*,int);
extern void sh_iosave(Shell_t *, int,int,char*);
+extern int sh_get_unused_fd(Shell_t* shp, int min_fd);
+extern int sh_iovalidfd(Shell_t*, int);
+extern int sh_inuse(Shell_t*, int);
extern void sh_iounsave(Shell_t*);
extern int sh_chkopen(const char*);
extern int sh_ioaccess(int,int);
extern int sh_devtofd(const char*);
+extern int sh_isdevfd(const char*);
extern int sh_source(Shell_t*, Sfio_t*, const char*);
+extern int VALIDATE_FD(Shell_t *, int);
+
+#define VALIDATE_FD(shp, fd) \
+ (((fd) >= (shp)->gd->lim.open_max) ? sh_iovalidfd(shp, fd) : 1)
+
+
/* the following are readonly */
extern const char e_pexists[];
extern const char e_query[];
@@ -122,4 +136,5 @@ extern const char e_bash_profile[];
extern const char e_stdprompt[];
extern const char e_supprompt[];
extern const char e_ambiguous[];
+
#endif /* KSHELL */
diff --git a/usr/src/lib/libshell/common/include/jobs.h b/usr/src/contrib/ast/src/cmd/ksh93/include/jobs.h
index 4ed087f0a7..2bfb21c2b9 100644
--- a/usr/src/lib/libshell/common/include/jobs.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/jobs.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -34,6 +34,22 @@
#endif /* !SIGINT */
#include "FEATURE/options"
+#if SHOPT_COSHELL
+# include <coshell.h>
+# define COPID_BIT (1L<<30)
+ struct cosh
+ {
+ struct cosh *next;
+ Coshell_t *coshell;
+ Cojob_t *cojob;
+ char *name;
+ short id;
+ };
+
+ extern pid_t sh_copid(struct cosh*);
+ extern char *sh_pid2str(Shell_t*,pid_t);
+#endif /* SHOPT_COSHELL */
+
#undef JOBS
#if defined(SIGCLD) && !defined(SIGCHLD)
# define SIGCHLD SIGCLD
@@ -59,6 +75,11 @@ struct process
{
struct process *p_nxtjob; /* next job structure */
struct process *p_nxtproc; /* next process in current job */
+ Shell_t *p_shp; /* shell that posted the job */
+#if SHOPT_COSHELL
+ Cojob_t *p_cojob; /* coshell job */
+#endif /* SHOPT_COSHELL */
+ int *p_exitval; /* place to store the exitval */
pid_t p_pid; /* process id */
pid_t p_pgrp; /* process group */
pid_t p_fgrp; /* process group when stopped */
@@ -76,11 +97,13 @@ struct process
struct jobs
{
struct process *pwlist; /* head of process list */
+ int *exitval; /* pipe exit values */
pid_t curpgid; /* current process gid id */
pid_t parent; /* set by fork() */
pid_t mypid; /* process id of shell */
pid_t mypgid; /* process group id of shell */
pid_t mytgid; /* terminal group id of shell */
+ int curjobid;
unsigned int in_critical; /* >0 => in critical region */
int savesig; /* active signal */
int numpost; /* number of posted jobs */
@@ -97,6 +120,9 @@ struct jobs
char waitall; /* wait for all jobs in pipe */
char toclear; /* job table needs clearing */
unsigned char *freejobs; /* free jobs numbers */
+#if SHOPT_COSHELL
+ struct cosh *colist; /* coshell job list */
+#endif /* SHOPT_COSHELL */
};
/* flags for joblist */
@@ -111,10 +137,14 @@ extern struct jobs job;
#if !_std_malloc
#include <vmalloc.h>
+#ifdef vmlocked
+#define vmbusy() vmlocked(Vmregion)
+#else
#if VMALLOC_VERSION >= 20070911L
#define vmbusy() (vmstat(0,0)!=0)
#endif
#endif
+#endif
#ifndef vmbusy
#define vmbusy() 0
#endif
@@ -137,6 +167,7 @@ extern const char e_running[];
extern const char e_coredump[];
extern const char e_no_proc[];
extern const char e_no_job[];
+extern const char e_badpid[];
extern const char e_jobsrunning[];
extern const char e_nlspace[];
extern const char e_access[];
@@ -161,7 +192,7 @@ extern void job_bwait(char**);
extern int job_walk(Sfio_t*,int(*)(struct process*,int),int,char*[]);
extern int job_kill(struct process*,int);
extern int job_wait(pid_t);
-extern int job_post(pid_t,pid_t);
+extern int job_post(Shell_t*,pid_t,pid_t);
extern void *job_subsave(void);
extern void job_subrestore(void*);
#ifdef SHOPT_BGX
@@ -172,6 +203,7 @@ extern void job_chldtrap(Shell_t*, const char*,int);
extern int job_close(Shell_t*);
extern int job_list(struct process*,int);
extern int job_terminate(struct process*,int);
+ extern int job_hup(struct process *, int);
extern int job_switch(struct process*,int);
extern void job_fork(pid_t);
extern int job_reap(int);
diff --git a/usr/src/lib/libshell/common/include/lexstates.h b/usr/src/contrib/ast/src/cmd/ksh93/include/lexstates.h
index c117988d9c..a078e35ecf 100644
--- a/usr/src/lib/libshell/common/include/lexstates.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/lexstates.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -106,9 +106,9 @@
#undef LEN
#if SHOPT_MULTIBYTE
- static int NXT, LEN;
-# define isaname(c) ((c)>0xff?isalpha(c): sh_lexstates[ST_NAME][(c)]==0)
-# define isaletter(c) ((c)>0xff?isalpha(c): sh_lexstates[ST_DOL][(c)]==S_ALP && (c)!='.')
+# define LEN _Fcin.fclen
+# define isaname(c) ((c)>0x7f?isalpha(c): sh_lexstates[ST_NAME][(c)]==0)
+# define isaletter(c) ((c)>0x7f?isalpha(c): sh_lexstates[ST_DOL][(c)]==S_ALP && (c)!='.')
#else
# undef mbwide
# define mbwide() (0)
@@ -116,7 +116,7 @@
# define isaname(c) (sh_lexstates[ST_NAME][c]==0)
# define isaletter(c) (sh_lexstates[ST_DOL][c]==S_ALP && (c)!='.')
#endif
-#define STATE(s,c) (mbwide()?(c=fcmbstate(s,&NXT,&LEN),NXT):s[c=fcget()])
+#define STATE(s,c) (s[mbwide()?((c=fcmbget(&LEN)),LEN>1?'a':c):(c=fcget())])
#define isadigit(c) (sh_lexstates[ST_DOL][c]==S_DIG)
#define isastchar(c) ((c)=='@' || (c)=='*')
#define isexp(c) (sh_lexstates[ST_MACRO][c]==S_PAT||(c)=='$'||(c)=='`')
@@ -132,6 +132,9 @@ extern const char e_lexlabunknown[];
extern const char e_lexsyntax1[];
extern const char e_lexsyntax2[];
extern const char e_lexsyntax3[];
+extern const char e_lexsyntax4[];
+extern const char e_lexsyntax5[];
+extern const char e_lexwarnvar[];
extern const char e_lexobsolete1[];
extern const char e_lexobsolete2[];
extern const char e_lexobsolete3[];
@@ -150,4 +153,5 @@ extern const char e_lexfuture[];
extern const char e_lexzerobyte[];
extern const char e_lexemptyfor[];
extern const char e_lextypeset[];
+extern const char e_lexcharclass[];
#endif
diff --git a/usr/src/lib/libshell/common/include/name.h b/usr/src/contrib/ast/src/cmd/ksh93/include/name.h
index cf46c92b5f..38fb0cf87d 100644
--- a/usr/src/lib/libshell/common/include/name.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/name.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -30,7 +30,8 @@
#include <ast.h>
#include <cdt.h>
-#include "shtable.h"
+
+typedef int (*Nambfp_f)(int, char**, void*);
/* Nodes can have all kinds of values */
union Value
@@ -52,7 +53,7 @@ union Value
struct Ufunction *rp; /* shell user defined functions */
struct Namfun *funp; /* discipline pointer */
struct Namref *nrp; /* name reference */
- int (*bfp)(int,char*[],void*);/* builtin entry point function pointer */
+ Nambfp_f bfp; /* builtin entry point function pointer */
};
#include "nval.h"
@@ -70,6 +71,10 @@ union Value
#define ARRAY_SETSUB (64L<<ARRAY_BITS) /* set subscript */
#define ARRAY_NOSCOPE (128L<<ARRAY_BITS) /* top level scope only */
#define ARRAY_TREE (256L<<ARRAY_BITS) /* arrays of compound vars */
+#if SHOPT_FIXEDARRAY
+# define ARRAY_FIXED ARRAY_NOCLONE /* For index values */
+#endif /* SHOPT_FIXEDARRAY */
+#define NV_FARRAY 0x10000000 /* fixed sized arrays */
#define NV_ASETSUB 8 /* set subscript */
/* These flags are used as options to array_get() */
@@ -84,6 +89,10 @@ struct Namref
Namval_t *table;
Dt_t *root;
char *sub;
+#if SHOPT_FIXEDARRAY
+ int curi;
+ char dim;
+#endif /* SHOPT_FIXEDARRAY */
};
/* This describes a user shell function node */
@@ -91,6 +100,9 @@ struct Ufunction
{
int *ptree; /* address of parse tree */
int lineno; /* line number of function start */
+ short argc; /* number of references */
+ short running; /* function is running */
+ char **argv; /* reference argument list */
off_t hoffset; /* offset into source or history file */
Namval_t *nspace; /* pointer to name space */
char *fname; /* file name where function defined */
@@ -115,10 +127,11 @@ struct Ufunction
#define NV_TYPE 0x1000000
#define NV_STATIC 0x2000000
#define NV_COMVAR 0x4000000
-#define NV_UNJUST 0x8000000 /* clear justify attributes */
+#define NV_UNJUST 0x800000 /* clear justify attributes */
#define NV_FUNCTION (NV_RJUST|NV_FUNCT) /* value is shell function */
#define NV_FPOSIX NV_LJUST /* posix function semantics */
#define NV_FTMP NV_ZFILL /* function source in tmpfile */
+#define NV_STATICF NV_INTEGER /* static class function */
#define NV_NOPRINT (NV_LTOU|NV_UTOL) /* do not print */
#define NV_NOALIAS (NV_NOPRINT|NV_IMPORT)
@@ -132,7 +145,6 @@ struct Ufunction
#define BLT_NOSFIO (NV_IMPORT) /* doesn't use sfio */
#define NV_OPTGET (NV_BINARY) /* function calls getopts */
#define nv_isref(n) (nv_isattr((n),NV_REF|NV_TAGGED|NV_FUNCT)==NV_REF)
-#define nv_istable(n) (nv_isattr((n),NV_TABLE|NV_LJUST|NV_RJUST|NV_INTEGER)==NV_TABLE)
#define is_abuiltin(n) (nv_isattr(n,NV_BLTIN|NV_INTEGER)==NV_BLTIN)
#define is_afunction(n) (nv_isattr(n,NV_FUNCTION|NV_REF)==NV_FUNCTION)
#define nv_funtree(n) ((n)->nvalue.rp->ptree)
@@ -150,6 +162,10 @@ struct Ufunction
#define nv_reftree(n) ((n)->nvalue.nrp->root)
#define nv_reftable(n) ((n)->nvalue.nrp->table)
#define nv_refsub(n) ((n)->nvalue.nrp->sub)
+#if SHOPT_FIXEDARRAY
+# define nv_refindex(n) ((n)->nvalue.nrp->curi)
+# define nv_refdimen(n) ((n)->nvalue.nrp->dim)
+#endif /* SHOPT_FIXEDARRAY */
/* ... etc */
@@ -202,6 +218,12 @@ extern void nv_outnode(Namval_t*,Sfio_t*, int, int);
extern int nv_subsaved(Namval_t*);
extern void nv_typename(Namval_t*, Sfio_t*);
extern void nv_newtype(Namval_t*);
+extern int nv_istable(Namval_t*);
+extern size_t nv_datasize(Namval_t*, size_t*);
+extern Namfun_t *nv_mapchar(Namval_t*, const char*);
+#if SHOPT_FIXEDARRAY
+ extern int nv_arrfixed(Namval_t*, Sfio_t*, int, char*);
+#endif /* SHOPT_FIXEDARRAY */
extern const Namdisc_t RESTRICTED_disc;
extern const Namdisc_t ENUM_disc;
@@ -221,12 +243,14 @@ extern const char e_varname[];
extern const char e_noalias[];
extern const char e_noarray[];
extern const char e_notenum[];
+extern const char e_nounattr[];
extern const char e_aliname[];
extern const char e_badexport[];
extern const char e_badref[];
extern const char e_badsubscript[];
extern const char e_noref[];
extern const char e_selfref[];
+extern const char e_staticfun[];
extern const char e_envmarker[];
extern const char e_badlocale[];
extern const char e_loop[];
@@ -234,5 +258,12 @@ extern const char e_redef[];
extern const char e_required[];
extern const char e_badappend[];
extern const char e_unknowntype[];
+extern const char e_unknownmap[];
+extern const char e_mapchararg[];
+extern const char e_subcomvar[];
+extern const char e_badtypedef[];
+extern const char e_typecompat[];
extern const char e_globalref[];
+extern const char e_tolower[];
+extern const char e_toupper[];
#endif /* _NV_PRIVATE */
diff --git a/usr/src/lib/libshell/common/include/national.h b/usr/src/contrib/ast/src/cmd/ksh93/include/national.h
index 94221a2c95..4c1888b7b5 100644
--- a/usr/src/lib/libshell/common/include/national.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/national.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/include/nval.h b/usr/src/contrib/ast/src/cmd/ksh93/include/nval.h
index d4eb243c42..71dfc8e132 100644
--- a/usr/src/lib/libshell/common/include/nval.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/nval.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -72,7 +72,7 @@ struct Namfun
const Namdisc_t *disc;
char nofree;
unsigned char subshell;
- unsigned short dsize;
+ uint32_t dsize;
Namfun_t *next;
char *last;
Namval_t *type;
@@ -92,7 +92,7 @@ struct Namarray
Namfun_t hdr;
long nelem; /* number of elements */
void *(*fun)(Namval_t*,const char*,int); /* associative arrays */
- Namval_t *parent; /* for multi-dimensional */
+ void *fixed; /* for fixed sized arrays */
Dt_t *table; /* for subscripts */
void *scope; /* non-zerp when scoped */
};
@@ -113,8 +113,19 @@ struct Namval
{
Dtlink_t nvlink; /* space for cdt links */
char *nvname; /* pointer to name of the node */
+#if _ast_sizeof_pointer == 8
+# if _ast_intswap > 0
+ unsigned short nvflag; /* attributes */
+ unsigned short pad1;
+# else
+ unsigned short pad1;
+ unsigned short nvflag; /* attributes */
+# endif
+ uint32_t nvsize; /* size or base */
+#else
unsigned short nvflag; /* attributes */
unsigned short nvsize; /* size or base */
+#endif
#ifdef _NV_PRIVATE
_NV_PRIVATE
#else
diff --git a/usr/src/lib/libshell/common/include/path.h b/usr/src/contrib/ast/src/cmd/ksh93/include/path.h
index 9c656adf92..79bf35aa2f 100644
--- a/usr/src/lib/libshell/common/include/path.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/path.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,6 +28,7 @@
#include "FEATURE/options"
#include <nval.h>
+#include "defs.h"
#if !defined(SHOPT_SPAWN)
# if _UWIN || _use_spawnveg || !_lib_fork
@@ -58,8 +59,8 @@ typedef struct pathcomp
time_t mtime;
char *name;
char *lib;
+ char *bbuf;
char *blib;
- void *bltin_lib;
unsigned short len;
unsigned short flags;
Shell_t *shp;
@@ -70,38 +71,44 @@ typedef struct pathcomp
#endif /* !ARG_RAW */
/* pathname handling routines */
-extern void path_newdir(Pathcomp_t*);
+extern void path_newdir(Shell_t*,Pathcomp_t*);
extern Pathcomp_t *path_dirfind(Pathcomp_t*,const char*,int);
-extern Pathcomp_t *path_unsetfpath(Pathcomp_t*);
-extern Pathcomp_t *path_addpath(Pathcomp_t*,const char*,int);
+extern Pathcomp_t *path_unsetfpath(Shell_t*);
+extern Pathcomp_t *path_addpath(Shell_t*,Pathcomp_t*,const char*,int);
extern Pathcomp_t *path_dup(Pathcomp_t*);
extern void path_delete(Pathcomp_t*);
extern void path_alias(Namval_t*,Pathcomp_t*);
-extern Pathcomp_t *path_absolute(const char*, Pathcomp_t*);
+extern Pathcomp_t *path_absolute(Shell_t*, const char*, Pathcomp_t*);
extern char *path_basename(const char*);
-extern char *path_fullname(const char*);
-extern int path_expand(const char*, struct argnod**);
-extern void path_exec(const char*,char*[],struct argnod*);
-extern pid_t path_spawn(const char*,char*[],char*[],Pathcomp_t*,int);
+extern char *path_fullname(Shell_t*,const char*);
+extern int path_expand(Shell_t*,const char*, struct argnod**);
+extern void path_exec(Shell_t*,const char*,char*[],struct argnod*);
+extern pid_t path_spawn(Shell_t*,const char*,char*[],char*[],Pathcomp_t*,int);
#if defined(__EXPORT__) && defined(_BLD_DLL) && defined(_BLD_shell)
# define extern __EXPORT__
#endif
-extern int path_open(const char*,Pathcomp_t*);
-extern Pathcomp_t *path_get(const char*);
+extern int path_open(Shell_t*,const char*,Pathcomp_t*);
+extern Pathcomp_t *path_get(Shell_t*,const char*);
#undef extern
-extern char *path_pwd(int);
-extern Pathcomp_t *path_nextcomp(Pathcomp_t*,const char*,Pathcomp_t*);
-extern int path_search(const char*,Pathcomp_t**,int);
-extern char *path_relative(const char*);
-extern int path_complete(const char*, const char*,struct argnod**);
+extern char *path_pwd(Shell_t*,int);
+extern Pathcomp_t *path_nextcomp(Shell_t*,Pathcomp_t*,const char*,Pathcomp_t*);
+extern int path_search(Shell_t*,const char*,Pathcomp_t**,int);
+extern char *path_relative(Shell_t*,const char*);
+extern int path_complete(Shell_t*,const char*, const char*,struct argnod**);
#if SHOPT_BRACEPAT
- extern int path_generate(struct argnod*,struct argnod**);
+ extern int path_generate(Shell_t*,struct argnod*,struct argnod**);
#endif /* SHOPT_BRACEPAT */
+ extern int path_xattr(Shell_t*, const char*, char*);
+
+/* builtin/plugin routines */
+extern int sh_addlib(Shell_t*,void*,char*,Pathcomp_t*);
+extern Shbltin_f sh_getlib(Shell_t*,char*,Pathcomp_t*);
/* constant strings needed for whence */
extern const char e_timeformat[];
extern const char e_badtformat[];
extern const char e_dot[];
+extern const char e_funload[];
extern const char e_pfsh[];
extern const char e_pwd[];
extern const char e_logout[];
diff --git a/usr/src/lib/libshell/common/include/regress.h b/usr/src/contrib/ast/src/cmd/ksh93/include/regress.h
index 487823e8ae..83c1824b23 100644
--- a/usr/src/lib/libshell/common/include/regress.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/regress.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -51,7 +51,7 @@ typedef struct Regress_s
#undef SHOPT_P_SUID
#define SHOPT_P_SUID sh_regress_p_suid(__LINE__, __FILE__)
-extern int b___regress__(int, char**, void*);
+extern int b___regress__(int, char**, Shbltin_t*);
extern void sh_regress_init(Shell_t*);
extern void sh_regress(unsigned int, const char*, const char*, unsigned int, const char*);
extern uid_t sh_regress_p_suid(unsigned int, const char*);
diff --git a/usr/src/lib/libshell/common/include/shell.h b/usr/src/contrib/ast/src/cmd/ksh93/include/shell.h
index 2ce315566e..df72db024d 100644
--- a/usr/src/lib/libshell/common/include/shell.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/shell.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,6 +27,8 @@
*
*/
+#define SH_VERSION 20071012
+
#include <ast.h>
#include <cdt.h>
#ifdef _SH_PRIVATE
@@ -35,8 +37,6 @@
# include <nval.h>
#endif /* _SH_PRIVATE */
-#define SH_VERSION 20071012
-
#undef NOT_USED
#define NOT_USED(x) (&x,1)
@@ -49,8 +49,13 @@ Shopt_t;
typedef struct Shell_s Shell_t;
+#include <shcmd.h>
+
typedef void (*Shinit_f)(Shell_t*, int);
-typedef int (*Shwait_f)(int, long, int);
+#ifndef SH_wait_f_defined
+ typedef int (*Shwait_f)(int, long, int);
+# define SH_wait_f_defined
+#endif
union Shnode_u;
typedef union Shnode_u Shnode_t;
@@ -90,6 +95,7 @@ typedef union Shnode_u Shnode_t;
#define SH_XARGS 34
#define SH_RC 35
#define SH_SHOWME 36
+#define SH_LETOCTAL 37
/*
* passed as flags to builtins in Nambltin_t struct when BLT_OPTIM is on
@@ -179,14 +185,16 @@ extern Sfio_t *sh_iogetiop(int,int);
extern int sh_main(int, char*[], Shinit_f);
extern int sh_run(int, char*[]);
extern void sh_menu(Sfio_t*, int, char*[]);
-extern Namval_t *sh_addbuiltin(const char*, int(*)(int, char*[],void*), void*);
+extern Namval_t *sh_addbuiltin(const char*, int(*)(int, char*[],Shbltin_t*), void*);
extern char *sh_fmtq(const char*);
extern char *sh_fmtqf(const char*, int, int);
extern Sfdouble_t sh_strnum(const char*, char**, int);
extern int sh_access(const char*,int);
extern int sh_close(int);
+extern int sh_chdir(const char*);
extern int sh_dup(int);
extern void sh_exit(int);
+extern int sh_fchdir(int);
extern int sh_fcntl(int, int, ...);
extern Sfio_t *sh_fd2sfio(int);
extern int (*sh_fdnotify(int(*)(int,int)))(int,int);
@@ -202,17 +210,13 @@ extern mode_t sh_umask(mode_t);
extern void *sh_waitnotify(Shwait_f);
extern Shscope_t *sh_getscope(int,int);
extern Shscope_t *sh_setscope(Shscope_t*);
-extern void sh_sigcheck(void);
+extern void sh_sigcheck(Shell_t*);
extern unsigned long sh_isoption(int);
extern unsigned long sh_onoption(int);
extern unsigned long sh_offoption(int);
extern int sh_waitsafe(void);
extern int sh_exec(const Shnode_t*,int);
-#if SHOPT_DYNAMIC
- extern void **sh_getliblist(void);
-#endif /* SHOPT_DYNAMIC */
-
/*
* direct access to sh is obsolete, use sh_getinterp() instead
*/
@@ -226,6 +230,8 @@ extern int sh_exec(const Shnode_t*,int);
# undef extern
#endif /* _DLL */
+#define chdir(a) sh_chdir(a)
+#define fchdir(a) sh_fchdir(a)
#ifndef _SH_PRIVATE
# define access(a,b) sh_access(a,b)
# define close(a) sh_close(a)
diff --git a/usr/src/lib/libshell/common/include/shlex.h b/usr/src/contrib/ast/src/cmd/ksh93/include/shlex.h
index 7da3e90ed6..b8e50347a5 100644
--- a/usr/src/lib/libshell/common/include/shlex.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/shlex.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -48,6 +48,7 @@ typedef struct _shlex_
char intypeset; /* on when processing typeset */
char comp_assign; /* in compound assignment */
char comsub; /* parsing command substitution */
+ char noreserv; /* reserved works not legal */
int inlineno; /* saved value of sh.inlineno */
int firstline; /* saved value of sh.st.firstline */
#if SHOPT_KIA
@@ -113,6 +114,7 @@ typedef struct _shlex_
#define IORDWRSYM (SYMGT|'<')
#define IORDWRSYMT (SYMSEMI|'<')
#define IOCLOBSYM (SYMPIPE|'>')
+#define PIPESYM2 (SYMPIPE|'&')
#define IPROCSYM (SYMLPAR|'<')
#define OPROCSYM (SYMLPAR|'>')
#define EOFSYM 04000 /* end-of-file */
diff --git a/usr/src/lib/libshell/common/include/shnodes.h b/usr/src/contrib/ast/src/cmd/ksh93/include/shnodes.h
index 032ef2609d..6403004805 100644
--- a/usr/src/lib/libshell/common/include/shnodes.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/shnodes.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -38,9 +38,10 @@
#define FPCL (0100<<COMBITS) /* close the pipe */
#define FCOOP (0200<<COMBITS) /* cooperating process */
#define FSHOWME (0400<<COMBITS) /* set for showme commands */
+#define FALTPIPE (02000<<COMBITS) /* alternate pipes &| */
#define FPOSIX (02<<COMBITS) /* posix semantics function */
#define FLINENO (04<<COMBITS) /* for/case has line number */
-#define FOPTGET (010<<COMBITS) /* function calls getopts */
+#define FOPTGET (0200<<COMBITS) /* function calls getopts */
#define TNEGATE (01<<COMBITS) /* ! inside [[...]] */
#define TBINARY (02<<COMBITS) /* binary operator in [[...]] */
@@ -210,7 +211,7 @@ union Shnode_u
extern void sh_freeup(Shell_t*);
extern void sh_funstaks(struct slnod*,int);
-extern Sfio_t *sh_subshell(Shnode_t*, int, int);
+extern Sfio_t *sh_subshell(Shell_t*,Shnode_t*, volatile int, int);
#if defined(__EXPORT__) && defined(_BLD_DLL) && defined(_BLD_shell)
__EXPORT__
#endif
diff --git a/usr/src/lib/libshell/common/include/shtable.h b/usr/src/contrib/ast/src/cmd/ksh93/include/shtable.h
index bd237ae895..e851ae51ba 100644
--- a/usr/src/lib/libshell/common/include/shtable.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/shtable.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -47,7 +47,7 @@ struct shtable3
{
const char *sh_name;
const unsigned sh_number;
- int (*sh_value)(int, char*[], void*);
+ int (*sh_value)(int, char*[], Shbltin_t*);
};
#define sh_lookup(name,value) (sh_locate(name,(Shtable_t*)(value),sizeof(*(value)))->sh_number)
diff --git a/usr/src/lib/libshell/common/include/streval.h b/usr/src/contrib/ast/src/cmd/ksh93/include/streval.h
index 32ccbb6824..30008b5de7 100644
--- a/usr/src/lib/libshell/common/include/streval.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/streval.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,6 +28,7 @@
/* The following only is needed for const */
#include <ast.h>
#include <math.h>
+#include "defs.h"
#if _AST_VERSION >= 20030127L
# include <ast_float.h>
#endif
@@ -69,16 +70,20 @@
struct lval
{
+ Shell_t *shp;
char *value;
+ char *ovalue;
Sfdouble_t (*fun)(Sfdouble_t,...);
const char *expr;
+ const void *ptr;
+ int nosub;
short flag;
- char isfloat;
- char nargs;
+ short nargs;
short emode;
short level;
short elen;
- char nosub;
+ char eflag;
+ char isfloat;
};
struct mathtab
@@ -89,6 +94,7 @@ struct mathtab
typedef struct _arith_
{
+ Shell_t *shp;
unsigned char *code;
const char *expr;
Sfdouble_t (*fun)(const char**,struct lval*,int,Sfdouble_t);
@@ -98,6 +104,7 @@ typedef struct _arith_
short elen;
} Arith_t;
#define ARITH_COMP 04 /* set when compile separate from execute */
+#define ARITH_ASSIGNOP 010 /* set during assignment operators */
#define MAXPREC 15 /* maximum precision level */
#define SEQPOINT 0200 /* sequence point */
@@ -161,6 +168,8 @@ typedef struct _arith_
#define A_LIT 53
#define A_NOTNOT 54
#define A_ASSIGNOP 55
+#define A_ENUM 56
+#define A_ASSIGNOP1 57
/* define error messages */
@@ -192,7 +201,7 @@ extern const struct mathtab shtab_math[];
#define VALUE 2
#define MESSAGE 3
-extern Sfdouble_t strval(const char*,char**,Sfdouble_t(*)(const char**,struct lval*,int,Sfdouble_t),int);
-extern Arith_t *arith_compile(const char*,char**,Sfdouble_t(*)(const char**,struct lval*,int,Sfdouble_t),int);
+extern Sfdouble_t strval(Shell_t*,const char*,char**,Sfdouble_t(*)(const char**,struct lval*,int,Sfdouble_t),int);
+extern Arith_t *arith_compile(Shell_t *,const char*,char**,Sfdouble_t(*)(const char**,struct lval*,int,Sfdouble_t),int);
extern Sfdouble_t arith_exec(Arith_t*);
#endif /* !SEQPOINT */
diff --git a/usr/src/lib/libshell/common/include/terminal.h b/usr/src/contrib/ast/src/cmd/ksh93/include/terminal.h
index 3974b4b22b..c2b1d1dd11 100644
--- a/usr/src/lib/libshell/common/include/terminal.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/terminal.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -191,5 +191,13 @@ extern int tty_get(int,struct termios*);
extern int tty_raw(int,int);
extern int tty_check(int);
extern int tty_set(int, int, struct termios*);
+extern int sh_ioctl(int,int,void*,int);
+#define ioctl(a,b,c) sh_ioctl(a,b,c,sizeof(c))
+#ifdef _lib_tcgetattr
+ extern int sh_tcgetattr(int,struct termios*);
+ extern int sh_tcsetattr(int,int,struct termios*);
+# define tcgetattr(a,b) sh_tcgetattr(a,b)
+# define tcsetattr(a,b,c) sh_tcsetattr(a,b,c)
+#endif
#endif /* _terminal_ */
diff --git a/usr/src/lib/libshell/common/include/test.h b/usr/src/contrib/ast/src/cmd/ksh93/include/test.h
index 4ef649883a..a9ed37bdce 100644
--- a/usr/src/lib/libshell/common/include/test.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/test.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,6 +27,7 @@
*/
#include "FEATURE/options"
+#include "defs.h"
#include "shtable.h"
/*
* These are the valid test operators
@@ -56,9 +57,9 @@
#define TEST_END 8
#define TEST_REP 20
-extern int test_unop(int, const char*);
+extern int test_unop(Shell_t*,int, const char*);
extern int test_inode(const char*, const char*);
-extern int test_binop(int, const char*, const char*);
+extern int test_binop(Shell_t*,int, const char*, const char*);
extern const char sh_opttest[];
extern const char test_opchars[];
diff --git a/usr/src/lib/libshell/common/include/timeout.h b/usr/src/contrib/ast/src/cmd/ksh93/include/timeout.h
index 5f404447a2..a12c7523ea 100644
--- a/usr/src/lib/libshell/common/include/timeout.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/timeout.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/include/ulimit.h b/usr/src/contrib/ast/src/cmd/ksh93/include/ulimit.h
index a1c36613fd..a0e63304b8 100644
--- a/usr/src/lib/libshell/common/include/ulimit.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/ulimit.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -69,27 +69,11 @@
#endif /* RLIM_INFINITY */
#if defined(_lib_getrlimit) || defined(_lib_vlimit) || defined(_lib_ulimit)
-# ifndef RLIMIT_CPU
-# define RLIMIT_CPU 0
-# endif /* !RLIMIT_CPU */
-# ifndef RLIMIT_DATA
-# define RLIMIT_DATA 0
-# endif /* !RLIMIT_DATA */
-# ifndef RLIMIT_RSS
-# define RLIMIT_RSS 0
-# endif /* !RLIMIT_RSS */
-# ifndef RLIMIT_STACK
-# define RLIMIT_STACK 0
-# endif /* !RLIMIT_STACK */
-# ifndef RLIMIT_CORE
-# define RLIMIT_CORE 0
-# endif /* !RLIMIT_CORE */
# ifndef RLIMIT_VMEM
-# define RLIMIT_VMEM 0
+# ifdef RLIMIT_AS
+# define RLIMIT_VMEM RLIMIT_AS
+# endif
# endif /* !RLIMIT_VMEM */
-# ifndef RLIMIT_NOFILE
-# define RLIMIT_NOFILE 0
-# endif /* !RLIMIT_NOFILE */
#else
# define _no_ulimit
#endif
@@ -125,26 +109,41 @@
#ifndef RLIMIT_MEMLOCK
#define RLIMIT_MEMLOCK RLIMIT_UNKNOWN
#endif
+#ifndef RLIMIT_MSGQUEUE
+#define RLIMIT_MSGQUEUE RLIMIT_UNKNOWN
+#endif
#ifndef RLIMIT_NOFILE
#define RLIMIT_NOFILE RLIMIT_UNKNOWN
#endif
+#ifndef RLIMIT_NICE
+#define RLIMIT_NICE RLIMIT_UNKNOWN
+#endif
#ifndef RLIMIT_NPROC
#define RLIMIT_NPROC RLIMIT_UNKNOWN
#endif
#ifndef RLIMIT_PIPE
#define RLIMIT_PIPE RLIMIT_UNKNOWN
#endif
+#ifndef RLIMIT_PTHREAD
+#define RLIMIT_PTHREAD RLIMIT_UNKNOWN
+#endif
#ifndef RLIMIT_RSS
#define RLIMIT_RSS RLIMIT_UNKNOWN
#endif
+#ifndef RLIMIT_RTPRIO
+#define RLIMIT_RTPRIO RLIMIT_UNKNOWN
+#endif
#ifndef RLIMIT_SBSIZE
#define RLIMIT_SBSIZE RLIMIT_UNKNOWN
#endif
+#ifndef RLIMIT_SIGPENDING
+#define RLIMIT_SIGPENDING RLIMIT_UNKNOWN
+#endif
#ifndef RLIMIT_STACK
#define RLIMIT_STACK RLIMIT_UNKNOWN
#endif
-#ifndef RLIMIT_PTHREAD
-#define RLIMIT_PTHREAD RLIMIT_UNKNOWN
+#ifndef RLIMIT_SWAP
+#define RLIMIT_SWAP RLIMIT_UNKNOWN
#endif
#ifndef RLIMIT_VMEM
#define RLIMIT_VMEM RLIMIT_UNKNOWN
@@ -158,7 +157,7 @@
typedef struct Limit_s
{
- const char name[8];
+ const char name[16];
const char* description;
int index;
const char* conf;
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/include/variables.h b/usr/src/contrib/ast/src/cmd/ksh93/include/variables.h
new file mode 100644
index 0000000000..edaa86593d
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/variables.h
@@ -0,0 +1,111 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* David Korn <dgk@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#ifndef SH_VALNOD
+
+#include <option.h>
+#include "FEATURE/options"
+#include "FEATURE/dynamic"
+
+/* The following defines are coordinated with data in data/variables.c */
+
+#define PATHNOD (shgd->bltin_nodes)
+#define PS1NOD (shgd->bltin_nodes+1)
+#define PS2NOD (shgd->bltin_nodes+2)
+#define IFSNOD (shgd->bltin_nodes+3)
+#define PWDNOD (shgd->bltin_nodes+4)
+#define HOME (shgd->bltin_nodes+5)
+#define MAILNOD (shgd->bltin_nodes+6)
+#define REPLYNOD (shgd->bltin_nodes+7)
+#define SHELLNOD (shgd->bltin_nodes+8)
+#define EDITNOD (shgd->bltin_nodes+9)
+#define MCHKNOD (shgd->bltin_nodes+10)
+#define RANDNOD (shgd->bltin_nodes+11)
+#define ENVNOD (shgd->bltin_nodes+12)
+#define HISTFILE (shgd->bltin_nodes+13)
+#define HISTSIZE (shgd->bltin_nodes+14)
+#define HISTEDIT (shgd->bltin_nodes+15)
+#define HISTCUR (shgd->bltin_nodes+16)
+#define FCEDNOD (shgd->bltin_nodes+17)
+#define CDPNOD (shgd->bltin_nodes+18)
+#define MAILPNOD (shgd->bltin_nodes+19)
+#define PS3NOD (shgd->bltin_nodes+20)
+#define OLDPWDNOD (shgd->bltin_nodes+21)
+#define VISINOD (shgd->bltin_nodes+22)
+#define COLUMNS (shgd->bltin_nodes+23)
+#define LINES (shgd->bltin_nodes+24)
+#define PPIDNOD (shgd->bltin_nodes+25)
+#define L_ARGNOD (shgd->bltin_nodes+26)
+#define TMOUTNOD (shgd->bltin_nodes+27)
+#define SECONDS (shgd->bltin_nodes+28)
+#define LINENO (shgd->bltin_nodes+29)
+#define OPTARGNOD (shgd->bltin_nodes+30)
+#define OPTINDNOD (shgd->bltin_nodes+31)
+#define PS4NOD (shgd->bltin_nodes+32)
+#define FPATHNOD (shgd->bltin_nodes+33)
+#define LANGNOD (shgd->bltin_nodes+34)
+#define LCALLNOD (shgd->bltin_nodes+35)
+#define LCCOLLNOD (shgd->bltin_nodes+36)
+#define LCTYPENOD (shgd->bltin_nodes+37)
+#define LCMSGNOD (shgd->bltin_nodes+38)
+#define LCNUMNOD (shgd->bltin_nodes+39)
+#define FIGNORENOD (shgd->bltin_nodes+40)
+#define VERSIONNOD (shgd->bltin_nodes+41)
+#define JOBMAXNOD (shgd->bltin_nodes+42)
+#define DOTSHNOD (shgd->bltin_nodes+43)
+#define ED_CHRNOD (shgd->bltin_nodes+44)
+#define ED_COLNOD (shgd->bltin_nodes+45)
+#define ED_TXTNOD (shgd->bltin_nodes+46)
+#define ED_MODENOD (shgd->bltin_nodes+47)
+#define SH_NAMENOD (shgd->bltin_nodes+48)
+#define SH_SUBSCRNOD (shgd->bltin_nodes+49)
+#define SH_VALNOD (shgd->bltin_nodes+50)
+#define SH_VERSIONNOD (shgd->bltin_nodes+51)
+#define SH_DOLLARNOD (shgd->bltin_nodes+52)
+#define SH_MATCHNOD (shgd->bltin_nodes+53)
+#define SH_COMMANDNOD (shgd->bltin_nodes+54)
+#define SH_PATHNAMENOD (shgd->bltin_nodes+55)
+#define SH_FUNNAMENOD (shgd->bltin_nodes+56)
+#define SH_SUBSHELLNOD (shgd->bltin_nodes+57)
+#define SH_LEVELNOD (shgd->bltin_nodes+58)
+#define SH_LINENO (shgd->bltin_nodes+59)
+#define SH_STATS (shgd->bltin_nodes+60)
+#define SH_MATHNOD (shgd->bltin_nodes+61)
+#define SH_JOBPOOL (shgd->bltin_nodes+62)
+#define SHLVL (shgd->bltin_nodes+63)
+#if SHOPT_FS_3D
+# define VPATHNOD (shgd->bltin_nodes+64)
+# define NFS_3D 1
+#else
+# define NFS_3D 0
+#endif /* SHOPT_FS_3D */
+#if SHOPT_VPIX
+# define DOSPATHNOD (shgd->bltin_nodes+64+NFS_3D)
+# define VPIXNOD (shgd->bltin_nodes+65+NFS_3D)
+# define NVPIX (NFS_3D+2)
+#else
+# define NVPIX NFS_3D
+#endif /* SHOPT_VPIX */
+#ifdef apollo
+# define SYSTYPENOD (shgd->bltin_nodes+63+NVPIX)
+#endif /* apollo */
+
+#endif /* SH_VALNOD */
diff --git a/usr/src/lib/libshell/common/include/version.h b/usr/src/contrib/ast/src/cmd/ksh93/include/version.h
index 7a4a876c06..d1966df1d3 100644
--- a/usr/src/lib/libshell/common/include/version.h
+++ b/usr/src/contrib/ast/src/cmd/ksh93/include/version.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -17,4 +17,4 @@
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
-#define SH_RELEASE "93t+ 2010-03-05"
+#define SH_RELEASE "93u+ 2012-08-01"
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.rt b/usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.rt
new file mode 100644
index 0000000000..d3d71a1b48
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.rt
@@ -0,0 +1,71 @@
+NOTE regression tests for --regress enabled ksh
+
+UNIT ksh-regress
+
+EXPORT HOME=. ENV=.env.sh LC_ALL=C HISTFILE=
+
+TEST mode suid/sgid combinations
+
+# these tests are the product { all modes combinations } X { tests }
+
+defaults=(
+ "etc=$HOME"
+ "source"
+)
+modes=(
+ interactive
+ login
+ privileged
+ rc
+ restricted
+)
+tests=(
+ ""
+ "euid=0"
+ "euid=0 p_suid=0"
+ "euid=0 p_suid=99999"
+ "euid=1"
+ "euid=1 p_suid=0"
+ "euid=1 p_suid=99999"
+ "egid=1"
+ "egid=1 p_suid=0"
+ "egid=1 p_suid=99999"
+)
+
+integer n=1 m=${#modes[@]}
+d=
+for o in ${defaults[@]}
+do d="$d --regress=$o"
+done
+for ((b=0; b<m; b++))
+do (( n *= 3 ))
+done
+for (( b=0; b<n; b++ ))
+do k=
+ z=$(printf "%0$m..3u" $b)
+ for (( i=0; i<m; i++ ))
+ do case $z in
+ 1*) k="$k --no${modes[i]}" ;;
+ 2*) k="$k --${modes[i]}" ;;
+ esac
+ z=${z#?}
+ done
+ for t in "${tests[@]}"
+ do o=$d
+ for r in $t
+ do o="$o --regress=$r"
+ done
+ o="$o $k"
+
+EXEC $o <<!
+set --state
+!
+
+ done
+done
+
+TEST privileged/noprivileged sequence
+
+EXEC --regress=etc=. --regress=euid=1 --privileged <<!
+set --state; set --noprivileged; set --state; set --privileged; set --state; set --noprivileged; set --state
+!
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.tst b/usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.tst
new file mode 100644
index 0000000000..45650287fe
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/ksh-regress.tst
@@ -0,0 +1,22544 @@
+# : : generated from ksh-regress.rt by mktest : : #
+
+# regression tests for --regress enabled ksh
+
+UNIT ksh-regress
+
+EXPORT HOME=. ENV=.env.sh LC_ALL=C HISTFILE=''
+
+TEST 01 'mode suid/sgid combinations'
+
+ EXEC --regress=etc=. --regress=source
+ INPUT - 'set --state'
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --noprivileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --noprivileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --noprivileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --noprivileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --noprivileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --noprivileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --privileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --privileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --privileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nologin --noprivileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nologin --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nologin --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --login
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --noprivileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --login --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --login --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --noprivileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --noprivileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --nologin --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --nologin --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --noprivileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged --norc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged --norc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged --norc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged --norc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged --rc
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged --rc
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged --rc --norestricted
+ OUTPUT - 'set --default --braceexpand --privileged --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --nointeractive --login --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --nointeractive --login --privileged --rc --restricted
+ OUTPUT - 'set --default --braceexpand --privileged --restricted --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --nointeractive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --nointeractive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --nointeractive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --nointeractive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --nointeractive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --nointeractive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --nointeractive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --nointeractive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT'
+
+ EXEC --regress=etc=. --regress=source --interactive
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --noprivileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --privileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --privileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --noprivileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --nologin --privileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.\nksh:REGRESS:source:__regress__:on\n'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --nologin --privileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --nologin --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --noprivileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:0
+ksh:REGRESS:egid:setgid:egid==rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --noprivileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:p_suid:SHOPT_P_SUID:99999
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:source:sh_source:./.profile:ENOENT
+ksh:REGRESS:source:sh_source:.profile:ENOENT
+ksh:REGRESS:source:sh_source:.env.sh:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged --norc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged --norc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged --norc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged --norc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged --norc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged --norc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged --rc
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged --rc
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged --rc --norestricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged --rc --norestricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --interactive --login --privileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --restricted --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --interactive --login --privileged --rc --restricted
+ OUTPUT - 'set --default --bgnice --braceexpand --monitor --privileged --restricted --v'\
+'i --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=0 --interactive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=0 --regress=p_suid=99999 --interactive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:0
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --interactive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=0 --interactive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=euid=1 --regress=p_suid=99999 --interactive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --interactive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=0 --interactive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:0
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+ EXEC --regress=etc=. --regress=source --regress=egid=1 --regress=p_suid=99999 --interactive --login --privileged --rc --restricted
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:source:__regress__:on
+ksh:REGRESS:egid:__regress__:1
+ksh:REGRESS:p_suid:__regress__:99999
+ksh:REGRESS:egid:getegid:egid!=rgid
+ksh:REGRESS:etc:sh_open:/etc/profile => ./profile
+ksh:REGRESS:source:sh_source:/etc/profile:ENOENT
+ksh:REGRESS:etc:sh_open:/etc/suid_profile => ./suid_profile
+ksh:REGRESS:source:sh_source:/etc/suid_profile:ENOENT
+'
+
+TEST 02 'privileged/noprivileged sequence'
+
+ EXEC --regress=etc=. --regress=euid=1 --privileged
+ INPUT - 'set --state; set --noprivileged; set --state; set --privileged; set --state;'\
+' set --noprivileged; set --state'
+ OUTPUT - $'set --default --braceexpand --privileged --trackall --vi --viraw
+set --default --braceexpand --trackall --vi --viraw
+set --default --braceexpand --privileged --trackall --vi --viraw
+set --default --braceexpand --trackall --vi --viraw'
+ ERROR - $'ksh:REGRESS:etc:__regress__:.
+ksh:REGRESS:euid:__regress__:1
+ksh:REGRESS:euid:geteuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid
+ksh:REGRESS:euid:setuid:euid!=ruid
+ksh:REGRESS:euid:setuid:euid==ruid'
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/mamexec b/usr/src/contrib/ast/src/cmd/ksh93/mamexec
new file mode 100755
index 0000000000..e36a846092
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/mamexec
@@ -0,0 +1,307 @@
+:
+#
+# Glenn Fowler
+# AT&T Bell Laboratories
+#
+# make abstract machine executor with state
+#
+# @(#)mamexec (gsf@research.att.com) 07/17/94
+#
+# mamexec [ -dfins ] [ target ... ] < mam-file
+#
+# NOTE: variables defined in this script may conflict with
+# mam-file variables
+#
+
+_command_=mamexec
+_debug_=:
+_diff_=.
+_error_='exit 1'
+_exec_=eval
+_force_=
+_list_=
+_same_=.
+_set_=
+_silent_=
+_state_list_=MAMlist
+_state_time_=MAMtime
+_tmp_=/tmp/mam.$$.mam
+
+trap 'rm -f $_tmp_' 0
+trap 'exit 2' 1 2
+while :
+do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ --) shift
+ break
+ ;;
+ -*) case $1 in
+ -*[abceghjklmopqrtuvwxyz_A-Z0-9]*) # [!...] not portable
+ echo "Usage: $_command_ [ -dfins ] [ target ... ] < mam-file" >&2; exit 2
+ ;;
+ *) case $1 in
+ *d*) _debug_="eval echo $_command_: debug: >&2" ;;
+ esac
+ case $1 in
+ *f*) _force_=1 ;;
+ esac
+ case $1 in
+ *i*) _error_=: ;;
+ esac
+ case $1 in
+ *n*) _exec_=echo ;;
+ esac
+ case $1 in
+ *s*) _silent_=1 ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) break
+ ;;
+ esac
+ shift
+done
+_select_=
+while :
+do case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ *=*) eval $1
+ ;;
+ *) case $_select_ in
+ "") _select_=$1 ;;
+ *) _select_="$_select_|$1" ;;
+ esac
+ ;;
+ esac
+ shift
+done
+case $_select_ in
+"") _select_="*" ;;
+esac
+(set -e; false || true) && _set_=e || echo $_command_: command errors ignored because of shell botch >&2
+case $_silent_ in
+"") _set_=x$_set_
+ ;;
+*) case $_exec_ in
+ "echo") _exec_=: ;;
+ esac
+ ;;
+esac
+case $_exec_ in
+"eval") _begin_="("
+ _end_=") </dev/null"
+ case $_set_ in
+ ?*) _set_="set -$_set_;" ;;
+ esac
+ ;;
+*) _set_=
+ ;;
+esac
+
+if test -f $_state_list_ -a -f $_state_time_
+then mamstate $_state_list_ < $_state_list_ | sort > $_tmp_
+ for _i_ in `comm -12 $_state_time_ $_tmp_ | sed 's/ .*//'`
+ do case $_same_ in
+ .) _same_=$_i_ ;;
+ *) _same_="$_same_|$_i_" ;;
+ esac
+ done
+fi
+
+_index_=_
+_match_=
+case `(echo ok | (read -r a; echo $a) 2>/dev/null)` in
+ok) _read_='read -r'
+ ;;
+*) # read strips \ -- thanks a lot
+ # tmp file avoids char at a time read
+ _read_=read
+ sed 's/\\/\\\\/g' > $_tmp_
+ exec < $_tmp_
+ rm -f $_tmp_
+ ;;
+esac
+_old_=1
+_ifs_=$IFS
+while IFS=' '; $_read_ _op_ _arg_ _val_
+do IFS=$_ifs_
+ case $_op_ in
+ "note") continue
+ ;;
+ "info") case $_arg_ in
+ "mam") _old_= ;;
+ esac
+ continue
+ ;;
+ "setv") eval _data_='$'$_arg_
+ case $_index_:$_data_ in
+ __*:*|*:)
+ case $_exec_ in
+ "eval") ;;
+ *) echo "$_arg_=$_val_" ;;
+ esac
+ eval $_arg_="$_val_" "</dev/null"
+ ;;
+ esac
+ case $_arg_:$mam_cc_L in
+ "CC:") (
+ set -
+ mkdir /tmp/mam$$
+ cd /tmp/mam$$
+ echo 'main(){return 0;}' > main.c
+ code=1
+ if $CC -c main.c 2>/dev/null
+ then if $CC -L. main.o -lc 2>/dev/null
+ then $CC -L. main.o -lc > libc.a 2>/dev/null || code=0
+ fi
+ fi
+ cd /tmp
+ rm -rf /tmp/mam$$
+ exit $code
+ ) </dev/null && mam_cc_L=' '
+ ;;
+ esac
+ continue
+ ;;
+ "make") eval _name_$_index_=$_name_
+ eval _prev_$_index_=$_prev_
+ eval _cmds_$_index_='"$_cmds_"'
+ eval _attr_$_index_=$_attr_
+ eval _name_=$_arg_
+ _prev_=$_index_
+ case " $_val_ " in
+ *" metarule "*) _attr_=m$_attr_ ;;
+ esac
+ _cmds_=
+ eval " case \"$_name_\" in
+ $_select_)
+ case \"$_select_\" in
+ \"*\") _select_=$_name_ ;;
+ esac
+ _match_=1
+ _attr_=x$_attr_
+ ;;
+ esac"
+ case $_force_ in
+ "") eval " case \"$_name_\" in
+ $_diff_)_attr_=u$_attr_ ;;
+ $_same_);;
+ *) _attr_=u$_attr_ ;;
+ esac"
+ ;;
+ *) _attr_=u$_attr_
+ ;;
+ esac
+ case $_attr_ in
+ *u*) case $_diff_ in
+ .) _diff_=$_name_ ;;
+ *) _diff_="$_diff_|$_name_" ;;
+ esac
+ ;;
+ esac
+ _index_=_$_index_
+ eval _name_$_index_=$_name_
+ eval _prev_$_index_=$_prev_
+ eval _cmds_$_index_=$_cmds_
+ eval _attr_$_index_=$_attr_
+ eval _list_='"'"$_list_"'
+'$_name_'"'
+ continue
+ ;;
+ "prev") case $_force_ in
+ "") eval " case \"$_arg_\" in
+ $_diff_)_attr_=u$_attr_ ;;
+ $_same_) ;;
+ *) _attr_=u$_attr_ ;;
+ esac"
+ ;;
+ *) _attr_=u$_attr_
+ ;;
+ esac
+ continue
+ ;;
+ esac
+ case $_index_ in
+ _) echo $_op_: missing make op >&2; continue ;;
+ esac
+ case $_op_ in
+ "attr") case $_val_ in
+ "meta"|"suff") _attr_=m$_attr_ ;;
+ esac
+ ;;
+ "exec"|"....")
+ case $_old_ in
+ "") _arg_=$_val_
+ ;;
+ *) case $_val_ in
+ ?*) _arg_="$_arg_ $_val_" ;;
+ esac
+ ;;
+ esac
+ case $_cmds_ in
+ "") _cmds_=$_arg_
+ ;;
+ *) _cmds_="$_cmds_
+$_arg_"
+ ;;
+ esac
+ ;;
+ "done") eval _arg_=$_arg_
+ _prop_=
+ case $_arg_ in
+ $_name_)case $_attr_ in
+ *m*) ;;
+ *x*u*|*u*x*)
+ case $_cmds_ in
+ "") case $_attr_ in
+ *u*) _prop_=u ;;
+ esac
+ ;;
+ *) $_exec_ "$_begin_$_set_$_cmds_$_end_" ||
+ {
+ _code_=$?
+ case $_set_ in
+ *-*e*) ;;
+ *) case $_cmds_ in
+ *if*then*fi*|"||") _code_=0 ;;
+ esac
+ ;;
+ esac
+ case $_code_ in
+ 0) ;;
+ *) echo "*** exit code $_code_ making $_name_" >&2
+ $_error_
+ ;;
+ esac
+ }
+ _prop_=u
+ ;;
+ esac
+ ;;
+ esac
+ _index_=$_prev_
+ eval _name_='$'_name_$_index_
+ eval _prev_='$'_prev_$_index_
+ eval _cmds_='$'_cmds_$_index_
+ eval _attr_=$_prop_'$'_attr_$_index_
+ ;;
+ *) echo $_val_: $_op_ $_name_ expected >&2
+ ;;
+ esac
+ ;;
+ esac
+done
+IFS=$_ifs_
+case $_match_ in
+"") echo "$_command_: don't know how to make $_select_" >&2; $_error_ ;;
+esac
+case $_exec_ in
+"eval") echo "$_list_" > $_state_list_
+ mamstate $_state_list_ < $_state_list_ | sort > $_state_time_
+ ;;
+esac
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/mamstate.c b/usr/src/contrib/ast/src/cmd/ksh93/mamstate.c
new file mode 100644
index 0000000000..7a0e459bec
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/mamstate.c
@@ -0,0 +1,73 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* David Korn <dgk@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * AT&T Bell Laboratories
+ * make abstract machine file state support
+ *
+ * mamstate reference [ file ... | <files ]
+ *
+ * stdout is list of <file,delta> pairs where delta
+ * is diff between reference and file times
+ * non-existent files are not listed
+ */
+
+#if !lint
+static char id[] = "\n@(#)$Id: mamstate (AT&T Bell Laboratories) 1989-06-26 $\0\n";
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+main(argc, argv)
+int argc;
+register char** argv;
+{
+ register char* s;
+ register int c;
+ long ref;
+ struct stat st;
+ char buf[1024];
+
+ if (!(s = *++argv) || stat(s, &st))
+ {
+ fprintf(stderr, "Usage: mamstate reference [ file ... | <files ]\n");
+ exit(1);
+ }
+ ref = (long)st.st_mtime;
+ if (s = *++argv) do
+ {
+ if (!stat(s, &st))
+ printf("%s %ld\n", s, (long)st.st_mtime - ref);
+ } while (s = *++argv);
+ else do
+ {
+ s = buf;
+ while ((c = getchar()) != EOF && c != ' ' && c != '\n')
+ if (s < buf + sizeof(buf) - 1) *s++ = c;
+ if (s > buf)
+ {
+ *s = 0;
+ if (!stat(buf, &st))
+ printf("%s %ld\n", buf, (long)st.st_mtime - ref);
+ }
+ } while (c != EOF);
+ exit(0);
+}
diff --git a/usr/src/lib/libshell/common/nval.3 b/usr/src/contrib/ast/src/cmd/ksh93/nval.3
index 3926ef5b88..9dc09a51ef 100644
--- a/usr/src/lib/libshell/common/nval.3
+++ b/usr/src/contrib/ast/src/cmd/ksh93/nval.3
@@ -1,10 +1,7 @@
.fp 5 CW
.TH NVAL 3 "12 Feb 2003"
-.PP
.SH NAME
-.PP
\fBnval\fR \- the \f5ksh\fP name/value library
-.PP
.SH SYNOPSIS
.ta .8i 1.6i 2.4i 3.2i 4.0i
.SS "HEADERS/LIBRARIES"
@@ -104,9 +101,7 @@ void nv_setref(Namval_t *\fInp\fP, Dt_t *\fIdp\fP, int \fIflags\fP);
Namval_t *nv_lastdict(void);
.ft R
.fi
-.PP
.SH DESCRIPTION
-.PP
\fINval\fP is a library of functions for interacting with name-value
pairs as used in \f5ksh\fP.
It is built on top the container dictionary type library facility
@@ -193,9 +188,9 @@ name-value pair that contains
the last dictionary searched on the previous \f5nv_open()\fP.
.PP
Name-value pairs can also be allocated without belonging to
-a dictionary. They will typically be looked by a a \fIcreate\fP
+a dictionary. They will typically be looked up by a \fIcreate\fP
discipline associated with a parent node. In this case the
-node size will by \f5NV_MINSZ\fP and \fIn\fP nodes can be allocated
+node size will be \f5NV_MINSZ\fP and \fIn\fP nodes can be allocated
vial \f5calloc(5NV_MINSZ,\fIn\fP)\fP(3).
The \f5nv_namptr\fP function can be used on the pointer returned by
\f5calloc\fP along with the element number to return the
@@ -450,7 +445,7 @@ the current \fIflags\fP argument.
The \f5createf()\fP discipline function
must return the created name-value pair, otherwise the default action
will be taken.
-If the name-value pair that is returned is the same as the
+If the name-value pair that is returned is the same as the
one given, then the the behavior will be the same as if
an invalid name had been given to \f5nv_open()\fP.
The \f5nv_create()\fP function may be called within
diff --git a/usr/src/lib/libshell/common/sh.1 b/usr/src/contrib/ast/src/cmd/ksh93/sh.1
index cf40299f82..8630911ed4 100644
--- a/usr/src/lib/libshell/common/sh.1
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh.1
@@ -4,7 +4,6 @@
.\"
.\" @(#)sh.1 (dgk@research.att.com) 12/28/93
.\"
-.xx labels=5
.nr Z 1 \" set to 1 when command name is ksh, 2 for ksh93
.ds OK [\|
.ds CK \|]
@@ -14,7 +13,7 @@
.TH SH 1
.\}
.if \nZ=1 \{\
-.TH KSH 1 "User Environment Utilities" "RDS Standard"
+.TH KSH 1
.\}
.if \nZ=2 \{\
.TH KSH93 1
@@ -77,8 +76,8 @@ or a file.
.if \nZ=0 .I Rsh\^
.if \nZ=1 .I Rksh\^
.if \nZ=2 .I Rksh93\^
-is a restricted version of the
-.if \nZ=0 standard
+is a restricted version of the
+.if \nZ=0 standard
command interpreter
.if \nZ=0 .IR sh ;
.if \nZ=1 .IR ksh ;
@@ -137,7 +136,7 @@ from the character set defined by the current locale,
excluding non-quoted
.IR metacharacters .
.PP
-A
+A
.I command\^
is a sequence of characters in the syntax
of the shell language.
@@ -149,7 +148,7 @@ shell itself without creating a separate process.
Some commands are built-in purely for convenience
and are not documented here.
Built-ins that cause
-side effects in the shell environment and
+side effects in the shell environment and
built-ins that are found before performing a
path search (see
.I Execution\^
@@ -578,7 +577,7 @@ of the
.I varname\^
preceding the last
.B \s+2.\s-2
-must refer to an existing variable.
+must refer to an existing variable.
The body of the function is the
.I list\^
of commands between
@@ -593,6 +592,29 @@ as if the \f2varname\^\fP\f3()\fP syntax were used to define it.
.I Functions\^
below.)
.TP
+\f3namespace\fP \f2identifier\^\fP \f3{\fP \f2list\^\fP \f3;}\fP
+.br
+Defines or uses the name space
+.I identifier\^
+and runs the commands in
+.I list\^
+in this name space.
+(See
+.I Name Spaces\^
+below.)
+.TP
+\f3&\fP \*(OK \f2name\^\fP \*(OK \f2arg...\^\fP \*(CK \*(CK
+Causes subsequent
+.I list\^
+commands terminated by
+.B &
+to be placed in the background job pool
+.IR name .
+If
+.I name\^
+is omitted a default unnamed pool is used.
+Commands in a named background pool may be executed remotely.
+.TP
\f3time\fP \*(OK \f2pipeline\^\fP \*(CK
.br
If \f2pipeline\^\fP is omitted the user and system time for
@@ -609,7 +631,7 @@ variable may be set to a format string that specifies how the timing
information should be displayed.
See
.B "Shell Variables"
-below
+below
for a description of the
.SM
.B TIMEFORMAT
@@ -646,6 +668,9 @@ between \f3=\fP and \fIword\^\fP.
.TP
\f2varname\^\fP\f3=(\fP\f2assign_list\^\fP\f3)\fP
No space is permitted between \f2varname\^\fP and the \f3=\fP.
+The variable
+.I varname
+is unset before the assignment.
An \f2assign_list\^\fP can be one of the following:
.RS 15
.PD 0
@@ -697,7 +722,7 @@ value is not unset and the new values are appended to the
current ones provided that the types are compatible.
.PP
The right hand side of a variable assignment undergoes all the expansion
-list below except word splitting, brace expansion, and file name generation.
+listed below except word splitting, brace expansion, and file name generation.
When the left hand side is an assignment is a compound variable and
the right hand is the name of a compound variable, the compound variable
on the right will be copied or appended to the compound variable on the left.
@@ -720,6 +745,8 @@ quoting characters,
file expansion characters,
parameter expansion and command substitution
characters,
+the characters
+.B /
and
.BR = .
The replacement string can contain any
@@ -897,10 +924,6 @@ parentheses preceded by a dollar sign (
is replaced by the value of the arithmetic expression
within the double parentheses.
.SS Process Substitution.
-This feature is only available on
-versions of the UNIX operating system that support the
-.B /dev/fd
-directory for naming open files.
Each command argument of the form
\f3<(\fP\f2list\^\fP\f3)\fP
or
@@ -908,7 +931,8 @@ or
will run process
.I list
asynchronously connected to some file in
-.BR /dev/fd .
+.B /dev/fd
+if this directory exists, or else a fifo a temporary directory.
The name of this file will become the argument to the command.
If the form with
.B >
@@ -1076,6 +1100,22 @@ Note that no space is allowed before or after the
.sp .5
.PP
.PD 0
+Attributes assigned by the
+.I typeset\^
+special built-in command apply to all elements of the array.
+An array element can be a simple variable, a compound variable or an
+array variable. An element of an indexed array can be either an indexed
+array or an associative array. An element of an associative array can also
+be either. To refer to an array element that is part of an array
+element, concatenate the subscript in brackets. For example, to refer
+to the
+.I foobar\^
+element of an associative array that is defined as the
+third element of the indexed array, use
+.BI ${ vname [ 3 ][ foobar ]}
+.sp .5
+.PP
+.PD 0
A
.I nameref\^
is a variable that is a reference to another variable.
@@ -1175,10 +1215,10 @@ are substituted
(separated by a field separator character).
If an array
.I vname\^
-with subscript
+with last subscript
.B \(**
.BR @ ,
-or of the form
+or for index arrays of the form
.I sub1\^
.B ..
.IR sub2 .
@@ -1225,7 +1265,7 @@ is substituted.
\f3${@\fP\f2vname\^\fP\f3}\fP
Expands to the type name (See
.I "Type Variables"\^
-below) or attributes of the variable referred to by
+below) or attributes of the variable referred to by
.IR vname .
.TP
\f3${!\fP\f2vname\^\fP\f3}\fP
@@ -1267,12 +1307,12 @@ When
is of the form
.I sub1\^
.B ..
-.I sub2\^
+.I sub2\^
it expands
to the list of subscripts between
.I sub1\^
and
-.I sub2\^
+.I sub2\^
inclusive using the same quoting rules as
.BR @ .
.TP
@@ -1349,7 +1389,7 @@ as an arithmetic expression and consisting of the
number of characters determined by the arithmetic expression
defined by
.IR length.
-In the second form, the remainder of the value is used.
+In the second form, the remainder of the value is used.
If
A negative
.I offset\^
@@ -1472,7 +1512,7 @@ is replaced by the given
The third form restricts the pattern match to the beginning of the string
while the fourth form restricts the pattern match to the end of
the string.
-When
+When
.I string\^
is null, the
.I pattern\^
@@ -1545,10 +1585,17 @@ the new type is derived from the type of the first variable (See
below.).
.TP
.B !
-The process number of the last background command invoked or
-the most recent job put in the background with the
+The process id or the pool name and job number of the last background command
+invoked or the most recent job put in the background with the
.B bg
built-in command.
+Background jobs started in a named pool will be in the form
+.IB pool . number
+where
+.I pool\^
+is the pool name and
+.I number\^
+is the job number within that pool.
.TP
.B .sh.command
When processing a
@@ -1640,6 +1687,13 @@ variable
becomes unset when the variable that has expanded
is assigned a new value.
.TP
+.B .sh.math
+Used for defining arithmetic functions
+(see
+.I "Arithmetic evaluation"
+below).
+and stores the list of user defined arithmetic functions.
+.TP
.B .sh.name
Set to the name of the variable at the time that a
discipline function is invoked.
@@ -1657,6 +1711,14 @@ Set to the value of the variable at the time that the
or
.B append
discipline function is invoked.
+When a user defined arithmetic function is invoked, the value
+of
+.B .sh.value
+is saved and
+.B .sh.value
+is set to long double precision floating point.
+.B .sh.value
+is restored when the function returns.
.TP
.B .sh.version
Set to a value that identifies the version of this shell.
@@ -1729,7 +1791,7 @@ be the value that was assigned plus the number of seconds since the assignment.
.B SHLVL
An integer variable the is incremented each time the shell
is invoked and is exported.
-If
+If
.SM
.B SHLVL
is not in the environment when the shell is invoked, it is set
@@ -1795,7 +1857,7 @@ On systems that support a system wide \fB/etc/ksh.kshrc\fP initialization file,
if the filename generated by the expansion of
.SM
.B ENV
-begins with
+begins with
.B /./
or
.B .\^/.\^/
@@ -2291,7 +2353,7 @@ In each case, fields are created
by prepending the characters before the
.B {
and appending the characters after the
-.B }
+.B }
to each of the strings generated by the characters between
the
.B {
@@ -2342,7 +2404,7 @@ In the remaining forms, a field is created for each number starting at
.I n1\^
and continuing until it reaches
.I n2\^
-incrementing
+incrementing
.I n1\^
by
.IR n3\^ .
@@ -2404,7 +2466,7 @@ If
.B FIGNORE
is set,
then each file name component
-that matches the pattern defined by the value of
+that matches the pattern defined by the value of
.SM
.B FIGNORE
is ignored when generating the matching filenames.
@@ -2461,6 +2523,8 @@ If the first character following the opening
.B \*(OK\^
is a
.B !
+or
+.B ^
then any character not enclosed is matched.
A
.B \-
@@ -2474,9 +2538,8 @@ and
character classes can be specified with the syntax
\f3[:\fP\f2class\fP\f3:]\fP
where class is one of the following classes defined in the ANSI-C standard:
-(Note that \f3word\fP is equivalent to \f3alnum\fP plus the character \f3_\fP).
-.PP
-.if t .RS
+(Note that \f3word\fP is equivalent to \f3alnum\fP plus the character \f3_\fP.)
+.br
.B
.if n alnum alpha blank cntrl digit graph lower print punct space upper word xdigit
.if t alnum alpha blank cntrl digit graph lower print punct space upper word xdigit
@@ -2490,16 +2553,14 @@ an equivalence class can be specified with the syntax
which matches all characters with the same primary
collation weight (as defined by the current locale) as
the character \f2c\fP.
-.br
Within
.B \*(OK\^
and
.BR \*(CK\^ ,
\f3[.\fP\f2symbol\fP\f3.]\fP
matches the collating symbol \f2symbol\fP.
-.if t .RE
-.PD
.RE
+.PD
A
.I pattern-list
is a list of one or more patterns separated from each other
@@ -2554,7 +2615,7 @@ When \f2pattern-list\^\fP is contained within parentheses,
the backslash character \f3\e\fP is treated specially even
when inside a character class. All ANSI-C character escapes are
recognized and match the specified character. In addition
-the following escape sequences are recognized:
+the following escape sequences are recognized:
.PD 0
.RS
.TP
@@ -2638,7 +2699,7 @@ this pattern matches any C language string.
Each sub-pattern in a composite pattern is numbered,
starting at 1, by the location of the \f3(\fP within
the pattern.
-The sequence \f3\e\fP\f2n\^\fP, where \f2n\^\fP
+The sequence \f3\e\fP\f2n\^\fP, where \f2n\^\fP
is a single digit and \f3\e\fP\f2n\^\fP comes after
the \f2n\fP-th. sub-pattern,
matches the same string as the sub-pattern itself.
@@ -2648,6 +2709,13 @@ Finally a pattern can contain sub-patterns of the form
where either \f2options\^\fP or \f3:\fP\f2pattern-list\^\fP
can be omitted. Unlike the other compound patterns,
these sub-patterns are not counted in the numbered sub-patterns.
+\f3:\fP\f2pattern-list\^\fP must be omitted for options
+.BR F ,
+.BR G ,
+.B N ,
+and
+.B V
+below.
If \f2options\^\fP is present, it can consist of one or more
of the following:
.PD 0
@@ -2685,6 +2753,21 @@ This is ignored. However, when it is the first letter and is
used with file name generation, and no matches occur,
the file pattern expands to the empty string.
.TP
+.B X
+The remainder of the pattern uses augmented regular expression syntax
+like the
+.IR xgrep (1)
+command.
+.TP
+.B P
+The remainder of the pattern uses
+.IR perl (1)
+regular expression syntax. Not all perl regular expression syntax is
+currently implemented.
+.TP
+.B V
+The remainder of the pattern uses System V regular expression syntax.
+.TP
.B i
Treat the match as case insensitive.
.TP
@@ -2816,7 +2899,7 @@ cannot be altered by quoting them.
.SS Arithmetic Evaluation.
The shell performs arithmetic evaluation for
arithmetic substitution, to evaluate an arithmetic command,
-to evaluate an indexed array subscript,
+to evaluate an indexed array subscript,
and to evaluate arguments to
the built-in commands
.B shift\^
@@ -2828,6 +2911,11 @@ arithmetic or long double precision floating point for
systems that provide this data type.
Floating point constants follow the ANSI-C programming language
floating point conventions.
+The floating point constants
+.B Nan
+and
+.B Inf
+can be use to represent "not a number" and infinity respectively.
Integer constants follow the ANSI-C programming language
integer constant conventions although only single byte
character constants are recognized and character casts
@@ -2861,20 +2949,39 @@ can be used for exponentiation.
It has higher precedence than multiplication and is left associative.
In addition, when the value of an arithmetic variable
or sub-expression can be represented as a long integer,
-all C language integer arithmetic operations can be performed.
+all C language integer arithmetic operations can be performed.
Variables can be referenced by name within an arithmetic expression
without using the parameter expansion syntax.
When a variable is referenced, its value is evaluated as
an arithmetic expression.
.PP
Any of the following math library functions that are in the C math library
-can be used within an arithmetic expression:
+can be used within an arithmetic expression:
.PP
.if t .RS
.B
-.if n abs acos acosh asin asinh atan atan2 atanh cbrt copysign cos cosh erf erfc exp exp2 expm1 fabs fdim finite floor fma fmax fmod hypot ilogb int isinf isnan j0 j1 jn lgamma log log2 logb nearbyint nextafter nexttoward pow remainder rint round sin sinh sqrt tan tanh tgamma trunc y0 y1 yn
-.if t abs acos acosh asin asinh atan atan2 atanh cbrt copysign cos cosh erf erfc exp exp2 expm1 fabs fdim finite floor fma fmax fmod j0 j1 jn hypot ilogb int isinf isnan lgamma log log2 logb nearbyint nextafter nexttoward pow rint round sin sinh sqrt tan tanh tgamma trunc y0 y1 yn
+.if n abs acos acosh asin asinh atan atan2 atanh cbrt ceil copysign cos cosh erf erfc exp exp2 expm1 fabs fpclassify fdim finite floor fma fmax fmin fmod hypot ilogb int isfinite sinf isnan isnormal issubnormal issubordered iszero j0 j1 jn lgamma log log10 log2 logb nearbyint nextafter nexttoward pow remainder rint round scanb signbit sin sinh sqrt tan tanh tgamma trunc y0 y1 yn
+.if t abs acos acosh asin asinh atan atan2 atanh cbrt ceil copysign cos cosh erf erfc exp exp2 expm1 fabs fpclassify fdim finite floor fma fmax fmod j0 j1 jn hypot ilogb int isfinite isinf isnan isnormal issubnormal issubordered iszero lgamma log log10 log2 logb nearbyint nextafter nexttoward pow rint round scalb signbit sin sinh sqrt tan tanh tgamma trunc y0 y1 yn
.if t .RE
+In addition, arithmetic functions can be define as shell functions with a
+variant of the
+.B function
+.I name\^
+syntax,
+.TP
+.PD 0
+\f3function .sh.math.\fP\f2name ident\^\fP ... \f3{\fP \f2list\^\fP \f3;}\fP
+.PD
+where
+.I name\^
+is the function name used in the arithmetic expression and each identifier,
+.I ident\^
+is a name reference to the long double precision floating point argument.
+The value of
+.B .sh.value
+when the function returns is the value of this function.
+User defined functions can take up to 3 arguments and override C math library
+functions.
.PP
An internal representation of a
.I variable\^
@@ -3052,6 +3159,11 @@ True, if
.I file\^
exists and it has its setuid bit set.
.TP
+\f3\-v\fP \f2name\fP
+True, if variable
+.I name\^
+is a valid variable name and is set.
+.TP
\f3\-w\fP \f2file\fP
True, if
.I file\^
@@ -3096,6 +3208,11 @@ True, if
.I file\^
exists and its group matches the effective group id of this process.
.TP
+\f3\-R\fP \f2name\fP
+True if variable
+.I name\^
+is a name reference.
+.TP
\f3\-S\fP \f2file\fP
True, if
.I file\^
@@ -3124,7 +3241,7 @@ is older than
\f2file1\fP \f3\-ef\fP \f2file2\fP
True, if
.I file1\^
-and
+and
.I file2\^
exist and refer to the same file.
.TP
@@ -3315,7 +3432,7 @@ this causes an error;
otherwise, it is truncated to zero length.
.TP
.BI >| word
-Sames as
+Same as
.BR > ,
except that it overrides the
.B noclobber
@@ -3345,7 +3462,7 @@ for reading and writing
as standard output.
.TP
.BI <>; word
-The same as
+The same as
.BI <> word
except that if the command completes successfully,
.I word\^
@@ -3451,11 +3568,11 @@ The same as
.B <#
except applies to file descriptor 1.
.TP
-.BI <# pattern
+.BI <# pattern
Seeks forward to the beginning of the next line containing
.IR pattern .
.TP
-.BI <## pattern
+.BI <## pattern
The same as
.B <#
except that the portion of the file that is skipped is copied to
@@ -3467,7 +3584,7 @@ file descriptor number referred to is that specified
by the digit
(instead of the default 0 or 1).
If one of the above, other than
-.BR >&\-
+.BR >&\-
and the
.B >#
and
@@ -3734,7 +3851,7 @@ associated with it.
The shell initially understands the discipline names \f3get\fP,
\f3set\fP, \f3append\fP, and \f3unset\fP but can be added
when defining new types. On most systems
-others can be added at run time via the
+others can be added at run time via the
C programming interface extension provided by the
.B builtin
built-in utility.
@@ -3779,6 +3896,46 @@ when \f2name\^\fP is the name of a discipline, and there is
no variable of this name, is equivalent to the command substitution
\f3${ \fP\f2var\^\fP\f3.\fP\f2name\^\fP\f3;}\fP.
+.SS Name Spaces.
+Commands and functions that are executed as part of the
+.I list\^
+of a
+.B namespace
+command that modify variables or create new ones, create
+a new variable whose
+name is the name of the name space
+as given by
+.I identifier\^
+preceded by \fB\s+2.\s-2\fP.
+When a variable whose name is
+.I name\^
+is referenced, it is
+first searched for
+using \fB\s+2.\s-2\fP\f2identifier\fP\fB\s+2.\s-2\fP\f2name\fP.
+Similarly, a function defined by a command in the
+.B namespace
+.I list\^
+is created using the name space name preceded by a \fB\s+2.\s-2\fP.
+.PP
+When the
+.I list\^
+of a
+.B namespace
+command contains a
+.B namespace
+command, the names of variables and functions that are created consist
+of the variable or function name preceded by the list of
+.IR identifier\^ s
+each preceded by \fB\s+2.\s-2\fP.
+.PP
+Outside of a name space, a variable or function created inside a
+name space can be referenced by preceding it with the name space name.
+.PP
+By default, variables staring with
+\fB\s+2.\s-2sh\fP are in the
+.B sh
+name space.
+
.SS Type Variables.
Typed variables provide a way to create data structure and objects.
A type can be defined either by a shared library, by the
@@ -3821,7 +3978,7 @@ The
.BR \-A ,
.BR \-h ,
and
-.B \-S
+.B \-S
options of
.B typeset
are permitted with each of these new built-ins.
@@ -3830,9 +3987,9 @@ An instance of a type is created by invoking the type name
followed by one or more instance names.
Each instance of the type is initialized with a copy of the sub-variables
except for sub-variables that are defined with the
-.B \-S
+.B \-S
option. Variables defined with the
-.B \-S
+.B \-S
are shared by all instances of the type.
Each instance can change the value of any sub-variable and can also
define new discipline functions of the same names
@@ -3871,7 +4028,13 @@ that apply to the new type.
If the new type name is the same is that of the base type,
the type will be replaced and the original type will
no longer be accessible.
-
+.PP
+The
+.B typeset
+command with the
+.B \-T
+and no option argument or operands will write all the type definitions to
+standard output in a form that that can be read in to create all they types.
.SS Jobs.
.PP
If the
@@ -3921,6 +4084,11 @@ If you set this
tty option, then background jobs will stop when they try to produce
output like they do when they try to read input.
.PP
+A job pool is a collection of jobs started with
+.I list\^
+.B &
+associated with a name.
+.PP
There are several ways to refer to jobs in the shell.
A job can be referred to by the process id of any process of the job
or by one of the following:
@@ -3929,6 +4097,16 @@ or by one of the following:
.BI % number
The job with the given number.
.TP
+.I pool\^
+All the jobs in the job pool named by
+.IR pool .
+.TP
+.IB pool . number
+The job number
+.I number\^
+in the job pool named by
+.IR pool .
+.TP
.BI % string
Any job whose command line begins with
.IR string .
@@ -3947,6 +4125,9 @@ Equivalent to
.BI %\-
Previous job.
.PD
+In addition, unless noted otherwise, wherever a job can be specified,
+the name of a background job pool can be used to represent all the
+jobs in that pool.
.PP
The shell learns immediately whenever a process changes state.
It normally informs you whenever a job becomes blocked so that
@@ -4033,11 +4214,14 @@ or a user defined
but it is one of the built-in commands listed below,
it is executed in the current shell process.
.PP
-The shell variable
+The shell variables
.B
.SM PATH
-defines the search path for
-the directory containing the command.
+followed by the variable
+.B
+.SM FPATH
+defines the list of directories to
+search for the command name.
Alternative directory names are separated by
a colon
.RB ( : ).
@@ -4053,68 +4237,66 @@ two or more adjacent colons, or by a colon
at the beginning or end of the path list.
If the command name contains a \f3/\fP, then the search path
is not used.
-Otherwise, each directory in the path is
-searched for an executable file
-of the given name
-that is not a directory.
-If found, and if the shell
-determines that there is a built-in version
-of a command corresponding to a given pathname,
-this built-in is invoked in the current process.
-If found, and this directory is also contained in the value of the
+Otherwise, each directory in the list of directories defined by
+.B
+.SM PATH
+and
+.B
+.SM FPATH
+is checked in order.
+If the directory being searched is contained in
.B
.SM FPATH
-variable,
+and contains a file whose name matches the command being searched,
then this file is loaded into the current shell environment
as if it were the argument to the \fB.\fP command
except that only preset aliases are expanded,
and a function of the given name is executed
as described above.
-If not found, and the file
+.P
+If this directory is not in
+.B
+.SM FPATH
+the shell first
+determines whether there is a built-in version
+of a command corresponding to a given pathname and if so
+it is invoked in the current process.
+If no built-in is found, the shell checks for a file named
.B .paths
-is found, and this file contains a line of the form
+in this directory.
+If found and there is a line of the form
.BI FPATH= path
where
.I path\^
names an
-existing directory, and this directory contains
-a file of the given name,
-then this file is loaded into the current shell environment
-as if it were the argument to the \fB.\fP special built-in command
-and a function of the given name is executed.
-Otherwise, if found,
-a process is created and
-an attempt is made to execute the command via
-.IR exec (2).
+existing directory
+then that directory is searched after immediately after the current directory
+as if it were found in the
+.B
+.SM FPATH
+variable.
+If
+.I path\^
+does not begin with /, it is checked for relative to the directory
+being searched.
.P
-When an executable is found, the directory where it is found
-in is searched for a file named
-.BR .paths .
-If this file is found and it contains a line of the form
-.BI BUILTIN_LIB= value\^
-, then the library named by
-.I value\^
+The
+.B .paths
+file is then checked for a line of the form
+.BI PLUGIN_LIB= libname
+\*(OK \f3:\fP \f2libname\^\fP \*(CK .\|.\|. .
+Each library named by
+.I libname\^
will be searched for as if it were an option argument to
.BR "builtin -f" ,
and if it contains a built-in of the specified name
this will be executed instead of a command by this name.
-Otherwise, if this file is found and it contains a line of the form
-.IB name\^ = value\^
-in the first or second line, then the environment variable
-.I name\^
-is modified by prepending the directory specified by
-.I value\^
-to the directory list.
-If
-.I value\^
-is not an absolute directory, then it
-specifies a directory relative to the directory that the
-executable was found.
-If the environment variable
-.I name\^
-does not already exist it will be added to the environment
-list for the specified command.
+Any built-in loaded from a library found this way will be associated
+with the directory containing the
+.B .paths
+file so it will only execute if not found in an earlier directory.
.P
+Finally, the directory will be checked for a file of the given name.
If the file has execute permission but is not an
.B a.out
file,
@@ -4131,6 +4313,24 @@ bits are set on the file,
then the shell executes an agent whose job it is to
set up the permissions and execute the shell with the
shell command file passed down as an open file.
+If the
+.B .paths
+contains a line of the form
+.IB name\^ = value\^
+in the first or second line, then the environment variable
+.I name\^
+is modified by prepending the directory specified by
+.I value\^
+to the directory list.
+If
+.I value\^
+is not an absolute directory, then it
+specifies a directory relative to the directory that the
+executable was found.
+If the environment variable
+.I name\^
+does not already exist it will be added to the environment
+list for the specified command.
A parenthesized command is executed in
a sub-shell without removing non-exported variables.
.SS Command Re-entry.
@@ -4268,11 +4468,11 @@ Each of the edit modes has an operation to list the files
or commands that match a partially entered word.
When applied to the first word on the line,
or the first word after a
-.BR ; ,
-.BR \(bv ,
-.BR & ,
+.BR ; ,
+.BR \(bv ,
+.BR & ,
or
-.BR ( ,
+.BR ( ,
and the word does not begin with
.B \(ap
or contain a
@@ -4592,11 +4792,11 @@ Clear the screen.
(Meta space) Set mark.
.PP
.TP 10
-.BI ^J
+.BI ^J
(New\ line) Execute the current line.
.PP
.TP 10
-.BI ^M
+.BI ^M
(Return) Execute the current line.
.PP
.TP 10
@@ -4805,9 +5005,9 @@ and the line is entered.
This causes a comment to be inserted in the history file.
If the line begins with a
.BR # ,
-the
+the
.B #
-is deleted and one
+is deleted and one
.B #
after each new-line is also deleted.
.PD
@@ -5185,7 +5385,7 @@ it rings the bell.
Otherwise, the word is replaced
by the matching pattern and input mode is entered.
.TP 10
-.B \e
+.B \e
Command or file name completion as described above.
.RE
.SS "\ \ \ \ \ Other Edit Commands"
@@ -5226,19 +5426,19 @@ is omitted, then the current line is used.
Line feed and print current line.
Has effect only in control mode.
.TP 10
-.BI ^J
+.BI ^J
(New\ line) Execute the current line, regardless of mode.
.TP 10
-.BI ^M
+.BI ^M
(Return) Execute the current line, regardless of mode.
.TP 10
.B #
If the first character of the command is a
.BR # ,
then this command deletes this
-.B #
+.B #
and each
-.B #
+.B #
that follows a newline.
Otherwise,
sends the line after
@@ -5463,6 +5663,14 @@ represents the pathname whose basename is the name of the built-in.
The entry point function name is determined by prepending
.B b_
to the built-in name.
+A built-in specified by a pathname will only be executed when that pathname
+would be found during the path search. Built-ins found in libraries loaded
+via the
+.B .paths
+file will be associate with the pathname of the directory containing the
+.B .paths
+file.
+.P
The ISO C/C++ prototype is
\f3b_\fP\f2mycommand\fP\f3(int\fP \f2argc\fP, \f3char *\fP\f2argv\fP\f3[]\fP, \f3void *\fP\f2context\fP\f3)\fP
for the builtin command
@@ -5599,7 +5807,7 @@ a default path to be searched
rather than the one defined by the value of
.SM
.BR PATH .
-Functions will not be searched for when finding
+Functions will not be searched for when finding
.IR name .
In addition, if
.I name\^
@@ -5612,7 +5820,7 @@ prevents a script from terminating when an invalid
redirection is given.)
With the
.B \-x
-option,
+option,
if command execution would result in a failure because
there are too many arguments, errno
.SM
@@ -5757,6 +5965,14 @@ the names and values of each variable with
the export attribute are printed with the values
quoted in a manner that allows them to be re-input.
The
+.B export
+command is the same as
+.B typeset \-x
+except that if you use
+.B export
+within a function, no local
+variable is created.
+The
.B \-p
option
causes the word
@@ -5823,7 +6039,7 @@ or a
.BR \- .
An option not beginning with
.B +
-or
+or
.B \-
or the argument
.B \-\|\-
@@ -5946,7 +6162,7 @@ is not supplied, then the value of the variable
.SM
.B HISTEDIT
is used.
-If
+If
.SM
.B HISTEDIT
is not set, then
@@ -6009,7 +6225,7 @@ for a description of the format of
.PD 0
\f3kill\fP \*(OK \f3\-n\fP \f2signum\^\fP \*(CK \f2job\^\fP .\|.\|.
.TP
-\f3kill\fP \f3\-l\fP \*(OK \f2sig\^\fP .\|.\|. \*(CK
+\f3kill\fP \f3\-Ll\fP \*(OK \f2sig\^\fP .\|.\|. \*(CK
.PD
Sends either the TERM (terminate) signal or the
specified signal to the specified jobs or processes.
@@ -6042,10 +6258,17 @@ for a description of the format of
.IR job .
In the third form,
.BR "kill \-l" ,
+or
+.BR "kill \-L" ,
if
.I sig\^
is not specified,
the signal names are listed.
+The
+.B \-l
+option list only the signal names.
+.B \-L
+options lists each signal name and corresponding number.
Otherwise, for each
.I sig\^
that is a name, the corresponding signal number is listed.
@@ -6062,6 +6285,14 @@ Each
is a separate
.I "arithmetic expression"
to be evaluated.
+.B let
+only recognizes octal constants starting with
+.B 0
+when the
+.B set
+option
+.B letoctal
+is on.
See
.I "Arithmetic Evaluation"
above, for a description of arithmetic expression evaluation.
@@ -6239,7 +6470,7 @@ A
.B %B
option causes each of the arguments to be treated
as variable names and the binary value of variable
-will be printed.
+will be printed.
The alternate flag
.B #
causes a compound variable to be output on a single line.
@@ -6256,6 +6487,9 @@ to cause characters in
.I arg\^
that are special in HTML and XML
to be output as their entity name.
+The alternate flag
+.B #
+formats the output for use as a URI.
.TP
.B %P
A
@@ -6284,6 +6518,13 @@ format can be used instead of
.B %s
to cause the resulting string to be quoted in a manner than can
be reinput to the shell.
+When
+.B q
+is preceded by the alternative format specifier,
+.BR # ,
+the string is quoted in manner suitable as a field in a
+.B .csv
+format file.
.TP
.BI %( date-format )T
A
@@ -6306,7 +6547,7 @@ The precision field of the
format can be followed by a
.B .
and the output base.
-In this case, the
+In this case, the
.B #
flag character causes
.IB base #
@@ -6315,24 +6556,40 @@ to be prepended.
.B #
The
.B #
-flag when used with the
-.B d
-specifier without an output base,
-causes the output to be displayed in thousands units with one of the suffixes
-.B "k M G T P E"
-to indicate the unit.
-The
-.B #
-flag when used with the
-.B i
-specifier causes the output to be displayed in 1024 with one of the suffixes
-.B "Ki Mi Gi Ti Pi Ei"
-to indicate the unit.
+flag, when used with the
+.B %d
+format without an output base,
+displays the output in powers of 1000 indicated by one of the following suffixes:
+.BR "k M G T P E" ,
+and when used with the
+.B %i
+format displays the output in powers of 1024 indicated by one of the following suffixes:
+.BR "Ki Mi Gi Ti Pi Ei" .
.TP
.B =
The
.B =
-flag has been added to center the output within the specified field width.
+flag centers the output within the specified field width.
+.TP
+.B L
+The
+.B L
+flag, when used with the
+.B %c
+or
+.B %s
+formats, treats precision as character width instead of byte count.
+.TP
+.B ,
+The
+.B ,
+flag, when used with the
+.B %d
+or
+.B %f
+formats, separates groups of digits with the grouping delimiter
+.RB ( ,
+on groups of 3 in the C locale.)
.PD
.PP
.RE
@@ -6354,7 +6611,7 @@ or
on the command line
determines which method is used.
.TP
-\f3read\fP \*(OK \f3\-ACprsv\^\fP \*(CK \*(OK \f3\-d\fP \f2delim\^\fP\*(CK \*(OK \f3\-n\fP \f2n\^\fP\*(CK \*(OK \*(OK \f3\-N\fP \f2n\^\fP\*(CK \*(OK \*(OK \f3\-t\fP \f2timeout\^\fP\*(CK \*(OK \f3\-u\fP \f2unit\^\fP\*(CK \*(OK \f2vname\f3?\f2prompt\^\f1 \*(CK \*(OK \f2vname\^\fP .\|.\|. \*(CK
+\f3read\fP \*(OK \f3\-ACSprsv\^\fP \*(CK \*(OK \f3\-d\fP \f2delim\^\fP\*(CK \*(OK \f3\-n\fP \f2n\^\fP\*(CK \*(OK \*(OK \f3\-N\fP \f2n\^\fP\*(CK \*(OK \*(OK \f3\-t\fP \f2timeout\^\fP\*(CK \*(OK \f3\-u\fP \f2unit\^\fP\*(CK \*(OK \f2vname\f3?\f2prompt\^\f1 \*(CK \*(OK \f2vname\^\fP .\|.\|. \*(CK
The shell input mechanism.
One line is read and
is broken up into fields using the characters in
@@ -6425,6 +6682,11 @@ option causes the variable
.I vname\^
to be read as a compound variable. Blanks will be ignored when
finding the beginning open parenthesis.
+The \-S
+option causes the line to be treated like a record in a
+.B .csv
+format file so that double quotes can be used to allow the delimiter
+character and the new-line character to appear within a field.
The
.B \-p
option causes the input line
@@ -6571,7 +6833,7 @@ state rather than waiting for the next prompt.
.TP 8
.B \-e
Unless contained in a
-.B \(bv\(bv
+.B \(bv\(bv
or
.B &&
command, or the command following an
@@ -6656,6 +6918,12 @@ must be used.
Same as
.BR \-k .
.TP 8
+.B letoctal
+The
+.B let
+command allows octal constants starting with
+.BR 0 .
+.TP 8
.B markdirs
All directory names resulting from file name generation have a trailing
.B /
@@ -6894,7 +7162,7 @@ will be executed before each command.
The variable
.B .sh.command
will contain the contents of the current command line
-when
+when
.I action\^
is running.
If the exit status of the trap is
@@ -6967,12 +7235,7 @@ Does nothing, and exits 0. Used with
.B while
for infinite loops.
.TP
-\f3true\fP
-Does nothing, and exits 0. Used with
-.B while
-for infinite loops.
-.TP
-\(dg\(dg \f3typeset\fP \*(OK \f3\(+-ACHSflbnprtux\^\fP \*(CK \*(OK \f3\(+-EFLRXZi\*(OK\f2n\^\fP\*(CK \*(CK \*(OK \f3\-T \f2tname\fP=(\f2assign_list\fP) \*(CK \*(OK \f3\-h \f2str\fP \*(CK \*(OK \f3\-a\fP \*(OK\f2type\fP\*(CK \*(CK \*(OK \f2vname\^\fP\*(OK\f3=\fP\f2value\^\fP \*(CK \^ \*(CK .\|.\|.
+\(dg\(dg \f3typeset\fP \*(OK \f3\(+-ACHSfblmnprtux\^\fP \*(CK \*(OK \f3\(+-EFLRXZi\*(OK\f2n\^\fP\*(CK \*(CK \*(OK \f3\+-M \*(OK \f2mapname\fP \*(CK \*(CK \*(OK \f3\-T \*(OK \f2tname\fP=(\f2assign_list\fP) \*(CK \*(CK \*(OK \f3\-h \f2str\fP \*(CK \*(OK \f3\-a\fP \*(OK\f2type\fP\*(CK \*(CK \*(OK \f2vname\^\fP\*(OK\f3=\fP\f2value\^\fP \*(CK \^ \*(CK .\|.\|.
Sets attributes and values for shell variables and functions.
When invoked inside a function defined with the
.B function
@@ -7008,7 +7271,7 @@ Otherwise, it unsets each
Declares
.I vname\^
to be an indexed array.
-If
+If
.I type\^
is specified, it must be the name of an enumeration
type created with the
@@ -7058,6 +7321,25 @@ The
.B \-R
option is turned off.
.TP
+.B \-M
+Use the character mapping
+.I mapping\^
+defined by
+.IR wctrans (3).
+such as
+.B tolower
+and
+.B toupper
+when assigning a value to each of the specified operands.
+When
+.I mapping\^
+is specified and there are not operands, all variables
+that use this mapping are written to standard output.
+When
+.I mapping\^
+is omitted and there are no operands, all mapped
+variables are written to standard output.
+.TP
.B \-R
Right justify and fill with leading blanks.
If
@@ -7082,14 +7364,16 @@ When used inside a function defined with the
.B function
reserved word, the specified variables will have
.I "function static\^"
-scope.
+scope.
Otherwise, the variable is unset prior to processing the assignment list.
.TP
.B \-T
-Creates a type named by \fItname\^\fP using the compound
+If followed by \fItname\^\fP, it
+creates a type named by \fItname\^\fP using the compound
assignment
.I assign_list\^
to \f2tname\fP.
+Otherwise, it writes all the type definitions to standard output.
.TP
.B \-X
Declares
@@ -7125,10 +7409,16 @@ The names refer to function names rather than
variable names.
No assignments can be made and the only other
valid options are
+.BR \-S ,
.BR \-t ,
.B \-u
and
.BR \-x .
+The \-S
+can be used with discipline functions defined in a type to indicate that
+the function is static. For a static function, the same method will be used by all instances of that type no matter which instance references it. In addition,
+it can only use value of variables from the original type definition. These
+discipline functions cannot be redefined in any type instance.
The
.B \-t
option
@@ -7150,6 +7440,12 @@ on standard output. If
is specified, then a line containing the function name followed
by a shell comment containing the line number and path name of the
file where this function was defined, if any, is displayed.
+The exit status can be used to determine whether the function is
+defined so that
+.BI "typeset \-f .sh.math." name\^
+will return 0 when math function
+.I name\^
+is defined and non-zero otherwise.
.TP
.B \-b
The variable can hold any number of bytes of data.
@@ -7191,11 +7487,26 @@ is non-zero, it defines the output arithmetic base,
otherwise the output base will be ten.
.TP
.B \-l
-All upper-case characters are
+Used with
+.BR \-i ,
+.B \-E
+or
+.BR \-F ,
+to indicate long integer, or long float.
+Otherwise, all upper-case characters are
converted to lower-case.
The upper-case option,
.BR \-u ,
is turned off.
+Equivalent to
+.B "\-M tolower" .
+.TP
+.B \-m
+moves or renames the variable.
+The value is the name of a variable whose value will be moved to
+.IR vname\^ .
+The original variable will be unset.
+Cannot be used with any other options.
.TP
.B \-n
Declares
@@ -7205,6 +7516,7 @@ defined by the value of variable
.IR vname .
This is usually used to reference a variable inside
a function whose name has been passed as an argument.
+Cannot be used with any other options.
.TP
.B \-p
The name, attributes and values for the given
@@ -7229,11 +7541,16 @@ Tags are user definable and have no special
meaning to the shell.
.TP
.B \-u
-All lower-case characters are converted
+When given along with
+.BR \-i ,
+specifies unsigned integer.
+Otherwise, all lower-case characters are converted
to upper-case.
The lower-case option,
.BR \-l ,
is turned off.
+Equivalent to
+.B "\-M toupper" .
.TP
.B \-x
The given
@@ -7324,7 +7641,7 @@ If neither the
nor
.B S
option is specified, the limit applies to both.
-The current resource limit is printed when
+The current resource limit is printed when
.I limit\^
is omitted.
In this case, the soft limit is printed unless
@@ -7380,7 +7697,7 @@ The user file-creation mask is set to
.I mask
can either be an octal number or
a symbolic value as described in
-.IR chmod (1).
+.IR chmod (1).
If a symbolic value is given,
the new
umask value is the complement of the result of
@@ -7394,7 +7711,7 @@ The
.B \-S
option causes the mode to be printed as a symbolic
value. Otherwise, the
-mask is printed in octal.
+mask is printed in octal.
.TP
\(dg \f3unalias\fP \*(OK \f3\-a\fP \*(CK \f2name\^\fP .\|.\|.
The aliases
@@ -7542,7 +7859,7 @@ option is not present and
and a file by the name of
.I arg\^
exists, then it reads and executes this script.
-Otherwise, if the first
+Otherwise, if the first
.I arg\^
does not contain a
.BR / ,
@@ -7613,7 +7930,7 @@ In this case \s-1TERM\s+1 is ignored (so that \f3kill 0\fP
does not kill an interactive shell) and \s-1INTR\s+1 is caught and ignored
(so that
.B wait
-is interruptible).
+is ).
In all cases, \s-1QUIT\s+1 is ignored by the shell.
.TP
.B \-r
@@ -7645,7 +7962,7 @@ The
option is used
to generate a cross reference database
that can be used by a separate utility
-to find definitions and references for variables and commands.
+to find definitions and references for variables and commands.
.PP
The remaining options and arguments are described under the
.B set
@@ -7787,7 +8104,8 @@ Default personal initialization file, executed for interactive shells when
is not set.
.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.
+Alternative initialization file, executed instead of the personal initialization
+file when the real and effective user or group id do not match.
.TP
.B /dev/null
NULL device
@@ -7822,6 +8140,7 @@ sysconf(2),
umask(2),
ulimit(2),
wait(2),
+wctrans(3),
rand(3),
a.out(5),
profile(5),
@@ -7874,4 +8193,3 @@ won't be executed until the foreground job terminates.
It is a good idea to leave a space after the comma operator in
arithmetic expressions to prevent the comma from being interpreted
as the decimal point character in certain locales.
-
diff --git a/usr/src/lib/libshell/common/sh.memo b/usr/src/contrib/ast/src/cmd/ksh93/sh.memo
index 9f321e6eeb..9f321e6eeb 100644
--- a/usr/src/lib/libshell/common/sh.memo
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh.memo
diff --git a/usr/src/lib/libshell/common/sh/args.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/args.c
index b70649cdb4..5855f6a1c2 100644
--- a/usr/src/lib/libshell/common/sh/args.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/args.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -26,6 +26,9 @@
* AT&T Labs
*
*/
+/*
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ */
#include "defs.h"
#include "path.h"
@@ -203,7 +206,7 @@ int sh_argopts(int argc,register char *argv[], void *context)
break;
#if SHOPT_BASH
case -1: /* --rcfile */
- ap->sh->rcfile = opt_info.arg;
+ ap->sh->gd->rcfile = opt_info.arg;
continue;
case -2: /* --noediting */
if (!f)
@@ -303,6 +306,11 @@ int sh_argopts(int argc,register char *argv[], void *context)
}
else
{
+ if ((o == SH_RESTRICTED) &&
+ sh_isoption(SH_RESTRICTED)) {
+ errormsg(SH_DICT, ERROR_exit(1),
+ e_restricted, "r");
+ }
if(o==SH_XTRACE)
trace = 0;
off_option(&newflags,o);
@@ -322,7 +330,7 @@ int sh_argopts(int argc,register char *argv[], void *context)
trace = 0;
}
if(trace)
- sh_trace(argv,1);
+ sh_trace(shp,argv,1);
argc -= opt_info.index;
argv += opt_info.index;
if(action==PRINT)
@@ -390,21 +398,21 @@ void sh_applyopts(Shell_t* shp,Shopt_t newflags)
off_option(&newflags,SH_NOEXEC);
if(is_option(&newflags,SH_PRIVILEGED))
on_option(&newflags,SH_NOUSRPROFILE);
- if(!sh_isstate(SH_INIT) && is_option(&newflags,SH_PRIVILEGED) != sh_isoption(SH_PRIVILEGED) || sh_isstate(SH_INIT) && is_option(&((Arg_t*)shp->arg_context)->sh->offoptions,SH_PRIVILEGED) && shp->userid!=shp->euserid)
+ if(!sh_isstate(SH_INIT) && is_option(&newflags,SH_PRIVILEGED) != sh_isoption(SH_PRIVILEGED) || sh_isstate(SH_INIT) && is_option(&((Arg_t*)shp->arg_context)->sh->offoptions,SH_PRIVILEGED) && shp->gd->userid!=shp->gd->euserid)
{
if(!is_option(&newflags,SH_PRIVILEGED))
{
- setuid(shp->userid);
- setgid(shp->groupid);
- if(shp->euserid==0)
+ setuid(shp->gd->userid);
+ setgid(shp->gd->groupid);
+ if(shp->gd->euserid==0)
{
- shp->euserid = shp->userid;
- shp->egroupid = shp->groupid;
+ shp->gd->euserid = shp->gd->userid;
+ shp->gd->egroupid = shp->gd->groupid;
}
}
- else if((shp->userid!=shp->euserid && setuid(shp->euserid)<0) ||
- (shp->groupid!=shp->egroupid && setgid(shp->egroupid)<0) ||
- (shp->userid==shp->euserid && shp->groupid==shp->egroupid))
+ else if((shp->gd->userid!=shp->gd->euserid && setuid(shp->gd->euserid)<0) ||
+ (shp->gd->groupid!=shp->gd->egroupid && setgid(shp->gd->egroupid)<0) ||
+ (shp->gd->userid==shp->gd->euserid && shp->gd->groupid==shp->gd->egroupid))
off_option(&newflags,SH_PRIVILEGED);
}
#if SHOPT_BASH
@@ -776,37 +784,31 @@ char **sh_argbuild(Shell_t *shp,int *nargs, const struct comnod *comptr,int flag
}
#if _pipe_socketpair && !_socketpair_devfd
-# define sh_pipe arg_pipe
-/*
- * create a real pipe (not a socket) and print message on failure
- */
-static int arg_pipe(register int pv[])
-{
- int fd[2];
- if(pipe(fd)<0 || (pv[0]=fd[0])<0 || (pv[1]=fd[1])<0)
- errormsg(SH_DICT,ERROR_system(1),e_pipe);
- pv[0] = sh_iomovefd(pv[0]);
- pv[1] = sh_iomovefd(pv[1]);
- sh.fdstatus[pv[0]] = IONOSEEK|IOREAD;
- sh.fdstatus[pv[1]] = IONOSEEK|IOWRITE;
- sh_subsavefd(pv[0]);
- sh_subsavefd(pv[1]);
- return(0);
-}
+# define sh_pipe(a) sh_rpipe(a)
#endif
struct argnod *sh_argprocsub(Shell_t *shp,struct argnod *argp)
{
/* argument of the form <(cmd) or >(cmd) */
register struct argnod *ap;
- int monitor, fd, pv[2];
+ int monitor, fd, pv[3];
int subshell = shp->subshell;
ap = (struct argnod*)stkseek(shp->stk,ARGVAL);
ap->argflag |= ARG_MAKE;
ap->argflag &= ~ARG_RAW;
+ fd = argp->argflag&ARG_RAW;
+ if(fd==0 && shp->subshell)
+ sh_subtmpfile(shp);
+#if SHOPT_DEVFD
sfwrite(shp->stk,e_devfdNN,8);
+ pv[2] = 0;
sh_pipe(pv);
- fd = argp->argflag&ARG_RAW;
+#else
+ pv[0] = -1;
+ shp->fifo = pathtemp(0,0,0,"ksh.fifo",0);
+ mkfifo(shp->fifo,S_IRUSR|S_IWUSR);
+ sfputr(shp->stk,shp->fifo,0);
+#endif /* SHOPT_DEVFD */
sfputr(shp->stk,fmtbase((long)pv[fd],10,0),0);
ap = (struct argnod*)stkfreeze(shp->stk,0);
shp->inpipe = shp->outpipe = 0;
@@ -826,8 +828,13 @@ struct argnod *sh_argprocsub(Shell_t *shp,struct argnod *argp)
shp->subshell = subshell;
if(monitor)
sh_onstate(SH_MONITOR);
+#if SHOPT_DEVFD
close(pv[1-fd]);
sh_iosave(shp,-pv[fd], shp->topfd, (char*)0);
+#else
+ free(shp->fifo);
+ shp->fifo = 0;
+#endif /* SHOPT_DEVFD */
return(ap);
}
@@ -836,7 +843,6 @@ static int arg_expand(Shell_t *shp,register struct argnod *argp, struct argnod *
{
register int count = 0;
argp->argflag &= ~ARG_MAKE;
-#if SHOPT_DEVFD
if(*argp->argval==0 && (argp->argflag&ARG_EXP))
{
struct argnod *ap;
@@ -846,7 +852,6 @@ static int arg_expand(Shell_t *shp,register struct argnod *argp, struct argnod *
count++;
}
else
-#endif /* SHOPT_DEVFD */
if(!(argp->argflag&ARG_RAW))
{
#if SHOPT_OPTIMIZE
diff --git a/usr/src/lib/libshell/common/sh/arith.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/arith.c
index 684670aae6..3ced711e39 100644
--- a/usr/src/lib/libshell/common/sh/arith.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/arith.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,44 +29,50 @@
#include "name.h"
#include "streval.h"
#include "variables.h"
+#include "builtins.h"
#ifndef LLONG_MAX
#define LLONG_MAX LONG_MAX
#endif
+typedef Sfdouble_t (*Math_f)(Sfdouble_t, ...);
+
+extern const Namdisc_t ENUM_disc;
static Sfdouble_t NaN, Inf, Fun;
static Namval_t Infnod =
{
{ 0 },
"Inf",
- NV_NOFREE|NV_LDOUBLE,NV_RDONLY
};
static Namval_t NaNnod =
{
{ 0 },
"NaN",
- NV_NOFREE|NV_LDOUBLE,NV_RDONLY
};
static Namval_t FunNode =
{
{ 0 },
"?",
- NV_NOFREE|NV_LDOUBLE,NV_RDONLY
};
-static Namval_t *scope(Shell_t *shp,register Namval_t *np,register struct lval *lvalue,int assign)
+static Namval_t *scope(register Namval_t *np,register struct lval *lvalue,int assign)
{
register int flag = lvalue->flag;
register char *sub=0, *cp=(char*)np;
register Namval_t *mp;
+ Shell_t *shp = lvalue->shp;
int flags = HASH_NOSCOPE|HASH_SCOPE|HASH_BUCKET;
- int nosub = lvalue->nosub;
+ int c=0,nosub = lvalue->nosub;
Dt_t *sdict = (shp->st.real_fun? shp->st.real_fun->sdict:0);
+ Dt_t *nsdict = (shp->namespace?nv_dict(shp->namespace):0);
Dt_t *root = shp->var_tree;
assign = assign?NV_ASSIGN:NV_NOASSIGN;
lvalue->nosub = 0;
+ if(nosub<0 && lvalue->ovalue)
+ return((Namval_t*)lvalue->ovalue);
+ lvalue->ovalue = 0;
if(cp>=lvalue->expr && cp < lvalue->expr+lvalue->elen)
{
int offset;
@@ -75,44 +81,145 @@ static Namval_t *scope(Shell_t *shp,register Namval_t *np,register struct lval *
cp[flag] = 0;
if((!(np = nv_open(cp,shp->var_tree,assign|NV_VARNAME|NV_NOADD|NV_NOFAIL)) || nv_isnull(np)) && sh_macfun(shp,cp, offset = staktell()))
{
- Fun = sh_arith(sub=stakptr(offset));
+ Fun = sh_arith(shp,sub=stakptr(offset));
FunNode.nvalue.ldp = &Fun;
+ nv_onattr(&FunNode,NV_NOFREE|NV_LDOUBLE|NV_RDONLY);
cp[flag] = c;
return(&FunNode);
}
if(!np && assign)
np = nv_open(cp,shp->var_tree,assign|NV_VARNAME);
+ cp[flag] = c;
if(!np)
return(0);
root = shp->last_root;
- cp[flag] = c;
if(cp[flag+1]=='[')
flag++;
else
flag = 0;
cp = (char*)np;
}
- if((lvalue->emode&ARITH_COMP) && dtvnext(root) && ((mp=nv_search(cp,root,flags))||(sdict && (mp=nv_search(cp,sdict,flags)))))
+ else if(assign==NV_ASSIGN && nv_isnull(np) && !nv_isattr(np, ~(NV_MINIMAL|NV_NOFREE)))
+ flags |= NV_ADD;
+ if((lvalue->emode&ARITH_COMP) && dtvnext(root) && ((sdict && (mp=nv_search(cp,sdict,flags&~NV_ADD))) || (mp=nv_search(cp,root,flags&~(NV_ADD))) || (nsdict && (mp=nv_search(cp,nsdict,flags&~(NV_ADD|HASH_NOSCOPE)))) ))
+ np = mp;
+ while(nv_isref(np))
{
- while(nv_isref(mp))
+#if SHOPT_FIXEDARRAY
+ int n,dim;
+ dim = nv_refdimen(np);
+ n = nv_refindex(np);
+#endif /* SHOPT_FIXEDARRAY */
+ sub = nv_refsub(np);
+ np = nv_refnode(np);
+#if SHOPT_FIXEDARRAY
+ if(n)
{
- sub = nv_refsub(mp);
- mp = nv_refnode(mp);
+ Namarr_t *ap = nv_arrayptr(np);
+ ap->nelem = dim;
+ nv_putsub(np,(char*)0,n);
}
- np = mp;
+ else
+#endif /* SHOPT_FIXEDARRAY */
+ if(sub)
+ nv_putsub(np,sub,assign==NV_ASSIGN?ARRAY_ADD:0);
}
- if(!nosub && (flag || sub))
+ if(!nosub && flag)
{
- if(!sub)
- sub = (char*)&lvalue->expr[flag];
- nv_endsubscript(np,sub,NV_ADD|NV_SUBQUOTE);
+ int hasdot = 0;
+ cp = (char*)&lvalue->expr[flag];
+ if(sub)
+ {
+ goto skip;
+ }
+ sub = cp;
+ while(1)
+ {
+ Namarr_t *ap;
+ Namval_t *nq;
+ cp = nv_endsubscript(np,cp,0);
+ if(c || *cp=='.')
+ {
+ c = '.';
+ while(*cp=='.')
+ {
+ hasdot=1;
+ cp++;
+ while(c=mbchar(cp),isaname(c));
+ }
+ if(c=='[')
+ continue;
+ }
+ flag = *cp;
+ *cp = 0;
+ if(c || hasdot)
+ {
+ sfprintf(shp->strbuf,"%s%s%c",nv_name(np),sub,0);
+ sub = sfstruse(shp->strbuf);
+ }
+ if(strchr(sub,'$'))
+ sub = sh_mactrim(shp,sub,0);
+ *cp = flag;
+ if(c || hasdot)
+ {
+ np = nv_open(sub,shp->var_tree,NV_VARNAME|assign);
+ return(np);
+ }
+#if SHOPT_FIXEDARRAY
+ ap = nv_arrayptr(np);
+ cp = nv_endsubscript(np,sub,NV_ADD|NV_SUBQUOTE|(ap&&ap->fixed?NV_FARRAY:0));
+#else
+ cp = nv_endsubscript(np,sub,NV_ADD|NV_SUBQUOTE);
+#endif /* SHOPT_FIXEDARRAY */
+ if(*cp!='[')
+ break;
+ skip:
+ if(nq = nv_opensub(np))
+ np = nq;
+ else
+ {
+ ap = nv_arrayptr(np);
+ if(ap && !ap->table)
+ ap->table = dtopen(&_Nvdisc,Dtoset);
+ if(ap && ap->table && (nq=nv_search(nv_getsub(np),ap->table,NV_ADD)))
+ nq->nvenv = (char*)np;
+ if(nq && nv_isnull(nq))
+ np = nv_arraychild(np,nq,0);
+ }
+ sub = cp;
+ }
}
+ else if(nosub>0)
+ nv_putsub(np,(char*)0,nosub-1);
return(np);
}
+static Math_f sh_mathstdfun(const char *fname, size_t fsize, short * nargs)
+{
+ register const struct mathtab *tp;
+ register char c = fname[0];
+ for(tp=shtab_math; *tp->fname; tp++)
+ {
+ if(*tp->fname > c)
+ break;
+ if(tp->fname[1]==c && tp->fname[fsize+1]==0 && strncmp(&tp->fname[1],fname,fsize)==0)
+ {
+ if(nargs)
+ *nargs = *tp->fname;
+ return(tp->fnptr);
+ }
+ }
+ return(0);
+}
+
+int sh_mathstd(const char *name)
+{
+ return(sh_mathstdfun(name,strlen(name),NULL)!=0);
+}
+
static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdouble_t n)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = lvalue->shp;
register Sfdouble_t r= 0;
char *str = (char*)*ptr;
register char *cp;
@@ -121,8 +228,11 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
case ASSIGN:
{
register Namval_t *np = (Namval_t*)(lvalue->value);
- np = scope(shp,np,lvalue,1);
+ np = scope(np,lvalue,1);
nv_putval(np, (char*)&n, NV_LDOUBLE);
+ if(lvalue->eflag)
+ lvalue->ptr = (void*)nv_hasdisc(np,&ENUM_disc);
+ lvalue->eflag = 0;
r=nv_getnum(np);
lvalue->value = (char*)np;
break;
@@ -143,7 +253,7 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
{
while(xp=str, c=mbchar(str), isaname(c));
str = xp;
- if(c=='[' && dot==NV_NOADD)
+ while(c=='[' && dot==NV_NOADD)
{
str = nv_endsubscript((Namval_t*)0,str,0);
c = *str;
@@ -159,24 +269,28 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
}
if(c=='(')
{
+ int off=stktell(shp->stk);
int fsize = str- (char*)(*ptr);
const struct mathtab *tp;
+ Namval_t *np;
c = **ptr;
lvalue->fun = 0;
- if(fsize<=(sizeof(tp->fname)-2)) for(tp=shtab_math; *tp->fname; tp++)
+ sfprintf(shp->stk,".sh.math.%.*s%c",fsize,*ptr,0);
+ stkseek(shp->stk,off);
+ if(np=nv_search(stkptr(shp->stk,off),shp->fun_tree,0))
{
- if(*tp->fname > c)
- break;
- if(tp->fname[1]==c && tp->fname[fsize+1]==0 && strncmp(&tp->fname[1],*ptr,fsize)==0)
- {
- lvalue->fun = tp->fnptr;
- lvalue->nargs = *tp->fname;
+ lvalue->nargs = -np->nvalue.rp->argc;
+ lvalue->fun = (Math_f)np;
break;
- }
}
+ if(fsize<=(sizeof(tp->fname)-2))
+ lvalue->fun = (Math_f)sh_mathstdfun(*ptr,fsize,&lvalue->nargs);
if(lvalue->fun)
break;
- lvalue->value = (char*)ERROR_dictionary(e_function);
+ if(lvalue->emode&ARITH_COMP)
+ lvalue->value = (char*)e_function;
+ else
+ lvalue->value = (char*)ERROR_dictionary(e_function);
return(r);
}
if((lvalue->emode&ARITH_COMP) && dot)
@@ -194,11 +308,12 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
char *saveptr = stakfreeze(0);
Dt_t *root = (lvalue->emode&ARITH_COMP)?shp->var_base:shp->var_tree;
*str = c;
+ cp = str;
while(c=='[' || c=='.')
{
if(c=='[')
{
- str = nv_endsubscript(np,cp=str,0);
+ str = nv_endsubscript(np,str,0);
if((c= *str)!='[' && c!='.')
{
str = cp;
@@ -221,14 +336,16 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
Inf = strtold("Inf", NiL);
Infnod.nvalue.ldp = &Inf;
np = &Infnod;
+ nv_onattr(np,NV_NOFREE|NV_LDOUBLE|NV_RDONLY);
}
else if ((cp[0] == 'n' || cp[0] == 'N') && (cp[1] == 'a' || cp[1] == 'A') && (cp[2] == 'n' || cp[2] == 'N') && cp[3] == 0)
{
NaN = strtold("NaN", NiL);
NaNnod.nvalue.ldp = &NaN;
np = &NaNnod;
+ nv_onattr(np,NV_NOFREE|NV_LDOUBLE|NV_RDONLY);
}
- else if(!(np = nv_open(*ptr,root,NV_NOASSIGN|NV_VARNAME|dot)))
+ else if(!(np = nv_open(*ptr,root,NV_NOREF|NV_NOASSIGN|NV_VARNAME|dot)))
{
lvalue->value = (char*)*ptr;
lvalue->flag = str-lvalue->value;
@@ -250,15 +367,30 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
{
lvalue->flag = (str-lvalue->expr);
do
- str = nv_endsubscript(np,str,0);
- while((c= *str)=='[');
+ {
+ while(c=='.')
+ {
+ str++;
+ while(xp=str, c=mbchar(str), isaname(c));
+ c = *(str = xp);
+ }
+ if(c=='[')
+ str = nv_endsubscript(np,str,0);
+ }
+ while((c= *str)=='[' || c=='.');
break;
}
}
else
{
char lastbase=0, *val = xp, oerrno = errno;
+ lvalue->eflag = 0;
errno = 0;
+ if(shp->bltindata.bnode==SYSLET && !sh_isoption(SH_LETOCTAL))
+ {
+ while(*val=='0' && isdigit(val[1]))
+ val++;
+ }
r = strtonll(val,&str, &lastbase,-1);
if(*str=='8' || *str=='9')
{
@@ -309,7 +441,7 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
register Namval_t *np = (Namval_t*)(lvalue->value);
if(sh_isoption(SH_NOEXEC))
return(0);
- np = scope(shp,np,lvalue,0);
+ np = scope(np,lvalue,0);
if(!np)
{
if(sh_isoption(SH_NOUNSET))
@@ -319,6 +451,21 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
}
return(0);
}
+ lvalue->ovalue = (char*)np;
+ if(lvalue->eflag)
+ lvalue->ptr = (void*)nv_hasdisc(np,&ENUM_disc);
+ else if((Namfun_t*)lvalue->ptr && !nv_hasdisc(np,&ENUM_disc) && !nv_isattr(np,NV_INTEGER))
+ {
+ Namval_t *mp,node;
+ mp = ((Namfun_t*)lvalue->ptr)->type;
+ memset(&node,0,sizeof(node));
+ nv_clone(mp,&node,0);
+ nv_offattr(&node,NV_RDONLY|NV_NOFREE);
+ nv_putval(&node,np->nvname,0);
+ if(nv_isattr(&node,NV_NOFREE))
+ return(r=nv_getnum(&node));
+ }
+ lvalue->eflag = 0;
if(((lvalue->emode&2) || lvalue->level>1 || sh_isoption(SH_NOUNSET)) && nv_isnull(np) && !nv_isattr(np,NV_INTEGER))
{
*ptr = nv_name(np);
@@ -332,6 +479,8 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
lvalue->isfloat= (r!=(Sflong_t)r);
else if(nv_isattr(np,NV_DOUBLE)==NV_DOUBLE)
lvalue->isfloat=1;
+ if((lvalue->emode&ARITH_ASSIGNOP) && nv_isarray(np))
+ lvalue->nosub = nv_aindex(np)+1;
return(r);
}
@@ -342,7 +491,10 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
errormsg(SH_DICT,ERROR_warn(0),lvalue->value,*ptr);
else
#endif
- errormsg(SH_DICT,ERROR_exit((lvalue->emode&3)!=0),lvalue->value,*ptr);
+ if(lvalue->emode&ARITH_COMP)
+ return(-1);
+
+ errormsg(SH_DICT,ERROR_exit((lvalue->emode&3)!=0),lvalue->value,*ptr);
}
*ptr = str;
return(r);
@@ -356,8 +508,9 @@ static Sfdouble_t arith(const char **ptr, struct lval *lvalue, int type, Sfdoubl
Sfdouble_t sh_strnum(register const char *str, char** ptr, int mode)
{
+ Shell_t *shp = sh_getinterp();
register Sfdouble_t d;
- char base=0, *last;
+ char base=(shp->inarith?0:10), *last;
if(*str==0)
{
if(ptr)
@@ -368,10 +521,19 @@ Sfdouble_t sh_strnum(register const char *str, char** ptr, int mode)
d = strtonll(str,&last,&base,-1);
if(*last || errno)
{
- if(!last || *last!='.' || last[1]!='.')
- d = strval(str,&last,arith,mode);
- if(!ptr && *last && mode>0)
- errormsg(SH_DICT,ERROR_exit(1),e_lexbadchar,*last,str);
+ if (sh_isstate(SH_INIT)) {
+ // Initializing means importing untrusted env vars.
+ // Since the string does not appear to be a recognized
+ // numeric literal give up. We can't safely call
+ // strval() since that allows arbitrary expressions
+ // which would create a security vulnerability.
+ d = 0.0;
+ } else {
+ if(!last || *last!='.' || last[1]!='.')
+ d = strval(shp,str,&last,arith,mode);
+ if(!ptr && *last && mode>0)
+ errormsg(SH_DICT,ERROR_exit(1),e_lexbadchar,*last,str);
+ }
}
else if (!d && *str=='-')
d = -0.0;
@@ -380,16 +542,16 @@ Sfdouble_t sh_strnum(register const char *str, char** ptr, int mode)
return(d);
}
-Sfdouble_t sh_arith(register const char *str)
+Sfdouble_t sh_arith(Shell_t *shp,register const char *str)
{
return(sh_strnum(str, (char**)0, 1));
}
-void *sh_arithcomp(register char *str)
+void *sh_arithcomp(Shell_t *shp,register char *str)
{
const char *ptr = str;
Arith_t *ep;
- ep = arith_compile(str,(char**)&ptr,arith,ARITH_COMP|1);
+ ep = arith_compile(shp,str,(char**)&ptr,arith,ARITH_COMP|1);
if(*ptr)
errormsg(SH_DICT,ERROR_exit(1),e_lexbadchar,*ptr,str);
return((void*)ep);
diff --git a/usr/src/lib/libshell/common/sh/array.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/array.c
index 795d434eda..4645bbc436 100644
--- a/usr/src/lib/libshell/common/sh/array.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/array.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -31,7 +31,7 @@
#include <stak.h>
#include "name.h"
-#define NUMSIZE (4+(ARRAY_MAX>999)+(ARRAY_MAX>9999)+(ARRAY_MAX>99999))
+#define NUMSIZE 11
#define is_associative(ap) array_assoc((Namarr_t*)(ap))
#define array_setbit(cp, n, b) (cp[n] |= (b))
#define array_clrbit(cp, n, b) (cp[n] &= ~(b))
@@ -58,9 +58,31 @@ struct assoc_array
Namval_t *cur;
};
+#if SHOPT_FIXEDARRAY
+ struct fixed_array
+ {
+ unsigned char ndim;
+ unsigned char dim;
+ unsigned char level;
+ unsigned char ptr;
+ short size;
+ int nelem;
+ int curi;
+ int *max;
+ int *incr;
+ int *cur;
+ char *data;
+ };
+# define array_fixed_data(ap) ((ap)?((struct fixed_array*)((ap)->fixed))->data:0)
+ static void array_fixed_setdata(Namval_t*,Namarr_t*,struct fixed_array*);
+#endif /* SHOPT_FIXEDARRAY */
+
static Namarr_t *array_scope(Namval_t *np, Namarr_t *ap, int flags)
{
Namarr_t *aq;
+#if SHOPT_FIXEDARRAY
+ struct fixed_array *fp;
+#endif /* SHOPT_FIXEDARRAY */
struct index_array *ar;
size_t size = ap->hdr.dsize;
if(size==0)
@@ -77,9 +99,22 @@ static Namarr_t *array_scope(Namval_t *np, Namarr_t *ap, int flags)
aq->table = (Dt_t*)aq->scope;
return(aq);
}
+#if SHOPT_FIXEDARRAY
+ else if(fp = (struct fixed_array*)ap->fixed)
+ {
+ aq->scope = (void*)ap;
+ fp = (struct fixed_array*)(aq+1);
+ aq->fixed = (void*)fp;
+ fp->max = (int*)(fp+1);
+ fp->incr = fp->max+fp->ndim;
+ fp->cur = fp->incr+fp->ndim;
+ return(aq);
+ }
+#endif /* SHOPT_FIXEDARRAY */
aq->scope = (void*)ap;
ar = (struct index_array*)aq;
memset(ar->val, 0, ar->maxi*sizeof(char*));
+ ar->bits = (unsigned char*)&ar->val[ar->maxi];
return(aq);
}
@@ -105,7 +140,11 @@ static int array_covered(Namval_t *np, struct index_array *ap)
{
struct index_array *aq = (struct index_array*)ap->header.scope;
if(!ap->header.fun && aq)
+#if SHOPT_FIXEDARRAY
+ return (ap->header.fixed || ((ap->cur<aq->maxi) && aq->val[ap->cur].cp));
+#else
return ((ap->cur<aq->maxi) && aq->val[ap->cur].cp);
+#endif /* SHOPT_FIXEDARRAY */
return(0);
}
@@ -157,7 +196,10 @@ static union Value *array_getup(Namval_t *np, Namarr_t *arp, int update)
{
register struct index_array *ap = (struct index_array*)arp;
register union Value *up;
- int nofree;
+#if SHOPT_FIXEDARRAY
+ struct fixed_array *fp;
+#endif /* SHOPT_FIXEDARRAY */
+ int nofree=0;
if(!arp)
return(&np->nvalue);
if(is_associative(ap))
@@ -172,6 +214,18 @@ static union Value *array_getup(Namval_t *np, Namarr_t *arp, int update)
else
return((union Value*)((*arp->fun)(np,NIL(char*),0)));
}
+#if SHOPT_FIXEDARRAY
+ else if(fp = (struct fixed_array*)arp->fixed)
+ {
+ if(!fp->data)
+ array_fixed_setdata(np,arp,fp);
+ up = &np->nvalue;
+ if(fp->ptr)
+ up->cp = *(((char**)fp->data)+fp->curi);
+ else
+ up->cp = fp->data+fp->size*fp->curi;
+ }
+#endif /* SHOPT_FIXEDARRAY */
else
{
if(ap->cur >= ap->maxi)
@@ -198,6 +252,15 @@ int nv_arrayisset(Namval_t *np, Namarr_t *arp)
if(ap->cur >= ap->maxi)
return(0);
up = &(ap->val[ap->cur]);
+ if(up->cp==Empty)
+ {
+ Namfun_t *fp = &arp->hdr;
+ for(fp=fp->next; fp; fp = fp->next)
+ {
+ if(fp->disc && (fp->disc->getnum || fp->disc->getval))
+ return(1);
+ }
+ }
return(up->cp && up->cp!=Empty);
}
@@ -212,6 +275,9 @@ static Namval_t *array_find(Namval_t *np,Namarr_t *arp, int flag)
register union Value *up;
Namval_t *mp;
int wasundef;
+#if SHOPT_FIXEDARRAY
+ struct fixed_array *fp=(struct fixed_array*)(arp->fixed);
+#endif /* SHOPT_FIXEDARRAY */
if(flag&ARRAY_LOOKUP)
ap->header.nelem &= ~ARRAY_NOSCOPE;
else
@@ -222,13 +288,26 @@ static Namval_t *array_find(Namval_t *np,Namarr_t *arp, int flag)
/* delete array is the same as delete array[@] */
if(flag&ARRAY_DELETE)
{
+#if SHOPT_FIXEDARRAY
+ nv_putsub(np, NIL(char*), ARRAY_SCAN|ARRAY_NOSCOPE|(ap->header.fixed?(ARRAY_UNDEF|ARRAY_FIXED):0));
+#else
nv_putsub(np, NIL(char*), ARRAY_SCAN|ARRAY_NOSCOPE);
+#endif /* SHOPT_FIXEDARRAY */
ap->header.nelem |= ARRAY_SCAN;
}
else /* same as array[0] */
{
if(is_associative(ap))
(*ap->header.fun)(np,"0",flag==ARRAY_ASSIGN?NV_AADD:0);
+#if SHOPT_FIXEDARRAY
+ else if(fp)
+ {
+ int n=fp->ndim;
+ fp->curi = 0;
+ while(--n>=0)
+ fp->cur[n] = 0;
+ }
+#endif /* SHOPT_FIXEDARRAY */
else
ap->cur = 0;
}
@@ -258,6 +337,31 @@ static Namval_t *array_find(Namval_t *np,Namarr_t *arp, int flag)
}
}
}
+#if SHOPT_FIXEDARRAY
+ else if(fp)
+ {
+ char *data = array_fixed_data((Namarr_t*)ap->header.scope);
+ if(flag==ARRAY_ASSIGN && data==fp->data)
+ {
+ if(data)
+ {
+ fp->data = (char*)malloc(fp->nelem*fp->size);
+ memcpy(fp->data,data,fp->nelem*fp->size);
+ }
+ else
+ array_fixed_setdata(np,&ap->header,fp);
+ }
+ if(fp->ptr)
+ {
+ if(!fp->data)
+ array_fixed_setdata(np,&ap->header,fp);
+ np->nvalue.cp = *(((char**)fp->data)+fp->curi);
+ }
+ else
+ np->nvalue.cp = fp->data+fp->size*fp->curi;
+ return(np);
+ }
+#endif /* SHOPT_FIXEDARRAY */
else
{
if(!(ap->header.nelem&ARRAY_SCAN) && ap->cur >= ap->maxi)
@@ -409,7 +513,7 @@ static Namfun_t *array_clone(Namval_t *np, Namval_t *mp, int flags, Namfun_t *fp
mq = 0;
if(nq=nv_opensub(np))
mq = nv_search(name,ap->table,NV_ADD);
- if(nq && (flags&NV_COMVAR) && nv_isvtree(nq))
+ if(nq && (((flags&NV_COMVAR) && nv_isvtree(nq)) || nv_isarray(nq)))
{
mq->nvalue.cp = 0;
if(!is_associative(ap))
@@ -457,6 +561,7 @@ static char *array_getval(Namval_t *np, Namfun_t *disc)
{
register Namarr_t *aq,*ap = (Namarr_t*)disc;
register Namval_t *mp;
+ register char *cp=0;
if((mp=array_find(np,ap,ARRAY_LOOKUP))!=np)
{
if(!mp && !is_associative(ap) && (aq=(Namarr_t*)ap->scope))
@@ -465,8 +570,17 @@ static char *array_getval(Namval_t *np, Namfun_t *disc)
if((mp=array_find(np,aq,ARRAY_LOOKUP))==np)
return(nv_getv(np,&aq->hdr));
}
- return(mp?nv_getval(mp):0);
+ if(mp)
+ {
+ cp = nv_getval(mp);
+ nv_offattr(mp,NV_EXPORT);
+ }
+ return(cp);
}
+#if SHOPT_FIXEDARRAY
+ if(ap->fixed && nv_isattr(np,NV_INT16P) == NV_INT16)
+ np->nvalue.s = *np->nvalue.sp;
+#endif /* SHOPT_FIXEDARRAY */
return(nv_getv(np,&ap->hdr));
}
@@ -494,13 +608,18 @@ static void array_putval(Namval_t *np, const char *string, int flags, Namfun_t *
register Namval_t *mp;
register struct index_array *aq = (struct index_array*)ap;
int scan,nofree = nv_isattr(np,NV_NOFREE);
+#if SHOPT_FIXEDARRAY
+ struct fixed_array *fp;
+#endif /* SHOPT_FIXEDARRAY */
do
{
+ int xfree = (ap->fixed||is_associative(ap))?0:array_isbit(aq->bits,aq->cur,ARRAY_NOFREE);
mp = array_find(np,ap,string?ARRAY_ASSIGN:ARRAY_DELETE);
scan = ap->nelem&ARRAY_SCAN;
if(mp && mp!=np)
{
- if(!is_associative(ap) && string && !(flags&NV_APPEND) && !nv_type(np) && nv_isvtree(mp))
+ if(!is_associative(ap) && string && !(flags&NV_APPEND) && !nv_type(np) && nv_isvtree(mp) && !(ap->nelem&ARRAY_TREE))
+
{
if(!nv_isattr(np,NV_NOFREE))
_nv_unset(mp,flags&NV_RDONLY);
@@ -510,7 +629,8 @@ static void array_putval(Namval_t *np, const char *string, int flags, Namfun_t *
nv_delete(mp,ap->table,0);
goto skip;
}
- nv_putval(mp, string, flags);
+ if(!xfree)
+ nv_putval(mp, string, flags);
if(string)
{
#if SHOPT_TYPEDEF
@@ -536,10 +656,26 @@ static void array_putval(Namval_t *np, const char *string, int flags, Namfun_t *
{
array_clrbit(aq->bits,aq->cur,ARRAY_CHILD);
aq->val[aq->cur].cp = 0;
- nv_delete(mp,ap->table,0);
+ if(!xfree)
+ nv_delete(mp,ap->table,0);
}
if(!array_covered(np,(struct index_array*)ap))
- ap->nelem--;
+ {
+ if(array_elem(ap))
+ ap->nelem--;
+ }
+#if SHOPT_FIXEDARRAY
+ else if(fp=(struct fixed_array*)ap->fixed)
+ {
+ char *data = array_fixed_data((Namarr_t*)ap->scope);
+ int n = fp->size*fp->curi;
+ if(data)
+ {
+ memcpy(fp->data+n,data+n,fp->size);
+ continue;
+ }
+ }
+#endif /* SHOPT_FIXEDARRAY */
}
}
if(array_elem(ap)==0 && (ap->nelem&ARRAY_SCAN))
@@ -558,9 +694,24 @@ static void array_putval(Namval_t *np, const char *string, int flags, Namfun_t *
up = array_getup(np,ap,!nofree);
if(up->cp == Empty)
up->cp = 0;
+#if SHOPT_FIXEDARRAY
+ if(nv_isarray(np) && !ap->fixed)
+#else
if(nv_isarray(np))
+#endif /* SHOPT_FIXEDARRAY */
np->nvalue.up = up;
nv_putv(np,string,flags,&ap->hdr);
+#if SHOPT_FIXEDARRAY
+ if(fp = (struct fixed_array*)ap->fixed)
+ {
+ if(fp->ptr)
+ {
+ char **cp = (char**)fp->data;
+ cp[fp->curi] = (char*)(np->nvalue.cp?np->nvalue.cp:Empty);
+ }
+ }
+ else
+#endif /* SHOPT_FIXEDARRAY */
if(!is_associative(ap))
{
if(string)
@@ -583,6 +734,28 @@ static void array_putval(Namval_t *np, const char *string, int flags, Namfun_t *
if(!string && !nv_isattr(np,NV_ARRAY))
{
Namfun_t *nfp;
+#if SHOPT_FIXEDARRAY
+ char *data = array_fixed_data((Namarr_t*)ap->scope);
+ fp = (struct fixed_array*)ap->fixed;
+ if(fp && (!ap->scope || data!=fp->data))
+ {
+ if(fp->ptr)
+ {
+ int n = fp->nelem;
+ char **cp = (char**)fp->data;
+ while(n-->0)
+ {
+ if(cp && *cp!=Empty)
+ free(*cp);
+ cp++;
+ }
+ }
+ free((void*)fp->data);
+ if(data)
+ fp->data = data;
+ }
+ else
+#endif /* SHOPT_FIXEDARRAY */
if(!is_associative(ap) && aq->xp)
{
_nv_unset(nv_namptr(aq->xp,0),NV_RDONLY);
@@ -592,9 +765,12 @@ static void array_putval(Namval_t *np, const char *string, int flags, Namfun_t *
free((void*)nfp);
if(!nv_isnull(np))
{
- nv_onattr(np,NV_NOFREE);
+ if(!np->nvfun)
+ nv_onattr(np,NV_NOFREE);
_nv_unset(np,flags);
}
+ else
+ nv_offattr(np,NV_NOFREE);
if(np->nvalue.cp==Empty)
np->nvalue.cp = 0;
}
@@ -655,7 +831,10 @@ static struct index_array *array_grow(Namval_t *np, register struct index_array
ap->header = arp->header;
ap->header.hdr.dsize = sizeof(*ap) + i;
for(i=0;i < arp->maxi;i++)
+ {
+ ap->bits[i] = arp->bits[i];
ap->val[i].cp = arp->val[i].cp;
+ }
memcpy(ap->bits, arp->bits, arp->maxi);
array_setptr(np,arp,ap);
free((void*)arp);
@@ -666,14 +845,14 @@ static struct index_array *array_grow(Namval_t *np, register struct index_array
ap->header.hdr.dsize = sizeof(*ap) + i;
i = 0;
ap->header.fun = 0;
- if(nv_isnull(np) && nv_isattr(np,NV_NOFREE))
+ if((nv_isnull(np)||np->nvalue.cp==Empty) && nv_isattr(np,NV_NOFREE))
{
i = ARRAY_TREE;
nv_offattr(np,NV_NOFREE);
}
if(np->nvalue.cp==Empty)
np->nvalue.cp=0;
- if(nv_hasdisc(np,&array_disc) || nv_isvtree(np))
+ if(nv_hasdisc(np,&array_disc) || (nv_type(np) && nv_isvtree(np)))
{
ap->header.table = dtopen(&_Nvdisc,Dtoset);
mp = nv_search("0", ap->header.table,NV_ADD);
@@ -688,7 +867,8 @@ static struct index_array *array_grow(Namval_t *np, register struct index_array
i++;
}
}
- else if((ap->val[0].cp=np->nvalue.cp))
+ else
+ if((ap->val[0].cp=np->nvalue.cp))
i++;
else if(nv_isattr(np,NV_INTEGER) && !nv_isnull(np))
{
@@ -714,7 +894,7 @@ int nv_atypeindex(Namval_t *np, const char *tname)
{
Namval_t *tp;
int offset = staktell();
- int n = strlen(tname)-1;
+ size_t n = strlen(tname)-1;
sfprintf(stkstd,"%s.%.*s%c",NV_CLASS,n,tname,0);
tp = nv_open(stakptr(offset), sh.var_tree, NV_NOADD|NV_VARNAME);
stakseek(offset);
@@ -823,7 +1003,7 @@ Namarr_t *nv_setarray(Namval_t *np, void *(*fun)(Namval_t*,const char*,int))
ap->nelem = nelem;
ap->fun = fun;
nv_onattr(np,NV_ARRAY);
- if(fp || value)
+ if(fp || (value && value!=Empty))
{
nv_putsub(np, "0", ARRAY_ADD);
if(value)
@@ -876,6 +1056,8 @@ Namval_t *nv_arraychild(Namval_t *np, Namval_t *nq, int c)
{
struct index_array *aq = (struct index_array*)ap;
array_setbit(aq->bits,aq->cur,ARRAY_CHILD);
+ if(c=='.' && !nq->nvalue.cp)
+ ap->nelem++;
up->np = nq;
}
if(c=='.')
@@ -893,20 +1075,53 @@ int nv_nextsub(Namval_t *np)
register struct index_array *ap = (struct index_array*)nv_arrayptr(np);
register unsigned dot;
struct index_array *aq=0, *ar=0;
+#if SHOPT_FIXEDARRAY
+ struct fixed_array *fp;
+#endif /* SHOPT_FIXEDARRAY */
if(!ap || !(ap->header.nelem&ARRAY_SCAN))
return(0);
if(is_associative(ap))
{
- Namval_t *nq;
- if(nq=(*ap->header.fun)(np,NIL(char*),NV_ANEXT))
+ if((*ap->header.fun)(np,NIL(char*),NV_ANEXT))
+ return(1);
+ ap->header.nelem &= ~(ARRAY_SCAN|ARRAY_NOCHILD);
+ return(0);
+ }
+#if SHOPT_FIXEDARRAY
+ else if(fp = (struct fixed_array*)ap->header.fixed)
+ {
+ if(ap->header.nelem&ARRAY_FIXED)
{
- if(nv_isattr(nq,NV_CHILD))
- nv_putsub(nq->nvalue.np,NIL(char*),ARRAY_UNDEF);
+ while(++fp->curi < fp->nelem)
+ {
+ nv_putsub(np,0,fp->curi|ARRAY_FIXED|ARRAY_SCAN);
+ if(fp->ptr && *(((char**)fp->data)+fp->curi))
+ return(1);
+ }
+ ap->header.nelem &= ~ARRAY_FIXED;
+ return(0);
+ }
+ dot = fp->dim;
+ if((fp->cur[dot]+1) < fp->max[dot])
+ {
+ fp->cur[dot]++;
+ for(fp->curi=0,dot=0; dot < fp->ndim; dot++)
+ fp->curi += fp->incr[dot]*fp->cur[dot];
return(1);
}
+ if(fp->level)
+ {
+ dot= --fp->dim;
+ while((dot+1) < fp->ndim)
+ fp->cur[++dot] = 0;
+ fp->level--;
+ fp->curi = 0;
+ }
+ else
ap->header.nelem &= ~(ARRAY_SCAN|ARRAY_NOCHILD);
return(0);
}
+#endif /* SHOPT_FIXEDARRAY */
if(!(ap->header.nelem&ARRAY_NOSCOPE))
ar = (struct index_array*)ap->header.scope;
for(dot=ap->cur+1; dot < (unsigned)ap->maxi; dot++)
@@ -917,6 +1132,11 @@ int nv_nextsub(Namval_t *np)
if(!(aq=ar) || dot>=(unsigned)aq->maxi)
continue;
}
+ if(aq->val[dot].cp==Empty && array_elem(&aq->header) < nv_aimax(np)+1) {
+ ap->cur = dot;
+ if(nv_getval(np)==Empty)
+ continue;
+ }
if(aq->val[dot].cp)
{
ap->cur = dot;
@@ -926,7 +1146,7 @@ int nv_nextsub(Namval_t *np)
if((aq->header.nelem&ARRAY_NOCHILD) && nv_isvtree(mp) && !mp->nvfun->dsize)
continue;
if(nv_isarray(mp))
- nv_putsub(mp,NIL(char*),ARRAY_UNDEF);
+ nv_putsub(mp,NIL(char*),ARRAY_SCAN);
}
return(1);
}
@@ -951,10 +1171,16 @@ Namval_t *nv_putsub(Namval_t *np,register char *sp,register long mode)
{
register struct index_array *ap = (struct index_array*)nv_arrayptr(np);
register int size = (mode&ARRAY_MASK);
+#if SHOPT_FIXEDARRAY
+ struct fixed_array *fp;
+ if(!ap || (!ap->header.fixed && !ap->header.fun))
+#else
if(!ap || !ap->header.fun)
+#endif /* SHOPT_FIXEDARRAY */
{
if(sp)
{
+ Shell_t *shp = sh_getinterp();
if(ap && ap->xp && !strmatch(sp,"+([0-9])"))
{
Namval_t *mp = nv_namptr(ap->xp,0);
@@ -962,7 +1188,7 @@ Namval_t *nv_putsub(Namval_t *np,register char *sp,register long mode)
size = nv_getnum(mp);
}
else
- size = (int)sh_arith((char*)sp);
+ size = (int)sh_arith(shp,(char*)sp);
}
if(size <0 && ap)
size += array_maxindex(np);
@@ -1005,6 +1231,12 @@ Namval_t *nv_putsub(Namval_t *np,register char *sp,register long mode)
if(!(mode&ARRAY_ADD))
{
int n;
+ if(mode&ARRAY_SETSUB)
+ {
+ for(n=0; n <= ap->maxi; n++)
+ ap->val[n].cp = 0;
+ ap->header.nelem = 0;
+ }
for(n=0; n <= size; n++)
{
if(!ap->val[n].cp)
@@ -1017,12 +1249,26 @@ Namval_t *nv_putsub(Namval_t *np,register char *sp,register long mode)
if(n=ap->maxi-ap->maxi)
memset(&ap->val[size],0,n*sizeof(union Value));
}
- else if(!ap->val[size].cp)
+ else if(!(sp=(char*)ap->val[size].cp) || sp==Empty)
{
if(sh.subshell)
np = sh_assignok(np,1);
- ap->val[size].cp = Empty;
- if(!array_covered(np,ap))
+ if(ap->header.nelem&ARRAY_TREE)
+ {
+ char *cp;
+ Namval_t *mp;
+ if(!ap->header.table)
+ ap->header.table = dtopen(&_Nvdisc,Dtoset);
+ sfprintf(sh.strbuf,"%d",ap->cur);
+ cp = sfstruse(sh.strbuf);
+ mp = nv_search(cp, ap->header.table, NV_ADD);
+ mp->nvenv = (char*)np;
+ nv_arraychild(np,mp,0);
+ nv_setvtree(mp);
+ }
+ else
+ ap->val[size].cp = Empty;
+ if(!sp && !array_covered(np,ap))
ap->header.nelem++;
}
}
@@ -1036,10 +1282,56 @@ Namval_t *nv_putsub(Namval_t *np,register char *sp,register long mode)
}
return((Namval_t*)np);
}
+#if SHOPT_FIXEDARRAY
+ if(fp=(struct fixed_array*)ap->header.fixed)
+ {
+ if(!fp->data)
+ return(np);
+ if(mode&ARRAY_UNDEF)
+ {
+ fp->dim = 0;
+ fp->curi = 0;
+ for(size=fp->ndim;--size>=0;)
+ fp->cur[size] = 0;
+ ap->header.nelem &= ~ARRAY_MASK;
+ if(mode&ARRAY_FIXED)
+ {
+ mode &= ~ARRAY_UNDEF;
+ ap->header.nelem |= (ARRAY_FIXED|fp->nelem);
+ }
+ else
+ ap->header.nelem |= fp->max[0];
+ }
+ else if(mode&ARRAY_FIXED)
+ {
+ size = (mode&ARRAY_MASK)&~(ARRAY_FIXED);
+ fp->curi = size;
+ for(fp->dim=0;size>0 && fp->dim<fp->ndim; fp->dim++)
+ {
+ fp->cur[fp->dim] = size/fp->incr[fp->dim];
+ size -= fp->incr[fp->dim]*fp->cur[fp->dim];
+ }
+ while(fp->dim < fp->ndim)
+ fp->cur[fp->dim++] = 0;
+ fp->dim = ap->header.nelem;
+ ap->header.nelem |= ARRAY_FIXED;
+ }
+ else if(fp->dim< fp->ndim)
+ {
+ fp->curi += (size-fp->cur[fp->dim])*fp->incr[fp->dim];
+ fp->cur[fp->dim] = size;
+ }
+ }
+#endif /* SHOPT_FIXEDARRAY */
ap->header.nelem &= ~ARRAY_UNDEF;
if(!(mode&ARRAY_FILL))
ap->header.nelem &= ~ARRAY_SCAN;
ap->header.nelem |= (mode&(ARRAY_SCAN|ARRAY_NOCHILD|ARRAY_UNDEF|ARRAY_NOSCOPE));
+#if SHOPT_FIXEDARRAY
+ if(fp)
+ return(np);
+ else
+#endif /* SHOPT_FIXEDARRAY */
if(sp)
{
if(mode&ARRAY_SETSUB)
@@ -1060,6 +1352,147 @@ Namval_t *nv_putsub(Namval_t *np,register char *sp,register long mode)
return(np);
}
+#if SHOPT_FIXEDARRAY
+int nv_arrfixed(Namval_t *np, Sfio_t *out, int flag, char *dim)
+{
+ Namarr_t *ap = nv_arrayptr(np);
+ struct fixed_array *fp = (struct fixed_array*)ap->fixed;
+ int n;
+ if(flag)
+ {
+ if(out)
+ {
+ for(n=0; n < fp->dim; n++)
+ sfprintf(out,"[%d]",fp->cur[n]);
+ }
+ if(dim)
+ *dim = fp->dim;
+ return(fp->curi);
+ }
+ if(out)
+ {
+ for(n=0; n < fp->ndim; n++)
+ sfprintf(out,"[%d]",fp->max[n]);
+ }
+ fp->dim = 0;
+ return(fp->curi);
+}
+
+static void array_fixed_setdata(Namval_t *np,Namarr_t* ap,struct fixed_array* fp)
+{
+ int n = ap->nelem;
+ ap->nelem = 1;
+ fp->size = fp->ptr?sizeof(void*):nv_datasize(np,0);
+ ap->nelem = n;
+ fp->data = (char*)calloc(fp->nelem,fp->size);
+ if(fp->ptr)
+ {
+ char **cp = (char**)fp->data;
+ for(n=fp->nelem; n-->0;)
+ *cp++ = Empty;
+ }
+}
+
+static int array_fixed_init(Namval_t *np, char *sub, char *cp)
+{
+ Shell_t *shp=sh_getinterp();
+ Namarr_t *ap;
+ struct fixed_array *fp;
+ int n=1,sz;
+ char *ep=cp;
+ while(*ep=='[')
+ {
+ ep = nv_endsubscript(np,ep,0);
+ n++;
+ }
+ if(*ep)
+ return(0);
+ sz = sizeof(struct fixed_array)+ 3*n*sizeof(int);
+ if(!(ap=newof(NIL(Namarr_t*),Namarr_t,1,sz)))
+ return(0);
+ ap->hdr.disc = &array_disc;
+ ap->hdr.dsize = sizeof(Namarr_t)+sz;
+ ap->hdr.nofree &= ~1;
+ fp = (struct fixed_array*)(ap+1);
+ ap->fixed = (void*)fp;
+ fp->ndim = n;
+ fp->max = (int*)(fp+1);
+ fp->incr = fp->max+n;
+ fp->cur = fp->incr+n;
+ fp->max[0] = (int)sh_arith(shp,(char*)sub);
+ for(n=1,ep=cp;*ep=='['; ep=cp)
+ {
+ cp = nv_endsubscript(np,ep,0);
+ cp[-1]=0;
+ fp->max[n++] = sz = (int)sh_arith(shp,(char*)ep+1);
+ if(sz<0)
+ {
+ free((void*)ap);
+ errormsg(SH_DICT,ERROR_exit(1),e_subscript, nv_name(np));
+ }
+ cp[-1] = ']';
+ }
+ nv_disc(np,(Namfun_t*)ap, NV_FIRST);
+ fp->ptr = !np->nvsize;
+ nv_onattr(np,NV_ARRAY|(fp->ptr?0:NV_NOFREE));
+ fp->incr[n=fp->ndim-1] = 1;
+ for(sz=1; --n>=0;)
+ sz = fp->incr[n] = sz*fp->max[n+1];
+ fp->nelem = sz*fp->max[0];
+ ap->nelem = fp->max[0];
+ return(1);
+}
+
+static char *array_fixed(Namval_t *np, char *sub, char *cp,int mode)
+{
+ Shell_t *shp=sh_getinterp();
+ Namarr_t *ap = nv_arrayptr(np);
+ struct fixed_array *fp = (struct fixed_array*)ap->fixed;
+ char *ep;
+ int size,n=0,sz;
+ if(!fp->data)
+ array_fixed_setdata(np,ap,fp);
+ ap->nelem &= ~ARRAY_UNDEF;
+ if(ap->nelem&ARRAY_FIXED)
+ {
+ ap->nelem &= ~ARRAY_FIXED;
+ n = fp->dim;
+ sz = fp->curi;
+ if(*sub==0)
+ goto skip;
+ }
+ else
+ fp->curi = 0;
+ size = (int)sh_arith(shp,(char*)sub);
+ fp->cur[n] = size;
+ if(size >= fp->max[n] || (size < 0))
+ errormsg(SH_DICT,ERROR_exit(1),e_subscript, nv_name(np));
+ *cp++ = ']';
+ sz = fp->curi + fp->cur[n]*fp->incr[n];
+ for(n++,ep=cp;*ep=='['; ep=cp,n++)
+ {
+ if(n >= fp->ndim)
+ errormsg(SH_DICT,ERROR_exit(1),e_subscript, nv_name(np));
+ cp = nv_endsubscript(np,ep,0);
+ cp[-1]=0;
+ size = (int)sh_arith(shp,(char*)ep+1);
+ if(size >= fp->max[n] || (size < 0))
+ errormsg(SH_DICT,ERROR_exit(1),e_subscript, nv_name(np));
+ fp->cur[n] = size;
+ cp[-1] = ']';
+ sz += fp->cur[n]*fp->incr[n];
+ }
+skip:
+ fp->dim = n;
+ ap->nelem &= ~ARRAY_MASK;
+ ap->nelem |= fp->max[n];
+ while(n < fp->ndim)
+ fp->cur[n++] = 0;
+ fp->curi = sz;
+ return(cp-1);
+}
+#endif /* SHOPT_FIXEDARRAY */
+
/*
* process an array subscript for node <np> given the subscript <cp>
* returns pointer to character after the subscript
@@ -1093,10 +1526,27 @@ char *nv_endsubscript(Namval_t *np, register char *cp, int mode)
{
Namarr_t *ap = nv_arrayptr(np);
int scan = 0;
+#if SHOPT_FIXEDARRAY
+ if((mode&NV_FARRAY) && !nv_isarray(np))
+ {
+ if(array_fixed_init(np,sp,cp+1))
+ {
+ *cp++ = c;
+ return(strchr(cp,0));
+ }
+ }
+#endif /* SHOPT_FIXEDARRAY */
if(ap)
scan = ap->nelem&ARRAY_SCAN;
if((mode&NV_ASSIGN) && (cp[1]=='=' || cp[1]=='+'))
mode |= NV_ADD;
+ else if(ap && cp[1]=='.' && (mode&NV_FARRAY))
+ mode |= NV_ADD;
+#if SHOPT_FIXEDARRAY
+ if(ap && ap->fixed)
+ cp = array_fixed(np,sp,cp,mode);
+ else
+#endif /* SHOPT_FIXEDARRAY */
nv_putsub(np, sp, ((mode&NV_ADD)?ARRAY_ADD:0)|(cp[1]&&(mode&NV_ADD)?ARRAY_FILL:mode&ARRAY_FILL));
if(scan)
ap->nelem |= scan;
@@ -1111,19 +1561,45 @@ char *nv_endsubscript(Namval_t *np, register char *cp, int mode)
Namval_t *nv_opensub(Namval_t* np)
{
register struct index_array *ap = (struct index_array*)nv_arrayptr(np);
+#if SHOPT_FIXEDARRAY
+ struct fixed_array *fp;
+#endif /* SHOPT_FIXEDARRAY */
if(ap)
{
if(is_associative(ap))
return((Namval_t*)((*ap->header.fun)(np,NIL(char*),NV_ACURRENT)));
+#if SHOPT_FIXEDARRAY
+ else if(!(fp=(struct fixed_array*)ap->header.fixed) && array_isbit(ap->bits,ap->cur,ARRAY_CHILD))
+#else
else if(array_isbit(ap->bits,ap->cur,ARRAY_CHILD))
+#endif /* SHOPT_FIXEDARRAY */
+ {
return(ap->val[ap->cur].np);
+ }
+#if SHOPT_FIXEDARRAY
+ else if(fp)
+ {
+ int n = fp->dim;
+ if((fp->dim+1) < fp->ndim)
+ {
+ fp->dim++;
+ if(ap->header.nelem&ARRAY_SCAN)
+ {
+ while(++n < fp->ndim)
+ fp->cur[n] = 0;
+ fp->level++;
+ }
+ return(np);
+ }
+ }
+#endif /* SHOPT_FIXEDARRAY */
}
return(NIL(Namval_t*));
}
char *nv_getsub(Namval_t* np)
{
- static char numbuff[NUMSIZE];
+ static char numbuff[NUMSIZE+1];
register struct index_array *ap;
register unsigned dot, n;
register char *cp = &numbuff[NUMSIZE];
@@ -1158,6 +1634,10 @@ int nv_aindex(register Namval_t* np)
return(0);
else if(is_associative(ap))
return(-1);
+#if SHOPT_FIXEDARRAY
+ else if(ap->fixed)
+ return(-1);
+#endif /* SHOPT_FIXEDARRAY */
return(((struct index_array*)(ap))->cur&ARRAY_MASK);
}
@@ -1170,7 +1650,11 @@ int nv_aimax(register Namval_t* np)
{
struct index_array *ap = (struct index_array*)nv_arrayptr(np);
int sub = -1;
+#if SHOPT_FIXEDARRAY
+ if(!ap || is_associative(&ap->header) || ap->header.fixed)
+#else
if(!ap || is_associative(&ap->header))
+#endif /* SHOPT_FIXEDARRAY */
return(-1);
sub = ap->maxi;
while(--sub>0 && ap->val[sub].cp==0);
@@ -1235,7 +1719,7 @@ void *nv_associative(register Namval_t *np,const char *sp,int mode)
for(;ap->cur=ap->pos; ap->pos=ap->nextpos)
{
ap->nextpos = (Namval_t*)dtnext(ap->header.table,ap->pos);
- if(ap->cur->nvalue.cp)
+ if(!nv_isnull(ap->cur))
{
if((ap->header.nelem&ARRAY_NOCHILD) && nv_isattr(ap->cur,NV_CHILD))
continue;
@@ -1305,7 +1789,7 @@ void *nv_associative(register Namval_t *np,const char *sp,int mode)
ap->nextpos = (Namval_t*)dtnext(ap->header.table,mp);
}
else if(!mp && *sp && mode==0)
- mp = nv_search(sp,ap->header.table,NV_ADD);
+ mp = nv_search(sp,ap->header.table,NV_ADD|HASH_NOSCOPE);
np = mp;
if(ap->pos && ap->pos==np)
ap->header.nelem |= ARRAY_SCAN;
@@ -1343,8 +1827,12 @@ void nv_setvec(register Namval_t *np,int append,register int argc,register char
while(--arg0>0 && ap->val[arg0].cp==0 && aq->val[arg0].cp==0);
arg0++;
}
- else if(!nv_isnull(np))
- arg0=1;
+ else
+ {
+ nv_offattr(np,NV_ARRAY);
+ if(!nv_isnull(np) && np->nvalue.cp!=Empty)
+ arg0=1;
+ }
}
while(--argc >= 0)
{
diff --git a/usr/src/lib/libshell/common/sh/bash.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/bash.c
index 5b4bdc4ae5..fd2f3a14a4 100644
--- a/usr/src/lib/libshell/common/sh/bash.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/bash.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -289,7 +289,7 @@ int b_shopt(int argc,register char *argv[],void *extra)
sh_applyopts(shp,newflags);
shp->options = newflags;
if(is_option(&newflags,SH_XTRACE))
- sh_trace(argv,1);
+ sh_trace(shp,argv,1);
}
else if(!(setflag&SET_NOARGS)) /* no -s,-u but args, ret=0 if opt&mask==mask */
{
@@ -308,9 +308,8 @@ int b_shopt(int argc,register char *argv[],void *extra)
mode < 0: shutdown
*/
-void bash_init(int mode)
+void bash_init(Shell_t *shp,int mode)
{
- Shell_t *shp = &sh;
Sfio_t *iop;
Namval_t *np;
int n=0,xtrace,verbose;
diff --git a/usr/src/lib/libshell/common/sh/defs.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/defs.c
index 69895c6778..308ce22fe2 100644
--- a/usr/src/lib/libshell/common/sh/defs.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/defs.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -30,6 +30,7 @@
#include "timeout.h"
Shell_t sh = {0};
+struct shared *shgd;
#ifdef __IMPORT__
Shell_t *_imp__sh = &sh;
#endif
diff --git a/usr/src/lib/libshell/common/sh/deparse.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/deparse.c
index 4526a84550..d7736a4a5c 100644
--- a/usr/src/lib/libshell/common/sh/deparse.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/deparse.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -214,6 +214,15 @@ static void p_tree(register const Shnode_t *t,register int tflags)
}
}
p_tree(t->lst.lstlef,NEED_BRACE|NO_NEWLINE|(tflags&NO_BRACKET));
+ if(tflags&FALTPIPE)
+ {
+ Shnode_t *tt = t->lst.lstrit;
+ if(tt->tre.tretyp!=TFIL || !(tt->lst.lstlef->tre.tretyp&FALTPIPE))
+ {
+ sfputc(outfile,'\n');
+ return;
+ }
+ }
sfputr(outfile,cp,here_doc?'\n':' ');
if(here_doc)
{
@@ -392,7 +401,15 @@ static void p_arg(register const struct argnod *arg,register int endchar,int opt
else if(opts)
flag = ' ';
cp = arg->argval;
- if(*cp==0 && opts==POST && arg->argchn.ap)
+ if(*cp==0 && (arg->argflag&ARG_EXP) && arg->argchn.ap)
+ {
+ int c = (arg->argflag&ARG_RAW)?'>':'<';
+ sfputc(outfile,c);
+ sfputc(outfile,'(');
+ p_tree((Shnode_t*)arg->argchn.ap,0);
+ sfputc(outfile,')');
+ }
+ else if(*cp==0 && opts==POST && arg->argchn.ap)
{
/* compound assignment */
struct fornod *fp=(struct fornod*)arg->argchn.ap;
@@ -498,6 +515,8 @@ static void p_redirect(register const struct ionod *iop)
static void p_comarg(register const struct comnod *com)
{
register int flag = end_line;
+ if(com->comtyp&FAMP)
+ sfwrite(outfile,"& ",2);
if(com->comarg || com->comio)
flag = ' ';
if(com->comset)
diff --git a/usr/src/lib/libshell/common/sh/env.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/env.c
index d6db6851e7..717c8b8eef 100644
--- a/usr/src/lib/libshell/common/sh/env.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/env.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/sh/expand.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/expand.c
index 675e00ba34..40c3dd19e3 100644
--- a/usr/src/lib/libshell/common/sh/expand.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/expand.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -52,7 +52,7 @@
static int suflen;
static int scantree(Dt_t*,const char*, struct argnod**);
#else
-# define sh_sigcheck() (0)
+# define sh_sigcheck(sig) (0)
# define sh_access access
# define suflen 0
#endif /* KSHELL */
@@ -77,9 +77,10 @@ static struct glob *membase;
#if GLOB_VERSION >= 20010916L
static char *nextdir(glob_t *gp, char *dir)
{
+ Shell_t *shp = sh_getinterp();
Pathcomp_t *pp = (Pathcomp_t*)gp->gl_handle;
if(!dir)
- pp = path_get("");
+ pp = path_get(shp,"");
else
pp = pp->next;
gp->gl_handle = (void*)pp;
@@ -89,9 +90,8 @@ static char *nextdir(glob_t *gp, char *dir)
}
#endif
-int path_expand(const char *pattern, struct argnod **arghead)
+int path_expand(Shell_t *shp,const char *pattern, struct argnod **arghead)
{
- Shell_t *shp = &sh;
glob_t gdata;
register struct argnod *ap;
register glob_t *gp= &gdata;
@@ -102,7 +102,7 @@ int path_expand(const char *pattern, struct argnod **arghead)
#endif
sh_stats(STAT_GLOBS);
memset(gp,0,sizeof(gdata));
- flags = GLOB_AUGMENTED|GLOB_NOCHECK|GLOB_NOSORT|GLOB_STACK|GLOB_LIST|GLOB_DISC;
+ flags = GLOB_GROUP|GLOB_AUGMENTED|GLOB_NOCHECK|GLOB_NOSORT|GLOB_STACK|GLOB_LIST|GLOB_DISC;
if(sh_isoption(SH_MARKDIRS))
flags |= GLOB_MARK;
if(sh_isoption(SH_GLOBSTARS))
@@ -199,7 +199,7 @@ int path_expand(const char *pattern, struct argnod **arghead)
else
stakseek(0);
#endif
- sh_sigcheck();
+ sh_sigcheck(shp);
for(ap= (struct argnod*)gp->gl_list; ap; ap = ap->argnxt.ap)
{
ap->argchn.ap = ap->argnxt.ap;
@@ -246,11 +246,11 @@ static int scantree(Dt_t *tree, const char *pattern, struct argnod **arghead)
* The number of matches is returned
*/
-int path_complete(const char *name,register const char *suffix, struct argnod **arghead)
+int path_complete(Shell_t *shp,const char *name,register const char *suffix, struct argnod **arghead)
{
sufstr = suffix;
suflen = strlen(suffix);
- return(path_expand(name,arghead));
+ return(path_expand(shp,name,arghead));
}
#endif
@@ -262,7 +262,7 @@ static int checkfmt(Sfio_t* sp, void* vp, Sffmt_t* fp)
return -1;
}
-int path_generate(struct argnod *todo, struct argnod **arghead)
+int path_generate(Shell_t *shp,struct argnod *todo, struct argnod **arghead)
/*@
assume todo!=0;
return count satisfying count>=1;
@@ -388,7 +388,7 @@ again:
{
apin = ap->argchn.ap;
if(!sh_isoption(SH_NOGLOB))
- brace=path_expand(ap->argval,arghead);
+ brace=path_expand(shp,ap->argval,arghead);
else
{
ap->argchn.ap = *arghead;
@@ -449,7 +449,7 @@ endloop1:
endloop2:
brace = *cp;
*cp = 0;
- sh_sigcheck();
+ sh_sigcheck(shp);
ap = (struct argnod*)stakseek(ARGVAL);
ap->argflag = ARG_RAW;
ap->argchn.ap = todo;
diff --git a/usr/src/lib/libshell/common/sh/fault.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/fault.c
index e7bb6f9fad..fb7d3b2401 100644
--- a/usr/src/lib/libshell/common/sh/fault.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/fault.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -35,10 +35,12 @@
#include "jobs.h"
#include "path.h"
#include "builtins.h"
+#include "ulimit.h"
#define abortsig(sig) (sig==SIGABRT || sig==SIGBUS || sig==SIGILL || sig==SIGSEGV)
static char indone;
+static int cursig = -1;
#if !_std_malloc
# include <vmalloc.h>
@@ -82,13 +84,14 @@ void sh_fault(register int sig)
shp->winch++;
}
#endif /* SIGWINCH */
+ trap = shp->st.trapcom[sig];
if(shp->savesig)
{
/* critical region, save and process later */
- shp->savesig = sig;
+ if(!(shp->sigflag[sig]&SH_SIGIGNORE))
+ shp->savesig = sig;
return;
}
- trap = shp->st.trapcom[sig];
if(sig==SIGALRM && shp->bltinfun==b_sleep)
{
if(trap && *trap)
@@ -98,7 +101,7 @@ void sh_fault(register int sig)
}
return;
}
- if(shp->subshell && sig!=SIGINT && sig!=SIGQUIT && sig!=SIGWINCH && sig!=SIGCONT)
+ if(shp->subshell && trap && sig!=SIGINT && sig!=SIGQUIT && sig!=SIGWINCH && sig!=SIGCONT)
{
shp->exitval = SH_EXITSIG|sig;
sh_subfork();
@@ -114,7 +117,12 @@ void sh_fault(register int sig)
if(sig==SIGINT && (shp->trapnote&SH_SIGIGNORE))
return;
if(flag&SH_SIGIGNORE)
+ {
+ if(shp->subshell)
+ shp->ignsig = sig;
+ sigrelease(sig);
return;
+ }
if(flag&SH_SIGDONE)
{
void *ptr=0;
@@ -127,21 +135,24 @@ void sh_fault(register int sig)
}
shp->lastsig = sig;
sigrelease(sig);
- if(pp->mode < SH_JMPFUN)
- pp->mode = SH_JMPFUN;
- else
- pp->mode = SH_JMPEXIT;
+ if(pp->mode != SH_JMPSUB)
+ {
+ if(pp->mode < SH_JMPSUB)
+ pp->mode = shp->subshell?SH_JMPSUB:SH_JMPFUN;
+ else
+ pp->mode = SH_JMPEXIT;
+ }
+ if(shp->subshell)
+ sh_exit(SH_EXITSIG);
if(sig==SIGABRT || (abortsig(sig) && (ptr = malloc(1))))
{
if(ptr)
free(ptr);
- if(!shp->subshell)
- sh_done(shp,sig);
- sh_exit(SH_EXITSIG);
+ sh_done(shp,sig);
}
/* mark signal and continue */
shp->trapnote |= SH_SIGSET;
- if(sig <= shp->sigmax)
+ if(sig <= shp->gd->sigmax)
shp->sigflag[sig] |= SH_SIGSET;
#if defined(VMFL) && (VMALLOC_VERSION>=20031205L)
if(abortsig(sig))
@@ -157,7 +168,7 @@ void sh_fault(register int sig)
}
}
errno = 0;
- if(pp->mode==SH_JMPCMD)
+ if(pp->mode==SH_JMPCMD || (pp->mode==1 && shp->bltinfun) && !(flag&SH_SIGIGNORE))
shp->lastsig = sig;
if(trap)
{
@@ -180,7 +191,7 @@ void sh_fault(register int sig)
{
sigrelease(sig);
sh_exit(SH_EXITSIG);
- flag = 0;
+ return;
}
}
#endif /* SIGTSTP */
@@ -197,7 +208,7 @@ void sh_fault(register int sig)
return;
}
shp->trapnote |= flag;
- if(sig <= shp->sigmax)
+ if(sig <= shp->gd->sigmax)
shp->sigflag[sig] |= flag;
if(pp->mode==SH_JMPCMD && sh_isstate(SH_STOPOK))
{
@@ -221,8 +232,8 @@ void sh_siginit(void *ptr)
#if defined(SIGRTMIN) && defined(SIGRTMAX)
if ((n = SIGRTMIN) > 0 && (sig = SIGRTMAX) > n && sig < SH_TRAP)
{
- shp->sigruntime[SH_SIGRTMIN] = n;
- shp->sigruntime[SH_SIGRTMAX] = sig;
+ shp->gd->sigruntime[SH_SIGRTMIN] = n;
+ shp->gd->sigruntime[SH_SIGRTMAX] = sig;
}
#endif /* SIGRTMIN && SIGRTMAX */
n = SIGTERM;
@@ -232,29 +243,29 @@ void sh_siginit(void *ptr)
if (!(sig-- & SH_TRAP))
{
if ((tp->sh_number>>SH_SIGBITS) & SH_SIGRUNTIME)
- sig = shp->sigruntime[sig];
+ sig = shp->gd->sigruntime[sig];
if(sig>n && sig<SH_TRAP)
n = sig;
}
tp++;
}
- shp->sigmax = n++;
+ shp->gd->sigmax = n++;
shp->st.trapcom = (char**)calloc(n,sizeof(char*));
shp->sigflag = (unsigned char*)calloc(n,1);
- shp->sigmsg = (char**)calloc(n,sizeof(char*));
+ shp->gd->sigmsg = (char**)calloc(n,sizeof(char*));
for(tp=shtab_signals; sig=tp->sh_number; tp++)
{
n = (sig>>SH_SIGBITS);
- if((sig &= ((1<<SH_SIGBITS)-1)) > (shp->sigmax+1))
+ if((sig &= ((1<<SH_SIGBITS)-1)) > (shp->gd->sigmax+1))
continue;
sig--;
if(n&SH_SIGRUNTIME)
- sig = shp->sigruntime[sig];
+ sig = shp->gd->sigruntime[sig];
if(sig>=0)
{
shp->sigflag[sig] = n;
if(*tp->sh_name)
- shp->sigmsg[sig] = (char*)tp->sh_value;
+ shp->gd->sigmsg[sig] = (char*)tp->sh_value;
}
}
}
@@ -293,9 +304,9 @@ void sh_sigtrap(register int sig)
*/
void sh_sigdone(void)
{
- register int flag, sig = sh.sigmax;
+ register int flag, sig = shgd->sigmax;
sh.sigflag[0] |= SH_SIGFAULT;
- for(sig=sh.sigmax; sig>0; sig--)
+ for(sig=shgd->sigmax; sig>0; sig--)
{
flag = sh.sigflag[sig];
if((flag&(SH_SIGDONE|SH_SIGIGNORE|SH_SIGINTERACTIVE)) && !(flag&(SH_SIGFAULT|SH_SIGOFF)))
@@ -373,55 +384,55 @@ void sh_sigclear(register int sig)
* check for traps
*/
-void sh_chktrap(void)
+void sh_chktrap(Shell_t* shp)
{
- register int sig=sh.st.trapmax;
+ register int sig=shp->st.trapmax;
register char *trap;
- if(!(sh.trapnote&~SH_SIGIGNORE))
+ if(!(shp->trapnote&~SH_SIGIGNORE))
sig=0;
- sh.trapnote &= ~SH_SIGTRAP;
+ shp->trapnote &= ~SH_SIGTRAP;
/* execute errexit trap first */
- if(sh_isstate(SH_ERREXIT) && sh.exitval)
+ if(sh_isstate(SH_ERREXIT) && shp->exitval)
{
- int sav_trapnote = sh.trapnote;
- sh.trapnote &= ~SH_SIGSET;
- if(sh.st.trap[SH_ERRTRAP])
+ int sav_trapnote = shp->trapnote;
+ shp->trapnote &= ~SH_SIGSET;
+ if(shp->st.trap[SH_ERRTRAP])
{
- trap = sh.st.trap[SH_ERRTRAP];
- sh.st.trap[SH_ERRTRAP] = 0;
+ trap = shp->st.trap[SH_ERRTRAP];
+ shp->st.trap[SH_ERRTRAP] = 0;
sh_trap(trap,0);
- sh.st.trap[SH_ERRTRAP] = trap;
+ shp->st.trap[SH_ERRTRAP] = trap;
}
- sh.trapnote = sav_trapnote;
+ shp->trapnote = sav_trapnote;
if(sh_isoption(SH_ERREXIT))
{
- struct checkpt *pp = (struct checkpt*)sh.jmplist;
+ struct checkpt *pp = (struct checkpt*)shp->jmplist;
pp->mode = SH_JMPEXIT;
- sh_exit(sh.exitval);
+ sh_exit(shp->exitval);
}
}
- if(sh.sigflag[SIGALRM]&SH_SIGALRM)
- sh_timetraps();
+ if(shp->sigflag[SIGALRM]&SH_SIGALRM)
+ sh_timetraps(shp);
#ifdef SHOPT_BGX
- if((sh.sigflag[SIGCHLD]&SH_SIGTRAP) && sh.st.trapcom[SIGCHLD])
- job_chldtrap(&sh,sh.st.trapcom[SIGCHLD],1);
+ if((shp->sigflag[SIGCHLD]&SH_SIGTRAP) && shp->st.trapcom[SIGCHLD])
+ job_chldtrap(shp,shp->st.trapcom[SIGCHLD],1);
#endif /* SHOPT_BGX */
while(--sig>=0)
{
+ if(sig==cursig)
+ continue;
#ifdef SHOPT_BGX
if(sig==SIGCHLD)
continue;
#endif /* SHOPT_BGX */
- if(sh.sigflag[sig]&SH_SIGTRAP)
+ if(shp->sigflag[sig]&SH_SIGTRAP)
{
- sh.sigflag[sig] &= ~SH_SIGTRAP;
- if(trap=sh.st.trapcom[sig])
+ shp->sigflag[sig] &= ~SH_SIGTRAP;
+ if(trap=shp->st.trapcom[sig])
{
- Sfio_t *fp;
- if(sig==SIGPIPE && (fp=sfpool((Sfio_t*)0,sh.outpool,SF_WRITE)) && sferror(fp))
- sfclose(fp);
- sh.oldexit = SH_EXITSIG|sig;
+ cursig = sig;
sh_trap(trap,0);
+ cursig = -1;
}
}
}
@@ -448,7 +459,7 @@ int sh_trap(const char *trap, int mode)
sh_offstate(SH_HISTORY);
sh_offstate(SH_VERBOSE);
shp->intrap++;
- sh_pushcontext(&buff,SH_JMPTRAP);
+ sh_pushcontext(shp,&buff,SH_JMPTRAP);
jmpval = sigsetjmp(buff.buff,0);
if(jmpval == 0)
{
@@ -475,7 +486,7 @@ int sh_trap(const char *trap, int mode)
jmpval=SH_JMPTRAP;
}
}
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
shp->intrap--;
sfsync(shp->outpool);
if(!shp->indebug && jmpval!=SH_JMPEXIT && jmpval!=SH_JMPFUN)
@@ -498,15 +509,17 @@ int sh_trap(const char *trap, int mode)
*/
void sh_exit(register int xno)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register struct checkpt *pp = (struct checkpt*)shp->jmplist;
register int sig=0;
register Sfio_t* pool;
shp->exitval=xno;
if(xno==SH_EXITSIG)
shp->exitval |= (sig=shp->lastsig);
+ if(pp && pp->mode>1)
+ cursig = -1;
#ifdef SIGTSTP
- if(shp->trapnote&SH_SIGTSTP)
+ if(shp->trapnote&SH_SIGTSTP && job.jobcontrol)
{
/* ^Z detected by the shell */
shp->trapnote = 0;
@@ -520,11 +533,13 @@ void sh_exit(register int xno)
sh_onstate(SH_MONITOR);
sh_offstate(SH_STOPOK);
shp->trapnote = 0;
- if(!shp->subshell && (sig=sh_fork(0,NIL(int*))))
+ shp->forked = 1;
+ if(!shp->subshell && (sig=sh_fork(shp,0,NIL(int*))))
{
job.curpgid = 0;
job.parent = (pid_t)-1;
job_wait(sig);
+ shp->forked = 0;
job.parent = 0;
shp->sigflag[SIGTSTP] = 0;
/* wait for child to stop */
@@ -544,7 +559,6 @@ void sh_exit(register int xno)
killpg(job.curpgid,SIGTSTP);
/* child resumes */
job_clear();
- shp->forked = 1;
shp->exitval = (xno&SH_EXITMASK);
return;
}
@@ -566,6 +580,8 @@ void sh_exit(register int xno)
#if SHOPT_TYPEDEF
shp->mktype = 0;
#endif /* SHOPT_TYPEDEF*/
+ if(job.in_critical)
+ job_unlock();
if(pp->mode == SH_JMPSCRIPT && !pp->prev)
sh_done(shp,sig);
if(pp->mode)
@@ -606,7 +622,7 @@ void sh_done(void *ptr, register int sig)
{
/* avoid recursive call for set -e */
sh_offstate(SH_ERREXIT);
- sh_chktrap();
+ sh_chktrap(shp);
}
nv_scan(shp->var_tree,array_notify,(void*)0,NV_ARRAY,NV_ARRAY);
sh_freeup(shp);
@@ -614,12 +630,12 @@ void sh_done(void *ptr, register int sig)
sh_accend();
#endif /* SHOPT_ACCT */
#if SHOPT_VSH || SHOPT_ESH
- if(sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
+ if(mbwide()||sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
tty_cooked(-1);
#endif
#ifdef JOBS
if((sh_isoption(SH_INTERACTIVE) && shp->login_sh) || (!sh_isoption(SH_INTERACTIVE) && (sig==SIGHUP)))
- job_walk(sfstderr,job_terminate,SIGHUP,NIL(char**));
+ job_walk(sfstderr, job_hup, SIGHUP, NIL(char**));
#endif /* JOBS */
job_close(shp);
if(nv_search("VMTRACE", shp->var_tree,0))
@@ -632,6 +648,17 @@ void sh_done(void *ptr, register int sig)
if(sig)
{
/* generate fault termination code */
+ if(RLIMIT_CORE!=RLIMIT_UNKNOWN)
+ {
+#ifdef _lib_getrlimit
+ struct rlimit rlp;
+ getrlimit(RLIMIT_CORE,&rlp);
+ rlp.rlim_cur = 0;
+ setrlimit(RLIMIT_CORE,&rlp);
+#else
+ vlimit(RLIMIT_CORE,0);
+#endif
+ }
signal(sig,SIG_DFL);
sigrelease(sig);
kill(getpid(),sig);
diff --git a/usr/src/lib/libshell/common/sh/fcin.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/fcin.c
index a340f43339..ea6ea6be61 100644
--- a/usr/src/lib/libshell/common/sh/fcin.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/fcin.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -150,13 +150,19 @@ extern void fcrestore(Fcin_t *fp)
_Fcin = *fp;
}
+/* for testing purposes with small buffers */
+#if defined(IOBSIZE) && (IOBSIZE < 2*MB_LEN_MAX)
+# undef MB_LEN_MAX
+# define MB_LEN_MAX (IOBSIZE/2)
+#endif
+
struct Extra
{
unsigned char buff[2*MB_LEN_MAX];
unsigned char *next;
};
-int fcmbstate(const char *state, int *s, int *len)
+int _fcmbget(short *len)
{
static struct Extra extra;
register int i, c, n;
@@ -171,14 +177,11 @@ int fcmbstate(const char *state, int *s, int *len)
}
*len = c;
if(c==1)
- *s = state[*extra.next++];
+ c = *extra.next++;
else if(c==0)
_Fcin.fcleft = 0;
else
- {
c = mbchar(extra.next);
- *s = state['a'];
- }
return(c);
}
switch(*len = mbsize(_Fcin.fcptr))
@@ -195,17 +198,16 @@ int fcmbstate(const char *state, int *s, int *len)
}
_Fcin.fcleft = n;
extra.next = extra.buff;
- return(fcmbstate(state,s,len));
+ return(fcmbget(len));
}
*len = 1;
/* fall through */
case 0:
case 1:
- *s = state[c=fcget()];
+ c=fcget();
break;
default:
c = mbchar(_Fcin.fcptr);
- *s = state['a'];
}
return(c);
}
diff --git a/usr/src/lib/libshell/common/sh/init.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/init.c
index 97f060ae27..96c38c53a1 100644
--- a/usr/src/lib/libshell/common/sh/init.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/init.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,6 +32,7 @@
#include <ccode.h>
#include <pwd.h>
#include <tmx.h>
+#include <regex.h>
#include "variables.h"
#include "path.h"
#include "fault.h"
@@ -47,6 +48,40 @@
#include "lexstates.h"
#include "version.h"
+#if _hdr_wctype
+#include <ast_wchar.h>
+#include <wctype.h>
+#endif
+#if !_typ_wctrans_t
+#undef wctrans_t
+#define wctrans_t sh_wctrans_t
+typedef long wctrans_t;
+#endif
+#if !_lib_wctrans
+#undef wctrans
+#define wctrans sh_wctrans
+static wctrans_t wctrans(const char *name)
+{
+ if(strcmp(name,e_tolower)==0)
+ return(1);
+ else if(strcmp(name,e_toupper)==0)
+ return(2);
+ return(0);
+}
+#endif
+#if !_lib_towctrans
+#undef towctrans
+#define towctrans sh_towctrans
+static int towctrans(int c, wctrans_t t)
+{
+ if(t==1 && isupper(c))
+ c = tolower(c);
+ else if(t==2 && islower(c))
+ c = toupper(c);
+ return(c);
+}
+#endif
+
char e_version[] = "\n@(#)$Id: Version "
#if SHOPT_AUDIT
#define ATTRS 1
@@ -56,9 +91,14 @@ char e_version[] = "\n@(#)$Id: Version "
#define ATTRS 1
"B"
#endif
-#if SHOPT_BGX
+#if SHOPT_COSHELL
#define ATTRS 1
"J"
+#else
+#if SHOPT_BGX
+#define ATTRS 1
+ "j"
+#endif
#endif
#if SHOPT_ACCT
#define ATTRS 1
@@ -113,6 +153,7 @@ struct seconds
struct rand
{
Namfun_t hdr;
+ Shell_t *sh;
int32_t rand_last;
};
@@ -125,12 +166,16 @@ struct ifs
struct match
{
Namfun_t hdr;
+ const char *v;
char *val;
- char *rval;
+ char *rval[2];
+ regoff_t *match;
+ char node[NV_MINSZ+sizeof(char*)];
+ regoff_t first;
int vsize;
int nmatch;
- int lastsub;
- int match[2*(MATCH_MAX+1)];
+ int index;
+ int lastsub[2];
};
typedef struct _init_
@@ -156,6 +201,10 @@ typedef struct _init_
Namfun_t L_ARG_init;
Namfun_t SH_VERSION_init;
struct match SH_MATCH_init;
+ Namfun_t SH_MATH_init;
+#if SHOPT_COSHELL
+ Namfun_t SH_JOBPOOL_init;
+#endif /* SHOPT_COSHELL */
#ifdef _hdr_locale
Namfun_t LC_TYPE_init;
Namfun_t LC_NUM_init;
@@ -166,6 +215,8 @@ typedef struct _init_
#endif /* _hdr_locale */
} Init_t;
+static Init_t *ip;
+static int lctype;
static int nbltins;
static void env_init(Shell_t*);
static Init_t *nv_init(Shell_t*);
@@ -233,15 +284,18 @@ done:
static void put_history(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
{
Shell_t *shp = nv_shell(np);
- void *histopen = shp->hist_ptr;
+ void *histopen = NULL;
char *cp;
+ if( shp ) {
+ histopen = shp->gd->hist_ptr;
+ }
if(val && histopen)
{
if(np==HISTFILE && (cp=nv_getval(np)) && strcmp(val,cp)==0)
return;
- if(np==HISTSIZE && sh_arith(val)==nv_getnum(HISTSIZE))
+ if(np==HISTSIZE && sh_arith(shp,val)==nv_getnum(HISTSIZE))
return;
- hist_close(shp->hist_ptr);
+ hist_close(shp->gd->hist_ptr);
}
nv_putv(np, val, flags, fp);
if(histopen)
@@ -282,7 +336,7 @@ static Namfun_t *clone_optindex(Namval_t* np, Namval_t *mp, int flags, Namfun_t
static void put_restricted(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
{
Shell_t *shp = nv_shell(np);
- int path_scoped = 0;
+ int path_scoped = 0, fpath_scoped=0;
Pathcomp_t *pp;
char *name = nv_name(np);
if(!(flags&NV_RDONLY) && sh_isoption(SH_RESTRICTED))
@@ -295,17 +349,17 @@ static void put_restricted(register Namval_t* np,const char *val,int flags,Namfu
}
if(val && !(flags&NV_RDONLY) && np->nvalue.cp && strcmp(val,np->nvalue.cp)==0)
return;
- if(np==FPATHNOD)
- shp->pathlist = (void*)path_unsetfpath((Pathcomp_t*)shp->pathlist);
+ if(np==FPATHNOD || (fpath_scoped=(strcmp(name,FPATHNOD->nvname)==0)))
+ shp->pathlist = (void*)path_unsetfpath(shp);
nv_putv(np, val, flags, fp);
shp->universe = 0;
if(shp->pathlist)
{
val = np->nvalue.cp;
if(np==PATHNOD || path_scoped)
- pp = (void*)path_addpath((Pathcomp_t*)shp->pathlist,val,PATH_PATH);
- else if(val && np==FPATHNOD)
- pp = (void*)path_addpath((Pathcomp_t*)shp->pathlist,val,PATH_FPATH);
+ pp = (void*)path_addpath(shp,(Pathcomp_t*)shp->pathlist,val,PATH_PATH);
+ else if(val && (np==FPATHNOD || fpath_scoped))
+ pp = (void*)path_addpath(shp,(Pathcomp_t*)shp->pathlist,val,PATH_FPATH);
else
return;
if(shp->pathlist = (void*)pp)
@@ -331,7 +385,7 @@ static void put_cdpath(register Namval_t* np,const char *val,int flags,Namfun_t
if(!shp->cdpathlist)
return;
val = np->nvalue.cp;
- pp = (void*)path_addpath((Pathcomp_t*)shp->cdpathlist,val,PATH_CDPATH);
+ pp = (void*)path_addpath(shp,(Pathcomp_t*)shp->cdpathlist,val,PATH_CDPATH);
if(shp->cdpathlist = (void*)pp)
pp->shp = shp;
}
@@ -360,7 +414,6 @@ static void put_cdpath(register Namval_t* np,const char *val,int flags,Namfun_t
{
Shell_t *shp = nv_shell(np);
int type;
- char *cp;
char *name = nv_name(np);
if(name==(LCALLNOD)->nvname)
type = LC_ALL;
@@ -377,14 +430,13 @@ 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 && (!(cp=nv_getval(LCALLNOD)) || !*cp))
+ else if(name==(LANGNOD)->nvname && (!(name=nv_getval(LCALLNOD)) || !*name))
type = LC_LANG;
#endif
else
type= -1;
if(!sh_isstate(SH_INIT) && (type>=0 || type==LC_ALL || type==LC_LANG))
{
- struct lconv* lc;
char* r;
#ifdef AST_LC_setenv
ast.locale.set |= AST_LC_setenv;
@@ -399,13 +451,13 @@ static void put_cdpath(register Namval_t* np,const char *val,int flags,Namfun_t
errormsg(SH_DICT,0,e_badlocale,val);
return;
}
- shp->decomma = (lc=localeconv()) && lc->decimal_point && *lc->decimal_point==',';
}
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]);
+ lctype++;
if(ast.locale.set&(1<<AST_LC_CTYPE))
{
register int c;
@@ -460,18 +512,24 @@ static void put_cdpath(register Namval_t* np,const char *val,int flags,Namfun_t
static void put_ifs(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
{
register struct ifs *ip = (struct ifs*)fp;
- Shell_t *shp;
ip->ifsnp = 0;
if(!val)
{
fp = nv_stack(np, NIL(Namfun_t*));
if(fp && !fp->nofree)
+ {
free((void*)fp);
+ fp = 0;
+ }
}
if(val != np->nvalue.cp)
nv_putv(np, val, flags, fp);
- if(!val && !(flags&NV_CLONE) && (fp=np->nvfun) && !fp->disc && (shp=(Shell_t*)(fp->last)))
- nv_stack(np,&((Init_t*)shp->init_context)->IFS_init.hdr);
+ if(!val)
+ {
+ if(fp)
+ fp->next = np->nvfun;
+ np->nvfun = fp;
+ }
}
/*
@@ -532,7 +590,7 @@ static char* get_ifs(register Namval_t* np, Namfun_t *fp)
# define dtime(tp) ((double)((tp)->tv_sec)+1e-6*((double)((tp)->tv_usec)))
# define tms timeval
#else
-# define dtime(tp) (((double)times(tp))/sh.lim.clk_tck)
+# define dtime(tp) (((double)times(tp))/shgd->lim.clk_tck)
# define timeofday(a)
#endif
@@ -542,10 +600,10 @@ static void put_seconds(register Namval_t* np,const char *val,int flags,Namfun_t
struct tms tp;
if(!val)
{
+ nv_putv(np, val, flags, fp);
fp = nv_stack(np, NIL(Namfun_t*));
if(fp && !fp->nofree)
free((void*)fp);
- nv_putv(np, val, flags, fp);
return;
}
if(!np->nvalue.dp)
@@ -594,13 +652,13 @@ static void put_rand(register Namval_t* np,const char *val,int flags,Namfun_t *f
fp = nv_stack(np, NIL(Namfun_t*));
if(fp && !fp->nofree)
free((void*)fp);
- nv_unset(np);
+ _nv_unset(np,0);
return;
}
if(flags&NV_INTEGER)
n = *(double*)val;
else
- n = sh_arith(val);
+ n = sh_arith(rp->sh,val);
srand((int)(n&RANDMASK));
rp->rand_last = -1;
if(!np->nvalue.lp)
@@ -652,13 +710,13 @@ static void put_lineno(Namval_t* np,const char *val,int flags,Namfun_t *fp)
fp = nv_stack(np, NIL(Namfun_t*));
if(fp && !fp->nofree)
free((void*)fp);
- nv_unset(np);
+ _nv_unset(np,0);
return;
}
if(flags&NV_INTEGER)
n = *(double*)val;
else
- n = sh_arith(val);
+ n = sh_arith(shp,val);
shp->st.firstline += nget_lineno(np,fp)+1-n;
}
@@ -674,7 +732,7 @@ static char* get_lastarg(Namval_t* np, Namfun_t *fp)
char *cp;
int pid;
if(sh_isstate(SH_INIT) && (cp=shp->lastarg) && *cp=='*' && (pid=strtol(cp+1,&cp,10)) && *cp=='*')
- nv_putval(np,(pid==getppid()?cp+1:0),0);
+ nv_putval(np,cp+1,0);
return(shp->lastarg);
}
@@ -706,37 +764,103 @@ static int hasgetdisc(register Namfun_t *fp)
/*
* store the most recent value for use in .sh.match
+ * treat .sh.match as a two dimensional array
*/
-void sh_setmatch(const char *v, int vsize, int nmatch, int match[])
+void sh_setmatch(Shell_t *shp,const char *v, int vsize, int nmatch, regoff_t match[],int index)
{
- struct match *mp = (struct match*)(SH_MATCHNOD->nvfun);
- register int i,n;
- if(mp->nmatch = nmatch)
+ struct match *mp = &ip->SH_MATCH_init;
+ Namval_t *np = nv_namptr(mp->node,0);
+ register int i,n,x, savesub=shp->subshell;
+ Namarr_t *ap = nv_arrayptr(SH_MATCHNOD);
+ shp->subshell = 0;
+#ifndef SHOPT_2DMATCH
+ index = 0;
+#else
+ if(index==0)
+#endif /* SHOPT_2DMATCH */
{
- memcpy(mp->match,match,nmatch*2*sizeof(match[0]));
- for(n=match[0],i=1; i < 2*nmatch; i++)
+ if(ap->hdr.next != &mp->hdr)
{
- if(mp->match[i] < n)
- n = mp->match[i];
+ free((void*)ap);
+ ap = nv_arrayptr(np);
+ SH_MATCHNOD->nvfun = &ap->hdr;
}
- for(vsize=0,i=0; i < 2*nmatch; i++)
+ if(ap)
{
- if((mp->match[i] -= n) > vsize)
- vsize = mp->match[i];
+ ap->nelem &= ~ARRAY_SCAN;
+ i = array_elem(ap);
+ ap->nelem++;
+ while(--i>= 0)
+ {
+ nv_putsub(SH_MATCHNOD, (char*)0,i);
+ _nv_unset(SH_MATCHNOD,NV_RDONLY);
+ }
+ ap->nelem--;
}
- v += n;
- if(vsize >= mp->vsize)
+ if(!nv_hasdisc(SH_MATCHNOD,mp->hdr.disc))
+ nv_disc(SH_MATCHNOD,&mp->hdr,NV_LAST);
+ if(nmatch)
+ nv_putsub(SH_MATCHNOD, NIL(char*), (nmatch-1)|ARRAY_FILL|ARRAY_SETSUB);
+ ap = nv_arrayptr(SH_MATCHNOD);
+ ap->nelem = mp->nmatch = nmatch;
+ mp->v = v;
+ mp->first = match[0];
+ }
+#ifdef SHOPT_2DMATCH
+ else
+ {
+ if(index==1)
+ {
+ np->nvalue.cp = Empty;
+ np->nvfun = SH_MATCHNOD->nvfun;
+ nv_onattr(np,NV_NOFREE|NV_ARRAY);
+ SH_MATCHNOD->nvfun = 0;
+ for(i=0; i < mp->nmatch; i++)
+ {
+ nv_putsub(SH_MATCHNOD, (char*)0, i);
+ nv_arraychild(SH_MATCHNOD, np,0);
+ }
+ if(ap = nv_arrayptr(SH_MATCHNOD))
+ ap->nelem = mp->nmatch;
+ }
+ ap = nv_arrayptr(np);
+ nv_putsub(np, NIL(char*), index|ARRAY_FILL|ARRAY_SETSUB);
+ }
+#endif /* SHOPT_2DMATCH */
+ shp->subshell = savesub;
+ index *= 2*mp->nmatch;
+ if(mp->nmatch)
+ {
+ for(n=mp->first+(mp->v-v),vsize=0,i=0; i < 2*nmatch; i++)
+ {
+ if(match[i]>=0 && (match[i] - n) > vsize)
+ vsize = match[i] -n;
+ }
+ i = (index+2*mp->nmatch)*sizeof(match[0]);
+ if((i+vsize) >= mp->vsize)
{
if(mp->vsize)
- mp->val = (char*)realloc(mp->val,vsize+1);
+ mp->match = (int*)realloc(mp->match,i+vsize+1);
else
- mp->val = (char*)malloc(vsize+1);
- mp->vsize = vsize;
+ mp->match = (int*)malloc(i+vsize+1);
+ mp->vsize = i+vsize+1;
}
- memcpy(mp->val,v,vsize);
+ mp->val = ((char*)mp->match)+i;
+ memcpy(mp->match+index,match,nmatch*2*sizeof(match[0]));
+ for(x=0,i=0; i < 2*nmatch; i++)
+ {
+ if(match[i]>=0)
+ mp->match[index+i] -= n;
+ else
+ x=1;
+
+ }
+ ap->nelem -= x;
+ while(i < 2*mp->nmatch)
+ mp->match[index+i++] = -1;
+ memcpy(mp->val,v+n,vsize);
mp->val[vsize] = 0;
- nv_putsub(SH_MATCHNOD, NIL(char*), (nmatch-1)|ARRAY_FILL);
- mp->lastsub = -1;
+ mp->lastsub[0] = mp->lastsub[1] = -1;
}
}
@@ -744,30 +868,37 @@ void sh_setmatch(const char *v, int vsize, int nmatch, int match[])
static char* get_match(register Namval_t* np, Namfun_t *fp)
{
- struct match *mp = (struct match*)fp;
- int sub,n;
- char *val;
- sub = nv_aindex(np);
+ struct match *mp = (struct match*)fp;
+ int sub,sub2=0,n,i =!mp->index;
+ char *val;
+ sub = nv_aindex(SH_MATCHNOD);
+ if(np!=SH_MATCHNOD)
+ sub2 = nv_aindex(np);
if(sub>=mp->nmatch)
return(0);
- if(sub==mp->lastsub)
- return(mp->rval);
- if(mp->rval)
- {
- free((void*)mp->rval);
- mp->rval = 0;
- }
+ if(sub2>0)
+ sub += sub2*mp->nmatch;
+ if(sub==mp->lastsub[!i])
+ return(mp->rval[!i]);
+ else if(sub==mp->lastsub[i])
+ return(mp->rval[i]);
n = mp->match[2*sub+1]-mp->match[2*sub];
if(n<=0)
- return("");
+ return(mp->match[2*sub]<0?Empty:"");
val = mp->val+mp->match[2*sub];
if(mp->val[mp->match[2*sub+1]]==0)
return(val);
- mp->rval = (char*)malloc(n+1);
- mp->lastsub = sub;
- memcpy(mp->rval,val,n);
- mp->rval[n] = 0;
- return(mp->rval);
+ mp->index = i;
+ if(mp->rval[i])
+ {
+ free((void*)mp->rval[i]);
+ mp->rval[i] = 0;
+ }
+ mp->rval[i] = (char*)malloc(n+1);
+ mp->lastsub[i] = sub;
+ memcpy(mp->rval[i],val,n);
+ mp->rval[i][n] = 0;
+ return(mp->rval[i]);
}
static const Namdisc_t SH_MATCH_disc = { sizeof(struct match), 0, get_match };
@@ -802,7 +933,7 @@ static const Namdisc_t SH_VERSION_disc = { 0, 0, get_version, nget_version };
static void vpath_set(char *str, int mode)
{
register char *lastp, *oldp=str, *newp=strchr(oldp,':');
- if(!sh.lim.fs3d)
+ if(!shgd->lim.fs3d)
return;
while(newp)
{
@@ -842,6 +973,114 @@ static const Namdisc_t RAND_disc = { sizeof(struct rand), put_rand, get_rand, n
static const Namdisc_t LINENO_disc = { sizeof(Namfun_t), put_lineno, get_lineno, nget_lineno };
static const Namdisc_t L_ARG_disc = { sizeof(Namfun_t), put_lastarg, get_lastarg };
+
+#define MAX_MATH_ARGS 3
+
+static char *name_math(Namval_t *np, Namfun_t *fp)
+{
+ Shell_t *shp = sh_getinterp();
+ sfprintf(shp->strbuf,".sh.math.%s",np->nvname);
+ return(sfstruse(shp->strbuf));
+}
+
+static const Namdisc_t math_child_disc =
+{
+ 0,0,0,0,0,0,0,
+ name_math
+};
+
+static Namfun_t math_child_fun =
+{
+ &math_child_disc, 1, 0, sizeof(Namfun_t)
+};
+
+static void math_init(Shell_t *shp)
+{
+ Namval_t *np;
+ char *name;
+ int i;
+ shp->mathnodes = (char*)calloc(1,MAX_MATH_ARGS*(NV_MINSZ+5));
+ name = shp->mathnodes+MAX_MATH_ARGS*NV_MINSZ;
+ for(i=0; i < MAX_MATH_ARGS; i++)
+ {
+ np = nv_namptr(shp->mathnodes,i);
+ np->nvfun = &math_child_fun;
+ memcpy(name,"arg",3);
+ name[3] = '1'+i;
+ np->nvname = name;
+ name+=5;
+ nv_onattr(np,NV_MINIMAL|NV_NOFREE|NV_LDOUBLE|NV_RDONLY);
+ }
+}
+
+static Namval_t *create_math(Namval_t *np,const char *name,int flag,Namfun_t *fp)
+{
+ Shell_t *shp = nv_shell(np);
+ if(!name)
+ return(SH_MATHNOD);
+ if(name[0]!='a' || name[1]!='r' || name[2]!='g' || name[4] || !isdigit(name[3]) || (name[3]=='0' || (name[3]-'0')>MAX_MATH_ARGS))
+ return(0);
+ fp->last = (char*)&name[4];
+ return(nv_namptr(shp->mathnodes,name[3]-'1'));
+}
+
+static char* get_math(register Namval_t* np, Namfun_t *fp)
+{
+ Shell_t *shp = nv_shell(np);
+ Namval_t *mp,fake;
+ char *val;
+ int first=0;
+ fake.nvname = ".sh.math.";
+ mp = (Namval_t*)dtprev(shp->fun_tree,&fake);
+ while(mp=(Namval_t*)dtnext(shp->fun_tree,mp))
+ {
+ if(memcmp(mp->nvname,".sh.math.",9))
+ break;
+ if(first++)
+ sfputc(shp->strbuf,' ');
+ sfputr(shp->strbuf,mp->nvname+9,-1);
+ }
+ val = sfstruse(shp->strbuf);
+ return(val);
+
+}
+
+static char *setdisc_any(Namval_t *np, const char *event, Namval_t *action, Namfun_t *fp)
+{
+ Shell_t *shp=nv_shell(np);
+ Namval_t *mp,fake;
+ char *name;
+ int getname=0, off=staktell();
+ fake.nvname = nv_name(np);
+ if(!event)
+ {
+ if(!action)
+ {
+ mp = (Namval_t*)dtprev(shp->fun_tree,&fake);
+ return((char*)dtnext(shp->fun_tree,mp));
+ }
+ getname = 1;
+ }
+ stakputs(fake.nvname);
+ stakputc('.');
+ stakputs(event);
+ stakputc(0);
+ name = stakptr(off);
+ mp = nv_search(name, shp->fun_tree, action?NV_ADD:0);
+ stakseek(off);
+ if(getname)
+ return(mp?(char*)dtnext(shp->fun_tree,mp):0);
+ if(action==np)
+ action = mp;
+ return(action?(char*)action:"");
+}
+
+static const Namdisc_t SH_MATH_disc = { 0, 0, get_math, 0, setdisc_any, create_math, };
+
+#if SHOPT_COSHELL
+static const Namdisc_t SH_JOBPOOL_disc = { 0, 0, 0, 0, setdisc_any, 0, };
+#endif /* SHOPT_COSHELL */
+
#if SHOPT_NAMESPACE
static char* get_nspace(Namval_t* np, Namfun_t *fp)
{
@@ -862,14 +1101,15 @@ static const Namdisc_t L_ARG_disc = { sizeof(Namfun_t), put_lastarg, get_lastar
*/
static int newconf(const char *name, const char *path, const char *value)
{
+ Shell_t *shp = sh_getinterp();
register char *arg;
if(!name)
setenviron(value);
else if(strcmp(name,"UNIVERSE")==0 && strcmp(astconf(name,0,0),value))
{
- sh.universe = 0;
+ shp->universe = 0;
/* set directory in new universe */
- if(*(arg = path_pwd(0))=='/')
+ if(*(arg = path_pwd(shp,0))=='/')
chdir(arg);
/* clear out old tracked alias */
stakseek(0);
@@ -991,7 +1231,7 @@ static void put_mode(Namval_t* np, const char* val, int flag, Namfun_t* nfp)
if(val)
{
mode_t mode;
- char *last;
+ char *last=0;
if(flag&NV_INTEGER)
{
if(flag&NV_LONG)
@@ -1022,10 +1262,10 @@ static const Namdisc_t modedisc =
*/
Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
{
- Shell_t *shp = &sh;
+ static int beenhere;
+ Shell_t *shp;
register int n;
int type;
- long v;
static char *login_files[3];
memfatal();
n = strlen(e_version);
@@ -1036,17 +1276,48 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
#else
init_ebcdic();
#endif
+ if(!beenhere)
+ {
+ beenhere = 1;
+ shp = &sh;
+ shgd = newof(0,struct shared,1,0);
+ shgd->pid = getpid();
+ shgd->ppid = getppid();
+ shgd->userid=getuid();
+ shgd->euserid=geteuid();
+ shgd->groupid=getgid();
+ shgd->egroupid=getegid();
+ shgd->lim.clk_tck = getconf("CLK_TCK");
+ shgd->lim.arg_max = getconf("ARG_MAX");
+ shgd->lim.child_max = getconf("CHILD_MAX");
+ shgd->lim.ngroups_max = getconf("NGROUPS_MAX");
+ shgd->lim.posix_version = getconf("VERSION");
+ shgd->lim.posix_jobcontrol = getconf("JOB_CONTROL");
+ if(shgd->lim.arg_max <=0)
+ shgd->lim.arg_max = ARG_MAX;
+ if(shgd->lim.child_max <=0)
+ shgd->lim.child_max = CHILD_MAX;
+ if(shgd->lim.clk_tck <=0)
+ shgd->lim.clk_tck = CLK_TCK;
+#if SHOPT_FS_3D
+ if(fs3d(FS3D_TEST))
+ shgd->lim.fs3d = 1;
+#endif /* SHOPT_FS_3D */
+ shgd->ed_context = (void*)ed_open(shp);
+ error_info.exit = sh_exit;
+ error_info.id = path_basename(argv[0]);
+ }
+ else
+ shp = newof(0,Shell_t,1,0);
umask(shp->mask=umask(0));
+ shp->gd = shgd;
shp->mac_context = sh_macopen(shp);
shp->arg_context = sh_argopen(shp);
shp->lex_context = (void*)sh_lexopen(0,shp,1);
- shp->ed_context = (void*)ed_open(shp);
shp->strbuf = sfstropen();
shp->stk = stkstd;
sfsetbuf(shp->strbuf,(char*)0,64);
sh_onstate(SH_INIT);
- error_info.exit = sh_exit;
- error_info.id = path_basename(argv[0]);
#if ERROR_VERSION >= 20000102L
error_info.catalog = e_dict;
#endif
@@ -1087,10 +1358,6 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
#endif
shp->cpipe[0] = -1;
shp->coutpipe = -1;
- shp->userid=getuid();
- shp->euserid=geteuid();
- shp->groupid=getgid();
- shp->egroupid=getegid();
for(n=0;n < 10; n++)
{
/* don't use lower bits when rand() generates large numbers */
@@ -1100,29 +1367,6 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
break;
}
}
- shp->lim.clk_tck = getconf("CLK_TCK");
- shp->lim.arg_max = getconf("ARG_MAX");
- shp->lim.open_max = getconf("OPEN_MAX");
- shp->lim.child_max = getconf("CHILD_MAX");
- shp->lim.ngroups_max = getconf("NGROUPS_MAX");
- shp->lim.posix_version = getconf("VERSION");
- shp->lim.posix_jobcontrol = getconf("JOB_CONTROL");
- if(shp->lim.arg_max <=0)
- 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))
- shp->lim.open_max = SHRT_MAX-2;
- if(shp->lim.clk_tck <=0)
- shp->lim.clk_tck = CLK_TCK;
-#if SHOPT_FS_3D
- if(fs3d(FS3D_TEST))
- shp->lim.fs3d = 1;
-#endif /* SHOPT_FS_3D */
sh_ioinit(shp);
/* initialize signal handling */
sh_siginit(shp);
@@ -1143,6 +1387,7 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
nv_putval(ENVNOD,sfstruse(shp->strbuf),NV_RDONLY);
}
*SHLVL->nvalue.ip +=1;
+ nv_offattr(SHLVL,NV_IMPORT);
#if SHOPT_SPAWN
{
/*
@@ -1151,22 +1396,22 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
*/
char *cp=nv_getval(L_ARGNOD);
char buff[PATH_MAX+1];
- shp->shpath = 0;
+ shp->gd->shpath = 0;
#if _AST_VERSION >= 20090202L
if((n = pathprog(NiL, buff, sizeof(buff))) > 0 && n <= sizeof(buff))
- shp->shpath = strdup(buff);
+ shp->gd->shpath = strdup(buff);
#else
sfprintf(shp->strbuf,"/proc/%d/exe",getpid());
if((n=readlink(sfstruse(shp->strbuf),buff,sizeof(buff)-1))>0)
{
buff[n] = 0;
- shp->shpath = strdup(buff);
+ shp->gd->shpath = strdup(buff);
}
#endif
else if((cp && (sh_type(cp)&SH_TYPE_SH)) || (argc>0 && strchr(cp= *argv,'/')))
{
if(*cp=='/')
- shp->shpath = strdup(cp);
+ shp->gd->shpath = strdup(cp);
else if(cp = nv_getval(PWDNOD))
{
int offset = staktell();
@@ -1174,7 +1419,7 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
stakputc('/');
stakputs(argv[0]);
pathcanon(stakptr(offset),PATH_DOTDOT);
- shp->shpath = strdup(stakptr(offset));
+ shp->gd->shpath = strdup(stakptr(offset));
stakseek(offset);
}
}
@@ -1190,8 +1435,10 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
#endif /* SHOPT_TIMEOUT */
/* initialize jobs table */
job_clear();
+ sh_onoption(SH_MULTILINE);
if(argc>0)
{
+ int dolv_index = -1;
/* check for restricted shell */
if(type&SH_TYPE_RESTRICTED)
sh_onoption(SH_RESTRICTED);
@@ -1204,7 +1451,7 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
/* check for invocation as bash */
if(type&SH_TYPE_BASH)
{
- shp->userinit = userinit = bash_init;
+ shp>userinit = userinit = bash_init;
sh_onoption(SH_BASH);
sh_onstate(SH_PREINIT);
(*userinit)(shp, 0);
@@ -1219,7 +1466,10 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
sh_done(shp,0);
}
opt_info.disc = 0;
- shp->st.dolv=argv+(argc-1)-shp->st.dolc;
+ dolv_index = (argc-1)-shp->st.dolc;
+ shp->st.dolv=argv+dolv_index;
+ shp->st.repl_index = dolv_index;
+ shp->st.repl_arg = argv[dolv_index];
shp->st.dolv[0] = argv[0];
if(shp->st.dolc < 1)
sh_onoption(SH_SFLAG);
@@ -1251,25 +1501,31 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
}
#endif /* _WINIX */
}
+ if(beenhere==1)
+ {
+ struct lconv* lc;
+ shp->decomma = (lc=localeconv()) && lc->decimal_point && *lc->decimal_point==',';
+ beenhere = 2;
+ }
}
#if SHOPT_PFSH
if (sh_isoption(SH_PFSH))
{
- struct passwd *pw = getpwuid(shp->userid);
+ struct passwd *pw = getpwuid(shp->gd->userid);
if(pw)
- shp->user = strdup(pw->pw_name);
+ shp->gd->user = strdup(pw->pw_name);
}
#endif
/* set[ug]id scripts require the -p flag */
- if(shp->userid!=shp->euserid || shp->groupid!=shp->egroupid)
+ if(shp->gd->userid!=shp->gd->euserid || shp->gd->groupid!=shp->gd->egroupid)
{
#ifdef SHOPT_P_SUID
/* require sh -p to run setuid and/or setgid */
- if(!sh_isoption(SH_PRIVILEGED) && shp->userid >= SHOPT_P_SUID)
+ if(!sh_isoption(SH_PRIVILEGED) && shp->gd->userid >= SHOPT_P_SUID)
{
- setuid(shp->euserid=shp->userid);
- setgid(shp->egroupid=shp->groupid);
+ setuid(shp->gd->euserid=shp->gd->userid);
+ setgid(shp->gd->egroupid=shp->gd->groupid);
}
else
#endif /* SHOPT_P_SUID */
@@ -1283,7 +1539,7 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
else
sh_offoption(SH_PRIVILEGED);
/* shname for $0 in profiles and . scripts */
- if(strmatch(argv[1],e_devfdNN))
+ if(sh_isdevfd(argv[1]))
shp->shname = strdup(argv[0]);
else
shp->shname = strdup(shp->st.dolv[0]);
@@ -1293,13 +1549,13 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
*/
error_info.id = strdup(shp->st.dolv[0]); /* error_info.id is $0 */
shp->jmpbuffer = (void*)&shp->checkbase;
- sh_pushcontext(&shp->checkbase,SH_JMPSCRIPT);
+ sh_pushcontext(shp,&shp->checkbase,SH_JMPSCRIPT);
shp->st.self = &shp->global;
shp->topscope = (Shscope_t*)shp->st.self;
sh_offstate(SH_INIT);
login_files[0] = (char*)e_profile;
login_files[1] = ".profile";
- shp->login_files = login_files;
+ shp->gd->login_files = login_files;
shp->bltindata.version = SH_VERSION;
shp->bltindata.shp = shp;
shp->bltindata.shrun = sh_run;
@@ -1329,6 +1585,9 @@ Shell_t *sh_init(register int argc,register char *argv[], Shinit_f userinit)
#endif
if(shp->userinit=userinit)
(*userinit)(shp, 0);
+ shp->exittrap = 0;
+ shp->errtrap = 0;
+ shp->end_fn = 0;
return(shp);
}
@@ -1342,16 +1601,21 @@ Shell_t *sh_getinterp(void)
*/
int sh_reinit(char *argv[])
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
Shopt_t opt;
Namval_t *np,*npnext;
Dt_t *dp;
+ struct adata
+ {
+ Shell_t *sh;
+ void *extra[2];
+ } data;
for(np=dtfirst(shp->fun_tree);np;np=npnext)
{
if((dp=shp->fun_tree)->walk)
dp = dp->walk;
npnext = (Namval_t*)dtnext(shp->fun_tree,np);
- if(np>= shp->bltin_cmds && np < &shp->bltin_cmds[nbltins])
+ if(np>= shgd->bltin_cmds && np < &shgd->bltin_cmds[nbltins])
continue;
if(is_abuiltin(np) && nv_isattr(np,NV_EXPORT))
continue;
@@ -1362,7 +1626,6 @@ int sh_reinit(char *argv[])
dtclose(shp->alias_tree);
shp->alias_tree = inittree(shp,shtab_aliases);
shp->last_root = shp->var_tree;
- shp->namespace = 0;
shp->inuse_bits = 0;
if(shp->userinit)
(*shp->userinit)(shp, 1);
@@ -1373,11 +1636,23 @@ int sh_reinit(char *argv[])
}
/* remove locals */
sh_onstate(SH_INIT);
- nv_scan(shp->var_tree,sh_envnolocal,(void*)0,NV_EXPORT,0);
- nv_scan(shp->var_tree,sh_envnolocal,(void*)0,NV_ARRAY,NV_ARRAY);
+ memset(&data,0,sizeof(data));
+ data.sh = shp;
+ nv_scan(shp->var_tree,sh_envnolocal,(void*)&data,NV_EXPORT,0);
+ nv_scan(shp->var_tree,sh_envnolocal,(void*)&data,NV_ARRAY,NV_ARRAY);
sh_offstate(SH_INIT);
memset(shp->st.trapcom,0,(shp->st.trapmax+1)*sizeof(char*));
memset((void*)&opt,0,sizeof(opt));
+#if SHOPT_NAMESPACE
+ if(shp->namespace)
+ {
+ dp=nv_dict(shp->namespace);
+ if(dp==shp->var_tree)
+ shp->var_tree = dtview(dp,0);
+ _nv_unset(shp->namespace,NV_RDONLY);
+ shp->namespace = 0;
+ }
+#endif /* SHOPT_NAMESPACE */
if(sh_isoption(SH_TRACKALL))
on_option(&opt,SH_TRACKALL);
if(sh_isoption(SH_EMACS))
@@ -1407,7 +1682,16 @@ int sh_reinit(char *argv[])
nv_onattr(SHLVL,NV_INTEGER|NV_EXPORT|NV_NOFREE);
}
*SHLVL->nvalue.ip +=1;
+ nv_offattr(SHLVL,NV_IMPORT);
shp->st.filename = strdup(shp->lastarg);
+ nv_delete((Namval_t*)0, (Dt_t*)0, 0);
+ job.exitval = 0;
+ shp->inpipe = shp->outpipe = 0;
+ job_clear();
+ job.in_critical = 0;
+ shp->exittrap = 0;
+ shp->errtrap = 0;
+ shp->end_fn = 0;
return(1);
}
@@ -1416,7 +1700,7 @@ int sh_reinit(char *argv[])
*/
Namfun_t *nv_cover(register Namval_t *np)
{
- if(np==IFSNOD || np==PATHNOD || np==SHELLNOD || np==FPATHNOD || np==CDPNOD || np==SECONDS || np==ENVNOD)
+ if(np==IFSNOD || np==PATHNOD || np==SHELLNOD || np==FPATHNOD || np==CDPNOD || np==SECONDS || np==ENVNOD || np==LINENO)
return(np->nvfun);
#ifdef _hdr_locale
if(np==LCALLNOD || np==LCTYPENOD || np==LCMSGNOD || np==LCCOLLNOD || np==LCNUMNOD || np==LANGNOD)
@@ -1509,7 +1793,7 @@ static void stat_init(Shell_t *shp)
Namval_t *np;
sp->numnodes = nstat;
sp->nodes = (char*)(sp+1);
- shp->stats = (int*)calloc(sizeof(int*),nstat);
+ shgd->stats = (int*)calloc(sizeof(int),nstat);
sp->sh = shp;
for(i=0; i < nstat; i++)
{
@@ -1518,7 +1802,7 @@ static void stat_init(Shell_t *shp)
np->nvname = (char*)shtab_stats[i].sh_name;
nv_onattr(np,NV_RDONLY|NV_MINIMAL|NV_NOFREE|NV_INTEGER);
nv_setsize(np,10);
- np->nvalue.ip = &shp->stats[i];
+ np->nvalue.ip = &shgd->stats[i];
}
sp->hdr.dsize = sizeof(struct Stats) + nstat*(sizeof(int)+NV_MINSZ);
sp->hdr.disc = &stat_disc;
@@ -1535,8 +1819,6 @@ static void stat_init(Shell_t *shp)
*/
static Init_t *nv_init(Shell_t *shp)
{
- Namval_t *np;
- register Init_t *ip;
double d=0;
ip = newof(0,Init_t,1,0);
if(!ip)
@@ -1547,7 +1829,6 @@ static Init_t *nv_init(Shell_t *shp)
shp->var_base = shp->var_tree = inittree(shp,shtab_variables);
SHLVL->nvalue.ip = &shlvl;
ip->IFS_init.hdr.disc = &IFS_disc;
- ip->IFS_init.hdr.nofree = 1;
ip->PATH_init.disc = &RESTRICTED_disc;
ip->PATH_init.nofree = 1;
ip->FPATH_init.disc = &RESTRICTED_disc;
@@ -1572,8 +1853,16 @@ static Init_t *nv_init(Shell_t *shp)
ip->SECONDS_init.hdr.nofree = 1;
ip->RAND_init.hdr.disc = &RAND_disc;
ip->RAND_init.hdr.nofree = 1;
+ ip->RAND_init.sh = shp;
ip->SH_MATCH_init.hdr.disc = &SH_MATCH_disc;
ip->SH_MATCH_init.hdr.nofree = 1;
+ ip->SH_MATH_init.disc = &SH_MATH_disc;
+ ip->SH_MATH_init.nofree = 1;
+#if SHOPT_COSHELL
+ ip->SH_JOBPOOL_init.disc = &SH_JOBPOOL_disc;
+ ip->SH_JOBPOOL_init.nofree = 1;
+ nv_stack(SH_JOBPOOL, &ip->SH_JOBPOOL_init);
+#endif /* SHOPT_COSHELL */
ip->SH_VERSION_init.disc = &SH_VERSION_disc;
ip->SH_VERSION_init.nofree = 1;
ip->LINENO_init.disc = &LINENO_disc;
@@ -1595,6 +1884,7 @@ static Init_t *nv_init(Shell_t *shp)
ip->LANG_init.nofree = 1;
#endif /* _hdr_locale */
nv_stack(IFSNOD, &ip->IFS_init.hdr);
+ ip->IFS_init.hdr.nofree = 1;
nv_stack(PATHNOD, &ip->PATH_init);
nv_stack(FPATHNOD, &ip->FPATH_init);
nv_stack(CDPNOD, &ip->CDPATH_init);
@@ -1609,12 +1899,12 @@ static Init_t *nv_init(Shell_t *shp)
nv_stack(L_ARGNOD, &ip->L_ARG_init);
nv_putval(SECONDS, (char*)&d, NV_DOUBLE);
nv_stack(RANDNOD, &ip->RAND_init.hdr);
- d = (shp->pid&RANDMASK);
+ d = (shp->gd->pid&RANDMASK);
nv_putval(RANDNOD, (char*)&d, NV_DOUBLE);
nv_stack(LINENO, &ip->LINENO_init);
+ SH_MATCHNOD->nvfun = &ip->SH_MATCH_init.hdr;
nv_putsub(SH_MATCHNOD,(char*)0,10);
- nv_onattr(SH_MATCHNOD,NV_RDONLY);
- nv_stack(SH_MATCHNOD, &ip->SH_MATCH_init.hdr);
+ nv_stack(SH_MATHNOD, &ip->SH_MATH_init);
nv_stack(SH_VERSIONNOD, &ip->SH_VERSION_init);
#ifdef _hdr_locale
nv_stack(LCTYPENOD, &ip->LC_TYPE_init);
@@ -1624,7 +1914,7 @@ static Init_t *nv_init(Shell_t *shp)
nv_stack(LCNUMNOD, &ip->LC_NUM_init);
nv_stack(LANGNOD, &ip->LANG_init);
#endif /* _hdr_locale */
- (PPIDNOD)->nvalue.lp = (&shp->ppid);
+ (PPIDNOD)->nvalue.lp = (&shp->gd->ppid);
(TMOUTNOD)->nvalue.lp = (&shp->st.tmout);
(MCHKNOD)->nvalue.lp = (&sh_mailchk);
(OPTINDNOD)->nvalue.lp = (&shp->st.optindex);
@@ -1634,22 +1924,19 @@ static Init_t *nv_init(Shell_t *shp)
shp->bltin_tree = inittree(shp,(const struct shtable2*)shtab_builtins);
shp->fun_tree = dtopen(&_Nvdisc,Dtoset);
dtview(shp->fun_tree,shp->bltin_tree);
-#if SHOPT_NAMESPACE
- if(np = nv_mount(DOTSHNOD, "global", shp->var_tree))
- nv_onattr(np,NV_RDONLY);
- np = nv_search("namespace",nv_dict(DOTSHNOD),NV_ADD);
- nv_putval(np,".sh.global",NV_RDONLY|NV_NOFREE);
- nv_stack(np, &NSPACE_init);
-#endif /* SHOPT_NAMESPACE */
- np = nv_mount(DOTSHNOD, "type", shp->typedict=dtopen(&_Nvdisc,Dtoset));
+ nv_mount(DOTSHNOD, "type", shp->typedict=dtopen(&_Nvdisc,Dtoset));
nv_adddisc(DOTSHNOD, shdiscnames, (Namval_t**)0);
+ DOTSHNOD->nvalue.cp = Empty;
+ nv_onattr(DOTSHNOD,NV_RDONLY);
SH_LINENO->nvalue.ip = &shp->st.lineno;
VERSIONNOD->nvalue.nrp = newof(0,struct Namref,1,0);
VERSIONNOD->nvalue.nrp->np = SH_VERSIONNOD;
VERSIONNOD->nvalue.nrp->root = nv_dict(DOTSHNOD);
VERSIONNOD->nvalue.nrp->table = DOTSHNOD;
- nv_onattr(VERSIONNOD,NV_RDONLY|NV_REF);
- stat_init(shp);
+ nv_onattr(VERSIONNOD,NV_REF);
+ math_init(shp);
+ if(!shgd->stats)
+ stat_init(shp);
return(ip);
}
@@ -1667,14 +1954,14 @@ static Dt_t *inittree(Shell_t *shp,const struct shtable2 *name_vals)
for(tp=name_vals;*tp->sh_name;tp++)
n++;
np = (Namval_t*)calloc(n,sizeof(Namval_t));
- if(!shp->bltin_nodes)
+ if(!shgd->bltin_nodes)
{
- shp->bltin_nodes = np;
- shp->bltin_nnodes = n;
+ shgd->bltin_nodes = np;
+ shgd->bltin_nnodes = n;
}
else if(name_vals==(const struct shtable2*)shtab_builtins)
{
- shp->bltin_cmds = np;
+ shgd->bltin_cmds = np;
nbltins = n;
}
base_treep = treep = dtopen(&_Nvdisc,Dtoset);
@@ -1690,15 +1977,15 @@ static Dt_t *inittree(Shell_t *shp,const struct shtable2 *name_vals)
}
np->nvenv = 0;
if(name_vals==(const struct shtable2*)shtab_builtins)
- np->nvalue.bfp = ((struct shtable3*)tp)->sh_value;
+ np->nvalue.bfp = (Nambfp_f)((struct shtable3*)tp)->sh_value;
else
{
if(name_vals == shtab_variables)
- np->nvfun = &sh.nvfun;
+ np->nvfun = &shp->nvfun;
np->nvalue.cp = (char*)tp->sh_value;
}
nv_setattr(np,tp->sh_number);
- if(nv_istable(np))
+ if(nv_isattr(np,NV_TABLE))
nv_mount(np,(const char*)0,dict=dtopen(&_Nvdisc,Dtoset));
if(nv_isattr(np,NV_INTEGER))
nv_setsize(np,10);
@@ -1718,79 +2005,121 @@ static Dt_t *inittree(Shell_t *shp,const struct shtable2 *name_vals)
static void env_init(Shell_t *shp)
{
- register char *cp;
- register Namval_t *np;
- register char **ep=environ;
- register char *next=0;
+ register char *cp;
+ register Namval_t *np,*mp;
+ register char **ep=environ;
+ char *dp,*next=0;
+ int nenv=0,k=0,size=0;
+ Namval_t *np0;
#ifdef _ENV_H
shp->env = env_open(environ,3);
env_delete(shp->env,"_");
#endif
- if(ep)
+ if(!ep)
+ goto skip;
+ while(*ep++)
+ nenv++;
+ np = newof(0,Namval_t,nenv,0);
+ for(np0=np,ep=environ;cp= *ep; ep++)
{
- while(cp= *ep++)
+ dp = strchr(cp,'=');
+ if(!dp)
+ continue;
+ *dp++ = 0;
+ if(mp = dtmatch(shp->var_base,cp))
{
- if(*cp=='A' && cp[1]=='_' && cp[2]=='_' && cp[3]=='z' && cp[4]=='=')
- next = cp+4;
- else if(np=nv_open(cp,shp->var_tree,(NV_EXPORT|NV_IDENT|NV_ASSIGN|NV_NOFAIL)))
- {
- nv_onattr(np,NV_IMPORT);
- np->nvenv = cp;
- nv_close(np);
- }
- else /* swap with front */
- {
- ep[-1] = environ[shp->nenv];
- environ[shp->nenv++] = cp;
- }
+ if(strcmp(cp,VERSIONNOD->nvname)==0)
+ {
+ dp[-1] = '=';
+ continue;
+ }
+ mp->nvenv = (char*)cp;
+ dp[-1] = '=';
}
- while(cp=next)
+ else if(*cp=='A' && cp[1]=='_' && cp[2]=='_' && cp[3]=='z' && cp[4]==0)
+ {
+ dp[-1] = '=';
+ next = cp+4;
+ continue;
+ }
+ else
+ {
+ k++;
+ mp = np++;
+ mp->nvname = cp;
+ size += strlen(cp);
+ }
+ nv_onattr(mp,NV_IMPORT);
+ if(mp->nvfun || nv_isattr(mp,NV_INTEGER))
+ nv_putval(mp,dp,0);
+ else
+ {
+ mp->nvalue.cp = dp;
+ nv_onattr(mp,NV_NOFREE);
+ }
+ nv_onattr(mp,NV_EXPORT|NV_IMPORT);
+ }
+ np = (Namval_t*)realloc((void*)np0,k*sizeof(Namval_t));
+ dp = (char*)malloc(size+k);
+ while(k-->0)
+ {
+ size = strlen(np->nvname);
+ memcpy(dp,np->nvname,size+1);
+ np->nvname[size] = '=';
+ np->nvenv = np->nvname;
+ np->nvname = dp;
+ dp += size+1;
+ dtinsert(shp->var_base,np++);
+ }
+ while(cp=next)
+ {
+ if(next = strchr(++cp,'='))
+ *next = 0;
+ np = nv_search(cp+2,shp->var_tree,NV_ADD);
+ if(np!=SHLVL && nv_isattr(np,NV_IMPORT|NV_EXPORT))
{
- if(next = strchr(++cp,'='))
- *next = 0;
- np = nv_search(cp+2,shp->var_tree,NV_ADD);
- if(np!=SHLVL && nv_isattr(np,NV_IMPORT|NV_EXPORT))
+ int flag = *(unsigned char*)cp-' ';
+ int size = *(unsigned char*)(cp+1)-' ';
+ if((flag&NV_INTEGER) && size==0)
{
- int flag = *(unsigned char*)cp-' ';
- int size = *(unsigned char*)(cp+1)-' ';
- if((flag&NV_INTEGER) && size==0)
+ /* check for floating*/
+ char *val = nv_getval(np);
+ strtol(val,&dp,10);
+ if(*dp=='.' || *dp=='e' || *dp=='E')
{
- /* check for floating*/
- char *ep,*val = nv_getval(np);
- strtol(val,&ep,10);
- if(*ep=='.' || *ep=='e' || *ep=='E')
+ char *lp;
+ flag |= NV_DOUBLE;
+ if(*dp=='.')
+ {
+ strtol(dp+1,&lp,10);
+ if(*lp)
+ dp = lp;
+ }
+ if(*dp && *dp!='.')
{
- char *lp;
- flag |= NV_DOUBLE;
- if(*ep=='.')
- {
- strtol(ep+1,&lp,10);
- if(*lp)
- ep = lp;
- }
- if(*ep && *ep!='.')
- {
- flag |= NV_EXPNOTE;
- size = ep-val;
- }
- else
- size = strlen(ep);
- size--;
+ flag |= NV_EXPNOTE;
+ size = dp-val;
}
+ else
+ size = strlen(dp);
+ size--;
}
- nv_newattr(np,flag|NV_IMPORT|NV_EXPORT,size);
}
- else
- cp += 2;
+ nv_newattr(np,flag|NV_IMPORT|NV_EXPORT,size);
+ if((flag&(NV_INTEGER|NV_UTOL|NV_LTOU))==(NV_UTOL|NV_LTOU))
+ nv_mapchar(np,(flag&NV_UTOL)?e_tolower:e_toupper);
}
+ else
+ cp += 2;
}
+skip:
#ifdef _ENV_H
env_delete(shp->env,e_envmarker);
#endif
if(nv_isnull(PWDNOD) || nv_isattr(PWDNOD,NV_TAGGED))
{
nv_offattr(PWDNOD,NV_TAGGED);
- path_pwd(0);
+ path_pwd(shp,0);
}
if((cp = nv_getval(SHELLNOD)) && (sh_type(cp)&SH_TYPE_RESTRICTED))
sh_onoption(SH_RESTRICTED); /* restricted shell */
@@ -1827,12 +2156,105 @@ unsigned long sh_offoption DISABLE (int opt)
return(sh_offoption(opt));
}
-void sh_sigcheck DISABLE (void)
+void sh_sigcheck DISABLE (Shell_t *shp)
{
- sh_sigcheck();
+ if(!shp)
+ shp = sh_getinterp();
+ sh_sigcheck(shp);
}
Dt_t* sh_bltin_tree DISABLE (void)
{
return(sh.bltin_tree);
}
+
+/*
+ * This code is for character mapped variables with wctrans()
+ */
+struct Mapchar
+{
+ Namfun_t hdr;
+ const char *name;
+ wctrans_t trans;
+ int lctype;
+};
+
+static void put_trans(register Namval_t* np,const char *val,int flags,Namfun_t *fp)
+{
+ struct Mapchar *mp = (struct Mapchar*)fp;
+ int c,offset = staktell(),off=offset;
+ if(val)
+ {
+ if(mp->lctype!=lctype)
+ {
+ mp->lctype = lctype;
+ mp->trans = wctrans(mp->name);
+ }
+ if(!mp->trans || (flags&NV_INTEGER))
+ goto skip;
+ while(c = mbchar(val))
+ {
+ c = towctrans(c,mp->trans);
+ stakseek(off+c);
+ stakseek(off);
+ c = mbconv(stakptr(off),c);
+ off += c;
+ stakseek(off);
+ }
+ stakputc(0);
+ val = stakptr(offset);
+ }
+ else
+ {
+ nv_putv(np,val,flags,fp);
+ nv_disc(np,fp,NV_POP);
+ if(!(fp->nofree&1))
+ free((void*)fp);
+ stakseek(offset);
+ return;
+ }
+skip:
+ nv_putv(np,val,flags,fp);
+ stakseek(offset);
+}
+
+static const Namdisc_t TRANS_disc = { sizeof(struct Mapchar), put_trans };
+
+Namfun_t *nv_mapchar(Namval_t *np,const char *name)
+{
+ wctrans_t trans = name?wctrans(name):0;
+ struct Mapchar *mp=0;
+ int n=0,low;
+ if(np)
+ mp = (struct Mapchar*)nv_hasdisc(np,&TRANS_disc);
+ if(!name)
+ return(mp?(Namfun_t*)mp->name:0);
+ if(!trans)
+ return(0);
+ if(!np)
+ return(((Namfun_t*)0)+1);
+ if((low=strcmp(name,e_tolower)) && strcmp(name,e_toupper))
+ n += strlen(name)+1;
+ if(mp)
+ {
+ if(strcmp(name,mp->name)==0)
+ return(&mp->hdr);
+ nv_disc(np,&mp->hdr,NV_POP);
+ if(!(mp->hdr.nofree&1))
+ free((void*)mp);
+ }
+ mp = newof(0,struct Mapchar,1,n);
+ mp->trans = trans;
+ mp->lctype = lctype;
+ if(low==0)
+ mp->name = e_tolower;
+ else if(n==0)
+ mp->name = e_toupper;
+ else
+ {
+ mp->name = (char*)(mp+1);
+ strcpy((char*)mp->name,name);
+ }
+ mp->hdr.disc = &TRANS_disc;
+ return(&mp->hdr);
+}
diff --git a/usr/src/lib/libshell/common/sh/io.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/io.c
index fdf72e2b86..08a75dec19 100644
--- a/usr/src/lib/libshell/common/sh/io.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/io.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -62,6 +62,14 @@
# define O_SERVICE O_NOCTTY
#endif
+#ifndef ERROR_PIPE
+#ifdef ECONNRESET
+#define ERROR_PIPE(e) ((e)==EPIPE||(e)==ECONNRESET||(e)==EIO)
+#else
+#define ERROR_PIPE(e) ((e)==EPIPE||(e)==EIO)
+#endif
+#endif
+
#define RW_ALL (S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR|S_IWGRP|S_IWOTH)
static void *timeout;
@@ -77,7 +85,7 @@ static int (*fdnotify)(int,int);
# if !defined(htonl) && !_lib_htonl
# define htonl(x) (x)
# endif
-# if _pipe_socketpair
+# if _pipe_socketpair && !_stream_peek
# ifndef SHUT_RD
# define SHUT_RD 0
# endif
@@ -199,12 +207,13 @@ freeaddrinfo(struct addrinfo* ap)
/*
* return <protocol>/<host>/<service> fd
+ * If called with flags==O_NONBLOCK return 1 if protocol is supported
*/
typedef int (*Inetintr_f)(struct addrinfo*, void*);
static int
-inetopen(const char* path, int server, Inetintr_f onintr, void* handle)
+inetopen(const char* path, int flags, Inetintr_f onintr, void* handle)
{
register char* s;
register char* t;
@@ -213,6 +222,7 @@ inetopen(const char* path, int server, Inetintr_f onintr, void* handle)
struct addrinfo hint;
struct addrinfo* addr;
struct addrinfo* p;
+ int server = !!(flags&O_SERVICE);
memset(&hint, 0, sizeof(hint));
hint.ai_family = PF_UNSPEC;
@@ -252,13 +262,15 @@ inetopen(const char* path, int server, Inetintr_f onintr, void* handle)
errno = ENOTDIR;
return -1;
}
+ if(flags==O_NONBLOCK)
+ return 1;
if (!(s = strdup(path)))
return -1;
if (t = strchr(s, '/'))
{
*t++ = 0;
if (streq(s, "local"))
- s = "localhost";
+ s = strdup("localhost");
fd = getaddrinfo(s, t, &hint, &addr);
}
else
@@ -292,7 +304,7 @@ inetopen(const char* path, int server, Inetintr_f onintr, void* handle)
if (errno != EINTR || !onintr)
break;
if ((*onintr)(addr, handle))
- return -1;
+ goto done;
}
}
done:
@@ -305,6 +317,7 @@ inetopen(const char* path, int server, Inetintr_f onintr, void* handle)
#else
#undef O_SERVICE
+#undef SHOPT_COSHELL
#endif
@@ -316,6 +329,12 @@ struct fdsave
char *tname; /* name used with >; */
};
+struct Iodisc
+{
+ Sfdisc_t disc;
+ Shell_t *sh;
+};
+
static int subexcept(Sfio_t*, int, void*, Sfdisc_t*);
static int eval_exceptf(Sfio_t*, int, void*, Sfdisc_t*);
static int slowexcept(Sfio_t*, int, void*, Sfdisc_t*);
@@ -324,7 +343,7 @@ static ssize_t piperead(Sfio_t*, void*, size_t, Sfdisc_t*);
static ssize_t slowread(Sfio_t*, void*, size_t, Sfdisc_t*);
static ssize_t subread(Sfio_t*, void*, size_t, Sfdisc_t*);
static ssize_t tee_write(Sfio_t*,const void*,size_t,Sfdisc_t*);
-static int io_prompt(Sfio_t*,int);
+static int io_prompt(Shell_t*,Sfio_t*,int);
static int io_heredoc(Shell_t*,register struct ionod*, const char*, int);
static void sftrack(Sfio_t*,int,void*);
static const Sfdisc_t eval_disc = { NULL, NULL, NULL, eval_exceptf, NULL};
@@ -380,29 +399,60 @@ static int matchf(void *handle, char *ptr, size_t size)
static struct fdsave *filemap;
static short filemapsize;
+#define PSEUDOFD (SHRT_MAX)
+
/* ======== input output and file copying ======== */
+int sh_iovalidfd(Shell_t *shp, int fd)
+{
+ Sfio_t **sftable = shp->sftable;
+ int max,n, **fdptrs = shp->fdptrs;
+ unsigned char *fdstatus = shp->fdstatus;
+ if(fd<0)
+ return(0);
+ if(fd < shp->gd->lim.open_max)
+ return(1);
+ max = strtol(astconf("OPEN_MAX",NiL,NiL),NiL,0);
+ if(fd >= max)
+ {
+ errno = EBADF;
+ return(0);
+ }
+ n = (fd+16)&~0xf;
+ if(n > max)
+ n = max;
+ max = shp->gd->lim.open_max;
+ shp->sftable = (Sfio_t**)calloc((n+1)*(sizeof(int*)+sizeof(Sfio_t*)+1),1);
+ if(max)
+ memcpy(shp->sftable,sftable,max*sizeof(Sfio_t*));
+ shp->fdptrs = (int**)(&shp->sftable[n]);
+ if(max)
+ memcpy(shp->fdptrs,fdptrs,max*sizeof(int*));
+ shp->fdstatus = (unsigned char*)(&shp->fdptrs[n]);
+ if(max)
+ memcpy(shp->fdstatus,fdstatus,max);
+ if(sftable)
+ free((void*)sftable);
+ shp->gd->lim.open_max = n;
+ return(1);
+}
+
+int sh_inuse(Shell_t *shp, int fd)
+{
+ return(fd < shp->gd->lim.open_max && shp->fdptrs[fd]);
+}
+
void sh_ioinit(Shell_t *shp)
{
- register int n;
filemapsize = 8;
filemap = (struct fdsave*)malloc(filemapsize*sizeof(struct fdsave));
-#if SHOPT_FASTPIPE
- n = shp->lim.open_max+2;
-#else
- n = shp->lim.open_max;
-#endif /* SHOPT_FASTPIPE */
- shp->fdstatus = (unsigned char*)malloc((unsigned)n);
- memset((char*)shp->fdstatus,0,n);
- shp->fdptrs = (int**)malloc(n*sizeof(int*));
- memset((char*)shp->fdptrs,0,n*sizeof(int*));
- shp->sftable = (Sfio_t**)malloc(n*sizeof(Sfio_t*));
- memset((char*)shp->sftable,0,n*sizeof(Sfio_t*));
+ sh_iovalidfd(shp,16);
shp->sftable[0] = sfstdin;
shp->sftable[1] = sfstdout;
shp->sftable[2] = sfstderr;
sfnotify(sftrack);
sh_iostream(shp,0);
+ sh_iostream(shp,1);
/* all write steams are in the same pool and share outbuff */
shp->outpool = sfopen(NIL(Sfio_t*),NIL(char*),"sw"); /* pool identifier */
shp->outbuff = (char*)malloc(IOBSIZE+4);
@@ -421,9 +471,8 @@ void sh_ioinit(Shell_t *shp)
*/
static int outexcept(register Sfio_t *iop,int type,void *data,Sfdisc_t *handle)
{
+ Shell_t *shp = ((struct Iodisc*)handle)->sh;
static int active = 0;
-
- NOT_USED(handle);
if(type==SF_DPOP || type==SF_FINAL)
free((void*)handle);
else if(type==SF_WRITE && (*(ssize_t*)data)<0 && sffileno(iop)!=2)
@@ -441,16 +490,16 @@ static int outexcept(register Sfio_t *iop,int type,void *data,Sfdisc_t *handle)
default:
if(!active)
{
- int mode = ((struct checkpt*)sh.jmplist)->mode;
+ int mode = ((struct checkpt*)shp->jmplist)->mode;
int save = errno;
active = 1;
- ((struct checkpt*)sh.jmplist)->mode = 0;
+ ((struct checkpt*)shp->jmplist)->mode = 0;
sfpurge(iop);
sfpool(iop,NIL(Sfio_t*),SF_WRITE);
errno = save;
errormsg(SH_DICT,ERROR_system(1),e_badwrite,sffileno(iop));
active = 0;
- ((struct checkpt*)sh.jmplist)->mode = mode;
+ ((struct checkpt*)shp->jmplist)->mode = mode;
sh_exit(1);
}
return(-1);
@@ -471,11 +520,7 @@ Sfio_t *sh_iostream(Shell_t *shp, register int fd)
register int status = sh_iocheckfd(shp,fd);
register int flags = SF_WRITE;
char *bp;
- Sfdisc_t *dp;
-#if SHOPT_FASTPIPE
- if(fd>=shp->lim.open_max)
- return(shp->sftable[fd]);
-#endif /* SHOPT_FASTPIPE */
+ struct Iodisc *dp;
if(status==IOCLOSE)
{
switch(fd)
@@ -502,34 +547,42 @@ Sfio_t *sh_iostream(Shell_t *shp, register int fd)
if(status&IODUP)
flags |= SF_SHARE|SF_PUBLIC;
if((iop = shp->sftable[fd]) && sffileno(iop)>=0)
+ {
+ if(status&IOTTY)
+ sfset(iop,SF_LINE|SF_WCWIDTH,1);
sfsetbuf(iop, bp, IOBSIZE);
+ }
else if(!(iop=sfnew((fd<=2?iop:0),bp,IOBSIZE,fd,flags)))
return(NIL(Sfio_t*));
- dp = newof(0,Sfdisc_t,1,0);
+ dp = newof(0,struct Iodisc,1,0);
+ dp->sh = shp;
if(status&IOREAD)
{
sfset(iop,SF_MALLOC,1);
if(!(status&IOWRITE))
sfset(iop,SF_IOCHECK,1);
- dp->exceptf = slowexcept;
+ dp->disc.exceptf = slowexcept;
if(status&IOTTY)
- dp->readf = slowread;
+ dp->disc.readf = slowread;
else if(status&IONOSEEK)
{
- dp->readf = piperead;
+ dp->disc.readf = piperead;
sfset(iop, SF_IOINTR,1);
}
else
- dp->readf = 0;
- dp->seekf = 0;
- dp->writef = 0;
+ dp->disc.readf = 0;
+ dp->disc.seekf = 0;
+ dp->disc.writef = 0;
}
else
{
- dp->exceptf = outexcept;
+ if((status&(IONOSEEK|IOTTY)) == IONOSEEK)
+ dp->disc.exceptf = pipeexcept;
+ else
+ dp->disc.exceptf = outexcept;
sfpool(iop,shp->outpool,SF_WRITE);
}
- sfdisc(iop,dp);
+ sfdisc(iop,&dp->disc);
shp->sftable[fd] = iop;
return(iop);
}
@@ -552,6 +605,10 @@ static void io_preserve(Shell_t* shp, register Sfio_t *sp, register int f2)
((struct checkpt*)shp->jmplist)->mode = SH_JMPERREXIT;
errormsg(SH_DICT,ERROR_system(1),e_toomany);
}
+
+ VALIDATE_FD(shp, fd);
+ VALIDATE_FD(shp, f2);
+
if(shp->fdptrs[fd]=shp->fdptrs[f2])
{
if(f2==job.fd)
@@ -577,11 +634,16 @@ static void io_preserve(Shell_t* shp, register Sfio_t *sp, register int f2)
*/
int sh_iorenumber(Shell_t *shp, register int f1,register int f2)
{
- register Sfio_t *sp = shp->sftable[f2];
+ register Sfio_t *sp;
+
+ VALIDATE_FD(shp, f1);
+ VALIDATE_FD(shp, f2);
+
+ sp = shp->sftable[f2];
if(f1!=f2)
{
/* see whether file descriptor is in use */
- if(sh_inuse(f2) || (f2>2 && sp))
+ if(sh_inuse(shp,f2) || (f2>2 && sp))
{
if(!(shp->inuse_bits&(1<<f2)))
io_preserve(shp,sp,f2);
@@ -608,8 +670,16 @@ int sh_iorenumber(Shell_t *shp, register int f1,register int f2)
}
if(sp)
shp->sftable[f1] = 0;
- sh_close(f1);
+ if(shp->fdstatus[f1]!=IOCLOSE)
+ sh_close(f1);
+ }
+ else if(sp)
+ {
+ sfsetfd(sp,f2);
+ if(f2<=2)
+ sfset(sp,SF_SHARE|SF_PUBLIC,1);
}
+ VALIDATE_FD(shp, f2);
return(f2);
}
@@ -618,24 +688,30 @@ int sh_iorenumber(Shell_t *shp, register int f1,register int f2)
*/
int sh_close(register int fd)
{
+ Shell_t *shp = sh_getinterp();
register Sfio_t *sp;
register int r = 0;
if(fd<0)
return(-1);
- if(!(sp=sh.sftable[fd]) || sfclose(sp) < 0)
+
+ VALIDATE_FD(shp, fd);
+
+ if(!(sp=shp->sftable[fd]) || sfclose(sp) < 0)
{
+ int err=errno;
if(fdnotify)
(*fdnotify)(fd,SH_FDCLOSE);
- r=close(fd);
+ while((r=close(fd)) < 0 && errno==EINTR)
+ errno = err;
}
if(fd>2)
- sh.sftable[fd] = 0;
- sh.fdstatus[fd] = IOCLOSE;
- if(sh.fdptrs[fd])
- *sh.fdptrs[fd] = -1;
- sh.fdptrs[fd] = 0;
+ shp->sftable[fd] = 0;
+ shp->fdstatus[fd] = IOCLOSE;
+ if(shp->fdptrs[fd])
+ *shp->fdptrs[fd] = -1;
+ shp->fdptrs[fd] = 0;
if(fd < 10)
- sh.inuse_bits &= ~(1<<fd);
+ shp->inuse_bits &= ~(1<<fd);
return(r);
}
@@ -653,7 +729,7 @@ onintr(struct addrinfo* addr, void* handle)
return -1;
}
if (sh->trapnote)
- sh_chktrap();
+ sh_chktrap(sh);
return 0;
}
@@ -664,7 +740,7 @@ onintr(struct addrinfo* addr, void* handle)
*/
int sh_open(register const char *path, int flags, ...)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register int fd = -1;
mode_t mode;
char *e;
@@ -673,6 +749,11 @@ int sh_open(register const char *path, int flags, ...)
mode = (flags & O_CREAT) ? va_arg(ap, int) : 0;
va_end(ap);
errno = 0;
+ if(path==0)
+ {
+ errno = EFAULT;
+ return(-1);
+ }
if(*path==0)
{
errno = ENOENT;
@@ -685,6 +766,8 @@ int sh_open(register const char *path, int flags, ...)
case 'f':
if (path[6]=='d' && path[7]=='/')
{
+ if(flags==O_NONBLOCK)
+ return(1);
fd = (int)strtol(path+8, &e, 10);
if (*e)
fd = -1;
@@ -711,11 +794,15 @@ int sh_open(register const char *path, int flags, ...)
#ifdef O_SERVICE
if (fd < 0)
{
- if ((fd = inetopen(path+5, !!(flags & O_SERVICE), onintr, &sh)) < 0 && errno != ENOTDIR)
+ if ((fd = inetopen(path+5, flags, onintr, shp)) < 0 && errno != ENOTDIR)
return -1;
+ if(flags==O_NONBLOCK)
+ return(fd>=0);
if (fd >= 0)
goto ok;
}
+ if(flags==O_NONBLOCK)
+ return(0);
#endif
}
if (fd >= 0)
@@ -755,7 +842,7 @@ int sh_open(register const char *path, int flags, ...)
}
#endif
while((fd = open(path, flags, mode)) < 0)
- if(errno!=EINTR || sh.trapnote)
+ if(errno!=EINTR || shp->trapnote)
return(-1);
}
ok:
@@ -766,7 +853,8 @@ int sh_open(register const char *path, int flags, ...)
mode = (IOREAD|IOWRITE);
else
mode = IOREAD;
- sh.fdstatus[fd] = mode;
+ VALIDATE_FD(shp, fd);
+ shp->fdstatus[fd] = mode;
return(fd);
}
@@ -787,13 +875,17 @@ int sh_chkopen(register const char *name)
*/
int sh_iomovefd(register int fdold)
{
+ Shell_t *shp = sh_getinterp();
register int fdnew;
+ VALIDATE_FD(shp, fdold);
if(fdold<0 || fdold>2)
return(fdold);
fdnew = sh_iomovefd(dup(fdold));
- sh.fdstatus[fdnew] = (sh.fdstatus[fdold]&~IOCLEX);
+ VALIDATE_FD(shp, fdold);
+ VALIDATE_FD(shp, fdnew);
+ shp->fdstatus[fdnew] = (shp->fdstatus[fdold]&~IOCLEX);
close(fdold);
- sh.fdstatus[fdold] = IOCLOSE;
+ shp->fdstatus[fdold] = IOCLOSE;
return(fdnew);
}
@@ -802,18 +894,100 @@ int sh_iomovefd(register int fdold)
*/
int sh_pipe(register int pv[])
{
+ Shell_t *shp = sh_getinterp();
int fd[2];
if(pipe(fd)<0 || (pv[0]=fd[0])<0 || (pv[1]=fd[1])<0)
errormsg(SH_DICT,ERROR_system(1),e_pipe);
pv[0] = sh_iomovefd(pv[0]);
pv[1] = sh_iomovefd(pv[1]);
- sh.fdstatus[pv[0]] = IONOSEEK|IOREAD;
- sh.fdstatus[pv[1]] = IONOSEEK|IOWRITE;
+ shp->fdstatus[pv[0]] = IONOSEEK|IOREAD;
+ shp->fdstatus[pv[1]] = IONOSEEK|IOWRITE;
sh_subsavefd(pv[0]);
sh_subsavefd(pv[1]);
return(0);
}
+#ifndef pipe
+ int sh_rpipe(register int pv[])
+ {
+ return sh_pipe(pv);
+ }
+#else
+# undef pipe
+ /* create a real pipe when pipe() is socketpair */
+ int sh_rpipe(register int pv[])
+ {
+ Shell_t *shp = sh_getinterp();
+ int fd[2];
+ if(pipe(fd)<0 || (pv[0]=fd[0])<0 || (pv[1]=fd[1])<0)
+ errormsg(SH_DICT,ERROR_system(1),e_pipe);
+ pv[0] = sh_iomovefd(pv[0]);
+ pv[1] = sh_iomovefd(pv[1]);
+ shp->fdstatus[pv[0]] = IONOSEEK|IOREAD;
+ shp->fdstatus[pv[1]] = IONOSEEK|IOWRITE;
+ sh_subsavefd(pv[0]);
+ sh_subsavefd(pv[1]);
+ return(0);
+ }
+#endif
+
+#if SHOPT_COSHELL
+ int sh_coaccept(Shell_t *shp,int *pv,int out)
+ {
+ int fd = accept(pv[0],(struct sockaddr*)0,(socklen_t*)0);
+ sh_close(pv[0]);
+ pv[0] = -1;
+ if(fd<0)
+ errormsg(SH_DICT,ERROR_system(1),e_pipe);
+ if((pv[out]=sh_fcntl(fd,F_DUPFD,10)) >=10)
+ sh_close(fd);
+ else
+ pv[out] = sh_iomovefd(fd);
+
+ VALIDATE_FD(shp, pv[out]);
+
+ if(fcntl(pv[out],F_SETFD,FD_CLOEXEC) >=0)
+ shp->fdstatus[pv[out]] |= IOCLEX;
+ shp->fdstatus[pv[out]] = (out?IOWRITE:IOREAD);
+ shp->fdstatus[pv[out]] |= IONOSEEK;
+ sh_subsavefd(pv[out]);
+#if defined(SHUT_RD) && defined(SHUT_WR)
+ shutdown(pv[out],out?SHUT_RD:SHUT_WR);
+#endif
+ return(0);
+ }
+
+ int sh_copipe(Shell_t *shp, int *pv, int out)
+ {
+ int r,port=20000;
+ struct sockaddr_in sin;
+ socklen_t slen;
+ if ((pv[out] = socket (AF_INET, SOCK_STREAM, 0)) < 0)
+ errormsg(SH_DICT,ERROR_system(1),e_pipe);
+ do
+ {
+ sin.sin_family = AF_INET;
+ sin.sin_port = htons(++port);
+ sin.sin_addr.s_addr = INADDR_ANY;
+ slen = sizeof (sin);
+ }
+ while ((r=bind (pv[out], (struct sockaddr *) &sin, slen)) == -1 && errno==EADDRINUSE);
+ if(r<0 || listen(pv[out],5) <0)
+ {
+ close(pv[out]);
+ errormsg(SH_DICT,ERROR_system(1),e_pipe);
+ }
+ fcntl(pv[out],F_SETFD,FD_CLOEXEC);
+
+ VALIDATE_FD(shp, pv[out]);
+
+ shp->fdstatus[pv[out]] |= IOCLEX;
+ pv[1-out] = -1;
+ pv[2] = port;
+ return(0);
+ }
+#endif /* SHOPT_COSHELL */
+
static int pat_seek(void *handle, const char *str, size_t sz)
{
char **bp = (char**)handle;
@@ -836,9 +1010,13 @@ static int pat_line(const regex_t* rp, const char *buff, register size_t n)
static int io_patseek(Shell_t *shp, regex_t *rp, Sfio_t* sp, int flags)
{
char *cp, *match;
- int r, fd=sffileno(sp), close_exec = shp->fdstatus[fd]&IOCLEX;
+ int r, fd, close_exec;
int was_share,s=(PIPE_BUF>SF_BUFSIZE?SF_BUFSIZE:PIPE_BUF);
size_t n,m;
+
+ fd = sffileno(sp);
+ VALIDATE_FD(shp, fd);
+ close_exec = shp->fdstatus[fd]&IOCLEX;
shp->fdstatus[sffileno(sp)] |= IOCLEX;
if(fd==0)
was_share = sfset(sp,SF_SHARE,1);
@@ -872,12 +1050,17 @@ static int io_patseek(Shell_t *shp, regex_t *rp, Sfio_t* sp, int flags)
static Sfoff_t file_offset(Shell_t *shp, int fn, char *fname)
{
- Sfio_t *sp = shp->sftable[fn];
+ Sfio_t *sp;
char *cp;
Sfoff_t off;
struct Eof endf;
Namval_t *mp = nv_open("EOF",shp->var_tree,0);
Namval_t *pp = nv_open("CUR",shp->var_tree,0);
+
+ VALIDATE_FD(shp, fn);
+
+ sp = shp->sftable[fn];
+
memset(&endf,0,sizeof(struct Eof));
endf.fd = fn;
endf.hdr.disc = &EOF_disc;
@@ -908,16 +1091,18 @@ void sh_pclose(register int pv[])
pv[0] = pv[1] = -1;
}
-static char *io_usename(char *name, int *perm, int mode)
+static char *io_usename(char *name, int *perm, int fno, int mode)
{
struct stat statb;
- char *tname, *sp, *ep;
- int fd,len,n=0;
+ char *tname, *sp, *ep, path[PATH_MAX+1];
+ int fd,r;
if(mode==0)
{
- if((fd = sh_open(name,O_RDONLY,0)) > 0)
+ if((fd = sh_open(name,O_RDONLY,0)) >= 0)
{
- if(fstat(fd,&statb) < 0)
+ r = fstat(fd,&statb);
+ close(fd);
+ if(r)
return(0);
if(!S_ISREG(statb.st_mode))
return(0);
@@ -926,24 +1111,35 @@ static char *io_usename(char *name, int *perm, int mode)
else if(fd < 0 && errno!=ENOENT)
return(0);
}
- tname = sp = (char*)stakalloc((len=strlen(name)) + 5);
- if(ep = strrchr(name,'/'))
+ while((fd=readlink(name, path, PATH_MAX)) >0)
+ {
+ name=path;
+ name[fd] = 0;
+ }
+ stakseek(1);
+ stakputs(name);
+ stakputc(0);
+ pathcanon(stakptr(1),PATH_PHYSICAL);
+ sp = ep = stakptr(1);
+ if(ep = strrchr(sp,'/'))
{
- memcpy(sp,name,n=++ep-name);
- len -=n;
- sp += n;
+ memmove(stakptr(0),sp,++ep-sp);
+ stakseek(ep-sp);
}
else
- ep = name;
- *sp++ = '.';
- memcpy(sp,ep,len);
- strcpy(sp+len,".tmp");
+ {
+ ep = sp;
+ stakseek(0);
+ }
+ stakputc('.');
+ sfprintf(stkstd,"%<#d_%d{;.tmp",getpid(),fno);
+ tname = stakfreeze(1);
switch(mode)
{
case 1:
rename(tname,name);
break;
- case 2:
+ default:
unlink(tname);
break;
}
@@ -970,16 +1166,19 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
char *tname=0, *after="", *trace = shp->st.trap[SH_DEBUGTRAP];
Namval_t *np=0;
int isstring = shp->subshell?(sfset(sfstdout,0,0)&SF_STRING):0;
+
if(flag==2)
clexec = 1;
if(iop)
- traceon = sh_trace(NIL(char**),0);
+ traceon = sh_trace(shp,NIL(char**),0);
for(;iop;iop=iop->ionxt)
{
iof=iop->iofile;
fn = (iof&IOUFD);
if(fn==1 && shp->subshell && !shp->subshare && (flag==2 || isstring))
sh_subfork();
+ if(shp->redir0 && fn==0 && !(iof&IOMOV))
+ shp->redir0 = 2;
io_op[0] = '0'+(iof&IOUFD);
if(iof&IOPUT)
{
@@ -1011,6 +1210,8 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
memset(ap, 0, ARGVAL);
if(iof&IOPUT)
ap->argflag = ARG_RAW;
+ else if(shp->subshell)
+ sh_subtmpfile(shp);
ap->argchn.ap = (struct argnod*)fname;
ap = sh_argprocsub(shp,ap);
fname = ap->argval;
@@ -1020,6 +1221,14 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
}
errno=0;
np = 0;
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ if(!(iof&(IODOC|IOLSEEK|IOMOV)))
+ sh_coaddfile(shp,fname);
+ continue;
+ }
+#endif /* SHOPT_COSHELL */
if(iop->iovname)
{
np = nv_open(iop->iovname,shp->var_tree,NV_NOASSIGN|NV_VARNAME);
@@ -1029,6 +1238,8 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
if((iof&IOLSEEK) || ((iof&IOMOV) && *fname=='-'))
fn = nv_getnum(np);
}
+ if (!VALIDATE_FD(shp, fn))
+ errormsg(SH_DICT,ERROR_system(1),e_file+4);
if(iof&IOLSEEK)
{
io_op[2] = '#';
@@ -1041,7 +1252,7 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
io_op[3] = '#';
goto traceit;
}
- if(*fname)
+ if(*fname || (iof&(IODOC|IOSTRG))==(IODOC|IOSTRG))
{
if(iof&IODOC)
{
@@ -1070,13 +1281,19 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
message = e_file;
goto fail;
}
- if(shp->subshell && dupfd==1 && (sfset(sfstdout,0,0)&SF_STRING))
+ VALIDATE_FD(shp, dupfd);
+ if(shp->subshell && dupfd==1)
{
- sh_subtmpfile(0);
+ if(sfset(sfstdout,0,0)&SF_STRING)
+ sh_subtmpfile(shp);
+ if(shp->comsub==1)
+ shp->subdup |= 1<<fn;
dupfd = sffileno(sfstdout);
}
else if(shp->sftable[dupfd])
sfsync(shp->sftable[dupfd]);
+ if(dupfd!=1 && fn < 10)
+ shp->subdup &= ~(1<<fn);
}
else if(fd=='-' && fname[1]==0)
{
@@ -1101,6 +1318,7 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
goto traceit;
if((fd=sh_fcntl(dupfd,F_DUPFD,3))<0)
goto fail;
+ VALIDATE_FD(shp, fd);
sh_iocheckfd(shp,dupfd);
shp->fdstatus[fd] = (shp->fdstatus[dupfd]&~IOCLEX);
if(toclose<0 && shp->fdstatus[fd]&IOREAD)
@@ -1143,7 +1361,8 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
{
io_op[2] = ';';
o_mode |= O_TRUNC;
- tname = io_usename(fname,&perm,0);
+ if(tname = io_usename(fname,&perm,fn,0))
+ o_mode |= O_EXCL;
}
else
{
@@ -1157,7 +1376,7 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
{
#if SHOPT_FS_3D
if(S_ISREG(sb.st_mode)&&
- (!shp->lim.fs3d || iview(&sb)==0))
+ (!shp->gd->lim.fs3d || iview(&sb)==0))
#else
if(S_ISREG(sb.st_mode))
#endif /* SHOPT_FS_3D */
@@ -1213,7 +1432,11 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
}
if(iof&IOLSEEK)
{
- Sfio_t *sp = shp->sftable[fn];
+ Sfio_t *sp;
+
+ VALIDATE_FD(shp, fn);
+
+ sp = shp->sftable[fn];
r = shp->fdstatus[fn];
if(!(r&(IOSEEK|IONOSEEK)))
r = sh_iocheckfd(shp,fn);
@@ -1277,7 +1500,7 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
}
if(!np)
{
- if(flag==0 || tname)
+ if(flag==0 || tname || (flag==1 && fn==1 && (shp->fdstatus[fn]&IONOSEEK) && shp->outpipepid && shp->outpipepid==getpid()))
{
if(fd==fn)
{
@@ -1294,7 +1517,8 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
}
if(fd<0)
{
- if(sh_inuse(fn) || (fn && fn==shp->infd))
+ VALIDATE_FD(shp, fn);
+ if(sh_inuse(shp,fn) || (fn && fn==shp->infd))
{
if(fn>9 || !(shp->inuse_bits&(1<<fn)))
io_preserve(shp,shp->sftable[fn],fn);
@@ -1313,11 +1537,15 @@ int sh_redirect(Shell_t *shp,struct ionod *iop, int flag)
{
if((fn=fcntl(fd,F_DUPFD,10)) < 0)
goto fail;
+ if (!VALIDATE_FD(shp, fn))
+ goto fail;
+ if(flag!=2 || shp->subshell)
+ sh_iosave(shp,fn,indx|0x10000,tname?fname:(trunc?Empty:0));
shp->fdstatus[fn] = shp->fdstatus[fd];
sh_close(fd);
fd = fn;
}
- nv_unset(np);
+ _nv_unset(np,0);
nv_onattr(np,NV_INT32);
v = fn;
nv_putval(np,(char*)&v, NV_INT32);
@@ -1350,8 +1578,9 @@ fail:
*/
static int io_heredoc(Shell_t *shp,register struct ionod *iop, const char *name, int traceon)
{
- register Sfio_t *infile = 0, *outfile;
+ register Sfio_t *infile = 0, *outfile, *tmp;
register int fd;
+ Sfoff_t off;
if(!(iop->iofile&IOSTRG) && (!shp->heredocs || iop->iosize==0))
return(sh_open(e_devnull,O_RDONLY));
/* create an unnamed temporary file */
@@ -1365,6 +1594,21 @@ static int io_heredoc(Shell_t *shp,register struct ionod *iop, const char *name,
}
else
{
+ /*
+ * the locking is only needed in case & blocks process
+ * here-docs so this can be eliminted in some cases
+ */
+ struct flock lock;
+ int fno = sffileno(shp->heredocs);
+ if(fno>=0)
+ {
+ memset((void*)&lock,0,sizeof(lock));
+ lock.l_type = F_WRLCK;
+ lock.l_whence = SEEK_SET;
+ fcntl(fno,F_SETLKW,&lock);
+ lock.l_type = F_UNLCK;
+ }
+ off = sftell(shp->heredocs);
infile = subopen(shp,shp->heredocs,iop->iooffset,iop->iosize);
if(traceon)
{
@@ -1373,13 +1617,26 @@ static int io_heredoc(Shell_t *shp,register struct ionod *iop, const char *name,
sfprintf(sfstderr," %c%s\n",fd,cp);
sfdisc(outfile,&tee_disc);
}
- if(iop->iofile&IOQUOTE)
+ tmp = outfile;
+ if(fno>=0 && !(iop->iofile&IOQUOTE))
+ tmp = sftmp(iop->iosize<IOBSIZE?iop->iosize:0);
+ if(fno>=0 || (iop->iofile&IOQUOTE))
{
/* This is a quoted here-document, not expansion */
- sfmove(infile,outfile,SF_UNBOUND,-1);
+ sfmove(infile,tmp,SF_UNBOUND,-1);
sfclose(infile);
+ if(sffileno(tmp)>0)
+ {
+ sfsetbuf(tmp,malloc(IOBSIZE+1),IOBSIZE);
+ sfset(tmp,SF_MALLOC,1);
+ }
+ sfseek(shp->heredocs,off,SEEK_SET);
+ if(fno>=0)
+ fcntl(fno,F_SETLK,&lock);
+ sfseek(tmp,(off_t)0,SEEK_SET);
+ infile = tmp;
}
- else
+ if(!(iop->iofile&IOQUOTE))
{
char *lastpath = shp->lastpath;
sh_machere(shp,infile,outfile,iop->ioname);
@@ -1418,13 +1675,9 @@ static ssize_t tee_write(Sfio_t *iop,const void *buff,size_t n,Sfdisc_t *unused)
*/
void sh_iosave(Shell_t *shp, register int origfd, int oldtop, char *name)
{
-/*@
- assume oldtop>=0 && oldtop<shp->lim.open_max;
-@*/
-
register int savefd;
- int flag = (oldtop&IOSUBSHELL);
- oldtop &= ~IOSUBSHELL;
+ int flag = (oldtop&(IOSUBSHELL|IOPICKFD));
+ oldtop &= ~(IOSUBSHELL|IOPICKFD);
/* see if already saved, only save once */
for(savefd=shp->topfd; --savefd>=oldtop; )
{
@@ -1442,15 +1695,11 @@ void sh_iosave(Shell_t *shp, register int origfd, int oldtop, char *name)
errormsg(SH_DICT,ERROR_exit(4),e_nospace);
if(moved = (char*)filemap - oldptr)
{
-#if SHOPT_FASTPIPE
- for(savefd=shp->lim.open_max+2; --savefd>=0; )
-#else
- for(savefd=shp->lim.open_max; --savefd>=0; )
-#endif /* SHOPT_FASTPIPE */
+ for(savefd=shp->gd->lim.open_max; --savefd>=0; )
{
cp = (char*)shp->fdptrs[savefd];
if(cp >= oldptr && cp < oldend)
- shp->fdptrs[savefd] = (int*)(oldptr+moved);
+ shp->fdptrs[savefd] = (int*)(cp+moved);
}
}
}
@@ -1462,6 +1711,9 @@ void sh_iosave(Shell_t *shp, register int origfd, int oldtop, char *name)
}
else
#endif /* SHOPT_DEVFD */
+ if(flag&IOPICKFD)
+ savefd = -1;
+ else
{
if((savefd = sh_fcntl(origfd, F_DUPFD, 10)) < 0 && errno!=EBADF)
{
@@ -1471,12 +1723,17 @@ void sh_iosave(Shell_t *shp, register int origfd, int oldtop, char *name)
}
}
filemap[shp->topfd].tname = name;
- filemap[shp->topfd].subshell = flag;
+ filemap[shp->topfd].subshell = (flag&IOSUBSHELL);
filemap[shp->topfd].orig_fd = origfd;
filemap[shp->topfd++].save_fd = savefd;
if(savefd >=0)
{
- register Sfio_t* sp = shp->sftable[origfd];
+ register Sfio_t* sp;
+
+ VALIDATE_FD(shp, origfd);
+ VALIDATE_FD(shp, savefd);
+
+ sp = shp->sftable[origfd];
/* make saved file close-on-exec */
sh_fcntl(savefd,F_SETFD,FD_CLOEXEC);
if(origfd==job.fd)
@@ -1509,6 +1766,7 @@ void sh_iounsave(Shell_t* shp)
filemap[newfd++] = filemap[fd];
else
{
+ VALIDATE_FD(shp, savefd);
shp->sftable[savefd] = 0;
sh_close(savefd);
}
@@ -1532,19 +1790,31 @@ void sh_iorestore(Shell_t *shp, int last, int jmpval)
{
if ((savefd = filemap[fd].save_fd) >= 0)
{
+ VALIDATE_FD(shp, savefd);
shp->sftable[savefd] = 0;
sh_close(savefd);
}
continue;
}
origfd = filemap[fd].orig_fd;
+ VALIDATE_FD(shp, origfd);
+ if(origfd<0)
+ {
+ /* this should never happen */
+ savefd = filemap[fd].save_fd;
+ VALIDATE_FD(shp, savefd);
+ shp->sftable[savefd] = 0;
+ sh_close(savefd);
+ return;
+ }
if(filemap[fd].tname == Empty && shp->exitval==0)
ftruncate(origfd,lseek(origfd,0,SEEK_CUR));
else if(filemap[fd].tname)
- io_usename(filemap[fd].tname,(int*)0,shp->exitval?2:1);
+ io_usename(filemap[fd].tname,(int*)0,origfd,shp->exitval?2:1);
sh_close(origfd);
if ((savefd = filemap[fd].save_fd) >= 0)
{
+ VALIDATE_FD(shp, savefd);
sh_fcntl(savefd, F_DUPFD, origfd);
if(savefd==job.fd)
job.fd=origfd;
@@ -1586,7 +1856,7 @@ void sh_iorestore(Shell_t *shp, int last, int jmpval)
*/
int sh_ioaccess(int fd,register int mode)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register int flags;
if(mode==X_OK)
return(-1);
@@ -1607,13 +1877,19 @@ int sh_ioaccess(int fd,register int mode)
*/
static int slowexcept(register Sfio_t *iop,int type,void *data,Sfdisc_t *handle)
{
+ Shell_t *shp = ((struct Iodisc*)handle)->sh;
register int n,fno;
NOT_USED(handle);
if(type==SF_DPOP || type==SF_FINAL)
free((void*)handle);
+ if(type==SF_WRITE && ERROR_PIPE(errno))
+ {
+ sfpurge(iop);
+ return(-1);
+ }
if(type!=SF_READ)
return(0);
- if((sh.trapnote&(SH_SIGSET|SH_SIGTRAP)) && errno!=EIO && errno!=ENXIO)
+ if((shp->trapnote&(SH_SIGSET|SH_SIGTRAP)) && errno!=EIO && errno!=ENXIO)
errno = EINTR;
fno = sffileno(iop);
if((n=sfvalue(iop))<=0)
@@ -1639,22 +1915,24 @@ static int slowexcept(register Sfio_t *iop,int type,void *data,Sfdisc_t *handle)
#endif /* O_NONBLOCK */
if(errno!=EINTR)
return(0);
+ else if(shp->bltinfun && (shp->trapnote&SH_SIGTRAP) && shp->lastsig)
+ return(-1);
n=1;
sh_onstate(SH_TTYWAIT);
}
else
n = 0;
- if(sh.bltinfun && sh.bltindata.sigset)
+ if(shp->bltinfun && shp->bltindata.sigset)
return(-1);
errno = 0;
- if(sh.trapnote&SH_SIGSET)
+ if(shp->trapnote&SH_SIGSET)
{
if(isatty(fno))
sfputc(sfstderr,'\n');
sh_exit(SH_EXITSIG);
}
- if(sh.trapnote&SH_SIGTRAP)
- sh_chktrap();
+ if(shp->trapnote&SH_SIGTRAP)
+ sh_chktrap(shp);
return(n);
}
@@ -1663,43 +1941,43 @@ static int slowexcept(register Sfio_t *iop,int type,void *data,Sfdisc_t *handle)
*/
static void time_grace(void *handle)
{
- NOT_USED(handle);
+ Shell_t *shp = (Shell_t*)handle;
timeout = 0;
if(sh_isstate(SH_GRACE))
{
sh_offstate(SH_GRACE);
if(!sh_isstate(SH_INTERACTIVE))
return;
- ((struct checkpt*)sh.jmplist)->mode = SH_JMPEXIT;
+ ((struct checkpt*)shp->jmplist)->mode = SH_JMPEXIT;
errormsg(SH_DICT,2,e_timeout);
- sh.trapnote |= SH_SIGSET;
+ shp->trapnote |= SH_SIGSET;
return;
}
errormsg(SH_DICT,0,e_timewarn);
sh_onstate(SH_GRACE);
sigrelease(SIGALRM);
- sh.trapnote |= SH_SIGTRAP;
+ shp->trapnote |= SH_SIGTRAP;
}
static ssize_t piperead(Sfio_t *iop,void *buff,register size_t size,Sfdisc_t *handle)
{
+ Shell_t *shp = ((struct Iodisc*)handle)->sh;
int fd = sffileno(iop);
- NOT_USED(handle);
if(job.waitsafe && job.savesig)
{
job_lock();
job_unlock();
}
- if(sh.trapnote)
+ if(shp->trapnote)
{
errno = EINTR;
return(-1);
}
- if(sh_isstate(SH_INTERACTIVE) && io_prompt(iop,sh.nextprompt)<0 && errno==EIO)
+ if(sh_isstate(SH_INTERACTIVE) && sffileno(iop)==0 && io_prompt(shp,iop,shp->nextprompt)<0 && errno==EIO)
return(0);
sh_onstate(SH_TTYWAIT);
- if(!(sh.fdstatus[sffileno(iop)]&IOCLEX) && (sfset(iop,0,0)&SF_SHARE))
- size = ed_read(sh.ed_context, fd, (char*)buff, size,0);
+ if(!(shp->fdstatus[fd]&IOCLEX) && (sfset(iop,0,0)&SF_SHARE))
+ size = ed_read(shgd->ed_context, fd, (char*)buff, size,0);
else
size = sfrd(iop,buff,size,handle);
sh_offstate(SH_TTYWAIT);
@@ -1711,12 +1989,12 @@ static ssize_t piperead(Sfio_t *iop,void *buff,register size_t size,Sfdisc_t *ha
*/
static ssize_t slowread(Sfio_t *iop,void *buff,register size_t size,Sfdisc_t *handle)
{
+ Shell_t *shp = ((struct Iodisc*)handle)->sh;
int (*readf)(void*, int, char*, int, int);
int reedit=0, rsize;
#if SHOPT_HISTEXPAND
char *xp=0;
#endif
- NOT_USED(handle);
# if SHOPT_ESH
if(sh_isoption(SH_EMACS) || sh_isoption(SH_GMACS))
readf = ed_emacsread;
@@ -1732,23 +2010,23 @@ static ssize_t slowread(Sfio_t *iop,void *buff,register size_t size,Sfdisc_t *ha
else
# endif /* SHOPT_VSH */
readf = ed_read;
- if(sh.trapnote)
+ if(shp->trapnote)
{
errno = EINTR;
return(-1);
}
while(1)
{
- if(io_prompt(iop,sh.nextprompt)<0 && errno==EIO)
+ if(io_prompt(shp,iop,shp->nextprompt)<0 && errno==EIO)
return(0);
- if(sh.timeout)
- timeout = (void*)sh_timeradd(sh_isstate(SH_GRACE)?1000L*TGRACE:1000L*sh.timeout,0,time_grace,NIL(void*));
- rsize = (*readf)(sh.ed_context, sffileno(iop), (char*)buff, size, reedit);
+ if(shp->timeout)
+ timeout = (void*)sh_timeradd(sh_isstate(SH_GRACE)?1000L*TGRACE:1000L*shp->timeout,0,time_grace,shp);
+ rsize = (*readf)(shgd->ed_context, sffileno(iop), (char*)buff, size, reedit);
if(timeout)
timerdel(timeout);
timeout=0;
#if SHOPT_HISTEXPAND
- if(rsize && *(char*)buff != '\n' && sh.nextprompt==1 && sh_isoption(SH_HISTEXPAND))
+ if(rsize && *(char*)buff != '\n' && shp->nextprompt==1 && sh_isoption(SH_HISTEXPAND))
{
int r;
((char*)buff)[rsize] = '\0';
@@ -1794,13 +2072,16 @@ static ssize_t slowread(Sfio_t *iop,void *buff,register size_t size,Sfdisc_t *ha
int sh_iocheckfd(Shell_t *shp, register int fd)
{
register int flags, n;
- if((n=sh.fdstatus[fd])&IOCLOSE)
+
+ VALIDATE_FD(shp, fd);
+
+ if((n=shp->fdstatus[fd])&IOCLOSE)
return(n);
if(!(n&(IOREAD|IOWRITE)))
{
#ifdef F_GETFL
if((flags=fcntl(fd,F_GETFL,0)) < 0)
- return(sh.fdstatus[fd]=IOCLOSE);
+ return(shp->fdstatus[fd]=IOCLOSE);
if((flags&O_ACCMODE)!=O_WRONLY)
n |= IOREAD;
if((flags&O_ACCMODE)!=O_RDONLY)
@@ -1808,7 +2089,7 @@ int sh_iocheckfd(Shell_t *shp, register int fd)
#else
struct stat statb;
if((flags = fstat(fd,&statb))< 0)
- return(sh.fdstatus[fd]=IOCLOSE);
+ return(shp->fdstatus[fd]=IOCLOSE);
n |= (IOREAD|IOWRITE);
if(read(fd,"",0) < 0)
n &= ~IOREAD;
@@ -1832,7 +2113,15 @@ int sh_iocheckfd(Shell_t *shp, register int fd)
n |= IONOSEEK;
#ifdef S_ISSOCK
if((fstat(fd,&statb)>=0) && S_ISSOCK(statb.st_mode))
+ {
n |= IOREAD|IOWRITE;
+# if _socketpair_shutdown_mode
+ if(!(statb.st_mode&S_IRUSR))
+ n &= ~IOREAD;
+ else if(!(statb.st_mode&S_IWUSR))
+ n &= ~IOWRITE;
+# endif
+ }
#endif /* S_ISSOCK */
}
else if((fstat(fd,&statb)>=0) && (
@@ -1848,7 +2137,11 @@ int sh_iocheckfd(Shell_t *shp, register int fd)
else
n |= IOSEEK;
}
- sh.fdstatus[fd] = n;
+ if(fd==0)
+ n &= ~IOWRITE;
+ else if(fd==1)
+ n &= ~IOREAD;
+ shp->fdstatus[fd] = n;
return(n);
}
@@ -1856,9 +2149,8 @@ int sh_iocheckfd(Shell_t *shp, register int fd)
* Display prompt PS<flag> on standard error
*/
-static int io_prompt(Sfio_t *iop,register int flag)
+static int io_prompt(Shell_t *shp,Sfio_t *iop,register int flag)
{
- Shell_t *shp = &sh;
register char *cp;
char buff[1];
char *endprompt;
@@ -1871,8 +2163,8 @@ static int io_prompt(Sfio_t *iop,register int flag)
if(flag==0)
return(sfsync(sfstderr));
sfflags = sfset(sfstderr,SF_SHARE|SF_PUBLIC|SF_READ,0);
- if(!(sh.prompt=(char*)sfreserve(sfstderr,0,0)))
- sh.prompt = "";
+ if(!(shp->prompt=(char*)sfreserve(sfstderr,0,0)))
+ shp->prompt = "";
switch(flag)
{
case 1:
@@ -1899,7 +2191,7 @@ static int io_prompt(Sfio_t *iop,register int flag)
/* print out line number if not !! */
if(c!= HIST_CHAR)
{
- sfprintf(sfstderr,"%d", sh.hist_ptr?(int)sh.hist_ptr->histind:++cmdno);
+ sfprintf(sfstderr,"%d", shp->gd->hist_ptr?(int)shp->gd->hist_ptr->histind:++cmdno);
}
if(c==0)
goto done;
@@ -1920,7 +2212,7 @@ static int io_prompt(Sfio_t *iop,register int flag)
if(cp)
sfputr(sfstderr,cp,-1);
done:
- if(*sh.prompt && (endprompt=(char*)sfreserve(sfstderr,0,0)))
+ if(*shp->prompt && (endprompt=(char*)sfreserve(sfstderr,0,0)))
*endprompt = 0;
sfset(sfstderr,sfflags&SF_READ|SF_SHARE|SF_PUBLIC,1);
return(sfsync(sfstderr));
@@ -1932,11 +2224,13 @@ done:
*/
static int pipeexcept(Sfio_t* iop, int mode, void *data, Sfdisc_t* handle)
{
- NOT_USED(iop);
if(mode==SF_DPOP || mode==SF_FINAL)
free((void*)handle);
- else if(mode==SF_WRITE && errno==EINTR && sh.lastsig==SIGPIPE)
+ else if(mode==SF_WRITE && ERROR_PIPE(errno))
+ {
+ sfpurge(iop);
return(-1);
+ }
return(0);
}
@@ -1945,7 +2239,7 @@ static int pipeexcept(Sfio_t* iop, int mode, void *data, Sfdisc_t* handle)
*/
static void sftrack(Sfio_t* sp, int flag, void* data)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register int fd = sffileno(sp);
register struct checkpt *pp;
register int mode;
@@ -1972,12 +2266,12 @@ static void sftrack(Sfio_t* sp, int flag, void* data)
return;
}
#endif
- if((unsigned)fd >= shp->lim.open_max)
+ if(fd<0 || fd==PSEUDOFD || !VALIDATE_FD(shp, fd))
return;
if(sh_isstate(SH_NOTRACK))
return;
mode = sfset(sp,0,0);
- if(sp==shp->heredocs && fd < 10 && flag==SF_NEW)
+ if(sp==shp->heredocs && fd < 10 && flag==SF_SETFD)
{
fd = sfsetfd(sp,10);
fcntl(fd,F_SETFD,FD_CLOEXEC);
@@ -2120,7 +2414,7 @@ static Sfio_t *subopen(Shell_t *shp,Sfio_t* sp, off_t offset, long size)
disp->oldsp = sp;
disp->offset = offset;
disp->size = disp->left = size;
- sp = sfnew(NIL(Sfio_t*),(char*)(disp+1),IOBSIZE,shp->lim.open_max,SF_READ);
+ sp = sfnew(NIL(Sfio_t*),(char*)(disp+1),IOBSIZE,PSEUDOFD,SF_READ);
sfdisc(sp,&disp->disc);
return(sp);
}
@@ -2131,13 +2425,18 @@ static Sfio_t *subopen(Shell_t *shp,Sfio_t* sp, off_t offset, long size)
static ssize_t subread(Sfio_t* sp,void* buff,register size_t size,Sfdisc_t* handle)
{
register struct subfile *disp = (struct subfile*)handle;
+ ssize_t n;
NOT_USED(sp);
+ sfseek(disp->oldsp,disp->offset,SEEK_SET);
if(disp->left == 0)
return(0);
if(size > disp->left)
size = disp->left;
disp->left -= size;
- return(sfread(disp->oldsp,buff,size));
+ n = sfread(disp->oldsp,buff,size);
+ if(size>0)
+ disp->offset += size;
+ return(n);
}
/*
@@ -2149,6 +2448,7 @@ static int subexcept(Sfio_t* sp,register int mode, void *data, Sfdisc_t* handle)
if(mode==SF_CLOSING)
{
sfdisc(sp,SF_POPDISC);
+ sfsetfd(sp,-1);
return(0);
}
else if(disp && (mode==SF_DPOP || mode==SF_FINAL))
@@ -2175,7 +2475,7 @@ static int subexcept(Sfio_t* sp,register int mode, void *data, Sfdisc_t* handle)
*/
void sh_menu(Sfio_t *outfile,int argn,char *argv[])
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register int i,j;
register char **arg;
int nrow, ncol=1, ndigits=1;
@@ -2211,7 +2511,7 @@ skip:
fldsize = (wsize/ncol)-(ndigits+LBLSIZ);
for(i=0;i<nrow;i++)
{
- if(sh.trapnote&SH_SIGSET)
+ if(shp->trapnote&SH_SIGSET)
return;
j = i;
while(1)
@@ -2233,8 +2533,11 @@ skip:
*/
ssize_t sh_read(register int fd, void* buff, size_t n)
{
+ Shell_t *shp = sh_getinterp();
register Sfio_t *sp;
- if(sp=sh.sftable[fd])
+
+ VALIDATE_FD(shp, fd);
+ if(sp=shp->sftable[fd])
return(sfread(sp,buff,n));
else
return(read(fd,buff,n));
@@ -2246,8 +2549,11 @@ ssize_t sh_read(register int fd, void* buff, size_t n)
*/
ssize_t sh_write(register int fd, const void* buff, size_t n)
{
+ Shell_t *shp = sh_getinterp();
register Sfio_t *sp;
- if(sp=sh.sftable[fd])
+
+ VALIDATE_FD(shp, fd);
+ if(sp=shp->sftable[fd])
return(sfwrite(sp,buff,n));
else
return(write(fd,buff,n));
@@ -2259,8 +2565,11 @@ ssize_t sh_write(register int fd, const void* buff, size_t n)
*/
off_t sh_seek(register int fd, off_t offset, int whence)
{
+ Shell_t *shp = sh_getinterp();
register Sfio_t *sp;
- if((sp=sh.sftable[fd]) && (sfset(sp,0,0)&(SF_READ|SF_WRITE)))
+
+ VALIDATE_FD(shp, fd);
+ if((sp=shp->sftable[fd]) && (sfset(sp,0,0)&(SF_READ|SF_WRITE)))
return(sfseek(sp,offset,whence));
else
return(lseek(fd,offset,whence));
@@ -2269,12 +2578,16 @@ off_t sh_seek(register int fd, off_t offset, int whence)
#undef dup
int sh_dup(register int old)
{
+ Shell_t *shp = sh_getinterp();
register int fd = dup(old);
+
+ VALIDATE_FD(shp, old);
+ VALIDATE_FD(shp, fd);
if(fd>=0)
{
- if(sh.fdstatus[old] == IOCLOSE)
- sh.fdstatus[old] = 0;
- sh.fdstatus[fd] = (sh.fdstatus[old]&~IOCLEX);
+ if(shp->fdstatus[old] == IOCLOSE)
+ shp->fdstatus[old] = 0;
+ shp->fdstatus[fd] = (shp->fdstatus[old]&~IOCLEX);
if(fdnotify)
(*fdnotify)(old,fd);
}
@@ -2284,28 +2597,33 @@ int sh_dup(register int old)
#undef fcntl
int sh_fcntl(register int fd, int op, ...)
{
+ Shell_t *shp = sh_getinterp();
int newfd, arg;
va_list ap;
va_start(ap, op);
arg = va_arg(ap, int) ;
va_end(ap);
newfd = fcntl(fd,op,arg);
+
+ VALIDATE_FD(shp, fd);
+ VALIDATE_FD(shp, newfd);
+
if(newfd>=0) switch(op)
{
case F_DUPFD:
- if(sh.fdstatus[fd] == IOCLOSE)
- sh.fdstatus[fd] = 0;
- sh.fdstatus[newfd] = (sh.fdstatus[fd]&~IOCLEX);
+ if(shp->fdstatus[fd] == IOCLOSE)
+ shp->fdstatus[fd] = 0;
+ shp->fdstatus[newfd] = (shp->fdstatus[fd]&~IOCLEX);
if(fdnotify)
(*fdnotify)(fd,newfd);
break;
case F_SETFD:
- if(sh.fdstatus[fd] == IOCLOSE)
- sh.fdstatus[fd] = 0;
+ if(shp->fdstatus[fd] == IOCLOSE)
+ shp->fdstatus[fd] = 0;
if(arg&FD_CLOEXEC)
- sh.fdstatus[fd] |= IOCLEX;
+ shp->fdstatus[fd] |= IOCLEX;
else
- sh.fdstatus[fd] &= ~IOCLEX;
+ shp->fdstatus[fd] &= ~IOCLEX;
}
return(newfd);
}
@@ -2313,7 +2631,8 @@ int sh_fcntl(register int fd, int op, ...)
#undef umask
mode_t sh_umask(mode_t m)
{
- sh.mask = m;
+ Shell_t *shp = sh_getinterp();
+ shp->mask = m;
return(umask(m));
}
@@ -2326,7 +2645,7 @@ mode_t sh_umask(mode_t m)
Sfio_t *sh_iogetiop(int fd, int mode)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
int n;
Sfio_t *iop=0;
if(mode!=SF_READ && mode!=SF_WRITE)
@@ -2339,7 +2658,7 @@ Sfio_t *sh_iogetiop(int fd, int mode)
case SH_IOHISTFILE:
if(!sh_histinit((void*)shp))
return(iop);
- fd = sffileno(shp->hist_ptr->histfp);
+ fd = sffileno(shp->gd->hist_ptr->histfp);
break;
case SH_IOCOPROCESS:
if(mode==SF_WRITE)
@@ -2348,7 +2667,7 @@ Sfio_t *sh_iogetiop(int fd, int mode)
fd = shp->cpipe[0];
break;
default:
- if(fd<0 || fd >= shp->lim.open_max)
+ if(fd<0 || !sh_iovalidfd(shp,fd))
fd = -1;
}
if(fd<0)
@@ -2362,6 +2681,7 @@ Sfio_t *sh_iogetiop(int fd, int mode)
return(iop);
if(mode==SF_READ && !(n&IOREAD))
return(iop);
+ VALIDATE_FD(shp, fd);
if(!(iop = shp->sftable[fd]))
iop=sh_iostream(shp,fd);
return(iop);
@@ -2379,9 +2699,12 @@ Notify_f sh_fdnotify(Notify_f notify)
Sfio_t *sh_fd2sfio(int fd)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register int status;
- Sfio_t *sp = sh.sftable[fd];
+ Sfio_t *sp;
+
+ VALIDATE_FD(shp, fd);
+ sp = shp->sftable[fd];
if(!sp && (status = sh_iocheckfd(shp,fd))!=IOCLOSE)
{
register int flags=0;
@@ -2390,23 +2713,72 @@ Sfio_t *sh_fd2sfio(int fd)
if(status&IOWRITE)
flags |= SF_WRITE;
sp = sfnew(NULL, NULL, -1, fd,flags);
- sh.sftable[fd] = sp;
+ shp->sftable[fd] = sp;
}
return(sp);
}
Sfio_t *sh_pathopen(const char *cp)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
int n;
#ifdef PATH_BFPATH
- if((n=path_open(cp,path_get(cp))) < 0)
- n = path_open(cp,(Pathcomp_t*)0);
+ if((n=path_open(shp,cp,path_get(shp,cp))) < 0)
+ n = path_open(shp,cp,(Pathcomp_t*)0);
#else
- if((n=path_open(cp,path_get(cp))) < 0)
- n = path_open(cp,"");
+ if((n=path_open(shp,cp,path_get(cp))) < 0)
+ n = path_open(shp,cp,"");
#endif
if(n < 0)
errormsg(SH_DICT,ERROR_system(1),e_open,cp);
return(sh_iostream(shp,n));
}
+
+int sh_isdevfd(register const char *fd)
+{
+ if(!fd || memcmp(fd,"/dev/fd/",8) || fd[8]==0)
+ return(0);
+ for ( fd=&fd[8] ; *fd != '\0' ; fd++ )
+ {
+ if (*fd < '0' || *fd > '9')
+ return(0);
+ }
+ return(1);
+}
+
+#undef fchdir
+int sh_fchdir(int fd)
+{
+ int r,err=errno;
+ while((r=fchdir(fd))<0 && errno==EINTR)
+ errno = err;
+ return(r);
+}
+
+#undef chdir
+int sh_chdir(const char* dir)
+{
+ int r,err=errno;
+ while((r=chdir(dir))<0 && errno==EINTR)
+ errno = err;
+ return(r);
+}
+
+// Return the lowest numbered fd that is equal to or greater than the requested
+// `min_fd` and which is not currently in use.
+int sh_get_unused_fd(Shell_t* shp, int min_fd) {
+ int fd;
+
+ while (1) {
+ if (fcntl(min_fd, F_GETFD) == -1) {
+ for(fd = 0; fd < shp->topfd; fd++) {
+ if (filemap[fd].save_fd == min_fd || filemap[fd].orig_fd == min_fd) break;
+ }
+ if (fd == shp->topfd) break;
+ }
+ min_fd++;
+ }
+
+ return min_fd;
+}
+
diff --git a/usr/src/lib/libshell/common/sh/jobs.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/jobs.c
index 46d4a21b9f..981640c79a 100644
--- a/usr/src/lib/libshell/common/sh/jobs.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/jobs.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -58,11 +58,27 @@ struct jobsave
struct jobsave *next;
pid_t pid;
unsigned short exitval;
+ unsigned short env;
};
static struct jobsave *job_savelist;
static int njob_savelist;
static struct process *pwfg;
+static int jobfork;
+
+pid_t pid_fromstring(char *str)
+{
+ pid_t pid;
+ char *last;
+ errno = 0;
+ if(sizeof(pid)==sizeof(Sflong_t))
+ pid = (pid_t)strtoll(str, &last, 10);
+ else
+ pid = (pid_t)strtol(str, &last, 10);
+ if(errno==ERANGE || *last)
+ errormsg(SH_DICT,ERROR_exit(1),"%s: invalid process id",str);
+ return(pid);
+}
static void init_savelist(void)
{
@@ -80,6 +96,7 @@ struct back_save
{
int count;
struct jobsave *list;
+ struct back_save *prev;
};
#define BYTE(n) (((n)+CHAR_BIT-1)/CHAR_BIT)
@@ -117,7 +134,7 @@ struct back_save
#define P_BG 01000
#endif /* SHOPT_BGX */
-static int job_chksave(pid_t);
+static int job_chksave(pid_t,long);
static struct process *job_bypid(pid_t);
static struct process *job_byjid(int);
static char *job_sigmsg(int);
@@ -217,9 +234,9 @@ void job_chldtrap(Shell_t *shp, const char *trap, int unpost)
static struct jobsave *jobsave_create(pid_t pid)
{
register struct jobsave *jp = job_savelist;
- job_chksave(pid);
- if(++bck.count > sh.lim.child_max)
- job_chksave(0);
+ job_chksave(pid,-1);
+ if(++bck.count > shgd->lim.child_max)
+ job_chksave(0,-1);
if(jp)
{
njob_savelist--;
@@ -237,20 +254,109 @@ static struct jobsave *jobsave_create(pid_t pid)
return(jp);
}
+#if SHOPT_COSHELL
+ pid_t sh_copid(struct cosh *csp)
+ {
+ return(COPID_BIT|(csp->id<<16)|csp->cojob->id);
+ }
+
+
+ char *sh_pid2str(Shell_t *shp,pid_t pid)
+ {
+ struct cosh *csp=0;
+ if(pid&COPID_BIT)
+ {
+ int id = (pid>>16) &0x3f;
+ for(csp=job.colist; csp; csp = csp->next)
+ {
+ if(csp->id == id)
+ break;
+ }
+ }
+ if(csp)
+ sfprintf(shp->strbuf,"%s.%d%c",csp->name,pid&0xff,0);
+ else
+ sfprintf(shp->strbuf,"%d%c",pid,0);
+ return(sfstruse(shp->strbuf));
+ }
+
+ int job_cowalk(int (*fun)(struct process*,int),int arg,char *name)
+ {
+ Shell_t *shp = sh_getinterp();
+ struct cosh *csp;
+ struct process *pw,*pwnext;
+ pid_t val;
+ int n,r=0;
+ char *cp = strchr(name,'.');
+ if(!cp)
+ n = strlen(name);
+ else
+ n = cp-name;
+ for(csp=(struct cosh*)job.colist;csp;csp=csp->next)
+ {
+ if(memcmp(name,csp->name,n)==0 && csp->name[n]==0)
+ break;
+ }
+ if(!csp)
+ errormsg(SH_DICT,ERROR_exit(1),e_jobusage,name);
+ if(cp)
+ {
+ n = pid_fromstring(cp+1);
+ val = (csp->id<<16)|n|COPID_BIT;
+ }
+ job_reap(SIGCHLD);
+ for(n=0,pw=job.pwlist; pw; pw=pwnext)
+ {
+ pwnext = pw->p_nxtjob;
+ if((cp && val==pw->p_pid) || (pw->p_cojob && pw->p_cojob->local==(void*)csp))
+ {
+ if(fun)
+ {
+ if(pw->p_flag&P_DONE)
+ continue;
+ r |= (*fun)(pw,arg);
+ }
+ else
+ job_wait(-pw->p_pid);
+ n++;
+ }
+ }
+ if(!n)
+ shp->exitval = fun?1:ERROR_NOENT;
+ else if(fun)
+ shp->exitval = r;
+ return(r);
+ }
+
+#endif /* SHOPT_COSHELL */
+
/*
* Reap one job
* When called with sig==0, it does a blocking wait
*/
int job_reap(register int sig)
{
+ Shell_t *shp = sh_getinterp();
register pid_t pid;
register struct process *pw;
struct process *px;
register int flags;
struct jobsave *jp;
int nochild=0, oerrno, wstat;
- Waitevent_f waitevent = sh.waitevent;
+ Waitevent_f waitevent = shp->gd->waitevent;
static int wcontinued = WCONTINUED;
+#if SHOPT_COSHELL
+ Cojob_t *cjp;
+ int cojobs;
+ long cotimeout = sig?0:-1;
+ for(pw=job.pwlist;pw;pw=pw->p_nxtjob)
+ {
+ if(pw->p_cojob && !(pw->p_flag&P_DONE))
+ break;
+ }
+ cojobs = (pw!=0);
+ pid = 0;
+#endif /* SHOPT_COSHELL */
if (vmbusy())
{
errormsg(SH_DICT,ERROR_warn(0),"vmbusy() inside job_reap() -- should not happen");
@@ -267,7 +373,7 @@ int job_reap(register int sig)
flags = WNOHANG|WUNTRACED|wcontinued;
else
flags = WUNTRACED|wcontinued;
- sh.waitevent = 0;
+ shp->gd->waitevent = 0;
oerrno = errno;
while(1)
{
@@ -277,8 +383,32 @@ int job_reap(register int sig)
if(waitevent && (*waitevent)(-1,-1L,0))
flags |= WNOHANG;
}
+#if SHOPT_COSHELL
+ if(cojobs)
+ {
+ if(cjp = cowait(0,0,cotimeout))
+ {
+ struct cosh *csp;
+ csp = (struct cosh*)(cjp->coshell->data);
+ csp->cojob = cjp;
+ pid = sh_copid(csp);
+ if(cjp->status < 256)
+ wstat = cjp->status <<8;
+ else
+ wstat = cjp->status-256;
+ cotimeout = 0;
+ goto cojob;
+ }
+ else if(copending(0)==0)
+ cojobs = 0;
+ cotimeout = 0;
+ }
+#endif /* SHOPT_COSHELL */
pid = waitpid((pid_t)-1,&wstat,flags);
sh_offstate(SH_TTYWAIT);
+#if SHOPT_COSHELL
+ cojob:
+#endif /* SHOPT_COSHELL */
/*
* some systems (linux 2.6) may return EINVAL
@@ -287,11 +417,16 @@ int job_reap(register int sig)
if (pid<0 && errno==EINVAL && (flags&WCONTINUED))
pid = waitpid((pid_t)-1,&wstat,flags&=~WCONTINUED);
- sh_sigcheck();
+ sh_sigcheck(shp);
if(pid<0 && errno==EINTR && (sig||job.savesig))
+ {
+ errno = 0;
continue;
+ }
if(pid<=0)
break;
+ if(wstat==0)
+ job_chksave(pid,-1);
flags |= WNOHANG;
job.waitsafe++;
jp = 0;
@@ -322,8 +457,14 @@ int job_reap(register int sig)
#ifdef SIGTSTP
else
px=job_byjid(pw->p_job);
- if(WIFSTOPPED(wstat))
+ if (WIFCONTINUED(wstat) && wcontinued)
+ pw->p_flag &= ~(P_NOTIFY|P_SIGNALLED|P_STOPPED);
+ else if(WIFSTOPPED(wstat))
{
+ pw->p_flag |= (P_NOTIFY|P_SIGNALLED|P_STOPPED);
+ pw->p_exit = WSTOPSIG(wstat);
+ if(pw->p_pgrp && pw->p_pgrp==job.curpgid && sh_isstate(SH_STOPOK))
+ kill(getpid(),pw->p_exit);
if(px)
{
/* move to top of job list */
@@ -331,26 +472,20 @@ int job_reap(register int sig)
px->p_nxtjob = job.pwlist;
job.pwlist = px;
}
- pw->p_flag |= (P_NOTIFY|P_SIGNALLED|P_STOPPED);
- pw->p_exit = WSTOPSIG(wstat);
- if(pw->p_pgrp && pw->p_pgrp==job.curpgid && sh_isstate(SH_STOPOK))
- sh_fault(pw->p_exit);
continue;
}
- else if (WIFCONTINUED(wstat) && wcontinued)
- pw->p_flag &= ~(P_NOTIFY|P_SIGNALLED|P_STOPPED);
else
#endif /* SIGTSTP */
{
/* check for coprocess completion */
- if(pid==sh.cpid)
+ if(pid==shp->cpid)
{
sh_close(sh.coutpipe);
sh_close(sh.cpipe[1]);
sh.cpipe[1] = -1;
sh.coutpipe = -1;
}
- else if(sh.subshell)
+ else if(shp->subshell)
sh_subjobcheck(pid);
pw->p_flag &= ~(P_STOPPED|P_SIGNALLED);
@@ -367,7 +502,7 @@ int job_reap(register int sig)
{
pw->p_flag &= ~P_NOTIFY;
sh_offstate(SH_STOPOK);
- sh_fault(SIGINT);
+ kill(getpid(),SIGINT);
sh_onstate(SH_STOPOK);
}
}
@@ -382,13 +517,13 @@ int job_reap(register int sig)
if((pw->p_flag&P_DONE) && (pw->p_flag&P_BG))
{
job.numbjob--;
- if(sh.st.trapcom[SIGCHLD])
+ if(shp->st.trapcom[SIGCHLD])
{
- sh.sigflag[SIGCHLD] |= SH_SIGTRAP;
+ shp->sigflag[SIGCHLD] |= SH_SIGTRAP;
if(sig==0)
- job_chldtrap(&sh,sh.st.trapcom[SIGCHLD],0);
+ job_chldtrap(shp,shp->st.trapcom[SIGCHLD],0);
else
- sh.trapnote |= SH_SIGTRAP;
+ shp->trapnote |= SH_SIGTRAP;
}
else
pw->p_flag &= ~P_BG;
@@ -418,10 +553,10 @@ int job_reap(register int sig)
tcsetpgrp(JOBTTY,job.mypid);
}
#ifndef SHOPT_BGX
- if(!sh.intrap && sh.st.trapcom[SIGCHLD] && pid>0 && (pwfg!=job_bypid(pid)))
+ if(!shp->intrap && shp->st.trapcom[SIGCHLD] && pid>0 && (pwfg!=job_bypid(pid)))
{
- sh.sigflag[SIGCHLD] |= SH_SIGTRAP;
- sh.trapnote |= SH_SIGTRAP;
+ shp->sigflag[SIGCHLD] |= SH_SIGTRAP;
+ shp->trapnote |= SH_SIGTRAP;
}
#endif
}
@@ -433,7 +568,7 @@ int job_reap(register int sig)
#endif /* SHOPT_BGX */
nochild = 1;
}
- sh.waitevent = waitevent;
+ shp->gd->waitevent = waitevent;
if(sh_isoption(SH_NOTIFY) && sh_isstate(SH_TTYWAIT))
{
outfile = sfstderr;
@@ -505,7 +640,7 @@ void job_init(Shell_t *shp, int lflag)
register int fd;
register char *ttynam;
#ifndef SIGTSTP
- setpgid(0,shp->pid);
+ setpgid(0,shp->gd->pid);
#endif /*SIGTSTP */
if(job.mypgid<0 || !(ttynam=ttyname(JOBTTY)))
return;
@@ -514,23 +649,24 @@ void job_init(Shell_t *shp, int lflag)
return;
if(fd!=JOBTTY)
sh_iorenumber(shp,fd,JOBTTY);
- job.mypgid = shp->pid;
+ job.mypgid = shp->gd->pid;
#ifdef SIGTSTP
- tcsetpgrp(JOBTTY,shp->pid);
- setpgid(0,shp->pid);
+ tcsetpgrp(JOBTTY,shp->gd->pid);
+ setpgid(0,shp->gd->pid);
#endif /* SIGTSTP */
}
#ifdef SIGTSTP
if(possible = (setpgid(0,job.mypgid)>=0) || errno==EPERM)
{
/* wait until we are in the foreground */
+
while((job.mytgid=tcgetpgrp(JOBTTY)) != job.mypgid)
{
- if(job.mytgid == -1)
+ if(job.mytgid <= 0)
return;
/* Stop this shell until continued */
signal(SIGTTIN,SIG_DFL);
- kill(shp->pid,SIGTTIN);
+ kill(shp->gd->pid,SIGTTIN);
/* resumes here after continue tries again */
if(ntry++ > IOMAXTRY)
{
@@ -571,7 +707,7 @@ void job_init(Shell_t *shp, int lflag)
#ifdef SIGTSTP
/* make sure that we are a process group leader */
- setpgid(0,shp->pid);
+ setpgid(0,shp->gd->pid);
# if defined(SA_NOCLDSTOP) || defined(SA_NOCLDWAIT)
# if !defined(SA_NOCLDSTOP)
# define SA_NOCLDSTOP 0
@@ -585,7 +721,7 @@ void job_init(Shell_t *shp, int lflag)
signal(SIGTTOU,SIG_IGN);
/* The shell now handles ^Z */
signal(SIGTSTP,sh_fault);
- tcsetpgrp(JOBTTY,shp->pid);
+ tcsetpgrp(JOBTTY,shp->gd->pid);
# ifdef CNSUSP
/* set the switch character */
tty_get(JOBTTY,&my_stty);
@@ -598,7 +734,7 @@ void job_init(Shell_t *shp, int lflag)
# endif /* CNSUSP */
sh_onoption(SH_MONITOR);
job.jobcontrol++;
- job.mypid = shp->pid;
+ job.mypid = shp->gd->pid;
#endif /* SIGTSTP */
return;
}
@@ -687,6 +823,7 @@ int job_close(Shell_t* shp)
static void job_set(register struct process *pw)
{
+ Shell_t *shp = pw->p_shp;
/* save current terminal state */
tty_get(job.fd,&my_stty);
if(pw->p_flag&P_STTY)
@@ -695,10 +832,12 @@ static void job_set(register struct process *pw)
tty_set(job.fd,TCSAFLUSH,&pw->p_stty);
}
#ifdef SIGTSTP
- if((pw->p_flag&P_STOPPED) || tcgetpgrp(job.fd) == sh.pid)
+ if((pw->p_flag&P_STOPPED) || tcgetpgrp(job.fd) == shp->gd->pid)
tcsetpgrp(job.fd,pw->p_fgrp);
/* if job is stopped, resume it in the background */
- job_unstop(pw);
+ if(!shp->forked)
+ job_unstop(pw);
+ shp->forked = 0;
#endif /* SIGTSTP */
}
@@ -748,9 +887,16 @@ void job_bwait(char **jobs)
else
return;
}
+# if SHOPT_COSHELL
+ else if(isalpha(*jp))
+ {
+ job_cowalk(NULL,0,jp);
+ return;
+ }
+# endif /* SHOPT_COSHELL */
else
#endif /* JOBS */
- pid = (int)strtol(jp, (char**)0, 10);
+ pid = pid_fromstring(jp);
job_wait(-pid);
}
}
@@ -771,6 +917,7 @@ int job_walk(Sfio_t *file,int (*fun)(struct process*,int),int arg,char *joblist[
by_number = 0;
job_lock();
pw = job.pwlist;
+ job_waitsafe(SIGCHLD);
if(jobs==0)
{
/* do all jobs */
@@ -796,20 +943,24 @@ int job_walk(Sfio_t *file,int (*fun)(struct process*,int),int arg,char *joblist[
job_string = jobid;
if(*jobid==0)
errormsg(SH_DICT,ERROR_exit(1),e_jobusage,job_string);
+#if SHOPT_COSHELL
+ if(isalpha(*jobid))
+ {
+ r = job_cowalk(fun,arg,jobid);
+ by_number = 0;
+ job_unlock();
+ return(r);
+ }
+#endif /* SHOPT_COSHELL */
if(*jobid == '%')
pw = job_bystring(jobid);
else
{
- int pid = (int)strtol(jobid, (char**)0, 10);
- if(pid<0)
- jobid++;
- while(isdigit(*jobid))
- jobid++;
- if(*jobid)
- errormsg(SH_DICT,ERROR_exit(1),e_jobusage,job_string);
+ int pid = pid_fromstring(jobid);
if(!(pw = job_bypid(pid)))
{
pw = &dummy;
+ pw->p_shp = sh_getinterp();
pw->p_pid = pid;
pw->p_pgrp = pid;
}
@@ -842,19 +993,24 @@ int job_terminate(register struct process *pw,register int sig)
int job_list(struct process *pw,register int flag)
{
+ Shell_t *shp = sh_getinterp();
register struct process *px = pw;
register int n;
register const char *msg;
register int msize;
if(!pw || pw->p_job<=0)
return(1);
- if(pw->p_env != sh.jobenv)
+ if(pw->p_env != shp->jobenv)
return(0);
if((flag&JOB_NFLAG) && (!(px->p_flag&P_NOTIFY)||px->p_pgrp==0))
return(0);
if((flag&JOB_PFLAG))
{
+#if SHOPT_COSHELL
+ sfprintf(outfile,"%s\n",sh_pid2str(shp,px->p_pgrp?px->p_pgrp:px->p_pid));
+#else
sfprintf(outfile,"%d\n",px->p_pgrp?px->p_pgrp:px->p_pid);
+#endif /* SHOPT_COSHELL */
return(0);
}
if((px->p_flag&P_DONE) && job.waitall && !(flag&JOB_LFLAG))
@@ -874,7 +1030,11 @@ int job_list(struct process *pw,register int flag)
{
n = 0;
if(flag&JOB_LFLAG)
+#if SHOPT_COSHELL
+ sfprintf(outfile,"%s\t",sh_pid2str(shp,px->p_pid));
+#else
sfprintf(outfile,"%d\t",px->p_pid);
+#endif /* SHOPT_COSHELL */
if(px->p_flag&P_SIGNALLED)
msg = job_sigmsg((int)(px->p_exit));
else if(px->p_flag&P_NOTIFY)
@@ -908,7 +1068,7 @@ int job_list(struct process *pw,register int flag)
px = 0;
}
if(!px)
- hist_list(sh.hist_ptr,outfile,pw->p_name,0,";");
+ hist_list(shgd->hist_ptr,outfile,pw->p_name,0,";");
else
sfputr(outfile, e_nlspace, -1);
}
@@ -950,6 +1110,7 @@ static struct process *job_bystring(register char *ajob)
int job_kill(register struct process *pw,register int sig)
{
+ Shell_t *shp;
register pid_t pid;
register int r;
const char *msg;
@@ -962,13 +1123,19 @@ int job_kill(register struct process *pw,register int sig)
errno = ECHILD;
if(pw==0)
goto error;
+ shp = pw->p_shp;
pid = pw->p_pid;
+#if SHOPT_COSHELL
+ if(pw->p_cojob)
+ r = cokill(pw->p_cojob->coshell,pw->p_cojob,sig);
+ else
+#endif /* SHOPT_COSHELL */
if(by_number)
{
if(pid==0 && job.jobcontrol)
r = job_walk(outfile, job_kill,sig, (char**)0);
#ifdef SIGTSTP
- if(sig==SIGSTOP && pid==sh.pid && sh.ppid==1)
+ if(sig==SIGSTOP && pid==shp->gd->pid && shp->gd->ppid==1)
{
/* can't stop login shell */
errno = EPERM;
@@ -1042,6 +1209,61 @@ int job_kill(register struct process *pw,register int sig)
}
/*
+ * Similar to job_kill, but dedicated to SIGHUP handling when session is
+ * being disconnected.
+ */
+int
+job_hup(struct process *pw, int sig)
+{
+ struct process *px;
+ pid_t pid;
+ int r;
+
+ if (pw->p_pgrp == 0 || (pw->p_flag & P_DISOWN))
+ return (0);
+
+#if SHOPT_COSHELL
+ if(pw->p_cojob) {
+ job_lock();
+ r = cokill(pw->p_cojob->coshell,pw->p_cojob,sig);
+ job_unlock();
+ return (r);
+ }
+#endif /* SHOPT_COSHELL */
+
+ job_lock();
+ if (pw->p_pgrp != 0) {
+ int palive = 0;
+
+ for (px = pw; px != NULL; px = px->p_nxtproc) {
+ if ((px->p_flag & P_DONE) == 0) {
+ palive = 1;
+ break;
+ }
+ }
+ /*
+ * If all the processes have been dead, there is no guarantee
+ * that the p_pgrp is still the valid process group that we
+ * made, ie pid may have been recycled and same p_pgrp may
+ * have been assigned to unrelated processes.
+ */
+ if (palive) {
+ if (killpg(pw->p_pgrp, SIGHUP) >= 0)
+ job_unstop(pw);
+ }
+ }
+ for (; pw != NULL && pw->p_pgrp == 0; pw = pw->p_nxtproc) {
+ if (pw->p_flag & P_DONE)
+ continue;
+ if (kill(pw->p_pid, SIGHUP) >= 0)
+ (void) kill(pw->p_pid, SIGCONT);
+ pw = pw->p_nxtproc;
+ }
+ job_unlock();
+ return(0);
+}
+
+/*
* Get process structure from first letters of jobname
*
*/
@@ -1053,13 +1275,13 @@ static struct process *job_byname(char *name)
register int *flag = 0;
register char *cp = name;
int offset;
- if(!sh.hist_ptr)
+ if(!shgd->hist_ptr)
return(NIL(struct process*));
if(*cp=='?')
cp++,flag= &offset;
for(;pw;pw=pw->p_nxtjob)
{
- if(hist_match(sh.hist_ptr,pw->p_name,cp,flag)>=0)
+ if(hist_match(shgd->hist_ptr,pw->p_name,cp,flag)>=0)
{
if(pz)
errormsg(SH_DICT,ERROR_exit(1),e_jobusage,name-1);
@@ -1082,9 +1304,10 @@ static struct process *job_byname(char *name)
void job_clear(void)
{
+ Shell_t *shp = sh_getinterp();
register struct process *pw, *px;
register struct process *pwnext;
- register int j = BYTE(sh.lim.child_max);
+ register int j = BYTE(shp->gd->lim.child_max);
register struct jobsave *jp,*jpnext;
job_lock();
for(pw=job.pwlist; pw; pw=pwnext)
@@ -1124,16 +1347,16 @@ void job_clear(void)
* if non-zero, <join> is the process id of the job to join
*/
-int job_post(pid_t pid, pid_t join)
+int job_post(Shell_t *shp,pid_t pid, pid_t join)
{
register struct process *pw;
- register History_t *hp = sh.hist_ptr;
+ register History_t *hp = shp->gd->hist_ptr;
#ifdef SHOPT_BGX
int val,bg=0;
#else
int val;
#endif
- sh.jobenv = sh.curenv;
+ shp->jobenv = shp->curenv;
if(job.toclear)
{
job_clear();
@@ -1152,10 +1375,14 @@ int job_post(pid_t pid, pid_t join)
init_savelist();
if(pw = job_bypid(pid))
job_unpost(pw,0);
- if(join && (pw=job_bypid(join)))
+ if(join)
{
+ if(pw=job_bypid(join))
+ val = pw->p_job;
+ else
+ val = job.curjobid;
/* if job to join is not first move it to front */
- if((pw=job_byjid(pw->p_job)) != job.pwlist)
+ if(val && (pw=job_byjid(val)) != job.pwlist)
{
job_unlink(pw);
pw->p_nxtjob = job.pwlist;
@@ -1183,12 +1410,22 @@ int job_post(pid_t pid, pid_t join)
pw->p_nxtjob = job.pwlist;
pw->p_nxtproc = 0;
}
+ pw->p_exitval = job.exitval;
+#if SHOPT_COSHELL
+ pw->p_cojob = 0;
+ if(shp->coshell && (pid&COPID_BIT))
+ {
+ pw->p_cojob = ((struct cosh*)shp->coshell)->cojob;
+ job.curpgid = sh_isstate(SH_MONITOR)?pid:0;
+ }
+#endif /* SHOPT_COSHELL */
job.pwlist = pw;
- pw->p_env = sh.curenv;
+ pw->p_shp = shp;
+ pw->p_env = shp->curenv;
pw->p_pid = pid;
- if(!sh.outpipe || (sh_isoption(SH_PIPEFAIL) && job.waitall))
+ if(!shp->outpipe || shp->cpid==pid)
pw->p_flag = P_EXITSAVE;
- pw->p_exitmin = sh.xargexit;
+ pw->p_exitmin = shp->xargexit;
pw->p_exit = 0;
if(sh_isstate(SH_MONITOR))
{
@@ -1206,11 +1443,11 @@ int job_post(pid_t pid, pid_t join)
#endif /* DEBUG */
#ifdef JOBS
if(hp && !sh_isstate(SH_PROFILE))
- pw->p_name=hist_tell(sh.hist_ptr,(int)hp->histind-1);
+ pw->p_name=hist_tell(shgd->hist_ptr,(int)hp->histind-1);
else
pw->p_name = -1;
#endif /* JOBS */
- if ((val = job_chksave(pid)) >= 0)
+ if ((val = job_chksave(pid,pw->p_env))>=0 && !jobfork)
{
pw->p_exit = val;
if(pw->p_exit==SH_STOPSIG)
@@ -1227,8 +1464,13 @@ int job_post(pid_t pid, pid_t join)
pw->p_flag |= (P_DONE|P_NOTIFY);
}
#ifdef SHOPT_BGX
- if(bg && !(pw->p_flag&P_DONE))
- pw->p_flag |= P_BG;
+ if(bg)
+ {
+ if(pw->p_flag&P_DONE)
+ job.numbjob--;
+ else
+ pw->p_flag |= P_BG;
+ }
#endif /* SHOPT_BGX */
lastpid = 0;
job_unlock();
@@ -1297,34 +1539,45 @@ static void job_prmsg(register struct process *pw)
int job_wait(register pid_t pid)
{
+ Shell_t *shp = sh_getinterp();
register struct process *pw=0,*px;
register int jobid = 0;
int nochild = 1;
char intr = 0;
- if(pid <= 0)
+ if(pid < 0)
{
- if(pid==0)
- goto done;
pid = -pid;
intr = 1;
}
job_lock();
+ if(pid==0)
+ {
+ if(!job.waitall || !job.curjobid || !(pw = job_byjid(job.curjobid)))
+ {
+ job_unlock();
+ goto done;
+ }
+ jobid = pw->p_job;
+ job.curjobid = 0;
+ if(!(pw->p_flag&(P_DONE|P_STOPPED)))
+ job_reap(job.savesig);
+ }
if(pid > 1)
{
- if(pid==sh.spid)
- sh.spid = 0;
+ if(pid==shp->spid)
+ shp->spid = 0;
if(!(pw=job_bypid(pid)))
{
/* check to see whether job status has been saved */
- if((sh.exitval = job_chksave(pid)) < 0)
- sh.exitval = ERROR_NOENT;
+ if((shp->exitval = job_chksave(pid,shp->curenv)) < 0)
+ shp->exitval = ERROR_NOENT;
exitset();
job_unlock();
return(nochild);
}
- else if(intr && pw->p_env!=sh.curenv)
+ else if(intr && pw->p_env!=shp->curenv)
{
- sh.exitval = ERROR_NOENT;
+ shp->exitval = ERROR_NOENT;
job_unlock();
return(nochild);
}
@@ -1341,11 +1594,11 @@ int job_wait(register pid_t pid)
sfprintf(sfstderr,"ksh: job line %4d: wait pid=%d critical=%d flags=%o\n",__LINE__,getpid(),job.in_critical,pw->p_flag);
#endif /* DEBUG*/
errno = 0;
- if(sh.coutpipe>=0 && sh.cpid==lastpid)
+ if(shp->coutpipe>=0 && lastpid && shp->cpid==lastpid)
{
- sh_close(sh.coutpipe);
- sh_close(sh.cpipe[1]);
- sh.cpipe[1] = sh.coutpipe = -1;
+ sh_close(shp->coutpipe);
+ sh_close(shp->cpipe[1]);
+ shp->cpipe[1] = shp->coutpipe = -1;
}
while(1)
{
@@ -1399,30 +1652,19 @@ int job_wait(register pid_t pid)
{
px = job_byjid(jobid);
/* last process in job */
- if(sh_isoption(SH_PIPEFAIL))
- {
- /* last non-zero exit */
- for(;px;px=px->p_nxtproc)
- {
- if(px->p_exit)
- break;
- }
- if(!px)
- px = pw;
- }
- else if(px!=pw)
+ if(px!=pw)
px = 0;
if(px)
{
- sh.exitval=px->p_exit;
+ shp->exitval=px->p_exit;
if(px->p_flag&P_SIGNALLED)
- sh.exitval |= SH_EXITSIG;
+ shp->exitval |= SH_EXITSIG;
if(intr)
px->p_flag &= ~P_EXITSAVE;
}
}
px = job_unpost(pw,1);
- if(!px || !sh_isoption(SH_PIPEFAIL) || !job.waitall)
+ if(!px || !job.waitall)
break;
pw = px;
continue;
@@ -1435,27 +1677,31 @@ int job_wait(register pid_t pid)
continue;
if(nochild)
break;
- if(sh.sigflag[SIGALRM]&SH_SIGTRAP)
- sh_timetraps();
- if((intr && sh.trapnote) || (pid==1 && !intr))
+ if(shp->sigflag[SIGALRM]&SH_SIGTRAP)
+ sh_timetraps(shp);
+ if((intr && shp->trapnote) || (pid==1 && !intr))
break;
}
+ if(intr && shp->trapnote)
+ shp->exitval = 1;
pwfg = 0;
job_unlock();
if(pid==1)
return(nochild);
exitset();
+ if(pid==0)
+ goto done;
if(pw->p_pgrp)
{
job_reset(pw);
/* propogate keyboard interrupts to parent */
- if((pw->p_flag&P_SIGNALLED) && pw->p_exit==SIGINT && !(sh.sigflag[SIGINT]&SH_SIGOFF))
- sh_fault(SIGINT);
+ if((pw->p_flag&P_SIGNALLED) && pw->p_exit==SIGINT && !(shp->sigflag[SIGINT]&SH_SIGOFF))
+ kill(getpid(),SIGINT);
#ifdef SIGTSTP
else if((pw->p_flag&P_STOPPED) && pw->p_exit==SIGTSTP)
{
job.parent = 0;
- sh_fault(SIGTSTP);
+ kill(getpid(),SIGTSTP);
}
#endif /* SIGTSTP */
}
@@ -1472,7 +1718,7 @@ int job_wait(register pid_t pid)
done:
if(!job.waitall && sh_isoption(SH_PIPEFAIL))
return(nochild);
- if(!sh.intrap)
+ if(!shp->intrap)
{
job_lock();
for(pw=job.pwlist; pw; pw=px)
@@ -1524,7 +1770,7 @@ int job_switch(register struct process *pw,int bgflag)
job.pwlist = pw;
msg = "";
}
- hist_list(sh.hist_ptr,outfile,pw->p_name,'&',";");
+ hist_list(shgd->hist_ptr,outfile,pw->p_name,'&',";");
sfputr(outfile,msg,'\n');
sfsync(outfile);
if(bgflag=='f')
@@ -1610,10 +1856,14 @@ static struct process *job_unpost(register struct process *pwtop,int notify)
for(; pw && (pw->p_flag&P_DONE)&&(notify||!(pw->p_flag&P_NOTIFY)||pw->p_env); pw=pw->p_nxtproc);
if(pw)
return(pw);
+ if(pwtop->p_job == job.curjobid)
+ return(0);
/* all processes complete, unpost job */
job_unlink(pwtop);
for(pw=pwtop; pw; pw=pw->p_nxtproc)
{
+ if(pw && pw->p_exitval)
+ *pw->p_exitval = pw->p_exit;
/* save the exit status for background jobs */
if((pw->p_flag&P_EXITSAVE) || pw->p_pid==sh.spid)
{
@@ -1671,13 +1921,13 @@ static int job_alloc(void)
register int j=0;
register unsigned mask = 1;
register unsigned char *freeword;
- register int jmax = BYTE(sh.lim.child_max);
+ register int jmax = BYTE(shgd->lim.child_max);
/* skip to first word with a free slot */
for(j=0;job.freejobs[j] == UCHAR_MAX; j++);
if(j >= jmax)
{
register struct process *pw;
- for(j=1; j < sh.lim.child_max; j++)
+ for(j=1; j < shgd->lim.child_max; j++)
{
if((pw=job_byjid(j))&& !job_unpost(pw,0))
break;
@@ -1719,16 +1969,16 @@ static char *job_sigmsg(int sig)
if ( sig == SIGAPOLLO )
return( apollo_error() );
#endif /* apollo */
- if(sig<=sh.sigmax && sh.sigmsg[sig])
- return(sh.sigmsg[sig]);
+ if(sig<=shgd->sigmax && shgd->sigmsg[sig])
+ return(shgd->sigmsg[sig]);
#if defined(SIGRTMIN) && defined(SIGRTMAX)
- if(sig>=sh.sigruntime[SH_SIGRTMIN] && sig<=sh.sigruntime[SH_SIGRTMAX])
+ if(sig>=sh.gd->sigruntime[SH_SIGRTMIN] && sig<=sh.gd->sigruntime[SH_SIGRTMAX])
{
static char sigrt[20];
- if(sig>sh.sigruntime[SH_SIGRTMIN]+(sh.sigruntime[SH_SIGRTMAX]-sig<=sh.sigruntime[SH_SIGRTMIN])/2)
- sfsprintf(sigrt,sizeof(sigrt),"SIGRTMAX-%d",sh.sigruntime[SH_SIGRTMAX]-sig);
+ if(sig>sh.gd->sigruntime[SH_SIGRTMIN]+(sh.gd->sigruntime[SH_SIGRTMAX]-sig<=sh.gd->sigruntime[SH_SIGRTMIN])/2)
+ sfsprintf(sigrt,sizeof(sigrt),"SIGRTMAX-%d",sh.gd->sigruntime[SH_SIGRTMAX]-sig);
else
- sfsprintf(sigrt,sizeof(sigrt),"SIGRTMIN+%d",sig-sh.sigruntime[SH_SIGRTMIN]);
+ sfsprintf(sigrt,sizeof(sigrt),"SIGRTMIN+%d",sig-sh.gd->sigruntime[SH_SIGRTMIN]);
return(sigrt);
}
#endif
@@ -1741,11 +1991,13 @@ static char *job_sigmsg(int sig)
* if pid==0, then oldest saved process is deleted
* If pid is not found a -1 is returned.
*/
-static int job_chksave(register pid_t pid)
+static int job_chksave(register pid_t pid, long env)
{
register struct jobsave *jp = bck.list, *jpold=0;
register int r= -1;
register int count=bck.count;
+ struct back_save *bp= &bck;
+again:
while(jp && count-->0)
{
if(jp->pid==pid)
@@ -1755,7 +2007,14 @@ static int job_chksave(register pid_t pid)
jpold = jp;
jp = jp->next;
}
- if(jp)
+ if(!jp && pid && (bp=bp->prev))
+ {
+ count = bp->count;
+ jp = bp->list;
+ jpold = 0;
+ goto again;
+ }
+ if(jp && (env<0 || jp->env==env))
{
r = 0;
if(pid)
@@ -1763,8 +2022,8 @@ static int job_chksave(register pid_t pid)
if(jpold)
jpold->next = jp->next;
else
- bck.list = jp->next;
- bck.count--;
+ bp->list = jp->next;
+ bp->count--;
if(njob_savelist < NJOB_SAVELIST)
{
njob_savelist++;
@@ -1782,31 +2041,37 @@ void *job_subsave(void)
struct back_save *bp = new_of(struct back_save,0);
job_lock();
*bp = bck;
+ bp->prev = bck.prev;
bck.count = 0;
bck.list = 0;
+ bck.prev = bp;
job_unlock();
return((void*)bp);
}
void job_subrestore(void* ptr)
{
- register struct jobsave *jp;
+ register struct jobsave *jp,*jpnext;
register struct back_save *bp = (struct back_save*)ptr;
register struct process *pw, *px, *pwnext;
- struct jobsave *jpnext;
+ struct jobsave *end=NULL;
+ int i=0;
job_lock();
- for(jp=bck.list; jp; jp=jpnext)
+ for(jp=bck.list; jp; jp=jpnext,i++)
{
- jpnext = jp->next;
- if(jp->pid==sh.spid)
- {
- jp->next = bp->list;
- bp->list = jp;
- bp->count++;
- }
- else
- job_chksave(jp->pid);
+ if (!(jpnext=jp->next) || jp==jpnext)
+ end = jp;
+ if(i>=shgd->lim.child_max)
+ break;
}
+ if(end)
+ end->next = bp->list;
+ else
+ bck.list = bp->list;
+ bck.count += bp->count;
+ bck.prev = bp->prev;
+ while(bck.count > shgd->lim.child_max)
+ job_chksave(0,-1);
for(pw=job.pwlist; pw; pw=pwnext)
{
pwnext = pw->p_nxtjob;
@@ -1817,11 +2082,6 @@ void job_subrestore(void* ptr)
job_unpost(pw,0);
}
- /*
- * queue up old lists for disposal by job_reap()
- */
-
- bck = *bp;
free((void*)bp);
job_unlock();
}
@@ -1840,15 +2100,19 @@ void job_fork(pid_t parent)
{
case -1:
job_lock();
+ jobfork++;
break;
case 0:
+ jobfork=0;
job_unlock();
job.waitsafe = 0;
job.in_critical = 0;
break;
default:
- job_chksave(parent);
+ job_chksave(parent,-1);
+ jobfork=0;
job_unlock();
break;
}
}
+
diff --git a/usr/src/lib/libshell/common/sh/lex.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/lex.c
index 29886857fa..c42c10604e 100644
--- a/usr/src/lib/libshell/common/sh/lex.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/lex.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -25,6 +25,9 @@
* AT&T Labs
*
*/
+/*
+ * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ */
#include <ast.h>
#include <stak.h>
@@ -79,6 +82,7 @@ struct lexstate
char reservok; /* >0 for reserved word legal */
char skipword; /* next word can't be reserved */
char last_quote; /* last multi-line quote character */
+ char nestedbrace; /* ${var op {...}} */
};
struct lexdata
@@ -88,6 +92,7 @@ struct lexdata
char dolparen;
char nest;
char docword;
+ char nested_tilde;
char *docend;
char noarg;
char balance;
@@ -188,8 +193,8 @@ static void lex_advance(Sfio_t *iop, const char *buff, register int size, void *
/* write to history file and to stderr if necessary */
if(iop && !sfstacked(iop))
{
- if(sh_isstate(SH_HISTORY) && shp->hist_ptr)
- log = shp->hist_ptr->histfp;
+ if(sh_isstate(SH_HISTORY) && shp->gd->hist_ptr)
+ log = shp->gd->hist_ptr->histfp;
sfwrite(log, (void*)buff, size);
if(sh_isstate(SH_VERBOSE))
sfwrite(sfstderr, buff, size);
@@ -197,11 +202,15 @@ static void lex_advance(Sfio_t *iop, const char *buff, register int size, void *
#endif
if(lp->lexd.nocopy)
return;
- if(lp->lexd.dolparen && lp->lexd.docword)
+ if(lp->lexd.dolparen && lp->lexd.docword && lp->lexd.docend)
{
int n = size - (lp->lexd.docend-(char*)buff);
sfwrite(shp->strbuf,lp->lexd.docend,n);
lp->lexd.docextra += n;
+ if(sffileno(iop)>=0)
+ lp->lexd.docend = sfsetbuf(iop,(Void_t*)iop,0);
+ else
+ lp->lexd.docend = fcfirst();
}
if(lp->lexd.first)
{
@@ -274,6 +283,8 @@ 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->lexd.docend = 0;
+ lp->lexd.nested_tilde = 0;
}
lp->comsub = 0;
return(lp);
@@ -287,7 +298,7 @@ int sh_lex(Lex_t *lp)
register int flag;
char *quoted, *macro, *split, *expand;
char tokstr[3];
- register int tok = lextoken();
+ register int tok = lextoken(lp);
quoted = macro = split = expand = "";
if(tok==0 && (flag=lp->arg->argflag))
{
@@ -298,7 +309,7 @@ int sh_lex(Lex_t *lp)
if(flag&ARG_QUOTED)
quoted = "quoted:";
}
- sfprintf(sfstderr,"line %d: %o:%s%s%s%s %s\n",shp->inlineno,tok,quoted,
+ sfprintf(sfstderr,"%d: line %d: %o:%s%s%s%s %s\n",getpid(),shp->inlineno,tok,quoted,
macro, split, expand, fmttoken(lp,tok,tokstr));
return(tok);
}
@@ -317,6 +328,7 @@ int sh_lex(Lex_t* lp)
register int n, c, mode=ST_BEGIN, wordflags=0;
Stk_t *stkp = shp->stk;
int inlevel=lp->lexd.level, assignment=0, ingrave=0;
+ int epatchar=0;
Sfio_t *sp;
#if SHOPT_MULTIBYTE
LEN=1;
@@ -326,6 +338,14 @@ int sh_lex(Lex_t* lp)
lp->lexd.paren = 0;
return(lp->token=LPAREN);
}
+ if(lp->noreserv)
+ {
+ lp->lex.reservok = 0;
+ while((fcgetc(c)) && c==' ' || c== '\t' || c=='\n');
+ fcseek(-LEN);
+ if(c=='[')
+ lp->assignok = SH_ASSIGN;
+ }
if(lp->lex.incase)
lp->assignok = 0;
else
@@ -352,7 +372,7 @@ int sh_lex(Lex_t* lp)
lp->lexd.docword=0;
}
else if(c>0)
- fcseek(-1);
+ fcseek(-LEN);
}
if(!lp->lexd.dolparen)
{
@@ -371,7 +391,7 @@ int sh_lex(Lex_t* lp)
switch(n)
{
case S_BREAK:
- fcseek(-1);
+ fcseek(-LEN);
goto breakloop;
case S_EOF:
sp = fcfile();
@@ -444,7 +464,10 @@ int sh_lex(Lex_t* lp)
{
while(fcgetc(c)>0 && c!='\n');
if(c<=0 || lp->heredoc)
+ {
+ shp->inlineno++;
break;
+ }
while(shp->inlineno++,fcpeek(0)=='\n')
fcseek(1);
while(state[c=fcpeek(0)]==0)
@@ -482,7 +505,7 @@ int sh_lex(Lex_t* lp)
/* skip over new-lines */
lp->lex.last_quote = 0;
while(shp->inlineno++,fcget()=='\n');
- fcseek(-1);
+ fcseek(-LEN);
if(n==S_NLTOK)
{
lp->comp_assign = 0;
@@ -496,7 +519,7 @@ int sh_lex(Lex_t* lp)
if(inlevel+1==lp->lexd.level)
{
if(lp->lex.intest)
- fcseek(-1);
+ fcseek(-LEN);
c = RPAREN;
goto do_pop;
}
@@ -512,7 +535,8 @@ int sh_lex(Lex_t* lp)
lp->digits = (c=='>');
lp->lex.skipword = 1;
lp->aliasok = lp->lex.reservok;
- lp->lex.reservok = 0;
+ if(lp->lex.incase<2)
+ lp->lex.reservok = 0;
}
}
else
@@ -527,7 +551,7 @@ int sh_lex(Lex_t* lp)
lp->lex.testop1 = lp->lex.intest;
}
if(fcgetc(n)>0)
- fcseek(-1);
+ fcseek(-LEN);
if(state[n]==S_OP || n=='#')
{
if(n==c)
@@ -536,6 +560,8 @@ int sh_lex(Lex_t* lp)
lp->lexd.docword=1;
else if(n==LPAREN)
{
+ if(lp->lex.intest)
+ return(c);
lp->lexd.nest=1;
lp->lastline = shp->inlineno;
lp->lexd.lex_state = ST_NESTED;
@@ -558,6 +584,8 @@ int sh_lex(Lex_t* lp)
lp->digits = -1;
c = '>';
}
+ else if(n=='|')
+ c |= SYMPIPE;
else
n = 0;
}
@@ -585,7 +613,7 @@ int sh_lex(Lex_t* lp)
sh_syntax(lp);
}
else if(n>0)
- fcseek(-1);
+ fcseek(-LEN);
n= 0;
}
else if(n=='#' && (c=='<'||c=='>'))
@@ -629,7 +657,7 @@ int sh_lex(Lex_t* lp)
else
{
n='\r';
- fcseek(-1);
+ fcseek(-LEN);
}
}
#endif /* SHOPT_CRNL */
@@ -674,6 +702,16 @@ int sh_lex(Lex_t* lp)
lp->lex.reservok *= 2;
/* FALL THRU */
case S_TILDE:
+ if(c=='~' && mode==ST_NESTED)
+ {
+ if(endchar(lp)==RBRACE)
+ {
+ lp->lexd.nested_tilde++;
+ goto tilde;
+ }
+ continue;
+ }
+ /* FALLTHROUGH */
case S_RES:
if(!lp->lexd.dolparen)
lp->lexd.first = fcseek(0)-LEN;
@@ -681,15 +719,26 @@ int sh_lex(Lex_t* lp)
lp->lexd.docend = fcseek(0)-LEN;
mode = ST_NAME;
if(c=='.')
- fcseek(-1);
+ fcseek(-LEN);
if(n!=S_TILDE)
continue;
+ tilde:
fcgetc(n);
if(n>0)
{
- if(c=='~' && n==LPAREN && lp->lex.incase)
- lp->lex.incase = TEST_RE;
- fcseek(-1);
+ if(c=='~' && n==LPAREN)
+ {
+ if(lp->lexd.nested_tilde)
+ lp->lexd.nested_tilde++;
+ else if(lp->lex.incase)
+ lp->lex.incase = TEST_RE;
+ }
+ fcseek(-LEN);
+ if(lp->lexd.nested_tilde)
+ {
+ lp->lexd.nested_tilde--;
+ continue;
+ }
}
if(n==LPAREN)
goto epat;
@@ -707,7 +756,7 @@ int sh_lex(Lex_t* lp)
fcseek(1);
continue;
}
- fcseek(-1);
+ fcseek(-LEN);
if(!lp->lexd.dolparen)
lp->lexd.first = fcseek(0);
else if(lp->lexd.docword)
@@ -744,7 +793,7 @@ int sh_lex(Lex_t* lp)
}
if(mode!=ST_LIT)
{
- if(lp->lexd.warn && lp->lex.last_quote && shp->inlineno > lp->lastline)
+ if(lp->lexd.warn && lp->lex.last_quote && shp->inlineno > lp->lastline && fcpeek(-2)!='$')
errormsg(SH_DICT,ERROR_warn(0),e_lexlongquote,lp->lastline,lp->lex.last_quote);
lp->lex.last_quote = 0;
lp->lastline = shp->inlineno;
@@ -825,8 +874,10 @@ int sh_lex(Lex_t* lp)
wordflags |= ARG_MAC;
mode = oldmode(lp);
poplevel(lp);
- fcseek(-1);
+ fcseek(-LEN);
+ n = lp->digits;
wordflags |= comsub(lp,c);
+ lp->digits = n;
continue;
case S_RBRA:
if((n=endchar(lp)) == '$')
@@ -845,7 +896,7 @@ int sh_lex(Lex_t* lp)
#endif /* SHOPT_KIA */
if(lp->lexd.warn && c==LBRACT && !lp->lex.intest && !lp->lexd.arith && oldmode(lp)!= ST_NESTED)
errormsg(SH_DICT,ERROR_warn(0),e_lexusebrace,shp->inlineno);
- fcseek(-1);
+ fcseek(-LEN);
mode = oldmode(lp);
poplevel(lp);
break;
@@ -856,7 +907,7 @@ int sh_lex(Lex_t* lp)
if(n=='.')
fcgetc(n);
if(n>0)
- fcseek(-1);
+ fcseek(-LEN);
}
if(isaletter(n) || n==LBRACT)
continue;
@@ -906,18 +957,21 @@ int sh_lex(Lex_t* lp)
goto dolerr;
/* FALLTHROUGH */
case '#':
+ if(c=='#')
+ n = S_ALP;
+ /* FALLTHROUGH */
case RBRACE:
if(n==S_ALP)
{
setchar(lp,RBRACE);
if(c=='.')
- fcseek(-1);
+ fcseek(-LEN);
mode = ST_BRACE;
}
else
{
if(fcgetc(c)>0)
- fcseek(-1);
+ fcseek(-LEN);
if(state[c]==S_ALP)
goto err;
if(n==S_DIG)
@@ -957,7 +1011,7 @@ int sh_lex(Lex_t* lp)
if(c==':' && fcgetc(n)>0)
{
n = state[n];
- fcseek(-1);
+ fcseek(-LEN);
}
if(n==S_MOD1)
{
@@ -977,7 +1031,7 @@ int sh_lex(Lex_t* lp)
c = 0;
if(!c || (fcgetc(n)>0))
{
- fcseek(-1);
+ fcseek(-LEN);
if(n==LPAREN)
{
if(c!='%')
@@ -990,13 +1044,14 @@ int sh_lex(Lex_t* lp)
}
}
}
+ lp->lex.nestedbrace = 0;
mode = ST_NESTED;
continue;
case S_LBRA:
if((c=endchar(lp)) == '$')
{
if(fcgetc(c)>0)
- fcseek(-1);
+ fcseek(-LEN);
setchar(lp,RBRACE);
if(state[c]!=S_ERR && c!=RBRACE)
continue;
@@ -1007,6 +1062,8 @@ int sh_lex(Lex_t* lp)
}
}
err:
+ if(iswalpha(c))
+ continue;
n = endchar(lp);
mode = oldmode(lp);
poplevel(lp);
@@ -1021,24 +1078,34 @@ int sh_lex(Lex_t* lp)
errormsg(SH_DICT,ERROR_warn(0),e_lexslash,shp->inlineno);
else if(c=='"' && mode!=ST_QUOTE && !ingrave)
wordflags |= ARG_MESSAGE;
- fcseek(-1);
+ fcseek(-LEN);
}
continue;
case S_META:
- if(lp->lexd.warn && endchar(lp)==RBRACE)
+ if(lp->lexd.warn && endchar(lp)==RBRACE && !lp->lexd.nested_tilde)
errormsg(SH_DICT,ERROR_warn(0),e_lexusequote,shp->inlineno,c);
continue;
case S_PUSH:
+ fcgetc(n);
+ if(n==RPAREN)
+ continue;
+ else
+ fcseek(-LEN);
pushlevel(lp,RPAREN,mode);
mode = ST_NESTED;
continue;
case S_POP:
do_pop:
+ if(c==RBRACE && mode==ST_NESTED && lp->lex.nestedbrace)
+ {
+ lp->lex.nestedbrace--;
+ continue;
+ }
if(lp->lexd.level <= inlevel)
break;
if(lp->lexd.level==inlevel+1 && lp->lex.incase>=TEST_RE && !lp->lex.intest)
{
- fcseek(-1);
+ fcseek(-LEN);
goto breakloop;
}
n = endchar(lp);
@@ -1049,13 +1116,15 @@ int sh_lex(Lex_t* lp)
if(fcgetc(n)==LPAREN)
{
if(c!=RPAREN)
- fcseek(-1);
+ fcseek(-LEN);
continue;
}
if(n>0)
- fcseek(-1);
+ fcseek(-LEN);
n = RPAREN;
}
+ if(c==RBRACE)
+ lp->lexd.nested_tilde = 0;
if(c==';' && n!=';')
{
if(lp->lexd.warn && n==RBRACE)
@@ -1070,6 +1139,8 @@ int sh_lex(Lex_t* lp)
}
mode = oldmode(lp);
poplevel(lp);
+ if(epatchar!='~')
+ epatchar = '@';
/* quotes in subscript need expansion */
if(mode==ST_NAME && (wordflags&ARG_QUOTED))
wordflags |= ARG_MAC;
@@ -1086,17 +1157,14 @@ int sh_lex(Lex_t* lp)
}
/* backward compatibility */
{
- char *tmp;
if(lp->lexd.warn)
errormsg(SH_DICT,ERROR_warn(0),e_lexnested,shp->inlineno);
if(!(state=lp->lexd.first))
state = fcfirst();
- tmp = fcseek(0);
- fcseek(state - tmp);
- if(lp->arg)
+ else
{
- lp->arg = (struct argnod*)stkfreeze(stkp,1);
- setupalias(lp,lp->arg->argval,NIL(Namval_t*));
+ n = state-fcseek(0);
+ fcseek(n);
}
lp->lexd.paren = 1;
}
@@ -1118,18 +1186,19 @@ int sh_lex(Lex_t* lp)
case S_COLON:
if(assignment)
{
- if((c=fcget())=='~')
+ if(fcgetc(c)=='~')
wordflags |= ARG_MAC;
else if(c!=LPAREN && assignment==SH_COMPASSIGN)
assignment = 0;
- fcseek(-1);
+ if(c!=EOF)
+ fcseek(-LEN);
}
break;
case S_LABEL:
if(lp->lex.reservok && !lp->lex.incase)
{
c = fcget();
- fcseek(-1);
+ fcseek(-LEN);
if(state[c]==S_BREAK)
{
assignment = -1;
@@ -1144,16 +1213,16 @@ int sh_lex(Lex_t* lp)
(oldmode(lp)==ST_NONE) ||
(mode==ST_NAME && (lp->assignok||lp->lexd.level)))
{
- if(mode==ST_NAME)
+ fcgetc(n);
+ if(n>0 && n==']')
{
- fcgetc(n);
- if(n>0)
- {
- if(n==']')
- errormsg(SH_DICT,ERROR_exit(SYNBAD),e_lexsyntax1, shp->inlineno, "[]", "empty subscript");
- fcseek(-1);
- }
+ if(mode==ST_NAME)
+ errormsg(SH_DICT,ERROR_exit(SYNBAD),e_lexsyntax1, shp->inlineno, "[]", "empty subscript");
+ if(!epatchar || epatchar=='%')
+ continue;
}
+ else
+ fcseek(-LEN);
pushlevel(lp,RBRACT,mode);
wordflags |= ARG_QUOTED;
mode = ST_NESTED;
@@ -1168,9 +1237,11 @@ int sh_lex(Lex_t* lp)
{
if(mode==ST_BEGIN && (lp->lex.reservok||lp->comsub))
{
+ if(lp->comsub)
+ return(lp->token=c);
fcgetc(n);
if(n>0)
- fcseek(-1);
+ fcseek(-LEN);
else
n = '\n';
if(n==RBRACT || sh_lexstates[ST_NORM][n])
@@ -1178,6 +1249,11 @@ int sh_lex(Lex_t* lp)
}
break;
}
+ else if(mode==ST_NESTED && endchar(lp)==RBRACE)
+ {
+ lp->lex.nestedbrace++;
+ continue;
+ }
else if(mode==ST_BEGIN)
{
if(lp->comsub && c==RBRACE)
@@ -1190,7 +1266,7 @@ int sh_lex(Lex_t* lp)
if(c==LBRACE && n==RBRACE)
break;
if(n>0)
- fcseek(-1);
+ fcseek(-LEN);
else if(lp->lex.reservok)
break;
/* check for reserved word { or } */
@@ -1211,8 +1287,9 @@ int sh_lex(Lex_t* lp)
/* FALL THRU */
case S_EPAT:
epat:
- if(fcgetc(n)==LPAREN)
+ if(fcgetc(n)==LPAREN && c!='[')
{
+ epatchar = c;
if(lp->lex.incase==TEST_RE)
{
lp->lex.incase++;
@@ -1224,8 +1301,10 @@ int sh_lex(Lex_t* lp)
mode = ST_NESTED;
continue;
}
+ if(lp->lexd.warn && c=='[' && n=='^')
+ errormsg(SH_DICT,ERROR_warn(0),e_lexcharclass,shp->inlineno);
if(n>0)
- fcseek(-1);
+ fcseek(-LEN);
if(n=='=' && c=='+' && mode==ST_NAME)
continue;
break;
@@ -1320,13 +1399,9 @@ breakloop:
{
if(sh_isoption(SH_DICTIONARY))
lp->arg = sh_endword(shp,2);
- if(!sh_isoption(SH_NOEXEC))
- {
- lp->arg = sh_endword(shp,1);
- c &= ~ARG_MESSAGE;
- }
+ c |= ARG_MAC;
}
- if(c==0 || (c&(ARG_MAC|ARG_EXP)) || (lp->lexd.warn && !lp->lexd.docword))
+ if(c==0 || (c&(ARG_MAC|ARG_EXP|ARG_MESSAGE)))
{
lp->arg = (struct argnod*)stkfreeze(stkp,1);
lp->arg->argflag = (c?c:ARG_RAW);
@@ -1453,7 +1528,7 @@ breakloop:
/* yech - POSIX requires time -p */
while(fcgetc(n)==' ' || n=='\t');
if(n>0)
- fcseek(-1);
+ fcseek(-LEN);
if(n=='-')
c=0;
}
@@ -1467,6 +1542,7 @@ breakloop:
(np=nv_search(state,shp->alias_tree,HASH_SCOPE))
&& !nv_isattr(np,NV_NOEXPAND)
#if KSHELL
+ && (lp->aliasok!=2 || nv_isattr(np,BLT_DCL))
&& (!sh_isstate(SH_NOALIAS) || nv_isattr(np,NV_NOFREE))
#endif /* KSHELL */
&& (state=nv_getval(np)))
@@ -1491,7 +1567,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];
+ char *first,*cp=fcseek(0),word[5];
int off, messages=0, assignok=lp->assignok, csub;
struct lexstate save;
save = lp->lex;
@@ -1501,14 +1577,28 @@ 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(first=lp->lexd.first)
+ off = cp-first;
+ else
+ off = cp-fcfirst();
+ if(off<0)
+ c=*cp, *cp=0;
+ n = sh_lex(lp);
+ if(off<0)
+ *cp = c;
+ if(n==endtok || off<0)
{
- if(endtok==LPAREN && fcseek(0)==lp->lexd.first)
+ if(endtok==LPAREN && lp->lexd.paren)
{
+
+ if(first==lp->lexd.first)
+ {
+ n = cp+1-(char*)fcseek(0);
+ fcseek(n);
+ }
count++;
lp->lexd.paren = 0;
- fcseek(off+2);
+ fcgetc(c);
}
while(1)
{
@@ -1535,10 +1625,11 @@ static int comsub(register Lex_t *lp, int endtok)
}
skip:
if(c && (c!='#' || n==0))
- fcseek(-1);
+ fcseek(-LEN);
if(c==RBRACE && lp->lex.incase)
lp->lex.incase=0;
- switch(c=sh_lex(lp))
+ c=sh_lex(lp);
+ switch(c)
{
case LBRACE:
if(endtok==LBRACE && !lp->lex.incase)
@@ -1551,7 +1642,8 @@ static int comsub(register Lex_t *lp, int endtok)
rbrace:
if(endtok==LBRACE && --count<=0)
goto done;
- lp->comsub = (count==1);
+ if(count==1)
+ lp->comsub = endtok==LBRACE;
break;
case IPROCSYM: case OPROCSYM:
case LPAREN:
@@ -1571,7 +1663,7 @@ static int comsub(register Lex_t *lp, int endtok)
/* FALLTHROUGH */
case IOSEEKSYM:
if(fcgetc(c)!='#' && c>0)
- fcseek(-1);
+ fcseek(-LEN);
break;
case IODOCSYM:
lp->lexd.docextra = 0;
@@ -1582,11 +1674,13 @@ static int comsub(register Lex_t *lp, int endtok)
messages |= lp->lexd.message;
break;
case ';':
- fcgetc(c);
+ do
+ fcgetc(c);
+ while(!sh_lexstates[ST_BEGIN][c]);
if(c==RBRACE && endtok==LBRACE)
goto rbrace;
if(c>0)
- fcseek(-1);
+ fcseek(-LEN);
/* fall through*/
default:
lp->lex.reservok = 1;
@@ -1600,6 +1694,8 @@ done:
lp->lexd.dolparen--;
lp->lex = save;
lp->assignok = (endchar(lp)==RBRACT?assignok:0);
+ if(lp->heredoc)
+ errormsg(SH_DICT,ERROR_exit(SYNBAD),e_lexsyntax5,lp->sh->inlineno,lp->heredoc->ioname);
return(messages);
}
@@ -1610,13 +1706,14 @@ done:
static void nested_here(register Lex_t *lp)
{
register struct ionod *iop;
- register int n,offset;
+ register int n=0,offset;
struct argnod *arg = lp->arg;
Stk_t *stkp = lp->sh->stk;
char *base;
if(offset=stktell(stkp))
base = stkfreeze(stkp,0);
- n = fcseek(0)-lp->lexd.docend;
+ if(lp->lexd.docend)
+ n = fcseek(0)-lp->lexd.docend;
iop = newof(0,struct ionod,1,lp->lexd.docextra+n+ARGVAL);
iop->iolst = lp->heredoc;
stkseek(stkp,ARGVAL);
@@ -1624,6 +1721,7 @@ static void nested_here(register Lex_t *lp)
{
sfseek(lp->sh->strbuf,(Sfoff_t)0, SEEK_SET);
sfmove(lp->sh->strbuf,stkp,lp->lexd.docextra,-1);
+ sfseek(lp->sh->strbuf,(Sfoff_t)0, SEEK_SET);
}
sfwrite(stkp,lp->lexd.docend,n);
lp->arg = sh_endword(lp->sh,0);
@@ -1710,7 +1808,7 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
if(funlog=lp->sh->funlog)
{
if(fcfill()>0)
- fcseek(-1);
+ fcseek(-LEN);
lp->sh->funlog = 0;
}
if(iop->iolst)
@@ -1738,7 +1836,7 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
else
while(fcgetc(c)=='\t');
if(c>0)
- fcseek(-1);
+ fcseek(-LEN);
}
if(iop->iofile&IOQUOTE)
state = sh_lexstates[ST_LIT];
@@ -1751,34 +1849,65 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
if(n!=S_NL)
{
/* skip over regular characters */
+#if SHOPT_MULTIBYTE
+ do
+ {
+ if(fcleft()< MB_LEN_MAX && mbsize(fcseek(0))<0)
+ {
+ n = S_EOF;
+ LEN = -fcleft();
+ break;
+ }
+ }
+#endif /* SHOPT_MULTIBYTE */
+
while((n=STATE(state,c))==0);
}
if(n==S_EOF || !(c=fcget()))
{
- if(!lp->lexd.dolparen && (c=(fcseek(0)-1)-bufp))
+ if(LEN < 0)
+ c = fclast()-bufp;
+ else
+ c= (fcseek(0)-1)-bufp;
+ if(!lp->lexd.dolparen && c)
{
if(n==S_ESC)
c--;
- if((c=sfwrite(sp,bufp,c))>0)
+ if(!lp->lexd.dolparen && (c=sfwrite(sp,bufp,c))>0)
iop->iosize += c;
}
- if((c=lexfill(lp))<=0)
+#if SHOPT_MULTIBYTE
+ if(LEN==0)
+ LEN=1;
+ if(LEN < 0)
+ {
+ n = LEN;
+ c = fcmbget(&LEN);
+ LEN += n;
+ }
+ else
+#endif /* SHOPT_MULTIBYTE */
+ c = lexfill(lp);
+ if(c<0)
break;
if(n==S_ESC)
{
#if SHOPT_CRNL
if(c=='\r' && (c=fcget())!=NL)
- fcseek(-1);
+ fcseek(-LEN);
#endif /* SHOPT_CRNL */
if(c==NL)
fcseek(1);
- else
+ else if(!lp->lexd.dolparen)
+ {
+ iop->iosize++;
sfputc(sp,'\\');
+ }
}
- bufp = fcseek(-1);
+ bufp = fcseek(-LEN);
}
else
- fcseek(-1);
+ fcseek(-LEN);
switch(n)
{
case S_NL:
@@ -1812,7 +1941,7 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
fcgetc(c);
if(c<=0)
goto done;
- bufp = fcseek(-1);
+ bufp = fcseek(-LEN);
}
if(c!=iop->iodelim[0])
break;
@@ -1838,7 +1967,7 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
if(c=='\r' && (c=fcget())!=NL)
{
if(c)
- fcseek(-1);
+ fcseek(-LEN);
c='\r';
}
#endif /* SHOPT_CRNL */
@@ -1853,7 +1982,7 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
}
lp->sh->inlineno--;
if(c==RPAREN)
- fcseek(-1);
+ fcseek(-LEN);
goto done;
}
if(iop->iodelim[n++]!=c)
@@ -1866,12 +1995,12 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
*/
if(!lp->lexd.dolparen && nsave>0)
{
- if((n=sfwrite(sp,bufp,nsave))>0)
+ if((n=sfwrite(sp,iop->iodelim,nsave))>0)
iop->iosize += n;
bufp = fcfirst();
}
if(c==NL)
- fcseek(-1);
+ fcseek(-LEN);
break;
}
}
@@ -1883,7 +2012,7 @@ static int here_copy(Lex_t *lp,register struct ionod *iop)
{
fcseek(1);
if(c=fcget())
- fcseek(-1);
+ fcseek(-LEN);
if(c==NL)
n=2;
else
@@ -2004,6 +2133,7 @@ void sh_syntax(Lex_t *lp)
else
lp->lastline = shp->inlineno;
tokstr = fmttoken(lp,tok,tokbuf);
+ VALIDATE_FD(shp, shp->infd);
if((sp=fcfile()) || (shp->infd>=0 && (sp=shp->sftable[shp->infd])))
{
/* clear out any pending input */
@@ -2118,7 +2248,8 @@ struct argnod *sh_endword(Shell_t *shp,int mode)
if(ep)
{
*dp = 0;
- dp = ep+stresc(ep);
+ stresc(ep);
+ dp = ep+ strlen(ep);
}
ep = 0;
}
diff --git a/usr/src/lib/libshell/common/sh/macro.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/macro.c
index 8e6d37fbb1..856180d9dd 100644
--- a/usr/src/lib/libshell/common/sh/macro.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/macro.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -34,6 +34,8 @@
#include "defs.h"
#include <fcin.h>
#include <pwd.h>
+#include <ctype.h>
+#include <regex.h>
#include "name.h"
#include "variables.h"
#include "shlex.h"
@@ -49,9 +51,16 @@
# define STR_GROUP 0
#endif
-#if !SHOPT_MULTIBYTE
-#define mbchar(p) (*(unsigned char*)p++)
-#endif
+#if SHOPT_MULTIBYTE
+# undef isascii
+# define isacii(c) ((c)<=UCHAR_MAX)
+#else
+# define mbchar(p) (*(unsigned char*)p++)
+#endif /* SHOPT_MULTIBYTE */
+
+#if _WINIX
+ static int Skip;
+#endif /*_WINIX */
static int _c_;
typedef struct _mac_
@@ -63,6 +72,7 @@ typedef struct _mac_
int fields; /* number of fields */
short quoted; /* set when word has quotes */
unsigned char ifs; /* first char of IFS */
+ char atmode; /* when processing $@ */
char quote; /* set within double quoted contexts */
char lit; /* set within single quotes */
char split; /* set when word splittin is possible */
@@ -129,11 +139,11 @@ char *sh_mactry(Shell_t *shp,register char *string)
int jmp_val;
int savexit = shp->savexit;
struct checkpt buff;
- sh_pushcontext(&buff,SH_JMPSUB);
+ sh_pushcontext(shp,&buff,SH_JMPSUB);
jmp_val = sigsetjmp(buff.buff,0);
if(jmp_val == 0)
string = sh_mactrim(shp,string,0);
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
shp->savexit = savexit;
return(string);
}
@@ -176,7 +186,7 @@ char *sh_mactrim(Shell_t *shp, char *str, register int mode)
{
/* expand only if unique */
struct argnod *arglist=0;
- if((mode=path_expand(str,&arglist))==1)
+ if((mode=path_expand(shp,str,&arglist))==1)
str = arglist->argval;
else if(mode>1)
errormsg(SH_DICT,ERROR_exit(1),e_ambiguous,str);
@@ -203,7 +213,7 @@ int sh_macexpand(Shell_t* shp, register struct argnod *argp, struct argnod **arg
mp->ifs = *mp->ifsp;
else
mp->ifs = ' ';
- if((flag&ARG_OPTIMIZE) && !shp->indebug)
+ if((flag&ARG_OPTIMIZE) && !shp->indebug && !(flags&ARG_MESSAGE))
shp->argaddr = (char**)&argp->argchn.ap;
else
shp->argaddr = 0;
@@ -218,6 +228,7 @@ int sh_macexpand(Shell_t* shp, register struct argnod *argp, struct argnod **arg
str = argp->argval;
fcsopen(str);
mp->fields = 0;
+ mp->atmode = 0;
if(!arghead)
{
mp->split = 0;
@@ -241,7 +252,7 @@ int sh_macexpand(Shell_t* shp, register struct argnod *argp, struct argnod **arg
}
else
{
- endfield(mp,mp->quoted);
+ endfield(mp,mp->quoted|mp->atmode);
flags = mp->fields;
if(flags==1 && shp->argaddr)
argp->argchn.ap = *arghead;
@@ -349,6 +360,7 @@ void sh_machere(Shell_t *shp,Sfio_t *infile, Sfio_t *outfile, char *string)
Fcin_t save2;
int offset = stktell(stkp);
int offset2;
+ fcnotify(0,lp);
sfputc(stkp,c);
if(n==S_LBRA)
{
@@ -437,6 +449,7 @@ static void copyto(register Mac_t *mp,int endch, int newquote)
int brace = 0;
Sfio_t *sp = mp->sp;
Stk_t *stkp = mp->shp->stk;
+ char *resume = 0;
mp->sp = NIL(Sfio_t*);
mp->quote = newquote;
first = cp = fcseek(0);
@@ -495,7 +508,7 @@ static void copyto(register Mac_t *mp,int endch, int newquote)
int i;
unsigned char mb[8];
- n = wctomb((char*)mb, c);
+ n = mbconv((char*)mb, c);
for(i=0;i<n;i++)
sfputc(stkp,mb[i]);
}
@@ -533,7 +546,8 @@ static void copyto(register Mac_t *mp,int endch, int newquote)
/* also \alpha for extended patterns */
if(!mp->lit && !mp->quote)
{
- if((n==S_DIG || ((paren+ere) && sh_lexstates[ST_DOL][*(unsigned char*)cp]==S_ALP)))
+ int nc = *(unsigned char*)cp;
+ if((n==S_DIG || ((paren+ere) && (sh_lexstates[ST_DOL][nc]==S_ALP) || nc=='<' || nc=='>')))
break;
if(ere && mp->pattern==1 && strchr(".[()*+?{|^$&!",*cp))
break;
@@ -585,7 +599,39 @@ static void copyto(register Mac_t *mp,int endch, int newquote)
c = mp->pattern;
if(n==S_GRAVE)
comsubst(mp,(Shnode_t*)0,0);
- else if((n= *cp)==0 || !varsub(mp))
+ else if((n= *cp) == '"' && !mp->quote)
+ {
+ int off = stktell(stkp);
+ char *dp;
+ cp = first = fcseek(1);
+ mp->quote = 1;
+ if(!ERROR_translating())
+ break;
+ while(n=c, c= *++cp)
+ {
+ if(c=='\\' && n==c)
+ c = 0;
+ else if(c=='"' && n!='\\')
+ break;
+ }
+ n = cp-first;
+ sfwrite(stkp,first,n);
+ sfputc(stkp,0);
+ cp = stkptr(stkp,off);
+ dp = (char*)sh_translate(cp);
+ stkseek(stkp,off);
+ if(dp==cp)
+ {
+ cp = first;
+ break;
+ }
+ resume = fcseek(n);
+ fcclose();
+ fcsopen(dp);
+ cp = first = fcseek(0);
+ break;
+ }
+ else if(n==0 || !varsub(mp))
{
if(n=='\'' && !mp->quote)
ansi_c = 1;
@@ -593,14 +639,19 @@ static void copyto(register Mac_t *mp,int endch, int newquote)
sfputc(stkp,'$');
}
cp = first = fcseek(0);
- if(*cp)
+ if(mp->quote && cp)
mp->pattern = c;
break;
case S_ENDCH:
if((mp->lit || cp[-1]!=endch || mp->quote!=newquote))
goto pattern;
- if(endch==RBRACE && *cp==LPAREN && mp->pattern && brace)
- goto pattern;
+ if(endch==RBRACE && mp->pattern && brace)
+ {
+ brace--;
+ if(*cp==LPAREN && mp->pattern!=2)
+ goto pattern;
+ continue;
+ }
/* FALLTHROUGH */
case S_EOF:
if(c)
@@ -610,6 +661,14 @@ static void copyto(register Mac_t *mp,int endch, int newquote)
else
sfwrite(stkp,first,c);
}
+ if(n==S_EOF && resume)
+ {
+ fcclose();
+ fcsopen(resume);
+ resume = 0;
+ cp = first = fcseek(0);
+ continue;
+ }
c += (n!=S_EOF);
first = fcseek(c);
if(tilde>=0)
@@ -693,8 +752,12 @@ e_badsubscript,*cp);
if((cp-first)>1 && cp[-2]=='~')
{
char *p = cp;
- while((c=mbchar(p)) && c!=RPAREN && c!='E');
- ere = (c=='E'||c=='A');
+ while((c=mbchar(p)) && c!=RPAREN)
+ if(c=='A'||c=='E'||c=='K'||c=='P'||c=='X')
+ {
+ ere = 1;
+ break;
+ }
}
}
else if(n==RPAREN)
@@ -716,7 +779,7 @@ e_badsubscript,*cp);
if(!(mp->quote || mp->lit))
{
mp->patfound = mp->split && sh_isoption(SH_BRACEEXPAND);
- brace = 1;
+ brace++;
}
pattern:
if(!mp->pattern || !(mp->quote || mp->lit))
@@ -751,6 +814,13 @@ e_badsubscript,*cp);
sfwrite(stkp,first,c);
first = fcseek(c);
tilde_expand2(mp->shp,tilde);
+#if _WINIX
+ if(Skip)
+ {
+ first = cp = fcseek(Skip);
+ Skip = 0;
+ }
+#endif /*_WINIX */
tilde = -1;
c=0;
}
@@ -796,22 +866,7 @@ done:
static void mac_substitute(Mac_t *mp, register char *cp,char *str,register int subexp[],int subsize)
{
register int c,n;
- register char *first=fcseek(0);
- char *ptr;
- Mac_t savemac;
- Stk_t *stkp = mp->shp->stk;
- n = stktell(stkp);
- savemac = *mp;
- mp->pattern = 3;
- mp->split = 0;
- fcsopen(cp);
- copyto(mp,0,0);
- sfputc(stkp,0);
- ptr = cp = strdup(stkptr(stkp,n));
- stkseek(stkp,n);
- *mp = savemac;
- fcsopen(first);
- first = cp;
+ register char *first=cp;
while(1)
{
while((c= *cp++) && c!=ESCAPE);
@@ -839,7 +894,6 @@ static void mac_substitute(Mac_t *mp, register char *cp,char *str,register int s
}
if(n=cp-first-1)
mac_copy(mp,first,n);
- free(ptr);
}
#if SHOPT_FILESCAN
@@ -980,20 +1034,26 @@ int sh_macfun(Shell_t *shp, const char *name, int offset)
if(np)
{
/* treat ${x.foo} as ${x.foo;} */
- Shnode_t *tp;
- char buff[sizeof(struct dolnod)+sizeof(char*)];
- struct comnod node;
- struct dolnod *dp = (struct dolnod*)buff;
- memset(&node,0,sizeof(node));
- memset(&buff,0,sizeof(buff));
- tp = (Shnode_t*)&node;
- tp->com.comarg = (struct argnod*)dp;
- tp->com.comline = shp->inlineno;
- dp->dolnum = 1;
- dp->dolval[0] = strdup(name);
+ union
+ {
+ struct comnod com;
+ Shnode_t node;
+ } t;
+ union
+ {
+ struct argnod arg;
+ struct dolnod dol;
+ char buff[sizeof(struct dolnod)+sizeof(char*)];
+ } d;
+ memset(&t,0,sizeof(t));
+ memset(&d,0,sizeof(d));
+ t.node.com.comarg = &d.arg;
+ t.node.com.comline = shp->inlineno;
+ d.dol.dolnum = 1;
+ d.dol.dolval[0] = strdup(name);
stkseek(shp->stk,offset);
- comsubst((Mac_t*)shp->mac_context,tp,2);
- free(dp->dolval[0]);
+ comsubst((Mac_t*)shp->mac_context,&t.node,2);
+ free(d.dol.dolval[0]);
return(1);
}
return(0);
@@ -1036,14 +1096,15 @@ static int varsub(Mac_t *mp)
Lex_t *lp = (Lex_t*)mp->shp->lex_context;
Namarr_t *ap=0;
int dolmax=0, vsize= -1, offset= -1, nulflg, replen=0, bysub=0;
- char idbuff[3], *id = idbuff, *pattern=0, *repstr, *arrmax=0;
+ char idbuff[3], *id = idbuff, *pattern=0, *repstr=0, *arrmax=0;
+ char *idx = 0;
int var=1,addsub=0,oldpat=mp->pattern,idnum=0,flag=0,d;
Stk_t *stkp = mp->shp->stk;
retry1:
mp->zeros = 0;
idbuff[0] = 0;
idbuff[1] = 0;
- c = fcget();
+ c = fcmbget(&LEN);
switch(isascii(c)?sh_lexstates[ST_DOL][c]:S_ALP)
{
case S_RBRA:
@@ -1090,12 +1151,13 @@ retry1:
#if SHOPT_FILESCAN
if(mp->shp->cur_line)
{
- v = getdolarg(&sh,1,(int*)0);
+ v = getdolarg(mp->shp,1,(int*)0);
dolmax = MAX_ARGN;
}
else
#endif /* SHOPT_FILESCAN */
dolmax = mp->shp->st.dolc+1;
+ mp->atmode = (v && mp->quoted && c=='@');
dolg = (v!=0);
}
break;
@@ -1127,7 +1189,7 @@ retry1:
else if(mp->shp->cur_line)
{
mp->shp->used_pos = 1;
- v = getdolarg(&sh,c,&vsize);
+ v = getdolarg(mp->shp,c,&vsize);
}
#endif /* SHOPT_FILESCAN */
else if(c <= mp->shp->st.dolc)
@@ -1137,6 +1199,13 @@ retry1:
}
else
v = 0;
+ if(!v && sh_isoption(SH_NOUNSET))
+ {
+ d=fcget();
+ fcseek(-1);
+ if(d=='\0' || !strchr(":+-?=",d))
+ errormsg(SH_DICT,ERROR_exit(1),e_notset,ltos(c));
+ }
break;
case S_ALP:
if(c=='.' && type==0)
@@ -1144,20 +1213,26 @@ retry1:
offset = stktell(stkp);
do
{
+ register int d;
np = 0;
do
- sfputc(stkp,c);
- while(((c=fcget()),(!isascii(c)||isaname(c)))||type && c=='.');
+ {
+ if(LEN==1)
+ sfputc(stkp,c);
+ else
+ sfwrite(stkp,fcseek(0)-LEN,LEN);
+ }
+ while((d=c,(c=fcmbget(&LEN)),isaname(c))||type && c=='.');
while(c==LBRACT && (type||mp->arrayok))
{
mp->shp->argaddr=0;
- if((c=fcget(),isastchar(c)) && fcpeek(0)==RBRACT)
+ if((c=fcmbget(&LEN),isastchar(c)) && fcpeek(0)==RBRACT && d!='.')
{
if(type==M_VNAME)
type = M_SUBNAME;
idbuff[0] = mode = c;
fcget();
- c = fcget();
+ c = fcmbget(&LEN);
if(c=='.' || c==LBRACT)
{
sfputc(stkp,LBRACT);
@@ -1170,9 +1245,10 @@ retry1:
}
else
{
- fcseek(-1);
+ fcseek(-LEN);
c = stktell(stkp);
- sfputc(stkp,LBRACT);
+ if(d!='.')
+ sfputc(stkp,LBRACT);
v = stkptr(stkp,subcopy(mp,1));
if(type && mp->dotdot)
{
@@ -1183,16 +1259,16 @@ retry1:
else if(type==M_SIZE)
goto nosub;
}
- else
+ else if(d!='.')
sfputc(stkp,RBRACT);
- c = fcget();
+ c = fcmbget(&LEN);
if(c==0 && type==M_VNAME)
type = M_SUBNAME;
}
}
}
while(type && c=='.');
- if(c==RBRACE && type && fcpeek(-2)=='.')
+ if(type!=M_VNAME && c==RBRACE && type && fcpeek(-2)=='.')
{
/* ${x.} or ${x..} */
if(fcpeek(-3) == '.')
@@ -1225,7 +1301,11 @@ retry1:
}
flag |= NV_NOASSIGN|NV_VARNAME|NV_NOADD;
if(c=='=' || c=='?' || (c==':' && ((d=fcpeek(0))=='=' || d=='?')))
+ {
+ if(c=='=' || (c==':' && d=='='))
+ flag |= NV_ASSIGN;
flag &= ~NV_NOADD;
+ }
#if SHOPT_FILESCAN
if(mp->shp->cur_line && *id=='R' && strcmp(id,"REPLY")==0)
{
@@ -1238,6 +1318,11 @@ retry1:
if(mp->shp->argaddr)
flag &= ~NV_NOADD;
np = nv_open(id,mp->shp->var_tree,flag|NV_NOFAIL);
+ if(!np)
+ {
+ sfprintf(mp->shp->strbuf,"%s%c",id,0);
+ id = sfstruse(mp->shp->strbuf);
+ }
}
if(isastchar(mode))
var = 0;
@@ -1245,7 +1330,7 @@ retry1:
{
if(sh_macfun(mp->shp,id,offset))
{
- fcget();
+ fcmbget(&LEN);
return(1);
}
}
@@ -1253,7 +1338,11 @@ retry1:
{
if(nv_isattr(np,NV_NOFREE))
nv_offattr(np,NV_NOFREE);
+#if SHOPT_FILESCAN
+ else if(np!=REPLYNOD || !mp->shp->cur_line)
+#else
else
+#endif /* SHOPT_FILESCAN */
np = 0;
}
ap = np?nv_arrayptr(np):0;
@@ -1261,6 +1350,13 @@ retry1:
{
if(mp->dotdot)
{
+ Namval_t *nq;
+#if SHOPT_FIXEDARRAY
+ if(ap && !ap->fixed && (nq=nv_opensub(np)))
+#else
+ if(ap && (nq=nv_opensub(np)))
+#endif /* SHOPT_FIXEDARRAY */
+ ap = nv_arrayptr(np=nq);
if(ap)
{
nv_putsub(np,v,ARRAY_SCAN);
@@ -1268,14 +1364,14 @@ retry1:
dolmax =1;
if(array_assoc(ap))
arrmax = strdup(v);
- else if((dolmax = (int)sh_arith(v))<0)
+ else if((dolmax = (int)sh_arith(mp->shp,v))<0)
dolmax += array_maxindex(np);
if(type==M_SUBNAME)
bysub = 1;
}
else
{
- if((int)sh_arith(v))
+ if((int)sh_arith(mp->shp,v))
np = 0;
}
}
@@ -1284,21 +1380,21 @@ retry1:
if(!isbracechar(c))
goto nosub;
else
- fcseek(-1);
+ fcseek(-LEN);
}
else
fcseek(-1);
if(type<=1 && np && nv_isvtree(np) && mp->pattern==1 && !mp->split)
{
- int peek=1,cc=fcget();
+ int cc=fcmbget(&LEN),peek=LEN;
if(type && cc=='}')
{
- cc = fcget();
- peek = 2;
+ cc = fcmbget(&LEN);
+ peek++;
}
if(mp->quote && cc=='"')
{
- cc = fcget();
+ cc = fcmbget(&LEN);
peek++;
}
fcseek(-peek);
@@ -1349,8 +1445,9 @@ retry1:
}
else
v = nv_getval(np);
+ mp->atmode = (v && mp->quoted && mode=='@');
/* special case --- ignore leading zeros */
- if( (mp->arith||mp->let) && (np->nvfun || nv_isattr(np,(NV_LJUST|NV_RJUST|NV_ZFILL))) && (offset==0 || !isalnum(c)))
+ if((mp->let || (mp->arith&&nv_isattr(np,(NV_LJUST|NV_RJUST|NV_ZFILL)))) && !nv_isattr(np,NV_INTEGER) && (offset==0 || isspace(c) || strchr(",.+-*/=%&|^?!<>",c)))
mp->zeros = 1;
}
if(savptr==stakptr(0))
@@ -1360,6 +1457,8 @@ retry1:
}
else
{
+ if(sh_isoption(SH_NOUNSET) && !isastchar(mode) && (type==M_VNAME || type==M_SIZE))
+ errormsg(SH_DICT,ERROR_exit(1),e_notset,id);
v = 0;
if(type==M_VNAME)
{
@@ -1379,7 +1478,11 @@ retry1:
if(isastchar(mode) && array_elem(ap)> !c)
dolg = -1;
else
+ {
+ ap->nelem &= ~ARRAY_SCAN;
dolg = 0;
+
+ }
}
break;
case S_EOF:
@@ -1387,7 +1490,7 @@ retry1:
default:
goto nosub;
}
- c = fcget();
+ c = fcmbget(&LEN);
if(type>M_TREE)
{
if(c!=RBRACE)
@@ -1395,7 +1498,7 @@ retry1:
if(type==M_NAMESCAN || type==M_NAMECOUNT)
{
mp->shp->last_root = mp->shp->var_tree;
- id = prefix(mp->shp,id);
+ id = idx = prefix(mp->shp,id);
stkseek(stkp,offset);
if(type==M_NAMECOUNT)
{
@@ -1434,7 +1537,7 @@ retry1:
#if SHOPT_FILESCAN
if(mp->shp->cur_line)
{
- getdolarg(&sh,MAX_ARGN,(int*)0);
+ getdolarg(mp->shp,MAX_ARGN,(int*)0);
c = mp->shp->offsets[0];
}
else
@@ -1453,12 +1556,12 @@ retry1:
nulflg = 0;
if(type && c==':')
{
- c = fcget();
- if(sh_lexstates[ST_BRACE][c]==S_MOD1 && c!='*' && c!= ':')
+ c = fcmbget(&LEN);
+ if(isascii(c) &&sh_lexstates[ST_BRACE][c]==S_MOD1 && c!='*' && c!= ':')
nulflg=1;
else if(c!='%' && c!='#')
{
- fcseek(-1);
+ fcseek(-LEN);
c = ':';
}
}
@@ -1468,13 +1571,15 @@ retry1:
{
if(!nulflg)
mac_error(np);
- fcseek(-1);
+ fcseek(-LEN);
c = ':';
}
if(c!=RBRACE)
{
int newops = (c=='#' || c == '%' || c=='/');
offset = stktell(stkp);
+ if(newops && sh_isoption(SH_NOUNSET) && *id && id!=idbuff && (!np || nv_isnull(np)))
+ errormsg(SH_DICT,ERROR_exit(1),e_notset,id);
if(c=='/' ||c==':' || ((!v || (nulflg && *v==0)) ^ (c=='+'||c=='#'||c=='%')))
{
int newquote = mp->quote;
@@ -1488,8 +1593,8 @@ retry1:
type = fcget();
if(type=='%' || type=='#')
{
- int d = fcget();
- fcseek(-1);
+ int d = fcmbget(&LEN);
+ fcseek(-LEN);
if(d=='(')
type = 0;
}
@@ -1514,7 +1619,8 @@ retry1:
mp->assign = assign;
/* add null byte */
sfputc(stkp,0);
- stkseek(stkp,stktell(stkp)-1);
+ if(c!='=')
+ stkseek(stkp,stktell(stkp)-1);
}
else
{
@@ -1544,7 +1650,7 @@ retry1:
#if SHOPT_FILESCAN
else if(mp->shp->cur_line)
{
- v = getdolarg(&sh,dolg=type,&vsize);
+ v = getdolarg(mp->shp,dolg=type,&vsize);
if(!v)
dolmax = type;
}
@@ -1578,6 +1684,8 @@ retry1:
}
else if(type>0)
v = 0;
+ if(!v)
+ mp->atmode = 0;
}
else if(v)
{
@@ -1590,23 +1698,22 @@ retry1:
else if(mbwide())
{
mbinit();
- while(type-->0)
- {
- if((c=mbsize(v))<1)
- c = 1;
- v += c;
- }
+ for(c=type;c;c--)
+ mbchar(v);
c = ':';
}
#endif /* SHOPT_MULTIBYTE */
else
v += type;
- vsize -= type;
+ vsize = v?strlen(v):0;
}
if(*ptr==':')
{
if((type = (int)sh_strnum(ptr+1,&ptr,1)) <=0)
+ {
v = 0;
+ mp->atmode = 0;
+ }
else if(isastchar(mode))
{
if(dolg>=0)
@@ -1636,6 +1743,8 @@ retry1:
#endif /* SHOPT_MULTIBYTE */
vsize = type;
}
+ else
+ vsize = v?strlen(v):0;
}
if(*ptr)
mac_error(np);
@@ -1665,7 +1774,22 @@ retry1:
}
pattern = strdup(argp);
if((type=='/' || c=='/') && (repstr = mac_getstring(pattern)))
+ {
+ Mac_t savemac;
+ char *first = fcseek(0);
+ int n = stktell(stkp);
+ savemac = *mp;
+ fcsopen(repstr);
+ mp->pattern = 3;
+ mp->split = 0;
+ copyto(mp,0,0);
+ sfputc(stkp,0);
+ repstr = strdup(stkptr(stkp,n));
replen = strlen(repstr);
+ stkseek(stkp,n);
+ *mp = savemac;
+ fcsopen(first);
+ }
if(v || c=='/' && offset>=0)
stkseek(stkp,offset);
}
@@ -1676,7 +1800,8 @@ retry2:
if(v && (!nulflg || *v ) && c!='+')
{
register int d = (mode=='@'?' ':mp->ifs);
- int match[2*(MATCH_MAX+1)], nmatch, nmatch_prev, vsize_last;
+ regoff_t match[2*(MATCH_MAX+1)];
+ int nmatch, nmatch_prev, vsize_last;
char *vlast;
while(1)
{
@@ -1684,6 +1809,7 @@ retry2:
v= "";
if(c=='/' || c=='#' || c== '%')
{
+ int index = 0;
flag = (type || c=='/')?(STR_GROUP|STR_MAXIMAL):STR_GROUP;
if(c!='/')
flag |= STR_LEFT;
@@ -1696,8 +1822,8 @@ retry2:
nmatch=substring(v,pattern,match,flag&STR_MAXIMAL);
else
nmatch=strgrpmatch(v,pattern,match,elementsof(match)/2,flag);
- if(replen>0)
- sh_setmatch(v,vsize,nmatch,match);
+ if(nmatch && replen>0)
+ sh_setmatch(mp->shp,v,vsize,nmatch,match,index++);
if(nmatch)
{
vlast = v;
@@ -1729,13 +1855,15 @@ retry2:
break;
}
if(replen==0)
- sh_setmatch(vlast,vsize_last,nmatch,match);
+ sh_setmatch(mp->shp,vlast,vsize_last,nmatch,match,index++);
}
if(vsize)
mac_copy(mp,v,vsize>0?vsize:strlen(v));
if(addsub)
{
+ mp->shp->instance++;
sfprintf(mp->shp->strbuf,"[%s]",nv_getsub(np));
+ mp->shp->instance--;
v = sfstruse(mp->shp->strbuf);
mac_copy(mp, v, strlen(v));
}
@@ -1769,7 +1897,7 @@ retry2:
{
if(dolmax==MAX_ARGN && isastchar(mode))
break;
- if(!(v=getdolarg(&sh,dolg,&vsize)))
+ if(!(v=getdolarg(mp->shp,dolg,&vsize)))
{
dolmax = dolg;
break;
@@ -1805,6 +1933,7 @@ retry2:
if(!np)
mp->pattern = 0;
endfield(mp,mp->quoted);
+ mp->atmode = mode=='@';
mp->pattern = oldpat;
}
else if(d)
@@ -1817,8 +1946,6 @@ retry2:
}
if(arrmax)
free((void*)arrmax);
- if(pattern)
- free((void*)pattern);
}
else if(argp)
{
@@ -1873,6 +2000,12 @@ retry2:
}
if(np)
nv_close(np);
+ if(pattern)
+ free(pattern);
+ if(repstr)
+ free(repstr);
+ if(idx)
+ free(idx);
return(1);
nosub:
if(type==M_BRACE && sh_lexstates[ST_NORM][c]==S_BREAK)
@@ -1903,15 +2036,20 @@ static void comsubst(Mac_t *mp,register Shnode_t* t, int type)
struct slnod *saveslp = mp->shp->st.staklist;
struct _mac_ savemac;
int savtop = stktell(stkp);
- char lastc, *savptr = stkfreeze(stkp,0);
+ char lastc=0, *savptr = stkfreeze(stkp,0);
int was_history = sh_isstate(SH_HISTORY);
int was_verbose = sh_isstate(SH_VERBOSE);
int was_interactive = sh_isstate(SH_INTERACTIVE);
int newlines,bufsize,nextnewlines;
+ Sfoff_t foff;
Namval_t *np;
mp->shp->argaddr = 0;
savemac = *mp;
mp->shp->st.staklist=0;
+#ifdef SHOPT_COSHELL
+ if(mp->shp->inpool)
+ return;
+#endif /*SHOPT_COSHELL */
if(type)
{
sp = 0;
@@ -1920,11 +2058,15 @@ static void comsubst(Mac_t *mp,register Shnode_t* t, int type)
t = sh_dolparen((Lex_t*)mp->shp->lex_context);
if(t && t->tre.tretyp==TARITH)
{
+ mp->shp->inarith = 1;
fcsave(&save);
- if((t->ar.arexpr->argflag&ARG_RAW))
+ if(t->ar.arcomp)
num = arith_exec(t->ar.arcomp);
+ else if((t->ar.arexpr->argflag&ARG_RAW))
+ num = sh_arith(mp->shp,t->ar.arexpr->argval);
else
- num = sh_arith(sh_mactrim(mp->shp,t->ar.arexpr->argval,3));
+ num = sh_arith(mp->shp,sh_mactrim(mp->shp,t->ar.arexpr->argval,3));
+ mp->shp->inarith = 0;
out_offset:
stkset(stkp,savptr,savtop);
*mp = savemac;
@@ -1980,27 +2122,29 @@ static void comsubst(Mac_t *mp,register Shnode_t* t, int type)
int r;
struct checkpt buff;
struct ionod *ip=0;
- sh_pushcontext(&buff,SH_JMPIO);
+ sh_pushcontext(mp->shp,&buff,SH_JMPIO);
if((ip=t->tre.treio) &&
((ip->iofile&IOLSEEK) || !(ip->iofile&IOUFD)) &&
(r=sigsetjmp(buff.buff,0))==0)
fd = sh_redirect(mp->shp,ip,3);
else
fd = sh_chkopen(e_devnull);
- sh_popcontext(&buff);
+ sh_popcontext(mp->shp,&buff);
if(r==0 && ip && (ip->iofile&IOLSEEK))
{
+ VALIDATE_FD(mp->shp, fd);
if(sp=mp->shp->sftable[fd])
num = sftell(sp);
else
num = lseek(fd, (off_t)0, SEEK_CUR);
goto out_offset;
}
- sp = sfnew(NIL(Sfio_t*),(char*)malloc(IOBSIZE+1),IOBSIZE,fd,SF_READ|SF_MALLOC);
+ if(!(sp=mp->shp->sftable[fd]))
+ sp = sfnew(NIL(Sfio_t*),(char*)malloc(IOBSIZE+1),IOBSIZE,fd,SF_READ|SF_MALLOC);
type = 3;
}
else
- sp = sh_subshell(t,sh_isstate(SH_ERREXIT),type);
+ sp = sh_subshell(mp->shp,t,sh_isstate(SH_ERREXIT),type);
fcrestore(&save);
}
else
@@ -2020,13 +2164,19 @@ static void comsubst(Mac_t *mp,register Shnode_t* t, int type)
mp->ifsp = nv_getval(np);
stkset(stkp,savptr,savtop);
newlines = 0;
- lastc = 0;
sfsetbuf(sp,(void*)sp,0);
bufsize = sfvalue(sp);
/* read command substitution output and put on stack or here-doc */
sfpool(sp, NIL(Sfio_t*), SF_WRITE);
sh_offstate(SH_INTERACTIVE);
- while((str=(char*)sfreserve(sp,SF_UNBOUND,0)) && (c = sfvalue(sp))>0)
+ if((foff = sfseek(sp,(Sfoff_t)0,SEEK_END)) > 0)
+ {
+ size_t soff = stktell(stkp);
+ sfseek(sp,(Sfoff_t)0,SEEK_SET);
+ stkseek(stkp,soff+foff+64);
+ stkseek(stkp,soff);
+ }
+ while((str=(char*)sfreserve(sp,SF_UNBOUND,0)) && (c=bufsize=sfvalue(sp))>0)
{
#if SHOPT_CRNL
/* eliminate <cr> */
@@ -2079,16 +2229,17 @@ static void comsubst(Mac_t *mp,register Shnode_t* t, int type)
str[c] = 0;
else
{
+ ssize_t len = 1;
+
/* can't write past buffer so save last character */
- lastc = str[--c];
+ c -= len;
+ lastc = str[c];
str[c] = 0;
}
mac_copy(mp,str,c);
}
if(was_interactive)
sh_onstate(SH_INTERACTIVE);
- if(mp->shp->spid)
- job_wait(mp->shp->spid);
if(--newlines>0 && mp->shp->ifstable['\n']==S_DELIM)
{
if(mp->sp)
@@ -2100,7 +2251,10 @@ static void comsubst(Mac_t *mp,register Shnode_t* t, int type)
sfnputc(stkp,'\n',newlines);
}
if(lastc)
+ {
mac_copy(mp,&lastc,1);
+ lastc = 0;
+ }
sfclose(sp);
return;
}
@@ -2114,18 +2268,23 @@ static void mac_copy(register Mac_t *mp,register const char *str, register int s
register const char *cp=str;
register int c,n,nopat,len;
Stk_t *stkp=mp->shp->stk;
- nopat = (mp->quote||mp->assign==1||mp->arith);
+ int oldpat = mp->pattern;
+ nopat = (mp->quote||(mp->assign==1)||mp->arith);
if(mp->zeros)
{
/* prevent leading 0's from becomming octal constants */
while(size>1 && *str=='0')
+ {
+ if(str[1]=='x' || str[1]=='X')
+ break;
str++,size--;
+ }
mp->zeros = 0;
cp = str;
}
if(mp->sp)
sfwrite(mp->sp,str,size);
- else if(mp->pattern>=2 || (mp->pattern && nopat))
+ else if(mp->pattern>=2 || (mp->pattern && nopat) || mp->assign==3)
{
state = sh_lexstates[ST_MACRO];
/* insert \ before file expansion characters */
@@ -2140,10 +2299,32 @@ static void mac_copy(register Mac_t *mp,register const char *str, register int s
}
#endif
c = state[n= *(unsigned char*)cp++];
+ if(mp->assign==3 && mp->pattern!=4)
+ {
+ if(c==S_BRACT)
+ {
+ nopat = 0;
+ mp->pattern = 4;
+ }
+ continue;
+ }
if(nopat&&(c==S_PAT||c==S_ESC||c==S_BRACT||c==S_ENDCH) && mp->pattern!=3)
c=1;
else if(mp->pattern==4 && (c==S_ESC||c==S_BRACT||c==S_ENDCH || isastchar(n)))
- c=1;
+ {
+ if(c==S_ENDCH && oldpat!=4)
+ {
+ if(*cp==0 || *cp=='.' || *cp=='[')
+ {
+ mp->pattern = oldpat;
+ c=0;
+ }
+ else
+ c=1;
+ }
+ else
+ c=1;
+ }
else if(mp->pattern==2 && c==S_SLASH)
c=1;
else if(mp->pattern==3 && c==S_ESC && (state[*(unsigned char*)cp]==S_DIG||(*cp==ESCAPE)))
@@ -2289,13 +2470,14 @@ static void endfield(register Mac_t *mp,int split)
argp = (struct argnod*)stkfreeze(stkp,1);
argp->argnxt.cp = 0;
argp->argflag = 0;
+ mp->atmode = 0;
if(mp->patfound)
{
mp->shp->argaddr = 0;
#if SHOPT_BRACEPAT
- count = path_generate(argp,mp->arghead);
+ count = path_generate(mp->shp,argp,mp->arghead);
#else
- count = path_expand(argp->argval,mp->arghead);
+ count = path_expand(mp->shp,argp->argval,mp->arghead);
#endif /* SHOPT_BRACEPAT */
if(count)
mp->fields += count;
@@ -2415,9 +2597,9 @@ static int charlen(const char *string,int len)
/*
* This is the default tilde discipline function
*/
-static int sh_btilde(int argc, char *argv[], void *context)
+static int sh_btilde(int argc, char *argv[], Shbltin_t *context)
{
- Shell_t *shp = ((Shbltin_t*)context)->shp;
+ Shell_t *shp = context->shp;
char *cp = sh_tilde(shp,argv[1]);
NOT_USED(argc);
if(!cp)
@@ -2446,13 +2628,13 @@ static void tilde_expand2(Shell_t *shp, register int offset)
av[0] = ".sh.tilde";
av[1] = &ptr[offset];
av[2] = 0;
- iop = sftmp(IOBSIZE+1);;
+ iop = sftmp((IOBSIZE>PATH_MAX?IOBSIZE:PATH_MAX)+1);
sfset(iop,SF_READ,0);
sfstdout = iop;
if(np)
sh_fun(np, (Namval_t*)0, av);
else
- sh_btilde(2, av, &sh);
+ sh_btilde(2, av, &shp->bltindata);
sfstdout = save;
stkset(shp->stk,ptr, offset);
sfseek(iop,(Sfoff_t)0,SEEK_SET);
@@ -2504,14 +2686,49 @@ static char *sh_tilde(Shell_t *shp,register const char *string)
cp = nv_getval(sh_scoped(shp,OLDPWDNOD));
return(cp);
}
+#if _WINIX
+ if(fcgetc(c)=='/')
+ {
+ char *str;
+ int n=0,offset=staktell();
+ stakputs(string);
+ do
+ {
+ stakputc(c);
+ n++;
+ }
+ while (fcgetc(c) && c!='/');
+ stakputc(0);
+ if(c)
+ fcseek(-1);
+ str = stakseek(offset);
+ Skip = n;
+ if(logins_tree && (np=nv_search(str,logins_tree,0)))
+ return(nv_getval(np));
+ if(pw = getpwnam(str))
+ {
+ string = str;
+ goto skip;
+ }
+ Skip = 0;
+ }
+#endif /* _WINIX */
if(logins_tree && (np=nv_search(string,logins_tree,0)))
return(nv_getval(np));
if(!(pw = getpwnam(string)))
return(NIL(char*));
+#if _WINIX
+skip:
+#endif /* _WINIX */
if(!logins_tree)
logins_tree = dtopen(&_Nvdisc,Dtbag);
if(np=nv_search(string,logins_tree,NV_ADD))
+ {
+ c = shp->subshell;
+ shp->subshell = 0;
nv_putval(np, pw->pw_dir,0);
+ shp->subshell = c;
+ }
return(pw->pw_dir);
}
@@ -2538,11 +2755,15 @@ static char *special(Shell_t *shp,register int c)
return(ltos(shp->st.dolc));
case '!':
if(shp->bckpid)
+#if SHOPT_COSHELL
+ return(sh_pid2str(shp,shp->bckpid));
+#else
return(ltos(shp->bckpid));
+#endif /* SHOPT_COSHELL */
break;
case '$':
if(nv_isnull(SH_DOLLARNOD))
- return(ltos(shp->pid));
+ return(ltos(shp->gd->pid));
return(nv_getval(SH_DOLLARNOD));
case '-':
return(sh_argdolminus(shp->arg_context));
diff --git a/usr/src/lib/libshell/common/sh/main.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/main.c
index a1dc119bcb..e5fdc550b7 100644
--- a/usr/src/lib/libshell/common/sh/main.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/main.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -26,6 +26,9 @@
* AT&T Labs
*
*/
+/*
+ * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ */
#include <ast.h>
#include <sfio.h>
@@ -80,23 +83,6 @@ static char beenhere = 0;
}
#endif /* _lib_sigvec */
-#ifdef _lib_fts_notify
-# include <fts.h>
- /* check for interrupts during tree walks */
- static int fts_sigcheck(FTS* fp, FTSENT* ep, void* context)
- {
- Shell_t *shp = (Shell_t*)context;
- NOT_USED(fp);
- NOT_USED(ep);
- if(shp->trapnote&SH_SIGSET)
- {
- errno = EINTR;
- return(-1);
- }
- return(0);
- }
-#endif /* _lib_fts_notify */
-
#ifdef PATH_BFPATH
#define PATHCOMP NIL(Pathcomp_t*)
#else
@@ -114,14 +100,14 @@ int sh_source(Shell_t *shp, Sfio_t *iop, const char *file)
char* nid;
int fd;
- if (!file || !*file || (fd = path_open(file, PATHCOMP)) < 0)
+ if (!file || !*file || (fd = path_open(shp,file, PATHCOMP)) < 0)
{
REGRESS(source, "sh_source", ("%s:ENOENT", file));
return 0;
}
oid = error_info.id;
nid = error_info.id = strdup(file);
- shp->st.filename = path_fullname(stakptr(PATH_OFFSET));
+ shp->st.filename = path_fullname(shp,stakptr(PATH_OFFSET));
REGRESS(source, "sh_source", ("%s", file));
exfile(shp, iop, fd);
error_info.id = oid;
@@ -144,6 +130,7 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
struct stat statb;
int i, rshflag; /* set for restricted shell */
char *command;
+ free(malloc(64*1024));
#ifdef _lib_sigvec
/* This is to clear mask that may be left on by rlogin */
clearsigmask(SIGALRM);
@@ -158,23 +145,20 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
time(&mailtime);
if(rshflag=sh_isoption(SH_RESTRICTED))
sh_offoption(SH_RESTRICTED);
-#ifdef _lib_fts_notify
- fts_notify(fts_sigcheck,(void*)shp);
-#endif /* _lib_fts_notify */
if(sigsetjmp(*((sigjmp_buf*)shp->jmpbuffer),0))
{
/* begin script execution here */
sh_reinit((char**)0);
+ shp->gd->pid = getpid();
+ shp->gd->ppid = getppid();
}
shp->fn_depth = shp->dot_depth = 0;
command = error_info.id;
/* set pidname '$$' */
- shp->pid = getpid();
- srand(shp->pid&0x7fff);
- shp->ppid = getppid();
+ srand(shp->gd->pid&0x7fff);
if(nv_isnull(PS4NOD))
nv_putval(PS4NOD,e_traceprompt,NV_RDONLY);
- path_pwd(1);
+ path_pwd(shp,1);
iop = (Sfio_t*)0;
#if SHOPT_BRACEPAT
sh_onoption(SH_BRACEEXPAND);
@@ -183,7 +167,7 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
{
sh_onstate(SH_PROFILE);
((Lex_t*)shp->lex_context)->nonstandard = 0;
- if(shp->ppid==1)
+ if(shp->gd->ppid==1)
shp->login_sh++;
if(shp->login_sh >= 2)
sh_onoption(SH_LOGIN_SHELL);
@@ -221,12 +205,12 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
sh_source(shp, iop, e_sysprofile);
if(!sh_isoption(SH_NOUSRPROFILE) && !sh_isoption(SH_PRIVILEGED))
{
- char **files = shp->login_files;
+ char **files = shp->gd->login_files;
while ((name = *files++) && !sh_source(shp, iop, sh_mactry(shp,name)));
}
}
/* make sure PWD is set up correctly */
- path_pwd(1);
+ path_pwd(shp,1);
if(!sh_isoption(SH_NOEXEC))
{
if(!sh_isoption(SH_NOUSRPROFILE) && !sh_isoption(SH_PRIVILEGED) && sh_isoption(SH_RC))
@@ -237,7 +221,7 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
#if SHOPT_SYSRC
sh_source(shp, iop, e_bash_sysrc);
#endif
- sh_source(shp, iop, shp->rcfile ? shp->rcfile : sh_mactry(shp,(char*)e_bash_rc));
+ sh_source(shp, iop, shp->gd->rcfile ? shp->gd->rcfile : sh_mactry(shp,(char*)e_bash_rc));
}
else
#endif
@@ -292,7 +276,9 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
* try to undo effect of solaris 2.5+
* change for argv for setuid scripts
*/
- if(((type = sh_type(cp = av[0])) & SH_TYPE_SH) && (!(name = nv_getval(L_ARGNOD)) || !((type = sh_type(cp = name)) & SH_TYPE_SH)))
+ if (shp->st.repl_index > 0)
+ av[shp->st.repl_index] = shp->st.repl_arg;
+ if(((type = sh_type(cp = av[0])) & SH_TYPE_SH) && (name = nv_getval(L_ARGNOD)) && (!((type = sh_type(cp = name)) & SH_TYPE_SH)))
{
av[0] = (type & SH_TYPE_LOGIN) ? cp : path_basename(cp);
/* exec to change $0 for ps */
@@ -316,20 +302,20 @@ int sh_main(int ac, char *av[], Shinit_f userinit)
fdin = -1;
}
else
- shp->st.filename = path_fullname(name);
+ shp->st.filename = path_fullname(shp,name);
sp = 0;
if(fdin < 0 && !strchr(name,'/'))
{
#ifdef PATH_BFPATH
- if(path_absolute(name,NIL(Pathcomp_t*)))
+ if(path_absolute(shp,name,NIL(Pathcomp_t*)))
sp = stakptr(PATH_OFFSET);
#else
- sp = path_absolute(name,NIL(char*));
+ sp = path_absolute(shp,name,NIL(char*));
#endif
if(sp)
{
if((fdin=sh_open(sp,O_RDONLY,0))>=0)
- shp->st.filename = path_fullname(sp);
+ shp->st.filename = path_fullname(shp,sp);
}
}
if(fdin<0)
@@ -387,7 +373,7 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
int maxtry=IOMAXTRY, tdone=0, execflags;
int states,jmpval;
struct checkpt buff;
- sh_pushcontext(&buff,SH_JMPERREXIT);
+ sh_pushcontext(shp,&buff,SH_JMPERREXIT);
/* open input stream */
nv_putval(SH_PATHNAMENOD, shp->st.filename ,NV_NOFREE);
if(!iop)
@@ -395,8 +381,10 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
if(fno > 0)
{
int r;
+ VALIDATE_FD(shp, fno);
if(fno < 10 && ((r=sh_fcntl(fno,F_DUPFD,10))>=10))
{
+ VALIDATE_FD(shp, r);
shp->fdstatus[r] = shp->fdstatus[fno];
sh_close(fno);
fno = r;
@@ -414,7 +402,7 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
if(sh_isstate(SH_INTERACTIVE))
{
if(nv_isnull(PS1NOD))
- nv_putval(PS1NOD,(shp->euserid?e_stdprompt:e_supprompt),NV_RDONLY);
+ nv_putval(PS1NOD,(shp->gd->euserid?e_stdprompt:e_supprompt),NV_RDONLY);
sh_sigdone();
if(sh_histinit((void*)shp))
sh_onoption(SH_HISTORY);
@@ -438,7 +426,7 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
{
Sfio_t *top;
sh_iorestore((void*)shp,0,jmpval);
- hist_flush(shp->hist_ptr);
+ hist_flush(shp->gd->hist_ptr);
sfsync(shp->outpool);
shp->st.execbrk = shp->st.breakcnt = 0;
/* check for return from profile or env file */
@@ -453,6 +441,7 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
sh_offstate(SH_MONITOR);
goto done;
}
+ exitset();
/* skip over remaining input */
if(top = fcfile())
{
@@ -463,7 +452,7 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
}
/* make sure that we own the terminal */
#ifdef SIGTSTP
- tcsetpgrp(job.fd,shp->pid);
+ tcsetpgrp(job.fd,shp->gd->pid);
#endif /* SIGTSTP */
}
/* error return here */
@@ -477,6 +466,9 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
error_info.line = 1;
shp->inlineno = 1;
shp->binscript = 0;
+ shp->exittrap = 0;
+ shp->errtrap = 0;
+ shp->end_fn = 0;
if(sfeof(iop))
goto eof_or_error;
/* command loop */
@@ -485,7 +477,6 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
shp->nextprompt = 1;
sh_freeup(shp);
stakset(NIL(char*),0);
- exitset();
sh_offstate(SH_STOPOK);
sh_offstate(SH_ERREXIT);
sh_offstate(SH_VERBOSE);
@@ -524,8 +515,8 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
mailtime = curtime;
}
}
- if(shp->hist_ptr)
- hist_eof(shp->hist_ptr);
+ if(shp->gd->hist_ptr)
+ hist_eof(shp->gd->hist_ptr);
/* sets timeout for command entry */
shp->timeout = shp->st.tmout;
#if SHOPT_TIMEOUT
@@ -534,7 +525,6 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
#endif /* SHOPT_TIMEOUT */
shp->inlineno = 1;
error_info.line = 1;
- shp->exitval = 0;
shp->trapnote = 0;
if(buff.mode == SH_JMPEXIT)
{
@@ -568,11 +558,12 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
}
goto done;
}
+ shp->exitval = sh.savexit;
maxtry = IOMAXTRY;
- if(sh_isstate(SH_INTERACTIVE) && shp->hist_ptr)
+ if(sh_isstate(SH_INTERACTIVE) && shp->gd->hist_ptr)
{
job_wait((pid_t)0);
- hist_eof(shp->hist_ptr);
+ hist_eof(shp->gd->hist_ptr);
sfsync(sfstderr);
}
if(sh_isoption(SH_HISTORY))
@@ -580,17 +571,17 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
job.waitall = job.curpgid = 0;
error_info.flags |= ERROR_INTERACTIVE;
t = (Shnode_t*)sh_parse(shp,iop,0);
- if(!sh_isstate(SH_INTERACTIVE) && !sh_isstate(SH_CFLAG))
+ if(!sh_isstate(SH_INTERACTIVE) && !sh_isoption(SH_CFLAG))
error_info.flags &= ~ERROR_INTERACTIVE;
shp->readscript = 0;
- if(sh_isstate(SH_INTERACTIVE) && shp->hist_ptr)
- hist_flush(shp->hist_ptr);
+ if(sh_isstate(SH_INTERACTIVE) && shp->gd->hist_ptr)
+ hist_flush(shp->gd->hist_ptr);
sh_offstate(SH_HISTORY);
if(t)
{
execflags = sh_state(SH_ERREXIT)|sh_state(SH_INTERACTIVE);
/* The last command may not have to fork */
- if(!sh_isstate(SH_PROFILE) && !sh_isstate(SH_INTERACTIVE) &&
+ if(!sh_isstate(SH_PROFILE) && sh_isoption(SH_CFLAG) &&
(fno<0 || !(shp->fdstatus[fno]&(IOTTY|IONOSEEK)))
&& !sfreserve(iop,0,0))
{
@@ -609,7 +600,7 @@ static void exfile(register Shell_t *shp, register Sfio_t *iop,register int fno)
}
}
done:
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
if(sh_isstate(SH_INTERACTIVE))
{
sfputc(sfstderr,'\n');
@@ -662,7 +653,7 @@ static void chkmail(Shell_t *shp, char *files)
if(!arglist && S_ISDIR(statb.st_mode))
{
/* generate list of directory entries */
- path_complete(cp,"/*",&arglist);
+ path_complete(shp,cp,"/*",&arglist);
}
else
{
diff --git a/usr/src/lib/libshell/common/sh/name.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/name.c
index 52857a151c..a900da8024 100644
--- a/usr/src/lib/libshell/common/sh/name.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/name.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -22,6 +22,9 @@
* AT&T Labs
*
*/
+/*
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ */
#define putenv ___putenv
@@ -36,6 +39,13 @@
#define NVCACHE 8 /* must be a power of 2 */
#define Empty ((char*)(e_sptbnl+3))
static char *savesub = 0;
+static char Null[1];
+static Namval_t NullNode;
+static Dt_t *Refdict;
+static Dtdisc_t _Refdisc =
+{
+ offsetof(struct Namref,np),sizeof(struct Namval_t*),sizeof(struct Namref)
+};
#if !_lib_pathnative && _lib_uwin_path
@@ -56,8 +66,6 @@ static void attstore(Namval_t*,void*);
static void pushnam(Namval_t*,void*);
static char *staknam(Namval_t*, char*);
#endif
-static void ltou(char*);
-static void utol(char*);
static void rightjust(char*, int, int);
static char *lastdot(char*, int);
@@ -65,6 +73,7 @@ struct adata
{
Shell_t *sh;
Namval_t *tp;
+ char *mapname;
char **argnam;
int attsize;
char *attval;
@@ -91,6 +100,7 @@ struct adata
char *name;
Namval_t *np;
Namval_t *last_table;
+ Namval_t *namespace;
int flags;
short size;
short len;
@@ -203,13 +213,14 @@ void nv_outname(Sfio_t *out, char *name, int len)
#if SHOPT_TYPEDEF
Namval_t *nv_addnode(Namval_t* np, int remove)
{
- register struct sh_type *sp = (struct sh_type*)sh.mktype;
+ Shell_t *shp = sh_getinterp();
+ register struct sh_type *sp = (struct sh_type*)shp->mktype;
register int i;
register char *name=0;
- if(sp->numnodes==0 && !nv_isnull(np) && sh.last_table)
+ if(sp->numnodes==0 && !nv_isnull(np) && shp->last_table)
{
/* could be an redefine */
- Dt_t *root = nv_dict(sh.last_table);
+ Dt_t *root = nv_dict(shp->last_table);
sp->rp = np;
nv_delete(np,root,NV_NOFREE);
np = nv_search(sp->rp->nvname,root,NV_ADD);
@@ -228,7 +239,7 @@ Namval_t *nv_addnode(Namval_t* np, int remove)
sp->rp = 0;
else
{
- Dt_t *root = nv_dict(sh.last_table);
+ Dt_t *root = nv_dict(shp->last_table);
nv_delete(sp->nodes[0],root,NV_NOFREE);
dtinsert(root,sp->rp);
errormsg(SH_DICT,ERROR_exit(1),e_redef,sp->nodes[0]->nvname);
@@ -285,7 +296,7 @@ struct argnod *nv_onlist(struct argnod *arg, const char *name)
*/
void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register char *cp;
register Namval_t *np, *mp;
char *trap=shp->st.trap[SH_DEBUGTRAP];
@@ -308,6 +319,10 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
shtp.nodes =(Namval_t**)malloc(shtp.maxnodes*sizeof(Namval_t*));
}
#endif /* SHOPT_TYPEDEF*/
+#if SHOPT_NAMESPACE
+ if(shp->namespace && nv_dict(shp->namespace)==shp->var_tree)
+ flags |= NV_NOSCOPE;
+#endif /* SHOPT_NAMESPACE */
flags &= ~(NV_TYPE|NV_ARRAY|NV_IARRAY);
if(sh_isoption(SH_ALLEXPORT))
flags |= NV_EXPORT;
@@ -316,6 +331,8 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
flags &= ~(NV_IDENT|NV_EXPORT);
flags |= NV_VARNAME;
}
+ else
+ shp->prefix_root = shp->first_root = 0;
for(;arg; arg=arg->argnxt.ap)
{
shp->used_pos = 0;
@@ -334,7 +351,7 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
int sub=0;
struct fornod *fp=(struct fornod*)arg->argchn.ap;
register Shnode_t *tp=fp->fortre;
- flag |= (flags&(NV_NOSCOPE|NV_STATIC));
+ flag |= (flags&(NV_NOSCOPE|NV_STATIC|NV_FARRAY));
if(arg->argflag&ARG_QUOTED)
cp = sh_mactrim(shp,fp->fornam,-1);
else
@@ -342,12 +359,10 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
error_info.line = fp->fortyp-shp->st.firstline;
if(!array && tp->tre.tretyp!=TLST && tp->com.comset && !tp->com.comarg && tp->com.comset->argval[0]==0 && tp->com.comset->argval[1]=='[')
array |= (tp->com.comset->argflag&ARG_MESSAGE)?NV_IARRAY:NV_ARRAY;
- if(shp->fn_depth && (Namval_t*)tp->com.comnamp==SYSTYPESET)
- flag |= NV_NOSCOPE;
if(prefix && tp->com.comset && *cp=='[')
{
shp->prefix = 0;
- np = nv_open(prefix,shp->var_tree,flag);
+ np = nv_open(prefix,shp->last_root,flag);
shp->prefix = prefix;
if(np)
{
@@ -361,18 +376,51 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
}
}
np = nv_open(cp,shp->var_tree,flag|NV_ASSIGN);
- if(typ && !array && (nv_isnull(np) || nv_isarray(np)))
- nv_settype(np,typ,0);
- if((flags&NV_STATIC) && !nv_isnull(np))
+ if((arg->argflag&ARG_APPEND) && (tp->tre.tretyp&COMMSK)==TCOM && tp->com.comset && !nv_isvtree(np) && (((ap=nv_arrayptr(np)) && !ap->fun && !nv_opensub(np)) || (!ap && nv_isarray(np) && tp->com.comarg && !((mp=nv_search(tp->com.comarg->argval,shp->fun_tree,0)) && nv_isattr(mp,BLT_DCL)))))
+ {
+ if(tp->com.comarg)
+ {
+ struct argnod *ap = tp->com.comset;
+ while(ap->argnxt.ap)
+ ap = ap->argnxt.ap;
+ ap->argnxt.ap = tp->com.comarg;
+
+ }
+ tp->com.comarg = tp->com.comset;
+ tp->com.comset = 0;
+ tp->com.comtyp = COMSCAN;
+ }
+ if(nv_isattr(np,NV_RDONLY) && np->nvfun && !(flags&NV_RDONLY))
+ errormsg(SH_DICT,ERROR_exit(1),e_readonly, nv_name(np));
+ if(nv_isattr(np,NV_NOFREE) && nv_isnull(np))
+ nv_offattr(np,NV_NOFREE);
+ if(nv_istable(np))
+ _nv_unset(np,0);
+ if(typ && !array && (!shp->prefix || nv_isnull(np) || nv_isarray(np)))
+ {
+ if(!(nv_isnull(np)) && !nv_isarray(np))
+ _nv_unset(np,0);
+ nv_settype(np,typ,0);
+ }
+ if((flags&NV_STATIC) && !nv_isattr(np,NV_EXPORT) && !nv_isnull(np))
#if SHOPT_TYPEDEF
goto check_type;
#else
continue;
#endif /* SHOPT_TYPEDEF */
- if(array && (!(ap=nv_arrayptr(np)) || !ap->hdr.type))
+ ap=nv_arrayptr(np);
+#if SHOPT_FIXEDARRAY
+ if(ap && ap->fixed)
+ flags |= NV_FARRAY;
+#endif /* SHOPT_FIXEDARRAY */
+ if(array && (!ap || !ap->hdr.type))
{
+#if SHOPT_FIXEDARRAY
+ if(!(arg->argflag&ARG_APPEND) && (!ap || !ap->fixed))
+#else
if(!(arg->argflag&ARG_APPEND))
- nv_unset(np);
+#endif /* SHOPT_FIXEDARRAY */
+ _nv_unset(np,NV_EXPORT);
if(array&NV_ARRAY)
{
nv_setarray(np,nv_associative);
@@ -391,7 +439,7 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
#endif /* SHOPT_TYPEDEF */
}
/* check for array assignment */
- if(tp->tre.tretyp!=TLST && tp->com.comarg && !tp->com.comset && !((mp=tp->com.comnamp) && nv_isattr(mp,BLT_DCL)))
+ if(tp->tre.tretyp!=TLST && tp->com.comarg && !tp->com.comset && ((array&NV_IARRAY) || !((mp=tp->com.comnamp) && nv_isattr(mp,BLT_DCL))))
{
int argc;
Dt_t *last_root = shp->last_root;
@@ -406,8 +454,16 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
#endif /* SHOPT_TYPEDEF */
if(!(arg->argflag&ARG_APPEND))
{
+#if SHOPT_FIXEDARRAY
+ if(!nv_isarray(np) || ((ap=nv_arrayptr(np)) && !ap->fixed && (ap->nelem&ARRAY_MASK)))
+#else
if(!nv_isarray(np) || ((ap=nv_arrayptr(np)) && (ap->nelem&ARRAY_MASK)))
- nv_unset(np);
+#endif /* SHOPT_FIXEDARRAY */
+ {
+ if(ap)
+ ap->nelem |= ARRAY_UNDEF;
+ _nv_unset(np,NV_EXPORT);
+ }
}
nv_setvec(np,(arg->argflag&ARG_APPEND),argc,argv);
if(traceon || trap)
@@ -420,7 +476,7 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
sh_debug(shp,trap,name,(char*)0,argv,(arg->argflag&ARG_APPEND)|ARG_ASSIGN);
if(traceon)
{
- sh_trace(NIL(char**),0);
+ sh_trace(shp,NIL(char**),0);
sfputr(sfstderr,name,n);
sfwrite(sfstderr,"=( ",3);
while(cp= *argv++)
@@ -436,21 +492,27 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
}
if((tp->tre.tretyp&COMMSK)==TFUN)
goto skip;
+ if(tp->tre.tretyp==0 && !tp->com.comset && !tp->com.comarg)
+ {
+ if(!(arg->argflag&ARG_APPEND) && nv_isattr(np,NV_BINARY|NV_NOFREE|NV_RAW)!=(NV_BINARY|NV_NOFREE|NV_RAW))
+ _nv_unset(np,NV_EXPORT);
+ goto skip;
+ }
if(tp->tre.tretyp==TLST || !tp->com.comset || tp->com.comset->argval[0]!='[')
{
if(tp->tre.tretyp!=TLST && !tp->com.comnamp && tp->com.comset && tp->com.comset->argval[0]==0 && tp->com.comset->argchn.ap)
{
- if(prefix)
+ if(prefix || np)
cp = stakcopy(nv_name(np));
shp->prefix = cp;
if(tp->com.comset->argval[1]=='[')
{
if((arg->argflag&ARG_APPEND) && (!nv_isarray(np) || (nv_aindex(np)>=0)))
- nv_unset(np);
+ _nv_unset(np,0);
if(!(array&NV_IARRAY) && !(tp->com.comset->argflag&ARG_MESSAGE))
nv_setarray(np,nv_associative);
}
- nv_setlist(tp->com.comset,flags,0);
+ nv_setlist(tp->com.comset,flags&~NV_STATIC,0);
shp->prefix = prefix;
if(tp->com.comset->argval[1]!='[')
nv_setvtree(np);
@@ -463,8 +525,12 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
}
if(*cp!='.' && *cp!='[' && strchr(cp,'['))
{
+ cp = stakcopy(nv_name(np));
nv_close(np);
- np = nv_open(cp,shp->var_tree,flag);
+ if(!(arg->argflag&ARG_APPEND))
+ flag &= ~NV_ARRAY;
+ shp->prefix_root = shp->first_root;
+ np = nv_open(cp,shp->prefix_root?shp->prefix_root:shp->var_tree,flag);
}
if(arg->argflag&ARG_APPEND)
{
@@ -478,9 +544,12 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
if(!nv_isnull(np) && np->nvalue.cp!=Empty && !nv_isvtree(np))
sub=1;
}
- else if(np->nvalue.cp && np->nvalue.cp!=Empty && !nv_type(np))
+ else if(((np->nvalue.cp && np->nvalue.cp!=Empty)||nv_isvtree(np)|| nv_arrayptr(np)) && !nv_type(np))
{
_nv_unset(np,NV_EXPORT);
+ if(ap && ap->fun)
+ nv_setarray(np,nv_associative);
+
}
}
else
@@ -552,7 +621,7 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
cp = arg->argval;
mp = 0;
}
- np = nv_open(cp,shp->var_tree,flags);
+ np = nv_open(cp,shp->prefix_root?shp->prefix_root:shp->var_tree,flags);
if(!np->nvfun && (flags&NV_NOREF))
{
if(shp->used_pos)
@@ -576,7 +645,7 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
}
if(traceon)
{
- sh_trace(NIL(char**),0);
+ sh_trace(shp,NIL(char**),0);
nv_outname(sfstderr,name,-1);
if(sub)
sfprintf(sfstderr,"[%s]",sh_fmtq(sub));
@@ -604,6 +673,8 @@ void nv_setlist(register struct argnod *arg,register int flags, Namval_t *typ)
free((void*)shtp.nodes);
shp->mktype = shtp.previous;
maketype = 0;
+ if(shp->namespace)
+ free(shp->prefix);
shp->prefix = 0;
if(nr.np == np)
{
@@ -673,7 +744,7 @@ static char *stack_extend(const char *cname, char *cp, int n)
register char *name = (char*)cname;
int offset = name - stakptr(0);
int m = cp-name;
- stakseek(strlen(name)+n+1);
+ stakseek(offset + strlen(name)+n+1);
name = stakptr(offset);
cp = name + m;
m = strlen(cp)+1;
@@ -684,13 +755,17 @@ static char *stack_extend(const char *cname, char *cp, int n)
Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
{
- Shell_t *shp = &sh;
- char *cp=(char*)name, *sp, *xp;
+ Shell_t *shp = sh_getinterp();
+ char *sub=0, *cp=(char*)name, *sp, *xp;
register int c;
register Namval_t *np=0, *nq=0;
Namfun_t *fp=0;
long mode, add=0;
- int copy=1,isref,top=0,noscope=(flags&NV_NOSCOPE);
+ int copy=0,isref,top=0,noscope=(flags&NV_NOSCOPE);
+ int nofree=0, level=0;
+#if SHOPT_FIXEDARRAY
+ Namarr_t *ap;
+#endif /* SHOPT_FIXEDARRAY */
if(root==shp->var_tree)
{
if(dtvnext(root))
@@ -741,7 +816,7 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
isref = 0;
dp->last = cp;
mode = (c=='.' || (flags&NV_NOADD))?add:NV_ADD;
- if((flags&NV_NOSCOPE) && c!='.')
+ if(level++ || ((flags&NV_NOSCOPE) && c!='.'))
mode |= HASH_NOSCOPE;
np=0;
if(top)
@@ -751,28 +826,37 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
{
Dt_t *dp = dtview(shp->var_tree,(Dt_t*)0);
rp->sdict = dtopen(&_Nvdisc,Dtoset);
- dtview(rp->sdict,shp->var_base);
+ dtview(rp->sdict,dp);
dtview(shp->var_tree,rp->sdict);
}
if(np = nv_search(name,shp->var_tree,0))
{
- if(shp->var_tree->walk == shp->var_base)
+#if SHOPT_NAMESPACE
+ if(shp->var_tree->walk==shp->var_base || (shp->var_tree->walk!=shp->var_tree && shp->namespace && nv_dict(shp->namespace)==shp->var_tree->walk))
+#else
+ if(shp->var_tree->walk==shp->var_base)
+#endif /* SHOPT_NAMESPACE */
{
+#if SHOPT_NAMESPACE
+ if(!(nq = nv_search((char*)np,shp->var_base,HASH_BUCKET)))
+#endif /* SHOPT_NAMESPACE */
nq = np;
+ shp->last_root = shp->var_tree->walk;
if((flags&NV_NOSCOPE) && *cp!='.')
{
if(mode==0)
- root = shp->var_base;
+ root = shp->var_tree->walk;
else
{
- nv_delete(np,(Dt_t*)0,0);
+ nv_delete(np,(Dt_t*)0,NV_NOFREE);
np = 0;
}
}
}
else
{
- root = shp->var_tree->walk;
+ if(shp->var_tree->walk)
+ root = shp->var_tree->walk;
flags |= NV_NOSCOPE;
noscope = 1;
}
@@ -790,32 +874,58 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
np = nv_search(name,root,HASH_NOSCOPE|NV_ADD);
}
}
+#if SHOPT_NAMESPACE
+ if(!np && !noscope && *name!='.' && shp->namespace && root==shp->var_tree)
+ root = nv_dict(shp->namespace);
+#endif /* SHOPT_NAMESPACE */
if(np || (np = nv_search(name,root,mode)))
{
isref = nv_isref(np);
+ shp->openmatch = root->walk?root->walk:root;
if(top)
{
if(nq==np)
{
flags &= ~NV_NOSCOPE;
- root = shp->var_base;
+ root = shp->last_root;
}
else if(nq)
{
- if(nv_isnull(np) && c!='.' && (np->nvfun=nv_cover(nq)))
+ if(nv_isnull(np) && c!='.' && ((np->nvfun=nv_cover(nq)) || nq==OPTINDNOD))
+ {
np->nvname = nq->nvname;
+#if SHOPT_NAMESPACE
+ if(shp->namespace && nv_dict(shp->namespace)==shp->var_tree && nv_isattr(nq,NV_EXPORT))
+ nv_onattr(np,NV_EXPORT);
+#endif /* SHOPT_NAMESPACE */
+ if(nq==OPTINDNOD)
+ {
+ np->nvfun = nq->nvfun;
+ np->nvalue.lp = (&shp->st.optindex);
+ nv_onattr(np,NV_INTEGER|NV_NOFREE);
+ }
+ }
flags |= NV_NOSCOPE;
}
}
else if(add && nv_isnull(np) && c=='.' && cp[1]!='.')
nv_setvtree(np);
+#if SHOPT_NAMESPACE
+ if(shp->namespace && root==nv_dict(shp->namespace))
+ {
+ flags |= NV_NOSCOPE;
+ shp->last_table = shp->namespace;
+ }
+#endif /* SHOPT_NAMESPACE */
}
if(c)
*sp = c;
top = 0;
if(isref)
{
- char *sub=0;
+#if SHOPT_FIXEDARRAY
+ int n=0,dim;
+#endif /* SHOPT_FIXEDARRAY */
#if NVCACHE
nvcache.ok = 0;
#endif
@@ -833,34 +943,76 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
shp->last_root = root;
shp->last_table = nv_reftable(np);
sub = nv_refsub(np);
+#if SHOPT_FIXEDARRAY
+ n = nv_refindex(np);
+ dim = nv_refdimen(np);
+#endif /* SHOPT_FIXEDARRAY */
np = nv_refnode(np);
+#if SHOPT_FIXEDARRAY
+ if(n)
+ {
+ ap = nv_arrayptr(np);
+ ap->nelem = dim;
+ nv_putsub(np,(char*)0,n);
+ }
+ else
+#endif /* SHOPT_FIXEDARRAY */
if(sub && c!='.')
nv_putsub(np,sub,0L);
flags |= NV_NOSCOPE;
noscope = 1;
}
+ shp->first_root = root;
if(nv_isref(np) && (c=='[' || c=='.' || !(flags&NV_ASSIGN)))
errormsg(SH_DICT,ERROR_exit(1),e_noref,nv_name(np));
if(sub && c==0)
+ {
+ if(flags&NV_ARRAY)
+ {
+ Namarr_t *ap = nv_arrayptr(np);
+ nq = nv_opensub(np);
+ if((flags&NV_ASSIGN) && (!nq || nv_isnull(nq)))
+ ap->nelem++;
+ if(!nq)
+ goto addsub;
+ else
+ np = nq;
+ }
return(np);
+ }
if(np==nq)
flags &= ~(noscope?0:NV_NOSCOPE);
+#if SHOPT_FIXEDARRAY
+ else if(c || n)
+#else
else if(c)
+#endif /* SHOPT_FIXEDARRAY */
{
+#if SHOPT_FIXEDARRAY
+ static char null[1] = "";
+#endif /* SHOPT_FIXEDARRAY */
c = (cp-sp);
copy = strlen(cp=nv_name(np));
dp->nofree |= 1;
- name = copystack(cp,sp,sub);
+#if SHOPT_FIXEDARRAY
+ if(*sp==0)
+ name = cp;
+ else
+#endif /* SHOPT_FIXEDARRAY */
+ name = copystack(cp,sp,sub);
sp = (char*)name + copy;
cp = sp+c;
c = *sp;
if(!noscope)
flags &= ~NV_NOSCOPE;
+#if SHOPT_FIXEDARRAY
+ if(c==0)
+ nv_endsubscript(np,null,NV_ADD);
+#endif /* SHOPT_FIXEDARRAY */
}
flags |= NV_NOREF;
- if(nv_isnull(np))
- nv_onattr(np,NV_NOFREE);
-
+ if(*cp==0 && nv_isnull(np) && !nv_isarray(np))
+ nofree = NV_NOFREE;
}
shp->last_root = root;
if(*cp && cp[1]=='.')
@@ -868,12 +1020,17 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
if(c=='.' && (cp[1]==0 || cp[1]=='=' || cp[1]=='+'))
{
nv_local = 1;
+ if(np)
+ nv_onattr(np,nofree);
return(np);
}
if(cp[-1]=='.')
cp--;
do
{
+#if SHOPT_FIXEDARRAY
+ int fixed;
+#endif /* SHOPT_FIXEDARRAY */
if(!np)
{
if(!nq && *sp=='[' && *cp==0 && cp[-1]==']')
@@ -884,20 +1041,27 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
* possible side effects
*/
cp[-1] = 0;
- sh_arith(sp+1);
+ sh_arith(shp,sp+1);
cp[-1] = ']';
}
return(np);
}
+#if SHOPT_FIXEDARRAY
+ fixed = 0;
+ if((ap=nv_arrayptr(np)) && ap->fixed)
+ fixed = 1;
+#endif /* SHOPT_FIXEDARRAY */
if(c=='[' || (c=='.' && nv_isarray(np)))
{
- char *sub=0;
int n = 0;
+ sub = 0;
mode &= ~HASH_NOSCOPE;
if(c=='[')
{
-#if 0
+#if SHOPT_FIXEDARRAY
Namarr_t *ap = nv_arrayptr(np);
+#endif /* SHOPT_FIXEDARRAY */
+#if 0
int scan = ap?(ap->nelem&ARRAY_SCAN):0;
#endif
n = mode|nv_isarray(np);
@@ -907,11 +1071,22 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
dp->last = cp;
return(np);
}
+#if SHOPT_FIXEDARRAY
+ if(fixed)
+ flags |= NV_FARRAY;
+ else
+#endif /* SHOPT_FIXEDARRAY */
if((n&NV_ADD)&&(flags&NV_ARRAY))
n |= ARRAY_FILL;
if(flags&NV_ASSIGN)
n |= NV_ADD;
- cp = nv_endsubscript(np,sp,n|(flags&NV_ASSIGN));
+ cp = nv_endsubscript(np,sp,n|(flags&(NV_ASSIGN|NV_FARRAY)));
+#if SHOPT_FIXEDARRAY
+ flags &= ~NV_FARRAY;
+ if(fixed)
+ flags &= ~NV_ARRAY;
+
+#endif /* SHOPT_FIXEDARRAY */
#if 0
if(scan)
nv_putsub(np,NIL(char*),ARRAY_SCAN);
@@ -919,7 +1094,7 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
}
else
cp = sp;
- if((c = *cp)=='.' || (c=='[' && nv_isarray(np)) || (n&ARRAY_FILL) || (flags&NV_ARRAY))
+ if((c = *cp)=='.' || (c=='[' && nv_isarray(np)) || (n&ARRAY_FILL) || ((ap || (flags&NV_ASSIGN)) && (flags&NV_ARRAY)))
{
int m = cp-sp;
@@ -947,7 +1122,11 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
sp[n-1] = ']';
}
if(n < m)
- cp=strcpy(sp+n,cp);
+ {
+ char *dp = sp+n;
+ while(*dp++=*cp++);
+ cp = sp+n;
+ }
}
else
{
@@ -964,11 +1143,15 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
}
else if(c==0 && mode && (n=nv_aindex(np))>0)
nv_putsub(np,(char*)0,n);
+#if SHOPT_FIXEDARRAY
+ else if(n==0 && !fixed && (c==0 || (c=='[' && !nv_isarray(np))))
+#else
else if(n==0 && (c==0 || (c=='[' && !nv_isarray(np))))
+#endif /* SHOPT_FIXEDARRAY */
{
/* subscript must be 0*/
cp[-1] = 0;
- n = sh_arith(sp+1);
+ n = sh_arith(shp,sp+1);
cp[-1] = ']';
if(n)
return(0);
@@ -978,6 +1161,7 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
dp->last = cp;
if(nv_isarray(np) && (c=='[' || c=='.' || (flags&NV_ARRAY)))
{
+ addsub:
sp = cp;
if(!(nq = nv_opensub(np)))
{
@@ -1005,6 +1189,8 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
return(0);
nv_setvtree(nq);
}
+ nv_onattr(np,nofree);
+ nofree = 0;
np = nq;
}
else if(memcmp(cp,"[0]",3))
@@ -1017,12 +1203,18 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
}
}
}
+#if SHOPT_FIXEDARRAY
+ else if(nv_isarray(np) && (!fixed || cp[-1]!=']'))
+#else
else if(nv_isarray(np))
+#endif /* SHOPT_FIXEDARRAY */
{
if(c==0 && (flags&NV_MOVE))
return(np);
nv_putsub(np,NIL(char*),ARRAY_UNDEF);
}
+ nv_onattr(np,nofree);
+ nofree = 0;
if(c=='.' && (fp=np->nvfun))
{
for(; fp; fp=fp->next)
@@ -1070,6 +1262,7 @@ Namval_t *nv_create(const char *name, Dt_t *root, int flags, Namfun_t *dp)
* delete the node <np> from the dictionary <root> and clear from the cache
* if <root> is NULL, only the cache is cleared
* if flags does not contain NV_NOFREE, the node is freed
+ * if np==0 && !root && flags==0, delete the Refdict dictionary
*/
void nv_delete(Namval_t* np, Dt_t *root, int flags)
{
@@ -1082,12 +1275,45 @@ void nv_delete(Namval_t* np, Dt_t *root, int flags)
xp->root = 0;
}
#endif
+ if(!np && !root && flags==0)
+ {
+ if(Refdict)
+ dtclose(Refdict);
+ Refdict = 0;
+ return;
+ }
+ if(root || !(flags&NV_NOFREE))
+ {
+ if(!(flags&NV_FUNCTION) && Refdict)
+ {
+ Namval_t **key = &np;
+ struct Namref *rp;
+ while(rp = (struct Namref*)dtmatch(Refdict,(void*)key))
+ {
+ if(rp->sub)
+ free(rp->sub);
+ rp->sub = 0;
+ rp = dtdelete(Refdict,(void*)rp);
+ rp->np = &NullNode;
+ }
+ }
+ }
if(root)
{
if(dtdelete(root,np))
{
if(!(flags&NV_NOFREE) && ((flags&NV_FUNCTION) || !nv_subsaved(np)))
+ {
+ Namarr_t *ap;
+ if(nv_isarray(np) && np->nvfun &&
+ (ap=nv_arrayptr(np)) && array_assoc(ap)) {
+ while(nv_associative(np,0,NV_ANEXT))
+ nv_associative(np, 0, NV_ADELETE);
+ nv_associative(np, 0, NV_AFREE);
+ free((void*)np->nvfun);
+ }
free((void*)np);
+ }
}
#if 0
else
@@ -1116,10 +1342,10 @@ void nv_delete(Namval_t* np, Dt_t *root, int flags)
*/
Namval_t *nv_open(const char *name, Dt_t *root, int flags)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register char *cp=(char*)name;
register int c;
- register Namval_t *np;
+ register Namval_t *np=0;
Namfun_t fun;
int append=0;
const char *msg = e_varname;
@@ -1132,7 +1358,8 @@ Namval_t *nv_open(const char *name, Dt_t *root, int flags)
sh_stats(STAT_NVOPEN);
memset(&fun,0,sizeof(fun));
- shp->last_table = shp->namespace;
+ shp->openmatch = 0;
+ shp->last_table = 0;
if(!root)
root = shp->var_tree;
shp->last_root = root;
@@ -1140,9 +1367,9 @@ Namval_t *nv_open(const char *name, Dt_t *root, int flags)
{
flags |= NV_NOREF;
msg = e_badfun;
- if((np=shp->namespace) || strchr(name,'.'))
+ if(strchr(name,'.'))
{
- name = cp = copystack(np?nv_name(np):0,name,(const char*)0);
+ name = cp = copystack(0,name,(const char*)0);
fname = strrchr(cp,'.');
*fname = 0;
fun.nofree |= 1;
@@ -1204,12 +1431,12 @@ Namval_t *nv_open(const char *name, Dt_t *root, int flags)
{
if(xp->root!=root)
continue;
- if(*name==*xp->name && (flags&(NV_ARRAY|NV_NOSCOPE))==xp->flags && memcmp(xp->name,name,xp->len)==0 && (name[xp->len]==0 || name[xp->len]=='=' || name[xp->len]=='+'))
+ if(*name==*xp->name && xp->namespace==shp->namespace && (flags&(NV_ARRAY|NV_NOSCOPE))==xp->flags && memcmp(xp->name,name,xp->len)==0 && (name[xp->len]==0 || name[xp->len]=='=' || name[xp->len]=='+'))
{
sh_stats(STAT_NVHITS);
np = xp->np;
cp = (char*)name+xp->len;
- if(nv_isarray(np))
+ if(nv_isarray(np) && !(flags&NV_MOVE))
nv_putsub(np,NIL(char*),ARRAY_UNDEF);
shp->last_table = xp->last_table;
shp->last_root = xp->last_root;
@@ -1246,6 +1473,7 @@ Namval_t *nv_open(const char *name, Dt_t *root, int flags)
xp->name[xp->len] = 0;
xp->root = root;
xp->np = np;
+ xp->namespace = shp->namespace;
xp->last_table = shp->last_table;
xp->last_root = shp->last_root;
xp->flags = (flags&(NV_ARRAY|NV_NOSCOPE));
@@ -1292,6 +1520,8 @@ skip:
else
{
char *sub=0, *prefix= shp->prefix;
+ Namval_t *mp;
+ Namarr_t *ap;
int isref;
shp->prefix = 0;
if((flags&NV_STATIC) && !shp->mktype)
@@ -1303,15 +1533,36 @@ skip:
}
}
isref = nv_isref(np);
+#if SHOPT_FIXEDARRAY
+ if(sh_isoption(SH_XTRACE) && (ap=nv_arrayptr(np)) && !ap->fixed)
+#else
if(sh_isoption(SH_XTRACE) && nv_isarray(np))
+#endif /* SHOPT_FIXEDARRAY */
sub = nv_getsub(np);
c = msg==e_aliname? 0: (append | (flags&NV_EXPORT));
if(isref)
nv_offattr(np,NV_REF);
if(!append && (flags&NV_UNJUST))
{
- nv_offattr(np,NV_LJUST|NV_RJUST|NV_ZFILL);
- np->nvsize = 0;
+ if(!np->nvfun)
+ _nv_unset(np,NV_EXPORT);
+ }
+ if(flags&NV_MOVE)
+ {
+ if(ap=nv_arrayptr(np))
+ {
+ if(mp=nv_opensub(np))
+ np = mp;
+ else if(!array_assoc(ap) && (mp = nv_open(cp,shp->var_tree,NV_NOFAIL|NV_VARNAME|NV_NOARRAY|NV_NOASSIGN|NV_NOADD)) && nv_isvtree(np))
+ {
+ ap->nelem |= ARRAY_TREE;
+ nv_putsub(np,(char*)0,ARRAY_ADD|nv_aindex(np));
+ np = nv_opensub(np);
+ ap->nelem &= ~ARRAY_TREE;
+ ap->nelem -= 1;
+ }
+ }
+ _nv_unset(np,NV_EXPORT);
}
nv_putval(np, cp, c);
if(isref)
@@ -1358,6 +1609,7 @@ skip:
*/
void nv_putval(register Namval_t *np, const char *string, int flags)
{
+ Shell_t *shp = sh_getinterp();
register const char *sp=string;
register union Value *up;
register char *cp;
@@ -1365,13 +1617,16 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
register int dot;
int was_local = nv_local;
union Value u;
+#if SHOPT_FIXEDARRAY
+ Namarr_t *ap;
+#endif /* SHOPT_FIXEDARRAY */
if(!(flags&NV_RDONLY) && nv_isattr (np, NV_RDONLY))
errormsg(SH_DICT,ERROR_exit(1),e_readonly, nv_name(np));
/* The following could cause the shell to fork if assignment
* would cause a side effect
*/
- sh.argaddr = 0;
- if(sh.subshell && !nv_local)
+ shp->argaddr = 0;
+ if(shp->subshell && !nv_local && !(flags&NV_RDONLY))
np = sh_assignok(np,1);
if(np->nvfun && np->nvfun->disc && !(flags&NV_NODISC) && !nv_isref(np))
{
@@ -1381,7 +1636,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
nv_local=1;
nv_putv(np,sp,flags,np->nvfun);
if(sp && ((flags&NV_EXPORT) || nv_isattr(np,NV_EXPORT)))
- sh_envput(sh.env,np);
+ sh_envput(shp->env,np);
return;
}
/* called from disc, assign the actual value */
@@ -1405,7 +1660,11 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
up->up = &np->nvalue;
}
}
+#if SHOPT_FIXEDARRAY
+ else if(np->nvalue.up && nv_isarray(np) && (ap=nv_arrayptr(np)) && !ap->fixed)
+#else
else if(np->nvalue.up && nv_isarray(np) && nv_arrayptr(np))
+#endif /* SHOPT_FIXEDARRAY */
up = np->nvalue.up;
if(up && up->cp==Empty)
up->cp = 0;
@@ -1428,7 +1687,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
ld = *((double*)sp);
}
else
- ld = sh_arith(sp);
+ ld = sh_arith(shp,sp);
if(!up->ldp)
up->ldp = new_of(Sfdouble_t,0);
else if(flags&NV_APPEND)
@@ -1448,7 +1707,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
d = *(double*)sp;
}
else
- d = sh_arith(sp);
+ d = sh_arith(shp,sp);
if(!up->dp)
up->dp = new_of(double,0);
else if(flags&NV_APPEND)
@@ -1492,7 +1751,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
}
}
else if(sp)
- ll = (Sflong_t)sh_arith(sp);
+ ll = (Sflong_t)sh_arith(shp,sp);
if(!up->llp)
up->llp = new_of(Sflong_t,0);
else if(flags&NV_APPEND)
@@ -1536,7 +1795,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
}
else if(sp)
{
- Sfdouble_t ld = sh_arith(sp);
+ Sfdouble_t ld = sh_arith(shp,sp);
if(ld<0)
l = (int32_t)ld;
else
@@ -1566,7 +1825,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
else
{
const char *tofree=0;
- int offset;
+ int offset,append;
#if _lib_pathnative
char buff[PATH_MAX];
#endif /* _lib_pathnative */
@@ -1575,25 +1834,25 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
if((flags&NV_DOUBLE)==NV_DOUBLE)
{
if(flags&NV_LONG)
- sfprintf(sh.strbuf,"%.*Lg",LDBL_DIG,*((Sfdouble_t*)sp));
+ sfprintf(shp->strbuf,"%.*Lg",LDBL_DIG,*((Sfdouble_t*)sp));
else
- sfprintf(sh.strbuf,"%.*g",DBL_DIG,*((double*)sp));
+ sfprintf(shp->strbuf,"%.*g",DBL_DIG,*((double*)sp));
}
else if(flags&NV_UNSIGN)
{
if(flags&NV_LONG)
- sfprintf(sh.strbuf,"%I*lu",sizeof(Sfulong_t),*((Sfulong_t*)sp));
+ sfprintf(shp->strbuf,"%I*lu",sizeof(Sfulong_t),*((Sfulong_t*)sp));
else
- sfprintf(sh.strbuf,"%lu",(unsigned long)((flags&NV_SHORT)?*((uint16_t*)sp):*((uint32_t*)sp)));
+ sfprintf(shp->strbuf,"%lu",(unsigned long)((flags&NV_SHORT)?*((uint16_t*)sp):*((uint32_t*)sp)));
}
else
{
if(flags&NV_LONG)
- sfprintf(sh.strbuf,"%I*ld",sizeof(Sflong_t),*((Sflong_t*)sp));
+ sfprintf(shp->strbuf,"%I*ld",sizeof(Sflong_t),*((Sflong_t*)sp));
else
- sfprintf(sh.strbuf,"%ld",(long)((flags&NV_SHORT)?*((int16_t*)sp):*((int32_t*)sp)));
+ sfprintf(shp->strbuf,"%ld",(long)((flags&NV_SHORT)?*((int16_t*)sp):*((int32_t*)sp)));
}
- sp = sfstruse(sh.strbuf);
+ sp = sfstruse(shp->strbuf);
}
if(nv_isattr(np, NV_HOST|NV_INTEGER)==NV_HOST && sp)
{
@@ -1624,16 +1883,8 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
size = ja_size((char*)sp,size,nv_isattr(np,NV_RJUST|NV_ZFILL));
#endif /* SHOPT_MULTIBYTE */
}
- if(!up->cp)
+ if(!up->cp || *up->cp==0)
flags &= ~NV_APPEND;
- if((flags&NV_APPEND) && !nv_isattr(np,NV_BINARY))
- {
- offset = staktell();
- stakputs(up->cp);
- stakputs(sp);
- stakputc(0);
- sp = stakptr(offset);
- }
if(!nv_isattr(np, NV_NOFREE))
{
/* delay free in case <sp> points into free region */
@@ -1645,6 +1896,9 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
tofree = 0;
if (sp)
{
+ append=0;
+ if(sp==up->cp && !(flags&NV_APPEND))
+ return;
dot = strlen(sp);
#if (_AST_VERSION>=20030127L)
if(nv_isattr(np,NV_BINARY))
@@ -1665,7 +1919,7 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
size = nv_size(np);
if(size==0)
size = oldsize + (3*dot/4);
- cp = (char*)malloc(size+1);
+ *(cp = (char*)malloc(size+1)) = 0;
nv_offattr(np,NV_NOFREE);
if(oldsize)
memcpy((void*)cp,(void*)up->cp,oldsize);
@@ -1682,17 +1936,56 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
}
else
#endif
- 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|NV_RJUST)==NV_LJUST && dot>size)
- dot = size;
- if(size==0 || tofree || !(cp=(char*)up->cp))
{
- cp = (char*)malloc(((unsigned)dot+1));
- cp[dot] = 0;
- nv_offattr(np,NV_NOFREE);
+ if(size==0 && nv_isattr(np,NV_HOST)!=NV_HOST &&nv_isattr(np,NV_LJUST|NV_RJUST|NV_ZFILL))
+ {
+ nv_setsize(np,size=dot);
+ tofree = up->cp;
+ }
+ else if(size > dot)
+ dot = size;
+ else if(nv_isattr(np,NV_LJUST|NV_RJUST)==NV_LJUST && dot>size)
+ dot = size;
+ if(flags&NV_APPEND)
+ {
+ if(dot==0)
+ return;
+ append = strlen(up->cp);
+ if(!tofree || size)
+ {
+ offset = staktell();
+ stakputs(up->cp);
+ stakputs(sp);
+ stakputc(0);
+ sp = stakptr(offset);
+ dot += append;
+ append = 0;
+ }
+ else
+ {
+ flags &= ~NV_APPEND;
+ }
+ }
+ }
+ if(size==0 || tofree || dot || !(cp=(char*)up->cp))
+ {
+ if(dot==0 && !nv_isattr(np,NV_LJUST|NV_RJUST))
+ {
+ cp = Null;
+ nv_onattr(np,NV_NOFREE);
+ }
+ else
+ {
+ if(tofree && tofree!=Empty && tofree!=Null)
+ {
+ cp = (char*)realloc((void*)tofree,((unsigned)dot+append+8));
+ tofree = 0;
+ }
+ else
+ cp = (char*)malloc(((unsigned)dot+8));
+ cp[dot+append] = 0;
+ nv_offattr(np,NV_NOFREE);
+ }
}
}
@@ -1701,14 +1994,9 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
up->cp = cp;
if(sp)
{
- int c = cp[dot];
- memcpy(cp,sp,dot);
- cp[dot]=0;
- if(nv_isattr(np, NV_LTOU))
- ltou(cp);
- else if(nv_isattr (np, NV_UTOL))
- utol(cp);
- cp[dot] = c;
+ int c = cp[dot+append];
+ memmove(cp+append,sp,dot);
+ cp[dot+append] = c;
if(nv_isattr(np, NV_RJUST) && nv_isattr(np, NV_ZFILL))
rightjust(cp,size,'0');
else if(nv_isattr(np, NV_LJUST|NV_RJUST)==NV_RJUST)
@@ -1728,11 +2016,11 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
}
if(flags&NV_APPEND)
stakseek(offset);
- if(tofree && tofree!=Empty)
+ if(tofree && tofree!=Empty && tofree!=Null)
free((void*)tofree);
}
if(!was_local && ((flags&NV_EXPORT) || nv_isattr(np,NV_EXPORT)))
- sh_envput(sh.env,np);
+ sh_envput(shp->env,np);
return;
}
@@ -1802,7 +2090,8 @@ static void rightjust(char *str, int size, int fill)
{
oldn = n;
w = mbchar(cp);
- outsize = mbwidth(w);
+ if((outsize = mbwidth(w)) <0)
+ outsize = 0;
size -= outsize;
c = cp-oldcp;
n += (c-outsize);
@@ -1889,10 +2178,16 @@ static void attstore(register Namval_t *np, void *data)
{
register int flag = np->nvflag;
register struct adata *ap = (struct adata*)data;
- ap->sh = &sh;
+ ap->sh = sh_getinterp();
ap->tp = 0;
if(!(flag&NV_EXPORT) || (flag&NV_FUNCT))
return;
+ if((flag&(NV_UTOL|NV_LTOU|NV_INTEGER)) == (NV_UTOL|NV_LTOU))
+ {
+ data = (void*)nv_mapchar(np,0);
+ if(strcmp(data,e_tolower) && strcmp(data,e_toupper))
+ return;
+ }
flag &= (NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER);
*ap->attval++ = '=';
if((flag&NV_DOUBLE) == NV_DOUBLE)
@@ -1918,7 +2213,7 @@ static void pushnam(Namval_t *np, void *data)
{
register char *value;
register struct adata *ap = (struct adata*)data;
- ap->sh = &sh;
+ ap->sh = sh_getinterp();
ap->tp = 0;
if(nv_isattr(np,NV_IMPORT) && np->nvenv)
*ap->argnam++ = np->nvenv;
@@ -1936,14 +2231,15 @@ static void pushnam(Namval_t *np, void *data)
#ifdef _ENV_H
char **sh_envgen(void)
{
+ Shell_t *shp = sh_getinterp();
int offset,tell;
register char **er;
- env_delete(sh.env,"_");
- er = env_get(sh.env);
+ env_delete(shp->env,"_");
+ er = env_get(shp->env);
offset = staktell();
stakputs(e_envmarker);
tell = staktell();
- nv_scan(sh.var_tree, attstore,(void*)0,0,(NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER));
+ nv_scan(shp->var_tree, attstore,(void*)0,0,(NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER));
if(tell ==staktell())
stakseek(offset);
else
@@ -1960,6 +2256,7 @@ char **sh_envgen(void)
Shell_t *shp = sh_getinterp();
data.sh = shp;
data.tp = 0;
+ data.mapname = 0;
/* L_ARGNOD gets generated automatically as full path name of command */
nv_offattr(L_ARGNOD,NV_EXPORT);
data.attsize = 6;
@@ -1996,13 +2293,27 @@ static int scanfilter(Dt_t *dict, void *arg, void *data)
register int k=np->nvflag;
register struct scan *sp = (struct scan*)data;
register struct adata *tp = (struct adata*)sp->scandata;
+ char *cp;
NOT_USED(dict);
#if SHOPT_TYPEDEF
if(!is_abuiltin(np) && tp && tp->tp && nv_type(np)!=tp->tp)
return(0);
#endif /*SHOPT_TYPEDEF */
+ if(sp->scanmask==NV_TABLE && nv_isvtree(np))
+ k = NV_TABLE;
if(sp->scanmask?(k&sp->scanmask)==sp->scanflags:(!sp->scanflags || (k&sp->scanflags)))
{
+ if(tp && tp->mapname)
+ {
+ if(sp->scanflags==NV_FUNCTION || sp->scanflags==(NV_NOFREE|NV_BINARY|NV_RAW))
+ {
+ int n = strlen(tp->mapname);
+ if(memcmp(np->nvname,tp->mapname,n) || np->nvname[n]!='.' || strchr(&np->nvname[n+1],'.'))
+ return(0);
+ }
+ else if((sp->scanflags==NV_UTOL||sp->scanflags==NV_LTOU) && (cp=(char*)nv_mapchar(np,0)) && strcmp(cp,tp->mapname))
+ return(0);
+ }
if(!np->nvalue.cp && !np->nvfun && !nv_isattr(np,~NV_DEFAULT))
return(0);
if(sp->scanfn)
@@ -2026,6 +2337,7 @@ static int scanfilter(Dt_t *dict, void *arg, void *data)
*/
int nv_scan(Dt_t *root, void (*fn)(Namval_t*,void*), void *data,int mask, int flags)
{
+ Namval_t *np;
Dt_t *base=0;
struct scan sdata;
int (*hashfn)(Dt_t*, void*, void*);
@@ -2037,7 +2349,8 @@ int nv_scan(Dt_t *root, void (*fn)(Namval_t*,void*), void *data,int mask, int fl
hashfn = scanfilter;
if(flags&NV_NOSCOPE)
base = dtview((Dt_t*)root,0);
- dtwalk(root, hashfn,&sdata);
+ for(np=(Namval_t*)dtfirst(root);np; np=(Namval_t*)dtnext(root,np))
+ hashfn(root, np, &sdata);
if(base)
dtview((Dt_t*)root,base);
return(sdata.scancount);
@@ -2050,6 +2363,10 @@ void sh_scope(Shell_t *shp, struct argnod *envlist, int fun)
{
register Dt_t *newscope, *newroot=shp->var_base;
struct Ufunction *rp;
+#if SHOPT_NAMESPACE
+ if(shp->namespace)
+ newroot = nv_dict(shp->namespace);
+#endif /* SHOPT_NAMESPACE */
newscope = dtopen(&_Nvdisc,Dtoset);
if(envlist)
{
@@ -2078,12 +2395,16 @@ void sh_scope(Shell_t *shp, struct argnod *envlist, int fun)
void sh_envnolocal (register Namval_t *np, void *data)
{
+ struct adata *tp = (struct adata*)data;
char *cp=0;
- NOT_USED(data);
if(np==VERSIONNOD && nv_isref(np))
return;
if(np==L_ARGNOD)
return;
+ if(np == tp->sh->namespace)
+ return;
+ if(nv_isref(np))
+ nv_unref(np);
if(nv_isattr(np,NV_EXPORT) && nv_isarray(np))
{
nv_putsub(np,NIL(char*),0);
@@ -2126,12 +2447,6 @@ static void table_unset(Shell_t *shp, register Dt_t *root, int flags, Dt_t *oroo
register Namval_t *np,*nq, *npnext;
for(np=(Namval_t*)dtfirst(root);np;np=npnext)
{
- if(nv_isref(np))
- {
- free((void*)np->nvalue.nrp);
- np->nvalue.cp = 0;
- np->nvflag = 0;
- }
if(nq=dtsearch(oroot,np))
{
if(nv_cover(nq))
@@ -2153,20 +2468,21 @@ static void table_unset(Shell_t *shp, register Dt_t *root, int flags, Dt_t *oroo
if(nv_isattr(nq,NV_EXPORT))
sh_envput(shp->env,nq);
}
- npnext = (Namval_t*)dtnext(root,np);
shp->last_root = root;
shp->last_table = 0;
if(nv_isvtree(np))
{
int len = strlen(np->nvname);
+ npnext = (Namval_t*)dtnext(root,np);
while((nq=npnext) && memcmp(np->nvname,nq->nvname,len)==0 && nq->nvname[len]=='.')
{
- npnext = (Namval_t*)dtnext(root,nq);
_nv_unset(nq,flags);
+ npnext = (Namval_t*)dtnext(root,nq);
nv_delete(nq,root,0);
}
}
+ npnext = (Namval_t*)dtnext(root,np);
_nv_unset(np,flags);
nv_delete(np,root,0);
}
@@ -2184,13 +2500,21 @@ static void table_unset(Shell_t *shp, register Dt_t *root, int flags, Dt_t *oroo
*/
void _nv_unset(register Namval_t *np,int flags)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register union Value *up;
+#if SHOPT_FIXEDARRAY
+ Namarr_t *ap;
+#endif /* SHOPT_FIXEDARRAY */
if(!(flags&NV_RDONLY) && nv_isattr (np,NV_RDONLY))
errormsg(SH_DICT,ERROR_exit(1),e_readonly, nv_name(np));
if(is_afunction(np) && np->nvalue.ip)
{
register struct slnod *slp = (struct slnod*)(np->nvenv);
+ if(shp->st.real_fun == np->nvalue.rp)
+ {
+ np->nvalue.rp->running |= 1;
+ return;
+ }
if(slp && !nv_isattr(np,NV_NOFREE))
{
struct Ufunction *rq,*rp = np->nvalue.rp;
@@ -2202,7 +2526,7 @@ void _nv_unset(register Namval_t *np,int flags)
*cp = 0;
npv = nv_open(name,shp->var_tree,NV_NOARRAY|NV_VARNAME|NV_NOADD);
*cp++ = '.';
- if(npv)
+ if(npv && npv!=shp->namespace)
nv_setdisc(npv,cp,NIL(Namval_t*),(Namfun_t*)npv);
}
if(rp->fname && shp->fpathdict && (rq = (struct Ufunction*)nv_search(rp->fname,shp->fpathdict,0)))
@@ -2233,7 +2557,7 @@ void _nv_unset(register Namval_t *np,int flags)
}
goto done;
}
- if(shp->subshell && !nv_isnull(np))
+ if(shp->subshell)
np = sh_assignok(np,0);
nv_offattr(np,NV_NODISC);
if(np->nvfun && !nv_isref(np))
@@ -2254,27 +2578,40 @@ void _nv_unset(register Namval_t *np,int flags)
np->nvalue.cp = nv_isarray(np)?Empty:0;
goto done;
}
- if(nv_isarray(np) && np->nvalue.cp!=Empty && np->nvfun)
+#if SHOPT_FIXEDARRAY
+ else if(np->nvalue.up && nv_isarray(np) && (ap=nv_arrayptr(np)) && !ap->fixed)
+#else
+ else if(np->nvalue.up && nv_isarray(np) && nv_arrayptr(np))
+#endif /* SHOPT_FIXEDARRAY */
up = np->nvalue.up;
+ else if(nv_isref(np) && !nv_isattr(np,NV_EXPORT|NV_MINIMAL) && np->nvalue.nrp)
+ {
+
+ if(np->nvalue.nrp->root)
+ dtdelete(Refdict,(void*)np->nvalue.nrp);
+ if(np->nvalue.nrp->sub)
+ free(np->nvalue.nrp->sub);
+ free((void*)np->nvalue.nrp);
+ np->nvalue.cp = 0;
+ up = 0;
+ }
else
up = &np->nvalue;
if(up && up->cp)
{
- if(up->cp!=Empty && !nv_isattr(np, NV_NOFREE))
+ if(up->cp!=Empty && up->cp!=Null && !nv_isattr(np, NV_NOFREE))
free((void*)up->cp);
up->cp = 0;
}
done:
if(!nv_isarray(np) || !nv_arrayptr(np))
{
- if(nv_isref(np) && !nv_isattr(np,NV_EXPORT))
- free((void*)np->nvalue.nrp);
nv_setsize(np,0);
if(!nv_isattr(np,NV_MINIMAL) || nv_isattr(np,NV_EXPORT))
{
if(nv_isattr(np,NV_EXPORT) && !strchr(np->nvname,'['))
env_delete(shp->env,nv_name(np));
- if(!(flags&NV_EXPORT) || nv_isattr(np,NV_IMPORT|NV_EXPORT)==(NV_IMPORT|NV_EXPORT))
+ if(!(flags&NV_EXPORT) || nv_isattr(np,NV_EXPORT))
np->nvenv = 0;
nv_setattr(np,0);
}
@@ -2370,32 +2707,33 @@ static const Namdisc_t optimize_disc = {sizeof(struct optimize),put_optimize,0,
void nv_optimize(Namval_t *np)
{
+ Shell_t *shp = sh_getinterp();
register Namfun_t *fp;
register struct optimize *op, *xp;
- if(sh.argaddr)
+ if(shp->argaddr)
{
if(np==SH_LINENO)
{
- sh.argaddr = 0;
+ shp->argaddr = 0;
return;
}
for(fp=np->nvfun; fp; fp = fp->next)
{
if(fp->disc && (fp->disc->getnum || fp->disc->getval))
{
- sh.argaddr = 0;
+ shp->argaddr = 0;
return;
}
if(fp->disc== &optimize_disc)
break;
}
- if((xp= (struct optimize*)fp) && xp->ptr==sh.argaddr)
+ if((xp= (struct optimize*)fp) && xp->ptr==shp->argaddr)
return;
if(op = opt_free)
opt_free = op->next;
else
op=(struct optimize*)calloc(1,sizeof(struct optimize));
- op->ptr = sh.argaddr;
+ op->ptr = shp->argaddr;
op->np = np;
if(xp)
{
@@ -2406,8 +2744,8 @@ void nv_optimize(Namval_t *np)
else
{
op->hdr.disc = &optimize_disc;
- op->next = (struct optimize*)sh.optlist;
- sh.optlist = (void*)op;
+ op->next = (struct optimize*)shp->optlist;
+ shp->optlist = (void*)op;
nv_stack(np,&op->hdr);
}
}
@@ -2447,20 +2785,29 @@ void sh_optclear(Shell_t *shp, void *old)
char *nv_getval(register Namval_t *np)
{
+ Shell_t *shp = sh_getinterp();
register union Value *up= &np->nvalue;
register int numeric;
#if SHOPT_OPTIMIZE
- if(!nv_local && sh.argaddr)
+ if(!nv_local && shp->argaddr)
nv_optimize(np);
#endif /* SHOPT_OPTIMIZE */
- if((!np->nvfun || !np->nvfun->disc) && !nv_isattr(np,NV_ARRAY|NV_INTEGER|NV_FUNCT|NV_REF|NV_TABLE))
+ if((!np->nvfun || !np->nvfun->disc) && !nv_isattr(np,NV_ARRAY|NV_INTEGER|NV_FUNCT|NV_REF))
goto done;
if(nv_isref(np))
{
+ char *sub;
if(!np->nvalue.cp)
return(0);
- sh.last_table = nv_reftable(np);
- return(nv_name(nv_refnode(np)));
+ shp->last_table = nv_reftable(np);
+ sub=nv_refsub(np);
+ np = nv_refnode(np);
+ if(sub)
+ {
+ sfprintf(shp->strbuf,"%s[%s]",nv_name(np),sub);
+ return(sfstruse(shp->strbuf));
+ }
+ return(nv_name(np));
}
if(np->nvfun && np->nvfun->disc)
{
@@ -2491,7 +2838,7 @@ char *nv_getval(register Namval_t *np)
format = "%.*La";
else
format = "%.*Lf";
- sfprintf(sh.strbuf,format,nv_size(np),ld);
+ sfprintf(shp->strbuf,format,nv_size(np),ld);
}
else
{
@@ -2502,9 +2849,9 @@ char *nv_getval(register Namval_t *np)
format = "%.*a";
else
format = "%.*f";
- sfprintf(sh.strbuf,format,nv_size(np),d);
+ sfprintf(shp->strbuf,format,nv_size(np),d);
}
- return(sfstruse(sh.strbuf));
+ return(sfstruse(shp->strbuf));
}
else if(nv_isattr(np,NV_UNSIGN))
{
@@ -2535,12 +2882,12 @@ char *nv_getval(register Namval_t *np)
{
if(nv_isattr(np,NV_UNSIGN))
{
- sfprintf(sh.strbuf,"%I*u",sizeof(ll),ll);
- return(sfstruse(sh.strbuf));
+ sfprintf(shp->strbuf,"%I*u",sizeof(ll),ll);
+ return(sfstruse(shp->strbuf));
}
numeric = 0;
}
- return(fmtbasell(ll,numeric, numeric&&numeric!=10));
+ return(fmtbase(ll,numeric, numeric&&numeric!=10));
}
done:
#if (_AST_VERSION>=20030127L)
@@ -2558,7 +2905,7 @@ done:
return(cp);
}
#endif
- if((numeric=nv_size(np)) && up->cp && up->cp[numeric])
+ if(!nv_isattr(np,NV_LJUST|NV_RJUST) && (numeric=nv_size(np)) && up->cp && up->cp[numeric])
{
char *cp = getbuf(numeric+1);
memcpy(cp,up->cp,numeric);
@@ -2570,11 +2917,12 @@ done:
Sfdouble_t nv_getnum(register Namval_t *np)
{
+ Shell_t *shp = sh_getinterp();
register union Value *up;
register Sfdouble_t r=0;
register char *str;
#if SHOPT_OPTIMIZE
- if(!nv_local && sh.argaddr)
+ if(!nv_local && shp->argaddr)
nv_optimize(np);
#endif /* SHOPT_OPTIMIZE */
if(nv_istable(np))
@@ -2638,15 +2986,16 @@ Sfdouble_t nv_getnum(register Namval_t *np)
}
else if((str=nv_getval(np)) && *str!=0)
{
- if(np->nvfun || nv_isattr(np,NV_LJUST|NV_RJUST|NV_ZFILL))
+ if(nv_isattr(np,NV_LJUST|NV_RJUST) || (*str=='0' && !(str[1]=='x'||str[1]=='X')))
{
while(*str=='0')
str++;
}
- r = sh_arith(str);
+ r = sh_arith(shp,str);
}
return(r);
}
+
/*
* Give <np> the attributes <newatts,> and change its current
* value to conform to <newatts>. The <size> of left and right
@@ -2654,13 +3003,15 @@ Sfdouble_t nv_getnum(register Namval_t *np)
*/
void nv_newattr (register Namval_t *np, unsigned newatts, int size)
{
+ Shell_t *shp = sh_getinterp();
register char *sp;
register char *cp = 0;
register unsigned int n;
+ Namval_t *mp = 0;
Namarr_t *ap = 0;
- int oldsize,oldatts;
+ int oldsize,oldatts,trans;
Namfun_t *fp= (newatts&NV_NODISC)?np->nvfun:0;
- char *prefix = sh.prefix;
+ char *prefix = shp->prefix;
newatts &= ~NV_NODISC;
/* check for restrictions */
@@ -2668,18 +3019,27 @@ void nv_newattr (register Namval_t *np, unsigned newatts, int size)
errormsg(SH_DICT,ERROR_exit(1),e_restricted,nv_name(np));
/* handle attributes that do not change data separately */
n = np->nvflag;
+ trans = !(n&NV_INTEGER) && (n&(NV_LTOU|NV_UTOL));
if(newatts&NV_EXPORT)
nv_offattr(np,NV_IMPORT);
if(((n^newatts)&NV_EXPORT))
{
/* record changes to the environment */
if(n&NV_EXPORT)
- env_delete(sh.env,nv_name(np));
+ {
+ nv_offattr(np,NV_EXPORT);
+ env_delete(shp->env,nv_name(np));
+ }
else
- sh_envput(sh.env,np);
+ {
+ nv_onattr(np,NV_EXPORT);
+ sh_envput(shp->env,np);
+ }
+ if((n^newatts)==NV_EXPORT)
+ return;
}
oldsize = nv_size(np);
- if((size==oldsize|| (n&NV_INTEGER)) && ((n^newatts)&~NV_NOCHANGE)==0)
+ if((size==oldsize|| (n&NV_INTEGER)) && !trans && ((n^newatts)&~NV_NOCHANGE)==0)
{
if(size)
nv_setsize(np,size);
@@ -2695,7 +3055,18 @@ void nv_newattr (register Namval_t *np, unsigned newatts, int size)
if(fp)
np->nvfun = 0;
if(ap) /* add element to prevent array deletion */
+ {
ap->nelem++;
+#if SHOPT_FIXEDARRAY
+ if(ap->fixed)
+ {
+ nv_setsize(np,size);
+ np->nvflag &= NV_ARRAY;
+ np->nvflag |= newatts;
+ goto skip;
+ }
+#endif /* SHOPT_TYPEDEF */
+ }
do
{
nv_setsize(np,oldsize);
@@ -2704,43 +3075,52 @@ void nv_newattr (register Namval_t *np, unsigned newatts, int size)
{
if(nv_isattr(np,NV_ZFILL))
while(*sp=='0') sp++;
- cp = (char*)malloc((n=strlen (sp)) + 1);
+ cp = (char*)malloc((n=strlen (sp)) + 8);
strcpy(cp, sp);
- if(ap)
+ if(sp && (mp=nv_opensub(np)))
{
- Namval_t *mp;
- ap->nelem &= ~ARRAY_SCAN;
- if(mp=nv_opensub(np))
+ if(trans)
{
- nv_unset(mp);
- mp->nvalue.cp = Empty;
+ nv_disc(np, &ap->hdr,NV_POP);
+ nv_clone(np,mp,0);
+ nv_disc(np, &ap->hdr,NV_FIRST);
+ nv_offattr(mp,NV_ARRAY);
}
- else
- nv_unset(np);
- ap->nelem |= ARRAY_SCAN;
+ nv_newattr(mp,newatts&~NV_ARRAY,size);
+ }
+ if(!mp)
+ {
+ if(ap)
+ ap->nelem &= ~ARRAY_SCAN;
+ if(!trans)
+ _nv_unset(np,NV_RDONLY|NV_EXPORT);
+ if(ap)
+ ap->nelem |= ARRAY_SCAN;
}
- else
- nv_unset(np);
if(size==0 && (newatts&NV_HOST)!=NV_HOST && (newatts&(NV_LJUST|NV_RJUST|NV_ZFILL)))
size = n;
}
- else
- nv_unset(np);
+ else if(!trans)
+ _nv_unset(np,NV_EXPORT);
nv_setsize(np,size);
- np->nvflag &= NV_ARRAY;
+ np->nvflag &= (NV_ARRAY|NV_NOFREE);
np->nvflag |= newatts;
if (cp)
{
- nv_putval (np, cp, NV_RDONLY);
+ if(!mp)
+ nv_putval (np, cp, NV_RDONLY);
free(cp);
}
}
while(ap && nv_nextsub(np));
+#if SHOPT_FIXEDARRAY
+skip:
+#endif /* SHOPT_TYPEDEF */
if(fp)
np->nvfun = fp;
if(ap)
ap->nelem--;
- sh.prefix = prefix;
+ shp->prefix = prefix;
return;
}
@@ -2769,19 +3149,17 @@ static char *oldgetenv(const char *string)
* This version of getenv uses the hash storage to access environment values
*/
char *sh_getenv(const char *name)
-/*@
- assume name!=0;
-@*/
{
+ Shell_t *shp = sh_getinterp();
register Namval_t *np;
- if(!sh.var_tree)
+ if(!shp->var_tree)
{
#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))
+ else if((np = nv_search(name,shp->var_tree,0)) && nv_isattr(np,NV_EXPORT))
return(nv_getval(np));
return(0);
}
@@ -2804,12 +3182,13 @@ char *getenv(const char *name)
*/
int putenv(const char *name)
{
+ Shell_t *shp = sh_getinterp();
register Namval_t *np;
if(name)
{
- np = nv_open(name,sh.var_tree,NV_EXPORT|NV_IDENT|NV_NOARRAY|NV_ASSIGN);
+ np = nv_open(name,shp->var_tree,NV_EXPORT|NV_IDENT|NV_NOARRAY|NV_ASSIGN);
if(!strchr(name,'='))
- nv_unset(np);
+ _nv_unset(np,0);
}
return(0);
}
@@ -2819,13 +3198,14 @@ int putenv(const char *name)
*/
char* sh_setenviron(const char *name)
{
+ Shell_t *shp = sh_getinterp();
register Namval_t *np;
if(name)
{
- np = nv_open(name,sh.var_tree,NV_EXPORT|NV_IDENT|NV_NOARRAY|NV_ASSIGN);
+ np = nv_open(name,shp->var_tree,NV_EXPORT|NV_IDENT|NV_NOARRAY|NV_ASSIGN);
if(strchr(name,'='))
return(nv_getval(np));
- nv_unset(np);
+ _nv_unset(np,0);
}
return("");
}
@@ -2839,42 +3219,16 @@ char* setenviron(const char *name)
}
/*
- * convert <str> to upper case
- */
-static void ltou(register char *str)
-{
- register int c;
- for(; c= *((unsigned char*)str); str++)
- {
- if(islower(c))
- *str = toupper(c);
- }
-}
-
-/*
- * convert <str> to lower case
- */
-static void utol(register char *str)
-{
- register int c;
- for(; c= *((unsigned char*)str); str++)
- {
- if(isupper(c))
- *str = tolower(c);
- }
-}
-
-/*
* normalize <cp> and return pointer to subscript if any
* if <eq> is specified, return pointer to first = not in a subscript
*/
-static char *lastdot(register char *cp, int eq)
+static char *lastdot(char *cp, int eq)
{
register char *ep=0;
register int c;
if(eq)
cp++;
- while(c= *cp++)
+ while(c= mbchar(cp))
{
if(c=='[')
{
@@ -2901,19 +3255,24 @@ static char *lastdot(register char *cp, int eq)
int nv_rename(register Namval_t *np, int flags)
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register Namval_t *mp=0,*nr=0;
register char *cp;
- int index= -1;
+ int arraynp=0,arraynr,index= -1;
Namval_t *last_table = shp->last_table;
Dt_t *last_root = shp->last_root;
Dt_t *hp = 0;
- char *prefix=shp->prefix,*nvenv = 0;
+ char *nvenv=0,*prefix=shp->prefix;
+ Namarr_t *ap;
if(nv_isattr(np,NV_PARAM) && shp->st.prevst)
{
if(!(hp=(Dt_t*)shp->st.prevst->save_tree))
hp = dtvnext(shp->var_tree);
}
+ if(!nv_isattr(np,NV_MINIMAL))
+ nvenv = np->nvenv;
+ if(nvenv || (cp = nv_name(np)) && nv_isarray(np) && cp[strlen(cp)-1] == ']')
+ arraynp = 1;
if(!(cp=nv_getval(np)))
{
if(flags&NV_MOVE)
@@ -2922,13 +3281,21 @@ int nv_rename(register Namval_t *np, int flags)
}
if(lastdot(cp,0) && nv_isattr(np,NV_MINIMAL))
errormsg(SH_DICT,ERROR_exit(1),e_varname,nv_name(np));
+ arraynr = cp[strlen(cp)-1] == ']';
if(nv_isarray(np) && !(mp=nv_opensub(np)))
index=nv_aindex(np);
shp->prefix = 0;
if(!hp)
hp = shp->var_tree;
- if(!(nr = nv_open(cp, hp, flags|NV_ARRAY|NV_NOREF|NV_NOSCOPE|NV_NOADD|NV_NOFAIL)))
+ if(!(nr = nv_open(cp, hp, flags|NV_ARRAY|NV_NOSCOPE|NV_NOADD|NV_NOFAIL)))
+ {
+#if SHOPT_NAMESPACE
+ if(shp->namespace)
+ hp = nv_dict(shp->namespace);
+ else
+#endif /* SHOPT_NAMESPACE */
hp = shp->var_base;
+ }
else if(shp->last_root)
hp = shp->last_root;
if(!nr)
@@ -2945,7 +3312,11 @@ int nv_rename(register Namval_t *np, int flags)
sfprintf(shp->strbuf,"%s[%d]%c",nv_name(np),index,0);
/* create a virtual node */
if(mp = nv_open(sfstruse(shp->strbuf),shp->var_tree,NV_VARNAME|NV_ADD|NV_ARRAY))
- mp->nvenv = (void*)np;
+ {
+ if(ap = nv_arrayptr(np))
+ ap->nelem++;
+ mp->nvenv = nvenv = (void*)np;
+ }
}
if(mp)
{
@@ -2959,9 +3330,7 @@ int nv_rename(register Namval_t *np, int flags)
if(cp = nv_getval(np))
cp = strdup(cp);
}
- _nv_unset(np,0);
- if(!nv_isattr(np,NV_MINIMAL))
- np->nvenv = nvenv;
+ _nv_unset(np,NV_EXPORT);
if(nr==np)
{
nv_putsub(np,(char*)0, index);
@@ -2973,9 +3342,46 @@ int nv_rename(register Namval_t *np, int flags)
shp->prev_root = shp->last_root;
shp->last_table = last_table;
shp->last_root = last_root;
- nv_clone(nr,np,(flags&NV_MOVE)|NV_COMVAR);
if(flags&NV_MOVE)
- nv_delete(nr,(Dt_t*)0,NV_NOFREE);
+ {
+ if(arraynp && !nv_isattr(np,NV_MINIMAL) && (mp=(Namval_t*)np->nvenv) && (ap=nv_arrayptr(mp)))
+ ap->nelem++;
+ }
+ if((nv_arrayptr(nr) && !arraynr) || nv_isvtree(nr))
+ {
+ if(ap=nv_arrayptr(np))
+ {
+ if(!ap->table)
+ ap->table = dtopen(&_Nvdisc,Dtoset);
+ if(ap->table)
+ mp = nv_search(nv_getsub(np),ap->table,NV_ADD);
+ nv_arraychild(np,mp,0);
+ nvenv = (void*)np;
+ }
+ else
+ mp = np;
+ nv_clone(nr,mp,(flags&NV_MOVE)|NV_COMVAR);
+ mp->nvenv = nvenv;
+ if(flags&NV_MOVE)
+ {
+ if(arraynr && !nv_isattr(nr,NV_MINIMAL) && (mp=(Namval_t*)nr->nvenv) && (ap=nv_arrayptr(mp)))
+ {
+ nv_putsub(mp,nr->nvname,0);
+ _nv_unset(mp,0);
+ }
+ nv_delete(nr,(Dt_t*)0,NV_NOFREE);
+ }
+ }
+ else
+ {
+ nv_putval(np,nv_getval(nr),0);
+ if(flags&NV_MOVE)
+ {
+ if(!nv_isattr(nr,NV_MINIMAL) && (mp=(Namval_t*)(nr->nvenv)) && (ap=nv_arrayptr(mp)))
+ ap->nelem--;
+ _nv_unset(nr,0);
+ }
+ }
return(1);
}
@@ -2984,35 +3390,65 @@ int nv_rename(register Namval_t *np, int flags)
*/
void nv_setref(register Namval_t *np, Dt_t *hp, int flags)
{
- Shell_t *shp = &sh;
- register Namval_t *nq, *nr=0;
+ Shell_t *shp = sh_getinterp();
+ register Namval_t *nq=0, *nr=0;
register char *ep,*cp;
- Dt_t *root = shp->last_root;
- Namarr_t *ap;
+ Dt_t *root = shp->last_root, *hpnext=0;
+ Namarr_t *ap=0;
+ Dt_t *openmatch;
if(nv_isref(np))
return;
if(nv_isarray(np))
errormsg(SH_DICT,ERROR_exit(1),e_badref,nv_name(np));
if(!(cp=nv_getval(np)))
{
- nv_unset(np);
+ _nv_unset(np,0);
nv_onattr(np,NV_REF);
return;
}
if((ep = lastdot(cp,0)) && nv_isattr(np,NV_MINIMAL))
errormsg(SH_DICT,ERROR_exit(1),e_badref,nv_name(np));
- if(!hp)
- hp = shp->var_tree;
- if(!(nr = nq = nv_open(cp, hp, flags|NV_NOSCOPE|NV_NOADD|NV_NOFAIL)))
- hp = shp->last_root==shp->var_tree?shp->var_tree:shp->var_base;
- else if(shp->last_root)
+ if(hp)
+ hpnext = dtvnext(hp);
+ if((nr=nv_open(cp, hp?hp:shp->var_tree, flags|NV_NOSCOPE|NV_NOADD|NV_NOFAIL)))
+ nq = nr;
+ else if(hpnext && dtvnext(hpnext)==shp->var_base && (nr=nv_open(cp,hpnext,flags|NV_NOSCOPE|NV_NOADD|NV_NOFAIL)))
+ nq = nr;
+ else if((openmatch=shp->openmatch) && hpnext==shp->var_base && (nr=nv_open(cp,hpnext,flags|NV_NOSCOPE|NV_NOADD|NV_NOFAIL)))
+ nq = nr;
+ if(nq)
hp = shp->last_root;
+ else
+ hp = hp?(openmatch?openmatch:shp->var_base):shp->var_tree;
+ if(nr==np)
+ {
+ if(shp->namespace && nv_dict(shp->namespace)==hp)
+ errormsg(SH_DICT,ERROR_exit(1),e_selfref,nv_name(np));
+ /* bind to earlier scope, or add to global scope */
+ if(!(hp=dtvnext(hp)) || (nq=nv_search((char*)np,hp,NV_ADD|HASH_BUCKET))==np)
+ errormsg(SH_DICT,ERROR_exit(1),e_selfref,nv_name(np));
+ if(nv_isarray(nq))
+ nv_putsub(nq,(char*)0,ARRAY_UNDEF);
+ }
+#if SHOPT_FIXEDARRAY
+ if(nq && ep && nv_isarray(nq) && !((ap=nv_arrayptr(nq)) && ap->fixed) && !nv_getsub(nq))
+#else
if(nq && ep && nv_isarray(nq) && !nv_getsub(nq))
- nv_endsubscript(nq,ep-1,NV_ADD);
+#endif /* SHOPT_FIXEDARRAY */
+ {
+ if(!nv_arrayptr(nq))
+ {
+ nv_putsub(nq,"1",ARRAY_FILL);
+ _nv_unset(nq,NV_RDONLY);
+ }
+ nv_endsubscript(nq,ep-1,NV_ARRAY);
+ }
if(!nr)
{
+ shp->last_root = 0;
nr= nq = nv_open(cp, hp, flags);
- hp = shp->last_root;
+ if(shp->last_root)
+ hp = shp->last_root;
}
if(shp->last_root == shp->var_tree && root!=shp->var_tree)
{
@@ -3020,41 +3456,55 @@ void nv_setref(register Namval_t *np, Dt_t *hp, int flags)
nv_onattr(np,NV_REF);
errormsg(SH_DICT,ERROR_exit(1),e_globalref,nv_name(np));
}
- if(nr==np)
- {
- if(shp->namespace && nv_dict(shp->namespace)==hp)
- errormsg(SH_DICT,ERROR_exit(1),e_selfref,nv_name(np));
- /* bind to earlier scope, or add to global scope */
- if(!(hp=dtvnext(hp)) || (nq=nv_search((char*)np,hp,NV_ADD|HASH_BUCKET))==np)
- errormsg(SH_DICT,ERROR_exit(1),e_selfref,nv_name(np));
- }
+ shp->instance = 1;
if(nq && !ep && (ap=nv_arrayptr(nq)) && !(ap->nelem&(ARRAY_UNDEF|ARRAY_SCAN)))
ep = nv_getsub(nq);
+#if SHOPT_FIXEDARRAY
+ if(ep && !(ap && ap->fixed))
+#else
if(ep)
+#endif /* SHOPT_FIXEDARRAY */
{
/* cause subscript evaluation and return result */
if(nv_isarray(nq))
ep = nv_getsub(nq);
else
{
- ep[strlen(ep)-1] = 0;
- nv_putsub(nr, ep, 0);
- ep[strlen(ep)-1] = ']';
+ int n;
+ ep[n=strlen(ep)-1] = 0;
+ nv_putsub(nr, ep, ARRAY_FILL);
+ ep[n] = ']';
if(nq = nv_opensub(nr))
ep = 0;
else
- nq = nr;
+ ep = nv_getsub(nq=nr);
}
}
- nv_unset(np);
+ shp->instance = 0;
+ shp->last_root = root;
+ _nv_unset(np,0);
nv_delete(np,(Dt_t*)0,0);
- np->nvalue.nrp = newof(0,struct Namref,1,0);
+ np->nvalue.nrp = newof(0,struct Namref,1,sizeof(Dtlink_t));
np->nvalue.nrp->np = nq;
np->nvalue.nrp->root = hp;
if(ep)
- np->nvalue.nrp->sub = strdup(ep);
+ {
+#if SHOPT_FIXEDARRAY
+ if(ap && ap->fixed)
+ np->nvalue.nrp->curi = ARRAY_FIXED|nv_arrfixed(nq,(Sfio_t*)0,1,&np->nvalue.nrp->dim);
+ else
+#endif /* SHOPT_FIXEDARRAY */
+ np->nvalue.nrp->sub = strdup(ep);
+ }
np->nvalue.nrp->table = shp->last_table;
nv_onattr(np,NV_REF|NV_NOFREE);
+ if(!Refdict)
+ {
+ NullNode.nvname = ".deleted";
+ NullNode.nvflag = NV_RDONLY;
+ Refdict = dtopen(&_Refdisc,Dtobag);
+ }
+ dtinsert(Refdict,np->nvalue.nrp);
}
/*
@@ -3063,15 +3513,16 @@ void nv_setref(register Namval_t *np, Dt_t *hp, int flags)
*/
Shscope_t *sh_getscope(int index, int whence)
{
+ Shell_t *shp = sh_getinterp();
register struct sh_scoped *sp, *topmost;
if(whence==SEEK_CUR)
- sp = &sh.st;
+ sp = &shp->st;
else
{
- if ((struct sh_scoped*)sh.topscope != sh.st.self)
- topmost = (struct sh_scoped*)sh.topscope;
+ if ((struct sh_scoped*)shp->topscope != shp->st.self)
+ topmost = (struct sh_scoped*)shp->topscope;
else
- topmost = &(sh.st);
+ topmost = &(shp->st);
sp = topmost;
if(whence==SEEK_SET)
{
@@ -3093,12 +3544,13 @@ Shscope_t *sh_getscope(int index, int whence)
*/
Shscope_t *sh_setscope(Shscope_t *scope)
{
- Shscope_t *old = (Shscope_t*)sh.st.self;
- *sh.st.self = sh.st;
- sh.st = *((struct sh_scoped*)scope);
- sh.var_tree = scope->var_tree;
- SH_PATHNAMENOD->nvalue.cp = sh.st.filename;
- SH_FUNNAMENOD->nvalue.cp = sh.st.funname;
+ Shell_t *shp = sh_getinterp();
+ Shscope_t *old = (Shscope_t*)shp->st.self;
+ *shp->st.self = shp->st;
+ shp->st = *((struct sh_scoped*)scope);
+ shp->var_tree = scope->var_tree;
+ SH_PATHNAMENOD->nvalue.cp = shp->st.filename;
+ SH_FUNNAMENOD->nvalue.cp = shp->st.funname;
return(old);
}
@@ -3106,14 +3558,17 @@ void sh_unscope(Shell_t *shp)
{
register Dt_t *root = shp->var_tree;
register Dt_t *dp = dtview(root,(Dt_t*)0);
- table_unset(shp,root,NV_RDONLY|NV_NOSCOPE,dp);
- if(shp->st.real_fun && dp==shp->st.real_fun->sdict)
+ if(dp)
{
- dp = dtview(dp,(Dt_t*)0);
- shp->st.real_fun->sdict->view = dp;
+ table_unset(shp,root,NV_RDONLY|NV_NOSCOPE,dp);
+ if(shp->st.real_fun && dp==shp->st.real_fun->sdict)
+ {
+ dp = dtview(dp,(Dt_t*)0);
+ shp->st.real_fun->sdict->view = dp;
+ }
+ shp->var_tree=dp;
+ dtclose(root);
}
- shp->var_tree=dp;
- dtclose(root);
}
/*
@@ -3128,6 +3583,12 @@ void nv_unref(register Namval_t *np)
if(!np->nvalue.nrp)
return;
nq = nv_refnode(np);
+ if(Refdict)
+ {
+ if(np->nvalue.nrp->sub)
+ free(np->nvalue.nrp->sub);
+ dtdelete(Refdict,(void*)np->nvalue.nrp);
+ }
free((void*)np->nvalue.nrp);
np->nvalue.cp = strdup(nv_name(nq));
#if SHOPT_OPTIMIZE
@@ -3188,49 +3649,85 @@ extern void *hashlook(Dt_t *root, const char *name, int mode,int size)
char *nv_name(register Namval_t *np)
{
+ Shell_t *shp = sh_getinterp();
register Namval_t *table;
register Namfun_t *fp;
+#if SHOPT_FIXEDARRAY
+ Namarr_t *ap;
+#endif /* SHOPT_FIXEDARRAY */
char *cp;
if(is_abuiltin(np) || is_afunction(np))
+ {
+#if SHOPT_NAMESPACE
+ if(shp->namespace && is_afunction(np))
+ {
+ char *name = nv_name(shp->namespace);
+ int n = strlen(name);
+ if(memcmp(np->nvname,name,n)==0 && np->nvname[n]=='.')
+ return(np->nvname+n+1);
+ }
+#endif /* SHOPT_NAMESPACE */
return(np->nvname);
+ }
+#if SHOPT_FIXEDARRAY
+ ap = nv_arrayptr(np);
+#endif /* SHOPT_FIXEDARRAY */
if(!nv_isattr(np,NV_MINIMAL|NV_EXPORT) && np->nvenv)
{
- Namval_t *nq= sh.last_table, *mp= (Namval_t*)np->nvenv;
- if(np==sh.last_table)
- sh.last_table = 0;
+ Namval_t *nq= shp->last_table, *mp= (Namval_t*)np->nvenv;
+ if(np==shp->last_table)
+ shp->last_table = 0;
if(nv_isarray(mp))
- sfprintf(sh.strbuf,"%s[%s]",nv_name(mp),np->nvname);
+ sfprintf(shp->strbuf,"%s[%s]",nv_name(mp),np->nvname);
else
- sfprintf(sh.strbuf,"%s.%s",nv_name(mp),np->nvname);
- sh.last_table = nq;
- return(sfstruse(sh.strbuf));
+ sfprintf(shp->strbuf,"%s.%s",nv_name(mp),np->nvname);
+ shp->last_table = nq;
+ return(sfstruse(shp->strbuf));
}
if(nv_istable(np))
#if 1
- sh.last_table = nv_parent(np);
+ shp->last_table = nv_parent(np);
#else
- sh.last_table = nv_create(np,0, NV_LAST,(Namfun_t*)0);
+ shp->last_table = nv_create(np,0, NV_LAST,(Namfun_t*)0);
#endif
else if(!nv_isref(np))
{
for(fp= np->nvfun ; fp; fp=fp->next)
if(fp->disc && fp->disc->namef)
{
- if(np==sh.last_table)
- sh.last_table = 0;
+ if(np==shp->last_table)
+ shp->last_table = 0;
return((*fp->disc->namef)(np,fp));
}
}
- if(!(table=sh.last_table) || *np->nvname=='.' || table==sh.namespace || np==table)
+ if(!(table=shp->last_table) || *np->nvname=='.' || table==shp->namespace || np==table)
+ {
+#if SHOPT_FIXEDARRAY
+ if(!ap || !ap->fixed || (ap->nelem&ARRAY_UNDEF))
+ return(np->nvname);
+ table = 0;
+#else
return(np->nvname);
- cp = nv_name(table);
- sfprintf(sh.strbuf,"%s.%s",cp,np->nvname);
- return(sfstruse(sh.strbuf));
+#endif /* SHOPT_FIXEDARRAY */
+ }
+ if(table)
+ {
+ cp = nv_name(table);
+ sfprintf(shp->strbuf,"%s.%s",cp,np->nvname);
+ }
+ else
+ sfprintf(shp->strbuf,"%s",np->nvname);
+#if SHOPT_FIXEDARRAY
+ if(ap && ap->fixed)
+ nv_arrfixed(np,shp->strbuf,1,(char*)0);
+#endif /* SHOPT_FIXEDARRAY */
+ return(sfstruse(shp->strbuf));
}
Namval_t *nv_lastdict(void)
{
- return(sh.last_table);
+ Shell_t *shp = sh_getinterp();
+ return(shp->last_table);
}
#undef nv_context
diff --git a/usr/src/lib/libshell/common/sh/nvdisc.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/nvdisc.c
index 2caaaa5888..78c6ec062a 100644
--- a/usr/src/lib/libshell/common/sh/nvdisc.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/nvdisc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,6 +28,8 @@
#include "builtins.h"
#include "path.h"
+static void assign(Namval_t*,const char*,int,Namfun_t*);
+
int nv_compare(Dt_t* dict, Void_t *sp, Void_t *dp, Dtdisc_t *disc)
{
if(sp==dp)
@@ -74,6 +76,7 @@ Sfdouble_t nv_getn(Namval_t *np, register Namfun_t *nfp)
{
register Namfun_t *fp;
register Sfdouble_t d=0;
+ Shell_t *shp = sh_getinterp();
char *str;
if((fp = nfp) != NIL(Namfun_t*) && !nv_local)
fp = nfp = nfp->next;
@@ -102,9 +105,12 @@ Sfdouble_t nv_getn(Namval_t *np, register Namfun_t *nfp)
str = nv_getv(np,fp?fp:nfp);
if(str && *str)
{
- while(*str=='0')
- str++;
- d = sh_arith(str);
+ if(nv_isattr(np,NV_LJUST|NV_RJUST) || (*str=='0' && !(str[1]=='x'||str[1]=='X')))
+ {
+ while(*str=='0')
+ str++;
+ }
+ d = sh_arith(shp,str);
}
}
return(d);
@@ -116,6 +122,7 @@ Sfdouble_t nv_getn(Namval_t *np, register Namfun_t *nfp)
void nv_putv(Namval_t *np, const char *value, int flags, register Namfun_t *nfp)
{
register Namfun_t *fp, *fpnext;
+ Namarr_t *ap;
if((fp=nfp) != NIL(Namfun_t*) && !nv_local)
fp = nfp = nfp->next;
nv_local=0;
@@ -126,7 +133,7 @@ void nv_putv(Namval_t *np, const char *value, int flags, register Namfun_t *nfp)
fpnext = fp->next;
if(!fp->disc || !fp->disc->putval)
{
- if(!value)
+ if(!value && (!(ap=nv_arrayptr(np)) || ap->nelem==0))
{
if(fp->disc || !(fp->nofree&1))
nv_disc(np,fp,NV_POP);
@@ -138,6 +145,8 @@ void nv_putv(Namval_t *np, const char *value, int flags, register Namfun_t *nfp)
if(!nv_isattr(np,NV_NODISC) || fp==(Namfun_t*)nv_arrayptr(np))
break;
}
+ if(!value && (flags&NV_TYPE) && fp && fp->disc->putval==assign)
+ fp = 0;
if(fp && fp->disc->putval)
(*fp->disc->putval)(np,value, flags, fp);
else
@@ -248,7 +257,7 @@ static void assign(Namval_t *np,const char* val,int flags,Namfun_t *handle)
if(val && (tp=nv_type(np)) && (nr=nv_open(val,sh.var_tree,NV_VARNAME|NV_ARRAY|NV_NOADD|NV_NOFAIL)) && tp==nv_type(nr))
{
char *sub = nv_getsub(np);
- nv_unset(np);
+ _nv_unset(np,0);
if(sub)
{
nv_putsub(np, sub, ARRAY_ADD);
@@ -270,7 +279,7 @@ static void assign(Namval_t *np,const char* val,int flags,Namfun_t *handle)
if(!nv_isnull(SH_VALNOD))
{
nv_onattr(SH_VALNOD,NV_NOFREE);
- nv_unset(SH_VALNOD);
+ _nv_unset(SH_VALNOD,0);
}
if(flags&NV_INTEGER)
nv_onattr(SH_VALNOD,(flags&(NV_LONG|NV_DOUBLE|NV_EXPNOTE|NV_HEXFLOAT|NV_SHORT)));
@@ -280,7 +289,7 @@ static void assign(Namval_t *np,const char* val,int flags,Namfun_t *handle)
nq = vp->disc[type=UNASSIGN];
if(nq && !isblocked(bp,type))
{
- int bflag;
+ int bflag=0;
block(bp,type);
if (type==APPEND && (bflag= !isblocked(bp,LOOKUPS)))
block(bp,LOOKUPS);
@@ -310,11 +319,11 @@ static void assign(Namval_t *np,const char* val,int flags,Namfun_t *handle)
cp = nv_getval(SH_VALNOD);
if(cp)
nv_putv(np,cp,flags|NV_RDONLY,handle);
- nv_unset(SH_VALNOD);
+ _nv_unset(SH_VALNOD,0);
/* restore everything but the nvlink field */
memcpy(&SH_VALNOD->nvname, &node.nvname, sizeof(node)-sizeof(node.nvlink));
}
- else if(sh_isstate(SH_INIT))
+ else if(sh_isstate(SH_INIT) || np==SH_FUNNAMENOD)
{
/* don't free functions during reinitialization */
nv_putv(np,val,flags,handle);
@@ -325,6 +334,7 @@ static void assign(Namval_t *np,const char* val,int flags,Namfun_t *handle)
int n;
Namarr_t *ap;
block(bp,type);
+ nv_disc(np,handle,NV_POP);
nv_putv(np, val, flags, handle);
if(sh.subshell)
goto done;
@@ -334,18 +344,22 @@ static void assign(Namval_t *np,const char* val,int flags,Namfun_t *handle)
{
if((nq=vp->disc[n]) && !nv_isattr(nq,NV_NOFREE))
{
- nv_unset(nq);
+ _nv_unset(nq,0);
dtdelete(root,nq);
}
}
unblock(bp,type);
- nv_disc(np,handle,NV_POP);
if(!(handle->nofree&1))
free(handle);
}
done:
if(bp== &block)
block_done(bp);
+ if(nq && nq->nvalue.rp->running==1)
+ {
+ nq->nvalue.rp->running=0;
+ _nv_unset(nq,0);
+ }
}
/*
@@ -366,7 +380,7 @@ static char* lookup(Namval_t *np, int type, Sfdouble_t *dp,Namfun_t *handle)
if(!nv_isnull(SH_VALNOD))
{
nv_onattr(SH_VALNOD,NV_NOFREE);
- nv_unset(SH_VALNOD);
+ _nv_unset(SH_VALNOD,0);
}
if(type==LOOKUPN)
{
@@ -403,6 +417,11 @@ static char* lookup(Namval_t *np, int type, Sfdouble_t *dp,Namfun_t *handle)
}
if(bp== &block)
block_done(bp);
+ if(nq && nq->nvalue.rp->running==1)
+ {
+ nq->nvalue.rp->running=0;
+ _nv_unset(nq,0);
+ }
return(cp);
}
@@ -569,13 +588,18 @@ static char *setdisc(register Namval_t* np,register const char *event,Namval_t *
if(action==np)
action = vp->bltins[type];
else if(action)
+ {
+ Namval_t *tp = nv_type(np);
+ if(tp && (np = (Namval_t*)vp->bltins[type]) && nv_isattr(np,NV_STATICF))
+ errormsg(SH_DICT,ERROR_exit(1),e_staticfun,name,tp->nvname);
vp->bltins[type] = action;
+ }
else
{
action = vp->bltins[type];
vp->bltins[type] = 0;
}
- return(action?(char*)action:"");
+ return((char*)action);
}
static void putdisc(Namval_t* np, const char* val, int flag, Namfun_t* fp)
@@ -706,7 +730,7 @@ Namfun_t *nv_disc(register Namval_t *np, register Namfun_t* fp, int mode)
}
lp = lp->next;
}
- if(mode==NV_LAST)
+ if(mode==NV_LAST && lp->disc)
lpp = &lp->next;
}
if(mode==NV_POP)
@@ -714,7 +738,12 @@ Namfun_t *nv_disc(register Namval_t *np, register Namfun_t* fp, int mode)
/* push */
nv_offattr(np,NV_NODISC);
if(mode==NV_LAST)
- fp->next = 0;
+ {
+ if(lp && !lp->disc)
+ fp->next = lp;
+ else
+ fp->next = 0;
+ }
else
{
if((fp->nofree&1) && *lpp)
@@ -809,7 +838,6 @@ static void *newnode(const char *name)
return((void*)np);
}
-#if SHOPT_NAMESPACE
/*
* clone a numeric value
*/
@@ -927,7 +955,7 @@ int nv_clone(Namval_t *np, Namval_t *mp, int flags)
mp->nvalue.cp = strdup(np->nvalue.cp);
nv_offattr(mp,NV_NOFREE);
}
- else if(!(mp->nvalue.cp = np->nvalue.cp))
+ else if((np->nvfun || !nv_isattr(np,NV_ARRAY)) && !(mp->nvalue.cp = np->nvalue.cp))
nv_offattr(mp,NV_NOFREE);
}
if(flags&NV_MOVE)
@@ -939,20 +967,27 @@ int nv_clone(Namval_t *np, Namval_t *mp, int flags)
if(!nv_isattr(np,NV_MINIMAL) || nv_isattr(mp,NV_EXPORT))
{
mp->nvenv = np->nvenv;
- np->nvenv = 0;
- np->nvflag = 0;
+ if(nv_isattr(np,NV_MINIMAL))
+ {
+ np->nvenv = 0;
+ np->nvflag = NV_EXPORT;
+ }
+ else
+ np->nvflag = 0;
}
else
np->nvflag &= NV_MINIMAL;
nv_setsize(np,0);
return(1);
}
- if(nv_isattr(np,NV_INTEGER) && mp->nvalue.ip!=np->nvalue.ip)
+ else if((flags&NV_ARRAY) && !nv_isattr(np,NV_MINIMAL))
+ mp->nvenv = np->nvenv;
+ if(nv_isattr(np,NV_INTEGER) && mp->nvalue.ip!=np->nvalue.ip && np->nvalue.cp!=Empty)
{
mp->nvalue.ip = (int*)num_clone(np,(void*)np->nvalue.ip);
nv_offattr(mp,NV_NOFREE);
}
- else if(flags&NV_NOFREE)
+ else if((flags&NV_NOFREE) && !nv_arrayptr(np))
nv_onattr(np,NV_NOFREE);
return(1);
}
@@ -1006,7 +1041,6 @@ Namval_t *nv_mkclone(Namval_t *mp)
dtinsert(nv_dict(sh.namespace),np);
return(np);
}
-#endif /* SHOPT_NAMESPACE */
Namval_t *nv_search(const char *name, Dt_t *root, int mode)
{
@@ -1026,6 +1060,10 @@ Namval_t *nv_search(const char *name, Dt_t *root, int mode)
root = sh.var_base;
np = dtmatch(root,(void*)name);
}
+#if SHOPT_COSHELL
+ if(sh.inpool)
+ mode |= HASH_NOSCOPE;
+#endif /* SHOPT_COSHELL */
if(!np && (mode&NV_ADD))
{
if(sh.namespace && !(mode&HASH_NOSCOPE) && root==sh.var_tree)
@@ -1054,6 +1092,7 @@ Namval_t *nv_search(const char *name, Dt_t *root, int mode)
*/
Namval_t *nv_bfsearch(const char *name, Dt_t *root, Namval_t **var, char **last)
{
+ Shell_t *shp = sh_getinterp();
int c,offset = staktell();
register char *sp, *cp=0;
Namval_t *np, *nq;
@@ -1067,8 +1106,6 @@ Namval_t *nv_bfsearch(const char *name, Dt_t *root, Namval_t **var, char **last)
return(0);
if(*sp=='[')
{
- if(sp[-1]!='.')
- dname = sp;
while(*sp=='[')
{
sp = nv_endsubscript((Namval_t*)0,(char*)sp,0);
@@ -1079,11 +1116,7 @@ Namval_t *nv_bfsearch(const char *name, Dt_t *root, Namval_t **var, char **last)
break;
if(*sp!='.')
return(0);
- if(dname)
- {
- cp = dname;
- dname = sp+1;
- }
+ cp = sp;
}
else if(*sp=='.')
cp = sp;
@@ -1092,14 +1125,13 @@ Namval_t *nv_bfsearch(const char *name, Dt_t *root, Namval_t **var, char **last)
return(var?nv_search(name,root,0):0);
stakputs(name);
stakputc(0);
- if(!dname)
- dname = cp+1;
+ dname = cp+1;
cp = stakptr(offset) + (cp-name);
if(last)
*last = cp;
c = *cp;
*cp = 0;
- nq=nv_open(stakptr(offset),0,NV_VARNAME|NV_ARRAY|NV_NOASSIGN|NV_NOADD|NV_NOFAIL);
+ nq=nv_open(stakptr(offset),0,NV_VARNAME|NV_NOASSIGN|NV_NOADD|NV_NOFAIL);
*cp = c;
if(!nq)
{
@@ -1114,6 +1146,25 @@ Namval_t *nv_bfsearch(const char *name, Dt_t *root, Namval_t **var, char **last)
*var = nq;
if(c=='[')
nv_endsubscript(nq, cp,NV_NOADD);
+ stakseek(offset);
+#if SHOPT_NAMESPACE
+ if(nv_istable(nq))
+ {
+ Namval_t *nsp = shp->namespace;
+ if(last==0)
+ return(nv_search(name,root,0));
+ shp->namespace = 0;
+ stakputs(nv_name(nq));
+ shp->namespace = nsp;
+ stakputs(dname-1);
+ stakputc(0);
+ np = nv_search(stakptr(offset),root,0);
+ stakseek(offset);
+ return(np);
+ }
+#endif /* SHOPT_NAMESPACE */
+ while(nv_isarray(nq) && !nv_isattr(nq,NV_MINIMAL|NV_EXPORT) && nq->nvenv && nv_isarray((Namval_t*)nq->nvenv))
+ nq = (Namval_t*)nq->nvenv;
return((Namval_t*)nv_setdisc(nq,dname,nq,(Namfun_t*)nq));
done:
stakseek(offset);
@@ -1129,17 +1180,27 @@ done:
* failure. For delete NULL means success and the node that cannot be
* deleted is returned on failure.
*/
-Namval_t *sh_addbuiltin(const char *path, int (*bltin)(int, char*[],void*),void *extra)
+Namval_t *sh_addbuiltin(const char *path, Shbltin_f bltin, void *extra)
{
- register const char *name = path_basename(path);
+ register const char *name;
char *cp;
register Namval_t *np, *nq=0;
int offset=staktell();
- if(name==path && (nq=nv_bfsearch(name,sh.bltin_tree,(Namval_t**)0,&cp)))
+ if(extra==(void*)1)
+ name = path;
+ else if((name = path_basename(path))==path && bltin!=(Shbltin_f)SYSTYPESET->nvalue.bfp && (nq=nv_bfsearch(name,sh.bltin_tree,(Namval_t**)0,&cp)))
path = name = stakptr(offset);
- if(np = nv_search(path,sh.bltin_tree,0))
+ else if(sh.bltin_dir && extra!=(void*)1)
+ {
+ stakputs(sh.bltin_dir);
+ stakputc('/');
+ stakputs(name);
+ path = stakptr(offset);
+ }
+ if(np = nv_search(name,sh.bltin_tree,0))
{
/* exists without a path */
+ stakseek(offset);
if(extra == (void*)1)
{
if(np->nvfun && !nv_isattr(np,NV_NOFREE))
@@ -1160,7 +1221,7 @@ Namval_t *sh_addbuiltin(const char *path, int (*bltin)(int, char*[],void*),void
if(nv_isattr(np,BLT_SPC))
return(np);
if(!bltin)
- bltin = np->nvalue.bfp;
+ bltin = (Shbltin_f)np->nvalue.bfp;
if(np->nvenv)
dtdelete(sh.bltin_tree,np);
if(extra == (void*)1)
@@ -1171,6 +1232,7 @@ Namval_t *sh_addbuiltin(const char *path, int (*bltin)(int, char*[],void*),void
}
if(!np && !(np = nv_search(path,sh.bltin_tree,bltin?NV_ADD:0)))
return(0);
+ stakseek(offset);
if(nv_isattr(np,BLT_SPC))
{
if(extra)
@@ -1181,7 +1243,7 @@ Namval_t *sh_addbuiltin(const char *path, int (*bltin)(int, char*[],void*),void
np->nvfun = 0;
if(bltin)
{
- np->nvalue.bfp = bltin;
+ np->nvalue.bfp = (Nambfp_f)bltin;
nv_onattr(np,NV_BLTIN|NV_NOFREE);
np->nvfun = (Namfun_t*)extra;
}
@@ -1245,16 +1307,40 @@ static Namfun_t *clone_table(Namval_t* np, Namval_t *mp, int flags, Namfun_t *fp
return(&ntp->fun);
}
+struct adata
+{
+ Shell_t *sh;
+ Namval_t *tp;
+ char *mapname;
+ char **argnam;
+ int attsize;
+ char *attval;
+};
+
+static void delete_fun(Namval_t *np, void *data)
+{
+ Shell_t *shp = ((struct adata*)data)->sh;
+ nv_delete(np,shp->fun_tree,NV_NOFREE);
+}
+
static void put_table(register Namval_t* np, const char* val, int flags, Namfun_t* fp)
{
register Dt_t *root = ((struct table*)fp)->dict;
register Namval_t *nq, *mp;
Namarr_t *ap;
- nv_putv(np,val,flags,fp);
+ struct adata data;
if(val)
+ {
+ nv_putv(np,val,flags,fp);
return;
+ }
if(nv_isarray(np) && (ap=nv_arrayptr(np)) && array_elem(ap))
return;
+ memset(&data,0,sizeof(data));
+ data.mapname = nv_name(np);
+ data.sh = ((struct table*)fp)->shp;
+ nv_scan(data.sh->fun_tree,delete_fun,(void*)&data,NV_FUNCTION,NV_FUNCTION|NV_NOSCOPE);
+ dtview(root,0);
for(mp=(Namval_t*)dtfirst(root);mp;mp=nq)
{
_nv_unset(mp,flags);
@@ -1265,6 +1351,7 @@ static void put_table(register Namval_t* np, const char* val, int flags, Namfun_
dtclose(root);
if(!(fp->nofree&1))
free((void*)fp);
+ np->nvfun = 0;
}
/*
@@ -1320,10 +1407,11 @@ Namval_t *nv_parent(Namval_t *np)
Dt_t *nv_dict(Namval_t* np)
{
+ Shell_t *shp=sh_getinterp();
struct table *tp = (struct table*)nv_hasdisc(np,&table_disc);
if(tp)
return(tp->dict);
- np = sh.last_table;
+ np = shp->last_table;
while(np)
{
if(tp = (struct table*)nv_hasdisc(np,&table_disc))
@@ -1334,7 +1422,12 @@ Dt_t *nv_dict(Namval_t* np)
break;
#endif
}
- return(sh.var_tree);
+ return(shp->var_tree);
+}
+
+int nv_istable(Namval_t *np)
+{
+ return(nv_hasdisc(np,&table_disc)!=0);
}
/*
@@ -1342,15 +1435,12 @@ Dt_t *nv_dict(Namval_t* np)
*/
Namval_t *nv_mount(Namval_t *np, const char *name, Dt_t *dict)
{
- Namval_t *mp, *pp=0;
- struct table *tp = newof((struct table*)0, struct table,1,0);
- if(name)
- {
- if(nv_istable(np))
- pp = np;
- else
- pp = nv_lastdict();
- }
+ Namval_t *mp, *pp;
+ struct table *tp;
+ if(nv_hasdisc(np,&table_disc))
+ pp = np;
+ else
+ pp = nv_lastdict();
if(!(tp = newof((struct table*)0, struct table,1,0)))
return(0);
if(name)
@@ -1360,13 +1450,13 @@ Namval_t *nv_mount(Namval_t *np, const char *name, Dt_t *dict)
}
else
mp = np;
+ nv_offattr(mp,NV_TABLE);
if(!nv_isnull(mp))
- nv_unset(mp);
+ _nv_unset(mp,NV_RDONLY);
tp->shp = sh_getinterp();
tp->dict = dict;
tp->parent = pp;
tp->fun.disc = &table_disc;
- nv_onattr(mp,NV_TABLE);
nv_disc(mp, &tp->fun, NV_FIRST);
return(mp);
}
@@ -1394,3 +1484,15 @@ int nv_hasget(Namval_t *np)
}
return(0);
}
+
+#if SHOPT_NAMESPACE
+Namval_t *sh_fsearch(Shell_t *shp, const char *fname, int add)
+{
+ Stk_t *stkp = shp->stk;
+ int offset = stktell(stkp);
+ sfputr(stkp,nv_name(shp->namespace),'.');
+ sfputr(stkp,fname,0);
+ fname = stkptr(stkp,offset);
+ return(nv_search(fname,sh_subfuntree(add&NV_ADD),add));
+}
+#endif /* SHOPT_NAMESPACE */
diff --git a/usr/src/lib/libshell/common/sh/nvtree.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/nvtree.c
index 8ff1605138..5b4d5cbd83 100644
--- a/usr/src/lib/libshell/common/sh/nvtree.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/nvtree.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -42,9 +42,10 @@ struct nvdir
Namfun_t *fun;
struct nvdir *prev;
int len;
- char data[1];
+ char *data;
};
+static int Indent;
char *nv_getvtree(Namval_t*, Namfun_t *);
static void put_tree(Namval_t*, const char*, int,Namfun_t*);
static char *walk_tree(Namval_t*, Namval_t*, int);
@@ -145,12 +146,13 @@ void *nv_diropen(Namval_t *np,const char *name)
{
char *next,*last;
int c,len=strlen(name);
- struct nvdir *save, *dp = new_of(struct nvdir,len);
+ struct nvdir *save, *dp = new_of(struct nvdir,len+1);
Namval_t *nq=0,fake;
Namfun_t *nfp=0;
if(!dp)
return(0);
memset((void*)dp, 0, sizeof(*dp));
+ dp->data = (char*)(dp+1);
if(name[len-1]=='*' || name[len-1]=='@')
len -= 1;
name = memcpy(dp->data,name,len);
@@ -316,6 +318,7 @@ char *nv_dirnext(void *dir)
if(nfp || nv_istable(np))
{
Dt_t *root;
+ int len;
if(nv_istable(np))
root = nv_dict(np);
else
@@ -328,12 +331,15 @@ char *nv_dirnext(void *dir)
}
if(save)
return(cp);
- if(!(save = new_of(struct nvdir,0)))
+ len = strlen(cp);
+ if(!(save = new_of(struct nvdir,len+1)))
return(0);
*save = *dp;
dp->prev = save;
dp->root = root;
- dp->len = 0;
+ dp->len = len-1;
+ dp->data = (char*)(save+1);
+ memcpy(dp->data,cp,len+1);
if(nfp && np->nvfun)
{
#if 0
@@ -409,11 +415,20 @@ void nv_attribute(register Namval_t *np,Sfio_t *out,char *prefix,int noname)
char *ip=0;
Namfun_t *fp=0;
Namval_t *typep=0;
+#if SHOPT_FIXEDARRAY
+ int fixed=0;
+#endif /* SHOPT_FIXEDARRAY */
for(fp=np->nvfun;fp;fp=fp->next)
{
if((typep=fp->type) || (fp->disc && fp->disc->typef && (typep=(*fp->disc->typef)(np,fp))))
break;
}
+ if(np==typep)
+ {
+
+ fp = 0;
+ typep = 0;
+ }
if(!fp && !nv_isattr(np,~(NV_MINIMAL|NV_NOFREE)))
{
if(prefix && *prefix)
@@ -486,9 +501,22 @@ void nv_attribute(register Namval_t *np,Sfio_t *out,char *prefix,int noname)
if(prefix && *prefix)
sfwrite(out,"-C ",3);
}
+#if SHOPT_FIXEDARRAY
+ if(ap && ap->fixed)
+ fixed++;
+ else
+#endif /* SHOPT_FIXEDARRAY */
if(ap && !array_assoc(ap) && (xp=(char**)(ap+1)) && *xp)
ip = nv_namptr(*xp,0)->nvname;
}
+ if(val==NV_UTOL || val==NV_LTOU)
+ {
+ if((cp = (char*)nv_mapchar(np,0)) && strcmp(cp,tp->sh_name+2))
+ {
+ sfprintf(out,"-M %s ",cp);
+ continue;
+ }
+ }
if(prefix)
{
if(*tp->sh_name=='-')
@@ -521,16 +549,25 @@ void nv_attribute(register Namval_t *np,Sfio_t *out,char *prefix,int noname)
break;
}
}
+#if SHOPT_FIXEDARRAY
if(fp)
outtype(np,fp,out,prefix);
if(noname)
return;
+ if(fixed)
+ {
+ sfprintf(out,"%s",nv_name(np));
+ nv_arrfixed(np,out,0,(char*)0);
+ sfputc(out,';');
+ }
+#endif /* SHOPT_FIXEDARRAY */
sfputr(out,nv_name(np),'\n');
}
}
struct Walk
{
+ Shell_t *shp;
Sfio_t *out;
Dt_t *root;
int noscope;
@@ -545,7 +582,9 @@ void nv_outnode(Namval_t *np, Sfio_t* out, int indent, int special)
char *fmtq,*ep,*xp;
Namval_t *mp;
Namarr_t *ap = nv_arrayptr(np);
- int tabs=0,c,more,associative = 0;
+ int scan,tabs=0,c,more,associative = 0;
+ int saveI = Indent;
+ Indent = indent;
if(ap)
{
if(!(ap->nelem&ARRAY_SCAN))
@@ -565,7 +604,7 @@ void nv_outnode(Namval_t *np, Sfio_t* out, int indent, int special)
mp = nv_opensub(np);
while(1)
{
- if(mp && special && nv_isvtree(mp))
+ if(mp && special && nv_isvtree(mp) && !nv_isarray(mp))
{
if(!nv_nextsub(np))
break;
@@ -573,7 +612,7 @@ void nv_outnode(Namval_t *np, Sfio_t* out, int indent, int special)
continue;
}
if(tabs)
- sfnputc(out,'\t',++indent);
+ sfnputc(out,'\t',Indent = ++indent);
tabs=0;
if(associative||special)
{
@@ -582,20 +621,28 @@ void nv_outnode(Namval_t *np, Sfio_t* out, int indent, int special)
sfprintf(out,"[%s]",sh_fmtq(fmtq));
sfputc(out,'=');
}
+ if(ap && !array_assoc(ap))
+ scan = ap->nelem&ARRAY_SCAN;
if(mp && nv_isarray(mp))
{
- nv_outnode(mp, out, indent+(indent>=0),0);
+ nv_outnode(mp, out, indent,0);
if(indent>0)
sfnputc(out,'\t',indent);
sfputc(out,')');
sfputc(out,indent>=0?'\n':' ');
+ if(ap && !array_assoc(ap))
+ ap->nelem |= scan;
more = nv_nextsub(np);
goto skip;
}
if(mp && nv_isvtree(mp))
- nv_onattr(mp,NV_EXPORT);
+ {
+ if(indent<0)
+ nv_onattr(mp,NV_EXPORT);
+ nv_onattr(mp,NV_TABLE);
+ }
ep = nv_getval(mp?mp:np);
- if(ep==Empty)
+ if(ep==Empty && !(ap && ap->fixed))
ep = 0;
xp = 0;
if(!ap && nv_isattr(np,NV_INTEGER|NV_LJUST)==NV_LJUST)
@@ -623,11 +670,13 @@ void nv_outnode(Namval_t *np, Sfio_t* out, int indent, int special)
fmtq = ep;
}
}
+ if(ap && !array_assoc(ap))
+ ap->nelem |= scan;
more = nv_nextsub(np);
c = '\n';
if(indent<0)
{
- c = ';';
+ c = indent < -1?-1:';';
if(ap)
c = more?' ':-1;
}
@@ -636,22 +685,28 @@ void nv_outnode(Namval_t *np, Sfio_t* out, int indent, int special)
*xp = ' ';
skip:
if(!more)
- return;
+ break;
mp = nv_opensub(np);
if(indent>0 && !(mp && special && nv_isvtree(mp)))
sfnputc(out,'\t',indent);
}
+ Indent = saveI;
}
static void outval(char *name, const char *vname, struct Walk *wp)
{
- register Namval_t *np, *nq;
+ register Namval_t *np, *nq, *last_table=wp->shp->last_table;
register Namfun_t *fp;
int isarray=0, special=0,mode=0;
if(*name!='.' || vname[strlen(vname)-1]==']')
mode = NV_ARRAY;
if(!(np=nv_open(vname,wp->root,mode|NV_VARNAME|NV_NOADD|NV_NOASSIGN|NV_NOFAIL|wp->noscope)))
+ {
+ wp->shp->last_table = last_table;
return;
+ }
+ if(!wp->out)
+ wp->shp->last_table = last_table;
fp = nv_hasdisc(np,&treedisc);
if(*name=='.')
{
@@ -699,11 +754,9 @@ static void outval(char *name, const char *vname, struct Walk *wp)
if(!wp->out)
{
_nv_unset(np,NV_RDONLY);
- nv_close(np);
-#if 0
- if(sh.subshell==0 && !(wp->flags&NV_RDONLY) && !nv_isattr(np,NV_MINIMAL|NV_NOFREE))
- nv_delete(np,wp->root,0);
-#endif
+ if(sh.subshell || (wp->flags!=NV_RDONLY) || nv_isattr(np,NV_MINIMAL|NV_NOFREE))
+ wp->root = 0;
+ nv_delete(np,wp->root,nv_isattr(np,NV_MINIMAL)?NV_NOFREE:0);
return;
}
if(isarray==1 && !nq)
@@ -713,7 +766,7 @@ static void outval(char *name, const char *vname, struct Walk *wp)
sfputc(wp->out,'\n');
return;
}
- if(isarray==0 && nv_isarray(np) && nv_isnull(np)) /* empty array */
+ if(isarray==0 && nv_isarray(np) && (nv_isnull(np)||np->nvalue.cp==Empty)) /* empty array */
isarray = 2;
special |= wp->nofollow;
if(!wp->array && wp->indent>0)
@@ -721,13 +774,19 @@ static void outval(char *name, const char *vname, struct Walk *wp)
if(!special)
{
if(*name!='.')
+ {
+ Namarr_t *ap;
nv_attribute(np,wp->out,"typeset",'=');
+ if((ap=nv_arrayptr(np)) && ap->fixed)
+ {
+ sfprintf(wp->out,"%s",name);
+ nv_arrfixed(np,wp->out,0,(char*)0);
+ sfputc(wp->out,';');
+ }
+ }
nv_outname(wp->out,name,-1);
if((np->nvalue.cp && np->nvalue.cp!=Empty) || nv_isattr(np,~(NV_MINIMAL|NV_NOFREE)) || nv_isvtree(np))
- {
- if(wp->indent>=0 || isarray!=2)
- sfputc(wp->out,(isarray==2?'\n':'='));
- }
+ sfputc(wp->out,(isarray==2?(wp->indent>=0?'\n':';'):'='));
if(isarray==2)
return;
}
@@ -786,6 +845,8 @@ static char **genvalue(char **argv, const char *prefix, int n, struct Walk *wp)
r = 0;
if(*cp=='.')
cp++,r++;
+ if(wp->indent < 0 && argv[1]==0)
+ wp->indent--;
if(nextcp=nextdot(cp))
{
if(outfile)
@@ -849,13 +910,20 @@ static char **genvalue(char **argv, const char *prefix, int n, struct Walk *wp)
argv = genvalue(argv,cp,cp-arg ,wp);
sfputc(outfile,wp->indent<0?';':'\n');
}
- else if(outfile && *cp=='[')
+ else if(outfile && *cp=='[' && cp[-1]!='.')
{
- if(wp->indent)
+ /* skip multi-dimensional arrays */
+ if(*nv_endsubscript((Namval_t*)0,cp,0)=='[')
+ continue;
+ if(wp->indent>0)
sfnputc(outfile,'\t',wp->indent);
+ if(cp[-1]=='.')
+ cp--;
sfputr(outfile,cp,'=');
+ if(*cp=='.')
+ cp++;
argv = genvalue(++argv,cp,cp-arg ,wp);
- sfputc(outfile,'\n');
+ sfputc(outfile,wp->indent>0?'\n':';');
}
else
{
@@ -899,6 +967,7 @@ static char *walk_tree(register Namval_t *np, Namval_t *xp, int flags)
static Sfio_t *out;
struct Walk walk;
Sfio_t *outfile;
+ Sfoff_t off = 0;
int len, savtop = staktell();
char *savptr = stakfreeze(0);
register struct argnod *ap=0;
@@ -912,6 +981,7 @@ static char *walk_tree(register Namval_t *np, Namval_t *xp, int flags)
Namval_t *mp=0;
Shell_t *shp = sh_getinterp();
char *xpname = xp?stakcopy(nv_name(xp)):0;
+ walk.shp = shp;
if(xp)
{
shp->last_root = shp->prev_root;
@@ -957,7 +1027,7 @@ static char *walk_tree(register Namval_t *np, Namval_t *xp, int flags)
stakputs(cp+len);
stakputc(0);
shp->var_tree = save_tree;
- mq = nv_open(stakptr(0),save_tree,NV_VARNAME|NV_NOASSIGN|NV_NOFAIL);
+ mq = nv_open(stakptr(0),shp->prev_root,NV_VARNAME|NV_NOASSIGN|NV_NOFAIL);
shp->var_tree = dp;
if(nq && mq)
{
@@ -990,10 +1060,12 @@ static char *walk_tree(register Namval_t *np, Namval_t *xp, int flags)
outfile = 0;
else if(!(outfile=out))
outfile = out = sfnew((Sfio_t*)0,(char*)0,-1,-1,SF_WRITE|SF_STRING);
+ else if(flags&NV_TABLE)
+ off = sftell(outfile);
else
sfseek(outfile,0L,SEEK_SET);
walk.out = outfile;
- walk.indent = (flags&NV_EXPORT)?-1:0;
+ walk.indent = (flags&NV_EXPORT)?-1:Indent;
walk.nofollow = 0;
walk.noscope = noscope;
walk.array = 0;
@@ -1004,7 +1076,8 @@ static char *walk_tree(register Namval_t *np, Namval_t *xp, int flags)
if(!outfile)
return((char*)0);
sfputc(out,0);
- return((char*)out->_data);
+ sfseek(out,off,SEEK_SET);
+ return((char*)out->_data+off);
}
Namfun_t *nv_isvtree(Namval_t *np)
@@ -1019,7 +1092,7 @@ Namfun_t *nv_isvtree(Namval_t *np)
*/
char *nv_getvtree(register Namval_t *np, Namfun_t *fp)
{
- int flags=0, dsize=fp->dsize;
+ int flags=0, dsize=fp?fp->dsize:0;
for(; fp && fp->next; fp=fp->next)
{
if(fp->next->disc && (fp->next->disc->getnum || fp->next->disc->getval))
@@ -1031,6 +1104,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(flags |= nv_isattr(np,NV_TABLE))
+ nv_offattr(np,NV_TABLE);
if(dsize && (flags&NV_EXPORT))
return("()");
return(walk_tree(np,(Namval_t*)0,flags));
diff --git a/usr/src/lib/libshell/common/sh/nvtype.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/nvtype.c
index 603f72111e..3b1d0e2947 100644
--- a/usr/src/lib/libshell/common/sh/nvtype.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/nvtype.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -23,8 +23,9 @@
* AT&T Labs
*
*/
-
#include "defs.h"
+#include "io.h"
+#include "variables.h"
static const char sh_opttype[] =
"[-1c?\n@(#)$Id: type (AT&T Labs Research) 2008-07-01 $\n]"
@@ -83,6 +84,9 @@ struct Namtype
Namval_t *parent;
Namval_t *bp;
Namval_t *cp;
+#if SHOPT_NAMESPACE
+ Namval_t *nsp;
+#endif /* SHOPT_NAMESPACE */
char *nodes;
char *data;
Namchld_t childfun;
@@ -121,6 +125,8 @@ typedef struct
short _dshort;
char _cpointer;
char *_dpointer;
+ int32_t _cint32_t;
+ int32_t *_dint32_t;
} _Align_;
#define alignof(t) ((char*)&((_Align_*)0)->_d##t-(char*)&((_Align_*)0)->_c##t)
@@ -147,10 +153,9 @@ static const Namdisc_t type_disc =
#endif
};
-static size_t datasize(Namval_t *np, size_t *offset)
+size_t nv_datasize(Namval_t *np, size_t *offset)
{
size_t s=0, a=0;
- Namarr_t *ap;
if(nv_isattr(np,NV_INTEGER))
{
if(nv_isattr(np,NV_DOUBLE)==NV_DOUBLE)
@@ -185,8 +190,8 @@ static size_t datasize(Namval_t *np, size_t *offset)
}
else
{
- a = alignof(long);
- s = sizeof(long);
+ a = alignof(int32_t);
+ s = sizeof(int32_t);
}
}
}
@@ -199,8 +204,6 @@ static size_t datasize(Namval_t *np, size_t *offset)
}
if(a>1 && offset)
*offset = a*((*offset +a-1)/a);
- if(nv_isarray(np) && (ap = nv_arrayptr(np)))
- s *= array_elem(ap);
return(s);
}
@@ -218,6 +221,10 @@ static char *name_chtype(Namval_t *np, Namfun_t *fp)
sfprintf(sh.strbuf,"%s[%s].%s",cp,sub,np->nvname);
else
sfprintf(sh.strbuf,"%s.%s",cp,np->nvname);
+#if SHOPT_FIXEDARRAY
+ if((ap=nv_arrayptr(np)) && ap->fixed)
+ nv_arrfixed(np,sh.strbuf,1,(char*)0);
+#endif /* SHOPT_FIXEDARRAY */
sh.last_table = tp;
return(sfstruse(sh.strbuf));
}
@@ -232,11 +239,12 @@ static void put_chtype(Namval_t* np, const char* val, int flag, Namfun_t* fp)
Namchld_t *pp = (Namchld_t*)fp;
size_t dsize=0,offset = (char*)np-(char*)pp->ptype;
Namval_t *mp = (Namval_t*)((char*)pp->ttype+offset);
- dsize = datasize(mp,&dsize);
+ dsize = nv_datasize(mp,&dsize);
if(mp->nvalue.cp >= pp->ttype->data && mp->nvalue.cp < (char*)pp+pp->ttype->fun.dsize)
{
np->nvalue.cp = pp->ptype->data + (mp->nvalue.cp-pp->ptype->data);
- memcpy((char*)np->nvalue.cp,mp->nvalue.cp,dsize);
+ if(np->nvalue.cp!=mp->nvalue.cp)
+ memcpy((char*)np->nvalue.cp,mp->nvalue.cp,dsize);
}
else if(!nv_isarray(mp) && mp->nvalue.cp)
{
@@ -314,7 +322,7 @@ static int fixnode(Namtype_t *dp, Namtype_t *pp, int i, struct Namref *nrp,int f
if(nv_isarray(nq))
nq->nvalue.cp = 0;
nq->nvfun = 0;
- if(nv_isarray(nq) && nv_type(np))
+ if(nv_isarray(nq) && ((flag&NV_IARRAY) || nv_type(np)))
clone_all_disc(np,nq,flag&~NV_TYPE);
else
clone_all_disc(np,nq,flag);
@@ -344,6 +352,8 @@ static int fixnode(Namtype_t *dp, Namtype_t *pp, int i, struct Namref *nrp,int f
nv_offattr(nq,NV_NOFREE);
}
}
+ else if(nq->nvalue.cp==Empty)
+ nv_offattr(nq,NV_NOFREE);
}
if(fp)
@@ -396,11 +406,13 @@ static Namfun_t *clone_type(Namval_t* np, Namval_t *mp, int flags, Namfun_t *fp)
for(i=dp->numnodes; --i >= 0; )
{
nq = nv_namptr(dp->nodes,i);
- if(fixnode(dp,pp,i,nrp,NV_TYPE))
+ if(fixnode(dp,pp,i,nrp,NV_TYPE|(flags&NV_IARRAY)))
{
nrp++;
nq = nq->nvalue.nrp->np;
}
+ if(flags==(NV_NOFREE|NV_ARRAY))
+ continue;
if(nq->nvalue.cp || !nv_isvtree(nq) || nv_isattr(nq,NV_RDONLY))
{
/* see if default value has been overwritten */
@@ -427,7 +439,7 @@ static Namfun_t *clone_type(Namval_t* np, Namval_t *mp, int flags, Namfun_t *fp)
errormsg(SH_DICT,ERROR_exit(1),e_readonly, nq->nvname);
if(nv_isref(nq))
nq = nv_refnode(nq);
- if((size = datasize(nr,(size_t*)0)) && size==datasize(nq,(size_t*)0))
+ if((size = nv_datasize(nr,(size_t*)0)) && size==nv_datasize(nq,(size_t*)0))
memcpy((char*)nq->nvalue.cp,nr->nvalue.cp,size);
else if(ap=nv_arrayptr(nr))
{
@@ -541,8 +553,10 @@ static void put_type(Namval_t* np, const char* val, int flag, Namfun_t* fp)
if((pp=nv_hasdisc(nq,fp->disc)) && pp->type==fp->type)
{
+ if(!nq->nvenv)
+ flag |= NV_EXPORT;
_nv_unset(np, flag);
- nv_clone(nq,np,0);
+ nv_clone(nq,np,NV_IARRAY);
return;
}
}
@@ -612,11 +626,11 @@ static int typeinfo(Opt_t* op, Sfio_t *out, const char *str, Optdisc_t *fp)
stakputc('.');
stakputs(np->nvname);
stakputc(0);
- np = nv_open(stakptr(offset), sh.var_tree, NV_NOADD|NV_VARNAME);
+ np = nv_open(cp=stakptr(offset), sh.var_tree, NV_NOADD|NV_VARNAME);
stakseek(offset);
if(!np)
{
- sfprintf(sfstderr,"%s: no such variable\n",np->nvname);
+ sfprintf(sfstderr,"%s: no such variable\n",cp);
return(-1);
}
if(!(dp=(Namtype_t*)nv_hasdisc(np,&type_disc)))
@@ -712,7 +726,10 @@ static int typeinfo(Opt_t* op, Sfio_t *out, const char *str, Optdisc_t *fp)
cp = 0;
if((nq = nv_search(stakptr(offset),sh.fun_tree,0)) && nq->nvalue.cp)
cp = nq->nvalue.rp->help;
- sfprintf(out,"\t[+%s?%s]\n",dp->names[i],cp?cp:Empty);
+ if(nq && nv_isattr(nq,NV_STATICF))
+ sfprintf(out,"\t[+%s?:static:%s]\n",dp->names[i],cp?cp:Empty);
+ else
+ sfprintf(out,"\t[+%s?%s]\n",dp->names[i],cp?cp:Empty);
if(cp)
sfputc(out,'.');
stakseek(n);
@@ -796,9 +813,21 @@ void nv_addtype(Namval_t *np, const char *optstr, Optdisc_t *op, size_t optsz)
name++;
else
name = np->nvname;
+#if SHOPT_NAMESPACE
+ if(bp=(Namval_t*)shp->namespace)
+ {
+ Namtype_t *tp = (Namtype_t*)nv_hasdisc(np, &type_disc);
+ if(tp)
+ tp->nsp = bp;
+ if(!shp->strbuf2)
+ shp->strbuf2 = sfstropen();
+ sfprintf(shp->strbuf2,".%s.%s%c\n",nv_name(bp)+1,name,0);
+ name = sfstruse(shp->strbuf2);
+ }
+#endif /* SHOPT_NAMESPACE */
if((bp=nv_search(name,shp->fun_tree,NV_NOSCOPE)) && !bp->nvalue.ip)
nv_delete(bp,shp->fun_tree,0);
- bp = sh_addbuiltin(name, mp->nvalue.bfp, (void*)cp);
+ bp = sh_addbuiltin(name, (Shbltin_f)mp->nvalue.bfp, (void*)cp);
nv_onattr(bp,nv_isattr(mp,NV_PUBLIC));
nv_onattr(np, NV_RDONLY);
}
@@ -831,6 +860,12 @@ Namval_t *nv_mktype(Namval_t **nodes, int numnodes)
struct Namref *nrp = 0;
Namfun_t *fp;
m = strlen(mp->nvname)+1;
+ if(numnodes < 2)
+ {
+ cp = nodes[0]->nvname;
+ _nv_unset(nodes[0],NV_RDONLY);
+ errormsg(SH_DICT,ERROR_exit(1),e_badtypedef,cp);
+ }
for(nnodes=1,i=1; i <numnodes; i++)
{
np=nodes[i];
@@ -865,7 +900,7 @@ Namval_t *nv_mktype(Namval_t **nodes, int numnodes)
nnodes++;
if(name && memcmp(&name[m],&np->nvname[m],n)==0 && np->nvname[m+n]=='.')
offset -= sizeof(char*);
- dsize = datasize(np,&offset);
+ dsize = nv_datasize(np,&offset);
if(!nv_isarray(np) && (dp=(Namtype_t*)nv_hasdisc(np, &type_disc)))
{
nnodes += dp->numnodes;
@@ -894,8 +929,6 @@ Namval_t *nv_mktype(Namval_t **nodes, int numnodes)
}
offset = roundof(offset,sizeof(char*));
nv_setsize(mp,offset);
- if(nd)
- nd++;
k = roundof(sizeof(Namtype_t),sizeof(Sfdouble_t)) - sizeof(Namtype_t);
pp = newof(NiL, Namtype_t, 1, nnodes*NV_MINSZ + offset + size + (nnodes+nd)*sizeof(char*) + iref*sizeof(struct Namref)+k);
pp->fun.dsize = sizeof(Namtype_t)+nnodes*NV_MINSZ +offset+k;
@@ -1001,7 +1034,7 @@ Namval_t *nv_mktype(Namval_t **nodes, int numnodes)
if(!nv_isattr(nr,NV_REF) && !nv_hasdisc(nr,&type_disc))
{
if(nr->nvsize)
- memcpy((char*)nq->nvalue.cp,nr->nvalue.cp,size=datasize(nr,(size_t*)0));
+ memcpy((char*)nq->nvalue.cp,nr->nvalue.cp,size=nv_datasize(nr,(size_t*)0));
else
{
nq->nvalue.cp = nr->nvalue.cp;
@@ -1037,7 +1070,7 @@ Namval_t *nv_mktype(Namval_t **nodes, int numnodes)
nq->nvname = cp;
if(name && memcmp(name,&np->nvname[m],n)==0 && np->nvname[m+n]=='.')
offset -= sizeof(char*);
- dsize = datasize(np,&offset);
+ dsize = nv_datasize(np,&offset);
cp = strcopy(name=cp, &np->nvname[m]);
n = cp-name;
*cp++ = 0;
@@ -1068,7 +1101,7 @@ else sfprintf(sfstderr,"tp==NULL\n");
Namval_t *nr = nv_namptr(dp->nodes,r);
nq = nv_namptr(pp->nodes,++k);
nq->nvname = cp;
- dsize = datasize(nr,&offset);
+ dsize = nv_datasize(nr,&offset);
nq->nvflag = nr->nvflag;
if(nr->nvalue.cp)
{
@@ -1106,7 +1139,7 @@ else sfprintf(sfstderr,"tp==NULL\n");
{
sfprintf(sfstderr,"%s found at k=%d\n",nq->nvname,k);
if(nq->nvalue.cp>=pp->data && nq->nvalue.cp< (char*)pp->names)
- memcpy((char*)nq->nvalue.cp,np->nvalue.cp,datasize(np,0));
+ memcpy((char*)nq->nvalue.cp,np->nvalue.cp,nv_datasize(np,0));
break;
}
}
@@ -1114,17 +1147,12 @@ else sfprintf(sfstderr,"tp==NULL\n");
}
else
{
+ Namarr_t *ap;
j = nv_isattr(np,NV_NOFREE);
+ if(j==0 && (ap=nv_arrayptr(np)) && !ap->fun)
+ j = 1;
nq->nvfun = np->nvfun;
np->nvfun = 0;
- if(nv_isarray(nq) && !nq->nvfun)
- {
- nv_putsub(nq, (char*)0, ARRAY_FILL);
- if(nv_isattr(nq,NV_INTEGER))
- nv_putval(nq, "0",0);
- else
- ((Namarr_t*)nq->nvfun)->nelem--;
- }
nv_disc(nq, &pp->childfun.fun, NV_LAST);
if(nq->nvfun)
{
@@ -1132,7 +1160,7 @@ else sfprintf(sfstderr,"tp==NULL\n");
fp->nofree |= 1;
}
nq->nvalue.cp = np->nvalue.cp;
- if(dsize)
+ if(dsize && (np->nvalue.cp || !nv_isarray(np)))
{
nq->nvalue.cp = pp->data+offset;
sp = (char*)np->nvalue.cp;
@@ -1174,6 +1202,7 @@ else sfprintf(sfstderr,"tp==NULL\n");
}
else if(!mp->nvalue.cp)
mp->nvalue.cp = Empty;
+ nv_onattr(mp,NV_TAGGED);
nv_disc(mp, &pp->fun, NV_LAST);
if(nd>0)
{
@@ -1286,7 +1315,8 @@ int nv_settype(Namval_t* np, Namval_t *tp, int flags)
int rdonly = nv_isattr(np,NV_RDONLY);
char *val=0;
Namarr_t *ap=0;
- int nelem=0;
+ Shell_t *shp = sh_getinterp();
+ int nelem=0,subshell=shp->subshell;
#if SHOPT_TYPEDEF
Namval_t *tq;
if(nv_type(np)==tp)
@@ -1312,6 +1342,11 @@ int nv_settype(Namval_t* np, Namval_t *tp, int flags)
flags &= ~NV_APPEND;
if(!ap)
{
+ if(subshell)
+ {
+ sh_assignok(np,1);
+ shp->subshell = 0;
+ }
nv_putsub(np,"0",ARRAY_FILL);
ap = nv_arrayptr(np);
nelem = 1;
@@ -1338,7 +1373,7 @@ int nv_settype(Namval_t* np, Namval_t *tp, int flags)
nv_disc(np,&ap->hdr,NV_POP);
np->nvalue.up = 0;
nv_clone(tp,np,flags|NV_NOFREE);
- if(np->nvalue.cp && !nv_isattr(np,NV_NOFREE))
+ if(np->nvalue.cp && np->nvalue.cp!=Empty && !nv_isattr(np,NV_NOFREE))
free((void*)np->nvalue.cp);
np->nvalue.up = 0;
nofree = ap->hdr.nofree;
@@ -1351,8 +1386,9 @@ int nv_settype(Namval_t* np, Namval_t *tp, int flags)
{
ap->nelem++;
nv_putsub(np,"0",0);
- _nv_unset(np,NV_RDONLY);
+ _nv_unset(np,NV_RDONLY|NV_TYPE);
ap->nelem--;
+ shp->subshell = subshell;
}
}
type_init(np);
@@ -1546,6 +1582,132 @@ void nv_mkstat(void)
fp->type = tp;
fp->disc = &stat_disc;
nv_disc(tp,fp,NV_FIRST);
- nv_putval(tp,"/dev/null",0);
+ nv_putval(tp,e_devnull,0);
nv_onattr(tp,NV_RDONLY);
}
+
+static void write_indent(Sfio_t *out,char *str,int n,int indent)
+{
+ register int c, first=1;
+ register char *cp = str;
+ while(n-- && (c = *str++))
+ {
+ if(c=='\n')
+ {
+ if(!first)
+ sfnputc(out,'\t',indent);
+ first = 0;
+ sfwrite(out,cp,str-cp);
+ cp = str;
+ }
+ }
+ if(cp > str)
+ {
+ sfnputc(out,'\t',indent);
+ sfwrite(out,cp,str-cp);
+ }
+}
+
+int sh_outtype(Shell_t *shp,Sfio_t *out)
+{
+ Namval_t node,*mp,*tp;
+ Dt_t *dp;
+ char *cp,*sp,*xp,nvtype[sizeof(NV_CLASS)];
+ Sfio_t *iop=0;
+ int n=0,indent = 0;
+ if(cp=shp->prefix)
+ {
+ indent=1;
+ while(*cp)
+ {
+ if(*cp++ =='.')
+ indent++;
+ }
+ n = cp-shp->prefix+1;
+ }
+ strcpy(nvtype,NV_CLASS);
+ if(!(mp = nv_open(nvtype, shp->var_base,NV_NOADD|NV_VARNAME)))
+ return(0);
+ memcpy(&node,L_ARGNOD,sizeof(node));
+ L_ARGNOD->nvfun = 0;
+ L_ARGNOD->nvalue.cp = 0;
+ dp = nv_dict(mp);
+ if(indent==0)
+ for(tp = (Namval_t*)dtfirst(dp); tp; tp = (Namval_t*)dtnext(dp,tp))
+ {
+ if(!nv_search(tp->nvname,shp->bltin_tree,0))
+ continue;
+ sfprintf(out,"typeset -T %s\n",tp->nvname);
+ }
+ for(tp = (Namval_t*)dtfirst(dp); tp; tp = (Namval_t*)dtnext(dp,tp))
+ {
+ if(nv_isnull(tp))
+ continue;
+ if(indent && (memcmp(tp->nvname,shp->prefix,n-1) || tp->nvname[n-1]!='.' || strchr(tp->nvname+n,'.')))
+ continue;
+ nv_settype(L_ARGNOD,tp,0);
+ if(indent)
+ sfnputc(out,'\t',indent);
+ sfprintf(out,"typeset -T %s=",tp->nvname+n);
+ shp->last_table = 0;
+ cp = nv_getval(L_ARGNOD);
+ if(indent)
+ write_indent(out,cp,strlen(cp)-1,indent);
+ else
+ sfprintf(out,"%.*s",strlen(cp)-1,cp);
+ _nv_unset(L_ARGNOD,NV_RDONLY);
+ for(sp=0; sp=nv_setdisc(tp,(char*)0,(Namval_t*)sp,(Namfun_t*)tp);)
+ {
+ mp = (Namval_t*)nv_setdisc(tp,sp,tp,(Namfun_t*)tp);
+ if(!mp || mp==tp)
+ continue;
+ if(cp=strrchr(mp->nvname,'.'))
+ cp++;
+ else
+ cp = mp->nvname;
+ if(indent)
+ sfnputc(out,'\t',indent);
+ if(nv_isattr(mp,NV_FPOSIX))
+ sfprintf(out,"\t%s()",cp);
+ else
+ sfprintf(out,"\tfunction %s",cp);
+ xp = 0;
+ if(mp->nvalue.ip && mp->nvalue.rp->hoffset>=0)
+ {
+ if(nv_isattr(mp,NV_FTMP))
+ iop = shp->heredocs;
+ else if(xp=mp->nvalue.rp->fname)
+ iop = sfopen(iop,xp,"r");
+ else if(shp->gd->hist_ptr)
+ iop = (shp->gd->hist_ptr)->histfp;
+ if(iop && sfseek(iop,(Sfoff_t)mp->nvalue.rp->hoffset,SEEK_SET)>=0)
+ sfmove(iop,out, nv_size(mp), -1);
+ else
+ sfputc(iop,'\n');
+ if(xp)
+ sfclose(iop);
+ if(nv_isattr(mp,NV_STATICF|NV_TAGGED))
+ {
+ if(indent)
+ sfnputc(out,'\t',indent);
+ sfwrite(out,"\ttypeset -f",11);
+ if(nv_isattr(mp,NV_STATICF))
+ sfputc(out,'S');
+ if(nv_isattr(mp,NV_TAGGED))
+ sfputc(out,'t');
+ if(mp->nvalue.rp->help)
+ sfprintf(out,"h '%s'",mp->nvalue.rp->help);
+ sfprintf(out," %s\n",cp);
+ }
+ iop = 0;
+ }
+ }
+ if(indent)
+ sfnputc(out,'\t',indent);
+ sfwrite(out,")\n",2);
+ }
+ dtdelete(shp->var_base,L_ARGNOD);
+ memcpy(L_ARGNOD,&node,sizeof(node));
+ dtinsert(shp->var_base,L_ARGNOD);
+ return(0);
+}
diff --git a/usr/src/lib/libshell/common/sh/parse.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/parse.c
index 277224e176..1d13e6dd94 100644
--- a/usr/src/lib/libshell/common/sh/parse.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/parse.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -42,9 +42,13 @@
#include "test.h"
#include "history.h"
-#define HERE_MEM 1024 /* size of here-docs kept in memory */
+#define HERE_MEM SF_BUFSIZE /* size of here-docs kept in memory */
+#if CDT_VERSION < 20111111L
#define hash nvlink.hl._hash
+#else
+#define hash nvlink.lh.__hash
+#endif
/* These routines are local to this module */
@@ -229,7 +233,7 @@ static void check_typedef(struct comnod *tp)
if(cp)
{
Namval_t *mp=(Namval_t*)tp->comnamp ,*bp;
- bp = sh_addbuiltin(cp,mp->nvalue.bfp, (void*)0);
+ bp = sh_addbuiltin(cp, (Shbltin_f)mp->nvalue.bfp, (void*)0);
nv_onattr(bp,nv_isattr(mp,NV_PUBLIC));
}
}
@@ -282,11 +286,11 @@ static Shnode_t *getanode(Lex_t *lp, struct argnod *ap)
t->ar.arline = sh_getlineno(lp);
t->ar.arexpr = ap;
if(ap->argflag&ARG_RAW)
- t->ar.arcomp = sh_arithcomp(ap->argval);
+ t->ar.arcomp = sh_arithcomp(lp->sh,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'));
+ errormsg(SH_DICT,ERROR_warn(0),e_lexwarnvar,lp->sh->inlineno);
t->ar.arcomp = 0;
}
return(t);
@@ -329,6 +333,7 @@ void *sh_parse(Shell_t *shp, Sfio_t *iop, int flag)
return((void*)sh_trestore(shp,iop));
fcsave(&sav_input);
shp->st.staklist = 0;
+ lexp->noreserv = 0;
lexp->heredoc = 0;
lexp->inlineno = shp->inlineno;
lexp->firstline = shp->st.firstline;
@@ -358,7 +363,18 @@ void *sh_parse(Shell_t *shp, Sfio_t *iop, int flag)
if(sffileno(iop)==shp->infd || (flag&SH_FUNEVAL))
shp->binscript = 1;
sfgetc(iop);
- return((void*)sh_trestore(shp,iop));
+ t = sh_trestore(shp,iop);
+ if(flag&SH_NL)
+ {
+ Shnode_t *tt;
+ while(1)
+ {
+ if(!(tt = sh_trestore(shp,iop)))
+ break;
+ t =makelist(lexp,TLST, t, tt);
+ }
+ }
+ return((void*)t);
}
}
flag &= ~SH_FUNEVAL;
@@ -558,11 +574,19 @@ static Shnode_t *term(Lex_t *lexp,register int flag)
t->par.partyp |= COMSCAN;
t->par.partre = term(lexp,0);
}
+#if SHOPT_COSHELL
+ else if((t=item(lexp,SH_NL|SH_EMPTY|(flag&SH_SEMI))) && (lexp->token=='|' || lexp->token==PIPESYM2))
+#else
else if((t=item(lexp,SH_NL|SH_EMPTY|(flag&SH_SEMI))) && lexp->token=='|')
+#endif /* SHOPT_COSHELL */
{
register Shnode_t *tt;
int showme = t->tre.tretyp&FSHOWME;
t = makeparent(lexp,TFORK|FPOU,t);
+#if SHOPT_COSHELL
+ if(lexp->token==PIPESYM2)
+ t->tre.tretyp |= FALTPIPE;
+#endif /* SHOPT_COSHELL */
if(tt=term(lexp,SH_NL))
{
switch(tt->tre.tretyp&COMMSK)
@@ -707,7 +731,7 @@ static Shnode_t *arithfor(Lex_t *lexp,register Shnode_t *tf)
n = sh_lex(lexp);
if(n!=DOSYM && n!=LBRACE)
sh_syntax(lexp);
- tw->wh.dotre = sh_cmd(lexp,n==DOSYM?DONESYM:RBRACE,SH_NL);
+ tw->wh.dotre = sh_cmd(lexp,n==DOSYM?DONESYM:RBRACE,SH_NL|SH_SEMI);
tw->wh.whtyp = TWH;
return(tf);
@@ -726,7 +750,7 @@ static Shnode_t *funct(Lex_t *lexp)
#if SHOPT_KIA
unsigned long current = lexp->current;
#endif /* SHOPT_KIA */
- int jmpval, saveloop=loop_level;
+ int nargs=0,size=0,jmpval, saveloop=loop_level;
struct argnod *savelabel = label_last;
struct checkpt buff;
int save_optget = opt_get;
@@ -752,8 +776,8 @@ static Shnode_t *funct(Lex_t *lexp)
{
if(fcfill() >= 0)
fcseek(-1);
- if(sh_isstate(SH_HISTORY) && shp->hist_ptr)
- t->funct.functloc = sfseek(shp->hist_ptr->histfp,(off_t)0,SEEK_CUR);
+ if(sh_isstate(SH_HISTORY) && shp->gd->hist_ptr)
+ t->funct.functloc = sfseek(shp->gd->hist_ptr->histfp,(off_t)0,SEEK_CUR);
else
{
/* copy source to temporary file */
@@ -789,13 +813,38 @@ static Shnode_t *funct(Lex_t *lexp)
else
{
if(lexp->token==0)
- t->funct.functargs = (struct comnod*)simple(lexp,SH_NOIO|SH_FUNDEF,NIL(struct ionod*));
+ {
+ struct comnod *ac;
+ char *cp, **argv, **argv0;
+ int c;
+ t->funct.functargs = ac = (struct comnod*)simple(lexp,SH_NOIO|SH_FUNDEF,NIL(struct ionod*));
+ if(ac->comset || (ac->comtyp&COMSCAN))
+ errormsg(SH_DICT,ERROR_exit(3),e_lexsyntax4,lexp->sh->inlineno);
+ argv0 = argv = ((struct dolnod*)ac->comarg)->dolval+ARG_SPARE;
+ while(cp= *argv++)
+ {
+ size += strlen(cp)+1;
+ if((c = mbchar(cp)) && isaletter(c))
+ while(c=mbchar(cp), isaname(c));
+ }
+ if(c)
+ errormsg(SH_DICT,ERROR_exit(3),e_lexsyntax4,lexp->sh->inlineno);
+ nargs = argv-argv0;
+ size += sizeof(struct dolnod)+(nargs+ARG_SPARE)*sizeof(char*);
+ if(shp->shcomp && memcmp(".sh.math.",t->funct.functnam,9)==0)
+ {
+ Namval_t *np= nv_open(t->funct.functnam,shp->fun_tree,NV_ADD|NV_VARNAME);
+ np->nvalue.rp = new_of(struct Ufunction,shp->funload?sizeof(Dtlink_t):0);
+ memset((void*)np->nvalue.rp,0,sizeof(struct Ufunction));
+ np->nvalue.rp->argc = ((struct dolnod*)ac->comarg)->dolnum;
+ }
+ }
while(lexp->token==NL)
lexp->token = sh_lex(lexp);
}
if((flag && lexp->token!=LBRACE) || lexp->token==EOFSYM)
sh_syntax(lexp);
- sh_pushcontext(&buff,1);
+ sh_pushcontext(shp,&buff,1);
jmpval = sigsetjmp(buff.buff,0);
if(jmpval == 0)
{
@@ -814,11 +863,26 @@ static Shnode_t *funct(Lex_t *lexp)
fp = (struct functnod*)(slp+1);
fp->functtyp = TFUN|FAMP;
fp->functnam = 0;
+ fp->functargs = 0;
fp->functline = t->funct.functline;
if(shp->st.filename)
fp->functnam = stakcopy(shp->st.filename);
loop_level = 0;
label_last = label_list;
+ if(size)
+ {
+ struct dolnod *dp = (struct dolnod*)stakalloc(size);
+ char *cp, *sp, **argv, **old = ((struct dolnod*)t->funct.functargs->comarg)->dolval+1;
+ argv = ((char**)(dp->dolval))+1;
+ dp->dolnum = ((struct dolnod*)t->funct.functargs->comarg)->dolnum;
+ t->funct.functargs->comarg = (struct argnod*)dp;
+ for(cp=(char*)&argv[nargs]; sp= *old++; cp++)
+ {
+ *argv++ = cp;
+ cp = strcopy(cp,sp);
+ }
+ *argv = 0;
+ }
if(!flag && lexp->token==0)
{
/* copy current word token to current stak frame */
@@ -832,7 +896,7 @@ static Shnode_t *funct(Lex_t *lexp)
}
else if(shp->shcomp)
exit(1);
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
loop_level = saveloop;
label_last = savelabel;
/* restore the old stack */
@@ -876,13 +940,13 @@ static Shnode_t *funct(Lex_t *lexp)
/*
* Compound assignment
*/
-static struct argnod *assign(Lex_t *lexp, register struct argnod *ap, int tdef)
+static struct argnod *assign(Lex_t *lexp, register struct argnod *ap, int type)
{
register int n;
register Shnode_t *t, **tp;
register struct comnod *ac;
Stk_t *stkp = lexp->sh->stk;
- int array=0;
+ int array=0, index=0;
Namval_t *np;
n = strlen(ap->argval)-1;
if(ap->argval[n]!='=')
@@ -891,6 +955,7 @@ static struct argnod *assign(Lex_t *lexp, register struct argnod *ap, int tdef)
{
ap->argval[n--]=0;
array = ARG_APPEND;
+ type |= NV_APPEND;
}
/* shift right */
while(n > 0)
@@ -907,45 +972,59 @@ static struct argnod *assign(Lex_t *lexp, register struct argnod *ap, int tdef)
ap->argflag &= ARG_QUOTED;
ap->argflag |= array;
lexp->assignok = SH_ASSIGN;
- lexp->aliasok = 1;
- array=0;
+ if(type==NV_ARRAY)
+ {
+ lexp->noreserv = 1;
+ lexp->assignok = 0;
+ }
+ else
+ lexp->aliasok = 2;
+ array= (type==NV_ARRAY)?SH_ARRAY:0;
if((n=skipnl(lexp,0))==RPAREN || n==LPAREN)
{
- int index= 0;
- struct argnod **settail;
+ struct argnod *ar,*aq,**settail;
ac = (struct comnod*)getnode(comnod);
- settail= &ac->comset;
memset((void*)ac,0,sizeof(*ac));
+ comarray:
+ settail= &ac->comset;
ac->comline = sh_getlineno(lexp);
while(n==LPAREN)
{
- struct argnod *ap;
- ap = (struct argnod*)stkseek(stkp,ARGVAL);
- ap->argflag= ARG_ASSIGN;
+ ar = (struct argnod*)stkseek(stkp,ARGVAL);
+ ar->argflag= ARG_ASSIGN;
sfprintf(stkp,"[%d]=",index++);
- ap = (struct argnod*)stkfreeze(stkp,1);
- ap->argnxt.ap = 0;
- ap = assign(lexp,ap,0);
- ap->argflag |= ARG_MESSAGE;
- *settail = ap;
- settail = &(ap->argnxt.ap);
+ if(aq=ac->comarg)
+ {
+ ac->comarg = aq->argnxt.ap;
+ sfprintf(stkp,"%s",aq->argval);
+ ar->argflag |= aq->argflag;
+ }
+ ar = (struct argnod*)stkfreeze(stkp,1);
+ ar->argnxt.ap = 0;
+ if(!aq)
+ ar = assign(lexp,ar,0);
+ ar->argflag |= ARG_MESSAGE;
+ *settail = ar;
+ settail = &(ar->argnxt.ap);
+ if(aq)
+ continue;
while((n = skipnl(lexp,0))==0)
{
- ap = (struct argnod*)stkseek(stkp,ARGVAL);
- ap->argflag= ARG_ASSIGN;
+ ar = (struct argnod*)stkseek(stkp,ARGVAL);
+ ar->argflag= ARG_ASSIGN;
sfprintf(stkp,"[%d]=",index++);
stakputs(lexp->arg->argval);
- ap = (struct argnod*)stkfreeze(stkp,1);
- ap->argnxt.ap = 0;
- ap->argflag = lexp->arg->argflag;
- *settail = ap;
- settail = &(ap->argnxt.ap);
+ ar = (struct argnod*)stkfreeze(stkp,1);
+ ar->argnxt.ap = 0;
+ ar->argflag = lexp->arg->argflag;
+ *settail = ar;
+ settail = &(ar->argnxt.ap);
}
}
}
else if(n && n!=FUNCTSYM)
sh_syntax(lexp);
- else if(n!=FUNCTSYM && !(lexp->arg->argflag&ARG_ASSIGN) && !((np=nv_search(lexp->arg->argval,lexp->sh->fun_tree,0)) && (nv_isattr(np,BLT_DCL)|| np==SYSDOT)))
+ else if(type!=NV_ARRAY && n!=FUNCTSYM && !(lexp->arg->argflag&ARG_ASSIGN) && !((np=nv_search(lexp->arg->argval,lexp->sh->fun_tree,0)) && (nv_isattr(np,BLT_DCL)|| np==SYSDOT)))
{
array=SH_ARRAY;
if(fcgetc(n)==LPAREN)
@@ -961,9 +1040,21 @@ static struct argnod *assign(Lex_t *lexp, register struct argnod *ap, int tdef)
}
else if(n>0)
fcseek(-1);
- if(array && tdef)
- sh_syntax(lexp);
+ if(array && type==NV_TYPE)
+ {
+ struct argnod *arg = lexp->arg;
+ n = lexp->token;
+ if(path_search(lexp->sh,lexp->arg->argval,NIL(Pathcomp_t**),1) && (np=nv_search(lexp->arg->argval,lexp->sh->fun_tree,0)) && nv_isattr(np,BLT_DCL))
+ {
+ lexp->token = n;
+ lexp->arg = arg;
+ array = 0;
+ }
+ else
+ sh_syntax(lexp);
+ }
}
+ lexp->noreserv = 0;
while(1)
{
if((n=lexp->token)==RPAREN)
@@ -971,11 +1062,15 @@ static struct argnod *assign(Lex_t *lexp, register struct argnod *ap, int tdef)
if(n==FUNCTSYM || n==SYMRES)
ac = (struct comnod*)funct(lexp);
else
- ac = (struct comnod*)simple(lexp,SH_NOIO|SH_ASSIGN|array,NIL(struct ionod*));
+ ac = (struct comnod*)simple(lexp,SH_NOIO|SH_ASSIGN|type|array,NIL(struct ionod*));
if((n=lexp->token)==RPAREN)
break;
if(n!=NL && n!=';')
+ {
+ if(array && n==LPAREN)
+ goto comarray;
sh_syntax(lexp);
+ }
lexp->assignok = SH_ASSIGN;
if((n=skipnl(lexp,0)) || array)
{
@@ -1145,7 +1240,7 @@ static Shnode_t *item(Lex_t *lexp,int flag)
}
/* 'for i;do cmd' is valid syntax */
else if(tok==';')
- tok=sh_lex(lexp);
+ while((tok=sh_lex(lexp))==NL);
if(tok!=DOSYM && tok!=LBRACE)
sh_syntax(lexp);
loop_level++;
@@ -1161,16 +1256,17 @@ static Shnode_t *item(Lex_t *lexp,int flag)
#if SHOPT_NAMESPACE
case NSPACESYM:
- t = getnode(fornod);
- t->for_.fortyp=TNSPACE;
- t->for_.forlst=0;
+ t = getnode(functnod);
+ t->funct.functtyp=TNSPACE;
+ t->funct.functargs = 0;
+ t->funct.functloc = 0;
if(sh_lex(lexp))
sh_syntax(lexp);
- t->for_.fornam=(char*) lexp->arg->argval;
+ t->funct.functnam=(char*) lexp->arg->argval;
while((tok=sh_lex(lexp))==NL);
if(tok!=LBRACE)
sh_syntax(lexp);
- t->for_.fortre = sh_cmd(lexp,RBRACE,SH_NL);
+ t->funct.functtre = sh_cmd(lexp,RBRACE,SH_NL);
break;
#endif /* SHOPT_NAMESPACE */
@@ -1223,6 +1319,24 @@ static Shnode_t *item(Lex_t *lexp,int flag)
t->par.partyp=TPAR;
break;
+#if SHOPT_COSHELL
+ case '&':
+ if(tok=sh_lex(lexp))
+ {
+ if(tok!=NL)
+ sh_syntax(lexp);
+ t = getnode(comnod);
+ memset(t,0,sizeof(struct comnod));
+ t->com.comline = sh_getlineno(lexp);
+ }
+ else
+ t = (Shnode_t*)simple(lexp,SH_NOIO,NIL(struct ionod*));
+ t->com.comtyp |= FAMP;
+ if(lexp->token=='&' || lexp->token=='|')
+ sh_syntax(lexp);
+ return(t);
+ break;
+#endif /* SHOPT_COSHELL */
default:
if(io==0)
return(0);
@@ -1240,7 +1354,7 @@ static Shnode_t *item(Lex_t *lexp,int flag)
/* FALLTHROUGH */
case 0:
t = (Shnode_t*)simple(lexp,flag,io);
- if(t->com.comarg && lexp->intypeset && (lexp->sh->shcomp || sh_isoption(SH_NOEXEC) || sh.dot_depth))
+ if(t->com.comarg && lexp->intypeset)
check_typedef(&t->com);
lexp->intypeset = 0;
lexp->inexec = 0;
@@ -1329,7 +1443,7 @@ static Shnode_t *simple(Lex_t *lexp,int flag, struct ionod *io)
if(assignment==1)
{
last = strchr(argp->argval,'=');
- if(last && (last[-1]==']'|| (last[-1]=='+' && last[-2]==']')) && (cp=strchr(argp->argval,'[')) && (cp < last))
+ if(last && (last[-1]==']'|| (last[-1]=='+' && last[-2]==']')) && (cp=strchr(argp->argval,'[')) && (cp < last) && cp[-1]!='.')
last = cp;
stkseek(stkp,ARGVAL);
sfwrite(stkp,argp->argval,last-argp->argval);
@@ -1348,9 +1462,7 @@ static Shnode_t *simple(Lex_t *lexp,int flag, struct ionod *io)
else
{
if(!(argp->argflag&ARG_RAW))
- {
argno = -1;
- }
if(argno>=0 && argno++==cmdarg && !(flag&SH_ARRAY) && *argp->argval!='/')
{
/* check for builtin command */
@@ -1370,10 +1482,12 @@ static Shnode_t *simple(Lex_t *lexp,int flag, struct ionod *io)
cmdarg++;
else if(np==SYSEXEC)
lexp->inexec = 1;
- else if(np->nvalue.bfp==b_getopts)
+ else if(np->nvalue.bfp==(Nambfp_f)b_getopts)
opt_get |= FOPTGET;
}
}
+ if((flag&NV_COMVAR) && !assignment)
+ sh_syntax(lexp);
*argtail = argp;
argtail = &(argp->argnxt.ap);
if(!(lexp->assignok=key_on) && !(flag&SH_NOIO) && sh_isoption(SH_NOEXEC))
@@ -1384,7 +1498,6 @@ static Shnode_t *simple(Lex_t *lexp,int flag, struct ionod *io)
tok = sh_lex(lexp);
if(tok==LABLSYM && (flag&SH_ASSIGN))
lexp->token = tok = 0;
-#if SHOPT_DEVFD
if((tok==IPROCSYM || tok==OPROCSYM))
{
argp = process_sub(lexp,tok);
@@ -1393,17 +1506,32 @@ static Shnode_t *simple(Lex_t *lexp,int flag, struct ionod *io)
argtail = &(argp->argnxt.ap);
goto retry;
}
-#endif /* SHOPT_DEVFD */
if(tok==LPAREN)
{
if(argp->argflag&ARG_ASSIGN)
{
int intypeset = lexp->intypeset;
- int tdef = 0;
+ int type = 0;
lexp->intypeset = 0;
- if(t->comnamp==SYSTYPESET && t->comarg->argnxt.ap && strcmp(t->comarg->argnxt.ap->argval,"-T")==0)
- tdef = 1;
- argp = assign(lexp,argp,tdef);
+ if(t->comnamp==SYSTYPESET)
+ {
+ struct argnod *ap;
+ for(ap=t->comarg->argnxt.ap;ap;ap=ap->argnxt.ap)
+ {
+ if(*ap->argval!='-')
+ break;
+ if(strchr(ap->argval,'T'))
+ type = NV_TYPE;
+ else if(strchr(ap->argval,'a'))
+ type = NV_ARRAY;
+ else if(strchr(ap->argval,'C'))
+ type = NV_COMVAR;
+ else
+ continue;
+ break;
+ }
+ }
+ argp = assign(lexp,argp,type);
lexp->intypeset = intypeset;
if(associative)
lexp->assignok |= SH_ASSIGN;
@@ -1412,7 +1540,7 @@ static Shnode_t *simple(Lex_t *lexp,int flag, struct ionod *io)
else if(argno==1 && !t->comset)
{
/* SVR2 style function */
- if(sh_lex(lexp) == RPAREN)
+ if(!(flag&SH_ARRAY) && sh_lex(lexp) == RPAREN)
{
lexp->arg = argp;
return(funct(lexp));
@@ -1511,7 +1639,7 @@ static Shnode_t *simple(Lex_t *lexp,int flag, struct ionod *io)
errormsg(SH_DICT,ERROR_warn(0),e_lexobsolete5,lexp->sh->inlineno-(lexp->token=='\n'),argp->argval);
}
/* expand argument list if possible */
- if(argno>0)
+ if(argno>0 && !(flag&(SH_ARRAY|NV_APPEND)))
t->comarg = qscan(t,argno);
else if(t->comarg)
t->comtyp |= COMSCAN;
diff --git a/usr/src/lib/libshell/common/sh/path.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/path.c
index be90dd7b8f..73670fe833 100644
--- a/usr/src/lib/libshell/common/sh/path.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/path.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -23,6 +23,9 @@
* AT&T Labs
*
*/
+/*
+ * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ */
#include "defs.h"
#include <fcin.h>
@@ -51,11 +54,11 @@
#define LIBCMD "cmd"
-static int canexecute(char*,int);
+static int canexecute(Shell_t*,char*,int);
static void funload(Shell_t*,int,const char*);
static void exscript(Shell_t*,char*, char*[], char**);
-static int path_chkpaths(Pathcomp_t*,Pathcomp_t*,Pathcomp_t*,int);
-static void path_checkdup(register Pathcomp_t*);
+static int path_chkpaths(Shell_t*,Pathcomp_t*,Pathcomp_t*,Pathcomp_t*,int);
+static void path_checkdup(Shell_t *shp,register Pathcomp_t*);
static const char *std_path;
@@ -73,15 +76,42 @@ static int onstdpath(const char *name)
return(0);
}
-static pid_t path_pfexecve(const char *path, char *argv[],char *const envp[],int spawn)
+#if SHOPT_PFSH
+int path_xattr(Shell_t *shp, const char *path, char *rpath)
+{
+ char resolvedpath[PATH_MAX + 1];
+ if (shp->gd->user && *shp->gd->user)
+ {
+ execattr_t *pf;
+ if(!rpath)
+ rpath = resolvedpath;
+ if (!realpath(path, resolvedpath))
+ return -1;
+ if(pf=getexecuser(shp->gd->user, KV_COMMAND, resolvedpath, GET_ONE))
+ {
+ if (!pf->attr || pf->attr->length == 0)
+ {
+ free_execattr(pf);
+ return(0);
+ }
+ free_execattr(pf);
+ return(1);
+ }
+ }
+ errno = ENOENT;
+ return(-1);
+}
+#endif /* SHOPT_PFSH */
+
+static pid_t path_pfexecve(Shell_t *shp,const char *path, char *argv[],char *const envp[],int spawn)
{
#if SHOPT_PFSH
- pid_t pid;
char resolvedpath[PATH_MAX + 1];
+ pid_t pid;
if(spawn)
{
while((pid = vfork()) < 0)
- _sh_fork(pid, 0, (int*)0);
+ _sh_fork(shp,pid, 0, (int*)0);
if(pid)
return(pid);
}
@@ -89,30 +119,11 @@ static pid_t path_pfexecve(const char *path, char *argv[],char *const envp[],int
return(execve(path, argv, envp));
/* Solaris implements realpath(3C) using the resolvepath(2) */
/* system call so we can save us to call access(2) first */
- if (!realpath(path, resolvedpath))
- return -1;
/* we can exec the command directly instead of via pfexec(1) if */
/* there is a matching entry without attributes in exec_attr(4) */
- if (sh.user && *sh.user)
- {
- execattr_t *pf;
- if(pf=getexecuser(sh.user, KV_COMMAND, resolvedpath, GET_ONE))
- {
- if (!pf->attr || pf->attr->length == 0)
- {
- int r = execve(path, argv, envp);
- free_execattr(pf);
- return r;
- }
- free_execattr(pf);
- }
- else
- {
- errno = ENOENT;
- return -1;
- }
- }
+ if(!path_xattr(shp,path,resolvedpath))
+ return(execve(path, argv, envp));
--argv;
argv[0] = argv[1];
argv[1] = resolvedpath;
@@ -123,52 +134,45 @@ static pid_t path_pfexecve(const char *path, char *argv[],char *const envp[],int
}
-static pid_t _spawnveg(const char *path, char* const argv[], char* const envp[], pid_t pgid)
+static pid_t _spawnveg(Shell_t *shp,const char *path, char* const argv[], char* const envp[], pid_t pgid)
{
- int waitsafe = job.waitsafe;
pid_t pid;
- job_lock();
while(1)
{
sh_stats(STAT_SPAWN);
pid = spawnveg(path,argv,envp,pgid);
if(pid>=0 || errno!=EAGAIN)
break;
- _sh_fork(pid, 0, (int*)0);
}
- job.waitsafe = waitsafe;
- if(pid>0)
- job_fork(pid);
- else
- job_unlock();
return(pid);
}
+
/*
* used with command -x to run the command in multiple passes
* spawn is non-zero when invoked via spawn
* the exitval is set to the maximum for each execution
*/
-static pid_t path_xargs(const char *path, char *argv[],char *const envp[], int spawn)
+static pid_t path_xargs(Shell_t *shp,const char *path, char *argv[],char *const envp[], int spawn)
{
register char *cp, **av, **xv;
- char **avlast= &argv[sh.xargmax], **saveargs=0;
+ char **avlast= &argv[shp->xargmax], **saveargs=0;
char *const *ev;
long size, left;
int nlast=1,n,exitval=0;
pid_t pid;
- if(sh.xargmin < 0)
+ if(shp->xargmin < 0)
return((pid_t)-1);
- size = sh.lim.arg_max-1024;
+ size = shp->gd->lim.arg_max-1024;
for(ev=envp; cp= *ev; ev++)
size -= strlen(cp)-1;
- for(av=argv; (cp= *av) && av< &argv[sh.xargmin]; av++)
+ for(av=argv; (cp= *av) && av< &argv[shp->xargmin]; av++)
size -= strlen(cp)-1;
for(av=avlast; cp= *av; av++,nlast++)
size -= strlen(cp)-1;
- av = &argv[sh.xargmin];
+ av = &argv[shp->xargmin];
if(!spawn)
job_clear();
- sh.exitval = 0;
+ shp->exitval = 0;
while(av<avlast)
{
for(xv=av,left=size; left>0 && av<avlast;)
@@ -176,7 +180,7 @@ static pid_t path_xargs(const char *path, char *argv[],char *const envp[], int s
/* leave at least two for last */
if(left<0 && (avlast-av)<2)
av--;
- if(xv==&argv[sh.xargmin])
+ if(xv==&argv[shp->xargmin])
{
n = nlast*sizeof(char*);
saveargs = (char**)malloc(n);
@@ -185,7 +189,7 @@ static pid_t path_xargs(const char *path, char *argv[],char *const envp[], int s
}
else
{
- for(n=sh.xargmin; xv < av; xv++)
+ for(n=shp->xargmin; xv < av; xv++)
argv[n++] = *xv;
for(xv=avlast; cp= *xv; xv++)
argv[n++] = cp;
@@ -193,12 +197,12 @@ static pid_t path_xargs(const char *path, char *argv[],char *const envp[], int s
}
if(saveargs || av<avlast || (exitval && !spawn))
{
- if((pid=_spawnveg(path,argv,envp,0)) < 0)
+ if((pid=_spawnveg(shp,path,argv,envp,0)) < 0)
return(-1);
- job_post(pid,0);
+ job_post(shp,pid,0);
job_wait(pid);
- if(sh.exitval>exitval)
- exitval = sh.exitval;
+ if(shp->exitval>exitval)
+ exitval = shp->exitval;
if(saveargs)
{
memcpy((void*)av,saveargs,n);
@@ -208,11 +212,17 @@ static pid_t path_xargs(const char *path, char *argv[],char *const envp[], int s
}
else if(spawn && !sh_isoption(SH_PFSH))
{
- sh.xargexit = exitval;
- return(_spawnveg(path,argv,envp,spawn>>1));
+ shp->xargexit = exitval;
+ if(saveargs)
+ free((void*)saveargs);
+ return(_spawnveg(shp,path,argv,envp,spawn>>1));
}
else
- return(path_pfexecve(path,argv,envp,spawn));
+ {
+ if(saveargs)
+ free((void*)saveargs);
+ return(path_pfexecve(shp,path,argv,envp,spawn));
+ }
}
if(!spawn)
exit(exitval);
@@ -225,12 +235,11 @@ static pid_t path_xargs(const char *path, char *argv[],char *const envp[], int s
* Invokes getcwd() if flag==0 and if necessary
* Sets the PWD variable to this value
*/
-char *path_pwd(int flag)
+char *path_pwd(Shell_t *shp,int flag)
{
register char *cp;
register char *dfault = (char*)e_dot;
register int count = 0;
- Shell_t *shp = &sh;
if(shp->pwd)
return((char*)shp->pwd);
while(1)
@@ -257,7 +266,7 @@ char *path_pwd(int flag)
if(cp=getcwd(NIL(char*),0))
{
nv_offattr(PWDNOD,NV_NOFREE);
- nv_unset(PWDNOD);
+ _nv_unset(PWDNOD,0);
PWDNOD->nvalue.cp = cp;
goto skip;
}
@@ -280,25 +289,6 @@ skip:
return(cp);
}
-static void free_bltin(Namval_t *np,void *data)
-{
- register Pathcomp_t *pp= (Pathcomp_t*)data;
- if(pp->flags&PATH_STD_DIR)
- {
- int offset=staktell();;
- if(strcmp(pp->name,"/bin")==0 || memcmp(pp->name,np->nvname,pp->len) || np->nvname[pp->len]!='/')
- return;
- stakputs("/bin");
- stakputs(np->nvname+pp->len+1);
- stakputc(0);
- sh_addbuiltin(stakptr(offset),np->nvalue.bfp,NiL);
- stakseek(offset);
- return;
- }
- if((void*)np->nvenv==pp->bltin_lib)
- nv_delete(np,sh_bltin_tree(),NV_NOFREE);
-}
-
/*
* delete current Pathcomp_t structure
*/
@@ -312,16 +302,8 @@ void path_delete(Pathcomp_t *first)
{
if(pp->lib)
free((void*)pp->lib);
- if(pp->blib)
- free((void*)pp->blib);
- if(pp->bltin_lib || (pp->flags&PATH_STD_DIR))
- {
- nv_scan(sh_bltin_tree(),free_bltin,pp,0,0);
-#if SHOPT_DYNAMIC
- if(pp->bltin_lib)
- dlclose(pp->bltin_lib);
-#endif /* SHOPT_DYNAMIC */
- }
+ if(pp->bbuf)
+ free((void*)pp->bbuf);
free((void*)pp);
if(old)
old->next = ppnext;
@@ -336,7 +318,7 @@ void path_delete(Pathcomp_t *first)
* returns library variable from .paths
* The value might be returned on the stack overwriting path
*/
-static char *path_lib(Pathcomp_t *pp, char *path)
+static char *path_lib(Shell_t *shp,Pathcomp_t *pp, char *path)
{
register char *last = strrchr(path,'/');
register int r;
@@ -354,7 +336,7 @@ static char *path_lib(Pathcomp_t *pp, char *path)
char save[8];
for( ;pp; pp=pp->next)
{
- path_checkdup(pp);
+ path_checkdup(shp,pp);
if(pp->ino==statb.st_ino && pp->dev==statb.st_dev && pp->mtime==statb.st_mtime)
return(pp->lib);
}
@@ -362,7 +344,7 @@ static char *path_lib(Pathcomp_t *pp, char *path)
if(last)
pcomp.len = last-path;
memcpy((void*)save, (void*)stakptr(PATH_OFFSET+pcomp.len),sizeof(save));
- if(path_chkpaths((Pathcomp_t*)0,(Pathcomp_t*)0,&pcomp,PATH_OFFSET))
+ if(path_chkpaths(shp,(Pathcomp_t*)0,(Pathcomp_t*)0,&pcomp,PATH_OFFSET))
return(stakfreeze(1));
memcpy((void*)stakptr(PATH_OFFSET+pcomp.len),(void*)save,sizeof(save));
}
@@ -385,7 +367,7 @@ void path_dump(register Pathcomp_t *pp)
/*
* check for duplicate directories on PATH
*/
-static void path_checkdup(register Pathcomp_t *pp)
+static void path_checkdup(Shell_t *shp,register Pathcomp_t *pp)
{
register char *name = pp->name;
register Pathcomp_t *oldpp,*first;
@@ -402,7 +384,7 @@ static void path_checkdup(register Pathcomp_t *pp)
pp->dev = statb.st_dev;
if(*name=='/' && onstdpath(name))
flag = PATH_STD_DIR;
- first = (pp->flags&PATH_CDPATH)?pp->shp->cdpathlist:path_get("");
+ first = (pp->flags&PATH_CDPATH)?(Pathcomp_t*)shp->cdpathlist:path_get(shp,"");
for(oldpp=first; oldpp && oldpp!=pp; oldpp=oldpp->next)
{
if(pp->ino==oldpp->ino && pp->dev==oldpp->dev && pp->mtime==oldpp->mtime)
@@ -416,7 +398,7 @@ static void path_checkdup(register Pathcomp_t *pp)
{
int offset = staktell();
stakputs(name);
- path_chkpaths(first,0,pp,offset);
+ path_chkpaths(shp,first,0,pp,offset);
stakseek(offset);
}
}
@@ -426,7 +408,7 @@ static void path_checkdup(register Pathcomp_t *pp)
* if last is given, all paths that come before <last> are skipped
* the next pathcomp is returned.
*/
-Pathcomp_t *path_nextcomp(register Pathcomp_t *pp, const char *name, Pathcomp_t *last)
+Pathcomp_t *path_nextcomp(Shell_t *shp,register Pathcomp_t *pp, const char *name, Pathcomp_t *last)
{
Pathcomp_t *ppnext;
stakseek(PATH_OFFSET);
@@ -436,12 +418,11 @@ Pathcomp_t *path_nextcomp(register Pathcomp_t *pp, const char *name, Pathcomp_t
{
for(;pp && pp!=last;pp=ppnext)
{
- if(ppnext=pp->next)
- ppnext->shp = pp->shp;
+ ppnext = pp->next;
if(!pp->dev && !pp->ino)
- path_checkdup(pp);
+ path_checkdup(shp,pp);
if(pp->flags&PATH_SKIP)
- continue;
+ return(ppnext);
if(!last || *pp->name!='/')
break;
}
@@ -452,7 +433,7 @@ Pathcomp_t *path_nextcomp(register Pathcomp_t *pp, const char *name, Pathcomp_t
{
if(*pp->name!='/')
{
- stakputs(path_pwd(1));
+ stakputs(path_pwd(shp,1));
if(*stakptr(staktell()-1)!='/')
stakputc('/');
}
@@ -472,9 +453,7 @@ Pathcomp_t *path_nextcomp(register Pathcomp_t *pp, const char *name, Pathcomp_t
static Pathcomp_t* defpath_init(Shell_t *shp)
{
- Pathcomp_t *pp = (void*)path_addpath((Pathcomp_t*)0,(std_path),PATH_PATH);
- if(shp->defpathlist = (void*)pp)
- pp->shp = shp;
+ Pathcomp_t *pp = (void*)path_addpath(shp,(Pathcomp_t*)0,(std_path),PATH_PATH);
return(pp);
}
@@ -486,9 +465,7 @@ static void path_init(Shell_t *shp)
std_path = e_defpath;
if(val=sh_scoped(shp,(PATHNOD))->nvalue.cp)
{
- pp = (void*)path_addpath((Pathcomp_t*)shp->pathlist,val,PATH_PATH);
- if(shp->pathlist = (void*)pp)
- pp->shp = shp;
+ shp->pathlist = pp = (void*)path_addpath(shp,(Pathcomp_t*)shp->pathlist,val,PATH_PATH);
}
else
{
@@ -498,18 +475,15 @@ static void path_init(Shell_t *shp)
}
if(val=sh_scoped(shp,(FPATHNOD))->nvalue.cp)
{
- pp = (void*)path_addpath((Pathcomp_t*)shp->pathlist,val,PATH_FPATH);
- if(shp->pathlist = (void*)pp)
- pp->shp = shp;
+ pp = (void*)path_addpath(shp,(Pathcomp_t*)shp->pathlist,val,PATH_FPATH);
}
}
/*
* returns that pathlist to search
*/
-Pathcomp_t *path_get(register const char *name)
+Pathcomp_t *path_get(register Shell_t *shp,register const char *name)
{
- register Shell_t *shp = &sh;
register Pathcomp_t *pp=0;
if(*name && strchr(name,'/'))
return(0);
@@ -519,7 +493,7 @@ Pathcomp_t *path_get(register const char *name)
path_init(shp);
pp = (Pathcomp_t*)shp->pathlist;
}
- if(!pp && (!(PATHNOD)->nvalue.cp) || sh_isstate(SH_DEFPATH))
+ if(!pp && (!(sh_scoped(shp,PATHNOD)->nvalue.cp)) || sh_isstate(SH_DEFPATH))
{
if(!(pp=(Pathcomp_t*)shp->defpathlist))
pp = defpath_init(shp);
@@ -530,20 +504,13 @@ Pathcomp_t *path_get(register const char *name)
/*
* open file corresponding to name using path give by <pp>
*/
-static int path_opentype(const char *name, register Pathcomp_t *pp, int fun)
+static int path_opentype(Shell_t *shp,const char *name, register Pathcomp_t *pp, int fun)
{
register int fd= -1;
struct stat statb;
Pathcomp_t *oldpp;
- Shell_t *shp;
- if(pp)
- shp = pp->shp;
- else
- {
- shp = sh_getinterp();
- if(!shp->pathlist)
- path_init(shp);
- }
+ if(!pp && !shp->pathlist)
+ path_init(shp);
if(!fun && strchr(name,'/'))
{
if(sh_isoption(SH_RESTRICTED))
@@ -551,12 +518,12 @@ static int path_opentype(const char *name, register Pathcomp_t *pp, int fun)
}
do
{
- pp = path_nextcomp(oldpp=pp,name,0);
+ pp = path_nextcomp(shp,oldpp=pp,name,0);
while(oldpp && (oldpp->flags&PATH_SKIP))
oldpp = oldpp->next;
if(fun && (!oldpp || !(oldpp->flags&PATH_FPATH)))
continue;
- if((fd = sh_open(path_relative(stakptr(PATH_OFFSET)),O_RDONLY,0)) >= 0)
+ if((fd = sh_open(path_relative(shp,stakptr(PATH_OFFSET)),O_RDONLY,0)) >= 0)
{
if(fstat(fd,&statb)<0 || S_ISDIR(statb.st_mode))
{
@@ -570,13 +537,7 @@ static int path_opentype(const char *name, register Pathcomp_t *pp, int fun)
if(fd>=0 && (fd = sh_iomovefd(fd)) > 0)
{
fcntl(fd,F_SETFD,FD_CLOEXEC);
- if(!shp)
- {
- shp = sh_getinterp();
-#if _UWIN
- close(0x10001); /* this results in a /var/log/uwin message with "0x10001" for debugging */
-#endif
- }
+ VALIDATE_FD(shp, fd);
shp->fdstatus[fd] |= IOCLEX;
}
return(fd);
@@ -585,9 +546,9 @@ static int path_opentype(const char *name, register Pathcomp_t *pp, int fun)
/*
* open file corresponding to name using path give by <pp>
*/
-int path_open(const char *name, register Pathcomp_t *pp)
+int path_open(Shell_t *shp,const char *name, register Pathcomp_t *pp)
{
- return(path_opentype(name,pp,0));
+ return(path_opentype(shp,name,pp,0));
}
/*
@@ -603,13 +564,13 @@ char *path_basename(register const char *name)
return ((char*)start);
}
-char *path_fullname(const char *name)
+char *path_fullname(Shell_t *shp,const char *name)
{
int len=strlen(name)+1,dirlen=0;
char *path,*pwd;
if(*name!='/')
{
- pwd = path_pwd(1);
+ pwd = path_pwd(shp,1);
dirlen = strlen(pwd)+1;
}
path = (char*)malloc(len+dirlen);
@@ -630,12 +591,19 @@ static void funload(Shell_t *shp,int fno, const char *name)
{
char *pname,*oldname=shp->st.filename, buff[IOBSIZE+1];
Namval_t *np;
- struct Ufunction *rp;
+ struct Ufunction *rp,*rpfirst;
int savestates = sh_getstate(), oldload=shp->funload;
- pname = path_fullname(stakptr(PATH_OFFSET));
+ pname = path_fullname(shp,stakptr(PATH_OFFSET));
if(shp->fpathdict && (rp = dtmatch(shp->fpathdict,(void*)pname)))
{
Dt_t *funtree = sh_subfuntree(1);
+ while(1)
+ {
+ rpfirst = dtprev(shp->fpathdict,rp);
+ if(!rpfirst || strcmp(pname,rpfirst->fname))
+ break;
+ rp = rpfirst;
+ }
do
{
if((np = dtsearch(funtree,rp->np)) && is_afunction(np))
@@ -648,6 +616,7 @@ static void funload(Shell_t *shp,int fno, const char *name)
rp->fdict = funtree;
}
while((rp=dtnext(shp->fpathdict,rp)) && strcmp(pname,rp->fname)==0);
+ sh_close(fno);
return;
}
sh_onstate(SH_NOLOG);
@@ -657,11 +626,24 @@ static void funload(Shell_t *shp,int fno, const char *name)
shp->funload = 1;
error_info.line = 0;
sh_eval(sfnew(NIL(Sfio_t*),buff,IOBSIZE,fno,SF_READ),SH_FUNEVAL);
+ sh_close(fno);
shp->readscript = 0;
+#if SHOPT_NAMESPACE
+ if(shp->namespace)
+ np = sh_fsearch(shp,name,0);
+ else
+#endif /* SHOPT_NAMESPACE */
+ np = nv_search(name,shp->fun_tree,0);
+ if(!np || !np->nvalue.ip)
+ pname = stakcopy(shp->st.filename);
+ else
+ pname = 0;
free((void*)shp->st.filename);
shp->funload = oldload;
shp->st.filename = oldname;
sh_setstate(savestates);
+ if(pname)
+ errormsg(SH_DICT,ERROR_exit(ERROR_NOEXEC),e_funload,name,pname);
}
/*
@@ -674,17 +656,16 @@ static void funload(Shell_t *shp,int fno, const char *name)
* where it was found.
*/
-int path_search(register const char *name,Pathcomp_t **oldpp, int flag)
+int path_search(Shell_t *shp,register const char *name,Pathcomp_t **oldpp, int flag)
{
register Namval_t *np;
register int fno;
Pathcomp_t *pp=0;
- Shell_t *shp = &sh;
if(name && strchr(name,'/'))
{
stakseek(PATH_OFFSET);
stakputs(name);
- if(canexecute(stakptr(PATH_OFFSET),0)<0)
+ if(canexecute(shp,stakptr(PATH_OFFSET),0)<0)
{
*stakptr(PATH_OFFSET) = 0;
return(0);
@@ -692,7 +673,7 @@ int path_search(register const char *name,Pathcomp_t **oldpp, int flag)
if(*name=='/')
return(1);
stakseek(PATH_OFFSET);
- stakputs(path_pwd(1));
+ stakputs(path_pwd(shp,1));
stakputc('/');
stakputs(name);
stakputc(0);
@@ -707,17 +688,19 @@ int path_search(register const char *name,Pathcomp_t **oldpp, int flag)
path_init(shp);
if(flag)
{
- if((np=nv_search(name,shp->track_tree,0)) && !nv_isattr(np,NV_NOALIAS) && (pp=(Pathcomp_t*)np->nvalue.cp))
+ if(!(flag&1) && (np=nv_search(name,shp->track_tree,0)) && !nv_isattr(np,NV_NOALIAS) && (pp=(Pathcomp_t*)np->nvalue.cp))
{
stakseek(PATH_OFFSET);
- path_nextcomp(pp,name,pp);
+ path_nextcomp(shp,pp,name,pp);
+ if(oldpp)
+ *oldpp = pp;
stakputc(0);
return(0);
}
- pp = path_absolute(name,oldpp?*oldpp:NIL(Pathcomp_t*));
+ pp = path_absolute(shp,name,oldpp?*oldpp:NIL(Pathcomp_t*));
if(oldpp)
*oldpp = pp;
- if(!pp && (np=nv_search(name,shp->fun_tree,HASH_NOSCOPE))&&np->nvalue.ip)
+ if(!pp && (np=nv_search(name,shp->fun_tree,0))&&np->nvalue.ip)
return(1);
if(!pp)
*stakptr(PATH_OFFSET) = 0;
@@ -726,7 +709,7 @@ int path_search(register const char *name,Pathcomp_t **oldpp, int flag)
{
if(!pp)
pp=sh_isstate(SH_DEFPATH)?shp->defpathlist:shp->pathlist;
- if(pp && strmatch(name,e_alphanum) && (fno=path_opentype(name,pp,1))>=0)
+ if(pp && strmatch(name,e_alphanum) && (fno=path_opentype(shp,name,pp,1))>=0)
{
if(flag==2)
{
@@ -750,93 +733,149 @@ int path_search(register const char *name,Pathcomp_t **oldpp, int flag)
/*
* do a path search and find the full pathname of file name
*/
-Pathcomp_t *path_absolute(register const char *name, Pathcomp_t *pp)
+Pathcomp_t *path_absolute(Shell_t *shp,register const char *name, Pathcomp_t *pp)
{
register int f,isfun;
int noexec=0;
Pathcomp_t *oldpp;
- Shell_t *shp = &sh;
Namval_t *np;
+ char *cp;
+ char *bp;
shp->path_err = ENOENT;
- if(!pp && !(pp=path_get("")))
+ if(!pp && !(pp=path_get(shp,"")))
return(0);
shp->path_err = 0;
while(1)
{
- sh_sigcheck();
- isfun = (pp->flags&PATH_FPATH);
- if(oldpp=pp)
+ sh_sigcheck(shp);
+ shp->bltin_dir = 0;
+ while(oldpp=pp)
{
- pp = path_nextcomp(pp,name,0);
- while(oldpp->flags&PATH_SKIP)
- {
- if(!(oldpp=oldpp->next))
- {
- shp->path_err = ENOENT;
- return(0);
- }
- }
+ pp = path_nextcomp(shp,pp,name,0);
+ if(!(oldpp->flags&PATH_SKIP))
+ break;
}
-
+ if(!oldpp)
+ {
+ shp->path_err = ENOENT;
+ return(0);
+ }
+ isfun = (oldpp->flags&PATH_FPATH);
if(!isfun && !sh_isoption(SH_RESTRICTED))
{
- if(*stakptr(PATH_OFFSET)=='/' && nv_search(stakptr(PATH_OFFSET),sh.bltin_tree,0))
+#if SHOPT_DYNAMIC
+ Shbltin_f addr;
+ int n;
+#endif
+ if(*stakptr(PATH_OFFSET)=='/' && nv_search(stakptr(PATH_OFFSET),shp->bltin_tree,0))
return(oldpp);
#if SHOPT_DYNAMIC
- if(oldpp->blib)
+ n = staktell();
+ stakputs("b_");
+ stakputs(name);
+ stakputc(0);
+ if((addr = sh_getlib(shp, stakptr(n), oldpp)) &&
+ (np = sh_addbuiltin(stakptr(PATH_OFFSET),addr,NiL)) &&
+ nv_isattr(np,NV_BLTINOPT))
{
- typedef int (*Fptr_t)(int, char*[], void*);
- Fptr_t addr;
- int n = staktell();
- int libcmd;
- char *cp;
+ shp->bltin_dir = 0;
+ return(oldpp);
+ }
+ stakseek(n);
+ while(bp = oldpp->blib)
+ {
+ char *fp;
+ void *dll;
+ int m;
+ if(fp = strchr(bp, ':'))
+ {
+ *fp++ = 0;
+ oldpp->blib = fp;
+ fp = 0;
+ }
+ else
+ {
+ fp = oldpp->bbuf;
+ oldpp->blib = oldpp->bbuf = 0;
+ }
+ n = staktell();
stakputs("b_");
stakputs(name);
stakputc(0);
- if(!oldpp->bltin_lib)
+ m = staktell();
+ shp->bltin_dir = oldpp->name;
+ if(*bp!='/')
{
- if(cp = strrchr(oldpp->blib,'/'))
- cp++;
- else
- cp = oldpp->blib;
- if((libcmd = !strcmp(cp,LIBCMD)) && (addr=(Fptr_t)dlllook((void*)0,stakptr(n))))
- {
- if((np = sh_addbuiltin(stakptr(PATH_OFFSET),addr,NiL)) && nv_isattr(np,NV_BLTINOPT))
- return(oldpp);
- }
+ stakputs(oldpp->name);
+ stakputc('/');
+ }
+ stakputs(bp);
+ stakputc(0);
+ if(cp = strrchr(stakptr(m),'/'))
+ cp++;
+ else
+ cp = stakptr(m);
+ if(!strcmp(cp,LIBCMD) &&
+ (addr=(Shbltin_f)dlllook((void*)0,stakptr(n))) &&
+ (np = sh_addbuiltin(stakptr(PATH_OFFSET),addr,NiL)) &&
+ nv_isattr(np,NV_BLTINOPT))
+ {
+ found:
+ if(fp)
+ free(fp);
+ shp->bltin_dir = 0;
+ return(oldpp);
+ }
+#ifdef SH_PLUGIN_VERSION
+ if (dll = dllplugin(SH_ID, stakptr(m), NiL, SH_PLUGIN_VERSION, NiL, RTLD_LAZY, NiL, 0))
+ sh_addlib(shp,dll,stakptr(m),oldpp);
+#else
#if (_AST_VERSION>=20040404)
- if (oldpp->bltin_lib = dllplug(SH_ID, oldpp->blib, NiL, RTLD_LAZY, NiL, 0))
+ if (dll = dllplug(SH_ID, stakptr(m), NiL, RTLD_LAZY, NiL, 0))
#else
- if (oldpp->bltin_lib = dllfind(oldpp->blib, NiL, RTLD_LAZY, NiL, 0))
+ if (dll = dllfind(stakptr(m), NiL, RTLD_LAZY, NiL, 0))
#endif
- {
- /*
- * this detects the 2007-05-11 builtin context change and also
- * the 2008-03-30 opt_info.num change that hit libcmd::b_head
- */
+ {
+ /*
+ * this detects the 2007-05-11 builtin context change and also
+ * the 2008-03-30 opt_info.num change that hit libcmd::b_head
+ */
- if (libcmd && !dlllook(oldpp->bltin_lib, "b_pids"))
- {
- dlclose(oldpp->bltin_lib);
- oldpp->bltin_lib = 0;
- oldpp->blib = 0;
- }
- else
- sh_addlib(oldpp->bltin_lib);
+ if (libcmd && !dlllook(dll, "b_pids"))
+ {
+ dlclose(dll);
+ dll = 0;
}
+ else
+ sh_addlib(shp,dll,stakptr(m),oldpp);
}
- if((addr=(Fptr_t)dlllook(oldpp->bltin_lib,stakptr(n))) &&
- (!(np = sh_addbuiltin(stakptr(PATH_OFFSET),NiL,NiL)) || np->nvalue.bfp!=addr) &&
+#endif
+ if(dll &&
+ (addr=(Shbltin_f)dlllook(dll,stakptr(n))) &&
+ (!(np = sh_addbuiltin(stakptr(PATH_OFFSET),NiL,NiL)) || np->nvalue.bfp!=(Nambfp_f)addr) &&
(np = sh_addbuiltin(stakptr(PATH_OFFSET),addr,NiL)))
{
- np->nvenv = oldpp->bltin_lib;
- return(oldpp);
+ np->nvenv = dll;
+ goto found;
}
+ if(*stakptr(PATH_OFFSET)=='/' && nv_search(stakptr(PATH_OFFSET),shp->bltin_tree,0))
+ goto found;
+ if(fp)
+ free(fp);
+ stakseek(n);
}
#endif /* SHOPT_DYNAMIC */
}
+ shp->bltin_dir = 0;
sh_stats(STAT_PATHS);
- f = canexecute(stakptr(PATH_OFFSET),isfun);
+ f = canexecute(shp,stakptr(PATH_OFFSET),isfun);
+ if(isfun && f>=0 && (cp = strrchr(name,'.')))
+ {
+ *cp = 0;
+ if(nv_open(name,sh_subfuntree(1),NV_NOARRAY|NV_IDENT|NV_NOSCOPE))
+ f = -1;
+ *cp = '.';
+ }
if(isfun && f>=0)
{
nv_onattr(nv_open(name,sh_subfuntree(1),NV_NOARRAY|NV_IDENT|NV_NOSCOPE),NV_LTOU|NV_FUNCTION);
@@ -851,12 +890,12 @@ Pathcomp_t *path_absolute(register const char *name, Pathcomp_t *pp)
stakputs("/bin/");
stakputs(name);
stakputc(0);
- np = nv_search(stakptr(n),sh.bltin_tree,0);
+ np = nv_search(stakptr(n),shp->bltin_tree,0);
stakseek(n);
if(np)
{
n = np->nvflag;
- np = sh_addbuiltin(stakptr(PATH_OFFSET),np->nvalue.bfp,nv_context(np));
+ np = sh_addbuiltin(stakptr(PATH_OFFSET),(Shbltin_f)np->nvalue.bfp,nv_context(np));
np->nvflag = n;
}
}
@@ -889,11 +928,11 @@ Pathcomp_t *path_absolute(register const char *name, Pathcomp_t *pp)
# endif /*S_EXEC */
#endif /* S_IXUSR */
-static int canexecute(register char *path, int isfun)
+static int canexecute(Shell_t *shp,register char *path, int isfun)
{
struct stat statb;
register int fd=0;
- path = path_relative(path);
+ path = path_relative(shp,path);
if(isfun)
{
if((fd=open(path,O_RDONLY,0))<0 || fstat(fd,&statb)<0)
@@ -938,12 +977,12 @@ err:
* Return path relative to present working directory
*/
-char *path_relative(register const char* file)
+char *path_relative(Shell_t *shp,register const char* file)
{
register const char *pwd;
register const char *fp = file;
- /* can't relpath when sh.pwd not set */
- if(!(pwd=sh.pwd))
+ /* can't relpath when shp->pwd not set */
+ if(!(pwd=shp->pwd))
return((char*)fp);
while(*pwd==*fp)
{
@@ -961,12 +1000,11 @@ char *path_relative(register const char* file)
return((char*)file);
}
-void path_exec(register const char *arg0,register char *argv[],struct argnod *local)
+void path_exec(Shell_t *shp,register const char *arg0,register char *argv[],struct argnod *local)
{
char **envp;
const char *opath;
Pathcomp_t *libpath, *pp=0;
- Shell_t *shp = &sh;
int slash=0;
nv_setlist(local,NV_EXPORT|NV_IDENT|NV_ASSIGN,0);
envp = sh_envgen();
@@ -978,7 +1016,7 @@ void path_exec(register const char *arg0,register char *argv[],struct argnod *lo
errormsg(SH_DICT,ERROR_exit(1),e_restricted,arg0);
}
else
- pp=path_get(arg0);
+ pp=path_get(shp,arg0);
shp->path_err= ENOENT;
sfsync(NIL(Sfio_t*));
timerdel(NIL(void*));
@@ -987,17 +1025,17 @@ void path_exec(register const char *arg0,register char *argv[],struct argnod *lo
pp = pp->next;
if(pp || slash) do
{
- sh_sigcheck();
+ sh_sigcheck(shp);
if(libpath=pp)
{
- pp = path_nextcomp(pp,arg0,0);
+ pp = path_nextcomp(shp,pp,arg0,0);
opath = stakfreeze(1)+PATH_OFFSET;
}
else
opath = arg0;
- path_spawn(opath,argv,envp,libpath,0);
+ path_spawn(shp,opath,argv,envp,libpath,0);
while(pp && (pp->flags&PATH_FPATH))
- pp = path_nextcomp(pp,arg0,0);
+ pp = path_nextcomp(shp,pp,arg0,0);
}
while(pp);
/* force an exit */
@@ -1008,9 +1046,8 @@ void path_exec(register const char *arg0,register char *argv[],struct argnod *lo
errormsg(SH_DICT,ERROR_system(ERROR_NOEXEC),e_exec,arg0);
}
-pid_t path_spawn(const char *opath,register char **argv, char **envp, Pathcomp_t *libpath, int spawn)
+pid_t path_spawn(Shell_t *shp,const char *opath,register char **argv, char **envp, Pathcomp_t *libpath, int spawn)
{
- Shell_t *shp = sh_getinterp();
register char *path;
char **xp=0, *xval, *libenv = (libpath?libpath->lib:0);
Namval_t* np;
@@ -1062,7 +1099,7 @@ pid_t path_spawn(const char *opath,register char **argv, char **envp, Pathcomp_t
break;
}
}
- if(libenv = path_lib(libpath,path))
+ if(libenv = path_lib(shp,libpath,path))
break;
}
stakseek(0);
@@ -1106,8 +1143,8 @@ pid_t path_spawn(const char *opath,register char **argv, char **envp, Pathcomp_t
envp[0][0] = '_';
envp[0][1] = '=';
sfsync(sfstderr);
- sh_sigcheck();
- path = path_relative(opath);
+ sh_sigcheck(shp);
+ path = path_relative(shp,opath);
#ifdef SHELLMAGIC
if(*path!='/' && path!=opath)
{
@@ -1123,22 +1160,22 @@ pid_t path_spawn(const char *opath,register char **argv, char **envp, Pathcomp_t
}
#endif /* SHELLMAGIC */
if(spawn && !sh_isoption(SH_PFSH))
- pid = _spawnveg(opath, &argv[0],envp, spawn>>1);
+ pid = _spawnveg(shp,opath, &argv[0],envp, spawn>>1);
else
- pid = path_pfexecve(opath, &argv[0] ,envp,spawn);
+ pid = path_pfexecve(shp,opath, &argv[0] ,envp,spawn);
if(xp)
*xp = xval;
#ifdef SHELLMAGIC
if(*path=='.' && path!=opath)
{
free(path);
- path = path_relative(opath);
+ path = path_relative(shp,opath);
}
#endif /* SHELLMAGIC */
if(pid>0)
return(pid);
retry:
- switch(sh.path_err = errno)
+ switch(shp->path_err = errno)
{
#ifdef apollo
/*
@@ -1158,14 +1195,14 @@ retry:
if(spawn)
{
#ifdef _lib_fork
- if(sh.subshell)
+ if(shp->subshell)
return(-1);
do
{
if((pid=fork())>0)
return(pid);
}
- while(_sh_fork(pid,0,(int*)0) < 0);
+ while(_sh_fork(shp,pid,0,(int*)0) < 0);
((struct checkpt*)shp->jmplist)->mode = SH_JMPEXIT;
#else
return(-1);
@@ -1205,9 +1242,9 @@ retry:
#endif /* EMLINK */
return(-1);
case E2BIG:
- if(sh.xargmin)
+ if(shp->xargmin)
{
- pid = path_xargs(opath, &argv[0] ,envp,spawn);
+ pid = path_xargs(shp,opath, &argv[0] ,envp,spawn);
if(pid<0)
goto retry;
return(pid);
@@ -1227,9 +1264,10 @@ retry:
static void exscript(Shell_t *shp,register char *path,register char *argv[],char **envp)
{
register Sfio_t *sp;
- path = path_relative(path);
+ path = path_relative(shp,path);
shp->comdiv=0;
shp->bckpid = 0;
+ shp->coshell = 0;
shp->st.ioset=0;
/* clean up any cooperating processes */
if(shp->cpipe[0]>0)
@@ -1240,6 +1278,7 @@ static void exscript(Shell_t *shp,register char *path,register char *argv[],char
if(sp=fcfile())
while(sfstack(sp,SF_POPSTACK));
job_clear();
+ VALIDATE_FD(shp, shp->infd);
if(shp->infd>0 && (shp->fdstatus[shp->infd]&IOCLEX))
sh_close(shp->infd);
sh_setstate(sh_state(SH_FORKED));
@@ -1260,7 +1299,7 @@ static void exscript(Shell_t *shp,register char *path,register char *argv[],char
goto openok;
sh_close(n);
}
- if((euserid=geteuid()) != shp->userid)
+ if((euserid=geteuid()) != shp->gd->userid)
{
strncpy(name+9,fmtbase((long)getpid(),10,0),sizeof(name)-10);
/* create a suid open file with owner equal effective uid */
@@ -1280,7 +1319,7 @@ static void exscript(Shell_t *shp,register char *path,register char *argv[],char
}
savet = *--argv;
*argv = path;
- path_pfexecve(e_suidexec,argv,envp,0);
+ path_pfexecve(shp,e_suidexec,argv,envp,0);
fail:
/*
* The following code is just for compatibility
@@ -1305,9 +1344,9 @@ static void exscript(Shell_t *shp,register char *path,register char *argv[],char
/* save name of calling command */
shp->readscript = error_info.id;
/* close history file if name has changed */
- if(shp->hist_ptr && (path=nv_getval(HISTFILE)) && strcmp(path,shp->hist_ptr->histname))
+ if(shp->gd->hist_ptr && (path=nv_getval(HISTFILE)) && strcmp(path,shp->gd->hist_ptr->histname))
{
- hist_close(shp->hist_ptr);
+ hist_close(shp->gd->hist_ptr);
(HISTCUR)->nvalue.lp = 0;
}
sh_offstate(SH_FORKED);
@@ -1413,7 +1452,7 @@ static void exscript(Shell_t *shp,register char *path,register char *argv[],char
* add a pathcomponent to the path search list and eliminate duplicates
* and non-existing absolute paths.
*/
-static Pathcomp_t *path_addcomp(Pathcomp_t *first, Pathcomp_t *old,const char *name, int flag)
+static Pathcomp_t *path_addcomp(Shell_t *shp,Pathcomp_t *first, Pathcomp_t *old,const char *name, int flag)
{
register Pathcomp_t *pp, *oldpp;
int len, offset=staktell();
@@ -1431,7 +1470,7 @@ static Pathcomp_t *path_addcomp(Pathcomp_t *first, Pathcomp_t *old,const char *n
len = strlen(name);
for(pp=first; pp; pp=pp->next)
{
- if(memcmp(name,pp->name,len)==0 && (pp->name[len]==':' || pp->name[len]==0))
+ if(len == pp->len && memcmp(name,pp->name,len)==0)
{
pp->flags |= flag;
return(first);
@@ -1439,6 +1478,7 @@ static Pathcomp_t *path_addcomp(Pathcomp_t *first, Pathcomp_t *old,const char *n
}
for(pp=first, oldpp=0; pp; oldpp=pp, pp=pp->next);
pp = newof((Pathcomp_t*)0,Pathcomp_t,1,len+1);
+ pp->shp = shp;
pp->refcount = 1;
memcpy((char*)(pp+1),name,len+1);
pp->name = (char*)(pp+1);
@@ -1452,12 +1492,12 @@ static Pathcomp_t *path_addcomp(Pathcomp_t *first, Pathcomp_t *old,const char *n
{
pp->dev = 1;
pp->flags |= PATH_BUILTIN_LIB;
- pp->blib = malloc(4);
+ pp->blib = pp->bbuf = malloc(sizeof(LIBCMD));
strcpy(pp->blib,LIBCMD);
return(first);
}
- if(old && ((flag&(PATH_PATH|PATH_SKIP))==PATH_PATH))
- path_chkpaths(first,old,pp,offset);
+ if((old||shp->pathinit) && ((flag&(PATH_PATH|PATH_SKIP))==PATH_PATH))
+ path_chkpaths(shp,first,old,pp,offset);
return(first);
}
@@ -1465,7 +1505,7 @@ static Pathcomp_t *path_addcomp(Pathcomp_t *first, Pathcomp_t *old,const char *n
* This function checks for the .paths file in directory in <pp>
* it assumes that the directory is on the stack at <offset>
*/
-static int path_chkpaths(Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int offset)
+static int path_chkpaths(Shell_t *shp,Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int offset)
{
struct stat statb;
int k,m,n,fd;
@@ -1500,43 +1540,21 @@ static int path_chkpaths(Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int
}
*cp = 0;
m = ep ? (ep-sp) : 0;
- if(m==0 || m==6 && memcmp((void*)sp,(void*)"FPATH=",6)==0)
+ if(m==0 || m==6 && memcmp((void*)sp,(void*)"FPATH=",m)==0)
{
if(first)
{
char *ptr = stakptr(offset+pp->len+1);
if(ep)
strcpy(ptr,ep);
- path_addcomp(first,old,stakptr(offset),PATH_FPATH|PATH_BFPATH);
+ path_addcomp(shp,first,old,stakptr(offset),PATH_FPATH|PATH_BFPATH);
}
}
- else if(m==12 && memcmp((void*)sp,(void*)"BUILTIN_LIB=",12)==0)
+ else if(m==11 && memcmp((void*)sp,(void*)"PLUGIN_LIB=",m)==0)
{
- 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;
- else
- {
- k = strlen(ep)+1;
- if (*ep != '/')
- k += pp->len+1;
- pp->blib = sp = malloc(k);
- if (*ep != '/')
- {
- strcpy(pp->blib,pp->name);
- sp += pp->len;
- *sp++ = '/';
- }
- strcpy(sp,ep);
- }
- }
+ if(pp->bbuf)
+ free(pp->bbuf);
+ pp->blib = pp->bbuf = strdup(ep);
}
else if(m)
{
@@ -1562,7 +1580,7 @@ static int path_chkpaths(Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int
}
-Pathcomp_t *path_addpath(Pathcomp_t *first, register const char *path,int type)
+Pathcomp_t *path_addpath(Shell_t *shp,Pathcomp_t *first, register const char *path,int type)
{
register const char *cp;
Pathcomp_t *old=0;
@@ -1583,7 +1601,7 @@ Pathcomp_t *path_addpath(Pathcomp_t *first, register const char *path,int type)
if(*cp==':')
{
if(type!=PATH_FPATH)
- first = path_addcomp(first,old,".",type);
+ first = path_addcomp(shp,first,old,".",type);
while(*++path == ':');
}
else
@@ -1592,7 +1610,7 @@ Pathcomp_t *path_addpath(Pathcomp_t *first, register const char *path,int type)
while(*path && *path!=':')
path++;
c = *path++;
- first = path_addcomp(first,old,cp,type);
+ first = path_addcomp(shp,first,old,cp,type);
if(c==0)
break;
if(*path==0)
@@ -1603,13 +1621,13 @@ Pathcomp_t *path_addpath(Pathcomp_t *first, register const char *path,int type)
{
if(!first && !path)
{
- Pathcomp_t *pp = (Pathcomp_t*)old->shp->defpathlist;
+ Pathcomp_t *pp = (Pathcomp_t*)shp->defpathlist;
if(!pp)
- pp = defpath_init(old->shp);
+ pp = defpath_init(shp);
first = path_dup(pp);
}
- if(cp=(FPATHNOD)->nvalue.cp)
- first = (void*)path_addpath((Pathcomp_t*)first,cp,PATH_FPATH);
+ if(cp=(sh_scoped(shp,FPATHNOD))->nvalue.cp)
+ first = (void*)path_addpath(shp,(Pathcomp_t*)first,cp,PATH_FPATH);
path_delete(old);
}
if(offset)
@@ -1636,7 +1654,7 @@ Pathcomp_t *path_dup(Pathcomp_t *first)
/*
* called whenever the directory is changed
*/
-void path_newdir(Pathcomp_t *first)
+void path_newdir(Shell_t *shp,Pathcomp_t *first)
{
register Pathcomp_t *pp=first, *next, *pq;
struct stat statb;
@@ -1679,7 +1697,7 @@ void path_newdir(Pathcomp_t *first)
stakseek(offset);
next = pp->next;
pp->next = 0;
- path_chkpaths(first,(Pathcomp_t*)0,pp,offset);
+ path_chkpaths(shp,first,(Pathcomp_t*)0,pp,offset);
if(pp->next)
pp = pp->next;
pp->next = next;
@@ -1690,10 +1708,10 @@ void path_newdir(Pathcomp_t *first)
#endif
}
-Pathcomp_t *path_unsetfpath(Pathcomp_t *first)
+Pathcomp_t *path_unsetfpath(Shell_t *shp)
{
+ Pathcomp_t *first = (Pathcomp_t*)shp->pathlist;
register Pathcomp_t *pp=first, *old=0;
- Shell_t *shp = &sh;
if(shp->fpathdict)
{
struct Ufunction *rp, *rpnext;
@@ -1756,7 +1774,8 @@ static char *talias_get(Namval_t *np, Namfun_t *nvp)
char *ptr;
if(!pp)
return(NULL);
- path_nextcomp(pp,nv_name(np),pp);
+ pp->shp->last_table = 0;
+ path_nextcomp(pp->shp,pp,nv_name(np),pp);
ptr = stakfreeze(0);
return(ptr+PATH_OFFSET);
}
@@ -1789,7 +1808,7 @@ void path_alias(register Namval_t *np,register Pathcomp_t *pp)
np->nvalue.cp = (char*)pp;
pp->refcount++;
nv_setattr(np,NV_TAGGED|NV_NOFREE);
- path_nextcomp(pp,nv_name(np),pp);
+ path_nextcomp(pp->shp,pp,nv_name(np),pp);
sp = stakptr(PATH_OFFSET);
if(sp && lstat(sp,&statb)>=0 && S_ISLNK(statb.st_mode))
nv_setsize(np,statb.st_size+1);
@@ -1797,6 +1816,6 @@ void path_alias(register Namval_t *np,register Pathcomp_t *pp)
nv_setsize(np,0);
}
else
- nv_unset(np);
+ _nv_unset(np,0);
}
diff --git a/usr/src/lib/libshell/common/sh/pmain.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/pmain.c
index f04a799719..87421959f3 100644
--- a/usr/src/lib/libshell/common/sh/pmain.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/pmain.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -42,6 +42,5 @@ int main(int argc, char *argv[])
mha.mha_pagesize = 64 * 1024;
(void)memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t)&mha, 0, 0);
#endif
- sh_waitnotify((Shnote_f)0);
return(sh_main(argc, argv, (Shinit_f)0));
}
diff --git a/usr/src/lib/libshell/common/sh/shcomp.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/shcomp.c
index 6ba9c0c3e7..184637b847 100644
--- a/usr/src/lib/libshell/common/sh/shcomp.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/shcomp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/sh/streval.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/streval.c
index 11df8402e8..f969e432cd 100644
--- a/usr/src/lib/libshell/common/sh/streval.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/streval.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -65,6 +65,7 @@ static int level;
struct vars /* vars stacked per invocation */
{
+ Shell_t *shp;
const char *expr; /* current expression */
const char *nextchr; /* next char in current expression */
const char *errchr; /* next char after error */
@@ -83,6 +84,7 @@ typedef Sfdouble_t (*Math_f)(Sfdouble_t,...);
typedef Sfdouble_t (*Math_1f_f)(Sfdouble_t);
typedef int (*Math_1i_f)(Sfdouble_t);
typedef Sfdouble_t (*Math_2f_f)(Sfdouble_t,Sfdouble_t);
+typedef Sfdouble_t (*Math_2f_i)(Sfdouble_t,int);
typedef int (*Math_2i_f)(Sfdouble_t,Sfdouble_t);
typedef Sfdouble_t (*Math_3f_f)(Sfdouble_t,Sfdouble_t,Sfdouble_t);
typedef int (*Math_3i_f)(Sfdouble_t,Sfdouble_t,Sfdouble_t);
@@ -156,15 +158,21 @@ Sfdouble_t arith_exec(Arith_t *ep)
register unsigned char *cp = ep->code;
register int c,type=0;
register char *tp;
- Sfdouble_t small_stack[SMALL_STACK+1];
+ Sfdouble_t small_stack[SMALL_STACK+1],arg[9];
const char *ptr = "";
+ char *lastval=0;
+ int lastsub;
Math_f fun;
struct lval node;
+ Shell_t *shp = ep->shp;
+ node.shp = shp;
node.emode = ep->emode;
node.expr = ep->expr;
node.elen = ep->elen;
node.value = 0;
node.nosub = 0;
+ node.ptr = 0;
+ node.eflag = 0;
if(level++ >=MAXLEVEL)
{
arith_error(e_recursive,ep->expr,ep->emode);
@@ -198,21 +206,21 @@ Sfdouble_t arith_exec(Arith_t *ep)
type=0;
break;
case A_PLUSPLUS:
- node.nosub = 1;
+ node.nosub = -1;
(*ep->fun)(&ptr,&node,ASSIGN,num+1);
break;
case A_MINUSMINUS:
- node.nosub = 1;
+ node.nosub = -1;
(*ep->fun)(&ptr,&node,ASSIGN,num-1);
break;
case A_INCR:
num = num+1;
- node.nosub = 1;
+ node.nosub = -1;
num = (*ep->fun)(&ptr,&node,ASSIGN,num);
break;
case A_DECR:
num = num-1;
- node.nosub = 1;
+ node.nosub = -1;
num = (*ep->fun)(&ptr,&node,ASSIGN,num);
break;
case A_SWAP:
@@ -224,17 +232,28 @@ Sfdouble_t arith_exec(Arith_t *ep)
case A_POP:
sp--;
continue;
+ case A_ASSIGNOP1:
+ node.emode |= ARITH_ASSIGNOP;
+ /* FALLTHROUGH */
case A_PUSHV:
cp = roundptr(ep,cp,Sfdouble_t*);
dp = *((Sfdouble_t**)cp);
cp += sizeof(Sfdouble_t*);
c = *(short*)cp;
cp += sizeof(short);
- node.value = (char*)dp;
- node.flag = c;
+ lastval = node.value = (char*)dp;
+ if(node.flag = c)
+ lastval = 0;
node.isfloat=0;
node.level = level;
+ node.nosub = 0;
num = (*ep->fun)(&ptr,&node,VALUE,num);
+ if(node.emode&ARITH_ASSIGNOP)
+ {
+ lastsub = node.nosub;
+ node.nosub = 0;
+ node.emode &= ~ARITH_ASSIGNOP;
+ }
if(node.value != (char*)dp)
arith_error(node.value,ptr,ep->emode);
*++sp = num;
@@ -255,8 +274,11 @@ Sfdouble_t arith_exec(Arith_t *ep)
*++tp = type;
c = 0;
break;
+ case A_ENUM:
+ node.eflag = 1;
+ continue;
case A_ASSIGNOP:
- node.nosub = 1;
+ node.nosub = lastsub;
/* FALLTHROUGH */
case A_STORE:
cp = roundptr(ep,cp,Sfdouble_t*);
@@ -268,7 +290,25 @@ Sfdouble_t arith_exec(Arith_t *ep)
cp += sizeof(short);
node.value = (char*)dp;
node.flag = c;
+ if(lastval)
+ node.eflag = 1;
+ node.ptr = 0;
num = (*ep->fun)(&ptr,&node,ASSIGN,num);
+ if(lastval && node.ptr)
+ {
+ Sfdouble_t r;
+ node.flag = 0;
+ node.value = lastval;
+ r = (*ep->fun)(&ptr,&node,VALUE,num);
+ if(r!=num)
+ {
+ node.flag=c;
+ node.value = (char*)dp;
+ num = (*ep->fun)(&ptr,&node,ASSIGN,r);
+ }
+
+ }
+ lastval = 0;
c=0;
break;
case A_PUSHF:
@@ -328,13 +368,17 @@ Sfdouble_t arith_exec(Arith_t *ep)
num = (Sflong_t)(sp[-1]) / (Sflong_t)(num);
break;
case A_LSHIFT:
- if(tp[-1]==2)
+ if((long)num >= CHAR_BIT*sizeof(Sfulong_t))
+ num = 0;
+ else if(tp[-1]==2)
num = U2F((Sfulong_t)(sp[-1]) << (long)(num));
else
num = (Sflong_t)(sp[-1]) << (long)(num);
break;
case A_RSHIFT:
- if(tp[-1]==2)
+ if((long)num >= CHAR_BIT*sizeof(Sfulong_t))
+ num = 0;
+ else if(tp[-1]==2)
num = U2F((Sfulong_t)(sp[-1]) >> (long)(num));
else
num = (Sflong_t)(sp[-1]) >> (long)(num);
@@ -384,7 +428,15 @@ Sfdouble_t arith_exec(Arith_t *ep)
case A_CALL1F:
sp--,tp--;
fun = *((Math_f*)(ep->code+(int)(*sp)));
- type = 0;
+ type = *tp;
+ if(c&T_BINARY)
+ {
+ c &= ~T_BINARY;
+ arg[0] = num;
+ arg[1] = 0;
+ num = sh_mathfun(shp,(void*)fun,1,arg);
+ break;
+ }
num = (*((Math_1f_f)fun))(num);
break;
case A_CALL1I:
@@ -396,8 +448,20 @@ Sfdouble_t arith_exec(Arith_t *ep)
case A_CALL2F:
sp-=2,tp-=2;
fun = *((Math_f*)(ep->code+(int)(*sp)));
- type = 0;
- num = (*((Math_2f_f)fun))(sp[1],num);
+ type = *tp;
+ if(c&T_BINARY)
+ {
+ c &= ~T_BINARY;
+ arg[0] = sp[1];
+ arg[1] = num;
+ arg[2] = 0;
+ num = sh_mathfun(shp,(void*)fun,2,arg);
+ break;
+ }
+ if(c&T_NOFLOAT)
+ num = (*((Math_2f_i)fun))(sp[1],(int)num);
+ else
+ num = (*((Math_2f_f)fun))(sp[1],num);
break;
case A_CALL2I:
sp-=2,tp-=2;
@@ -408,17 +472,35 @@ Sfdouble_t arith_exec(Arith_t *ep)
case A_CALL3F:
sp-=3,tp-=3;
fun = *((Math_f*)(ep->code+(int)(*sp)));
- type = 0;
+ type = *tp;
+ if(c&T_BINARY)
+ {
+ c &= ~T_BINARY;
+ arg[0] = sp[1];
+ arg[1] = sp[2];
+ arg[2] = num;
+ arg[3] = 0;
+ num = sh_mathfun(shp,(void*)fun,3,arg);
+ break;
+ }
num = (*((Math_3f_f)fun))(sp[1],sp[2],num);
break;
}
+ if(c)
+ lastval = 0;
if(c&T_BINARY)
+ {
+ node.ptr = 0;
sp--,tp--;
+ type |= (*tp!=0);
+ }
*sp = num;
*tp = type;
}
if(level>0)
level--;
+ if(type==0 && !num)
+ num = 0;
return(num);
}
@@ -441,7 +523,7 @@ static int gettok(register struct vars *vp)
vp->nextchr--;
break;
case A_COMMA:
- if(sh.decomma && (c=peekchr(vp))>='0' && c<='9')
+ if(vp->shp->decomma && (c=peekchr(vp))>='0' && c<='9')
{
op = A_DIG;
goto keep;
@@ -502,7 +584,9 @@ static int expr(register struct vars *vp,register int precedence)
Sfdouble_t d;
lvalue.value = 0;
+ lvalue.nargs = 0;
lvalue.fun = 0;
+ lvalue.shp = vp->shp;
again:
op = gettok(vp);
c = 2*MAXPREC+1;
@@ -574,7 +658,9 @@ again:
{
if(vp->staksize++>=vp->stakmaxsize)
vp->stakmaxsize = vp->staksize;
- stakputc(A_PUSHV);
+ if(op==A_EQ || op==A_NEQ)
+ stakputc(A_ENUM);
+ stakputc(assignop.value?A_ASSIGNOP1:A_PUSHV);
stakpush(vp,lvalue.value,char*);
if(lvalue.flag<0)
lvalue.flag = 0;
@@ -628,8 +714,11 @@ again:
case A_LPAR:
{
int infun = vp->infun;
+ int userfun=0;
Sfdouble_t (*fun)(Sfdouble_t,...);
int nargs = lvalue.nargs;
+ if(nargs<0)
+ nargs = -nargs;
fun = lvalue.fun;
lvalue.fun = 0;
if(fun)
@@ -637,6 +726,10 @@ again:
if(vp->staksize++>=vp->stakmaxsize)
vp->stakmaxsize = vp->staksize;
vp->infun=1;
+ if((int)lvalue.nargs<0)
+ userfun = T_BINARY;
+ else if((int)lvalue.nargs&040)
+ userfun = T_NOFLOAT;
stakputc(A_PUSHF);
stakpush(vp,fun,Math_f);
stakputc(1);
@@ -651,13 +744,13 @@ again:
vp->paren--;
if(fun)
{
- int x= (nargs>7)?2:-1;
+ int x= (nargs&010)?2:-1;
nargs &= 7;
if(vp->infun != nargs)
ERROR(vp,e_argcount);
- if(vp->staksize+=nargs>=vp->stakmaxsize)
+ if((vp->staksize+=nargs)>=vp->stakmaxsize)
vp->stakmaxsize = vp->staksize+nargs;
- stakputc(A_CALL1F+nargs+x);
+ stakputc(A_CALL1F+userfun+nargs+x);
vp->staksize -= nargs;
}
vp->infun = infun;
@@ -811,13 +904,13 @@ again:
return(1);
}
-Arith_t *arith_compile(const char *string,char **last,Sfdouble_t(*fun)(const char**,struct lval*,int,Sfdouble_t),int emode)
+Arith_t *arith_compile(Shell_t *shp,const char *string,char **last,Sfdouble_t(*fun)(const char**,struct lval*,int,Sfdouble_t),int emode)
{
struct vars cur;
register Arith_t *ep;
int offset;
memset((void*)&cur,0,sizeof(cur));
- cur.emode = emode;
+ cur.shp = shp;
cur.expr = cur.nextchr = string;
cur.convert = fun;
cur.emode = emode;
@@ -828,12 +921,18 @@ Arith_t *arith_compile(const char *string,char **last,Sfdouble_t(*fun)(const cha
{
if(cur.errstr)
string = cur.errstr;
- (*fun)( &string , &cur.errmsg, MESSAGE, 0);
+ if((*fun)( &string , &cur.errmsg, MESSAGE, 0) < 0)
+ {
+ stakseek(0);
+ *last = (char*)Empty;
+ return(0);
+ }
cur.nextchr = cur.errchr;
}
stakputc(0);
offset = staktell();
ep = (Arith_t*)stakfreeze(0);
+ ep->shp = shp;
ep->expr = string;
ep->elen = strlen(string);
ep->code = (unsigned char*)(ep+1);
@@ -859,7 +958,7 @@ Arith_t *arith_compile(const char *string,char **last,Sfdouble_t(*fun)(const cha
* NOTE: (*convert)() may call strval()
*/
-Sfdouble_t strval(const char *s,char **end,Sfdouble_t(*conv)(const char**,struct lval*,int,Sfdouble_t),int emode)
+Sfdouble_t strval(Shell_t *shp,const char *s,char **end,Sfdouble_t(*conv)(const char**,struct lval*,int,Sfdouble_t),int emode)
{
Arith_t *ep;
Sfdouble_t d;
@@ -867,7 +966,7 @@ Sfdouble_t strval(const char *s,char **end,Sfdouble_t(*conv)(const char**,struct
int offset;
if(offset=staktell())
sp = stakfreeze(1);
- ep = arith_compile(s,end,conv,emode);
+ ep = arith_compile(shp,s,end,conv,emode);
ep->emode = emode;
d = arith_exec(ep);
stakset(sp?sp:(char*)ep,offset);
diff --git a/usr/src/lib/libshell/common/sh/string.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/string.c
index 648e40ee05..f7c368b3d1 100644
--- a/usr/src/lib/libshell/common/sh/string.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/string.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,10 +32,6 @@
#include "lexstates.h"
#include "national.h"
-#if !SHOPT_MULTIBYTE
-#define mbchar(p) (*(unsigned char*)p++)
-#endif
-
#if _hdr_wctype
# include <wctype.h>
#endif
@@ -295,6 +291,41 @@ void sh_utol(register char const *str1,register char *str2)
}
/*
+ * format string as a csv field
+ */
+static char *sh_fmtcsv(const char *string)
+{
+ register const char *cp = string;
+ register int c;
+ int offset;
+ if(!cp)
+ return((char*)0);
+ offset = staktell();
+ while((c=mbchar(cp)),isaname(c));
+ if(c==0)
+ return((char*)string);
+ stakputc('"');
+ stakwrite(string,cp-string);
+ if(c=='"')
+ stakputc('"');
+ string = cp;
+ while(c=mbchar(cp))
+ {
+ if(c=='"')
+ {
+ stakwrite(string,cp-string);
+ string = cp;
+ stakputc('"');
+ }
+ }
+ if(--cp>string)
+ stakwrite(string,cp-string);
+ stakputc('"');
+ stakputc(0);
+ return(stakptr(offset));
+}
+
+/*
* print <str> quoting chars so that it can be read by the shell
* puts null terminated result on stack, but doesn't freeze it
*/
@@ -305,50 +336,39 @@ char *sh_fmtq(const char *string)
int offset;
if(!cp)
return((char*)0);
- offset = staktell();
#if SHOPT_MULTIBYTE
- state = ((c= mbchar(cp))==0);
-#else
- state = ((c= *(unsigned char*)cp++)==0);
+ mbinit();
#endif
+ offset = staktell();
+ state = ((c= mbchar(cp))==0);
if(isaletter(c))
{
-#if SHOPT_MULTIBYTE
while((c=mbchar(cp)),isaname(c));
-#else
- while((c = *(unsigned char*)cp++),isaname(c));
-#endif
if(c==0)
return((char*)string);
if(c=='=')
{
if(*cp==0)
return((char*)string);
+ if(*cp=='=')
+ cp++;
c = cp - string;
stakwrite(string,c);
string = cp;
-#if SHOPT_MULTIBYTE
c = mbchar(cp);
-#else
- c = *(unsigned char*)cp++;
-#endif
}
}
if(c==0 || c=='#' || c=='~')
state = 1;
-#if SHOPT_MULTIBYTE
for(;c;c= mbchar(cp))
-#else
- for(;c; c= *(unsigned char*)cp++)
-#endif
{
#if SHOPT_MULTIBYTE
- if(c=='\'' || !iswprint(c))
+ if(c=='\'' || c>=128 || c<0 || !iswprint(c))
#else
if(c=='\'' || !isprint(c))
#endif /* SHOPT_MULTIBYTE */
state = 2;
- else if(c==']' || (c!=':' && c<=0xff && (c=sh_lexstates[ST_NORM][c]) && c!=S_EPAT))
+ else if(c==']' || c=='=' || (c!=':' && c<=0x7f && (c=sh_lexstates[ST_NORM][c]) && c!=S_EPAT))
state |=1;
}
if(state<2)
@@ -362,6 +382,7 @@ char *sh_fmtq(const char *string)
}
else
{
+ int isbyte=0;
stakwrite("$'",2);
cp = string;
#if SHOPT_MULTIBYTE
@@ -398,19 +419,26 @@ char *sh_fmtq(const char *string)
break;
default:
#if SHOPT_MULTIBYTE
- if(!iswprint(c))
+ isbyte = 0;
+ if(c<0)
{
- while(op<cp)
- sfprintf(staksp,"\\%.3o",*(unsigned char*)op++);
+ c = *((unsigned char *)op);
+ cp = op+1;
+ isbyte = 1;
+ }
+ if(mbwide() && ((cp-op)>1))
+ {
+ sfprintf(staksp,"\\u[%x]",c);
continue;
}
+ else if(!iswprint(c) || isbyte)
#else
if(!isprint(c))
+#endif
{
- sfprintf(staksp,"\\%.3o",c);
+ sfprintf(staksp,"\\x%.2x",c);
continue;
}
-#endif
state=0;
break;
}
@@ -448,7 +476,9 @@ char *sh_fmtqf(const char *string, int single, int fold)
if (--fold < 8)
fold = 0;
- if (!cp || !*cp || !single && !fold || fold && strlen(string) < fold)
+ if(single)
+ return sh_fmtcsv(cp);
+ if (!cp || !*cp || !fold || fold && strlen(string) < fold)
return sh_fmtq(cp);
offset = staktell();
single = single ? 1 : 3;
@@ -677,8 +707,8 @@ char *sh_checkid(char *str, char *last)
register unsigned char *cp = (unsigned char*)str;
register unsigned char *v = cp;
register int c;
- if(c= *cp++,isaletter(c))
- while(c= *cp++,isaname(c));
+ if(c=mbchar(cp),isaletter(c))
+ while(c=mbchar(cp),isaname(c));
if(c==']' && (!last || ((char*)cp==last)))
{
/* eliminate [ and ] */
diff --git a/usr/src/lib/libshell/common/sh/subshell.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/subshell.c
index 23ad7c3cac..7d59ad0b68 100644
--- a/usr/src/lib/libshell/common/sh/subshell.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/subshell.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,6 +40,14 @@
# define PIPE_BUF 512
#endif
+#ifndef O_SEARCH
+# ifdef O_PATH
+# define O_SEARCH O_PATH
+# else
+# define O_SEARCH 0
+# endif
+#endif
+
/*
* Note that the following structure must be the same
* size as the Dtlink_t structure
@@ -76,6 +84,7 @@ static struct subshell
char *pwd; /* present working directory */
const char *shpwd; /* saved pointer to sh.pwd */
void *jobs; /* save job info */
+ int pwdfd; /* file descritor for pwd */
mode_t mask; /* saved umask */
short tmpfd; /* saved tmp file descriptor */
short pipefd; /* read fd if pipe is created */
@@ -89,87 +98,72 @@ static struct subshell
int coutpipe;
int cpipe;
int nofork;
+ int subdup;
char subshare;
+ char comsub;
+ char pwdclose;
+#if SHOPT_COSHELL
+ void *coshell;
+#endif /* SHOPT_COSHELL */
} *subshell_data;
static int subenv;
+
/*
* This routine will turn the sftmp() file into a real /tmp file or pipe
+ * if the /tmp file create fails
*/
-void sh_subtmpfile(int pflag)
+void sh_subtmpfile(Shell_t *shp)
{
- Shell_t *shp = &sh;
- int fds[2];
- Sfoff_t off;
- register struct checkpt *pp = (struct checkpt*)shp->jmplist;
- register struct subshell *sp = subshell_data->pipe;
if(sfset(sfstdout,0,0)&SF_STRING)
{
register int fd;
+ register struct checkpt *pp = (struct checkpt*)shp->jmplist;
+ register struct subshell *sp = subshell_data->pipe;
/* save file descriptor 1 if open */
if((sp->tmpfd = fd = fcntl(1,F_DUPFD,10)) >= 0)
{
fcntl(fd,F_SETFD,FD_CLOEXEC);
+ VALIDATE_FD(shp, fd);
shp->fdstatus[fd] = shp->fdstatus[1]|IOCLEX;
close(1);
- shp->fdstatus[1] = IOCLOSE;
}
else if(errno!=EBADF)
- {
- ((struct checkpt*)shp->jmplist)->mode = SH_JMPERREXIT;
- shp->toomany = 1;
errormsg(SH_DICT,ERROR_system(1),e_toomany);
- }
- if(shp->subshare || !pflag)
+ /* popping a discipline forces a /tmp file create */
+ sfdisc(sfstdout,SF_POPDISC);
+ if((fd=sffileno(sfstdout))<0)
{
- sfdisc(sfstdout,SF_POPDISC);
- if((fd=sffileno(sfstdout))>=0)
- {
- shp->fdstatus[fd] = IOREAD|IOWRITE;
- sfsync(sfstdout);
- if(fd==1)
- fcntl(1,F_SETFD,0);
- else
- {
- sfsetfd(sfstdout,1);
- shp->fdstatus[1] = shp->fdstatus[fd];
- shp->fdstatus[fd] = IOCLOSE;
- }
- goto skip;
- }
- }
- }
- if(sp && (shp->fdstatus[1]==IOCLOSE || (!shp->subshare && !(shp->fdstatus[1]&IONOSEEK))))
- {
- struct stat statb,statx;
- int fd;
- sh_pipe(fds);
- sp->pipefd = fds[0];
- sh_fcntl(sp->pipefd,F_SETFD,FD_CLOEXEC);
- /* write the data to the pipe */
- if(off = sftell(sfstdout))
- {
- write(fds[1],sfsetbuf(sfstdout,(Void_t*)sfstdout,0),(size_t)off);
- sfpurge(sfstdout);
+ /* unable to create the /tmp file so use a pipe */
+ int fds[3];
+ Sfoff_t off;
+ fds[2] = 0;
+ sh_pipe(fds);
+ sp->pipefd = fds[0];
+ sh_fcntl(sp->pipefd,F_SETFD,FD_CLOEXEC);
+ /* write the data to the pipe */
+ if(off = sftell(sfstdout))
+ write(fds[1],sfsetbuf(sfstdout,(Void_t*)sfstdout,0),(size_t)off);
+ sfclose(sfstdout);
+ if((sh_fcntl(fds[1],F_DUPFD, 1)) != 1)
+ errormsg(SH_DICT,ERROR_system(1),e_file+4);
+ sh_close(fds[1]);
}
- if((sfset(sfstdout,0,0)&SF_STRING) || fstat(1,&statb)<0)
- statb.st_ino = 0;
- sfclose(sfstdout);
- if((sh_fcntl(fds[1],F_DUPFD, 1)) != 1)
- errormsg(SH_DICT,ERROR_system(1),e_redirect);
- sh_close(fds[1]);
- if(statb.st_ino) for(fd=0; fd < 10; fd++)
+ else
{
- if(fd==1 || ((shp->fdstatus[fd]&(IONOSEEK|IOSEEK|IOWRITE))!=(IOSEEK|IOWRITE)) || fstat(fd,&statx)<0)
- continue;
- if(statb.st_ino==statx.st_ino && statb.st_dev==statx.st_dev)
+ VALIDATE_FD(shp, fd);
+ shp->fdstatus[fd] = IOREAD|IOWRITE;
+ sfsync(sfstdout);
+ if(fd==1)
+ fcntl(1,F_SETFD,0);
+ else
{
- sh_close(fd);
- fcntl(1,F_DUPFD, fd);
+ sfsetfd(sfstdout,1);
+ shp->fdstatus[1] = shp->fdstatus[fd];
+ shp->fdstatus[fd] = IOCLOSE;
}
}
- skip:
sh_iostream(shp,1);
sfset(sfstdout,SF_SHARE|SF_PUBLIC,1);
sfpool(sfstdout,shp->outpool,SF_WRITE);
@@ -195,9 +189,10 @@ void sh_subfork(void)
trap = strdup(trap);
/* see whether inside $(...) */
if(sp->pipe)
- sh_subtmpfile(1);
+ sh_subtmpfile(shp);
shp->curenv = 0;
- if(pid = sh_fork(FSHOWME,NIL(int*)))
+ shp->savesig = -1;
+ if(pid = sh_fork(shp,FSHOWME,NIL(int*)))
{
shp->curenv = curenv;
/* this is the parent part of the fork */
@@ -217,9 +212,11 @@ void sh_subfork(void)
sh_offstate(SH_MONITOR);
subshell_data = 0;
shp->subshell = 0;
+ shp->comsub = 0;
SH_SUBSHELLNOD->nvalue.s = 0;
sp->subpid=0;
shp->st.trapcom[0] = trap;
+ shp->savesig = 0;
}
}
@@ -247,26 +244,22 @@ Namval_t *sh_assignok(register Namval_t *np,int add)
{
register Namval_t *mp;
register struct Link *lp;
- register struct subshell *sp = (struct subshell*)subshell_data;
- struct Ufunction *rp;
- Shell_t *shp = sp->shp;
+ register struct subshell *sp;
+ Shell_t *shp;
Dt_t *dp;
Namval_t *mpnext;
Namarr_t *ap;
int save;
+
+ sp = (struct subshell*)subshell_data;
+
/* don't bother with this */
- if(!sp->shpwd || (nv_isnull(np) && !add) || np==SH_LEVELNOD)
+ if(!sp || !sp->shpwd || np==SH_LEVELNOD || np==L_ARGNOD || np==SH_SUBSCRNOD || np==SH_NAMENOD)
return(np);
- /* don't bother to save if in newer scope */
- if(!(rp=shp->st.real_fun) || !(dp=rp->sdict))
- dp = sp->var;
- if(np->nvenv && !nv_isattr(np,NV_MINIMAL|NV_EXPORT) && shp->last_root)
- dp = shp->last_root;
- if((mp=nv_search((char*)np,dp,HASH_BUCKET))!=np)
- {
- if(mp || !np->nvfun || np->nvfun->subshell>=sh.subshell)
- return(np);
- }
+
+ shp = sp->shp;
+ dp = shp->var_tree;
+
if((ap=nv_arrayptr(np)) && (mp=nv_opensub(np)))
{
shp->last_root = ap->table;
@@ -274,7 +267,7 @@ Namval_t *sh_assignok(register Namval_t *np,int add)
if(!add || array_assoc(ap))
return(np);
}
- for(lp=subshell_data->svar; lp; lp = lp->next)
+ for(lp=sp->svar; lp;lp = lp->next)
{
if(lp->node==np)
return(np);
@@ -288,7 +281,7 @@ Namval_t *sh_assignok(register Namval_t *np,int add)
Namval_t fake;
Dt_t *walk, *root=shp->var_tree;
char *name = nv_name(np);
- int len = strlen(name);
+ size_t len = strlen(name);
fake.nvname = name;
mpnext = dtnext(root,&fake);
dp = root->walk?root->walk:root;
@@ -311,6 +304,8 @@ Namval_t *sh_assignok(register Namval_t *np,int add)
save = shp->subshell;
shp->subshell = 0;
mp->nvname = np->nvname;
+ if(nv_isattr(np,NV_NOFREE))
+ nv_onattr(mp,NV_IDENT);
nv_clone(np,mp,(add?(nv_isnull(np)?0:NV_NOFREE)|NV_ARRAY:NV_MOVE));
shp->subshell = save;
return(np);
@@ -325,6 +320,7 @@ static void nv_restore(struct subshell *sp)
register Namval_t *mp, *np;
const char *save = sp->shpwd;
Namval_t *mpnext;
+ int flags,nofree;
sp->shpwd = 0; /* make sure sh_assignok doesn't save with nv_unset() */
for(lp=sp->svar; lp; lp=lq)
{
@@ -333,8 +329,12 @@ static void nv_restore(struct subshell *sp)
mp = lp->node;
if(!mp->nvname)
continue;
+ flags = 0;
+ if(nv_isattr(mp,NV_MINIMAL) && !nv_isattr(np,NV_EXPORT))
+ flags |= NV_MINIMAL;
if(nv_isarray(mp))
nv_putsub(mp,NIL(char*),ARRAY_SCAN);
+ nofree = mp->nvfun?mp->nvfun->nofree:0;
_nv_unset(mp,NV_RDONLY|NV_CLONE);
if(nv_isarray(np))
{
@@ -342,28 +342,33 @@ static void nv_restore(struct subshell *sp)
goto skip;
}
nv_setsize(mp,nv_size(np));
- if(!nv_isattr(np,NV_MINIMAL) || nv_isattr(np,NV_EXPORT))
+ if(!(flags&NV_MINIMAL))
mp->nvenv = np->nvenv;
- mp->nvfun = np->nvfun;
- mp->nvflag = np->nvflag;
- if(nv_cover(mp))
+ if(!nofree)
+ mp->nvfun = np->nvfun;
+ if(nv_isattr(np,NV_IDENT))
{
- nv_putval(mp, nv_getval(np),np->nvflag|NV_NOFREE);
- if(!nv_isattr(np,NV_NOFREE))
- nv_offattr(mp,NV_NOFREE);
+ nv_offattr(np,NV_IDENT);
+ flags |= NV_NOFREE;
}
+ mp->nvflag = np->nvflag|(flags&NV_MINIMAL);
+ if(nv_cover(mp))
+ nv_putval(mp, nv_getval(np),np->nvflag|NV_NOFREE|NV_RDONLY);
else
mp->nvalue.cp = np->nvalue.cp;
+ if(nofree && np->nvfun && !np->nvfun->nofree)
+ free((char*)np->nvfun);
np->nvfun = 0;
if(nv_isattr(mp,NV_EXPORT))
{
char *name = nv_name(mp);
- sh_envput(sh.env,mp);
+ sh_envput(sp->shp->env,mp);
if(*name=='_' && strcmp(name,"_AST_FEATURES")==0)
astconf(NiL, NiL, NiL);
}
else if(nv_isattr(np,NV_EXPORT))
- env_delete(sh.env,nv_name(mp));
+ env_delete(sp->shp->env,nv_name(mp));
+ nv_onattr(mp,flags);
skip:
for(mp=lp->child; mp; mp=mpnext)
{
@@ -383,13 +388,13 @@ static void nv_restore(struct subshell *sp)
Dt_t *sh_subaliastree(int create)
{
register struct subshell *sp = subshell_data;
- if(!sp || sh.curenv==0)
+ if(!sp || sp->shp->curenv==0)
return(sh.alias_tree);
if(!sp->salias && create)
{
sp->salias = dtopen(&_Nvdisc,Dtoset);
- dtview(sp->salias,sh.alias_tree);
- sh.alias_tree = sp->salias;
+ dtview(sp->salias,sp->shp->alias_tree);
+ sp->shp->alias_tree = sp->salias;
}
return(sp->salias);
}
@@ -401,15 +406,15 @@ Dt_t *sh_subaliastree(int create)
Dt_t *sh_subfuntree(int create)
{
register struct subshell *sp = subshell_data;
- if(!sp || sh.curenv==0)
+ if(!sp || sp->shp->curenv==0)
return(sh.fun_tree);
if(!sp->sfun && create)
{
sp->sfun = dtopen(&_Nvdisc,Dtoset);
- dtview(sp->sfun,sh.fun_tree);
- sh.fun_tree = sp->sfun;
+ dtview(sp->sfun,sp->shp->fun_tree);
+ sp->shp->fun_tree = sp->sfun;
}
- return(sh.fun_tree);
+ return(sp->shp->fun_tree);
}
static void table_unset(register Dt_t *root,int fun)
@@ -466,32 +471,35 @@ void sh_subjobcheck(pid_t pid)
* output of command <t>. Otherwise, NULL will be returned.
*/
-Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
+Sfio_t *sh_subshell(Shell_t *shp,Shnode_t *t, volatile int flags, int comsub)
{
- Shell_t *shp = &sh;
struct subshell sub_data;
register struct subshell *sp = &sub_data;
int jmpval,nsig=0,duped=0;
int savecurenv = shp->curenv;
int savejobpgid = job.curpgid;
+ int *saveexitval = job.exitval;
int16_t subshell;
char *savsig;
Sfio_t *iop=0;
struct checkpt buff;
struct sh_scoped savst;
struct dolnod *argsav=0;
+ int argcnt;
memset((char*)sp, 0, sizeof(*sp));
sfsync(shp->outpool);
- argsav = sh_arguse(shp);
+ sh_sigcheck(shp);
+ shp->savesig = -1;
+ if(argsav = sh_arguse(shp))
+ argcnt = argsav->dolrefcnt;
if(shp->curenv==0)
{
subshell_data=0;
subenv = 0;
}
shp->curenv = ++subenv;
- job.curpgid = 0;
savst = shp->st;
- sh_pushcontext(&buff,SH_JMPSUB);
+ sh_pushcontext(shp,&buff,SH_JMPSUB);
subshell = shp->subshell+1;
SH_SUBSHELLNOD->nvalue.s = subshell;
shp->subshell = subshell;
@@ -503,25 +511,72 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
sp->var = shp->var_tree;
sp->options = shp->options;
sp->jobs = job_subsave();
+ sp->subdup = shp->subdup;
+#if SHOPT_COSHELL
+ sp->coshell = shp->coshell;
+ shp->coshell = 0;
+#endif /* SHOPT_COSHELL */
/* make sure initialization has occurred */
if(!shp->pathlist)
- path_get(".");
+ {
+ shp->pathinit = 1;
+ path_get(shp,".");
+ shp->pathinit = 0;
+ }
sp->pathlist = path_dup((Pathcomp_t*)shp->pathlist);
+ sp->pwdfd = -1;
if(!shp->pwd)
- path_pwd(0);
+ path_pwd(shp,0);
sp->bckpid = shp->bckpid;
if(comsub)
sh_stats(STAT_COMSUB);
+ else
+ job.curpgid = 0;
sp->subshare = shp->subshare;
+ sp->comsub = shp->comsub;
shp->subshare = comsub==2 || (comsub==1 && sh_isoption(SH_SUBSHARE));
+ if(comsub)
+ shp->comsub = comsub;
if(!comsub || !shp->subshare)
{
+ struct subshell *xp;
sp->shpwd = shp->pwd;
+#ifdef _lib_fchdir
+ for(xp=sp->prev; xp; xp=xp->prev)
+ {
+ if(xp->pwdfd>0 && strcmp(xp->pwd,shp->pwd)==0)
+ {
+ sp->pwdfd = xp->pwdfd;
+ break;
+ }
+ }
+ if(sp->pwdfd<0)
+ {
+ int n = open(".",O_RDONLY);
+ if(O_SEARCH && errno==EACCES)
+ n = open(".",O_RDONLY);
+ if(n>=0)
+ {
+ sp->pwdfd = n;
+ if(n<10)
+ {
+ sp->pwdfd = fcntl(n,F_DUPFD,10);
+ close(n);
+ }
+ if(sp->pwdfd>0)
+ {
+ fcntl(sp->pwdfd,F_SETFD,FD_CLOEXEC);
+ sp->pwdclose = 1;
+ }
+ }
+ }
+#endif
sp->pwd = (shp->pwd?strdup(shp->pwd):0);
sp->mask = shp->mask;
sh_stats(STAT_SUBSHELL);
/* save trap table */
shp->st.otrapcom = 0;
+ shp->st.otrap = savst.trap;
if((nsig=shp->st.trapmax*sizeof(char*))>0 || shp->st.trapcom[0])
{
nsig += sizeof(char*);
@@ -570,7 +625,11 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
sp->pipe = sp->prev->pipe;
flags &= ~sh_state(SH_NOFORK);
}
- sh_exec(t,flags);
+ if(shp->savesig < 0)
+ {
+ shp->savesig = 0;
+ sh_exec(t,flags);
+ }
}
if(comsub!=2 && jmpval!=SH_JMPSUB && shp->st.trapcom[0] && shp->subshell)
{
@@ -581,7 +640,7 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
sh_trap(trap,0);
free(trap);
}
- sh_popcontext(&buff);
+ sh_popcontext(shp,&buff);
if(shp->subshell==0) /* must be child process */
{
subshell_data = sp->prev;
@@ -590,6 +649,9 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
shp->exitval &= SH_EXITMASK;
sh_done(shp,0);
}
+ if(!shp->savesig)
+ shp->savesig = -1;
+ nv_restore(sp);
if(comsub)
{
/* re-enable job control */
@@ -616,13 +678,14 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
}
if(iop && sffileno(iop)==1)
{
- int fd=sfsetfd(iop,3);
+ int fd=sfsetfd(iop,sh_get_unused_fd(shp, 3));
if(fd<0)
{
shp->toomany = 1;
((struct checkpt*)shp->jmplist)->mode = SH_JMPERREXIT;
errormsg(SH_DICT,ERROR_system(1),e_toomany);
}
+ VALIDATE_FD(shp, fd);
shp->sftable[fd] = iop;
fcntl(fd,F_SETFD,FD_CLOEXEC);
shp->fdstatus[fd] = (shp->fdstatus[1]|IOCLEX);
@@ -641,27 +704,17 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
}
shp->fdstatus[1] = sp->fdstatus;
}
- if(sp->subpid)
- {
- if(shp->exitval > SH_EXITSIG)
- sp->sig = (shp->exitval&SH_EXITMASK);
- shp->exitval = 0;
- if(comsub)
- shp->spid = sp->subpid;
- }
- if(comsub && iop && sp->pipefd<0)
- sfseek(iop,(off_t)0,SEEK_SET);
path_delete((Pathcomp_t*)shp->pathlist);
shp->pathlist = (void*)sp->pathlist;
job_subrestore(sp->jobs);
shp->jobenv = savecurenv;
job.curpgid = savejobpgid;
+ job.exitval = saveexitval;
shp->bckpid = sp->bckpid;
if(sp->shpwd) /* restore environment if saved */
{
int n;
shp->options = sp->options;
- nv_restore(sp);
if(sp->salias)
{
shp->alias_tree = dtview(sp->salias,0);
@@ -680,6 +733,7 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
memset(&shp->st.trapcom[savst.trapmax],0,n*sizeof(char*));
shp->st = savst;
shp->curenv = savecurenv;
+ shp->st.otrap = 0;
if(nsig)
{
memcpy((char*)&shp->st.trapcom[0],savsig,nsig);
@@ -692,8 +746,15 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
Namval_t *pwdnod = sh_scoped(shp,PWDNOD);
if(shp->pwd)
{
- chdir(shp->pwd=sp->pwd);
- path_newdir(shp->pathlist);
+ if(sp->pwdfd >=0)
+ {
+ if(fchdir(sp->pwdfd)<0)
+ chdir(sp->pwd);
+ }
+ else
+ chdir(sp->pwd);
+ shp->pwd=sp->pwd;
+ path_newdir(shp,shp->pathlist);
}
if(nv_isattr(pwdnod,NV_NOFREE))
pwdnod->nvalue.cp = (const char*)sp->pwd;
@@ -706,6 +767,8 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
}
else
free((void*)sp->pwd);
+ if(sp->pwdclose)
+ close(sp->pwdfd);
if(sp->mask!=shp->mask)
umask(shp->mask=sp->mask);
if(shp->coutpipe!=sp->coutpipe)
@@ -718,11 +781,17 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
shp->coutpipe = sp->coutpipe;
}
shp->subshare = sp->subshare;
+ shp->comsub = sp->comsub;
+ shp->subdup = sp->subdup;
+#if SHOPT_COSHELL
+ shp->coshell = sp->coshell;
+#endif /* SHOPT_COSHELL */
if(shp->subshell)
SH_SUBSHELLNOD->nvalue.s = --shp->subshell;
subshell = shp->subshell;
subshell_data = sp->prev;
- sh_argfree(shp,argsav,0);
+ if(!argsav || argsav->dolrefcnt==argcnt)
+ sh_argfree(shp,argsav,0);
if(shp->topfd != buff.topfd)
sh_iorestore(shp,buff.topfd|IOSUBSHELL,jmpval);
if(sp->sig)
@@ -731,19 +800,27 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
sp->prev->sig = sp->sig;
else
{
- sh_fault(sp->sig);
- sh_chktrap();
+ kill(getpid(),sp->sig);
+ sh_chktrap(shp);
}
}
- sh_sigcheck();
+ sh_sigcheck(shp);
shp->trapnote = 0;
- if(sp->subpid && !comsub)
+ nsig = shp->savesig;
+ shp->savesig = 0;
+ if(nsig>0)
+ kill(getpid(),nsig);
+ if(sp->subpid)
job_wait(sp->subpid);
+ if(comsub && iop && sp->pipefd<0)
+ sfseek(iop,(off_t)0,SEEK_SET);
+ if(shp->trapnote)
+ sh_chktrap(shp);
if(shp->exitval > SH_EXITSIG)
{
int sig = shp->exitval&SH_EXITMASK;
if(sig==SIGINT || sig== SIGQUIT)
- sh_fault(sig);
+ kill(getpid(),sig);
}
if(duped)
{
@@ -751,6 +828,10 @@ Sfio_t *sh_subshell(Shnode_t *t, int flags, int comsub)
shp->toomany = 1;
errormsg(SH_DICT,ERROR_system(1),e_redirect);
}
+ if(shp->ignsig)
+ kill(getpid(),shp->ignsig);
+ if(jmpval==SH_JMPSUB && shp->lastsig)
+ kill(getpid(),shp->lastsig);
if(jmpval && shp->toomany)
siglongjmp(*shp->jmplist,jmpval);
return(iop);
diff --git a/usr/src/lib/libshell/common/sh/suid_exec.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/suid_exec.c
index a29a744dec..a635b63240 100644
--- a/usr/src/lib/libshell/common/sh/suid_exec.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/suid_exec.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libshell/common/sh/tdump.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/tdump.c
index 444ed340db..d3d82d87ae 100644
--- a/usr/src/lib/libshell/common/sh/tdump.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/tdump.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -181,6 +181,8 @@ static int p_arg(register const struct argnod *arg)
sfputu(outfile,fp->fortyp);
p_tree(fp->fortre);
}
+ else if(n==0 && (arg->argflag&ARG_EXP) && arg->argchn.ap)
+ p_tree((Shnode_t*)arg->argchn.ap);
arg = arg->argnxt.ap;
}
return(sfputu(outfile,0));
diff --git a/usr/src/lib/libshell/common/sh/timers.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/timers.c
index cd69eb220d..10dc05d94f 100644
--- a/usr/src/lib/libshell/common/sh/timers.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/timers.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -94,7 +94,7 @@ static void sigalrm(int sig)
if(time_state&SIGALRM_CALL)
time_state &= ~SIGALRM_CALL;
else if(alarm(0))
- sh_fault(SIGALRM|SH_TRAP);
+ kill(getpid(),SIGALRM|SH_TRAP);
if(time_state)
{
if(time_state&IN_ADDTIMEOUT)
diff --git a/usr/src/lib/libshell/common/sh/trestore.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/trestore.c
index 1034f1f3f9..c209b73fa7 100644
--- a/usr/src/lib/libshell/common/sh/trestore.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/trestore.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -107,7 +107,7 @@ static Shnode_t *r_tree(Shell_t *shp)
t->ar.arexpr = r_arg(shp);
t->ar.arcomp = 0;
if((t->ar.arexpr)->argflag&ARG_RAW)
- t->ar.arcomp = sh_arithcomp((t->ar.arexpr)->argval);
+ t->ar.arcomp = sh_arithcomp(shp,(t->ar.arexpr)->argval);
break;
case TFOR:
t = getnode(shp->stk,fornod);
@@ -152,9 +152,9 @@ static Shnode_t *r_tree(Shell_t *shp)
fp->functnam = stkcopy(shp->stk,shp->st.filename);
t->funct.functtre = r_tree(shp);
t->funct.functstak = slp;
+ t->funct.functargs = (struct comnod*)r_tree(shp);
slp->slptr = stakinstall(savstak,0);
slp->slchild = shp->st.staklist;
- t->funct.functargs = (struct comnod*)r_tree(shp);
break;
}
case TTST:
@@ -194,10 +194,11 @@ static struct argnod *r_arg(Shell_t *shp)
ap->argval[l] = 0;
ap->argchn.cp = 0;
ap->argflag = sfgetc(infile);
+#if 0
if((ap->argflag&ARG_MESSAGE) && *ap->argval)
{
/* replace international messages */
- ap = sh_endword(shp,1);
+ sh_endword(shp,1);
ap->argflag &= ~ARG_MESSAGE;
if(!(ap->argflag&(ARG_MAC|ARG_EXP)))
ap = sh_endword(shp,0);
@@ -209,8 +210,11 @@ static struct argnod *r_arg(Shell_t *shp)
}
}
else
+#endif
ap = (struct argnod*)stkfreeze(stkp,0);
- if(*ap->argval==0 && (ap->argflag&~(ARG_APPEND|ARG_MESSAGE|ARG_QUOTED))==0)
+ if(*ap->argval==0 && (ap->argflag&ARG_EXP))
+ ap->argchn.ap = (struct argnod*)r_tree(shp);
+ else if(*ap->argval==0 && (ap->argflag&~(ARG_APPEND|ARG_MESSAGE|ARG_QUOTED))==0)
{
struct fornod *fp = (struct fornod*)getnode(shp->stk,fornod);
fp->fortyp = sfgetu(infile);
diff --git a/usr/src/lib/libshell/common/sh/waitevent.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/waitevent.c
index ae246b4727..e868116dcb 100644
--- a/usr/src/lib/libshell/common/sh/waitevent.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/waitevent.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -31,8 +31,8 @@
void *sh_waitnotify(int(*newevent)(int,long,int))
{
int (*old)(int,long,int);
- old = sh.waitevent;
- sh.waitevent = newevent;
+ old = shgd->waitevent;
+ shgd->waitevent = newevent;
return((void*)old);
}
diff --git a/usr/src/lib/libshell/common/sh/xec.c b/usr/src/contrib/ast/src/cmd/ksh93/sh/xec.c
index 3975060421..a49640456e 100644
--- a/usr/src/lib/libshell/common/sh/xec.c
+++ b/usr/src/contrib/ast/src/cmd/ksh93/sh/xec.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
+* Copyright (c) 1982-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -52,6 +52,7 @@
#endif
#define SH_NTFORK SH_TIMING
+#define NV_BLTPFSH NV_ARRAY
#if _lib_nice
extern int nice(int);
@@ -68,16 +69,120 @@ static int trim_eq(const char*, const char*);
static void coproc_init(Shell_t*, int pipes[]);
static void *timeout;
+static char nlock;
static char pipejob;
+static char nopost;
+static int restorefd;
struct funenv
{
Namval_t *node;
struct argnod *env;
+ Namval_t **nref;
};
/* ======== command execution ========*/
+#if !SHOPT_DEVFD
+ static void fifo_check(void *handle)
+ {
+ Shell_t *shp = (Shell_t*)handle;
+ pid_t pid = getppid();
+ if(pid==1)
+ {
+ unlink(shp->fifo);
+ sh_done(shp,0);
+ }
+ }
+#endif /* !SHOPT_DEVFD */
+
+/*
+ * The following two functions allow command substituion for non-builtins
+ * to use a pipe and to wait for the pipe to close before restoring to a
+ * temp file.
+ */
+static int subpipe[3],subdup,tsetio,usepipe;
+static void iounpipe(Shell_t*);
+
+static int iousepipe(Shell_t *shp)
+{
+ int i;
+ if(usepipe)
+ {
+ usepipe++;
+ iounpipe(shp);
+ }
+ if(sh_rpipe(subpipe) < 0)
+ return(0);
+ usepipe++;
+ fcntl(subpipe[0],F_SETFD,FD_CLOEXEC);
+ subpipe[2] = fcntl(1,F_DUPFD,10);
+ VALIDATE_FD(shp, subpipe[1]);
+ VALIDATE_FD(shp, subpipe[2]);
+ fcntl(subpipe[2],F_SETFD,FD_CLOEXEC);
+ shp->fdstatus[subpipe[2]] = shp->fdstatus[1];
+ close(1);
+ fcntl(subpipe[1],F_DUPFD,1);
+ shp->fdstatus[1] = shp->fdstatus[subpipe[1]];
+ sh_close(subpipe[1]);
+ if(subdup=shp->subdup) for(i=0; i < 10; i++)
+ {
+ if(subdup&(1<<i))
+ {
+ sh_close(i);
+ fcntl(1,F_DUPFD,i);
+ shp->fdstatus[i] = shp->fdstatus[1];
+ }
+ }
+ return(1);
+}
+
+static void iounpipe(Shell_t *shp)
+{
+ int n;
+ char buff[SF_BUFSIZE];
+ close(1);
+ fcntl(subpipe[2], F_DUPFD, 1);
+ VALIDATE_FD(shp, subpipe[2]);
+ shp->fdstatus[1] = shp->fdstatus[subpipe[2]];
+ --usepipe;
+ if(subdup) for(n=0; n < 10; n++)
+ {
+ if(subdup&(1<<n))
+ {
+ sh_close(n);
+ fcntl(1, F_DUPFD, n);
+ shp->fdstatus[n] = shp->fdstatus[1];
+ }
+ }
+ shp->subdup = 0;
+ sh_close(subpipe[2]);
+ if(usepipe==0) while(1)
+ {
+ while(job.waitsafe && job.savesig==SIGCHLD)
+ {
+ if(!vmbusy())
+ {
+ job.in_critical++;
+ job_reap(SIGCHLD);
+ job.in_critical--;
+ break;
+ }
+ sh_delay(1);
+ }
+ if((n = read(subpipe[0],buff,sizeof(buff)))==0)
+ break;
+ if(n>0)
+ sfwrite(sfstdout,buff,n);
+ else if(errno!=EINTR)
+ break;
+ }
+ sh_close(subpipe[0]);
+ subpipe[0] = -1;
+ tsetio = 0;
+ usepipe = 0;
+}
+
/*
* print time <t> in h:m:s format with precision <p>
*/
@@ -87,10 +192,10 @@ static void l_time(Sfio_t *outfile,register clock_t t,int p)
register int hr;
if(p)
{
- frac = t%sh.lim.clk_tck;
- frac = (frac*100)/sh.lim.clk_tck;
+ frac = t%shgd->lim.clk_tck;
+ frac = (frac*100)/shgd->lim.clk_tck;
}
- t /= sh.lim.clk_tck;
+ t /= shgd->lim.clk_tck;
sec = t%60;
t /= 60;
min = t%60;
@@ -147,7 +252,7 @@ static int p_time(Shell_t *shp, Sfio_t *out, const char *format, clock_t *tm)
errormsg(SH_DICT,ERROR_exit(0),e_badtformat,c);
return(0);
}
- d = (double)tm[n]/sh.lim.clk_tck;
+ d = (double)tm[n]/shp->gd->lim.clk_tck;
skip:
if(l)
l_time(stkp, tm[n], p);
@@ -187,7 +292,7 @@ static int p_comarg(register struct comnod *com)
bp->ptr = nv_context(np);
bp->data = com->comstate;
bp->flags = SH_END_OPTIM;
- (*funptr(np))(0,(char**)0, bp);
+ ((Shbltin_f)funptr(np))(0,(char**)0, bp);
bp->ptr = save_ptr;
bp->data = save_data;
}
@@ -377,12 +482,13 @@ static void put_level(Namval_t* np,const char *val,int flags,Namfun_t *fp)
static const Namdisc_t level_disc = { sizeof(struct Level), put_level };
-static struct Level *init_level(int level)
+static struct Level *init_level(Shell_t *shp,int level)
{
struct Level *lp = newof(NiL,struct Level,1,0);
lp->maxlevel = level;
_nv_unset(SH_LEVELNOD,0);
nv_onattr(SH_LEVELNOD,NV_INT16|NV_NOFREE);
+ shp->last_root = nv_dict(DOTSHNOD);
nv_putval(SH_LEVELNOD,(char*)&lp->maxlevel,NV_INT16);
lp->hdr.disc = &level_disc;
nv_disc(SH_LEVELNOD,&lp->hdr,NV_FIRST);
@@ -390,7 +496,7 @@ static struct Level *init_level(int level)
}
/*
- * write the current common on the stack and make it available as .sh.command
+ * write the current command on the stack and make it available as .sh.command
*/
int sh_debug(Shell_t *shp, const char *trap, const char *name, const char *subscript, char *const argv[], int flags)
{
@@ -437,8 +543,9 @@ int sh_debug(Shell_t *shp, const char *trap, const char *name, const char *subsc
/* now setup .sh.level variable */
shp->st.lineno = error_info.line;
level = shp->fn_depth+shp->dot_depth;
+ shp->last_root = nv_dict(DOTSHNOD);
if(!SH_LEVELNOD->nvfun || !SH_LEVELNOD->nvfun->disc || nv_isattr(SH_LEVELNOD,NV_INT16|NV_NOFREE)!=(NV_INT16|NV_NOFREE))
- init_level(level);
+ init_level(shp,level);
else
nv_putval(SH_LEVELNOD,(char*)&level,NV_INT16);
savst = shp->st;
@@ -468,21 +575,23 @@ int sh_eval(register Sfio_t *iop, int mode)
struct slnod *saveslp = shp->st.staklist;
int jmpval;
struct checkpt *pp = (struct checkpt*)shp->jmplist;
- struct checkpt buff;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
static Sfio_t *io_save;
volatile int traceon=0, lineno=0;
int binscript=shp->binscript;
+ char comsub = shp->comsub;
io_save = iop; /* preserve correct value across longjmp */
shp->binscript = 0;
+ shp->comsub = 0;
#define SH_TOPFUN 0x8000 /* this is a temporary tksh hack */
if (mode & SH_TOPFUN)
{
mode ^= SH_TOPFUN;
shp->fn_reset = 1;
}
- sh_pushcontext(&buff,SH_JMPEVAL);
- buff.olist = pp->olist;
- jmpval = sigsetjmp(buff.buff,0);
+ sh_pushcontext(shp,buffp,SH_JMPEVAL);
+ buffp->olist = pp->olist;
+ jmpval = sigsetjmp(buffp->buff,0);
while(jmpval==0)
{
if(mode&SH_READEVAL)
@@ -502,23 +611,27 @@ int sh_eval(register Sfio_t *iop, int mode)
mode &= ~SH_READEVAL;
if(!sh_isoption(SH_VERBOSE))
sh_offstate(SH_VERBOSE);
- if((mode&~SH_FUNEVAL) && shp->hist_ptr)
+ if((mode&~SH_FUNEVAL) && shp->gd->hist_ptr)
{
- hist_flush(shp->hist_ptr);
+ hist_flush(shp->gd->hist_ptr);
mode = sh_state(SH_INTERACTIVE);
}
sh_exec(t,sh_isstate(SH_ERREXIT)|sh_isstate(SH_NOFORK)|(mode&~SH_FUNEVAL));
if(!(mode&SH_FUNEVAL))
break;
}
- sh_popcontext(&buff);
+ sh_popcontext(shp,buffp);
shp->binscript = binscript;
+ shp->comsub = comsub;
if(traceon)
sh_onoption(SH_XTRACE);
if(lineno)
shp->inlineno = lineno;
if(io_save)
+ {
sfclose(io_save);
+ io_save = 0;
+ }
sh_freeup(shp);
shp->st.staklist = saveslp;
shp->fn_reset = 0;
@@ -527,53 +640,6 @@ int sh_eval(register Sfio_t *iop, int mode)
return(shp->exitval);
}
-#if SHOPT_FASTPIPE
-static int pipe_exec(Shell_t* shp,int pv[], Shnode_t *t, int errorflg)
-{
- struct checkpt buff;
- register Shnode_t *tchild = t->fork.forktre;
- Namval_t *np;
- int jmpval;
- volatile Sfio_t *iop;
- volatile int r;
- if((tchild->tre.tretyp&COMMSK)!=TCOM || !(np=(Namval_t*)(tchild->com.comnamp)))
- {
- sh_pipe(pv);
- return(sh_exec(t,errorflg));
- }
- pv[0] = shp->lim.open_max;
- shp->fdstatus[pv[0]] = IOREAD|IODUP|IOSEEK;
- pv[1] = shp->lim.open_max+1;
- shp->fdstatus[pv[1]] = IOWRITE|IOSEEK;
- iop = sftmp(IOBSIZE+1);
- shp->sftable[shp->lim.open_max+1] = iop;
- sh_pushcontext(&buff,SH_JMPIO);
- if(t->tre.tretyp&FPIN)
- sh_iosave(shp,0,shp->topfd,(char*)0);
- sh_iosave(shp,1,shp->topfd,(char*)0);
- jmpval = sigsetjmp(buff.buff,0);
- if(jmpval==0)
- {
- if(t->tre.tretyp&FPIN)
- sh_iorenumber(shp,shp->inpipe[0],0);
- sh_iorenumber(shp,shp->lim.open_max+1,1);
- r = sh_exec(tchild,errorflg);
- if(sffileno(sfstdout)>=0)
- pv[0] = sfsetfd(sfstdout,10);
- iop = sfswap(sfstdout,0);
- }
- sh_popcontext(&buff);
- shp->sftable[pv[0]] = iop;
- shp->fdstatus[pv[0]] = IOREAD|IODUP|IOSEEK;
- sfset(iop,SF_WRITE,0);
- sfseek(iop,0L,SEEK_SET);
- sh_iorestore(shp,buff.topfd,jmpval);
- if(jmpval>SH_JMPIO)
- siglongjmp(*shp->jmplist,jmpval);
- return(r);
-}
-#endif /* SHOPT_FASTPIPE */
-
/*
* returns 1 when option -<c> is specified
*/
@@ -610,18 +676,32 @@ static void free_list(struct openlist *olist)
*/
static int set_instance(Shell_t *shp,Namval_t *nq, Namval_t *node, struct Namref *nr)
{
- char *sp=0,*cp = nv_name(nq);
+ char *sp=0,*cp;
Namarr_t *ap;
+ Namval_t *np;
+ if(!nv_isattr(nq,NV_MINIMAL|NV_EXPORT|NV_ARRAY) && (np=(Namval_t*)nq->nvenv) && nv_isarray(np))
+ nq = np;
+ cp = nv_name(nq);
memset(nr,0,sizeof(*nr));
nr->np = nq;
- nr->root = sh.var_tree;
- nr->table = sh.last_table;
+ nr->root = shp->var_tree;
+ nr->table = shp->last_table;
+#if SHOPT_NAMESPACE
+ if(!nr->table && shp->namespace)
+ nr->table = shp->namespace;
+#endif /* SHOPT_NAMESPACE */
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;
+ if(shp->var_tree!=shp->var_base && !nv_search((char*)nq,nr->root,HASH_BUCKET|HASH_NOSCOPE))
+ {
+#if SHOPT_NAMESPACE
+ nr->root = shp->namespace?nv_dict(shp->namespace):shp->var_base;
+#else
+ nr->root = shp->var_base;
+#endif /* SHOPT_NAMESPACE */
+ }
nv_putval(SH_NAMENOD, cp, NV_NOFREE);
memcpy(node,L_ARGNOD,sizeof(*node));
L_ARGNOD->nvalue.nrp = nr;
@@ -643,18 +723,259 @@ static void unset_instance(Namval_t *nq, Namval_t *node, struct Namref *nr,long
L_ARGNOD->nvfun = node->nvfun;
if(nr->sub)
{
- nv_putsub(nq, nr->sub, mode);
+ nv_putsub(nr->np, nr->sub, mode);
free((void*)nr->sub);
}
- nv_unset(SH_NAMENOD);
- nv_unset(SH_SUBSCRNOD);
+ _nv_unset(SH_NAMENOD,0);
+ _nv_unset(SH_SUBSCRNOD,0);
+}
+
+#if SHOPT_COSHELL
+uintmax_t coused;
+/*
+ * print out function definition
+ */
+static void print_fun(register Namval_t* np, void *data)
+{
+ register char *format;
+ NOT_USED(data);
+ if(!is_afunction(np) || !np->nvalue.ip)
+ return;
+ if(nv_isattr(np,NV_FPOSIX))
+ format="%s()\n{ ";
+ else
+ format="function %s\n{ ";
+ sfprintf(sfstdout,format,nv_name(np));
+ sh_deparse(sfstdout,(Shnode_t*)(nv_funtree(np)),0);
+ sfwrite(sfstdout,"}\n",2);
+}
+
+static void *sh_coinit(Shell_t *shp,char **argv)
+{
+ struct cosh *csp = job.colist;
+ const char *name = argv?argv[0]:0;
+ int id, open=1;
+ if(!name)
+ return(0);
+ if(*name=='-')
+ {
+ name++;
+ open=0;
+ }
+ nv_open(name,shp->var_tree,NV_IDENT|NV_NOADD);
+ while(csp)
+ {
+ if(strcmp(name,csp->name)==0)
+ {
+ if(open)
+ {
+ coattr(csp->coshell,argv[1]);
+ return((void*)csp);
+ }
+ coclose(csp->coshell);
+ return(0);
+ }
+ csp = csp->next;
+ }
+ if(!open)
+ errormsg(SH_DICT,ERROR_exit(1),"%s: unknown namespace",name);
+ environ[0][2]=0;
+ csp = newof(0,struct cosh,1,strlen(name)+1);
+ if(!(csp->coshell = coopen(NULL,CO_SHELL|CO_SILENT,argv[1])))
+ {
+ free((void*)csp);
+ errormsg(SH_DICT,ERROR_exit(1),"%s: unable to create namespace",name);
+ }
+ csp->coshell->data = (void*)csp;
+ csp->name = (char*)(csp+1);
+ strcpy(csp->name,name);
+ for(id=0; coused&(1<<id); id++);
+ coused |= (1<<id);
+ csp->id = id;
+ csp->next = job.colist;
+ job.colist = csp;
+ return((void*)csp);
}
+int sh_coaddfile(Shell_t *shp, char *name)
+{
+ Namval_t *np = dtmatch(shp->inpool,name);
+ if(!np)
+ {
+ np = (Namval_t*)stakalloc(sizeof(Dtlink_t)+sizeof(char*));
+ np->nvname = name;
+ (Namval_t*)dtinsert(shp->inpool,np);
+ shp->poolfiles++;
+ return(1);
+ }
+ return(0);
+}
+
+static int sh_coexec(Shell_t *shp,const Shnode_t *t, int filt)
+{
+ struct cosh *csp = ((struct cosh*)shp->coshell);
+ Cojob_t *cjp;
+ char *str,*trap,host[PATH_MAX];
+ int lineno,sig,trace = sh_isoption(SH_XTRACE);
+ int verbose = sh_isoption(SH_VERBOSE);
+ sh_offoption(SH_XTRACE);
+ sh_offoption(SH_VERBOSE);
+ if(!shp->strbuf2)
+ shp->strbuf2 = sfstropen();
+ sfswap(shp->strbuf2,sfstdout);
+ sh_trap("typeset -p\nprint cd \"$PWD\"\nprint .sh.dollar=$$\nprint umask $(umask)",0);
+ for(sig=shp->st.trapmax;--sig>0;)
+ {
+ if((trap=shp->st.trapcom[sig]) && *trap==0)
+ sfprintf(sfstdout,"trap '' %d\n",sig);
+ }
+ if(t->tre.tretyp==TFIL)
+ lineno = ((struct forknod*)t->lst.lstlef)->forkline;
+ else
+ lineno = t->fork.forkline;
+ if(filt)
+ {
+ if(gethostname(host,sizeof(host)) < 0)
+ errormsg(SH_DICT,ERROR_system(1),e_pipe);
+ if(shp->inpipe[2]>=20000)
+ sfprintf(sfstdout,"command exec < /dev/tcp/%s/%d || print -u2 'cannot create pipe'\n",host,shp->inpipe[2]);
+ sfprintf(sfstdout,"command exec > /dev/tcp/%s/%d || print -u2 'cannot create pipe'\n",host,shp->outpipe[2]);
+ if(filt==3)
+ t = t->fork.forktre;
+ }
+ else
+ t = t->fork.forktre;
+ nv_scan(shp->fun_tree, print_fun, (void*)0,0, 0);
+ if(1)
+ {
+ Dt_t *top = shp->var_tree;
+ sh_scope(shp,(struct argnod*)0,0);
+ shp->inpool = dtopen(&_Nvdisc,Dtset);
+ sh_exec(t,filt==1||filt==2?SH_NOFORK:0);
+ if(shp->poolfiles)
+ {
+ Namval_t *np;
+ sfprintf(sfstdout,"[[ ${.sh} == *pool* ]] && .sh.pool.files=(\n");
+ for(np=(Namval_t*)dtfirst(shp->inpool);np;np=(Namval_t*)dtnext(shp->inpool,np))
+ {
+ sfprintf(sfstdout,"\t%s\n",sh_fmtq(np->nvname));
+ }
+ sfputr(sfstdout,")",'\n');
+ ;
+ }
+ dtclose(shp->inpool);
+ shp->inpool = 0;
+ shp->poolfiles = 0;
+ sh_unscope(shp);
+ shp->var_tree = top;
+ }
+ sfprintf(sfstdout,"typeset -f .sh.pool.init && .sh.pool.init\n");
+ sfprintf(sfstdout,"LINENO=%d\n",lineno);
+ if(trace)
+ sh_onoption(SH_XTRACE);
+ if(verbose)
+ sh_onoption(SH_VERBOSE);
+ sh_trap("set +o",0);
+ sh_deparse(sfstdout,t,filt==1||filt==2?FALTPIPE:0);
+ sfputc(sfstdout,0);
+ sfswap(shp->strbuf2,sfstdout);
+ str = sfstruse(shp->strbuf2);
+ if(cjp=coexec(csp->coshell,str,0,NULL,NULL,NULL))
+ {
+ csp->cojob = cjp;
+ cjp->local = shp->coshell;
+ if(filt)
+ {
+ if(filt>1)
+ sh_coaccept(shp,shp->inpipe,1);
+ sh_coaccept(shp,shp->outpipe,0);
+ if(filt > 2)
+ {
+ shp->coutpipe = shp->inpipe[1];
+ VALIDATE_FD(shp, shp->coutpipe);
+ shp->fdptrs[shp->coutpipe] = &shp->coutpipe;
+ }
+ }
+ return(sh_copid(csp));
+ }
+ return(-1);
+}
+#endif /*SHOPT_COSHELL*/
+
+#if SHOPT_FILESCAN
+ static Sfio_t *openstream(Shell_t *shp, struct ionod *iop, int *save)
+ {
+ int savein, fd = sh_redirect(shp,iop,3);
+ Sfio_t *sp;
+ savein = dup(0);
+ if(fd==0)
+ fd = savein;
+ sp = sfnew(NULL,NULL,SF_UNBOUND,fd,SF_READ);
+ close(0);
+ open(e_devnull,O_RDONLY);
+ shp->offsets[0] = -1;
+ shp->offsets[1] = 0;
+ *save = savein;
+ return(sp);
+ }
+#endif /* SHOPT_FILESCAN */
+
+#if SHOPT_NAMESPACE
+static Namval_t *enter_namespace(Shell_t *shp, Namval_t *nsp)
+{
+ Namval_t *path=nsp, *fpath=nsp, *onsp=shp->namespace;
+ Dt_t *root=0,*oroot=0;
+ char *val;
+ if(nsp)
+ {
+ if(!nv_istable(nsp))
+ nsp = 0;
+ else if(nv_dict(nsp)->view!=shp->var_base)
+ return(onsp);
+ }
+ if(!nsp && !onsp)
+ return(0);
+ if(onsp == nsp)
+ return(nsp);
+ if(onsp)
+ {
+ oroot = nv_dict(onsp);
+ if(!nsp)
+ {
+ path = nv_search(PATHNOD->nvname,oroot,HASH_NOSCOPE);
+ fpath = nv_search(FPATHNOD->nvname,oroot,HASH_NOSCOPE);
+ }
+ if(shp->var_tree==oroot)
+ {
+ shp->var_tree = shp->var_tree->view;
+ oroot = shp->var_base;
+ }
+ }
+ if(nsp)
+ {
+ if(shp->var_tree==shp->var_base)
+ shp->var_tree = nv_dict(nsp);
+ else
+ {
+ for(root=shp->var_tree; root->view!=oroot;root=root->view);
+ dtview(root,nv_dict(nsp));
+ }
+ }
+ shp->namespace = nsp;
+ if(path && (path = nv_search(PATHNOD->nvname,shp->var_tree,HASH_NOSCOPE)) && (val=nv_getval(path)))
+ nv_putval(path,val,NV_RDONLY);
+ if(fpath && (fpath = nv_search(FPATHNOD->nvname,shp->var_tree,HASH_NOSCOPE)) && (val=nv_getval(fpath)))
+ nv_putval(fpath,val,NV_RDONLY);
+ return(onsp);
+}
+#endif /* SHOPT_NAMESPACE */
+
int sh_exec(register const Shnode_t *t, int flags)
{
- register Shell_t *shp = &sh;
+ register Shell_t *shp = sh_getinterp();
Stk_t *stkp = shp->stk;
- sh_sigcheck();
+ int unpipe=0;
+ sh_sigcheck(shp);
if(t && !shp->st.execbrk && !sh_isoption(SH_NOEXEC))
{
register int type = flags;
@@ -673,16 +994,18 @@ int sh_exec(register const Shnode_t *t, int flags)
char *cp=0, **com=0, *comn;
int argn;
int skipexitset = 0;
- int was_interactive = 0;
- int was_errexit = sh_isstate(SH_ERREXIT);
- int was_monitor = sh_isstate(SH_MONITOR);
- int echeck = 0;
+ volatile int was_interactive = 0;
+ volatile int was_errexit = sh_isstate(SH_ERREXIT);
+ volatile int was_monitor = sh_isstate(SH_MONITOR);
+ volatile int echeck = 0;
if(flags&sh_state(SH_INTERACTIVE))
{
if(pipejob==2)
job_unlock();
+ nlock = 0;
pipejob = 0;
job.curpgid = 0;
+ job.curjobid = 0;
flags &= ~sh_state(SH_INTERACTIVE);
}
sh_offstate(SH_ERREXIT);
@@ -697,6 +1020,8 @@ int sh_exec(register const Shnode_t *t, int flags)
shp->exitval=0;
shp->lastsig = 0;
shp->lastpath = 0;
+ if(shp->exittrap || shp->errtrap)
+ execflg = 0;
switch(type&COMMSK)
{
case TCOM:
@@ -716,10 +1041,21 @@ int sh_exec(register const Shnode_t *t, int flags)
{
argp = t->com.comarg;
if(argp && *com && !(argp->argflag&ARG_RAW))
- sh_sigcheck();
+ sh_sigcheck(shp);
}
np = (Namval_t*)(t->com.comnamp);
nq = (Namval_t*)(t->com.comnamq);
+#if SHOPT_NAMESPACE
+ if(np && shp->namespace && nq!=shp->namespace && nv_isattr(np,NV_BLTIN|NV_INTEGER|BLT_SPC)!=(NV_BLTIN|BLT_SPC))
+ {
+ Namval_t *mp;
+ if(mp = sh_fsearch(shp,com[0],0))
+ {
+ nq = shp->namespace;
+ np = mp;
+ }
+ }
+#endif /* SHOPT_NAMESPACE */
com0 = com[0];
shp->xargexit = 0;
while(np==SYSCOMMAND)
@@ -741,8 +1077,57 @@ int sh_exec(register const Shnode_t *t, int flags)
else
shp->xargmin = 0;
argn -= command;
- if(!command && np && is_abuiltin(np))
- np = dtsearch(shp->fun_tree,np);
+#if SHOPT_COSHELL
+ if(argn && shp->inpool)
+ {
+ if(io=t->tre.treio)
+ sh_redirect(shp,io,0);
+ if(!np || !is_abuiltin(np) || *np->nvname=='/' || np==SYSCD)
+ {
+ char **argv, *cp;
+ for(argv=com+1; cp= *argv; argv++)
+ {
+ if(cp && *cp && *cp!='-')
+ sh_coaddfile(shp,*argv);
+ }
+ break;
+ }
+ if(np->nvalue.bfp!=SYSTYPESET->nvalue.bfp)
+ break;
+ }
+ if(t->tre.tretyp&FAMP)
+ {
+ shp->coshell = sh_coinit(shp,com);
+ com0 = 0;
+ break;
+ }
+#endif /* SHOPT_COSHELL */
+ if(np && is_abuiltin(np))
+ {
+ if(!command)
+ {
+ Namval_t *mp;
+#if SHOPT_NAMESPACE
+ if(shp->namespace && (mp=sh_fsearch(shp,np->nvname,0)))
+ np = mp;
+ else
+#endif /* SHOPT_NAMESPACE */
+ np = dtsearch(shp->fun_tree,np);
+ }
+#if SHOPT_PFSH
+ if(sh_isoption(SH_PFSH) && nv_isattr(np,NV_BLTINOPT) && !nv_isattr(np,NV_BLTPFSH))
+ {
+ if(path_xattr(shp,np->nvname,(char*)0))
+ {
+ dtdelete(shp->bltin_tree,np);
+ np = 0;
+ }
+ else
+ nv_onattr(np,NV_BLTPFSH);
+
+ }
+#endif /* SHOPT_PFSH */
+ }
if(com0)
{
if(!np && !strchr(com0,'/'))
@@ -751,14 +1136,7 @@ int sh_exec(register const Shnode_t *t, int flags)
np = nv_bfsearch(com0, root, &nq, &cp);
#if SHOPT_NAMESPACE
if(shp->namespace && !nq && !cp)
- {
- int offset = stktell(stkp);
- sfputr(stkp,nv_name(shp->namespace),-1);
- sfputc(stkp,'.');
- sfputr(stkp,com0,0);
- stkseek(stkp,offset);
- np = nv_bfsearch(stkptr(stkp,offset), root, &nq, &cp);
- }
+ np = sh_fsearch(shp,com0,0);
#endif /* SHOPT_NAMESPACE */
}
comn = com[argn-1];
@@ -766,7 +1144,7 @@ int sh_exec(register const Shnode_t *t, int flags)
io = t->tre.treio;
if(shp->envlist = argp = t->com.comset)
{
- if(argn==0 || (np && nv_isattr(np,BLT_SPC)))
+ if(argn==0 || (np && nv_isattr(np,(BLT_DCL|BLT_SPC))))
{
Namval_t *tp=0;
if(argn)
@@ -776,6 +1154,8 @@ int sh_exec(register const Shnode_t *t, int flags)
else if(checkopt(com,'a'))
flgs |= NV_IARRAY;
}
+ if(np)
+ flgs |= NV_UNJUST;
#if SHOPT_BASH
if(np==SYSLOCAL)
{
@@ -788,10 +1168,8 @@ int sh_exec(register const Shnode_t *t, int flags)
}
}
- if(np==SYSTYPESET || np==SYSLOCAL)
-#else
+#endif /* SHOPT_BASH */
if(np==SYSTYPESET || (np && np->nvalue.bfp==SYSTYPESET->nvalue.bfp))
-#endif
{
if(np!=SYSTYPESET)
{
@@ -802,13 +1180,24 @@ int sh_exec(register const Shnode_t *t, int flags)
flgs |= NV_COMVAR;
if(checkopt(com,'S'))
flgs |= NV_STATIC;
+ if(checkopt(com,'m'))
+ flgs |= NV_MOVE;
if(checkopt(com,'n'))
flgs |= NV_NOREF;
- else if(!shp->typeinit && (checkopt(com,'L') || checkopt(com,'R') || checkopt(com,'Z')))
- flgs |= NV_UNJUST;
#if SHOPT_TYPEDEF
else if(argn>=3 && checkopt(com,'T'))
{
+# if SHOPT_NAMESPACE
+ if(shp->namespace)
+ {
+ if(!shp->strbuf2)
+ shp->strbuf2 = sfstropen();
+ sfprintf(shp->strbuf2,"%s%s%c",NV_CLASS,nv_name(shp->namespace),0);
+ shp->prefix = strdup(sfstruse(shp->strbuf2));
+ nv_open(shp->prefix,shp->var_base,NV_VARNAME);
+ }
+ else
+# endif /* SHOPT_NAMESPACE */
shp->prefix = NV_CLASS;
flgs |= NV_TYPE;
@@ -851,20 +1240,20 @@ int sh_exec(register const Shnode_t *t, int flags)
com = argv;
}
/* set +x doesn't echo */
- else if((np!=SYSSET) && sh_isoption(SH_XTRACE))
- sh_trace(com-command,tflags);
else if((t->tre.tretyp&FSHOWME) && sh_isoption(SH_SHOWME))
{
int ison = sh_isoption(SH_XTRACE);
if(!ison)
sh_onoption(SH_XTRACE);
- sh_trace(com-command,tflags);
+ sh_trace(shp,com-command,tflags);
if(io)
sh_redirect(shp,io,SH_SHOWME);
if(!ison)
sh_offoption(SH_XTRACE);
break;
}
+ else if((np!=SYSSET) && sh_isoption(SH_XTRACE))
+ sh_trace(shp,com-command,tflags);
if(trap=shp->st.trap[SH_DEBUGTRAP])
{
int n = sh_debug(shp,trap,(char*)0,(char*)0, com, ARG_RAW);
@@ -885,10 +1274,14 @@ int sh_exec(register const Shnode_t *t, int flags)
shp->lastpath = 0;
if(!np && !strchr(com0,'/'))
{
- if(path_search(com0,NIL(Pathcomp_t**),1))
+ if(path_search(shp,com0,NIL(Pathcomp_t**),1))
{
error_info.line = t->com.comline-shp->st.firstline;
- if((np=nv_search(com0,shp->fun_tree,0)) && !np->nvalue.ip)
+#if SHOPT_NAMESPACE
+ if(!shp->namespace || !(np=sh_fsearch(shp,com0,0)))
+#endif /* SHOPT_NAMESPACE */
+ np=nv_search(com0,shp->fun_tree,0);
+ if(!np || !np->nvalue.ip)
{
Namval_t *mp=nv_search(com0,shp->bltin_tree,0);
if(mp)
@@ -906,6 +1299,7 @@ int sh_exec(register const Shnode_t *t, int flags)
if(np && pipejob==2)
{
job_unlock();
+ nlock--;
pipejob = 1;
}
/* check for builtins */
@@ -916,8 +1310,8 @@ int sh_exec(register const Shnode_t *t, int flags)
volatile void *save_data;
int jmpval, save_prompt;
int was_nofork = execflg?sh_isstate(SH_NOFORK):0;
- struct checkpt buff;
- unsigned long was_vi=0, was_emacs=0, was_gmacs=0;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
+ volatile unsigned long was_vi=0, was_emacs=0, was_gmacs=0;
struct stat statb;
bp = &shp->bltindata;
save_ptr = bp->ptr;
@@ -938,13 +1332,13 @@ int sh_exec(register const Shnode_t *t, int flags)
}
if(execflg)
sh_onstate(SH_NOFORK);
- sh_pushcontext(&buff,SH_JMPCMD);
- jmpval = sigsetjmp(buff.buff,1);
+ sh_pushcontext(shp,buffp,SH_JMPCMD);
+ jmpval = sigsetjmp(buffp->buff,1);
if(jmpval == 0)
{
if(!(nv_isattr(np,BLT_ENV)))
error_info.flags |= ERROR_SILENT;
- errorpush(&buff.err,0);
+ errorpush(&buffp->err,0);
if(io)
{
struct openlist *item;
@@ -954,19 +1348,17 @@ int sh_exec(register const Shnode_t *t, int flags)
type=1+!com[1];
else
type = (execflg && !shp->subshell && !shp->st.trapcom[0]);
+ shp->redir0 = 1;
sh_redirect(shp,io,type);
- for(item=buff.olist;item;item=item->next)
+ for(item=buffp->olist;item;item=item->next)
item->strm=0;
}
if(!(nv_isattr(np,BLT_ENV)))
{
- if(bp->nosfio)
- {
- if(!shp->pwd)
- path_pwd(0);
- if(shp->pwd)
- stat(".",&statb);
- }
+ if(!shp->pwd)
+ path_pwd(shp,0);
+ if(shp->pwd)
+ stat(".",&statb);
sfsync(NULL);
share = sfset(sfstdin,SF_SHARE,0);
sh_onstate(SH_STOPOK);
@@ -985,7 +1377,7 @@ int sh_exec(register const Shnode_t *t, int flags)
error_info.id = *com;
if(argn)
shp->exitval = 0;
- shp->bltinfun = funptr(np);
+ shp->bltinfun = (Shbltin_f)funptr(np);
bp->bnode = np;
bp->vnode = nq;
bp->ptr = nv_context(np);
@@ -994,13 +1386,13 @@ int sh_exec(register const Shnode_t *t, int flags)
bp->notify = 0;
bp->flags = (OPTIMIZE!=0);
if(shp->subshell && nv_isattr(np,BLT_NOSFIO))
- sh_subtmpfile(0);
+ sh_subtmpfile(shp);
if(execflg && !shp->subshell &&
!shp->st.trapcom[0] && !shp->st.trap[SH_ERRTRAP] && shp->fn_depth==0 && !nv_isattr(np,BLT_ENV))
{
/* do close-on-exec */
int fd;
- for(fd=0; fd < shp->lim.open_max; fd++)
+ for(fd=0; fd < shp->gd->lim.open_max; fd++)
if((shp->fdstatus[fd]&IOCLEX)&&fd!=shp->infd)
sh_close(fd);
}
@@ -1010,19 +1402,21 @@ int sh_exec(register const Shnode_t *t, int flags)
tty_check(ERRIO);
((Shnode_t*)t)->com.comstate = shp->bltindata.data;
bp->data = (void*)save_data;
- if(!nv_isattr(np,BLT_EXIT) && shp->exitval!=SH_RUNPROG)
+ if(sh.exitval && errno==EINTR && shp->lastsig)
+ sh.exitval = SH_EXITSIG|shp->lastsig;
+ else if(!nv_isattr(np,BLT_EXIT) && shp->exitval!=SH_RUNPROG)
shp->exitval &= SH_EXITMASK;
}
else
{
struct openlist *item;
- for(item=buff.olist;item;item=item->next)
+ for(item=buffp->olist;item;item=item->next)
{
if(item->strm)
{
sfclrlock(item->strm);
- if(shp->hist_ptr && item->strm == shp->hist_ptr->histfp)
- hist_close(shp->hist_ptr);
+ if(shp->gd->hist_ptr && item->strm == shp->gd->hist_ptr->histfp)
+ hist_close(shp->gd->hist_ptr);
else
sfclose(item->strm);
}
@@ -1033,13 +1427,17 @@ int sh_exec(register const Shnode_t *t, int flags)
if(jmpval<=SH_JMPCMD && (!nv_isattr(np,BLT_SPC) || command))
jmpval=0;
}
- if(bp && bp->ptr!= nv_context(np))
- np->nvfun = (Namfun_t*)bp->ptr;
+ if(bp)
+ {
+ bp->bnode = 0;
+ if( bp->ptr!= nv_context(np))
+ np->nvfun = (Namfun_t*)bp->ptr;
+ }
if(execflg && !was_nofork)
sh_offstate(SH_NOFORK);
if(!(nv_isattr(np,BLT_ENV)))
{
- if(bp->nosfio && shp->pwd)
+ if(shp->pwd)
{
struct stat stata;
stat(".",&stata);
@@ -1055,12 +1453,12 @@ int sh_exec(register const Shnode_t *t, int flags)
sfpool(sfstdin,NIL(Sfio_t*),SF_WRITE);
shp->nextprompt = save_prompt;
}
- sh_popcontext(&buff);
- errorpop(&buff.err);
+ sh_popcontext(shp,buffp);
+ errorpop(&buffp->err);
error_info.flags &= ~(ERROR_SILENT|ERROR_NOTIFY);
shp->bltinfun = 0;
- if(buff.olist)
- free_list(buff.olist);
+ if(buffp->olist)
+ free_list(buffp->olist);
if(was_vi)
sh_onoption(SH_VI);
else if(was_emacs)
@@ -1074,6 +1472,8 @@ int sh_exec(register const Shnode_t *t, int flags)
/* don't restore for subshell exec */
if((shp->topfd>topfd) && !(shp->subshell && np==SYSEXEC))
sh_iorestore(shp,topfd,jmpval);
+
+ shp->redir0 = 0;
if(jmpval)
siglongjmp(*shp->jmplist,jmpval);
#if 0
@@ -1090,16 +1490,27 @@ int sh_exec(register const Shnode_t *t, int flags)
{
volatile int indx;
int jmpval=0;
- struct checkpt buff;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
+#if SHOPT_NAMESPACE
+ Namval_t node, *namespace=0;
+#else
Namval_t node;
+#endif /* SHOPT_NAMESPACE */
struct Namref nr;
long mode;
register struct slnod *slp;
if(!np->nvalue.ip)
{
- indx = path_search(com0,NIL(Pathcomp_t**),0);
+ indx = path_search(shp,com0,NIL(Pathcomp_t**),0);
if(indx==1)
+ {
+#if SHOPT_NAMESPACE
+ if(shp->namespace)
+ np = sh_fsearch(shp,com0,0);
+ else
+#endif /* SHOPT_NAMESPACE */
np = nv_search(com0,shp->fun_tree,HASH_NOSCOPE);
+ }
if(!np->nvalue.ip)
{
@@ -1122,26 +1533,46 @@ int sh_exec(register const Shnode_t *t, int flags)
staklink(slp->slptr);
if(nq)
{
+ Namval_t *mp=0;
+ if(nv_isattr(np,NV_STATICF) && (mp=nv_type(nq)))
+ nq = mp;
shp->last_table = last_table;
mode = set_instance(shp,nq,&node,&nr);
}
if(io)
{
indx = shp->topfd;
- sh_pushcontext(&buff,SH_JMPCMD);
- jmpval = sigsetjmp(buff.buff,0);
+ sh_pushcontext(shp,buffp,SH_JMPCMD);
+ jmpval = sigsetjmp(buffp->buff,0);
}
if(jmpval == 0)
+
{
if(io)
indx = sh_redirect(shp,io,execflg);
+#if SHOPT_NAMESPACE
+ if(*np->nvname=='.')
+ {
+ char *cp = strchr(np->nvname+1,'.');
+ if(cp)
+ {
+ *cp = 0;
+ namespace = nv_search(np->nvname,shp->var_base,HASH_NOSCOPE);
+ *cp = '.';
+ }
+ }
+ namespace = enter_namespace(shp,namespace);
+#endif /* SHOPT_NAMESPACE */
sh_funct(shp,np,argn,com,t->com.comset,(flags&~OPTIMIZE_FLAG));
}
+#if SHOPT_NAMESPACE
+ enter_namespace(shp,namespace);
+#endif /* SHOPT_NAMESPACE */
if(io)
{
- if(buff.olist)
- free_list(buff.olist);
- sh_popcontext(&buff);
+ if(buffp->olist)
+ free_list(buffp->olist);
+ sh_popcontext(shp,buffp);
sh_iorestore(shp,indx,jmpval);
}
if(nq)
@@ -1165,19 +1596,27 @@ int sh_exec(register const Shnode_t *t, int flags)
{
register pid_t parent;
int no_fork,jobid;
- int pipes[2];
+ int pipes[3];
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ sh_exec(t->fork.forktre,0);
+ break;
+ }
+#endif /* SHOPT_COSHELL */
if(shp->subshell)
{
- if(shp->subshare)
- sh_subtmpfile(1);
- else
+ sh_subtmpfile(shp);
+ if(shp->comsub==1 && !(shp->fdstatus[1]&IONOSEEK))
+ unpipe=iousepipe(shp);
+ if((type&(FAMP|TFORK))==(FAMP|TFORK))
sh_subfork();
}
- no_fork = !ntflag && !(type&(FAMP|FPOU)) &&
+ no_fork = !ntflag && !(type&(FAMP|FPOU)) && !shp->subshell &&
+ !(shp->st.trapcom[SIGINT] && *shp->st.trapcom[SIGINT]) &&
!shp->st.trapcom[0] && !shp->st.trap[SH_ERRTRAP] &&
((struct checkpt*)shp->jmplist)->mode!=SH_JMPEVAL &&
- (execflg2 || (execflg &&
- !shp->subshell && shp->fn_depth==0 &&
+ (execflg2 || (execflg && shp->fn_depth==0 &&
!(pipejob && sh_isoption(SH_PIPEFAIL))
));
if(sh_isstate(SH_PROFILE) || shp->dot_depth)
@@ -1206,34 +1645,76 @@ int sh_exec(register const Shnode_t *t, int flags)
}
}
#endif /* SHOPT_BGX */
+ nv_getval(RANDNOD);
+ restorefd = shp->topfd;
if(type&FCOOP)
+ {
+ pipes[2] = 0;
+#if SHOPT_COSHELL
+ if(shp->coshell)
+ {
+ if(shp->cpipe[0]<0 || shp->cpipe[1] < 0)
+ {
+ sh_copipe(shp,shp->outpipe=shp->cpipe,0);
+ VALIDATE_FD(shp, shp->cpipe[0]);
+ shp->fdptrs[shp->cpipe[0]] = shp->cpipe;
+ }
+ sh_copipe(shp,shp->inpipe=pipes,0);
+ parent = sh_coexec(shp,t,3);
+ shp->cpid = parent;
+ jobid = job_post(shp,parent,0);
+ goto skip;
+ }
+#endif /* SHOPT_COSHELL */
coproc_init(shp,pipes);
- nv_getval(RANDNOD);
+ }
+#if SHOPT_COSHELL
+ if((type&(FAMP|FINT)) == (FAMP|FINT))
+ {
+ if(shp->coshell)
+ {
+ parent = sh_coexec(shp,t,0);
+ jobid = job_post(shp,parent,0);
+ goto skip;
+ }
+ }
+#endif /* SHOPT_COSHELL */
#if SHOPT_AMP
if((type&(FAMP|FINT)) == (FAMP|FINT))
parent = sh_ntfork(shp,t,com,&jobid,ntflag);
else
- parent = sh_fork(type,&jobid);
+ parent = sh_fork(shp,type,&jobid);
if(parent<0)
+ {
+ if(shp->comsub==1 && usepipe && unpipe)
+ iounpipe(shp);
break;
+ }
#else
#if SHOPT_SPAWN
# ifdef _lib_fork
- if(com)
+ if(com && !job.jobcontrol)
parent = sh_ntfork(shp,t,com,&jobid,ntflag);
else
- parent = sh_fork(type,&jobid);
+ parent = sh_fork(shp,type,&jobid);
# else
if((parent = sh_ntfork(shp,t,com,&jobid,ntflag))<=0)
break;
# endif /* _lib_fork */
if(parent<0)
+ {
+ if(shp->comsub==1 && usepipe && unpipe)
+ iounpipe(shp);
break;
+ }
#else
- parent = sh_fork(type,&jobid);
+ parent = sh_fork(shp,type,&jobid);
#endif /* SHOPT_SPAWN */
#endif
}
+#if SHOPT_COSHELL
+ skip:
+#endif /* SHOPT_COSHELL */
if(job.parent=parent)
/* This is the parent branch of fork
* It may or may not wait for the child
@@ -1242,6 +1723,7 @@ int sh_exec(register const Shnode_t *t, int flags)
if(pipejob==2)
{
pipejob = 1;
+ nlock--;
job_unlock();
}
if(type&FPCL)
@@ -1250,28 +1732,25 @@ int sh_exec(register const Shnode_t *t, int flags)
shp->bckpid = parent;
else if(!(type&(FAMP|FPOU)))
{
- if(shp->topfd > topfd)
- sh_iorestore(shp,topfd,0);
if(!sh_isoption(SH_MONITOR))
{
if(!(shp->sigflag[SIGINT]&(SH_SIGFAULT|SH_SIGOFF)))
sh_sigtrap(SIGINT);
shp->trapnote |= SH_SIGIGNORE;
}
- if(execflg && shp->subshell && !shp->subshare)
- {
- shp->spid = parent;
- job.pwlist->p_env--;
- }
- else if(shp->pipepid)
+ if(shp->pipepid)
shp->pipepid = parent;
else
job_wait(parent);
+ if(shp->topfd > topfd)
+ sh_iorestore(shp,topfd,0);
+ if(usepipe && tsetio && subdup && unpipe)
+ iounpipe(shp);
if(!sh_isoption(SH_MONITOR))
{
shp->trapnote &= ~SH_SIGIGNORE;
if(shp->exitval == (SH_EXITSIG|SIGINT))
- sh_fault(SIGINT);
+ kill(getpid(),SIGINT);
}
}
if(type&FAMP)
@@ -1280,7 +1759,11 @@ int sh_exec(register const Shnode_t *t, int flags)
{
/* print job number */
#ifdef JOBS
+# if SHOPT_COSHELL
+ sfprintf(sfstderr,"[%d]\t%s\n",jobid,sh_pid2str(shp,parent));
+# else
sfprintf(sfstderr,"[%d]\t%d\n",jobid,parent);
+# endif /* SHOPT_COSHELL */
#else
sfprintf(sfstderr,"%d\n",parent);
#endif /* JOBS */
@@ -1294,11 +1777,13 @@ int sh_exec(register const Shnode_t *t, int flags)
*/
{
volatile int jmpval;
- struct checkpt buff;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
+ struct ionod *iop;
+ int rewrite=0;
if(no_fork)
sh_sigreset(2);
- sh_pushcontext(&buff,SH_JMPEXIT);
- jmpval = sigsetjmp(buff.buff,0);
+ sh_pushcontext(shp,buffp,SH_JMPEXIT);
+ jmpval = sigsetjmp(buffp->buff,0);
if(jmpval)
goto done;
if((type&FINT) && !sh_isstate(SH_MONITOR))
@@ -1318,14 +1803,38 @@ int sh_exec(register const Shnode_t *t, int flags)
if((type&FAMP) && sh_isoption(SH_BGNICE))
nice(4);
#endif /* _lib_nice */
+#if !SHOPT_DEVFD
+ if(shp->fifo && (type&(FPIN|FPOU)))
+ {
+ int fn,fd = (type&FPIN)?0:1;
+ void *fifo_timer=sh_timeradd(500,1,fifo_check,(void*)shp);
+ fn = sh_open(shp->fifo,fd?O_WRONLY:O_RDONLY);
+ timerdel(fifo_timer);
+ sh_iorenumber(shp,fn,fd);
+ sh_close(fn);
+ sh_delay(.001);
+ unlink(shp->fifo);
+ free(shp->fifo);
+ shp->fifo = 0;
+ type &= ~(FPIN|FPOU);
+ }
+#endif /* !SHOPT_DEVFD */
if(type&FPIN)
{
+#if SHOPT_COSHELL
+ if(shp->inpipe[2]>20000)
+ sh_coaccept(shp,shp->inpipe,0);
+#endif /* SHOPT_COSHELL */
sh_iorenumber(shp,shp->inpipe[0],0);
if(!(type&FPOU) || (type&FCOOP))
sh_close(shp->inpipe[1]);
}
if(type&FPOU)
{
+#if SHOPT_COSHELL
+ if(shp->outpipe[2]>20000)
+ sh_coaccept(shp,shp->outpipe,1);
+#endif /* SHOPT_COSHELL */
sh_iorenumber(shp,shp->outpipe[1],1);
sh_pclose(shp->outpipe);
}
@@ -1334,22 +1843,30 @@ int sh_exec(register const Shnode_t *t, int flags)
if(shp->topfd)
sh_iounsave(shp);
topfd = shp->topfd;
+ if(com0 && (iop=t->tre.treio))
+ {
+ for(;iop;iop=iop->ionxt)
+ {
+ if(iop->iofile&IOREWRITE)
+ rewrite = 1;
+ }
+ }
sh_redirect(shp,t->tre.treio,1);
- if(shp->topfd > topfd)
+ if(rewrite)
{
job_lock();
while((parent = vfork()) < 0)
- _sh_fork(parent, 0, (int*)0);
- job_fork(parent);
+ _sh_fork(shp,parent, 0, (int*)0);
if(parent)
{
- job_clear();
- job_post(parent,0);
+ job.toclear = 0;
+ job_post(shp,parent,0);
job_wait(parent);
sh_iorestore(shp,topfd,SH_JMPCMD);
sh_done(shp,(shp->exitval&SH_EXITSIG)?(shp->exitval&SH_EXITMASK):0);
}
+ job_unlock();
}
if((type&COMMSK)!=TCOM)
{
@@ -1365,10 +1882,10 @@ int sh_exec(register const Shnode_t *t, int flags)
{
sh_offoption(SH_ERREXIT);
sh_freeup(shp);
- path_exec(com0,com,t->com.comset);
+ path_exec(shp,com0,com,t->com.comset);
}
done:
- sh_popcontext(&buff);
+ sh_popcontext(shp,buffp);
if(jmpval>SH_JMPEXIT)
siglongjmp(*shp->jmplist,jmpval);
sh_done(shp,0);
@@ -1385,10 +1902,18 @@ int sh_exec(register const Shnode_t *t, int flags)
pid_t pid;
int jmpval, waitall;
int simple = (t->fork.forktre->tre.tretyp&COMMSK)==TCOM;
- struct checkpt buff;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ sh_redirect(shp,t->fork.forkio,0);
+ sh_exec(t->fork.forktre,0);
+ break;
+ }
+#endif /*SHOPT_COSHELL */
if(shp->subshell)
execflg = 0;
- sh_pushcontext(&buff,SH_JMPIO);
+ sh_pushcontext(shp,buffp,SH_JMPIO);
if(type&FPIN)
{
was_interactive = sh_isstate(SH_INTERACTIVE);
@@ -1408,19 +1933,21 @@ int sh_exec(register const Shnode_t *t, int flags)
}
else
error_info.line = t->fork.forkline-shp->st.firstline;
- jmpval = sigsetjmp(buff.buff,0);
+ jmpval = sigsetjmp(buffp->buff,0);
if(jmpval==0)
{
+ if(shp->comsub==1)
+ tsetio = 1;
sh_redirect(shp,t->fork.forkio,execflg);
(t->fork.forktre)->tre.tretyp |= t->tre.tretyp&FSHOWME;
sh_exec(t->fork.forktre,flags&~simple);
}
else
sfsync(shp->outpool);
- sh_popcontext(&buff);
- sh_iorestore(shp,buff.topfd,jmpval);
- if(buff.olist)
- free_list(buff.olist);
+ sh_popcontext(shp,buffp);
+ sh_iorestore(shp,buffp->topfd,jmpval);
+ if(buffp->olist)
+ free_list(buffp->olist);
if(type&FPIN)
{
job.waitall = waitall;
@@ -1438,6 +1965,8 @@ int sh_exec(register const Shnode_t *t, int flags)
if(type || !sh_isoption(SH_PIPEFAIL))
shp->exitval = type;
}
+ if(shp->comsub==1 && usepipe)
+ iounpipe(shp);
shp->pipepid = 0;
shp->st.ioset = 0;
if(simple && was_errexit)
@@ -1452,13 +1981,20 @@ int sh_exec(register const Shnode_t *t, int flags)
}
case TPAR:
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ sh_exec(t->par.partre,0);
+ break;
+ }
+#endif /* SHOPT_COSHELL */
echeck = 1;
flags &= ~OPTIMIZE_FLAG;
if(!shp->subshell && !shp->st.trapcom[0] && !shp->st.trap[SH_ERRTRAP] && (flags&sh_state(SH_NOFORK)))
{
char *savsig;
int nsig,jmpval;
- struct checkpt buff;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
shp->st.otrapcom = 0;
if((nsig=shp->st.trapmax*sizeof(char*))>0 || shp->st.trapcom[0])
{
@@ -1467,17 +2003,32 @@ int sh_exec(register const Shnode_t *t, int flags)
shp->st.otrapcom = (char**)savsig;
}
sh_sigreset(0);
- sh_pushcontext(&buff,SH_JMPEXIT);
- jmpval = sigsetjmp(buff.buff,0);
+ sh_pushcontext(shp,buffp,SH_JMPEXIT);
+ jmpval = sigsetjmp(buffp->buff,0);
if(jmpval==0)
sh_exec(t->par.partre,flags);
- sh_popcontext(&buff);
+ sh_popcontext(shp,buffp);
if(jmpval > SH_JMPEXIT)
siglongjmp(*shp->jmplist,jmpval);
+ if(shp->exitval > 256)
+ shp->exitval -= 128;
sh_done(shp,0);
}
+ else if(((type=t->par.partre->tre.tretyp)&FAMP) && ((type&COMMSK)==TFORK))
+ {
+ pid_t pid;
+ sfsync(NIL(Sfio_t*));
+ while((pid=fork())< 0)
+ _sh_fork(shp,pid,0,0);
+ if(pid==0)
+ {
+ sh_exec(t->par.partre,flags);
+ shp->st.trapcom[0]=0;
+ sh_done(shp,0);
+ }
+ }
else
- sh_subshell(t->par.partre,flags,0);
+ sh_subshell(shp,t->par.partre,flags,0);
break;
case TFIL:
@@ -1487,43 +2038,108 @@ int sh_exec(register const Shnode_t *t, int flags)
* All elements of the pipe are started by the parent.
* The last element executes in current environment
*/
- int pvo[2]; /* old pipe for multi-stage */
- int pvn[2]; /* current set up pipe */
+ int pvo[3]; /* old pipe for multi-stage */
+ int pvn[3]; /* current set up pipe */
int savepipe = pipejob;
+ int savelock = nlock;
int showme = t->tre.tretyp&FSHOWME;
+ int n,waitall,savewaitall=job.waitall;
+ int savejobid = job.curjobid;
+ int *exitval=0,*saveexitval = job.exitval;
pid_t savepgid = job.curpgid;
- job.curpgid = 0;
+#if SHOPT_COSHELL
+ int copipe=0;
+ Shnode_t *tt;
+#endif /* SHOPT_COSHELL */
+ job.exitval = 0;
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ do
+ {
+ sh_exec(t->lst.lstlef, 0);
+ t = t->lst.lstrit;
+ if(flags && (t->tre.tretyp!=TFIL || !(t->lst.lstlef->tre.tretyp&FALTPIPE)))
+ goto coskip1;
+ }
+ while(t->tre.tretyp==TFIL);
+ sh_exec(t,0);
+ coskip1:
+ break;
+ }
+ pvo[2] = pvn[2] = 0;
+#endif /* SHOPT_COSHELL */
+ job.curjobid = 0;
if(shp->subshell)
{
- if(shp->subshare)
- sh_subtmpfile(0);
- else
- sh_subfork();
+ sh_subtmpfile(shp);
+ if(shp->comsub==1 && !(shp->fdstatus[1]&IONOSEEK))
+ iousepipe(shp);
}
shp->inpipe = pvo;
shp->outpipe = pvn;
pvo[1] = -1;
if(sh_isoption(SH_PIPEFAIL))
- job.waitall = 1;
+ {
+ const Shnode_t* tn=t;
+ job.waitall = 2;
+ job.curpgid = 0;
+ while((tn=tn->lst.lstrit) && tn->tre.tretyp==TFIL)
+ job.waitall++;
+ exitval = job.exitval = (int*)stakalloc(job.waitall*sizeof(int));
+ memset(exitval,0,job.waitall*sizeof(int));
+ }
else
job.waitall |= !pipejob && sh_isstate(SH_MONITOR);
job_lock();
+ nlock++;
do
{
-#if SHOPT_FASTPIPE
- type = pipe_exec(shp,pvn,t->lst.lstlef, errorflg);
-#else
/* create the pipe */
+#if SHOPT_COSHELL
+ tt = t->lst.lstrit;
+ if(shp->coshell && !showme)
+ {
+ if(t->lst.lstlef->tre.tretyp&FALTPIPE)
+ {
+ sh_copipe(shp,pvn,0);
+ type = sh_coexec(shp,t,1+copipe);
+ pvn[1] = -1;
+ pipejob=1;
+ if(type>0)
+ {
+ job_post(shp,type,0);
+ type = 0;
+ }
+ copipe = 1;
+ pvo[0] = pvn[0];
+ while(tt->tre.tretyp==TFIL && tt->lst.lstlef->tre.tretyp&FALTPIPE)
+ tt = tt->lst.lstrit;
+ t = tt;
+ continue;
+ }
+ else if(tt->tre.tretyp==TFIL && tt->lst.lstlef->tre.tretyp&FALTPIPE)
+ {
+ sh_copipe(shp,pvn,0);
+ pvo[2] = pvn[2];
+ copipe = 0;
+ goto coskip2;
+ }
+ }
+#endif /* SHOPT_COSHELL */
sh_pipe(pvn);
+#if SHOPT_COSHELL
+ pvn[2] = 0;
+ coskip2:
+#endif /* SHOPT_COSHELL */
/* execute out part of pipe no wait */
(t->lst.lstlef)->tre.tretyp |= showme;
type = sh_exec(t->lst.lstlef, errorflg);
-#endif /* SHOPT_FASTPIPE */
+ /* close out-part of pipe */
+ sh_close(pvn[1]);
pipejob=1;
/* save the pipe stream-ids */
pvo[0] = pvn[0];
- /* close out-part of pipe */
- sh_close(pvn[1]);
/* pipeline all in one process group */
t = t->lst.lstrit;
}
@@ -1532,6 +2148,8 @@ int sh_exec(register const Shnode_t *t, int flags)
shp->inpipe = pvn;
shp->outpipe = 0;
pipejob = 2;
+ waitall = job.waitall;
+ job.waitall = 0;
if(type == 0)
{
/*
@@ -1546,12 +2164,40 @@ int sh_exec(register const Shnode_t *t, int flags)
sh_pclose(pvn);
if(pipejob==2)
job_unlock();
- pipejob = savepipe;
+ if((pipejob = savepipe) && nlock<savelock)
+ pipejob = 1;
+ n = shp->exitval;
+ if(job.waitall = waitall)
+ {
+ if(sh_isstate(SH_MONITOR))
+ job_wait(0);
+ else
+ {
+ shp->intrap++;
+ job_wait(0);
+ shp->intrap--;
+ }
+ }
+ if(n==0 && exitval)
+ {
+ while(exitval <= --job.exitval)
+ {
+ if(*job.exitval)
+ {
+ n = *job.exitval;
+ break;
+ }
+ }
+ }
+ shp->exitval = n;
#ifdef SIGTSTP
if(!pipejob && sh_isstate(SH_MONITOR))
- tcsetpgrp(JOBTTY,shp->pid);
+ tcsetpgrp(JOBTTY,shp->gd->pid);
#endif /*SIGTSTP */
job.curpgid = savepgid;
+ job.exitval = saveexitval;
+ job.waitall = savewaitall;
+ job.curjobid = savejobid;
break;
}
@@ -1569,6 +2215,15 @@ int sh_exec(register const Shnode_t *t, int flags)
}
case TAND:
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ andor:
+ sh_exec(t->lst.lstlef,0);
+ sh_exec(t->lst.lstrit,0);
+ break;
+ }
+#endif /* SHOPT_COSHELL */
if(type&TTEST)
skipexitset++;
if(sh_exec(t->lst.lstlef,OPTIMIZE)==0)
@@ -1576,6 +2231,10 @@ int sh_exec(register const Shnode_t *t, int flags)
break;
case TORF:
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ goto andor;
+#endif /* SHOPT_COSHELL */
if(type&TTEST)
skipexitset++;
if(sh_exec(t->lst.lstlef,OPTIMIZE)!=0)
@@ -1593,14 +2252,17 @@ int sh_exec(register const Shnode_t *t, int flags)
char *cp, *trap, *nullptr = 0;
int nameref, refresh=1;
char *av[5];
+#if SHOPT_COSHELL
+ int poolfiles;
+#endif /* SHOPT_COSHELL */
#if SHOPT_OPTIMIZE
int jmpval = ((struct checkpt*)shp->jmplist)->mode;
- struct checkpt buff;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
void *optlist = shp->optlist;
shp->optlist = 0;
sh_tclear(t->for_.fortre);
- sh_pushcontext(&buff,jmpval);
- jmpval = sigsetjmp(buff.buff,0);
+ sh_pushcontext(shp,buffp,jmpval);
+ jmpval = sigsetjmp(buffp->buff,0);
if(jmpval)
goto endfor;
#endif /* SHOPT_OPTIMIZE */
@@ -1635,7 +2297,7 @@ int sh_exec(register const Shnode_t *t, int flags)
save_prompt = shp->nextprompt;
shp->nextprompt = 3;
shp->timeout = 0;
- shp->exitval=sh_readline(shp,&nullptr,0,1,1000*shp->st.tmout);
+ shp->exitval=sh_readline(shp,&nullptr,0,1,(size_t)0,1000*shp->st.tmout);
shp->nextprompt = save_prompt;
if(shp->exitval||sfeof(sfstdin)||sferror(sfstdin))
{
@@ -1680,6 +2342,15 @@ int sh_exec(register const Shnode_t *t, int flags)
av[4] = 0;
sh_debug(shp,trap,(char*)0,(char*)0,av,0);
}
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ poolfiles = shp->poolfiles;
+ sh_exec(t->for_.fortre,0);
+ if(poolfiles==shp->poolfiles)
+ break;
+ }
+#endif /* SHOPT_COSHELL */
sh_exec(t->for_.fortre,flag);
flag &= ~OPTIMIZE_FLAG;
if(t->tre.tretyp&COMSCAN)
@@ -1695,7 +2366,7 @@ int sh_exec(register const Shnode_t *t, int flags)
}
#if SHOPT_OPTIMIZE
endfor:
- sh_popcontext(&buff);
+ sh_popcontext(shp,buffp);
sh_tclear(t->for_.fortre);
sh_optclear(shp,optlist);
if(jmpval)
@@ -1716,32 +2387,51 @@ int sh_exec(register const Shnode_t *t, int flags)
Shnode_t *tt = t->wh.whtre;
#if SHOPT_FILESCAN
Sfio_t *iop=0;
- int savein,fd;
+ int savein;
#endif /*SHOPT_FILESCAN*/
#if SHOPT_OPTIMIZE
int jmpval = ((struct checkpt*)shp->jmplist)->mode;
- struct checkpt buff;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
void *optlist = shp->optlist;
+#endif /* SHOPT_OPTIMIZE */
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ int poolfiles;
+# if SHOPT_FILESCAN
+ if(type==TWH && tt->tre.tretyp==TCOM && !tt->com.comarg && tt->com.comio)
+ {
+ sh_redirect(shp,tt->com.comio,0);
+ break;
+ }
+# endif /* SHOPT_FILESCAN */
+ sh_exec(tt,0);
+ do
+ {
+ if((sh_exec(tt,0)==0)!=(type==TWH))
+ break;
+ poolfiles = shp->poolfiles;
+ sh_exec(t->wh.dotre,0);
+ if(t->wh.whinc)
+ sh_exec((Shnode_t*)t->wh.whinc,0);
+ }
+ while(poolfiles != shp->poolfiles);
+ break;
+ }
+#endif /*SHOPT_COSHELL */
+#if SHOPT_OPTIMIZE
shp->optlist = 0;
sh_tclear(t->wh.whtre);
sh_tclear(t->wh.dotre);
- sh_pushcontext(&buff,jmpval);
- jmpval = sigsetjmp(buff.buff,0);
+ sh_pushcontext(shp,buffp,jmpval);
+ jmpval = sigsetjmp(buffp->buff,0);
if(jmpval)
goto endwhile;
#endif /* SHOPT_OPTIMIZE */
#if SHOPT_FILESCAN
if(type==TWH && tt->tre.tretyp==TCOM && !tt->com.comarg && tt->com.comio)
{
- fd = sh_redirect(shp,tt->com.comio,3);
- savein = dup(0);
- if(fd==0)
- fd = savein;
- iop = sfnew(NULL,NULL,SF_UNBOUND,fd,SF_READ);
- close(0);
- open("/dev/null",O_RDONLY);
- shp->offsets[0] = -1;
- shp->offsets[1] = 0;
+ iop = openstream(shp,tt->com.comio,&savein);
if(tt->com.comset)
nv_setlist(tt->com.comset,NV_IDENT|NV_ASSIGN,0);
}
@@ -1774,7 +2464,7 @@ int sh_exec(register const Shnode_t *t, int flags)
}
#if SHOPT_OPTIMIZE
endwhile:
- sh_popcontext(&buff);
+ sh_popcontext(shp,buffp);
sh_tclear(t->wh.whtre);
sh_tclear(t->wh.dotre);
sh_optclear(shp,optlist);
@@ -1812,17 +2502,26 @@ int sh_exec(register const Shnode_t *t, int flags)
sh_debug(shp,trap,(char*)0, (char*)0, arg, ARG_ARITH);
if(sh_isoption(SH_XTRACE))
{
- sh_trace(NIL(char**),0);
+ sh_trace(shp,NIL(char**),0);
sfprintf(sfstderr,"((%s))\n",arg[1]);
}
if(t->ar.arcomp)
shp->exitval = !arith_exec((Arith_t*)t->ar.arcomp);
else
- shp->exitval = !sh_arith(arg[1]);
+ shp->exitval = !sh_arith(shp,arg[1]);
break;
}
case TIF:
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ sh_exec(t->if_.thtre,0);
+ if(t->if_.eltre)
+ sh_exec(t->if_.eltre, 0);
+ break;
+ }
+#endif /*SHOPT_COSHELL */
if(sh_exec(t->if_.iftre,OPTIMIZE)==0)
sh_exec(t->if_.thtre,flags);
else if(t->if_.eltre)
@@ -1849,6 +2548,13 @@ int sh_exec(register const Shnode_t *t, int flags)
while(t)
{
register struct argnod *rex=(struct argnod*)t->reg.regptr;
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ sh_exec(t->reg.regcom,0);
+ continue;
+ }
+#endif /*SHOPT_COSHELL */
while(rex)
{
register char *s;
@@ -1865,7 +2571,7 @@ int sh_exec(register const Shnode_t *t, int flags)
(!type && (strmatch(r,s)
|| trim_eq(r,s))))
{
- do sh_exec(t->reg.regcom,(t->reg.regflag?0:flags));
+ do sh_exec(t->reg.regcom,(t->reg.regflag?(flags&sh_state(SH_ERREXIT)):flags));
while(t->reg.regflag &&
(t=(Shnode_t*)t->reg.regnxt));
t=0;
@@ -1891,6 +2597,14 @@ int sh_exec(register const Shnode_t *t, int flags)
#else
clock_t bt;
#endif /* timeofday */
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ if(t->par.partre)
+ sh_exec(t->par.partre,0);
+ break;
+ }
+#endif /*SHOPT_COSHELL */
if(type!=TTIME)
{
sh_exec(t->par.partre,OPTIMIZE);
@@ -1900,6 +2614,8 @@ int sh_exec(register const Shnode_t *t, int flags)
if(t->par.partre)
{
long timer_on;
+ if(shp->subshell && shp->comsub==1)
+ sh_subfork();
timer_on = sh_isstate(SH_TIMING);
#ifdef timeofday
timeofday(&tb);
@@ -1925,8 +2641,8 @@ int sh_exec(register const Shnode_t *t, int flags)
#ifdef timeofday
times(&after);
timeofday(&ta);
- at = shp->lim.clk_tck*(ta.tv_sec-tb.tv_sec);
- at += ((shp->lim.clk_tck*(((1000000L/2)/shp->lim.clk_tck)+(ta.tv_usec-tb.tv_usec)))/1000000L);
+ at = shp->gd->lim.clk_tck*(ta.tv_sec-tb.tv_sec);
+ at += ((shp->gd->lim.clk_tck*(((1000000L/2)/shp->gd->lim.clk_tck)+(ta.tv_usec-tb.tv_usec)))/1000000L);
#else
at = times(&after) - bt;
#endif /* timeofday */
@@ -1954,48 +2670,43 @@ int sh_exec(register const Shnode_t *t, int flags)
}
case TFUN:
{
- register Namval_t *np;
+ register Namval_t *np=0;
register struct slnod *slp;
register char *fname = ((struct functnod*)t)->functnam;
register char *cp = strrchr(fname,'.');
- register Namval_t *npv=0;
+ register Namval_t *npv=0,*mp;
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ {
+ sh_exec(t->funct.functtre,0);
+ break;
+ }
+#endif /* SHOPT_COSHELL */
#if SHOPT_NAMESPACE
if(t->tre.tretyp==TNSPACE)
{
- Dt_t *root,*oldroot, *top=0;
+ Dt_t *root;
Namval_t *oldnspace = shp->namespace;
int offset = stktell(stkp);
- long optindex = shp->st.optindex;
+ int flags=NV_NOASSIGN|NV_NOARRAY|NV_VARNAME;
if(cp)
errormsg(SH_DICT,ERROR_exit(1),e_ident,fname);
sfputc(stkp,'.');
sfputr(stkp,fname,0);
- np = nv_open(stkptr(stkp,offset),shp->var_base,NV_NOASSIGN|NV_NOARRAY|NV_VARNAME);
+ np = nv_open(stkptr(stkp,offset),shp->var_tree,flags);
offset = stktell(stkp);
- shp->namespace = np;
- if(!(root=nv_dict(np)))
+ if(nv_istable(np))
+ root = nv_dict(np);
+ else
{
root = dtopen(&_Nvdisc,Dtoset);
- nv_putval(np,(char*)root,NV_TABLE|NV_NOFREE);
- shp->st.optindex = 1;
+ nv_mount(np, (char*)0, root);
+ np->nvalue.cp = Empty;
+ dtview(root,shp->var_base);
}
- if(oldnspace && dtvnext(dtvnext(shp->var_tree)))
- top = dtview(shp->var_tree,0);
- else if(dtvnext(shp->var_tree))
- top = dtview(shp->var_tree,0);
- oldroot = shp->var_tree;
- dtview(root,shp->var_base);
- shp->var_tree = root;
- if(top)
- dtview(shp->var_tree,top);
- sh_exec(t->for_.fortre,flags);
- if(dtvnext(shp->var_tree))
- top = dtview(shp->var_tree,0);
- shp->var_tree = oldroot;
- if(top)
- dtview(top,shp->var_tree);
- shp->namespace = oldnspace;
- shp->st.optindex = optindex;
+ oldnspace = enter_namespace(shp,np);
+ sh_exec(t->for_.fortre,flags|sh_state(SH_ERREXIT));
+ enter_namespace(shp,oldnspace);
break;
}
#endif /* SHOPT_NAMESPACE */
@@ -2023,39 +2734,24 @@ int sh_exec(register const Shnode_t *t, int flags)
sfprintf(stkp,"%s.%s%c",nv_name(npv),cp,0);
fname = stkptr(stkp,offset);
}
- else if((np=nv_search(fname,shp->bltin_tree,0)) && nv_isattr(np,BLT_SPC))
+ else if((mp=nv_search(fname,shp->bltin_tree,0)) && nv_isattr(mp,BLT_SPC))
errormsg(SH_DICT,ERROR_exit(1),e_badfun,fname);
#if SHOPT_NAMESPACE
- else if(shp->namespace)
- {
- int offset = stktell(stkp);
- sfputr(stkp,nv_name(shp->namespace),-1);
- sfputc(stkp,'.');
- sfputr(stkp,fname,0);
- fname = stkptr(stkp,offset);
- }
+ if(shp->namespace && !shp->prefix && *fname!='.')
+ np = sh_fsearch(shp,fname,NV_ADD|HASH_NOSCOPE);
+ if(!np)
#endif /* SHOPT_NAMESPACE */
np = nv_open(fname,sh_subfuntree(1),NV_NOASSIGN|NV_NOARRAY|NV_VARNAME|NV_NOSCOPE);
if(npv)
{
- Namval_t *tp = npv;
if(!shp->mktype)
- {
- if(shp->typeinit)
- {
- if(tp=nv_open(shp->typeinit->nvname,shp->typedict,NV_IDENT|NV_NOFAIL))
- nv_close(npv);
- else
- tp = npv;
- }
- cp = nv_setdisc(tp,cp,np,(Namfun_t*)tp);
- }
- nv_close(tp);
+ cp = nv_setdisc(npv,cp,np,(Namfun_t*)npv);
if(!cp)
errormsg(SH_DICT,ERROR_exit(1),e_baddisc,fname);
}
if(np->nvalue.rp)
{
+ struct Ufunction *rp = np->nvalue.rp;
slp = (struct slnod*)np->nvenv;
sh_funstaks(slp->slchild,-1);
stakdelete(slp->slptr);
@@ -2064,7 +2760,19 @@ int sh_exec(register const Shnode_t *t, int flags)
free((void*)np->nvalue.rp);
np->nvalue.rp = 0;
}
-
+ if(rp->sdict)
+ {
+ Namval_t *mp, *nq;
+ shp->last_root = rp->sdict;
+ for(mp=(Namval_t*)dtfirst(rp->sdict);mp;mp=nq)
+ {
+ _nv_unset(mp,NV_RDONLY);
+ nq = dtnext(rp->sdict,mp);
+ nv_delete(mp,rp->sdict,0);
+ }
+ dtclose(rp->sdict);
+ rp->sdict = 0;
+ }
}
if(!np->nvalue.rp)
{
@@ -2078,6 +2786,7 @@ int sh_exec(register const Shnode_t *t, int flags)
offsetof(struct Ufunction,fname), -1, sizeof(struct Ufunction)
};
struct functnod *fp;
+ struct comnod *ac = t->funct.functargs;
slp = t->funct.functstak;
sh_funstaks(slp->slchild,1);
staklink(slp->slptr);
@@ -2087,6 +2796,8 @@ int sh_exec(register const Shnode_t *t, int flags)
np->nvalue.rp->lineno = t->funct.functline;
np->nvalue.rp->nspace = shp->namespace;
np->nvalue.rp->fname = 0;
+ np->nvalue.rp->argv = ac?((struct dolnod*)ac->comarg)->dolval+1:0;
+ np->nvalue.rp->argc = ac?((struct dolnod*)ac->comarg)->dolnum:0;
np->nvalue.rp->fdict = shp->fun_tree;
fp = (struct functnod*)(slp+1);
if(fp->functtyp==(TFUN|FAMP))
@@ -2098,13 +2809,13 @@ int sh_exec(register const Shnode_t *t, int flags)
struct Ufunction *rp = np->nvalue.rp;
rp->np = np;
if(!shp->fpathdict)
- shp->fpathdict = dtopen(&_Rpdisc,Dtbag);
+ shp->fpathdict = dtopen(&_Rpdisc,Dtobag);
if(shp->fpathdict)
dtinsert(shp->fpathdict,rp);
}
}
else
- nv_unset(np);
+ _nv_unset(np,0);
if(type&FPOSIX)
nv_onattr(np,NV_FUNCTION|NV_FPOSIX);
else
@@ -2122,6 +2833,10 @@ int sh_exec(register const Shnode_t *t, int flags)
register int n;
register char *left;
int negate = (type&TNEGATE)!=0;
+#if SHOPT_COSHELL
+ if(shp->inpool)
+ break;
+#endif /* SHOPT_COSHELL */
if(type&TTEST)
skipexitset++;
error_info.line = t->tst.tstline-shp->st.firstline;
@@ -2145,7 +2860,7 @@ int sh_exec(register const Shnode_t *t, int flags)
argv[0] = (type&TNEGATE)?((char*)e_tstbegin):"[[";
if(sh_isoption(SH_XTRACE))
{
- traceon = sh_trace(NIL(char**),0);
+ traceon = sh_trace(shp,NIL(char**),0);
sfwrite(sfstderr,e_tstbegin,(type&TNEGATE?5:3));
}
if(type&TUNARY)
@@ -2164,7 +2879,7 @@ int sh_exec(register const Shnode_t *t, int flags)
argv[4] = 0;
sh_debug(shp,trap,(char*)0,(char*)0,argv, 0);
}
- n = test_unop(n,left);
+ n = test_unop(shp,n,left);
}
else if(type&TBINARY)
{
@@ -2184,7 +2899,7 @@ int sh_exec(register const Shnode_t *t, int flags)
argv[5] = 0;
sh_debug(shp,trap,(char*)0,(char*)0,argv, pattern);
}
- n = test_binop(n,left,right);
+ n = test_binop(shp,n,left,right);
if(traceon)
{
sfprintf(sfstderr,"%s %s ",sh_fmtq(left),op);
@@ -2203,9 +2918,14 @@ int sh_exec(register const Shnode_t *t, int flags)
break;
}
}
+ if(shp->trapnote&SH_SIGALRM)
+ {
+ shp->trapnote &= ~SH_SIGALRM;
+ sh_timetraps(shp);
+ }
if(shp->trapnote || (shp->exitval && sh_isstate(SH_ERREXIT)) &&
t && echeck)
- sh_chktrap();
+ sh_chktrap(shp);
/* set $_ */
if(mainloop && com0)
{
@@ -2228,7 +2948,11 @@ int sh_exec(register const Shnode_t *t, int flags)
}
if(!skipexitset)
exitset();
+#if SHOPT_COSHELL
+ if(!shp->inpool && !(OPTIMIZE))
+#else
if(!(OPTIMIZE))
+#endif /* SHOPT_COSHELL */
{
if(sav != stkptr(stkp,0))
stkset(stkp,sav,0);
@@ -2249,13 +2973,14 @@ int sh_exec(register const Shnode_t *t, int flags)
int sh_run(int argn, char *argv[])
{
+ Shell_t *shp = sh_getinterp();
register struct dolnod *dp;
register struct comnod *t = (struct comnod*)stakalloc(sizeof(struct comnod));
int savtop = staktell();
char *savptr = stakfreeze(0);
Opt_t *op, *np = optctx(0, 0);
Shbltin_t bltindata;
- bltindata = sh.bltindata;
+ bltindata = shp->bltindata;
op = optctx(np, 0);
memset(t, 0, sizeof(struct comnod));
dp = (struct dolnod*)stakalloc((unsigned)sizeof(struct dolnod) + ARG_SPARE*sizeof(char*) + argn*sizeof(char*));
@@ -2264,10 +2989,10 @@ int sh_run(int argn, char *argv[])
memcpy(dp->dolval+ARG_SPARE, argv, (argn+1)*sizeof(char*));
t->comarg = (struct argnod*)dp;
if(!strchr(argv[0],'/'))
- t->comnamp = (void*)nv_bfsearch(argv[0],sh.fun_tree,(Namval_t**)&t->comnamq,(char**)0);
+ t->comnamp = (void*)nv_bfsearch(argv[0],shp->fun_tree,(Namval_t**)&t->comnamq,(char**)0);
argn=sh_exec((Shnode_t*)t,sh_isstate(SH_ERREXIT));
optctx(op,np);
- sh.bltindata = bltindata;
+ shp->bltindata = bltindata;
if(savptr!=stakptr(0))
stakset(savptr,savtop);
else
@@ -2297,9 +3022,8 @@ static int trim_eq(register const char *r,register const char *s)
* print out the command line if set -x is on
*/
-int sh_trace(register char *argv[], register int nl)
+int sh_trace(Shell_t *shp,register char *argv[], register int nl)
{
- Shell_t *shp = &sh;
register char *cp;
register int bracket = 0;
int decl = (nl&2);
@@ -2371,16 +3095,15 @@ static void timed_out(void *handle)
/*
* called by parent and child after fork by sh_fork()
*/
-pid_t _sh_fork(register pid_t parent,int flags,int *jobid)
+pid_t _sh_fork(Shell_t *shp,register pid_t parent,int flags,int *jobid)
{
static long forkcnt = 1000L;
- Shell_t *shp = &sh;
pid_t curpgid = job.curpgid;
pid_t postid = (flags&FAMP)?0:curpgid;
int sig,nochild;
if(parent<0)
{
- sh_sigcheck();
+ sh_sigcheck(shp);
if((forkcnt *= 2) > 1000L*SH_FORKLIM)
{
forkcnt=1000L;
@@ -2403,7 +3126,7 @@ pid_t _sh_fork(register pid_t parent,int flags,int *jobid)
if(parent)
{
int myjob,waitall=job.waitall;
- shp->nforks++;
+ shp->gd->nforks++;
if(job.toclear)
job_clear();
job.waitall = waitall;
@@ -2428,28 +3151,47 @@ pid_t _sh_fork(register pid_t parent,int flags,int *jobid)
job.curpgid = parent;
if(flags&FCOOP)
shp->cpid = parent;
+ if(!postid && job.curjobid && (flags&FPOU))
+ postid = job.curpgid;
#ifdef SHOPT_BGX
if(!postid && (flags&(FAMP|FINT)) == (FAMP|FINT))
postid = 1;
- myjob = job_post(parent,postid);
+ myjob = job_post(shp,parent,postid);
if(postid==1)
postid = 0;
#else
- myjob = job_post(parent,postid);
+ myjob = job_post(shp,parent,postid);
#endif /* SHOPT_BGX */
+ if(job.waitall && (flags&FPOU))
+ {
+ if(!job.curjobid)
+ job.curjobid = myjob;
+ if(job.exitval)
+ job.exitval++;
+ }
if(flags&FAMP)
job.curpgid = curpgid;
if(jobid)
*jobid = myjob;
+ if(shp->comsub==1 && usepipe)
+ {
+ if(!tsetio || !subdup)
+ {
+ if(shp->topfd > restorefd)
+ sh_iorestore(shp,restorefd,0);
+ iounpipe(shp);
+ }
+ }
return(parent);
}
#if !_std_malloc
vmtrace(-1);
#endif
+ shp->outpipepid = ((flags&FPOU)?getpid():0);
/* This is the child process */
if(shp->trapnote&SH_SIGTERM)
sh_exit(SH_EXITSIG|SIGTERM);
- shp->nforks=0;
+ shp->gd->nforks=0;
timerdel(NIL(void*));
#ifdef JOBS
if(!job.jobcontrol && !(flags&FAMP))
@@ -2491,61 +3233,102 @@ pid_t _sh_fork(register pid_t parent,int flags,int *jobid)
if(!(flags&FSHOWME))
sh_sigreset(2);
shp->subshell = 0;
+ shp->comsub = 0;
+ shp->spid = 0;
if((flags&FAMP) && shp->coutpipe>1)
sh_close(shp->coutpipe);
sig = shp->savesig;
shp->savesig = 0;
if(sig>0)
- sh_fault(sig);
- sh_sigcheck();
+ kill(getpid(),sig);
+ sh_sigcheck(shp);
+ usepipe=0;
return(0);
}
-pid_t sh_fork(int flags, int *jobid)
+pid_t sh_fork(Shell_t *shp,int flags, int *jobid)
{
register pid_t parent;
register int sig;
-#if SHOPT_FASTPIPE
- if(sffileno(sfstdin)<0)
- {
- off_t current = sfseek(sfstdin,(off_t)0,SEEK_CUR);
- sfseek(sfstdin,(off_t)0,SEEK_END);
- sfdisc(sfstdin,SF_POPDISC);
- fcntl(sffileno(sfstdin),F_SETFD,0);
- sh_iostream(0);
- sfseek(sfstdin,current,SEEK_SET);
- }
-#endif /* SHOPT_FASTPIPE */
- if(!sh.pathlist)
- path_get("");
+ if(!shp->pathlist)
+ path_get(shp,"");
sfsync(NIL(Sfio_t*));
- sh.trapnote &= ~SH_SIGTERM;
+ shp->trapnote &= ~SH_SIGTERM;
job_fork(-1);
- sh.savesig = -1;
- while(_sh_fork(parent=fork(),flags,jobid) < 0);
+ shp->savesig = -1;
+ while(_sh_fork(shp,parent=fork(),flags,jobid) < 0);
sh_stats(STAT_FORKS);
- sig = sh.savesig;
- sh.savesig = 0;
- if(sig>0)
- sh_fault(sig);
+ if(!shp->subshell)
+ {
+ sig = shp->savesig;
+ shp->savesig = 0;
+ if(sig>0)
+ kill(getpid(),sig);
+ }
job_fork(parent);
return(parent);
}
+struct Tdata
+{
+ Shell_t *sh;
+ Namval_t *tp;
+ void *extra[2];
+};
+
/*
* add exports from previous scope to the new scope
*/
static void local_exports(register Namval_t *np, void *data)
{
+ Shell_t *shp = ((struct Tdata*)data)->sh;
register Namval_t *mp;
register char *cp;
if(nv_isarray(np))
nv_putsub(np,NIL(char*),0);
- if((cp = nv_getval(np)) && (mp = nv_search(nv_name(np), sh.var_tree, NV_ADD|HASH_NOSCOPE)) && nv_isnull(mp))
+ if((cp = nv_getval(np)) && (mp = nv_search(nv_name(np), shp->var_tree, NV_ADD|HASH_NOSCOPE)) && nv_isnull(mp))
nv_putval(mp, cp, 0);
}
/*
+ * This routine executes .sh.math functions from within ((...)))
+*/
+Sfdouble_t sh_mathfun(Shell_t *shp,void *fp, int nargs, Sfdouble_t *arg)
+{
+ Sfdouble_t d;
+ Namval_t node,*mp,*np, *nref[9], **nr=nref;
+ char *argv[2];
+ struct funenv funenv;
+ int i;
+ np = (Namval_t*)fp;
+ funenv.node = np;
+ funenv.nref = nref;
+ funenv.env = 0;
+ memcpy(&node,SH_VALNOD,sizeof(node));
+ SH_VALNOD->nvfun = 0;
+ SH_VALNOD->nvenv = 0;
+ SH_VALNOD->nvflag = NV_LDOUBLE|NV_NOFREE;
+ SH_VALNOD->nvalue.ldp = 0;
+ for(i=0; i < nargs; i++)
+ {
+ *nr++ = mp = nv_namptr(shp->mathnodes,i);
+ mp->nvalue.ldp = arg++;
+ }
+ *nr = 0;
+ SH_VALNOD->nvalue.ldp = &d;
+ argv[0] = np->nvname;
+ argv[1] = 0;
+ sh_funscope(1,argv,0,&funenv,0);
+ while(mp= *nr++)
+ mp->nvalue.ldp = 0;
+ SH_VALNOD->nvfun = node.nvfun;
+ SH_VALNOD->nvflag = node.nvflag;
+ SH_VALNOD->nvenv = node.nvenv;
+ SH_VALNOD->nvalue.ldp = node.nvalue.ldp;
+ return(d);
+}
+
+/*
* This routine is used to execute the given function <fun> in a new scope
* If <fun> is NULL, then arg points to a structure containing a pointer
* to a function that will be executed in the current environment.
@@ -2554,18 +3337,20 @@ int sh_funscope(int argn, char *argv[],int(*fun)(void*),void *arg,int execflg)
{
register char *trap;
register int nsig;
- register Shell_t *shp = &sh;
+ register Shell_t *shp = sh_getinterp();
struct dolnod *argsav=0,*saveargfor;
struct sh_scoped savst, *prevscope = shp->st.self;
struct argnod *envlist=0;
int jmpval;
volatile int r = 0;
+ int n;
char *savstak;
- struct funenv *fp;
- struct checkpt buff;
+ struct funenv *fp = 0;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
Namval_t *nspace = shp->namespace;
Dt_t *last_root = shp->last_root;
- Shopt_t options = shp->options;
+ Shopt_t options;
+ options = shp->options;
if(shp->fn_depth==0)
shp->glob_options = shp->options;
else
@@ -2588,30 +3373,23 @@ int sh_funscope(int argn, char *argv[],int(*fun)(void*),void *arg,int execflg)
envlist = fp->env;
}
prevscope->save_tree = shp->var_tree;
+ n = dtvnext(prevscope->save_tree)!= (shp->namespace?shp->var_base:0);
sh_scope(shp,envlist,1);
- if(dtvnext(prevscope->save_tree)!= (shp->namespace?shp->var_base:0))
+ if(n)
{
+ struct Tdata tdata;
+ memset(&tdata,0,sizeof(tdata));
+ tdata.sh = shp;
/* eliminate parent scope */
- nv_scan(prevscope->save_tree, local_exports,(void*)0, NV_EXPORT, NV_EXPORT|NV_NOSCOPE);
+ nv_scan(prevscope->save_tree, local_exports,&tdata, NV_EXPORT, NV_EXPORT|NV_NOSCOPE);
}
shp->st.save_tree = shp->var_tree;
if(!fun)
{
- Namval_t *np;
if(nv_isattr(fp->node,NV_TAGGED))
sh_onoption(SH_XTRACE);
else
sh_offoption(SH_XTRACE);
-#if SHOPT_NAMESPACE
- if((np=(fp->node)->nvalue.rp->nspace) && np!=shp->namespace)
- {
- Dt_t *dt = shp->var_tree;
- dtview(dt,0);
- dtview(dt,nv_dict(np));
- shp->var_tree = nv_dict(np);
- shp->namespace = np;
- }
-#endif /* SHOPT_NAMESPACE */
}
shp->st.cmdname = argv[0];
/* save trap table */
@@ -2622,18 +3400,21 @@ int sh_funscope(int argn, char *argv[],int(*fun)(void*),void *arg,int execflg)
}
sh_sigreset(0);
argsav = sh_argnew(shp,argv,&saveargfor);
- sh_pushcontext(&buff,SH_JMPFUN);
- errorpush(&buff.err,0);
+ sh_pushcontext(shp,buffp,SH_JMPFUN);
+ errorpush(&buffp->err,0);
error_info.id = argv[0];
shp->st.var_local = shp->var_tree;
- jmpval = sigsetjmp(buff.buff,0);
if(!fun)
{
shp->st.filename = fp->node->nvalue.rp->fname;
shp->st.funname = nv_name(fp->node);
+ shp->last_root = nv_dict(DOTSHNOD);
nv_putval(SH_PATHNAMENOD,shp->st.filename,NV_NOFREE);
nv_putval(SH_FUNNAMENOD,shp->st.funname,NV_NOFREE);
}
+ if((execflg & sh_state(SH_NOFORK)))
+ shp->end_fn = 1;
+ jmpval = sigsetjmp(buffp->buff,0);
if(jmpval == 0)
{
if(shp->fn_depth++ > MAXDEPTH)
@@ -2645,29 +3426,42 @@ int sh_funscope(int argn, char *argv[],int(*fun)(void*),void *arg,int execflg)
r= (*fun)(arg);
else
{
+ char **arg = shp->st.real_fun->argv;
+ Namval_t *np, *nq, **nref;
+ if(nref=fp->nref)
+ {
+ shp->last_root = 0;
+ for(r=0; arg[r]; r++)
+ {
+ np = nv_search(arg[r],shp->var_tree,HASH_NOSCOPE|NV_ADD);
+ if(np && (nq=*nref++))
+ {
+ np->nvalue.nrp = newof(0,struct Namref,1,0);
+ np->nvalue.nrp->np = nq;
+ nv_onattr(np,NV_REF|NV_NOFREE);
+ }
+ }
+ }
sh_exec((Shnode_t*)(nv_funtree((fp->node))),execflg|SH_ERREXIT);
r = shp->exitval;
}
}
+ if(shp->topscope != (Shscope_t*)shp->st.self)
+ sh_setscope(shp->topscope);
if(--shp->fn_depth==1 && jmpval==SH_JMPERRFN)
errormsg(SH_DICT,ERROR_exit(1),e_toodeep,argv[0]);
- sh_popcontext(&buff);
- if (shp->st.self != &savst)
- shp->var_tree = (Dt_t*)savst.save_tree;
+ sh_popcontext(shp,buffp);
sh_unscope(shp);
shp->namespace = nspace;
shp->var_tree = (Dt_t*)prevscope->save_tree;
- if(shp->topscope != (Shscope_t*)shp->st.self)
- sh_setscope(shp->topscope);
sh_argreset(shp,argsav,saveargfor);
trap = shp->st.trapcom[0];
shp->st.trapcom[0] = 0;
sh_sigreset(1);
- if (shp->st.self != &savst)
- *shp->st.self = shp->st;
shp->st = *prevscope;
shp->topscope = (Shscope_t*)prevscope;
nv_getval(sh_scoped(shp,IFSNOD));
+ shp->end_fn = 0;
if(nsig)
memcpy((char*)&shp->st.trapcom[0],savstak,nsig);
shp->trapnote=0;
@@ -2682,11 +3476,13 @@ int sh_funscope(int argn, char *argv[],int(*fun)(void*),void *arg,int execflg)
sh_trap(trap,0);
free(trap);
}
- if(shp->exitval > SH_EXITSIG)
- sh_fault(shp->exitval&SH_EXITMASK);
+ if(jmpval)
+ r=shp->exitval;
+ if(r>SH_EXITSIG && ((r&SH_EXITMASK)==SIGINT || ((r&SH_EXITMASK)==SIGQUIT)))
+ kill(getpid(),r&SH_EXITMASK);
if(jmpval > SH_JMPFUN)
{
- sh_chktrap();
+ sh_chktrap(shp);
siglongjmp(*shp->jmplist,jmpval);
}
return(r);
@@ -2697,16 +3493,18 @@ static void sh_funct(Shell_t *shp,Namval_t *np,int argn, char *argv[],struct arg
struct funenv fun;
char *fname = nv_getval(SH_FUNNAMENOD);
struct Level *lp =(struct Level*)(SH_LEVELNOD->nvfun);
- int level, pipepid=shp->pipepid;
+ int level, pipepid=shp->pipepid, comsub=shp->comsub;
+ shp->comsub = 0;
shp->pipepid = 0;
sh_stats(STAT_FUNCT);
if(!lp->hdr.disc)
- lp = init_level(0);
+ lp = init_level(shp,0);
if((struct sh_scoped*)shp->topscope != shp->st.self)
sh_setscope(shp->topscope);
level = lp->maxlevel = shp->dot_depth + shp->fn_depth+1;
SH_LEVELNOD->nvalue.s = lp->maxlevel;
shp->st.lineno = error_info.line;
+ np->nvalue.rp->running += 2;
if(nv_isattr(np,NV_FPOSIX))
{
char *save;
@@ -2715,6 +3513,7 @@ static void sh_funct(Shell_t *shp,Namval_t *np,int argn, char *argv[],struct arg
save = argv[-1];
argv[-1] = 0;
shp->st.funname = nv_name(np);
+ shp->last_root = nv_dict(DOTSHNOD);
nv_putval(SH_FUNNAMENOD, nv_name(np),NV_NOFREE);
opt_info.index = opt_info.offset = 0;
error_info.errors = 0;
@@ -2727,6 +3526,7 @@ static void sh_funct(Shell_t *shp,Namval_t *np,int argn, char *argv[],struct arg
{
fun.env = envlist;
fun.node = np;
+ fun.nref = 0;
sh_funscope(argn,argv,0,&fun,execflg);
}
if(level-- != nv_getnum(SH_LEVELNOD))
@@ -2736,6 +3536,8 @@ static void sh_funct(Shell_t *shp,Namval_t *np,int argn, char *argv[],struct arg
}
lp->maxlevel = level;
SH_LEVELNOD->nvalue.s = lp->maxlevel;
+ shp->last_root = nv_dict(DOTSHNOD);
+ shp->comsub = comsub;
#if 0
nv_putval(SH_FUNNAMENOD,shp->st.funname,NV_NOFREE);
#else
@@ -2743,6 +3545,7 @@ static void sh_funct(Shell_t *shp,Namval_t *np,int argn, char *argv[],struct arg
#endif
nv_putval(SH_PATHNAMENOD,shp->st.filename,NV_NOFREE);
shp->pipepid = pipepid;
+ np->nvalue.rp->running -= 2;
}
/*
@@ -2752,7 +3555,7 @@ static void sh_funct(Shell_t *shp,Namval_t *np,int argn, char *argv[],struct arg
*/
int sh_fun(Namval_t *np, Namval_t *nq, char *argv[])
{
- Shell_t *shp = &sh;
+ Shell_t *shp = sh_getinterp();
register int offset;
register char *base;
Namval_t node;
@@ -2760,7 +3563,7 @@ int sh_fun(Namval_t *np, Namval_t *nq, char *argv[])
long mode;
char *prefix = shp->prefix;
int n=0;
- char *av[2];
+ char *av[3];
Fcin_t save;
fcsave(&save);
if((offset=staktell())>0)
@@ -2768,7 +3571,7 @@ int sh_fun(Namval_t *np, Namval_t *nq, char *argv[])
shp->prefix = 0;
if(!argv)
{
- argv = av;
+ argv = av+1;
argv[1]=0;
}
argv[0] = nv_name(np);
@@ -2779,24 +3582,24 @@ int sh_fun(Namval_t *np, Namval_t *nq, char *argv[])
if(is_abuiltin(np))
{
int jmpval;
- struct checkpt buff;
- Shbltin_t *bp = &sh.bltindata;
- sh_pushcontext(&buff,SH_JMPCMD);
- jmpval = sigsetjmp(buff.buff,1);
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
+ Shbltin_t *bp = &shp->bltindata;
+ sh_pushcontext(shp,buffp,SH_JMPCMD);
+ jmpval = sigsetjmp(buffp->buff,1);
if(jmpval == 0)
{
bp->bnode = np;
bp->ptr = nv_context(np);
- errorpush(&buff.err,0);
+ errorpush(&buffp->err,0);
error_info.id = argv[0];
opt_info.index = opt_info.offset = 0;
opt_info.disc = 0;
- sh.exitval = 0;
- sh.exitval = (*funptr(np))(n,argv,(void*)bp);
+ shp->exitval = 0;
+ shp->exitval = ((Shbltin_f)funptr(np))(n,argv,bp);
}
- sh_popcontext(&buff);
+ sh_popcontext(shp,buffp);
if(jmpval>SH_JMPCMD)
- siglongjmp(*sh.jmplist,jmpval);
+ siglongjmp(*shp->jmplist,jmpval);
}
else
sh_funct(shp,np,n,argv,(struct argnod*)0,sh_isstate(SH_ERREXIT));
@@ -2806,7 +3609,7 @@ int sh_fun(Namval_t *np, Namval_t *nq, char *argv[])
if(offset>0)
stakset(base,offset);
shp->prefix = prefix;
- return(sh.exitval);
+ return(shp->exitval);
}
/*
@@ -2840,6 +3643,8 @@ static void coproc_init(Shell_t *shp, int pipes[])
if((outfd=shp->cpipe[1]) < 10)
{
int fd=fcntl(shp->cpipe[1],F_DUPFD,10);
+ VALIDATE_FD(shp, outfd);
+ VALIDATE_FD(shp, fd);
if(fd>=10)
{
shp->fdstatus[fd] = (shp->fdstatus[outfd]&~IOCLEX);
@@ -2848,6 +3653,9 @@ static void coproc_init(Shell_t *shp, int pipes[])
shp->cpipe[1] = fd;
}
}
+ VALIDATE_FD(shp, shp->cpipe[0]);
+ VALIDATE_FD(shp, shp->cpipe[1]);
+
if(fcntl(*shp->cpipe,F_SETFD,FD_CLOEXEC)>=0)
shp->fdstatus[shp->cpipe[0]] |= IOCLEX;
shp->fdptrs[shp->cpipe[0]] = shp->cpipe;
@@ -2858,7 +3666,9 @@ static void coproc_init(Shell_t *shp, int pipes[])
shp->outpipe = shp->cpipe;
sh_pipe(shp->inpipe=pipes);
shp->coutpipe = shp->inpipe[1];
+ VALIDATE_FD(shp, shp->coutpipe);
shp->fdptrs[shp->coutpipe] = &shp->coutpipe;
+ VALIDATE_FD(shp, shp->outpipe[0]);
if(fcntl(shp->outpipe[0],F_SETFD,FD_CLOEXEC)>=0)
shp->fdstatus[shp->outpipe[0]] |= IOCLEX;
}
@@ -2867,38 +3677,21 @@ static void coproc_init(Shell_t *shp, int pipes[])
#if SHOPT_AMP || !defined(_lib_fork)
-/*
- * print out function definition
- */
-static void print_fun(register Namval_t* np, void *data)
-{
- register char *format;
- NOT_USED(data);
- if(!is_afunction(np) || !np->nvalue.ip)
- return;
- if(nv_isattr(np,NV_FPOSIX))
- format="%s()\n{ ";
- else
- format="function %s\n{ ";
- sfprintf(sfstdout,format,nv_name(np));
- sh_deparse(sfstdout,(Shnode_t*)(nv_funtree(np)),0);
- sfwrite(sfstdout,"}\n",2);
-}
/*
* create a shell script consisting of t->fork.forktre and execute it
*/
-static int run_subshell(const Shnode_t *t,pid_t grp)
+static int run_subshell(Shell_t *shp,const Shnode_t *t,pid_t grp)
{
static const char prolog[] = "(print $(typeset +A);set; typeset -p; print .sh.dollar=$$;set +o)";
register int i, fd, trace = sh_isoption(SH_XTRACE);
int pin,pout;
pid_t pid;
- char *arglist[2], *envlist[2], devfd[12], *cp;
+ char *arglist[3], *envlist[2], devfd[12], *cp;
Sfio_t *sp = sftmp(0);
envlist[0] = "_=" SH_ID;
envlist[1] = 0;
- arglist[0] = error_info.id?error_info.id:sh.shname;
+ arglist[0] = error_info.id?error_info.id:shp->shname;
if(*arglist[0]=='-')
arglist[0]++;
arglist[1] = devfd;
@@ -2909,21 +3702,21 @@ static int run_subshell(const Shnode_t *t,pid_t grp)
sh_offoption(SH_XTRACE);
sfwrite(sfstdout,"typeset -A -- ",14);
sh_trap(prolog,0);
- nv_scan(sh.fun_tree, print_fun, (void*)0,0, 0);
- if(sh.st.dolc>0)
+ nv_scan(shp->fun_tree, print_fun, (void*)0,0, 0);
+ if(shp->st.dolc>0)
{
/* pass the positional parameters */
- char **argv = sh.st.dolv+1;
+ char **argv = shp->st.dolv+1;
sfwrite(sfstdout,"set --",6);
while(*argv)
sfprintf(sfstdout," %s",sh_fmtq(*argv++));
sfputc(sfstdout,'\n');
}
- pin = (sh.inpipe?sh.inpipe[1]:0);
- pout = (sh.outpipe?sh.outpipe[0]:0);
+ pin = (shp->inpipe?shp->inpipe[1]:0);
+ pout = (shp->outpipe?shp->outpipe[0]:0);
for(i=3; i < 10; i++)
{
- if(sh.fdstatus[i]&IOCLEX && i!=pin && i!=pout)
+ if(shp->fdstatus[i]&IOCLEX && i!=pin && i!=pout)
{
sfprintf(sfstdout,"exec %d<&%d\n",i,i);
fcntl(i,F_SETFD,0);
@@ -2946,13 +3739,13 @@ static int run_subshell(const Shnode_t *t,pid_t grp)
*cp = 0;
sfclose(sp);
sfsync(NIL(Sfio_t*));
- if(!sh.shpath)
- sh.shpath = pathshell();
- pid = spawnveg(sh.shpath,arglist,envlist,grp);
+ if(!shp->gd->shpath)
+ shp->gd->shpath = pathshell();
+ pid = spawnveg(shp->shpath,arglist,envlist,grp);
close(fd);
for(i=3; i < 10; i++)
{
- if(sh.fdstatus[i]&IOCLEX && i!=pin && i!=pout)
+ if(shp->fdstatus[i]&IOCLEX && i!=pin && i!=pout)
fcntl(i,F_SETFD,FD_CLOEXEC);
}
if(pid <=0)
@@ -2961,13 +3754,15 @@ static int run_subshell(const Shnode_t *t,pid_t grp)
}
#endif /* !_lib_fork */
-static void sigreset(int mode)
+static void sigreset(Shell_t *shp,int mode)
{
register char *trap;
- register int sig=sh.st.trapmax;
+ register int sig=shp->st.trapmax;
while(sig-- > 0)
{
- if((trap=sh.st.trapcom[sig]) && *trap==0)
+ if(sig==SIGCHLD)
+ continue;
+ if((trap=shp->st.trapcom[sig]) && *trap==0)
signal(sig,mode?sh_fault:SIG_IGN);
}
}
@@ -2980,8 +3775,8 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
static pid_t spawnpid;
static int savetype;
static int savejobid __unused;
- struct checkpt buff;
- int otype=0, jmpval;
+ struct checkpt *buffp = (struct checkpt*)stkalloc(shp->stk,sizeof(struct checkpt));
+ int otype=0, jmpval,jobfork=0;
volatile int jobwasset=0, scope=0, sigwasset=0;
char **arge, *path;
volatile pid_t grp = 0;
@@ -3026,8 +3821,8 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
optimize=1;
}
# endif
- sh_pushcontext(&buff,SH_JMPIO);
- jmpval = sigsetjmp(buff.buff,0);
+ sh_pushcontext(shp,buffp,SH_JMPIO);
+ jmpval = sigsetjmp(buffp->buff,0);
{
if((otype&FINT) && !sh_isstate(SH_MONITOR))
{
@@ -3035,22 +3830,28 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
signal(SIGINT,SIG_IGN);
if(!shp->st.ioset)
{
- sh_iosave(shp,0,buff.topfd,(char*)0);
+ sh_iosave(shp,0,buffp->topfd,(char*)0);
sh_iorenumber(shp,sh_chkopen(e_devnull),0);
}
}
if(otype&FPIN)
{
int fd = shp->inpipe[1];
- sh_iosave(shp,0,buff.topfd,(char*)0);
+ sh_iosave(shp,0,buffp->topfd,(char*)0);
sh_iorenumber(shp,shp->inpipe[0],0);
+ VALIDATE_FD(shp, fd);
if(fd>=0 && (!(otype&FPOU) || (otype&FCOOP)) && fcntl(fd,F_SETFD,FD_CLOEXEC)>=0)
shp->fdstatus[fd] |= IOCLEX;
}
if(otype&FPOU)
{
- sh_iosave(shp,1,buff.topfd,(char*)0);
+#if SHOPT_COSHELL
+ if(shp->outpipe[2] > 20000)
+ sh_coaccept(shp,shp->outpipe,1);
+#endif /* SHOPT_COSHELL */
+ sh_iosave(shp,1,buffp->topfd,(char*)0);
sh_iorenumber(shp,sh_dup(shp->outpipe[1]),1);
+ VALIDATE_FD(shp, shp->outpipe[0]);
if(fcntl(shp->outpipe[0],F_SETFD,FD_CLOEXEC)>=0)
shp->fdstatus[shp->outpipe[0]] |= IOCLEX;
}
@@ -3075,7 +3876,7 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
grp = job.curpgid;
}
#endif /* JOBS */
- spawnpid = run_subshell(t,grp);
+ spawnpid = run_subshell(shp,t,grp);
}
else
{
@@ -3084,16 +3885,17 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
*jobid = savejobid;
}
}
- sh_popcontext(&buff);
+ sh_popcontext(shp,buffp);
if((otype&FINT) && !sh_isstate(SH_MONITOR))
{
signal(SIGQUIT,sh_fault);
signal(SIGINT,sh_fault);
}
+ VALIDATE_FD(shp, shp->inpipe[1]);
if((otype&FPIN) && (!(otype&FPOU) || (otype&FCOOP)) && fcntl(shp->inpipe[1],F_SETFD,FD_CLOEXEC)>=0)
shp->fdstatus[shp->inpipe[1]] &= ~IOCLEX;
if(t->fork.forkio || otype)
- sh_iorestore(shp,buff.topfd,jmpval);
+ sh_iorestore(shp,buffp->topfd,jmpval);
if(optimize==0)
{
#ifdef SIGTSTP
@@ -3104,7 +3906,7 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
}
#endif /* SIGTSTP */
if(spawnpid>0)
- _sh_fork(spawnpid,otype,jobid);
+ _sh_fork(shp,spawnpid,otype,jobid);
if(grp>0 && !(otype&FAMP))
{
while(tcsetpgrp(job.fd,job.curpgid)<0 && job.curpgid!=spawnpid)
@@ -3125,9 +3927,9 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
return(spawnpid);
}
# endif /* !_lib_fork */
- sh_pushcontext(&buff,SH_JMPCMD);
- errorpush(&buff.err,ERROR_SILENT);
- jmpval = sigsetjmp(buff.buff,0);
+ sh_pushcontext(shp,buffp,SH_JMPCMD);
+ errorpush(&buffp->err,ERROR_SILENT);
+ jmpval = sigsetjmp(buffp->buff,0);
if(jmpval == 0)
{
if((otype&FINT) && !sh_isstate(SH_MONITOR))
@@ -3149,33 +3951,33 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
Namval_t *np;
if((np=nv_search(path,shp->track_tree,0)) && !nv_isattr(np,NV_NOALIAS) && np->nvalue.cp)
path = nv_getval(np);
- else if(path_absolute(path,NIL(Pathcomp_t*)))
+ else if(path_absolute(shp,path,NIL(Pathcomp_t*)))
{
- path = stkptr(shp->stk,PATH_OFFSET);
- stkfreeze(shp->stk,0);
- }
- else
- {
- pp=path_get(path);
- while(pp)
+ path = stkptr(shp->stk,PATH_OFFSET);
+ stkfreeze(shp->stk,0);
+ }
+ else
{
- if(pp->len==1 && *pp->name=='.')
- break;
- pp = pp->next;
+ pp=path_get(shp,path);
+ while(pp)
+ {
+ if(pp->len==1 && *pp->name=='.')
+ break;
+ pp = pp->next;
+ }
+ if(!pp)
+ path = 0;
}
- if(!pp)
- path = 0;
}
- }
- else if(sh_isoption(SH_RESTRICTED))
- errormsg(SH_DICT,ERROR_exit(1),e_restricted,path);
- if(!path)
- {
- spawnpid = -1;
- goto fail;
- }
- arge = sh_envgen();
- shp->exitval = 0;
+ else if(sh_isoption(SH_RESTRICTED))
+ errormsg(SH_DICT,ERROR_exit(1),e_restricted,path);
+ if(!path)
+ {
+ spawnpid = -1;
+ goto fail;
+ }
+ arge = sh_envgen();
+ shp->exitval = 0;
#ifdef SIGTSTP
if(job.jobcontrol)
{
@@ -3195,11 +3997,13 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
#endif /* JOBS */
sfsync(NIL(Sfio_t*));
- sigreset(0); /* set signals to ignore */
+ sigreset(shp,0); /* set signals to ignore */
sigwasset++;
/* find first path that has a library component */
- for(pp=path_get(argv[0]); pp && !pp->lib ; pp=pp->next);
- spawnpid = path_spawn(path,argv,arge,pp,(grp<<1)|1);
+ for(pp=path_get(shp,argv[0]); pp && !pp->lib ; pp=pp->next);
+ job_fork(-1);
+ jobfork = 1;
+ spawnpid = path_spawn(shp,path,argv,arge,pp,(grp<<1)|1);
if(spawnpid < 0 && errno==ENOEXEC)
{
char *devfd;
@@ -3209,18 +4013,20 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
if(fd>=0)
{
struct stat statb;
- sfprintf(sh.strbuf,"/dev/fd/%d",fd);
- if(stat(devfd=sfstruse(sh.strbuf),&statb)>=0)
+ sfprintf(shp->strbuf,"/dev/fd/%d",fd);
+ if(stat(devfd=sfstruse(shp->strbuf),&statb)>=0)
argv[0] = devfd;
}
- if(!shp->shpath)
- shp->shpath = pathshell();
- spawnpid = path_spawn(shp->shpath,&argv[-1],arge,pp,(grp<<1)|1);
+ if(!shp->gd->shpath)
+ shp->gd->shpath = pathshell();
+ spawnpid = path_spawn(shp,shp->gd->shpath,&argv[-1],arge,pp,(grp<<1)|1);
if(fd>=0)
close(fd);
argv[0] = argv[-1];
}
fail:
+ if(jobfork && spawnpid<0)
+ job_fork(0);
if(spawnpid < 0) switch(errno=shp->path_err)
{
case ENOENT:
@@ -3232,9 +4038,9 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
}
else
exitset();
- sh_popcontext(&buff);
- if(buff.olist)
- free_list(buff.olist);
+ sh_popcontext(shp,buffp);
+ if(buffp->olist)
+ free_list(buffp->olist);
#ifdef SIGTSTP
if(jobwasset)
{
@@ -3243,20 +4049,21 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
}
#endif /* SIGTSTP */
if(sigwasset)
- sigreset(1); /* restore ignored signals */
+ sigreset(shp,1); /* restore ignored signals */
if(scope)
{
sh_unscope(shp);
if(jmpval==SH_JMPSCRIPT)
nv_setlist(t->com.comset,NV_EXPORT|NV_IDENT|NV_ASSIGN,0);
}
- if(t->com.comio)
- sh_iorestore(shp,buff.topfd,jmpval);
+ if(t->com.comio && (jmpval || spawnpid<=0))
+ sh_iorestore(shp,buffp->topfd,jmpval);
if(jmpval>SH_JMPCMD)
siglongjmp(*shp->jmplist,jmpval);
if(spawnpid>0)
{
- _sh_fork(spawnpid,otype,jobid);
+ _sh_fork(shp,spawnpid,otype,jobid);
+ job_fork(spawnpid);
#ifdef JOBS
if(grp==1)
job.curpgid = spawnpid;
diff --git a/usr/src/lib/libshell/common/shell.3 b/usr/src/contrib/ast/src/cmd/ksh93/shell.3
index 7d7394bbc4..8a27482ece 100644
--- a/usr/src/lib/libshell/common/shell.3
+++ b/usr/src/contrib/ast/src/cmd/ksh93/shell.3
@@ -1,10 +1,7 @@
.fp 5 CW
-.TH SHELL 3 "28 Feb 2003"
-.PP
+.TH SHELL 3 "28 Feb 2003" AST
.SH NAME
-.PP
\fBshell\fR \- a \f5ksh\fP library interface
-.PP
.SH SYNOPSIS
.ta .8i 1.6i 2.4i 3.2i 4.0i 4.8i 5.6i
.SS "HEADERS/LIBRARIES"
@@ -56,9 +53,7 @@ Sfio_t *sh_iogetiop(int \fIfd\fP, int \fImode\fP);
int sh_sigcheck(void);
.ft R
.fi
-.PP
.SH DESCRIPTION
-.PP
The \fIShell\fP library is a set of functions used for
writing extensions to \f5ksh\fP or writing commands
that embed shell command processing.
@@ -106,7 +101,7 @@ at run time using the \f5builtin\fP(1) command.
In this case the shell will look for a function named \f5lib_init\fP
in your library and, if found, will execute this function with
two arguments. The first
-argument will be an \f5int\P with value \f50\fP when the library is loaded.
+argument will be an \f5int\fP with value \f50\fP when the library is loaded.
The second argument will contain a pointer to a structure of type
\f5Shbltin_t\fP.
In addition, for each argument named on the \f5builtin\fP
@@ -163,7 +158,7 @@ three arguments. The first two arguments give the
number of arguments and the argument list
and uses the same conventions as the \f5main()\fP function
of a program. The third argument is a pointer to a structure
-of type \f5Shbltin_t\fP. This structure contains \f5shp\P which is a pointer
+of type \f5Shbltin_t\fP. This structure contains \f5shp\fP which is a pointer
to the shell interpreter, and \f5ptr\fP which is a pointer that
can be associated with each built-in.
The \f5sh_addbuiltin()\fP function is used to add, replace or delete
@@ -407,7 +402,6 @@ The stream corresponding to the most recent co-process.
The stream corresponding to the history file.
If no stream exists corresponding to \fIfd\fP or the stream
can not be accessed in the specified mode, \f5NULL\fP is returned.
-.PP
.SH SEE ALSO
builtin(1)
cdt(3)
@@ -416,7 +410,5 @@ nval(3)
sfio(3)
stk(3)
tksh(1)
-.PP
.SH AUTHOR
David G. Korn (dgk@research.att.com).
-
diff --git a/usr/src/lib/libshell/common/tests/alias.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/alias.sh
index d4bcb73f67..5a75fa3116 100644..100755
--- a/usr/src/lib/libshell/common/tests/alias.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/alias.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -96,4 +96,7 @@ else err_exit 'hash -r failed'
fi
( alias :pr=print) 2> /dev/null || err_exit 'alias beginning with : fails'
( alias p:r=print) 2> /dev/null || err_exit 'alias with : in name fails'
-exit $((Errors))
+
+unalias no_such_alias && err_exit 'unalias should return non-zero for unknown alias'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/append.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/append.sh
index 947d6d7e29..6afec5694f 100644..100755
--- a/usr/src/lib/libshell/common/tests/append.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/append.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -77,4 +77,40 @@ foo[0]=(x=3)
foo+=(x=4)
[[ ${foo[1].x} == 4 ]] || err_exit 'compound append to index array not working'
[[ ${foo[0].x} == 3 ]] || err_exit 'compound append to index array unsets existing variables'
-exit $((Errors))
+
+unset foo
+foo=a
+foo+=''
+[[ $foo == 'a' ]] || err_exit 'appending an empty string not working'
+
+unset x z arr
+typeset -a x=(a b)
+x+=(c d)
+exp='typeset -a x=(a b c d)'
+[[ $(typeset -p x) == "$exp" ]] || err_exit 'append (c d) to index array not working'
+
+typeset -a arr=(a=b b=c)
+arr+=(c=d d=e)
+exp='typeset -a arr=(a\=b b\=c c\=d d\=e)'
+[[ $(typeset -p arr) == "$exp" ]] || err_exit 'append (c=d d=e) to index array not working'
+
+exp='typeset -a z=(a\=b b\=c d\=3 e f\=l)'
+typeset -a z=(a=b b=c)
+{ z+=(d=3 e f=l); } 2> /dev/null
+[[ $(typeset -p z) == "$exp" ]] || err_exit 'append (d=3 e f=l) to index array not working'
+
+unset arr2
+exp='typeset -a arr2=(b\=c :)'
+typeset -a arr2
+arr2+=(b=c :)
+[[ $(typeset -p arr2) == "$exp" ]] || err_exit 'append (b=c :) to index array not working'
+
+unset arr2
+exp='typeset -a arr2=(b\=c xxxxx)'
+typeset -a arr2
+{
+ arr2+=(b=c xxxxx)
+} 2> /dev/null
+[[ $(typeset -p arr2) == "$exp" ]] || err_exit 'append (b=c xxxxx) to index array not working'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/arith.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/arith.sh
index 457826fcfb..0dfea0e08e 100644..100755
--- a/usr/src/lib/libshell/common/tests/arith.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/arith.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -338,7 +338,7 @@ unset y
[[ $(let y=$x;print $y) == 10 && $(let y=1$x;print $y) == 1010 ]] || err_exit 'zero filled fields not preserving leading zeros with let'
unset i ip ipx
typeset -i hex=( 172 30 18 1)
-typeset -iu ip=0 ipx=0
+typeset -ui ip=0 ipx=0
integer i
for ((i=0; i < 4; i++))
do (( ip = (ip<<8) | hex[i]))
@@ -350,7 +350,7 @@ do (( ipx = ip % 256 ))
done
unset x
x=010
-(( x == 8 )) || err_exit 'leading zeros not treated as octal arithmetic'
+(( x == 10 )) || err_exit 'leading zeros in x treated as octal arithmetic with $((x))'
(( $x == 8 )) || err_exit 'leading zeros not treated as octal arithmetic with $x'
unset x
typeset -Z x=010
@@ -361,7 +361,7 @@ typeset -i i=x
(( ${x:0:1} == 0 )) || err_exit 'leading zero should not be stripped for x:a:b'
c010=3
(( c$x == 3 )) || err_exit 'leading zero with variable should not be stripped'
-[[ $( ($SHELL -c '((++1))' 2>&1)2>/dev/null ) == *lvalue* ]] || err_exit "((++1)) not generating error message"
+[[ $( ($SHELL -c '((++1))' 2>&1) 2>/dev/null ) == *++1:* ]] || err_exit "((++1)) not generating error message"
i=2
(( "22" == 22 )) || err_exit "double quoted constants fail"
(( "2$i" == 22 )) || err_exit "double quoted variables fail"
@@ -479,10 +479,13 @@ y=$(printf "%a" x)
r=$y
[[ $r == $n ]] || err_exit "output of printf %a not self preserving -- expected $x, got $y"
unset x y r
-x=-0
-y=$(printf "%g %g %g %g %g %g\n" -0. -0 $((-0)) x $x $((x)))
-r="-0 -0 -0 -0 -0 -0"
-[[ $y == "$r" ]] || err_exit "-0 vs -0.0 inconsistency -- expected '$r', got '$y'"
+float x=-0 y=-0.0
+r=-0
+[[ $((-0)) == 0 ]] || err_exit '$((-0)) should be 0'
+[[ $(( -1*0)) == 0 ]] || err_exit '$(( -1*0)) should be 0'
+[[ $(( -1.0*0)) == -0 ]] || err_exit '$(( -1.0*0)) should be -0'
+[[ $(printf "%g %g %g\n" x $x $((x)) ) == '-0 -0 -0' ]] || err_exit '%g of x $x $((x)) for x=-0 should all be -0'
+[[ $(printf "%g %g %g\n" y $x $((y)) ) == '-0 -0 -0' ]] || err_exit '%g of y $y $((y)) for y=-0.0 should all be -0'
$SHELL -c '(( x=));:' 2> /dev/null && err_exit '((x=)) should be an error'
$SHELL -c '(( x+=));:' 2> /dev/null && err_exit '((x+=)) should be an error'
$SHELL -c '(( x=+));:' 2> /dev/null && err_exit '((x=+)) should be an error'
@@ -559,4 +562,204 @@ do ((a[RANDOM%2]++))
done
(( (a[0]+a[1])==1000)) || err_exit '(a[0]+a[1])!=1000'
-exit $((Errors))
+(( 4.**3/10 == 6.4 )) || err_exit '4.**3/10!=6.4'
+(( (.5+3)/7 == .5 )) || err_exit '(.5+3)/7!==.5'
+
+function .sh.math.mysin x
+{
+ ((.sh.value = x - x**3/6. + x**5/120.-x**7/5040. + x**9/362880.))
+}
+
+(( abs(sin(.5)-mysin(.5)) < 1e-6 )) || err_exit 'mysin() not close to sin()'
+
+$SHELL 2> /dev/null <<- \EOF || err_exit "arithmetic functions defined and referenced in compound command not working"
+{
+ function .sh.math.mysin x
+ {
+ ((.sh.value = x-x**3/6. + x**5/120.-x**7/5040. + x**9/362880.))
+ }
+ (( abs(sin(.5)-mysin(.5)) < 1e-6 ))
+ exit 0
+}
+EOF
+
+
+
+function .sh.math.max x y z
+{
+ .sh.value=x
+ (( y > x )) && .sh.value=y
+ (( z > .sh.value )) && .sh.value=z
+}
+(( max(max(3,8,5),7,5)==8)) || err_exit 'max(max(3,8,5),7,5)!=8'
+(( max(max(3,8,5),7,9)==9)) || err_exit 'max(max(3,8,9),7,5)!=9'
+(( max(6,max(3,9,5),7)==9 )) || err_exit 'max(6,max(3,8,5),7)!=9'
+(( max(6,7, max(3,8,5))==8 )) || err_exit 'max(6,7,max(3,8,5))!=8'
+
+enum color_t=(red green blue yellow)
+color_t shirt pants=blue
+(( pants == blue )) || err_exit 'pants should be blue'
+(( shirt == red )) || err_exit 'pants should be red'
+(( shirt != green )) || err_exit 'shirt should not be green'
+(( pants != shirt )) || err_exit 'pants should be the same as shirt'
+(( pants = yellow ))
+(( pants == yellow )) || err_exit 'pants should be yellow'
+
+unset z
+integer -a z=( [1]=90 )
+function x
+{
+ nameref nz=$1
+ float x y
+ float x=$((log10(nz))) y=$((log10($nz)))
+ (( abs(x-y) < 1e-10 )) || err_exit '$nz and nz differs in arithmetic expression when nz is reference to array instance'
+}
+x z[1]
+
+unset x
+float x
+x=$( ($SHELL -c 'print -- $(( asinh(acosh(atanh(sin(cos(tan(atan(acos(asin(tanh(cosh(sinh(asinh(acosh(atanh(sin(cos(tan(atan(acos(asin(tanh(cosh(sinh(.5)))))))))))))))))))))))) )) ';:) 2> /dev/null)
+(( abs(x-.5) < 1.e-10 )) || err_exit 'bug in composite function evaluation'
+
+unset x
+typeset -X x=16
+{ (( $x == 16 )) ;} 2> /dev/null || err_exit 'expansions of hexfloat not working in arithmetic expansions'
+
+unset foo
+function foobar
+{
+ (( foo = 8))
+}
+typeset -i foo
+foobar
+(( foo == 8 )) || err_exit 'arithmetic assignment binding to the wrong scope'
+
+(( tgamma(4)/12 )) || err_exit 'floating point attribute for functions not preserved'
+
+unset F
+function f
+{
+ ((F=1))
+}
+f
+[[ $F == 1 ]] || err_exit 'scoping bug with arithmetic expression'
+
+F=1
+function f
+{
+ typeset F
+ ((F=2))
+}
+[[ $F == 1 ]] || err_exit 'scoping bug2 with arithmetic expression'
+
+unset play foo x z
+typeset -A play
+x=foo
+play[$x]=(x=2)
+for ((i=0; i < 2; i++))
+do (( play[$x].y , z++ ))
+done
+(( z==2 )) || err_exit 'unset compound array variable error with for loop optimization'
+
+[[ $($SHELL 2> /dev/null -c 'print -- $(( ldexp(1, 4) ))' ) == 16 ]] || err_exit 'function ldexp not implement or not working correctly'
+
+
+$SHELL 2> /dev/null -c 'str="0x1.df768ed398ee1e01329a130627ae0000p-1";typeset -l -E x;((x=str))' || err_exit '((x=var)) fails for hexfloat with var begining with 0x1.nnn'
+
+x=(3 6 12)
+(( x[2] /= x[0]))
+(( x[2] == 4 )) || err_exit '(( x[2] /= x[0])) fails for index array'
+
+x=([0]=3 [1]=6 [2]=12)
+(( x[2] /= x[0]))
+(( x[2] == 4 )) || err_exit '(( x[2] /= x[0])) fails for associative array'
+
+got=$($SHELL 2> /dev/null -c 'compound -a x;compound -a x[0].y; integer -a x[0].y[0].z; (( x[0].y[0].z[2]=3 )); typeset -p x')
+exp='typeset -C -a x=((typeset -C -a y=( [0]=(typeset -a -l -i z=([2]=3);));))'
+[[ $got == "$exp" ]] || err_exit '(( x[0].y[0].z[2]=3 )) not working'
+
+unset x
+let x=010
+[[ $x == 10 ]] || err_exit 'let treating 010 as octal'
+set -o letoctal
+let x=010
+[[ $x == 8 ]] || err_exit 'let not treating 010 as octal with letoctal on'
+
+float z=0
+integer aa=2 a=1
+typeset -A A
+A[a]=(typeset -A AA)
+A[a].AA[aa]=1
+(( z= A[a].AA[aa]++ ))
+(( z == 1 )) || err_exit "z should be 1 but is $z for associative array of
+associative array arithmetic"
+[[ ${A[a].AA[aa]} == 2 ]] || err_exit '${A[a].AA[aa]} should be 2 after ++ operation for associative array of associative array arithmetic'
+unset A[a]
+
+A[a]=(typeset -a AA)
+A[a].AA[aa]=1
+(( z += A[a].AA[aa++]++ ))
+(( z == 2 )) || err_exit "z should be 2 but is $z for associative array of
+index array arithmetic"
+(( aa == 3 )) || err_exit "subscript aa should be 3 but is $aa after ++"
+[[ ${A[a].AA[aa-1]} == 2 ]] || err_exit '${A[a].AA[aa]} should be 2 after ++ operation for ssociative array of index array arithmetic'
+unset A
+
+typeset -a A
+A[a]=(typeset -A AA)
+A[a].AA[aa]=1
+(( z += A[a].AA[aa]++ ))
+(( z == 3 )) || err_exit "z should be 3 but is $z for index array of
+associative array arithmetic"
+[[ ${A[a].AA[aa]} == 2 ]] || err_exit '${A[a].AA[aa]} should be 2 after ++ operation for index array of associative array arithmetic'
+unset A[a]
+
+A[a]=(typeset -a AA)
+A[a].AA[aa]=1
+(( z += A[a++].AA[aa++]++ ))
+(( z == 4 )) || err_exit "z should be 4 but is $z for index array of
+index array arithmetic"
+[[ ${A[a-1].AA[aa-1]} == 2 ]] || err_exit '${A[a].AA[aa]} should be 2 after ++ operation for index array of index array arithmetic'
+(( aa == 4 )) || err_exit "subscript aa should be 4 but is $aa after ++"
+(( a == 2 )) || err_exit "subscript a should be 2 but is $a after ++"
+unset A
+
+unset r x
+integer x
+r=020
+(($r == 16)) || err_exit 'leading 0 not treated as octal inside ((...))'
+x=$(($r))
+(( x == 16 )) || err_exit 'leading 0 not treated as octal inside $((...))'
+x=$r
+((x == 20 )) || err_exit 'leading 0 should not be treated as octal outside ((...))'
+print -- -020 | read x
+((x == -20)) || err_exit 'numbers with leading -0 should not be treated as octal outside ((...))'
+print -- -8#20 | read x
+((x == -16)) || err_exit 'numbers with leading -8# should be treated as octal'
+
+unset x
+x=0x1
+let "$x==1" || err_exit 'hex constants not working with let'
+(( $x == 1 )) || err_exit 'arithmetic with $x, where $x is hex constant not working'
+for i in 1
+do (($x == 1)) || err_exit 'arithmetic in for loop with $x, where $x is hex constant not working'
+done
+x=010
+let "$x==10" || err_exit 'arithmetic with $x where $x is 010 should be decimal in let'
+(( 9.$x == 9.01 )) || err_exit 'arithmetic with 9.$x where x=010 should be 9.01'
+(( 9$x == 9010 )) || err_exit 'arithmetic with 9$x where x=010 should be 9010'
+x010=99
+((x$x == 99 )) || err_exit 'arithtmetic with x$x where x=010 should be $x010'
+(( 3+$x == 11 )) || err_exit '3+$x where x=010 should be 11 in ((...))'
+let "(3+$x)==13" || err_exit 'let should not recognize leading 0 as octal'
+unset x
+typeset -RZ3 x=10
+(( $x == 10 )) || err_exit 'leading 0 in -RZ should not create octal constant with ((...))'
+let "$x==10" || err_exit 'leading 0 in -RZ should not create octal constant with let'
+
+unset v x
+x=0x1.0000000000000000000000000000p+6
+v=$(printf $'%.28a\n' 64)
+[[ $v == "$x" ]] || err_exit "'printf %.28a 64' failed -- expected '$x', got '$v'"
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/arrays.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/arrays.sh
index a483b50072..e9b5ce95cd 100644..100755
--- a/usr/src/lib/libshell/common/tests/arrays.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/arrays.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -498,4 +498,173 @@ x[2]=
z=$(: ${x[1]} )
[[ $z == sub=1 ]] || err_exit 'get function not invoked for associative array'
-exit $((Errors))
+unset y
+i=1
+a=(11 22)
+typeset -m y=a[i]
+[[ $y == 22 ]] || err_exit 'typeset -m for index array not working'
+[[ ${a[i]} || ${a[0]} != 11 ]] && err_exit 'typeset -m for index array not deleting element'
+
+unset y
+a=([0]=11 [1]=22)
+typeset -m y=a[$i]
+[[ $y == 22 ]] || err_exit 'typeset -m for associative array not working'
+[[ ${a[$i]} || ${a[0]} != 11 ]] && err_exit 'typeset -m for associative array not deleting element'
+unset x a j
+
+typeset -a a=( [0]="aa" [1]="bb" [2]="cc" )
+typeset -m 'j=a[0]'
+typeset -m 'a[0]=a[1]'
+typeset -m 'a[1]=j'
+[[ ${a[@]} == 'bb aa cc' ]] || err_exit 'moving index array elements not working'
+unset a j
+
+typeset -A a=( [0]="aa" [1]="bb" [2]="cc" )
+typeset -m 'j=a[0]'
+typeset -m 'a[0]=a[1]'
+typeset -m 'a[1]=j'
+[[ ${a[@]} == 'bb aa cc' ]] || err_exit 'moving associative array elements not working'
+unset a j
+
+z=(a b c)
+unset x
+typeset -m x[1]=z
+[[ ${x[1][@]} == 'a b c' ]] || err_exit 'moving indexed array to index array element not working'
+
+unset x z
+z=([0]=a [1]=b [2]=c)
+typeset -m x[1]=z
+[[ ${x[1][@]} == 'a b c' ]] || err_exit 'moving associative array to index array element not working'
+
+{
+typeset -a arr=(
+ float
+)
+} 2> /dev/null
+[[ ${arr[0]} == float ]] || err_exit 'typeset -a should not expand alias for float'
+unset arr
+
+{
+typeset -r -a arr=(
+ float
+)
+} 2> /dev/null
+[[ ${arr[0]} == float ]] || err_exit 'typeset -r -a should not expand alias for float'
+{
+typeset -a arr2=(
+ typeset +r
+)
+} 2> /dev/null
+[[ ${arr2[0]} == typeset ]] || err_exit 'typeset -a should not process declarations'
+unset arr2
+
+$SHELL 2> /dev/null -c $'typeset -a arr=(\nfor)' || err_exit 'typeset -a should allow reserved words as first argument'
+
+$SHELL 2> /dev/null -c $'typeset -r -a arr=(\nfor)' || err_exit 'typeset -r -a should allow reserved words as first argument'
+
+typeset arr2[6]
+[[ ${#arr2[@]} == 0 ]] || err_exit 'declartion "typeset array[6]" should not show any elements'
+
+arr2[1]=def
+[[ ${arr2[1]} == def ]] || err_exit 'declaration "typeset array[6]" causes arrays causes wrong side effects'
+
+unset foo
+typeset foo[7]
+[[ ${#foo[@]} == 0 ]] || err_exit 'typeset foo[7] should not have one element'
+
+a=123 $SHELL 2> /dev/null -c 'integer a[5]=3 a[2]=4; unset a;x=0; ((a[++x]++));:' || err_exit 'unsetting array variable leaves side effect'
+
+unset foo
+foo=(aa bb cc)
+foo=( ${foo[@]:1} )
+[[ ${foo[@]} == 'bb cc' ]] || err_exit "indexed array assignment using parts of array for values gives wrong result of ${foo[@]}"
+
+unset foo
+foo=([xx]=aa [yy]=bb [zz]=cc)
+foo=( ${foo[yy]} ${foo[zz]} )
+[[ ${foo[@]} == 'bb cc' ]] || err_exit "associative array assignment using parts of array for values gives wrong result of ${foo[@]}"
+
+unset foo
+typeset -a foo=(abc=1 def=2)
+[[ ${foo[1]} == def=2 ]] || err_exit "index array with elements containing = not working"
+
+unset foo
+typeset -a foo=( a b )
+typeset -p foo[10]
+[[ ${!foo[@]} == '0 1' ]] || err_exit 'typeset -p foo[10] has side effect'
+
+unset foo
+exp='typeset -a foo=((11 22) (66) )'
+x=$(
+ typeset -a foo=( ( 11 22 ) ( 44 55 ) )
+ foo[1]=(66)
+ typeset -p foo
+) 2> /dev/null
+[[ $x == "$exp" ]] || err_exit 'setting element 1 to index fooay failed'
+unset foo
+exp='typeset -a foo=((11 22) (x=3))'
+x=$(
+ typeset -a foo=( ( 11 22 ) ( 44 55 ) )
+ foo[1]=(x=3)
+ typeset -p foo
+) 2> /dev/null
+[[ $x == "$exp" ]] || err_exit 'setting element 1 of array to compound variable failed'
+
+#test for cloning a very large index array - can core dump
+(
+ trap 'x=$?;exit $(( $x!=0 ))' EXIT
+ $SHELL <<- \EOF
+ (
+ print '('
+ integer i
+ for ((i=0 ; i < 16384 ; i++ )) ; do
+ printf '\tinteger var%i=%i\n' i i
+ done
+ printf 'typeset -a ar=(\n'
+ for ((i=0 ; i < 16384 ; i++ )) ; do
+ printf '\t[%d]=%d\n' i i
+ done
+ print ')'
+ print ')'
+ ) | read -C hugecpv
+ compound hugecpv2=hugecpv
+ v=$(typeset -p hugecpv)
+ [[ ${v/hugecpv/hugecpv2} == "$(typeset -p hugecpv2)" ]]
+EOF
+) 2> /dev/null || err_exit 'copying a large array fails'
+
+unset foo
+typeset -a foo
+foo+=(bar)
+[[ ${foo[0]} == bar ]] || 'appending to empty array not working'
+
+unset isnull
+typeset -A isnull
+isnull[mdapp]=Y
+: ${isnull[@]}
+isnull[mdapp]=N
+[[ ${isnull[*]} != *N* ]] && err_exit 'bug after ${arr[@]} with one element associative array'
+
+unset arr2
+arr2=()
+typeset -A arr2
+unset arr2
+[[ $(typeset -p arr2) ]] && err_exit 'unset associative array of compound variables not working'
+
+arr3=(x=3)
+typeset -A arr3
+[[ $(typeset -p arr3) == 'typeset -A arr3=()' ]] || err_exit 'typeset -A does not first unset compound variable.'
+
+arr4=(x=3)
+typeset -a arr4
+[[ $(typeset -p arr4) == 'typeset -a arr4' ]] || err_exit 'typeset -a does not first unset compound variable.'
+
+alias foo=bar
+arr5=(foo bar)
+[[ $(typeset -p arr5) == 'typeset -a arr5=(foo bar)' ]] || err_exit 'typeset expanding non-declaration aliases'
+
+typeset -A Foo
+Foo=( [a]=AA;[b]=BB)
+[[ ${Foo[a]} == AA ]] || err_exit 'Fooa[a] is {Foo[a]} not AA'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/arrays2.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/arrays2.sh
new file mode 100755
index 0000000000..3d5fe1b95a
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/arrays2.sh
@@ -0,0 +1,224 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ let Errors+=1
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+for ((i=0; i < 4; i++ ))
+do for ((j=0; j < 5; j++ ))
+ do a[i][j]=$i$j
+ done
+done
+for ((i=0; i < 4; i++ ))
+do for ((j=0; j < 5; j++ ))
+ do [[ ${a[i][j]} == "$i$j" ]] || err_exit "\${a[$i][$j]} != $i$j"
+ done
+done
+for ((i=0; i < 4; i++ ))
+do j=0;for k in ${a[i][@]}
+ do [[ $k == "$i$j" ]] || err_exit "\${a[i][@]} != $i$j"
+ (( j++ ))
+ done
+done
+unset a
+a=(
+ ( 00 01 02 03 04 )
+ ( 10 11 12 13 14 15)
+ ( 20 21 22 23 24 )
+ ( 30 31 32 33 34 )
+)
+
+function check
+{
+ nameref a=$1
+ nameref b=a[2]
+ typeset c=$1
+ integer i j
+ for ((i=0; i < 4; i++ ))
+ do for ((j=0; j < 5; j++ ))
+ do [[ ${a[$i][$j]} == "$i$j" ]] || err_exit "\${$c[$i][$j]} != $i$j"
+ done
+ done
+ (( ${#a[@]} == 4 )) || err_exit "\${#$c[@]} not 4"
+ (( ${#a[0][@]} == 5 )) || err_exit "\${#$c[0][@]} not 5"
+ (( ${#a[1][@]} == 6 )) || err_exit "\${#$c[1][@]} not 6"
+ set -s -- ${!a[@]}
+ [[ ${@} == '0 1 2 3' ]] || err_exit "\${!$c[@]} not 0 1 2 3"
+ set -s -- ${!a[0][@]}
+ [[ ${@} == '0 1 2 3 4' ]] || err_exit "\${!$c[0][@]} not 0 1 2 3 4"
+ set -s -- ${!a[1][@]}
+ [[ ${@} == '0 1 2 3 4 5' ]] || err_exit "\${!$c[1][@]} not 0 1 2 3 4 5"
+ [[ $a == 00 ]] || err_exit "\$$c is not 00"
+ [[ ${a[0]} == 00 ]] || err_exit "\${$a[0]} is not 00"
+ [[ ${a[0][0]} == 00 ]] || err_exit "${a[0][0]} is not 00"
+ [[ ${a[0][0][0]} == 00 ]] || err_exit "\${$c[0][0][0]} is not 00"
+ [[ ${a[0][0][1]} == '' ]] || err_exit "\${$c[0][0][1]} is not empty"
+ [[ ${b[3]} == 23 ]] || err_exit "${!b}[3] not = 23"
+}
+
+check a
+
+unset a
+typeset -A a
+for ((i=0; i < 4; i++ ))
+do for ((j=0; j < 5; j++ ))
+ do a[$i][j]=$i$j
+ done
+done
+for ((i=0; i < 4; i++ ))
+do for ((j=0; j < 5; j++ ))
+ do [[ ${a[$i][j]} == "$i$j" ]] || err_exit "\${a[$i][$j]} == $i$j"
+ done
+done
+a[1][5]=15
+b=(
+ [0]=( 00 01 02 03 04 )
+ [1]=( 10 11 12 13 14 15)
+ [2]=( 20 21 22 23 24 )
+ [3]=( 30 31 32 33 34 )
+)
+check b
+[[ ${a[1][@]} == "${b[1][@]}" ]] || err_exit "a[1] not equal to b[1]"
+c=(
+ [0]=( [0]=00 [1]=01 [2]=02 [3]=03 [4]=04 )
+ [1]=( [0]=10 [1]=11 [2]=12 [3]=13 [4]=14 [5]=15)
+ [2]=( [0]=20 [1]=21 [2]=22 [3]=23 [4]=24 )
+ [3]=( [0]=30 [1]=31 [2]=32 [3]=33 [4]=34 )
+)
+check c
+typeset -A d
+d[0]=( [0]=00 [1]=01 [2]=02 [3]=03 [4]=04 )
+d[1]=( [0]=10 [1]=11 [2]=12 [3]=13 [4]=14 [5]=15)
+d[2]=( [0]=20 [1]=21 [2]=22 [3]=23 [4]=24 )
+d[3]=( [0]=30 [1]=31 [2]=32 [3]=33 [4]=34 )
+check d
+unset a b c d
+[[ ${a-set} ]] || err_exit "a is set after unset"
+[[ ${b-set} ]] || err_exit "b is set after unset"
+[[ ${c-set} ]] || err_exit "c is set after unset"
+[[ ${d-set} ]] || err_exit "c is set after unset"
+
+$SHELL 2> /dev/null <<\+++ || err_exit 'input of 3 dimensional array not working'
+typeset x=(
+ ( (g G) (h H) (i I) )
+ ( (d D) (e E) (f F) )
+ ( (a A) (b B) (c C) )
+)
+[[ ${x[0][0][0]} == g ]] || err_exit '${x[0][0][0]} == G'
+[[ ${x[1][1][0]} == e ]] || err_exit '${x[1][1][0]} == e'
+[[ ${x[1][1][1]} == E ]] || err_exit '${x[2][2][1]} == C'
+[[ ${x[0][2][1]} == I ]] || err_exit '${x[0][2][1]} == I'
++++
+
+typeset -a -si x=( [0]=(1 2 3) [1]=(4 5 6) [2]=(7 8 9) )
+[[ ${x[1][1]} == 5 ]] || err_exit 'changing two dimensional indexed array to short integer failed'
+unset x
+typeset -A -si x=( [0]=(1 2 3) [1]=(4 5 6) [2]=(7 8 9) )
+[[ ${x[1][2]} == 6 ]] || err_exit 'changing two dimensional associative array to short integer failed'
+
+unset ar x y
+integer -a ar
+integer i x y
+for (( i=0 ; i < 100 ; i++ ))
+do (( ar[y][x++]=i ))
+ (( x > 9 )) && (( y++ , x=0 ))
+done
+[[ ${#ar[0][*]} == 10 ]] || err_exit "\${#ar[0][*]} is '${#ar[0][*]}', should be 10"
+[[ ${#ar[*]} == 10 ]] || err_exit "\${#ar[*]} is '${#ar[*]}', should be 10"
+[[ ${ar[5][5]} == 55 ]] || err_exit "ar[5][5] is '${ar[5][5]}', should be 55"
+
+unset ar
+integer -a ar
+x=0 y=0
+for (( i=0 ; i < 81 ; i++ ))
+do nameref ar_y=ar[$y]
+ (( ar_y[x++]=i ))
+ (( x > 8 )) && (( y++ , x=0 ))
+ typeset +n ar_y
+done
+[[ ${#ar[0][*]} == 9 ]] || err_exit "\${#ar[0][*]} is '${#ar[0][*]}', should be 9"
+[[ ${#ar[*]} == 9 ]] || err_exit "\${#ar[*]} is '${#ar[*]}', should be 9"
+[[ ${ar[4][4]} == 40 ]] || err_exit "ar[4][4] is '${ar[4][4]}', should be 40"
+
+$SHELL 2> /dev/null -c 'compound c;float -a c.ar;(( c.ar[2][3][3] = 5))' || 'multi-dimensional arrays in arithemtic expressions not working'
+
+expected='typeset -a -l -E c.ar=([2]=([3]=([3]=5) ) )'
+unset c
+float c.ar
+c.ar[2][3][3]=5
+[[ $(typeset -p c.ar) == "$expected" ]] || err_exit "c.ar[2][3][3]=5;typeset -c c.ar expands to $(typeset -p c.ar)"
+
+unset values
+float -a values=( [1][3]=90 [1][4]=89 )
+function fx
+{
+ nameref arg=$1
+ [[ ${arg[0..5]} == '90 89' ]] || err_exit '${arg[0..5]} not correct where arg is a nameref to values[1]'
+}
+fx values[1]
+
+function test_short_integer
+{
+ compound out=( typeset stdout stderr ; integer res )
+ compound -r -a tests=(
+ ( cmd='integer -s -r -a x=( 1 2 3 ) ; print "${x[2]}"' stdoutpattern='3' )
+ ( cmd='integer -s -r -A x=( [0]=1 [1]=2 [2]=3 ) ; print "${x[2]}"' stdoutpattern='3' )
+ # 2D integer arrays: the following two tests crash for both "integer -s" and "integer"
+ ( cmd='integer -r -a x=( [0]=( [0]=1 [1]=2 [2]=3 ) [1]=( [0]=4 [1]=5 [2]=6 ) [2]=( [0]=7 [1]=8 [2]=9 ) ) ; print "${x[1][1]}"' stdoutpattern='5' )
+ ( cmd='integer -s -r -a x=( [0]=( [0]=1 [1]=2 [2]=3 ) [1]=( [0]=4 [1]=5 [2]=6 ) [2]=( [0]=7 [1]=8 [2]=9 ) ) ; print "${x[1][1]}"' stdoutpattern='5' )
+ )
+ typeset testname
+ integer i
+
+ for (( i=0 ; i < ${#tests[@]} ; i++ )) ; do
+ nameref tst=tests[i]
+ testname="${0}/${i}"
+
+ out.stderr="${ { out.stdout="${ ${SHELL} -o nounset -o errexit -c "${tst.cmd}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+
+ [[ "${out.stdout}" == ${tst.stdoutpattern} ]] || err_exit "${testname}: Expected stdout to match $(printf '%q\n' "${tst.stdoutpattern}"), got $(printf '%q\n' "${out.stdout}")"
+ [[ "${out.stderr}" == '' ]] || err_exit "${testname}: Expected empty stderr, got $(printf '%q\n' "${out.stderr}")"
+ (( out.res == 0 )) || err_exit "${testname}: Unexpected exit code ${out.res}"
+ done
+
+ return 0
+}
+# run tests
+test_short_integer
+
+typeset -a arr=( ( 00 ) ( 01 ) ( 02 ) ( 03 ) ( 04 ) ( 05 ) ( 06 ) ( 07 ) ( 08 ) ( 09 ) ( 10 ) )
+typeset -i i=10 j=0
+{ y=$( echo ${arr[i][j]} ) ;} 2> /dev/null
+[[ $y == 10 ]] || err_exit '${arr[10][0] should be 10 '
+
+unset cx l
+compound cx
+typeset -a cx.ar[4][4]
+print -v cx > /dev/null
+print -v cx | read -C l 2> /dev/null || err_exit 'read -C fails from output of print -v'
+[[ ${cx%cx=} == "${l%l=}" ]] || err_exit 'print -v for compound variable with fixed 2d array not working'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/attributes.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/attributes.sh
index da6c2292d0..feca411e73 100644..100755
--- a/usr/src/lib/libshell/common/tests/attributes.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/attributes.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -254,6 +254,7 @@ eval "$x"
x=${x//$'\t'}
x=${x//$'(\n'/'('}
x=${x//$'\n'/';'}
+x=${x%';)'}')'
[[ $(typeset -p z) == "$x" ]] || err_exit "typeset -p for '$x' failed"
[[ $(typeset +p z) == "${x%%=*}" ]] || err_exit "typeset +p for '$x' failed"
unset z
@@ -276,6 +277,7 @@ Pt_t z
x=${z//$'\t'}
x=${x//$'(\n'/'('}
x=${x//$'\n'/';'}
+x=${x%';)'}')'
[[ $(typeset -p z) == "Pt_t z=$x" ]] || err_exit "typeset -p for type failed"
[[ $(typeset +p z) == "Pt_t z" ]] || err_exit "typeset +p for type failed"
unset z
@@ -360,4 +362,111 @@ unset v
typeset -H v=/dev/null
[[ $v == *nul* ]] || err_exit 'typeset -H for /dev/null not working'
-exit $((Errors))
+unset x
+(typeset +C x) 2> /dev/null && err_exit 'typeset +C should be an error'
+(typeset +A x) 2> /dev/null && err_exit 'typeset +A should be an error'
+(typeset +a x) 2> /dev/null && err_exit 'typeset +a should be an error'
+
+unset x
+{
+x=$($SHELL -c 'integer -s x=5;print -r -- $x')
+} 2> /dev/null
+[[ $x == 5 ]] || err_exit 'integer -s not working'
+
+[[ $(typeset -l) == *namespace*.sh* ]] && err_exit 'typeset -l should not contain namespace .sh'
+
+unset got
+typeset -u got
+exp=100
+((got=$exp))
+[[ $got == $exp ]] || err_exit "typeset -l fails on numeric value -- expected '$exp', got '$got'"
+
+unset s
+typeset -a -u s=( hello world chicken )
+[[ ${s[2]} == CHICKEN ]] || err_exit 'typeset -u not working with indexed arrays'
+unset s
+typeset -A -u s=( [1]=hello [0]=world [2]=chicken )
+[[ ${s[2]} == CHICKEN ]] || err_exit 'typeset -u not working with associative arrays'
+expected=$'(\n\t[0]=WORLD\n\t[1]=HELLO\n\t[2]=CHICKEN\n)'
+[[ $(print -v s) == "$expected" ]] || err_exit 'typeset -u for associative array does not display correctly'
+
+unset s
+if command typeset -M totitle s 2> /dev/null
+then [[ $(typeset +p s) == 'typeset -M totitle s' ]] || err_exit 'typeset -M totitle does not display correctly with typeset -p'
+fi
+
+{ $SHELL <<- \EOF
+ compound -a a1
+ for ((i=1 ; i < 100 ; i++ ))
+ do [[ "$( typeset + a1[$i] )" == '' ]] && a1[$i].text='hello'
+ done
+ [[ ${a1[70].text} == hello ]]
+EOF
+} 2> /dev/null
+(( $? )) && err_exit 'typeset + a[i] not working'
+
+typeset groupDB="" userDB=""
+typeset -l -L1 DBPick=""
+[[ -n "$groupDB" ]] && err_exit 'typeset -l -L1 causes unwanted side effect'
+
+HISTFILE=foo
+typeset -u PS1='hello --- '
+HISTFILE=foo
+[[ $HISTFILE == foo ]] || err_exit 'typeset -u PS1 affects HISTFILE'
+
+typeset -a a=( aA= ZQ= bA= bA= bw= Cg= )
+typeset -b x
+for (( i=0 ; i < ${#a[@]} ; i++ ))
+do x+="${a[i]}"
+done
+[[ $(printf "%B" x) == hello ]] || err_exit "append for typeset -b not working: got '$(printf "%B" x)' should get hello"
+
+(
+ trap 'exit $?' EXIT
+ $SHELL -c 'typeset v=foo; [[ $(typeset -p v[0]) == v=foo ]]'
+) 2> /dev/null || err_exit 'typeset -p v[0] not working for simple variable v'
+
+unset x
+expected='typeset -a x=(a\=3 b\=4)'
+typeset -a x=( a=3 b=4)
+[[ $(typeset -p x) == "$expected" ]] || err_exit 'assignment elements in typeset -a assignment not working'
+
+unset z
+z='typeset -a q=(a b c)'
+$SHELL -c "$z; [[ \$(typeset -pa) == '$z' ]]" || err_exit 'typeset -pa does not list only index arrays'
+z='typeset -C z=(foo=bar)'
+$SHELL -c "$z; [[ \$(typeset -pC) == '$z' ]]" || err_exit 'typeset -pC does not list only compound variables'
+unset y
+z='typeset -A y=([a]=foo)'
+$SHELL -c "$z; [[ \$(typeset -pA) == '$z' ]]" || err_exit 'typeset -pA does not list only associative arrays'
+
+$SHELL 2> /dev/null -c 'typeset -C arr=( aa bb cc dd )' && err_exit 'invalid compound variable assignment not reported'
+
+unset x
+typeset -l x=
+[[ ${x:=foo} == foo ]] || err_exit '${x:=foo} with x unset, not foo when x is a lowercase variable'
+
+unset x
+typeset -L4 x=$'\001abcdef'
+[[ ${#x} == 5 ]] || err_exit "width of character '\01' is not zero"
+
+unset x
+typeset -L x=-1
+command typeset -F x=0-1 2> /dev/null || err_exit 'typeset -F after typeset -L fails'
+
+unset val
+typeset -i val=10#0-3
+typeset -Z val=0-1
+[[ $val == 0-1 ]] || err_exit 'integer attribute not cleared for subsequent typeset'
+
+unset x
+typeset -L -Z x=foo
+[[ $(typeset -p x) == 'typeset -Z 3 -L 3 x=foo' ]] || err_exit '-LRZ without [n] not defaulting to width of variable'
+
+unset foo
+typeset -Z2 foo=3
+[[ $(typeset -p foo) == 'typeset -Z 2 -R 2 foo=03' ]] || err_exit '-Z2 not working'
+export foo
+[[ $(typeset -p foo) == 'typeset -x -Z 2 -R 2 foo=03' ]] || err_exit '-Z2 not working after export'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/basic.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/basic.sh
index 04d2532b68..1cab8e00b7 100644..100755
--- a/usr/src/lib/libshell/common/tests/basic.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/basic.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -219,11 +219,13 @@ x=$( (/bin/echo foo) 2> /dev/null )
if [[ $x != foo ]]
then err_exit "subshell in command substitution fails"
fi
+exec 9>& 1
exec 1>&-
x=$(print hello)
if [[ $x != hello ]]
then err_exit "command subsitution with stdout closed failed"
fi
+exec >& 9
cd $pwd
x=$(cat <<\! | $SHELL
/bin/echo | /bin/cat
@@ -319,7 +321,7 @@ kill $pids
[[ $($SHELL -c 'trap "" HUP; $SHELL -c "(sleep 2;kill -HUP $$)& sleep 4;print done"') != done ]] && err_exit 'ignored traps not being ignored'
[[ $($SHELL -c 'o=foobar; for x in foo bar; do (o=save);print $o;done' 2> /dev/null ) == $'foobar\nfoobar' ]] || err_exit 'for loop optimization subshell bug'
command exec 3<> /dev/null
-if cat /dev/fd/3 >/dev/null 2>&1
+if cat /dev/fd/3 >/dev/null 2>&1 || whence mkfifo > /dev/null
then [[ $($SHELL -c 'cat <(print foo)' 2> /dev/null) == foo ]] || err_exit 'process substitution not working'
[[ $($SHELL -c $'tee >(grep \'1$\' > '$tmp/scriptx$') > /dev/null <<- \!!!
line0
@@ -348,8 +350,7 @@ chmod +x $tmp/scriptx
[[ $($SHELL -c "print foo | $tmp/scriptx ;:" 2> /dev/null ) == foo ]] || err_exit 'piping into script fails'
[[ $($SHELL -c 'X=1;print -r -- ${X:=$(expr "a(0)" : '"'a*(\([^)]\))')}'" 2> /dev/null) == 1 ]] || err_exit 'x=1;${x:=$(..."...")} failure'
[[ $($SHELL -c 'print -r -- ${X:=$(expr "a(0)" : '"'a*(\([^)]\))')}'" 2> /dev/null) == 0 ]] || err_exit '${x:=$(..."...")} failure'
-exec 3<&-
-if [[ -d /dev/fd && -w /dev/fd/3 ]]
+if cat /dev/fd/3 >/dev/null 2>&1 || whence mkfifo > /dev/null
then [[ $(cat <(print hello) ) == hello ]] || err_exit "process substitution not working outside for or while loop"
$SHELL -c '[[ $(for i in 1;do cat <(print hello);done ) == hello ]]' 2> /dev/null|| err_exit "process substitution not working in for or while loop"
fi
@@ -409,7 +410,7 @@ unset foo
unset foo
foo=$(false) > /dev/null && err_exit 'failed command substitution with redirection not returning false'
expected=foreback
-got=$(print -n fore;(sleep 2;print back)&)
+got=$(print -n fore; (sleep 2;print back)&)
[[ $got == $expected ]] || err_exit "command substitution background process output error -- got '$got', expected '$expected'"
binfalse=$(whence -p false)
@@ -465,18 +466,52 @@ got=$(
( $SHELL -c 'trap : DEBUG; x=( $foo); exit 0') 2> /dev/null || err_exit 'trap DEBUG fails'
-true=$(whence -p true)
+bintrue=$(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 ;}
+done | { read; $bintrue; 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"
+(( (SECONDS-end) > 2 )) && err_exit "pipefail causing $bintrue 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))
+if [[ $bintrue ]]
+then float t0=SECONDS
+ { time sleep 1.5 | $bintrue ;} 2> /dev/null
+ (( (SECONDS-t0) < 1 )) && err_exit 'time not waiting for pipeline to complete'
+fi
+
+cat > $tmp/foo.sh <<- \EOF
+ eval "cat > /dev/null < /dev/null"
+ sleep 1
+EOF
+float sec=SECONDS
+. $tmp/foo.sh | cat > /dev/null
+(( (SECONDS-sec) < .7 )) && err_exit '. script does not restore output redirection with eval'
+
+file=$tmp/foobar
+builtin cat
+for ((n=0; n < 1000; n++))
+do
+ > $file
+ { sleep .001;echo $? >$file;} | cat > /dev/null
+ if [[ ! -s $file ]]
+ then err_exit 'output from pipe is lost with pipe to builtin'
+ break;
+ fi
+done
+
+$SHELL -c 'kill -0 123456789123456789123456789' 2> /dev/null && err_exit 'kill not catching process id overflows'
+
+[[ $($SHELL -c '{ cd..; print ok;}' 2> /dev/null) == ok ]] || err_exit 'command name ending in .. causes shell to abort'
+
+$SHELL -xc '$(LD_LIBRARY_PATH=$LD_LIBRARY_PATH exec $SHELL -c :)' > /dev/null 2>&1 || err_exit "ksh -xc '(name=value exec ksh)' fails with err=$?"
+
+$SHELL 2> /dev/null -c $'for i;\ndo :;done' || err_exit 'for i ; <newline> not vaid'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/bracket.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/bracket.sh
index f43e10ed03..41809f6f1e 100644..100755
--- a/usr/src/lib/libshell/common/tests/bracket.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/bracket.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -43,10 +43,16 @@ fi
if [[ -a $file ]]
then err_exit "-a: $file shouldn't exist"
fi
+if [[ -e $file ]]
+then err_exit "-e: $file shouldn't exist"
+fi
> $file
if [[ ! -a $file ]]
then err_exit "-a: $file should exist"
fi
+if [[ ! -e $file ]]
+then err_exit "-e: $file should exist"
+fi
chmod 777 $file
if [[ ! -r $file ]]
then err_exit "-r: $file should be readable"
@@ -124,7 +130,7 @@ fi
if [[ $file != $tmp/* ]]
then err_exit "$file should match $tmp/*"
fi
-if [[ $file = $tmp'/*' ]]
+if [[ $file == $tmp'/*' ]]
then err_exit "$file should not equal $tmp'/*'"
fi
[[ ! ( ! -z $null && ! -z x) ]] || err_exit "negation and grouping"
@@ -150,7 +156,7 @@ fi
if [[ 'x&' != *'&' ]]
then err_exit " 'x&' does not match '&'* within [[...]]"
fi
-if [[ 'xy' = *'*' ]]
+if [[ 'xy' == *'*' ]]
then err_exit " 'xy' matches *'*' within [[...]]"
fi
if [[ 3 > 4 ]]
@@ -162,7 +168,7 @@ fi
if [[ 3x > 4x ]]
then err_exit '3x < 4x'
fi
-x='bin|dev|?'
+x='@(bin|dev|?)'
cd /
if [[ $(print $x) != "$x" ]]
then err_exit 'extended pattern matching on command arguments'
@@ -320,4 +326,28 @@ x=abc
unset x
[[ ${x[@]+x} ]] && err_exit '${x[@]+x} should be Empty'
unset x y z foo bar
-exit $((Errors))
+
+{ x=$($SHELL -c '[[ (( $# -eq 0 )) ]] && print ok') 2> /dev/null;}
+[[ $x == ok ]] || err_exit '((...)) inside [[...]] not treated as nested ()'
+
+[[ -e /dev/fd/ ]] || err_exit '/dev/fd/ does not exits'
+[[ -e /dev/tcp/ ]] || err_exit '/dev/tcp/ does not exist'
+[[ -e /dev/udp/ ]] || err_exit '/dev/udp/ does not exist'
+[[ -e /dev/xxx/ ]] && err_exit '/dev/xxx/ exists'
+
+$SHELL 2> /dev/null -c '[[(-n foo)]]' || err_exit '[[(-n foo)]] should not require space in front of ('
+
+$SHELL 2> /dev/null -c '[[ "]" == ~(E)[]] ]]' || err_exit 'pattern "~(E)[]]" does not match "]"'
+
+unset var
+[[ -v var ]] && err_exit '[[ -v var ]] should be false after unset var'
+float var
+[[ -v var ]] || err_exit '[[ -v var ]] should be true after float var'
+unset var
+[[ -v var ]] && err_exit '[[ -v var ]] should be false after unset var again'
+
+test ! ! ! 2> /dev/null || err_exit 'test ! ! ! should return 0'
+test ! ! x 2> /dev/null || err_exit 'test ! ! x should return 0'
+test ! ! '' 2> /dev/null && err_exit 'test ! ! "" should return non-zero'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/builtins.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/builtins.sh
index 810551a806..1d24904e76 100644..100755
--- a/usr/src/lib/libshell/common/tests/builtins.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/builtins.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -34,13 +34,13 @@ trap "cd /; rm -rf $tmp" EXIT
# test shell builtin commands
builtin getconf
: ${foo=bar} || err_exit ": failed"
-[[ $foo = bar ]] || err_exit ": side effects failed"
+[[ $foo == bar ]] || err_exit ": side effects failed"
set -- - foobar
-[[ $# = 2 && $1 = - && $2 = foobar ]] || err_exit "set -- - foobar failed"
+[[ $# == 2 && $1 == - && $2 == foobar ]] || err_exit "set -- - foobar failed"
set -- -x foobar
-[[ $# = 2 && $1 = -x && $2 = foobar ]] || err_exit "set -- -x foobar failed"
+[[ $# == 2 && $1 == -x && $2 == foobar ]] || err_exit "set -- -x foobar failed"
getopts :x: foo || err_exit "getopts :x: returns false"
-[[ $foo = x && $OPTARG = foobar ]] || err_exit "getopts :x: failed"
+[[ $foo == x && $OPTARG == foobar ]] || err_exit "getopts :x: failed"
OPTIND=1
getopts :r:s var -r
if [[ $var != : || $OPTARG != r ]]
@@ -74,7 +74,7 @@ false ${foo=bar} && err_exit "false failed"
read <<!
hello world
!
-[[ $REPLY = 'hello world' ]] || err_exit "read builtin failed"
+[[ $REPLY == 'hello world' ]] || err_exit "read builtin failed"
print x:y | IFS=: read a b
if [[ $a != x ]]
then err_exit "IFS=: read ... not working"
@@ -83,11 +83,11 @@ read <<!
hello \
world
!
-[[ $REPLY = 'hello world' ]] || err_exit "read continuation failed"
+[[ $REPLY == 'hello world' ]] || err_exit "read continuation failed"
read -d x <<!
hello worldxfoobar
!
-[[ $REPLY = 'hello world' ]] || err_exit "read builtin failed"
+[[ $REPLY == 'hello world' ]] || err_exit "read builtin failed"
read <<\!
hello \
world \
@@ -168,6 +168,9 @@ fi
if [[ $(print -f "%P" "[^x].*b\$") != '*[!x]*b' ]]
then err_exit 'print -f "%P" not working'
fi
+if [[ $(print -f "%(pattern)q" "[^x].*b\$") != '*[!x]*b' ]]
+then err_exit 'print -f "%(pattern)q" not working'
+fi
if [[ $(abc: for i in foo bar;do print $i;break abc;done) != foo ]]
then err_exit 'break labels not working'
fi
@@ -216,7 +219,7 @@ fi
if [[ $( trap 'print done' EXIT; trap - EXIT) == done ]]
then err_exit 'trap on EXIT not being cleared'
fi
-if [[ $(type test) != 'test is a shell builtin' ]]
+if [[ $(LC_MESSAGES=C type test) != 'test is a shell builtin' ]]
then err_exit 'whence -v test not a builtin'
fi
builtin -d test
@@ -274,8 +277,17 @@ fi
if [[ $(printf '%H\n' $'<>"& \'\tabc') != '&lt;&gt;&quot;&amp;&nbsp;&apos;&#9;abc' ]]
then err_exit 'printf %H not working'
fi
+if [[ $(printf '%(html)q\n' $'<>"& \'\tabc') != '&lt;&gt;&quot;&amp;&nbsp;&apos;&#9;abc' ]]
+then err_exit 'printf %(html)q not working'
+fi
+if [[ $( printf 'foo://ab_c%(url)q\n' $'<>"& \'\tabc') != 'foo://ab_c%3C%3E%22%26%20%27%09abc' ]]
+then err_exit 'printf %(url)q not working'
+fi
if [[ $(printf '%R %R %R %R\n' 'a.b' '*.c' '^' '!(*.*)') != '^a\.b$ \.c$ ^\^$ ^(.*\..*)!$' ]]
-then err_exit 'printf %R not working'
+then err_exit 'printf %T not working'
+fi
+if [[ $(printf '%(ere)q %(ere)q %(ere)q %(ere)q\n' 'a.b' '*.c' '^' '!(*.*)') != '^a\.b$ \.c$ ^\^$ ^(.*\..*)!$' ]]
+then err_exit 'printf %(ere)q not working'
fi
if [[ $(printf '%..:c\n' abc) != a:b:c ]]
then err_exit "printf '%..:c' not working"
@@ -404,6 +416,8 @@ do case $opt in
esac
done
+[[ $($SHELL 2> /dev/null -c 'readonly foo; getopts a: foo -a blah; echo foo') == foo ]] || err_exit 'getopts with readonly variable causes script to abort'
+
unset a
{ read -N3 a; read -N1 b;} <<!
abcdefg
@@ -486,18 +500,18 @@ getconf UNIVERSE - ucb
[[ $($SHELL -c 'echo -3') == -3 ]] || err_exit "echo -3 not working in ucb universe"
typeset -F3 start_x=SECONDS total_t delay=0.02
typeset reps=50 leeway=5
-#sleep $(( 2 * leeway * reps * delay )) |
-#for (( i=0 ; i < reps ; i++ ))
-#do read -N1 -t $delay
-#done
-#(( total_t = SECONDS - start_x ))
-#if (( total_t > leeway * reps * delay ))
-#then err_exit "read -t in pipe taking $total_t secs - $(( reps * delay )) minimum - too long"
-#elif (( total_t < reps * delay ))
-#then err_exit "read -t in pipe taking $total_t secs - $(( reps * delay )) minimum - too fast"
-#fi
-#$SHELL -c 'sleep $(printf "%a" .95)' 2> /dev/null || err_exit "sleep doesn't except %a format constants"
-#$SHELL -c 'test \( ! -e \)' 2> /dev/null ; [[ $? == 1 ]] || err_exit 'test \( ! -e \) not working'
+sleep $(( 2 * leeway * reps * delay )) |
+for (( i=0 ; i < reps ; i++ ))
+do read -N1 -t $delay
+done
+(( total_t = SECONDS - start_x ))
+if (( total_t > leeway * reps * delay ))
+then err_exit "read -t in pipe taking $total_t secs - $(( reps * delay )) minimum - too long"
+elif (( total_t < reps * delay ))
+then err_exit "read -t in pipe taking $total_t secs - $(( reps * delay )) minimum - too fast"
+fi
+$SHELL -c 'sleep $(printf "%a" .95)' 2> /dev/null || err_exit "sleep doesn't except %a format constants"
+$SHELL -c 'test \( ! -e \)' 2> /dev/null ; [[ $? == 1 ]] || err_exit 'test \( ! -e \) not working'
[[ $(ulimit) == "$(ulimit -fS)" ]] || err_exit 'ulimit is not the same as ulimit -fS'
tmpfile=$tmp/file.2
print $'\nprint -r -- "${.sh.file} ${LINENO} ${.sh.lineno}"' > $tmpfile
@@ -505,14 +519,14 @@ print $'\nprint -r -- "${.sh.file} ${LINENO} ${.sh.lineno}"' > $tmpfile
print -r -- "'xxx" > $tmpfile
[[ $($SHELL -c ". $tmpfile"$'\n print ok' 2> /dev/null) == ok ]] || err_exit 'syntax error in dot command affects next command'
-#float sec=$SECONDS del=4
-#exec 3>&2 2>/dev/null
-#$SHELL -c "( sleep 1; kill -ALRM \$\$ ) & sleep $del" 2> /dev/null
-#exitval=$?
-#(( sec = SECONDS - sec ))
-#exec 2>&3-
-#(( exitval )) && err_exit "sleep doesn't exit 0 with ALRM interupt"
-#(( sec > (del - 1) )) || err_exit "ALRM signal causes sleep to terminate prematurely -- expected 3 sec, got $sec"
+float sec=$SECONDS del=4
+exec 3>&2 2>/dev/null
+$SHELL -c "( sleep 1; kill -ALRM \$\$ ) & sleep $del" 2> /dev/null
+exitval=$?
+(( sec = SECONDS - sec ))
+exec 2>&3-
+(( exitval )) && err_exit "sleep doesn't exit 0 with ALRM interupt"
+(( sec > (del - 1) )) || err_exit "ALRM signal causes sleep to terminate prematurely -- expected 3 sec, got $sec"
typeset -r z=3
y=5
for i in 123 z %x a.b.c
@@ -525,4 +539,104 @@ done
[[ $($SHELL -c 'y=3; unset 123 y;print $?$y') == 1 ]] 2> /dev/null || err_exit 'y is not getting unset with unset 123 y'
[[ $($SHELL -c 'trap foo TERM; (trap;(trap) )') == 'trap -- foo TERM' ]] || err_exit 'traps not getting reset when subshell is last process'
-exit $((Errors))
+n=$(printf "%b" 'a\0b\0c' | wc -c)
+(( n == 5 )) || err_exit '\0 not working with %b format with printf'
+
+t=$(ulimit -t)
+[[ $($SHELL -c 'ulimit -v 15000 2>/dev/null; ulimit -t') == "$t" ]] || err_exit 'ulimit -v changes ulimit -t'
+
+$SHELL 2> /dev/null -c 'cd ""' && err_exit 'cd "" not producing an error'
+[[ $($SHELL 2> /dev/null -c 'cd "";print hi') != hi ]] && err_exit 'cd "" should not terminate script'
+
+bincat=$(whence -p cat)
+builtin cat
+out=$tmp/seq.out
+seq 11 >$out
+cmp -s <(print -- "$($bincat<( $bincat $out ) )") <(print -- "$(cat <( cat $out ) )") || err_exit "builtin cat differs from $bincat"
+
+[[ $($SHELL -c '{ printf %R "["; print ok;}' 2> /dev/null) == ok ]] || err_exit $'\'printf %R "["\' causes shell to abort'
+
+v=$( $SHELL -c $'
+ trap \'print "usr1"\' USR1
+ trap exit USR2
+ sleep 1 && {
+ kill -USR1 $$ && sleep 1
+ kill -0 $$ 2>/dev/null && kill -USR2 $$
+ } &
+ sleep 2 | read
+ echo done
+' ) 2> /dev/null
+[[ $v == $'usr1\ndone' ]] || err_exit 'read not terminating when receiving USR1 signal'
+
+mkdir $tmp/tmpdir1
+cd $tmp/tmpdir1
+pwd=$PWD
+cd ../tmpdir1
+[[ $PWD == "$pwd" ]] || err_exit 'cd ../tmpdir1 causes directory to change'
+cd "$pwd"
+mv $tmp/tmpdir1 $tmp/tmpdir2
+cd .. 2> /dev/null || err_exit 'cannot change directory to .. after current directory has been renamed'
+[[ $PWD == "$tmp" ]] || err_exit 'after "cd $tmp/tmpdir1; cd .." directory is not $tmp'
+
+cd "$tmp"
+mkdir $tmp/tmpdir2/foo
+pwd=$PWD
+cd $tmp/tmpdir2/foo
+mv $tmp/tmpdir2 $tmp/tmpdir1
+cd ../.. 2> /dev/null || err_exit 'cannot change directory to ../.. after current directory has been renamed'
+[[ $PWD == "$tmp" ]] || err_exit 'after "cd $tmp/tmpdir2; cd ../.." directory is not $tmp'
+cd "$tmp"
+rm -rf tmpdir1
+
+cd /etc
+cd ..
+[[ $(pwd) == / ]] || err_exit 'cd /etc;cd ..;pwd is not /'
+cd /etc
+cd ../..
+[[ $(pwd) == / ]] || err_exit 'cd /etc;cd ../..;pwd is not /'
+cd /etc
+cd .././..
+[[ $(pwd) == / ]] || err_exit 'cd /etc;cd .././..;pwd is not /'
+cd /usr/bin
+cd ../..
+[[ $(pwd) == / ]] || err_exit 'cd /usr/bin;cd ../..;pwd is not /'
+cd /usr/bin
+cd ..
+[[ $(pwd) == /usr ]] || err_exit 'cd /usr/bin;cd ..;pwd is not /usr'
+cd "$tmp"
+if mkdir $tmp/t1
+then (
+ cd $tmp/t1
+ > real_t1
+ (
+ cd ..
+ mv t1 t2
+ mkdir t1
+ )
+ [[ -f real_t1 ]] || err_exit 'real_t1 not found after parent directory renamed in subshell'
+ )
+fi
+cd "$tmp"
+
+$SHELL +E -i <<- \! && err_exit 'interactive shell should not exit 0 after false'
+ false
+ exit
+!
+
+if kill -L > /dev/null 2>&1
+then [[ $(kill -l HUP) == "$(kill -L HUP)" ]] || err_exit 'kill -l and kill -L are not the same when given a signal name'
+ [[ $(kill -l 9) == "$(kill -L 9)" ]] || err_exit 'kill -l and kill -L are not the same when given a signal number'
+ [[ $(kill -L) == *'9) KILL'* ]] || err_exit 'kill -L output does not contain 9) KILL'
+fi
+
+unset ENV
+v=$($SHELL 2> /dev/null +o rc -ic $'getopts a:bc: opt --man\nprint $?')
+[[ $v == 2* ]] || err_exit 'getopts --man does not exit 2 for interactive shells'
+
+read baz <<< 'foo\\\\bar'
+[[ $baz == 'foo\\bar' ]] || err_exit 'read of foo\\\\bar not getting foo\\bar'
+
+: ~root
+[[ $(builtin) == *.sh.tilde* ]] && err_exit 'builtin contains .sh.tilde'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/case.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/case.sh
index 40a2a32941..7fe01ea880 100644..100755
--- a/usr/src/lib/libshell/common/tests/case.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/case.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -78,4 +78,8 @@ esac') != b ]] && err_exit 'bug in ;& at end of script'
esac
done
') == foo.h ]] || err_exit "optimizer bug"
-exit $((Errors))
+
+x=$($SHELL -ec 'case a in a) echo 1; false; echo 2 ;& b) echo 3;; esac')
+[[ $x == 1 ]] || err_exit 'set -e ignored on case fail through'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/comvar.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/comvar.sh
index 810ceb14c8..0084566f31 100644..100755
--- a/usr/src/lib/libshell/common/tests/comvar.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/comvar.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -457,7 +457,7 @@ typeset -C more_content=(
some_stuff="hello"
)
mica01[4]+=more_content
-expected=$'typeset -C -a mica01=([4]=(a_string=\'foo bar\';some_stuff=hello;))'
+expected=$'typeset -C -a mica01=([4]=(a_string=\'foo bar\';some_stuff=hello))'
[[ $(typeset -p mica01) == "$expected" ]] || err_exit 'appened to indexed array compound variable not working'
unset x
@@ -476,7 +476,7 @@ typeset -C -A hello19=(
two="xtwo 23"
)
)
-expected="typeset -C -A hello19=([19]=(one='xone 19';two='xtwo 19';) [23]=(one='xone 23';two='xtwo 23';))"
+expected="typeset -C -A hello19=([19]=(one='xone 19';two='xtwo 19') [23]=(one='xone 23';two='xtwo 23'))"
[[ $(typeset -p hello19) == "$expected" ]] || print -u2 'typeset -p hello19 incorrect'
expected=$'(\n\tone=\'xone 19\'\n\ttwo=\'xtwo 19\'\n) (\n\tone=\'xone 23\'\n\ttwo=\'xtwo 23\'\n)'
[[ ${hello19[@]} == "$expected" ]] || print -u2 '${hello19[@]} incorrect'
@@ -513,7 +513,7 @@ expected=$'(\n\ttypeset -A subtree=(\n\t\t[a_node]=(\n\t\t\tone=hello\n\t\t\ttwo
typeset -C -A array
float array[12].amount=2.9
-expected='typeset -C -A array=([12]=(typeset -l -E amount=2.9;))'
+expected='typeset -C -A array=([12]=(typeset -l -E amount=2.9))'
[[ $(typeset -p array) == "$expected" ]] || err_exit 'typeset with compound variable with compound variable array not working'
typeset -T foo_t=(
@@ -538,4 +538,157 @@ compound x=(
)
[[ $x == *f=2* ]] || err_exit "The field b containg 'f=2' is missing"
-exit $((Errors))
+unset x
+compound x=(
+ compound -a nodes=(
+ [4]=( )
+ )
+)
+expected='typeset -C x=(typeset -C -a nodes=([4]=());)'
+[[ $(typeset -p x) == "$expected" ]] || err_exit 'typeset -p with nested compound index array not working'
+
+unset v
+compound v=(
+ integer -A ar=(
+ [aa]=4 [bb]=9
+ )
+)
+expected='typeset -C v=(typeset -A -l -i ar=([aa]=4 [bb]=9);)'
+[[ $(typeset -p v) == "$expected" ]] || err_exit 'attributes for associative arrays embedded in compound variables not working'
+
+unset x
+compound -a x
+x[1]=( a=1 b=2 )
+[[ $(print -v x[1]) == "${x[1]}" ]] || err_exit 'print -v x[1] not working for index array of compound variables'
+
+unset x
+z='typeset -a x=(hello (x=12;y=5) world)'
+{ eval "$z" ;} 2> /dev/null
+[[ $(typeset -p x) == "$z" ]] || err_exit "compound assignment '$z' not working"
+
+expected='typeset -C -A l=([4]=(typeset -a ar=(1 2 3);b=1))'
+typeset -A -C l
+printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l[4]
+[[ $(typeset -p l) == "$expected" ]] || err_exit 'read -C for associative array of compound variables not working'
+
+unset x
+compound x=( z="a=b c")
+exp=$'typeset -C x=(z=a\\=\'b c\')'
+got=$(typeset -p x)
+[[ $got == "$exp" ]] || err_exit "typeset -p failed -- expected '$exp', got '$got'"
+
+x=(typeset -C -a y;float z=2)
+got=$(print -C x)
+expected='(typeset -C -a y;typeset -l -E z=2)'
+[[ $expected == "$got" ]] || err_exit "print -C x exects '$expected' got '$got'"
+
+unset vx vy
+compound vx=(
+ compound -a va=(
+ [3][17]=(
+ integer -A ar=( [aa]=4 [bb]=9 )
+ )
+ )
+)
+eval "vy=$(print -C vx)"
+[[ $vx == "$vy" ]] || err_exit 'print -C with multi-dimensional array not working'
+eval "vy=$(print -v vx)"
+[[ $vx == "$vy" ]] || err_exit 'print -v with multi-dimensional array not working'
+
+unset x
+typeset -C -A x=( [0]=(a=1) [1]=(b=2) )
+expected=$'(\n\t[0]=(\n\t\ta=1\n\t)\n\t[1]=(\n\t\tb=2\n\t)\n)'
+[[ $(print -v x) == "$expected" ]] || err_exit 'print -v not formatting correctly'
+
+compound -a x=( [0]=(a=1) [1]=(b=2) )
+typeset -m "z=x[1]"
+[[ $(typeset -p z 2>/dev/null) == 'typeset -C z=(b=2)' ]] || err_exit 'typeset -m not working with commpound -a variable'
+
+unset x z
+compound -A x=( [0]=(a=1) [1]=(b=2) )
+typeset -m "z=x[1]"
+[[ $(typeset -p z 2>/dev/null) == 'typeset -C z=(b=2)' ]] || err_exit 'typeset -m not working with commpound -a variable'
+typeset -m "x[1]=x[0]"
+typeset -m "x[0]=z"
+exp='([0]=(b=2) [1]=(a=1))'
+[[ $(print -C x) == "$exp" ]] || err_exit 'typeset -m not working for associative arrays'
+
+unset z r
+z=(a b c)
+r=(x=3 y=4)
+typeset -m z[1]=r
+exp='typeset -a z=(a (x=3;y=4) c)'
+[[ $(typeset -p z) == "$exp" ]] || err_exit 'moving compound variable into indexed array fails'
+
+unset c
+compound c
+compound -a c.a=( [1]=( aa=1 ) )
+compound -a c.b=( [2]=( bb=2 ) )
+typeset -m "c.b[9]=c.a[1]"
+exp='typeset -C c=(typeset -C -a a;typeset -C -a b=( [2]=(bb=2;)[9]=(aa=1));)'
+[[ $(typeset -p c) == "$exp" ]] || err_exit 'moving compound indexed array element to another index fails'
+
+unset c
+compound c
+compound -a c.a=( [1]=( aa=1 ) )
+compound -A c.b=( [2]=( bb=2 ) )
+typeset -m "c.b[9]=c.a[1]"
+exp='typeset -C c=(typeset -C -a a;typeset -C -A b=( [2]=(bb=2;)[9]=(aa=1));)'
+[[ $(typeset -p c) == "$exp" ]] || err_exit 'moving compound indexed array element to a compound associative array element fails'
+
+zzz=(
+ foo=(
+ bar=4
+ )
+)
+[[ $(set | grep "^zzz\.") ]] && err_exit 'set displays compound variables incorrectly'
+
+typeset -A stats
+stats[1]=(a=1 b=2)
+stats[2]=(a=1 b=2)
+stats[1]=(c=3 d=4)
+(( ${#stats[@]} == 2 )) || err_exit "stats[1] should contain 2 element not ${#stats[@]}"
+
+integer i=1
+foo[i++]=(x=3 y=4)
+[[ ${foo[1].x} == 3 ]] || err_exit "\${foo[1].x} should be 3"
+[[ ${foo[1].y} == 4 ]] || err_exit "\${foo[1].y} should be 4"
+
+# ${!x.} caused core dump in ks93u and earlier
+{ $SHELL -c 'compound x=(y=1); : ${!x.}' ; ((!$?));} || err_exit '${!x.} not working'
+
+$SHELL -c 'typeset -A a=([b]=c)' 2> /dev/null || err_exit 'typeset -A a=([b]=c) fails'
+
+compound -a a
+compound c=( name="container1" )
+a[4]=c
+[[ ${a[4]} == $'(\n\tname=container1\n)' ]] || err_exit 'assignment of compound variable to compound array element not working'
+
+unset c
+compound c
+compound -a c.board
+for ((i=2; i < 4; i++))
+do c.board[1][$i]=(foo=bar)
+done
+exp=$'(\n\ttypeset -C -a board=(\n\t\t[1]=(\n\t\t\t[2]=(\n\t\t\t\tfoo=bar\n\t\t\t)\n\t\t\t[3]=(\n\t\t\t\tfoo=bar\n\t\t\t)\n\t\t)\n\t)\n)'
+[[ "$(print -v c)" == "$exp" ]] || err_exit 'compound variable assignment to two dimensional array not working'
+
+unset zz
+zz=()
+zz.[foo]=abc
+zz.[2]=def
+exp='typeset -C zz=([2]=def;foo=abc)'
+[[ $(typeset -p zz) == "$exp" ]] || err_exit 'expansion of compound variables with non-identifiers not working'
+(
+ typeset -i zz.[3]=123
+ exec 2>& 3-
+ exp='typeset -C zz=([2]=def;typeset -i [3]=123;foo=abc)'
+ [[ $(typeset -p zz) == "$exp" ]] || err_exit 'expansion of compound variables with non-identifiers not working in subshells'
+) 3>&2 2> /dev/null || err_exit 'syntax errors expansion of compound variables with non-identifiers'
+
+unset xx
+xx=(foo=bar)
+xx=()
+[[ $xx == $'(\n)' ]] || err_exit 'xx=() not unsetting previous value'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/comvario.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/comvario.sh
new file mode 100755
index 0000000000..beee2adadf
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/comvario.sh
@@ -0,0 +1,686 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Roland Mainz <roland.mainz@nrubsig.org> #
+# #
+########################################################################
+
+# test setup
+function err_exit
+{
+ print -u2 -n '\t'
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors++ ))
+}
+alias err_exit='err_exit $LINENO'
+
+# "nounset" disabled for now
+#set -o nounset
+Command=${0##*/}
+integer Errors=0 HAVE_signbit=0
+
+if typeset -f .sh.math.signbit >/dev/null && (( signbit(-NaN) ))
+then HAVE_signbit=1
+else print -u2 "$0: warning: -lm does not support signbit(-NaN)"
+fi
+
+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
+}
+
+# compound variable "cat" nr.1, using $ print "%B\n" ... #
+function cpvcat1
+{
+ set -o errexit
+ compound tmp
+
+ while read -C tmp ; do printf '%B\n' tmp ; done
+ return 0
+}
+
+# compound variable "cat" nr.2, using $ print "%#B\n" ... #
+function cpvcat2
+{
+ set -o errexit
+ compound tmp
+
+ while read -C tmp ; do printf '%#B\n' tmp ; done
+ return 0
+}
+
+# compound variable "cat" nr.3, using $ print -C ... #
+function cpvcat3
+{
+ set -o errexit
+ compound tmp
+
+ while read -C tmp ; do print -C tmp ; done
+ return 0
+}
+
+# compound variable "cat" nr.4, using $ print -v ... #
+function cpvcat4
+{
+ set -o errexit
+ compound tmp
+
+ while read -C tmp ; do print -v tmp ; done
+ return 0
+}
+
+typeset s
+
+# Test 1:
+# Check whether "read -C" leaves the file pointer at the next line
+# (and does not read beyond that point).
+# Data layout is:
+# -- snip --
+# <compound var>
+# hello
+# -- snip --
+# (additionally we test some extra stuff like bracket count)
+s=${
+ compound x=(
+ a=1 b=2
+ typeset -a myarray=( 1 2 3 4 5 6 7 8 9 10 )
+ typeset -A myarray2=( [a]=1 [b]=2 ["c d"]=3 [e]=4 ["f"]=5 [g]=6 [h]=7 [i]=8 [j]=9 [k]=10 )
+ typeset -A myarray3=(
+ [a]=(
+ float m1=0.5
+ float m2=0.6
+ foo="hello"
+ )
+ [b]=(
+ foo="bar"
+ )
+ ["c d"]=(
+ integer at=90
+ )
+ [e]=(
+ compound nested_cpv=(
+ typeset -a myarray=( 1 2 3 4 5 6 7 8 9 10 )
+ typeset str=$'a \'string'
+ )
+ )
+ [f]=(
+ typeset g="f"
+ )
+ [a_nan]=(
+ float my_nan=-nan
+ )
+ [a_hexfloat]=(
+ typeset -X my_hexfloat=1.1
+ )
+ )
+ )
+
+ {
+ printf "%B\n" x
+ print "hello"
+ } | cpvcat1 | cpvcat2 | cpvcat3 | cpvcat4 | {
+ read -C y
+ read s
+ }
+ print "x${s}x"
+} || err_exit "test returned exit code $?"
+
+[[ "${s}" == "xhellox" ]] || err_exit "Expected 'xhellox', got ${s}"
+count_brackets "$y" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -v y)" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -C y)" || err_exit "y: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+
+# cleanup
+unset x y || err_exit "unset failed"
+[[ "$x" == '' ]] || err_exit "cleanup failed for x"
+[[ "$y" == '' ]] || err_exit "cleanup failed for y"
+
+
+# Test 2:
+# Same as test 1 except one more compound var following the "hello"
+# line.
+# Data layout is:
+# -- snip --
+# <compound var>
+# hello
+# <compound var>
+# -- snip --
+s=${
+ compound x=(
+ a=1 b=2
+ typeset -a myarray=( 1 2 3 4 5 6 7 8 9 10 )
+ typeset -A myarray2=( [a]=1 [b]=2 ["c d"]=3 [e]=4 ["f"]=5 [g]=6 [h]=7 [i]=8 [j]=9 [k]=10 )
+ compound -A myarray3=(
+ [a]=(
+ float m1=0.5
+ float m2=0.6
+ foo="hello"
+ )
+ [b]=(
+ foo="bar"
+ )
+ ["c d"]=(
+ integer at=90
+ )
+ [e]=(
+ compound nested_cpv=(
+ typeset -a myarray=( 1 2 3 4 5 6 7 8 9 10 )
+ typeset str=$'a \'string'
+ )
+ )
+ [f]=(
+ typeset g="f"
+ )
+ [a_nan]=(
+ float my_nan=-nan
+ )
+ [a_hexfloat]=(
+ typeset -X my_hexfloat=1.1
+ )
+ )
+ )
+
+ {
+ printf "%B\n" x
+ print "hello"
+ printf "%B\n" x
+ } | cpvcat1 | cpvcat2 | cpvcat3 | cpvcat4 | {
+ read -C y1
+ read s
+ read -C y2
+ }
+
+ print "x${s}x"
+} || err_exit "test returned exit code $?"
+
+[[ "${s}" == "xhellox" ]] || err_exit "Expected 'xhellox', got ${s}."
+[[ "${y1.myarray3[b].foo}" == "bar" ]] || err_exit "y1.myarray3[b].foo != bar"
+[[ "${y2.myarray3[b].foo}" == "bar" ]] || err_exit "y2.myarray3[b].foo != bar"
+[[ "$y1" != "" ]] || err_exit "y1 is empty"
+[[ "$y2" != "" ]] || err_exit "y2 is empty"
+(( ${#y1.myarray3[e].nested_cpv.myarray[@]} == 10 )) || err_exit "Expected 10 elements in y1.myarray3[e].nested_cpv, got ${#y1.myarray3[e].nested_cpv[@]}"
+(( ${#y2.myarray3[e].nested_cpv.myarray[@]} == 10 )) || err_exit "Expected 10 elements in y2.myarray3[e].nested_cpv, got ${#y2.myarray3[e].nested_cpv[@]}"
+(( isnan(y1.myarray3[a_nan].my_nan) )) || err_exit "y1.myarray3[a_nan].my_nan not a NaN"
+(( isnan(y2.myarray3[a_nan].my_nan) )) || err_exit "y2.myarray3[a_nan].my_nan not a NaN"
+if (( HAVE_signbit ))
+then (( signbit(y1.myarray3[a_nan].my_nan) )) || err_exit "y1.myarray3[a_nan].my_nan not negative"
+ (( signbit(y2.myarray3[a_nan].my_nan) )) || err_exit "y2.myarray3[a_nan].my_nan not negative"
+fi
+count_brackets "$y1" || err_exit "y1: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -v y1)" || err_exit "y1: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -C y1)" || err_exit "y1: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$y2" || err_exit "y2: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -v y2)" || err_exit "y2: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -C y2)" || err_exit "y2: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+[[ "$y1" == "$y2" ]] || err_exit "Expected $(printf "%q\n" "${y1}") == $(printf "%q\n" "${y2}")."
+[[ "$x" == "$y1" ]] || err_exit "Expected $(printf "%q\n" "${x}") == $(printf "%q\n" "${y1}")."
+
+# cleanup
+unset x y1 y2 || err_exit "unset failed"
+[[ "$x" == '' ]] || err_exit "cleanup failed for x"
+[[ "$y1" == '' ]] || err_exit "cleanup failed for y1"
+[[ "$y2" == '' ]] || err_exit "cleanup failed for y2"
+
+
+# Test 3: Test compound variable copy operator vs. "read -C"
+compound x=(
+ a=1 b=2
+ typeset -a myarray=( 1 2 3 4 5 6 7 8 9 10 )
+ typeset -A myarray2=( [a]=1 [b]=2 ["c d"]=3 [e]=4 ["f"]=5 [g]=6 [h]=7 [i]=8 [j]=9 [k]=10 )
+ compound -A myarray3=(
+ [a]=(
+ float m1=0.5
+ float m2=0.6
+ foo="hello"
+ )
+ [b]=(
+ foo="bar"
+ )
+ ["c d"]=(
+ integer at=90
+ )
+ [e]=(
+ compound nested_cpv=(
+ typeset -a myarray=( 1 2 3 4 5 6 7 8 9 10 )
+ typeset str=$'a \'string'
+ )
+ )
+ [f]=(
+ typeset g="f"
+ )
+ [a_nan]=(
+ float my_nan=-nan
+ )
+ [a_hexfloat]=(
+ typeset -X my_hexfloat=1.1
+ )
+ )
+)
+
+compound x_copy=x || err_exit "x_copy copy failed"
+[[ "${x_copy}" != "" ]] || err_exit "x_copy should not be empty"
+count_brackets "${x_copy}" || err_exit "x_copy: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -v x_copy)" || err_exit "x_copy: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -C x_copy)" || err_exit "x_copy: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+
+compound nested_cpv_copy
+
+nested_cpv_copy=x.myarray3[e].nested_cpv || err_exit "x.myarray3[e].nested_cpv copy failed"
+(( ${#nested_cpv_copy.myarray[@]} == 10 )) || err_exit "Expected 10 elements in nested_cpv_copy.myarray, got ${#nested_cpv_copy.myarray[@]}"
+
+# unset branch "x.myarray3[e].nested_cpv" of the variable tree "x" ...
+unset x.myarray3[e].nested_cpv || err_exit "unset x.myarray3[e].nested_cpv failed"
+[[ "${x.myarray3[e].nested_cpv}" == "" ]] || err_exit "x.myarray3[e].nested_cpv still has a value"
+
+# ... and restore it from the saved copy
+printf "%B\n" nested_cpv_copy | cpvcat1 | cpvcat2 | cpvcat3 | cpvcat4 | read -C x.myarray3[e].nested_cpv || err_exit "read failed"
+
+# compare copy of the original tree and the modified one
+[[ "${x}" == "${x_copy}" ]] || err_exit "x != x_copy"
+count_brackets "${x}" || err_exit "x: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -v x)" || err_exit "x: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+count_brackets "$(print -C x)" || err_exit "x: bracket open ${bracketstat.bopen} != bracket close ${bracketstat.bclose}"
+(( ${#x.myarray3[e].nested_cpv.myarray[@]} == 10 )) || err_exit "Expected 10 elements in x.myarray3[e].nested_cpv, got ${#x.myarray3[e].nested_cpv[@]}"
+(( isnan(x.myarray3[a_nan].my_nan) )) || err_exit "x.myarray3[a_nan].my_nan not a NaN"
+if (( HAVE_signbit ))
+then (( signbit(x.myarray3[a_nan].my_nan) )) || err_exit "x.myarray3[a_nan].my_nan not negative"
+fi
+
+# cleanup
+unset x x_copy nested_cpv_copy || err_exit "unset failed"
+
+
+# Test 4: Test "read -C" failure for missing bracket at the end
+typeset s
+s=$($SHELL -c 'compound myvar ; print "( unfinished=1" | read -C myvar 2>'/dev/null' || print "error $?"') || err_exit 'shell failed'
+[[ "$s" == 'error 3' ]] || err_exit "compound_read: expected error 3, got ${s}"
+
+
+# Test 5: Test "read -C" failure for missing bracket at the beginning
+typeset s
+s=$($SHELL -c 'compound myvar ; print " unfinished=1 )" | read -C myvar 2>'/dev/null' || print "error $?"') || err_exit 'shell failed'
+[[ "$s" == 'error 3' ]] || err_exit "compound_read: expected error 3, got ${s}"
+
+
+# test6: Derived from the test2 for CR #6944386
+# ("compound v=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; print -C v prints trash")
+# which caused compound variables to be corrupted like this:
+# -- snip --
+# ksh93 -c 'compound v=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; print -v v'
+# (
+# typeset -A -l -i ar=(
+# [aa]=$'\004'
+# [bb]=$'\t'
+# )
+# )
+# -- snip --
+
+function test6
+{
+ compound out=( typeset stdout stderr ; integer res )
+ compound val
+ integer testid
+
+ compound -r -a tests=(
+ # subtests1:
+ ( cmd='compound v=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; print -C v' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='ar' )
+ ( cmd='compound v=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; print -C v' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='ar' )
+ ( cmd='compound v=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; print -C v' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='ar' )
+ ( cmd='compound v=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; print -v v' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='ar' )
+ ( cmd='compound v=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; print -v v' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='ar' )
+ ( cmd='compound v=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; print -v v' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='ar' )
+
+ # subtests2: Same as subtests1 but variable "v" is inside "vx"
+ ( cmd='compound vx=( compound v=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='v.ar' )
+ ( cmd='compound vx=( compound v=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='v.ar' )
+ ( cmd='compound vx=( compound v=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='v.ar' )
+ ( cmd='compound vx=( compound v=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='v.ar' )
+ ( cmd='compound vx=( compound v=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='v.ar' )
+ ( cmd='compound vx=( compound v=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='v.ar' )
+
+ # subtests3: Same as subtests1 but variable "va" is an indexed array
+ ( cmd='compound vx=( compound -a va=( [3]=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[3].ar' )
+ ( cmd='compound vx=( compound -a va=( [3]=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[3].ar' )
+ ( cmd='compound vx=( compound -a va=( [3]=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='va[3].ar' )
+ ( cmd='compound vx=( compound -a va=( [3]=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[3].ar' )
+ ( cmd='compound vx=( compound -a va=( [3]=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[3].ar' )
+ ( cmd='compound vx=( compound -a va=( [3]=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='va[3].ar' )
+
+ # subtests4: Same as subtests1 but variable "va" is an 2d indexed array
+ ( cmd='compound vx=( compound -a va=( [3][17]=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[3][17].ar' )
+ ( cmd='compound vx=( compound -a va=( [3][17]=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[3][17].ar' )
+ ( cmd='compound vx=( compound -a va=( [3][17]=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='va[3][17].ar' )
+ ( cmd='compound vx=( compound -a va=( [3][17]=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[3][17].ar' )
+ ( cmd='compound vx=( compound -a va=( [3][17]=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[3][17].ar' )
+ ( cmd='compound vx=( compound -a va=( [3][17]=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='va[3][17].ar' )
+
+ # subtests5: Same as subtests1 but variable "va" is an associative array
+ ( cmd='compound vx=( compound -A va=( [l]=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[l].ar' )
+ ( cmd='compound vx=( compound -A va=( [l]=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[l].ar' )
+ ( cmd='compound vx=( compound -A va=( [l]=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -C vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='va[l].ar' )
+ ( cmd='compound vx=( compound -A va=( [l]=( integer -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[l].ar' )
+ ( cmd='compound vx=( compound -A va=( [l]=( float -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=9.*)&(.*\\[aa\\]=4.*)' arrefname='va[l].ar' )
+ ( cmd='compound vx=( compound -A va=( [l]=( typeset -A ar=( [aa]=4 [bb]=9 ) ; ) ; ) ; ) ; print -v vx' stdoutpattern=$'~(Alr)(.*\\[bb\\]=["\']*9.*)&(.*\\[aa\\]=["\']*4.*)' arrefname='va[l].ar' )
+ )
+
+ for testid in "${!tests[@]}" ; do
+ nameref test=tests[testid]
+ typeset testname="test2/${testid}"
+
+ out.stderr="${ { out.stdout="${ ${SHELL} -c "${test.cmd}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+
+ (( out.res == 0 )) || err_exit "${testname}: Test shell returned with exit code ${out.res}"
+ [[ "${out.stdout}" == ${test.stdoutpattern} ]] || err_exit "${testname}: Expected match for ${test.stdoutpattern}, got $(printf "%q\n" "${out.stdout}")"
+ [[ "${out.stderr}" == "" ]] || err_exit "${testname}: Expected empty stderr, got $(printf "%q\n" "${out.stderr}")"
+
+ read -C val <<<"${out.stdout}" || err_exit "${testname}: read -C val failed with exit code $?"
+ nameref ar="val.${test.arrefname}"
+ (( ar[aa] == 4 )) || err_exit "${testname}: Expected ar[aa] == 4, got ${ar[aa]}"
+ (( ar[bb] == 9 )) || err_exit "${testname}: Expected ar[bb] == 9, got ${ar[bb]}"
+ done
+
+ return 0
+}
+
+test6
+
+function test_3D_array_read_C
+{
+ compound out=( typeset stdout stderr ; integer res )
+ integer i
+ typeset -r -a tests=(
+ # ast-ksh.2010-03-09 will print "ksh93[1]: read: line 4: 0[0]: invalid variable name" for 3D arrays passed to read -C
+ 'compound c=( typeset -a x ) ; for (( i=0 ; i < 3 ; i++ )) ; do for (( j=0 ; j < 3 ; j++ )) ; do for (( k=0 ; k < 3 ; k++ )) ; do c.x[i][j][k]="$i$j$k" ; done; done; done ; unset c.x[2][0][1] ; print -v c | read -C dummy'
+
+ # same test, 4D, fails with 'ksh[1]: read: line 4: 0: invalid variable name'
+ 'compound c=( typeset -a x ) ; for (( i=0 ; i < 3 ; i++ )) ; do for (( j=0 ; j < 3 ; j++ )) ; do for (( k=0 ; k < 3 ; k++ )) ; do for (( l=0 ; l < 3 ; l++ )) ; do c.x[i][j][k][l]="$i$j$k$l" ; done; done; done ; done ; unset c.x[2][0][1][2] ; print -v c | read -C dummy'
+ )
+
+ for (( i=0 ; i < ${#tests[@]} ; i++ )) ; do
+ out.stderr="${ { out.stdout="${ ${SHELL} -o nounset -c "${tests[i]}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+
+ [[ "${out.stdout}" == '' ]] || err_exit "$0/${i}: Expected empty stdout, got $(printf '%q\n' "${out.stdout}")"
+ [[ "${out.stderr}" == '' ]] || err_exit "$0/${i}: Expected empty stderr, got $(printf '%q\n' "${out.stderr}")"
+ done
+
+ return 0
+}
+
+
+function test_access_2Darray_in_type_in_compound
+{
+ compound out=( typeset stdout stderr ; integer res )
+ integer i
+ typeset -r -a tests=(
+ # ast-ksh.2010-03-09 will print 'ksh: line 1: l.c.x[i][j]=: no parent'
+ 'typeset -T c_t=(typeset -a x) ; compound l=( c_t c ) ; for ((i=0;i<3;i++));do for ((j=0;j<3;j++));do l.c.x[i][j]="" ; done; done; print -v l | read -C dummy'
+ )
+
+ for (( i=0 ; i < ${#tests[@]} ; i++ )) ; do
+ out.stderr="${ { out.stdout="${ ${SHELL} -o nounset -c "${tests[i]}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+
+ [[ "${out.stdout}" == '' ]] || err_exit "$0/${i}: Expected empty stdout, got $(printf '%q\n' "${out.stdout}")"
+ [[ "${out.stderr}" == '' ]] || err_exit "$0/${i}: Expected empty stderr, got $(printf '%q\n' "${out.stderr}")"
+ done
+
+ return 0
+}
+
+function test_read_type_crash
+{
+ compound out=( typeset stdout stderr ; integer res )
+ typeset -r test='
+typeset -T field_t=(
+ typeset -a f
+
+ function reset
+ {
+ integer i j
+
+ for (( i=0 ; i < 3 ; i++ )) ; do
+ for (( j=0 ; j < 3 ; j++ )) ; do
+ _.f[i][j]=""
+ done
+ done
+ return 0
+ }
+
+ function enumerate_empty_fields
+ {
+ integer i j
+
+ for (( i=0 ; i < 3 ; i++ )) ; do
+ for (( j=0 ; j < 3 ; j++ )) ; do
+ [[ "${_.f[i][j]}" == "" ]] && printf "[%d][%d]\n" i j
+ done
+ done
+ return 0
+ }
+
+ function setf
+ {
+ _.f[$1][$2]="$3"
+ }
+)
+
+set -o nounset
+
+compound c1=( field_t x )
+
+c1.x.reset
+
+print -v c1 | read -C c2
+print -v c2
+'
+
+ out.stderr="${ { out.stdout="${ ${SHELL} -o nounset -c "${test}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+
+ [[ "${out.stdout}" != '' ]] || err_exit "$0: Expected nonempty stdout."
+ [[ "${out.stderr}" == '' ]] || err_exit "$0: Expected empty stderr, got $(printf '%q\n' "${out.stderr}")"
+
+ if [[ -f 'core' && -x '/usr/bin/pstack' ]] ; then
+ pstack 'core'
+ rm 'core'
+ fi
+
+ return 0
+}
+
+
+function test_read_C_into_array
+{
+ compound out=( typeset stdout stderr ; integer res )
+ # fixme:
+ # - The tests should cover 3D and 5D indexed arrays and namerefs to sub-dimensions of a 5D indexed array
+ compound -r -a tests=(
+ ( cmd=' typeset -a -C l ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l[4] ; print -v l' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)' ) )
+ ( cmd=' typeset -a -C l ; nameref l4=l[4] ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4 ; print -v l' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)' ) )
+
+ ( cmd=' typeset -a -C l ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l[4][6] ; print -v l' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)&(.+\[6\].+)' ) )
+ ( cmd=' typeset -a -C l ; nameref l4=l[4][6] ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4 ; print -v l' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)&(.+\[6\].+)' ) )
+
+ ( cmd=' typeset -a -C l ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l[4][6][9][11][15] ; print -v l' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)&(.+\[6\].+)' '~(X)(.+\[9\].+)&(.+\[11\].+)&(.+\[15\].+)' ) )
+ ( cmd=' typeset -a -C l ; nameref l4=l[4][6][9][11][15] ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4 ; print -v l' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)&(.+\[6\].+)' '~(X)(.+\[9\].+)&(.+\[11\].+)&(.+\[15\].+)' ) )
+
+ ( cmd=' typeset -A -C l ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l[4] ; print -v l' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)' ) )
+ ( cmd=' typeset -A -C l ; nameref l4=l[4] ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4 ; print -v l' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)' ) )
+ ( cmd='compound c ; typeset -a -C c.l ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C c.l[4] ; print -v c' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)' ) )
+ ( cmd='compound c ; typeset -a -C c.l ; nameref l4=c.l[4] ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4 ; print -v c' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)' ) )
+
+ ( cmd='compound c ; typeset -a -C c.l ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C c.l[4][6] ; print -v c' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)&(.+\[6\].+)' ) )
+ ( cmd='compound c ; typeset -a -C c.l ; nameref l4=c.l[4][6] ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4 ; print -v c' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)&(.+\[6\].+)' ) )
+
+ ( cmd='compound c ; typeset -a -C c.l ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C c.l[4][6][9][11][15] ; print -v c' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)&(.+\[6\].+)' '~(X)(.+\[9\].+)&(.+\[11\].+)&(.+\[15\].+)' ) )
+ ( cmd='compound c ; typeset -a -C c.l ; nameref l4=c.[4][6][9][11][15] ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4 ; print -v c' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)&(.+\[6\].+)' '~(X)(.+\[9\].+)&(.+\[11\].+)&(.+\[15\].+)' ) )
+
+ ( cmd='compound c ; typeset -A -C c.l ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C c.l[4] ; print -v c' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)' ) )
+ ( cmd='compound c ; typeset -A -C c.l ; nameref l4=c.l[4] ; printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4 ; print -v c' typeset -a stdoutpattern=( '~(X)(.+b=1.+)&(.+\[4\].+)' ) )
+ )
+ typeset cmd
+ typeset pat
+ integer i
+
+ compound -a test_variants
+
+ # build list of variations of the tests above
+ for (( i=0 ; i < ${#tests[@]} ; i++ )) ; do
+ nameref tst=tests[i]
+
+ # plain test
+ cmd="${tst.cmd}"
+ test_variants+=( testname="${0}/${i}/plain" cmd="$cmd" typeset -a stdoutpattern=( "${tst.stdoutpattern[@]}" ) )
+
+ # test with "read -C" in a function
+ cmd="${tst.cmd/~(E)read[[:space:]]+-C[[:space:]]+([[:alnum:]]+)[[:space:]]+\;/{ function rf { nameref val=\$1 \; read -C val \; } \; rf \1 \; } \; }"
+ test_variants+=( testname="${0}/${i}/read_in_function" cmd="$cmd" typeset -a stdoutpattern=( "${tst.stdoutpattern[@]}" ) )
+
+ # test with "read -C" in a nested function
+ cmd="${tst.cmd/~(E)read[[:space:]]+-C[[:space:]]+([[:alnum:]]+)[[:space:]]+\;/{ function rf2 { nameref val=\$1 \; read -C val \; } \; function rf { nameref val=\$1 \; rf2 val \; } \; rf \1 \; } \; }"
+ test_variants+=( testname="${0}/${i}/read_in_nested_function" cmd="$cmd" typeset -a stdoutpattern=( "${tst.stdoutpattern[@]}" ) )
+
+ # test with "read -C" in a nested function with target variable
+ # being a function-local variable of function "main"
+ cmd='function rf2 { nameref val=$1 ; read -C val ; } ; function rf { nameref val=$1 ; rf2 val ; } ; function main { '
+ cmd+="${tst.cmd/~(E)read[[:space:]]+-C[[:space:]]+([[:alnum:]]+)[[:space:]]+\;/rf \1 \; }"
+ cmd+=' ; } ; main'
+ test_variants+=( testname="${0}/${i}/read_into_localvar_in_nested_function" cmd="$cmd" typeset -a stdoutpattern=( "${tst.stdoutpattern[@]}" ) )
+ done
+
+ # run test variants
+ for (( i=0 ; i < ${#test_variants[@]} ; i++ )) ; do
+ nameref tv=test_variants[i]
+
+ out.stderr="${ { out.stdout="${ ${SHELL} -o nounset -o errexit -c "${tv.cmd}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+
+ for pat in "${tv.stdoutpattern[@]}" ; do
+ [[ "${out.stdout}" == ${pat} ]] || err_exit "${tv.testname}: Expected stdout of $(printf '%q\n' "${tv.cmd}") to match $(printf '%q\n' "${pat}"), got $(printf '%q\n' "${out.stdout}")"
+ done
+ [[ "${out.stderr}" == '' ]] || err_exit "${tv.testname}: Expected empty stderr for $(printf '%q\n' "${tv.cmd}"), got $(printf '%q\n' "${out.stderr}")"
+ (( out.res == 0 )) || err_exit "${tv.testname}: Unexpected exit code ${out.res} for $(printf '%q\n' "${tv.cmd}")"
+ done
+
+ return 0
+}
+
+
+# This test checks whether reading a compound variable value with
+# "read -C var" which contains special shell keywords or aliases
+# like "functions", "alias", "!" etc. in a string array causes the
+# shell to produce errors like this:
+# -- snip --
+# $ ksh93 -c 'print "( compound -A a1=( [4]=( typeset -a x=( alias ) ) ) ;
+# compound -A a2=( [4]=( typeset -a x=( ! ! ! alias ) ) ) )" | read -C c ; print -v c' 1>/dev/null
+# ksh93[1]: alias: c.a1[4].x: compound assignment requires sub-variable name
+# -- snip --
+# A 2nd issue indirectly tested here was that simple indexed string array
+# declarations in a function with the same special keywords did not work
+# either.
+# This happened in ast-ksh.2010-11-12 or older.
+function test_read_C_special_shell_keywords
+{
+ typeset -r -a testcmdpatterns=(
+ # this was the original testcase
+ 'print "( compound -A a1=( [4]=( typeset -a x=( %keyword% ) ) ) ; compound -A a2=( [4]=( typeset -a x=( ! ! ! alias ) ) ) )" | read -C c ; print "X${c.a1[4].x[0]}X"'
+ # same as above but uses indexed arrays instead of associative arrays
+ 'print "( compound -a a1=( [4]=( typeset -a x=( %keyword% ) ) ) ; compound -a a2=( [4]=( typeset -a x=( ! ! ! alias ) ) ) )" | read -C c ; print "X${c.a1[4].x[0]}X"'
+ # same as first testcase but uses a blank in the array index value
+ $'print "( compound -A a1=( [\'hello world\']=( typeset -a x=( %keyword% ) ) ) ; compound -A a2=( [\'hello world\']=( typeset -a x=( ! ! ! alias ) ) ) )" | read -C c ; print "X${c.a1[\'hello world\'].x[0]}X"'
+ )
+ typeset -r -a shell_special_words=(
+ 'alias'
+ 'compound'
+ 'function'
+ 'functions'
+ 'integer'
+ 'local'
+ 'namespace'
+ 'typeset'
+ 'SECONDS'
+ '.sh.version'
+ '!'
+ )
+ integer spwi # shell_special_words index
+ integer tcpi # testcmdpatterns index
+ typeset testcmd
+ typeset testname
+ typeset shkeyword
+ compound out=( typeset stdout stderr ; integer res )
+
+ for (( tcpi=0 ; tcpi < ${#testcmdpatterns[@]} ; tcpi++ )) ; do
+ for (( spwi=0 ; spwi < ${#shell_special_words[@]} ; spwi++ )) ; do
+ shkeyword=${shell_special_words[spwi]}
+ testcmd="${testcmdpatterns[tcpi]//%keyword%/${shkeyword}}"
+ testname="${0}/${tcpi}/${spwi}/"
+
+ out.stderr="${ { out.stdout="${ ${SHELL} -o nounset -o errexit -c "${testcmd}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+
+ [[ "${out.stdout}" == "X${shkeyword}X" ]] || err_exit "${testname}: Expected stdout to match $(printf '%q\n' "X${shkeyword}X"), got $(printf '%q\n' "${out.stdout}")"
+ [[ "${out.stderr}" == '' ]] || err_exit "${testname}: Expected empty stderr, got $(printf '%q\n' "${out.stderr}")"
+ (( out.res == 0 )) || err_exit "${testname}: Unexpected exit code ${out.res}"
+ done
+ done
+
+ return 0
+}
+
+
+test_3D_array_read_C
+test_access_2Darray_in_type_in_compound
+test_read_type_crash
+test_read_C_into_array
+test_read_C_special_shell_keywords
+
+
+# tests done
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/coprocess.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/coprocess.sh
new file mode 100755
index 0000000000..2b0b50d0e0
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/coprocess.sh
@@ -0,0 +1,368 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+# test the behavior of co-processes
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ let Errors+=1
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+
+tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
+trap "cd /; rm -rf $tmp" EXIT
+
+if [[ -d /cygdrive ]]
+then err_exit cygwin detected - coprocess tests disabled - enable at the risk of wedging your system
+ exit $((Errors))
+fi
+
+bintrue=$(whence -p true)
+
+function ping # id
+{
+ integer x=0
+ while ((x++ < 5))
+ do read -r
+ print -r "$1 $REPLY"
+ done
+}
+
+bincat=$(whence -p cat)
+builtin cat
+
+for cat in cat $bincat
+do
+
+ $cat |&
+ print -p "hello"
+ read -p line
+ [[ $line == hello ]] || err_exit "$cat coprocessing fails"
+ exec 5>&p 6<&p
+ print -u5 'hello again' || err_exit "write on $cat coprocess u5 fails"
+ read -u6 line
+ [[ $line == 'hello again' ]] || err_exit "$cat coprocess after moving fds fails"
+ exec 5<&- 6<&-
+ wait $!
+
+ ping three |&
+ exec 3>&p
+ ping four |&
+ exec 4>&p
+ ping pipe |&
+
+ integer count
+ for i in three four pipe four pipe four three pipe pipe three pipe
+ do case $i in
+ three) to=-u3;;
+ four) to=-u4;;
+ pipe) to=-p;;
+ esac
+ (( count++ ))
+ print $to $i $count
+ done
+
+ while ((count > 0))
+ do (( count-- ))
+ read -p
+ set -- $REPLY
+ if [[ $1 != $2 ]]
+ then err_exit "$cat coprocess $1 does not match $2"
+ fi
+ case $1 in
+ three) ;;
+ four) ;;
+ pipe) ;;
+ *) err_exit "$cat coprocess unknown message +|$REPLY|+" ;;
+ esac
+ done
+ kill $(jobs -p) 2>/dev/null
+
+ file=$tmp/regress
+ $cat > $file <<-!
+ $cat |&
+ !
+ chmod +x $file
+ sleep 10 |&
+ $file 2> /dev/null || err_exit "parent $cat coprocess prevents script coprocess"
+ exec 5<&p 6>&p
+ exec 5<&- 6>&-
+ kill $(jobs -p) 2>/dev/null
+
+ ${SHELL-ksh} |&
+ cop=$!
+ exp=Done
+ print -p $'print hello | '$cat$'\nprint '$exp
+ read -t 5 -p
+ read -t 5 -p
+ got=$REPLY
+ if [[ $got != $exp ]]
+ then err_exit "${SHELL-ksh} $cat coprocess io failed -- got '$got', expected '$exp'"
+ fi
+ exec 5<&p 6>&p
+ exec 5<&- 6>&-
+ { sleep 4; kill $cop; } 2>/dev/null &
+ spy=$!
+ if wait $cop 2>/dev/null
+ then kill $spy 2>/dev/null
+ else err_exit "$cat coprocess hung after 'exec 5<&p 6>&p; exec 5<&- 6>&-'"
+ fi
+ wait
+
+ {
+ echo line1 | grep 'line2'
+ echo line2 | grep 'line1'
+ } |&
+ SECONDS=0 count=0
+ while read -p -t 10 line
+ do ((count++))
+ done
+ if (( SECONDS > 8 ))
+ then err_exit "$cat coprocess read -p hanging (SECONDS=$SECONDS count=$count)"
+ fi
+ wait $!
+
+ ( sleep 3 |& sleep 1 && kill $!; sleep 1; sleep 3 |& sleep 1 && kill $! ) ||
+ err_exit "$cat coprocess cleanup not working correctly"
+ { : |& } 2>/dev/null ||
+ err_exit "subshell $cat coprocess lingers in parent"
+ wait $!
+
+ unset N r e
+ integer N=5
+ e=12345
+ (
+ integer i
+ for ((i = 1; i <= N; i++))
+ do print $i |&
+ read -p r
+ print -n $r
+ wait $!
+ done
+ print
+ ) 2>/dev/null | read -t 10 r
+ [[ $r == $e ]] || err_exit "$cat coprocess timing bug -- expected $e, got '$r'"
+
+ r=
+ (
+ integer i
+ for ((i = 1; i <= N; i++))
+ do print $i |&
+ sleep 0.01
+ r=$r$($cat <&p)
+ wait $!
+ done
+ print $r
+ ) 2>/dev/null | read -t 10 r
+ [[ $r == $e ]] || err_exit "$cat coprocess command substitution bug -- expected $e, got '$r'"
+
+ (
+ $cat |&
+ sleep 0.01
+ exec 6>&p
+ print -u6 ok
+ exec 6>&-
+ sleep 2
+ kill $! 2> /dev/null
+ ) && err_exit "$cat coprocess with subshell would hang"
+ for sig in IOT ABRT
+ do if ( trap - $sig ) 2> /dev/null
+ then if [[ $( { sig=$sig $SHELL 2> /dev/null <<- ++EOF++
+ $cat |&
+ pid=\$!
+ trap "print TRAP" \$sig
+ (
+ sleep 2
+ kill -\$sig \$\$
+ sleep 2
+ kill -\$sig \$\$
+ kill \$pid
+ sleep 2
+ kill \$\$
+ ) &
+ while read -p || ((\$? > 256))
+ do :
+ done
+ ++EOF++
+ } ) != $'TRAP\nTRAP' ]] 2> /dev/null
+ then err_exit "traps when reading from $cat coprocess not working"
+ fi
+ break
+ fi
+ done
+
+ trap 'sleep_pid=; kill $pid; err_exit "$cat coprocess 1 hung"' TERM
+ { sleep 5; kill $$; } &
+ sleep_pid=$!
+ $cat |&
+ pid=$!
+ exec 5<&p 6>&p
+ exp=hi
+ print -u6 $exp; read -u5
+ [[ $REPLY == "$exp" ]] || err_exit "REPLY from $cat coprocess failed -- expected '$exp', got '$REPLY'"
+ exec 6>&-
+ wait $pid
+ trap - TERM
+ [[ $sleep_pid ]] && kill $sleep_pid
+
+ trap 'sleep_pid=; kill $pid; err_exit "$cat coprocess 2 hung"' TERM
+ { sleep 5; kill $$; } &
+ sleep_pid=$!
+ $cat |&
+ pid=$!
+ print foo >&p 2> /dev/null || err_exit "first write of foo to $cat coprocess failed"
+ print foo >&p 2> /dev/null || err_exit "second write of foo to coprocess failed"
+ kill $pid
+ wait $pid 2> /dev/null
+ trap - TERM
+ [[ $sleep_pid ]] && kill $sleep_pid
+
+ trap 'sleep_pid=; kill $pid; err_exit "$cat coprocess 3 hung"' TERM
+ { sleep 5; kill $$; } &
+ sleep_pid=$!
+ $cat |&
+ pid=$!
+ print -p foo
+ print -p bar
+ read <&p || err_exit "first read from $cat coprocess failed"
+ [[ $REPLY == foo ]] || err_exit "first REPLY from $cat coprocess is $REPLY not foo"
+ read <&p || err_exit "second read from $cat coprocess failed"
+ [[ $REPLY == bar ]] || err_exit "second REPLY from $cat coprocess is $REPLY not bar"
+ kill $pid
+ wait $pid 2> /dev/null
+ trap - TERM
+ [[ $sleep_pid ]] && kill $sleep_pid
+
+done
+
+exp=ksh
+got=$(print -r $'#00315
+COATTRIBUTES=\'label=make \'
+# @(#)$Id: libcoshell (AT&T Research) 2008-04-28 $
+_COSHELL_msgfd=5
+{ { (eval \'function fun { trap \":\" 0; return 1; }; trap \"exit 0\" 0; fun; exit 1\') && PATH= print -u$_COSHELL_msgfd ksh; } || { times && echo bsh >&$_COSHELL_msgfd; } || { echo osh >&$_COSHELL_msgfd; }; } >/dev/null 2>&1' | $SHELL 5>&1)
+[[ $got == $exp ]] || err_exit "coshell(3) identification sequence failed -- expected '$exp', got '$got'"
+
+function cop
+{
+ read
+ print ok
+}
+
+exp=ok
+
+cop |&
+pid=$!
+if print -p yo 2>/dev/null
+then read -p got
+else got='no coprocess'
+fi
+[[ $got == $exp ]] || err_exit "main coprocess main query failed -- expected $exp, got '$got'"
+kill $pid 2>/dev/null
+wait
+
+cop |&
+pid=$!
+(
+if print -p yo 2>/dev/null
+then read -p got
+else got='no coprocess'
+fi
+[[ $got == $exp ]] || err_exit "main coprocess subshell query failed -- expected $exp, got '$got'"
+)
+kill $pid 2>/dev/null
+wait
+
+exp='no coprocess'
+
+(
+cop |&
+print $! > $tmp/pid
+)
+pid=$(<$tmp/pid)
+if print -p yo 2>/dev/null
+then read -p got
+else got=$exp
+fi
+[[ $got == $exp ]] || err_exit "subshell coprocess main query failed -- expected $exp, got '$got'"
+kill $pid 2>/dev/null
+wait
+
+(
+cop |&
+print $! > $tmp/pid
+)
+pid=$(<$tmp/pid)
+(
+if print -p yo 2>/dev/null
+then read -p got
+else got=$exp
+fi
+[[ $got == $exp ]] || err_exit "subshell coprocess subshell query failed -- expected $exp, got '$got'"
+kill $pid 2>/dev/null
+wait
+)
+
+function mypipe
+{
+ read; read
+ print -r -- "$REPLY"
+}
+
+mypipe |&
+print -p "hello"
+z="$( $bintrue $($bintrue) )"
+{ print -p "world";} 2> /dev/null
+read -p
+[[ $REPLY == world ]] || err_exit "expected 'world' got '$REPLY'"
+kill $pid 2>/dev/null
+wait
+
+
+function cop
+{
+ read
+ print ok
+}
+exp=ok
+cop |&
+pid=$!
+(
+if print -p yo 2>/dev/null
+then read -p got
+else got='no coprocess'
+fi
+[[ $got == $exp ]] || err_exit "main coprocess subshell query failed -- expected $exp, got '$got'"
+)
+kill $pid 2>/dev/null
+wait
+
+tee=$(whence -p tee)
+ls -l |&
+pid=$!
+$tee -a /dev/null <&p > /dev/null
+wait $pid
+x=$?
+[[ $x == 0 ]] || err_exit "coprocess exitval should be 0, not $x"
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/cubetype.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/cubetype.sh
index 2be2dc605d..dbe4e8bef0 100644..100755
--- a/usr/src/lib/libshell/common/tests/cubetype.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/cubetype.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -93,7 +93,6 @@ exp=2 got=${#bb.items[@]}
[[ ${#bb.items[@]} == 2 ]] || err_exit "\${#bb.items[@]} incorrect for iteration $i -- expected $exp, got '$got'"
[[ $b == "$bb" ]] || err_exit "\$b='$b' != \$bb='$bb'"
b.count=0
-false
unset b bb
done
@@ -201,11 +200,14 @@ unset cc[two].x cc[two].y cc[two].z
(( cc[two].len == cc[one].len )) || err_exit 'cc[two].len != cc[one].len'
(( cc[two].count == 4 )) || err_exit 'cc[two].count != 4'
cc[three]=cc[two]
-[[ ${cc[two]} == "${cc[three]}" ]] || err_exit ' ${cc[two]} != ${cc[three]}'
-[[ $cc[two] == "${cc[three]}" ]] || err_exit ' $cc[two] != $cc[three]'
-[[ ${#cc[@]} == 3 ]] || err_exit '${#cc[@]} != 3'
+[[ ${cc[two]} == "${cc[three]}" ]] || err_exit "\${cc[two]}='${cc[two]}' != \${cc[three]}='${cc[three]}'"
+[[ $cc[two] == "${cc[three]}" ]] || err_exit "\$cc[two]='${cc[two]}' != \${cc[three]}='${cc[three]}'"
+exp=3
+got=${#cc[@]}
+[[ $got == $exp ]] || err_exit "\${#cc[@]} failed -- expected '$exp', got '$got'"
unset cc[two].name unset cc[two].colors
cc[two].count=0
unset cc
done
-exit $Errors
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/enum.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/enum.sh
index b5e2aefa1a..4f9ff834bc 100644..100755
--- a/usr/src/lib/libshell/common/tests/enum.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/enum.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -64,4 +64,11 @@ typeset -T X_t=( typeset name=aha )
typeset -a[X_t] arr
) 2> /dev/null
[[ $? == 1 ]] || err_exit 'typeset -a[X_t] should generate an error message when X-t is not an enumeriation type'
-exit $Errors
+
+typeset -a [Color_t] arr
+arr[green]=foo
+[[ ${arr[1]} == ${arr[green]} ]] || err_exit 'arr[1] != arr[green]'
+read -A arr <<< 'x y z xx yy'
+[[ ${arr[1]} == ${arr[green]} ]] || err_exit 'arr[1] != arr[green] after read'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/exit.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/exit.sh
index 47e05aa6eb..d2b91b7352 100644..100755
--- a/usr/src/lib/libshell/common/tests/exit.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/exit.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -77,4 +77,4 @@ fi
cd ~- || err_exit "cd back failed"
$SHELL -c 'builtin -f cmd getconf; getconf --"?-version"; exit 0' >/dev/null 2>&1 || err_exit 'ksh plugin exit failed -- was ksh built with CCFLAGS+=$(CC.EXPORT.DYNAMIC)?'
-exit $((Errors))
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/expand.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/expand.sh
index 69637f7617..2547be8aa1 100644..100755
--- a/usr/src/lib/libshell/common/tests/expand.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/expand.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -122,4 +122,5 @@ done
for i in ""~(N)/dev/non_existent_file
do [[ ! $i ]] || err_exit '""~(N)/dev/non_existent_file not null'
done
-exit $((Errors))
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/functions.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/functions.sh
index 5ee9d69015..ecbc7f5642 100644..100755
--- a/usr/src/lib/libshell/common/tests/functions.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/functions.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -27,6 +27,9 @@ alias err_exit='err_exit $LINENO'
integer Errors=0
Command=${0##*/}
+compiled=''
+read -n4 c < $0 2> /dev/null
+[[ $c == *$'\ck'* ]] && compiled=1
ulimit -c 0
@@ -1045,6 +1048,11 @@ foo
foobar
++++
) == foo ]] > /dev/null || err_exit 'functions compiled with shcomp not working'
+# tests for compiled . scripts
+print $'print hello\nprint world' > $tmp/foo
+${SHCOMP:-${SHELL%/*}/shcomp} $tmp/foo > $tmp/foo.sh
+val=$(. $tmp/foo.sh)
+[[ $val == $'hello\nworld' ]] || err_exit "processing compiled dot files not working correctly val=$val"
# test for functions in shell having side effects.
unset -f foo foobar bar
cd "$tmp"
@@ -1091,6 +1099,112 @@ function B
}
x=$(B)
-[[ $x == $'TRAP A\nTRAP B' ]] || err_exit "trap from funtions in subshells fails got" $x
+[[ $x == $'TRAP A\nTRAP B' ]] || err_exit "trap from functions in subshells fails got" $x
-exit $((Errors))
+function foo
+{
+ typeset bar=abc
+ unset bar
+# [[ $bar == bam ]] || err_exit 'unsetting local variable does not expose global variable'
+ [[ $bar ]] && err_exit 'unsetting local variable exposes global variable'
+}
+bar=bam
+foo
+
+sleep=$(whence -p sleep)
+function gosleep
+{
+ $sleep 4
+}
+x=$(
+ (sleep 2; pid=; ps | grep sleep | read pid extra; [[ $pid ]] && kill -- $pid) &
+ gosleep 2> /dev/null
+ print ok
+)
+[[ $x == ok ]] || err_exit 'TERM signal sent to last process of function kills the script'
+
+# verify that $0 does not change with functions defined as fun()
+func1()
+{
+ [[ $0 == "$dol0" ]] || err_exit "\$0 changed in func1() to $0"
+}
+function func2
+{
+ [[ $0 == func2 ]] || err_exit "\$0 changed in func2() to $0"
+ dol0=func2
+ func1
+}
+func2
+
+{ $SHELL <<- \EOF
+ function foo
+ {
+ typeset rc=0
+ unset -f foo
+ return $rc;
+ }
+ foo
+EOF
+} 2> /dev/null || err_exit 'problem with unset -f foo within function foo'
+
+val=$($SHELL 2> /dev/null <<- \EOF
+ .sh.fun.set() { set -x; }
+ function f1 { print -n ${.sh.fun}; set -o | grep xtrace;}
+ function f2 { print -n ${.sh.fun}; set -o | grep xtrace;}
+ f1
+ set -o | grep xtrace
+ f2
+EOF)
+[[ $val == f1xtrace*on*off*f2xtrace*on* ]] || err_exit "'.sh.fun.set() { set -x; }' not tracing all functions"
+
+function foo
+{
+ typeset opt OPTIND=1 OPTARG hflag=
+ while getopts hi: opt
+ do case $opt in
+ h) hflag=1;;
+ i) [[ $OPTARG == foobar ]] || err_exit 'OPTARG should be set to foobar in function foo';;
+ esac
+ done
+ shift $((OPTIND - 1))
+ (( OPTIND == 4 )) || err_exit "OPTIND is $OPTIND at end of function foo; it should be 4"
+ [[ $1 == foo2 ]] || err_exit "\$1 is $1, not foo after getopts in function"
+}
+OPTIND=6 OPTARG=xxx
+foo -h -i foobar foo2
+[[ $OPTARG == xxx ]] || err_exit 'getopts in function changes global OPTARG'
+(( OPTIND == 6 )) || err_exit 'getopts in function changes global OPTIND'
+
+if [[ ! $compiled ]]
+then function foo { getopts --man; }
+ [[ $(typeset -f foo) == 'function foo { getopts --man; }' ]] || err_exit 'typeset -f not work for function with getopts'
+fi
+
+function foo
+{
+ let 1
+ return $1
+}
+invals=(135 255 256 267 -1)
+outvals=(135 255 0 267 255)
+for ((i=0; i < ${#invals[@]}; i++))
+do foo ${invals[i]}
+ [[ $? == "${outvals[i]}" ]] || err_exit "function exit ${invals[i]} should set \$? to ${outvals[i]}"
+done
+
+function foo
+{
+ typeset pid
+ sleep 2 & pid=$!
+ sleep 1
+ kill -TERM $pid
+ wait $pid
+ rc=$?
+ return $rc
+}
+foo 2> /dev/null
+rc=$?
+exp=$((256+$(kill -l TERM) ))
+[[ $rc == "$exp" ]] || err_exit "expected exitval $exp got $rc"
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/glob.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/glob.sh
index e63efda318..5b7930e175 100644..100755
--- a/usr/src/lib/libshell/common/tests/glob.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/glob.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -20,12 +20,12 @@
function err_exit
{
print -u2 -r $'\t'"${Command}[$1] ${@:2}"
- ((errors++))
+ ((Errors++))
}
alias err_exit='err_exit $LINENO'
Command=${0##*/}
-integer aware=0 contrary=0 errors=0 ignorant=0
+integer aware=0 contrary=0 Errors=0 ignorant=0
tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
trap "cd /; rm -rf $tmp" EXIT
@@ -90,17 +90,16 @@ alias test_case='test_case $LINENO'
unset undefined
-export LC_COLLATE=C
-
cd $tmp || { err_exit "cd $tmp failed"; exit 1; }
+export LC_COLLATE=C
touch B b
set -- *
case $* in
'b B') contrary=1 ;;
b|B) ignorant=1 ;;
esac
-set -- $(/bin/sh -c 'echo [a-c]')
+set -- $(LC_ALL=C /bin/sh -c 'echo [a-c]')
case $* in
B) aware=1 ;;
esac
@@ -267,13 +266,13 @@ then
set --glob
fi
-FIGNORE='.*|*'
+FIGNORE='@(.*|*)'
test_glob '<*>' *
-FIGNORE='.*|*c|*e|?'
+FIGNORE='@(.*|*c|*e|?)'
test_glob '<a-b> <aXb> <abd> <bb> <bcd> <bdir> <ca> <cb> <dd> <man>' *
-FIGNORE='.*|*b|*d|?'
+FIGNORE='@(.*|*b|*d|?)'
test_glob '<Beware> <abc> <abe> <bdir> <ca> <de> <man>' *
FIGNORE=
@@ -372,4 +371,4 @@ test_sub '//@(!(a))/[\1]' '[aha]'
test_sub '/@(!(aha))/[\1]' '[ah]a'
test_sub '//@(!(aha))/[\1]' '[ah][a]'
-exit $errors
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/grep.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/grep.sh
index 632c9eceea..480f823669 100644..100755
--- a/usr/src/lib/libshell/common/tests/grep.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/grep.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -101,4 +101,5 @@ There are only two line with out foo but with bar.
if (( $(grep -c 'foo*bar' $tmp/grep ) != 6))
then err_exit
fi
-exit $((Errors))
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/heredoc.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/heredoc.sh
new file mode 100755
index 0000000000..61b0110d69
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/heredoc.sh
@@ -0,0 +1,500 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ let Errors+=1
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+
+tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
+trap "cd /; rm -rf $tmp" EXIT
+
+f=$tmp/here1
+g=$tmp/here2
+cat > $f <<!
+hello world
+!
+if [[ $(<$f) != 'hello world' ]]
+then err_exit "'hello world' here doc not working"
+fi
+cat > $g <<\!
+hello world
+!
+cmp $f $g 2> /dev/null || err_exit "'hello world' quoted here doc not working"
+cat > $g <<- !
+ hello world
+!
+cmp $f $g 2> /dev/null || err_exit "'hello world' tabbed here doc not working"
+cat > $g <<- \!
+ hello world
+!
+cmp $f $g 2> /dev/null || err_exit "'hello world' quoted tabbed here doc not working"
+x=hello
+cat > $g <<!
+$x world
+!
+cmp $f $g 2> /dev/null || err_exit "'$x world' here doc not working"
+cat > $g <<!
+$(print hello) world
+!
+cmp $f $g 2> /dev/null || err_exit "'$(print hello) world' here doc not working"
+cat > $f <<\!!
+!@#$%%^^&*()_+~"::~;'`<>?/.,{}[]
+!!
+if [[ $(<$f) != '!@#$%%^^&*()_+~"::~;'\''`<>?/.,{}[]' ]]
+then err_exit "'hello world' here doc not working"
+fi
+cat > $g <<!!
+!@#\$%%^^&*()_+~"::~;'\`<>?/.,{}[]
+!!
+cmp $f $g 2> /dev/null || err_exit "unquoted here doc not working"
+exec 3<<!
+ foo
+!
+if [[ $(<&3) != ' foo' ]]
+then err_exit "leading tabs stripped with <<!"
+fi
+$SHELL -c "
+eval `echo 'cat <<x'` "|| err_exit "eval `echo 'cat <<x'` core dumps"
+cat > /dev/null <<EOF # comments should not cause core dumps
+abc
+EOF
+cat >$g << :
+:
+:
+cmp /dev/null $g 2> /dev/null || err_exit "empty here doc not working"
+x=$(print $( cat <<HUP
+hello
+HUP
+)
+)
+if [[ $x != hello ]]
+then err_exit "here doc inside command sub not working"
+fi
+y=$(cat <<!
+${x:+${x}}
+!
+)
+if [[ $y != "${x:+${x}}" ]]
+then err_exit '${x:+${x}} not working in here document'
+fi
+$SHELL -c '
+x=0
+while (( x < 100 ))
+do ((x = x+1))
+ cat << EOF
+EOF
+done
+' 2> /dev/null || err_exit '100 empty here docs fails'
+{
+ print 'builtin -d cat
+ cat <<- EOF'
+ for ((i=0; i < 100; i++))
+ do print XXXXXXXXXXXXXXXXXXXX
+ done
+ print ' XXX$(date)XXXX
+ EOF'
+} > $f
+chmod +x "$f"
+$SHELL "$f" > /dev/null || err_exit "large here-doc with command substitution fails"
+x=$(/bin/cat <<!
+$0
+!
+)
+[[ "$x" == "$0" ]] || err_exit '$0 not correct inside here documents'
+$SHELL -c 'x=$(
+cat << EOF
+EOF)' 2> /dev/null || err_exit 'here-doc cannot be terminated by )'
+if [[ $( IFS=:;cat <<-!
+ $IFS$(print hi)$IFS
+ !) != :hi: ]]
+then err_exit '$IFS unset by command substitution in here docs'
+fi
+if x=$($SHELL -c 'cat <<< "hello world"' 2> /dev/null)
+then [[ $x == 'hello world' ]] || err_exit '<<< documents not working'
+ x=$($SHELL -c 'v="hello world";cat <<< $v' 2> /dev/null)
+ [[ $x == 'hello world' ]] || err_exit '<<< documents with $x not working'
+ x=$($SHELL -c 'v="hello world";cat <<< "$v"' 2> /dev/null)
+ [[ $x == 'hello world' ]] || err_exit '<<< documents with $x not working'
+else err_exit '<<< syntax not supported'
+fi
+if [[ $(cat << EOF #testing
+#abc
+abc
+EOF) != $'#abc\nabc' ]]
+then err_exit 'comments not preserved in here-documents'
+fi
+cat > "$f" <<- '!!!!'
+ builtin cat
+ : << EOF
+ $PWD
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ EOF
+ command exec 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-
+ x=abc
+ cat << EOF
+ $x
+ EOF
+!!!!
+chmod 755 "$f"
+if [[ $($SHELL "$f") != abc ]]
+then err_exit 'here document descritor was closed'
+fi
+cat > "$f" <<- '!!!!'
+ exec 0<&-
+ foobar()
+ {
+ /bin/cat <<- !
+ foobar
+ !
+ }
+ : << EOF
+ $PWD
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ EOF
+ print -r -- "$(foobar)"
+!!!!
+if [[ $($SHELL "$f") != foobar ]]
+then err_exit 'here document with stdin closed failed'
+fi
+printf $'cat <<# \\!!!\n\thello\n\t\tworld\n!!!' > $f
+[[ $($SHELL "$f") == $'hello\n\tworld' ]] || err_exit "<<# not working for quoted here documents"
+printf $'w=world;cat <<# !!!\n\thello\n\t\t$w\n!!!' > $f
+[[ $($SHELL "$f") == $'hello\n\tworld' ]] || err_exit "<<# not working for non-quoted here documents"
+[[ $( $SHELL <<- \++++
+ S=( typeset a )
+ function S.a.get
+ {
+ .sh.value=$__a
+ }
+ __a=1234
+ cat <<-EOF
+ ${S.a}
+ EOF
+++++
+) == 1234 ]] 2> /dev/null || err_exit 'here document with get discipline failed'
+[[ $($SHELL -c 'g(){ print ok;}; cat <<- EOF
+ ${ g;}
+ EOF
+ ' 2> /dev/null) == ok ]] || err_exit '${ command;} not working in heredoc'
+script=$f
+{
+for ((i=0; i < 406; i++))
+do print ': 23456789012345678'
+done
+print : 123456789123
+cat <<- \EOF
+eval "$(
+ { cat ; } <<MARKER
+ print hello
+ MARKER
+)"
+EOF
+} > $script
+chmod +x $script
+[[ $($SHELL $script) == hello ]] 2> /dev/null || err_exit 'heredoc embeded in command substitution fails at buffer boundary'
+
+got=$( cat << EOF
+\
+abc
+EOF)
+[[ $got == abc ]] || err_exit 'line continuation at start of buffer not working'
+
+tmpfile1=$tmp/file1
+tmpfile2=$tmp/file2
+function gendata
+{
+ typeset -RZ3 i
+ for ((i=0; i < 500; i++))
+ do print -r -- "=====================This is line $i============="
+ done
+}
+
+cat > $tmpfile1 <<- +++
+ function foobar
+ {
+ cat << XXX
+ $(gendata)
+ XXX
+ }
+ cat > $tmpfile2 <<- EOF
+ \$(foobar)
+ $(gendata)
+EOF
++++
+chmod +x $tmpfile1
+$SHELL $tmpfile1
+set -- $(wc < $tmpfile2)
+(( $1 == 1000 )) || err_exit "heredoc $1 lines, should be 1000 lines"
+(( $2 == 4000 )) || err_exit "heredoc $2 words, should be 4000 words"
+
+# comment with here document looses line number count
+integer line=$((LINENO+5))
+function tst
+{
+ [[ $1 == $2 ]] || echo expected $1, got $2
+}
+tst $line $LINENO <<"!" # this comment affects LINENO #
+1
+!
+(( (line+=3) == LINENO )) || err_exit "line number=$LINENO should be $line"
+
+[[ $($SHELL -c 'wc -c <<< ""' 2> /dev/null) == *1 ]] || err_exit '<<< with empty string not working'
+
+mkdir $tmp/functions
+cat > $tmp/functions/t2 <<\!!!
+function t2
+{
+cat <<EOF | sed 's/1234567890/qwertyuiopasdfghj/'
+${1}
+EOF
+}
+!!!
+
+FPATH=$tmp/functions
+foo=${
+cat <<EOF
+1 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111 1
+
+2 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222222
+222222222222222222222222222222222222222222222222222222222222 2
+
+3 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333 3
+
+4 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444444
+444444444444444444444444444444444444444444444444444444444444 4
+
+5 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555555
+555555555555555555555555555555555555555555555555555555555555 5
+
+6 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666666
+666666666666666666666666666666666666666666666666666666666666 6
+
+7 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777777
+777777777777777777777777777777777777777777777777777777777777 7
+
+8 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888888
+888888888888888888888888888888888888888888888888888888888888 8
+
+9 34567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999999
+999999999999999999999999999999999999999999999999999999999999 9
+
+10 4567890 $(t2 1234567890 ) 0123456789012345678901234567890123
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+101010101010101010101010101010101010101010101010101010101010103
+1010101010101010101010101010101010101010101010101010101010 END
+
+EOF
+}
+[[ ${#foo} == 10238 ]] || err_exit 'large here docs containing command subs of dynamically loaded functions fails'
+
+{
+ print $'FOO=1\nBAR=foobarbaz'
+ print -- 'cat <<#EOF'
+ integer i
+ for ((i=0; i < 50000; i++))
+ do print -r -- ' $(($FOO + 1))'
+ print -r -- ' $BAR meep'
+ done
+ print EOF
+} > $f
+$SHELL $f > $g
+[[ $(grep meep $g | grep -v foobar) != '' ]] && err_exit 'here-doc loosing $var expansions on boundaries in rare cases'
+
+print foo > $tmp/foofile
+x=$( $SHELL 2> /dev/null 'read <<< $(<'"$tmp"'/foofile) 2> /dev/null;print -r "$REPLY"')
+[[ $x == foo ]] || err_exit '<<< $(<file) not working'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/io.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/io.sh
index 3d8b8cbd34..c4a5fdf6ac 100644..100755
--- a/usr/src/lib/libshell/common/tests/io.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/io.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -40,7 +40,7 @@ function fun
done 2> /dev/null
print -u3 good
}
-print 'read -r a;print -r -u$1 -- "$a"' > $tmp/mycat
+print 'read -r a; print -r -u$1 -- "$a"' > $tmp/mycat
chmod 755 $tmp/mycat
for ((i=3; i < 10; i++))
do
@@ -75,7 +75,7 @@ FDFS=(
( dir=/dev/fd semantics='dup' )
)
for ((fdfs=0; fdfs<${#FDFS[@]}-1; fdfs++))
-do [[ -e ${FDFS[fdfs].dir} ]] && { command : > ${FDFS[fdfs].dir}/1; } 2>/dev/null && break
+do [[ -e ${FDFS[fdfs].dir} ]] && { command : > ${FDFS[fdfs].dir}/1; } 2>/dev/null >&2 && break
done
exec 3<> file1
@@ -160,9 +160,9 @@ then err_exit 'file descriptor not restored after exec in subshell'
fi
exec 3>&- 4>&-
[[ $( {
- read -r line;print -r -- "$line"
+ read -r line; print -r -- "$line"
(
- read -r line;print -r -- "$line"
+ read -r line; print -r -- "$line"
) & wait
while read -r line
do print -r -- "$line"
@@ -178,7 +178,7 @@ cat > $tmp/1 <<- ++EOF++
trap "rm -f \$script" EXIT
exec 9> \$script
for ((i=3; i<9; i++))
- do eval "while read -u\$i; do : ;done \$i</dev/null"
+ do eval "while read -u\$i; do : ; done \$i</dev/null"
print -u9 "exec \$i< /dev/null"
done
for ((i=0; i < 60; i++))
@@ -207,7 +207,7 @@ print > /dev/null {n}> $tmp/1
if [[ $newio && $(print hello | while read -u$n; do print $REPLY; done {n}<&0) != hello ]]
then err_exit "{n}<&0 not working with for loop"
fi
-[[ $({ read -r;read -u3 3<&0; print -- "$REPLY" ;} <<!
+[[ $({ read -r; read -u3 3<&0; print -- "$REPLY" ;} <<!
hello
world
!) == world ]] || err_exit 'I/O not synchronized with <&'
@@ -245,7 +245,7 @@ then (( $(3<#) == 0 )) || err_exit "not at position 0"
command exec 3<# *jjjj*
read -u3
[[ $REPLY == {39}(j) ]] || err_exit "<# pattern failed"
- [[ $(command exec 3<## *llll*) = {39}(k) ]] || err_exit "<## pattern not saving standard output"
+ [[ $(command exec 3<## *llll*) == {39}(k) ]] || err_exit "<## pattern not saving standard output"
read -u3
[[ $REPLY == {39}(l) ]] || err_exit "<## pattern failed to position"
command exec 3<# *abc*
@@ -295,7 +295,7 @@ $SHELL -c 'exec 3>; /dev/null' 2> /dev/null && err_exit '>; with exec should be
$SHELL -c ': 3>; /dev/null' 2> /dev/null || err_exit '>; not working with at all'
print hello > $tmp/1
if ! $SHELL -c "false >; $tmp/1" 2> /dev/null
-then [[ $(<$tmp/1) == hello ]] || err_exit '>; not preserving file on failure'
+then let 1;[[ $(<$tmp/1) == hello ]] || err_exit '>; not preserving file on failure'
fi
if ! $SHELL -c "sed -e 's/hello/hello world/' $tmp/1" >; $tmp/1 2> /dev/null
then [[ $(<$tmp/1) == 'hello world' ]] || err_exit '>; not updating file on success'
@@ -332,27 +332,38 @@ read -n3 a <<!
abcdefg
!
[[ $a == abc ]] || err_exit 'read -n3 here-document not working'
-(print -n a;sleep 1; print -n bcde) | { read -N3 a; read -N1 b;}
+(print -n a; sleep 1; print -n bcde) | { read -N3 a; read -N1 b;}
[[ $a == abc ]] || err_exit 'read -N3 from pipe not working'
[[ $b == d ]] || err_exit 'read -N1 from pipe not working'
-(print -n a;sleep 1; print -n bcde) |read -n3 a
+(print -n a; sleep 1; print -n bcde) |read -n3 a
[[ $a == a ]] || err_exit 'read -n3 from pipe not working'
if mkfifo $tmp/fifo 2> /dev/null
-then (print -n a; sleep 1;print -n bcde) > $tmp/fifo &
+then (print -n a; sleep 2; print -n bcde) > $tmp/fifo &
{
- read -u5 -n3 -t2 a || err_exit 'read -n3 from fifo timedout'
- read -u5 -n1 -t2 b || err_exit 'read -n1 from fifo timedout'
+ read -u5 -n3 -t3 a || err_exit 'read -n3 from fifo timed out'
+ read -u5 -n1 -t3 b || err_exit 'read -n1 from fifo timed out'
} 5< $tmp/fifo
- [[ $a == a ]] || err_exit 'read -n3 from fifo not working'
+ exp=a
+ got=$a
+ [[ $got == "$exp" ]] || err_exit "read -n3 from fifo failed -- expected '$exp', got '$got'"
+ exp=b
+ got=$b
+ [[ $got == "$exp" ]] || err_exit "read -n1 from fifo failed -- expected '$exp', got '$got'"
rm -f $tmp/fifo
+ wait
mkfifo $tmp/fifo 2> /dev/null
- (print -n a; sleep 1;print -n bcde) > $tmp/fifo &
+ (print -n a; sleep 2; print -n bcde) > $tmp/fifo &
{
- read -u5 -N3 -t2 a || err_exit 'read -N3 from fifo timed out'
- read -u5 -N1 -t2 b || err_exit 'read -N1 from fifo timedout'
+ read -u5 -N3 -t3 a || err_exit 'read -N3 from fifo timed out'
+ read -u5 -N1 -t3 b || err_exit 'read -N1 from fifo timed out'
} 5< $tmp/fifo
- [[ $a == abc ]] || err_exit 'read -N3 from fifo not working'
- [[ $b == d ]] || err_exit 'read -N1 from fifo not working'
+ exp=abc
+ got=$a
+ [[ $got == "$exp" ]] || err_exit "read -N3 from fifo failed -- expected '$exp', got '$got'"
+ exp=d
+ got=$b
+ [[ $got == "$exp" ]] || err_exit "read -N1 from fifo failed -- expected '$exp', got '$got'"
+ wait
fi
(
print -n 'prompt1: '
@@ -373,8 +384,8 @@ fi
[[ $line3 == 'prompt2: ' ]] || err_exit "line3 should be 'prompt2: '"
[[ ! $line4 ]] || err_exit "line4 should be empty"
-if $SHELL -c "export LC_ALL=en_US.UTF-8; c=$'\342\202\254'; [[ \${#c} == 1 ]]" 2>/dev/null
-then lc_utf8=en_US.UTF-8
+if $SHELL -c "export LC_ALL=C.UTF-8; c=$'\342\202\254'; [[ \${#c} == 1 ]]" 2>/dev/null
+then lc_utf8=C.UTF-8
else lc_utf8=''
fi
@@ -400,7 +411,7 @@ do a=$1
done
if [[ $lc_utf8 ]]
-then export LC_ALL=en_US.UTF-8
+then export LC_ALL=$lc_utf8
typeset -a c=( '' 'A' $'\303\274' $'\342\202\254' )
integer i w
typeset o
@@ -448,4 +459,41 @@ exp=$':2:printf :1:A:\n:2::\n:2:print\n:2:print :1:Z:'
got=$(<$tmp/22.out)
[[ $exp == "$got" ]] || err_exit "standard error garbled -- expected $(printf %q "$exp"), got $(printf %q "$got")"
-exit $((Errors))
+tmp=$tmp $SHELL 2> /dev/null -c 'exec 3<&1 ; exec 1<&- ; exec > $tmp/outfile;print foobar' || err_exit 'exec 1<&- causes failure'
+[[ $(<$tmp/outfile) == foobar ]] || err_exit 'outfile does not contain foobar'
+
+print hello there world > $tmp/foobar
+sed -e 's/there //' $tmp/foobar >; $tmp/foobar
+[[ $(<$tmp/foobar) == 'hello world' ]] || err_exit '>; redirection not working on simple command'
+print hello there world > $tmp/foobar
+{ sed -e 's/there //' $tmp/foobar;print done;} >; $tmp/foobar
+[[ $(<$tmp/foobar) == $'hello world\ndone' ]] || err_exit '>; redirection not working for compound command'
+print hello there world > $tmp/foobar
+$SHELL -c "sed -e 's/there //' $tmp/foobar >; $tmp/foobar"
+[[ $(<$tmp/foobar) == 'hello world' ]] || err_exit '>; redirection not working with -c on a simple command'
+
+rm -f "$tmp/junk"
+for (( i=1; i < 50; i++ ))
+do out=$(/bin/ls "$tmp/junk" 2>/dev/null)
+ if (( $? == 0 ))
+ then err_exit 'wrong error code with redirection'
+ break
+ fi
+done
+
+rm -f $tmp/file1 $tmp/file2
+print foo > $tmp/file3
+ln -s $tmp/file3 $tmp/file2
+ln -s $tmp/file2 $tmp/file1
+print bar >; $tmp/file1
+[[ $(<$tmp/file3) == bar ]] || err_exit '>; not following symlinks'
+
+for i in 1
+do :
+done {n}< /dev/null
+[[ -r /dev/fd/$n ]] && err_exit "file descriptor n=$n left open after {n}<"
+
+n=$( exec {n}< /dev/null; print -r -- $n)
+[[ -r /dev/fd/$n ]] && err_exit "file descriptor n=$n left open after subshell"
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/leaks.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/leaks.sh
new file mode 100755
index 0000000000..22d95faecb
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/leaks.sh
@@ -0,0 +1,87 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+builtin vmstate 2>/dev/null || exit 0
+
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ let Errors+=1
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+
+# test for variable reset leak #
+
+function test_reset
+{
+ integer i n=$1
+
+ for ((i = 0; i < n; i++))
+ do u=$i
+ done
+}
+
+n=1000
+
+# one round to get to steady state -- sensitive to -x
+
+test_reset $n
+a=0$(vmstate --format='+%(size)u')
+b=0$(vmstate --format='+%(size)u')
+
+test_reset $n
+a=0$(vmstate --format='+%(size)u')
+test_reset $n
+b=0$(vmstate --format='+%(size)u')
+
+if (( b > a ))
+then err_exit "variable value reset memory leak -- $((b-a)) bytes after $n iterations"
+fi
+
+# buffer boundary tests
+
+for exp in 65535 65536
+do got=$($SHELL -c 'x=$(printf "%.*c" '$exp' x); print ${#x}' 2>&1)
+ [[ $got == $exp ]] || err_exit "large command substitution failed -- expected $exp, got $got"
+done
+
+data="(v=;sid=;di=;hi=;ti='1328244300';lv='o';id='172.3.161.178';var=(k='conn_num._total';u=;fr=;l='Number of Connections';n='22';t='number';))"
+read -C stat <<< "$data"
+a=0$(vmstate --format='+%(size)u')
+for ((i=0; i < 500; i++))
+do print -r -- "$data"
+done | while read -u$n -C stat
+ do :
+ done {n}<&0-
+b=0$(vmstate --format='+%(size)u')
+(( b > a )) && err_exit 'memory leak with read -C when deleting compound variable'
+
+read -C stat <<< "$data"
+a=0$(vmstate --format='+%(size)u')
+for ((i=0; i < 500; i++))
+do read -C stat <<< "$data"
+done
+b=0$(vmstate --format='+%(size)u')
+(( b > a )) && err_exit 'memory leak with read -C when using <<<'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/locale.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/locale.sh
new file mode 100755
index 0000000000..3a4558f6db
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/locale.sh
@@ -0,0 +1,345 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ let Errors+=1
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+
+unset LANG ${!LC_*}
+
+tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
+trap "cd /; rm -rf $tmp" EXIT
+cd $tmp || exit
+
+a=$($SHELL -c '/' 2>&1 | sed -e "s,.*: *,," -e "s, *\[.*,,")
+b=$($SHELL -c '(LC_ALL=debug / 2>/dev/null); /' 2>&1 | sed -e "s,.*: *,," -e "s, *\[.*,,")
+[[ "$b" == "$a" ]] || err_exit "locale not restored after subshell -- expected '$a', got '$b'"
+b=$($SHELL -c '(LC_ALL=debug; / 2>/dev/null); /' 2>&1 | sed -e "s,.*: *,," -e "s, *\[.*,,")
+[[ "$b" == "$a" ]] || err_exit "locale not restored after subshell -- expected '$a', got '$b'"
+
+# test shift-jis \x81\x40 ... \x81\x7E encodings
+# (shift char followed by 7 bit ascii)
+
+typeset -i16 chr
+for locale in $(PATH=/bin:/usr/bin locale -a 2>/dev/null | grep -i jis)
+do export LC_ALL=$locale
+ for ((chr=0x40; chr<=0x7E; chr++))
+ do c=${chr#16#}
+ for s in \\x81\\x$c \\x$c
+ do b="$(printf "$s")"
+ eval n=\$\'$s\'
+ [[ $b == "$n" ]] || err_exit "LC_ALL=$locale printf difference for \"$s\" -- expected '$n', got '$b'"
+ u=$(print -- $b)
+ q=$(print -- "$b")
+ [[ $u == "$q" ]] || err_exit "LC_ALL=$locale quoted print difference for \"$s\" -- $b => '$u' vs \"$b\" => '$q'"
+ done
+ done
+done
+
+# this locale is supported by ast on all platforms
+# EU for { decimal_point="," thousands_sep="." }
+
+locale=C_EU.UTF-8
+
+export LC_ALL=C
+
+# test multibyte value/trace format -- $'\303\274' is UTF-8 u-umlaut
+
+c=$(LC_ALL=C $SHELL -c "printf $':%2s:\n' $'\303\274'")
+u=$(LC_ALL=$locale $SHELL -c "printf $':%2s:\n' $'\303\274'" 2>/dev/null)
+if [[ "$c" != "$u" ]]
+then LC_ALL=$locale
+ x=$'+2+ typeset item.text\
++3+ item.text=\303\274\
++4+ print -- \303\274\
+\303\274\
++5+ eval $\'arr[0]=(\\n\\ttext=\\303\\274\\n)\'
++2+ arr[0].text=ü\
++6+ print -- \303\274\
+ü\
++7+ eval txt=$\'(\\n\\ttext=\\303\\274\\n)\'
++2+ txt.text=\303\274\
++8+ print -- \'(\' text=$\'\\303\\274\' \')\'\
+( text=\303\274 )'
+ u=$(LC_ALL=$locale PS4='+$LINENO+ ' $SHELL -x -c "
+ item=(typeset text)
+ item.text=$'\303\274'
+ print -- \"\${item.text}\"
+ eval \"arr[0]=\$item\"
+ print -- \"\${arr[0].text}\"
+ eval \"txt=\${arr[0]}\"
+ print -- \$txt
+ " 2>&1)
+ [[ "$u" == "$x" ]] || err_exit LC_ALL=$locale multibyte value/trace format failed
+
+ x=$'00fc\n20ac'
+ u=$(LC_ALL=$locale $SHELL -c $'printf "%04x\n" \$\'\"\303\274\"\' \$\'\"\xE2\x82\xAC\"\'')
+ [[ $u == $x ]] || err_exit LC_ALL=$locale multibyte %04x printf format failed
+fi
+
+if (( $($SHELL -c $'export LC_ALL='$locale$'; print -r "\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254" | wc -m' 2>/dev/null) == 10 ))
+then LC_ALL=$locale $SHELL -c b1=$'"\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254"; [[ ${b1:4:1} == w ]]' || err_exit 'multibyte ${var:offset:len} not working correctly'
+fi
+
+#$SHELL -c 'export LANG='$locale'; printf "\u[20ac]\u[20ac]" > $tmp/two_euro_chars.txt'
+printf $'\342\202\254\342\202\254' > $tmp/two_euro_chars.txt
+exp="6 2 6"
+set -- $($SHELL -c "
+ unset LC_CTYPE
+ export LANG=$locale
+ export LC_ALL=C
+ command wc -C < $tmp/two_euro_chars.txt
+ unset LC_ALL
+ command wc -C < $tmp/two_euro_chars.txt
+ export LC_ALL=C
+ command wc -C < $tmp/two_euro_chars.txt
+")
+got=$*
+[[ $got == $exp ]] || err_exit "command wc LC_ALL default failed -- expected '$exp', got '$got'"
+set -- $($SHELL -c "
+ if builtin wc 2>/dev/null || builtin -f cmd wc 2>/dev/null
+ then unset LC_CTYPE
+ export LANG=$locale
+ export LC_ALL=C
+ wc -C < $tmp/two_euro_chars.txt
+ unset LC_ALL
+ wc -C < $tmp/two_euro_chars.txt
+ export LC_ALL=C
+ wc -C < $tmp/two_euro_chars.txt
+ fi
+")
+got=$*
+[[ $got == $exp ]] || err_exit "builtin wc LC_ALL default failed -- expected '$exp', got '$got'"
+
+# multibyte char straddling buffer boundary
+
+{
+ unset i
+ integer i
+ for ((i = 0; i < 163; i++))
+ do print "#234567890123456789012345678901234567890123456789"
+ done
+ printf $'%-.*c\n' 15 '#'
+ for ((i = 0; i < 2; i++))
+ do print $': "\xe5\xae\x9f\xe8\xa1\x8c\xe6\xa9\x9f\xe8\x83\xbd\xe3\x82\x92\xe8\xa1\xa8\xe7\xa4\xba\xe3\x81\x97\xe3\x81\xbe\xe3\x81\x99\xe3\x80\x82" :'
+ done
+} > ko.dat
+
+LC_ALL=$locale $SHELL < ko.dat 2> /dev/null || err_exit "script with multibyte char straddling buffer boundary fails"
+
+# exp LC_ALL LC_NUMERIC LANG
+set -- \
+ 2,5 $locale C '' \
+ 2.5 C $locale '' \
+ 2,5 $locale '' C \
+ 2,5 '' $locale C \
+ 2.5 C '' $locale \
+ 2.5 '' C $locale \
+
+unset a b c
+unset LC_ALL LC_NUMERIC LANG
+integer a b c
+while (( $# >= 4 ))
+do exp=$1
+ unset H V
+ typeset -A H
+ typeset -a V
+ [[ $2 ]] && V[0]="export LC_ALL=$2;"
+ [[ $3 ]] && V[1]="export LC_NUMERIC=$3;"
+ [[ $4 ]] && V[2]="export LANG=$4;"
+ for ((a = 0; a < 3; a++))
+ do for ((b = 0; b < 3; b++))
+ do if (( b != a ))
+ then for ((c = 0; c < 3; c++))
+ do if (( c != a && c != b ))
+ then T=${V[$a]}${V[$b]}${V[$c]}
+ if [[ ! ${H[$T]} ]]
+ then H[$T]=1
+ got=$($SHELL -c "${T}print \$(( $exp ))" 2>&1)
+ [[ $got == $exp ]] || err_exit "${T} sequence failed -- expected '$exp', got '$got'"
+ fi
+ fi
+ done
+ fi
+ done
+ done
+ shift 4
+done
+
+# setocale(LC_ALL,"") after setlocale() initialization
+
+printf 'f1\357\274\240f2\n' > input1
+printf 't2\357\274\240f1\n' > input2
+printf '\357\274\240\n' > delim
+print "export LC_ALL=$locale
+join -j1 1 -j2 2 -o 1.1 -t \$(cat delim) input1 input2 > out" > script
+$SHELL -c 'unset LANG ${!LC_*}; $SHELL ./script' ||
+err_exit "join test script failed -- exit code $?"
+exp="f1"
+got="$(<out)"
+[[ $got == "$exp" ]] || err_exit "LC_ALL test script failed -- expected '$exp', got '$got'"
+
+# multibyte identifiers
+
+exp=OK
+got=$(LC_ALL=C.UTF-8 $SHELL -c $'\u[5929]=OK; print ${\u[5929]}' 2>&1)
+[[ $got == "$exp" ]] || err_exit "multibyte variable definition/expansion failed -- expected '$exp', got '$got'"
+got=$(LC_ALL=C.UTF-8 $SHELL -c $'function \u[5929]\n{\nprint OK;\n}; \u[5929]' 2>&1)
+[[ $got == "$exp" ]] || err_exit "multibyte ksh function definition/execution failed -- expected '$exp', got '$got'"
+got=$(LC_ALL=C.UTF-8 $SHELL -c $'\u[5929]()\n{\nprint OK;\n}; \u[5929]' 2>&1)
+[[ $got == "$exp" ]] || err_exit "multibyte posix function definition/execution failed -- expected '$exp', got '$got'"
+
+# this locale is supported by ast on all platforms
+# mainly used to debug multibyte and message translation code
+# however wctype is not supported but that's ok for these tests
+
+locale=debug
+
+if [[ "$(LC_ALL=$locale $SHELL <<- \+EOF+
+ x=a<1z>b<2yx>c
+ print ${#x}
+ +EOF+)" != 5
+ ]]
+then err_exit '${#x} not working with multibyte locales'
+fi
+
+dir=_not_found_
+exp=2
+for cmd in \
+ "cd $dir; export LC_ALL=debug; cd $dir" \
+ "cd $dir; LC_ALL=debug cd $dir" \
+
+do got=$($SHELL -c "$cmd" 2>&1 | sort -u | wc -l)
+ (( ${got:-0} == $exp )) || err_exit "'$cmd' sequence failed -- error message not localized"
+done
+exp=121
+for lc in LANG LC_MESSAGES LC_ALL
+do for cmd in "($lc=$locale;cd $dir)" "$lc=$locale;cd $dir;unset $lc" "function tst { typeset $lc=$locale;cd $dir; }; tst"
+ do tst="$lc=C;cd $dir;$cmd;cd $dir;:"
+ $SHELL -c "unset LANG \${!LC_*}; $SHELL -c '$tst'" > out 2>&1 ||
+ err_exit "'$tst' failed -- exit status $?"
+ integer id=0
+ unset msg
+ typeset -A msg
+ got=
+ while read -r line
+ do line=${line##*:}
+ if [[ ! ${msg[$line]} ]]
+ then msg[$line]=$((++id))
+ fi
+ got+=${msg[$line]}
+ done < out
+ [[ $got == $exp ]] || err_exit "'$tst' failed -- expected '$exp', got '$got'"
+ done
+done
+
+exp=123
+got=$(LC_ALL=debug $SHELL -c "a<2A@>z=$exp; print \$a<2A@>z")
+[[ $got == $exp ]] || err_exit "multibyte debug locale \$a<2A@>z failed -- expected '$exp', got '$got'"
+
+unset LC_ALL LC_MESSAGES
+export LANG=debug
+function message
+{
+ print -r $"An error occurred."
+}
+exp=$'(libshell,3,46)\nAn error occurred.\n(libshell,3,46)'
+alt=$'(debug,message,libshell,An error occurred.)\nAn error occurred.\n(debug,message,libshell,An error occurred.)'
+got=$(message; LANG=C message; message)
+[[ $got == "$exp" || $got == "$alt" ]] || {
+ EXP=$(printf %q "$exp")
+ ALT=$(printf %q "$alt")
+ GOT=$(printf %q "$got")
+ err_exit "LANG change not seen by function -- expected $EXP or $ALT, got $GOT"
+}
+
+a_thing=fish
+got=$(print -r aa$"\\ahello \" /\\${a_thing}/\\"zz)
+exp='aa(debug,'$Command',libshell,\ahello " /\fish/\)zz'
+[[ $got == "$exp" ]] || err_exit "$\"...\" containing expansions fails: expected $exp, got $got"
+
+exp='(debug,'$Command',libshell,This is a string\n)'
+typeset got=$"This is a string\n"
+[[ $got == "$exp" ]] || err_exit "$\"...\" in assignment expansion fails: expected $exp got $got"
+
+unset LANG
+
+LC_ALL=C
+x=$"hello"
+[[ $x == hello ]] || err_exit 'assignment of message strings not working'
+
+# tests for multibyte characteer at buffer boundary
+{
+ print 'cat << \\EOF'
+ for ((i=1; i < 164; i++))
+ do print 123456789+123456789+123456789+123456789+123456789
+ done
+ print $'next character is multibyte<2b|>c<3d|\>foo'
+ for ((i=1; i < 10; i++))
+ do print 123456789+123456789+123456789+123456789+123456789
+ done
+ print EOF
+} > script$$.1
+chmod +x script$$.1
+x=$( LC_ALL=debug $SHELL ./script$$.1)
+[[ ${#x} == 8641 ]] || err_exit 'here doc contains wrong number of chars with multibyte locale'
+[[ $x == *$'next character is multibyte<2b|>c<3d|\>foo'* ]] || err_exit "here_doc doesn't contain line with multibyte chars"
+
+
+x=$(LC_ALL=debug $SHELL -c 'x="a<2b|>c";print -r -- ${#x}')
+(( x == 3 )) || err_exit 'character length of multibyte character should be 3'
+x=$(LC_ALL=debug $SHELL -c 'typeset -R10 x="a<2b|>c";print -r -- "${x}"')
+[[ $x == ' a<2b|>c' ]] || err_exit 'typeset -R10 should begin with three spaces'
+x=$(LC_ALL=debug $SHELL -c 'typeset -L10 x="a<2b|>c";print -r -- "${x}"')
+[[ $x == 'a<2b|>c ' ]] || err_exit 'typeset -L10 should end in three spaces'
+
+if $SHELL -c "export LC_ALL=en_US.UTF-8; c=$'\342\202\254'; [[ \${#c} == 1 ]]" 2>/dev/null
+then LC_ALL=en_US.UTF-8
+ unset i p1 p2 x
+ for i in 9 b c d 20 1680 2000 2001 2002 2003 2004 2005 2006 2008 2009 200a 2028 2029 3000 # 1803 2007 202f 205f
+ do if ! eval "[[ \$'\\u[$i]' == [[:space:]] ]]"
+ then x+=,$i
+ fi
+ done
+ if [[ $x ]]
+ then if [[ $x == ,*,* ]]
+ then p1=s p2="are not space characters"
+ else p1= p2="is not a space character"
+ fi
+ err_exit "unicode char$p1 ${x#?} $p2 in locale $LC_ALL"
+ fi
+ unset x
+ x=$(printf "hello\u[20ac]\xee world")
+ [[ $(print -r -- "$x") == $'hello\u[20ac]\xee world' ]] || err_exit '%q with unicode and non-unicode not working'
+ if [[ $(whence od) ]]
+ then got='68 65 6c 6c 6f e2 82 ac ee 20 77 6f 72 6c 64 0a'
+ [[ $(print -r -- "$x" | od -An -tx1 | xargs echo) == "$got" ]] || err_exit "incorrect string from printf %q"
+ fi
+
+fi
+
+exit $((Errors<125?Errors:125))
+
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/math.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/math.sh
new file mode 100755
index 0000000000..59884f5a4b
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/math.sh
@@ -0,0 +1,202 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+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
+
+set -o nounset
+
+typeset tmp
+
+# create temporary test directory
+tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
+trap "cd /; rm -rf $tmp" EXIT
+cd $tmp || exit
+
+function test_arithmetric_expression_accesss_array_element_through_nameref
+{
+ compound out=( typeset stdout stderr ; integer res )
+ compound -r -a tests=(
+ (
+ cmd='@@TYPE@@ -a @@VAR@@ ; @@VAR@@[1]=90 ; function x { nameref nz=$1 ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@[1]' ; stdoutpattern=' 90==90'
+ )
+ (
+ cmd='@@TYPE@@ -a @@VAR@@=( [1]=90 ) ; function x { nameref nz=$1 ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@[1]' ; stdoutpattern=' 90==90'
+ )
+ (
+ cmd='@@TYPE@@ -a @@VAR@@ ; @@VAR@@[1][3]=90 ; function x { nameref nz=$1 ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@[1][3]' ; stdoutpattern=' 90==90'
+ )
+ (
+ cmd='@@TYPE@@ -a @@VAR@@=( [1][3]=90 ) ; function x { nameref nz=$1 ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@[1][3]' ; stdoutpattern=' 90==90'
+ )
+ (
+ cmd='@@TYPE@@ -a @@VAR@@ ; @@VAR@@[1][3][5]=90 ; function x { nameref nz=$1 ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@[1][3][5]' ; stdoutpattern=' 90==90'
+ )
+ (
+ cmd='@@TYPE@@ -a @@VAR@@=( [1][3][5]=90 ) ; function x { nameref nz=$1 ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@[1][3][5]' ; stdoutpattern=' 90==90'
+ )
+ (
+ cmd='@@TYPE@@ -a @@VAR@@ ; @@VAR@@[1][3][5]=90 ; function x { nameref nz=${1}[$2][$3][$4] ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@ 1 3 5' ; stdoutpattern=' 90==90'
+ )
+ (
+ cmd='@@TYPE@@ -A @@VAR@@ ; @@VAR@@[1]=90 ; function x { nameref nz=$1 ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@[1]' ; stdoutpattern=' 90==90'
+ )
+ (
+ cmd='@@TYPE@@ -A @@VAR@@=( [1]=90 ) ; function x { nameref nz=$1 ; print " $(( round(nz) ))==$(( round($nz) ))" ; } ; x @@VAR@@[1]' ; stdoutpattern=' 90==90'
+ )
+ )
+
+ typeset testname
+ integer i
+ typeset mode
+ typeset cmd
+
+ for (( i=0 ; i < ${#tests[@]} ; i++ )) ; do
+ # fixme: This list should include "typeset -lX" and "typeset -X" but ast-ksh.2010-03-09 fails like this:
+ # 'typeset -X -a z ; z[1][3]=90 ; function x { nameref nz=$1 ; print " $(( nz ))==$(( $nz ))" ; } ; x z[1][3]'
+ # + typeset -X -a z
+ # + z[1][3]=90
+ # + x 'z[1][3]'
+ # /home/test001/bin/ksh[1]: x: line 1: x1.68000000000000000000000000000000p: no parent
+ for ty in \
+ 'typeset' \
+ 'integer' \
+ 'float' \
+ 'typeset -i' \
+ 'typeset -si' \
+ 'typeset -li' \
+ 'typeset -E' \
+ 'typeset -F' \
+ 'typeset -X' \
+ 'typeset -lE' \
+ 'typeset -lX' \
+ 'typeset -lF' ; do
+ for mode in \
+ 'plain' \
+ 'in_compound' \
+ 'in_indexed_compound_array' \
+ 'in_2d_indexed_compound_array' \
+ 'in_4d_indexed_compound_array' \
+ 'in_associative_compound_array' \
+ 'in_compound_nameref' \
+ 'in_indexed_compound_array_nameref' \
+ 'in_2d_indexed_compound_array_nameref' \
+ 'in_4d_indexed_compound_array_nameref' \
+ 'in_associative_compound_array_nameref' \
+ ; do
+ nameref tst=tests[i]
+
+ cmd="${tst.cmd//@@TYPE@@/${ty}}"
+
+ case "${mode}" in
+ 'plain')
+ cmd="${cmd//@@VAR@@/z}"
+ ;;
+
+ 'in_compound')
+ cmd="compound c ; ${cmd//@@VAR@@/c.z}"
+ ;;
+ 'in_indexed_compound_array')
+ cmd="compound -a c ; ${cmd//@@VAR@@/c[11].z}"
+ ;;
+ 'in_2d_indexed_compound_array')
+ cmd="compound -a c ; ${cmd//@@VAR@@/c[17][19].z}"
+ ;;
+ 'in_4d_indexed_compound_array')
+ cmd="compound -a c ; ${cmd//@@VAR@@/c[17][19][23][27].z}"
+ ;;
+ 'in_associative_compound_array')
+ cmd="compound -A c ; ${cmd//@@VAR@@/c[info].z}"
+ ;;
+
+ 'in_compound_nameref')
+ cmd="compound c ; nameref ncr=c.z ; ${cmd//@@VAR@@/ncr}"
+ ;;
+ 'in_indexed_compound_array_nameref')
+ cmd="compound -a c ; nameref ncr=c[11].z ; ${cmd//@@VAR@@/ncr}"
+ ;;
+ 'in_2d_indexed_compound_array_nameref')
+ cmd="compound -a c ; nameref ncr=c[17][19].z ; ${cmd//@@VAR@@/ncr}"
+ ;;
+ 'in_4d_indexed_compound_array_nameref')
+ cmd="compound -a c ; nameref ncr=c[17][19][23][27].z ; ${cmd//@@VAR@@/ncr}"
+ ;;
+ 'in_associative_compound_array_nameref')
+ cmd="compound -A c ; nameref ncr=c[info].z ; ${cmd//@@VAR@@/ncr}"
+ ;;
+ *)
+ err_exit "Unexpected mode ${mode}"
+ ;;
+ esac
+
+ testname="${0}/${cmd}"
+#set -x
+ out.stderr="${ { out.stdout="${ ${SHELL} -o nounset -o errexit -c "${cmd}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+#set +x
+
+ [[ "${out.stdout}" == ${tst.stdoutpattern} ]] || err_exit "${testname}: Expected stdout to match $(printf '%q\n' "${tst.stdoutpattern}"), got $(printf '%q\n' "${out.stdout}")"
+ [[ "${out.stderr}" == '' ]] || err_exit "${testname}: Expected empty stderr, got $(printf '%q\n' "${out.stderr}")"
+ (( out.res == 0 )) || err_exit "${testname}: Unexpected exit code ${out.res}"
+ done
+ done
+ done
+
+ return 0
+}
+
+function test_has_iszero
+{
+ typeset str
+ integer i
+
+ typeset -r -a tests=(
+ '(( iszero(0) )) && print "OK"'
+ '(( iszero(0.) )) && print "OK"'
+ '(( iszero(-0) )) && print "OK"'
+ '(( iszero(-0.) )) && print "OK"'
+ 'float n=0. ; (( iszero(n) )) && print "OK"'
+ 'float n=+0. ; (( iszero(n) )) && print "OK"'
+ 'float n=-0. ; (( iszero(n) )) && print "OK"'
+ 'float n=1. ; (( iszero(n) )) || print "OK"'
+ 'float n=1. ; (( iszero(n-1.) )) && print "OK"'
+ 'float n=-1. ; (( iszero(n+1.) )) && print "OK"'
+ )
+
+ for (( i=0 ; i < ${#tests[@]} ; i++ )) ; do
+ str="$( ${SHELL} -o errexit -c "${tests[i]}" 2>&1 )" || err_exit "test $i: returned non-zero exit code $?"
+ [[ "${str}" == 'OK' ]] || err_exit "test $i: expected 'OK', got '${str}'"
+ done
+
+ return 0
+}
+
+# run tests
+test_arithmetric_expression_accesss_array_element_through_nameref
+test_has_iszero
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/nameref.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/nameref.sh
index fe4bc2998b..5c0a7497b3 100644..100755
--- a/usr/src/lib/libshell/common/tests/nameref.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/nameref.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -258,10 +258,17 @@ i=$($SHELL -c 'nameref foo=bar; bar[2]=(x=3 y=4); nameref x=foo[2].y;print -r --
#set -x
for c in '=' '[' ']' '\' "'" '"' '<' '=' '('
do [[ $($SHELL 2> /dev/null <<- ++EOF++
- x;i=\\$c;typeset -A a; a[\$i]=foo;typeset -n x=a[\$i]; print "\$x"
+ i=\\$c;typeset -A a; a[\$i]=foo;typeset -n x=a[\$i]; print "\$x"
++EOF++
-) != foo ]] && err_exit 'nameref x=[$c] '"not working for c=$c"
+) != foo ]] && err_exit 'nameref x=a[$c] '"not working for c=$c"
done
+for c in '=' '[' ']' '\' "'" '"' '<' '=' '('
+do [[ $($SHELL 2> /dev/null <<- ++EOF++
+ i=\\$c;typeset -A a; a[\$i]=foo;b=a[\$i];typeset -n x=\$b; print "\$x"
+ ++EOF++
+) != foo ]] && err_exit 'nameref x=$b with b=a[$c] '"not working for c=$c"
+done
+
unset -n foo x
unset foo x
typeset -A foo
@@ -362,4 +369,329 @@ nameref sp=addrsp
sp[14]=( size=1 )
[[ -v sp[19] ]] && err_exit '[[ -v sp[19] ]] where sp is a nameref should not be set'
-exit $((Errors))
+function fun2
+{
+ nameref var=$1
+ var.foo=bar
+}
+
+function fun1
+{
+ compound -S container
+ fun2 container
+ [[ $container == *foo=bar* ]] || err_exit 'name references to static compound variables in parent scope not working'
+}
+fun1
+
+function fun2
+{
+ nameref var=$1
+ var.foo=bar
+}
+
+typeset -T container_t=(
+ typeset foo
+)
+
+function fun1
+{
+ container_t -S container
+ fun2 container
+ [[ $container == *foo=bar* ]] || err_exit 'name references to static type variables in parent scope not working'
+}
+fun1
+
+function fun2
+{
+ nameref var=$1
+ nameref node=var.foo
+ node=bar
+}
+function fun3
+{
+ fun2 container #2> /dev/null
+}
+compound container
+fun3
+[[ $container == *foo=bar* ]] || err_exit 'name reference to a name reference variable in a function not working'
+
+typeset -A x=( [a]=1 )
+nameref c=x[h]
+[[ -v x[h] ]] && err_exit 'creating reference to non-existant associative array element causes element to get added'
+
+unset a
+function x
+{
+ nameref a=a
+ (( $# > 0 )) && typeset -A a
+ a[a b]=${1-99} # this was cauing a syntax on the second call
+}
+x 7
+x 2> /dev/null
+[[ ${a[a b]} == 99 ]] || err_exit 'nameref not handling subscript correctly'
+
+nameref sizes=baz
+typeset -A -i sizes
+sizes[bar]=1
+[[ ${sizes[*]} == 1 ]] || err_exit 'adding -Ai attribute to name referenced variable not working'
+
+$SHELL 2> /dev/null -c 'nameref foo=bar; typeset -A foo; (( (x=foo[a])==0 ))' || err_exit 'references inside arithmetic expressions not working'
+:
+
+unset ar z
+integer -a ar
+nameref z=ar[0]
+(( z[2]=3))
+[[ ${ar[0][2]} == 3 ]] || err_exit "\${ar[0][2]} is '${ar[0][2]}' but should be 3"
+(( ar[0][2] == 3 )) || err_exit "ar[0][2] is '${ar[0][2]}' but should be 3"
+
+unset c x
+typeset +n c x
+compound c=( typeset -a x )
+nameref x=c.x
+x[4]=1
+[[ ${ typeset -p c.x ;} == *-C* ]] && err_exit 'c.x should not have -C attributes'
+
+{ $SHELL 2> /dev/null <<- \EOF
+ typeset -T xxx_t=(
+ float x=1 y=2
+ typeset name=abc
+ )
+ xxx_t x
+ nameref r=x.y
+ [[ $r == 2 ]] || exit 1
+ unset x
+ [[ ${!r} == .deleted ]] || exit 2
+EOF
+} 2> /dev/null #|| print -u2 bad
+exitval=$?
+if [[ $(kill -l $exitval) == SEGV ]]
+then print -u2 'name reference to unset type instance causes segmentation violation'
+else if((exitval))
+ then print -u2 'name reference to unset type instance not redirected to .deleted'
+ fi
+fi
+
+typeset +n nr
+unset c nr
+compound c
+compound -A c.a
+nameref nr=c.a[hello]
+[[ ${!nr} == "c.a[hello]" ]] || err_exit 'name reference nr to unset associative array instance does not expand ${!nr} correctly.'
+
+typeset +n nr
+compound -a c.b
+nameref nr=c.b[2]
+[[ ${!nr} == "c.b[2]" ]] || err_exit 'name reference nr to unset indexed array instance does not expand ${!nr} correctly.'
+
+typeset +n a b
+unset a b
+typeset -n a=ls[0] b=ls[1]
+read line << \!
+3 4
+!
+set -A ls -- $line
+[[ $a == 3 ]] || err_exit 'name reference to ls[0] when ls is not an array fails'
+
+$SHELL 2> /dev/null <<-\EOF || err_exit 'nameref to array element fails'
+ set -o errexit
+ function bf {
+ nameref treename=$1
+ nodepath="treename" ;
+ nameref x="$nodepath"
+ compound -A x.nodes
+ nameref node=treename.nodes[4]
+ node=()
+ typeset +p node.elements
+ }
+ compound c
+ bf c
+EOF
+
+function add_compound
+{
+ nameref arr=$1
+ arr[34]+=( float val=1.1 )
+}
+compound -a rootcpv
+nameref mycpv=rootcpv[4][8][16][32][64]
+compound -a mycpv.myindexedcompoundarray
+add_compound mycpv.myindexedcompoundarray
+(( mycpv.myindexedcompoundarray[34].val == 1.1 )) || err_exit 'nameref scoping error'
+
+function add_file_to_tree
+{
+ nameref node=$1
+ compound -A node.elements
+ node.elements[/]=(filepath=foobar)
+}
+function main
+{
+ compound filetree
+ add_file_to_tree filetree
+}
+main 2> /dev/null
+[[ $? == 0 ]] || err_exit 'nameref binding to calling function compound variable failed'
+
+unset l
+typeset -a -C l
+printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l[4][6]
+exp=$(print -v l)
+unset l
+typeset -a -C l
+nameref l4=l[4]
+printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l4[6]
+[[ $(print -v l) == "$exp" ]] || err_exit 'nameref l4=l[4] not working'
+unset l
+typeset -a -C l
+nameref l46=l[4][6]
+printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | read -C l46
+[[ $(print -v l) == "$exp" ]] || err_exit 'nameref l46=l[4][6] not working'
+
+exp=$'(\n\t[4]=(\n\t\ttypeset -a ar=(\n\t\t\t1\n\t\t\t2\n\t\t)\n\t\tb=1\n\t)\n)'
+unset l
+typeset +n l4
+typeset -a -C l
+nameref l4=l[4]
+printf "( typeset -a ar=( 1\n2\n) b=1 )\n" | read -C l4
+[[ $(print -v l) == "$exp" ]] || err_exit 'nameref l4=l[4] not working with indexed array read'
+
+unset l
+typeset +n l4
+typeset -A -C l
+nameref l4=l[4]
+printf "( typeset -a ar=( 1\n2\n) b=1 )\n" | read -C l4
+[[ $(print -v l) == "$exp" ]] || err_exit 'nameref l4=l[4] not working with associative array read'
+
+exp=$'(\n\t[9]=(\n\t\tfish=4\n\t)\n)'
+function add_eval
+{
+ nameref pos=$1
+ source /dev/stdin <<<"$2"
+ typeset -m pos=addvar
+}
+function do_local_plain
+{
+ compound -A local_tree
+ add_eval local_tree[9].fish "typeset -i addvar=4"
+ [[ $(print -v local_tree) == "$exp" ]] || err_exit 'do_local_plain failed'
+}
+function do_global_throughnameref
+{
+ nameref tr=global_tree
+ add_eval tr[9].fish "typeset -i addvar=4"
+ [[ $(print -v tr) == "$exp" ]] || err_exit 'do_global_throughnameref failed'
+}
+function do_local_throughnameref
+{
+ compound -A local_tree
+ nameref tr=local_tree
+ add_eval tr[9].fish "typeset -i addvar=4"
+ [[ $(print -v tr) == "$exp" ]] || err_exit 'do_local_throughnameref failed'
+}
+compound -A global_tree
+do_global_throughnameref
+do_local_throughnameref
+do_local_plain
+
+unset ar
+compound -a ar
+function read_c
+{
+ nameref v=$1
+ read -C v
+}
+print "( typeset -i x=36 ) " | read_c ar[5][9][2]
+exp=$'(\n\t[5]=(\n\t\t[9]=(\n\t\t\t[2]=(\n\t\t\t\ttypeset -i x=36\n\t\t\t)\n\t\t)\n\t)\n)'
+[[ $(print -v ar) == "$exp" ]] || err_exit 'read into nameref of global array instance from within a function fails'
+
+function read_c
+{
+ nameref v=$1
+ read -C v
+}
+function main
+{
+ compound -a ar
+ nameref nar=ar
+ print "( typeset -i x=36 ) " | read_c nar[5][9][2]
+ exp=$'(\n\t[5]=(\n\t\t[9]=(\n\t\t\t[2]=(\n\t\t\t\ttypeset -i x=36\n\t\t\t)\n\t\t)\n\t)\n)'
+ [[ $(print -v nar) == "$exp" ]] || err_exit 'read from a nameref variable from calling scope fails'
+}
+main
+
+function rf2
+{
+ nameref val=$1
+ read -C val
+}
+function rf
+{
+ nameref val=$1
+ rf2 val
+}
+function main
+{
+ compound c
+ typeset -A -C c.l
+ nameref l4=c.l[4]
+ printf "( typeset -a ar=( 1\n2\n3\n) b=1 )\n" | rf l4
+ exp=$'(\n\ttypeset -C -A l=(\n\t\t[4]=(\n\t\t\ttypeset -a ar=(\n\t\t\t\t1\n\t\t\t\t2\n\t\t\t\t3\n\t\t\t)\n\t\t\tb=1\n\t\t)\n\t)\n)'
+ [[ $(print -v c) == "$exp" ]] || err_exit 'read -C with nameref to array element fails'
+}
+main
+
+# bug reported by ek
+cfg=( alarms=(type=3))
+function a
+{
+ typeset -n y=$1
+ print -- ${y.type}
+}
+function b
+{
+ a $1
+}
+[[ $(a cfg.alarms) == 3 ]] || err_exit "nameref scoping error in function"
+[[ $(b cfg.alarms) == 3 ]] || err_exit "nameref scoping error in nested function"
+
+function yy
+{
+ nameref n=$1
+ n=( z=4 )
+}
+yy foo
+unset foo
+[[ $foo ]] && err_exit 'unset after creating via nameref in function not working'
+
+unset arr
+typeset -a arr=( ( 1 2 3 ) ( 4 5 6 ) ( 7 8 9 ))
+typeset -n ref=arr[1]
+[[ $ref == 4 ]] || err_exit '$ref should be 4'
+[[ ${ref[@]} == '4 5 6' ]] || err_exit '${ref[@]} should be "4 5 6"'
+[[ $ref == "${arr[1]}" ]] || err_exit '$ref shuld be ${arr[1]}'
+[[ ${ref[@]} == "${arr[1][@]}" ]] || err_exit '${ref[@]} should be ${arr[1][@]}'
+
+function fun2
+{
+ nameref var=$1.foo
+ var=$2
+}
+function fun1
+{
+ xxx=$1
+ fun2 $xxx bam
+}
+args=(bar=yes)
+fun1 args
+[[ $args == *foo=bam* ]] || err_exit 'nameref does not bind to correct scope'
+
+typeset +n ref
+unset ref ar
+typeset -a arr=( 1 2 3 )
+typeset -n ref='arr[2]'
+[[ $(typeset -p ref) == *'arr[2]'* ]] || err_exit 'typeset -p ref when ref is a reference to an index array element is wrong'
+
+$SHELL 2> /dev/null -c 'function x { nameref lv=gg ; compound -A lv.c=( [4]=( x=1 )) ; } ; compound gg ; x' || err_exit 'compound array assignment with nameref in a function failed'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/namespace.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/namespace.sh
new file mode 100755
index 0000000000..057470ada4
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/namespace.sh
@@ -0,0 +1,106 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ let Errors+=1
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+
+tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
+trap "cd /; rm -rf $tmp" EXIT
+
+foo=abc
+typeset -C bar=(x=3 y=4 t=7)
+typeset -A z=([abc]=qqq)
+integer r=9
+function fn
+{
+ print global fn $foo
+}
+function fun
+{
+ print global fun $foo
+}
+mkdir -p $tmp/global/bin $tmp/local/bin
+cat > $tmp/global/xfun <<- \EOF
+ function xfun
+ {
+ print xfun global $foo
+ }
+EOF
+cat > $tmp/local/xfun <<- \EOF
+ function xfun
+ {
+ print xfun local $foo
+ }
+EOF
+chmod +x "$tmp/global/xfun" "$tmp/local/xfun"
+print 'print local prog $1' > $tmp/local/bin/run
+print 'print global prog $1' > $tmp/global/bin/run
+chmod +x "$tmp/local/bin/run" "$tmp/global/bin/run"
+PATH=$tmp/global/bin:$PATH
+FPATH=$tmp/global
+
+namespace x
+{
+ foo=bar
+ typeset -C bar=(x=1 y=2 z=3)
+ typeset -A z=([qqq]=abc)
+ function fn
+ {
+ print local fn $foo
+ }
+ [[ $(fn) == 'local fn bar' ]] || err_exit 'fn inside namespace should run local function'
+ [[ $(fun) == 'global fun abc' ]] || err_exit 'global fun run from namespace not working'
+ (( r == 9 )) || err_exit 'global variable r not set in namespace'
+false
+ [[ ${z[qqq]} == abc ]] || err_exit 'local array element not correct'
+ [[ ${z[abc]} == '' ]] || err_exit 'global array element should not be visible when local element exists'
+ [[ ${bar.y} == 2 ]] || err_exit 'local variable bar.y not found'
+ [[ ${bar.t} == '' ]] || err_exit 'global bar.t should not be visible'
+ function runxrun
+ {
+ xfun
+ }
+ function runrun
+ {
+ run $1
+ }
+ PATH=$tmp/local/bin:/bin
+ FPATH=$tmp/local
+ [[ $(runxrun) == 'xfun local bar' ]] || err_exit 'local function on FPATH failed'
+ [[ $(runrun $foo) == 'local prog bar' ]] || err_exit 'local binary on PATH failed'
+}
+[[ $(fn) == 'global fn abc' ]] || err_exit 'fn outside namespace should run global function'
+[[ $(.x.fn) == 'local fn bar' ]] || err_exit 'namespace function called from global failed'
+[[ ${z[abc]} == qqq ]] || err_exit 'global associative array should not be affected by definiton in namespace'
+[[ ${bar.y} == 4 ]] || err_exit 'global compound variable should not be affected by definiton in namespace'
+[[ ${bar.z} == '' ]] || err_exit 'global compound variable should not see elements in namespace'
+[[ $(xfun) == 'xfun global abc' ]] || err_exit 'global function on FPATH failed'
+[[ $(run $foo) == 'global prog abc' ]] || err_exit 'global binary on PATH failed'
+false
+[[ $(.x.runxrun) == 'xfun local bar' ]] || err_exit 'namespace function on FPATH failed'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/options.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/options.sh
index 8584e726f0..c5b4c2e204 100644..100755
--- a/usr/src/lib/libshell/common/tests/options.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/options.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -432,15 +432,15 @@ do HOME=$tmp ENV= $SHELL -o $i >/dev/null 2>&1 <<- ++EOF++ || err_exit "option $
((j++))
done
-export ENV=
+export ENV= PS1="(:$$:)"
histfile=$tmp/history
exp=$(HISTFILE=$histfile $SHELL -c $'function foo\n{\ncat\n}\ntype foo')
for var in HISTSIZE HISTFILE
-do got=$( ( HISTFILE=$histfile $SHELL -ic $'unset '$var$'\nfunction foo\n{\ncat\n}\ntype foo\nexit' ) 2>&1 )
- got=${got##*': '}
+do got=$( ( HISTFILE=$histfile $SHELL +E -ic $'unset '$var$'\nfunction foo\n{\ncat\n}\ntype foo\nexit' ) 2>&1 )
+ got=${got##*"$PS1"}
[[ $got == "$exp" ]] || err_exit "function definition inside (...) with $var unset fails -- got '$got', expected '$exp'"
- got=$( { HISTFILE=$histfile $SHELL -ic $'unset '$var$'\nfunction foo\n{\ncat\n}\ntype foo\nexit' ;} 2>&1 )
- got=${got##*': '}
+ got=$( { HISTFILE=$histfile $SHELL +E -ic $'unset '$var$'\nfunction foo\n{\ncat\n}\ntype foo\nexit' ;} 2>&1 )
+ got=${got##*"$PS1"}
[[ $got == "$exp" ]] || err_exit "function definition inside {...;} with $var unset fails -- got '$got', expected '$exp'"
done
( unset HISTFILE; $SHELL -ic "HISTFILE=$histfile" 2>/dev/null ) || err_exit "setting HISTFILE when not in environment fails"
@@ -496,4 +496,49 @@ else err_exit "pipefail pipeline bypasses SIGPIPE and hangs"
fi
wait
-exit $((Errors))
+[[ $($SHELL -uc '[[ "${d1.u[z asd].revents}" ]]' 2>&1) == *'d1.u[z asd].revents'* ]] || err_exit 'name of unset parameter not in error message'
+
+[[ $($SHELL 2> /dev/null -xc $'set --showme\nprint 1\n; print 2') == 1 ]] || err_exit 'showme option with xtrace not working correctly'
+
+$SHELL -uc 'var=foo;unset var;: ${var%foo}' >/dev/null 2>&1 && err_exit '${var%foo} should fail with set -u'
+$SHELL -uc 'var=foo;unset var;: ${!var}' >/dev/null 2>&1 && err_exit '${!var} should fail with set -u'
+$SHELL -uc 'var=foo;unset var;: ${#var}' >/dev/null 2>&1 && err_exit '${#var} should fail with set -u'
+$SHELL -uc 'var=foo;unset var;: ${var-OK}' >/dev/null 2>&1 || err_exit '${var-OK} should not fail with set -u'
+$SHELL -uc 'var=foo;nset var;: ${var:-OK}' >/dev/null 2>&1 || err_exit '${var:-OK} should not fail with set -u'
+
+z=$($SHELL 2>&1 -uc 'print ${X23456789012345}')
+[[ $z == *X23456789012345:* ]] || err_exit "error message garbled with set -u got $z"
+
+# pipe hang bug fixed 2011-03-15
+float start=SECONDS toolong=3
+( $SHELL <<-EOF
+ set -o pipefail
+ (sleep $toolong;kill \$\$> /dev/null) &
+ cat $SHELL | for ((i=0; i < 5; i++))
+ do
+ date | wc > /dev/null
+ $SHELL -c 'read -N1'
+ done
+EOF
+) 2> /dev/null
+(( (SECONDS-start) > (toolong-0.5) )) && err_exit "pipefail causes script to hang"
+
+# showme with arithmetic for loops
+$SHELL -n -c $'for((;1;))\ndo ; nothing\ndone' 2>/dev/null || err_exit 'showme commands give syntax error inside arithmetic for loops'
+
+#set -x
+float t1=SECONDS
+set -o pipefail
+print | while read
+do if { date | true;} ; true
+ then sleep 2 &
+ fi
+done
+(( (SECONDS-t1) > .5 )) && err_exit 'pipefail should not wait for background processes'
+
+# process source files from profiles as profile files
+print '. ./dotfile' > envfile
+print $'alias print=:\nprint foobar' > dotfile
+[[ $(ENV=$PWD/envfile $SHELL -i -c : 2>/dev/null) == foobar ]] && err_exit 'files source from profile does not process aliases correctly'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/path.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/path.sh
index e7d9d4f906..491de73d02 100644..100755
--- a/usr/src/lib/libshell/common/tests/path.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/path.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -303,4 +303,93 @@ got=$($SHELL -c "$scr; print \$?" 2>/dev/null)
got=$($SHELL -c "command $scr; print \$?" 2>/dev/null)
[[ "$got" == "$exp" ]] || err_exit "\$SHELL -c of command of unreadable non-empty script should fail -- expected $exp, got" $got
-exit $((Errors))
+# whence -a bug fix
+cd "$tmp"
+ifs=$IFS
+IFS=$'\n'
+PATH=$PATH:
+> ls
+chmod +x ls
+ok=
+for i in $(whence -a ls)
+do if [[ $i == *"$PWD/ls" ]]
+ then ok=1
+ break;
+ fi
+done
+[[ $ok ]] || err_exit 'whence -a not finding all executables'
+rm -f ls
+PATH=${PATH%:}
+
+#whence -p bug fix
+function foo
+{
+ :
+}
+[[ $(whence -p foo) == foo ]] && err_exit 'whence -p foo should not find function foo'
+
+# whence -q bug fix
+$SHELL -c 'whence -q cat' & pid=$!
+sleep 3
+kill $! 2> /dev/null && err_exit 'whence -q appears to be hung'
+
+FPATH=$PWD
+print 'function foobar { :;}' > foobar
+autoload foobar;
+exec {m}< /dev/null
+for ((i=0; i < 25; i++))
+do ( foobar )
+done
+exec {m}<& -
+exec {n}< /dev/null
+(( n > m )) && err_exit 'autoload function in subshell leaves file open'
+
+# whence -a bug fix
+rmdir=rmdir
+if mkdir "$rmdir"
+then rm=${ whence rm;}
+ cp "$rm" "$rmdir"
+ { PATH=:${rm%/rm} $SHELL -c "cd \"$rmdir\";whence -a rm";} > /dev/null 2>&1
+ exitval=$?
+ (( exitval==0 )) || err_exit "whence -a has exitval $exitval"
+fi
+
+[[ ! -d bin ]] && mkdir bin
+[[ ! -d fun ]] && mkdir fun
+print 'FPATH=../fun' > bin/.paths
+cat <<- \EOF > fun/myfun
+ function myfun
+ {
+ print myfun
+ }
+EOF
+x=$(FPATH= PATH=$PWD/bin $SHELL -c ': $(whence less);myfun') 2> /dev/null
+[[ $x == myfun ]] || err_exit 'function myfun not found'
+
+cp $(whence -p echo) user_to_group_relationship.hdr.query
+FPATH=/foobar:
+PATH=$FPATH:$PATH:.
+[[ $(user_to_group_relationship.hdr.query foobar) == foobar ]] 2> /dev/null || err_exit 'Cannot execute command with . in name when PATH and FPATH end in :.'
+
+mkdir -p $tmp/new/bin
+mkdir $tmp/new/fun
+print FPATH=../fun > $tmp/new/bin/.paths
+print FPATH=../xxfun > $tmp/bin/.paths
+cp "$(whence -p echo)" $tmp/new/bin
+PATH=$tmp/bin:$tmp/new/bin:$PATH
+x=$(whence -p echo 2> /dev/null)
+[[ $x == "$tmp/new/bin/echo" ]] || err_exit 'nonexistant FPATH directory in .paths file causes path search to fail'
+
+$SHELL 2> /dev/null <<- \EOF || err_exit 'path search problem with non-existant directories in PATH'
+ PATH=/usr/nogood1/bin:/usr/nogood2/bin:/bin:/usr/bin
+ tail /dev/null && tail /dev/null
+EOF
+
+( PATH=/bin:usr/bin
+cat << END >/dev/null 2>&1
+${.sh.version}
+END
+) || err_exit '${.sh.xxx} variables causes cat not be found'
+
+exit $((Errors<125?Errors:125))
+
diff --git a/usr/src/lib/libshell/common/tests/pointtype.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/pointtype.sh
index 1f845f969e..b0a533319a 100644..100755
--- a/usr/src/lib/libshell/common/tests/pointtype.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/pointtype.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -134,12 +134,5 @@ eval s="$r"
[[ $r == "$s" ]] || err_exit 'expansion of type containing index array of types is incorrect'
eval "$(typeset -p s)"
[[ $y == "$z" ]] || err_exit 'typeset -p z for type containing index of types is incorrect'
-unset r s
-exit
-
-
-
-typeset -C z=(Pt_t -A p=( [1]=(typeset -l -E x=1;typeset -l -E y=2;)[2]=(typeset -l -E x=1;typeset -l -E y=5;)[3]=(typeset -l -E x=6;typeset -l -E y=4;));)
-print z="$z"
-exit $Errors
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/pty.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/pty.sh
new file mode 100755
index 0000000000..71eaef5bd2
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/pty.sh
@@ -0,0 +1,442 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+: : generated by mkptytests from "posix-sh-*-c.pty" : :
+
+# the trickiest part of the tests is avoiding typeahead
+# in the pty dialogue
+
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors++ ))
+}
+
+alias err_exit='err_exit $lineno'
+
+Command=${0##*/}
+integer Errors=0 lineno=1
+
+whence -q pty || { lineno=$LINENO; err_exit "pty command not found -- tests skipped"; exit 0; }
+
+bintrue=$(whence -p true)
+
+x=$( $SHELL <<- \EOF
+ trap 'exit 0' EXIT
+ bintrue=$(whence -p true)
+ set -o monitor
+ {
+ eval $'set -o vi\npty $bintrue'
+ } < /dev/null & pid=$!
+ #sleep 1
+ jobs
+ kill $$
+ EOF
+)
+[[ $x == *Stop* ]] && err_exit 'monitor mode enabled incorrectly causes job to stop'
+
+if [[ -o xtrace ]]
+then debug=--debug=1
+else debug=
+fi
+
+function tst
+{
+ integer lineno=$1 offset
+ typeset text
+
+ pty $debug --dialogue --messages='/dev/fd/1' $SHELL |
+ while read -r text
+ do if [[ $text == *debug* ]]
+ then print -u2 -r -- "$text"
+ else offset=${text/*: line +([[:digit:]]):*/\1}
+ err_exit "${text/: line $offset:/: line $(( lineno + offset)):}"
+ fi
+ done
+}
+
+export PS1=':test-!: ' PS2='> ' PS4=': ' ENV= EXINIT= HISTFILE= TERM=dumb VISUAL=vi LC_ALL=C
+
+if ! pty $bintrue < /dev/null
+then err_exit pty command hangs on $bintrue -- tests skipped
+ exit 0
+fi
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 026(C)
+
+# If the User Portability Utilities Option is supported: When the
+# POSIX locale is specified and a background job is suspended by a
+# SIGTSTP signal then the <state> field in the output message is set to
+# Stopped, Suspended, Stopped(SIGTSTP) or Suspended(SIGTSTP).
+
+I ^\r?\n$
+p :test-1:
+w sleep 60 &
+u [[:digit:]]\r?\n$
+s 100
+p :test-2:
+w kill -TSTP $!
+u (Stopped|Suspended)
+p :test-3:
+w kill -KILL $!
+w wait
+u (Killed|Done)
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 028(C)
+
+# If the User Portability Utilities Option is supported: When the
+# POSIX locale is specified and a background job is suspended by a
+# SIGTTIN signal then the <state> field in the output message is set to
+# Stopped(SIGTTIN) or Suspended(SIGTTIN).
+
+I ^\r?\n$
+p :test-1:
+w sleep 60 &
+u [[:digit:]]\r?\n$
+s 100
+p :test-2:
+w kill -TTIN $!
+u (Stopped|Suspended) \(SIGTTIN\)
+p :test-3:
+w kill -KILL $!
+w wait
+u (Killed|Done)
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 029(C)
+
+# If the User Portability Utilities Option is supported: When the
+# POSIX locale is specified and a background job is suspended by a
+# SIGTTOU signal then the <state> field in the output message is set to
+# Stopped(SIGTTOU) or Suspended(SIGTTOU).
+
+I ^\r?\n$
+p :test-1:
+w sleep 60 &
+u [[:digit:]]\r?\n$
+s 100
+p :test-2:
+w kill -TTOU $!
+u (Stopped|Suspended) \(SIGTTOU\)
+p :test-3:
+w kill -KILL $!
+w wait
+u (Killed|Done)
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 091(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in insert mode an entered
+# character other than <newline>, erase, interrupt, kill, control-V,
+# control-W, backslash \ (followed by erase or kill), end-of-file and
+# <ESC> is inserted in the current command line.
+
+c echo h
+c ell
+w o
+u ^hello\r?\n$
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 093(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: After termination of a previous
+# command, sh is entered in insert mode.
+
+w echo hello
+u ^hello\r?\n$
+c echo goo
+c dby
+w e
+u ^goodbye\r?\n$
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 094(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in insert mode an <ESC>
+# switches sh into command mode.
+
+c echo he\E
+s 400
+w allo
+u ^hello\r?\n$
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 096(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in command mode the
+# interrupt character causes sh to terminate command line editing on
+# the current command line, re-issue the prompt on the next line of the
+# terminal and to reset the command history so that the command that
+# was interrupted is not entered in the history.
+
+I ^\r?\n$
+p :test-1:
+w echo first
+p :test-2:
+w stty intr ^C
+p :test-3:
+c echo bad\E
+s 400
+c \cC
+w echo scrambled
+p :test-4:
+w history
+u echo first
+r stty intr \^C
+r echo
+r history
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 097(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in insert mode a <newline>
+# causes the current command line to be executed.
+
+c echo ok\n
+u ^ok\r?\n$
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 099(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in insert mode the interrupt
+# character causes sh to terminate command line editing on the current
+# command line, re-issue the prompt on the next line of the terminal
+# and to reset the command history so that the command that was
+# interrupted is not entered in the history.
+
+I ^\r?\n$
+p :test-1:
+w echo first
+u ^first
+p :test-2:
+w stty intr ^C
+r
+p :test-3:
+c echo bad\cC
+w echo last
+p :test-4:
+w history
+u echo first
+r stty intr \^C
+r echo last
+r history
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 100(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in insert mode the kill
+# character clears all the characters from the input line.
+
+p :test-1:
+w stty kill ^X
+p :test-2:
+c echo bad\cX
+w echo ok
+u ^ok\r?\n$
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 101(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in insert mode a control-V
+# causes the next character to be inserted even in the case that the
+# character is a special insert mode character.
+# Testing Requirements: The assertion must be tested with at least the
+# following set of characters: <newline>, erase, interrupt, kill,
+# control-V, control-W, end-of-file, backslash \ (followed by erase or
+# kill) and <ESC>.
+
+d 10
+p :test-1:
+w stty erase ^H intr ^C kill ^X
+p :test-2:
+w echo erase=:\cV\cH:
+u ^erase=:\r?\n$
+p :test-3:
+w echo kill=:\cV\cX:
+u ^kill=:\cX:\r?\n$
+p :test-4:
+w echo control-V=:\cV\cV:
+u ^control-V=:\cV:\r?\n$
+p :test-5:
+w echo control-W:\cV\cW:
+u ^control-W:\cW:\r?\n$
+p :test-6:
+w echo EOF=:\cV\cD:
+u ^EOF=:\004:\r?\n$
+p :test-7:
+w echo backslash-erase=:\\\cH:
+u ^backslash-erase=:\r?\n$
+p :test-8:
+w echo backslash-kill=:\\\cX:
+u ^backslash-kill=:\cX:\r?\n$
+p :test-9:
+w echo ESC=:\cV\E:
+u ^ESC=:\E:\r?\n$
+p :test-10:
+w echo interrupt=:\cV\cC:
+u ^interrupt=:\cC:\r?\n$
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 104(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in insert mode an
+# end-of-file at the beginning of an input line is interpreted as the
+# end of input.
+
+p :test-1:
+w trap 'echo done >&2' EXIT
+p :test-2:
+s 100
+c \cD
+u ^done\r?\n$
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 111(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in command mode, # inserts
+# the character # at the beginning of the command line and causes the
+# line to be treated as a comment and the line is entered in the
+# command history.
+
+p :test-1:
+c echo save\E
+s 400
+c #
+p :test-2:
+w history
+u #echo save
+r history
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 137(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in command mode, then v
+# invokes the vi editor to edit the current command line in a temporary
+# file. When the editor exits, the commands in the temporary file are
+# executed.
+
+p :test-1:
+c echo hello\E
+s 400
+c v
+u /tmp/
+c A world\E
+s 400
+w :wq
+u ^hello world\r?\n$
+!
+
+# err_exit #
+tst $LINENO <<"!"
+L POSIX sh 251(C)
+
+# If the User Portability Utilities Option is supported and shell
+# command line editing is supported: When in command mode, then the
+# command N repeats the most recent / or ? command, reversing the
+# direction of the search.
+
+p :test-1:
+w echo repeat-1
+u ^repeat-1\r?\n$
+p :test-2:
+w echo repeat-2
+u ^repeat-2\r?\n$
+p :test-3:
+s 100
+c \E
+s 400
+w /rep
+u echo repeat-2
+c n
+r echo repeat-1
+c N
+r echo repeat-2
+w dd
+p :test-3:
+w echo repeat-3
+u ^repeat-3\r?\n$
+p :test-4:
+s 100
+c \E
+s 400
+w ?rep
+r echo repeat-2
+c N
+r echo repeat-1
+c n
+r echo repeat-2
+c n
+r echo repeat-3
+!
+
+# err_exit #
+whence -q less &&
+TERM=vt100 tst $LINENO <<"!"
+L process/terminal group exercise
+
+w m=yes; while true; do echo $m-$m; done | less
+u :$|:\E|lines
+c \cZ
+r Stopped
+w fg
+u yes-yes
+!
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/quoting.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/quoting.sh
index 6f6b231630..01aae0dc15 100644..100755
--- a/usr/src/lib/libshell/common/tests/quoting.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/quoting.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -21,7 +21,7 @@ function err_exit
{
print -u2 -n "\t"
print -u2 -r ${Command}[$1]: "${@:2}"
- let Errors+=1
+ (( Errors++ ))
}
alias err_exit='err_exit $LINENO'
@@ -79,6 +79,7 @@ x=$(print -r -- "\"$HOME\"")
if [[ $x != '"'$HOME'"' ]]
then err_exit "nested double quotes failed"
fi
+unset z
: ${z="a{b}c"}
if [[ $z != 'a{b}c' ]]
then err_exit '${z="a{b}c"} not correct'
@@ -302,7 +303,7 @@ fi
###########################################################
print foo) ]] || err_exit "command subsitution with long comments broken"
subject='some/other/words'
-re='(?*)/(?*)/(?*)'
+re='@(?*)/@(?*)/@(?*)'
[[ ${subject/${re}/\3} != words ]] && err_exit 'string replacement with \3 not working'
[[ ${subject/${re}/'\3'} != '\3' ]] && err_exit 'string replacement with '"'\3'"' not working'
[[ ${subject/${re}/"\\3"} != '\3' ]] && err_exit 'string replacement with "\\3" not working'
@@ -339,4 +340,30 @@ copy1=5 copynum=1
foo="`eval echo "$"{copy$copynum"-0}"`"
[[ $foo == "$copy1" ]] || err_exit '$"..." not being ignored inside ``'
-exit $((Errors))
+[[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd '') == 1 ]] || err_exit '${1+"$@"} with one empty argument fails'
+[[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd foo '') == 2 ]] || err_exit '${1+"$@"} with one non-empty and on empty argument fails'
+[[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd "" '') == 2 ]] || err_exit '${1+"$@"} with two empty arguments fails'
+[[ $($SHELL -c 'set -- ${1+"$@"}; print $#' cmd "" '' '') == 3 ]] || err_exit '${1+"$@"} with three empty arguments fails'
+[[ $($SHELL -c 'set -- "$@"; print $#' cmd '') == 1 ]] || err_exit '"$@" with one empty argument fails'
+[[ $($SHELL -c 'set -- "${@:2}"; print $#' cmd '') == 0 ]] || err_exit '"$@" with one empty argument fails'
+[[ $($SHELL -c 'set -- "$@"; print $#' cmd foo '') == 2 ]] || err_exit '"$@" with one non-empty and on empty argument fails'
+[[ $($SHELL -c 'set -- "$@"; print $#' cmd "" '') == 2 ]] || err_exit '"$@" with two empty arguments fails'
+[[ $($SHELL -c 'set -- "$@"; print $#' cmd "" '' '') == 3 ]] || err_exit '"$@" with three empty arguments fails'
+args=('')
+set -- "${args[@]}"
+[[ $# == 1 ]] || err_exit '"${args[@]}"} with one empty argument fails'
+set -- ${1+"${args[@]}"}
+[[ $# == 1 ]] || err_exit '${1+"${args[@]}"} with one empty argument fails'
+args=(foo '')
+set -- "${args[@]}"
+[[ $# == 2 ]] || err_exit '"${args[@]}"} with one non-empty and one empty argument fails'
+set -- ${1+"${args[@]}"}
+[[ $# == 2 ]] || err_exit '${1+"${args[@]}"} with one non-empty and one empty argument fails'
+
+unset ARGS
+set --
+ARGS=("$@")
+set -- "${ARGS[@]}"
+(( $# )) && err_exit 'set -- "${ARGS[@]}" for empty array should not produce arguments'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/quoting2.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/quoting2.sh
index 5f40be2256..bc7380d068 100644..100755
--- a/usr/src/lib/libshell/common/tests/quoting2.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/quoting2.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -80,6 +80,7 @@ x=$(print -r -- "\"$HOME\"")
if [[ $x != '"'$HOME'"' ]]
then err_exit "nested double quotes failed"
fi
+unset z
: ${z="a{b}c"}
if [[ $z != 'a{b}c' ]]
then err_exit '${z="a{b}c"} not correct'
@@ -206,4 +207,9 @@ foo='# '
[[ '\$' == '\$'* ]] || err_exit $'\'\\$\' not matching \'\\$\'*'
[[ a+a == ~(E)a\+a ]] || err_exit '~(E)a\+a not matching a+a'
[[ a+a =~ a\+a ]] || err_exit 'RE a\+a not matching a+a'
-exit $((Errors))
+
+exp='ac'
+got=$'a\0b'c
+[[ $got == "$exp" ]] || err_exit "\$'a\\0b'c expansion failed -- expected '$exp', got '$got'"
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/readcsv.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/readcsv.sh
new file mode 100755
index 0000000000..0aebc568a7
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/readcsv.sh
@@ -0,0 +1,70 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ let Errors+=1
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+
+tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
+trap "cd /; rm -rf $tmp" EXIT
+
+tmp1=$tmp/tmp1.csv
+tmp2=$tmp/tmp2.csv
+cat > $tmp1 <<- \EOF
+ CAT,"CVE CCODE","NECA OCN",ST,LATA,AP,"New InterState
+ Orig","New Inter""""State
+ Term","New IntraState
+ Orig","New IntraState
+ Term"
+ CLEC,XXXX,AAAA,RB,ABC,comp," 0.2 "," 0.4 "," 0.6 "," 0.8 "
+ CLEC,YYYY,QQQQ,SX,123,mmmm," 0.3 "," 0.5 "," 0.7 "," 0.9 "
+EOF
+integer count=0 nfields
+IFS=${2-,}
+for j in 1 2
+do typeset -a arr
+ while read -A -S arr
+ do ((nfields=${#arr[@]}))
+ if ((++count==1))
+ then ((nfields==10)) || err_exit 'first record should contain 10 fields'
+ [[ ${arr[7]} == $'New Inter""State\nTerm' ]] || err_exit $'7th field of record 1 should contain New Inter""State\nTerm'
+ fi
+ for ((i=0; i < nfields;i++))
+ do delim=$IFS
+ if ((i == nfields-1))
+ then delim=$'\r\n'
+ fi
+ if ((i==1))
+ then printf "%#q%s" "${arr[i]}" "$delim"
+ else printf "%(csv)q%s" "${arr[i]}" "$delim"
+ fi
+ done
+ done < $tmp1 > $tmp2
+done
+diff "$tmp1" "$tmp2" >/dev/null 2>&1 || err_exit "files $tmp1 and $tmp2 differ"
+
+exit $((Errors<125?Errors:125))
+
diff --git a/usr/src/lib/libshell/common/tests/recttype.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/recttype.sh
index a1185c0831..9f41d9266d 100644..100755
--- a/usr/src/lib/libshell/common/tests/recttype.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/recttype.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -66,4 +66,5 @@ r[one]=(ur=(x=4 y=4))
(( r[one].area == 16 )) || err_exit 'area of r[one] should be 16'
[[ ${r[one].area} == 16 ]] || err_exit '${r[one].area} should be 16'
unset r
-exit $Errors
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/restricted.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/restricted.sh
index 0306c443a6..5699105d20 100644..100755
--- a/usr/src/lib/libshell/common/tests/restricted.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/restricted.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -41,7 +41,7 @@ esac
function check_restricted
{
rm -f out
- rksh -c "$@" 2> out > /dev/null
+ LC_MESSAGES=C rksh -c "$@" 2> out > /dev/null
grep restricted out > /dev/null 2>&1
}
@@ -79,4 +79,5 @@ print hello
for i in PATH ENV FPATH
do check_restricted "function foo { typeset $i=foobar;};foo" || err_exit "$i can be changed in function by using typeset"
done
-exit $((Errors))
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/return.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/return.sh
index 90a9e8e832..8c243f5f33 100644..100755
--- a/usr/src/lib/libshell/common/tests/return.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/return.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -63,7 +63,7 @@ function bar
function funcheck
{
- [[ $foo = EXIT ]] || err_exit "foo "$@" : exit trap not set"
+ [[ $foo == EXIT ]] || err_exit "foo "$@" : exit trap not set"
if [[ -f $file ]]
then rm -r $file
err_exit "foo $@: doesn't remove $file"
@@ -95,14 +95,14 @@ then err_exit "foo 0 3: return is $ret not 3"
fi
funcheck 0 3
foo 2 0 || err_exit "foo 2 0: incorrect return"
-[[ $bar = EXIT ]] || err_exit "foo 2 0: bar exit trap not set"
+[[ $bar == EXIT ]] || err_exit "foo 2 0: bar exit trap not set"
funcheck 2 0
foo 2 3
ret=$?
if (( $ret != 3 ))
then err_exit "foo 2 3: return is $ret not 3"
fi
-[[ $bar = EXIT ]] || err_exit "foo 2 3: bar exit trap not set"
+[[ $bar == EXIT ]] || err_exit "foo 2 3: bar exit trap not set"
funcheck 2 3
(foo 3 3)
ret=$?
@@ -179,4 +179,5 @@ exit 1
if (( $? != 8 ))
then err_exit "exit 8 in trap should set exit value to 8"
fi
-exit $((Errors))
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/select.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/select.sh
index 136d87400b..07d0bde1b8 100644..100755
--- a/usr/src/lib/libshell/common/tests/select.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/select.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -63,4 +63,5 @@ do case $i in
done 3>&2 2> $tmp/2 <<!
foo
!
-exit $((Errors))
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/shtests b/usr/src/contrib/ast/src/cmd/ksh93/tests/shtests
new file mode 100755
index 0000000000..8321897c9d
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/shtests
@@ -0,0 +1,369 @@
+: ksh regression test harness :
+
+USAGE_LICENSE="[-author?David Korn <dgk@research.att.com>][-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+
+command=shtests
+
+setslocale='*@(locale).sh'
+timesensitive='*@(options|sigchld|subshell).sh'
+valgrindflags='--xml=yes --log-file=/dev/null --track-origins=yes --read-var-info=yes'
+
+USAGE=$'
+[-s8?
+@(#)$Id: shtests (AT&T Research) 2012-05-29 $
+]
+'$USAGE_LICENSE$'
+[+NAME?shtests - ksh regression test harness]
+[+DESCRIPTION?\bshtests\b is the \bksh\b(1) regression test harness for
+ \b$SHELL\b or \bksh\b if \bSHELL\b is not defined and exported. If
+ none of the \b--posix --utf8 --compile\b options are specified then
+ all three are enabled.]
+[+INPUT FILES?\bshtests\b regression test files are shell scripts that
+ run in an environment controlled by \bshtests\b. An identification
+ message is printed before and after each test on the standard output.
+ The default environment settings are:]
+ {
+ [+unset LANG]
+ [+unset LC_ALL]
+ [+LC_NUMERIC=C?\b.\b radix point assumed by all test scripts.]
+ [+VMALLOC_OPTIONS=abort?\bvmalloc\b(1) arena checking enabled
+ with \babort(2)\b on error.]
+ }
+[c:compile?Run test scripts using \bshcomp\b(1).]
+[d:debug?Enable \bshtests\b execution trace.]
+[l:locale?Disable \b--utf8\b and run the \b--posix\b and \b--compile\b
+ tests, if enabled, in the locale of the caller. This may cause invalid
+ regressions, especially for locales where \b.\b is not the radix
+ point.]
+[p:posix?Run the test scripts in the posix/C locale.]
+[t!:time?Include the current date/time in the test identification
+ messages.]
+[u:utf8?Run the test scripts in the ast-specific C.UTF-8 locale.]
+[v!:vmalloc_options?Run tests with \bVMALLOC_OPTIONS=abort\b. Test
+ script names matching \b'$timesensitive$'\b are run with
+ \bVMALLOC_OPTIONS\b unset.]
+[V:valgrind?Set \b--novmalloc_options\b and run the test scripts with
+ \bvalgrind\b(1) on \bksh\b. If \b$SHELL-g\b exists and is executable
+ than it is used instead of \b$SHELL\b.]
+[x:trace?Enable script execution trace.]
+
+[ test.sh ... ] [ name=value ... ]
+
+[+SEE ALSO?\bksh\b(1), \bregress\b(1), \brt\b(1)]
+'
+
+function usage
+{
+ OPTIND=0
+ getopts -a $command "$USAGE" OPT '--??long'
+ exit 2
+}
+
+function valxml
+{
+ typeset state=INIT data dir file fn line what
+ integer errors=0
+
+ #print === $1 ===; cat $1; print === ===
+ while read data
+ do case $state in
+ INIT) case $data in
+ '<error>')
+ state=ERROR
+ ;;
+ esac
+ ;;
+ ERROR) case $data in
+ '<kind>'Leak*'</kind>')
+ state=SKIP
+ ;;
+ '<kind>'*'</kind>')
+ state=KEEP
+ what=UNKNOWN
+ ;;
+ esac
+ ;;
+ FRAME) case $data in
+ '<dir>'*'</dir>')
+ dir=${data#'<dir>'}
+ dir=${dir%'</dir>'}
+ ;;
+ '<file>'*'</file>')
+ file=${data#'<file>'}
+ file=${file%'</file>'}
+ ;;
+ '<fn>'*'</fn>')
+ fn=${data#'<fn>'}
+ fn=${fn%'</fn>'}
+ ;;
+ '<line>'*'</line>')
+ line=${data#'<line>'}
+ line=${line%'</line>'}
+ ;;
+ '</frame>')
+ [[ $dir ]] && dir+=/
+ dir+=$file
+ [[ $dir ]] && dir+=:
+ [[ $line ]] && dir+=$line:
+ [[ $fn ]] && dir+=$fn
+ [[ $dir ]] && echo $'\t '$dir
+ state=KEEP
+ ;;
+ esac
+ ;;
+ KEEP) case $data in
+ '<auxwhat>'*'</auxwhat>')
+ what=${data#'<auxwhat>'}
+ what=${what%'</auxwhat>'}
+ echo $'\t'"$what"
+ ;;
+ '<frame>')
+ state=FRAME
+ dir=
+ file=
+ fn=
+ line=
+ ;;
+ '<what>Syscall param mount(type) points to unaddressable byte(s)</what>')
+ state=SKIP
+ ;;
+ '<what>'*'</what>')
+ (( errors++ ))
+ what=${data#'<what>'}
+ what=${what%'</what>'}
+ echo $'\n\t'"$what"
+ ;;
+ '<xwhat>')
+ state=WHAT
+ ;;
+ '</error>')
+ state=INIT
+ ;;
+ esac
+ ;;
+ SKIP) case $data in
+ '</error>')
+ state=INIT
+ ;;
+ esac
+ ;;
+ WHAT) case $data in
+ '<text>'*'</text>')
+ (( errors++ ))
+ what=${data#'<text>'}
+ what=${what%'</text>'}
+ echo $'\n\t'"$what"
+ ;;
+ '</xwhat>')
+ state=KEEP
+ ;;
+ esac
+ ;;
+ esac
+ done < "$1"
+ (( errors )) && echo
+ return $errors
+}
+
+unset DISPLAY ENV FIGNORE HISTFILE
+trap + PIPE # unadvertized -- set SIGPIPE to SIG_DFL #
+
+integer compile=-1 posix=-1 utf8=-1
+integer debug=0 locale=0 time=1
+typeset vmalloc_options=abort trace= valgrind=
+vmalloc_options= #XXX# until multi-region vmalloc trace fixed #XXX#
+
+while getopts -a $command "$USAGE" OPT
+do case $OPT in
+ c) if (( $OPTARG ))
+ then compile=2
+ else compile=0
+ fi
+ ;;
+ d) debug=$OPTARG
+ ;;
+ l) locale=$OPTARG
+ ;;
+ p) posix=$OPTARG
+ ;;
+ t) time=$OPTARG
+ ;;
+ u) utf8=$OPTARG
+ ;;
+ v) if (( OPTARG ))
+ then vmalloc_options=abort
+ else vmalloc_options=
+ fi
+ ;;
+ V) valgrind="${VALGRIND:-valgrind} ${VALGRINDFLAGS:-$valgrindflags}"
+ vmalloc_options=
+ ;;
+ x) trace=-x
+ ;;
+ *) usage
+ ;;
+ esac
+done
+shift $OPTIND-1
+
+if (( debug )) || [[ $trace ]]
+then export PS4=':$LINENO: '
+ if (( debug ))
+ then set -x
+ fi
+fi
+
+while [[ $1 == *=* ]]
+do eval export "$1"
+ shift
+done
+
+if (( compile <= 0 && posix <= 0 && utf8 <= 0 ))
+then (( compile )) && compile=1
+ (( posix )) && posix=1
+ (( utf8 )) && utf8=1
+fi
+(( compile < 0 )) && compile=0
+(( posix < 0 )) && posix=0
+(( utf8 < 0 )) && utf8=0
+if (( locale ))
+then utf8=0
+ if [[ $LC_ALL ]]
+ then export LANG=$LC_ALL
+ fi
+else unset LANG LC_ALL
+ export LC_NUMERIC=C
+fi
+if [[ $VMALLOC_OPTIONS ]]
+then vmalloc_options=$VMALLOC_OPTIONS
+else VMALLOC_OPTIONS=$vmalloc_options
+fi
+[[ $VMALLOC_OPTIONS ]] || timesensitive=.
+export PATH PWD SHCOMP SHELL VMALLOC_OPTIONS
+PWD=$(pwd)
+SHELL=${SHELL-ksh}
+case $0 in
+/*) d=$(dirname $0);;
+*/*) d=$PWD/$(dirname $0);;
+*) d=$PWD;;
+esac
+case $SHELL in
+/*) ;;
+*/*) SHELL=$d/$SHELL;;
+*) SHELL=$(whence $SHELL);;
+esac
+PATH=/bin:/usr/bin
+if [[ -d /usr/ucb ]]
+then PATH=$PATH:/usr/ucb
+fi
+PATH=$PATH:$d
+if [[ $INSTALLROOT && -r $INSTALLROOT/bin/.paths ]]
+then PATH=$INSTALLROOT/bin:$PATH
+fi
+if [[ ${SHELL%/*} != $INSTALLROOT/bin ]]
+then PATH=${SHELL%/*}:$PATH
+fi
+if [[ ! $SHCOMP ]]
+then s=${SHELL:##*sh}
+ s=${SHELL:%/*}/shcomp$s
+ if [[ -x $s ]]
+ then SHCOMP=$s
+ elif [[ -x ${s%-g} ]]
+ then SHCOMP=${s%-g}
+ else SHCOMP=shcomp
+ fi
+fi
+if (( compile ))
+then if whence $SHCOMP > /dev/null
+ then tmp=$(mktemp -dt) || { echo mktemp -dt failed >&2; exit 1; }
+ trap "cd /; rm -rf $tmp" EXIT
+ elif (( compile > 1 ))
+ then echo $0: --compile: $SHCOMP not found >&2
+ exit 1
+ else compile=0
+ fi
+fi
+if [[ $valgrind ]]
+then if [[ -x $SHELL-g ]]
+ then SHELL=$SHELL-g
+ fi
+ if [[ ! $tmp ]]
+ then tmp=$(mktemp -dt) || { echo mktemp -dt failed >&2; exit 1; }
+ trap "cd /; rm -rf $tmp" EXIT
+ fi
+ valxml=$tmp/valgrind.xml
+ valgrind+=" --xml-file=$valxml"
+fi
+typeset -A tests
+for i in ${*-*.sh}
+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
+ tests[$i]=$t
+ T=test
+ if (( t != 1 ))
+ then T=${T}s
+ fi
+ u=${i##*/}
+ u=${u%.sh}
+ if [[ $i == $timesensitive ]]
+ then VMALLOC_OPTIONS=
+ fi
+ if (( posix || utf8 ))
+ then locales=
+ (( posix )) && locales+=" ${LANG:-C}"
+ [[ $utf8 == 0 || $i == $setslocale ]] || locales+=" C.UTF-8"
+ for lang in $locales
+ do o=$u
+ if [[ $lang == C ]]
+ then lang=
+ else o="$o($lang)"
+ lang=LANG=$lang
+ fi
+ echo test $o begins ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"}
+ E=error
+ eval $lang \$valgrind \$SHELL \$trace \$i
+ e=$?
+ if [[ $valgrind ]]
+ then valxml $valxml
+ (( e += $? ))
+ fi
+ if (( e == 0 ))
+ then echo test $o passed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} "[ $t $T 0 ${E}s ]"
+ else e=$?
+ if (( e != 1 ))
+ then E=${E}s
+ fi
+ echo test $o failed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} with exit code $e "[ $t $T $e $E ]"
+ fi
+ done
+ fi
+ if (( compile ))
+ then c=$tmp/shcomp-$u.ksh
+ o="$u(shcomp)"
+ echo test $o begins ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"}
+ E=error
+ if $SHCOMP $i > $c
+ then if $valgrind $SHELL $trace $c
+ then echo test $o passed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} "[ $t $T 0 ${E}s ]"
+ else e=$?
+ if (( e != 1 ))
+ then E=${E}s
+ fi
+ echo test $o failed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} with exit code $e "[ $t $T $e $E ]"
+ fi
+ else e=$?
+ t=1
+ T=test
+ echo test $o failed to compile ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} with exit code $e "[ $t $T 1 $E ]"
+ fi
+ if [[ $i == $timesensitive ]]
+ then VMALLOC_OPTIONS=$vmalloc_options
+ fi
+ fi
+done
diff --git a/usr/src/lib/libshell/common/tests/sigchld.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/sigchld.sh
index f57ed6f5a7..d4dcee6c9e 100644..100755
--- a/usr/src/lib/libshell/common/tests/sigchld.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/sigchld.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -136,4 +136,25 @@ elif (( $3 != 9 ))
then err_exit "child status mismatch -- expected '9', got '$3'"
fi
-exit $((Errors))
+trap '' CHLD
+integer d
+for ((d=0; d < 2000; d++))
+do if print foo | grep bar
+ then break
+ fi
+done
+(( d==2000 )) || err_exit "trap '' CHLD causes side effects d=$d"
+trap - CHLD
+
+tmp=$(mktemp -dt)
+trap 'rm -rf $tmp' EXIT
+x=$($SHELL 2> /dev/null -ic '/bin/notfound; sleep .5 & sleep 1;jobs')
+[[ $x == *Done* ]] || err_exit 'SIGCHLD blocked after notfound'
+x=$($SHELL 2> /dev/null -ic 'kill -0 12345678901234567876; sleep .5 & sleep 1;jobs')
+[[ $x == *Done* ]] || err_exit 'SIGCHLD blocked after error message'
+print 'set -o monitor;sleep .5 & sleep 1;jobs' > $tmp/foobar
+chmod +x $tmp/foobar
+x=$($SHELL -c "echo | $tmp/foobar")
+[[ $x == *Done* ]] || err_exit 'SIGCHLD blocked for script at end of pipeline'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/signal.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/signal.sh
index 1538488c84..c6e150bb07 100644..100755
--- a/usr/src/lib/libshell/common/tests/signal.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/signal.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -33,6 +33,22 @@ trap "cd /; rm -rf $tmp" EXIT
cd $tmp || err_exit "cd $tmp failed"
+unset n s t
+typeset -A SIG
+for s in $(kill -l)
+do if ! n=$(kill -l $s 2>/dev/null)
+ then err_exit "'kill -l $s' failed"
+ elif ! t=$(kill -l $n 2>/dev/null)
+ then err_exit "'kill -l $n' failed"
+ elif [[ $s == ?(SIG)$t ]]
+ then SIG[${s#SIG}]=1
+ elif ! m=$(kill -l $t 2>/dev/null)
+ then err_exit "'kill -l $t' failed"
+ elif [[ $m != $n ]]
+ then err_exit "'kill -l $s' => $n, 'kill -l $n' => $t, kill -l $t => $m -- expected $n"
+ fi
+done
+
(
set --pipefail
{
@@ -237,10 +253,10 @@ expected[---]="3-intr"
expected[--d]="3-intr"
expected[-t-]="3-intr 2-intr 1-intr 1-0258"
expected[-td]="3-intr 2-intr 1-intr 1-0258"
-expected[x--]="3-intr 2-intr"
-expected[x-d]="3-intr 2-intr"
-expected[xt-]="3-intr 2-intr 1-intr 1-0258"
-expected[xtd]="3-intr 2-intr 1-intr 1-0258"
+expected[x--]="3-intr 2-intr 1-0000"
+expected[x-d]="3-intr 2-intr 1-0000"
+expected[xt-]="3-intr 2-intr 1-intr 1-0000"
+expected[xtd]="3-intr 2-intr 1-intr 1-0000"
expected[z--]="3-intr 2-intr 1-0000"
expected[z-d]="3-intr 2-intr 1-0000"
expected[zt-]="3-intr 2-intr 1-intr 1-0000"
@@ -252,72 +268,168 @@ while read ops out
do [[ $out == ${expected[$ops]} ]] || err_exit "interrupt $ops test failed -- expected '${expected[$ops]}', got '$out'"
done < tst.got
-float s=$SECONDS
-[[ $($SHELL -c 'trap "print SIGUSR1 ; exit 0" USR1; (trap "" USR1 ; exec kill -USR1 $$ & sleep 5); print done') == SIGUSR1 ]] || err_exit 'subshell ignoring signal does not send signal to parent'
-(( (SECONDS-s) < 4 )) && err_exit 'parent does not wait for child to complete before handling signal'
-((s = SECONDS))
-[[ $($SHELL -c 'trap "print SIGUSR1 ; exit 0" USR1; (trap "exit" USR1 ; exec kill -USR1 $$ & sleep 5); print done') == SIGUSR1 ]] || err_exit 'subshell catching signal does not send signal to parent'
-(( SECONDS-s < 4 )) && err_exit 'parent completes early'
+if [[ ${SIG[USR1]} ]]
+then float s=$SECONDS
+ [[ $(LC_ALL=C $SHELL -c 'trap "print SIGUSR1 ; exit 0" USR1; (trap "" USR1 ; exec kill -USR1 $$ & sleep 5); print done') == SIGUSR1 ]] || err_exit 'subshell ignoring signal does not send signal to parent'
+ (( (SECONDS-s) < 4 )) && err_exit 'parent does not wait for child to complete before handling signal'
+ ((s = SECONDS))
+ [[ $(LC_ALL=C $SHELL -c 'trap "print SIGUSR1 ; exit 0" USR1; (trap "exit" USR1 ; exec kill -USR1 $$ & sleep 5); print done') == SIGUSR1 ]] || err_exit 'subshell catching signal does not send signal to parent'
+ (( SECONDS-s < 4 )) && err_exit 'parent completes early'
+fi
-unset n s t
-for s in $(kill -l)
-do if ! n=$(kill -l $s 2>/dev/null)
- then err_exit "'kill -l $s' failed"
- continue
- fi
- if ! t=$(kill -l $n 2>/dev/null)
- then err_exit "'kill -l $n' failed"
- continue
- fi
- if [[ $s == ?(SIG)$t ]]
- then continue
- fi
- if ! m=$(kill -l $t 2>/dev/null)
- then err_exit "'kill -l $t' failed"
- continue
- fi
- if [[ $m == $n ]]
- then continue
- fi
- err_exit "'kill -l $s' => $n, 'kill -l $n' => $t, kill -l $t => $m -- expected $n"
-done
yes=$(whence -p yes)
-[[ $yes ]] && for exp in TERM VTALRM PIPE
-do { $SHELL <<- EOF
- foo() { return 0; }
- trap foo EXIT
- { sleep 2; kill -$exp \$\$; sleep 3; kill -0 \$\$ && kill -KILL \$\$; } &
- $yes | while read yes; do
- (/bin/date; sleep .1)
- done > /dev/null
- EOF
- } 2>> /dev/null
- got=$(kill -l $?)
- [[ $exp == $got ]] || err_exit "kill -$exp \$\$ failed, required termination by signal '$got'"
-done
+if [[ $yes ]]
+then for exp in TERM VTALRM PIPE
+ do if [[ ${SIG[$exp]} ]]
+ then {
+ $SHELL <<- EOF
+ foo() { return 0; }
+ trap foo EXIT
+ { sleep 2; kill -$exp \$\$; sleep 3; kill -0 \$\$ && kill -KILL \$\$; } &
+ $yes |
+ while read yes
+ do (/bin/date; sleep .1)
+ done > /dev/null
+ EOF
+ } 2>> /dev/null
+ got=$(kill -l $?)
+ [[ $exp == $got ]] || err_exit "kill -$exp \$\$ failed, required termination by signal '$got'"
+ fi
+ done
+fi
+
+SECONDS=0
+$SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; (sleep 5); print finished' > $tmp/sig
+e=$?
+[[ $e == 3 ]] || err_exit "exit status failed -- expected 3, got $e"
+x=$(<$tmp/sig)
+[[ $x == done ]] || err_exit "output failed -- expected 'done', got '$x'"
+(( SECONDS > 3.5 )) && err_exit "took $SECONDS seconds, expected around 2"
+
+SECONDS=0
+$SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; sleep 5; print finished' > $tmp/sig
+e=$?
+[[ $e == 3 ]] || err_exit "exit status failed -- expected 3, got $e"
+x=$(<$tmp/sig)
+[[ $x == done ]] || err_exit "output failed -- expected 'done', got '$x'"
+(( SECONDS > 3.5 )) && err_exit "took $SECONDS seconds, expected around 2"
SECONDS=0
-$SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done;exit 3" EXIT; (sleep 5);print finished' > $tmp/sig
-(( $?==3)) || err_exit "wrong exit status expecting 3 got $?"
+{ $SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; (sleep 5); print finished' > $tmp/sig ;} 2> /dev/null
+e=$?
+[[ $e == 3 ]] || err_exit "exit status failed -- expected 3, got $e"
x=$(<$tmp/sig)
-[[ $x == done ]] || err_exit "wrong result - execting done got $x"
-(( SECONDS > 3.5 )) && err_exit "took $SECONDS seconds, expecting around 2"
+[[ $x == done ]] || err_exit "output failed -- expected 'done', got '$x'"
+(( SECONDS > 3.5 )) && err_exit "took $SECONDS seconds, expected around 2"
SECONDS=0
-{ $SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done;exit" EXIT; (sleep 5);print finished' > $tmp/sig ;} 2> /dev/null
-[[ $(kill -l $?) == TERM ]] || err_exit "wrong exit status expecting TERM got $(kill -l $?)"
+{ $SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; sleep 5; print finished' > $tmp/sig ;} 2> /dev/null
+e=$?
+[[ $e == 3 ]] || err_exit "exit status failed -- expected 3, got $e"
x=$(<$tmp/sig)
-[[ $x == done ]] || err_exit "wrong result - execting done got $x"
-(( SECONDS > 3.5 )) && err_exit "took $SECONDS seconds, expecting around 2"
+[[ $x == done ]] || err_exit "output failed -- expected 'done', got '$x'"
+(( SECONDS > 3.5 )) && err_exit "took $SECONDS seconds, expected around 2"
SECONDS=0
-x=$($SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done;exit 3" EXIT; (sleep 5);print finished')
-(( $?==3)) || err_exit "wrong exit status expecting 3 got $?"
-[[ $x == done ]] || err_exit "wrong result - execting done got $x"
-(( SECONDS < 4 )) && err_exit "took $SECONDS seconds, expecting around 5"
+x=$($SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; (sleep 5); print finished')
+e=$?
+[[ $e == 3 ]] || err_exit "exit status failed -- expected 3, got $e"
+[[ $x == done ]] || err_exit "output failed -- expected 'done', got '$x'"
+(( SECONDS > 3.5 )) && err_exit "took $SECONDS seconds, expected around 2"
+
+SECONDS=0
+x=$($SHELL 2> /dev/null -c 'sleep 2 && kill $$ & trap "print done; exit 3" EXIT; sleep 5; print finished')
+e=$?
+[[ $e == 3 ]] || err_exit "exit status failed -- expected 3, got $e"
+[[ $x == done ]] || err_exit "output failed -- expected 'done', got '$x'"
+(( SECONDS > 3.5 )) && err_exit "took $SECONDS seconds, expected around 2"
trap '' SIGBUS
-[[ $($SHELL -c 'trap date SIGBUS;trap -p SIGBUS') ]] && err_exit 'SIGBUS should not have a trap'
+[[ $($SHELL -c 'trap date SIGBUS; trap -p SIGBUS') ]] && err_exit 'SIGBUS should not have a trap'
trap -- - SIGBUS
-exit $((Errors))
+{
+ x=$(
+ $SHELL <<- \++EOF
+ timeout()
+ {
+ trap 'trap - TERM; return' TERM
+ ( sleep $1; kill -TERM $$ ) >/dev/null 2>&1 &
+ sleep 3
+ }
+ timeout 1
+ print ok
+++EOF
+ )
+} 2> /dev/null
+[[ $x == ok ]] || err_exit 'return without arguments in trap not preserving exit status'
+
+x=$(
+ $SHELL <<- \++EOF
+ set -o pipefail
+ foobar()
+ {
+ for ((i=0; i < 10000; i++))
+ do print abcdefghijklmnopqrstuvwxyz
+ done | head > /dev/null
+ }
+ foobar
+ print ok
+ ++EOF
+)
+[[ $x == ok ]] || err_exit 'SIGPIPE exit status causes PIPE signal to be propogaged'
+
+x=$(
+ $SHELL <<- \EOF
+ trap "print GNAW" URG
+ print 1
+ ( sleep 1 ; kill -URG $$ ; sleep 1 ; print S1 ; )
+ print 2
+EOF
+)
+[[ $x == $'1\nS1\nGNAW\n2' ]] || err_exit 'signal ignored in subshell not propagated to parent'
+
+if [[ ${SIG[RTMIN]} ]]
+then {
+ $SHELL <<- \EOF
+ trap : RTMIN
+ for ((i=0 ; i < 3 ; i++))
+ do sleep 1
+ kill -RTMIN $$ 2> /dev/null
+ done &
+ wait
+ EOF
+ } 2> /dev/null
+ [[ $? == 0 ]] && err_exit 'wait interrupted by caught signal should have non-zero exit status'
+ {
+ $SHELL <<- \EOF
+ for ((i=0 ; i < 3 ; i++))
+ do sleep 1
+ kill -RTMIN $$ 2> /dev/null
+ done &
+ wait
+ EOF
+ } 2> /dev/null
+ [[ $(kill -l $?) == RTMIN ]] || err_exit 'wait interrupted by signal not caught should exit with the value of that signal+256'
+fi
+
+function b
+{
+ sleep 3
+ endb=1
+}
+
+function a
+{
+ trap 'print int' TERM
+ b
+ enda=1
+}
+
+{ /bin/sleep 1;kill -s TERM $$;}&
+unset enda endb
+a
+[[ $endb ]] && err_exit 'TERM signal did not kill function b'
+[[ $enda == 1 ]] || err_exit 'TERM signal killed function a'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/statics.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/statics.sh
new file mode 100755
index 0000000000..7e67279277
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/statics.sh
@@ -0,0 +1,690 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+#
+# Written by Roland Mainz <roland.mainz@nrubsig.org>
+#
+
+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 -T test_t=(
+ typeset name
+ typeset cmd
+ typeset expected_output
+)
+
+function testfunc
+{
+ integer line_number=$1
+ typeset cmd="$2"
+ typeset expected_output="$3"
+ typeset output
+
+ output="$($SHELL -c "${cmd}" 2>&1 )"
+
+ [[ "${output}" == "${expected_output}" ]] || err_exit ${line_number} "${output} != ${expected_output}"
+}
+
+# test1: basic tests
+function test1
+{
+ # string
+ testfunc ${LINENO} '(function l { typeset -S x ; x+="#" ; $1 && print "$x" ; } ; l false ; l false ; l true)' "###"
+ testfunc ${LINENO} 'function l { typeset -S x=">" ; x+="#" ; $1 && print "$x" ; } ; l false ; l false ; l true' ">###"
+ testfunc ${LINENO} 'function l { typeset -S x=">" ; x+="#" ; $1 && print "$x" ; } ; l false ; (l false) ; l true' ">##"
+ testfunc ${LINENO} 'function l { typeset -S x=">" ; x+="#" ; $1 && print "$x" ; } ; l false; ( ulimit -c 0 ; l false) ; l true' ">##"
+
+ # integer
+ # (normal)
+ testfunc ${LINENO} '(function l { integer -S x ; x+=1 ; $1 && print "$x" ; } ; l false ; l false ; l true )' "3"
+ testfunc ${LINENO} '(function l { integer -S x ; x+=1 ; $1 && print "$x" ; } ; l false ; (l false) ; l true )' "2"
+ # (int)
+ testfunc ${LINENO} '(function l { typeset -S -i x ; x+=1 ; $1 && print "$x" ; } ; l false ; l false ; l true )' "3"
+ testfunc ${LINENO} '(function l { typeset -S -i x ; x+=1 ; $1 && print "$x" ; } ; l false ; (l false) ; l true )' "2"
+ # (short)
+ testfunc ${LINENO} '(function l { typeset -S -s -i x ; x+=1 ; $1 && print "$x" ; } ; l false ; l false ; l true )' "3"
+ testfunc ${LINENO} '(function l { typeset -S -s -i x ; x+=1 ; $1 && print "$x" ; } ; l false ; (l false) ; l true )' "2"
+
+ # float
+ testfunc ${LINENO} '(function l { float -S x=0.5 ; (( x+=.5 )) ; $1 && print "$x" ; } ; l false ; l false ; l true )' "2"
+ testfunc ${LINENO} '(function l { float -S x=0.5 ; (( x+=.5 )) ; $1 && print "$x" ; } ; l false ; (l false) ; l true )' "1.5"
+
+ return 0
+}
+
+# test2: test the more complex datatypes
+function test2
+{
+ compound out=( typeset stdout stderr ; integer res )
+ integer i
+
+ test_t -r -a tests=(
+ (
+ name='compound'
+ cmd=$'
+ function l
+ {
+ compound -S s=(
+ integer a=1
+ integer b=2
+ )
+
+ (( s.a++, s.b++ ))
+
+ $1 && printf "a=%d, b=%d\n" s.a s.b
+ }
+ (l false ; l false ; l true ; printf ";")
+ (l false ; l false ; l true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+ (
+ name='compound_nameref'
+ cmd=$'
+ function l_n
+ {
+ nameref sn=$2
+ (( sn.a++, sn.b++ ))
+
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function l
+ {
+ compound -S s=( a=1 b=2 )
+ l_n $1 s
+ }
+ (l false ; l false ; l true ; printf ";")
+ (l false ; l false ; l true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='type'
+ cmd=$'
+ typeset -T ab_t=(
+ integer a=1
+ integer b=2
+
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+ function l
+ {
+ ab_t -S s
+
+ s.increment
+
+ $1 && printf "a=%d, b=%d\n" s.a s.b
+ }
+ (l false ; l false ; l true ; printf ";")
+ (l false ; l false ; l true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='type_nameref'
+ cmd=$'
+ typeset -T ab_t=(
+ integer a=1
+ integer b=2
+
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+ function l_n
+ {
+ nameref sn=$2
+
+ sn.increment
+
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function l
+ {
+ ab_t -S s
+ l_n $1 s
+ }
+ (l false ; l false ; l true ; printf ";")
+ (l false ; l false ; l true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='indexed_string_array_appendelement'
+ cmd=$'
+ function ar
+ {
+ typeset -a -S s=( "hello" )
+
+ s+=( "an element" )
+
+ $1 && { printf "%s" "${s[@]}" ; printf "\n" ; }
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'helloan elementan elementan element\n;helloan elementan elementan element\n;'
+ )
+
+ (
+ name='indexed_string_array_nameref_appendelement'
+ cmd=$'
+ function ar_n
+ {
+ nameref sn=$2
+ sn+=( "an element" )
+
+ $1 && { printf "%s" "${sn[@]}" ; printf "\n" ; }
+ }
+ function ar
+ {
+ typeset -a -S s=( "hello" )
+ ar_n $1 s
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'helloan elementan elementan element\n;helloan elementan elementan element\n;'
+ )
+
+ (
+ name='associative_string_array_appendelement'
+ cmd=$'
+ function ar
+ {
+ typeset -A -S s=( [0]="hello" )
+
+ s[$(( ${#s[@]} + 1))]="an element"
+
+ $1 && { printf "%s" "${s[@]}" ; printf "\n" ; }
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'helloan elementan elementan element\n;helloan elementan elementan element\n;'
+ )
+
+ (
+ name='associative_string_array_nameref_appendelement'
+ cmd=$'
+ function ar_n
+ {
+ nameref sn=$2
+
+ sn[$(( ${#sn[@]} + 1))]="an element"
+
+ $1 && { printf "%s" "${sn[@]}" ; printf "\n" ; }
+ }
+ function ar
+ {
+ typeset -A -S s=( [0]="hello" )
+ ar_n $1 s
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'helloan elementan elementan element\n;helloan elementan elementan element\n;'
+ )
+
+ (
+ name='indexed_compound_array_editelement'
+ cmd=$'
+ function ar
+ {
+ compound -S -a s=(
+ [5]=(
+ integer a=1
+ integer b=2
+ )
+ )
+
+ (( s[5].a++, s[5].b++ ))
+ $1 && printf "a=%d, b=%d\n" s[5].a s[5].b
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='indexed_compound_array_nameref_editelement'
+ cmd=$'
+ function ar_n
+ {
+ nameref sn=$2
+
+ (( sn.a++, sn.b++ ))
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function ar
+ {
+ compound -S -a s=(
+ [5]=(
+ integer a=1
+ integer b=2
+ )
+ )
+
+ ar_n $1 s[5]
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='2d_indexed_compound_array_editelement'
+ cmd=$'
+ function ar
+ {
+ compound -S -a s=(
+ [8][5]=(
+ integer a=1
+ integer b=2
+ )
+ )
+
+ (( s[8][5].a++, s[8][5].b++ ))
+ $1 && printf "a=%d, b=%d\n" s[8][5].a s[8][5].b
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='2d_indexed_compound_array_nameref_editelement'
+ cmd=$'
+ function ar_n
+ {
+ nameref sn=$2
+
+ (( sn.a++, sn.b++ ))
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function ar
+ {
+ compound -S -a s=(
+ [8][5]=(
+ integer a=1
+ integer b=2
+ )
+ )
+
+ ar_n $1 s[8][5]
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+ (
+ name='4d_indexed_compound_array_editelement'
+ cmd=$'
+ function ar
+ {
+ compound -S -a s=(
+ [8][5][0][9]=(
+ integer a=1
+ integer b=2
+ )
+ )
+
+ (( s[8][5][0][9].a++, s[8][5][0][9].b++ ))
+ $1 && printf "a=%d, b=%d\n" s[8][5][0][9].a s[8][5][0][9].b
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='4d_indexed_compound_array_nameref_editelement'
+ cmd=$'
+ function ar_n
+ {
+ nameref sn=$2
+
+ (( sn.a++, sn.b++ ))
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function ar
+ {
+ compound -S -a s=(
+ [8][5][0][9]=(
+ integer a=1
+ integer b=2
+ )
+ )
+
+ ar_n $1 s[8][5][0][9]
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='associative_compound_array_editelement'
+ cmd=$'
+ function ar
+ {
+ compound -S -A s=(
+ [5]=(
+ integer a=1
+ integer b=2
+ )
+ )
+
+ (( s[5].a++, s[5].b++ ))
+ $1 && printf "a=%d, b=%d\n" s[5].a s[5].b
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='associative_compound_array_nameref_editelement'
+ cmd=$'
+ function ar_n
+ {
+ nameref sn=$2
+
+ (( sn.a++, sn.b++ ))
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function ar
+ {
+ compound -S -A s=(
+ [5]=(
+ integer a=1
+ integer b=2
+ )
+ )
+
+ ar_n $1 s[5]
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='indexed_type_array_editelement'
+ cmd=$'
+ typeset -T ab_t=(
+ integer a=1
+ integer b=2
+
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+
+ function ar
+ {
+ ab_t -S -a s
+ [[ -v s[5] ]] || s[5]=( ) # how do I init an array of types ?
+
+ s[5].increment
+ $1 && printf "a=%d, b=%d\n" s[5].a s[5].b
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='indexed_type_array_nameref_editelement'
+ cmd=$'
+ typeset -T ab_t=(
+ integer a=1
+ integer b=2
+
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+
+ function ar_n
+ {
+ nameref sn=$2
+
+ sn.increment
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function ar
+ {
+ ab_t -S -a s
+ [[ -v s[5] ]] || s[5]=( ) # how do I init an array of types ?
+
+ ar_n $1 s[5]
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='2d_indexed_type_array_editelement'
+ cmd=$'
+ typeset -T ab_t=(
+ integer a=1
+ integer b=2
+
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+
+ function ar
+ {
+ ab_t -S -a s
+ [[ -v s[9][5] ]] || s[9][5]=( ) # how do I init an array of types ?
+
+ s[9][5].increment
+ $1 && printf "a=%d, b=%d\n" s[9][5].a s[9][5].b
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='2d_indexed_type_array_nameref_editelement'
+ cmd=$'
+ typeset -T ab_t=(
+ integer a=1
+ integer b=2
+
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+
+ function ar_n
+ {
+ nameref sn=$2
+
+ sn.increment
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function ar
+ {
+ ab_t -S -a s
+ [[ -v s[9][5] ]] || s[9][5]=( ) # how do I init an array of types ?
+
+ ar_n $1 s[9][5]
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='associative_type_array_editelement'
+ cmd=$'
+ typeset -T ab_t=(
+ integer a=1
+ integer b=2
+
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+
+ function ar
+ {
+ ab_t -S -A s
+ [[ -v s[5] ]] || s[5]=( ) # how do I init an array of types ?
+
+ s[5].increment
+ $1 && printf "a=%d, b=%d\n" s[5].a s[5].b
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ (
+ name='associative_type_array_nameref_editelement'
+ cmd=$'
+ typeset -T ab_t=(
+ integer a=1
+ integer b=2
+
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+
+ function ar_n
+ {
+ nameref sn=$2
+
+ sn.increment
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function ar
+ {
+ ab_t -S -A s
+ [[ -v s[5] ]] || s[5]=( ) # how do I init an array of types ?
+
+ ar_n $1 s[5]
+ }
+ (ar false ; ar false ; ar true ; printf ";")
+ (ar false ; ar false ; ar true ; printf ";")
+ '
+ expected_output=$'a=4, b=5\n;a=4, b=5\n;'
+ )
+
+ )
+
+ for (( i=0 ; i < ${#tests[@]} ; i++ )) ; do
+ nameref currtest=tests[i]
+
+#print -u2 -- "${currtest.cmd}"
+ out.stderr="${ { out.stdout="${ ${SHELL} -o nounset -c "${currtest.cmd}" ; (( out.res=$? )) ; }" ; } 2>&1 ; }"
+
+ (( out.res == 0 )) || err_exit "${currtest.name}: Test shell returned with exit code ${out.res}"
+ [[ "${out.stdout}" == "${currtest.expected_output}" ]] || err_exit "${currtest.name}: Expected stdout == $(printf "%q\n" "${currtest.expected_output}"), got $(printf "%q\n" "${out.stdout}")"
+ [[ "${out.stderr}" == '' ]] || err_exit "${currtest.name}: Expected empty stderr, got $(printf "%q\n" "${out.stderr}")"
+ done
+
+ return 0
+}
+
+# run tests
+test1
+test2
+
+
+# Test visibilty of "global" vs. "static" variables. if we have a "static" variable in a
+# function and "unset" it we should see a global variable with the same
+# name, right ?
+integer hx=5
+function test_hx_scope
+{
+ integer -S hx=9
+ $2 && unset hx
+ $1 && printf 'hx=%d\n' hx
+}
+test_hx_scope false false
+test_hx_scope false false
+# first test the "unset" call in a $(...) subshell...
+[[ "$( test_hx_scope true true )" == 'hx=5' ]] || err_exit "can't see global variable hx after unsetting static variable hx"
+# ... end then test whether the value has changed.
+[[ "${ test_hx_scope true false ;}" == 'hx=9' ]] || err_exit "hx variable somehow changed"
+
+out=$(function fun2
+{
+ nameref sn=$1
+ (( sn.a++, sn.b++ ))
+ $2 && printf "a=%d, b=%d\n" sn.a sn.b
+}
+function fun1
+{
+ compound -S s=( a=0 b=0 )
+ fun2 s $1
+}
+(fun1 false ; fun1 false ; fun1 true)
+(fun1 false ; fun1 false ; fun1 true)
+)
+[[ $out == $'a=3, b=3\na=3, b=3' ]] || err_exit 'static variables in functions with initializers not working'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/subshell.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/subshell.sh
index 1a7794d7d3..6cbff79105 100644..100755
--- a/usr/src/lib/libshell/common/tests/subshell.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/subshell.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -31,6 +31,7 @@ integer Errors=0 Error_fd=2
tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
trap "cd /; rm -rf $tmp" EXIT
+builtin getconf
bincat=$(PATH=$(getconf PATH) whence -p cat)
z=()
@@ -69,7 +70,6 @@ eval val="$z"
[[ $z == "$val" ]] || err_exit 'compound variable changes after associative array assignment'
eval val="$z"
(
-false
z.foo[two]=ok
[[ ${z.foo[two]} == ok ]] || err_exit 'associative array assignment to compound variable in subshell not working'
z.bar[1]=yes
@@ -103,6 +103,7 @@ while whence $TEST_notfound >/dev/null 2>&1
do TEST_notfound=notfound-$RANDOM
done
+
integer BS=1024 nb=64 ss=60 bs no
for bs in $BS 1
do $SHELL -c '
@@ -345,8 +346,7 @@ TST=(
( CMD='cat $tmp/buf | read v; print $v' LIM=4*1024 )
)
-command exec 3<> /dev/null
-if cat /dev/fd/3 >/dev/null 2>&1
+if cat /dev/fd/3 3</dev/null >/dev/null 2>&1 || whence mkfifo > /dev/null
then T=${#TST[@]}
TST[T].CMD='$cat <(print foo)'
TST[T].EXP=3
@@ -469,4 +469,201 @@ then EXP=$(printf %q "$exp")
err_exit "'$cmd' failed -- expected $EXP, got $GOT"
fi
-exit $Errors
+(
+$SHELL -c 'sleep 20 & pid=$!; { x=$( ( seq 60000 ) );kill -9 $pid;}&;wait $pid'
+) 2> /dev/null
+(( $? )) || err_exit 'nested command substitution with large output hangs'
+
+(.sh.foo=foobar)
+[[ ${.sh.foo} == foobar ]] && err_exit '.sh subvariables in subshells remain set'
+[[ $($SHELL -c 'print 1 | : "$(/bin/cat <(/bin/cat))"') ]] && err_exit 'process substitution not working correctly in subshells'
+
+# config hang bug
+integer i
+for ((i=1; i < 1000; i++))
+do typeset foo$i=$i
+done
+{
+ : $( (ac_space=' '; set | grep ac_space) 2>&1)
+} < /dev/null | cat > /dev/null &
+sleep 1.5
+if kill -KILL $! 2> /dev/null
+then err_exit 'process timed out with hung comsub'
+fi
+wait $! 2> /dev/null
+(( $? > 128 )) && err_exit 'incorrect exit status with comsub'
+
+$SHELL 2> /dev/null -c '[[ ${ print foo },${ print bar } == foo,bar ]]' || err_exit '${ print foo },${ print bar } not working'
+$SHELL 2> /dev/null -c '[[ ${ print foo; },${ print bar } == foo,bar ]]' || err_exit '${ print foo; },${ print bar } not working'
+
+src=$'true 2>&1\n: $(true | true)\n: $(true | true)\n: $(true | true)\n'$(whence -p true)
+exp=ok
+got=$( $SHELL -c "(eval '$src'); echo $exp" )
+[[ $got == "$exp" ]] || err_exit 'subshell eval of pipeline clobbers stdout'
+
+x=$( { time $SHELL -c date >| /dev/null;} 2>&1)
+[[ $x == *real*user*sys* ]] || err_exit 'time { ...;} 2>&1 in $(...) fails'
+
+x=$($SHELL -c '( function fx { export X=123; } ; fx; ); echo $X')
+[[ $x == 123 ]] && err_exit 'global variables set from with functions inside a
+subshell can leave side effects in parent shell'
+
+date=$(whence -p date)
+err() { return $1; }
+( err 12 ) & pid=$!
+: $( $date)
+wait $pid
+[[ $? == 12 ]] || err_exit 'exit status from subshells not being preserved'
+
+if cat /dev/fd/3 3</dev/null >/dev/null 2>&1 || whence mkfifo > /dev/null
+then x="$(sed 's/^/Hello /' <(print "Fred" | sort))"
+ [[ $x == 'Hello Fred' ]] || err_exit "process substitution of pipeline in command substitution not working"
+fi
+
+{
+$SHELL <<- \EOF
+ function foo
+ {
+ integer i
+ print -u2 foobar
+ for ((i=0; i < 8000; i++))
+ do print abcdefghijk
+ done
+ print -u2 done
+ }
+ out=$(eval "foo | cat" 2>&1)
+ (( ${#out} == 96011 )) || err_exit "\${#out} is ${#out} should be 96011"
+EOF
+} & pid=$!
+$SHELL -c "{ sleep 4 && kill $pid ;}" 2> /dev/null
+(( $? == 0 )) && err_exit 'process has hung'
+
+{
+x=$( $SHELL <<- \EOF
+ function func1 { typeset IFS; : $(func2); print END ;}
+ function func2 { IFS="BAR"; }
+ func1
+ func1
+EOF
+)
+} 2> /dev/null
+[[ $x == $'END\nEND' ]] || err_exit 'bug in save/restore of IFS in subshell'
+
+true=$(whence -p true)
+date=$(whence -p date)
+tmpf=$tmp/foo
+function fun1
+{
+ $true
+ cd - >/dev/null 2>&1
+ print -u2 -- "$($date) SUCCESS"
+}
+
+print -n $(fun1 2> $tmpf)
+[[ $(< $tmpf) == *SUCCESS ]] || err_exit 'standard error output lost with command substitution'
+
+
+tmpfile=$tmp/foo
+cat > $tmpfile <<-\EOF
+ $SHELL -c 'function g { IFS= ;};function f { typeset IFS;(g);: $V;};f;f'
+ EOF
+$SHELL 2> /dev/null "$tmpfile" || err_exit 'IFS in subshell causes core dump'
+
+unset i
+if [[ -d /dev/fd ]]
+then integer i
+ for ((i=11; i < 29; i++))
+ do if ! [[ -r /dev/fd/$i || -w /dev/fd/$i ]]
+ then a=$($SHELL -c "[[ -r /dev/fd/$i || -w /dev/fd/$i ]]")
+ (( $? )) || err_exit "file descriptor $i not close on exec"
+ fi
+ done
+fi
+
+trap USR1 USR1
+trap ERR ERR
+[[ $(trap -p USR1) == USR1 ]] || err_exit 'trap -p USR1 in subshell not working'
+[[ $(trap -p ERR) == ERR ]] || err_exit 'trap -p ERR in subshell not working'
+[[ $(trap -p) == *USR* ]] || err_exit 'trap -p in subshell does not contain USR'
+[[ $(trap -p) == *ERR* ]] || err_exit 'trap -p in subshell does not contain ERR'
+trap - USR1 ERR
+
+( PATH=/bin:/usr/bin
+dot=$(cat <<-EOF
+ $(ls -d .)
+ EOF
+) ) & sleep 1
+if kill -0 $! 2> /dev/null
+then err_exit 'command substitution containg here-doc with command substitution fails'
+fi
+
+printf=$(whence -p printf)
+[[ $( { trap "echo foobar" EXIT; ( $printf ""); } & wait) == foobar ]] || err_exit 'exit trap not being invoked'
+
+$SHELL 2> /dev/null -c '( PATH=/bin; set -o restricted) ; exit 0' || err_exit 'restoring PATH when a subshell enables restricted exits not working'
+
+$SHELL <<- \EOF
+ wc=$(whence wc) head=$(whence head)
+ print > /dev/null $( ( $head -c 1 /dev/zero | ( $wc -c) 3>&1 ) 3>&1) &
+ pid=$!
+ sleep 2
+ kill -9 $! 2> /dev/null && err_exit '/dev/zero in command substitution hangs'
+ wait $!
+EOF
+
+for f in /dev/stdout /dev/fd/1
+do if [[ -e $f ]]
+ then $SHELL -c "x=\$(command -p tee $f </dev/null 2>/dev/null)" || err_exit "$f in command substitution fails"
+ fi
+done
+
+# ========================================
+# Test that closing file descriptors don't affect capturing the output of a
+# subshell. Regression test for issue #198.
+tmpfile=$(mktemp)
+expected='return value'
+
+function get_value {
+ case=$1
+ (( case >= 1 )) && exec 3< $tmpfile
+ (( case >= 2 )) && exec 4< $tmpfile
+ (( case >= 3 )) && exec 6< $tmpfile
+
+ # To trigger the bug we have to spawn an external command. Why is a
+ # mystery but not really relevant.
+ $(whence -p true)
+
+ (( case >= 1 )) && exec 3<&-
+ (( case >= 2 )) && exec 4<&-
+ (( case >= 3 )) && exec 6<&-
+
+ print $expected
+}
+
+actual=$(get_value 0)
+if [[ $actual != $expected ]]
+then
+ err_exit -u2 "failed to capture subshell output when closing fd: case 0"
+fi
+
+actual=$(get_value 1)
+if [[ $actual != $expected ]]
+then
+ err_exit -u2 "failed to capture subshell output when closing fd: case 1"
+fi
+
+actual=$(get_value 2)
+if [[ $actual != $expected ]]
+then
+ err_exit -u2 "failed to capture subshell output when closing fd: case 2"
+fi
+
+actual=$(get_value 3)
+if [[ $actual != $expected ]]
+then
+ err_exit -u2 "failed to capture subshell output when closing fd: case 3"
+fi
+
+rm $tmpfile
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/substring.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/substring.sh
index d1dda6521f..1974615579 100644..100755
--- a/usr/src/lib/libshell/common/tests/substring.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/substring.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -163,7 +163,7 @@ if [[ ${xx//\//\\} != 'a\b\c\d\e' ]]
then err_exit '${xx//\//\\} not working'
fi
x=[123]def
-if [[ "${x//\[(*)\]/\{\1\}}" != {123}def ]]
+if [[ "${x//\[@(*)\]/\{\1\}}" != {123}def ]]
then err_exit 'closing brace escape not working'
fi
xx=%28text%29
@@ -237,16 +237,10 @@ if [[ $(export | grep "zzz=") ]]
then err_exit 'zzz exported after function call'
fi
set -- foo/bar bam/yes last/file/done
-if [[ ${@/*\/@(*)/${.sh.match[1]}} != 'bar yes done' ]]
-then err_exit '.sh.match not working with $@'
-fi
if [[ ${@/*\/@(*)/\1} != 'bar yes done' ]]
then err_exit '\1 not working with $@'
fi
var=(foo/bar bam/yes last/file/done)
-if [[ ${var[@]/*\/@(*)/${.sh.match[1]}} != 'bar yes done' ]]
-then err_exit '.sh.match not working with ${var[@]}'
-fi
if [[ ${var[@]/*\/@(*)/\1} != 'bar yes done' ]]
then err_exit '\1 not working with ${var[@]}'
fi
@@ -260,6 +254,8 @@ fi
if [[ ${var//+(\S)/Q} != 'Q Q' ]]
then err_exit '${var//+(\S)/Q} not workding'
fi
+var=$($SHELL -c 'v=/vin:/usr/vin r=vin; : ${v//vin/${r//v/b}};typeset -p .sh.match') 2> /dev/null
+[[ $var == 'typeset -a .sh.match=((vin vin) )' ]] || err_exit '.sh.match not correct when replacement pattern contains a substring match'
foo='foo+bar+'
[[ $(print -r -- ${foo//+/'|'}) != 'foo|bar|' ]] && err_exit "\${foobar//+/'|'}"
[[ $(print -r -- ${foo//+/"|"}) != 'foo|bar|' ]] && err_exit '${foobar//+/"|"}'
@@ -355,7 +351,7 @@ x='-((-))-'
x='-((-))-'
[[ ${x/~(+g:*(?))*%(())*(?)*/:\1:\2:\3:} == ':-(:(-):)-:' ]] || err_exit $M
x='call(a+b,x/(c/d),(0));'
-[[ ${x/+([[:alnum:]])*([[:space:]])(*%(()))*/:\1:\2:\3:} == ':call::(a+b,x/(c/d),(0)):' ]] || err_exit $M
+[[ ${x/+([[:alnum:]])*([[:space:]])@(*%(()))*/:\1:\2:\3:} == ':call::(a+b,x/(c/d),(0)):' ]] || err_exit $M
x='-(-;-)-'
[[ ${x/*%(()D${D})*/\1} == '-(-;-)-' ]] || err_exit $M
@@ -508,8 +504,8 @@ fi
string='foo(d:\nt\box\something)bar'
expected='d:\nt\box\something'
[[ ${string/*\(+([!\)])\)*/\1} == "$expected" ]] || err_exit "substring expansion failed '${string/*\(+([!\)])\)*/\1}' returned -- '$expected' expected"
-if [[ $($SHELL -c $'export LC_ALL=en_US.UTF-8; print -r "\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254" | wc -m' 2>/dev/null) == 10 ]]
-then LC_ALL=en_US.UTF-8 $SHELL -c b1=$'"\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254"; [[ ${b1:4:1} == w ]]' || err_exit 'multibyte ${var:offset:len} not working correctly'
+if [[ $($SHELL -c $'export LC_ALL=C.UTF-8; print -r "\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254" | wc -m' 2>/dev/null) == 10 ]]
+then LC_ALL=C.UTF-8 $SHELL -c b1=$'"\342\202\254\342\202\254\342\202\254\342\202\254w\342\202\254\342\202\254\342\202\254\342\202\254"; [[ ${b1:4:1} == w ]]' || err_exit 'multibyte ${var:offset:len} not working correctly'
fi
{ $SHELL -c 'unset x;[[ ${SHELL:$x} == $SHELL ]]';} 2> /dev/null || err_exit '${var:$x} fails when x is not set'
{ $SHELL -c 'x=;[[ ${SHELL:$x} == $SHELL ]]';} 2> /dev/null || err_exit '${var:$x} fails when x is null'
@@ -565,4 +561,104 @@ do i=$1
shift 4
done
-exit $((Errors))
+#multibyte locale tests
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x:0:1}" == a || err_exit ${x:0:1} should be a'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x:1:1}" == "<2b|>" || err_exit ${x:1:1} should be <2b|>'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x:3:1}" == "<3d|\\>" || err_exit ${x:3:1} should be <3d|\>'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x:4:1}" == e || err_exit ${x:4:1} should bee'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x:1}" == "<2b|>c<3d|\\>e" || print -u2 ${x:1}" should be <2b|>c<3d|\>e'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x: -1:1}" == e || err_exit ${x: -1:1} should be e'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x: -2:1}" == "<3d|\\>" || err_exit ${x: -2:1} == <3d|\>'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x:1:3}" == "<2b|>c<3d|\\>" || err_exit ${x:1:3} should be <2b|>c<3d|\>'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x:1:20}" == "<2b|>c<3d|\\>e" || err_exit ${x:1:20} should be <2b|>c<3d|\>e'
+x='a<2b|>c<3d|\>e' LC_ALL=debug $SHELL -c 'test "${x#??}" == "c<3d|\\>e" || err_exit "${x#??} should be c<3d|\>e'
+
+x='a one and a two'
+[[ "${x//~(E)\<.\>/}" == ' one and two' ]] || err_exit "\< and \> not working in with ere's"
+
+{
+$SHELL -c 'typeset x="123" ; integer i=100 ; print -n "${x:i:5}"'
+} 2> /dev/null || err_exit '${x:i:j} fails when i > strlen(x)'
+
+got=$($SHELL -c 'A=""; B="B"; for I in ${A[@]} ${B[@]}; do echo "\"$I\""; done')
+[[ $got == $'"B"' ]] || err_exit '"\"$I\"" fails when $I is empty string'
+
+A='|'
+[[ $A == $A ]] || err_exit 'With A="|", [[ $A == $A ]] does not match'
+
+x="111 222 333 444 555 666"
+[[ $x == ~(E)(...).(...).(...) ]]
+[[ -v .sh.match[0] ]] || err_exit '[[ -v .sh.match[0] ]] should be true'
+[[ -v .sh.match[3] ]] || err_exit '[[ -v .sh.match[3] ]] should be true'
+[[ -v .sh.match[4] ]] && err_exit '[[ -v .sh.match[4] ]] should be false'
+[[ ${#.sh.match[@]} == 4 ]] || err_exit "\${#.sh.match[@]} should be 4, not ${#.sh.match[@]}"
+
+x="foo bar"
+dummy=${x/~(E)(*)/}
+[[ ${ print -v .sh.match;} ]] && err_exit 'print -v should show .sh.match empty when there are no matches'
+
+if $SHELL -c 'set 1 2 3 4 5 6 7 8 9 10 11 12; : ${##[0-9]}' 2>/dev/null
+then set 1 2 3 4 5 6 7 8 9 10 11 12
+ [[ ${##[0-9]} == 2 ]] || err_exit '${##[0-9]} should be 2 with $#==12'
+ [[ ${###[0-9]} == 2 ]] || err_exit '${###[0-9]} should be 2 with $#==12'
+ [[ ${#%[0-9]} == 1 ]] || err_exit '${#%[0-9]} should be 1 with $#==12'
+ [[ ${#%%[0-9]} == 1 ]] || err_exit '${#%%[0-9]} should be 1 with $#==12'
+else err_exit '${##[0-9]} give syntax error'
+fi
+
+{
+ $SHELL -c 'x="a123 456 789z"; : ${x//{3}(\d)/ }' &
+ sleep .5; kill $!; wait $!
+} 2> /dev/null || err_exit $'tokenizer can\'t handle ${var op {..} }'
+
+
+function foo
+{
+ typeset x="123 456 789 abc"
+ typeset dummy="${x/~(E-g)([[:digit:]][[:digit:]])((X)|([[:digit:]]))([[:blank:]])/_}"
+ exp=$'(\n\t[0]=\'123 \'\n\t[1]=12\n\t[2]=3\n\t[4]=3\n\t[5]=\' \'\n)'
+ [[ $(print -v .sh.match) == "$exp" ]] || err_exit '.sh.match not correct with alternations'
+}
+foo
+
+x="a 1 b"
+d=${x/~(E)(([[:digit:]])[[:space:]]*|([[:alpha:]]))/X}
+[[ $(print -v .sh.match) == $'(\n\t[0]=a\n\t[1]=a\n\t[3]=a\n)' ]] || err_exit '.sh.match not sparse'
+
+unset v
+typeset -a arr=( 0 1 2 3 4 )
+for v in "${arr[@]:5}"
+do err_exit "\${arr[@]:5} should not generate $v"
+ break
+done
+for v in "${arr[@]:1:0}"
+do err_exit "\${arr[@]:1:0} should not generate ${v:-empty_string}"
+ break
+done
+for v in "${arr[@]:0:-1}"
+do err_exit "\${arr[@]:0:-1} should not generate ${v:-empty_string}"
+ break
+done
+
+set 1 2 3 4
+for v in "${@:5}"
+do err_exit "\${@:5} should not generate $v"
+ break
+done
+for v in "${@:1:0}"
+do err_exit "\${@:1:0} should not generate ${v:-empty_string}"
+ break
+done
+for v in "${@:0:-1}"
+do err_exit "\${@:0:-1} should not generate ${v:-empty_string}"
+ break
+done
+
+unset v d
+v=abbbc
+d="${v/~(E)b{2,4}/dummy}"
+[[ ${.sh.match} == bbb ]] || err_exit '.sh.match wrong after ${s/~(E)b{2,4}/dummy}'
+[[ $d == adummyc ]] || err_exit '${s/~(E)b{2,4}/dummy} not working'
+
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/tilde.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/tilde.sh
index ef5dc5c364..b0447238bd 100644..100755
--- a/usr/src/lib/libshell/common/tests/tilde.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/tilde.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -31,6 +31,11 @@ integer Errors=0
tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
trap "cd /; rm -rf $tmp" EXIT
+if $SHELL -c '[[ ~root == /* ]]'
+then x=$(print -r -- ~root)
+ [[ $x == ~root ]] || err_exit '~user expanded in subshell prevent ~user from working'
+fi
+
function home # id
{
typeset IFS=: pwd=/etc/passwd
@@ -92,4 +97,5 @@ print $'print ~+\n[[ $1 ]] && $0' > $tmp/tilde
chmod +x $tmp/tilde
nl=$'\n'
[[ $($tmp/tilde foo) == "$PWD$nl$PWD" ]] 2> /dev/null || err_exit 'tilde fails inside a script run by name'
-exit $((Errors))
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/timetype.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/timetype.sh
new file mode 100755
index 0000000000..16453c47e7
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/timetype.sh
@@ -0,0 +1,81 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors+=1 ))
+}
+alias err_exit='err_exit $LINENO'
+
+Command=${0##*/}
+integer Errors=0
+
+typeset -T Time_t=(
+ integer .=-1
+ _='%F+%H:%M'
+ get()
+ {
+ if (( _ < 0 ))
+ then .sh.value=${ printf "%(${_._})T" now ;}
+ else .sh.value=${ printf "%(${_._})T" "#$((_))" ;}
+ fi
+ }
+ set()
+ {
+ .sh.value=${ printf "%(%#)T" "${.sh.value}";}
+ }
+)
+
+d=$(printf "%(%F+%H:%M)T" now)
+integer s=$(printf "%(%#)T" "$d")
+Time_t t=$d
+[[ $t == "$d" ]] || err_exit "printf %T != Time_t -- expected '$d', got '$t'"
+(( t == s )) || err_exit "numeric Time_t failed -- expected '$s', got '$t'"
+t._='%#'
+[[ $t == $s ]] || err_exit "t._='%#' failed -- expected '$s', got '$t'"
+unset t
+Time_t tt=(yesterday today tomorrow)
+tt[3]=2pm
+[[ ${!tt[@]} == '0 1 2 3' ]] || err_exit "indexed array subscript names failed -- expected '0 1 2 3', got '${!tt[@]}'"
+[[ ${tt[0]} == *+00:00 ]] || err_exit "tt[0] failed -- expected 00:00, got '${tt[0]##*+}'"
+[[ ${tt[1]} == *+00:00 ]] || err_exit "tt[1] failed -- expected 00:00, got '${tt[1]##*+}'"
+[[ ${tt[2]} == *+00:00 ]] || err_exit "tt[2] failed -- expected 00:00, got '${tt[2]##*+}'"
+[[ ${tt[3]} == *+14:00 ]] || err_exit "tt[3] failed -- expected 14:00, got '${tt[3]##*+}'"
+unset tt
+Time_t tt=('2008-08-11+00:00:00,yesterday' '2008-08-11+00:00:00,today' '2008-08-11+00:00:00,tomorrow')
+tt[3]=9am
+tt[4]=5pm
+(( (tt[1] - tt[0]) == 24*3600 )) || err_exit "today-yesterday='$((tt[1] - tt[0]))' != 1 day"
+(( (tt[2] - tt[1]) == 24*3600 )) || err_exit "tomorrow-today='$((tt[2] - tt[1]))' != 1 day"
+(( (tt[4] - tt[3]) == 8*3600 )) || err_exit "9am..5pm='$((tt[4] - tt[3]))' != 8 hours"
+unset tt
+Time_t tt=([yesterday]='2008-08-11+00:00:00,yesterday' [today]='2008-08-11+00:00:00,today' [tomorrow]='2008-08-11+00:00:00,tomorrow')
+tt[2pm]='2008-08-11+00:00:00,2pm'
+[[ ${tt[yesterday]} == *+00:00 ]] || err_exit "tt[yesterday] failed -- expected 00:00, got '${tt[yesterday]##*+}'"
+[[ ${tt[today]} == *+00:00 ]] || err_exit "tt[today] failed -- expected 00:00, got '${tt[today]##*+}'"
+[[ ${tt[tomorrow]} == *+00:00 ]] || err_exit "tt[tomorrow] failed -- expected 00:00, got '${tt[tomorrow]##*+}'"
+[[ ${tt[2pm]} == *+14:00 ]] || err_exit "tt[2pm] failed -- expected 14:00, got '${tt[2pm]##*+}'"
+(( (tt[today] - tt[yesterday] ) == 24*3600 )) || err_exit "tt[today]-tt[yesterday] failed -- expected 24*3600, got $(((tt[today]-tt[yesterday])/3600.0))*3600"
+(( (tt[tomorrow] - tt[today] ) == 24*3600 )) || err_exit "tt[tomorrow]-tt[today] failed -- expected 24*3600, got $(((tt[tomorrow]-tt[today])/3600.0))*3600"
+(( (tt[2pm] - tt[today] ) == 14*3600 )) || err_exit "tt[2pm]-tt[today] failed -- expected 14*3600, got $(((tt[2pm]-tt[today])/3600.0))*3600"
+unset tt
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/ksh93/tests/treemove.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/treemove.sh
new file mode 100755
index 0000000000..8e293c0820
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/treemove.sh
@@ -0,0 +1,163 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# David Korn <dgk@research.att.com> #
+# #
+########################################################################
+#
+# 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 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+#
+# This test checks whether "typeset -m" correctly moves local variables
+# into a global variable tree.
+#
+# This was reported as CR #XXXXXXXX ("XXXX"):
+# -- snip --
+#XXXX
+# -- snip --
+#
+
+function err_exit
+{
+ print -u2 -n "\t"
+ print -u2 -r ${Command}[$1]: "${@:2}"
+ (( Errors+=1 ))
+}
+
+alias err_exit='err_exit $LINENO'
+
+integer Errors=0
+
+## test start
+typeset -C tree1 tree2
+
+# add node to tree which uses "typeset -m" to move a local variable
+# into tree1.subtree["a_node"]
+function f1
+{
+ nameref tr=$1
+ typeset -A tr.subtree
+ typeset -C node
+ node.one="hello"
+ node.two="world"
+ # move local note into the array
+false
+ typeset -m tr.subtree["a_node"]=node
+ return 0
+}
+
+# Alternative version which uses "nameref" instead of "typeset -m"
+function f2
+{
+ nameref tr=$1
+ typeset -A tr.subtree
+ nameref node=tr.subtree["a_node"]
+ node.one="hello"
+ node.two="world"
+ return 0
+}
+
+f1 tree1
+f2 tree2
+
+[[ "${tree1.subtree["a_node"].one}" == "hello" ]] || err_exit "expected tree1.subtree[\"a_node\"].one == 'hello', got ${tree1.subtree["a_node"].one}"
+[[ "${tree1.subtree["a_node"].two}" == "world" ]] || err_exit "expected tree1.subtree[\"a_node\"].two == 'world', got ${tree1.subtree["a_node"].two}"
+[[ "${tree1}" == "${tree2}" ]] || err_exit "tree1 and tree2 differ:$'\n'"
+
+unset c
+compound c
+typeset -C -a c.ar
+c.ar[4]=( a4=1 )
+typeset -m "c.ar[5]=c.ar[4]"
+exp=$'(\n\ttypeset -C -a ar=(\n\t\t[5]=(\n\t\t\ta4=1\n\t\t)\n\t)\n)'
+[[ $(print -v c) == "$exp" ]] || err_exit 'typeset -m "c.ar[5]=c.ar[4]" not working'
+
+typeset -T x_t=( hello=world )
+function m
+{
+ compound c
+ compound -a c.x
+ x_t c.x[4][5][8].field
+ x_t x
+ typeset -m c.x[4][6][9].field=x
+ exp=$'(\n\ttypeset -C -a x=(\n\t\t[4]=(\n\t\t\t[5]=(\n\t\t\t\t[8]=(\n\t\t\t\t\tx_t field=(\n\t\t\t\t\t\thello=world\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\t[6]=(\n\t\t\t\t[9]=(\n\t\t\t\t\tx_t field=(\n\t\t\t\t\t\thello=world\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t)\n)'
+ [[ $(print -v c) == "$exp" ]] || err_exit "typeset -m c.x[4][6][9].field=x where x is a type is not working"
+}
+m
+
+function moveme
+{
+ nameref src=$2 dest=$1
+ typeset -m dest=src
+}
+function main
+{
+ compound a=( aa=1 )
+ compound -a ar
+ moveme ar[4] a 2> /dev/null || err_exit 'function moveme fails'
+ exp=$'(\n\t[4]=(\n\t\taa=1\n\t)\n)'
+ [[ $(print -v ar) == "$exp" ]] || err_exit 'typeset -m dest=src where dest and src are name references fails'
+}
+main
+
+
+{
+$SHELL <<- \EOF
+ function main
+ {
+ compound c=(
+ compound -a board
+ )
+ for ((i=0 ; i < 2 ; i++ )) ; do
+ compound el=(typeset id='pawn')
+ typeset -m "c.board[1][i]=el"
+ done
+ exp=$'(\n\ttypeset -C -a board=(\n\t\t[1]=(\n\t\t\t(\n\t\t\t\tid=pawn\n\t\t\t)\n\t\t\t(\n\t\t\t\tid=pawn\n\t\t\t)\n\t\t)\n\t)\n)'
+ [[ $(print -v c) == "$exp" ]] || exit 1
+ }
+ main
+EOF
+} 2> /dev/null
+if ((exitval=$?))
+then if [[ $(kill -l $exitval) == SEGV ]]
+ then err_exit 'typeset -m "c.board[1][i]=el" core dumps'
+ else err_exit 'typeset -m "c.board[1][i]=el" gives wrong value'
+ fi
+fi
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/types.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/types.sh
index c20f2eb125..ca2e3eca47 100644..100755
--- a/usr/src/lib/libshell/common/tests/types.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/types.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -82,7 +82,7 @@ do
done
typeset -T Frame_t=( typeset file lineno )
Frame_t frame
-[[ $(typeset -p frame) == 'Frame_t frame=(typeset file;typeset lineno;)' ]] || err_exit 'empty fields in type not displayed'
+[[ $(typeset -p frame) == 'Frame_t frame=(typeset file;typeset lineno)' ]] || err_exit 'empty fields in type not displayed'
x=( typeset -a arr=([2]=abc [4]=(x=1 y=def));zz=abc)
typeset -C y=x
[[ "$x" == "$y" ]] || print -u2 'y is not equal to x'
@@ -248,11 +248,11 @@ function bar
}
bar
-expected='Fileinfo_t -A _Dbg_filenames=([foo]=(size=2;typeset -C -a text=([0]=line1 [1]=line2 [2]=line3);typeset -l -i mtime=-1;))'
+expected='Fileinfo_t -A _Dbg_filenames=([foo]=(size=3;typeset -a text=(line1 line2 line3);typeset -l -i mtime=-1))'
got=$(typeset -p _Dbg_filenames)
[[ "$got" == "$expected" ]] || {
got=$(printf %q "$got")
- err_exit "copy to associative array of types in function failed -- expected '$expected', got '$got'"
+ err_exit "copy to associative array of types in function failed -- expected '$expected', got $got"
}
$SHELL > /dev/null <<- '+++++' || err_exit 'passing _ as nameref arg not working'
@@ -268,7 +268,7 @@ $SHELL > /dev/null <<- '+++++' || err_exit 'passing _ as nameref arg not workin
A_t a
[[ ${ a.f ./t1;} == "$a" ]]
+++++
-expected='A_t b.a=(name=one;)'
+expected='A_t b.a=(name=one)'
[[ $( $SHELL << \+++
typeset -T A_t=(
typeset name=aha
@@ -286,7 +286,7 @@ expected='A_t b.a=(name=one;)'
b.f
+++
) == "$expected" ]] 2> /dev/null || err_exit '_.a=(name=one) not expanding correctly'
-expected='A_t x=(name=xxx;)'
+expected='A_t x=(name=xxx)'
[[ $( $SHELL << \+++
typeset -T A_t=(
typeset name
@@ -376,4 +376,267 @@ expected=$'Std_file_t db.file[/etc/profile]=(action=preserve;typeset -A sum=([82
} 2> /dev/null
[[ $got == "$expected" ]] || err_exit 'types with arrays of types as members fails'
-exit $Errors
+typeset -T x_t=(
+ integer dummy
+ function set
+ {
+ [[ ${.sh.name} == v ]] || err_exit "name=${.sh.name} should be v"
+ [[ ${.sh.subscript} == 4 ]] || err_exit "subscript=${.sh.subscript} should be 4"
+ [[ ${.sh.value} == hello ]] || err_exit "value=${.sh.value} should be hello"
+ }
+)
+x_t -a v
+v[4]="hello"
+
+typeset -T oset=(
+ typeset -A s
+)
+oset foo bar
+: ${foo.s[a]:=foobar}
+: ${bar.s[d]:=foobar}
+[[ ${bar.s[a]} == foobar ]] && err_exit '${var:=val} for types assigns to type instead of type instance'
+
+typeset -T olist=(
+ typeset -a l
+)
+olist foo
+foo.l[1]=x
+[[ ${!foo.l[*]} == *0* ]] && '0-th elment of foo.l should not be set'
+
+typeset -T oset2=( typeset -A foo )
+oset2 bar
+: ${bar.foo[a]}
+bar.foo[a]=b
+[[ ${#bar.foo[*]} == 1 ]] || err_exit "bar.foo should have 1 element not ${#bar.foo[*]}"
+[[ ${bar.foo[*]} == b ]] || err_exit "bar.foo[*] should be 'b' not ${bar.foo[*]}"
+[[ ${bar.foo[a]} == b ]] || err_exit "bar.foo[a] should be 'b' not ${bar.foo[*]}"
+
+{ x=$( $SHELL 2> /dev/null << \++EOF++
+ typeset -T ab_t=(
+ integer a=1 b=2
+ function increment
+ {
+ (( _.a++, _.b++ ))
+ }
+ )
+ function ar_n
+ {
+ nameref sn=$2
+ sn.increment
+ $1 && printf "a=%d, b=%d\n" sn.a sn.b
+ }
+ function ar
+ {
+ ab_t -S -a s
+ [[ -v s[5] ]] || s[5]=( )
+ ar_n $1 s[5]
+ }
+ x=$(ar false ; ar false ; ar true ; printf ";")
+ y=$(ar false ; ar false ; ar true ; printf ";")
+ print -r -- "\"$x\"" == "\"$y\""
+++EOF++
+) ;} 2> /dev/null
+[[ $x == *a=4*b=5* ]] || err_exit 'static types in a function not working'
+{ eval "[[ $x ]]";} 2> /dev/null || err_exit 'arrays of types leaving side effects in subshells'
+
+typeset -T y_t=(
+ typeset dummy
+ function print_b
+ {
+ print "B"
+ }
+)
+y_t a b=(
+ function print_b
+ {
+ print "1"
+ }
+)
+[[ $(a.print_b) == B ]] || err_exit 'default discipline not working'
+[[ $(b.print_b) == 1 ]] || err_exit 'discipline override not working'
+
+$SHELL 2> /dev/null -c 'true || { typeset -T Type_t=(typeset name=foo);
+ Type_t z=(name=bar) ;}' || err_exit 'unable to parse type command until typeset -T executes'
+
+cd "$tmp"
+FPATH=$PWD
+PATH=$PWD:$PATH
+cat > A_t <<- \EOF
+ typeset -T A_t=(
+ B_t b
+ )
+EOF
+cat > B_t <<- \EOF
+ typeset -T B_t=(
+ integer n=5
+ )
+EOF
+
+unset n
+if n=$(FPATH=$PWD PATH=$PWD:$PATH $SHELL 2> /dev/null -c 'A_t a; print ${a.b.n}')
+then (( n==5 )) || err_exit 'dynamic loading of types gives wrong result'
+else err_exit 'unable to load types dynamically'
+fi
+
+# check that typeset -T reproduces a type.
+if $SHELL > /dev/null 2>&1 -c 'typeset -T'
+then $SHELL > junk1 <<- \+++EOF
+ typeset -T foo_t=(
+ integer x=3 y=4
+ float z=1.2
+ len()
+ {
+ ((.sh.value=sqrt(_.x**2 + _.y**2) ))
+ }
+ function count
+ {
+ print z=$z
+ }
+ )
+ typeset -T
+ print 'typeset -T'
+ +++EOF
+ $SHELL -c '. ./junk1;print "typeset -T"' > junk2
+ diff junk[12] > /dev/null || err_exit 'typeset -T not idempotent'
+ $SHELL -c '. ./junk1;print "typeset +f"' > junk2
+ [[ -s junk2 ]] || err_exit 'non-discipline-method functions found'
+else
+ err_exit 'typeset -T not supported'
+fi
+
+[[ $($SHELL -c 'typeset -T x=( typeset -a h ) ; x j; print -v j.h') ]] && err_exit 'type with indexed array without elements inserts element 0'
+
+[[ $($SHELL -c 'typeset -T x=( integer -a s ) ; compound c ; x c.i ; c.i.s[4]=666 ; print -v c') == *'[0]'* ]] && err_exit 'type with indexed array with non-zero element inserts element 0'
+
+
+{ $SHELL -c '(sleep 3;kill $$)& typeset -T x=( typeset -a s );compound c;x c.i;c.i.s[7][5][3]=hello;x c.j=c.i;[[ ${c.i} == "${c.j}" ]]';} 2> /dev/null
+exitval=$?
+if [[ $(kill -l $exitval) == TERM ]]
+then err_exit 'clone of multi-dimensional array timed out'
+elif ((exitval))
+then err_exit "c.i and c.j are not the same multi-dimensional array"
+fi
+
+typeset -T foobar_t=(
+ float x=1 y=0
+ slen()
+ {
+ print -r -- $((sqrt(_.x**2 + _.y**2)))
+ }
+ typeset -fS slen
+ len()
+ {
+ print -r -- $((sqrt(_.x**2 + _.y**2)))
+ }
+)
+unset z
+foobar_t z=(x=3 y=4)
+(( z.len == 5 )) || err_exit 'z.len should be 5'
+(( z.slen == 1 )) || err_exit 'z.slen should be 1'
+(( .sh.type.foobar_t.slen == 1 )) || err_exit '.sh.type.foobar_t.slen should be 1'
+(( .sh.type.foobar_t.len == 1 )) || err_exit '.sh.type.foobar_t.len should be 1'
+
+typeset -T z_t=( typeset -a ce )
+z_t x1
+x1.ce[3][4]=45
+compound c
+z_t -a c.x2
+c.x2[9]=x1
+got=$(typeset +p "c.x2[9].ce")
+exp='typeset -a c.x2[9].ce'
+[[ $got == "$exp" ]] || err_exit "typeset +p 'c.x2[9].ce' failed -- expected '$exp', got '$got'"
+
+unset b
+typeset -T a_t=(
+ typeset a="hello"
+)
+typeset -T b_t=(
+ a_t b
+)
+compound b
+compound -a b.ca
+b_t b.ca[4].b
+exp='typeset -C b=(typeset -C -a ca=( [4]=(b_t b=(a_t b=(a=hello))));)'
+got=$(typeset -p b)
+[[ $got == "$exp" ]] || err_exit 'typeset -p of nested type not correct'
+
+typeset -T u_t=(
+ integer dummy
+ unset()
+ {
+ print unset
+ }
+)
+unset z
+u_t -a x | read z
+[[ $z == unset ]] && err_exit 'unset discipline called on type creation'
+
+{ z=$($SHELL 2> /dev/null 'typeset -T foo; typeset -T') ;} 2> /dev/null
+[[ $z == 'typeset -T foo' ]] || err_exit '"typeset -T foo; typeset -T" failed'
+
+{ z=$($SHELL 2> /dev/null 'typeset -T foo=bar; typeset -T') ;} 2> /dev/null
+[[ $z ]] && err_exit '"typeset -T foo=bar" should not creates type foo'
+
+{
+$SHELL << \EOF
+ typeset -T board_t=(
+ compound -a board_y
+ function binsert
+ {
+ nameref figure=$1
+ integer y=$2 x=$3
+ typeset -m "_.board_y[y].board_x[x].field=figure"
+ }
+ )
+ function main
+ {
+ compound c=(
+ board_t b
+ )
+ for ((i=0 ; i < 2 ; i++ )) ; do
+ compound p=( hello=world )
+ c.b.binsert p 1 $i
+ done
+ exp='typeset -C c=(board_t b=(typeset -a board_y=( [1]=(typeset -a board_x=( [0]=(field=(hello=world;))[1]=(field=(hello=world)));));))'
+ [[ $(typeset -p c) == "$exp" ]] || exit 1
+ }
+ main
+EOF
+} 2> /dev/null
+if (( exitval=$?))
+then if [[ $(kill -l $exitval) == SEGV ]]
+ then err_exit 'typeset -m in type discipline causes exception'
+ else err_exit 'typeset -m in type discipline gives wrong value'
+ fi
+fi
+
+typeset -T pawn_t=(
+ print_debug()
+ {
+ print 'PAWN'
+ }
+)
+function main
+{
+ compound c=(
+ compound -a board
+ )
+
+ for ((i=2 ; i < 8 ; i++ )) ; do
+ pawn_t c.board[1][$i]
+ done
+
+}
+main 2> /dev/null && err_exit 'type assignment to compound array instance should generate an error'
+
+{ $SHELL -c 'typeset -T Foo_t=(integer -a data=([0]=0) );Foo_t x=(data[0]=2);((x.data[0]==2))'
+} 2> /dev/null || err_exit 'type definition with integer array variable not working'
+
+typeset -T Bar_t=(
+ typeset -a foo
+)
+Bar_t bar
+bar.foo+=(bam)
+[[ ${bar.foo[0]} == bam ]] || err_exit 'appending to empty array variable in type does not create element 0'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/variables.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/variables.sh
index da943e0c87..6eec31b68a 100644..100755
--- a/usr/src/lib/libshell/common/tests/variables.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/variables.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2012 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -108,7 +108,7 @@ fi
# check for attributes across subshells
typeset -i x=3
y=1/0
-if ( typeset x=y ) 2> /dev/null
+if ( x=y ) 2> /dev/null
then err_exit "attributes not passed to subshells"
fi
unset x
@@ -484,6 +484,15 @@ function dave.unset
unset dave
[[ $(typeset +f) == *dave.* ]] && err_exit 'unset discipline not removed'
+x=$(
+ dave=dave
+ function dave.unset
+ {
+ print dave.unset
+ }
+)
+[[ $x == dave.unset ]] || err_exit 'unset discipline not called with subset completion'
+
print 'print ${VAR}' > $tmp/script
unset VAR
VAR=new $tmp/script > $tmp/out
@@ -551,7 +560,7 @@ function foo.set
fi
;;
barrier_hit)
- if [[ ${.sh.value} = yes ]]
+ if [[ ${.sh.value} == yes ]]
then foo[barrier_not_hit]=no
else foo[barrier_not_hit]=yes
fi
@@ -656,4 +665,13 @@ eval $v=C
cmd='set --nounset; unset foo; : ${!foo*}'
$SHELL -c "$cmd" 2>/dev/null || err_exit "'$cmd' exit status $?, expected 0"
-exit $((Errors))
+SHLVL=1
+level=$($SHELL -c $'$SHELL -c \'print -r "$SHLVL"\'')
+[[ $level == 3 ]] || err_exit "SHLVL should be 3 not $level"
+
+[[ $($SHELL -c '{ x=1; : ${x.};print ok;}' 2> /dev/null) == ok ]] || err_exit '${x.} where x is a simple variable causes shell to abort'
+
+$SHELL -c 'unset .sh' 2> /dev/null
+[[ $? == 1 ]] || err_exit 'unset .sh should return 1'
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/vartree1.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/vartree1.sh
index 4701251549..d558dc6efe 100644..100755
--- a/usr/src/lib/libshell/common/tests/vartree1.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/vartree1.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -211,4 +211,5 @@ function main
}
main
-exit $((Errors))
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/lib/libshell/common/tests/vartree2.sh b/usr/src/contrib/ast/src/cmd/ksh93/tests/vartree2.sh
index 806b443377..e3e4cffc2a 100644..100755
--- a/usr/src/lib/libshell/common/tests/vartree2.sh
+++ b/usr/src/contrib/ast/src/cmd/ksh93/tests/vartree2.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
+# Copyright (c) 1982-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -331,4 +331,5 @@ function main
}
main
-exit $((Errors))
+
+exit $((Errors<125?Errors:125))
diff --git a/usr/src/contrib/ast/src/cmd/msgcc/Makefile b/usr/src/contrib/ast/src/cmd/msgcc/Makefile
new file mode 100644
index 0000000000..4ddc41ad50
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/msgcc/Makefile
@@ -0,0 +1,19 @@
+:PACKAGE: ast
+
+LICENSE = since=2000,author=gsf
+
+msgadmin :: msgadmin.sh
+
+msgcpp :: msgcpp.c -lpp
+
+msgcc :: msgcc.sh
+
+msgcvt :: msgcvt.c
+
+msggen :: msggen.c
+
+msgget :: msgget.c
+
+:TEST: msgcc
+
+:: RELEASE NOTES PROMO.mm
diff --git a/usr/src/contrib/ast/src/cmd/msgcc/Mamfile b/usr/src/contrib/ast/src/cmd/msgcc/Mamfile
new file mode 100644
index 0000000000..32ca4e5988
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/msgcc/Mamfile
@@ -0,0 +1,314 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+setv INSTALLROOT ../../..
+setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
+setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+make msgadmin
+make msgadmin.sh
+done msgadmin.sh
+meta msgadmin %.sh>% msgadmin.sh msgadmin
+prev msgadmin.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : msgadmin contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n msgadmin.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 201 in
+exec - 0) cp msgadmin.sh msgadmin
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < msgadmin.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - msgadmin.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msgcc]"
+exec - !
+exec - } > msgadmin
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - msgadmin.sh > msgadmin <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msgcc]"
+exec - !
+exec - ;;
+exec - esac
+exec - silent test -w msgadmin -a -x msgadmin || chmod u+w,+x msgadmin
+done msgadmin generated
+make msgcpp
+make msgcpp.o
+make msgcpp.c
+make ${PACKAGE_ast_INCLUDE}/ppkey.h implicit
+make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ppkey.h
+make ${PACKAGE_ast_INCLUDE}/pp.h implicit
+make ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_ccode.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_ccode.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare
+make ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare
+done ${PACKAGE_ast_INCLUDE}/endian.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ccode.h dontcare
+make ${PACKAGE_ast_INCLUDE}/error.h implicit
+make ${PACKAGE_ast_INCLUDE}/option.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare
+make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+make ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare
+done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare
+make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare
+done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/regex.h dontcare
+make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
+prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare
+done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare
+make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/option.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/error.h dontcare
+make ${PACKAGE_ast_INCLUDE}/hash.h implicit
+make ${PACKAGE_ast_INCLUDE}/hashpart.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/hashpart.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/hash.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/pp.h
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done msgcpp.c
+meta msgcpp.o %.c>%.o msgcpp.c msgcpp
+prev msgcpp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msgcc]"\" -c msgcpp.c
+done msgcpp.o generated
+bind -lpp
+bind -last
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L${INSTALLROOT}/lib} -o msgcpp msgcpp.o ${mam_libpp} ${mam_libast}
+done msgcpp generated
+make msgcc
+make msgcc.sh
+done msgcc.sh
+meta msgcc %.sh>% msgcc.sh msgcc
+prev msgcc.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : msgcc contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n msgcc.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 201 in
+exec - 0) cp msgcc.sh msgcc
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < msgcc.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - msgcc.sh <<'!'
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msgcc]"
+exec - !
+exec - } > msgcc
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - msgcc.sh > msgcc <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msgcc]"
+exec - !
+exec - ;;
+exec - esac
+exec - silent test -w msgcc -a -x msgcc || chmod u+w,+x msgcc
+done msgcc generated
+make msgcvt
+make msgcvt.o
+make msgcvt.c
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done msgcvt.c
+meta msgcvt.o %.c>%.o msgcvt.c msgcvt
+prev msgcvt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msgcc]"\" -c msgcvt.c
+done msgcvt.o generated
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L${INSTALLROOT}/lib} -o msgcvt msgcvt.o ${mam_libast}
+done msgcvt generated
+make msggen
+make msggen.o
+make msggen.c
+make ${PACKAGE_ast_INCLUDE}/mc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/mc.h
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done msggen.c
+meta msggen.o %.c>%.o msggen.c msggen
+prev msggen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msgcc]"\" -c msggen.c
+done msggen.o generated
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L${INSTALLROOT}/lib} -o msggen msggen.o ${mam_libast}
+done msggen generated
+make msgget
+make msgget.o
+make msgget.c
+prev ${PACKAGE_ast_INCLUDE}/mc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done msgget.c
+meta msgget.o %.c>%.o msgget.c msgget
+prev msgget.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?msgcc]"\" -c msgget.c
+done msgget.o generated
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L${INSTALLROOT}/lib} -o msgget msgget.o ${mam_libast}
+done msgget generated
+make ${INSTALLROOT}/bin
+exec - if silent test ! -d ${INSTALLROOT}/bin
+exec - then mkdir -p ${INSTALLROOT}/bin
+exec - fi
+done ${INSTALLROOT}/bin generated
+make ${INSTALLROOT}/bin/msgadmin
+prev ${INSTALLROOT}/bin
+prev msgadmin
+exec - test '' = 'msgadmin' || ${STDCMP} 2>/dev/null -s msgadmin ${INSTALLROOT}/bin/msgadmin || { ${STDMV} ${INSTALLROOT}/bin/msgadmin ${INSTALLROOT}/bin/msgadmin.old 2>/dev/null || true; ${STDCP} msgadmin ${INSTALLROOT}/bin/msgadmin ;}
+done ${INSTALLROOT}/bin/msgadmin generated
+make ${INSTALLROOT}/bin/msgcpp
+prev msgcpp
+exec - test '' = 'msgcpp' || ${STDCMP} 2>/dev/null -s msgcpp ${INSTALLROOT}/bin/msgcpp || { ${STDMV} ${INSTALLROOT}/bin/msgcpp ${INSTALLROOT}/bin/msgcpp.old 2>/dev/null || true; ${STDCP} msgcpp ${INSTALLROOT}/bin/msgcpp ;}
+done ${INSTALLROOT}/bin/msgcpp generated
+make ${INSTALLROOT}/bin/msgcc
+prev msgcc
+exec - test '' = 'msgcc' || ${STDCMP} 2>/dev/null -s msgcc ${INSTALLROOT}/bin/msgcc || { ${STDMV} ${INSTALLROOT}/bin/msgcc ${INSTALLROOT}/bin/msgcc.old 2>/dev/null || true; ${STDCP} msgcc ${INSTALLROOT}/bin/msgcc ;}
+done ${INSTALLROOT}/bin/msgcc generated
+make ${INSTALLROOT}/bin/msgcvt
+prev msgcvt
+exec - test '' = 'msgcvt' || ${STDCMP} 2>/dev/null -s msgcvt ${INSTALLROOT}/bin/msgcvt || { ${STDMV} ${INSTALLROOT}/bin/msgcvt ${INSTALLROOT}/bin/msgcvt.old 2>/dev/null || true; ${STDCP} msgcvt ${INSTALLROOT}/bin/msgcvt ;}
+done ${INSTALLROOT}/bin/msgcvt generated
+make ${INSTALLROOT}/bin/msggen
+prev msggen
+exec - test '' = 'msggen' || ${STDCMP} 2>/dev/null -s msggen ${INSTALLROOT}/bin/msggen || { ${STDMV} ${INSTALLROOT}/bin/msggen ${INSTALLROOT}/bin/msggen.old 2>/dev/null || true; ${STDCP} msggen ${INSTALLROOT}/bin/msggen ;}
+done ${INSTALLROOT}/bin/msggen generated
+make ${INSTALLROOT}/bin/msgget
+prev msgget
+exec - test '' = 'msgget' || ${STDCMP} 2>/dev/null -s msgget ${INSTALLROOT}/bin/msgget || { ${STDMV} ${INSTALLROOT}/bin/msgget ${INSTALLROOT}/bin/msgget.old 2>/dev/null || true; ${STDCP} msgget ${INSTALLROOT}/bin/msgget ;}
+done ${INSTALLROOT}/bin/msgget generated
+done install virtual
+make test
+make test.msgcc
+prev msgcc
+make msgcc.tst
+done msgcc.tst
+exec - regress msgcc.tst msgcc
+done test.msgcc virtual
+done test dontcare virtual
diff --git a/usr/src/cmd/ast/msgcc/NOTES b/usr/src/contrib/ast/src/cmd/msgcc/NOTES
index 864a3a206c..864a3a206c 100644
--- a/usr/src/cmd/ast/msgcc/NOTES
+++ b/usr/src/contrib/ast/src/cmd/msgcc/NOTES
diff --git a/usr/src/cmd/ast/msgcc/PROMO.mm b/usr/src/contrib/ast/src/cmd/msgcc/PROMO.mm
index d39264185e..d39264185e 100644
--- a/usr/src/cmd/ast/msgcc/PROMO.mm
+++ b/usr/src/contrib/ast/src/cmd/msgcc/PROMO.mm
diff --git a/usr/src/contrib/ast/src/cmd/msgcc/RELEASE b/usr/src/contrib/ast/src/cmd/msgcc/RELEASE
new file mode 100644
index 0000000000..7abe3d7de7
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/msgcc/RELEASE
@@ -0,0 +1,14 @@
+10-10-20 msgcc.sh: add raw type (like str) for ksh -D style strings
+10-06-01 sync with ast api 20100601
+06-11-15 msgcc.sh: date -f x => date +x for ast-base portability
+06-10-11 add sfstruse() error checks
+02-03-11 msgcc: fix merge replacement threshhold logic
+ msggen: convert { \a \b \f \n \r \v } back to C escapes
+ msgcpp: set pp:modern
+02-02-14 msggen: add -f to list printf format signatures
+01-10-10 msgcc: allow some email forms to pass
+01-06-10 msgcpp: add proper escapes to OMIT pattern
+01-05-29 msgcc: add similar unused message replacement, -M-similar
+01-04-22 msgcc,msggen,msgget: use mcindex()
+01-01-31 ignore ls generation errors
+00-04-20 first release
diff --git a/usr/src/contrib/ast/src/cmd/msgcc/msgadmin.sh b/usr/src/contrib/ast/src/cmd/msgcc/msgadmin.sh
new file mode 100644
index 0000000000..97d2ea743f
--- /dev/null
+++ b/usr/src/contrib/ast/src/cmd/msgcc/msgadmin.sh
@@ -0,0 +1,180 @@
+########################################################################
+# #
+# This software is part of the ast package #
+# Copyright (c) 2000-2011 AT&T Intellectual Property #
+# and is licensed under the #
+# Eclipse Public License, Version 1.0 #
+# by AT&T Intellectual Property #
+# #
+# A copy of the License is available at #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
+# #
+# Information and Software Systems Research #
+# AT&T Research #
+# Florham Park NJ #
+# #
+# Glenn Fowler <gsf@research.att.com> #
+# #
+########################################################################
+: message catalog administration
+
+command=msgadmin
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123) ARGV0="-a $command"
+ USAGE=$'
+[-?
+@(#)$Id: msgadmin (AT&T Labs Research) 2001-06-08 $
+]
+'$USAGE_LICENSE$'
+[+NAME?'$command$' - message catalog file administration]
+[+DESCRIPTION?\b'$command$'\b administers message catalog files. If no \afile\a
+ operands are specified then all message files in the local
+ \b$INSTALLROOT\b source tree are operated on. Exactly one of
+ \b--generate\b, \b--remove\b, \b--translate\b, or \b--verify\b
+ must be specified.]
+[D:debug?Passed to \btranslate\b(1).]
+[a:all?Passed to \btranslate\b(1).]
+[c:cache?Passed to \btranslate\b(1).]
+[d:dialect?Operate on the dialects in the \b,\b separated \adialect\a list.
+ \b-\b means all dialects supported by \btranslate\b(1).]:[dialect:=-]
+[f:force?Force binary catalog generation even when the current binary is newer
+ than the source.]
+[g:generate?Generate and install \bgencat\b(1) binary message catalogs.]
+[l:list?List each installed message catalog name paired with its input source.]
+[n:show?Show commands but do not execute.]
+[o:omit?Omit \btranslate\b(1) methods matching the \bksh\b(1)
+ \apattern\a.]:[pattern]
+[r:remove?Remove all translated message files and work directories.]
+[s:share?Generate and install \bmsggen\b(1) machine independent binary
+ message catalogs.]
+[t:translate?Translate using \btranslate\b(1).]
+[v:verify?Verify that translated message files satisfy \bgencat\b(1) syntax.]
+
+[ file ... ]
+
+[+SEE ALSO?\bgencat\b(1), \bksh\b(1), \bmsggen\b(1), \btranslate\b(1)]
+'
+ ;;
+*) ARGV0=""
+ USAGE="Dcd:gno:rstv [ file ... ]"
+ ;;
+esac
+
+usage()
+{
+ OPTIND=0
+ getopts $ARGV0 "$USAGE" OPT '-?'
+ exit 2
+}
+
+messages()
+{
+ if [[ $PACKAGEROOT && -d $PACKAGEROOT ]]
+ then MSGROOT=$PACKAGEROOT
+ else MSGROOT=$HOME
+ fi
+ set -- $MSGROOT/arch/*/src/cmd/INIT/INIT.msg
+ [[ -f $1 ]] || { print -u2 $"$command: INIT.msg: not found"; exit 1; }
+ MSGROOT=${1%/src/cmd/INIT/INIT.msg}
+ grep -l '^1' $MSGROOT/src/@(cmd|lib)/*/*.msg
+}
+
+integer n
+typeset all cache dialect=- exec force omit op show verbose
+typeset dir=$INSTALLROOT gen=gencat
+
+while getopts $ARGV0 "$USAGE" OPT
+do case $OPT in
+ D) debug=-D ;;
+ a) all=-a ;;
+ c) cache=-c ;;
+ d) dialect=$OPTARG ;;
+ f) force=1 ;;
+ g) op=generate ;;
+ l) op=list ;;
+ n) exec=print show=-n ;;
+ o) omit="-o $OPTARG" ;;
+ r) op=remove ;;
+ s) gen=msggen dir=$dir/share ;;
+ t) op=translate ;;
+ v) op=verify ;;
+ *) usage ;;
+ esac
+done
+shift $OPTIND-1
+
+[[ $INSTALLROOT ]] || { print -u2 $"$command: INSTALLROOT not defined"; exit 1; }
+
+case $op in
+
+generate)
+ dir=$dir/lib/locale
+ [[ -d $dir ]] || { print -u2 $"$command: $dir: not found"; exit 1; }
+ (( ! $# )) && set -- C $(ls *-*.msg 2>/dev/null | sed 's,.*-\(.*\)\.msg,\1,' | sort -u)
+ owd=$PWD
+ for locale
+ do case $locale in
+ C) set -- $(messages) ;;
+ *) set -- *-$locale.msg ;;
+ esac
+ if [[ ! -f $1 ]]
+ then print -u2 "$command: $locale: no message files"
+ else nwd=$dir/$locale/LC_MESSAGES
+ [[ -d $nwd ]] || $exec mkdir -p $nwd || exit
+ [[ -d $nwd ]] && { cd $nwd || exit; }
+ for file
+ do case $file in
+ /*) name=${file##*/}
+ name=${name%*.msg}
+ ;;
+ *) name=${file%-$locale.msg}
+ file=$owd/$file
+ ;;
+ esac
+ if [[ $force || ! $name -nt $file ]]
+ then print -u2 $locale $name:
+ $exec rm -f $name $name.*
+ $exec $gen $name $file
+ fi
+ done
+ cd $owd
+ fi
+ done
+ ;;
+
+list) messages | sed 's,^.*/\(.*\)\.msg$,\1 &,'
+ ;;
+
+remove) (( !$# )) && set -- *.msg translate.tmp
+ $exec rm -rf "$@"
+ ;;
+
+translate)
+ (( !$# )) && set -- $(messages)
+ translate -lmv $all $cache $debug $omit $show $dialect "$@"
+ ;;
+
+verify) (( ! $# )) && set -- *.msg
+ for file
+ do n=0
+ while read -r num txt
+ do if [[ $num == +([0-9]) ]]
+ then ((n++))
+ if [[ $n != $num ]]
+ then if (( n == $num-1 ))
+ then print -u2 "$file: [$n] missing"
+ else print -u2 "$file: [$n-$(($num-1))] missing"
+ fi
+ n=$num
+ fi
+ fi
+ done < $file
+ done
+ ;;
+
+*) usage
+ ;;
+
+esac
diff --git a/usr/src/cmd/ast/msgcc/msgcc.sh b/usr/src/contrib/ast/src/cmd/msgcc/msgcc.sh
index 209cbda167..2c858641fd 100644
--- a/usr/src/cmd/ast/msgcc/msgcc.sh
+++ b/usr/src/contrib/ast/src/cmd/msgcc/msgcc.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 2000-2009 AT&T Intellectual Property #
+# Copyright (c) 2000-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -28,7 +28,7 @@ case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
0123) ARGV0="-a $__command__"
USAGE=$'
[-?
-@(#)$Id: msgcc (AT&T Labs Research) 2002-09-15 $
+@(#)$Id: msgcc (AT&T Labs Research) 2010-10-20 $
]
'$USAGE_LICENSE$'
[+NAME?msgcc - C language message catalog compiler]
@@ -52,12 +52,12 @@ case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
an unused message number.]
[+set=\anumber\a?Set the message set number to \anumber\a. The default
is \b1\b.]
- [+similar=\anumber\a?The message text similarity measure thresshold.
+ [+similar=\anumber\a?The message text similarity measure threshold.
The similarity measure between \aold\a and \anew\a message
text is 100*(2*gzip(\aold\a+\anew\a)/(gzip(\aold\a)+gzip(\anew\a))-1),
where gzip(\ax\a) is the size of text \ax\a when compressed by
- \bgzip\b(1). The default threshhold is '$__similar__$'. A
- threshhold of \b0\b turns off message replacement, but unused
+ \bgzip\b(1). The default threshold is '$__similar__$'. A
+ threshold of \b0\b turns off message replacement, but unused
old messages are still deleted. Use \b-M-preserve\b to preserve
all old messages.]
[+verbose?Trace similar message replacements on the standard error.]
@@ -170,8 +170,12 @@ do case $# in
esac
shift
done
-__cmdv__[__cmds__]=${__out__%.msg}
-(( __cmds__++ ))
+__arg__=${__out__##*/}
+__arg__=${__arg__%.msg}
+if [[ -x $__arg__ ]]
+then __cmdv__[__cmds__]=$__arg__
+ (( __cmds__++ ))
+fi
# generate the .mso files
@@ -249,6 +253,7 @@ then if [[ $__merge__ && -r $__out__ ]]
print -r -- '$set'" $__set__"
print -r -- '$quote "'
sort -u "${__objv__[@]}" | {
+ __raw__=
while read -r __line__
do __op__=${__line__%% *}
__line__=${__line__#* }
@@ -265,6 +270,8 @@ then if [[ $__merge__ && -r $__out__ ]]
;;
str) print -r -- "$__line__"
;;
+ raw) __raw__=$__raw__$'\n'$__line__
+ ;;
var) __a1__=${__line__%% *}
__a2__=${__line__#* }
case $__a1__ in
@@ -289,10 +296,13 @@ then if [[ $__merge__ && -r $__out__ ]]
for (( __i__=0; __i__ < __cmds__; __i__++ ))
do keys ${__cmdv__[__i__]}
done
+ [[ $__raw__ ]] && print -r "${__raw__#?}" | sed -e 's/^"//' -e 's/"$//' -e 's/\\/&&/g' -e 's/"/\\"/g' -e 's/.*/$RAW$"&"/'
} | {
__num__=1
while read -r __line__
do case $__line__ in
+ '$RAW$'*)
+ ;;
'$'[\ \ ]*)
print -r -- "$__line__"
continue
@@ -301,30 +311,32 @@ then if [[ $__merge__ && -r $__out__ ]]
continue
;;
*[[:alpha:]][[:alpha:]]*)
- __line__=${__line__#*'"'}
- __line__=${__line__%'"'}
- if [[ $__line__ ]]
- then if [[ ${__index__["$__line__"]} ]]
- then if [[ ! $__preserve__ ]]
- then __num__=${__index__["$__line__"]}
- __keep__[$__num__]=1
- fi
- else while [[ ${__text__[$__num__]} ]]
- do (( __num__++ ))
- done
- if (( __max__ < __num__ ))
- then (( __max__=__num__ ))
- fi
- if [[ ! $__preserve__ ]]
- then __keep__[$__num__]=1
- fi
- __text__[$__num__]=$__line__
- __index__["$__line__"]=$__num__
- (( __num__++ ))
- fi
- fi
+ ;;
+ *) continue
;;
esac
+ __line__=${__line__#*'"'}
+ __line__=${__line__%'"'}
+ if [[ $__line__ ]]
+ then if [[ ${__index__["$__line__"]} ]]
+ then if [[ ! $__preserve__ ]]
+ then __num__=${__index__["$__line__"]}
+ __keep__[$__num__]=1
+ fi
+ else while [[ ${__text__[$__num__]} ]]
+ do (( __num__++ ))
+ done
+ if (( __max__ < __num__ ))
+ then (( __max__=__num__ ))
+ fi
+ if [[ ! $__preserve__ ]]
+ then __keep__[$__num__]=1
+ fi
+ __text__[$__num__]=$__line__
+ __index__["$__line__"]=$__num__
+ (( __num__++ ))
+ fi
+ fi
done
if (( __max__ < __num__ ))
then (( __max__=__num__ ))
diff --git a/usr/src/cmd/ast/msgcc/msgcc.tst b/usr/src/contrib/ast/src/cmd/msgcc/msgcc.tst
index 101b05de5b..101b05de5b 100644
--- a/usr/src/cmd/ast/msgcc/msgcc.tst
+++ b/usr/src/contrib/ast/src/cmd/msgcc/msgcc.tst
diff --git a/usr/src/cmd/ast/msgcc/msgcpp.c b/usr/src/contrib/ast/src/cmd/msgcc/msgcpp.c
index a9ac00b52f..f3c410df02 100644
--- a/usr/src/cmd/ast/msgcc/msgcpp.c
+++ b/usr/src/contrib/ast/src/cmd/msgcc/msgcpp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 2000-2009 AT&T Intellectual Property *
+* Copyright (c) 2000-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/cmd/ast/msgcc/msgcvt.c b/usr/src/contrib/ast/src/cmd/msgcc/msgcvt.c
index 329fce0d83..34386a01f8 100644
--- a/usr/src/cmd/ast/msgcc/msgcvt.c
+++ b/usr/src/contrib/ast/src/cmd/msgcc/msgcvt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 2000-2009 AT&T Intellectual Property *
+* Copyright (c) 2000-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/cmd/ast/msgcc/msggen.c b/usr/src/contrib/ast/src/cmd/msgcc/msggen.c
index d6999c8b2c..9fdf5878d8 100644
--- a/usr/src/cmd/ast/msgcc/msggen.c
+++ b/usr/src/contrib/ast/src/cmd/msgcc/msggen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 2000-2009 AT&T Intellectual Property *
+* Copyright (c) 2000-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/cmd/ast/msgcc/msgget.c b/usr/src/contrib/ast/src/cmd/msgcc/msgget.c
index d4c8798fa2..a1e2f2ffb2 100644
--- a/usr/src/cmd/ast/msgcc/msgget.c
+++ b/usr/src/contrib/ast/src/cmd/msgcc/msgget.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 2000-2009 AT&T Intellectual Property *
+* Copyright (c) 2000-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -90,7 +90,7 @@ main(int argc, char** argv)
loc = 0;
if (cat = strchr(cmd, ':'))
*cat++ = 0;
- if (!mcfind(path, loc, cmd, LC_MESSAGES, 0) && (!cat || !mcfind(path, loc, cat, LC_MESSAGES, 0)))
+ if (!mcfind(loc, cmd, LC_MESSAGES, 0, path, sizeof(path)) && (!cat || !mcfind(loc, cat, LC_MESSAGES, 0, path, sizeof(path))))
{
if (cat)
*--cat = ':';
diff --git a/usr/src/contrib/ast/src/lib/libast/Makefile b/usr/src/contrib/ast/src/lib/libast/Makefile
new file mode 100644
index 0000000000..feb9951eca
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/Makefile
@@ -0,0 +1,434 @@
+/*
+ * ast library
+ */
+
+:PACKAGE: ast
+
+LICENSE = since=1985,author=gsf+dgk+kpv
+
+ID = ast
+
+HOSTTYPE == "$(CC.HOSTTYPE)"
+
+CCFLAGS = $(CC.SUFFIX.DEBUG:+$(CC.DEBUG)) $(CC.OPTIMIZE) $(CC.DLL)
+
+IFFEFLAGS = -v -X ast -X std
+
+.SOURCE : aso cdt comp dir disc hash man misc obsolete path port preroot \
+ regex sfio stdio string tm uwin vec vmalloc
+
+.SOURCE.h : include comp std cdt vmalloc
+
+CP = $(STDCP|"cp")
+
+PARANOID ==
+CONF_LIBPREFIX == "$(CC.PREFIX.DYNAMIC|CC.PREFIX.SHARED)"
+CONF_LIBSUFFIX == "$(CC.SUFFIX.DYNAMIC|CC.SUFFIX.SHARED)"
+DEBUG ==
+__OBSOLETE__ == $("6 months ago":@F=%(%Y0101)T)
+
+HEADERSRC = ast.h ast_dir.h ast_getopt.h ast_std.h \
+ ast_namval.h ast_windows.h \
+ ccode.h cdt.h cdtlib.h cmdarg.h debug.h dt.h error.h find.h ftw.h \
+ ftwalk.h fts.h fs3d.h getopt.h glob.h hash.h hashkey.h hashpart.h \
+ ip6.h lc.h ls.h magic.h mc.h mime.h mnt.h modecanon.h modex.h \
+ namval.h option.h proc.h re_comp.h recfmt.h regex.h regexp.h \
+ sfio.h sfio_s.h sfio_t.h sfdisc.h shcmd.h \
+ stack.h stak.h stk.h swap.h tar.h times.h tm.h tok.h \
+ usage.h vdb.h vecargs.h vmalloc.h wait.h wordexp.h \
+ bytesex.h endian.h fnmatch.h magicid.h fnv.h aso.h \
+ $(HEADERSTD)
+
+HEADERGEN = align.h preroot.h sig.h tmx.h tv.h \
+ $(ID)_api.h $(ID)_botch.h $(ID)_ccode.h $(ID)_fcntl.h $(ID)_float.h \
+ $(ID)_fs.h $(ID)_lib.h $(ID)_map.h $(ID)_mmap.h $(ID)_mode.h $(ID)_ndbm.h \
+ $(ID)_param.h $(ID)_sys.h $(ID)_time.h $(ID)_time.h $(ID)_tty.h \
+ $(ID)_vfork.h $(ID)_wait.h $(ID)_limits.h $(ID)_standards.h $(ID)_sizeof.h \
+ $(HEADERSTD:/^/$(ID)_/)
+
+HEADEREXP = $(ID)_common.h
+
+HEADEROPT = fmtmsg.h libgen.h syslog.h
+
+HEADERSTD = dirent.h iconv.h nl_types.h stdio.h wchar.h wctype.h
+
+$(ID) 5.4 :LIBRARY: README RELEASE \
+ LIBAST.3 aso.3 ast.3 astsa.3 cdt.3 chr.3 compat.3 error.3 \
+ find.3 fmt.3 fmtls.3 fs3d.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \
+ int.3 ip6.3 magic.3 mem.3 mime.3 modecanon.3 optget.3 path.3 \
+ preroot.3 proc.3 re.3 regex.3 setenviron.3 sfdisc.3 sfio.3 \
+ sig.3 spawnveg.3 stak.3 stk.3 strcopy.3 strdup.3 strelapsed.3 \
+ strerror.3 stresc.3 streval.3 strgid.3 strmatch.3 stropt.3 \
+ strperm.3 strsignal.3 strsort.3 strtape.3 strton.3 struid.3 \
+ swap.3 tab.3 tm.3 tmx.3 tok.3 touch.3 tv.3 vecargs.3 vmalloc.3 \
+ $(HEADERSRC) \
+ state.c transition.c \
+ dirlib.h opendir.c readdir.c rewinddir.c seekdir.c telldir.c \
+ getcwd.c fastfind.c \
+ hashlib.h hashalloc.c hashdump.c hashfree.c hashlast.c \
+ hashlook.c hashscan.c hashsize.c hashview.c hashwalk.c \
+ memhash.c memsum.c strhash.c strkey.c strsum.c \
+ stracmp.c strnacmp.c \
+ ccmap.c ccmapid.c ccnative.c \
+ chresc.c chrtoi.c streval.c strexpr.c strmatch.c strcopy.c \
+ modelib.h modei.c modex.c strmode.c \
+ strlcat.c strlcpy.c strlook.c strncopy.c strsearch.c strpsearch.c \
+ stresc.c stropt.c strtape.c strpcmp.c strnpcmp.c strvcmp.c strnvcmp.c \
+ tok.c tokline.c tokscan.c \
+ pathaccess.c pathcat.c pathcanon.c pathcheck.c pathpath.c \
+ pathexists.c pathfind.c pathkey.c pathprobe.c pathrepl.c \
+ pathnative.c pathposix.c pathtemp.c pathtmp.c pathstat.c \
+ pathgetlink.c pathsetlink.c pathbin.c pathshell.c pathcd.c \
+ pathprog.c \
+ fs3d.c ftwalk.c ftwflags.c fts.c \
+ astintercept.c conformance.c getenv.c setenviron.c \
+ optget.c optjoin.c optesc.c optctx.c strsort.c struniq.c \
+ magic.c mime.c mimetype.c signal.c sigflag.c systrace.c \
+ error.c errorf.c errormsg.c errorx.c \
+ localeconv.c setlocale.c translate.c \
+ catopen.c iconv.c lc.c lctab.c mc.c \
+ base64.c recfmt.c recstr.c reclen.c fmtrec.c \
+ fmtbase.c fmtbuf.c fmtclock.c fmtdev.c fmtelapsed.c fmterror.c \
+ fmtesc.c fmtfmt.c fmtfs.c fmtident.c fmtint.c fmtip4.c fmtip6.c fmtls.c \
+ fmtmatch.c fmtmode.c fmtnum.c fmtperm.c fmtre.c fmttime.c fmtuid.c \
+ fmtgid.c fmtsignal.c fmtscale.c fmttmx.c fmttv.c fmtversion.c \
+ strelapsed.c strperm.c struid.c strgid.c \
+ strtoip4.c strtoip6.c stack.c stk.c \
+ swapget.c swapmem.c swapop.c swapput.c \
+ sigdata.c sigcrit.c sigunblock.c \
+ proclib.h procopen.c procclose.c procrun.c procfree.c \
+ tmdate.c tmequiv.c tmfix.c tmfmt.c tmform.c tmgoff.c tminit.c \
+ tmleap.c tmlex.c tmlocale.c tmmake.c tmpoff.c tmscan.c \
+ tmsleep.c tmtime.c tmtype.c tmweek.c tmword.c tmzone.c \
+ tmxdate.c tmxduration.c tmxfmt.c tmxgettime.c tmxleap.c tmxmake.c \
+ tmxscan.c tmxsettime.c tmxsleep.c tmxtime.c tmxtouch.c \
+ tvcmp.c tvgettime.c tvsettime.c tvsleep.c tvtouch.c \
+ cmdarg.c vecargs.c vecfile.c vecfree.c vecload.c vecstring.c \
+ univlib.h univdata.c touch.c mnt.c debug.c \
+ memccpy.c memchr.c memcmp.c memcpy.c memdup.c memmove.c memset.c \
+ mkdir.c mkfifo.c mknod.c rmdir.c remove.c rename.c link.c unlink.c \
+ strdup.c strchr.c strrchr.c strstr.c \
+ strtod.c strtold.c \
+ strtol.c strtoll.c strtoul.c strtoull.c strton.c strtonll.c \
+ strntod.c strntold.c strnton.c strntonll.c \
+ strntol.c strntoll.c strntoul.c strntoull.c \
+ strcasecmp.c strncasecmp.c strerror.c \
+ mktemp.c tmpnam.c fsync.c \
+ execlp.c execve.c execvp.c execvpe.c spawnveg.c \
+ vfork.c killpg.c \
+ hsearch.c tsearch.c \
+ getlogin.c putenv.c setenv.c unsetenv.c \
+ lstat.c statvfs.c \
+ eaccess.c gross.c gross_sgi.h omitted.c \
+ fakelink.h readlink.c symlink.c \
+ getpgrp.c setpgid.c setsid.c waitpid.c \
+ creat64.c fcntl.c open.c \
+ atexit.c getdents.c getwd.c dup2.c errno.c \
+ getpreroot.c ispreroot.c realopen.c setpreroot.c \
+ getgroups.c mount.c system.c iblocks.c \
+ modedata.c tmdata.c \
+ memfatal.c sfkeyprintf.c \
+ sfdcdio.c sfdcdos.c sfdcfilter.c sfdcseekable.c \
+ sfdcslow.c sfdcsubstr.c sfdctee.c sfdcunion.c \
+ sfdcmore.c sfdcprefix.c \
+ wc.c wc2utf8.c \
+ /* standards */ \
+ basename.c closelog.c dirname.c fmtmsglib.c fnmatch.c ftw.c \
+ getdate.c getsubopt.c glob.c nftw.c openlog.c re_comp.c \
+ resolvepath.c realpath.c regcmp.c regexp.c setlogmask.c strftime.c \
+ strptime.c swab.c syslog.c sysloglib.h tempnam.c \
+ wordexp.c mktime.c \
+ /* regex */ \
+ reglib.h regalloc.c regclass.c regcoll.c regcomp.c regcache.c \
+ regdecomp.c regerror.c regexec.c regfatal.c reginit.c regnexec.c \
+ regsubcomp.c regsubexec.c regsub.c regrecord.c regrexec.c regstat.c \
+ /* cdt */ \
+ dthdr.h dtclose.c dtdisc.c dthash.c dtlist.c dtmethod.c \
+ dtopen.c dtstrhash.c dttree.c dtview.c dtwalk.c \
+ dtnew.c dtcomp.c \
+ /* sfio */ \
+ sfhdr.h sfdchdr.h \
+ sfclose.c sfclrlock.c sfdisc.c sfdlen.c sfexcept.c \
+ sfgetl.c sfgetu.c sfcvt.c sfecvt.c sffcvt.c \
+ sfextern.c sffilbuf.c sfflsbuf.c sfprints.c sfgetd.c \
+ sfgetr.c sfllen.c sfmode.c sfmove.c sfnew.c \
+ sfpkrd.c sfnotify.c sfnputc.c sfopen.c sfpeek.c sfpoll.c \
+ sfpool.c sfpopen.c sfprintf.c sfputd.c sfputl.c sfputr.c \
+ sfputu.c sfrd.c sfread.c sfreserve.c sfscanf.c sfseek.c sfset.c \
+ sfsetbuf.c sfsetfd.c sfsize.c sfsk.c sfstack.c sfstrtod.c sfsync.c \
+ sfswap.c sftable.c sftell.c sftmp.c sfungetc.c sfvprintf.c \
+ sfvscanf.c sfwr.c sfwrite.c sfpurge.c sfraise.c sfwalk.c \
+ sfgetm.c sfmutex.c sfputm.c sfresize.c \
+ _sfclrerr.c _sfeof.c _sferror.c _sffileno.c \
+ _sfopen.c _sfstacked.c _sfvalue.c \
+ _sfgetc.c _sfgetl.c _sfgetl2.c _sfgetu.c _sfgetu2.c \
+ _sfdlen.c _sfllen.c _sfslen.c _sfulen.c \
+ _sfputc.c _sfputd.c _sfputl.c _sfputm.c _sfputu.c \
+ /* stdio */ \
+ clearerr.c fclose.c fdopen.c feof.c ferror.c fflush.c \
+ fgetc.c fgetpos.c fgets.c fileno.c fopen.c fprintf.c \
+ fpurge.c fputc.c fputs.c fread.c freopen.c fscanf.c \
+ fseek.c fseeko.c fsetpos.c ftell.c ftello.c fwrite.c \
+ flockfile.c ftrylockfile.c funlockfile.c \
+ getc.c getchar.c getw.c pclose.c popen.c printf.c \
+ putc.c putchar.c puts.c putw.c rewind.c scanf.c \
+ setbuf.c setbuffer.c setlinebuf.c setvbuf.c \
+ snprintf.c sprintf.c sscanf.c \
+ asprintf.c vasprintf.c \
+ stdio/tmpfile.c ungetc.c vfprintf.c vfscanf.c vprintf.c \
+ vscanf.c vsnprintf.c vsprintf.c vsscanf.c \
+ _doprnt.c _doscan.c _filbuf.c _flsbuf.c _stdfun.c \
+ _stdopen.c _stdprintf.c _stdscanf.c _stdsprnt.c \
+ _stdvbuf.c _stdvsnprnt.c _stdvsprnt.c _stdvsscn.c \
+ /* wchar stdio */ \
+ fgetwc.c fwprintf.c putwchar.c vfwscanf.c wprintf.c \
+ fgetws.c fwscanf.c swprintf.c vswprintf.c wscanf.c \
+ fputwc.c getwc.c swscanf.c vswscanf.c \
+ fputws.c getwchar.c ungetwc.c vwprintf.c \
+ fwide.c putwc.c vfwprintf.c vwscanf.c \
+ /* stdio extensions */ \
+ stdio_c99.c fcloseall.c fmemopen.c getdelim.c getline.c \
+ /* math */ \
+ frexp.c frexpl.c \
+ /* ast */ \
+ astcopy.c astconf.c astdynamic.c astlicense.c astquery.c astwinsize.c \
+ conftab.c \
+ $(CC.LD.STATIC) aststatic.c getopt.c getoptl.c $(CC.LD.DYNAMIC) \
+ /* aso */ \
+ aso.c asolock.c asometh.c asorelax.c aso-sem.c aso-fcntl.c \
+ /* vmalloc */ \
+ vmalloc.h vmhdr.h vmbest.c vmclear.c vmclose.c vmdcheap.c vmdebug.c \
+ vmdisc.c vmexit.c vmlast.c vmopen.c vmpool.c vmprivate.c vmprofile.c \
+ vmregion.c vmsegment.c vmset.c vmstat.c vmstrdup.c vmtrace.c vmwalk.c \
+ vmmopen.c malloc.c vmgetmem.c \
+ /* uwin */ \
+ mathimpl.h rlib.h \
+ a64l.c acosh.c asinh.c atanh.c cbrt.c crypt.c erf.c \
+ err.c exp.c exp__E.c expm1.c gamma.c getpass.c lgamma.c log.c log1p.c \
+ log__L.c rand48.c random.c rcmd.c rint.c support.c \
+ /* obsolete */ \
+ sfstrtmp.c spawn.c \
+ -liconv -lw /* these should be pulled in by -lc */
+
+/*
+ * man is stdio.h problematic
+ * the std/stdio.h => ast_stdio.h runaround should
+ * get to a steady state
+ *
+ * also, -D_BLD_ast must be explicit for the uwin bootstrap
+ */
+
+.MAKEINIT : .AST.INIT
+.AST.INIT : .MAKE
+ CCFLAGS += -D_BLD_ast
+
+parameter (_BLD_ast)
+virtual ast/stdio.h
+
+ :NOPROTECT: sfprintf.c sfvprintf.c sfscanf.c sfvscanf.c
+
+ :NOOPTIMIZE: spawnveg.c
+"ibm.risc" :NOOPTIMIZE: regcomp.c
+"linux.i386-64*":NOOPTIMIZE: sfset.c
+"sol?.*" :NOOPTIMIZE: sfrd.c sfvprintf.c tmxfmt.c
+"win32*" :NOOPTIMIZE: fastfind.c mc.c
+"win32*-64*" :NOOPTIMIZE: sfvprintf.c
+
+/*
+ * NOTE: sun4 runtime link botches ro data so advertised sig_info is rw
+ */
+
+:READONLY: conftab.c lctab.c modedata.c /*sftable.c*/ \
+ /*sigdata.c*/ tmdata.c univdata.c
+
+:: atmain.C \
+ stdgets.c stdprintf.c stdscanf.c stdvbuf.c stdsprnt.c \
+ stdvsprnt.c stdvsnprnt.c stdvsscn.c stdopen.c \
+ astsa
+
+if "$(PWD:B)" != "cc-*"
+
+$(INCLUDEDIR) :INSTALLPROTO: $(HEADEREXP) $(HEADERSRC) $(HEADERGEN)
+
+:INSTALLDIR: conf
+
+conf :: conf.sh
+
+conflim.h conftab.h conftab.c :JOINT: conf conf.tab
+ $(*:O=1:P=A) $(IFFEFLAGS:V:N=-v) $(*:O>1) $(CC) $(CCFLAGS:VP:N!=-D_BLD_*|$\(*\)) /* 2007-07-01: $(CCFLAGS:VPX:N!=-D_BLD_*) */
+
+$(HEADERGEN) :COPY: FEATURE/$$(<:B:/$(ID)_//)
+
+ast_namval.h :COPY: namval.h
+
+lcgen : lcgen.c
+ $(CC.NATIVE|CC) -o $(<) $(*)
+
+lc.h lctab.c :JOINT: lcgen lc.tab
+ $(*:O=1:C,^[^/],./&,) $(tmp).1 $(tmp).2 < $(*:O=2) # :P=E: in 2006
+ $(PROTO) -p $(PROTOFLAGS) $(tmp).1 $(PROTOINSTALL) > $(tmp).3
+ $(RM) -f $(tmp).1
+ if $(CMP) -s $(tmp).3 $(<:O=1)
+ then $(RM) $(tmp).3
+ else $(MV) $(tmp).3 $(<:O=1)
+ fi
+ if $(CMP) -s $(tmp).2 $(<:O=2)
+ then $(RM) $(tmp).2
+ else $(MV) $(tmp).2 $(<:O=2)
+ fi
+
+$(LIBDIR)/file/magic :INSTALL: magic.tab
+
+:INSTALL: $(HEADEROPT:D=$(INCLUDEDIR):B:S)
+
+$(HEADEROPT:D=$(INCLUDEDIR):B:S) : $$(<:B:S) ast_lib.h
+ case $(CC.HOSTTYPE) in
+ win32.*)$(PROTO) -p $(PROTOFLAGS) $(*:O=1) $(PROTOINSTALL) > 1.$(tmp).x
+ if $(CMP) -s $(<) 1.$(tmp).x
+ then $(RM) -f 1.$(tmp).x
+ else $(MV) 1.$(tmp).x $(<)
+ fi
+ ;;
+ *) $(SILENT) $(GREP) -l 'define[ ][ ]*_[hl][di][rb]_$(<:B)' $(*:O>1) > /dev/null || {
+ $(PROTO) -p $(PROTOFLAGS) $(*:O=1) $(PROTOINSTALL) > 1.$(tmp).x
+ if $(CMP) -s $(<) 1.$(tmp).x
+ then $(RM) -f 1.$(tmp).x
+ else $(MV) 1.$(tmp).x $(<)
+ fi
+ }
+ ;;
+ esac
+
+/*
+ * FEATURE/common for iffe probes, <ast_common.h> for ast source
+ * *but* <ast_common.h> may get pulled in by intercepted headers
+ * so both must be built very early
+ */
+
+$(ID)_common.h : .SCAN.IGNORE FEATURE/common
+ $(SED) '/define _def_map_ast/d' < $(*) > 1.$(tmp).x
+ if $(CMP) -s $(<) 1.$(tmp).x
+ then $(RM) -f 1.$(tmp).x
+ else $(MV) 1.$(tmp).x $(<)
+ fi
+
+FEATURE/common : .SCAN.IGNORE
+
+/*
+ * more stdio.h complications ...
+ * prepare for compilation by generating these headers first;
+ * this helps mam by catching headers that might be indirectly
+ * included on other systems
+ */
+
+.check.hdr : .IGNORE .VIRTUAL \
+ FEATURE/standards - FEATURE/lib - FEATURE/common - \
+ FEATURE/param - FEATURE/aso - \
+ ast_map.h - ast_limits.h - ast_stdio.h ast_nl_types.h - \
+ ast_wchar.h ast_wctype.h
+ : clean up obsolete headers :
+ $(RM) -rf $(HEADERSTD) ast_hdr.h ast_types.h ast_unistd.h iffeio.h \
+ $(INCLUDEDIR)/limits.h $(INCLUDEDIR)/unistd.h \
+ $(PACKAGEROOT)/src/lib/libast/std/limits.h
+
+ast.req : .check.hdr .check.lib
+
+else
+
+ast.req : .check.lib
+
+end
+
+/*
+ * some systems move -lc routines to -lm
+ * see astmath.c for details
+ */
+
+.check.lib : .AFTER astmath.exe FEATURE/aso
+ $(SED) -e '/^#define _REQ_/!d' -e 's/#define _REQ_\([a-z0-9_]*\).*/ -l\1/' $(*:N=FEATURE/*) >> $(<<)
+ if test -f astmath.exe
+ then touch $(<<)
+ else echo ' -lm' >> $(<<)
+ fi
+
+astmath.exe : .DONTCARE astmath.c
+ X=1
+ for N in 1 2 3 4 5 6 8
+ do if $(CC) -DN=$N -DIS $(CCFLAGS) -o $(*:N=*.c:B:S=.exe) $(*) 2>/dev/null
+ then : implicit math function N=$N :
+ elif $(CC) -DN=$N -DIS $(CCFLAGS) -o $(*:N=*.c:B:S=.exe) $(*) -lm 2>/dev/null
+ then : math function N=$N requires -lm :
+ X=0
+ break
+ fi
+ done
+ case $X in
+ 0) $(RM) -f $(*:N=*.c:B:S=.exe) ;;
+ *) touch $(*:N=*.c:B:S=.exe) ;;
+ esac
+ $(RM) -f $(*:N=*.c:B:S=$(CC.SUFFIX.OBJECT))
+
+/*
+ * atmain.C is the only C++ and only for a few systems
+ */
+
+atmain.o : atmain.C
+ ignore $(CC) -c $(CCFLAGS) $(*)
+ if test ! -f $(<)
+ then $(CP) $(*) $(*:B:S=.cpp)
+ ignore $(CC) -c $(CCFLAGS) $(*:B:S=.cpp)
+ if test ! -f $(<)
+ then $(CP) $(*) $(*:B:S=.c)
+ $(CC) -c $(CCFLAGS) $(*:B:S=.c)
+ fi
+ fi
+
+/* astsa is a standalone subset of ast for imbedded applications */
+
+PAXFILTER = ;*.[ch];$(PROTO) $(PROTOFLAGS) -c "" -p
+
+ast_sa.h : .DONTCARE
+
+astsa.tgz : $$("astsa/astsa.manifest":T=F:T=I:/[[:space:]][[:space:]]*/ /G:C,^,astsa/,)
+ $(PAX) $(PAXFLAGS) -wf $(<) -x $(<:/.*\.//) -s ',.*/,,' -A $(PAXFILTER:@Q) $(*)
+
+/* libmini.a is a bootstrap dll for uwin cc -D_BLD_ast that exports part of ast */
+
+MINI = mini
+
+:: $(MINI).sym
+
+if CC.HOSTTYPE == "win32*"
+
+DLL = $(ID)$(VERSION:/[^0-9]//G)
+
+$(MINI) : $(MINI)$$(CC.SUFFIX.SHARED)
+
+$(MINI)$$(CC.SUFFIX.SHARED) : $(MINI).sym $(ID)
+ $(RM) -rf $(MINI).tmp
+ mkdir $(MINI).tmp
+ {
+ echo LIBRARY $(DLL:F=%(upper)s)
+ echo
+ echo SECTIONS
+ echo .data READ WRITE
+ echo
+ echo EXPORTS
+ cat $(*:N=*.sym)
+ } > $(MINI).tmp/$(DLL)$(CC.SUFFIX.LD:O=1)
+ cd $(MINI).tmp
+ $(LD) $(CCFLAGS:N=-[gG]*) $(CC.SHARED) -o $(DLL) $(DLL)$(CC.SUFFIX.LD:O=1) $(*$(ID).so/$(DLL)$(CC.SUFFIX.DYNAMIC):C,^[^-],../&,)
+ cd ..
+ $(MV) $(MINI).tmp/$(DLL)$(CC.SUFFIX.SHARED) $(<)
+ $(RM) -rf $(MINI).tmp
+
+end
+
+:MSGKEY: misc/magic.tab
+ $(SED) \
+ -e '/^#/d' \
+ -e '/[^ ]* *[^ ]* *[^ ]* *./!d' \
+ -e 's,^[^ ]* *[^ ]* *[^ ]* *\(.[^ ]*\).*$,\1,' \
+ -e 's,[\\"],\\&,g' \
+ -e 's,.*,"&",' \
+ $(*)
diff --git a/usr/src/contrib/ast/src/lib/libast/Mamfile b/usr/src/contrib/ast/src/lib/libast/Mamfile
new file mode 100644
index 0000000000..0813890148
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/Mamfile
@@ -0,0 +1,7348 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+setv INSTALLROOT ../../..
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS ${mam_cc_DLL} -D_BLD_ast
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+make ast
+make libast.a archive
+make ast.req
+make FEATURE/standards
+meta FEATURE/standards features/%>FEATURE/% features/standards standards
+make features/standards
+done features/standards
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/standards
+done FEATURE/standards generated
+make FEATURE/lib
+meta FEATURE/lib features/%>FEATURE/% features/lib lib
+make features/lib
+done features/lib
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/lib
+done FEATURE/lib generated
+make FEATURE/common
+meta FEATURE/common features/%>FEATURE/% features/common common
+make features/common
+done features/common
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/common
+done FEATURE/common generated
+make FEATURE/param
+meta FEATURE/param features/%.sh>FEATURE/% features/param.sh param
+make features/param.sh
+done features/param.sh
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/param.sh
+make std/endian.h implicit
+make std/bytesex.h implicit
+make ast_common.h implicit
+prev FEATURE/common
+exec - sed '/define _def_map_ast/d' < FEATURE/common > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ast_common.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ast_common.h
+exec - fi
+make ast_map.h implicit
+make FEATURE/map
+meta FEATURE/map features/%.c>FEATURE/% features/map.c map
+make features/map.c
+make FEATURE/api implicit
+meta FEATURE/api features/%>FEATURE/% features/api api
+make features/api
+done features/api
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/api
+done FEATURE/api generated
+make FEATURE/eaccess implicit
+meta FEATURE/eaccess features/%>FEATURE/% features/eaccess eaccess
+make features/eaccess
+done features/eaccess
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/eaccess
+done FEATURE/eaccess generated
+make FEATURE/vmalloc implicit
+meta FEATURE/vmalloc features/%>FEATURE/% features/vmalloc vmalloc
+make features/vmalloc
+done features/vmalloc
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/vmalloc
+make FEATURE/mmap implicit
+meta FEATURE/mmap features/%>FEATURE/% features/mmap mmap
+make features/mmap
+done features/mmap
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/mmap
+done FEATURE/mmap dontcare generated
+done FEATURE/vmalloc generated
+make FEATURE/options implicit
+meta FEATURE/options features/%>FEATURE/% features/options options
+make features/options
+done features/options
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/options
+done FEATURE/options generated
+prev FEATURE/mmap implicit
+prev FEATURE/lib implicit
+done features/map.c
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. ${LDFLAGS} ' run features/map.c
+done FEATURE/map generated
+exec - cmp 2>/dev/null -s FEATURE/map ast_map.h || { rm -f ast_map.h; silent test -d . || mkdir .; ${STDCP} FEATURE/map ast_map.h; }
+done ast_map.h dontcare generated
+done ast_common.h dontcare generated
+done std/bytesex.h dontcare
+done std/endian.h dontcare
+done FEATURE/param generated
+make FEATURE/aso
+meta FEATURE/aso features/%>FEATURE/% features/aso aso
+make features/aso
+done features/aso
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/aso
+done FEATURE/aso generated
+prev ast_map.h
+make ast_limits.h
+make FEATURE/limits
+meta FEATURE/limits features/%.c>FEATURE/% features/limits.c limits
+make features/limits.c
+make conflim.h implicit
+make conf
+make comp/conf.sh
+done comp/conf.sh
+meta conf %.sh>% comp/conf.sh conf
+prev comp/conf.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : conf contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n comp/conf.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 29 in
+exec - 0) ${STDCP} comp/conf.sh conf
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < comp/conf.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - comp/conf.sh <<'!'
+exec - HOSTTYPE="${mam_cc_HOSTTYPE}"
+exec - !
+exec - } > conf
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - comp/conf.sh > conf <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec - HOSTTYPE="${mam_cc_HOSTTYPE}"
+exec - !
+exec - ;;
+exec - esac
+exec - silent test -w conf -a -x conf || chmod u+w,+x conf
+done conf generated
+make comp/conf.tab
+done comp/conf.tab
+exec - ${INSTALLROOT}/src/lib/libast/conf -v comp/conf.tab ${CC} ${mam_cc_FLAGS} ${CCFLAGS}
+make joint.conflim.h joint
+prev conflim.h
+make conftab.h
+done conftab.h generated
+make conftab.c
+done conftab.c generated
+done joint.conflim.h generated virtual
+done conflim.h generated
+prev FEATURE/param implicit
+make comp/getopt.h implicit
+make include/ast_getopt.h implicit
+done include/ast_getopt.h dontcare
+done comp/getopt.h dontcare
+prev FEATURE/common implicit
+prev FEATURE/lib implicit
+prev FEATURE/standards implicit
+done features/limits.c
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd ${LDFLAGS} ' run features/limits.c
+done FEATURE/limits generated
+exec - cmp 2>/dev/null -s FEATURE/limits ast_limits.h || { rm -f ast_limits.h; silent test -d . || mkdir .; ${STDCP} FEATURE/limits ast_limits.h; }
+done ast_limits.h generated
+make ast_stdio.h
+make FEATURE/stdio
+meta FEATURE/stdio features/%>FEATURE/% features/stdio stdio
+make features/stdio
+done features/stdio
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/stdio
+make include/sfio_s.h implicit
+done include/sfio_s.h dontcare
+make include/ast_std.h implicit
+make include/regex.h implicit
+make ast_api.h implicit
+prev FEATURE/api
+exec - cmp 2>/dev/null -s FEATURE/api ast_api.h || { rm -f ast_api.h; silent test -d . || mkdir .; ${STDCP} FEATURE/api ast_api.h; }
+done ast_api.h dontcare generated
+make ast_wchar.h implicit
+make FEATURE/wchar
+meta FEATURE/wchar features/%>FEATURE/% features/wchar wchar
+make features/wchar
+prev ast_common.h implicit
+done features/wchar
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/wchar
+make std/wctype.h implicit
+make ast_wctype.h implicit
+make FEATURE/wctype
+meta FEATURE/wctype features/%>FEATURE/% features/wctype wctype
+make features/wctype
+done features/wctype
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/wctype
+prev std/endian.h implicit
+make std/wchar.h implicit
+prev ast_wchar.h implicit
+done std/wchar.h dontcare
+done FEATURE/wctype generated
+exec - cmp 2>/dev/null -s FEATURE/wctype ast_wctype.h || { rm -f ast_wctype.h; silent test -d . || mkdir .; ${STDCP} FEATURE/wctype ast_wctype.h; }
+done ast_wctype.h dontcare generated
+done std/wctype.h dontcare
+make std/stdio.h implicit
+prev ast_stdio.h implicit
+done std/stdio.h dontcare
+prev std/stdio.h implicit
+prev ast_common.h implicit
+done FEATURE/wchar generated
+exec - cmp 2>/dev/null -s FEATURE/wchar ast_wchar.h || { rm -f ast_wchar.h; silent test -d . || mkdir .; ${STDCP} FEATURE/wchar ast_wchar.h; }
+prev std/stdio.h implicit
+prev ast_common.h implicit
+done ast_wchar.h dontcare generated
+prev ast_common.h implicit
+done include/regex.h dontcare
+prev comp/getopt.h implicit
+prev ast_map.h implicit
+make ast_botch.h implicit
+make FEATURE/botch
+meta FEATURE/botch features/%.c>FEATURE/% features/botch.c botch
+make features/botch.c
+make FEATURE/sys implicit
+meta FEATURE/sys features/%>FEATURE/% features/sys sys
+make features/sys
+done features/sys
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/sys
+prev std/endian.h implicit
+prev std/endian.h implicit
+done FEATURE/sys generated
+prev FEATURE/lib implicit
+done features/botch.c
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd ${LDFLAGS} ' run features/botch.c
+done FEATURE/botch generated
+exec - cmp 2>/dev/null -s FEATURE/botch ast_botch.h || { rm -f ast_botch.h; silent test -d . || mkdir .; ${STDCP} FEATURE/botch ast_botch.h; }
+done ast_botch.h dontcare generated
+prev ast_limits.h implicit
+make ast_fcntl.h implicit
+make FEATURE/fcntl
+meta FEATURE/fcntl features/%.c>FEATURE/% features/fcntl.c fcntl
+make features/fcntl.c
+make FEATURE/tty implicit
+meta FEATURE/tty features/%>FEATURE/% features/tty tty
+make features/tty
+done features/tty
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/tty
+done FEATURE/tty generated
+make FEATURE/fs implicit
+meta FEATURE/fs features/%>FEATURE/% features/fs fs
+make features/fs
+done features/fs
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/fs
+done FEATURE/fs generated
+prev FEATURE/lib implicit
+done features/fcntl.c
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd ${LDFLAGS} ' run features/fcntl.c
+make ast_fs.h implicit
+prev FEATURE/fs
+exec - cmp 2>/dev/null -s FEATURE/fs ast_fs.h || { rm -f ast_fs.h; silent test -d . || mkdir .; ${STDCP} FEATURE/fs ast_fs.h; }
+done ast_fs.h dontcare generated
+done FEATURE/fcntl generated
+exec - cmp 2>/dev/null -s FEATURE/fcntl ast_fcntl.h || { rm -f ast_fcntl.h; silent test -d . || mkdir .; ${STDCP} FEATURE/fcntl ast_fcntl.h; }
+prev ast_fs.h implicit
+done ast_fcntl.h dontcare generated
+prev include/ast_getopt.h implicit
+make ast_sys.h implicit
+prev FEATURE/sys
+exec - cmp 2>/dev/null -s FEATURE/sys ast_sys.h || { rm -f ast_sys.h; silent test -d . || mkdir .; ${STDCP} FEATURE/sys ast_sys.h; }
+done ast_sys.h dontcare generated
+make ast_lib.h implicit
+prev FEATURE/lib
+exec - cmp 2>/dev/null -s FEATURE/lib ast_lib.h || { rm -f ast_lib.h; silent test -d . || mkdir .; ${STDCP} FEATURE/lib ast_lib.h; }
+done ast_lib.h dontcare generated
+prev ast_common.h implicit
+done include/ast_std.h dontcare
+done FEATURE/stdio generated
+exec - cmp 2>/dev/null -s FEATURE/stdio ast_stdio.h || { rm -f ast_stdio.h; silent test -d . || mkdir .; ${STDCP} FEATURE/stdio ast_stdio.h; }
+prev include/sfio_s.h implicit
+prev include/ast_std.h implicit
+done ast_stdio.h dontcare generated
+make ast_nl_types.h
+make FEATURE/nl_types
+meta FEATURE/nl_types features/%>FEATURE/% features/nl_types nl_types
+make features/nl_types
+done features/nl_types
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/nl_types
+done FEATURE/nl_types generated
+exec - cmp 2>/dev/null -s FEATURE/nl_types ast_nl_types.h || { rm -f ast_nl_types.h; silent test -d . || mkdir .; ${STDCP} FEATURE/nl_types ast_nl_types.h; }
+done ast_nl_types.h generated
+prev ast_wchar.h
+prev ast_wctype.h
+exec - : clean up obsolete headers :
+exec - rm -rf dirent.h iconv.h nl_types.h stdio.h wchar.h wctype.h ast_hdr.h ast_types.h ast_unistd.h iffeio.h \
+exec - ${INSTALLROOT}/include/ast/limits.h ${INSTALLROOT}/include/ast/unistd.h \
+exec - ${PACKAGEROOT}/src/lib/libast/std/limits.h
+exec - set -
+exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c 1.${COTEMP}.c &&
+exec - x=`${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
+exec - {
+exec - case "" in
+exec - *?) echo " " ;;
+exec - esac
+exec - for i in ast iconv w
+exec - do case $i in
+exec - "ast"|ast)
+exec - ;;
+exec - *) if test -f ${INSTALLROOT}/lib/lib/$i
+exec - then y=`cat ${INSTALLROOT}/lib/lib/$i`
+exec - case $y in
+exec - *-?*) echo "" $y ;;
+exec - esac
+exec - continue
+exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a
+exec - then case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) continue ;;
+exec - esac
+exec - ;;
+exec - esac
+exec - fi
+exec - ;;
+exec - esac
+exec - echo " -l$i"
+exec - done
+exec - } > ast.req
+exec - rm -f 1.${COTEMP}.*
+make astmath.exe
+make port/astmath.c
+prev std/endian.h implicit
+prev std/endian.h implicit
+done port/astmath.c
+exec - X=1
+exec - for N in 1 2 3 4 5 6 8
+exec - do if ${CC} -DN=$N -DIS ${mam_cc_FLAGS} ${CCFLAGS} -I. -Istd -o astmath.exe port/astmath.c 2>/dev/null
+exec - then : implicit math function N=$N :
+exec - elif ${CC} -DN=$N -DIS ${mam_cc_FLAGS} ${CCFLAGS} -I. -Istd -o astmath.exe port/astmath.c -lm 2>/dev/null
+exec - then : math function N=$N requires -lm :
+exec - X=0
+exec - break
+exec - fi
+exec - done
+exec - case $X in
+exec - 0) rm -f astmath.exe ;;
+exec - *) touch astmath.exe ;;
+exec - esac
+exec - rm -f astmath
+done astmath.exe dontcare generated
+prev FEATURE/aso
+exec - sed -e '/^#define _REQ_/!d' -e 's/#define _REQ_\([a-z0-9_]*\).*/ -l\1/' FEATURE/aso >> ast.req
+exec - if test -f astmath.exe
+exec - then touch ast.req
+exec - else echo ' -lm' >> ast.req
+exec - fi
+done ast.req generated
+make state.o
+make misc/state.c
+make include/ast.h implicit
+prev ast_api.h implicit
+make include/vmalloc.h implicit
+prev ast_common.h implicit
+prev include/ast_std.h implicit
+done include/vmalloc.h dontcare
+make include/sfio.h implicit
+prev include/sfio_s.h implicit
+prev ast_common.h implicit
+prev include/ast_std.h implicit
+done include/sfio.h dontcare
+prev include/ast_std.h implicit
+done include/ast.h
+done misc/state.c
+meta state.o %.c>%.o misc/state.c state
+prev misc/state.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/state.c
+done state.o generated
+make transition.o
+make comp/transition.c
+prev include/ast.h implicit
+done comp/transition.c
+meta transition.o %.c>%.o comp/transition.c transition
+prev comp/transition.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/transition.c
+done transition.o generated
+make opendir.o
+make dir/opendir.c
+make dir/dirlib.h implicit
+make dir/dirstd.h implicit
+done dir/dirstd.h dontcare
+make direntry.h implicit
+done direntry.h dontcare virtual
+make ast_param.h implicit
+prev FEATURE/param
+exec - cmp 2>/dev/null -s FEATURE/param ast_param.h || { rm -f ast_param.h; silent test -d . || mkdir .; ${STDCP} FEATURE/param ast_param.h; }
+done ast_param.h dontcare generated
+make std/dirent.h implicit
+make ast_dirent.h implicit
+make FEATURE/dirent
+meta FEATURE/dirent features/%>FEATURE/% features/dirent dirent
+make features/dirent
+done features/dirent
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/dirent
+prev include/ast_std.h implicit
+done FEATURE/dirent generated
+exec - cmp 2>/dev/null -s FEATURE/dirent ast_dirent.h || { rm -f ast_dirent.h; silent test -d . || mkdir .; ${STDCP} FEATURE/dirent ast_dirent.h; }
+prev include/ast_std.h implicit
+done ast_dirent.h dontcare generated
+done std/dirent.h dontcare
+make ndir.h implicit
+done ndir.h dontcare virtual
+prev std/dirent.h implicit
+make include/ls.h implicit
+make ast_mode.h implicit
+make FEATURE/mode
+meta FEATURE/mode features/%.c>FEATURE/% features/mode.c mode
+make features/mode.c
+make include/modecanon.h implicit
+done include/modecanon.h
+prev FEATURE/param implicit
+done features/mode.c
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -Istd ${LDFLAGS} ' run features/mode.c
+done FEATURE/mode generated
+exec - cmp 2>/dev/null -s FEATURE/mode ast_mode.h || { rm -f ast_mode.h; silent test -d . || mkdir .; ${STDCP} FEATURE/mode ast_mode.h; }
+done ast_mode.h dontcare generated
+prev ast_fs.h implicit
+prev include/ast_std.h implicit
+done include/ls.h dontcare
+prev include/ast.h implicit
+done dir/dirlib.h
+done dir/opendir.c
+meta opendir.o %.c>%.o dir/opendir.c opendir
+prev dir/opendir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c dir/opendir.c
+done opendir.o generated
+make readdir.o
+make dir/readdir.c
+prev dir/dirlib.h implicit
+done dir/readdir.c
+meta readdir.o %.c>%.o dir/readdir.c readdir
+prev dir/readdir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c dir/readdir.c
+done readdir.o generated
+make rewinddir.o
+make dir/rewinddir.c
+prev dir/dirlib.h implicit
+done dir/rewinddir.c
+meta rewinddir.o %.c>%.o dir/rewinddir.c rewinddir
+prev dir/rewinddir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c dir/rewinddir.c
+done rewinddir.o generated
+make seekdir.o
+make dir/seekdir.c
+prev dir/dirlib.h implicit
+done dir/seekdir.c
+meta seekdir.o %.c>%.o dir/seekdir.c seekdir
+prev dir/seekdir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c dir/seekdir.c
+done seekdir.o generated
+make telldir.o
+make dir/telldir.c
+prev dir/dirlib.h implicit
+done dir/telldir.c
+meta telldir.o %.c>%.o dir/telldir.c telldir
+prev dir/telldir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c dir/telldir.c
+done telldir.o generated
+make getcwd.o
+make misc/getcwd.c
+make include/fs3d.h implicit
+prev ast_fs.h implicit
+done include/fs3d.h dontcare
+make include/ast_dir.h implicit
+prev std/dirent.h implicit
+prev dir/dirlib.h implicit
+prev ast_lib.h implicit
+done include/ast_dir.h dontcare
+make include/error.h implicit
+make include/option.h implicit
+prev include/ast.h implicit
+done include/option.h dontcare
+prev include/ast.h implicit
+done include/error.h dontcare
+make FEATURE/syscall implicit
+meta FEATURE/syscall features/%>FEATURE/% features/syscall syscall
+make features/syscall
+done features/syscall
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/syscall
+done FEATURE/syscall dontcare generated
+prev include/ast.h implicit
+done misc/getcwd.c
+meta getcwd.o %.c>%.o misc/getcwd.c getcwd
+prev misc/getcwd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c misc/getcwd.c
+done getcwd.o generated
+make fastfind.o
+make misc/fastfind.c
+make misc/findlib.h implicit
+make include/find.h implicit
+done include/find.h dontcare
+prev include/vmalloc.h implicit
+prev include/regex.h implicit
+prev include/ls.h implicit
+prev include/error.h implicit
+prev std/endian.h implicit
+make include/cdt.h implicit
+prev ast_common.h implicit
+prev include/ast_std.h implicit
+done include/cdt.h dontcare
+prev include/ast.h implicit
+done misc/findlib.h
+done misc/fastfind.c
+meta fastfind.o %.c>%.o misc/fastfind.c fastfind
+prev misc/fastfind.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/fastfind.c
+done fastfind.o generated
+make hashalloc.o
+make hash/hashalloc.c
+make hash/hashlib.h implicit
+make include/hash.h implicit
+make include/hashpart.h implicit
+done include/hashpart.h dontcare
+done include/hash.h dontcare
+prev include/ast.h implicit
+done hash/hashlib.h
+done hash/hashalloc.c
+meta hashalloc.o %.c>%.o hash/hashalloc.c hashalloc
+prev hash/hashalloc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashalloc.c
+done hashalloc.o generated
+make hashdump.o
+make hash/hashdump.c
+prev hash/hashlib.h implicit
+done hash/hashdump.c
+meta hashdump.o %.c>%.o hash/hashdump.c hashdump
+prev hash/hashdump.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashdump.c
+done hashdump.o generated
+make hashfree.o
+make hash/hashfree.c
+prev hash/hashlib.h implicit
+done hash/hashfree.c
+meta hashfree.o %.c>%.o hash/hashfree.c hashfree
+prev hash/hashfree.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashfree.c
+done hashfree.o generated
+make hashlast.o
+make hash/hashlast.c
+prev hash/hashlib.h implicit
+done hash/hashlast.c
+meta hashlast.o %.c>%.o hash/hashlast.c hashlast
+prev hash/hashlast.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashlast.c
+done hashlast.o generated
+make hashlook.o
+make hash/hashlook.c
+prev hash/hashlib.h implicit
+done hash/hashlook.c
+meta hashlook.o %.c>%.o hash/hashlook.c hashlook
+prev hash/hashlook.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashlook.c
+done hashlook.o generated
+make hashscan.o
+make hash/hashscan.c
+prev hash/hashlib.h implicit
+done hash/hashscan.c
+meta hashscan.o %.c>%.o hash/hashscan.c hashscan
+prev hash/hashscan.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashscan.c
+done hashscan.o generated
+make hashsize.o
+make hash/hashsize.c
+prev hash/hashlib.h implicit
+done hash/hashsize.c
+meta hashsize.o %.c>%.o hash/hashsize.c hashsize
+prev hash/hashsize.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashsize.c
+done hashsize.o generated
+make hashview.o
+make hash/hashview.c
+prev hash/hashlib.h implicit
+done hash/hashview.c
+meta hashview.o %.c>%.o hash/hashview.c hashview
+prev hash/hashview.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashview.c
+done hashview.o generated
+make hashwalk.o
+make hash/hashwalk.c
+prev hash/hashlib.h implicit
+done hash/hashwalk.c
+meta hashwalk.o %.c>%.o hash/hashwalk.c hashwalk
+prev hash/hashwalk.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/hashwalk.c
+done hashwalk.o generated
+make memhash.o
+make hash/memhash.c
+prev hash/hashlib.h implicit
+done hash/memhash.c
+meta memhash.o %.c>%.o hash/memhash.c memhash
+prev hash/memhash.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/memhash.c
+done memhash.o generated
+make memsum.o
+make hash/memsum.c
+prev hash/hashlib.h implicit
+done hash/memsum.c
+meta memsum.o %.c>%.o hash/memsum.c memsum
+prev hash/memsum.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/memsum.c
+done memsum.o generated
+make strhash.o
+make hash/strhash.c
+prev hash/hashlib.h implicit
+done hash/strhash.c
+meta strhash.o %.c>%.o hash/strhash.c strhash
+prev hash/strhash.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/strhash.c
+done strhash.o generated
+make strkey.o
+make hash/strkey.c
+make include/hashkey.h implicit
+done include/hashkey.h
+prev include/ast.h implicit
+done hash/strkey.c
+meta strkey.o %.c>%.o hash/strkey.c strkey
+prev hash/strkey.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c hash/strkey.c
+done strkey.o generated
+make strsum.o
+make hash/strsum.c
+prev hash/hashlib.h implicit
+done hash/strsum.c
+meta strsum.o %.c>%.o hash/strsum.c strsum
+prev hash/strsum.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ihash -Iinclude -Istd -D_PACKAGE_ast -c hash/strsum.c
+done strsum.o generated
+make stracmp.o
+make string/stracmp.c
+make include/ccode.h implicit
+make ast_ccode.h implicit
+make FEATURE/ccode
+meta FEATURE/ccode features/%>FEATURE/% features/ccode ccode
+make features/ccode
+done features/ccode
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/ccode
+done FEATURE/ccode generated
+exec - cmp 2>/dev/null -s FEATURE/ccode ast_ccode.h || { rm -f ast_ccode.h; silent test -d . || mkdir .; ${STDCP} FEATURE/ccode ast_ccode.h; }
+done ast_ccode.h dontcare generated
+prev ast_common.h implicit
+done include/ccode.h
+prev include/ast.h implicit
+done string/stracmp.c
+meta stracmp.o %.c>%.o string/stracmp.c stracmp
+prev string/stracmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/stracmp.c
+done stracmp.o generated
+make strnacmp.o
+make string/strnacmp.c
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done string/strnacmp.c
+meta strnacmp.o %.c>%.o string/strnacmp.c strnacmp
+prev string/strnacmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strnacmp.c
+done strnacmp.o generated
+make ccmap.o
+make string/ccmap.c
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done string/ccmap.c
+meta ccmap.o %.c>%.o string/ccmap.c ccmap
+prev string/ccmap.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/ccmap.c
+done ccmap.o generated
+make ccmapid.o
+make string/ccmapid.c
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done string/ccmapid.c
+meta ccmapid.o %.c>%.o string/ccmapid.c ccmapid
+prev string/ccmapid.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/ccmapid.c
+done ccmapid.o generated
+make ccnative.o
+make string/ccnative.c
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done string/ccnative.c
+meta ccnative.o %.c>%.o string/ccnative.c ccnative
+prev string/ccnative.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/ccnative.c
+done ccnative.o generated
+make chresc.o
+make string/chresc.c
+prev include/regex.h implicit
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done string/chresc.c
+meta chresc.o %.c>%.o string/chresc.c chresc
+prev string/chresc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/chresc.c
+done chresc.o generated
+make chrtoi.o
+make string/chrtoi.c
+prev include/ast.h implicit
+done string/chrtoi.c
+meta chrtoi.o %.c>%.o string/chrtoi.c chrtoi
+prev string/chrtoi.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/chrtoi.c
+done chrtoi.o generated
+make streval.o
+make string/streval.c
+prev include/ast.h implicit
+done string/streval.c
+meta streval.o %.c>%.o string/streval.c streval
+prev string/streval.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/streval.c
+done streval.o generated
+make strexpr.o
+make string/strexpr.c
+prev include/ast.h implicit
+done string/strexpr.c
+meta strexpr.o %.c>%.o string/strexpr.c strexpr
+prev string/strexpr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strexpr.c
+done strexpr.o generated
+make strmatch.o
+make string/strmatch.c
+prev include/regex.h implicit
+prev include/ast.h implicit
+done string/strmatch.c
+meta strmatch.o %.c>%.o string/strmatch.c strmatch
+prev string/strmatch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strmatch.c
+done strmatch.o generated
+make strcopy.o
+make string/strcopy.c
+prev include/ast.h implicit
+done string/strcopy.c
+meta strcopy.o %.c>%.o string/strcopy.c strcopy
+prev string/strcopy.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strcopy.c
+done strcopy.o generated
+make modei.o
+make string/modei.c
+make string/modelib.h implicit
+make include/modex.h implicit
+prev include/modecanon.h implicit
+prev ast_fs.h implicit
+done include/modex.h dontcare
+prev include/ls.h implicit
+prev include/ast.h implicit
+done string/modelib.h
+done string/modei.c
+meta modei.o %.c>%.o string/modei.c modei
+prev string/modei.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Istring -Iinclude -Istd -D_PACKAGE_ast -c string/modei.c
+done modei.o generated
+make modex.o
+make string/modex.c
+prev string/modelib.h implicit
+done string/modex.c
+meta modex.o %.c>%.o string/modex.c modex
+prev string/modex.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Istring -Iinclude -Istd -D_PACKAGE_ast -c string/modex.c
+done modex.o generated
+make strmode.o
+make string/strmode.c
+prev string/modelib.h implicit
+done string/strmode.c
+meta strmode.o %.c>%.o string/strmode.c strmode
+prev string/strmode.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Istring -Iinclude -Istd -D_PACKAGE_ast -c string/strmode.c
+done strmode.o generated
+make strlcat.o
+make string/strlcat.c
+prev ast_map.h implicit
+prev include/ast.h implicit
+done string/strlcat.c
+meta strlcat.o %.c>%.o string/strlcat.c strlcat
+prev string/strlcat.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strlcat.c
+done strlcat.o generated
+make strlcpy.o
+make string/strlcpy.c
+prev ast_map.h implicit
+prev include/ast.h implicit
+done string/strlcpy.c
+meta strlcpy.o %.c>%.o string/strlcpy.c strlcpy
+prev string/strlcpy.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strlcpy.c
+done strlcpy.o generated
+make strlook.o
+make string/strlook.c
+prev include/ast.h implicit
+done string/strlook.c
+meta strlook.o %.c>%.o string/strlook.c strlook
+prev string/strlook.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strlook.c
+done strlook.o generated
+make strncopy.o
+make string/strncopy.c
+prev include/ast.h implicit
+done string/strncopy.c
+meta strncopy.o %.c>%.o string/strncopy.c strncopy
+prev string/strncopy.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strncopy.c
+done strncopy.o generated
+make strsearch.o
+make string/strsearch.c
+prev include/ast.h implicit
+done string/strsearch.c
+meta strsearch.o %.c>%.o string/strsearch.c strsearch
+prev string/strsearch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strsearch.c
+done strsearch.o generated
+make strpsearch.o
+make string/strpsearch.c
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done string/strpsearch.c
+meta strpsearch.o %.c>%.o string/strpsearch.c strpsearch
+prev string/strpsearch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strpsearch.c
+done strpsearch.o generated
+make stresc.o
+make string/stresc.c
+prev include/ast.h implicit
+done string/stresc.c
+meta stresc.o %.c>%.o string/stresc.c stresc
+prev string/stresc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/stresc.c
+done stresc.o generated
+make stropt.o
+make string/stropt.c
+prev include/ast.h implicit
+done string/stropt.c
+meta stropt.o %.c>%.o string/stropt.c stropt
+prev string/stropt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/stropt.c
+done stropt.o generated
+make strtape.o
+make string/strtape.c
+prev include/ast.h implicit
+done string/strtape.c
+meta strtape.o %.c>%.o string/strtape.c strtape
+prev string/strtape.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strtape.c
+done strtape.o generated
+make strpcmp.o
+make string/strpcmp.c
+prev include/ast.h implicit
+done string/strpcmp.c
+meta strpcmp.o %.c>%.o string/strpcmp.c strpcmp
+prev string/strpcmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strpcmp.c
+done strpcmp.o generated
+make strnpcmp.o
+make string/strnpcmp.c
+prev include/ast.h implicit
+done string/strnpcmp.c
+meta strnpcmp.o %.c>%.o string/strnpcmp.c strnpcmp
+prev string/strnpcmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strnpcmp.c
+done strnpcmp.o generated
+make strvcmp.o
+make string/strvcmp.c
+prev include/ast.h implicit
+done string/strvcmp.c
+meta strvcmp.o %.c>%.o string/strvcmp.c strvcmp
+prev string/strvcmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strvcmp.c
+done strvcmp.o generated
+make strnvcmp.o
+make string/strnvcmp.c
+prev include/ast.h implicit
+done string/strnvcmp.c
+meta strnvcmp.o %.c>%.o string/strnvcmp.c strnvcmp
+prev string/strnvcmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strnvcmp.c
+done strnvcmp.o generated
+make tok.o
+make string/tok.c
+make include/tok.h implicit
+prev include/ast.h implicit
+done include/tok.h
+prev include/ast.h implicit
+done string/tok.c
+meta tok.o %.c>%.o string/tok.c tok
+prev string/tok.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/tok.c
+done tok.o generated
+make tokline.o
+make string/tokline.c
+prev include/tok.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done string/tokline.c
+meta tokline.o %.c>%.o string/tokline.c tokline
+prev string/tokline.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/tokline.c
+done tokline.o generated
+make tokscan.o
+make string/tokscan.c
+prev include/tok.h implicit
+prev include/ast.h implicit
+done string/tokscan.c
+meta tokscan.o %.c>%.o string/tokscan.c tokscan
+prev string/tokscan.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/tokscan.c
+done tokscan.o generated
+make pathaccess.o
+make path/pathaccess.c
+prev ast_api.h implicit
+prev include/ast.h implicit
+done path/pathaccess.c
+meta pathaccess.o %.c>%.o path/pathaccess.c pathaccess
+prev path/pathaccess.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathaccess.c
+done pathaccess.o generated
+make pathcat.o
+make path/pathcat.c
+prev ast_api.h implicit
+prev include/ast.h implicit
+done path/pathcat.c
+meta pathcat.o %.c>%.o path/pathcat.c pathcat
+prev path/pathcat.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathcat.c
+done pathcat.o generated
+make pathcanon.o
+make path/pathcanon.c
+prev ast_api.h implicit
+prev include/error.h implicit
+prev include/fs3d.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done path/pathcanon.c
+meta pathcanon.o %.c>%.o path/pathcanon.c pathcanon
+prev path/pathcanon.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathcanon.c
+done pathcanon.o generated
+make pathcheck.o
+make path/pathcheck.c
+make include/times.h implicit
+make ast_time.h implicit
+make FEATURE/time
+meta FEATURE/time features/%>FEATURE/% features/time time
+make features/time
+done features/time
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/time
+done FEATURE/time generated
+exec - cmp 2>/dev/null -s FEATURE/time ast_time.h || { rm -f ast_time.h; silent test -d . || mkdir .; ${STDCP} FEATURE/time ast_time.h; }
+done ast_time.h dontcare generated
+prev include/ast.h implicit
+done include/times.h
+prev include/error.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done path/pathcheck.c
+meta pathcheck.o %.c>%.o path/pathcheck.c pathcheck
+prev path/pathcheck.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathcheck.c
+done pathcheck.o generated
+make pathpath.o
+make path/pathpath.c
+prev ast_api.h implicit
+prev include/ast.h implicit
+done path/pathpath.c
+meta pathpath.o %.c>%.o path/pathpath.c pathpath
+prev path/pathpath.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathpath.c
+done pathpath.o generated
+make pathexists.o
+make path/pathexists.c
+prev include/error.h implicit
+prev include/ls.h implicit
+make port/lclib.h implicit
+make lc.h implicit
+make lcgen
+make port/lcgen.c
+prev std/stdio.h implicit
+done port/lcgen.c
+exec - ${CC} -o lcgen port/lcgen.c
+done lcgen generated
+make port/lc.tab
+done port/lc.tab
+exec - ./lcgen ${COTEMP}.1 ${COTEMP}.2 < port/lc.tab
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ${COTEMP}.1 > ${COTEMP}.3
+exec - rm -f ${COTEMP}.1
+exec - if cmp 2>/dev/null -s ${COTEMP}.3 lc.h
+exec - then rm ${COTEMP}.3
+exec - else mv ${COTEMP}.3 lc.h
+exec - fi
+exec - if cmp 2>/dev/null -s ${COTEMP}.2 lctab.c
+exec - then rm ${COTEMP}.2
+exec - else mv ${COTEMP}.2 lctab.c
+exec - fi
+prev include/ast.h implicit
+make ${INSTALLROOT}/include/prototyped.h implicit
+done ${INSTALLROOT}/include/prototyped.h dontcare
+make joint.lc.h joint
+prev lc.h
+make lctab.c
+done lctab.c generated
+done joint.lc.h generated virtual
+done lc.h dontcare generated
+prev include/error.h implicit
+prev include/ast.h implicit
+done port/lclib.h
+done path/pathexists.c
+meta pathexists.o %.c>%.o path/pathexists.c pathexists
+prev path/pathexists.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c path/pathexists.c
+done pathexists.o generated
+make pathfind.o
+make path/pathfind.c
+prev include/ls.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done path/pathfind.c
+meta pathfind.o %.c>%.o path/pathfind.c pathfind
+prev path/pathfind.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathfind.c
+done pathfind.o generated
+make pathkey.o
+make path/pathkey.c
+prev ast_api.h implicit
+prev include/ls.h implicit
+make preroot.h implicit
+make FEATURE/preroot
+meta FEATURE/preroot features/%.sh>FEATURE/% features/preroot.sh preroot
+make features/preroot.sh
+done features/preroot.sh
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/preroot.sh
+done FEATURE/preroot generated
+exec - cmp 2>/dev/null -s FEATURE/preroot preroot.h || { rm -f preroot.h; silent test -d . || mkdir .; ${STDCP} FEATURE/preroot preroot.h; }
+done preroot.h generated
+prev include/fs3d.h implicit
+prev include/ast.h implicit
+done path/pathkey.c
+meta pathkey.o %.c>%.o path/pathkey.c pathkey
+prev path/pathkey.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathkey.c
+done pathkey.o generated
+make pathprobe.o
+make path/pathprobe.c
+prev ast_api.h implicit
+make include/proc.h implicit
+prev include/ast.h implicit
+done include/proc.h
+prev include/ls.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done path/pathprobe.c
+meta pathprobe.o %.c>%.o path/pathprobe.c pathprobe
+prev path/pathprobe.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -DHOSTTYPE=\""${mam_cc_HOSTTYPE}"\" -D_PACKAGE_ast -c path/pathprobe.c
+done pathprobe.o generated
+make pathrepl.o
+make path/pathrepl.c
+prev ast_api.h implicit
+prev include/ast.h implicit
+done path/pathrepl.c
+meta pathrepl.o %.c>%.o path/pathrepl.c pathrepl
+prev path/pathrepl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathrepl.c
+done pathrepl.o generated
+make pathnative.o
+make path/pathnative.c
+prev include/ast.h implicit
+done path/pathnative.c
+meta pathnative.o %.c>%.o path/pathnative.c pathnative
+prev path/pathnative.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathnative.c
+done pathnative.o generated
+make pathposix.o
+make path/pathposix.c
+make uwin.h implicit
+done uwin.h dontcare virtual
+prev include/ast.h implicit
+done path/pathposix.c
+meta pathposix.o %.c>%.o path/pathposix.c pathposix
+prev path/pathposix.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathposix.c
+done pathposix.o generated
+make pathtemp.o
+make path/pathtemp.c
+make include/tm.h implicit
+prev include/times.h implicit
+prev include/ast.h implicit
+done include/tm.h
+make tv.h implicit
+make FEATURE/tv
+meta FEATURE/tv features/%>FEATURE/% features/tv tv
+make features/tv
+done features/tv
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/tv
+prev include/ast.h implicit
+done FEATURE/tv generated
+exec - cmp 2>/dev/null -s FEATURE/tv tv.h || { rm -f tv.h; silent test -d . || mkdir .; ${STDCP} FEATURE/tv tv.h; }
+prev include/ast.h implicit
+done tv.h generated
+prev include/ls.h implicit
+prev include/ast.h implicit
+done path/pathtemp.c
+meta pathtemp.o %.c>%.o path/pathtemp.c pathtemp
+prev path/pathtemp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathtemp.c
+done pathtemp.o generated
+make pathtmp.o
+make path/pathtmp.c
+prev std/stdio.h implicit
+prev include/ast.h implicit
+done path/pathtmp.c
+meta pathtmp.o %.c>%.o path/pathtmp.c pathtmp
+prev path/pathtmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathtmp.c
+done pathtmp.o generated
+make pathstat.o
+make path/pathstat.c
+prev include/error.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done path/pathstat.c
+meta pathstat.o %.c>%.o path/pathstat.c pathstat
+prev path/pathstat.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathstat.c
+done pathstat.o generated
+make pathgetlink.o
+make path/pathgetlink.c
+make misc/univlib.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done misc/univlib.h
+done path/pathgetlink.c
+meta pathgetlink.o %.c>%.o path/pathgetlink.c pathgetlink
+prev path/pathgetlink.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c path/pathgetlink.c
+done pathgetlink.o generated
+make pathsetlink.o
+make path/pathsetlink.c
+prev misc/univlib.h implicit
+done path/pathsetlink.c
+meta pathsetlink.o %.c>%.o path/pathsetlink.c pathsetlink
+prev path/pathsetlink.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c path/pathsetlink.c
+done pathsetlink.o generated
+make pathbin.o
+make path/pathbin.c
+prev include/ast.h implicit
+done path/pathbin.c
+meta pathbin.o %.c>%.o path/pathbin.c pathbin
+prev path/pathbin.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathbin.c
+done pathbin.o generated
+make pathshell.o
+make path/pathshell.c
+prev include/ast.h implicit
+done path/pathshell.c
+meta pathshell.o %.c>%.o path/pathshell.c pathshell
+prev path/pathshell.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathshell.c
+done pathshell.o generated
+make pathcd.o
+make path/pathcd.c
+make include/stk.h implicit
+prev include/sfio.h implicit
+done include/stk.h
+prev include/error.h implicit
+prev include/ast.h implicit
+done path/pathcd.c
+meta pathcd.o %.c>%.o path/pathcd.c pathcd
+prev path/pathcd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathcd.c
+done pathcd.o generated
+make pathprog.o
+make path/pathprog.c
+make FEATURE/prog implicit
+meta FEATURE/prog features/%>FEATURE/% features/prog prog
+make features/prog
+done features/prog
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/prog
+done FEATURE/prog generated
+make include/ast_windows.h implicit
+make windows.h implicit
+done windows.h dontcare virtual
+done include/ast_windows.h dontcare
+prev include/ast.h implicit
+done path/pathprog.c
+meta pathprog.o %.c>%.o path/pathprog.c pathprog
+prev path/pathprog.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathprog.c
+done pathprog.o generated
+make fs3d.o
+make misc/fs3d.c
+prev include/fs3d.h implicit
+prev include/ast.h implicit
+done misc/fs3d.c
+meta fs3d.o %.c>%.o misc/fs3d.c fs3d
+prev misc/fs3d.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/fs3d.c
+done fs3d.o generated
+make ftwalk.o
+make misc/ftwalk.c
+make include/ftwalk.h implicit
+make include/fts.h implicit
+prev ast_mode.h implicit
+prev ast_fs.h implicit
+prev include/ast_std.h implicit
+done include/fts.h dontcare
+done include/ftwalk.h
+prev include/ast.h implicit
+done misc/ftwalk.c
+meta ftwalk.o %.c>%.o misc/ftwalk.c ftwalk
+prev misc/ftwalk.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/ftwalk.c
+done ftwalk.o generated
+make ftwflags.o
+make misc/ftwflags.c
+prev include/ftwalk.h implicit
+prev include/ast.h implicit
+done misc/ftwflags.c
+meta ftwflags.o %.c>%.o misc/ftwflags.c ftwflags
+prev misc/ftwflags.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/ftwflags.c
+done ftwflags.o generated
+make fts.o
+make misc/fts.c
+prev include/fts.h implicit
+prev include/ls.h implicit
+prev include/fs3d.h implicit
+prev include/error.h implicit
+prev include/ast_dir.h implicit
+prev include/ast.h implicit
+done misc/fts.c
+meta fts.o %.c>%.o misc/fts.c fts
+prev misc/fts.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D__OBSOLETE__=20120101 -D_PACKAGE_ast -c misc/fts.c
+done fts.o generated
+make astintercept.o
+make misc/astintercept.c
+make misc/intercepts.h implicit
+make include/shcmd.h implicit
+done include/shcmd.h dontcare
+prev include/ast.h implicit
+done misc/intercepts.h
+done misc/astintercept.c
+meta astintercept.o %.c>%.o misc/astintercept.c astintercept
+prev misc/astintercept.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/astintercept.c
+done astintercept.o generated
+make conformance.o
+make misc/conformance.c
+prev include/ast.h implicit
+done misc/conformance.c
+meta conformance.o %.c>%.o misc/conformance.c conformance
+prev misc/conformance.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/conformance.c
+done conformance.o generated
+make getenv.o
+make misc/getenv.c
+prev windows.h implicit
+prev misc/intercepts.h implicit
+done misc/getenv.c
+meta getenv.o %.c>%.o misc/getenv.c getenv
+prev misc/getenv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/getenv.c
+done getenv.o generated
+make setenviron.o
+make misc/setenviron.c
+prev include/fs3d.h implicit
+prev misc/intercepts.h implicit
+done misc/setenviron.c
+meta setenviron.o %.c>%.o misc/setenviron.c setenviron
+prev misc/setenviron.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/setenviron.c
+done setenviron.o generated
+make optget.o
+make misc/optget.c
+prev include/ccode.h implicit
+make include/debug.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done include/debug.h
+make misc/optlib.h implicit
+prev include/error.h implicit
+prev include/cdt.h implicit
+prev include/ast.h implicit
+done misc/optlib.h
+done misc/optget.c
+meta optget.o %.c>%.o misc/optget.c optget
+prev misc/optget.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/optget.c
+done optget.o generated
+make optjoin.o
+make misc/optjoin.c
+prev misc/optlib.h implicit
+done misc/optjoin.c
+meta optjoin.o %.c>%.o misc/optjoin.c optjoin
+prev misc/optjoin.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/optjoin.c
+done optjoin.o generated
+make optesc.o
+make misc/optesc.c
+prev misc/optlib.h implicit
+done misc/optesc.c
+meta optesc.o %.c>%.o misc/optesc.c optesc
+prev misc/optesc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/optesc.c
+done optesc.o generated
+make optctx.o
+make misc/optctx.c
+prev misc/optlib.h implicit
+done misc/optctx.c
+meta optctx.o %.c>%.o misc/optctx.c optctx
+prev misc/optctx.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/optctx.c
+done optctx.o generated
+make strsort.o
+make string/strsort.c
+prev include/ast.h implicit
+done string/strsort.c
+meta strsort.o %.c>%.o string/strsort.c strsort
+prev string/strsort.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strsort.c
+done strsort.o generated
+make struniq.o
+make string/struniq.c
+prev include/ast.h implicit
+done string/struniq.c
+meta struniq.o %.c>%.o string/struniq.c struniq
+prev string/struniq.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/struniq.c
+done struniq.o generated
+make magic.o
+make misc/magic.c
+make include/magic.h implicit
+prev include/ls.h implicit
+prev include/sfio.h implicit
+done include/magic.h
+make include/swap.h implicit
+prev ast_common.h implicit
+done include/swap.h
+prev include/regex.h implicit
+prev include/error.h implicit
+prev include/modex.h implicit
+make include/dt.h implicit
+prev include/vmalloc.h implicit
+prev include/cdt.h implicit
+done include/dt.h
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done misc/magic.c
+meta magic.o %.c>%.o misc/magic.c magic
+prev misc/magic.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/magic.c
+done magic.o generated
+make mime.o
+make misc/mime.c
+make misc/mimelib.h implicit
+make include/mime.h implicit
+prev include/ls.h implicit
+prev include/sfio.h implicit
+done include/mime.h dontcare
+prev include/tok.h implicit
+prev include/magic.h implicit
+prev include/cdt.h implicit
+prev include/ast.h implicit
+done misc/mimelib.h
+done misc/mime.c
+meta mime.o %.c>%.o misc/mime.c mime
+prev misc/mime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/mime.c
+done mime.o generated
+make mimetype.o
+make misc/mimetype.c
+prev misc/mimelib.h implicit
+done misc/mimetype.c
+meta mimetype.o %.c>%.o misc/mimetype.c mimetype
+prev misc/mimetype.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/mimetype.c
+done mimetype.o generated
+make signal.o
+make misc/signal.c
+prev ast_map.h implicit
+make sig.h implicit
+make FEATURE/sig
+meta FEATURE/sig features/%.sh>FEATURE/% features/sig.sh sig
+make features/sig.sh
+done features/sig.sh
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/sig.sh
+done FEATURE/sig generated
+exec - cmp 2>/dev/null -s FEATURE/sig sig.h || { rm -f sig.h; silent test -d . || mkdir .; ${STDCP} FEATURE/sig sig.h; }
+done sig.h generated
+prev include/ast.h implicit
+done misc/signal.c
+meta signal.o %.c>%.o misc/signal.c signal
+prev misc/signal.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/signal.c
+done signal.o generated
+make sigflag.o
+make comp/sigflag.c
+prev sig.h implicit
+prev include/ast.h implicit
+done comp/sigflag.c
+meta sigflag.o %.c>%.o comp/sigflag.c sigflag
+prev comp/sigflag.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/sigflag.c
+done sigflag.o generated
+make systrace.o
+make misc/systrace.c
+prev include/debug.h implicit
+prev include/proc.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done misc/systrace.c
+meta systrace.o %.c>%.o misc/systrace.c systrace
+prev misc/systrace.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/systrace.c
+done systrace.o generated
+make error.o
+make misc/error.c
+prev include/regex.h implicit
+prev include/times.h implicit
+prev include/stk.h implicit
+prev sig.h implicit
+make include/namval.h implicit
+done include/namval.h
+prev include/ccode.h implicit
+prev port/lclib.h implicit
+done misc/error.c
+meta error.o %.c>%.o misc/error.c error
+prev misc/error.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -DERROR_CATALOG=\""libast"\" -D_PACKAGE_ast -c misc/error.c
+done error.o generated
+make errorf.o
+make misc/errorf.c
+prev include/error.h implicit
+done misc/errorf.c
+meta errorf.o %.c>%.o misc/errorf.c errorf
+prev misc/errorf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/errorf.c
+done errorf.o generated
+make errormsg.o
+make misc/errormsg.c
+prev include/error.h implicit
+done misc/errormsg.c
+meta errormsg.o %.c>%.o misc/errormsg.c errormsg
+prev misc/errormsg.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/errormsg.c
+done errormsg.o generated
+make errorx.o
+make misc/errorx.c
+prev port/lclib.h implicit
+done misc/errorx.c
+meta errorx.o %.c>%.o misc/errorx.c errorx
+prev misc/errorx.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c misc/errorx.c
+done errorx.o generated
+make localeconv.o
+make comp/localeconv.c
+prev port/lclib.h implicit
+done comp/localeconv.c
+meta localeconv.o %.c>%.o comp/localeconv.c localeconv
+prev comp/localeconv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/localeconv.c
+done localeconv.o generated
+make setlocale.o
+make comp/setlocale.c
+prev include/ast_windows.h implicit
+prev std/wctype.h implicit
+prev include/namval.h implicit
+make include/mc.h implicit
+prev include/ast.h implicit
+done include/mc.h
+prev ast_wchar.h implicit
+prev port/lclib.h implicit
+make ast_standards.h implicit
+prev FEATURE/standards
+exec - cmp 2>/dev/null -s FEATURE/standards ast_standards.h || { rm -f ast_standards.h; silent test -d . || mkdir .; ${STDCP} FEATURE/standards ast_standards.h; }
+done ast_standards.h generated
+done comp/setlocale.c
+meta setlocale.o %.c>%.o comp/setlocale.c setlocale
+prev comp/setlocale.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/setlocale.c
+done setlocale.o generated
+make translate.o
+make misc/translate.c
+make std/nl_types.h implicit
+prev ast_nl_types.h implicit
+done std/nl_types.h
+prev include/mc.h implicit
+prev include/error.h implicit
+prev include/cdt.h implicit
+prev port/lclib.h implicit
+done misc/translate.c
+meta translate.o %.c>%.o misc/translate.c translate
+prev misc/translate.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c misc/translate.c
+done translate.o generated
+make catopen.o
+make comp/catopen.c
+make std/iconv.h implicit
+make ast_iconv.h implicit
+make FEATURE/iconv
+meta FEATURE/iconv features/%>FEATURE/% features/iconv iconv
+make features/iconv
+done features/iconv
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/iconv
+prev include/ccode.h implicit
+prev ast_common.h implicit
+done FEATURE/iconv generated
+exec - cmp 2>/dev/null -s FEATURE/iconv ast_iconv.h || { rm -f ast_iconv.h; silent test -d . || mkdir .; ${STDCP} FEATURE/iconv ast_iconv.h; }
+prev include/ccode.h implicit
+prev ast_common.h implicit
+done ast_iconv.h generated
+done std/iconv.h
+prev std/nl_types.h implicit
+prev include/mc.h implicit
+prev include/ast.h implicit
+done comp/catopen.c
+meta catopen.o %.c>%.o comp/catopen.c catopen
+prev comp/catopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/catopen.c
+done catopen.o generated
+make iconv.o
+make comp/iconv.c
+prev include/ast_windows.h implicit
+prev port/lclib.h implicit
+prev std/iconv.h implicit
+prev include/ccode.h implicit
+prev std/dirent.h implicit
+prev include/ast.h implicit
+done comp/iconv.c
+meta iconv.o %.c>%.o comp/iconv.c iconv
+prev comp/iconv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/iconv.c
+done iconv.o generated
+make lc.o
+make port/lc.c
+make FEATURE/locale implicit
+meta FEATURE/locale features/%>FEATURE/% features/locale locale
+make features/locale
+done features/locale
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/locale
+done FEATURE/locale generated
+make port/lclang.h implicit
+prev include/ast_windows.h implicit
+done port/lclang.h
+prev port/lclib.h implicit
+done port/lc.c
+meta lc.o %.c>%.o port/lc.c lc
+prev port/lc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c port/lc.c
+done lc.o generated
+make lctab.o
+make lctab.c
+prev port/lclang.h implicit
+prev port/lclib.h implicit
+done lctab.c
+meta lctab.o %.c>%.o lctab.c lctab
+prev lctab.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c lctab.c
+done lctab.o generated
+make mc.o
+make port/mc.c
+prev std/nl_types.h implicit
+prev include/mc.h implicit
+prev include/error.h implicit
+prev include/vmalloc.h implicit
+prev std/iconv.h implicit
+prev port/lclib.h implicit
+make sfio/sfhdr.h implicit
+prev port/lclib.h implicit
+make vfork.h implicit
+done vfork.h dontcare virtual
+make stropts.h implicit
+done stropts.h dontcare virtual
+prev std/wchar.h implicit
+make FEATURE/float implicit
+meta FEATURE/float features/%>FEATURE/% features/float float
+make features/float
+prev FEATURE/standards implicit
+done features/float
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/float
+prev ast_common.h implicit
+done FEATURE/float dontcare generated
+make mman.h implicit
+done mman.h dontcare virtual
+make filio.h implicit
+done filio.h dontcare virtual
+make stat.h implicit
+done stat.h dontcare virtual
+prev include/ls.h implicit
+make ast_tty.h implicit
+prev FEATURE/tty
+exec - cmp 2>/dev/null -s FEATURE/tty ast_tty.h || { rm -f ast_tty.h; silent test -d . || mkdir .; ${STDCP} FEATURE/tty ast_tty.h; }
+done ast_tty.h dontcare generated
+prev ast_time.h implicit
+prev include/ast.h implicit
+make sfio/vthread.h implicit
+prev windows.h implicit
+prev std/endian.h implicit
+prev ast_common.h implicit
+done sfio/vthread.h dontcare
+make include/sfio_t.h implicit
+prev include/sfio.h implicit
+done include/sfio_t.h dontcare
+prev FEATURE/common implicit
+prev FEATURE/mmap implicit
+make FEATURE/sfio implicit
+meta FEATURE/sfio features/%>FEATURE/% features/sfio sfio
+make features/sfio
+done features/sfio
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/sfio
+done FEATURE/sfio dontcare generated
+done sfio/sfhdr.h
+done port/mc.c
+meta mc.o %.c>%.o port/mc.c mc
+prev port/mc.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c port/mc.c
+done mc.o generated
+make base64.o
+make string/base64.c
+prev include/ast.h implicit
+done string/base64.c
+meta base64.o %.c>%.o string/base64.c base64
+prev string/base64.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/base64.c
+done base64.o generated
+make recfmt.o
+make misc/recfmt.c
+make include/recfmt.h implicit
+prev include/ast.h implicit
+done include/recfmt.h
+done misc/recfmt.c
+meta recfmt.o %.c>%.o misc/recfmt.c recfmt
+prev misc/recfmt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/recfmt.c
+done recfmt.o generated
+make recstr.o
+make misc/recstr.c
+prev include/recfmt.h implicit
+done misc/recstr.c
+meta recstr.o %.c>%.o misc/recstr.c recstr
+prev misc/recstr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/recstr.c
+done recstr.o generated
+make reclen.o
+make misc/reclen.c
+prev include/recfmt.h implicit
+done misc/reclen.c
+meta reclen.o %.c>%.o misc/reclen.c reclen
+prev misc/reclen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/reclen.c
+done reclen.o generated
+make fmtrec.o
+make misc/fmtrec.c
+prev include/recfmt.h implicit
+done misc/fmtrec.c
+meta fmtrec.o %.c>%.o misc/fmtrec.c fmtrec
+prev misc/fmtrec.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/fmtrec.c
+done fmtrec.o generated
+make fmtbase.o
+make string/fmtbase.c
+prev include/ast.h implicit
+done string/fmtbase.c
+meta fmtbase.o %.c>%.o string/fmtbase.c fmtbase
+prev string/fmtbase.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D__OBSOLETE__=20120101 -D_PACKAGE_ast -c string/fmtbase.c
+done fmtbase.o generated
+make fmtbuf.o
+make string/fmtbuf.c
+prev include/ast.h implicit
+done string/fmtbuf.c
+meta fmtbuf.o %.c>%.o string/fmtbuf.c fmtbuf
+prev string/fmtbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtbuf.c
+done fmtbuf.o generated
+make fmtclock.o
+make string/fmtclock.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done string/fmtclock.c
+meta fmtclock.o %.c>%.o string/fmtclock.c fmtclock
+prev string/fmtclock.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtclock.c
+done fmtclock.o generated
+make fmtdev.o
+make string/fmtdev.c
+prev include/ls.h implicit
+prev include/ast.h implicit
+done string/fmtdev.c
+meta fmtdev.o %.c>%.o string/fmtdev.c fmtdev
+prev string/fmtdev.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtdev.c
+done fmtdev.o generated
+make fmtelapsed.o
+make string/fmtelapsed.c
+prev include/ast.h implicit
+done string/fmtelapsed.c
+meta fmtelapsed.o %.c>%.o string/fmtelapsed.c fmtelapsed
+prev string/fmtelapsed.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtelapsed.c
+done fmtelapsed.o generated
+make fmterror.o
+make string/fmterror.c
+prev include/ast.h implicit
+done string/fmterror.c
+meta fmterror.o %.c>%.o string/fmterror.c fmterror
+prev string/fmterror.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmterror.c
+done fmterror.o generated
+make fmtesc.o
+make string/fmtesc.c
+prev std/wctype.h implicit
+prev std/wchar.h implicit
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done string/fmtesc.c
+meta fmtesc.o %.c>%.o string/fmtesc.c fmtesc
+prev string/fmtesc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtesc.c
+done fmtesc.o generated
+make fmtfmt.o
+make string/fmtfmt.c
+prev include/ast.h implicit
+done string/fmtfmt.c
+meta fmtfmt.o %.c>%.o string/fmtfmt.c fmtfmt
+prev string/fmtfmt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtfmt.c
+done fmtfmt.o generated
+make fmtfs.o
+make string/fmtfs.c
+prev include/cdt.h implicit
+prev FEATURE/fs implicit
+make include/mnt.h implicit
+done include/mnt.h
+prev include/ls.h implicit
+prev include/ast.h implicit
+done string/fmtfs.c
+meta fmtfs.o %.c>%.o string/fmtfs.c fmtfs
+prev string/fmtfs.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtfs.c
+done fmtfs.o generated
+make fmtident.o
+make string/fmtident.c
+prev include/ast.h implicit
+done string/fmtident.c
+meta fmtident.o %.c>%.o string/fmtident.c fmtident
+prev string/fmtident.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtident.c
+done fmtident.o generated
+make fmtint.o
+make string/fmtint.c
+prev include/ast.h implicit
+done string/fmtint.c
+meta fmtint.o %.c>%.o string/fmtint.c fmtint
+prev string/fmtint.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtint.c
+done fmtint.o generated
+make fmtip4.o
+make string/fmtip4.c
+prev include/ast.h implicit
+done string/fmtip4.c
+meta fmtip4.o %.c>%.o string/fmtip4.c fmtip4
+prev string/fmtip4.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtip4.c
+done fmtip4.o generated
+make fmtip6.o
+make string/fmtip6.c
+make include/ip6.h implicit
+done include/ip6.h
+prev include/ast.h implicit
+done string/fmtip6.c
+meta fmtip6.o %.c>%.o string/fmtip6.c fmtip6
+prev string/fmtip6.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtip6.c
+done fmtip6.o generated
+make fmtls.o
+make string/fmtls.c
+prev include/tm.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done string/fmtls.c
+meta fmtls.o %.c>%.o string/fmtls.c fmtls
+prev string/fmtls.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtls.c
+done fmtls.o generated
+make fmtmatch.o
+make string/fmtmatch.c
+prev include/ast.h implicit
+done string/fmtmatch.c
+meta fmtmatch.o %.c>%.o string/fmtmatch.c fmtmatch
+prev string/fmtmatch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtmatch.c
+done fmtmatch.o generated
+make fmtmode.o
+make string/fmtmode.c
+prev string/modelib.h implicit
+done string/fmtmode.c
+meta fmtmode.o %.c>%.o string/fmtmode.c fmtmode
+prev string/fmtmode.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Istring -Iinclude -Istd -D_PACKAGE_ast -c string/fmtmode.c
+done fmtmode.o generated
+make fmtnum.o
+make string/fmtnum.c
+prev include/ast.h implicit
+done string/fmtnum.c
+meta fmtnum.o %.c>%.o string/fmtnum.c fmtnum
+prev string/fmtnum.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtnum.c
+done fmtnum.o generated
+make fmtperm.o
+make string/fmtperm.c
+prev include/ls.h implicit
+prev include/ast.h implicit
+done string/fmtperm.c
+meta fmtperm.o %.c>%.o string/fmtperm.c fmtperm
+prev string/fmtperm.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtperm.c
+done fmtperm.o generated
+make fmtre.o
+make string/fmtre.c
+prev include/ast.h implicit
+done string/fmtre.c
+meta fmtre.o %.c>%.o string/fmtre.c fmtre
+prev string/fmtre.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtre.c
+done fmtre.o generated
+make fmttime.o
+make string/fmttime.c
+prev include/tm.h implicit
+done string/fmttime.c
+meta fmttime.o %.c>%.o string/fmttime.c fmttime
+prev string/fmttime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmttime.c
+done fmttime.o generated
+make fmtuid.o
+make string/fmtuid.c
+prev std/stdio.h implicit
+prev include/cdt.h implicit
+prev include/ast.h implicit
+done string/fmtuid.c
+meta fmtuid.o %.c>%.o string/fmtuid.c fmtuid
+prev string/fmtuid.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtuid.c
+done fmtuid.o generated
+make fmtgid.o
+make string/fmtgid.c
+prev std/stdio.h implicit
+prev include/cdt.h implicit
+prev include/ast.h implicit
+done string/fmtgid.c
+meta fmtgid.o %.c>%.o string/fmtgid.c fmtgid
+prev string/fmtgid.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtgid.c
+done fmtgid.o generated
+make fmtsignal.o
+make string/fmtsignal.c
+prev sig.h implicit
+prev include/ast.h implicit
+done string/fmtsignal.c
+meta fmtsignal.o %.c>%.o string/fmtsignal.c fmtsignal
+prev string/fmtsignal.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtsignal.c
+done fmtsignal.o generated
+make fmtscale.o
+make string/fmtscale.c
+prev port/lclib.h implicit
+prev include/ast.h implicit
+done string/fmtscale.c
+meta fmtscale.o %.c>%.o string/fmtscale.c fmtscale
+prev string/fmtscale.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/fmtscale.c
+done fmtscale.o generated
+make fmttmx.o
+make string/fmttmx.c
+prev tv.h implicit
+make tmx.h implicit
+make FEATURE/tmx
+meta FEATURE/tmx features/%>FEATURE/% features/tmx tmx
+make features/tmx
+prev FEATURE/common implicit
+done features/tmx
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/tmx
+prev tv.h implicit
+prev include/tm.h implicit
+done FEATURE/tmx generated
+exec - cmp 2>/dev/null -s FEATURE/tmx tmx.h || { rm -f tmx.h; silent test -d . || mkdir .; ${STDCP} FEATURE/tmx tmx.h; }
+prev tv.h implicit
+prev include/tm.h implicit
+done tmx.h generated
+done string/fmttmx.c
+meta fmttmx.o %.c>%.o string/fmttmx.c fmttmx
+prev string/fmttmx.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmttmx.c
+done fmttmx.o generated
+make fmttv.o
+make string/fmttv.c
+prev include/tm.h implicit
+prev tv.h implicit
+done string/fmttv.c
+meta fmttv.o %.c>%.o string/fmttv.c fmttv
+prev string/fmttv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmttv.c
+done fmttv.o generated
+make fmtversion.o
+make string/fmtversion.c
+prev include/ast.h implicit
+done string/fmtversion.c
+meta fmtversion.o %.c>%.o string/fmtversion.c fmtversion
+prev string/fmtversion.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/fmtversion.c
+done fmtversion.o generated
+make strelapsed.o
+make string/strelapsed.c
+prev include/ast.h implicit
+done string/strelapsed.c
+meta strelapsed.o %.c>%.o string/strelapsed.c strelapsed
+prev string/strelapsed.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strelapsed.c
+done strelapsed.o generated
+make strperm.o
+make string/strperm.c
+prev include/modex.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done string/strperm.c
+meta strperm.o %.c>%.o string/strperm.c strperm
+prev string/strperm.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strperm.c
+done strperm.o generated
+make struid.o
+make string/struid.c
+prev include/cdt.h implicit
+prev include/ast.h implicit
+done string/struid.c
+meta struid.o %.c>%.o string/struid.c struid
+prev string/struid.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/struid.c
+done struid.o generated
+make strgid.o
+make string/strgid.c
+prev include/cdt.h implicit
+prev include/ast.h implicit
+done string/strgid.c
+meta strgid.o %.c>%.o string/strgid.c strgid
+prev string/strgid.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strgid.c
+done strgid.o generated
+make strtoip4.o
+make string/strtoip4.c
+prev include/ast.h implicit
+done string/strtoip4.c
+meta strtoip4.o %.c>%.o string/strtoip4.c strtoip4
+prev string/strtoip4.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strtoip4.c
+done strtoip4.o generated
+make strtoip6.o
+make string/strtoip6.c
+prev include/ip6.h implicit
+prev include/ast.h implicit
+done string/strtoip6.c
+meta strtoip6.o %.c>%.o string/strtoip6.c strtoip6
+prev string/strtoip6.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strtoip6.c
+done strtoip6.o generated
+make stack.o
+make misc/stack.c
+make include/stack.h implicit
+done include/stack.h
+prev include/ast.h implicit
+done misc/stack.c
+meta stack.o %.c>%.o misc/stack.c stack
+prev misc/stack.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/stack.c
+done stack.o generated
+make stk.o
+make misc/stk.c
+prev include/stk.h implicit
+make align.h implicit
+make FEATURE/align
+meta FEATURE/align features/%.c>FEATURE/% features/align.c align
+make features/align.c
+prev FEATURE/common implicit
+done features/align.c
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. ${LDFLAGS} ' run features/align.c
+done FEATURE/align generated
+exec - cmp 2>/dev/null -s FEATURE/align align.h || { rm -f align.h; silent test -d . || mkdir .; ${STDCP} FEATURE/align align.h; }
+done align.h generated
+prev include/ast.h implicit
+prev include/sfio_t.h implicit
+done misc/stk.c
+meta stk.o %.c>%.o misc/stk.c stk
+prev misc/stk.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/stk.c
+done stk.o generated
+make swapget.o
+make string/swapget.c
+prev include/swap.h implicit
+prev include/ast.h implicit
+done string/swapget.c
+meta swapget.o %.c>%.o string/swapget.c swapget
+prev string/swapget.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/swapget.c
+done swapget.o generated
+make swapmem.o
+make string/swapmem.c
+prev include/swap.h implicit
+prev include/ast.h implicit
+done string/swapmem.c
+meta swapmem.o %.c>%.o string/swapmem.c swapmem
+prev string/swapmem.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/swapmem.c
+done swapmem.o generated
+make swapop.o
+make string/swapop.c
+prev include/swap.h implicit
+prev include/ast.h implicit
+done string/swapop.c
+meta swapop.o %.c>%.o string/swapop.c swapop
+prev string/swapop.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/swapop.c
+done swapop.o generated
+make swapput.o
+make string/swapput.c
+prev include/swap.h implicit
+prev include/ast.h implicit
+done string/swapput.c
+meta swapput.o %.c>%.o string/swapput.c swapput
+prev string/swapput.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/swapput.c
+done swapput.o generated
+make sigdata.o
+make misc/sigdata.c
+make FEATURE/signal implicit
+meta FEATURE/signal features/%.c>FEATURE/% features/signal.c signal
+make features/signal.c
+make FEATURE/siglist implicit
+meta FEATURE/siglist features/%>FEATURE/% features/siglist siglist
+make features/siglist
+done features/siglist
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/siglist
+done FEATURE/siglist generated
+prev FEATURE/standards implicit
+done features/signal.c
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. ${LDFLAGS} ' run features/signal.c
+done FEATURE/signal generated
+prev sig.h implicit
+prev include/ast.h implicit
+done misc/sigdata.c
+meta sigdata.o %.c>%.o misc/sigdata.c sigdata
+prev misc/sigdata.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/sigdata.c
+done sigdata.o generated
+make sigcrit.o
+make misc/sigcrit.c
+prev sig.h implicit
+prev include/ast.h implicit
+done misc/sigcrit.c
+meta sigcrit.o %.c>%.o misc/sigcrit.c sigcrit
+prev misc/sigcrit.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/sigcrit.c
+done sigcrit.o generated
+make sigunblock.o
+make comp/sigunblock.c
+prev sig.h implicit
+prev include/ast.h implicit
+done comp/sigunblock.c
+meta sigunblock.o %.c>%.o comp/sigunblock.c sigunblock
+prev comp/sigunblock.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/sigunblock.c
+done sigunblock.o generated
+make procopen.o
+make misc/procopen.c
+prev include/namval.h implicit
+prev ast_tty.h implicit
+prev include/ls.h implicit
+make misc/proclib.h implicit
+prev include/proc.h implicit
+make include/wait.h implicit
+make ast_wait.h implicit
+make FEATURE/wait
+meta FEATURE/wait features/%>FEATURE/% features/wait wait
+make features/wait
+done features/wait
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/wait
+done FEATURE/wait generated
+exec - cmp 2>/dev/null -s FEATURE/wait ast_wait.h || { rm -f ast_wait.h; silent test -d . || mkdir .; ${STDCP} FEATURE/wait ast_wait.h; }
+done ast_wait.h dontcare generated
+prev include/ast.h implicit
+done include/wait.h dontcare
+prev sig.h implicit
+prev include/ast.h implicit
+prev ast_standards.h implicit
+done misc/proclib.h
+done misc/procopen.c
+meta procopen.o %.c>%.o misc/procopen.c procopen
+prev misc/procopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/procopen.c
+done procopen.o generated
+make procclose.o
+make misc/procclose.c
+prev misc/proclib.h implicit
+done misc/procclose.c
+meta procclose.o %.c>%.o misc/procclose.c procclose
+prev misc/procclose.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/procclose.c
+done procclose.o generated
+make procrun.o
+make misc/procrun.c
+prev misc/proclib.h implicit
+done misc/procrun.c
+meta procrun.o %.c>%.o misc/procrun.c procrun
+prev misc/procrun.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D__OBSOLETE__=20120101 -D_PACKAGE_ast -c misc/procrun.c
+done procrun.o generated
+make procfree.o
+make misc/procfree.c
+prev misc/proclib.h implicit
+done misc/procfree.c
+meta procfree.o %.c>%.o misc/procfree.c procfree
+prev misc/procfree.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/procfree.c
+done procfree.o generated
+make tmdate.o
+make tm/tmdate.c
+prev tmx.h implicit
+done tm/tmdate.c
+meta tmdate.o %.c>%.o tm/tmdate.c tmdate
+prev tm/tmdate.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmdate.c
+done tmdate.o generated
+make tmequiv.o
+make tm/tmequiv.c
+prev include/tm.h implicit
+done tm/tmequiv.c
+meta tmequiv.o %.c>%.o tm/tmequiv.c tmequiv
+prev tm/tmequiv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmequiv.c
+done tmequiv.o generated
+make tmfix.o
+make tm/tmfix.c
+prev tmx.h implicit
+prev include/ast.h implicit
+done tm/tmfix.c
+meta tmfix.o %.c>%.o tm/tmfix.c tmfix
+prev tm/tmfix.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmfix.c
+done tmfix.o generated
+make tmfmt.o
+make tm/tmfmt.c
+prev tmx.h implicit
+done tm/tmfmt.c
+meta tmfmt.o %.c>%.o tm/tmfmt.c tmfmt
+prev tm/tmfmt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmfmt.c
+done tmfmt.o generated
+make tmform.o
+make tm/tmform.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmform.c
+meta tmform.o %.c>%.o tm/tmform.c tmform
+prev tm/tmform.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmform.c
+done tmform.o generated
+make tmgoff.o
+make tm/tmgoff.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmgoff.c
+meta tmgoff.o %.c>%.o tm/tmgoff.c tmgoff
+prev tm/tmgoff.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmgoff.c
+done tmgoff.o generated
+make tminit.o
+make tm/tminit.c
+make FEATURE/tmlib implicit
+meta FEATURE/tmlib features/%>FEATURE/% features/tmlib tmlib
+make features/tmlib
+done features/tmlib
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/tmlib
+done FEATURE/tmlib generated
+prev include/namval.h implicit
+prev include/tm.h implicit
+done tm/tminit.c
+meta tminit.o %.c>%.o tm/tminit.c tminit
+prev tm/tminit.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tminit.c
+done tminit.o generated
+make tmleap.o
+make tm/tmleap.c
+prev tmx.h implicit
+done tm/tmleap.c
+meta tmleap.o %.c>%.o tm/tmleap.c tmleap
+prev tm/tmleap.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmleap.c
+done tmleap.o generated
+make tmlex.o
+make tm/tmlex.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmlex.c
+meta tmlex.o %.c>%.o tm/tmlex.c tmlex
+prev tm/tmlex.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmlex.c
+done tmlex.o generated
+make tmlocale.o
+make tm/tmlocale.c
+prev std/nl_types.h implicit
+prev std/nl_types.h implicit
+prev include/ast_windows.h implicit
+prev port/lclib.h implicit
+prev ast_nl_types.h implicit
+prev include/tm.h implicit
+prev include/mc.h implicit
+prev std/iconv.h implicit
+prev include/cdt.h implicit
+prev include/ast.h implicit
+done tm/tmlocale.c
+meta tmlocale.o %.c>%.o tm/tmlocale.c tmlocale
+prev tm/tmlocale.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c tm/tmlocale.c
+done tmlocale.o generated
+make tmmake.o
+make tm/tmmake.c
+prev tmx.h implicit
+done tm/tmmake.c
+meta tmmake.o %.c>%.o tm/tmmake.c tmmake
+prev tm/tmmake.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmmake.c
+done tmmake.o generated
+make tmpoff.o
+make tm/tmpoff.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmpoff.c
+meta tmpoff.o %.c>%.o tm/tmpoff.c tmpoff
+prev tm/tmpoff.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmpoff.c
+done tmpoff.o generated
+make tmscan.o
+make tm/tmscan.c
+prev tmx.h implicit
+done tm/tmscan.c
+meta tmscan.o %.c>%.o tm/tmscan.c tmscan
+prev tm/tmscan.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmscan.c
+done tmscan.o generated
+make tmsleep.o
+make tm/tmsleep.c
+prev tv.h implicit
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmsleep.c
+meta tmsleep.o %.c>%.o tm/tmsleep.c tmsleep
+prev tm/tmsleep.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmsleep.c
+done tmsleep.o generated
+make tmtime.o
+make tm/tmtime.c
+prev tmx.h implicit
+done tm/tmtime.c
+meta tmtime.o %.c>%.o tm/tmtime.c tmtime
+prev tm/tmtime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmtime.c
+done tmtime.o generated
+make tmtype.o
+make tm/tmtype.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmtype.c
+meta tmtype.o %.c>%.o tm/tmtype.c tmtype
+prev tm/tmtype.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmtype.c
+done tmtype.o generated
+make tmweek.o
+make tm/tmweek.c
+prev tmx.h implicit
+done tm/tmweek.c
+meta tmweek.o %.c>%.o tm/tmweek.c tmweek
+prev tm/tmweek.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmweek.c
+done tmweek.o generated
+make tmword.o
+make tm/tmword.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmword.c
+meta tmword.o %.c>%.o tm/tmword.c tmword
+prev tm/tmword.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmword.c
+done tmword.o generated
+make tmzone.o
+make tm/tmzone.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmzone.c
+meta tmzone.o %.c>%.o tm/tmzone.c tmzone
+prev tm/tmzone.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmzone.c
+done tmzone.o generated
+make tmxdate.o
+make tm/tmxdate.c
+prev include/debug.h implicit
+prev tmx.h implicit
+done tm/tmxdate.c
+meta tmxdate.o %.c>%.o tm/tmxdate.c tmxdate
+prev tm/tmxdate.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxdate.c
+done tmxdate.o generated
+make tmxduration.o
+make tm/tmxduration.c
+prev tmx.h implicit
+done tm/tmxduration.c
+meta tmxduration.o %.c>%.o tm/tmxduration.c tmxduration
+prev tm/tmxduration.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxduration.c
+done tmxduration.o generated
+make tmxfmt.o
+make tm/tmxfmt.c
+prev tmx.h implicit
+done tm/tmxfmt.c
+meta tmxfmt.o %.c>%.o tm/tmxfmt.c tmxfmt
+prev tm/tmxfmt.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxfmt.c
+done tmxfmt.o generated
+make tmxgettime.o
+make tm/tmxgettime.c
+prev tv.h implicit
+prev tmx.h implicit
+done tm/tmxgettime.c
+meta tmxgettime.o %.c>%.o tm/tmxgettime.c tmxgettime
+prev tm/tmxgettime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxgettime.c
+done tmxgettime.o generated
+make tmxleap.o
+make tm/tmxleap.c
+prev tmx.h implicit
+done tm/tmxleap.c
+meta tmxleap.o %.c>%.o tm/tmxleap.c tmxleap
+prev tm/tmxleap.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxleap.c
+done tmxleap.o generated
+make tmxmake.o
+make tm/tmxmake.c
+prev FEATURE/tmlib implicit
+prev tmx.h implicit
+done tm/tmxmake.c
+meta tmxmake.o %.c>%.o tm/tmxmake.c tmxmake
+prev tm/tmxmake.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxmake.c
+done tmxmake.o generated
+make tmxscan.o
+make tm/tmxscan.c
+prev tmx.h implicit
+done tm/tmxscan.c
+meta tmxscan.o %.c>%.o tm/tmxscan.c tmxscan
+prev tm/tmxscan.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxscan.c
+done tmxscan.o generated
+make tmxsettime.o
+make tm/tmxsettime.c
+prev tv.h implicit
+prev tmx.h implicit
+done tm/tmxsettime.c
+meta tmxsettime.o %.c>%.o tm/tmxsettime.c tmxsettime
+prev tm/tmxsettime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxsettime.c
+done tmxsettime.o generated
+make tmxsleep.o
+make tm/tmxsleep.c
+prev tv.h implicit
+prev tmx.h implicit
+done tm/tmxsleep.c
+meta tmxsleep.o %.c>%.o tm/tmxsleep.c tmxsleep
+prev tm/tmxsleep.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxsleep.c
+done tmxsleep.o generated
+make tmxtime.o
+make tm/tmxtime.c
+prev FEATURE/tmlib implicit
+prev tmx.h implicit
+done tm/tmxtime.c
+meta tmxtime.o %.c>%.o tm/tmxtime.c tmxtime
+prev tm/tmxtime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxtime.c
+done tmxtime.o generated
+make tmxtouch.o
+make tm/tmxtouch.c
+prev tv.h implicit
+prev tmx.h implicit
+done tm/tmxtouch.c
+meta tmxtouch.o %.c>%.o tm/tmxtouch.c tmxtouch
+prev tm/tmxtouch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmxtouch.c
+done tmxtouch.o generated
+make tvcmp.o
+make tm/tvcmp.c
+prev tv.h implicit
+done tm/tvcmp.c
+meta tvcmp.o %.c>%.o tm/tvcmp.c tvcmp
+prev tm/tvcmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tvcmp.c
+done tvcmp.o generated
+make tvgettime.o
+make tm/tvgettime.c
+make FEATURE/tvlib implicit
+meta FEATURE/tvlib features/%>FEATURE/% features/tvlib tvlib
+make features/tvlib
+done features/tvlib
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/tvlib
+done FEATURE/tvlib generated
+prev include/tm.h implicit
+prev tv.h implicit
+done tm/tvgettime.c
+meta tvgettime.o %.c>%.o tm/tvgettime.c tvgettime
+prev tm/tvgettime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tvgettime.c
+done tvgettime.o generated
+make tvsettime.o
+make tm/tvsettime.c
+prev FEATURE/tvlib implicit
+prev include/tm.h implicit
+prev tv.h implicit
+done tm/tvsettime.c
+meta tvsettime.o %.c>%.o tm/tvsettime.c tvsettime
+prev tm/tvsettime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tvsettime.c
+done tvsettime.o generated
+make tvsleep.o
+make tm/tvsleep.c
+prev FEATURE/tvlib implicit
+prev include/tm.h implicit
+prev tv.h implicit
+done tm/tvsleep.c
+meta tvsleep.o %.c>%.o tm/tvsleep.c tvsleep
+prev tm/tvsleep.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tvsleep.c
+done tvsleep.o generated
+make tvtouch.o
+make tm/tvtouch.c
+prev FEATURE/tvlib implicit
+prev include/error.h implicit
+prev include/times.h implicit
+prev tv.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done tm/tvtouch.c
+meta tvtouch.o %.c>%.o tm/tvtouch.c tvtouch
+prev tm/tvtouch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tvtouch.c
+done tvtouch.o generated
+make cmdarg.o
+make misc/cmdarg.c
+prev ast_api.h implicit
+prev include/proc.h implicit
+make misc/cmdlib.h implicit
+make include/cmdarg.h implicit
+prev include/error.h implicit
+done include/cmdarg.h dontcare
+done misc/cmdlib.h
+prev include/ast.h implicit
+done misc/cmdarg.c
+meta cmdarg.o %.c>%.o misc/cmdarg.c cmdarg
+prev misc/cmdarg.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/cmdarg.c
+done cmdarg.o generated
+make vecargs.o
+make vec/vecargs.c
+make include/vecargs.h implicit
+done include/vecargs.h
+prev include/ast.h implicit
+done vec/vecargs.c
+meta vecargs.o %.c>%.o vec/vecargs.c vecargs
+prev vec/vecargs.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c vec/vecargs.c
+done vecargs.o generated
+make vecfile.o
+make vec/vecfile.c
+prev include/vecargs.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done vec/vecfile.c
+meta vecfile.o %.c>%.o vec/vecfile.c vecfile
+prev vec/vecfile.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c vec/vecfile.c
+done vecfile.o generated
+make vecfree.o
+make vec/vecfree.c
+prev include/vecargs.h implicit
+prev include/ast.h implicit
+done vec/vecfree.c
+meta vecfree.o %.c>%.o vec/vecfree.c vecfree
+prev vec/vecfree.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c vec/vecfree.c
+done vecfree.o generated
+make vecload.o
+make vec/vecload.c
+prev include/vecargs.h implicit
+prev include/ast.h implicit
+done vec/vecload.c
+meta vecload.o %.c>%.o vec/vecload.c vecload
+prev vec/vecload.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c vec/vecload.c
+done vecload.o generated
+make vecstring.o
+make vec/vecstring.c
+prev include/vecargs.h implicit
+prev include/ast.h implicit
+done vec/vecstring.c
+meta vecstring.o %.c>%.o vec/vecstring.c vecstring
+prev vec/vecstring.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c vec/vecstring.c
+done vecstring.o generated
+make univdata.o
+make misc/univdata.c
+prev misc/univlib.h implicit
+done misc/univdata.c
+meta univdata.o %.c>%.o misc/univdata.c univdata
+prev misc/univdata.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PACKAGE_ast -c misc/univdata.c
+done univdata.o generated
+make touch.o
+make port/touch.c
+prev tv.h implicit
+prev include/times.h implicit
+prev include/ast.h implicit
+done port/touch.c
+meta touch.o %.c>%.o port/touch.c touch
+prev port/touch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c port/touch.c
+done touch.o generated
+make mnt.o
+make port/mnt.c
+make mnttab.h implicit
+done mnttab.h dontcare virtual
+prev std/stdio.h implicit
+prev std/stdio.h implicit
+prev include/ast_windows.h implicit
+prev include/ls.h implicit
+prev include/mnt.h implicit
+prev include/ast.h implicit
+done port/mnt.c
+meta mnt.o %.c>%.o port/mnt.c mnt
+prev port/mnt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c port/mnt.c
+done mnt.o generated
+make debug.o
+make misc/debug.c
+prev include/times.h implicit
+prev include/debug.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done misc/debug.c
+meta debug.o %.c>%.o misc/debug.c debug
+prev misc/debug.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/debug.c
+done debug.o generated
+make memccpy.o
+make comp/memccpy.c
+prev include/ast.h implicit
+done comp/memccpy.c
+meta memccpy.o %.c>%.o comp/memccpy.c memccpy
+prev comp/memccpy.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/memccpy.c
+done memccpy.o generated
+make memchr.o
+make comp/memchr.c
+prev include/ast.h implicit
+done comp/memchr.c
+meta memchr.o %.c>%.o comp/memchr.c memchr
+prev comp/memchr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/memchr.c
+done memchr.o generated
+make memcmp.o
+make comp/memcmp.c
+prev include/ast.h implicit
+done comp/memcmp.c
+meta memcmp.o %.c>%.o comp/memcmp.c memcmp
+prev comp/memcmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/memcmp.c
+done memcmp.o generated
+make memcpy.o
+make comp/memcpy.c
+prev include/ast.h implicit
+done comp/memcpy.c
+meta memcpy.o %.c>%.o comp/memcpy.c memcpy
+prev comp/memcpy.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/memcpy.c
+done memcpy.o generated
+make memdup.o
+make string/memdup.c
+prev include/ast.h implicit
+done string/memdup.c
+meta memdup.o %.c>%.o string/memdup.c memdup
+prev string/memdup.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/memdup.c
+done memdup.o generated
+make memmove.o
+make comp/memmove.c
+prev include/ast.h implicit
+done comp/memmove.c
+meta memmove.o %.c>%.o comp/memmove.c memmove
+prev comp/memmove.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/memmove.c
+done memmove.o generated
+make memset.o
+make comp/memset.c
+prev include/ast.h implicit
+done comp/memset.c
+meta memset.o %.c>%.o comp/memset.c memset
+prev comp/memset.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/memset.c
+done memset.o generated
+make mkdir.o
+make comp/mkdir.c
+prev include/error.h implicit
+prev include/wait.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/mkdir.c
+meta mkdir.o %.c>%.o comp/mkdir.c mkdir
+prev comp/mkdir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/mkdir.c
+done mkdir.o generated
+make mkfifo.o
+make comp/mkfifo.c
+prev include/error.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/mkfifo.c
+meta mkfifo.o %.c>%.o comp/mkfifo.c mkfifo
+prev comp/mkfifo.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/mkfifo.c
+done mkfifo.o generated
+make mknod.o
+make comp/mknod.c
+prev include/error.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/mknod.c
+meta mknod.o %.c>%.o comp/mknod.c mknod
+prev comp/mknod.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/mknod.c
+done mknod.o generated
+make rmdir.o
+make comp/rmdir.c
+prev include/error.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/rmdir.c
+meta rmdir.o %.c>%.o comp/rmdir.c rmdir
+prev comp/rmdir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/rmdir.c
+done rmdir.o generated
+make remove.o
+make comp/remove.c
+prev ast_map.h implicit
+prev include/ast.h implicit
+done comp/remove.c
+meta remove.o %.c>%.o comp/remove.c remove
+prev comp/remove.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/remove.c
+done remove.o generated
+make rename.o
+make comp/rename.c
+prev include/proc.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/rename.c
+meta rename.o %.c>%.o comp/rename.c rename
+prev comp/rename.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/rename.c
+done rename.o generated
+make link.o
+make comp/link.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/link.c
+meta link.o %.c>%.o comp/link.c link
+prev comp/link.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/link.c
+done link.o generated
+make unlink.o
+make comp/unlink.c
+prev include/ast.h implicit
+done comp/unlink.c
+meta unlink.o %.c>%.o comp/unlink.c unlink
+prev comp/unlink.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/unlink.c
+done unlink.o generated
+make strdup.o
+make string/strdup.c
+prev include/ast.h implicit
+done string/strdup.c
+meta strdup.o %.c>%.o string/strdup.c strdup
+prev string/strdup.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/strdup.c
+done strdup.o generated
+make strchr.o
+make comp/strchr.c
+prev include/ast.h implicit
+done comp/strchr.c
+meta strchr.o %.c>%.o comp/strchr.c strchr
+prev comp/strchr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/strchr.c
+done strchr.o generated
+make strrchr.o
+make comp/strrchr.c
+prev include/ast.h implicit
+done comp/strrchr.c
+meta strrchr.o %.c>%.o comp/strrchr.c strrchr
+prev comp/strrchr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/strrchr.c
+done strrchr.o generated
+make strstr.o
+make comp/strstr.c
+prev include/ast.h implicit
+done comp/strstr.c
+meta strstr.o %.c>%.o comp/strstr.c strstr
+prev comp/strstr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/strstr.c
+done strstr.o generated
+make strtod.o
+make comp/strtod.c
+make sfio/sfstrtof.h implicit
+prev FEATURE/float implicit
+prev sfio/sfhdr.h implicit
+done sfio/sfstrtof.h
+prev include/ast.h implicit
+done comp/strtod.c
+meta strtod.o %.c>%.o comp/strtod.c strtod
+prev comp/strtod.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/strtod.c
+done strtod.o generated
+make strtold.o
+make comp/strtold.c
+prev sfio/sfstrtof.h implicit
+prev include/ast.h implicit
+prev ast_sys.h implicit
+prev ast_lib.h implicit
+prev ast_common.h implicit
+done comp/strtold.c
+meta strtold.o %.c>%.o comp/strtold.c strtold
+prev comp/strtold.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/strtold.c
+done strtold.o generated
+make strtol.o
+make comp/strtol.c
+make string/strtoi.h implicit
+prev sfio/sfhdr.h implicit
+prev include/ast.h implicit
+done string/strtoi.h dontcare
+done comp/strtol.c
+meta strtol.o %.c>%.o comp/strtol.c strtol
+prev comp/strtol.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/strtol.c
+done strtol.o generated
+make strtoll.o
+make comp/strtoll.c
+prev string/strtoi.h implicit
+prev ast_map.h implicit
+prev include/ast.h implicit
+done comp/strtoll.c
+meta strtoll.o %.c>%.o comp/strtoll.c strtoll
+prev comp/strtoll.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/strtoll.c
+done strtoll.o generated
+make strtoul.o
+make comp/strtoul.c
+prev string/strtoi.h implicit
+done comp/strtoul.c
+meta strtoul.o %.c>%.o comp/strtoul.c strtoul
+prev comp/strtoul.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/strtoul.c
+done strtoul.o generated
+make strtoull.o
+make comp/strtoull.c
+prev string/strtoi.h implicit
+prev ast_map.h implicit
+prev include/ast.h implicit
+done comp/strtoull.c
+meta strtoull.o %.c>%.o comp/strtoull.c strtoull
+prev comp/strtoull.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c comp/strtoull.c
+done strtoull.o generated
+make strton.o
+make string/strton.c
+prev string/strtoi.h implicit
+done string/strton.c
+meta strton.o %.c>%.o string/strton.c strton
+prev string/strton.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strton.c
+done strton.o generated
+make strtonll.o
+make string/strtonll.c
+prev string/strtoi.h implicit
+done string/strtonll.c
+meta strtonll.o %.c>%.o string/strtonll.c strtonll
+prev string/strtonll.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strtonll.c
+done strtonll.o generated
+make strntod.o
+make string/strntod.c
+prev sfio/sfstrtof.h implicit
+prev include/ast.h implicit
+done string/strntod.c
+meta strntod.o %.c>%.o string/strntod.c strntod
+prev string/strntod.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strntod.c
+done strntod.o generated
+make strntold.o
+make string/strntold.c
+prev sfio/sfstrtof.h implicit
+prev include/ast.h implicit
+done string/strntold.c
+meta strntold.o %.c>%.o string/strntold.c strntold
+prev string/strntold.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strntold.c
+done strntold.o generated
+make strnton.o
+make string/strnton.c
+prev string/strtoi.h implicit
+done string/strnton.c
+meta strnton.o %.c>%.o string/strnton.c strnton
+prev string/strnton.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strnton.c
+done strnton.o generated
+make strntonll.o
+make string/strntonll.c
+prev string/strtoi.h implicit
+done string/strntonll.c
+meta strntonll.o %.c>%.o string/strntonll.c strntonll
+prev string/strntonll.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strntonll.c
+done strntonll.o generated
+make strntol.o
+make string/strntol.c
+prev string/strtoi.h implicit
+done string/strntol.c
+meta strntol.o %.c>%.o string/strntol.c strntol
+prev string/strntol.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strntol.c
+done strntol.o generated
+make strntoll.o
+make string/strntoll.c
+prev string/strtoi.h implicit
+done string/strntoll.c
+meta strntoll.o %.c>%.o string/strntoll.c strntoll
+prev string/strntoll.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strntoll.c
+done strntoll.o generated
+make strntoul.o
+make string/strntoul.c
+prev string/strtoi.h implicit
+done string/strntoul.c
+meta strntoul.o %.c>%.o string/strntoul.c strntoul
+prev string/strntoul.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strntoul.c
+done strntoul.o generated
+make strntoull.o
+make string/strntoull.c
+prev string/strtoi.h implicit
+done string/strntoull.c
+meta strntoull.o %.c>%.o string/strntoull.c strntoull
+prev string/strntoull.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istring -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strntoull.c
+done strntoull.o generated
+make strcasecmp.o
+make comp/strcasecmp.c
+prev include/ast.h implicit
+done comp/strcasecmp.c
+meta strcasecmp.o %.c>%.o comp/strcasecmp.c strcasecmp
+prev comp/strcasecmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/strcasecmp.c
+done strcasecmp.o generated
+make strncasecmp.o
+make comp/strncasecmp.c
+prev include/ast.h implicit
+done comp/strncasecmp.c
+meta strncasecmp.o %.c>%.o comp/strncasecmp.c strncasecmp
+prev comp/strncasecmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/strncasecmp.c
+done strncasecmp.o generated
+make strerror.o
+make string/strerror.c
+make FEATURE/errno implicit
+meta FEATURE/errno features/%>FEATURE/% features/errno errno
+make features/errno
+done features/errno
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/errno
+done FEATURE/errno generated
+prev port/lclib.h implicit
+done string/strerror.c
+meta strerror.o %.c>%.o string/strerror.c strerror
+prev string/strerror.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c string/strerror.c
+done strerror.o generated
+make mktemp.o
+make comp/mktemp.c
+prev ast_map.h implicit
+prev std/stdio.h implicit
+prev include/ast.h implicit
+done comp/mktemp.c
+meta mktemp.o %.c>%.o comp/mktemp.c mktemp
+prev comp/mktemp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/mktemp.c
+done mktemp.o generated
+make tmpnam.o
+make comp/tmpnam.c
+prev ast_map.h implicit
+prev std/stdio.h implicit
+prev include/ast.h implicit
+done comp/tmpnam.c
+meta tmpnam.o %.c>%.o comp/tmpnam.c tmpnam
+prev comp/tmpnam.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/tmpnam.c
+done tmpnam.o generated
+make fsync.o
+make comp/fsync.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/fsync.c
+meta fsync.o %.c>%.o comp/fsync.c fsync
+prev comp/fsync.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/fsync.c
+done fsync.o generated
+make execlp.o
+make comp/execlp.c
+prev include/ast.h implicit
+prev ast_lib.h implicit
+done comp/execlp.c
+meta execlp.o %.c>%.o comp/execlp.c execlp
+prev comp/execlp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/execlp.c
+done execlp.o generated
+make execve.o
+make comp/execve.c
+prev include/error.h implicit
+prev include/wait.h implicit
+prev sig.h implicit
+prev include/ast.h implicit
+done comp/execve.c
+meta execve.o %.c>%.o comp/execve.c execve
+prev comp/execve.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/execve.c
+done execve.o generated
+make execvp.o
+make comp/execvp.c
+prev include/ast.h implicit
+prev ast_lib.h implicit
+done comp/execvp.c
+meta execvp.o %.c>%.o comp/execvp.c execvp
+prev comp/execvp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/execvp.c
+done execvp.o generated
+make execvpe.o
+make comp/execvpe.c
+prev include/ast.h implicit
+prev ast_lib.h implicit
+done comp/execvpe.c
+meta execvpe.o %.c>%.o comp/execvpe.c execvpe
+prev comp/execvpe.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/execvpe.c
+done execvpe.o generated
+make spawnveg.o
+make comp/spawnveg.c
+make ast_vfork.h implicit
+make FEATURE/vfork
+meta FEATURE/vfork features/%>FEATURE/% features/vfork vfork
+make features/vfork
+done features/vfork
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/vfork
+done FEATURE/vfork generated
+exec - cmp 2>/dev/null -s FEATURE/vfork ast_vfork.h || { rm -f ast_vfork.h; silent test -d . || mkdir .; ${STDCP} FEATURE/vfork ast_vfork.h; }
+done ast_vfork.h dontcare generated
+prev ast_tty.h implicit
+prev sig.h implicit
+make process.h implicit
+done process.h dontcare virtual
+prev include/wait.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/spawnveg.c
+meta spawnveg.o %.c>%.o comp/spawnveg.c spawnveg
+prev comp/spawnveg.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/spawnveg.c
+done spawnveg.o generated
+make vfork.o
+make comp/vfork.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/vfork.c
+meta vfork.o %.c>%.o comp/vfork.c vfork
+prev comp/vfork.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/vfork.c
+done vfork.o generated
+make killpg.o
+make comp/killpg.c
+prev sig.h implicit
+prev include/ast.h implicit
+done comp/killpg.c
+meta killpg.o %.c>%.o comp/killpg.c killpg
+prev comp/killpg.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/killpg.c
+done killpg.o generated
+make hsearch.o
+make comp/hsearch.c
+make cdt/dthdr.h implicit
+make cdt/cdtlib.h implicit
+prev include/debug.h implicit
+make include/aso.h implicit
+prev ast_common.h implicit
+done include/aso.h dontcare
+prev include/cdt.h implicit
+make ${INSTALLROOT}/include/ast/dlldefs.h implicit
+done ${INSTALLROOT}/include/ast/dlldefs.h dontcare
+prev include/ast.h implicit
+done cdt/cdtlib.h dontcare
+done cdt/dthdr.h dontcare
+prev include/ast.h implicit
+done comp/hsearch.c
+meta hsearch.o %.c>%.o comp/hsearch.c hsearch
+prev comp/hsearch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c comp/hsearch.c
+done hsearch.o generated
+make tsearch.o
+make comp/tsearch.c
+prev cdt/dthdr.h implicit
+prev include/ast.h implicit
+done comp/tsearch.c
+meta tsearch.o %.c>%.o comp/tsearch.c tsearch
+prev comp/tsearch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c comp/tsearch.c
+done tsearch.o generated
+make getlogin.o
+make comp/getlogin.c
+prev include/ast.h implicit
+done comp/getlogin.c
+meta getlogin.o %.c>%.o comp/getlogin.c getlogin
+prev comp/getlogin.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/getlogin.c
+done getlogin.o generated
+make putenv.o
+make comp/putenv.c
+prev ast_map.h implicit
+prev include/ast.h implicit
+done comp/putenv.c
+meta putenv.o %.c>%.o comp/putenv.c putenv
+prev comp/putenv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/putenv.c
+done putenv.o generated
+make setenv.o
+make comp/setenv.c
+prev ast_map.h implicit
+prev include/ast.h implicit
+done comp/setenv.c
+meta setenv.o %.c>%.o comp/setenv.c setenv
+prev comp/setenv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/setenv.c
+done setenv.o generated
+make unsetenv.o
+make comp/unsetenv.c
+prev ast_map.h implicit
+prev include/ast.h implicit
+done comp/unsetenv.c
+meta unsetenv.o %.c>%.o comp/unsetenv.c unsetenv
+prev comp/unsetenv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/unsetenv.c
+done unsetenv.o generated
+make lstat.o
+make comp/lstat.c
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/lstat.c
+meta lstat.o %.c>%.o comp/lstat.c lstat
+prev comp/lstat.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/lstat.c
+done lstat.o generated
+make statvfs.o
+make comp/statvfs.c
+prev include/error.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/statvfs.c
+meta statvfs.o %.c>%.o comp/statvfs.c statvfs
+prev comp/statvfs.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/statvfs.c
+done statvfs.o generated
+make eaccess.o
+make comp/eaccess.c
+prev FEATURE/eaccess implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/eaccess.c
+meta eaccess.o %.c>%.o comp/eaccess.c eaccess
+prev comp/eaccess.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/eaccess.c
+done eaccess.o generated
+make gross.o
+make comp/gross.c
+make comp/gross_sgi.h implicit
+make locale_attr.h implicit
+done locale_attr.h dontcare virtual
+done comp/gross_sgi.h dontcare
+make FEATURE/hack implicit
+meta FEATURE/hack features/%>FEATURE/% features/hack hack
+make features/hack
+done features/hack
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/hack
+done FEATURE/hack generated
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/gross.c
+meta gross.o %.c>%.o comp/gross.c gross
+prev comp/gross.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/gross.c
+done gross.o generated
+make omitted.o
+make comp/omitted.c
+prev process.h implicit
+prev include/ast_windows.h implicit
+prev include/ls.h implicit
+make FEATURE/omitted implicit
+meta FEATURE/omitted features/%>FEATURE/% features/omitted omitted
+make features/omitted
+done features/omitted
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/omitted
+done FEATURE/omitted generated
+prev include/tm.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/omitted.c
+meta omitted.o %.c>%.o comp/omitted.c omitted
+prev comp/omitted.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/omitted.c
+done omitted.o generated
+make readlink.o
+make comp/readlink.c
+prev include/error.h implicit
+make comp/fakelink.h implicit
+done comp/fakelink.h dontcare
+prev include/ast.h implicit
+done comp/readlink.c
+meta readlink.o %.c>%.o comp/readlink.c readlink
+prev comp/readlink.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/readlink.c
+done readlink.o generated
+make symlink.o
+make comp/symlink.c
+prev include/error.h implicit
+prev comp/fakelink.h implicit
+prev include/ast.h implicit
+done comp/symlink.c
+meta symlink.o %.c>%.o comp/symlink.c symlink
+prev comp/symlink.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/symlink.c
+done symlink.o generated
+make getpgrp.o
+make comp/getpgrp.c
+prev include/ast_std.h implicit
+done comp/getpgrp.c
+meta getpgrp.o %.c>%.o comp/getpgrp.c getpgrp
+prev comp/getpgrp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -c comp/getpgrp.c
+done getpgrp.o generated
+make setpgid.o
+make comp/setpgid.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/setpgid.c
+meta setpgid.o %.c>%.o comp/setpgid.c setpgid
+prev comp/setpgid.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/setpgid.c
+done setpgid.o generated
+make setsid.o
+make comp/setsid.c
+prev include/error.h implicit
+prev ast_tty.h implicit
+prev include/ast.h implicit
+done comp/setsid.c
+meta setsid.o %.c>%.o comp/setsid.c setsid
+prev comp/setsid.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/setsid.c
+done setsid.o generated
+make waitpid.o
+make comp/waitpid.c
+prev include/error.h implicit
+prev sig.h implicit
+prev include/wait.h implicit
+prev include/ast.h implicit
+done comp/waitpid.c
+meta waitpid.o %.c>%.o comp/waitpid.c waitpid
+prev comp/waitpid.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/waitpid.c
+done waitpid.o generated
+make creat64.o
+make comp/creat64.c
+prev include/ast.h implicit
+done comp/creat64.c
+meta creat64.o %.c>%.o comp/creat64.c creat64
+prev comp/creat64.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/creat64.c
+done creat64.o generated
+make fcntl.o
+make comp/fcntl.c
+prev include/error.h implicit
+prev ast_tty.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/fcntl.c
+meta fcntl.o %.c>%.o comp/fcntl.c fcntl
+prev comp/fcntl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/fcntl.c
+done fcntl.o generated
+make open.o
+make comp/open.c
+prev ast_tty.h implicit
+prev include/error.h implicit
+prev include/ls.h implicit
+prev include/ast.h implicit
+done comp/open.c
+meta open.o %.c>%.o comp/open.c open
+prev comp/open.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/open.c
+done open.o generated
+make atexit.o
+make comp/atexit.c
+prev include/ast.h implicit
+done comp/atexit.c
+meta atexit.o %.c>%.o comp/atexit.c atexit
+prev comp/atexit.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/atexit.c
+done atexit.o generated
+make getdents.o
+make dir/getdents.c
+prev dir/dirlib.h implicit
+done dir/getdents.c
+meta getdents.o %.c>%.o dir/getdents.c getdents
+prev dir/getdents.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c dir/getdents.c
+done getdents.o generated
+make getwd.o
+make comp/getwd.c
+prev include/ast.h implicit
+done comp/getwd.c
+meta getwd.o %.c>%.o comp/getwd.c getwd
+prev comp/getwd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/getwd.c
+done getwd.o generated
+make dup2.o
+make comp/dup2.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/dup2.c
+meta dup2.o %.c>%.o comp/dup2.c dup2
+prev comp/dup2.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/dup2.c
+done dup2.o generated
+make errno.o
+make comp/errno.c
+prev include/ast.h implicit
+done comp/errno.c
+meta errno.o %.c>%.o comp/errno.c errno
+prev comp/errno.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/errno.c
+done errno.o generated
+make getpreroot.o
+make preroot/getpreroot.c
+prev std/stdio.h implicit
+prev include/error.h implicit
+prev include/ls.h implicit
+prev include/ast_dir.h implicit
+prev preroot.h implicit
+prev include/ast.h implicit
+done preroot/getpreroot.c
+meta getpreroot.o %.c>%.o preroot/getpreroot.c getpreroot
+prev preroot/getpreroot.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c preroot/getpreroot.c
+done getpreroot.o generated
+make ispreroot.o
+make preroot/ispreroot.c
+prev include/ls.h implicit
+prev preroot.h implicit
+prev include/ast.h implicit
+done preroot/ispreroot.c
+meta ispreroot.o %.c>%.o preroot/ispreroot.c ispreroot
+prev preroot/ispreroot.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c preroot/ispreroot.c
+done ispreroot.o generated
+make realopen.o
+make preroot/realopen.c
+prev preroot.h implicit
+prev include/ast.h implicit
+done preroot/realopen.c
+meta realopen.o %.c>%.o preroot/realopen.c realopen
+prev preroot/realopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c preroot/realopen.c
+done realopen.o generated
+make setpreroot.o
+make preroot/setpreroot.c
+prev include/option.h implicit
+prev preroot.h implicit
+prev include/ast.h implicit
+done preroot/setpreroot.c
+meta setpreroot.o %.c>%.o preroot/setpreroot.c setpreroot
+prev preroot/setpreroot.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c preroot/setpreroot.c
+done setpreroot.o generated
+make getgroups.o
+make comp/getgroups.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/getgroups.c
+meta getgroups.o %.c>%.o comp/getgroups.c getgroups
+prev comp/getgroups.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/getgroups.c
+done getgroups.o generated
+make mount.o
+make comp/mount.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/mount.c
+meta mount.o %.c>%.o comp/mount.c mount
+prev comp/mount.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/mount.c
+done mount.o generated
+make system.o
+make comp/system.c
+prev ast_map.h implicit
+prev include/proc.h implicit
+prev include/ast.h implicit
+done comp/system.c
+meta system.o %.c>%.o comp/system.c system
+prev comp/system.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/system.c
+done system.o generated
+make iblocks.o
+make port/iblocks.c
+prev include/ls.h implicit
+prev ast_param.h implicit
+prev include/ast.h implicit
+done port/iblocks.c
+meta iblocks.o %.c>%.o port/iblocks.c iblocks
+prev port/iblocks.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c port/iblocks.c
+done iblocks.o generated
+make modedata.o
+make string/modedata.c
+prev string/modelib.h implicit
+done string/modedata.c
+meta modedata.o %.c>%.o string/modedata.c modedata
+prev string/modedata.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Istring -Iinclude -Istd -D_PACKAGE_ast -c string/modedata.c
+done modedata.o generated
+make tmdata.o
+make tm/tmdata.c
+prev include/tm.h implicit
+prev include/ast.h implicit
+done tm/tmdata.c
+meta tmdata.o %.c>%.o tm/tmdata.c tmdata
+prev tm/tmdata.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c tm/tmdata.c
+done tmdata.o generated
+make memfatal.o
+make disc/memfatal.c
+prev FEATURE/vmalloc implicit
+prev include/vmalloc.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done disc/memfatal.c
+meta memfatal.o %.c>%.o disc/memfatal.c memfatal
+prev disc/memfatal.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c disc/memfatal.c
+done memfatal.o generated
+make sfkeyprintf.o
+make disc/sfkeyprintf.c
+prev ast_api.h implicit
+prev include/regex.h implicit
+make include/sfdisc.h implicit
+prev include/ast.h implicit
+done include/sfdisc.h
+prev include/ccode.h implicit
+prev include/ast.h implicit
+done disc/sfkeyprintf.c
+meta sfkeyprintf.o %.c>%.o disc/sfkeyprintf.c sfkeyprintf
+prev disc/sfkeyprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c disc/sfkeyprintf.c
+done sfkeyprintf.o generated
+make sfdcdio.o
+make disc/sfdcdio.c
+make disc/sfdchdr.h implicit
+prev include/sfdisc.h implicit
+prev sfio/sfhdr.h implicit
+done disc/sfdchdr.h
+done disc/sfdcdio.c
+meta sfdcdio.o %.c>%.o disc/sfdcdio.c sfdcdio
+prev disc/sfdcdio.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcdio.c
+done sfdcdio.o generated
+make sfdcdos.o
+make disc/sfdcdos.c
+prev disc/sfdchdr.h implicit
+done disc/sfdcdos.c
+meta sfdcdos.o %.c>%.o disc/sfdcdos.c sfdcdos
+prev disc/sfdcdos.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcdos.c
+done sfdcdos.o generated
+make sfdcfilter.o
+make disc/sfdcfilter.c
+prev disc/sfdchdr.h implicit
+done disc/sfdcfilter.c
+meta sfdcfilter.o %.c>%.o disc/sfdcfilter.c sfdcfilter
+prev disc/sfdcfilter.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcfilter.c
+done sfdcfilter.o generated
+make sfdcseekable.o
+make disc/sfdcseekable.c
+prev disc/sfdchdr.h implicit
+done disc/sfdcseekable.c
+meta sfdcseekable.o %.c>%.o disc/sfdcseekable.c sfdcseekable
+prev disc/sfdcseekable.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcseekable.c
+done sfdcseekable.o generated
+make sfdcslow.o
+make disc/sfdcslow.c
+prev disc/sfdchdr.h implicit
+done disc/sfdcslow.c
+meta sfdcslow.o %.c>%.o disc/sfdcslow.c sfdcslow
+prev disc/sfdcslow.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcslow.c
+done sfdcslow.o generated
+make sfdcsubstr.o
+make disc/sfdcsubstr.c
+prev disc/sfdchdr.h implicit
+done disc/sfdcsubstr.c
+meta sfdcsubstr.o %.c>%.o disc/sfdcsubstr.c sfdcsubstr
+prev disc/sfdcsubstr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcsubstr.c
+done sfdcsubstr.o generated
+make sfdctee.o
+make disc/sfdctee.c
+prev disc/sfdchdr.h implicit
+done disc/sfdctee.c
+meta sfdctee.o %.c>%.o disc/sfdctee.c sfdctee
+prev disc/sfdctee.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdctee.c
+done sfdctee.o generated
+make sfdcunion.o
+make disc/sfdcunion.c
+prev disc/sfdchdr.h implicit
+done disc/sfdcunion.c
+meta sfdcunion.o %.c>%.o disc/sfdcunion.c sfdcunion
+prev disc/sfdcunion.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcunion.c
+done sfdcunion.o generated
+make sfdcmore.o
+make disc/sfdcmore.c
+prev ast_tty.h implicit
+prev disc/sfdchdr.h implicit
+done disc/sfdcmore.c
+meta sfdcmore.o %.c>%.o disc/sfdcmore.c sfdcmore
+prev disc/sfdcmore.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcmore.c
+done sfdcmore.o generated
+make sfdcprefix.o
+make disc/sfdcprefix.c
+prev disc/sfdchdr.h implicit
+done disc/sfdcprefix.c
+meta sfdcprefix.o %.c>%.o disc/sfdcprefix.c sfdcprefix
+prev disc/sfdcprefix.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idisc -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c disc/sfdcprefix.c
+done sfdcprefix.o generated
+make wc.o
+make comp/wc.c
+prev std/wchar.h implicit
+prev include/ast.h implicit
+done comp/wc.c
+meta wc.o %.c>%.o comp/wc.c wc
+prev comp/wc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/wc.c
+done wc.o generated
+make wc2utf8.o
+make string/wc2utf8.c
+prev include/ast.h implicit
+done string/wc2utf8.c
+meta wc2utf8.o %.c>%.o string/wc2utf8.c wc2utf8
+prev string/wc2utf8.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c string/wc2utf8.c
+done wc2utf8.o generated
+make basename.o
+make comp/basename.c
+prev include/ast_std.h implicit
+done comp/basename.c
+meta basename.o %.c>%.o comp/basename.c basename
+prev comp/basename.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -c comp/basename.c
+done basename.o generated
+make closelog.o
+make comp/closelog.c
+make comp/sysloglib.h implicit
+make comp/syslog.h implicit
+make ast_namval.h implicit
+prev include/namval.h
+exec - cmp 2>/dev/null -s include/namval.h ast_namval.h || { rm -f ast_namval.h; silent test -d . || mkdir .; ${STDCP} include/namval.h ast_namval.h; }
+done ast_namval.h dontcare generated
+done comp/syslog.h dontcare
+done comp/sysloglib.h dontcare
+prev include/ast.h implicit
+done comp/closelog.c
+meta closelog.o %.c>%.o comp/closelog.c closelog
+prev comp/closelog.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/closelog.c
+done closelog.o generated
+make dirname.o
+make comp/dirname.c
+prev include/ast_std.h implicit
+done comp/dirname.c
+meta dirname.o %.c>%.o comp/dirname.c dirname
+prev comp/dirname.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -c comp/dirname.c
+done dirname.o generated
+make fmtmsglib.o
+make comp/fmtmsglib.c
+make comp/fmtmsg.h implicit
+done comp/fmtmsg.h dontcare
+prev include/ast.h implicit
+done comp/fmtmsglib.c
+meta fmtmsglib.o %.c>%.o comp/fmtmsglib.c fmtmsglib
+prev comp/fmtmsglib.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/fmtmsglib.c
+done fmtmsglib.o generated
+make fnmatch.o
+make comp/fnmatch.c
+make comp/fnmatch.h implicit
+prev ast_common.h implicit
+done comp/fnmatch.h
+prev include/regex.h implicit
+prev include/ast.h implicit
+prev ast_lib.h implicit
+done comp/fnmatch.c
+meta fnmatch.o %.c>%.o comp/fnmatch.c fnmatch
+prev comp/fnmatch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/fnmatch.c
+done fnmatch.o generated
+make ftw.o
+make comp/ftw.c
+make comp/ftw.h implicit
+prev include/ftwalk.h implicit
+done comp/ftw.h
+prev include/ast.h implicit
+done comp/ftw.c
+meta ftw.o %.c>%.o comp/ftw.c ftw
+prev comp/ftw.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/ftw.c
+done ftw.o generated
+make getdate.o
+make comp/getdate.c
+prev ast_map.h implicit
+prev include/tm.h implicit
+prev include/ast.h implicit
+done comp/getdate.c
+meta getdate.o %.c>%.o comp/getdate.c getdate
+prev comp/getdate.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/getdate.c
+done getdate.o generated
+make getsubopt.o
+make comp/getsubopt.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/getsubopt.c
+meta getsubopt.o %.c>%.o comp/getsubopt.c getsubopt
+prev comp/getsubopt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/getsubopt.c
+done getsubopt.o generated
+make glob.o
+make misc/glob.c
+make include/glob.h implicit
+done include/glob.h
+prev include/regex.h implicit
+prev include/error.h implicit
+prev include/ast_dir.h implicit
+make include/stak.h implicit
+prev include/stk.h implicit
+done include/stak.h
+prev include/ls.h implicit
+prev include/ast.h implicit
+done misc/glob.c
+meta glob.o %.c>%.o misc/glob.c glob
+prev misc/glob.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACKAGE_ast -c misc/glob.c
+done glob.o generated
+make nftw.o
+make comp/nftw.c
+prev comp/ftw.h implicit
+prev include/ast.h implicit
+done comp/nftw.c
+meta nftw.o %.c>%.o comp/nftw.c nftw
+prev comp/nftw.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/nftw.c
+done nftw.o generated
+make openlog.o
+make comp/openlog.c
+prev comp/sysloglib.h implicit
+prev include/ast.h implicit
+done comp/openlog.c
+meta openlog.o %.c>%.o comp/openlog.c openlog
+prev comp/openlog.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/openlog.c
+done openlog.o generated
+make re_comp.o
+make comp/re_comp.c
+prev include/regex.h implicit
+make comp/re_comp.h implicit
+done comp/re_comp.h
+prev include/ast.h implicit
+done comp/re_comp.c
+meta re_comp.o %.c>%.o comp/re_comp.c re_comp
+prev comp/re_comp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/re_comp.c
+done re_comp.o generated
+make resolvepath.o
+make comp/resolvepath.c
+prev ast_api.h implicit
+prev ast_map.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/resolvepath.c
+meta resolvepath.o %.c>%.o comp/resolvepath.c resolvepath
+prev comp/resolvepath.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/resolvepath.c
+done resolvepath.o generated
+make realpath.o
+make comp/realpath.c
+prev ast_map.h implicit
+prev include/ast.h implicit
+done comp/realpath.c
+meta realpath.o %.c>%.o comp/realpath.c realpath
+prev comp/realpath.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/realpath.c
+done realpath.o generated
+make regcmp.o
+make comp/regcmp.c
+prev align.h implicit
+prev include/regex.h implicit
+make comp/libgen.h implicit
+done comp/libgen.h
+prev include/ast.h implicit
+done comp/regcmp.c
+meta regcmp.o %.c>%.o comp/regcmp.c regcmp
+prev comp/regcmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/regcmp.c
+done regcmp.o generated
+make regexp.o
+make comp/regexp.c
+prev align.h implicit
+prev include/regex.h implicit
+make comp/regexp.h implicit
+done comp/regexp.h
+prev include/ast.h implicit
+done comp/regexp.c
+meta regexp.o %.c>%.o comp/regexp.c regexp
+prev comp/regexp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/regexp.c
+done regexp.o generated
+make setlogmask.o
+make comp/setlogmask.c
+prev comp/sysloglib.h implicit
+prev include/ast.h implicit
+done comp/setlogmask.c
+meta setlogmask.o %.c>%.o comp/setlogmask.c setlogmask
+prev comp/setlogmask.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/setlogmask.c
+done setlogmask.o generated
+make strftime.o
+make comp/strftime.c
+prev ast_map.h implicit
+prev include/tm.h implicit
+prev include/ast.h implicit
+done comp/strftime.c
+meta strftime.o %.c>%.o comp/strftime.c strftime
+prev comp/strftime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/strftime.c
+done strftime.o generated
+make strptime.o
+make comp/strptime.c
+prev ast_map.h implicit
+prev tmx.h implicit
+prev include/ast.h implicit
+done comp/strptime.c
+meta strptime.o %.c>%.o comp/strptime.c strptime
+prev comp/strptime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/strptime.c
+done strptime.o generated
+make swab.o
+make comp/swab.c
+prev include/swap.h implicit
+prev include/ast.h implicit
+done comp/swab.c
+meta swab.o %.c>%.o comp/swab.c swab
+prev comp/swab.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/swab.c
+done swab.o generated
+make syslog.o
+make comp/syslog.c
+prev std/endian.h implicit
+prev include/ls.h implicit
+prev include/tm.h implicit
+prev include/error.h implicit
+prev comp/sysloglib.h implicit
+prev include/ast.h implicit
+done comp/syslog.c
+meta syslog.o %.c>%.o comp/syslog.c syslog
+prev comp/syslog.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/syslog.c
+done syslog.o generated
+make tempnam.o
+make comp/tempnam.c
+prev std/stdio.h implicit
+prev include/ast.h implicit
+prev include/ast_std.h implicit
+done comp/tempnam.c
+meta tempnam.o %.c>%.o comp/tempnam.c tempnam
+prev comp/tempnam.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/tempnam.c
+done tempnam.o generated
+make wordexp.o
+make comp/wordexp.c
+prev include/stak.h implicit
+make comp/wordexp.h implicit
+prev ast_common.h implicit
+done comp/wordexp.h
+prev include/ast.h implicit
+done comp/wordexp.c
+meta wordexp.o %.c>%.o comp/wordexp.c wordexp
+prev comp/wordexp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/wordexp.c
+done wordexp.o generated
+make mktime.o
+make comp/mktime.c
+prev ast_map.h implicit
+prev include/tm.h implicit
+prev include/ast.h implicit
+done comp/mktime.c
+meta mktime.o %.c>%.o comp/mktime.c mktime
+prev comp/mktime.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/mktime.c
+done mktime.o generated
+make regalloc.o
+make regex/regalloc.c
+make regex/reglib.h implicit
+prev std/wctype.h implicit
+prev std/wchar.h implicit
+prev std/stdio.h implicit
+prev include/regex.h implicit
+prev include/stk.h implicit
+prev include/cdt.h implicit
+prev include/ast.h implicit
+done regex/reglib.h
+done regex/regalloc.c
+meta regalloc.o %.c>%.o regex/regalloc.c regalloc
+prev regex/regalloc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regalloc.c
+done regalloc.o generated
+make regclass.o
+make regex/regclass.c
+prev regex/reglib.h implicit
+done regex/regclass.c
+meta regclass.o %.c>%.o regex/regclass.c regclass
+prev regex/regclass.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regclass.c
+done regclass.o generated
+make regcoll.o
+make regex/regcoll.c
+prev regex/reglib.h implicit
+done regex/regcoll.c
+meta regcoll.o %.c>%.o regex/regcoll.c regcoll
+prev regex/regcoll.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regcoll.c
+done regcoll.o generated
+make regcomp.o
+make regex/regcomp.c
+prev port/lclib.h implicit
+prev regex/reglib.h implicit
+done regex/regcomp.c
+meta regcomp.o %.c>%.o regex/regcomp.c regcomp
+prev regex/regcomp.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -Icomp -Iport -Iregex -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c regex/regcomp.c
+done regcomp.o generated
+make regcache.o
+make regex/regcache.c
+prev include/regex.h implicit
+prev include/ast.h implicit
+done regex/regcache.c
+meta regcache.o %.c>%.o regex/regcache.c regcache
+prev regex/regcache.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c regex/regcache.c
+done regcache.o generated
+make regdecomp.o
+make regex/regdecomp.c
+prev regex/reglib.h implicit
+done regex/regdecomp.c
+meta regdecomp.o %.c>%.o regex/regdecomp.c regdecomp
+prev regex/regdecomp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regdecomp.c
+done regdecomp.o generated
+make regerror.o
+make regex/regerror.c
+prev regex/reglib.h implicit
+done regex/regerror.c
+meta regerror.o %.c>%.o regex/regerror.c regerror
+prev regex/regerror.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regerror.c
+done regerror.o generated
+make regexec.o
+make regex/regexec.c
+prev regex/reglib.h implicit
+done regex/regexec.c
+meta regexec.o %.c>%.o regex/regexec.c regexec
+prev regex/regexec.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regexec.c
+done regexec.o generated
+make regfatal.o
+make regex/regfatal.c
+prev include/error.h implicit
+prev regex/reglib.h implicit
+done regex/regfatal.c
+meta regfatal.o %.c>%.o regex/regfatal.c regfatal
+prev regex/regfatal.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regfatal.c
+done regfatal.o generated
+make reginit.o
+make regex/reginit.c
+prev include/ccode.h implicit
+prev regex/reglib.h implicit
+done regex/reginit.c
+meta reginit.o %.c>%.o regex/reginit.c reginit
+prev regex/reginit.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/reginit.c
+done reginit.o generated
+make regnexec.o
+make regex/regnexec.c
+prev regex/reglib.h implicit
+done regex/regnexec.c
+meta regnexec.o %.c>%.o regex/regnexec.c regnexec
+prev regex/regnexec.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regnexec.c
+done regnexec.o generated
+make regsubcomp.o
+make regex/regsubcomp.c
+prev regex/reglib.h implicit
+done regex/regsubcomp.c
+meta regsubcomp.o %.c>%.o regex/regsubcomp.c regsubcomp
+prev regex/regsubcomp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regsubcomp.c
+done regsubcomp.o generated
+make regsubexec.o
+make regex/regsubexec.c
+prev regex/reglib.h implicit
+done regex/regsubexec.c
+meta regsubexec.o %.c>%.o regex/regsubexec.c regsubexec
+prev regex/regsubexec.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regsubexec.c
+done regsubexec.o generated
+make regsub.o
+make regex/regsub.c
+prev regex/reglib.h implicit
+done regex/regsub.c
+meta regsub.o %.c>%.o regex/regsub.c regsub
+prev regex/regsub.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regsub.c
+done regsub.o generated
+make regrecord.o
+make regex/regrecord.c
+prev regex/reglib.h implicit
+done regex/regrecord.c
+meta regrecord.o %.c>%.o regex/regrecord.c regrecord
+prev regex/regrecord.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regrecord.c
+done regrecord.o generated
+make regrexec.o
+make regex/regrexec.c
+prev regex/reglib.h implicit
+done regex/regrexec.c
+meta regrexec.o %.c>%.o regex/regrexec.c regrexec
+prev regex/regrexec.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regrexec.c
+done regrexec.o generated
+make regstat.o
+make regex/regstat.c
+prev regex/reglib.h implicit
+done regex/regstat.c
+meta regstat.o %.c>%.o regex/regstat.c regstat
+prev regex/regstat.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iregex -Iinclude -Istd -D_PACKAGE_ast -c regex/regstat.c
+done regstat.o generated
+make dtclose.o
+make cdt/dtclose.c
+prev cdt/dthdr.h implicit
+done cdt/dtclose.c
+meta dtclose.o %.c>%.o cdt/dtclose.c dtclose
+prev cdt/dtclose.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dtclose.c
+done dtclose.o generated
+make dtdisc.o
+make cdt/dtdisc.c
+prev cdt/dthdr.h implicit
+done cdt/dtdisc.c
+meta dtdisc.o %.c>%.o cdt/dtdisc.c dtdisc
+prev cdt/dtdisc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dtdisc.c
+done dtdisc.o generated
+make dthash.o
+make cdt/dthash.c
+prev cdt/dthdr.h implicit
+done cdt/dthash.c
+meta dthash.o %.c>%.o cdt/dthash.c dthash
+prev cdt/dthash.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dthash.c
+done dthash.o generated
+make dtlist.o
+make cdt/dtlist.c
+prev cdt/dthdr.h implicit
+done cdt/dtlist.c
+meta dtlist.o %.c>%.o cdt/dtlist.c dtlist
+prev cdt/dtlist.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dtlist.c
+done dtlist.o generated
+make dtmethod.o
+make cdt/dtmethod.c
+prev cdt/dthdr.h implicit
+done cdt/dtmethod.c
+meta dtmethod.o %.c>%.o cdt/dtmethod.c dtmethod
+prev cdt/dtmethod.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dtmethod.c
+done dtmethod.o generated
+make dtopen.o
+make cdt/dtopen.c
+prev cdt/dthdr.h implicit
+done cdt/dtopen.c
+meta dtopen.o %.c>%.o cdt/dtopen.c dtopen
+prev cdt/dtopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dtopen.c
+done dtopen.o generated
+make dtstrhash.o
+make cdt/dtstrhash.c
+prev cdt/dthdr.h implicit
+done cdt/dtstrhash.c
+meta dtstrhash.o %.c>%.o cdt/dtstrhash.c dtstrhash
+prev cdt/dtstrhash.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dtstrhash.c
+done dtstrhash.o generated
+make dttree.o
+make cdt/dttree.c
+prev cdt/dthdr.h implicit
+done cdt/dttree.c
+meta dttree.o %.c>%.o cdt/dttree.c dttree
+prev cdt/dttree.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dttree.c
+done dttree.o generated
+make dtview.o
+make cdt/dtview.c
+prev cdt/dthdr.h implicit
+done cdt/dtview.c
+meta dtview.o %.c>%.o cdt/dtview.c dtview
+prev cdt/dtview.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dtview.c
+done dtview.o generated
+make dtwalk.o
+make cdt/dtwalk.c
+prev cdt/dthdr.h implicit
+done cdt/dtwalk.c
+meta dtwalk.o %.c>%.o cdt/dtwalk.c dtwalk
+prev cdt/dtwalk.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icdt -Icomp -Iinclude -Istd -I${INSTALLROOT}/include/ast -D_PACKAGE_ast -c cdt/dtwalk.c
+done dtwalk.o generated
+make dtnew.o
+make cdt/dtnew.c
+prev include/dt.h implicit
+done cdt/dtnew.c
+meta dtnew.o %.c>%.o cdt/dtnew.c dtnew
+prev cdt/dtnew.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c cdt/dtnew.c
+done dtnew.o generated
+make dtcomp.o
+make cdt/dtcomp.c
+prev include/cdt.h implicit
+done cdt/dtcomp.c
+meta dtcomp.o %.c>%.o cdt/dtcomp.c dtcomp
+prev cdt/dtcomp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c cdt/dtcomp.c
+done dtcomp.o generated
+make sfclose.o
+make sfio/sfclose.c
+prev sfio/sfhdr.h implicit
+done sfio/sfclose.c
+meta sfclose.o %.c>%.o sfio/sfclose.c sfclose
+prev sfio/sfclose.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfclose.c
+done sfclose.o generated
+make sfclrlock.o
+make sfio/sfclrlock.c
+prev sfio/sfhdr.h implicit
+done sfio/sfclrlock.c
+meta sfclrlock.o %.c>%.o sfio/sfclrlock.c sfclrlock
+prev sfio/sfclrlock.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfclrlock.c
+done sfclrlock.o generated
+make sfdisc.o
+make sfio/sfdisc.c
+prev sfio/sfhdr.h implicit
+done sfio/sfdisc.c
+meta sfdisc.o %.c>%.o sfio/sfdisc.c sfdisc
+prev sfio/sfdisc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfdisc.c
+done sfdisc.o generated
+make sfdlen.o
+make sfio/sfdlen.c
+prev sfio/sfhdr.h implicit
+done sfio/sfdlen.c
+meta sfdlen.o %.c>%.o sfio/sfdlen.c sfdlen
+prev sfio/sfdlen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfdlen.c
+done sfdlen.o generated
+make sfexcept.o
+make sfio/sfexcept.c
+prev sfio/sfhdr.h implicit
+done sfio/sfexcept.c
+meta sfexcept.o %.c>%.o sfio/sfexcept.c sfexcept
+prev sfio/sfexcept.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfexcept.c
+done sfexcept.o generated
+make sfgetl.o
+make sfio/sfgetl.c
+prev sfio/sfhdr.h implicit
+done sfio/sfgetl.c
+meta sfgetl.o %.c>%.o sfio/sfgetl.c sfgetl
+prev sfio/sfgetl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfgetl.c
+done sfgetl.o generated
+make sfgetu.o
+make sfio/sfgetu.c
+prev sfio/sfhdr.h implicit
+done sfio/sfgetu.c
+meta sfgetu.o %.c>%.o sfio/sfgetu.c sfgetu
+prev sfio/sfgetu.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfgetu.c
+done sfgetu.o generated
+make sfcvt.o
+make sfio/sfcvt.c
+prev sfio/sfhdr.h implicit
+prev FEATURE/standards implicit
+done sfio/sfcvt.c
+meta sfcvt.o %.c>%.o sfio/sfcvt.c sfcvt
+prev sfio/sfcvt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfcvt.c
+done sfcvt.o generated
+make sfecvt.o
+make sfio/sfecvt.c
+prev sfio/sfhdr.h implicit
+done sfio/sfecvt.c
+meta sfecvt.o %.c>%.o sfio/sfecvt.c sfecvt
+prev sfio/sfecvt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfecvt.c
+done sfecvt.o generated
+make sffcvt.o
+make sfio/sffcvt.c
+prev sfio/sfhdr.h implicit
+done sfio/sffcvt.c
+meta sffcvt.o %.c>%.o sfio/sffcvt.c sffcvt
+prev sfio/sffcvt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sffcvt.c
+done sffcvt.o generated
+make sfextern.o
+make sfio/sfextern.c
+prev sfio/sfhdr.h implicit
+done sfio/sfextern.c
+meta sfextern.o %.c>%.o sfio/sfextern.c sfextern
+prev sfio/sfextern.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfextern.c
+done sfextern.o generated
+make sffilbuf.o
+make sfio/sffilbuf.c
+prev sfio/sfhdr.h implicit
+done sfio/sffilbuf.c
+meta sffilbuf.o %.c>%.o sfio/sffilbuf.c sffilbuf
+prev sfio/sffilbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sffilbuf.c
+done sffilbuf.o generated
+make sfflsbuf.o
+make sfio/sfflsbuf.c
+prev sfio/sfhdr.h implicit
+done sfio/sfflsbuf.c
+meta sfflsbuf.o %.c>%.o sfio/sfflsbuf.c sfflsbuf
+prev sfio/sfflsbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfflsbuf.c
+done sfflsbuf.o generated
+make sfprints.o
+make sfio/sfprints.c
+prev sfio/sfhdr.h implicit
+done sfio/sfprints.c
+meta sfprints.o %.c>%.o sfio/sfprints.c sfprints
+prev sfio/sfprints.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfprints.c
+done sfprints.o generated
+make sfgetd.o
+make sfio/sfgetd.c
+prev sfio/sfhdr.h implicit
+done sfio/sfgetd.c
+meta sfgetd.o %.c>%.o sfio/sfgetd.c sfgetd
+prev sfio/sfgetd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfgetd.c
+done sfgetd.o generated
+make sfgetr.o
+make sfio/sfgetr.c
+prev sfio/sfhdr.h implicit
+done sfio/sfgetr.c
+meta sfgetr.o %.c>%.o sfio/sfgetr.c sfgetr
+prev sfio/sfgetr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfgetr.c
+done sfgetr.o generated
+make sfllen.o
+make sfio/sfllen.c
+prev sfio/sfhdr.h implicit
+done sfio/sfllen.c
+meta sfllen.o %.c>%.o sfio/sfllen.c sfllen
+prev sfio/sfllen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfllen.c
+done sfllen.o generated
+make sfmode.o
+make sfio/sfmode.c
+prev include/wait.h implicit
+prev sig.h implicit
+prev sfio/sfhdr.h implicit
+done sfio/sfmode.c
+meta sfmode.o %.c>%.o sfio/sfmode.c sfmode
+prev sfio/sfmode.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfmode.c
+done sfmode.o generated
+make sfmove.o
+make sfio/sfmove.c
+prev sfio/sfhdr.h implicit
+done sfio/sfmove.c
+meta sfmove.o %.c>%.o sfio/sfmove.c sfmove
+prev sfio/sfmove.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfmove.c
+done sfmove.o generated
+make sfnew.o
+make sfio/sfnew.c
+prev sfio/sfhdr.h implicit
+done sfio/sfnew.c
+meta sfnew.o %.c>%.o sfio/sfnew.c sfnew
+prev sfio/sfnew.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfnew.c
+done sfnew.o generated
+make sfpkrd.o
+make sfio/sfpkrd.c
+prev sfio/sfhdr.h implicit
+done sfio/sfpkrd.c
+meta sfpkrd.o %.c>%.o sfio/sfpkrd.c sfpkrd
+prev sfio/sfpkrd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfpkrd.c
+done sfpkrd.o generated
+make sfnotify.o
+make sfio/sfnotify.c
+prev sfio/sfhdr.h implicit
+done sfio/sfnotify.c
+meta sfnotify.o %.c>%.o sfio/sfnotify.c sfnotify
+prev sfio/sfnotify.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfnotify.c
+done sfnotify.o generated
+make sfnputc.o
+make sfio/sfnputc.c
+prev sfio/sfhdr.h implicit
+done sfio/sfnputc.c
+meta sfnputc.o %.c>%.o sfio/sfnputc.c sfnputc
+prev sfio/sfnputc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfnputc.c
+done sfnputc.o generated
+make sfopen.o
+make sfio/sfopen.c
+prev sfio/sfhdr.h implicit
+done sfio/sfopen.c
+meta sfopen.o %.c>%.o sfio/sfopen.c sfopen
+prev sfio/sfopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfopen.c
+done sfopen.o generated
+make sfpeek.o
+make sfio/sfpeek.c
+prev sfio/sfhdr.h implicit
+done sfio/sfpeek.c
+meta sfpeek.o %.c>%.o sfio/sfpeek.c sfpeek
+prev sfio/sfpeek.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfpeek.c
+done sfpeek.o generated
+make sfpoll.o
+make sfio/sfpoll.c
+prev sfio/sfhdr.h implicit
+done sfio/sfpoll.c
+meta sfpoll.o %.c>%.o sfio/sfpoll.c sfpoll
+prev sfio/sfpoll.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfpoll.c
+done sfpoll.o generated
+make sfpool.o
+make sfio/sfpool.c
+prev sfio/sfhdr.h implicit
+done sfio/sfpool.c
+meta sfpool.o %.c>%.o sfio/sfpool.c sfpool
+prev sfio/sfpool.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfpool.c
+done sfpool.o generated
+make sfpopen.o
+make sfio/sfpopen.c
+prev include/proc.h implicit
+prev sfio/sfhdr.h implicit
+done sfio/sfpopen.c
+meta sfpopen.o %.c>%.o sfio/sfpopen.c sfpopen
+prev sfio/sfpopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfpopen.c
+done sfpopen.o generated
+make sfprintf.o
+make sfio/sfprintf.c
+prev sfio/sfhdr.h implicit
+done sfio/sfprintf.c
+meta sfprintf.o %.c>%.o sfio/sfprintf.c sfprintf
+prev sfio/sfprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS.FORCE} ${mam_cc_NOPROTECT} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfprintf.c
+done sfprintf.o generated
+make sfputd.o
+make sfio/sfputd.c
+prev sfio/sfhdr.h implicit
+done sfio/sfputd.c
+meta sfputd.o %.c>%.o sfio/sfputd.c sfputd
+prev sfio/sfputd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfputd.c
+done sfputd.o generated
+make sfputl.o
+make sfio/sfputl.c
+prev sfio/sfhdr.h implicit
+done sfio/sfputl.c
+meta sfputl.o %.c>%.o sfio/sfputl.c sfputl
+prev sfio/sfputl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfputl.c
+done sfputl.o generated
+make sfputr.o
+make sfio/sfputr.c
+prev sfio/sfhdr.h implicit
+done sfio/sfputr.c
+meta sfputr.o %.c>%.o sfio/sfputr.c sfputr
+prev sfio/sfputr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfputr.c
+done sfputr.o generated
+make sfputu.o
+make sfio/sfputu.c
+prev sfio/sfhdr.h implicit
+done sfio/sfputu.c
+meta sfputu.o %.c>%.o sfio/sfputu.c sfputu
+prev sfio/sfputu.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfputu.c
+done sfputu.o generated
+make sfrd.o
+make sfio/sfrd.c
+prev sfio/sfhdr.h implicit
+done sfio/sfrd.c
+meta sfrd.o %.c>%.o sfio/sfrd.c sfrd
+prev sfio/sfrd.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfrd.c
+done sfrd.o generated
+make sfread.o
+make sfio/sfread.c
+prev sfio/sfhdr.h implicit
+done sfio/sfread.c
+meta sfread.o %.c>%.o sfio/sfread.c sfread
+prev sfio/sfread.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfread.c
+done sfread.o generated
+make sfreserve.o
+make sfio/sfreserve.c
+prev sfio/sfhdr.h implicit
+done sfio/sfreserve.c
+meta sfreserve.o %.c>%.o sfio/sfreserve.c sfreserve
+prev sfio/sfreserve.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfreserve.c
+done sfreserve.o generated
+make sfscanf.o
+make sfio/sfscanf.c
+prev sfio/sfhdr.h implicit
+done sfio/sfscanf.c
+meta sfscanf.o %.c>%.o sfio/sfscanf.c sfscanf
+prev sfio/sfscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS.FORCE} ${mam_cc_NOPROTECT} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfscanf.c
+done sfscanf.o generated
+make sfseek.o
+make sfio/sfseek.c
+prev sfio/sfhdr.h implicit
+done sfio/sfseek.c
+meta sfseek.o %.c>%.o sfio/sfseek.c sfseek
+prev sfio/sfseek.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfseek.c
+done sfseek.o generated
+make sfset.o
+make sfio/sfset.c
+prev sfio/sfhdr.h implicit
+done sfio/sfset.c
+meta sfset.o %.c>%.o sfio/sfset.c sfset
+prev sfio/sfset.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfset.c
+done sfset.o generated
+make sfsetbuf.o
+make sfio/sfsetbuf.c
+prev sfio/sfhdr.h implicit
+done sfio/sfsetbuf.c
+meta sfsetbuf.o %.c>%.o sfio/sfsetbuf.c sfsetbuf
+prev sfio/sfsetbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfsetbuf.c
+done sfsetbuf.o generated
+make sfsetfd.o
+make sfio/sfsetfd.c
+prev sfio/sfhdr.h implicit
+done sfio/sfsetfd.c
+meta sfsetfd.o %.c>%.o sfio/sfsetfd.c sfsetfd
+prev sfio/sfsetfd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfsetfd.c
+done sfsetfd.o generated
+make sfsize.o
+make sfio/sfsize.c
+prev sfio/sfhdr.h implicit
+done sfio/sfsize.c
+meta sfsize.o %.c>%.o sfio/sfsize.c sfsize
+prev sfio/sfsize.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfsize.c
+done sfsize.o generated
+make sfsk.o
+make sfio/sfsk.c
+prev sfio/sfhdr.h implicit
+done sfio/sfsk.c
+meta sfsk.o %.c>%.o sfio/sfsk.c sfsk
+prev sfio/sfsk.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfsk.c
+done sfsk.o generated
+make sfstack.o
+make sfio/sfstack.c
+prev sfio/sfhdr.h implicit
+done sfio/sfstack.c
+meta sfstack.o %.c>%.o sfio/sfstack.c sfstack
+prev sfio/sfstack.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfstack.c
+done sfstack.o generated
+make sfstrtod.o
+make sfio/sfstrtod.c
+prev sfio/sfhdr.h implicit
+done sfio/sfstrtod.c
+meta sfstrtod.o %.c>%.o sfio/sfstrtod.c sfstrtod
+prev sfio/sfstrtod.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfstrtod.c
+done sfstrtod.o generated
+make sfsync.o
+make sfio/sfsync.c
+prev sfio/sfhdr.h implicit
+done sfio/sfsync.c
+meta sfsync.o %.c>%.o sfio/sfsync.c sfsync
+prev sfio/sfsync.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfsync.c
+done sfsync.o generated
+make sfswap.o
+make sfio/sfswap.c
+prev sfio/sfhdr.h implicit
+done sfio/sfswap.c
+meta sfswap.o %.c>%.o sfio/sfswap.c sfswap
+prev sfio/sfswap.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfswap.c
+done sfswap.o generated
+make sftable.o
+make sfio/sftable.c
+make FEATURE/sfinit implicit
+meta FEATURE/sfinit features/%.c>FEATURE/% features/sfinit.c sfinit
+make features/sfinit.c
+prev FEATURE/float implicit
+prev FEATURE/common implicit
+done features/sfinit.c
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Istd ${LDFLAGS} ' run features/sfinit.c
+done FEATURE/sfinit generated
+prev FEATURE/float implicit
+prev sfio/sfhdr.h implicit
+done sfio/sftable.c
+meta sftable.o %.c>%.o sfio/sftable.c sftable
+prev sfio/sftable.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sftable.c
+done sftable.o generated
+make sftell.o
+make sfio/sftell.c
+prev sfio/sfhdr.h implicit
+done sfio/sftell.c
+meta sftell.o %.c>%.o sfio/sftell.c sftell
+prev sfio/sftell.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sftell.c
+done sftell.o generated
+make sftmp.o
+make sfio/sftmp.c
+prev sfio/sfhdr.h implicit
+done sfio/sftmp.c
+meta sftmp.o %.c>%.o sfio/sftmp.c sftmp
+prev sfio/sftmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sftmp.c
+done sftmp.o generated
+make sfungetc.o
+make sfio/sfungetc.c
+prev sfio/sfhdr.h implicit
+done sfio/sfungetc.c
+meta sfungetc.o %.c>%.o sfio/sfungetc.c sfungetc
+prev sfio/sfungetc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfungetc.c
+done sfungetc.o generated
+make sfvprintf.o
+make sfio/sfvprintf.c
+prev include/ccode.h implicit
+prev sfio/sfhdr.h implicit
+done sfio/sfvprintf.c
+meta sfvprintf.o %.c>%.o sfio/sfvprintf.c sfvprintf
+prev sfio/sfvprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${mam_cc_NOPROTECT} ${DEBUG+-DDEBUG=${DEBUG}} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfvprintf.c
+done sfvprintf.o generated
+make sfvscanf.o
+make sfio/sfvscanf.c
+prev sfio/sfstrtof.h implicit
+prev sfio/sfhdr.h implicit
+done sfio/sfvscanf.c
+meta sfvscanf.o %.c>%.o sfio/sfvscanf.c sfvscanf
+prev sfio/sfvscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS.FORCE} ${mam_cc_NOPROTECT} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfvscanf.c
+done sfvscanf.o generated
+make sfwr.o
+make sfio/sfwr.c
+prev sfio/sfhdr.h implicit
+done sfio/sfwr.c
+meta sfwr.o %.c>%.o sfio/sfwr.c sfwr
+prev sfio/sfwr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfwr.c
+done sfwr.o generated
+make sfwrite.o
+make sfio/sfwrite.c
+prev sfio/sfhdr.h implicit
+done sfio/sfwrite.c
+meta sfwrite.o %.c>%.o sfio/sfwrite.c sfwrite
+prev sfio/sfwrite.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfwrite.c
+done sfwrite.o generated
+make sfpurge.o
+make sfio/sfpurge.c
+prev sfio/sfhdr.h implicit
+done sfio/sfpurge.c
+meta sfpurge.o %.c>%.o sfio/sfpurge.c sfpurge
+prev sfio/sfpurge.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfpurge.c
+done sfpurge.o generated
+make sfraise.o
+make sfio/sfraise.c
+prev sfio/sfhdr.h implicit
+done sfio/sfraise.c
+meta sfraise.o %.c>%.o sfio/sfraise.c sfraise
+prev sfio/sfraise.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfraise.c
+done sfraise.o generated
+make sfwalk.o
+make sfio/sfwalk.c
+prev sfio/sfhdr.h implicit
+done sfio/sfwalk.c
+meta sfwalk.o %.c>%.o sfio/sfwalk.c sfwalk
+prev sfio/sfwalk.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfwalk.c
+done sfwalk.o generated
+make sfgetm.o
+make sfio/sfgetm.c
+prev sfio/sfhdr.h implicit
+done sfio/sfgetm.c
+meta sfgetm.o %.c>%.o sfio/sfgetm.c sfgetm
+prev sfio/sfgetm.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfgetm.c
+done sfgetm.o generated
+make sfmutex.o
+make sfio/sfmutex.c
+prev sfio/sfhdr.h implicit
+done sfio/sfmutex.c
+meta sfmutex.o %.c>%.o sfio/sfmutex.c sfmutex
+prev sfio/sfmutex.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfmutex.c
+done sfmutex.o generated
+make sfputm.o
+make sfio/sfputm.c
+prev sfio/sfhdr.h implicit
+done sfio/sfputm.c
+meta sfputm.o %.c>%.o sfio/sfputm.c sfputm
+prev sfio/sfputm.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfputm.c
+done sfputm.o generated
+make sfresize.o
+make sfio/sfresize.c
+prev sfio/sfhdr.h implicit
+done sfio/sfresize.c
+meta sfresize.o %.c>%.o sfio/sfresize.c sfresize
+prev sfio/sfresize.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/sfresize.c
+done sfresize.o generated
+make _sfclrerr.o
+make sfio/_sfclrerr.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfclrerr.c
+meta _sfclrerr.o %.c>%.o sfio/_sfclrerr.c _sfclrerr
+prev sfio/_sfclrerr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfclrerr.c
+done _sfclrerr.o generated
+make _sfeof.o
+make sfio/_sfeof.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfeof.c
+meta _sfeof.o %.c>%.o sfio/_sfeof.c _sfeof
+prev sfio/_sfeof.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfeof.c
+done _sfeof.o generated
+make _sferror.o
+make sfio/_sferror.c
+prev sfio/sfhdr.h implicit
+done sfio/_sferror.c
+meta _sferror.o %.c>%.o sfio/_sferror.c _sferror
+prev sfio/_sferror.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sferror.c
+done _sferror.o generated
+make _sffileno.o
+make sfio/_sffileno.c
+prev sfio/sfhdr.h implicit
+done sfio/_sffileno.c
+meta _sffileno.o %.c>%.o sfio/_sffileno.c _sffileno
+prev sfio/_sffileno.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sffileno.c
+done _sffileno.o generated
+make _sfopen.o
+make sfio/_sfopen.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfopen.c
+meta _sfopen.o %.c>%.o sfio/_sfopen.c _sfopen
+prev sfio/_sfopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfopen.c
+done _sfopen.o generated
+make _sfstacked.o
+make sfio/_sfstacked.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfstacked.c
+meta _sfstacked.o %.c>%.o sfio/_sfstacked.c _sfstacked
+prev sfio/_sfstacked.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfstacked.c
+done _sfstacked.o generated
+make _sfvalue.o
+make sfio/_sfvalue.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfvalue.c
+meta _sfvalue.o %.c>%.o sfio/_sfvalue.c _sfvalue
+prev sfio/_sfvalue.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfvalue.c
+done _sfvalue.o generated
+make _sfgetc.o
+make sfio/_sfgetc.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfgetc.c
+meta _sfgetc.o %.c>%.o sfio/_sfgetc.c _sfgetc
+prev sfio/_sfgetc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfgetc.c
+done _sfgetc.o generated
+make _sfgetl.o
+make sfio/_sfgetl.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfgetl.c
+meta _sfgetl.o %.c>%.o sfio/_sfgetl.c _sfgetl
+prev sfio/_sfgetl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfgetl.c
+done _sfgetl.o generated
+make _sfgetl2.o
+make sfio/_sfgetl2.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfgetl2.c
+meta _sfgetl2.o %.c>%.o sfio/_sfgetl2.c _sfgetl2
+prev sfio/_sfgetl2.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfgetl2.c
+done _sfgetl2.o generated
+make _sfgetu.o
+make sfio/_sfgetu.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfgetu.c
+meta _sfgetu.o %.c>%.o sfio/_sfgetu.c _sfgetu
+prev sfio/_sfgetu.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfgetu.c
+done _sfgetu.o generated
+make _sfgetu2.o
+make sfio/_sfgetu2.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfgetu2.c
+meta _sfgetu2.o %.c>%.o sfio/_sfgetu2.c _sfgetu2
+prev sfio/_sfgetu2.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfgetu2.c
+done _sfgetu2.o generated
+make _sfdlen.o
+make sfio/_sfdlen.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfdlen.c
+meta _sfdlen.o %.c>%.o sfio/_sfdlen.c _sfdlen
+prev sfio/_sfdlen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfdlen.c
+done _sfdlen.o generated
+make _sfllen.o
+make sfio/_sfllen.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfllen.c
+meta _sfllen.o %.c>%.o sfio/_sfllen.c _sfllen
+prev sfio/_sfllen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfllen.c
+done _sfllen.o generated
+make _sfslen.o
+make sfio/_sfslen.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfslen.c
+meta _sfslen.o %.c>%.o sfio/_sfslen.c _sfslen
+prev sfio/_sfslen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfslen.c
+done _sfslen.o generated
+make _sfulen.o
+make sfio/_sfulen.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfulen.c
+meta _sfulen.o %.c>%.o sfio/_sfulen.c _sfulen
+prev sfio/_sfulen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfulen.c
+done _sfulen.o generated
+make _sfputc.o
+make sfio/_sfputc.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfputc.c
+meta _sfputc.o %.c>%.o sfio/_sfputc.c _sfputc
+prev sfio/_sfputc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfputc.c
+done _sfputc.o generated
+make _sfputd.o
+make sfio/_sfputd.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfputd.c
+meta _sfputd.o %.c>%.o sfio/_sfputd.c _sfputd
+prev sfio/_sfputd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfputd.c
+done _sfputd.o generated
+make _sfputl.o
+make sfio/_sfputl.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfputl.c
+meta _sfputl.o %.c>%.o sfio/_sfputl.c _sfputl
+prev sfio/_sfputl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfputl.c
+done _sfputl.o generated
+make _sfputm.o
+make sfio/_sfputm.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfputm.c
+meta _sfputm.o %.c>%.o sfio/_sfputm.c _sfputm
+prev sfio/_sfputm.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfputm.c
+done _sfputm.o generated
+make _sfputu.o
+make sfio/_sfputu.c
+prev sfio/sfhdr.h implicit
+done sfio/_sfputu.c
+meta _sfputu.o %.c>%.o sfio/_sfputu.c _sfputu
+prev sfio/_sfputu.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c sfio/_sfputu.c
+done _sfputu.o generated
+make clearerr.o
+make stdio/clearerr.c
+make stdio/stdhdr.h implicit
+prev std/stdio.h implicit
+prev sfio/sfhdr.h implicit
+done stdio/stdhdr.h
+done stdio/clearerr.c
+meta clearerr.o %.c>%.o stdio/clearerr.c clearerr
+prev stdio/clearerr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/clearerr.c
+done clearerr.o generated
+make fclose.o
+make stdio/fclose.c
+prev stdio/stdhdr.h implicit
+done stdio/fclose.c
+meta fclose.o %.c>%.o stdio/fclose.c fclose
+prev stdio/fclose.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fclose.c
+done fclose.o generated
+make fdopen.o
+make stdio/fdopen.c
+prev stdio/stdhdr.h implicit
+done stdio/fdopen.c
+meta fdopen.o %.c>%.o stdio/fdopen.c fdopen
+prev stdio/fdopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fdopen.c
+done fdopen.o generated
+make feof.o
+make stdio/feof.c
+prev stdio/stdhdr.h implicit
+done stdio/feof.c
+meta feof.o %.c>%.o stdio/feof.c feof
+prev stdio/feof.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/feof.c
+done feof.o generated
+make ferror.o
+make stdio/ferror.c
+prev stdio/stdhdr.h implicit
+done stdio/ferror.c
+meta ferror.o %.c>%.o stdio/ferror.c ferror
+prev stdio/ferror.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/ferror.c
+done ferror.o generated
+make fflush.o
+make stdio/fflush.c
+prev stdio/stdhdr.h implicit
+done stdio/fflush.c
+meta fflush.o %.c>%.o stdio/fflush.c fflush
+prev stdio/fflush.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fflush.c
+done fflush.o generated
+make fgetc.o
+make stdio/fgetc.c
+prev stdio/stdhdr.h implicit
+done stdio/fgetc.c
+meta fgetc.o %.c>%.o stdio/fgetc.c fgetc
+prev stdio/fgetc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fgetc.c
+done fgetc.o generated
+make fgetpos.o
+make stdio/fgetpos.c
+prev stdio/stdhdr.h implicit
+done stdio/fgetpos.c
+meta fgetpos.o %.c>%.o stdio/fgetpos.c fgetpos
+prev stdio/fgetpos.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fgetpos.c
+done fgetpos.o generated
+make fgets.o
+make stdio/fgets.c
+prev stdio/stdhdr.h implicit
+done stdio/fgets.c
+meta fgets.o %.c>%.o stdio/fgets.c fgets
+prev stdio/fgets.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fgets.c
+done fgets.o generated
+make fileno.o
+make stdio/fileno.c
+prev stdio/stdhdr.h implicit
+done stdio/fileno.c
+meta fileno.o %.c>%.o stdio/fileno.c fileno
+prev stdio/fileno.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fileno.c
+done fileno.o generated
+make fopen.o
+make stdio/fopen.c
+prev stdio/stdhdr.h implicit
+done stdio/fopen.c
+meta fopen.o %.c>%.o stdio/fopen.c fopen
+prev stdio/fopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fopen.c
+done fopen.o generated
+make fprintf.o
+make stdio/fprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/fprintf.c
+meta fprintf.o %.c>%.o stdio/fprintf.c fprintf
+prev stdio/fprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fprintf.c
+done fprintf.o generated
+make fpurge.o
+make stdio/fpurge.c
+prev stdio/stdhdr.h implicit
+done stdio/fpurge.c
+meta fpurge.o %.c>%.o stdio/fpurge.c fpurge
+prev stdio/fpurge.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fpurge.c
+done fpurge.o generated
+make fputc.o
+make stdio/fputc.c
+prev stdio/stdhdr.h implicit
+done stdio/fputc.c
+meta fputc.o %.c>%.o stdio/fputc.c fputc
+prev stdio/fputc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fputc.c
+done fputc.o generated
+make fputs.o
+make stdio/fputs.c
+prev stdio/stdhdr.h implicit
+done stdio/fputs.c
+meta fputs.o %.c>%.o stdio/fputs.c fputs
+prev stdio/fputs.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fputs.c
+done fputs.o generated
+make fread.o
+make stdio/fread.c
+prev stdio/stdhdr.h implicit
+done stdio/fread.c
+meta fread.o %.c>%.o stdio/fread.c fread
+prev stdio/fread.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fread.c
+done fread.o generated
+make freopen.o
+make stdio/freopen.c
+prev stdio/stdhdr.h implicit
+done stdio/freopen.c
+meta freopen.o %.c>%.o stdio/freopen.c freopen
+prev stdio/freopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/freopen.c
+done freopen.o generated
+make fscanf.o
+make stdio/fscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/fscanf.c
+meta fscanf.o %.c>%.o stdio/fscanf.c fscanf
+prev stdio/fscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fscanf.c
+done fscanf.o generated
+make fseek.o
+make stdio/fseek.c
+prev stdio/stdhdr.h implicit
+done stdio/fseek.c
+meta fseek.o %.c>%.o stdio/fseek.c fseek
+prev stdio/fseek.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fseek.c
+done fseek.o generated
+make fseeko.o
+make stdio/fseeko.c
+prev stdio/stdhdr.h implicit
+done stdio/fseeko.c
+meta fseeko.o %.c>%.o stdio/fseeko.c fseeko
+prev stdio/fseeko.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fseeko.c
+done fseeko.o generated
+make fsetpos.o
+make stdio/fsetpos.c
+prev stdio/stdhdr.h implicit
+done stdio/fsetpos.c
+meta fsetpos.o %.c>%.o stdio/fsetpos.c fsetpos
+prev stdio/fsetpos.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fsetpos.c
+done fsetpos.o generated
+make ftell.o
+make stdio/ftell.c
+prev stdio/stdhdr.h implicit
+done stdio/ftell.c
+meta ftell.o %.c>%.o stdio/ftell.c ftell
+prev stdio/ftell.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/ftell.c
+done ftell.o generated
+make ftello.o
+make stdio/ftello.c
+prev stdio/stdhdr.h implicit
+done stdio/ftello.c
+meta ftello.o %.c>%.o stdio/ftello.c ftello
+prev stdio/ftello.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/ftello.c
+done ftello.o generated
+make fwrite.o
+make stdio/fwrite.c
+prev stdio/stdhdr.h implicit
+done stdio/fwrite.c
+meta fwrite.o %.c>%.o stdio/fwrite.c fwrite
+prev stdio/fwrite.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fwrite.c
+done fwrite.o generated
+make flockfile.o
+make stdio/flockfile.c
+prev stdio/stdhdr.h implicit
+done stdio/flockfile.c
+meta flockfile.o %.c>%.o stdio/flockfile.c flockfile
+prev stdio/flockfile.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/flockfile.c
+done flockfile.o generated
+make ftrylockfile.o
+make stdio/ftrylockfile.c
+prev stdio/stdhdr.h implicit
+done stdio/ftrylockfile.c
+meta ftrylockfile.o %.c>%.o stdio/ftrylockfile.c ftrylockfile
+prev stdio/ftrylockfile.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/ftrylockfile.c
+done ftrylockfile.o generated
+make funlockfile.o
+make stdio/funlockfile.c
+prev stdio/stdhdr.h implicit
+done stdio/funlockfile.c
+meta funlockfile.o %.c>%.o stdio/funlockfile.c funlockfile
+prev stdio/funlockfile.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/funlockfile.c
+done funlockfile.o generated
+make getc.o
+make stdio/getc.c
+prev stdio/stdhdr.h implicit
+done stdio/getc.c
+meta getc.o %.c>%.o stdio/getc.c getc
+prev stdio/getc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/getc.c
+done getc.o generated
+make getchar.o
+make stdio/getchar.c
+prev stdio/stdhdr.h implicit
+done stdio/getchar.c
+meta getchar.o %.c>%.o stdio/getchar.c getchar
+prev stdio/getchar.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/getchar.c
+done getchar.o generated
+make getw.o
+make stdio/getw.c
+prev stdio/stdhdr.h implicit
+done stdio/getw.c
+meta getw.o %.c>%.o stdio/getw.c getw
+prev stdio/getw.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/getw.c
+done getw.o generated
+make pclose.o
+make stdio/pclose.c
+prev stdio/stdhdr.h implicit
+done stdio/pclose.c
+meta pclose.o %.c>%.o stdio/pclose.c pclose
+prev stdio/pclose.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/pclose.c
+done pclose.o generated
+make popen.o
+make stdio/popen.c
+prev stdio/stdhdr.h implicit
+done stdio/popen.c
+meta popen.o %.c>%.o stdio/popen.c popen
+prev stdio/popen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/popen.c
+done popen.o generated
+make printf.o
+make stdio/printf.c
+prev stdio/stdhdr.h implicit
+done stdio/printf.c
+meta printf.o %.c>%.o stdio/printf.c printf
+prev stdio/printf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/printf.c
+done printf.o generated
+make putc.o
+make stdio/putc.c
+prev stdio/stdhdr.h implicit
+done stdio/putc.c
+meta putc.o %.c>%.o stdio/putc.c putc
+prev stdio/putc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/putc.c
+done putc.o generated
+make putchar.o
+make stdio/putchar.c
+prev stdio/stdhdr.h implicit
+done stdio/putchar.c
+meta putchar.o %.c>%.o stdio/putchar.c putchar
+prev stdio/putchar.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/putchar.c
+done putchar.o generated
+make puts.o
+make stdio/puts.c
+prev stdio/stdhdr.h implicit
+done stdio/puts.c
+meta puts.o %.c>%.o stdio/puts.c puts
+prev stdio/puts.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/puts.c
+done puts.o generated
+make putw.o
+make stdio/putw.c
+prev stdio/stdhdr.h implicit
+done stdio/putw.c
+meta putw.o %.c>%.o stdio/putw.c putw
+prev stdio/putw.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/putw.c
+done putw.o generated
+make rewind.o
+make stdio/rewind.c
+prev stdio/stdhdr.h implicit
+done stdio/rewind.c
+meta rewind.o %.c>%.o stdio/rewind.c rewind
+prev stdio/rewind.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/rewind.c
+done rewind.o generated
+make scanf.o
+make stdio/scanf.c
+prev stdio/stdhdr.h implicit
+done stdio/scanf.c
+meta scanf.o %.c>%.o stdio/scanf.c scanf
+prev stdio/scanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/scanf.c
+done scanf.o generated
+make setbuf.o
+make stdio/setbuf.c
+prev stdio/stdhdr.h implicit
+done stdio/setbuf.c
+meta setbuf.o %.c>%.o stdio/setbuf.c setbuf
+prev stdio/setbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/setbuf.c
+done setbuf.o generated
+make setbuffer.o
+make stdio/setbuffer.c
+prev stdio/stdhdr.h implicit
+done stdio/setbuffer.c
+meta setbuffer.o %.c>%.o stdio/setbuffer.c setbuffer
+prev stdio/setbuffer.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/setbuffer.c
+done setbuffer.o generated
+make setlinebuf.o
+make stdio/setlinebuf.c
+prev stdio/stdhdr.h implicit
+done stdio/setlinebuf.c
+meta setlinebuf.o %.c>%.o stdio/setlinebuf.c setlinebuf
+prev stdio/setlinebuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/setlinebuf.c
+done setlinebuf.o generated
+make setvbuf.o
+make stdio/setvbuf.c
+prev stdio/stdhdr.h implicit
+done stdio/setvbuf.c
+meta setvbuf.o %.c>%.o stdio/setvbuf.c setvbuf
+prev stdio/setvbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/setvbuf.c
+done setvbuf.o generated
+make snprintf.o
+make stdio/snprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/snprintf.c
+meta snprintf.o %.c>%.o stdio/snprintf.c snprintf
+prev stdio/snprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/snprintf.c
+done snprintf.o generated
+make sprintf.o
+make stdio/sprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/sprintf.c
+meta sprintf.o %.c>%.o stdio/sprintf.c sprintf
+prev stdio/sprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/sprintf.c
+done sprintf.o generated
+make sscanf.o
+make stdio/sscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/sscanf.c
+meta sscanf.o %.c>%.o stdio/sscanf.c sscanf
+prev stdio/sscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/sscanf.c
+done sscanf.o generated
+make asprintf.o
+make stdio/asprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/asprintf.c
+meta asprintf.o %.c>%.o stdio/asprintf.c asprintf
+prev stdio/asprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/asprintf.c
+done asprintf.o generated
+make vasprintf.o
+make stdio/vasprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/vasprintf.c
+meta vasprintf.o %.c>%.o stdio/vasprintf.c vasprintf
+prev stdio/vasprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vasprintf.c
+done vasprintf.o generated
+make tmpfile.o
+make stdio/tmpfile.c
+prev stdio/stdhdr.h implicit
+done stdio/tmpfile.c
+meta tmpfile.o %.c>%.o stdio/tmpfile.c tmpfile
+prev stdio/tmpfile.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/tmpfile.c
+done tmpfile.o generated
+make ungetc.o
+make stdio/ungetc.c
+prev stdio/stdhdr.h implicit
+done stdio/ungetc.c
+meta ungetc.o %.c>%.o stdio/ungetc.c ungetc
+prev stdio/ungetc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/ungetc.c
+done ungetc.o generated
+make vfprintf.o
+make stdio/vfprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/vfprintf.c
+meta vfprintf.o %.c>%.o stdio/vfprintf.c vfprintf
+prev stdio/vfprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vfprintf.c
+done vfprintf.o generated
+make vfscanf.o
+make stdio/vfscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/vfscanf.c
+meta vfscanf.o %.c>%.o stdio/vfscanf.c vfscanf
+prev stdio/vfscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vfscanf.c
+done vfscanf.o generated
+make vprintf.o
+make stdio/vprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/vprintf.c
+meta vprintf.o %.c>%.o stdio/vprintf.c vprintf
+prev stdio/vprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vprintf.c
+done vprintf.o generated
+make vscanf.o
+make stdio/vscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/vscanf.c
+meta vscanf.o %.c>%.o stdio/vscanf.c vscanf
+prev stdio/vscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vscanf.c
+done vscanf.o generated
+make vsnprintf.o
+make stdio/vsnprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/vsnprintf.c
+meta vsnprintf.o %.c>%.o stdio/vsnprintf.c vsnprintf
+prev stdio/vsnprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vsnprintf.c
+done vsnprintf.o generated
+make vsprintf.o
+make stdio/vsprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/vsprintf.c
+meta vsprintf.o %.c>%.o stdio/vsprintf.c vsprintf
+prev stdio/vsprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vsprintf.c
+done vsprintf.o generated
+make vsscanf.o
+make stdio/vsscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/vsscanf.c
+meta vsscanf.o %.c>%.o stdio/vsscanf.c vsscanf
+prev stdio/vsscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vsscanf.c
+done vsscanf.o generated
+make _doprnt.o
+make stdio/_doprnt.c
+prev stdio/stdhdr.h implicit
+done stdio/_doprnt.c
+meta _doprnt.o %.c>%.o stdio/_doprnt.c _doprnt
+prev stdio/_doprnt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_doprnt.c
+done _doprnt.o generated
+make _doscan.o
+make stdio/_doscan.c
+prev stdio/stdhdr.h implicit
+done stdio/_doscan.c
+meta _doscan.o %.c>%.o stdio/_doscan.c _doscan
+prev stdio/_doscan.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_doscan.c
+done _doscan.o generated
+make _filbuf.o
+make stdio/_filbuf.c
+prev stdio/stdhdr.h implicit
+done stdio/_filbuf.c
+meta _filbuf.o %.c>%.o stdio/_filbuf.c _filbuf
+prev stdio/_filbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_filbuf.c
+done _filbuf.o generated
+make _flsbuf.o
+make stdio/_flsbuf.c
+prev stdio/stdhdr.h implicit
+done stdio/_flsbuf.c
+meta _flsbuf.o %.c>%.o stdio/_flsbuf.c _flsbuf
+prev stdio/_flsbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_flsbuf.c
+done _flsbuf.o generated
+make _stdfun.o
+make stdio/_stdfun.c
+prev stdio/stdhdr.h implicit
+make FEATURE/uwin implicit
+meta FEATURE/uwin features/%>FEATURE/% features/uwin uwin
+make features/uwin
+done features/uwin
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/uwin
+done FEATURE/uwin dontcare generated
+prev uwin.h implicit
+prev include/ast_windows.h implicit
+prev include/ast.h implicit
+done stdio/_stdfun.c
+meta _stdfun.o %.c>%.o stdio/_stdfun.c _stdfun
+prev stdio/_stdfun.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdfun.c
+done _stdfun.o generated
+make _stdopen.o
+make stdio/_stdopen.c
+prev stdio/stdhdr.h implicit
+done stdio/_stdopen.c
+meta _stdopen.o %.c>%.o stdio/_stdopen.c _stdopen
+prev stdio/_stdopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdopen.c
+done _stdopen.o generated
+make _stdprintf.o
+make stdio/_stdprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/_stdprintf.c
+meta _stdprintf.o %.c>%.o stdio/_stdprintf.c _stdprintf
+prev stdio/_stdprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdprintf.c
+done _stdprintf.o generated
+make _stdscanf.o
+make stdio/_stdscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/_stdscanf.c
+meta _stdscanf.o %.c>%.o stdio/_stdscanf.c _stdscanf
+prev stdio/_stdscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdscanf.c
+done _stdscanf.o generated
+make _stdsprnt.o
+make stdio/_stdsprnt.c
+prev stdio/stdhdr.h implicit
+done stdio/_stdsprnt.c
+meta _stdsprnt.o %.c>%.o stdio/_stdsprnt.c _stdsprnt
+prev stdio/_stdsprnt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdsprnt.c
+done _stdsprnt.o generated
+make _stdvbuf.o
+make stdio/_stdvbuf.c
+prev stdio/stdhdr.h implicit
+done stdio/_stdvbuf.c
+meta _stdvbuf.o %.c>%.o stdio/_stdvbuf.c _stdvbuf
+prev stdio/_stdvbuf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdvbuf.c
+done _stdvbuf.o generated
+make _stdvsnprnt.o
+make stdio/_stdvsnprnt.c
+prev stdio/stdhdr.h implicit
+done stdio/_stdvsnprnt.c
+meta _stdvsnprnt.o %.c>%.o stdio/_stdvsnprnt.c _stdvsnprnt
+prev stdio/_stdvsnprnt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdvsnprnt.c
+done _stdvsnprnt.o generated
+make _stdvsprnt.o
+make stdio/_stdvsprnt.c
+prev stdio/stdhdr.h implicit
+done stdio/_stdvsprnt.c
+meta _stdvsprnt.o %.c>%.o stdio/_stdvsprnt.c _stdvsprnt
+prev stdio/_stdvsprnt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdvsprnt.c
+done _stdvsprnt.o generated
+make _stdvsscn.o
+make stdio/_stdvsscn.c
+prev stdio/stdhdr.h implicit
+done stdio/_stdvsscn.c
+meta _stdvsscn.o %.c>%.o stdio/_stdvsscn.c _stdvsscn
+prev stdio/_stdvsscn.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/_stdvsscn.c
+done _stdvsscn.o generated
+make fgetwc.o
+make stdio/fgetwc.c
+prev stdio/stdhdr.h implicit
+done stdio/fgetwc.c
+meta fgetwc.o %.c>%.o stdio/fgetwc.c fgetwc
+prev stdio/fgetwc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fgetwc.c
+done fgetwc.o generated
+make fwprintf.o
+make stdio/fwprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/fwprintf.c
+meta fwprintf.o %.c>%.o stdio/fwprintf.c fwprintf
+prev stdio/fwprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fwprintf.c
+done fwprintf.o generated
+make putwchar.o
+make stdio/putwchar.c
+prev ast_wchar.h implicit
+prev stdio/stdhdr.h implicit
+done stdio/putwchar.c
+meta putwchar.o %.c>%.o stdio/putwchar.c putwchar
+prev stdio/putwchar.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/putwchar.c
+done putwchar.o generated
+make vfwscanf.o
+make stdio/vfwscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/vfwscanf.c
+meta vfwscanf.o %.c>%.o stdio/vfwscanf.c vfwscanf
+prev stdio/vfwscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vfwscanf.c
+done vfwscanf.o generated
+make wprintf.o
+make stdio/wprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/wprintf.c
+meta wprintf.o %.c>%.o stdio/wprintf.c wprintf
+prev stdio/wprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/wprintf.c
+done wprintf.o generated
+make fgetws.o
+make stdio/fgetws.c
+prev stdio/stdhdr.h implicit
+done stdio/fgetws.c
+meta fgetws.o %.c>%.o stdio/fgetws.c fgetws
+prev stdio/fgetws.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fgetws.c
+done fgetws.o generated
+make fwscanf.o
+make stdio/fwscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/fwscanf.c
+meta fwscanf.o %.c>%.o stdio/fwscanf.c fwscanf
+prev stdio/fwscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fwscanf.c
+done fwscanf.o generated
+make swprintf.o
+make stdio/swprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/swprintf.c
+meta swprintf.o %.c>%.o stdio/swprintf.c swprintf
+prev stdio/swprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/swprintf.c
+done swprintf.o generated
+make vswprintf.o
+make stdio/vswprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/vswprintf.c
+meta vswprintf.o %.c>%.o stdio/vswprintf.c vswprintf
+prev stdio/vswprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vswprintf.c
+done vswprintf.o generated
+make wscanf.o
+make stdio/wscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/wscanf.c
+meta wscanf.o %.c>%.o stdio/wscanf.c wscanf
+prev stdio/wscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/wscanf.c
+done wscanf.o generated
+make fputwc.o
+make stdio/fputwc.c
+prev stdio/stdhdr.h implicit
+done stdio/fputwc.c
+meta fputwc.o %.c>%.o stdio/fputwc.c fputwc
+prev stdio/fputwc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fputwc.c
+done fputwc.o generated
+make getwc.o
+make stdio/getwc.c
+prev ast_wchar.h implicit
+prev stdio/stdhdr.h implicit
+done stdio/getwc.c
+meta getwc.o %.c>%.o stdio/getwc.c getwc
+prev stdio/getwc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/getwc.c
+done getwc.o generated
+make swscanf.o
+make stdio/swscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/swscanf.c
+meta swscanf.o %.c>%.o stdio/swscanf.c swscanf
+prev stdio/swscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/swscanf.c
+done swscanf.o generated
+make vswscanf.o
+make stdio/vswscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/vswscanf.c
+meta vswscanf.o %.c>%.o stdio/vswscanf.c vswscanf
+prev stdio/vswscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vswscanf.c
+done vswscanf.o generated
+make fputws.o
+make stdio/fputws.c
+prev stdio/stdhdr.h implicit
+done stdio/fputws.c
+meta fputws.o %.c>%.o stdio/fputws.c fputws
+prev stdio/fputws.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fputws.c
+done fputws.o generated
+make getwchar.o
+make stdio/getwchar.c
+prev ast_wchar.h implicit
+prev stdio/stdhdr.h implicit
+done stdio/getwchar.c
+meta getwchar.o %.c>%.o stdio/getwchar.c getwchar
+prev stdio/getwchar.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/getwchar.c
+done getwchar.o generated
+make ungetwc.o
+make stdio/ungetwc.c
+prev stdio/stdhdr.h implicit
+done stdio/ungetwc.c
+meta ungetwc.o %.c>%.o stdio/ungetwc.c ungetwc
+prev stdio/ungetwc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/ungetwc.c
+done ungetwc.o generated
+make vwprintf.o
+make stdio/vwprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/vwprintf.c
+meta vwprintf.o %.c>%.o stdio/vwprintf.c vwprintf
+prev stdio/vwprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vwprintf.c
+done vwprintf.o generated
+make fwide.o
+make stdio/fwide.c
+prev stdio/stdhdr.h implicit
+done stdio/fwide.c
+meta fwide.o %.c>%.o stdio/fwide.c fwide
+prev stdio/fwide.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fwide.c
+done fwide.o generated
+make putwc.o
+make stdio/putwc.c
+prev ast_wchar.h implicit
+prev stdio/stdhdr.h implicit
+done stdio/putwc.c
+meta putwc.o %.c>%.o stdio/putwc.c putwc
+prev stdio/putwc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/putwc.c
+done putwc.o generated
+make vfwprintf.o
+make stdio/vfwprintf.c
+prev stdio/stdhdr.h implicit
+done stdio/vfwprintf.c
+meta vfwprintf.o %.c>%.o stdio/vfwprintf.c vfwprintf
+prev stdio/vfwprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vfwprintf.c
+done vfwprintf.o generated
+make vwscanf.o
+make stdio/vwscanf.c
+prev stdio/stdhdr.h implicit
+done stdio/vwscanf.c
+meta vwscanf.o %.c>%.o stdio/vwscanf.c vwscanf
+prev stdio/vwscanf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/vwscanf.c
+done vwscanf.o generated
+make stdio_c99.o
+make stdio/stdio_c99.c
+prev stdio/stdhdr.h implicit
+done stdio/stdio_c99.c
+meta stdio_c99.o %.c>%.o stdio/stdio_c99.c stdio_c99
+prev stdio/stdio_c99.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/stdio_c99.c
+done stdio_c99.o generated
+make fcloseall.o
+make stdio/fcloseall.c
+prev stdio/stdhdr.h implicit
+done stdio/fcloseall.c
+meta fcloseall.o %.c>%.o stdio/fcloseall.c fcloseall
+prev stdio/fcloseall.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fcloseall.c
+done fcloseall.o generated
+make fmemopen.o
+make stdio/fmemopen.c
+prev stdio/stdhdr.h implicit
+done stdio/fmemopen.c
+meta fmemopen.o %.c>%.o stdio/fmemopen.c fmemopen
+prev stdio/fmemopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/fmemopen.c
+done fmemopen.o generated
+make getdelim.o
+make stdio/getdelim.c
+prev stdio/stdhdr.h implicit
+done stdio/getdelim.c
+meta getdelim.o %.c>%.o stdio/getdelim.c getdelim
+prev stdio/getdelim.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/getdelim.c
+done getdelim.o generated
+make getline.o
+make stdio/getline.c
+prev stdio/stdhdr.h implicit
+done stdio/getline.c
+meta getline.o %.c>%.o stdio/getline.c getline
+prev stdio/getline.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Istdio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c stdio/getline.c
+done getline.o generated
+make frexp.o
+make comp/frexp.c
+prev FEATURE/float implicit
+prev include/ast.h implicit
+done comp/frexp.c
+meta frexp.o %.c>%.o comp/frexp.c frexp
+prev comp/frexp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/frexp.c
+done frexp.o generated
+make frexpl.o
+make comp/frexpl.c
+prev FEATURE/float implicit
+prev include/ast.h implicit
+done comp/frexpl.c
+meta frexpl.o %.c>%.o comp/frexpl.c frexpl
+prev comp/frexpl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/frexpl.c
+done frexpl.o generated
+make astcopy.o
+make port/astcopy.c
+prev include/ls.h implicit
+make ast_mmap.h implicit
+prev FEATURE/mmap
+exec - cmp 2>/dev/null -s FEATURE/mmap ast_mmap.h || { rm -f ast_mmap.h; silent test -d . || mkdir .; ${STDCP} FEATURE/mmap ast_mmap.h; }
+done ast_mmap.h generated
+prev include/ast.h implicit
+done port/astcopy.c
+meta astcopy.o %.c>%.o port/astcopy.c astcopy
+prev port/astcopy.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c port/astcopy.c
+done astcopy.o generated
+make astconf.o
+make port/astconf.c
+make FEATURE/libpath implicit
+meta FEATURE/libpath features/%.sh>FEATURE/% features/libpath.sh libpath
+make features/libpath.sh
+done features/libpath.sh
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/libpath.sh
+done FEATURE/libpath generated
+make conftab.h implicit
+done conftab.h
+prev include/ls.h implicit
+prev include/proc.h implicit
+prev include/regex.h implicit
+prev include/fs3d.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+prev misc/univlib.h implicit
+done port/astconf.c
+meta astconf.o %.c>%.o port/astconf.c astconf
+prev port/astconf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D__OBSOLETE__=20120101 -DCONF_LIBSUFFIX=\""${mam_cc_SUFFIX_DYNAMIC-${mam_cc_SUFFIX_SHARED}}"\" -DCONF_LIBPREFIX=\""${mam_cc_PREFIX_DYNAMIC-${mam_cc_PREFIX_SHARED}}"\" -DHOSTTYPE=\""${mam_cc_HOSTTYPE}"\" -D_PACKAGE_ast -c port/astconf.c
+done astconf.o generated
+make astdynamic.o
+make port/astdynamic.c
+prev sfio/sfhdr.h implicit
+prev include/ast_windows.h implicit
+prev include/ast.h implicit
+prev include/sfio_t.h implicit
+done port/astdynamic.c
+meta astdynamic.o %.c>%.o port/astdynamic.c astdynamic
+prev port/astdynamic.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iport -Isfio -Iinclude -Istd -I${INSTALLROOT}/include -D_PACKAGE_ast -c port/astdynamic.c
+done astdynamic.o generated
+make astlicense.o
+make port/astlicense.c
+prev include/ast.h implicit
+done port/astlicense.c
+meta astlicense.o %.c>%.o port/astlicense.c astlicense
+prev port/astlicense.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c port/astlicense.c
+done astlicense.o generated
+make astquery.o
+make port/astquery.c
+prev include/error.h implicit
+prev include/ast.h implicit
+done port/astquery.c
+meta astquery.o %.c>%.o port/astquery.c astquery
+prev port/astquery.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c port/astquery.c
+done astquery.o generated
+make astwinsize.o
+make port/astwinsize.c
+make jioctl.h implicit
+done jioctl.h dontcare virtual
+prev ast_tty.h implicit
+prev include/ast.h implicit
+done port/astwinsize.c
+meta astwinsize.o %.c>%.o port/astwinsize.c astwinsize
+prev port/astwinsize.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c port/astwinsize.c
+done astwinsize.o generated
+make conftab.o
+make conftab.c
+prev conftab.h implicit
+prev FEATURE/param implicit
+prev FEATURE/common implicit
+prev FEATURE/standards implicit
+done conftab.c
+meta conftab.o %.c>%.o conftab.c conftab
+prev conftab.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -c conftab.c
+done conftab.o generated
+make aststatic.o
+make port/aststatic.c
+prev include/ast.h implicit
+done port/aststatic.c
+meta aststatic.o %.c>%.o port/aststatic.c aststatic
+prev port/aststatic.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c port/aststatic.c
+done aststatic.o generated
+make getopt.o
+make comp/getopt.c
+prev include/option.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+done comp/getopt.c
+meta getopt.o %.c>%.o comp/getopt.c getopt
+prev comp/getopt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/getopt.c
+done getopt.o generated
+make getoptl.o
+make comp/getoptl.c
+prev comp/getopt.h implicit
+prev include/option.h implicit
+prev include/error.h implicit
+prev include/ast_getopt.h implicit
+prev include/ast.h implicit
+done comp/getoptl.c
+meta getoptl.o %.c>%.o comp/getoptl.c getoptl
+prev comp/getoptl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c comp/getoptl.c
+done getoptl.o generated
+make aso.o
+make aso/aso.c
+prev std/stdio.h implicit
+prev FEATURE/aso implicit
+make aso/asohdr.h implicit
+prev include/aso.h implicit
+make FEATURE/asometh implicit
+meta FEATURE/asometh features/%>FEATURE/% features/asometh asometh
+make features/asometh
+done features/asometh
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/asometh
+done FEATURE/asometh dontcare generated
+make include/fnv.h implicit
+prev ast_common.h implicit
+done include/fnv.h dontcare
+prev include/error.h implicit
+prev include/ast.h implicit
+done aso/asohdr.h
+done aso/aso.c
+meta aso.o %.c>%.o aso/aso.c aso
+prev aso/aso.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iaso -Icomp -Iinclude -Istd -D_PACKAGE_ast -c aso/aso.c
+done aso.o generated
+make asolock.o
+make aso/asolock.c
+prev aso/asohdr.h implicit
+done aso/asolock.c
+meta asolock.o %.c>%.o aso/asolock.c asolock
+prev aso/asolock.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iaso -Icomp -Iinclude -Istd -D_PACKAGE_ast -c aso/asolock.c
+done asolock.o generated
+make asometh.o
+make aso/asometh.c
+prev aso/asohdr.h implicit
+done aso/asometh.c
+meta asometh.o %.c>%.o aso/asometh.c asometh
+prev aso/asometh.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iaso -Icomp -Iinclude -Istd -D_PACKAGE_ast -c aso/asometh.c
+done asometh.o generated
+make asorelax.o
+make aso/asorelax.c
+prev tv.h implicit
+prev aso/asohdr.h implicit
+done aso/asorelax.c
+meta asorelax.o %.c>%.o aso/asorelax.c asorelax
+prev aso/asorelax.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iaso -Icomp -Iinclude -Istd -D_PACKAGE_ast -c aso/asorelax.c
+done asorelax.o generated
+make aso-sem.o
+make aso/aso-sem.c
+prev aso/asohdr.h implicit
+done aso/aso-sem.c
+meta aso-sem.o %.c>%.o aso/aso-sem.c aso-sem
+prev aso/aso-sem.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iaso -Icomp -Iinclude -Istd -D_PACKAGE_ast -c aso/aso-sem.c
+done aso-sem.o generated
+make aso-fcntl.o
+make aso/aso-fcntl.c
+prev aso/asohdr.h implicit
+done aso/aso-fcntl.c
+meta aso-fcntl.o %.c>%.o aso/aso-fcntl.c aso-fcntl
+prev aso/aso-fcntl.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iaso -Icomp -Iinclude -Istd -D_PACKAGE_ast -c aso/aso-fcntl.c
+done aso-fcntl.o generated
+make vmbest.o
+make vmalloc/vmbest.c
+prev windows.h implicit
+prev include/ast_windows.h implicit
+make vmalloc/vmhdr.h implicit
+prev include/vmalloc.h implicit
+prev include/ast_windows.h implicit
+prev include/aso.h implicit
+prev FEATURE/vmalloc implicit
+prev ast_common.h implicit
+prev include/ast.h implicit
+done vmalloc/vmhdr.h dontcare
+done vmalloc/vmbest.c
+meta vmbest.o %.c>%.o vmalloc/vmbest.c vmbest
+prev vmalloc/vmbest.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmbest.c
+done vmbest.o generated
+make vmclear.o
+make vmalloc/vmclear.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmclear.c
+meta vmclear.o %.c>%.o vmalloc/vmclear.c vmclear
+prev vmalloc/vmclear.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmclear.c
+done vmclear.o generated
+make vmclose.o
+make vmalloc/vmclose.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmclose.c
+meta vmclose.o %.c>%.o vmalloc/vmclose.c vmclose
+prev vmalloc/vmclose.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmclose.c
+done vmclose.o generated
+make vmdcheap.o
+make vmalloc/vmdcheap.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmdcheap.c
+meta vmdcheap.o %.c>%.o vmalloc/vmdcheap.c vmdcheap
+prev vmalloc/vmdcheap.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmdcheap.c
+done vmdcheap.o generated
+make vmdebug.o
+make vmalloc/vmdebug.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmdebug.c
+meta vmdebug.o %.c>%.o vmalloc/vmdebug.c vmdebug
+prev vmalloc/vmdebug.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmdebug.c
+done vmdebug.o generated
+make vmdisc.o
+make vmalloc/vmdisc.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmdisc.c
+meta vmdisc.o %.c>%.o vmalloc/vmdisc.c vmdisc
+prev vmalloc/vmdisc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmdisc.c
+done vmdisc.o generated
+make vmexit.o
+make vmalloc/vmexit.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmexit.c
+meta vmexit.o %.c>%.o vmalloc/vmexit.c vmexit
+prev vmalloc/vmexit.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmexit.c
+done vmexit.o generated
+make vmlast.o
+make vmalloc/vmlast.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmlast.c
+meta vmlast.o %.c>%.o vmalloc/vmlast.c vmlast
+prev vmalloc/vmlast.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmlast.c
+done vmlast.o generated
+make vmopen.o
+make vmalloc/vmopen.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmopen.c
+meta vmopen.o %.c>%.o vmalloc/vmopen.c vmopen
+prev vmalloc/vmopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmopen.c
+done vmopen.o generated
+make vmpool.o
+make vmalloc/vmpool.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmpool.c
+meta vmpool.o %.c>%.o vmalloc/vmpool.c vmpool
+prev vmalloc/vmpool.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmpool.c
+done vmpool.o generated
+make vmprivate.o
+make vmalloc/vmprivate.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmprivate.c
+meta vmprivate.o %.c>%.o vmalloc/vmprivate.c vmprivate
+prev vmalloc/vmprivate.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmprivate.c
+done vmprivate.o generated
+make vmprofile.o
+make vmalloc/vmprofile.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmprofile.c
+meta vmprofile.o %.c>%.o vmalloc/vmprofile.c vmprofile
+prev vmalloc/vmprofile.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmprofile.c
+done vmprofile.o generated
+make vmregion.o
+make vmalloc/vmregion.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmregion.c
+meta vmregion.o %.c>%.o vmalloc/vmregion.c vmregion
+prev vmalloc/vmregion.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmregion.c
+done vmregion.o generated
+make vmsegment.o
+make vmalloc/vmsegment.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmsegment.c
+meta vmsegment.o %.c>%.o vmalloc/vmsegment.c vmsegment
+prev vmalloc/vmsegment.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmsegment.c
+done vmsegment.o generated
+make vmset.o
+make vmalloc/vmset.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmset.c
+meta vmset.o %.c>%.o vmalloc/vmset.c vmset
+prev vmalloc/vmset.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmset.c
+done vmset.o generated
+make vmstat.o
+make vmalloc/vmstat.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmstat.c
+meta vmstat.o %.c>%.o vmalloc/vmstat.c vmstat
+prev vmalloc/vmstat.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmstat.c
+done vmstat.o generated
+make vmstrdup.o
+make vmalloc/vmstrdup.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmstrdup.c
+meta vmstrdup.o %.c>%.o vmalloc/vmstrdup.c vmstrdup
+prev vmalloc/vmstrdup.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmstrdup.c
+done vmstrdup.o generated
+make vmtrace.o
+make vmalloc/vmtrace.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmtrace.c
+meta vmtrace.o %.c>%.o vmalloc/vmtrace.c vmtrace
+prev vmalloc/vmtrace.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmtrace.c
+done vmtrace.o generated
+make vmwalk.o
+make vmalloc/vmwalk.c
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmwalk.c
+meta vmwalk.o %.c>%.o vmalloc/vmwalk.c vmwalk
+prev vmalloc/vmwalk.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmwalk.c
+done vmwalk.o generated
+make vmmopen.o
+make vmalloc/vmmopen.c
+prev std/stdio.h implicit
+prev vmalloc/vmhdr.h implicit
+done vmalloc/vmmopen.c
+meta vmmopen.o %.c>%.o vmalloc/vmmopen.c vmmopen
+prev vmalloc/vmmopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmmopen.c
+done vmmopen.o generated
+make malloc.o
+make vmalloc/malloc.c
+prev include/ast_windows.h implicit
+prev std/stdio.h implicit
+prev vmalloc/vmhdr.h implicit
+done vmalloc/malloc.c
+meta malloc.o %.c>%.o vmalloc/malloc.c malloc
+prev vmalloc/malloc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Ivmalloc -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/malloc.c
+done malloc.o generated
+make vmgetmem.o
+make vmalloc/vmgetmem.c
+prev include/vmalloc.h implicit
+done vmalloc/vmgetmem.c
+meta vmgetmem.o %.c>%.o vmalloc/vmgetmem.c vmgetmem
+prev vmalloc/vmgetmem.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c vmalloc/vmgetmem.c
+done vmgetmem.o generated
+make a64l.o
+make uwin/a64l.c
+prev FEATURE/uwin implicit
+done uwin/a64l.c
+meta a64l.o %.c>%.o uwin/a64l.c a64l
+prev uwin/a64l.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Istd -c uwin/a64l.c
+done a64l.o generated
+make acosh.o
+make uwin/acosh.c
+make uwin/mathimpl.h implicit
+done uwin/mathimpl.h dontcare
+prev FEATURE/uwin implicit
+done uwin/acosh.c
+meta acosh.o %.c>%.o uwin/acosh.c acosh
+prev uwin/acosh.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/acosh.c
+done acosh.o generated
+make asinh.o
+make uwin/asinh.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/asinh.c
+meta asinh.o %.c>%.o uwin/asinh.c asinh
+prev uwin/asinh.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/asinh.c
+done asinh.o generated
+make atanh.o
+make uwin/atanh.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/atanh.c
+meta atanh.o %.c>%.o uwin/atanh.c atanh
+prev uwin/atanh.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/atanh.c
+done atanh.o generated
+make cbrt.o
+make uwin/cbrt.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/cbrt.c
+meta cbrt.o %.c>%.o uwin/cbrt.c cbrt
+prev uwin/cbrt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/cbrt.c
+done cbrt.o generated
+make crypt.o
+make uwin/crypt.c
+prev std/stdio.h implicit
+prev FEATURE/uwin implicit
+done uwin/crypt.c
+meta crypt.o %.c>%.o uwin/crypt.c crypt
+prev uwin/crypt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -c uwin/crypt.c
+done crypt.o generated
+make erf.o
+make uwin/erf.c
+prev uwin/mathimpl.h implicit
+make ieee_libm.h implicit
+done ieee_libm.h dontcare virtual
+prev FEATURE/uwin implicit
+done uwin/erf.c
+meta erf.o %.c>%.o uwin/erf.c erf
+prev uwin/erf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/erf.c
+done erf.o generated
+make err.o
+make uwin/err.c
+prev windows.h implicit
+prev include/error.h implicit
+prev include/ast.h implicit
+prev FEATURE/uwin implicit
+done uwin/err.c
+meta err.o %.c>%.o uwin/err.c err
+prev uwin/err.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c uwin/err.c
+done err.o generated
+make exp.o
+make uwin/exp.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/exp.c
+meta exp.o %.c>%.o uwin/exp.c exp
+prev uwin/exp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/exp.c
+done exp.o generated
+make exp__E.o
+make uwin/exp__E.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/exp__E.c
+meta exp__E.o %.c>%.o uwin/exp__E.c exp__E
+prev uwin/exp__E.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/exp__E.c
+done exp__E.o generated
+make expm1.o
+make uwin/expm1.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/expm1.c
+meta expm1.o %.c>%.o uwin/expm1.c expm1
+prev uwin/expm1.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/expm1.c
+done expm1.o generated
+make gamma.o
+make uwin/gamma.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/gamma.c
+meta gamma.o %.c>%.o uwin/gamma.c gamma
+prev uwin/gamma.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/gamma.c
+done gamma.o generated
+make getpass.o
+make uwin/getpass.c
+prev include/ast.h implicit
+prev FEATURE/uwin implicit
+done uwin/getpass.c
+meta getpass.o %.c>%.o uwin/getpass.c getpass
+prev uwin/getpass.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c uwin/getpass.c
+done getpass.o generated
+make lgamma.o
+make uwin/lgamma.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/lgamma.c
+meta lgamma.o %.c>%.o uwin/lgamma.c lgamma
+prev uwin/lgamma.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/lgamma.c
+done lgamma.o generated
+make log.o
+make uwin/log.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/log.c
+meta log.o %.c>%.o uwin/log.c log
+prev uwin/log.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/log.c
+done log.o generated
+make log1p.o
+make uwin/log1p.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/log1p.c
+meta log1p.o %.c>%.o uwin/log1p.c log1p
+prev uwin/log1p.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/log1p.c
+done log1p.o generated
+make log__L.o
+make uwin/log__L.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/log__L.c
+meta log__L.o %.c>%.o uwin/log__L.c log__L
+prev uwin/log__L.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/log__L.c
+done log__L.o generated
+make rand48.o
+make uwin/rand48.c
+prev FEATURE/uwin implicit
+done uwin/rand48.c
+meta rand48.o %.c>%.o uwin/rand48.c rand48
+prev uwin/rand48.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Istd -c uwin/rand48.c
+done rand48.o generated
+make random.o
+make uwin/random.c
+prev FEATURE/uwin implicit
+done uwin/random.c
+meta random.o %.c>%.o uwin/random.c random
+prev uwin/random.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Istd -c uwin/random.c
+done random.o generated
+make rcmd.o
+make uwin/rcmd.c
+prev std/nl_types.h implicit
+make uwin/rlib.h implicit
+prev std/endian.h implicit
+prev std/stdio.h implicit
+prev std/stdio.h implicit
+prev include/ast_std.h implicit
+done uwin/rlib.h dontcare
+prev FEATURE/uwin implicit
+done uwin/rcmd.c
+meta rcmd.o %.c>%.o uwin/rcmd.c rcmd
+prev uwin/rcmd.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iuwin -Iinclude -Istd -c uwin/rcmd.c
+done rcmd.o generated
+make rint.o
+make uwin/rint.c
+prev FEATURE/uwin implicit
+done uwin/rint.c
+meta rint.o %.c>%.o uwin/rint.c rint
+prev uwin/rint.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Istd -c uwin/rint.c
+done rint.o generated
+make support.o
+make uwin/support.c
+prev uwin/mathimpl.h implicit
+prev FEATURE/uwin implicit
+done uwin/support.c
+meta support.o %.c>%.o uwin/support.c support
+prev uwin/support.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iuwin -Istd -c uwin/support.c
+done support.o generated
+make sfstrtmp.o
+make disc/sfstrtmp.c
+prev include/ast.h implicit
+prev include/sfio_t.h implicit
+done disc/sfstrtmp.c
+meta sfstrtmp.o %.c>%.o disc/sfstrtmp.c sfstrtmp
+prev disc/sfstrtmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D__OBSOLETE__=20120101 -D_PACKAGE_ast -c disc/sfstrtmp.c
+done sfstrtmp.o generated
+make spawn.o
+make obsolete/spawn.c
+prev include/error.h implicit
+prev include/ast.h implicit
+prev ast_lib.h implicit
+done obsolete/spawn.c
+meta spawn.o %.c>%.o obsolete/spawn.c spawn
+prev obsolete/spawn.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c obsolete/spawn.c
+done spawn.o generated
+exec - ${AR} rc libast.a state.o transition.o opendir.o readdir.o rewinddir.o seekdir.o telldir.o getcwd.o fastfind.o hashalloc.o hashdump.o hashfree.o hashlast.o hashlook.o hashscan.o hashsize.o hashview.o hashwalk.o memhash.o memsum.o strhash.o strkey.o strsum.o stracmp.o strnacmp.o ccmap.o ccmapid.o ccnative.o chresc.o chrtoi.o
+exec - ${AR} rc libast.a streval.o strexpr.o strmatch.o strcopy.o modei.o modex.o strmode.o strlcat.o strlcpy.o strlook.o strncopy.o strsearch.o strpsearch.o stresc.o stropt.o strtape.o strpcmp.o strnpcmp.o strvcmp.o strnvcmp.o tok.o tokline.o tokscan.o pathaccess.o pathcat.o pathcanon.o pathcheck.o pathpath.o pathexists.o pathfind.o pathkey.o pathprobe.o pathrepl.o pathnative.o pathposix.o pathtemp.o pathtmp.o pathstat.o pathgetlink.o pathsetlink.o pathbin.o pathshell.o pathcd.o pathprog.o fs3d.o ftwalk.o ftwflags.o fts.o astintercept.o conformance.o getenv.o setenviron.o optget.o optjoin.o optesc.o optctx.o strsort.o struniq.o magic.o mime.o mimetype.o signal.o sigflag.o systrace.o error.o errorf.o errormsg.o errorx.o localeconv.o setlocale.o translate.o catopen.o iconv.o lc.o lctab.o mc.o base64.o recfmt.o recstr.o reclen.o fmtrec.o fmtbase.o fmtbuf.o fmtclock.o fmtdev.o fmtelapsed.o fmterror.o fmtesc.o fmtfmt.o fmtfs.o fmtident.o fmtint.o fmtip4.o fmtip6.o fmtls.o fmtmatch.o fmtmode.o fmtnum.o fmtperm.o fmtre.o fmttime.o
+exec - ${AR} rc libast.a fmtuid.o fmtgid.o fmtsignal.o fmtscale.o fmttmx.o fmttv.o fmtversion.o strelapsed.o strperm.o struid.o strgid.o strtoip4.o strtoip6.o stack.o stk.o swapget.o swapmem.o swapop.o swapput.o sigdata.o sigcrit.o sigunblock.o procopen.o procclose.o procrun.o procfree.o tmdate.o tmequiv.o tmfix.o tmfmt.o tmform.o tmgoff.o tminit.o tmleap.o tmlex.o tmlocale.o tmmake.o tmpoff.o tmscan.o tmsleep.o tmtime.o tmtype.o tmweek.o tmword.o tmzone.o tmxdate.o tmxduration.o tmxfmt.o tmxgettime.o tmxleap.o tmxmake.o tmxscan.o tmxsettime.o tmxsleep.o tmxtime.o tmxtouch.o tvcmp.o tvgettime.o tvsettime.o tvsleep.o tvtouch.o cmdarg.o vecargs.o vecfile.o vecfree.o vecload.o vecstring.o univdata.o touch.o mnt.o debug.o memccpy.o memchr.o memcmp.o memcpy.o memdup.o memmove.o memset.o mkdir.o mkfifo.o mknod.o rmdir.o remove.o rename.o link.o unlink.o strdup.o strchr.o strrchr.o strstr.o strtod.o strtold.o strtol.o strtoll.o strtoul.o strtoull.o strton.o strtonll.o strntod.o strntold.o strnton.o
+exec - ${AR} rc libast.a strntonll.o strntol.o strntoll.o strntoul.o strntoull.o strcasecmp.o strncasecmp.o strerror.o mktemp.o tmpnam.o fsync.o execlp.o execve.o execvp.o execvpe.o spawnveg.o vfork.o killpg.o hsearch.o tsearch.o getlogin.o putenv.o setenv.o unsetenv.o lstat.o statvfs.o eaccess.o gross.o omitted.o readlink.o symlink.o getpgrp.o setpgid.o setsid.o waitpid.o creat64.o fcntl.o open.o atexit.o getdents.o getwd.o dup2.o errno.o getpreroot.o ispreroot.o realopen.o setpreroot.o getgroups.o mount.o system.o iblocks.o modedata.o tmdata.o memfatal.o sfkeyprintf.o sfdcdio.o sfdcdos.o sfdcfilter.o sfdcseekable.o sfdcslow.o sfdcsubstr.o sfdctee.o sfdcunion.o sfdcmore.o sfdcprefix.o wc.o wc2utf8.o basename.o closelog.o dirname.o fmtmsglib.o fnmatch.o ftw.o getdate.o getsubopt.o glob.o nftw.o openlog.o re_comp.o resolvepath.o realpath.o regcmp.o regexp.o setlogmask.o strftime.o strptime.o swab.o syslog.o tempnam.o wordexp.o mktime.o regalloc.o regclass.o regcoll.o regcomp.o regcache.o regdecomp.o regerror.o regexec.o regfatal.o reginit.o
+exec - ${AR} rc libast.a regnexec.o regsubcomp.o regsubexec.o regsub.o regrecord.o regrexec.o regstat.o dtclose.o dtdisc.o dthash.o dtlist.o dtmethod.o dtopen.o dtstrhash.o dttree.o dtview.o dtwalk.o dtnew.o dtcomp.o sfclose.o sfclrlock.o sfdisc.o sfdlen.o sfexcept.o sfgetl.o sfgetu.o sfcvt.o sfecvt.o sffcvt.o sfextern.o sffilbuf.o sfflsbuf.o sfprints.o sfgetd.o sfgetr.o sfllen.o sfmode.o sfmove.o sfnew.o sfpkrd.o sfnotify.o sfnputc.o sfopen.o sfpeek.o sfpoll.o sfpool.o sfpopen.o sfprintf.o sfputd.o sfputl.o sfputr.o sfputu.o sfrd.o sfread.o sfreserve.o sfscanf.o sfseek.o sfset.o sfsetbuf.o sfsetfd.o sfsize.o sfsk.o sfstack.o sfstrtod.o sfsync.o sfswap.o sftable.o sftell.o sftmp.o sfungetc.o sfvprintf.o sfvscanf.o sfwr.o sfwrite.o sfpurge.o sfraise.o sfwalk.o sfgetm.o sfmutex.o sfputm.o sfresize.o _sfclrerr.o _sfeof.o _sferror.o _sffileno.o _sfopen.o _sfstacked.o _sfvalue.o _sfgetc.o _sfgetl.o _sfgetl2.o _sfgetu.o _sfgetu2.o _sfdlen.o _sfllen.o _sfslen.o _sfulen.o _sfputc.o _sfputd.o _sfputl.o _sfputm.o
+exec - ${AR} rc libast.a _sfputu.o clearerr.o fclose.o fdopen.o feof.o ferror.o fflush.o fgetc.o fgetpos.o fgets.o fileno.o fopen.o fprintf.o fpurge.o fputc.o fputs.o fread.o freopen.o fscanf.o fseek.o fseeko.o fsetpos.o ftell.o ftello.o fwrite.o flockfile.o ftrylockfile.o funlockfile.o getc.o getchar.o getw.o pclose.o popen.o printf.o putc.o putchar.o puts.o putw.o rewind.o scanf.o setbuf.o setbuffer.o setlinebuf.o setvbuf.o snprintf.o sprintf.o sscanf.o asprintf.o vasprintf.o tmpfile.o ungetc.o vfprintf.o vfscanf.o vprintf.o vscanf.o vsnprintf.o vsprintf.o vsscanf.o _doprnt.o _doscan.o _filbuf.o _flsbuf.o _stdfun.o _stdopen.o _stdprintf.o _stdscanf.o _stdsprnt.o _stdvbuf.o _stdvsnprnt.o _stdvsprnt.o _stdvsscn.o fgetwc.o fwprintf.o putwchar.o vfwscanf.o wprintf.o fgetws.o fwscanf.o swprintf.o vswprintf.o wscanf.o fputwc.o getwc.o swscanf.o vswscanf.o fputws.o getwchar.o ungetwc.o vwprintf.o fwide.o putwc.o vfwprintf.o vwscanf.o stdio_c99.o fcloseall.o fmemopen.o getdelim.o getline.o frexp.o frexpl.o astcopy.o
+exec - ${AR} rc libast.a astconf.o astdynamic.o astlicense.o astquery.o astwinsize.o conftab.o aststatic.o getopt.o getoptl.o aso.o asolock.o asometh.o asorelax.o aso-sem.o aso-fcntl.o vmbest.o vmclear.o vmclose.o vmdcheap.o vmdebug.o vmdisc.o vmexit.o vmlast.o vmopen.o vmpool.o vmprivate.o vmprofile.o vmregion.o vmsegment.o vmset.o vmstat.o vmstrdup.o vmtrace.o vmwalk.o vmmopen.o malloc.o vmgetmem.o a64l.o acosh.o asinh.o atanh.o cbrt.o crypt.o erf.o err.o exp.o exp__E.o expm1.o gamma.o getpass.o lgamma.o log.o log1p.o log__L.o rand48.o random.o rcmd.o rint.o support.o sfstrtmp.o spawn.o
+exec - (ranlib libast.a) >/dev/null 2>&1 || true
+done libast.a generated
+done ast virtual
+prev libast.a archive
+make ${INSTALLROOT}/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib
+exec - then mkdir -p ${INSTALLROOT}/lib
+exec - fi
+done ${INSTALLROOT}/lib generated
+make ${INSTALLROOT}/lib/libast.a archive
+prev ${INSTALLROOT}/lib
+prev libast.a archive
+exec - test '' = 'libast.a' || ${STDCMP} 2>/dev/null -s libast.a ${INSTALLROOT}/lib/libast.a || { ${STDMV} ${INSTALLROOT}/lib/libast.a ${INSTALLROOT}/lib/libast.a.old 2>/dev/null || true; ${STDCP} libast.a ${INSTALLROOT}/lib/libast.a ;}
+exec - (ranlib ${INSTALLROOT}/lib/libast.a) >/dev/null 2>&1 || true
+done ${INSTALLROOT}/lib/libast.a generated
+make ${INSTALLROOT}/man/man3
+exec - if silent test ! -d ${INSTALLROOT}/man/man3
+exec - then mkdir -p ${INSTALLROOT}/man/man3
+exec - fi
+done ${INSTALLROOT}/man/man3 generated
+make ${INSTALLROOT}/man/man3/LIBAST.3
+prev ${INSTALLROOT}/man/man3
+make man/LIBAST.3
+done man/LIBAST.3
+exec - test '' = 'man/LIBAST.3' || ${STDCMP} 2>/dev/null -s man/LIBAST.3 ${INSTALLROOT}/man/man3/LIBAST.3 || { ${STDMV} ${INSTALLROOT}/man/man3/LIBAST.3 ${INSTALLROOT}/man/man3/LIBAST.3.old 2>/dev/null || true; ${STDCP} man/LIBAST.3 ${INSTALLROOT}/man/man3/LIBAST.3 ;}
+done ${INSTALLROOT}/man/man3/LIBAST.3 generated
+make ${INSTALLROOT}/man/man3/aso.3
+make man/aso.3
+done man/aso.3
+exec - test '' = 'man/aso.3' || ${STDCMP} 2>/dev/null -s man/aso.3 ${INSTALLROOT}/man/man3/aso.3 || { ${STDMV} ${INSTALLROOT}/man/man3/aso.3 ${INSTALLROOT}/man/man3/aso.3.old 2>/dev/null || true; ${STDCP} man/aso.3 ${INSTALLROOT}/man/man3/aso.3 ;}
+done ${INSTALLROOT}/man/man3/aso.3 generated
+make ${INSTALLROOT}/man/man3/ast.3
+make man/ast.3
+done man/ast.3
+exec - test '' = 'man/ast.3' || ${STDCMP} 2>/dev/null -s man/ast.3 ${INSTALLROOT}/man/man3/ast.3 || { ${STDMV} ${INSTALLROOT}/man/man3/ast.3 ${INSTALLROOT}/man/man3/ast.3.old 2>/dev/null || true; ${STDCP} man/ast.3 ${INSTALLROOT}/man/man3/ast.3 ;}
+done ${INSTALLROOT}/man/man3/ast.3 generated
+make ${INSTALLROOT}/man/man3/astsa.3
+make man/astsa.3
+done man/astsa.3
+exec - test '' = 'man/astsa.3' || ${STDCMP} 2>/dev/null -s man/astsa.3 ${INSTALLROOT}/man/man3/astsa.3 || { ${STDMV} ${INSTALLROOT}/man/man3/astsa.3 ${INSTALLROOT}/man/man3/astsa.3.old 2>/dev/null || true; ${STDCP} man/astsa.3 ${INSTALLROOT}/man/man3/astsa.3 ;}
+done ${INSTALLROOT}/man/man3/astsa.3 generated
+make ${INSTALLROOT}/man/man3/cdt.3
+make man/cdt.3
+done man/cdt.3
+exec - test '' = 'man/cdt.3' || ${STDCMP} 2>/dev/null -s man/cdt.3 ${INSTALLROOT}/man/man3/cdt.3 || { ${STDMV} ${INSTALLROOT}/man/man3/cdt.3 ${INSTALLROOT}/man/man3/cdt.3.old 2>/dev/null || true; ${STDCP} man/cdt.3 ${INSTALLROOT}/man/man3/cdt.3 ;}
+done ${INSTALLROOT}/man/man3/cdt.3 generated
+make ${INSTALLROOT}/man/man3/chr.3
+make man/chr.3
+done man/chr.3
+exec - test '' = 'man/chr.3' || ${STDCMP} 2>/dev/null -s man/chr.3 ${INSTALLROOT}/man/man3/chr.3 || { ${STDMV} ${INSTALLROOT}/man/man3/chr.3 ${INSTALLROOT}/man/man3/chr.3.old 2>/dev/null || true; ${STDCP} man/chr.3 ${INSTALLROOT}/man/man3/chr.3 ;}
+done ${INSTALLROOT}/man/man3/chr.3 generated
+make ${INSTALLROOT}/man/man3/compat.3
+make man/compat.3
+done man/compat.3
+exec - test '' = 'man/compat.3' || ${STDCMP} 2>/dev/null -s man/compat.3 ${INSTALLROOT}/man/man3/compat.3 || { ${STDMV} ${INSTALLROOT}/man/man3/compat.3 ${INSTALLROOT}/man/man3/compat.3.old 2>/dev/null || true; ${STDCP} man/compat.3 ${INSTALLROOT}/man/man3/compat.3 ;}
+done ${INSTALLROOT}/man/man3/compat.3 generated
+make ${INSTALLROOT}/man/man3/error.3
+make man/error.3
+done man/error.3
+exec - test '' = 'man/error.3' || ${STDCMP} 2>/dev/null -s man/error.3 ${INSTALLROOT}/man/man3/error.3 || { ${STDMV} ${INSTALLROOT}/man/man3/error.3 ${INSTALLROOT}/man/man3/error.3.old 2>/dev/null || true; ${STDCP} man/error.3 ${INSTALLROOT}/man/man3/error.3 ;}
+done ${INSTALLROOT}/man/man3/error.3 generated
+make ${INSTALLROOT}/man/man3/find.3
+make man/find.3
+done man/find.3
+exec - test '' = 'man/find.3' || ${STDCMP} 2>/dev/null -s man/find.3 ${INSTALLROOT}/man/man3/find.3 || { ${STDMV} ${INSTALLROOT}/man/man3/find.3 ${INSTALLROOT}/man/man3/find.3.old 2>/dev/null || true; ${STDCP} man/find.3 ${INSTALLROOT}/man/man3/find.3 ;}
+done ${INSTALLROOT}/man/man3/find.3 generated
+make ${INSTALLROOT}/man/man3/fmt.3
+make man/fmt.3
+done man/fmt.3
+exec - test '' = 'man/fmt.3' || ${STDCMP} 2>/dev/null -s man/fmt.3 ${INSTALLROOT}/man/man3/fmt.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fmt.3 ${INSTALLROOT}/man/man3/fmt.3.old 2>/dev/null || true; ${STDCP} man/fmt.3 ${INSTALLROOT}/man/man3/fmt.3 ;}
+done ${INSTALLROOT}/man/man3/fmt.3 generated
+make ${INSTALLROOT}/man/man3/fmtls.3
+make man/fmtls.3
+done man/fmtls.3
+exec - test '' = 'man/fmtls.3' || ${STDCMP} 2>/dev/null -s man/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3.old 2>/dev/null || true; ${STDCP} man/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3 ;}
+done ${INSTALLROOT}/man/man3/fmtls.3 generated
+make ${INSTALLROOT}/man/man3/fs3d.3
+make man/fs3d.3
+done man/fs3d.3
+exec - test '' = 'man/fs3d.3' || ${STDCMP} 2>/dev/null -s man/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3.old 2>/dev/null || true; ${STDCP} man/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3 ;}
+done ${INSTALLROOT}/man/man3/fs3d.3 generated
+make ${INSTALLROOT}/man/man3/ftwalk.3
+make man/ftwalk.3
+done man/ftwalk.3
+exec - test '' = 'man/ftwalk.3' || ${STDCMP} 2>/dev/null -s man/ftwalk.3 ${INSTALLROOT}/man/man3/ftwalk.3 || { ${STDMV} ${INSTALLROOT}/man/man3/ftwalk.3 ${INSTALLROOT}/man/man3/ftwalk.3.old 2>/dev/null || true; ${STDCP} man/ftwalk.3 ${INSTALLROOT}/man/man3/ftwalk.3 ;}
+done ${INSTALLROOT}/man/man3/ftwalk.3 generated
+make ${INSTALLROOT}/man/man3/getcwd.3
+make man/getcwd.3
+done man/getcwd.3
+exec - test '' = 'man/getcwd.3' || ${STDCMP} 2>/dev/null -s man/getcwd.3 ${INSTALLROOT}/man/man3/getcwd.3 || { ${STDMV} ${INSTALLROOT}/man/man3/getcwd.3 ${INSTALLROOT}/man/man3/getcwd.3.old 2>/dev/null || true; ${STDCP} man/getcwd.3 ${INSTALLROOT}/man/man3/getcwd.3 ;}
+done ${INSTALLROOT}/man/man3/getcwd.3 generated
+make ${INSTALLROOT}/man/man3/hash.3
+make man/hash.3
+done man/hash.3
+exec - test '' = 'man/hash.3' || ${STDCMP} 2>/dev/null -s man/hash.3 ${INSTALLROOT}/man/man3/hash.3 || { ${STDMV} ${INSTALLROOT}/man/man3/hash.3 ${INSTALLROOT}/man/man3/hash.3.old 2>/dev/null || true; ${STDCP} man/hash.3 ${INSTALLROOT}/man/man3/hash.3 ;}
+done ${INSTALLROOT}/man/man3/hash.3 generated
+make ${INSTALLROOT}/man/man3/iblocks.3
+make man/iblocks.3
+done man/iblocks.3
+exec - test '' = 'man/iblocks.3' || ${STDCMP} 2>/dev/null -s man/iblocks.3 ${INSTALLROOT}/man/man3/iblocks.3 || { ${STDMV} ${INSTALLROOT}/man/man3/iblocks.3 ${INSTALLROOT}/man/man3/iblocks.3.old 2>/dev/null || true; ${STDCP} man/iblocks.3 ${INSTALLROOT}/man/man3/iblocks.3 ;}
+done ${INSTALLROOT}/man/man3/iblocks.3 generated
+make ${INSTALLROOT}/man/man3/int.3
+make man/int.3
+done man/int.3
+exec - test '' = 'man/int.3' || ${STDCMP} 2>/dev/null -s man/int.3 ${INSTALLROOT}/man/man3/int.3 || { ${STDMV} ${INSTALLROOT}/man/man3/int.3 ${INSTALLROOT}/man/man3/int.3.old 2>/dev/null || true; ${STDCP} man/int.3 ${INSTALLROOT}/man/man3/int.3 ;}
+done ${INSTALLROOT}/man/man3/int.3 generated
+make ${INSTALLROOT}/man/man3/ip6.3
+make man/ip6.3
+done man/ip6.3
+exec - test '' = 'man/ip6.3' || ${STDCMP} 2>/dev/null -s man/ip6.3 ${INSTALLROOT}/man/man3/ip6.3 || { ${STDMV} ${INSTALLROOT}/man/man3/ip6.3 ${INSTALLROOT}/man/man3/ip6.3.old 2>/dev/null || true; ${STDCP} man/ip6.3 ${INSTALLROOT}/man/man3/ip6.3 ;}
+done ${INSTALLROOT}/man/man3/ip6.3 generated
+make ${INSTALLROOT}/man/man3/magic.3
+make man/magic.3
+done man/magic.3
+exec - test '' = 'man/magic.3' || ${STDCMP} 2>/dev/null -s man/magic.3 ${INSTALLROOT}/man/man3/magic.3 || { ${STDMV} ${INSTALLROOT}/man/man3/magic.3 ${INSTALLROOT}/man/man3/magic.3.old 2>/dev/null || true; ${STDCP} man/magic.3 ${INSTALLROOT}/man/man3/magic.3 ;}
+done ${INSTALLROOT}/man/man3/magic.3 generated
+make ${INSTALLROOT}/man/man3/mem.3
+make man/mem.3
+done man/mem.3
+exec - test '' = 'man/mem.3' || ${STDCMP} 2>/dev/null -s man/mem.3 ${INSTALLROOT}/man/man3/mem.3 || { ${STDMV} ${INSTALLROOT}/man/man3/mem.3 ${INSTALLROOT}/man/man3/mem.3.old 2>/dev/null || true; ${STDCP} man/mem.3 ${INSTALLROOT}/man/man3/mem.3 ;}
+done ${INSTALLROOT}/man/man3/mem.3 generated
+make ${INSTALLROOT}/man/man3/mime.3
+make man/mime.3
+done man/mime.3
+exec - test '' = 'man/mime.3' || ${STDCMP} 2>/dev/null -s man/mime.3 ${INSTALLROOT}/man/man3/mime.3 || { ${STDMV} ${INSTALLROOT}/man/man3/mime.3 ${INSTALLROOT}/man/man3/mime.3.old 2>/dev/null || true; ${STDCP} man/mime.3 ${INSTALLROOT}/man/man3/mime.3 ;}
+done ${INSTALLROOT}/man/man3/mime.3 generated
+make ${INSTALLROOT}/man/man3/modecanon.3
+make man/modecanon.3
+done man/modecanon.3
+exec - test '' = 'man/modecanon.3' || ${STDCMP} 2>/dev/null -s man/modecanon.3 ${INSTALLROOT}/man/man3/modecanon.3 || { ${STDMV} ${INSTALLROOT}/man/man3/modecanon.3 ${INSTALLROOT}/man/man3/modecanon.3.old 2>/dev/null || true; ${STDCP} man/modecanon.3 ${INSTALLROOT}/man/man3/modecanon.3 ;}
+done ${INSTALLROOT}/man/man3/modecanon.3 generated
+make ${INSTALLROOT}/man/man3/optget.3
+make man/optget.3
+done man/optget.3
+exec - test '' = 'man/optget.3' || ${STDCMP} 2>/dev/null -s man/optget.3 ${INSTALLROOT}/man/man3/optget.3 || { ${STDMV} ${INSTALLROOT}/man/man3/optget.3 ${INSTALLROOT}/man/man3/optget.3.old 2>/dev/null || true; ${STDCP} man/optget.3 ${INSTALLROOT}/man/man3/optget.3 ;}
+done ${INSTALLROOT}/man/man3/optget.3 generated
+make ${INSTALLROOT}/man/man3/path.3
+make man/path.3
+done man/path.3
+exec - test '' = 'man/path.3' || ${STDCMP} 2>/dev/null -s man/path.3 ${INSTALLROOT}/man/man3/path.3 || { ${STDMV} ${INSTALLROOT}/man/man3/path.3 ${INSTALLROOT}/man/man3/path.3.old 2>/dev/null || true; ${STDCP} man/path.3 ${INSTALLROOT}/man/man3/path.3 ;}
+done ${INSTALLROOT}/man/man3/path.3 generated
+make ${INSTALLROOT}/man/man3/preroot.3
+make man/preroot.3
+done man/preroot.3
+exec - test '' = 'man/preroot.3' || ${STDCMP} 2>/dev/null -s man/preroot.3 ${INSTALLROOT}/man/man3/preroot.3 || { ${STDMV} ${INSTALLROOT}/man/man3/preroot.3 ${INSTALLROOT}/man/man3/preroot.3.old 2>/dev/null || true; ${STDCP} man/preroot.3 ${INSTALLROOT}/man/man3/preroot.3 ;}
+done ${INSTALLROOT}/man/man3/preroot.3 generated
+make ${INSTALLROOT}/man/man3/proc.3
+make man/proc.3
+done man/proc.3
+exec - test '' = 'man/proc.3' || ${STDCMP} 2>/dev/null -s man/proc.3 ${INSTALLROOT}/man/man3/proc.3 || { ${STDMV} ${INSTALLROOT}/man/man3/proc.3 ${INSTALLROOT}/man/man3/proc.3.old 2>/dev/null || true; ${STDCP} man/proc.3 ${INSTALLROOT}/man/man3/proc.3 ;}
+done ${INSTALLROOT}/man/man3/proc.3 generated
+make ${INSTALLROOT}/man/man3/re.3
+make man/re.3
+done man/re.3
+exec - test '' = 'man/re.3' || ${STDCMP} 2>/dev/null -s man/re.3 ${INSTALLROOT}/man/man3/re.3 || { ${STDMV} ${INSTALLROOT}/man/man3/re.3 ${INSTALLROOT}/man/man3/re.3.old 2>/dev/null || true; ${STDCP} man/re.3 ${INSTALLROOT}/man/man3/re.3 ;}
+done ${INSTALLROOT}/man/man3/re.3 generated
+make ${INSTALLROOT}/man/man3/regex.3
+make man/regex.3
+done man/regex.3
+exec - test '' = 'man/regex.3' || ${STDCMP} 2>/dev/null -s man/regex.3 ${INSTALLROOT}/man/man3/regex.3 || { ${STDMV} ${INSTALLROOT}/man/man3/regex.3 ${INSTALLROOT}/man/man3/regex.3.old 2>/dev/null || true; ${STDCP} man/regex.3 ${INSTALLROOT}/man/man3/regex.3 ;}
+done ${INSTALLROOT}/man/man3/regex.3 generated
+make ${INSTALLROOT}/man/man3/setenviron.3
+make man/setenviron.3
+done man/setenviron.3
+exec - test '' = 'man/setenviron.3' || ${STDCMP} 2>/dev/null -s man/setenviron.3 ${INSTALLROOT}/man/man3/setenviron.3 || { ${STDMV} ${INSTALLROOT}/man/man3/setenviron.3 ${INSTALLROOT}/man/man3/setenviron.3.old 2>/dev/null || true; ${STDCP} man/setenviron.3 ${INSTALLROOT}/man/man3/setenviron.3 ;}
+done ${INSTALLROOT}/man/man3/setenviron.3 generated
+make ${INSTALLROOT}/man/man3/sfdisc.3
+make man/sfdisc.3
+done man/sfdisc.3
+exec - test '' = 'man/sfdisc.3' || ${STDCMP} 2>/dev/null -s man/sfdisc.3 ${INSTALLROOT}/man/man3/sfdisc.3 || { ${STDMV} ${INSTALLROOT}/man/man3/sfdisc.3 ${INSTALLROOT}/man/man3/sfdisc.3.old 2>/dev/null || true; ${STDCP} man/sfdisc.3 ${INSTALLROOT}/man/man3/sfdisc.3 ;}
+done ${INSTALLROOT}/man/man3/sfdisc.3 generated
+make ${INSTALLROOT}/man/man3/sfio.3
+make man/sfio.3
+done man/sfio.3
+exec - test '' = 'man/sfio.3' || ${STDCMP} 2>/dev/null -s man/sfio.3 ${INSTALLROOT}/man/man3/sfio.3 || { ${STDMV} ${INSTALLROOT}/man/man3/sfio.3 ${INSTALLROOT}/man/man3/sfio.3.old 2>/dev/null || true; ${STDCP} man/sfio.3 ${INSTALLROOT}/man/man3/sfio.3 ;}
+done ${INSTALLROOT}/man/man3/sfio.3 generated
+make ${INSTALLROOT}/man/man3/sig.3
+make man/sig.3
+done man/sig.3
+exec - test '' = 'man/sig.3' || ${STDCMP} 2>/dev/null -s man/sig.3 ${INSTALLROOT}/man/man3/sig.3 || { ${STDMV} ${INSTALLROOT}/man/man3/sig.3 ${INSTALLROOT}/man/man3/sig.3.old 2>/dev/null || true; ${STDCP} man/sig.3 ${INSTALLROOT}/man/man3/sig.3 ;}
+done ${INSTALLROOT}/man/man3/sig.3 generated
+make ${INSTALLROOT}/man/man3/spawnveg.3
+make man/spawnveg.3
+done man/spawnveg.3
+exec - test '' = 'man/spawnveg.3' || ${STDCMP} 2>/dev/null -s man/spawnveg.3 ${INSTALLROOT}/man/man3/spawnveg.3 || { ${STDMV} ${INSTALLROOT}/man/man3/spawnveg.3 ${INSTALLROOT}/man/man3/spawnveg.3.old 2>/dev/null || true; ${STDCP} man/spawnveg.3 ${INSTALLROOT}/man/man3/spawnveg.3 ;}
+done ${INSTALLROOT}/man/man3/spawnveg.3 generated
+make ${INSTALLROOT}/man/man3/stak.3
+make man/stak.3
+done man/stak.3
+exec - test '' = 'man/stak.3' || ${STDCMP} 2>/dev/null -s man/stak.3 ${INSTALLROOT}/man/man3/stak.3 || { ${STDMV} ${INSTALLROOT}/man/man3/stak.3 ${INSTALLROOT}/man/man3/stak.3.old 2>/dev/null || true; ${STDCP} man/stak.3 ${INSTALLROOT}/man/man3/stak.3 ;}
+done ${INSTALLROOT}/man/man3/stak.3 generated
+make ${INSTALLROOT}/man/man3/stk.3
+make man/stk.3
+done man/stk.3
+exec - test '' = 'man/stk.3' || ${STDCMP} 2>/dev/null -s man/stk.3 ${INSTALLROOT}/man/man3/stk.3 || { ${STDMV} ${INSTALLROOT}/man/man3/stk.3 ${INSTALLROOT}/man/man3/stk.3.old 2>/dev/null || true; ${STDCP} man/stk.3 ${INSTALLROOT}/man/man3/stk.3 ;}
+done ${INSTALLROOT}/man/man3/stk.3 generated
+make ${INSTALLROOT}/man/man3/strcopy.3
+make man/strcopy.3
+done man/strcopy.3
+exec - test '' = 'man/strcopy.3' || ${STDCMP} 2>/dev/null -s man/strcopy.3 ${INSTALLROOT}/man/man3/strcopy.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strcopy.3 ${INSTALLROOT}/man/man3/strcopy.3.old 2>/dev/null || true; ${STDCP} man/strcopy.3 ${INSTALLROOT}/man/man3/strcopy.3 ;}
+done ${INSTALLROOT}/man/man3/strcopy.3 generated
+make ${INSTALLROOT}/man/man3/strdup.3
+make man/strdup.3
+done man/strdup.3
+exec - test '' = 'man/strdup.3' || ${STDCMP} 2>/dev/null -s man/strdup.3 ${INSTALLROOT}/man/man3/strdup.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strdup.3 ${INSTALLROOT}/man/man3/strdup.3.old 2>/dev/null || true; ${STDCP} man/strdup.3 ${INSTALLROOT}/man/man3/strdup.3 ;}
+done ${INSTALLROOT}/man/man3/strdup.3 generated
+make ${INSTALLROOT}/man/man3/strelapsed.3
+make man/strelapsed.3
+done man/strelapsed.3
+exec - test '' = 'man/strelapsed.3' || ${STDCMP} 2>/dev/null -s man/strelapsed.3 ${INSTALLROOT}/man/man3/strelapsed.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strelapsed.3 ${INSTALLROOT}/man/man3/strelapsed.3.old 2>/dev/null || true; ${STDCP} man/strelapsed.3 ${INSTALLROOT}/man/man3/strelapsed.3 ;}
+done ${INSTALLROOT}/man/man3/strelapsed.3 generated
+make ${INSTALLROOT}/man/man3/strerror.3
+make man/strerror.3
+done man/strerror.3
+exec - test '' = 'man/strerror.3' || ${STDCMP} 2>/dev/null -s man/strerror.3 ${INSTALLROOT}/man/man3/strerror.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strerror.3 ${INSTALLROOT}/man/man3/strerror.3.old 2>/dev/null || true; ${STDCP} man/strerror.3 ${INSTALLROOT}/man/man3/strerror.3 ;}
+done ${INSTALLROOT}/man/man3/strerror.3 generated
+make ${INSTALLROOT}/man/man3/stresc.3
+make man/stresc.3
+done man/stresc.3
+exec - test '' = 'man/stresc.3' || ${STDCMP} 2>/dev/null -s man/stresc.3 ${INSTALLROOT}/man/man3/stresc.3 || { ${STDMV} ${INSTALLROOT}/man/man3/stresc.3 ${INSTALLROOT}/man/man3/stresc.3.old 2>/dev/null || true; ${STDCP} man/stresc.3 ${INSTALLROOT}/man/man3/stresc.3 ;}
+done ${INSTALLROOT}/man/man3/stresc.3 generated
+make ${INSTALLROOT}/man/man3/streval.3
+make man/streval.3
+done man/streval.3
+exec - test '' = 'man/streval.3' || ${STDCMP} 2>/dev/null -s man/streval.3 ${INSTALLROOT}/man/man3/streval.3 || { ${STDMV} ${INSTALLROOT}/man/man3/streval.3 ${INSTALLROOT}/man/man3/streval.3.old 2>/dev/null || true; ${STDCP} man/streval.3 ${INSTALLROOT}/man/man3/streval.3 ;}
+done ${INSTALLROOT}/man/man3/streval.3 generated
+make ${INSTALLROOT}/man/man3/strgid.3
+make man/strgid.3
+done man/strgid.3
+exec - test '' = 'man/strgid.3' || ${STDCMP} 2>/dev/null -s man/strgid.3 ${INSTALLROOT}/man/man3/strgid.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strgid.3 ${INSTALLROOT}/man/man3/strgid.3.old 2>/dev/null || true; ${STDCP} man/strgid.3 ${INSTALLROOT}/man/man3/strgid.3 ;}
+done ${INSTALLROOT}/man/man3/strgid.3 generated
+make ${INSTALLROOT}/man/man3/strmatch.3
+make man/strmatch.3
+done man/strmatch.3
+exec - test '' = 'man/strmatch.3' || ${STDCMP} 2>/dev/null -s man/strmatch.3 ${INSTALLROOT}/man/man3/strmatch.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strmatch.3 ${INSTALLROOT}/man/man3/strmatch.3.old 2>/dev/null || true; ${STDCP} man/strmatch.3 ${INSTALLROOT}/man/man3/strmatch.3 ;}
+done ${INSTALLROOT}/man/man3/strmatch.3 generated
+make ${INSTALLROOT}/man/man3/stropt.3
+make man/stropt.3
+done man/stropt.3
+exec - test '' = 'man/stropt.3' || ${STDCMP} 2>/dev/null -s man/stropt.3 ${INSTALLROOT}/man/man3/stropt.3 || { ${STDMV} ${INSTALLROOT}/man/man3/stropt.3 ${INSTALLROOT}/man/man3/stropt.3.old 2>/dev/null || true; ${STDCP} man/stropt.3 ${INSTALLROOT}/man/man3/stropt.3 ;}
+done ${INSTALLROOT}/man/man3/stropt.3 generated
+make ${INSTALLROOT}/man/man3/strperm.3
+make man/strperm.3
+done man/strperm.3
+exec - test '' = 'man/strperm.3' || ${STDCMP} 2>/dev/null -s man/strperm.3 ${INSTALLROOT}/man/man3/strperm.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strperm.3 ${INSTALLROOT}/man/man3/strperm.3.old 2>/dev/null || true; ${STDCP} man/strperm.3 ${INSTALLROOT}/man/man3/strperm.3 ;}
+done ${INSTALLROOT}/man/man3/strperm.3 generated
+make ${INSTALLROOT}/man/man3/strsignal.3
+make man/strsignal.3
+done man/strsignal.3
+exec - test '' = 'man/strsignal.3' || ${STDCMP} 2>/dev/null -s man/strsignal.3 ${INSTALLROOT}/man/man3/strsignal.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strsignal.3 ${INSTALLROOT}/man/man3/strsignal.3.old 2>/dev/null || true; ${STDCP} man/strsignal.3 ${INSTALLROOT}/man/man3/strsignal.3 ;}
+done ${INSTALLROOT}/man/man3/strsignal.3 generated
+make ${INSTALLROOT}/man/man3/strsort.3
+make man/strsort.3
+done man/strsort.3
+exec - test '' = 'man/strsort.3' || ${STDCMP} 2>/dev/null -s man/strsort.3 ${INSTALLROOT}/man/man3/strsort.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strsort.3 ${INSTALLROOT}/man/man3/strsort.3.old 2>/dev/null || true; ${STDCP} man/strsort.3 ${INSTALLROOT}/man/man3/strsort.3 ;}
+done ${INSTALLROOT}/man/man3/strsort.3 generated
+make ${INSTALLROOT}/man/man3/strtape.3
+make man/strtape.3
+done man/strtape.3
+exec - test '' = 'man/strtape.3' || ${STDCMP} 2>/dev/null -s man/strtape.3 ${INSTALLROOT}/man/man3/strtape.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strtape.3 ${INSTALLROOT}/man/man3/strtape.3.old 2>/dev/null || true; ${STDCP} man/strtape.3 ${INSTALLROOT}/man/man3/strtape.3 ;}
+done ${INSTALLROOT}/man/man3/strtape.3 generated
+make ${INSTALLROOT}/man/man3/strton.3
+make man/strton.3
+done man/strton.3
+exec - test '' = 'man/strton.3' || ${STDCMP} 2>/dev/null -s man/strton.3 ${INSTALLROOT}/man/man3/strton.3 || { ${STDMV} ${INSTALLROOT}/man/man3/strton.3 ${INSTALLROOT}/man/man3/strton.3.old 2>/dev/null || true; ${STDCP} man/strton.3 ${INSTALLROOT}/man/man3/strton.3 ;}
+done ${INSTALLROOT}/man/man3/strton.3 generated
+make ${INSTALLROOT}/man/man3/struid.3
+make man/struid.3
+done man/struid.3
+exec - test '' = 'man/struid.3' || ${STDCMP} 2>/dev/null -s man/struid.3 ${INSTALLROOT}/man/man3/struid.3 || { ${STDMV} ${INSTALLROOT}/man/man3/struid.3 ${INSTALLROOT}/man/man3/struid.3.old 2>/dev/null || true; ${STDCP} man/struid.3 ${INSTALLROOT}/man/man3/struid.3 ;}
+done ${INSTALLROOT}/man/man3/struid.3 generated
+make ${INSTALLROOT}/man/man3/swap.3
+make man/swap.3
+done man/swap.3
+exec - test '' = 'man/swap.3' || ${STDCMP} 2>/dev/null -s man/swap.3 ${INSTALLROOT}/man/man3/swap.3 || { ${STDMV} ${INSTALLROOT}/man/man3/swap.3 ${INSTALLROOT}/man/man3/swap.3.old 2>/dev/null || true; ${STDCP} man/swap.3 ${INSTALLROOT}/man/man3/swap.3 ;}
+done ${INSTALLROOT}/man/man3/swap.3 generated
+make ${INSTALLROOT}/man/man3/tab.3
+make man/tab.3
+done man/tab.3
+exec - test '' = 'man/tab.3' || ${STDCMP} 2>/dev/null -s man/tab.3 ${INSTALLROOT}/man/man3/tab.3 || { ${STDMV} ${INSTALLROOT}/man/man3/tab.3 ${INSTALLROOT}/man/man3/tab.3.old 2>/dev/null || true; ${STDCP} man/tab.3 ${INSTALLROOT}/man/man3/tab.3 ;}
+done ${INSTALLROOT}/man/man3/tab.3 generated
+make ${INSTALLROOT}/man/man3/tm.3
+make man/tm.3
+done man/tm.3
+exec - test '' = 'man/tm.3' || ${STDCMP} 2>/dev/null -s man/tm.3 ${INSTALLROOT}/man/man3/tm.3 || { ${STDMV} ${INSTALLROOT}/man/man3/tm.3 ${INSTALLROOT}/man/man3/tm.3.old 2>/dev/null || true; ${STDCP} man/tm.3 ${INSTALLROOT}/man/man3/tm.3 ;}
+done ${INSTALLROOT}/man/man3/tm.3 generated
+make ${INSTALLROOT}/man/man3/tmx.3
+make man/tmx.3
+done man/tmx.3
+exec - test '' = 'man/tmx.3' || ${STDCMP} 2>/dev/null -s man/tmx.3 ${INSTALLROOT}/man/man3/tmx.3 || { ${STDMV} ${INSTALLROOT}/man/man3/tmx.3 ${INSTALLROOT}/man/man3/tmx.3.old 2>/dev/null || true; ${STDCP} man/tmx.3 ${INSTALLROOT}/man/man3/tmx.3 ;}
+done ${INSTALLROOT}/man/man3/tmx.3 generated
+make ${INSTALLROOT}/man/man3/tok.3
+make man/tok.3
+done man/tok.3
+exec - test '' = 'man/tok.3' || ${STDCMP} 2>/dev/null -s man/tok.3 ${INSTALLROOT}/man/man3/tok.3 || { ${STDMV} ${INSTALLROOT}/man/man3/tok.3 ${INSTALLROOT}/man/man3/tok.3.old 2>/dev/null || true; ${STDCP} man/tok.3 ${INSTALLROOT}/man/man3/tok.3 ;}
+done ${INSTALLROOT}/man/man3/tok.3 generated
+make ${INSTALLROOT}/man/man3/touch.3
+make man/touch.3
+done man/touch.3
+exec - test '' = 'man/touch.3' || ${STDCMP} 2>/dev/null -s man/touch.3 ${INSTALLROOT}/man/man3/touch.3 || { ${STDMV} ${INSTALLROOT}/man/man3/touch.3 ${INSTALLROOT}/man/man3/touch.3.old 2>/dev/null || true; ${STDCP} man/touch.3 ${INSTALLROOT}/man/man3/touch.3 ;}
+done ${INSTALLROOT}/man/man3/touch.3 generated
+make ${INSTALLROOT}/man/man3/tv.3
+make man/tv.3
+done man/tv.3
+exec - test '' = 'man/tv.3' || ${STDCMP} 2>/dev/null -s man/tv.3 ${INSTALLROOT}/man/man3/tv.3 || { ${STDMV} ${INSTALLROOT}/man/man3/tv.3 ${INSTALLROOT}/man/man3/tv.3.old 2>/dev/null || true; ${STDCP} man/tv.3 ${INSTALLROOT}/man/man3/tv.3 ;}
+done ${INSTALLROOT}/man/man3/tv.3 generated
+make ${INSTALLROOT}/man/man3/vecargs.3
+make man/vecargs.3
+done man/vecargs.3
+exec - test '' = 'man/vecargs.3' || ${STDCMP} 2>/dev/null -s man/vecargs.3 ${INSTALLROOT}/man/man3/vecargs.3 || { ${STDMV} ${INSTALLROOT}/man/man3/vecargs.3 ${INSTALLROOT}/man/man3/vecargs.3.old 2>/dev/null || true; ${STDCP} man/vecargs.3 ${INSTALLROOT}/man/man3/vecargs.3 ;}
+done ${INSTALLROOT}/man/man3/vecargs.3 generated
+make ${INSTALLROOT}/man/man3/vmalloc.3
+make man/vmalloc.3
+done man/vmalloc.3
+exec - test '' = 'man/vmalloc.3' || ${STDCMP} 2>/dev/null -s man/vmalloc.3 ${INSTALLROOT}/man/man3/vmalloc.3 || { ${STDMV} ${INSTALLROOT}/man/man3/vmalloc.3 ${INSTALLROOT}/man/man3/vmalloc.3.old 2>/dev/null || true; ${STDCP} man/vmalloc.3 ${INSTALLROOT}/man/man3/vmalloc.3 ;}
+done ${INSTALLROOT}/man/man3/vmalloc.3 generated
+make ${INSTALLROOT}/lib/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib/lib
+exec - then mkdir -p ${INSTALLROOT}/lib/lib
+exec - fi
+done ${INSTALLROOT}/lib/lib generated
+make ${INSTALLROOT}/lib/lib/ast
+prev ${INSTALLROOT}/lib/lib
+prev ast.req
+exec - test '' = 'ast.req' || ${STDCMP} 2>/dev/null -s ast.req ${INSTALLROOT}/lib/lib/ast || { ${STDMV} ${INSTALLROOT}/lib/lib/ast ${INSTALLROOT}/lib/lib/ast.old 2>/dev/null || true; ${STDCP} ast.req ${INSTALLROOT}/lib/lib/ast ;}
+done ${INSTALLROOT}/lib/lib/ast generated
+make ${INSTALLROOT}/include/ast
+exec - if silent test ! -d ${INSTALLROOT}/include/ast
+exec - then mkdir -p ${INSTALLROOT}/include/ast
+exec - fi
+done ${INSTALLROOT}/include/ast generated
+make ${INSTALLROOT}/include/ast/ast_common.h
+prev ${INSTALLROOT}/include/ast
+prev ast_common.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_common.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_common.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_common.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_common.h generated
+make ${INSTALLROOT}/include/ast/ast.h
+prev include/ast.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ast.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast.h generated
+make ${INSTALLROOT}/include/ast/ast_dir.h
+prev include/ast_dir.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ast_dir.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_dir.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_dir.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_dir.h generated
+make ${INSTALLROOT}/include/ast/ast_getopt.h
+prev include/ast_getopt.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ast_getopt.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_getopt.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_getopt.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_getopt.h generated
+make ${INSTALLROOT}/include/ast/ast_std.h
+prev include/ast_std.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ast_std.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_std.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_std.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_std.h generated
+make ${INSTALLROOT}/include/ast/ast_namval.h
+prev ast_namval.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_namval.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_namval.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_namval.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_namval.h generated
+make ${INSTALLROOT}/include/ast/ast_windows.h
+prev include/ast_windows.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ast_windows.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_windows.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_windows.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_windows.h generated
+make ${INSTALLROOT}/include/ast/ccode.h
+prev include/ccode.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ccode.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ccode.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ccode.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ccode.h generated
+make ${INSTALLROOT}/include/ast/cdt.h
+prev include/cdt.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/cdt.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/cdt.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/cdt.h
+exec - fi
+done ${INSTALLROOT}/include/ast/cdt.h generated
+make ${INSTALLROOT}/include/ast/cdtlib.h
+prev cdt/cdtlib.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' cdt/cdtlib.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/cdtlib.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/cdtlib.h
+exec - fi
+done ${INSTALLROOT}/include/ast/cdtlib.h generated
+make ${INSTALLROOT}/include/ast/cmdarg.h
+prev include/cmdarg.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/cmdarg.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/cmdarg.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/cmdarg.h
+exec - fi
+done ${INSTALLROOT}/include/ast/cmdarg.h generated
+make ${INSTALLROOT}/include/ast/debug.h
+prev include/debug.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/debug.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/debug.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/debug.h
+exec - fi
+done ${INSTALLROOT}/include/ast/debug.h generated
+make ${INSTALLROOT}/include/ast/dt.h
+prev include/dt.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/dt.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/dt.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/dt.h
+exec - fi
+done ${INSTALLROOT}/include/ast/dt.h generated
+make ${INSTALLROOT}/include/ast/error.h
+prev include/error.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/error.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/error.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/error.h
+exec - fi
+done ${INSTALLROOT}/include/ast/error.h generated
+make ${INSTALLROOT}/include/ast/find.h
+prev include/find.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/find.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/find.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/find.h
+exec - fi
+done ${INSTALLROOT}/include/ast/find.h generated
+make ${INSTALLROOT}/include/ast/ftw.h
+prev comp/ftw.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/ftw.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ftw.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ftw.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ftw.h generated
+make ${INSTALLROOT}/include/ast/ftwalk.h
+prev include/ftwalk.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ftwalk.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ftwalk.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ftwalk.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ftwalk.h generated
+make ${INSTALLROOT}/include/ast/fts.h
+prev include/fts.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/fts.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fts.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fts.h
+exec - fi
+done ${INSTALLROOT}/include/ast/fts.h generated
+make ${INSTALLROOT}/include/ast/fs3d.h
+prev include/fs3d.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/fs3d.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fs3d.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fs3d.h
+exec - fi
+done ${INSTALLROOT}/include/ast/fs3d.h generated
+make ${INSTALLROOT}/include/ast/getopt.h
+prev comp/getopt.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/getopt.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/getopt.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/getopt.h
+exec - fi
+done ${INSTALLROOT}/include/ast/getopt.h generated
+make ${INSTALLROOT}/include/ast/glob.h
+prev include/glob.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/glob.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/glob.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/glob.h
+exec - fi
+done ${INSTALLROOT}/include/ast/glob.h generated
+make ${INSTALLROOT}/include/ast/hash.h
+prev include/hash.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/hash.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/hash.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/hash.h
+exec - fi
+done ${INSTALLROOT}/include/ast/hash.h generated
+make ${INSTALLROOT}/include/ast/hashkey.h
+prev include/hashkey.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/hashkey.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/hashkey.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/hashkey.h
+exec - fi
+done ${INSTALLROOT}/include/ast/hashkey.h generated
+make ${INSTALLROOT}/include/ast/hashpart.h
+prev include/hashpart.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/hashpart.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/hashpart.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/hashpart.h
+exec - fi
+done ${INSTALLROOT}/include/ast/hashpart.h generated
+make ${INSTALLROOT}/include/ast/ip6.h
+prev include/ip6.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ip6.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ip6.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ip6.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ip6.h generated
+make ${INSTALLROOT}/include/ast/lc.h
+prev lc.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' lc.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/lc.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/lc.h
+exec - fi
+done ${INSTALLROOT}/include/ast/lc.h generated
+make ${INSTALLROOT}/include/ast/ls.h
+prev include/ls.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/ls.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ls.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ls.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ls.h generated
+make ${INSTALLROOT}/include/ast/magic.h
+prev include/magic.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/magic.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/magic.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/magic.h
+exec - fi
+done ${INSTALLROOT}/include/ast/magic.h generated
+make ${INSTALLROOT}/include/ast/mc.h
+prev include/mc.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/mc.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/mc.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/mc.h
+exec - fi
+done ${INSTALLROOT}/include/ast/mc.h generated
+make ${INSTALLROOT}/include/ast/mime.h
+prev include/mime.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/mime.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/mime.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/mime.h
+exec - fi
+done ${INSTALLROOT}/include/ast/mime.h generated
+make ${INSTALLROOT}/include/ast/mnt.h
+prev include/mnt.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/mnt.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/mnt.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/mnt.h
+exec - fi
+done ${INSTALLROOT}/include/ast/mnt.h generated
+make ${INSTALLROOT}/include/ast/modecanon.h
+prev include/modecanon.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/modecanon.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/modecanon.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/modecanon.h
+exec - fi
+done ${INSTALLROOT}/include/ast/modecanon.h generated
+make ${INSTALLROOT}/include/ast/modex.h
+prev include/modex.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/modex.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/modex.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/modex.h
+exec - fi
+done ${INSTALLROOT}/include/ast/modex.h generated
+make ${INSTALLROOT}/include/ast/namval.h
+prev include/namval.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/namval.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/namval.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/namval.h
+exec - fi
+done ${INSTALLROOT}/include/ast/namval.h generated
+make ${INSTALLROOT}/include/ast/option.h
+prev include/option.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/option.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/option.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/option.h
+exec - fi
+done ${INSTALLROOT}/include/ast/option.h generated
+make ${INSTALLROOT}/include/ast/proc.h
+prev include/proc.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/proc.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/proc.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/proc.h
+exec - fi
+done ${INSTALLROOT}/include/ast/proc.h generated
+make ${INSTALLROOT}/include/ast/re_comp.h
+prev comp/re_comp.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/re_comp.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/re_comp.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/re_comp.h
+exec - fi
+done ${INSTALLROOT}/include/ast/re_comp.h generated
+make ${INSTALLROOT}/include/ast/recfmt.h
+prev include/recfmt.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/recfmt.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/recfmt.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/recfmt.h
+exec - fi
+done ${INSTALLROOT}/include/ast/recfmt.h generated
+make ${INSTALLROOT}/include/ast/regex.h
+prev include/regex.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/regex.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/regex.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/regex.h
+exec - fi
+done ${INSTALLROOT}/include/ast/regex.h generated
+make ${INSTALLROOT}/include/ast/regexp.h
+prev comp/regexp.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/regexp.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/regexp.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/regexp.h
+exec - fi
+done ${INSTALLROOT}/include/ast/regexp.h generated
+make ${INSTALLROOT}/include/ast/sfio.h
+prev include/sfio.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/sfio.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/sfio.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/sfio.h
+exec - fi
+done ${INSTALLROOT}/include/ast/sfio.h generated
+make ${INSTALLROOT}/include/ast/sfio_s.h
+prev include/sfio_s.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/sfio_s.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/sfio_s.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/sfio_s.h
+exec - fi
+done ${INSTALLROOT}/include/ast/sfio_s.h generated
+make ${INSTALLROOT}/include/ast/sfio_t.h
+prev include/sfio_t.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/sfio_t.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/sfio_t.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/sfio_t.h
+exec - fi
+done ${INSTALLROOT}/include/ast/sfio_t.h generated
+make ${INSTALLROOT}/include/ast/sfdisc.h
+prev include/sfdisc.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/sfdisc.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/sfdisc.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/sfdisc.h
+exec - fi
+done ${INSTALLROOT}/include/ast/sfdisc.h generated
+make ${INSTALLROOT}/include/ast/shcmd.h
+prev include/shcmd.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/shcmd.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/shcmd.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/shcmd.h
+exec - fi
+done ${INSTALLROOT}/include/ast/shcmd.h generated
+make ${INSTALLROOT}/include/ast/stack.h
+prev include/stack.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/stack.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/stack.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/stack.h
+exec - fi
+done ${INSTALLROOT}/include/ast/stack.h generated
+make ${INSTALLROOT}/include/ast/stak.h
+prev include/stak.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/stak.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/stak.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/stak.h
+exec - fi
+done ${INSTALLROOT}/include/ast/stak.h generated
+make ${INSTALLROOT}/include/ast/stk.h
+prev include/stk.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/stk.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/stk.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/stk.h
+exec - fi
+done ${INSTALLROOT}/include/ast/stk.h generated
+make ${INSTALLROOT}/include/ast/swap.h
+prev include/swap.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/swap.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/swap.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/swap.h
+exec - fi
+done ${INSTALLROOT}/include/ast/swap.h generated
+make ${INSTALLROOT}/include/ast/tar.h
+make include/tar.h
+done include/tar.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/tar.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/tar.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/tar.h
+exec - fi
+done ${INSTALLROOT}/include/ast/tar.h generated
+make ${INSTALLROOT}/include/ast/times.h
+prev include/times.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/times.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/times.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/times.h
+exec - fi
+done ${INSTALLROOT}/include/ast/times.h generated
+make ${INSTALLROOT}/include/ast/tm.h
+prev include/tm.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/tm.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/tm.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/tm.h
+exec - fi
+done ${INSTALLROOT}/include/ast/tm.h generated
+make ${INSTALLROOT}/include/ast/tok.h
+prev include/tok.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/tok.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/tok.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/tok.h
+exec - fi
+done ${INSTALLROOT}/include/ast/tok.h generated
+make ${INSTALLROOT}/include/ast/usage.h
+make include/usage.h
+done include/usage.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/usage.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/usage.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/usage.h
+exec - fi
+done ${INSTALLROOT}/include/ast/usage.h generated
+make ${INSTALLROOT}/include/ast/vdb.h
+make include/vdb.h
+done include/vdb.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/vdb.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/vdb.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/vdb.h
+exec - fi
+done ${INSTALLROOT}/include/ast/vdb.h generated
+make ${INSTALLROOT}/include/ast/vecargs.h
+prev include/vecargs.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/vecargs.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/vecargs.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/vecargs.h
+exec - fi
+done ${INSTALLROOT}/include/ast/vecargs.h generated
+make ${INSTALLROOT}/include/ast/vmalloc.h
+prev include/vmalloc.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/vmalloc.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/vmalloc.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/vmalloc.h
+exec - fi
+done ${INSTALLROOT}/include/ast/vmalloc.h generated
+make ${INSTALLROOT}/include/ast/wait.h
+prev include/wait.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/wait.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/wait.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/wait.h
+exec - fi
+done ${INSTALLROOT}/include/ast/wait.h generated
+make ${INSTALLROOT}/include/ast/wordexp.h
+prev comp/wordexp.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/wordexp.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/wordexp.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/wordexp.h
+exec - fi
+done ${INSTALLROOT}/include/ast/wordexp.h generated
+make ${INSTALLROOT}/include/ast/bytesex.h
+prev std/bytesex.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' std/bytesex.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/bytesex.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/bytesex.h
+exec - fi
+done ${INSTALLROOT}/include/ast/bytesex.h generated
+make ${INSTALLROOT}/include/ast/endian.h
+prev std/endian.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' std/endian.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/endian.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/endian.h
+exec - fi
+done ${INSTALLROOT}/include/ast/endian.h generated
+make ${INSTALLROOT}/include/ast/fnmatch.h
+prev comp/fnmatch.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/fnmatch.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fnmatch.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fnmatch.h
+exec - fi
+done ${INSTALLROOT}/include/ast/fnmatch.h generated
+make ${INSTALLROOT}/include/ast/magicid.h
+make include/magicid.h
+prev ast_common.h implicit
+done include/magicid.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/magicid.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/magicid.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/magicid.h
+exec - fi
+done ${INSTALLROOT}/include/ast/magicid.h generated
+make ${INSTALLROOT}/include/ast/fnv.h
+prev include/fnv.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/fnv.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fnv.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fnv.h
+exec - fi
+done ${INSTALLROOT}/include/ast/fnv.h generated
+make ${INSTALLROOT}/include/ast/aso.h
+prev include/aso.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/aso.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/aso.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/aso.h
+exec - fi
+done ${INSTALLROOT}/include/ast/aso.h generated
+make ${INSTALLROOT}/include/ast/dirent.h
+prev std/dirent.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' std/dirent.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/dirent.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/dirent.h
+exec - fi
+done ${INSTALLROOT}/include/ast/dirent.h generated
+make ${INSTALLROOT}/include/ast/iconv.h
+prev std/iconv.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' std/iconv.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/iconv.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/iconv.h
+exec - fi
+done ${INSTALLROOT}/include/ast/iconv.h generated
+make ${INSTALLROOT}/include/ast/nl_types.h
+prev std/nl_types.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' std/nl_types.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/nl_types.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/nl_types.h
+exec - fi
+done ${INSTALLROOT}/include/ast/nl_types.h generated
+make ${INSTALLROOT}/include/ast/stdio.h
+prev std/stdio.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' std/stdio.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/stdio.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/stdio.h
+exec - fi
+done ${INSTALLROOT}/include/ast/stdio.h generated
+make ${INSTALLROOT}/include/ast/wchar.h
+prev std/wchar.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' std/wchar.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/wchar.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/wchar.h
+exec - fi
+done ${INSTALLROOT}/include/ast/wchar.h generated
+make ${INSTALLROOT}/include/ast/wctype.h
+prev std/wctype.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' std/wctype.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/wctype.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/wctype.h
+exec - fi
+done ${INSTALLROOT}/include/ast/wctype.h generated
+make ${INSTALLROOT}/include/ast/align.h
+prev align.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' align.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/align.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/align.h
+exec - fi
+done ${INSTALLROOT}/include/ast/align.h generated
+make ${INSTALLROOT}/include/ast/preroot.h
+prev preroot.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' preroot.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/preroot.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/preroot.h
+exec - fi
+done ${INSTALLROOT}/include/ast/preroot.h generated
+make ${INSTALLROOT}/include/ast/sig.h
+prev sig.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' sig.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/sig.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/sig.h
+exec - fi
+done ${INSTALLROOT}/include/ast/sig.h generated
+make ${INSTALLROOT}/include/ast/tmx.h
+prev tmx.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' tmx.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/tmx.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/tmx.h
+exec - fi
+done ${INSTALLROOT}/include/ast/tmx.h generated
+make ${INSTALLROOT}/include/ast/tv.h
+prev tv.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' tv.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/tv.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/tv.h
+exec - fi
+done ${INSTALLROOT}/include/ast/tv.h generated
+make ${INSTALLROOT}/include/ast/ast_api.h
+prev ast_api.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_api.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_api.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_api.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_api.h generated
+make ${INSTALLROOT}/include/ast/ast_botch.h
+prev ast_botch.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_botch.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_botch.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_botch.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_botch.h generated
+make ${INSTALLROOT}/include/ast/ast_ccode.h
+prev ast_ccode.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_ccode.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_ccode.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_ccode.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_ccode.h generated
+make ${INSTALLROOT}/include/ast/ast_fcntl.h
+prev ast_fcntl.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_fcntl.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_fcntl.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_fcntl.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_fcntl.h generated
+make ${INSTALLROOT}/include/ast/ast_float.h
+make ast_float.h
+prev FEATURE/float
+exec - cmp 2>/dev/null -s FEATURE/float ast_float.h || { rm -f ast_float.h; silent test -d . || mkdir .; ${STDCP} FEATURE/float ast_float.h; }
+prev ast_common.h implicit
+done ast_float.h generated
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_float.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_float.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_float.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_float.h generated
+make ${INSTALLROOT}/include/ast/ast_fs.h
+prev ast_fs.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_fs.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_fs.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_fs.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_fs.h generated
+make ${INSTALLROOT}/include/ast/ast_lib.h
+prev ast_lib.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_lib.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_lib.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_lib.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_lib.h generated
+make ${INSTALLROOT}/include/ast/ast_map.h
+prev ast_map.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_map.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_map.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_map.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_map.h generated
+make ${INSTALLROOT}/include/ast/ast_mmap.h
+prev ast_mmap.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_mmap.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_mmap.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_mmap.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_mmap.h generated
+make ${INSTALLROOT}/include/ast/ast_mode.h
+prev ast_mode.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_mode.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_mode.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_mode.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_mode.h generated
+make ${INSTALLROOT}/include/ast/ast_ndbm.h
+make ast_ndbm.h
+make FEATURE/ndbm
+meta FEATURE/ndbm features/%>FEATURE/% features/ndbm ndbm
+make features/ndbm
+done features/ndbm
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/ndbm
+prev std/stdio.h implicit
+done FEATURE/ndbm generated
+exec - cmp 2>/dev/null -s FEATURE/ndbm ast_ndbm.h || { rm -f ast_ndbm.h; silent test -d . || mkdir .; ${STDCP} FEATURE/ndbm ast_ndbm.h; }
+done ast_ndbm.h generated
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_ndbm.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_ndbm.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_ndbm.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_ndbm.h generated
+make ${INSTALLROOT}/include/ast/ast_param.h
+prev ast_param.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_param.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_param.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_param.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_param.h generated
+make ${INSTALLROOT}/include/ast/ast_sys.h
+prev ast_sys.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_sys.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_sys.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_sys.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_sys.h generated
+make ${INSTALLROOT}/include/ast/ast_time.h
+prev ast_time.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_time.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_time.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_time.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_time.h generated
+make ${INSTALLROOT}/include/ast/ast_tty.h
+prev ast_tty.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_tty.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_tty.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_tty.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_tty.h generated
+make ${INSTALLROOT}/include/ast/ast_vfork.h
+prev ast_vfork.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_vfork.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_vfork.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_vfork.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_vfork.h generated
+make ${INSTALLROOT}/include/ast/ast_wait.h
+prev ast_wait.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_wait.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_wait.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_wait.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_wait.h generated
+make ${INSTALLROOT}/include/ast/ast_limits.h
+prev ast_limits.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_limits.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_limits.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_limits.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_limits.h generated
+make ${INSTALLROOT}/include/ast/ast_standards.h
+prev ast_standards.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_standards.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_standards.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_standards.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_standards.h generated
+make ${INSTALLROOT}/include/ast/ast_sizeof.h
+make ast_sizeof.h
+make FEATURE/sizeof
+meta FEATURE/sizeof features/%>FEATURE/% features/sizeof sizeof
+make features/sizeof
+done features/sizeof
+exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' run features/sizeof
+done FEATURE/sizeof generated
+exec - cmp 2>/dev/null -s FEATURE/sizeof ast_sizeof.h || { rm -f ast_sizeof.h; silent test -d . || mkdir .; ${STDCP} FEATURE/sizeof ast_sizeof.h; }
+done ast_sizeof.h generated
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_sizeof.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_sizeof.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_sizeof.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_sizeof.h generated
+make ${INSTALLROOT}/include/ast/ast_dirent.h
+prev ast_dirent.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_dirent.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_dirent.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_dirent.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_dirent.h generated
+make ${INSTALLROOT}/include/ast/ast_iconv.h
+prev ast_iconv.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_iconv.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_iconv.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_iconv.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_iconv.h generated
+make ${INSTALLROOT}/include/ast/ast_nl_types.h
+prev ast_nl_types.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_nl_types.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_nl_types.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_nl_types.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_nl_types.h generated
+make ${INSTALLROOT}/include/ast/ast_stdio.h
+prev ast_stdio.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_stdio.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_stdio.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_stdio.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_stdio.h generated
+make ${INSTALLROOT}/include/ast/ast_wchar.h
+prev ast_wchar.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_wchar.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_wchar.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_wchar.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_wchar.h generated
+make ${INSTALLROOT}/include/ast/ast_wctype.h
+prev ast_wctype.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' ast_wctype.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/ast_wctype.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/ast_wctype.h
+exec - fi
+done ${INSTALLROOT}/include/ast/ast_wctype.h generated
+make ${INSTALLROOT}/lib/file
+exec - if silent test ! -d ${INSTALLROOT}/lib/file
+exec - then mkdir -p ${INSTALLROOT}/lib/file
+exec - fi
+done ${INSTALLROOT}/lib/file generated
+make ${INSTALLROOT}/lib/file/magic
+prev ${INSTALLROOT}/lib/file
+make misc/magic.tab
+done misc/magic.tab
+exec - test '' = 'misc/magic.tab' || ${STDCMP} 2>/dev/null -s misc/magic.tab ${INSTALLROOT}/lib/file/magic || { ${STDMV} ${INSTALLROOT}/lib/file/magic ${INSTALLROOT}/lib/file/magic.old 2>/dev/null || true; ${STDCP} misc/magic.tab ${INSTALLROOT}/lib/file/magic ;}
+done ${INSTALLROOT}/lib/file/magic generated
+prev comp/fmtmsg.h
+prev ast_lib.h
+exec - case ${mam_cc_HOSTTYPE} in
+exec - win32.*)proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/fmtmsg.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fmtmsg.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fmtmsg.h
+exec - fi
+exec - ;;
+exec - *) silent grep -l 'define[ ][ ]*_[hl][di][rb]_fmtmsg' ast_lib.h > /dev/null || {
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/fmtmsg.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fmtmsg.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fmtmsg.h
+exec - fi
+exec - }
+exec - ;;
+exec - esac
+prev comp/libgen.h
+prev ast_lib.h
+exec - case ${mam_cc_HOSTTYPE} in
+exec - win32.*)proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/libgen.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/libgen.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/libgen.h
+exec - fi
+exec - ;;
+exec - *) silent grep -l 'define[ ][ ]*_[hl][di][rb]_libgen' ast_lib.h > /dev/null || {
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/libgen.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/libgen.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/libgen.h
+exec - fi
+exec - }
+exec - ;;
+exec - esac
+prev comp/syslog.h
+prev ast_lib.h
+exec - case ${mam_cc_HOSTTYPE} in
+exec - win32.*)proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/syslog.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/syslog.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/syslog.h
+exec - fi
+exec - ;;
+exec - *) silent grep -l 'define[ ][ ]*_[hl][di][rb]_syslog' ast_lib.h > /dev/null || {
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/syslog.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/syslog.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/syslog.h
+exec - fi
+exec - }
+exec - ;;
+exec - esac
+done install virtual
+make test
+done test dontcare virtual
diff --git a/usr/src/lib/libast/common/README b/usr/src/contrib/ast/src/lib/libast/README
index cc0cf82304..cc0cf82304 100644
--- a/usr/src/lib/libast/common/README
+++ b/usr/src/contrib/ast/src/lib/libast/README
diff --git a/usr/src/lib/libast/common/RELEASE b/usr/src/contrib/ast/src/lib/libast/RELEASE
index 4480985146..47ddeaf37b 100644
--- a/usr/src/lib/libast/common/RELEASE
+++ b/usr/src/contrib/ast/src/lib/libast/RELEASE
@@ -1,3 +1,191 @@
+12-07-25 pathprobe.c: fix read() loop to handle EINTR
+12-06-28 vmalloc/malloc.c: use sbrk() unless VMALLOC_OPTIONS=mmap or asoinit(0,0,0)!=0 (workaround until next malloc update)
+12-06-28 aso/aso.c: asoinit(0,0,0): 0: no specific init, 1: app initialized
+12-06-27 sfio/sfvprintf.c: allow { L* z* } aliases for I* -- posix will probably pick one
+12-06-26 regex/regnexec.c: fix uninitialized variable reference
+12-06-26 comp/setlocale.c: utf8_wctomb() now calls (the corrrect) wc2utf8()
+12-06-25 string/chresc.c: accept \u[U+<hex>] and \u{U+<hex>}
+12-06-24 regex/regcomp.c: mb [^...] must be marked "complicated"
+12-06-20 port/astconf.c: increase DEBUG_astconf error debug levels (may leach into rt output)
+12-06-18 sfio/_sfopen.c: add 'e' => O_CLOEXEC
+12-06-18 features/fcntl.c: add #define O_CLOEXEC 0 if not defined
+12-06-13 features/float: handle __mips c99 peculiarities
+12-06-13 features/standards: handle __MACH__ posix peculiarities
+12-06-08 sfio/sfclose.c,sfmode.c: sfclose() for sfopopen() stream returns sh-compatible $?
+12-06-08 comp/strtold.c: fix header botch that missed ldexpl() prototype -- ouch
+12-06-06 misc/proclib.h: partially undo <ast_standards.h> for leaked ancient bsd-isms
+12-05-31 misc/proclib.h: <ast_standards.h> for linux undefined struct mmsghdr*
+12-05-31 error.h: add ERROR_PIPE(errno) to handle EPIPE and ECONNRESET
+12-05-31 Makefile: don't install $(INCLUDEDIR)/prototyped.h: src/cmd/INIT does it
+12-05-31 regcomp.c: add (?V...) ~(V...) REG_REGEXP switch
+12-05-28 regex: regoff_t in => ssize_t via api 20120528
+12-05-21 features/asometh: split intrinsic and method tests so code only instantiated in aso.c
+12-05-21 comp/strdup.c: use oldof() since mem overwritten by string copy
+12-05-18 misc/stk.c: fix access of moved realloc() data
+12-05-15 misc/optget.c: #? option with no value should have opt_info.num==0
+12-05-11 misc/stk.c: fix memmove() read of 1 uninitialized byte
+12-05-11 regex/regcoll.c: avoid memcpy() to self
+12-05-01 port/astconf.c: fix astconflist() to list standard minmax value if defined
+12-04-26 sfio/sftmp.c: fix memory leak due to inadvertent SF_STATIC copy
+12-04-26 sfio/sfwrite.c: fix subtle memory leak (with Vmlast or Vmpool or freeBSD malloc)
+12-04-26 vmalloc/vmbest.c: SIGSEGV overcommit check for __linux__ only
+12-04-25 vmalloc: add _vmfd() for private close-on-exec fds
+12-04-23 sfio_t.h: change getr to 32 bits to prepare for UTF-8 delimiters
+12-04-23 features/signal.c: add SIGSTKFLT
+12-04-17 regex/regcomp.c: fix (E:...) vs (E)... scoping
+12-04-11 features/sys: add aix's _LARGE_FILE_API to the _LARGEFILE(64)?_SOURCE mix -- anyone else?
+12-04-11 include/cmdarg.h,misc/cmdarg.c: (finally!) add a discipline with Cmdrun_f
+12-03-28 vmalloc: int vs [s]size_t cleanup
+12-03-27 sfio: fix #if logic that caused syntax errors (on 64 bit uwin)
+12-03-10 misc/optget.c: HELP_index for "PLUGIN" too
+12-02-29 include/shcmd.h: PLUGIN_VERSION 20111111 for cdt disc/meth change
+12-02-29 comp/spawnveg.c: fix sigcritical() to include waitpid() for internal child
+12-02-29 malloc.c: make __malloc_hook initialization thread safe
+12-02-24 comp/iconv.c: fix winix UTF-8 vs UCS-2 over-conversion
+12-02-24 astsa/*.h: clean up header guards
+12-02-24 astsa/astsa.omk: clean up standalone old make makefile interactions
+12-02-21 misc/cmdarg.c: fix bug that set argv[0]
+12-02-10 sfvprintf.c: fix 1 byte too long buffer access
+12-02-07 malloc.c/features/vmalloc: add gnu __malloc_hook tests
+12-02-06 vmmopen.c: fix ALIGN vs sys/param.h macro conflict
+12-02-02 astlicense.c: add license.component for component-specific licenses
+12-01-31 spawnveg.c: fix transient bug that made invalid setpgid() call
+12-01-27 pathpath.c: fix buffer size math when internal allocation requested
+12-01-24 malloc.c: fix _vmkeep() bug that did not return previous state
+12-01-23 malloc.c: add VMALLOC_OPTIONS=break to try sbrk() block allocator first
+12-01-21 astlicense.c: option style only overrides default license.type
+12-01-18 malloc.c: disable multiple regions for tracing or !vmbest or ASO_SIGNAL
+12-01-12 sfpkrd.c: add __sun I_PEEK+rsh runtime workaround
+12-01-10 shcmd.h: void* => Shbltin_t*
+12-01-10 tmxdate.c: handle { n>=1000 } TM_PARTS
+11-12-21 plug up some memory links -- thanks mhlavink
+11-12-21 vmprivate.c: enclose VM_NONMEM exception in CLRLOCK(vm,0) ... SETLOCK(vm,0)
+11-12-13 aso: in -lposix for uwin, not -last -- just like vmalloc
+11-12-13 sfpoll.c: all streams SF_IOINTR => don't ignore EINTR
+11-12-13 sfdcslow.c: set SF_IOINTR
+11-12-09 malloc.c: add _vmkeep() for setlocale() intercept _SYS_setlocale_free_OK
+11-12-04 sfio: _Sfmaxr=0 (unlimited) by default; use ulimit -M|-d or SFIO_OPTIONS
+11-12-01 aso: sync to new api
+11-11-11 optget.c: move .TH to the top for --nroff to get our macros first
+11-11-11 aso,cdt,vmalloc: resync with kpv
+11-11-11 cdt: preserve bits and Dt_link_t for CDT_VERSION < 20111111
+11-10-24 sfvprintf.c: %.-ns truncate from left to n chars
+11-10-21 sfvprintf.c: fix %0s (no width) core dump
+11-10-10 aso: add _WIN32 support
+11-09-26 vmalloc: sync with kpv
+11-08-29 features/{dirent,wchar,wctype}: eliminate #include with no header
+11-08-25 #pragma prototyped tweaks -- sun4 is dead, long live sun4
+11-08-25 ftwalk.c: FTS_SLNONE => FTW_SL
+11-08-11 features/wchar: fix #include _nxt_wchar for K&R C
+11-08-04 optget.c: tweak --html rendering
+11-07-24 mime.c: add %(default)[st] default if arg == ""
+11-07-21 setlocale.c: fix debug locale to treat "<<" as two single byte chars
+11-06-14 spawnveg.c: pgid -1: new session -2: setpgrp()&&tcsetpgid()
+11-06-14 pathprog.c: add darwin _NSGetExecutablePath
+11-05-14 features/common,features/align.c: { _X86_ _X64_ } conditionals for generic uwin
+11-05-13 tm/tminit.c: tweak tzname[] prototype
+11-05-09 astlicense.c: add ". file" parent-relative include and depth 4 input stack
+11-05-05 cmdarg: update to cmdopen_20110505 api
+11-05-03 sfio/sfclose.c: make sure close() errors propagate to sfclose() return value
+11-04-20 port/astlicense.c: add { id name } keys
+11-04-15 fmtdev.c: fix to work for non-{blk,chr} special
+11-04-12 stk: change size args to size_t and stseek() offset to ssize_t
+11-04-12 sfio: sync with kpv to optimize large SF_STRING sfputr() buffer allocation
+11-03-28 misc/fts.c: fix FTS_SLNONE logic to set it when it should!
+11-03-17 misc/stk.c: fixed bug that could delete an active stack frame
+11-03-10 sfio/sfvprintf.c: add %0<width>s to preserve <width> trailing chars in string arg
+11-03-09 misc/magic.c: add %d...%s where if %d==1 then %s=="" else %s=="s"
+11-03-09 misc/magic.tab: add windows ico
+11-02-08 misc/stk.c: change STK_FSIZE to (1024*sizeof(char*)) for 64 bit normalization
+11-02-02 sfio/sfmode.c: don't call sfsetbuf() on unbuffered stream to make it unbuffered
+11-02-02 features/wchar: handle hp.ia64 va_list interactions
+11-02-02 comp/omitted.c: fix mismatch between stat() vs _stat()
+11-01-31 std/wctype,features/wctype: add to handle <wchar.h> interactions
+11-01-28 add -lw for ancient sunos
+11-01-28 include/magic.h,misc/magic.c: add MAGIC_ALL
+11-01-27 tm/tmxfmt.c,tmpoff.c: %_z for SHH:MM
+11-01-25 features/wchar: change <wctype.h> <wchar.h> ordering
+10-12-24 sfstrtof.h: fix thousand grouping bug that did not check last group
+10-12-21 pathkey.c: add win32 { /32 /64 } preroot to hash
+10-12-09 pathprog.c: handle intermediate path != '* and fix invalid pathpath() call
+10-12-01 astconf.c: fix look.standard undefined variable reference
+10-12-01 sfset.c: SF_LINE|SF_WCWIDTH => no need for sfsetbuf() to call isatty()
+10-12-01 sfsetbuf.c: cache /dev/null <dev,ino> to cut down /dev/null stat()'s
+10-12-01 optget.c: delay dictionary initialization until needed
+10-11-30 malloc.c: drop { VMDEBUG VMETHOD VMPROFILE VMTRACE } env checks
+10-11-30 port/astconf.c: eliminate esaccess() calls for OP_universe checks
+10-11-24 regcomp.c: [[=]=]] must at least match itself in non-C locales
+10-11-23 glob.h,glob.c: add GLOB_GROUP => REG_SHELL_GROUP
+10-11-20 glob.c: handle mode switches across /
+10-11-19 regcomp.c: REG_SHELL => REG_CLASS_ESCAPE
+10-11-16 vmalloc.h: add VMFL tracing to vmstrdup()
+10-11-16 ast.h: simplify VMDEBUG _BLD_DEBUG and VMFL logic
+10-11-12 tm/tmlocale.c: ast TM_* extensions default to C locale
+10-11-10 regex/regnexec.c,vmalloc/vmstat.c: eliminate strict-aliasing puns
+10-10-20 misc/translate.c: change debug translation to drop " in (a,b,c,"d")
+10-10-10 misc/glob.c: drop ancient D_FILENO(d)!=0 test and trust readdir()
+10-10-06 misc/translate.c: fix "debug" locale logic
+10-10-04 misc/magic.c: fix magic() skip check to honor the continuation
+10-10-04 regex/regcoll.c: add wchar_t* args to regcollate(), drop ucs name lookup
+10-09-28 comp/setlocale.c: add utf8_wctomb()
+10-09-28 string/chresc.c,regex/regcoll.c: fix \S[.X.] (\C[.X.] never worked!)
+10-09-24 string/chresc.c: \Cc for control c, \S[.X.] for collating symbol X
+10-09-24 string/chresc.c: { \cc \e } deprecated
+10-09-22 regex/regcomp.c: fix off-by-one collation class allocation bug
+10-09-20 regex/regclass.c: fix CTYPES off-by-one bug
+10-09-14 comp/conf.sh: const int conf_elements, prefix_elements;
+10-09-08 add features/sizeof => ast_sizeof.h
+10-08-31 comp/getopt[l].c: export functions for dlls
+10-08-25 port/lc.c: add features/locale check for canonical UTF-8 spelling
+10-08-20 include/ast.h: add export plugin_version() prototype
+10-08-20 comp/conf.tab: add SF_BUFSIZE
+10-08-11 misc/conformance.c: conformance(0,0) => "standard"
+10-08-11 misc/conformance.c: check ast_env_serial for dynamic astconf() changes
+10-08-11 port/lcgen.c: remember to fudge Table_t.count for synthesized entries
+10-08-04 include/ast.h,comp/setlocale.c: add { debug C.UTF-8 } mbalpha() mbwidth()
+10-08-02 misc/translate.c: add NLSPATH message cache check
+10-07-29 string/fmtint.c: fix nasty bug that rendered "1000" as "1"
+10-07-27 setlocale,lsgen,localeconv: handle C vs C_EU decimal thousands sep
+10-07-26 misc/optget.c: fix interaction with nested plugin/builtin calls
+10-06-29 string/strtoi.h: strton() multiplier 1 => power of two suffix
+10-06-28 features/wchar: handle systems that require __va_list => va_list
+10-06-28 comp/conf.tab: another PID_MAX tweak -- default to 99999 for most
+10-06-28 port/astconf.c: lone "CONFORMANCE = standard" => all defaults standard
+10-06-25 misc/optget.c: avoid sfprints() call during initialization
+10-06-01 features/api, ast_api.h: formalized forwards/backwards api compatibility
+10-06-01 _AST_API=20100601: add size_t args for all path*() output buffers
+10-06-01 comp/setlocale.c: handle C.UTF-8 test locale
+10-06-01 include/mc.h: add size_t to mcfind() for result buffer (internal api)
+10-06-01 use strlcpy() instead of strncpy()
+10-05-28 include/ast_version.h: add AST_PLUGIN_VERSION for dllplugin()
+10-05-28 include/shcmd.h: add SH_PLUGIN_VERSION for dllplugin()
+10-05-28 misc/conformance.c: add conformance(3)
+10-05-28 misc/optget.c: add [(id1|id2)...] conformance("id1|id2",0) conditionals
+10-05-25 include/sfhdr.h: adjust SF_NMAP according to _ptr_bits
+10-05-25 include/shcmd.h: add sh_builtin() macro for lib_init() table initialization
+10-05-21 misc/optget.c: --html \bfoo::bar([[:digit:]][[:upper:]]*) => foo-bar.html
+10-05-15 include/proc.h,misc/procopen.c: add PROC_ORPHAN
+10-05-09 misc/optget.c: add --???MAN[section] --???SECTION
+10-05-07 sfio,stdio: fix all snprintf() variants to handle buf==0 and/or n==0
+10-05-04 string/fmtesc.c: add mb iswsoace() and iswcntrl() quoting checks
+10-05-03 fix LC_MESSAGES catalog lookup bugs, check for $set==3, accept $set==1
+10-04-30 string/chresc.c: add chrexp() for FMT_EXP_*
+10-04-30 string/stresc.c: add strexp() for FMT_EXP_*
+10-04-30 string/chresc.c: fix \uXXXXY bug that consumed Y
+10-04-22 misc/optget.c: check for html entities in <A name="...">
+10-04-22 misc/getcwd.c: add features/syscall check for SYSGETCWD() { linux solaris }
+10-04-22 string/stresc.c: wide chars absent locale guidance default to UTF-8
+10-04-12 port/mnt.c: favor bsd getfsstat() over getmntinfo()
+10-04-11 string/strtoi.h: k (1000) and ki (1024) now differentiated
+10-04-10 misc/recstr.c: fix 'd[delimiter]' parse
+10-04-08 include/vmalloc.h,vmalloc/vmstat.c: add Vmstat_t.mode region mode bits
+10-04-05 misc/fts.c: drop 1997-01-07 fts_open()=0 is one file and stat() fails
+10-04-05 misc/optget.c,optlib.h: add Optpass_t.release for --nroff .TH
+10-04-02 misc/optget.c: fix $'[-n?\n...]' --version bug
+10-04-02 regex/regcomp.c: ~(X) => REG_EXTENDED|REG_AUGMENTED, ~(PU) instead of ~(U)
+10-03-24 misc/procopen.c: add PROC_FD_CTTY(fd)
+10-03-24 path/pathtemp.c: fix pointer => int casts
+10-03-15 regex/regcache.c: fix 1 byte buffer overflow (didn't count trailing \0)
10-03-08 features/tvlib: fix utimensat probe to include all macros/structs
10-03-07 features/lib: change stream_peek to test pipes only
10-03-07 string/strelapsed.c: fix next char return overrun
@@ -912,7 +1100,7 @@
01-10-05 misc/glob.c: fix `\(x/*' GLOB_NOMATCH bug that returned `(x'
misc/optget.c: fix localization lookup that didn't drop doubled : ? ]
01-10-04 comp/setlocale.c: handle sizeof(wchar_t)!=4 in debug locale
- comp/conf.sh: handle systems where _SC_* is both an enum and a macro
+ comp/conf.sh: handle sytems where _SC_* is both an enum and a macro
01-09-25 astconf: add LIBPREFIX
01-09-20 features/common: add __DYNAMIC__() for dll externs
01-09-19 cdt: kpv update
diff --git a/usr/src/contrib/ast/src/lib/libast/aso/aso-fcntl.c b/usr/src/contrib/ast/src/lib/libast/aso/aso-fcntl.c
new file mode 100644
index 0000000000..12f1ecfbd9
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/aso/aso-fcntl.c
@@ -0,0 +1,188 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#include "asohdr.h"
+
+#if defined(_UWIN) && defined(_BLD_ast) || !_aso_fcntl
+
+NoN(aso_meth_fcntl)
+
+#else
+
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+typedef struct APL_s
+{
+ int fd;
+ size_t size;
+ char path[1];
+} APL_t;
+
+static void*
+aso_init_fcntl(void* data, const char* details)
+{
+ APL_t* apl = (APL_t*)data;
+ char* path;
+ char* opt;
+ size_t size;
+ size_t references;
+ int n;
+ int fd;
+ int drop;
+ int perm;
+ struct flock lock;
+ char buf[PATH_MAX];
+ char tmp[64];
+
+ if (apl)
+ {
+ lock.l_type = F_WRLCK;
+ lock.l_whence = SEEK_SET;
+ lock.l_start = apl->size;
+ lock.l_len = sizeof(references);
+ if (fcntl(apl->fd, F_SETLKW, &lock) >= 0)
+ {
+ if (lseek(apl->fd, apl->size, SEEK_SET) != apl->size)
+ references = 0;
+ else if (read(apl->fd, &references, sizeof(references)) != sizeof(references))
+ references = 0;
+ else if (references > 0)
+ {
+ references--;
+ if (lseek(apl->fd, apl->size, SEEK_SET) != apl->size)
+ references = 0;
+ else if (write(apl->fd, &references, sizeof(references)) != sizeof(references))
+ references = 0;
+ }
+ lock.l_type = F_UNLCK;
+ fcntl(apl->fd, F_SETLK, &lock);
+ if (!references)
+ remove(apl->path);
+ }
+ close(apl->fd);
+ free(apl);
+ return 0;
+ }
+ fd = -1;
+ perm = S_IRUSR|S_IWUSR;
+ drop = 0;
+ size = 32 * 1024 - sizeof(references);
+ if (path = (char*)details)
+ while (opt = strchr(path, ','))
+ {
+ if (strneq(path, "perm=", 5))
+ {
+ if ((n = opt - (path + 5)) >= sizeof(tmp))
+ n = sizeof(tmp) - 1;
+ memcpy(tmp, path + 5, n);
+ tmp[n] = 0;
+ perm = strperm(tmp, NiL, perm);
+ }
+ else if (strneq(path, "size=", 5))
+ {
+ size = strtoul(path + 5, NiL, 0);
+ if (size <= sizeof(references))
+ goto bad;
+ size -= sizeof(references);
+ }
+ path = opt + 1;
+ }
+ if (!path || !*path)
+ {
+ if (!(path = pathtemp(buf, sizeof(buf), NiL, "aso", &fd)))
+ return 0;
+ drop = 1;
+ }
+ if (!(apl = newof(0, APL_t, 1, strlen(path))))
+ goto bad;
+ if (fd >= 0 || (fd = open(path, O_RDWR|O_cloexec)) < 0 && (fd = open(path, O_CREAT|O_RDWR|O_cloexec, perm)) >= 0)
+ {
+ if (lseek(fd, size, SEEK_SET) != size)
+ goto bad;
+ references = 1;
+ if (write(fd, &references, sizeof(references)) != sizeof(references))
+ goto bad;
+ }
+ else
+ {
+ if ((size = lseek(fd, 0, SEEK_END)) <= sizeof(references))
+ goto bad;
+ size -= sizeof(references);
+ lock.l_type = F_WRLCK;
+ lock.l_whence = SEEK_SET;
+ lock.l_start = 0;
+ lock.l_len = sizeof(references);
+ if (fcntl(fd, F_SETLKW, &lock) < 0)
+ goto bad;
+ if (lseek(fd, size, SEEK_SET) != size)
+ goto bad;
+ if (read(fd, &references, sizeof(references)) != sizeof(references))
+ goto bad;
+ references++;
+ if (lseek(fd, size, SEEK_SET) != size)
+ goto bad;
+ if (write(fd, &references, sizeof(references)) != sizeof(references))
+ goto bad;
+ lock.l_type = F_UNLCK;
+ fcntl(fd, F_SETLK, &lock);
+ }
+ apl->fd = fd;
+ apl->size = size;
+ strcpy(apl->path, path);
+ return apl;
+ bad:
+ if (apl)
+ free(apl);
+ if (fd >= 0)
+ close(fd);
+ if (drop)
+ remove(path);
+ return 0;
+}
+
+static ssize_t
+aso_lock_fcntl(void* data, ssize_t k, void volatile* p)
+{
+ APL_t* apl = (APL_t*)data;
+ struct flock lock;
+
+ if (!apl)
+ return -1;
+ if (k > 0)
+ lock.l_type = F_UNLCK;
+ else
+ {
+ lock.l_type = F_WRLCK;
+ k = HASH(p, apl->size) + 1;
+ }
+ lock.l_whence = SEEK_SET;
+ lock.l_start = k - 1;
+ lock.l_len = 1;
+ return fcntl(apl->fd, F_SETLKW, &lock) < 0 ? -1 : k;
+}
+
+Asometh_t _aso_meth_fcntl = { "fcntl", ASO_PROCESS, aso_init_fcntl, aso_lock_fcntl };
+
+#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/aso/aso-sem.c b/usr/src/contrib/ast/src/lib/libast/aso/aso-sem.c
new file mode 100644
index 0000000000..5ed9b729e3
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/aso/aso-sem.c
@@ -0,0 +1,193 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#include "asohdr.h"
+
+#if defined(_UWIN) && defined(_BLD_ast) || !_aso_semaphore
+
+NoN(aso_meth_semaphore)
+
+#else
+
+#include <sys/stat.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
+
+#define SPIN 1000000
+
+typedef union Semun_u
+{
+ int val;
+ struct semid_ds* ds;
+ unsigned short* array;
+} Semun_t;
+
+typedef struct APL_s
+{
+ int id;
+ size_t size;
+} APL_t;
+
+static void*
+aso_init_semaphore(void* data, const char* details)
+{
+ APL_t* apl = (APL_t*)data;
+ char* path;
+ char* opt;
+ size_t size;
+ size_t n;
+ int key;
+ int id;
+ int perm;
+ struct sembuf sem;
+ char tmp[64];
+
+ if (apl)
+ {
+ /*
+ * semaphore 0 is the reference count
+ * the id is dropped on last reference
+ */
+
+ sem.sem_num = 0;
+ sem.sem_op = -1;
+ sem.sem_flg = IPC_NOWAIT;
+ semop(apl->id, &sem, 1);
+ sem.sem_op = 0;
+ if (!semop(apl->id, &sem, 1))
+ semctl(apl->id, 0, IPC_RMID);
+ free(apl);
+ return 0;
+ }
+ perm = S_IRUSR|S_IWUSR;
+ size = 128;
+ if (path = (char*)details)
+ while (opt = strchr(path, ','))
+ {
+ if (strneq(path, "perm=", 5))
+ {
+ if ((n = opt - (path + 5)) >= sizeof(tmp))
+ n = sizeof(tmp) - 1;
+ memcpy(tmp, path + 5, n);
+ tmp[n] = 0;
+ perm = strperm(tmp, NiL, perm);
+ }
+ else if (strneq(path, "size=", 5))
+ {
+ size = strtoul(path + 5, NiL, 0);
+ if (size <= 1)
+ return 0;
+ }
+ path = opt + 1;
+ }
+ key = (!path || !*path || streq(path, "private")) ? IPC_PRIVATE : (strsum(path, 0) & 0x7fff);
+ for (;;)
+ {
+ if ((id = semget(key, size, IPC_CREAT|IPC_EXCL|perm)) >= 0)
+ {
+ /*
+ * initialize all semaphores to 0
+ * this also sets the semaphore 0 ref count
+ */
+
+ sem.sem_op = 1;
+ sem.sem_flg = 0;
+ for (sem.sem_num = 0; sem.sem_num < size; sem.sem_num++)
+ if (semop(id, &sem, 1) < 0)
+ {
+ (void)semctl(id, 0, IPC_RMID);
+ return 0;
+ }
+ break;
+ }
+ else if (errno == EINVAL && size > 3)
+ size /= 2;
+ else if (errno != EEXIST)
+ return 0;
+ else if ((id = semget(key, size, perm)) >= 0)
+ {
+ struct semid_ds ds;
+ Semun_t arg;
+ unsigned int k;
+
+ /*
+ * make sure all semaphores have been activated
+ */
+
+ arg.ds = &ds;
+ for (k = 0; k < SPIN; ASOLOOP(k))
+ {
+ if (semctl(id, size-1, IPC_STAT, arg) < 0)
+ return 0;
+ if (ds.sem_otime)
+ break;
+ }
+ if (k > SPIN)
+ return 0;
+
+ /*
+ * bump the ref count
+ */
+
+ sem.sem_num = 0;
+ sem.sem_op = 1;
+ sem.sem_flg = 0;
+ if (semop(id, &sem, 1) < 0)
+ return 0;
+ break;
+ }
+ else if (errno == EINVAL && size > 3)
+ size /= 2;
+ else
+ return 0;
+ }
+ if (!(apl = newof(0, APL_t, 1, 0)))
+ return 0;
+ apl->id = id;
+ apl->size = size - 1;
+ return apl;
+}
+
+static ssize_t
+aso_lock_semaphore(void* data, ssize_t k, void volatile* p)
+{
+ APL_t* apl = (APL_t*)data;
+ struct sembuf sem;
+
+ if (!apl)
+ return -1;
+ if (k > 0)
+ sem.sem_op = 1;
+ else
+ {
+ sem.sem_op = -1;
+ k = HASH(p, apl->size) + 1;
+ }
+ sem.sem_num = k;
+ sem.sem_flg = 0;
+ return semop(apl->id, &sem, 1) < 0 ? -1 : k;
+}
+
+Asometh_t _aso_meth_semaphore = { "semaphore", ASO_PROCESS|ASO_THREAD, aso_init_semaphore, aso_lock_semaphore };
+
+#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/aso/aso.c b/usr/src/contrib/ast/src/lib/libast/aso/aso.c
new file mode 100644
index 0000000000..f9be55ab56
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/aso/aso.c
@@ -0,0 +1,867 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#include "asohdr.h"
+#include "FEATURE/aso"
+
+#if defined(_UWIN) && defined(_BLD_ast)
+
+NoN(aso)
+
+#else
+
+/*
+ * ast atomic scalar operations
+ * AT&T Research
+ *
+ * cas { 8 16 32 [64] } subset snarfed from the work by
+ * Adam Edgar and Kiem-Phong Vo 2010-10-10
+ *
+ * lock methods and emulations by
+ * Glenn Fowler 2011-11-11
+ *
+ * hopefully stable by 2012-12-12
+ */
+
+#if !_PACKAGE_ast
+
+#if _UWIN
+
+extern ssize_t sfsprintf(char*, size_t, const char*, ...);
+
+#else
+
+#include <stdio.h>
+
+#define sfsprintf snprintf
+
+#endif
+
+#endif
+
+#if defined(_aso_casptr) && (defined(_aso_cas32) || defined(_aso_cas64))
+#define ASO_METHOD (&_aso_meth_intrinsic)
+#define ASO_LOCKF 0
+#else
+#define ASO_METHOD (&_aso_meth_signal)
+#define ASO_LOCKF _aso_lock_signal
+#endif
+
+typedef union
+{
+ uint8_t c[2];
+ uint16_t i;
+} U16_8_t;
+
+typedef union
+{
+ uint8_t c[4];
+ uint32_t i;
+} U32_8_t;
+
+typedef union
+{
+ uint16_t c[2];
+ uint32_t i;
+} U32_16_t;
+
+#ifdef _ast_int8_t
+
+typedef union
+{
+ uint8_t c[8];
+ uint64_t i;
+} U64_8_t;
+
+typedef union
+{
+ uint16_t c[4];
+ uint64_t i;
+} U64_16_t;
+
+typedef union
+{
+ uint32_t c[2];
+ uint64_t i;
+} U64_32_t;
+
+#endif
+
+typedef struct State_s
+{
+ Asometh_t* meth;
+ Asolock_f lockf;
+ Asoerror_f errorf;
+ uintmax_t hung;
+ unsigned int hung2;
+ void* data;
+ pid_t pid;
+} State_t;
+
+static unsigned int _aso_data_signal;
+
+static ssize_t
+_aso_lock_signal(void* data, ssize_t k, void volatile* p)
+{
+ if (k >= 0)
+ {
+ _aso_data_signal--;
+ return 0;
+ }
+ while (_aso_data_signal++)
+ _aso_data_signal--;
+ return 1;
+}
+
+static Asometh_t _aso_meth_signal = { "signal", ASO_SIGNAL, 0, _aso_lock_signal };
+extern Asometh_t _aso_meth_semaphore;
+extern Asometh_t _aso_meth_fcntl;
+static Asometh_t _aso_meth_intrinsic = { "intrinsic", ASO_INTRINSIC|ASO_PROCESS|ASO_THREAD|ASO_SIGNAL, 0, 0 };
+
+static Asometh_t* method[] =
+{
+ &_aso_meth_signal,
+#if defined(_ast_int8_t) && defined(_aso_cas64) || !defined(_ast_int8_t) && defined(_aso_cas32)
+ &_aso_meth_intrinsic,
+#endif
+#if _aso_semaphore
+ &_aso_meth_semaphore,
+#endif
+#if _aso_fcntl
+ &_aso_meth_fcntl,
+#endif
+};
+
+static State_t state =
+{
+ ASO_METHOD, ASO_LOCKF
+};
+
+static int
+asoerror(int type, const char* format, const char* a, const char* b, long n)
+{
+ char buf[128];
+
+ if (b)
+ sfsprintf(buf, sizeof(buf), format, a, b, n);
+ else if (a)
+ sfsprintf(buf, sizeof(buf), format, a, n);
+ else
+ sfsprintf(buf, sizeof(buf), format, n);
+ return state.errorf(type, buf);
+}
+
+/*
+ * if type!=0 return lock method for type with name details
+ * else if name!=0 return lock method matching <name>[,<details>]
+ * else return the current lock method
+ * 0 returned on error
+ *
+ * the user visible asometh() calls this function
+ * it allows, e.g., for -ltaso to provide an asometh() intercept
+ * that prepends its ASO_THREAD methods ahead of the _asometh() methods
+ */
+
+Asometh_t*
+_asometh(int type, void* data)
+{
+ size_t n;
+ int i;
+ char* e;
+ Asometh_t* meth;
+ char* name;
+
+ if (type == ASO_NEXT)
+ {
+ if (!(meth = (Asometh_t*)data))
+ return method[0];
+ for (i = 0; i < elementsof(method) - 1; i++)
+ if (meth == method[i])
+ return method[i+1];
+ return 0;
+ }
+ if (type)
+ {
+ for (i = 0; i < elementsof(method); i++)
+ if (method[i]->type & type)
+ {
+ method[i]->details = (char*)data;
+ return method[i];
+ }
+ return 0;
+ }
+ if (!(name = (char*)data))
+ return state.meth;
+ n = (e = strchr(name, ',')) ? (e - name) : strlen(name);
+ for (i = 0; i < elementsof(method); i++)
+ if (strncmp(name, method[i]->name, n) == 0)
+ {
+ if (e)
+ method[i]->details = e + 1;
+ return method[i];
+ }
+ return 0;
+}
+
+/*
+ * clean up lock method on exit
+ */
+
+static void
+asoexit(void)
+{
+ if (state.meth && state.meth->initf && state.data && state.pid == getpid())
+ {
+ state.lockf = ASO_METHOD->lockf;
+ state.meth->initf(state.data, 0);
+ state.data = 0;
+ }
+}
+
+/*
+ * initialize lock method
+ */
+
+int
+asoinit(const char* details, Asometh_t* meth, Asodisc_t* disc)
+{
+ void* data;
+
+ if (disc)
+ {
+ state.errorf = disc->errorf;
+ state.hung2 = disc->hung;
+ state.hung = 1;
+ state.hung <<= state.hung2;
+ state.hung--;
+ }
+ if (!meth)
+ return state.pid != 0;
+ if (!meth->lockf && !(meth->type & ASO_INTRINSIC))
+ {
+ if (state.errorf)
+ asoerror(ASO_EMETHOD, "%s method has no lock function", meth->name, 0, 0);
+ return -1;
+ }
+ state.lockf = ASO_METHOD->lockf;
+ if (state.meth && state.meth->initf && state.data)
+ {
+ state.meth->initf(state.data, 0);
+ state.data = 0;
+ }
+ if (!meth->initf)
+ data = 0;
+ else if (!(data = meth->initf(0, details ? details : meth->details)))
+ {
+ state.meth = ASO_METHOD;
+ if (state.errorf)
+ asoerror(ASO_EMETHOD, "%s method initialization failed -- reverting to the %s method", meth->name, state.meth->name, 0);
+ return -1;
+ }
+ state.meth = meth;
+ state.data = data;
+ state.lockf = meth->lockf;
+ if (!state.pid)
+ {
+ state.pid = getpid();
+ atexit(asoexit);
+ }
+ return 0;
+}
+
+/*
+ * loop check for hung spin locks
+ * and periodic relinquishing of the processor
+ */
+
+int
+asoloop(uintmax_t rep)
+{
+ if (state.hung && !(rep & state.hung) && state.errorf)
+ return asoerror(ASO_EHUNG, "spin lock possibly hung after 2^%u attempts", 0, 0, state.hung2);
+ return (rep & ASO_RELAX) ? 0 : asorelax(1);
+}
+
+/*
+ * error checking state.lockf() call
+ */
+
+static ssize_t
+lock(void* data, ssize_t k, void volatile* p)
+{
+ ssize_t r;
+
+ if ((r = state.lockf(data, k, p)) < 0 && state.errorf)
+ asoerror(ASO_EMETHOD, "%s method lock failed", state.meth->name, 0, 0);
+ return r;
+}
+
+/*
+ * sync and return "current" value
+ */
+
+uint8_t
+asoget8(uint8_t volatile* p)
+{
+ int o;
+
+ do
+ {
+ o = *p;
+ } while (asocas8(p, o, o) != o);
+ return o;
+}
+
+uint16_t
+asoget16(uint16_t volatile* p)
+{
+ int o;
+
+ do
+ {
+ o = *p;
+ } while (asocas16(p, o, o) != o);
+ return o;
+}
+
+uint32_t
+asoget32(uint32_t volatile* p)
+{
+ uint32_t o;
+
+ do
+ {
+ o = *p;
+ } while (asocas32(p, o, o) != o);
+ return o;
+}
+
+#ifdef _ast_int8_t
+
+uint64_t
+asoget64(uint64_t volatile* p)
+{
+ uint64_t o;
+
+ do
+ {
+ o = *p;
+ } while (asocas64(p, o, o) != o);
+ return o;
+}
+
+#endif
+
+void*
+asogetptr(void volatile* p)
+{
+ void* o;
+
+ do
+ {
+ o = *(void* volatile*)p;
+ } while (asocasptr(p, o, o) != o);
+ return o;
+}
+
+/*
+ * increment and return old value
+ */
+
+uint8_t
+asoinc8(uint8_t volatile* p)
+{
+ ssize_t k;
+ int o;
+
+#if defined(_aso_inc8)
+ if (!state.lockf)
+ return _aso_inc8(p);
+#else
+ if (!state.lockf)
+ {
+ do
+ {
+ o = *p;
+ } while (asocas8(p, o, o + 1) != o);
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ o = (*p)++;
+ lock(state.data, k, p);
+ return o;
+}
+
+uint16_t
+asoinc16(uint16_t volatile* p)
+{
+ ssize_t k;
+ int o;
+
+#if defined(_aso_inc16)
+ if (!state.lockf)
+ return _aso_inc16(p);
+#else
+ if (!state.lockf)
+ {
+ do
+ {
+ o = *p;
+ } while (asocas16(p, o, o + 1) != o);
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ o = (*p)++;
+ lock(state.data, k, p);
+ return o;
+}
+
+uint32_t
+asoinc32(uint32_t volatile* p)
+{
+ ssize_t k;
+ int o;
+
+#if defined(_aso_inc32)
+ if (!state.lockf)
+ return _aso_inc32(p);
+#else
+ if (!state.lockf)
+ {
+ do
+ {
+ o = *p;
+ } while (asocas32(p, o, o + 1) != o);
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ o = (*p)++;
+ lock(state.data, k, p);
+ return o;
+}
+
+#ifdef _ast_int8_t
+
+uint64_t
+asoinc64(uint64_t volatile* p)
+{
+ ssize_t k;
+ uint64_t o;
+
+#if defined(_aso_inc64)
+ if (!state.lockf)
+ return _aso_inc64(p);
+#else
+ if (!state.lockf)
+ {
+ do
+ {
+ o = *p;
+ } while (asocas64(p, o, o + 1) != o);
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ o = (*p)++;
+ lock(state.data, k, p);
+ return o;
+}
+
+#endif
+
+/*
+ * decrement and return old value
+ */
+
+uint8_t
+asodec8(uint8_t volatile* p)
+{
+ ssize_t k;
+ int o;
+
+#if defined(_aso_dec8)
+ if (!state.lockf)
+ return _aso_dec8(p);
+#else
+ if (!state.lockf)
+ {
+ do
+ {
+ o = *p;
+ } while (asocas8(p, o, o - 1) != o);
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ o = (*p)--;
+ lock(state.data, k, p);
+ return o;
+}
+
+uint16_t
+asodec16(uint16_t volatile* p)
+{
+ ssize_t k;
+ int o;
+
+#if defined(_aso_dec16)
+ if (!state.lockf)
+ return _aso_dec16(p);
+#else
+ if (!state.lockf)
+ {
+ do
+ {
+ o = *p;
+ } while (asocas16(p, o, o - 1) != o);
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ o = (*p)--;
+ lock(state.data, k, p);
+ return o;
+}
+
+uint32_t
+asodec32(uint32_t volatile* p)
+{
+ ssize_t k;
+ int o;
+
+#if defined(_aso_dec32)
+ if (!state.lockf)
+ return _aso_dec32(p);
+#else
+ if (!state.lockf)
+ {
+ do
+ {
+ o = *p;
+ } while (asocas32(p, o, o - 1) != o);
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ o = (*p)--;
+ lock(state.data, k, p);
+ return o;
+}
+
+#ifdef _ast_int8_t
+
+uint64_t
+asodec64(uint64_t volatile* p)
+{
+ ssize_t k;
+ uint64_t o;
+
+#if defined(_aso_dec64)
+ if (!state.lockf)
+ return _aso_dec64(p);
+#else
+ if (!state.lockf)
+ {
+ do
+ {
+ o = *p;
+ } while (asocas64(p, o, o - 1) != o);
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ o = (*p)--;
+ lock(state.data, k, p);
+ return o;
+}
+
+#endif
+
+/*
+ * { 8 16 32 [64] } compare with old, swap with new if same, and return old value
+ */
+
+uint8_t
+asocas8(uint8_t volatile* p, int o, int n)
+{
+ ssize_t k;
+
+#if defined(_aso_cas8)
+ if (!state.lockf)
+ return _aso_cas8(p, o, n);
+#elif defined(_aso_cas16)
+ if (!state.lockf)
+ {
+ U16_8_t u;
+ U16_8_t v;
+ U16_8_t* a;
+ int s;
+ int i;
+
+ s = (int)(integralof(p) & (sizeof(u.i) - 1));
+ a = (U16_8_t*)((char*)0 + (integralof(p) & ~(sizeof(u.i) - 1)));
+ for (;;)
+ {
+ u.i = a->i;
+ u.c[s] = o;
+ v.i = u.i;
+ v.c[s] = n;
+ if (_aso_cas16(&a->i, u.i, v.i) == u.i)
+ break;
+ for (i = 0;; i++)
+ if (i >= elementsof(u.c))
+ return a->c[s];
+ else if (i != s && u.c[i] != a->c[i])
+ break;
+ }
+ return o;
+ }
+#elif defined(_aso_cas32)
+ if (!state.lockf)
+ {
+ U32_8_t u;
+ U32_8_t v;
+ U32_8_t* a;
+ int s;
+ int i;
+
+ s = (int)(integralof(p) & (sizeof(u.i) - 1));
+ a = (U32_8_t*)((char*)0 + (integralof(p) & ~(sizeof(u.i) - 1)));
+ for (;;)
+ {
+ u.i = a->i;
+ u.c[s] = o;
+ v.i = u.i;
+ v.c[s] = n;
+ if (_aso_cas32(&a->i, u.i, v.i) == u.i)
+ break;
+ for (i = 0;; i++)
+ if (i >= elementsof(u.c))
+ return a->c[s];
+ else if (i != s && u.c[i] != a->c[i])
+ break;
+ }
+ return o;
+ }
+#elif defined(_aso_cas64)
+ if (!state.lockf)
+ {
+ U64_8_t u;
+ U64_8_t v;
+ U64_8_t* a;
+ int s;
+ int i;
+
+ s = (int)(integralof(p) & (sizeof(u.i) - 1));
+ a = (U64_8_t*)((char*)0 + (integralof(p) & ~(sizeof(u.i) - 1)));
+ for (;;)
+ {
+ u.i = a->i;
+ u.c[s] = o;
+ v.i = u.i;
+ v.c[s] = n;
+ if (_aso_cas64(&a->i, u.i, v.i) == u.i)
+ break;
+ for (i = 0;; i++)
+ if (i >= elementsof(u.c))
+ return a->c[s];
+ else if (i != s && u.c[i] != a->c[i])
+ break;
+ }
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ if (*p == o)
+ *p = n;
+ else
+ o = *p;
+ lock(state.data, k, p);
+ return o;
+}
+
+uint16_t
+asocas16(uint16_t volatile* p, uint16_t o, uint16_t n)
+{
+ ssize_t k;
+
+#if defined(_aso_cas16)
+ if (!state.lockf)
+ return _aso_cas16(p, o, n);
+#elif defined(_aso_cas32)
+ if (!state.lockf)
+ {
+ U32_16_t u;
+ U32_16_t v;
+ U32_16_t* a;
+ int s;
+ int i;
+
+ s = (int)(integralof(p) & (sizeof(u.i) - 1)) / 2;
+ a = (U32_16_t*)((char*)0 + (integralof(p) & ~(sizeof(u.i) - 1)));
+ for (;;)
+ {
+ u.i = a->i;
+ u.c[s] = o;
+ v.i = u.i;
+ v.c[s] = n;
+ if (_aso_cas32(&a->i, u.i, v.i) == u.i)
+ break;
+ for (i = 0;; i++)
+ if (i >= elementsof(u.c))
+ return a->c[s];
+ else if (i != s && u.c[i] != a->c[i])
+ break;
+ }
+ return o;
+ }
+#elif defined(_aso_cas64)
+ if (!state.lockf)
+ {
+ U64_16_t u;
+ U64_16_t v;
+ U64_16_t* a;
+ int s;
+ int i;
+
+ s = (int)(integralof(p) & (sizeof(u.i) - 1)) / 2;
+ a = (U64_16_t*)((char*)0 + (integralof(p) & ~(sizeof(u.i) - 1)));
+ for (;;)
+ {
+ u.i = a->i;
+ u.c[s] = o;
+ v.i = u.i;
+ v.c[s] = n;
+ if (_aso_cas64(&a->i, u.i, v.i) == u.i)
+ break;
+ for (i = 0;; i++)
+ if (i >= elementsof(u.c))
+ return a->c[s];
+ else if (i != s && u.c[i] != a->c[i])
+ break;
+ }
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ if (*p == o)
+ *p = n;
+ else
+ o = *p;
+ lock(state.data, k, p);
+ return o;
+}
+
+uint32_t
+asocas32(uint32_t volatile* p, uint32_t o, uint32_t n)
+{
+ ssize_t k;
+
+#if defined(_aso_cas32)
+ if (!state.lockf)
+ return _aso_cas32(p, o, n);
+#elif defined(_aso_cas64)
+ if (!state.lockf)
+ {
+ U64_32_t u;
+ U64_32_t v;
+ U64_32_t* a;
+ int s;
+ int i;
+
+ s = (int)(integralof(p) & (sizeof(u.i) - 1)) / 4;
+ a = (U64_32_t*)((char*)0 + (integralof(p) & ~(sizeof(u.i) - 1)));
+ for (;;)
+ {
+ u.i = a->i;
+ u.c[s] = o;
+ v.i = u.i;
+ v.c[s] = n;
+ if (_aso_cas64(&a->i, u.i, v.i) == u.i)
+ break;
+ for (i = 0;; i++)
+ if (i >= elementsof(u.c))
+ return a->c[s];
+ else if (i != s && u.c[i] != a->c[i])
+ break;
+ }
+ return o;
+ }
+#endif
+ k = lock(state.data, 0, p);
+ if (*p == o)
+ *p = n;
+ else
+ o = *p;
+ lock(state.data, k, p);
+ return o;
+}
+
+#ifdef _ast_int8_t
+
+uint64_t
+asocas64(uint64_t volatile* p, uint64_t o, uint64_t n)
+{
+ ssize_t k;
+
+#if defined(_aso_cas64)
+ if (!state.lockf)
+ return _aso_cas64(p, o, n);
+#endif
+ k = lock(state.data, 0, p);
+ if (*p == o)
+ *p = n;
+ else
+ o = *p;
+ lock(state.data, k, p);
+ return o;
+}
+
+#endif
+
+/*
+ * compare with old, swap with new if same, and return old value
+ */
+
+void*
+asocasptr(void volatile* p, void* o, void* n)
+{
+ ssize_t k;
+
+#if defined(_aso_casptr)
+ if (!state.lockf)
+ return _aso_casptr((void**)p, o, n);
+#endif
+ k = lock(state.data, 0, p);
+ if (*(void* volatile*)p == o)
+ *(void* volatile*)p = n;
+ else
+ o = *(void* volatile*)p;
+ lock(state.data, k, p);
+ return o;
+}
+
+#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/modex.h b/usr/src/contrib/ast/src/lib/libast/aso/asohdr.h
index 4b73e19ffe..5f686d27e7 100644
--- a/usr/src/lib/libast/amd64/include/ast/modex.h
+++ b/usr/src/contrib/ast/src/lib/libast/aso/asohdr.h
@@ -1,16 +1,14 @@
-
-/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,42 +19,53 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-
-/*
- * AT&T Research
- *
- * external mode_t representation support
- */
+#ifndef _ASOHDR_H
+#define _ASOHDR_H 1
-#ifndef _MODEX_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
+#if _PACKAGE_ast
+
+#include <ast.h>
+#include <error.h>
+#include <fnv.h>
-#define _MODEX_H
+#else
-#include <ast_fs.h>
-#include <modecanon.h>
+#include <errno.h>
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
+#ifndef elementsof
+#define elementsof(x) (sizeof(x)/sizeof(x[0]))
+#endif
+#ifndef integralof
+#define integralof(x) (((char*)(x))-((char*)0))
+#endif
+#ifndef FNV_MULT
+#define FNV_MULT 0x01000193L
+#endif
+#ifndef NiL
+#define NiL ((void*)0)
+#endif
+#ifndef NoN
+#if defined(__STDC__) || defined(__STDPP__)
+#define NoN(x) void _STUB_ ## x () {}
+#else
+#define NoN(x) void _STUB_/**/x () {}
+#endif
+#if !defined(_STUB_)
+#define _STUB_
+#endif
#endif
-extern __MANGLE__ int modei __PROTO__((int));
-extern __MANGLE__ int modex __PROTO__((int));
+#endif
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
+#include "FEATURE/asometh"
-#if _S_IDPERM
-#define modei(m) ((m)&X_IPERM)
-#if _S_IDTYPE
-#define modex(m) (m)
-#endif
+#if _UWIN
+#undef _aso_fcntl
+#undef _aso_semaphore
#endif
+#include "aso.h"
+
+#define HASH(p,z) ((integralof(p)*FNV_MULT)%(z))
+
#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/aso/asolock.c b/usr/src/contrib/ast/src/lib/libast/aso/asolock.c
new file mode 100644
index 0000000000..60c7dba9ef
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/aso/asolock.c
@@ -0,0 +1,55 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#include "asohdr.h"
+
+#if defined(_UWIN) && defined(_BLD_ast)
+
+NoN(asolock)
+
+#else
+
+int
+asolock(unsigned int volatile* lock, unsigned int key, int type)
+{
+ unsigned int k;
+
+ if (key)
+ switch (type)
+ {
+ case ASO_UNLOCK:
+ return *lock == 0 ? 0 : asocasint(lock, key, 0) == key ? 0 : -1;
+ case ASO_TRYLOCK:
+ return *lock == key ? 0 : asocasint(lock, 0, key) == 0 ? 0 : -1;
+ case ASO_LOCK:
+ if (*lock == key)
+ return 0;
+ /*FALLTHROUGH*/
+ case ASO_SPINLOCK:
+ for (k = 0; asocasint(lock, 0, key) != 0; ASOLOOP(k));
+ return 0;
+ }
+ return -1;
+}
+
+#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_namval.h b/usr/src/contrib/ast/src/lib/libast/aso/asometh.c
index 49e777be1d..e97bbabbee 100644
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_namval.h
+++ b/usr/src/contrib/ast/src/lib/libast/aso/asometh.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -20,23 +20,24 @@
* *
***********************************************************************/
#pragma prototyped
+
+#include "asohdr.h"
+
+#if defined(_UWIN) && defined(_BLD_ast)
+
+NoN(asometh)
+
+#else
+
/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
+ * this is the default user visible asometh()
+ * -ltaso intercepts asometh() to prepend ASO_THREAD methods
*/
-#ifndef _NAMVAL_H
-#define _NAMVAL_H
-
-typedef struct
+Asometh_t*
+asometh(int type, void* data)
{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
+ return _asometh(type, data);
+}
#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/aso/asorelax.c b/usr/src/contrib/ast/src/lib/libast/aso/asorelax.c
new file mode 100644
index 0000000000..9716380512
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/aso/asorelax.c
@@ -0,0 +1,56 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#include "asohdr.h"
+
+#if defined(_UWIN) && defined(_BLD_ast)
+
+NoN(asorelax)
+
+#else
+
+#if _PACKAGE_ast
+#include <tv.h>
+#else
+#include <time.h>
+#endif
+
+int
+asorelax(long nsec)
+{
+#if _PACKAGE_ast
+ Tv_t tv;
+
+ tv.tv_sec = 0;
+ tv.tv_nsec = nsec;
+ return tvsleep(&tv, 0);
+#else
+ struct timespec ts;
+
+ ts.tv_sec = 0;
+ ts.tv_nsec = nsec;
+ return nanosleep(&ts, 0);
+#endif
+}
+
+#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/README-astsa b/usr/src/contrib/ast/src/lib/libast/astsa/README-astsa
new file mode 100644
index 0000000000..0935f7e977
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/README-astsa
@@ -0,0 +1,15 @@
+astsa implements a small subset of the ast library for other ast
+standalone commands and libraries using X/Open interfaces.
+
+To get better performance and functionality, consider using any of
+the full-featured ast-* packages at
+
+ http://www.research.att.com/sw/download/
+
+astsa.omk is an old make makefile that builds the headers and objects
+and defines these variables for use in other makefiles
+
+ ASTSA_OPTIMIZE ``-O'' by default
+
+The astsa files may be combined in a single directory with other ast
+standalone packages.
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/aso.c b/usr/src/contrib/ast/src/lib/libast/astsa/aso.c
new file mode 100644
index 0000000000..3b2226d897
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/aso.c
@@ -0,0 +1,56 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#include <aso.h>
+
+int
+asolock(unsigned int volatile* lock, unsigned int key, int type)
+{
+ unsigned int k;
+
+ if (key)
+ switch (type)
+ {
+ case ASO_UNLOCK:
+ if (*lock != 0)
+ {
+ if (*lock != key)
+ return -1;
+ *lock = 0;
+ }
+ return 0;
+ case ASO_TRYLOCK:
+ if (*lock != key)
+ {
+ if (*lock != 0)
+ return -1;
+ *lock = key;
+ }
+ return 0;
+ case ASO_LOCK:
+ case ASO_SPINLOCK:
+ *lock = key;
+ return 0;
+ }
+ return -1;
+}
diff --git a/usr/src/lib/libast/amd64/include/ast/bytesex.h b/usr/src/contrib/ast/src/lib/libast/astsa/aso.h
index 1f78d13287..9c5d2c2e82 100644
--- a/usr/src/lib/libast/amd64/include/ast/bytesex.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/aso.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,25 +19,14 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-/*
- * linux/gnu compatibility
- */
+#ifndef _ASO_H
+#define _ASO_H 1
-#ifndef _BYTESEX_H
-#define _BYTESEX_H
+#define ASO_UNLOCK 0 /* unlock if key matches */
+#define ASO_TRYLOCK 1 /* matched key means successful attempt */
+#define ASO_LOCK 2 /* matched key first, then spin-lock */
+#define ASO_SPINLOCK 3 /* no matching of key before locking */
-#include <ast_common.h>
-
-#undef __BYTE_ORDER
-
-#if ( _ast_intswap & 3 ) == 3
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#else
-#if ( _ast_intswap & 3 ) == 1
-#define __BYTE_ORDER __PDP_ENDIAN
-#else
-#define __BYTE_ORDER __BIG_ENDIAN
-#endif
-#endif
+extern int asolock(unsigned int volatile*, unsigned int, int);
#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/ast.c b/usr/src/contrib/ast/src/lib/libast/astsa/ast.c
new file mode 100644
index 0000000000..6428ebf5df
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/ast.c
@@ -0,0 +1,85 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * standalone mini ast+sfio implementation
+ */
+
+#include <ast.h>
+
+#define CHUNK 1024
+
+_Ast_info_t ast;
+
+int
+astwinsize(int fd, int* lines, int* columns)
+{
+ if (lines)
+ *lines = 24;
+ if (columns)
+ *columns = 80;
+ return 0;
+}
+
+char*
+sfgetr(Sfio_t* sp, int c, int z)
+{
+ register char* s;
+ register char* e;
+
+ static char* buf;
+ static unsigned long siz;
+
+ if (!buf)
+ {
+ siz = CHUNK;
+ if (!(buf = newof(0, char, siz, 0)))
+ return 0;
+ }
+ if (z < 0)
+ return *buf ? buf : (char*)0;
+ s = buf;
+ e = s + siz;
+ for (;;)
+ {
+ if (s >= e)
+ {
+ siz += CHUNK;
+ if (!(buf = newof(buf, char, siz, 0)))
+ return 0;
+ s = buf + (siz - CHUNK);
+ e = s + siz;
+ }
+ if ((c = sfgetc(sp)) == EOF)
+ {
+ *s = 0;
+ return 0;
+ }
+ if (c == '\n')
+ {
+ *s = z ? 0 : c;
+ break;
+ }
+ *s++ = c;
+ }
+ return buf;
+}
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/ast.h b/usr/src/contrib/ast/src/lib/libast/astsa/ast.h
new file mode 100644
index 0000000000..f25f6a50cf
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/ast.h
@@ -0,0 +1,156 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * standalone mini ast+sfio interface
+ */
+
+#ifndef _AST_H
+#define _AST_H 1
+
+#include <ast_sa.h>
+#include <ast_common.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+
+#define FMT_EXP_CHAR 0x020 /* expand single byte chars */
+#define FMT_EXP_LINE 0x040 /* expand \n and \r */
+#define FMT_EXP_WIDE 0x080 /* expand \u \U \x wide chars */
+#define FMT_EXP_NOCR 0x100 /* skip \r */
+#define FMT_EXP_NONL 0x200 /* skip \n */
+
+#define STR_MAXIMAL 01 /* maximal match */
+#define STR_LEFT 02 /* implicit left anchor */
+#define STR_RIGHT 04 /* implicit right anchor */
+#define STR_ICASE 010 /* ignore case */
+#define STR_GROUP 020 /* (|&) inside [@|&](...) only */
+
+typedef int (*Error_f)(void*, void*, int, ...);
+
+typedef struct
+{
+
+ char* id;
+
+ struct
+ {
+ unsigned int serial;
+ unsigned int set;
+ } locale;
+
+ long tmp_long;
+ size_t tmp_size;
+ short tmp_short;
+ char tmp_char;
+ wchar_t tmp_wchar;
+
+ int (*collate)(const char*, const char*);
+
+ int tmp_int;
+ void* tmp_pointer;
+
+ int mb_cur_max;
+ int (*mb_len)(const char*, size_t);
+ int (*mb_towc)(wchar_t*, const char*, size_t);
+ size_t (*mb_xfrm)(char*, const char*, size_t);
+ int (*mb_width)(wchar_t);
+ int (*mb_conv)(char*, wchar_t);
+
+ unsigned int env_serial;
+
+ char pad[944];
+
+} _Ast_info_t;
+
+#define ast _ast_info_
+
+#define elementsof(x) (sizeof(x)/sizeof(x[0]))
+#define integralof(x) (((char*)(x))-((char*)0))
+#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
+#define oldof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)malloc(sizeof(t)*(n)+(x)))
+#define pointerof(x) ((void*)((char*)0+(x)))
+#define roundof(x,y) (((x)+(y)-1)&~((y)-1))
+
+#ifndef offsetof
+#define offsetof(type,member) ((unsigned long)&(((type*)0)->member))
+#endif
+
+#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
+#define NiL 0
+#define NoP(x) (void)(x)
+#else
+#define NiL ((char*)0)
+#define NoP(x) (&x,1)
+#endif
+
+#define conformance(a,b) "ast"
+#define fmtident(s) ((char*)(s)+10)
+#define mbchar(s) (*s++)
+#define setlocale(a,b)
+
+#define streq(a,b) (*(a)==*(b)&&!strcmp(a,b))
+#define strneq(a,b,n) (*(a)==*(b)&&!strncmp(a,b,n))
+#define strton(s,t,b,f) strtol(s,t,0)
+#define strtonll(s,t,b,f) strtoll(s,t,0)
+
+#define Sfio_t FILE
+
+#define sfstdin stdin
+#define sfstdout stdout
+#define sfstderr stderr
+
+#define sfclose(f) fclose(f)
+#define sffileno(f) fileno(f)
+#define sfgetc(f) fgetc(f)
+#define sfopen(f,n,m) fopen(n,m)
+#define sfputc(f,c) fputc(c,f)
+#define sfread(f,b,n) fread(b,n,1,f)
+#define sfseek(f,p,w) fseek(f,p,w)
+#define sfset(f,v,n)
+#define sfsync(f) fflush(f)
+#define sfwrite(f,b,n) fwrite(b,n,1,f)
+
+#define sfprintf fprintf
+#define sfsprintf snprintf
+#define sfvprintf vfprintf
+
+#define sfscanf fscanf
+
+#define sfgetr _sf_getr
+
+#include <sfstr.h>
+
+extern _Ast_info_t ast;
+
+extern int astwinsize(int, int*, int*);
+extern int chresc(const char*, char**);
+extern char* fmtbuf(size_t);
+extern char* fmtip4(uint32_t, int);
+extern char* sfgetr(Sfio_t*, int, int);
+extern char* strcopy(char*, const char*);
+extern int strmatch(const char*, const char*);
+extern int strtoip4(const char*, char**, uint32_t*, unsigned char*);
+
+#endif
diff --git a/usr/src/lib/libast/i386/include/ast/bytesex.h b/usr/src/contrib/ast/src/lib/libast/astsa/ast_common.h
index 1f78d13287..55573d68d6 100644
--- a/usr/src/lib/libast/i386/include/ast/bytesex.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/ast_common.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,25 +19,31 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-/*
- * linux/gnu compatibility
- */
+#ifndef _AST_COMMON_H
+#define _AST_COMMON_H 1
-#ifndef _BYTESEX_H
-#define _BYTESEX_H
+#include <ast_sa.h>
+#include <sys/types.h>
-#include <ast_common.h>
+#define Void_t void
+#define _ARG_(x) x
+#define _BEGIN_EXTERNS_
+#define _END_EXTERNS_
+#define __STD_C 1
-#undef __BYTE_ORDER
-
-#if ( _ast_intswap & 3 ) == 3
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#else
-#if ( _ast_intswap & 3 ) == 1
-#define __BYTE_ORDER __PDP_ENDIAN
+#if _hdr_stdint
+#include <stdint.h>
#else
-#define __BYTE_ORDER __BIG_ENDIAN
+#include <inttypes.h>
#endif
+
+#if _hdr_unistd
+#include <unistd.h>
+#endif
+
+#define _typ_int32_t 1
+#ifdef _ast_int8_t
+#define _typ_int64_t 1
#endif
#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/astsa.manifest b/usr/src/contrib/ast/src/lib/libast/astsa/astsa.manifest
new file mode 100644
index 0000000000..03785fa00b
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/astsa.manifest
@@ -0,0 +1,50 @@
+../../../../include/prototyped.h
+../cdt/cdtlib.h
+../cdt/dtclose.c
+../cdt/dtdisc.c
+../cdt/dthash.c
+../cdt/dthdr.h
+../cdt/dtlist.c
+../cdt/dtmethod.c
+../cdt/dtnew.c
+../cdt/dtopen.c
+../cdt/dtstrhash.c
+../cdt/dttree.c
+../cdt/dtview.c
+../cdt/dtwalk.c
+../include/cdt.h
+../include/hashkey.h
+../include/hashpart.h
+../include/ip6.h
+../include/magicid.h
+../misc/optget.c
+../misc/optlib.h
+../string/chresc.c
+../string/fmtbuf.c
+../string/fmtip4.c
+../string/fmtip6.c
+../string/strcopy.c
+../string/strtoip4.c
+../string/strtoip6.c
+README-astsa
+aso.c
+aso.h
+ast.c
+ast.h
+ast_common.h
+astsa.manifest
+astsa.mm
+astsa.omk
+ccode.h
+debug.h
+error.c
+error.h
+mkast_sa
+option.h
+sfstr.c
+sfstr.h
+strdup.c
+strmatch.c
+times.h
+vmalloc.c
+vmalloc.h
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/astsa.mm b/usr/src/contrib/ast/src/lib/libast/astsa/astsa.mm
new file mode 100644
index 0000000000..eca64c0168
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/astsa.mm
@@ -0,0 +1,33 @@
+.xx title="astsa"
+.MT 4
+.TL
+
+.H 1 "astsa"
+.B astsa
+implements a small subset of the
+.B ast
+library for other
+.B ast
+standalone commands and libraries using X/Open interfaces.
+.P
+To get better performance and functionality, consider using any of
+the full-featured ast-* packages at
+.DS
+.xx link="http://www.research.att.com/sw/download/"
+.DE
+.P
+astsa.omk is an old make makefile that builds the headers and objects
+and defines these variables for use in other makefiles
+.VL 12
+.LI
+.B ASTSA_GEN
+point -I to these
+.LI
+.B ASTSA_HDRS
+point -I to these
+.LI
+.B AST_OBJS
+link against these
+.LE
+The astsa files may be combined in a single directory with other ast
+standalone packages.
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/astsa.omk b/usr/src/contrib/ast/src/lib/libast/astsa/astsa.omk
new file mode 100644
index 0000000000..92d7882784
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/astsa.omk
@@ -0,0 +1,82 @@
+#
+# standalone mini libast old make makefile
+#
+
+CC = cc
+CFLAGS = $(ASTSA_CFLAGS)
+
+ASTSA_OPTIMIZE = -O
+ASTSA_CFLAGS = $(ASTSA_OPTIMIZE) -D_PACKAGE_astsa -I.
+
+ASTSA_GEN = \
+ ast_sa.h
+
+ASTSA_BLD = \
+ dthdr.h
+
+ASTSA_HDRS = \
+ ast.h \
+ ast_common.h \
+ ccode.h \
+ cdt.h \
+ debug.h \
+ error.h \
+ hashkey.h \
+ hashpart.h \
+ ip6.h \
+ magicid.h \
+ option.h \
+ optlib.h \
+ prototyped.h \
+ sfstr.h \
+ times.h \
+ vmalloc.h
+
+ASTSA_SRCS = \
+ aso.c \
+ ast.c \
+ chresc.c \
+ error.c \
+ fmtbuf.c \
+ fmtip4.c \
+ fmtip6.c \
+ optget.c \
+ sfstr.c \
+ strcopy.c \
+ strdup.c \
+ strmatch.c \
+ strtoip4.c \
+ strtoip6.c \
+ vmalloc.c \
+ dtclose.c \
+ dtdisc.c \
+ dthash.c \
+ dtlist.c \
+ dtmethod.c \
+ dtnew.c \
+ dtopen.c \
+ dtstrhash.c \
+ dttree.c \
+ dtview.c \
+ dtwalk.c
+
+ASTSA_MANIFEST = \
+ README astsa.omk mkast_sa \
+ $(ASTSA_BLD) $(ASTSA_HDRS) $(ASTSA_SRCS)
+
+astsa : ast_sa.h libastsa.a
+
+libastsa.a : aso.o ast.o chresc.o error.o fmtbuf.o fmtip4.o fmtip6.o optget.o \
+ sfstr.o strcopy.o strdup.o strmatch.o strtoip4.o strtoip6.o \
+ vmalloc.o \
+ dtclose.o dtdisc.o dthash.o dtlist.o dtmethod.o \
+ dtopen.o dtstrhash.o dttree.o dtview.o dtwalk.o
+ ar cr libastsa.a $?
+
+ast_sa.h : mkast_sa
+ ./mkast_sa $(CC) $(CFLAGS) > ast_sa.h
+
+clean :
+ rm -f ast_sa.h *.o *.a
+
+clobber : clean
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/ccode.h b/usr/src/contrib/ast/src/lib/libast/astsa/ccode.h
new file mode 100644
index 0000000000..493e462ce7
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/ccode.h
@@ -0,0 +1,34 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#ifndef _CCODE_H
+#define _CCODE_H 1
+
+#define CC_bel '\a'
+#define CC_esc '\033'
+#define CC_vt '\v'
+
+#define CC_ASCII 0
+#define CC_NATIVE CC_ASCII
+
+#define ccmapc(c,f,t) (c)
+
+#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/dirent.h b/usr/src/contrib/ast/src/lib/libast/astsa/debug.h
index 05e76cadae..7b93f4be8b 100644
--- a/usr/src/lib/libast/amd64/include/ast/dirent.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/debug.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,4 +19,11 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-#include <ast_dirent.h>
+#ifndef _DEBUG_H
+#define _DEBUG_H 1
+
+#define DEBUG_ASSERT(x)
+
+#define message(p)
+
+#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/error.c b/usr/src/contrib/ast/src/lib/libast/astsa/error.c
new file mode 100644
index 0000000000..84b77287c2
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/error.c
@@ -0,0 +1,103 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * standalone mini error implementation
+ */
+
+#include <ast.h>
+#include <error.h>
+
+Error_info_t error_info;
+
+void
+errorv(const char* id, int level, va_list ap)
+{
+ char* a;
+ char* s;
+ int flags;
+
+ if (level < 0)
+ flags = 0;
+ else
+ {
+ flags = level & ~ERROR_LEVEL;
+ level &= ERROR_LEVEL;
+ }
+ a = va_arg(ap, char*);
+ if (level && ((s = error_info.id) || (s = (char*)id)))
+ {
+ if (!(flags & ERROR_USAGE))
+ sfprintf(sfstderr, "%s: ", s);
+ else if (strcmp(a, "%s"))
+ sfprintf(sfstderr, "Usage: %s ", s);
+ }
+ if (flags & ERROR_USAGE)
+ /*nop*/;
+ else if (level < 0)
+ sfprintf(sfstderr, "debug%d: ", level);
+ else if (level)
+ {
+ if (level == ERROR_WARNING)
+ {
+ sfprintf(sfstderr, "warning: ");
+ error_info.warnings++;
+ }
+ else
+ {
+ error_info.errors++;
+ if (level == ERROR_PANIC)
+ sfprintf(sfstderr, "panic: ");
+ }
+ if (error_info.line)
+ {
+ if (error_info.file && *error_info.file)
+ sfprintf(sfstderr, "\"%s\", ", error_info.file);
+ sfprintf(sfstderr, "line %d: ", error_info.line);
+ }
+ }
+ sfvprintf(sfstderr, a, ap);
+ sfprintf(sfstderr, "\n");
+ if (level >= ERROR_FATAL)
+ exit(level - ERROR_FATAL + 1);
+}
+
+void
+error(int level, ...)
+{
+ va_list ap;
+
+ va_start(ap, level);
+ errorv(NiL, level, ap);
+ va_end(ap);
+}
+
+int
+errorf(void* handle, void* discipline, int level, ...)
+{
+ va_list ap;
+
+ va_start(ap, level);
+ errorv((discipline && handle) ? *((char**)handle) : (char*)handle, level, ap);
+ va_end(ap);
+ return 0;
+}
diff --git a/usr/src/lib/libast/i386/include/ast/ast_mode.h b/usr/src/contrib/ast/src/lib/libast/astsa/error.h
index f9fdb04f02..a95809fd7f 100644
--- a/usr/src/lib/libast/i386/include/ast/ast_mode.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/error.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,17 +19,48 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
-#ifndef _def_mode_ast
-#define _def_mode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define S_ITYPE(m) ((m)&S_IFMT)
+/*
+ * standalone mini error interface
+ */
-#define S_IPERM (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
+#ifndef _ERROR_H
+#define _ERROR_H 1
-#define _S_IDPERM 1
-#define _S_IDTYPE 1
+#include <option.h>
+#include <stdarg.h>
-#define BUFFERSIZE 8192
+typedef struct Error_info_s
+{
+ int errors;
+ int line;
+ int warnings;
+ char* catalog;
+ char* file;
+ char* id;
+} Error_info_t;
+
+#define ERROR_catalog(s) s
+
+#define ERROR_INFO 0 /* info message -- no err_id */
+#define ERROR_WARNING 1 /* warning message */
+#define ERROR_ERROR 2 /* error message -- no err_exit */
+#define ERROR_FATAL 3 /* error message with err_exit */
+#define ERROR_PANIC ERROR_LEVEL /* panic message with err_exit */
+
+#define ERROR_LEVEL 0x00ff /* level portion of status */
+#define ERROR_SYSTEM 0x0100 /* report system errno message */
+#define ERROR_USAGE 0x0800 /* usage message */
+
+#define error_info _err_info
+#define error _err_msg
+#define errorv _err_msgv
+
+extern Error_info_t error_info;
+
+#define errorx(l,x,c,m) (char*)m
+
+extern void error(int, ...);
+extern int errorf(void*, void*, int, ...);
+extern void errorv(const char*, int, va_list);
#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/hashkey.h b/usr/src/contrib/ast/src/lib/libast/astsa/hashkey.h
index 84be9113a1..7f02842513 100644
--- a/usr/src/lib/libast/amd64/include/ast/hashkey.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/hashkey.h
@@ -1,16 +1,14 @@
-
-/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,7 +19,6 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-
/*
* Glenn Fowler
* AT&T Research
@@ -31,14 +28,7 @@
*/
#ifndef _HASHKEY_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASHKEY_H
+#define _HASHKEY_H 1
#define HASHKEYMAX 6
#define HASHKEYBIT 5
@@ -61,13 +51,11 @@
#define HASHNKEY5(n,c5,c4,c3,c2,c1) HASHKEY6((n)+'a',c5,c4,c3,c2,c1)
#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
+#define extern __EXPORT__
#endif
-extern __MANGLE__ long strkey __PROTO__((const char*));
+extern long strkey(const char*);
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
+#undef extern
#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/mkast_sa b/usr/src/contrib/ast/src/lib/libast/astsa/mkast_sa
new file mode 100755
index 0000000000..df448f28c2
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/mkast_sa
@@ -0,0 +1,150 @@
+: generate ast_sa.h
+case $# in
+0) set cc ;;
+esac
+cat > _ast_.c <<'!'
+ #define _BYTESEX_H
+
+ #include <stdio.h>
+ #include <sys/types.h>
+
+ #if N == 0
+ #define _ast_int8_t long
+ #define _ast_int8_str "long"
+ #endif
+ #if N == 1
+ #define _ast_int8_t long long
+ #define _ast_int8_str "long long"
+ #endif
+ #if N == 2
+ #define _ast_int8_t __int64_t
+ #define _ast_int8_str "__int64_t"
+ #endif
+ #if N == 3
+ #define _ast_int8_t _int64_t
+ #define _ast_int8_str "_int64_t"
+ #endif
+ #if N == 4
+ #define _ast_int8_t int64_t
+ #define _ast_int8_str "int64_t"
+ #endif
+ #if N == 5
+ #define _ast_int8_t __int64
+ #define _ast_int8_str "__int64"
+ #endif
+ #if N == 6
+ #define _ast_int8_t _int64
+ #define _ast_int8_str "_int64"
+ #endif
+ #if N == 7
+ #define _ast_int8_t int64
+ #define _ast_int8_str "int64"
+ #endif
+
+ #define elementsof(x) (sizeof(x)/sizeof(x[0]))
+
+ static char i_char = 1;
+ static short i_short = 1;
+ static int i_int = 1;
+ static long i_long = 1;
+ #ifdef _ast_int8_t
+ static _ast_int8_t i_long_long = 1;
+ #endif
+
+ static struct
+ {
+ char* name;
+ int size;
+ char* swap;
+ } int_type[] =
+ {
+ "char", sizeof(char), (char*)&i_char,
+ "short", sizeof(short), (char*)&i_short,
+ "int", sizeof(int), (char*)&i_int,
+ "long", sizeof(long), (char*)&i_long,
+ #ifdef _ast_int8_t
+ _ast_int8_str, sizeof(_ast_int8_t), (char*)&i_long_long,
+ #endif
+ };
+
+ static struct
+ {
+ char* name;
+ int size;
+ } flt_type[] =
+ {
+ "float", sizeof(float),
+ "double", sizeof(double),
+ #ifdef _typ_long_double
+ "long double", sizeof(long double),
+ #endif
+ };
+
+ static int int_size[] = { 1, 2, 4, 8 };
+
+ main()
+ {
+ register int t;
+ register int s;
+ register int m = 1;
+ register int b = 1;
+ register int w = 0;
+
+ #ifdef _ast_int8_t
+ if (int_type[elementsof(int_type)-1].size <= 4)
+ return 1;
+ #endif
+ for (s = 0; s < elementsof(int_size); s++)
+ {
+ for (t = 0; t < elementsof(int_type) && int_type[t].size < int_size[s]; t++);
+ if (t < elementsof(int_type))
+ {
+ m = int_size[s];
+ printf("#define _ast_int%d_t %s\n", m, int_type[t].name);
+ if (m > 1)
+ {
+ if (*int_type[t].swap)
+ w |= b;
+ b <<= 1;
+ }
+ }
+ }
+ printf("#define _ast_intmax_t _ast_int%d_t\n", m);
+ if (m == sizeof(long))
+ printf("#define _ast_intmax_long 1\n");
+ printf("#define _ast_intswap %d\n", w);
+ printf("\n");
+ for (t = 0; t < elementsof(flt_type); t++)
+ {
+ while (t < elementsof(flt_type) && flt_type[t].size == flt_type[t + 1].size)
+ t++;
+ m = flt_type[t].size;
+ printf("#define _ast_flt%d_t %s\n", flt_type[t].size, flt_type[t].name);
+ }
+ printf("#define _ast_fltmax_t _ast_flt%d_t\n", m);
+ if (m == sizeof(double))
+ printf("#define _ast_fltmax_double 1\n");
+ return 0;
+ }
+!
+echo "#ifndef _AST_SA_H"
+echo "#define _AST_SA_H 1"
+echo
+for i in '' -DN=0 -DN=1 -DN=2 -DN=3 -DN=4 -DN=5 -DN=6 -DN=7 -DN=8
+do "$@" $i -o _ast_.exe _ast_.c 2> /dev/null &&
+ ./_ast_.exe &&
+ break
+done
+echo '#include <stdint.h>' > _ast_.c
+if "$@" -E _ast_.c > /dev/null 2>&1
+then echo "#define _hdr_stdint 1"
+fi
+echo '#include <unistd.h>' > _ast_.c
+if "$@" -E _ast_.c > /dev/null 2>&1
+then echo "#define _hdr_unistd 1"
+fi
+rm -f _ast_.c _ast_.exe
+echo "#define __DEFINE__(T,obj,val) T obj = val"
+echo "#define __EXTERN__(T,obj) extern T obj"
+echo
+echo "#endif"
diff --git a/usr/src/lib/libast/i386/include/ast/option.h b/usr/src/contrib/ast/src/lib/libast/astsa/option.h
index 5439707f8e..aa669204e0 100644
--- a/usr/src/lib/libast/i386/include/ast/option.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/option.h
@@ -1,16 +1,14 @@
-
-/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,7 +19,7 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-
+#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
@@ -30,25 +28,20 @@
*/
#ifndef _OPTION_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _OPTION_H
+#define _OPTION_H 1
#include <ast.h>
-#define OPT_VERSION 20070319L
+#define OPT_VERSION 20000401L
+
+#define opt_info _opt_info_
#define OPT_USER (1L<<16) /* first user flag bit */
struct Opt_s;
struct Optdisc_s;
-typedef int (*Optinfo_f) __PROTO__((struct Opt_s*, Sfio_t*, const char*, struct Optdisc_s*));
+typedef int (*Optinfo_f)(struct Opt_s*, Sfio_t*, const char*, struct Optdisc_s*);
typedef struct Optdisc_s
{
@@ -61,8 +54,7 @@ typedef struct Optdisc_s
/* NOTE: Opt_t member order fixed by a previous binary release */
#ifndef _OPT_PRIVATE_
-#define _OPT_PRIVATE_ \
- char pad[3*sizeof(__V_*)];
+#define _OPT_PRIVATE_ void* _opt_private;
#endif
typedef struct Opt_s
@@ -72,49 +64,43 @@ typedef struct Opt_s
char** argv; /* most recent argv */
int index; /* argv index */
char* msg; /* error/usage message buffer */
- long num; /* OBSOLETE -- use number */
+ long num; /* # numeric argument */
int offset; /* char offset in argv[index] */
char option[8]; /* current flag {-,+} + option */
char name[64]; /* current long name or flag */
Optdisc_t* disc; /* user discipline */
intmax_t number; /* # numeric argument */
unsigned char assignment; /* option arg assigment op */
- unsigned char pads[sizeof(__V_*)-1];
+ unsigned char pads[sizeof(void*)-1];
_OPT_PRIVATE_
} Opt_t;
+#define optinit(d,f) (memset(d,0,sizeof(*(d))),(d)->version=OPT_VERSION,(d)->infof=(f),opt_info.disc=(d))
+
#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
+#define __PUBLIC_DATA__ __EXPORT__
+#else
#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
+#define __PUBLIC_DATA__ __IMPORT__
+#else
+#define __PUBLIC_DATA__
+#endif
#endif
-extern __MANGLE__ Opt_t* _opt_infop_;
-
-#define opt_info (*_opt_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
+extern __PUBLIC_DATA__ Opt_t opt_info;
-#define optinit(d,f) (memset(d,0,sizeof(*(d))),(d)->version=OPT_VERSION,(d)->infof=(f),opt_info.disc=(d))
+#undef __PUBLIC_DATA__
#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
+#define extern __EXPORT__
#endif
-extern __MANGLE__ int optget __PROTO__((char**, const char*));
-extern __MANGLE__ int optjoin __PROTO__((char**, ...));
-extern __MANGLE__ char* opthelp __PROTO__((const char*, const char*));
-extern __MANGLE__ char* optusage __PROTO__((const char*));
-extern __MANGLE__ int optstr __PROTO__((const char*, const char*));
-extern __MANGLE__ int optesc __PROTO__((Sfio_t*, const char*, int));
-extern __MANGLE__ Opt_t* optctx __PROTO__((Opt_t*, Opt_t*));
+extern int optget(char**, const char*);
+extern int optjoin(char**, ...);
+extern char* opthelp(const char*, const char*);
+extern char* optusage(const char*);
+extern int optstr(const char*, const char*);
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
+#undef extern
#endif
diff --git a/usr/src/lib/libast/common/misc/optlib.h b/usr/src/contrib/ast/src/lib/libast/astsa/optlib.h
index 366fe8f0c4..8e09734f35 100644
--- a/usr/src/lib/libast/common/misc/optlib.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/optlib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,7 +19,6 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
@@ -28,7 +27,7 @@
*/
#ifndef _OPTLIB_H
-#define _OPTLIB_H
+#define _OPTLIB_H 1
#include <ast.h>
#include <cdt.h>
@@ -37,10 +36,9 @@
#define OPT_functions 0x02
#define OPT_ignore 0x04
#define OPT_long 0x08
-#define OPT_numeric 0x10
-#define OPT_old 0x20
-#define OPT_minus 0x40
-#define OPT_plus 0x80
+#define OPT_old 0x10
+#define OPT_plus 0x20
+#define OPT_proprietary 0x40
#define OPT_cache_flag 0x01
#define OPT_cache_invert 0x02
@@ -57,7 +55,6 @@ typedef struct Optpass_s
{
char* opts;
char* oopts;
- char* id;
char* catalog;
unsigned char version;
unsigned char prefix;
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/sfstr.c b/usr/src/contrib/ast/src/lib/libast/astsa/sfstr.c
new file mode 100644
index 0000000000..7fc0be35fe
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/sfstr.c
@@ -0,0 +1,246 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#include <ast.h>
+#include <stdarg.h>
+
+#define STR (8*1024)
+
+#define VALID(p,f) ((p=(Sfstr_t*)f)>=&strs[0]&&p<&strs[elementsof(strs)])
+
+static Sfstr_t strs[64];
+
+static int
+extend(Sfstr_t* p, int n)
+{
+ int o;
+
+ if (n < STR)
+ n = STR;
+ n += p->end - p->beg;
+ o = p->nxt - p->beg;
+ if (!(p->beg = realloc(p->beg, n)))
+ return -1;
+ p->nxt = p->beg + o;
+ p->end = p->beg + n;
+ return 0;
+}
+
+int
+sfclose(Sfio_t* f)
+{
+ Sfstr_t* p;
+ int r;
+
+ if (VALID(p, f))
+ {
+ p->nxt = 0;
+ r = 0;
+ }
+ else
+ r = fclose(f);
+ return r;
+}
+
+int
+sfprintf(Sfio_t* f, const char* fmt, ...)
+{
+ Sfstr_t* p;
+ char* s;
+ va_list ap;
+ int r;
+
+ static char buf[STR];
+
+ va_start(ap, fmt);
+ if (!VALID(p, f))
+ r = vfprintf(f, fmt, ap);
+ else if ((r = vsnprintf(buf, sizeof(buf), fmt, ap)) > 0)
+ r = sfwrite(f, buf, r);
+ va_end(ap);
+ return r;
+}
+
+char*
+sfprints(const char* fmt, ...)
+{
+ va_list ap;
+ int r;
+
+ static char buf[STR];
+
+ va_start(ap, fmt);
+ r = vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+ return r > 0 ? buf : (char*)0;
+}
+
+int
+sfputc(Sfio_t* f, int c)
+{
+ Sfstr_t* p;
+ int r;
+
+ if (VALID(p, f))
+ {
+ if (p->nxt >= p->end && extend(p, 1))
+ return -1;
+ *p->nxt++ = c;
+ r = 1;
+ }
+ else
+ r = fputc(c, f);
+ return r;
+}
+
+int
+sfputr(Sfio_t* f, const char* buf, int sep)
+{
+ Sfstr_t* p;
+ int r;
+ int n;
+
+ n = strlen(buf);
+ if (VALID(p, f))
+ {
+ r = n + (sep >= 0);
+ if (r > (p->end - p->nxt) && extend(p, r))
+ return -1;
+ memcpy(p->nxt, buf, n);
+ p->nxt += n;
+ if (sep >= 0)
+ *p->nxt++ = sep;
+ }
+ else
+ {
+ r = fwrite(buf, 1, n, f);
+ if (sep >= 0 && fputc(sep, f) != EOF)
+ r++;
+ }
+ return r;
+}
+
+char*
+sfstrbase(Sfio_t* f)
+{
+ Sfstr_t* p;
+
+ if (VALID(p, f))
+ return p->beg;
+ return 0;
+}
+
+Sfio_t*
+sfstropen(void)
+{
+ Sfstr_t* p;
+
+ for (p = &strs[0]; p < &strs[elementsof(strs)]; p++)
+ if (!p->nxt)
+ {
+ if (!p->beg)
+ {
+ if (!(p->beg = malloc(STR)))
+ break;
+ p->end = p->beg + STR;
+ }
+ p->nxt = p->beg;
+ return (Sfio_t*)p;
+ }
+ return 0;
+}
+
+#define _sf_strseek(f,p,m) \
+ ( (m) == SEEK_SET ? \
+ (((p) < 0 || (p) > ((f)->end - (f)->beg)) ? (char*)0 : \
+ (char*)((f)->nxt = (f)->beg+(p)) ) \
+ : (m) == SEEK_CUR ? \
+ ((f)->nxt += (p), \
+ (((f)->nxt < (f)->beg || (f)->nxt > (f)->end) ? \
+ ((f)->nxt -= (p), (char*)0) : (char*)(f)->nxt ) ) \
+ : (m) == SEEK_END ? \
+ ( ((p) > 0 || (((f)->end - (f)->beg) + (p)) < 0) ? (char*)0 : \
+ (char*)((f)->nxt = (f)->end+(p)) ) \
+ : (char*)0 \
+ )
+
+char*
+sfstrseek(Sfio_t* f, int n, int w)
+{
+ Sfstr_t* p;
+
+ if (VALID(p, f))
+ return _sf_strseek(p, n, w);
+ return 0;
+}
+
+char*
+sfstrset(Sfio_t* f, int n)
+{
+ Sfstr_t* p;
+
+ if (VALID(p, f) && n >= 0 && n < (p->nxt - p->beg))
+ return p->nxt = p->beg + n;
+ return 0;
+}
+
+int
+sfstrtell(Sfio_t* f)
+{
+ Sfstr_t* p;
+ int r;
+
+ if (VALID(p, f) && p->nxt)
+ r = p->nxt - p->beg;
+ else
+ r = -1;
+ return r;
+}
+
+char*
+sfstruse(Sfio_t* f)
+{
+ Sfstr_t* p;
+
+ if (VALID(p, f) && (p->nxt < p->end || !extend(p, 1)))
+ {
+ *p->nxt = 0;
+ return p->nxt = p->beg;
+ }
+ return 0;
+}
+
+int
+sfwrite(Sfio_t* f, void* buf, int n)
+{
+ Sfstr_t* p;
+
+ if (VALID(p, f))
+ {
+ if (n > (p->end - p->nxt) && extend(p, n))
+ return -1;
+ memcpy(p->nxt, buf, n);
+ p->nxt += n;
+ }
+ else
+ n = fwrite(buf, 1, n, f);
+ return n;
+}
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/sfstr.h b/usr/src/contrib/ast/src/lib/libast/astsa/sfstr.h
new file mode 100644
index 0000000000..4fe21f55b2
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/sfstr.h
@@ -0,0 +1,60 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#ifndef _SFSTR_H
+#define _SFSTR_H 1
+
+#include <ast.h>
+
+typedef struct Sfstr_s
+{
+ char* beg;
+ char* nxt;
+ char* end;
+} Sfstr_t;
+
+#undef sfclose
+#undef sfprintf
+#undef sfprints
+#undef sfputc
+#undef sfputr
+#undef sfstrbase
+#undef sfstropen
+#undef sfstrseek
+#undef sfstrset
+#undef sfstrtell
+#undef sfstruse
+#undef sfwrite
+
+extern int sfclose(Sfio_t*);
+extern int sfprintf(Sfio_t*, const char*, ...);
+extern char* sfprints(const char*, ...);
+extern int sfputc(Sfio_t*, int);
+extern int sfputr(Sfio_t*, const char*, int);
+extern char* sfstrbase(Sfio_t*);
+extern Sfio_t* sfstropen(void);
+extern char* sfstrseek(Sfio_t*, int, int);
+extern char* sfstrset(Sfio_t*, int);
+extern int sfstrtell(Sfio_t*);
+extern char* sfstruse(Sfio_t*);
+extern int sfwrite(Sfio_t*, void*, int);
+
+#endif
diff --git a/usr/src/lib/libast/common/string/strdup.c b/usr/src/contrib/ast/src/lib/libast/astsa/strdup.c
index 2ecb9579b4..a4de874b80 100644
--- a/usr/src/lib/libast/common/string/strdup.c
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/strdup.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,20 +21,13 @@
***********************************************************************/
#pragma prototyped
-#undef VMDEBUG
-#define VMDEBUG 0
-
#include <ast.h>
/*
* return a copy of s using malloc
*/
-#if defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern char*
+char*
strdup(register const char* s)
{
register char* t;
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/strmatch.c b/usr/src/contrib/ast/src/lib/libast/astsa/strmatch.c
new file mode 100644
index 0000000000..60bd7e09cc
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/strmatch.c
@@ -0,0 +1,597 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+/*
+ * D. G. Korn
+ * G. S. Fowler
+ * AT&T Research
+ *
+ * match shell file patterns -- derived from Bourne and Korn shell gmatch()
+ *
+ * sh pattern egrep RE description
+ * ---------- -------- -----------
+ * * .* 0 or more chars
+ * ? . any single char
+ * [.] [.] char class
+ * [!.] [^.] negated char class
+ * [[:.:]] [[:.:]] ctype class
+ * [[=.=]] [[=.=]] equivalence class
+ * [[...]] [[...]] collation element
+ * *(.) (.)* 0 or more of
+ * +(.) (.)+ 1 or more of
+ * ?(.) (.)? 0 or 1 of
+ * (.) (.) 1 of
+ * @(.) (.) 1 of
+ * a|b a|b a or b
+ * \# () subgroup back reference [1-9]
+ * a&b a and b
+ * !(.) none of
+ *
+ * \ used to escape metacharacters
+ *
+ * *, ?, (, |, &, ), [, \ must be \'d outside of [...]
+ * only ] must be \'d inside [...]
+ *
+ * BUG: unbalanced ) terminates top level pattern
+ */
+
+#include <ast.h>
+#include <ctype.h>
+#include <hashkey.h>
+
+#ifndef isblank
+#define isblank(x) ((x)==' '||(x)=='\t')
+#endif
+
+#ifndef isgraph
+#define isgraph(x) (isprint(x)&&!isblank(x))
+#endif
+
+#define MAXGROUP 10
+
+typedef struct
+{
+ char* beg[MAXGROUP];
+ char* end[MAXGROUP];
+ char* next_s;
+ short groups;
+} Group_t;
+
+typedef struct
+{
+ Group_t current;
+ Group_t best;
+ char* last_s;
+ char* next_p;
+} Match_t;
+
+#define mbgetchar(p) (*p++)
+
+#ifndef isxdigit
+#define isxdigit(c) ((c)>='0'&&(c)<='9'||(c)>='a'&&(c)<='f'||(c)>='A'&&(c)<='F')
+#endif
+
+#define getsource(s,e) (((s)>=(e))?0:mbgetchar(s))
+
+#define COLL_MAX 3
+
+/*
+ * gobble chars up to <sub> or ) keeping track of (...) and [...]
+ * sub must be one of { '|', '&', 0 }
+ * 0 returned if s runs out
+ */
+
+static char*
+gobble(Match_t* mp, register char* s, register int sub, int* g, int clear)
+{
+ register int p = 0;
+ register char* b = 0;
+ int c = 0;
+ int n;
+
+ for (;;)
+ switch (mbgetchar(s))
+ {
+ case '\\':
+ if (mbgetchar(s))
+ break;
+ /*FALLTHROUGH*/
+ case 0:
+ return 0;
+ case '[':
+ if (!b)
+ {
+ if (*s == '!' || *s == '^')
+ mbgetchar(s);
+ b = s;
+ }
+ else if (*s == '.' || *s == '=' || *s == ':')
+ c = *s;
+ break;
+ case ']':
+ if (b)
+ {
+ if (*(s - 2) == c)
+ c = 0;
+ else if (b != (s - 1))
+ b = 0;
+ }
+ break;
+ case '(':
+ if (!b)
+ {
+ p++;
+ n = (*g)++;
+ if (clear)
+ {
+ if (!sub)
+ n++;
+ if (n < MAXGROUP)
+ mp->current.beg[n] = mp->current.end[n] = 0;
+ }
+ }
+ break;
+ case ')':
+ if (!b && p-- <= 0)
+ return sub ? 0 : s;
+ break;
+ case '|':
+ if (!b && !p && sub == '|')
+ return s;
+ break;
+ }
+}
+
+static int grpmatch(Match_t*, int, char*, register char*, char*, int);
+
+/*
+ * match a single pattern
+ * e is the end (0) of the substring in s
+ * r marks the start of a repeated subgroup pattern
+ */
+
+static int
+onematch(Match_t* mp, int g, char* s, char* p, char* e, char* r, int flags)
+{
+ register int pc;
+ register int sc;
+ register int n;
+ register int icase;
+ char* olds;
+ char* oldp;
+
+ icase = flags & STR_ICASE;
+ do
+ {
+ olds = s;
+ sc = getsource(s, e);
+ if (icase && isupper(sc))
+ sc = tolower(sc);
+ oldp = p;
+ switch (pc = mbgetchar(p))
+ {
+ case '(':
+ case '*':
+ case '?':
+ case '+':
+ case '@':
+ case '!':
+ if (pc == '(' || *p == '(')
+ {
+ char* subp;
+ int oldg;
+
+ s = olds;
+ subp = p + (pc != '(');
+ oldg = g;
+ n = ++g;
+ if (g < MAXGROUP && (!r || g > mp->current.groups))
+ mp->current.beg[g] = mp->current.end[g] = 0;
+ if (!(p = gobble(mp, subp, 0, &g, !r)))
+ return 0;
+ if (pc == '*' || pc == '?' || pc == '+' && oldp == r)
+ {
+ if (onematch(mp, g, s, p, e, NiL, flags))
+ return 1;
+ if (!sc || !getsource(s, e))
+ {
+ mp->current.groups = oldg;
+ return 0;
+ }
+ }
+ if (pc == '*' || pc == '+')
+ {
+ p = oldp;
+ sc = n - 1;
+ }
+ else
+ sc = g;
+ pc = (pc != '!');
+ do
+ {
+ if (grpmatch(mp, n, olds, subp, s, flags) == pc)
+ {
+ if (n < MAXGROUP)
+ {
+ if (!mp->current.beg[n] || mp->current.beg[n] > olds)
+ mp->current.beg[n] = olds;
+ if (s > mp->current.end[n])
+ mp->current.end[n] = s;
+ }
+ if (onematch(mp, sc, s, p, e, oldp, flags))
+ {
+ if (p == oldp && n < MAXGROUP)
+ {
+ if (!mp->current.beg[n] || mp->current.beg[n] > olds)
+ mp->current.beg[n] = olds;
+ if (s > mp->current.end[n])
+ mp->current.end[n] = s;
+ }
+ return 1;
+ }
+ }
+ } while (s < e && mbgetchar(s));
+ mp->current.groups = oldg;
+ return 0;
+ }
+ else if (pc == '*')
+ {
+ /*
+ * several stars are the same as one
+ */
+
+ while (*p == '*' && *(p + 1) != '(')
+ p++;
+ oldp = p;
+ switch (pc = mbgetchar(p))
+ {
+ case '@':
+ case '!':
+ case '+':
+ n = *p == '(';
+ break;
+ case '(':
+ case '[':
+ case '?':
+ case '*':
+ n = 1;
+ break;
+ case 0:
+ case '|':
+ case '&':
+ case ')':
+ mp->current.next_s = (flags & STR_MAXIMAL) ? e : olds;
+ mp->next_p = oldp;
+ mp->current.groups = g;
+ if (!pc && (!mp->best.next_s || (flags & STR_MAXIMAL) && mp->current.next_s > mp->best.next_s || !(flags & STR_MAXIMAL) && mp->current.next_s < mp->best.next_s))
+ mp->best = mp->current;
+ return 1;
+ case '\\':
+ if (!(pc = mbgetchar(p)))
+ return 0;
+ if (pc >= '0' && pc <= '9')
+ {
+ n = pc - '0';
+ if (n <= g && mp->current.beg[n])
+ pc = *mp->current.beg[n];
+ }
+ /*FALLTHROUGH*/
+ default:
+ if (icase && isupper(pc))
+ pc = tolower(pc);
+ n = 0;
+ break;
+ }
+ p = oldp;
+ for (;;)
+ {
+ if ((n || pc == sc) && onematch(mp, g, olds, p, e, NiL, flags))
+ return 1;
+ if (!sc)
+ return 0;
+ olds = s;
+ sc = getsource(s, e);
+ if ((flags & STR_ICASE) && isupper(sc))
+ sc = tolower(sc);
+ }
+ }
+ else if (pc != '?' && pc != sc)
+ return 0;
+ break;
+ case 0:
+ if (!(flags & STR_MAXIMAL))
+ sc = 0;
+ /*FALLTHROUGH*/
+ case '|':
+ case '&':
+ case ')':
+ if (!sc)
+ {
+ mp->current.next_s = olds;
+ mp->next_p = oldp;
+ mp->current.groups = g;
+ }
+ if (!pc && (!mp->best.next_s || (flags & STR_MAXIMAL) && olds > mp->best.next_s || !(flags & STR_MAXIMAL) && olds < mp->best.next_s))
+ {
+ mp->best = mp->current;
+ mp->best.next_s = olds;
+ mp->best.groups = g;
+ }
+ return !sc;
+ case '[':
+ {
+ /*UNDENT...*/
+
+ int invert;
+ int x;
+ int ok = 0;
+ char* range;
+
+ if (!sc)
+ return 0;
+ range = 0;
+ n = 0;
+ if (invert = *p == '!' || *p == '^')
+ p++;
+ for (;;)
+ {
+ oldp = p;
+ if (!(pc = mbgetchar(p)))
+ return 0;
+ else if (pc == '[' && (*p == ':' || *p == '=' || *p == '.'))
+ {
+ x = 0;
+ n = mbgetchar(p);
+ oldp = p;
+ for (;;)
+ {
+ if (!(pc = mbgetchar(p)))
+ return 0;
+ if (pc == n && *p == ']')
+ break;
+ x++;
+ }
+ mbgetchar(p);
+ if (ok)
+ /*NOP*/;
+ else if (n == ':')
+ {
+ switch (HASHNKEY5(x, oldp[0], oldp[1], oldp[2], oldp[3], oldp[4]))
+ {
+ case HASHNKEY5(5,'a','l','n','u','m'):
+ if (isalnum(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'a','l','p','h','a'):
+ if (isalpha(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'b','l','a','n','k'):
+ if (isblank(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'c','n','t','r','l'):
+ if (iscntrl(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'d','i','g','i','t'):
+ if (isdigit(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'g','r','a','p','h'):
+ if (isgraph(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'l','o','w','e','r'):
+ if (islower(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'p','r','i','n','t'):
+ if (isprint(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'p','u','n','c','t'):
+ if (ispunct(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'s','p','a','c','e'):
+ if (isspace(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(5,'u','p','p','e','r'):
+ if (icase ? islower(sc) : isupper(sc))
+ ok = 1;
+ break;
+ case HASHNKEY5(6,'x','d','i','g','i'):
+ if (oldp[5] == 't' && isxdigit(sc))
+ ok = 1;
+ break;
+ }
+ }
+ else if (range)
+ goto getrange;
+ else if (*p == '-' && *(p + 1) != ']')
+ {
+ mbgetchar(p);
+ range = oldp;
+ }
+ else if (isalpha(*oldp) && isalpha(*olds) && tolower(*oldp) == tolower(*olds) || sc == mbgetchar(oldp))
+ ok = 1;
+ n = 1;
+ }
+ else if (pc == ']' && n)
+ {
+ if (ok != invert)
+ break;
+ return 0;
+ }
+ else if (pc == '\\' && (oldp = p, !(pc = mbgetchar(p))))
+ return 0;
+ else if (ok)
+ /*NOP*/;
+ else if (range)
+ {
+ getrange:
+ if (icase && isupper(pc))
+ pc = tolower(pc);
+ x = mbgetchar(range);
+ if (icase && isupper(x))
+ x = tolower(x);
+ if (sc == x || sc == pc || sc > x && sc < pc)
+ ok = 1;
+ if (*p == '-' && *(p + 1) != ']')
+ {
+ mbgetchar(p);
+ range = oldp;
+ }
+ else
+ range = 0;
+ n = 1;
+ }
+ else if (*p == '-' && *(p + 1) != ']')
+ {
+ mbgetchar(p);
+ range = oldp;
+ n = 1;
+ }
+ else
+ {
+ if (icase && isupper(pc))
+ pc = tolower(pc);
+ if (sc == pc)
+ ok = 1;
+ n = pc;
+ }
+ }
+
+ /*...INDENT*/
+ }
+ break;
+ case '\\':
+ if (!(pc = mbgetchar(p)))
+ return 0;
+ if (pc >= '0' && pc <= '9')
+ {
+ n = pc - '0';
+ if (n <= g && (oldp = mp->current.beg[n]))
+ {
+ while (oldp < mp->current.end[n])
+ if (!*olds || *olds++ != *oldp++)
+ return 0;
+ s = olds;
+ break;
+ }
+ }
+ /*FALLTHROUGH*/
+ default:
+ if (icase && isupper(pc))
+ pc = tolower(pc);
+ if (pc != sc)
+ return 0;
+ break;
+ }
+ } while (sc);
+ return 0;
+}
+
+/*
+ * match any pattern in a group
+ * | and & subgroups are parsed here
+ */
+
+static int
+grpmatch(Match_t* mp, int g, char* s, register char* p, char* e, int flags)
+{
+ register char* a;
+
+ do
+ {
+ for (a = p; onematch(mp, g, s, a, e, NiL, flags); a++)
+ if (*(a = mp->next_p) != '&')
+ return 1;
+ } while (p = gobble(mp, p, '|', &g, 1));
+ return 0;
+}
+
+/*
+ * subgroup match
+ * 0 returned if no match
+ * otherwise number of subgroups matched returned
+ * match group begin offsets are even elements of sub
+ * match group end offsets are odd elements of sub
+ * the matched string is from s+sub[0] up to but not
+ * including s+sub[1]
+ */
+
+int
+strgrpmatch(const char* b, const char* p, ssize_t* sub, int n, int flags)
+{
+ register int i;
+ register char* s;
+ char* e;
+ Match_t match;
+
+ s = (char*)b;
+ match.last_s = e = s + strlen(s);
+ for (;;)
+ {
+ match.best.next_s = 0;
+ match.current.groups = 0;
+ if ((i = grpmatch(&match, 0, s, (char*)p, e, flags)) || match.best.next_s)
+ {
+ if (!i)
+ match.current = match.best;
+ match.current.groups++;
+ match.current.end[0] = match.current.next_s;
+ break;
+ }
+ if ((flags & STR_LEFT) || s >= e)
+ return 0;
+ s++;
+ }
+ if ((flags & STR_RIGHT) && match.current.next_s != e)
+ return 0;
+ if (!sub)
+ return 1;
+ match.current.beg[0] = s;
+ s = (char*)b;
+ if (n > match.current.groups)
+ n = match.current.groups;
+ for (i = 0; i < n; i++)
+ {
+ sub[i * 2] = match.current.end[i] ? match.current.beg[i] - s : 0;
+ sub[i * 2 + 1] = match.current.end[i] ? match.current.end[i] - s : 0;
+ }
+ return n;
+}
+
+/*
+ * compare the string s with the shell pattern p
+ * returns 1 for match 0 otherwise
+ */
+
+int
+strmatch(const char* s, const char* p)
+{
+ return strgrpmatch(s, p, NiL, 0, STR_MAXIMAL|STR_LEFT|STR_RIGHT);
+}
diff --git a/usr/src/lib/libast/amd64/include/ast/nl_types.h b/usr/src/contrib/ast/src/lib/libast/astsa/times.h
index 581cc13a81..7b916f7b4f 100644
--- a/usr/src/lib/libast/amd64/include/ast/nl_types.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/times.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,4 +19,9 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-#include <ast_nl_types.h>
+#ifndef _TIMES_H
+#define _TIMES_H 1
+
+#include <sys/times.h>
+
+#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.c b/usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.c
new file mode 100644
index 0000000000..3195b13145
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.c
@@ -0,0 +1,102 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * standalone mini vmalloc implementation
+ * no resize, no free, no disciplines, no methods
+ */
+
+#include <ast.h>
+#include <vmalloc.h>
+
+Vmalloc_t* Vmregion;
+
+Vmalloc_t*
+_vm_open(void)
+{
+ Vmalloc_t* vp;
+
+ if (vp = newof(0, Vmalloc_t, 1, 0))
+ {
+ vp->current = &vp->base;
+ vp->data = vp->current->data;
+ vp->size = sizeof(vp->current->data);
+ }
+ return vp;
+}
+
+int
+_vm_close(register Vmalloc_t* vp)
+{
+ register Vmchunk_t* cp;
+ register Vmchunk_t* np;
+
+ if (!vp)
+ return -1;
+ np = vp->base.next;
+ while (cp = np)
+ {
+ np = cp->next;
+ free(cp);
+ }
+ free(vp);
+ return 0;
+}
+
+void*
+_vm_resize(register Vmalloc_t* vp, void* o, unsigned long size)
+{
+ char* p;
+ unsigned long n;
+ unsigned long z;
+
+ z = vp->last;
+ vp->last = size;
+ if (o && size < z)
+ return o;
+ if ((o ? (size - z) : size) > vp->size)
+ {
+ n = (size > sizeof(vp->current->data)) ? (size - sizeof(vp->current->data)) : 0;
+ if (!(vp->current->next = newof(0, Vmchunk_t, 1, n)))
+ return 0;
+ vp->current = vp->current->next;
+ vp->data = vp->current->data;
+ vp->size = n ? 0 : sizeof(vp->current->data);
+ if (o)
+ {
+ memcpy(vp->data, o, z);
+ o = (void*)vp->data;
+ }
+ }
+ else if (o)
+ size -= z;
+ p = vp->data;
+ size = roundof(size, VM_ALIGN);
+ if (size >= vp->size)
+ vp->size = 0;
+ else
+ {
+ vp->size -= size;
+ vp->data += size;
+ }
+ return p;
+}
diff --git a/usr/src/lib/libast/amd64/include/ast/getopt.h b/usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.h
index c0679a7e53..e3d2e5bd3a 100644
--- a/usr/src/lib/libast/amd64/include/ast/getopt.h
+++ b/usr/src/contrib/ast/src/lib/libast/astsa/vmalloc.h
@@ -1,16 +1,14 @@
-
-/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,40 +19,43 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-
/*
- * gnu getopt interface
+ * standalone mini vmalloc interface
*/
-#ifndef _GETOPT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
+#ifndef _VMALLOC_H
+#define _VMALLOC_H 1
-#ifdef _AST_STD_I
-#define _GETOPT_H -1
-#else
-#define _GETOPT_H 1
+#define vmalloc(v,n) _vm_resize(v,(void*)0,n)
+#define vmalign(v,n,a) _vm_resize(v,(void*)0,n)
+#define vmclose(v) _vm_close(v)
+#define vmfree(v,p)
+#define vmnewof(v,o,t,n,x) (t*)_vm_resize(v,(void*)o,sizeof(t)*(n)+(x))
+#define vmopen(a,b,c) _vm_open()
-#include <ast_getopt.h>
+#define VM_CHUNK (32*1024)
+#define VM_ALIGN 16
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
+typedef struct Vmchunk_s
+{
+ struct Vmchunk_s* next;
+ char align[VM_ALIGN - sizeof(struct Vmchunk_s*)];
+ char data[VM_CHUNK - VM_ALIGN];
+} Vmchunk_t;
-struct option
+typedef struct Vmalloc_s
{
- const char* name;
- int has_arg;
- int* flag;
- int val;
-};
+ Vmchunk_t base;
+ Vmchunk_t* current;
+ char* data;
+ long size;
+ long last;
+} Vmalloc_t;
-extern __MANGLE__ int getopt_long __PROTO__((int, char* const*, const char*, const struct option*, int*));
-extern __MANGLE__ int getopt_long_only __PROTO__((int, char* const*, const char*, const struct option*, int*));
+extern Vmalloc_t* Vmregion;
+
+extern int _vm_close(Vmalloc_t*);
+extern Vmalloc_t* _vm_open(void);
+extern void* _vm_resize(Vmalloc_t*, void*, unsigned long);
-#endif
#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/cdt/cdtlib.h b/usr/src/contrib/ast/src/lib/libast/cdt/cdtlib.h
new file mode 100644
index 0000000000..1972dd24d3
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/cdtlib.h
@@ -0,0 +1,183 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#ifndef _CDTLIB_H
+#define _CDTLIB_H 1
+
+/* cdt library/method implementation header
+** this header is exported to the method libraries
+** Written by Kiem-Phong Vo (5/25/96)
+*/
+
+#if _PACKAGE_ast
+#include <ast.h>
+#if !_BLD_cdt
+#include <dlldefs.h>
+#endif
+#endif
+
+#include <cdt.h>
+#include <unistd.h>
+#include <aso.h>
+
+#include "debug.h"
+
+/* short-hand notations */
+#define NIL(t) ((t)0)
+#define reg register
+
+/* min #bits for a hash table. (1<<this) is table size */
+#define DT_HTABLE 10
+
+/* convenient types */
+#if !defined(uint)
+#define uint unsigned int
+#endif
+#if !defined(uchar)
+#define uchar unsigned char
+#endif
+
+/* This struct holds private method data created on DT_OPEN */
+struct _dtdata_s
+{ unsigned int lock; /* general dictionary lock */
+ Dtuser_t user; /* application's data */
+ unsigned int type; /* method type, control flags */
+ ssize_t size; /* number of objects */
+ Dt_t dict; /* when DT_INDATA is requested */
+};
+
+/* this structure holds the plugin information */
+typedef struct _dtlib_s
+{
+ char* name; /* short name */
+ char* description; /* short description */
+ char* release; /* release info */
+ char* prefix; /* name prefix */
+ Dtmethod_t** methods; /* method list */
+} Dtlib_t;
+
+#if _BLD_cdt
+
+#if defined(__STDC__)
+#define CDTLIB(m) __DEFINE__(Dtmethod_t*,m,&_##m);
+#else
+#define CDTLIB(m) __DEFINE__(Dtmethod_t*,m,&_/**/m);
+#endif
+
+#else
+
+#if defined(__STDC__)
+#define CDTLIB(m) \
+ void* cdt_lib(const char* name, Dtdisc_t* disc, const char* type) \
+ { \
+ int i; \
+ int n; \
+ if (!type) \
+ return &cdt_lib_##m; \
+ n = strlen(cdt_lib_##m.prefix); \
+ if (!strncmp(type, cdt_lib_##m.prefix, n)) \
+ type += n; \
+ for (i = 0; cdt_lib_##m.methods[i]; i++) \
+ if (!strcmp(type, cdt_lib_##m.methods[i]->name + n)) \
+ return cdt_lib_##m.methods[i]; \
+ return 0; \
+ } \
+ unsigned long plugin_version(void) { return CDT_PLUGIN_VERSION; }
+#else
+#define CDTLIB(m) \
+ void* cdt_lib(name, disc, type) const char* name; Dtdisc_t* disc; const char* type; \
+ { \
+ int i; \
+ int n; \
+ if (!type) \
+ return &cdt_lib_/**/m; \
+ n = strlen(cdt_lib_/**/m.prefix); \
+ if (!strncmp(type, cdt_lib_/**/m.prefix, n)) \
+ type += n; \
+ for (i = 0; cdt_lib_/**/m.methods[i]; i++) \
+ if (!strcmp(type, cdt_lib_/**/m.methods[i]->name + n)) \
+ return cdt_lib_/**/m.methods[i]; \
+ return 0; \
+ } \
+ unsigned long plugin_version() { return CDT_PLUGIN_VERSION; }
+#endif
+
+#endif /* _BLD_cdt */
+
+/* these macros lock/unlock dictionaries. DTRETURN substitutes for "return" */
+#define DTSETLOCK(dt) (((dt)->data->type&DT_SHARE) ? asolock(&(dt)->data->lock,1,ASO_SPINLOCK) : 0 )
+#define DTCLRLOCK(dt) (((dt)->data->type&DT_SHARE) ? asolock(&(dt)->data->lock,1,ASO_UNLOCK) : 0 )
+#define DTRETURN(ob,rv) do { (ob) = (rv); goto dt_return; } while(0)
+#define DTERROR(dt, mesg) (!((dt)->disc && (dt)->disc->eventf) ? 0 : \
+ (*(dt)->disc->eventf)((dt),DT_ERROR,(Void_t*)(mesg),(dt)->disc) )
+
+/* announce completion of an operation of type (ty) on some object (ob) in dictionary (dt) */
+#define DTANNOUNCE(dt,ob,ty) ( ((ob) && ((ty)&DT_TOANNOUNCE) && ((dt)->data->type&DT_ANNOUNCE) && \
+ (dt)->disc && (dt)->disc->eventf ) ? \
+ (*(dt)->disc->eventf)((dt), DT_ANNOUNCE|(ty), (ob), (dt)->disc) : 0 )
+
+/* map bits for upward compabitibility */
+#define DTTYPE(dt,ty) ((dt)->typef ? (*(dt)->typef)((dt), (ty)) : (ty) )
+
+/* short-hands for fields in Dtlink_t.
+** note that __hash is used as a hash value
+** or as the position in the parent table.
+*/
+#define _left lh.__left
+#define _hash lh.__hash
+#define _ppos lh.__hash
+
+#define _rght rh.__rght
+#define _ptbl rh.__ptbl
+
+/* tree rotation/linking functions */
+#define rrotate(x,y) ((x)->_left = (y)->_rght, (y)->_rght = (x))
+#define lrotate(x,y) ((x)->_rght = (y)->_left, (y)->_left = (x))
+#define rlink(r,x) ((r) = (r)->_left = (x) )
+#define llink(l,x) ((l) = (l)->_rght = (x) )
+
+#define RROTATE(x,y) (rrotate(x,y), (x) = (y))
+#define LROTATE(x,y) (lrotate(x,y), (x) = (y))
+#define RRSHIFT(x,t) ((t) = (x)->_left->_left, (x)->_left->_left = (t)->_rght, \
+ (t)->_rght = (x), (x) = (t) )
+#define LLSHIFT(x,t) ((t) = (x)->_rght->_rght, (x)->_rght->_rght = (t)->_left, \
+ (t)->_left = (x), (x) = (t) )
+
+_BEGIN_EXTERNS_
+
+#if _BLD_cdt && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern Dtlink_t* _dtmake _ARG_((Dt_t*, Void_t*, int));
+extern void _dtfree _ARG_((Dt_t*, Dtlink_t*, int));
+extern int _dtlock _ARG_((Dt_t*, int));
+
+#undef extern
+
+#if !_PACKAGE_ast
+extern Void_t* malloc _ARG_((size_t));
+extern Void_t* realloc _ARG_((Void_t*, size_t));
+extern void free _ARG_((Void_t*));
+#endif
+_END_EXTERNS_
+
+#endif /* _CDTLIB_H */
diff --git a/usr/src/lib/libast/common/cdt/dtclose.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtclose.c
index c5d9a448e6..45bca76631 100644
--- a/usr/src/lib/libast/common/cdt/dtclose.c
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtclose.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -23,47 +23,44 @@
/* Close a dictionary
**
-** Written by Kiem-Phong Vo (05/25/96)
+** Written by Kiem-Phong Vo (11/15/2010)
*/
#if __STD_C
-int dtclose(reg Dt_t* dt)
+int dtclose(Dt_t* dt)
#else
int dtclose(dt)
-reg Dt_t* dt;
+Dt_t* dt;
#endif
{
- Dtdisc_t *disc;
- int ev = 0;
+ int ev, type;
+ Dt_t pdt;
+ Dtdisc_t *disc = dt->disc;
if(!dt || dt->nview > 0 ) /* can't close if being viewed */
return -1;
- /* announce the close event to see if we should continue */
- disc = dt->disc;
- if(disc->eventf &&
- (ev = (*disc->eventf)(dt,DT_CLOSE,NIL(Void_t*),disc)) < 0)
+ if(disc && disc->eventf) /* announce closing event */
+ ev = (*disc->eventf)(dt, DT_CLOSE, (Void_t*)1, disc);
+ else ev = 0;
+ if(ev < 0) /* cannot close */
return -1;
- if(dt->view) /* turn off viewing */
+ if(dt->view) /* turn off viewing at this point */
dtview(dt,NIL(Dt_t*));
- if(ev == 0) /* release all allocated data */
- { (void)(*(dt->meth->searchf))(dt,NIL(Void_t*),DT_CLEAR);
- if(dtsize(dt) > 0)
- return -1;
+ type = dt->data->type; /* save before memory is freed */
+ memcpy(&pdt, dt, sizeof(Dt_t));
- if(dt->data->ntab > 0)
- (*dt->memoryf)(dt,(Void_t*)dt->data->htab,0,disc);
- (*dt->memoryf)(dt,(Void_t*)dt->data,0,disc);
+ if(ev == 0 ) /* release all allocated data */
+ { (void)(*(dt->meth->searchf))(dt,NIL(Void_t*),DT_CLEAR);
+ (void)(*dt->meth->eventf)(dt, DT_CLOSE, (Void_t*)0);
+ /**/DEBUG_ASSERT(!dt->data);
}
+ if(!(type&DT_INDATA) )
+ (void)free(dt);
- if(dt->type == DT_MALLOC)
- free((Void_t*)dt);
- else if(ev == 0 && dt->type == DT_MEMORYF)
- (*dt->memoryf)(dt, (Void_t*)dt, 0, disc);
-
- if(disc->eventf)
- (void)(*disc->eventf)(dt, DT_ENDCLOSE, NIL(Void_t*), disc);
+ if(disc && disc->eventf) /* announce end of closing activities */
+ (void)(*disc->eventf)(&pdt, DT_ENDCLOSE, (Void_t*)0, disc);
return 0;
}
diff --git a/usr/src/contrib/ast/src/lib/libast/cdt/dtcomp.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtcomp.c
new file mode 100644
index 0000000000..5308c70ba5
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtcomp.c
@@ -0,0 +1,60 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * backwards binary compatibility
+ */
+
+#include <cdt.h>
+
+#if defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+#undef dtflatten
+extern Dtlink_t* dtflatten(Dt_t* d)
+{
+ return (Dtlink_t*)(*(_DT(d)->searchf))((d),(Void_t*)(0),DT_FLATTEN);
+}
+
+#undef dtextract
+extern Dtlink_t* dtextract(Dt_t* d)
+{
+ return (Dtlink_t*)(*(_DT(d)->searchf))((d),(Void_t*)(0),DT_EXTRACT);
+}
+
+#undef dtrestore
+extern Dtlink_t* dtrestore(Dt_t* d, Void_t* l)
+{
+ return (Dtlink_t*)(*(_DT(d)->searchf))((d),(l),DT_RESTORE);
+}
+
+#undef dtsize
+extern ssize_t dtsize(Dt_t* d)
+{
+ return (ssize_t)(*(_DT(d)->searchf))((d),(Void_t*)(0),DT_STAT);
+}
+
+#undef dtstat
+extern ssize_t dtstat(Dt_t* d)
+{
+ return (ssize_t)(*(_DT(d)->searchf))((d),(Void_t*)(0),DT_STAT);
+}
diff --git a/usr/src/lib/libast/common/cdt/dtdisc.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtdisc.c
index 656cc056ac..5ce74e14eb 100644
--- a/usr/src/lib/libast/common/cdt/dtdisc.c
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtdisc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,7 +29,7 @@
*/
#if __STD_C
-static Void_t* dtmemory(Dt_t* dt,Void_t* addr,size_t size,Dtdisc_t* disc)
+static Void_t* dtmemory(Dt_t* dt, Void_t* addr, size_t size, Dtdisc_t* disc)
#else
static Void_t* dtmemory(dt, addr, size, disc)
Dt_t* dt; /* dictionary */
@@ -57,10 +57,8 @@ Dtdisc_t* disc;
int type;
#endif
{
- reg Dtsearch_f searchf;
- reg Dtlink_t *r, *t;
- reg char* k;
- reg Dtdisc_t* old;
+ Dtdisc_t *old;
+ Dtlink_t *list;
if(!(old = dt->disc) ) /* initialization call from dtopen() */
{ dt->disc = disc;
@@ -69,61 +67,22 @@ int type;
return disc;
}
- if(!disc) /* only want to know current discipline */
+ if(!disc) /* only want to know current discipline */
return old;
- searchf = dt->meth->searchf;
-
- UNFLATTEN(dt);
-
if(old->eventf && (*old->eventf)(dt,DT_DISC,(Void_t*)disc,old) < 0)
return NIL(Dtdisc_t*);
+ if((type & (DT_SAMEHASH|DT_SAMECMP)) != (DT_SAMEHASH|DT_SAMECMP) )
+ list = dtextract(dt); /* grab the list of objects if any */
+ else list = NIL(Dtlink_t*);
+
dt->disc = disc;
if(!(dt->memoryf = disc->memoryf) )
dt->memoryf = dtmemory;
- if(dt->data->type&(DT_STACK|DT_QUEUE|DT_LIST))
- goto done;
- else if(dt->data->type&DT_BAG)
- { if(type&DT_SAMEHASH)
- goto done;
- else goto dt_renew;
- }
- else if(dt->data->type&(DT_SET|DT_BAG))
- { if((type&DT_SAMEHASH) && (type&DT_SAMECMP))
- goto done;
- else goto dt_renew;
- }
- else /*if(dt->data->type&(DT_OSET|DT_OBAG))*/
- { if(type&DT_SAMECMP)
- goto done;
- dt_renew:
- r = dtflatten(dt);
- dt->data->type &= ~DT_FLATTEN;
- dt->data->here = NIL(Dtlink_t*);
- dt->data->size = 0;
-
- if(dt->data->type&(DT_SET|DT_BAG))
- { reg Dtlink_t **s, **ends;
- ends = (s = dt->data->htab) + dt->data->ntab;
- while(s < ends)
- *s++ = NIL(Dtlink_t*);
- }
-
- /* reinsert them */
- while(r)
- { t = r->right;
- if(!(type&DT_SAMEHASH)) /* new hash value */
- { k = (char*)_DTOBJ(r,disc->link);
- k = _DTKEY((Void_t*)k,disc->key,disc->size);
- r->hash = _DTHSH(dt,k,disc,disc->size);
- }
- (void)(*searchf)(dt,(Void_t*)r,DT_RENEW);
- r = t;
- }
- }
+ if(list ) /* reinsert extracted objects (with new discipline) */
+ dtrestore(dt, list);
-done:
return old;
}
diff --git a/usr/src/contrib/ast/src/lib/libast/cdt/dthash.c b/usr/src/contrib/ast/src/lib/libast/cdt/dthash.c
new file mode 100644
index 0000000000..61bc84cb49
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dthash.c
@@ -0,0 +1,429 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#include "dthdr.h"
+
+/* Hash table with chaining for collisions.
+**
+** Written by Kiem-Phong Vo (05/25/96)
+*/
+
+/* these bits should be outside the scope of DT_METHODS */
+#define H_FIXED 0100000 /* table size is fixed */
+#define H_FLATTEN 0200000 /* table was flattened */
+
+#define HLOAD(n) (n) /* load one-to-one */
+
+/* internal data structure for hash table with chaining */
+typedef struct _dthash_s
+{ Dtdata_t data;
+ int type;
+ Dtlink_t* here; /* fingered object */
+ Dtlink_t** htbl; /* hash table slots */
+ ssize_t tblz; /* size of hash table */
+} Dthash_t;
+
+/* make/resize hash table */
+static int htable(Dt_t* dt)
+{
+ Dtlink_t **htbl, **t, **endt, *l, *next;
+ ssize_t n, k;
+ Dtdisc_t *disc = dt->disc;
+ Dthash_t *hash = (Dthash_t*)dt->data;
+
+ if((n = hash->tblz) > 0 && (hash->type&H_FIXED) )
+ return 0; /* fixed size table */
+
+ if(n == 0 && disc && disc->eventf) /* let user have input */
+ { if((*disc->eventf)(dt, DT_HASHSIZE, &n, disc) > 0 )
+ { if(n < 0) /* fix table size */
+ { hash->type |= H_FIXED;
+ n = -n;
+ }
+ }
+ }
+
+ /* table size should be a power of 2 */
+ n = n < HLOAD(hash->data.size) ? HLOAD(hash->data.size) : n;
+ for(k = (1<<DT_HTABLE); k < n; )
+ k *= 2;
+ if((n = k) <= hash->tblz)
+ return 0;
+
+ /* allocate new table */
+ if(!(htbl = (Dtlink_t**)(*dt->memoryf)(dt, 0, n*sizeof(Dtlink_t*), disc)) )
+ { DTERROR(dt, "Error in allocating an extended hash table");
+ return -1;
+ }
+ memset(htbl, 0, n*sizeof(Dtlink_t*));
+
+ /* move objects into new table */
+ for(endt = (t = hash->htbl) + hash->tblz; t < endt; ++t)
+ { for(l = *t; l; l = next)
+ { next = l->_rght;
+ l->_rght = htbl[k = l->_hash&(n-1)];
+ htbl[k] = l;
+ }
+ }
+
+ if(hash->htbl) /* free old table and set new table */
+ (void)(*dt->memoryf)(dt, hash->htbl, 0, disc);
+ hash->htbl = htbl;
+ hash->tblz = n;
+
+ return 0;
+}
+
+static Void_t* hclear(Dt_t* dt)
+{
+ Dtlink_t **t, **endt, *l, *next;
+ Dthash_t *hash = (Dthash_t*)dt->data;
+
+ hash->here = NIL(Dtlink_t*);
+ hash->data.size = 0;
+
+ for(endt = (t = hash->htbl) + hash->tblz; t < endt; ++t)
+ { for(l = *t; l; l = next)
+ { next = l->_rght;
+ _dtfree(dt, l, DT_DELETE);
+ }
+ *t = NIL(Dtlink_t*);
+ }
+
+ return NIL(Void_t*);
+}
+
+static Void_t* hfirst(Dt_t* dt)
+{
+ Dtlink_t **t, **endt, *l;
+ Dthash_t *hash = (Dthash_t*)dt->data;
+
+ for(endt = (t = hash->htbl) + hash->tblz; t < endt; ++t)
+ { if(!(l = *t) )
+ continue;
+ hash->here = l;
+ return _DTOBJ(dt->disc, l);
+ }
+
+ return NIL(Void_t*);
+}
+
+static Void_t* hnext(Dt_t* dt, Dtlink_t* l)
+{
+ Dtlink_t **t, **endt, *next;
+ Dthash_t *hash = (Dthash_t*)dt->data;
+
+ if((next = l->_rght) )
+ { hash->here = next;
+ return _DTOBJ(dt->disc, next);
+ }
+ else
+ { t = hash->htbl + (l->_hash & (hash->tblz-1)) + 1;
+ endt = hash->htbl + hash->tblz;
+ for(; t < endt; ++t)
+ { if(!(l = *t) )
+ continue;
+ hash->here = l;
+ return _DTOBJ(dt->disc, l);
+ }
+ return NIL(Void_t*);
+ }
+}
+
+static Void_t* hflatten(Dt_t* dt, int type)
+{
+ Dtlink_t **t, **endt, *head, *tail, *l;
+ Dthash_t *hash = (Dthash_t*)dt->data;
+
+ if(type == DT_FLATTEN || type == DT_EXTRACT)
+ { head = tail = NIL(Dtlink_t*);
+ for(endt = (t = hash->htbl) + hash->tblz; t < endt; ++t)
+ { for(l = *t; l; l = l->_rght)
+ { if(tail)
+ tail = (tail->_rght = l);
+ else head = tail = l;
+
+ *t = type == DT_FLATTEN ? tail : NIL(Dtlink_t*);
+ }
+ }
+
+ if(type == DT_FLATTEN)
+ { hash->here = head;
+ hash->type |= H_FLATTEN;
+ }
+ else hash->data.size = 0;
+
+ return (Void_t*)head;
+ }
+ else /* restoring a previous flattened list */
+ { head = hash->here;
+ for(endt = (t = hash->htbl) + hash->tblz; t < endt; ++t)
+ { if(*t == NIL(Dtlink_t*))
+ continue;
+
+ /* find the tail of the list for this slot */
+ for(l = head; l && l != *t; l = l->_rght)
+ ;
+ if(!l) /* something is seriously wrong */
+ return NIL(Void_t*);
+
+ *t = head; /* head of list for this slot */
+ head = l->_rght; /* head of next list */
+ l->_rght = NIL(Dtlink_t*);
+ }
+
+ hash->here = NIL(Dtlink_t*);
+ hash->type &= ~H_FLATTEN;
+
+ return NIL(Void_t*);
+ }
+}
+
+static Void_t* hlist(Dt_t* dt, Dtlink_t* list, int type)
+{
+ Void_t *obj;
+ Dtlink_t *l, *next;
+ Dtdisc_t *disc = dt->disc;
+
+ if(type&DT_FLATTEN)
+ return hflatten(dt, DT_FLATTEN);
+ else if(type&DT_EXTRACT)
+ return hflatten(dt, DT_EXTRACT);
+ else /* if(type&DT_RESTORE) */
+ { dt->data->size = 0;
+ for(l = list; l; l = next)
+ { next = l->_rght;
+ obj = _DTOBJ(disc,l);
+ if((*dt->meth->searchf)(dt, (Void_t*)l, DT_RELINK) == obj)
+ dt->data->size += 1;
+ }
+ return (Void_t*)list;
+ }
+}
+
+static Void_t* hstat(Dt_t* dt, Dtstat_t* st)
+{
+ ssize_t n;
+ Dtlink_t **t, **endt, *l;
+ Dthash_t *hash = (Dthash_t*)dt->data;
+
+ if(st)
+ { memset(st, 0, sizeof(Dtstat_t));
+ st->meth = dt->meth->type;
+ st->size = hash->data.size;
+ st->space = sizeof(Dthash_t) + hash->tblz*sizeof(Dtlink_t*) +
+ (dt->disc->link >= 0 ? 0 : hash->data.size*sizeof(Dthold_t));
+
+ for(endt = (t = hash->htbl) + hash->tblz; t < endt; ++t)
+ { for(n = 0, l = *t; l; l = l->_rght)
+ n += 1;
+ st->mlev = n > st->mlev ? n : st->mlev;
+ if(n < DT_MAXSIZE) /* if chain length is small */
+ { st->msize = n > st->msize ? n : st->msize;
+ st->lsize[n] += n;
+ }
+ }
+ }
+
+ return (Void_t*)hash->data.size;
+}
+
+#if __STD_C
+static Void_t* dthashchain(Dt_t* dt, Void_t* obj, int type)
+#else
+static Void_t* dthashchain(dt,obj,type)
+Dt_t* dt;
+Void_t* obj;
+int type;
+#endif
+{
+ Dtlink_t *lnk, *pp, *ll, *p, *l, **tbl;
+ Void_t *key, *k, *o;
+ uint hsh;
+ Dtdisc_t *disc = dt->disc;
+ Dthash_t *hash = (Dthash_t*)dt->data;
+
+ type = DTTYPE(dt,type); /* map type for upward compatibility */
+ if(!(type&DT_OPERATIONS) )
+ return NIL(Void_t*);
+
+ DTSETLOCK(dt);
+
+ if(!hash->htbl && htable(dt) < 0 ) /* initialize hash table */
+ DTRETURN(obj, NIL(Void_t*));
+
+ if(hash->type&H_FLATTEN) /* restore flattened list */
+ hflatten(dt, 0);
+
+ if(type&(DT_FIRST|DT_LAST|DT_CLEAR|DT_EXTRACT|DT_RESTORE|DT_FLATTEN|DT_STAT) )
+ { if(type&(DT_FIRST|DT_LAST) )
+ DTRETURN(obj, hfirst(dt));
+ else if(type&DT_CLEAR)
+ DTRETURN(obj, hclear(dt));
+ else if(type&DT_STAT)
+ DTRETURN(obj, hstat(dt, (Dtstat_t*)obj));
+ else /*if(type&(DT_EXTRACT|DT_RESTORE|DT_FLATTEN))*/
+ DTRETURN(obj, hlist(dt, (Dtlink_t*)obj, type));
+ }
+
+ lnk = hash->here; /* fingered object */
+ hash->here = NIL(Dtlink_t*);
+
+ if(lnk && obj == _DTOBJ(disc,lnk))
+ { if(type&DT_SEARCH)
+ DTRETURN(obj, obj);
+ else if(type&(DT_NEXT|DT_PREV) )
+ DTRETURN(obj, hnext(dt,lnk));
+ }
+
+ if(type&DT_RELINK)
+ { lnk = (Dtlink_t*)obj;
+ obj = _DTOBJ(disc,lnk);
+ key = _DTKEY(disc,obj);
+ }
+ else
+ { lnk = NIL(Dtlink_t*);
+ if((type&DT_MATCH) )
+ { key = obj;
+ obj = NIL(Void_t*);
+ }
+ else key = _DTKEY(disc,obj);
+ }
+ hsh = _DTHSH(dt,key,disc);
+
+ tbl = hash->htbl + (hsh & (hash->tblz-1));
+ pp = ll = NIL(Dtlink_t*);
+ for(p = NIL(Dtlink_t*), l = *tbl; l; p = l, l = l->_rght)
+ { if(hsh == l->_hash)
+ { o = _DTOBJ(disc,l); k = _DTKEY(disc,o);
+ if(_DTCMP(dt, key, k, disc) != 0 )
+ continue;
+ else if((type&(DT_REMOVE|DT_NEXT|DT_PREV)) && o != obj )
+ { if(type&(DT_NEXT|DT_PREV) )
+ { pp = p; ll = l; }
+ continue;
+ }
+ else break;
+ }
+ }
+ if(l) /* found an object, use it */
+ { pp = p; ll = l; }
+
+ if(ll) /* found object */
+ { if(type&(DT_SEARCH|DT_MATCH|DT_ATLEAST|DT_ATMOST) )
+ { hash->here = ll;
+ DTRETURN(obj, _DTOBJ(disc,ll));
+ }
+ else if(type & (DT_NEXT|DT_PREV) )
+ DTRETURN(obj, hnext(dt, ll));
+ else if(type & (DT_DELETE|DT_DETACH|DT_REMOVE) )
+ { hash->data.size -= 1;
+ if(pp)
+ pp->_rght = ll->_rght;
+ else *tbl = ll->_rght;
+ _dtfree(dt, ll, type);
+ DTRETURN(obj, _DTOBJ(disc,ll));
+ }
+ else
+ { /**/DEBUG_ASSERT(type&(DT_INSERT|DT_ATTACH|DT_APPEND|DT_RELINK));
+ if(!(dt->meth->type&DT_BAG) )
+ { if(type&(DT_INSERT|DT_APPEND|DT_ATTACH) )
+ type |= DT_SEARCH; /* for announcement */
+ else if(lnk && (type&DT_RELINK) )
+ _dtfree(dt, lnk, DT_DELETE);
+ DTRETURN(obj, _DTOBJ(disc,ll));
+ }
+ else goto do_insert;
+ }
+ }
+ else /* no matching object */
+ { if(!(type&(DT_INSERT|DT_APPEND|DT_ATTACH|DT_RELINK)) )
+ DTRETURN(obj, NIL(Void_t*));
+
+ do_insert: /* inserting a new object */
+ if(hash->tblz < HLOAD(hash->data.size) )
+ { htable(dt); /* resize table */
+ tbl = hash->htbl + (hsh & (hash->tblz-1));
+ }
+
+ if(!lnk) /* inserting a new object */
+ { if(!(lnk = _dtmake(dt, obj, type)) )
+ DTRETURN(obj, NIL(Void_t*));
+ hash->data.size += 1;
+ }
+
+ lnk->_hash = hsh; /* memoize the hash value */
+ lnk->_rght = *tbl; *tbl = lnk;
+
+ hash->here = lnk;
+ DTRETURN(obj, _DTOBJ(disc,lnk));
+ }
+
+dt_return:
+ DTANNOUNCE(dt, obj, type);
+ DTCLRLOCK(dt);
+ return obj;
+}
+
+static int hashevent(Dt_t* dt, int event, Void_t* arg)
+{
+ Dthash_t *hash = (Dthash_t*)dt->data;
+
+ if(event == DT_OPEN)
+ { if(hash)
+ return 0;
+ if(!(hash = (Dthash_t*)(*dt->memoryf)(dt, 0, sizeof(Dthash_t), dt->disc)) )
+ { DTERROR(dt, "Error in allocating a hash table with chaining");
+ return -1;
+ }
+ memset(hash, 0, sizeof(Dthash_t));
+ dt->data = (Dtdata_t*)hash;
+ return 1;
+ }
+ else if(event == DT_CLOSE)
+ { if(!hash)
+ return 0;
+ if(hash->data.size > 0 )
+ (void)hclear(dt);
+ if(hash->htbl)
+ (void)(*dt->memoryf)(dt, hash->htbl, 0, dt->disc);
+ (void)(*dt->memoryf)(dt, hash, 0, dt->disc);
+ dt->data = NIL(Dtdata_t*);
+ return 0;
+ }
+ else return 0;
+}
+
+static Dtmethod_t _Dtset = { dthashchain, DT_SET, hashevent, "Dtset" };
+static Dtmethod_t _Dtbag = { dthashchain, DT_BAG, hashevent, "Dtbag" };
+__DEFINE__(Dtmethod_t*,Dtset,&_Dtset);
+__DEFINE__(Dtmethod_t*,Dtbag,&_Dtbag);
+
+/* backwards compatibility */
+#undef Dthash
+#if defined(__EXPORT__)
+__EXPORT__
+#endif
+__DEFINE__(Dtmethod_t*,Dthash,&_Dtset);
+
+#ifdef NoF
+NoF(dthashchain)
+#endif
diff --git a/usr/src/lib/libast/common/include/usage.h b/usr/src/contrib/ast/src/lib/libast/cdt/dthdr.h
index 19d2b0fc14..d24ae0d1c5 100644
--- a/usr/src/lib/libast/common/include/usage.h
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dthdr.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,19 +19,19 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-/*
- * error catalog and usage defaults
- */
+#ifndef _DTHDR_H
+#define _DTHDR_H 1
-#ifndef _USAGE_H
-#define _USAGE_H
-
-#ifndef ERROR_CATALOG
-#define ERROR_CATALOG 0
+#ifndef _BLD_cdt
+#define _BLD_cdt 1
#endif
-#ifndef USAGE_LICENSE
-#define USAGE_LICENSE "[-license?THIS IS AN UNLICENSED COPY]"
-#endif
+/* Internal definitions for libcdt.
+** Written by Kiem-Phong Vo (5/25/96)
+*/
-#endif
+#undef _DTTRACE
+
+#include <cdtlib.h>
+
+#endif /* _DTHDR_H */
diff --git a/usr/src/contrib/ast/src/lib/libast/cdt/dtlist.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtlist.c
new file mode 100644
index 0000000000..3496fb5aaa
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtlist.c
@@ -0,0 +1,383 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#include "dthdr.h"
+
+/* List, Deque, Stack, Queue.
+**
+** Written by Kiem-Phong Vo (05/25/96)
+*/
+
+typedef struct _dtlist_s
+{ Dtdata_t data;
+ Dtlink_t* link; /* list of objects */
+ Dtlink_t* here; /* finger to searched objects */
+} Dtlist_t;
+
+#ifdef DEBUG
+int dtlistprint(Dt_t* dt, Dtlink_t* here, char* (*objprintf)(Void_t*) )
+{
+ int k;
+ char *obj, *endb, buf[1024];
+ Dtdisc_t *disc = dt->disc;
+ Dtlist_t *list = (Dtlist_t*)dt->data;
+
+ if(!here && !(here = list->link) )
+ return -1;
+
+ for(; here; here = here->_rght)
+ { endb = buf; /* indentation */
+ *endb++ = '(';
+ obj = (*objprintf)(_DTOBJ(disc, here));
+ k = strlen(obj); memcpy(endb, obj, k); endb += k;
+ *endb++ = ')';
+ *endb++ = '\n';
+ write(2, buf, endb-buf);
+ }
+
+ return 0;
+}
+#endif
+
+/* terminal objects: DT_FIRST|DT_LAST */
+#if __STD_C
+Void_t* lfirstlast(Dt_t* dt, int type)
+#else
+Void_t* lfirstlast(dt, type)
+Dt_t* dt;
+int type;
+#endif
+{
+ Dtlink_t *lnk;
+ Dtdisc_t *disc = dt->disc;
+ Dtlist_t *list = (Dtlist_t*)dt->data;
+
+ if((lnk = list->link) )
+ { if(type&DT_LAST)
+ lnk = lnk->_left;
+ list->here = lnk; /* finger points to this */
+ }
+
+ return lnk ? _DTOBJ(disc,lnk) : NIL(Void_t*);
+}
+
+/* DT_CLEAR */
+#if __STD_C
+Void_t* lclear(Dt_t* dt)
+#else
+Void_t* lclear(dt)
+Dt_t* dt;
+#endif
+{
+ Dtlink_t *lnk, *next;
+ Dtdisc_t *disc = dt->disc;
+ Dtlist_t *list = (Dtlist_t*)dt->data;
+
+ lnk = list->link;
+ list->link = list->here = NIL(Dtlink_t*);
+ list->data.size = 0;
+
+ if(disc->freef || disc->link < 0)
+ { for(; lnk; lnk = next)
+ { next = lnk->_rght;
+ _dtfree(dt, lnk, DT_DELETE);
+ }
+ }
+
+ return NIL(Void_t*);
+}
+
+/* DT_FLATTEN|DT_EXTRACT|DT_RESTORE */
+#if __STD_C
+Void_t* llist(Dt_t* dt, Dtlink_t* lnk, int type)
+#else
+Void_t* llist(dt, lnk, type)
+Dt_t* dt;
+Dtlink_t* lnk;
+int type;
+#endif
+{
+ Dtlist_t *list = (Dtlist_t*)dt->data;
+
+ if(type&(DT_FLATTEN|DT_EXTRACT) )
+ { if(lnk) /* error on calling */
+ return NIL(Void_t*);
+
+ lnk = list->link;
+ if(type&DT_EXTRACT)
+ { list->link = NIL(Dtlink_t*);
+ dt->data->size = 0;
+ }
+ }
+ else /* if(type&DT_RESTORE) */
+ { if(list->link != NIL(Dtlink_t*))
+ return NIL(Void_t*);
+
+ list->link = lnk;
+
+ dt->data->size = 0;
+ for(; lnk; lnk = lnk->_rght)
+ dt->data->size += 1;
+ }
+
+ return (Void_t*)lnk;
+}
+
+#if __STD_C
+static Void_t* liststat(Dt_t* dt, Dtstat_t* st)
+#else
+static Void_t* liststat(dt, st)
+Dt_t* dt;
+Dtstat_t* st;
+#endif
+{
+ if(st)
+ { memset(st, 0, sizeof(Dtstat_t));
+ st->meth = dt->meth->type;
+ st->size = dt->data->size;
+ st->space = sizeof(Dtlist_t) + (dt->disc->link >= 0 ? 0 : dt->data->size*sizeof(Dthold_t));
+ }
+
+ return (Void_t*)dt->data->size;
+}
+
+#if __STD_C
+static Void_t* dtlist(Dt_t* dt, Void_t* obj, int type)
+#else
+static Void_t* dtlist(dt, obj, type)
+Dt_t* dt;
+Void_t* obj;
+int type;
+#endif
+{
+ Dtlink_t *r, *t, *h;
+ Void_t *key, *o, *k;
+ Dtdisc_t *disc = dt->disc;
+ Dtlist_t *list = (Dtlist_t*)dt->data;
+
+ type = DTTYPE(dt,type); /* map type for upward compatibility */
+ if(!(type&DT_OPERATIONS) )
+ return NIL(Void_t*);
+
+ DTSETLOCK(dt);
+
+ if(type&(DT_FIRST|DT_LAST) )
+ DTRETURN(obj, lfirstlast(dt, type));
+ else if(type&(DT_EXTRACT|DT_RESTORE|DT_FLATTEN) )
+ DTRETURN(obj, llist(dt, (Dtlink_t*)obj, type));
+ else if(type&DT_CLEAR)
+ DTRETURN(obj, lclear(dt));
+ else if(type&DT_STAT )
+ DTRETURN(obj, liststat(dt, (Dtstat_t*)obj));
+
+ h = list->here; /* save finger to last search object */
+ list->here = NIL(Dtlink_t*);
+
+ if(!obj)
+ { if((type&(DT_DELETE|DT_DETACH|DT_REMOVE)) && (dt->meth->type&(DT_STACK|DT_QUEUE)) )
+ if((r = list->link) ) /* special case for destack or dequeue */
+ goto dt_delete;
+ DTRETURN(obj, NIL(Void_t*)); /* error, needing non-void object */
+ }
+
+ if(type&DT_RELINK) /* relink object after some processing */
+ { r = (Dtlink_t*)obj;
+ goto do_insert;
+ }
+ else if(type&(DT_INSERT|DT_APPEND|DT_ATTACH))
+ { if(!(r = _dtmake(dt, obj, type)) )
+ DTRETURN(obj, NIL(Void_t*));
+ dt->data->size += 1;
+
+ do_insert:
+ if(dt->meth->type&DT_DEQUE)
+ { if(type&DT_APPEND)
+ goto dt_queue; /* append at end */
+ else goto dt_stack; /* insert at top */
+ }
+ else if(dt->meth->type&DT_LIST)
+ { if(type&DT_APPEND)
+ { if(!h || !h->_rght)
+ goto dt_queue;
+ r->_rght = h->_rght;
+ r->_rght->_left = r;
+ r->_left = h;
+ r->_left->_rght = r;
+ }
+ else
+ { if(!h || h == list->link )
+ goto dt_stack;
+ r->_left = h->_left;
+ r->_left->_rght = r;
+ r->_rght = h;
+ r->_rght->_left = r;
+ }
+ }
+ else if(dt->meth->type&DT_STACK)
+ { dt_stack:
+ r->_rght = t = list->link;
+ if(t)
+ { r->_left = t->_left;
+ t->_left = r;
+ }
+ else r->_left = r;
+ list->link = r;
+ }
+ else /* if(dt->meth->type&DT_QUEUE) */
+ { dt_queue:
+ if((t = list->link) )
+ { t->_left->_rght = r;
+ r->_left = t->_left;
+ t->_left = r;
+ }
+ else
+ { list->link = r;
+ r->_left = r;
+ }
+ r->_rght = NIL(Dtlink_t*);
+ }
+
+ list->here = r;
+ DTRETURN(obj, _DTOBJ(disc,r));
+ }
+
+ /* define key to match */
+ if(type&DT_MATCH)
+ { key = obj;
+ obj = NIL(Void_t*);
+ }
+ else key = _DTKEY(disc, obj);
+
+ /* try to find a matching object */
+ if(h && _DTOBJ(disc,h) == obj && (type & (DT_SEARCH|DT_NEXT|DT_PREV)) )
+ r = h; /* match at the finger, no search needed */
+ else /* linear search through the list */
+ { h = NIL(Dtlink_t*); /* track first/last obj with same key */
+ for(r = list->link; r; r = r->_rght)
+ { o = _DTOBJ(disc,r); k = _DTKEY(disc,o);
+ if(_DTCMP(dt, key, k, disc) != 0)
+ continue;
+ else if(type & (DT_REMOVE|DT_NEXT|DT_PREV) )
+ { if(o == obj) /* got exact object, done */
+ break;
+ else if(type&DT_NEXT) /* track last object */
+ h = r;
+ else if(type&DT_PREV) /* track first object */
+ h = h ? h : r;
+ else continue;
+ }
+ else if(type & DT_ATLEAST )
+ h = r; /* track last object */
+ else break;
+ }
+ r = h ? h : r;
+ }
+ if(!r)
+ DTRETURN(obj, NIL(Void_t*));
+
+ if(type&(DT_DELETE|DT_DETACH|DT_REMOVE))
+ { dt_delete:
+ if(r->_rght)
+ r->_rght->_left = r->_left;
+ if(r == (t = list->link) )
+ { list->link = r->_rght;
+ if((h = list->link) )
+ h->_left = t->_left;
+ }
+ else
+ { r->_left->_rght = r->_rght;
+ if(r == t->_left)
+ t->_left = r->_left;
+ }
+
+ list->here = r == list->here ? r->_rght : NIL(Dtlink_t*);
+
+ obj = _DTOBJ(disc,r);
+ _dtfree(dt, r, type);
+ dt->data->size -= 1;
+
+ DTRETURN(obj, obj);
+ }
+
+ if(type&DT_NEXT)
+ r = r->_rght;
+ else if(type&DT_PREV)
+ r = r == list->link ? NIL(Dtlink_t*) : r->_left;
+ /* else: if(type&(DT_SEARCH|DT_MATCH|DT_ATLEAST|DT_ATMOST)) */
+
+ list->here = r;
+ if(r)
+ DTRETURN(obj, _DTOBJ(disc,r));
+ else DTRETURN(obj, NIL(Void_t*));
+
+dt_return:
+ DTANNOUNCE(dt,obj,type);
+ DTCLRLOCK(dt);
+ return obj;
+}
+
+#if __STD_C
+static int listevent(Dt_t* dt, int event, Void_t* arg)
+#else
+static int listevent(dt, event, arg)
+Dt_t* dt;
+int event;
+Void_t* arg;
+#endif
+{
+ Dtlist_t *list = (Dtlist_t*)dt->data;
+
+ if(event == DT_OPEN)
+ { if(list) /* already initialized */
+ return 0;
+ if(!(list = (Dtlist_t*)(*dt->memoryf)(dt, 0, sizeof(Dtlist_t), dt->disc)) )
+ { DTERROR(dt, "Error in allocating a list data structure");
+ return -1;
+ }
+ memset(list, 0, sizeof(Dtlist_t));
+ dt->data = (Dtdata_t*)list;
+ return 1;
+ }
+ else if(event == DT_CLOSE)
+ { if(!list) /* already closed */
+ return 0;
+ if(list->link) /* remove all items */
+ (void)lclear(dt);
+ (void)(*dt->memoryf)(dt, (Void_t*)list, 0, dt->disc);
+ dt->data = NIL(Dtdata_t*);
+ return 0;
+ }
+ else return 0;
+}
+
+static Dtmethod_t _Dtlist = { dtlist, DT_LIST, listevent, "Dtlist" };
+static Dtmethod_t _Dtdeque = { dtlist, DT_DEQUE, listevent, "Dtdeque" };
+static Dtmethod_t _Dtstack = { dtlist, DT_STACK, listevent, "Dtstack" };
+static Dtmethod_t _Dtqueue = { dtlist, DT_QUEUE, listevent, "Dtqueue" };
+
+__DEFINE__(Dtmethod_t*,Dtlist,&_Dtlist);
+__DEFINE__(Dtmethod_t*,Dtdeque,&_Dtdeque);
+__DEFINE__(Dtmethod_t*,Dtstack,&_Dtstack);
+__DEFINE__(Dtmethod_t*,Dtqueue,&_Dtqueue);
+
+#ifdef NoF
+NoF(dtlist)
+#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/cdt/dtmethod.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtmethod.c
new file mode 100644
index 0000000000..56a1d25924
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtmethod.c
@@ -0,0 +1,107 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#include "dthdr.h"
+
+/* Change search method.
+**
+** Written by Kiem-Phong Vo (05/25/96)
+*/
+
+#if __STD_C
+Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth)
+#else
+Dtmethod_t* dtmethod(dt, meth)
+Dt_t* dt;
+Dtmethod_t* meth;
+#endif
+{
+ Dtlink_t *list;
+ Dtdisc_t *disc = dt->disc;
+ Dtmethod_t *oldmt = dt->meth;
+ Dtdata_t *newdt, *olddt = dt->data;
+
+ if(!meth || meth == oldmt)
+ return oldmt;
+
+ /* ask discipline if switching to new method is ok */
+ if(disc->eventf && (*disc->eventf)(dt,DT_METH,(Void_t*)meth,disc) < 0)
+ return NIL(Dtmethod_t*);
+
+ list = dtextract(dt); /* extract elements out of dictionary */
+
+ /* try to create internal structure for new method */
+ if(dt->searchf == oldmt->searchf) /* ie, not viewpathing */
+ dt->searchf = meth->searchf;
+ dt->meth = meth;
+ dt->data = NIL(Dtdata_t*);
+ if((*dt->meth->eventf)(dt, DT_OPEN, NIL(Void_t*)) < 0 )
+ newdt = NIL(Dtdata_t*);
+ else newdt = dt->data;
+
+ /* see what need to be done to data of the old method */
+ if(dt->searchf == meth->searchf)
+ dt->searchf = oldmt->searchf;
+ dt->meth = oldmt;
+ dt->data = olddt;
+ if(newdt) /* switch was successful, remove old data */
+ { (void)(*dt->meth->eventf)(dt, DT_CLOSE, NIL(Void_t*));
+
+ if(dt->searchf == oldmt->searchf)
+ dt->searchf = meth->searchf;
+ dt->meth = meth;
+ dt->data = newdt;
+ dtrestore(dt, list);
+ return oldmt;
+ }
+ else /* switch failed, restore dictionary to previous states */
+ { dtrestore(dt, list);
+ return NIL(Dtmethod_t*);
+ }
+}
+
+/* customize certain actions in a container data structure */
+int dtcustomize(Dt_t* dt, int type, int action)
+{
+ int done = 0;
+
+ if((type&DT_SHARE) &&
+ (!dt->meth->eventf || (*dt->meth->eventf)(dt, DT_SHARE, (Void_t*)((long)action)) >= 0) )
+ { if(action <= 0 )
+ dt->data->type &= ~DT_SHARE;
+ else dt->data->type |= DT_SHARE;
+ done |= DT_SHARE;
+ }
+
+ if((type&DT_ANNOUNCE) &&
+ (!dt->meth->eventf || (*dt->meth->eventf)(dt, DT_ANNOUNCE, (Void_t*)((long)action)) >= 0) )
+ { if(action <= 0 )
+ dt->data->type &= ~DT_ANNOUNCE;
+ else dt->data->type |= DT_ANNOUNCE;
+ done |= DT_ANNOUNCE;
+ }
+
+ if((type&DT_OPTIMIZE) &&
+ (!dt->meth->eventf || (*dt->meth->eventf)(dt, DT_OPTIMIZE, (Void_t*)((long)action)) >= 0) )
+ done |= DT_OPTIMIZE;
+
+ return done;
+}
diff --git a/usr/src/lib/libast/common/cdt/dtnew.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtnew.c
index aa26182048..5e1bb700f8 100644
--- a/usr/src/lib/libast/common/cdt/dtnew.c
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtnew.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -56,7 +56,7 @@ memoryf(Dt_t* dt, void* addr, size_t size, Dtdisc_t* disc)
*/
Dt_t*
-dtnew(Vmalloc_t* vm, Dtdisc_t* disc, Dtmethod_t* meth)
+_dtnew(Vmalloc_t* vm, Dtdisc_t* disc, Dtmethod_t* meth, unsigned long version)
{
Dt_t* dt;
Dc_t dc;
@@ -67,7 +67,15 @@ dtnew(Vmalloc_t* vm, Dtdisc_t* disc, Dtmethod_t* meth)
if (!dc.ndisc.memoryf)
dc.ndisc.memoryf = memoryf;
dc.vm = vm;
- if (dt = dtopen(&dc.ndisc, meth))
+ if (dt = _dtopen(&dc.ndisc, meth, version))
dtdisc(dt, disc, DT_SAMECMP|DT_SAMEHASH);
return dt;
}
+
+#undef dtnew
+
+Dt_t*
+dtnew(Vmalloc_t* vm, Dtdisc_t* disc, Dtmethod_t* meth)
+{
+ return _dtnew(vm, disc, meth, 20050420L);
+}
diff --git a/usr/src/contrib/ast/src/lib/libast/cdt/dtopen.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtopen.c
new file mode 100644
index 0000000000..64119695a0
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtopen.c
@@ -0,0 +1,177 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#include "dthdr.h"
+static char* Version = "\n@(#)$Id: cdt (AT&T Labs - Research) 2011-11-11 $\0\n";
+
+/* Make a new dictionary
+**
+** Written by Kiem-Phong Vo (5/25/96)
+*/
+
+/* map operation bits from the 2005 version to the current version */
+static int _dttype2005(Dt_t* dt, int type)
+{
+ if (type == DT_DELETE && (dt->meth->type&(DT_OBAG|DT_BAG)))
+ type = DT_REMOVE;
+ return type;
+}
+
+#if __STD_C
+Dt_t* _dtopen(Dtdisc_t* disc, Dtmethod_t* meth, unsigned long version)
+#else
+Dt_t* _dtopen(disc, meth, version)
+Dtdisc_t* disc;
+Dtmethod_t* meth;
+unsigned long version;
+#endif
+{
+ Dtdata_t *data;
+ Dt_t *dt, pdt;
+ int ev, type;
+
+ if(!disc || !meth)
+ return NIL(Dt_t*);
+
+ dt = NIL(Dt_t*);
+ data = NIL(Dtdata_t*);
+ type = meth->type;
+
+ memset(&pdt, 0, sizeof(Dt_t));
+ pdt.searchf = meth->searchf;
+ pdt.meth = meth;
+ dtdisc(&pdt,disc,0); /* note that this sets pdt.memoryf */
+
+ if(disc->eventf)
+ { if((ev = (*disc->eventf)(&pdt,DT_OPEN,(Void_t*)(&data),disc)) < 0)
+ return NIL(Dt_t*); /* something bad happened */
+ else if(ev > 0)
+ { if(data) /* shared data are being restored */
+ { if((data->type & DT_METHODS) != meth->type)
+ { DTERROR(&pdt, "Error in matching methods to restore dictionary");
+ return NIL(Dt_t*);
+ }
+ pdt.data = data;
+ }
+ }
+ else
+ { if(data) /* dt should be allocated with dt->data */
+ type |= DT_INDATA;
+ }
+ }
+
+ if(!pdt.data) /* allocate method-specific data */
+ if((*meth->eventf)(&pdt, DT_OPEN, NIL(Void_t*)) < 0 || !pdt.data )
+ return NIL(Dt_t*);
+ pdt.data->type |= type;
+
+ /* now allocate/initialize the actual dictionary structure */
+ if(pdt.data->type&DT_INDATA)
+ dt = &pdt.data->dict;
+ else if(!(dt = (Dt_t*) malloc(sizeof(Dt_t))) )
+ { (void)(*meth->eventf)(&pdt, DT_CLOSE, NIL(Void_t*));
+ DTERROR(&pdt, "Error in allocating a new dictionary");
+ return NIL(Dt_t*);
+ }
+
+ *dt = pdt;
+
+ dt->user = &dt->data->user; /* space allocated for application usage */
+
+ if(disc->eventf) /* signal opening is done */
+ (void)(*disc->eventf)(dt, DT_ENDOPEN, (Void_t*)0, disc);
+
+ /* set mapping of operation bits between versions as needed */
+ if(version < 20111111L)
+ dt->typef = _dttype2005;
+
+ return dt;
+}
+
+#undef dtopen /* deal with binary upward compatibility for op bits */
+#if __STD_C
+Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth)
+#else
+Dt_t* dtopen(disc, meth)
+Dtdisc_t* disc;
+Dtmethod_t* meth;
+#endif
+{
+ return _dtopen(disc, meth, 20050420L);
+}
+
+/* below are private functions used across CDT modules */
+Dtlink_t* _dtmake(Dt_t* dt, Void_t* obj, int type)
+{
+ Dthold_t *h;
+ Dtdisc_t *disc = dt->disc;
+
+ /* if obj is a prototype, make a real one */
+ if(!(type&DT_ATTACH) && disc->makef && !(obj = (*disc->makef)(dt, obj, disc)) )
+ return NIL(Dtlink_t*);
+
+ if(disc->link >= 0) /* holder is embedded in obj itself */
+ return _DTLNK(disc, obj);
+
+ /* create a holder to hold obj */
+ if((h = (Dthold_t*)(dt->memoryf)(dt, NIL(Void_t*), sizeof(Dthold_t), disc)) )
+ h->obj = obj;
+ else
+ { DTERROR(dt, "Error in allocating an object holder");
+ if(!(type&DT_ATTACH) && disc->makef && disc->freef)
+ (void)(*disc->freef)(dt, obj, disc); /* free just-made obj */
+ }
+
+ return (Dtlink_t*)h;
+}
+
+void _dtfree(Dt_t* dt, Dtlink_t* l, int type)
+{
+ Dtdisc_t *disc = dt->disc;
+
+ if(!(type&DT_DETACH) && disc->freef) /* free object */
+ (void)(*disc->freef)(dt, _DTOBJ(disc,l), disc);
+
+ if(disc->link < 0) /* free holder */
+ (void)(*dt->memoryf)(dt, (Void_t*)l, 0, disc);
+}
+
+int dtuserlock(Dt_t* dt, unsigned int key, int type)
+{
+ if(type > 0)
+ return asolock(&dt->data->user.lock, key, ASO_LOCK);
+ else if(type < 0)
+ return asolock(&dt->data->user.lock, key, ASO_UNLOCK);
+ else return asolock(&dt->data->user.lock, key, ASO_TRYLOCK);
+}
+
+Void_t* dtuserdata(Dt_t* dt, Void_t* data, unsigned int key)
+{
+ if(key == 0)
+ return dt->data->user.data;
+ else if(dtuserlock(dt, key, 1) < 0 )
+ return NIL(Void_t*);
+ else
+ { dt->data->user.data = data;
+ dtuserlock(dt, key, -1);
+ return data;
+ }
+}
diff --git a/usr/src/lib/libast/common/cdt/dtstrhash.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtstrhash.c
index 437c9f9d92..7eaac89e35 100644
--- a/usr/src/lib/libast/common/cdt/dtstrhash.c
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtstrhash.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -35,15 +35,15 @@
*/
#if __STD_C
-uint dtstrhash(reg uint h, Void_t* args, reg int n)
+uint dtstrhash(uint h, Void_t* args, ssize_t n)
#else
uint dtstrhash(h,args,n)
reg uint h;
Void_t* args;
-reg int n;
+ssize_t n;
#endif
{
- reg unsigned char* s = (unsigned char*)args;
+ unsigned char *s = (unsigned char*)args;
if(n <= 0)
{ for(; *s != 0; s += s[1] ? 2 : 1)
@@ -51,7 +51,7 @@ reg int n;
n = s - (unsigned char*)args;
}
else
- { reg unsigned char* ends;
+ { unsigned char* ends;
for(ends = s+n-1; s < ends; s += 2)
h = (h + (s[0]<<8) + s[1])*DT_PRIME;
if(s <= ends)
diff --git a/usr/src/contrib/ast/src/lib/libast/cdt/dttree.c b/usr/src/contrib/ast/src/lib/libast/cdt/dttree.c
new file mode 100644
index 0000000000..044e75ae4b
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dttree.c
@@ -0,0 +1,694 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#include "dthdr.h"
+
+/* Ordered set/multiset
+** dt: dictionary being searched
+** obj: the object to look for.
+** type: search type.
+**
+** Written by Kiem-Phong Vo (5/25/96)
+*/
+
+typedef struct _dttree_s
+{ Dtdata_t data;
+ Dtlink_t* root; /* tree root */
+} Dttree_t;
+
+#ifdef CDT_DEBUG
+int dttreeprint(Dt_t* dt, Dtlink_t* here, int lev, char* (*objprintf)(Void_t*) )
+{
+ int k, rv;
+ char *obj, *endb, buf[1024];
+ Dtdisc_t *disc = dt->disc;
+ Dttree_t *tree = (Dttree_t*)dt->data;
+
+ if(!here && !(here = tree->root) )
+ return -1;
+
+ endb = buf; /* indentation */
+ for(k = 0; k < lev; ++k)
+ { *endb++ = ' '; *endb++ = ' '; }
+
+ *endb++ = '(';
+ obj = (*objprintf)(_DTOBJ(disc, here));
+ k = strlen(obj); memcpy(endb, obj, k); endb += k;
+ *endb++ = ')';
+ *endb++ = ':';
+ *endb++ = ' ';
+
+ *endb++ = '<';
+ if(here->_left)
+ obj = (*objprintf)(_DTOBJ(disc,here->_left));
+ else obj = "NIL";
+ k = strlen(obj); memcpy(endb, obj, k); endb += k;
+ *endb++ = '>';
+ *endb++ = ' ';
+
+ *endb++ = '<';
+ if(here->_rght)
+ obj = (*objprintf)(_DTOBJ(disc,here->_rght));
+ else obj = "NIL";
+ k = strlen(obj); memcpy(endb, obj, k); endb += k;
+ *endb++ = '>';
+ *endb++ = '\n';
+ write(2, buf, endb-buf);
+
+ if(here->_left)
+ dttreeprint(dt, here->_left, lev+1, objprintf);
+ if(here->_rght)
+ dttreeprint(dt, here->_rght, lev+1, objprintf);
+
+ return 0;
+}
+#endif
+
+/* terminal object: DT_FIRST|DT_LAST */
+#if __STD_C
+Void_t* tfirstlast(Dt_t* dt, int type)
+#else
+Void_t* tfirstlast(dt, type)
+Dt_t* dt;
+int type;
+#endif
+{
+ Dtlink_t *t, *root;
+ Dtdisc_t *disc = dt->disc;
+ Dttree_t *tree = (Dttree_t*)dt->data;
+
+ if(!(root = tree->root) )
+ return NIL(Void_t*);
+
+ if(type&DT_LAST)
+ { while((t = root->_rght) )
+ LROTATE(root,t);
+ }
+ else /* type&DT_FIRST */
+ { while((t = root->_left) )
+ RROTATE(root,t);
+ }
+ tree->root = root;
+
+ return _DTOBJ(disc, root);
+}
+
+/* DT_CLEAR */
+#if __STD_C
+static Void_t* tclear(Dt_t* dt)
+#else
+static Void_t* tclear(dt)
+Dt_t* dt;
+#endif
+{
+ Dtlink_t *root, *t;
+ Dtdisc_t *disc = dt->disc;
+ Dttree_t *tree = (Dttree_t*)dt->data;
+
+ root = tree->root;
+ tree->root = NIL(Dtlink_t*);
+ tree->data.size = 0;
+
+ if(root && (disc->link < 0 || disc->freef) )
+ { do
+ { while((t = root->_left) )
+ RROTATE(root,t);
+ t = root->_rght;
+ _dtfree(dt, root, DT_DELETE);
+ } while((root = t) );
+ }
+
+ return NIL(Void_t*);
+}
+
+#if __STD_C
+static Void_t* tlist(Dt_t* dt, Dtlink_t* list, int type)
+#else
+static Void_t* tlist(dt, list, type)
+Dt_t* dt;
+Dtlink_t* list;
+int type;
+#endif
+{
+ Void_t *obj;
+ Dtlink_t *last, *r, *t;
+ Dttree_t *tree = (Dttree_t*)dt->data;
+ Dtdisc_t *disc = dt->disc;
+
+ if(type&(DT_FLATTEN|DT_EXTRACT) )
+ { if((list = tree->root) )
+ { while((t = list->_left) ) /* make smallest object root */
+ RROTATE(list, t);
+ for(r = (last = list)->_rght; r; r = (last = r)->_rght)
+ { while((t = r->_left) ) /* no left children */
+ RROTATE(r,t);
+ last->_rght = r;
+ }
+ }
+
+ if(type&DT_FLATTEN)
+ tree->root = list;
+ else
+ { tree->root = NIL(Dtlink_t*);
+ dt->data->size = 0;
+ }
+ }
+ else /* if(type&DT_RESTORE) */
+ { dt->data->size = 0;
+ for(r = list; r; r = t)
+ { t = r->_rght;
+ obj = _DTOBJ(disc,r);
+ if((*dt->meth->searchf)(dt, (Void_t*)r, DT_RELINK) == obj )
+ dt->data->size += 1;
+ }
+ }
+
+ return (Void_t*)list;
+}
+
+#if __STD_C /* compute tree depth and number of nodes */
+static ssize_t tsize(Dtlink_t* root, ssize_t lev, Dtstat_t* st)
+#else
+static ssize_t tsize(root, lev, st)
+Dtlink_t* root;
+ssize_t lev;
+Dtstat_t* st;
+#endif
+{
+ ssize_t size, z;
+
+ if(!root) /* nothing to do */
+ return 0;
+
+ if(lev >= DT_MAXRECURSE) /* avoid blowing the stack */
+ return -1;
+
+ if(st)
+ { st->mlev = lev > st->mlev ? lev : st->mlev;
+ if(lev < DT_MAXSIZE)
+ { st->msize = lev > st->msize ? lev : st->msize;
+ st->lsize[lev] += 1; /* count #objects per level */
+ }
+ }
+
+ size = 1;
+
+ if((z = tsize(root->_left, lev+1, st)) < 0)
+ return -1;
+ else size += z;
+
+ if((z = tsize(root->_rght, lev+1, st)) < 0)
+ return -1;
+ else size += z;
+
+ return size;
+}
+
+#if __STD_C
+static Void_t* tstat(Dt_t* dt, Dtstat_t* st)
+#else
+static Void_t* tstat(dt, st)
+Dt_t* dt;
+Dtstat_t* st;
+#endif
+{
+ ssize_t size;
+ Dttree_t *tree = (Dttree_t*)dt->data;
+
+ if(!st)
+ return (Void_t*)dt->data->size;
+ else
+ { memset(st, 0, sizeof(Dtstat_t));
+ size = tsize(tree->root, 0, st);
+ /**/DEBUG_ASSERT((dt->data->type&DT_SHARE) || size == dt->data->size);
+ st->meth = dt->meth->type;
+ st->size = size;
+ st->space = sizeof(Dttree_t) + (dt->disc->link >= 0 ? 0 : size*sizeof(Dthold_t));
+ return (Void_t*)size;
+ }
+}
+
+#if __STD_C /* make a list into a balanced tree */
+static Dtlink_t* tbalance(Dtlink_t* list, ssize_t size)
+#else
+static Dtlink_t* tbalance(list, size)
+Dtlink_t* list;
+ssize_t size;
+#endif
+{
+ ssize_t n;
+ Dtlink_t *l, *mid;
+
+ if(size <= 2)
+ return list;
+
+ for(l = list, n = size/2 - 1; n > 0; n -= 1)
+ l = l->_rght;
+
+ mid = l->_rght; l->_rght = NIL(Dtlink_t*);
+ mid->_left = tbalance(list, (n = size/2) );
+ mid->_rght = tbalance(mid->_rght, size - (n + 1));
+ return mid;
+}
+
+static void toptimize(Dt_t* dt)
+{
+ ssize_t size;
+ Dtlink_t *l, *list;
+ Dttree_t *tree = (Dttree_t*)dt->data;
+
+ if((list = (Dtlink_t*)tlist(dt, NIL(Void_t*), DT_FLATTEN)) )
+ { for(size = 0, l = list; l; l = l->_rght)
+ size += 1;
+ tree->root = tbalance(list, size);
+ }
+}
+
+static Dtlink_t* troot(Dt_t* dt, Dtlink_t* list, Dtlink_t* link, Void_t* obj, int type)
+{
+ Dtlink_t *root, *last, *t, *r, *l;
+ Void_t *key, *o, *k;
+ Dtdisc_t *disc = dt->disc;
+
+ key = _DTKEY(disc, obj); /* key of object */
+
+ if(type&(DT_ATMOST|DT_ATLEAST) ) /* find the left-most or right-most element */
+ { list->_left = link->_rght;
+ list->_rght = link->_left;
+ if(type&DT_ATMOST)
+ { while((l = list->_left) )
+ { while((r = l->_rght) ) /* get the max elt of left subtree */
+ LROTATE(l,r);
+ list->_left = l;
+
+ o = _DTOBJ(disc,l); k = _DTKEY(disc,o);
+ if(_DTCMP(dt, key, k, disc) != 0 )
+ break;
+ else RROTATE(list,l);
+ }
+ }
+ else
+ { while((r = list->_rght) )
+ { while((l = r->_left) ) /* get the min elt of right subtree */
+ RROTATE(r,l);
+ list->_rght = r;
+
+ o = _DTOBJ(disc,r); k = _DTKEY(disc,o);
+ if(_DTCMP(dt, key, k, disc) != 0 )
+ break;
+ else LROTATE(list,r);
+ }
+ }
+ link->_rght = list->_left;
+ link->_left = list->_rght;
+ return list;
+ }
+
+ last = list; list->_left = list->_rght = NIL(Dtlink_t*);
+ root = NIL(Dtlink_t*);
+
+ while(!root && (t = link->_rght) ) /* link->_rght is the left subtree <= obj */
+ { while((r = t->_rght) ) /* make t the maximum element */
+ LROTATE(t,r);
+
+ o = _DTOBJ(disc,t); k = _DTKEY(disc,o);
+ if(_DTCMP(dt, key, k, disc) != 0 )
+ { link->_rght = t; /* no more of this group in subtree */
+ break;
+ }
+ else if((type & (DT_REMOVE|DT_NEXT|DT_PREV)) && o == obj)
+ { link->_rght = t->_left; /* found the exact object */
+ root = t;
+ }
+ else /* add t to equal list in an order-preserving manner */
+ { link->_rght = t->_left;
+ t->_left = t->_rght = NIL(Dtlink_t*);
+ if(type&DT_NEXT )
+ { last->_left = t; last = t; }
+ else { t->_rght = list; list = t; }
+ }
+ }
+
+ while(!root && (t = link->_left) ) /* link->_left is the right subtree >= obj */
+ { while((l = t->_left) ) /* make t the minimum element */
+ RROTATE(t,l);
+
+ o = _DTOBJ(disc,t); k = _DTKEY(disc,o);
+ if(_DTCMP(dt, key, k, disc) != 0 )
+ { link->_left = t; /* no more of this group in subtree */
+ break;
+ }
+ else if((type & (DT_REMOVE|DT_NEXT|DT_PREV)) && o == obj)
+ { link->_left = t->_rght; /* found the exact object */
+ root = t;
+ }
+ else /* add t to equal list in an order-preserving manner */
+ { link->_left = t->_rght;
+ t->_left = t->_rght = NIL(Dtlink_t*);
+ if(type&DT_NEXT )
+ { t->_left = list; list = t; }
+ else { last->_rght = t; last = t; }
+ }
+ }
+
+ if(!root) /* always set a non-trivial root */
+ { root = list;
+ if(type&DT_NEXT)
+ list = list->_left;
+ else list = list->_rght;
+ }
+
+ if(list) /* add the rest of the equal-list to the proper subtree */
+ { if(type&DT_NEXT)
+ { last->_left = link->_rght;
+ link->_rght = list;
+ }
+ else
+ { last->_rght = link->_left;
+ link->_left = list;
+ }
+ }
+
+ return root;
+}
+
+#if __STD_C
+static Void_t* dttree(Dt_t* dt, Void_t* obj, int type)
+#else
+static Void_t* dttree(dt,obj,type)
+Dt_t* dt;
+Void_t* obj;
+int type;
+#endif
+{
+ int cmp;
+ Void_t *o, *k, *key;
+ Dtlink_t *root, *t, *l, *r, *me, link;
+ Dtdisc_t *disc = dt->disc;
+ Dttree_t *tree = (Dttree_t*)dt->data;
+
+ type = DTTYPE(dt, type); /* map type for upward compatibility */
+ if(!(type&DT_OPERATIONS) )
+ return NIL(Void_t*);
+
+ DTSETLOCK(dt);
+
+ if(type&(DT_FIRST|DT_LAST) )
+ DTRETURN(obj, tfirstlast(dt, type));
+ else if(type&(DT_EXTRACT|DT_RESTORE|DT_FLATTEN))
+ DTRETURN(obj, tlist(dt, (Dtlink_t*)obj, type));
+ else if(type&DT_CLEAR)
+ DTRETURN(obj, tclear(dt));
+ else if(type&DT_STAT)
+ { toptimize(dt); /* balance tree to avoid deep recursion */
+ DTRETURN(obj, tstat(dt, (Dtstat_t*)obj));
+ }
+
+ if(!obj) /* from here on, an object prototype is required */
+ DTRETURN(obj, NIL(Void_t*));
+
+ if(type&DT_RELINK) /* relinking objects after some processing */
+ { me = (Dtlink_t*)obj;
+ obj = _DTOBJ(disc,me);
+ key = _DTKEY(disc,obj);
+ }
+ else
+ { me = NIL(Dtlink_t*);
+ if(type&DT_MATCH) /* no prototype object given, just the key */
+ { key = obj;
+ obj = NIL(Void_t*);
+ }
+ else key = _DTKEY(disc,obj); /* get key from prototype object */
+ }
+
+ memset(&link, 0, sizeof(link));
+ l = r = &link; /* link._rght(_left) will be LEFT(RIGHT) tree after splaying */
+ if((root = tree->root) && _DTOBJ(disc,root) != obj) /* splay-search for a matching object */
+ { while(1)
+ { o = _DTOBJ(disc,root); k = _DTKEY(disc,o);
+ if((cmp = _DTCMP(dt,key,k,disc)) == 0)
+ break;
+ else if(cmp < 0)
+ { if((t = root->_left) )
+ { o = _DTOBJ(disc,t); k = _DTKEY(disc,o);
+ if((cmp = _DTCMP(dt,key,k,disc)) < 0)
+ { rrotate(root,t);
+ rlink(r,t);
+ if(!(root = t->_left) )
+ break;
+ }
+ else if(cmp == 0)
+ { rlink(r,root);
+ root = t;
+ break;
+ }
+ else /* if(cmp > 0) */
+ { llink(l,t);
+ rlink(r,root);
+ if(!(root = t->_rght) )
+ break;
+ }
+ }
+ else
+ { rlink(r,root);
+ root = NIL(Dtlink_t*);
+ break;
+ }
+ }
+ else /* if(cmp > 0) */
+ { if((t = root->_rght) )
+ { o = _DTOBJ(disc,t); k = _DTKEY(disc,o);
+ if((cmp = _DTCMP(dt,key,k,disc)) > 0)
+ { lrotate(root,t);
+ llink(l,t);
+ if(!(root = t->_rght) )
+ break;
+ }
+ else if(cmp == 0)
+ { llink(l,root);
+ root = t;
+ break;
+ }
+ else /* if(cmp < 0) */
+ { rlink(r,t);
+ llink(l,root);
+ if(!(root = t->_left) )
+ break;
+ }
+ }
+ else
+ { llink(l,root);
+ root = NIL(Dtlink_t*);
+ break;
+ }
+ }
+ }
+ }
+ l->_rght = root ? root->_left : NIL(Dtlink_t*);
+ r->_left = root ? root->_rght : NIL(Dtlink_t*);
+
+ if(root)
+ { if(dt->meth->type&DT_OBAG ) /* may need to reset root to the right object */
+ { if((type&(DT_ATLEAST|DT_ATMOST)) ||
+ ((type&(DT_NEXT|DT_PREV|DT_REMOVE)) && _DTOBJ(disc,root) != obj) )
+ root = troot(dt, root, &link, obj, type);
+ }
+
+ if(type&(DT_SEARCH|DT_MATCH|DT_ATMOST|DT_ATLEAST))
+ { has_root: /* reconstitute the tree */
+ root->_left = link._rght;
+ root->_rght = link._left;
+ tree->root = root;
+ DTRETURN(obj, _DTOBJ(disc,root));
+ }
+ else if(type&DT_NEXT)
+ { root->_left = link._rght;
+ root->_rght = NIL(Dtlink_t*);
+ link._rght = root;
+ dt_next:
+ if((root = link._left) )
+ { while((t = root->_left) )
+ RROTATE(root,t);
+ link._left = root->_rght;
+ goto has_root;
+ }
+ else goto no_root;
+ }
+ else if(type&DT_PREV)
+ { root->_rght = link._left;
+ root->_left = NIL(Dtlink_t*);
+ link._left = root;
+ dt_prev:
+ if((root = link._rght) )
+ { while((t = root->_rght) )
+ LROTATE(root,t);
+ link._rght = root->_left;
+ goto has_root;
+ }
+ else goto no_root;
+ }
+ else if(type&DT_REMOVE) /* remove a particular element in the tree */
+ { if(_DTOBJ(disc,root) == obj)
+ goto dt_delete;
+ else
+ { root->_left = link._rght;
+ root->_rght = link._left;
+ tree->root = root;
+ DTRETURN(obj, NIL(Void_t*));
+ }
+ }
+ else if(type&(DT_DELETE|DT_DETACH))
+ { dt_delete: /* remove an object from the dictionary */
+ obj = _DTOBJ(disc,root);
+ _dtfree(dt, root, type);
+ dt->data->size -= 1;
+ goto no_root;
+ }
+ else if(type&(DT_INSERT|DT_APPEND|DT_ATTACH))
+ { if(dt->meth->type&DT_OSET)
+ { type |= DT_SEARCH; /* for announcement */
+ goto has_root;
+ }
+ else
+ { root->_left = NIL(Dtlink_t*);
+ root->_rght = link._left;
+ link._left = root;
+ goto dt_insert;
+ }
+ }
+ else if(type&DT_RELINK) /* a duplicate */
+ { if(dt->meth->type&DT_OSET)
+ _dtfree(dt, me, DT_DELETE);
+ else
+ { me->_left = NIL(Dtlink_t*);
+ me->_rght = link._left;
+ link._left = me;
+ }
+ goto has_root;
+ }
+ }
+ else /* no matching object, tree has been split to LEFT&RIGHT subtrees */
+ { if(type&(DT_SEARCH|DT_MATCH))
+ { no_root:
+ if(!(l = link._rght) ) /* no LEFT subtree */
+ tree->root = link._left; /* tree is RIGHT tree */
+ else
+ { while((t = l->_rght) ) /* maximize root of LEFT tree */
+ { if(t->_rght)
+ LLSHIFT(l,t);
+ else LROTATE(l,t);
+ }
+ l->_rght = link._left; /* hook RIGHT tree to LEFT root */
+ tree->root = l; /* LEFT tree is now the entire tree */
+ }
+
+ if(type&(DT_DELETE|DT_DETACH|DT_REMOVE))
+ DTRETURN(obj, obj);
+ else DTRETURN(obj, NIL(Void_t*));
+ }
+ else if(type&(DT_NEXT|DT_ATLEAST) )
+ goto dt_next;
+ else if(type&(DT_PREV|DT_ATMOST) )
+ goto dt_prev;
+ else if(type&(DT_DELETE|DT_DETACH|DT_REMOVE))
+ { obj = NIL(Void_t*);
+ goto no_root;
+ }
+ else if(type&(DT_INSERT|DT_APPEND|DT_ATTACH))
+ { dt_insert:
+ if(!(root = _dtmake(dt, obj, type)) )
+ { obj = NIL(Void_t*);
+ goto no_root;
+ }
+ else
+ { dt->data->size += 1;
+ goto has_root;
+ }
+ }
+ else if(type&DT_RELINK)
+ { root = me;
+ goto has_root;
+ }
+ }
+ DTRETURN(obj, NIL(Void_t*));
+
+dt_return:
+ DTANNOUNCE(dt,obj,type);
+ DTCLRLOCK(dt);
+ return obj;
+}
+
+static int treeevent(Dt_t* dt, int event, Void_t* arg)
+{
+ Dttree_t *tree = (Dttree_t*)dt->data;
+
+ if(event == DT_OPEN)
+ { if(tree) /* already initialized */
+ return 0;
+ if(!(tree = (Dttree_t*)(*dt->memoryf)(dt, 0, sizeof(Dttree_t), dt->disc)) )
+ { DTERROR(dt, "Error in allocating a tree data structure");
+ return -1;
+ }
+ memset(tree, 0, sizeof(Dttree_t));
+ dt->data = (Dtdata_t*)tree;
+ return 1;
+ }
+ else if(event == DT_CLOSE)
+ { if(!tree)
+ return 0;
+ if(tree->root)
+ (void)tclear(dt);
+ (void)(*dt->memoryf)(dt, (Void_t*)tree, 0, dt->disc);
+ dt->data = NIL(Dtdata_t*);
+ return 0;
+ }
+ else if(event == DT_OPTIMIZE) /* balance the search tree */
+ { toptimize(dt);
+ return 0;
+ }
+ else return 0;
+}
+
+#if _UWIN
+
+Void_t* dtfinger(Dt_t* dt)
+{
+ return (dt && dt->meth && (dt->meth->type & DT_ORDERED)) ? (Void_t*)((Dttree_t*)dt->data)->root : NIL(Void_t*);
+}
+
+#endif
+
+/* make this method available */
+static Dtmethod_t _Dtoset = { dttree, DT_OSET, treeevent, "Dtoset" };
+static Dtmethod_t _Dtobag = { dttree, DT_OBAG, treeevent, "Dtobag" };
+__DEFINE__(Dtmethod_t*,Dtoset,&_Dtoset);
+__DEFINE__(Dtmethod_t*,Dtobag,&_Dtobag);
+
+/* backwards compatibility */
+#undef Dttree
+#if defined(__EXPORT__)
+__EXPORT__
+#endif
+__DEFINE__(Dtmethod_t*,Dttree,&_Dtoset);
+
+#ifdef NoF
+NoF(dttree)
+#endif
diff --git a/usr/src/lib/libast/common/cdt/dtview.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtview.c
index d3aad4cc7c..94f4a54cbe 100644
--- a/usr/src/lib/libast/common/cdt/dtview.c
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtview.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -26,6 +26,10 @@
** Written by Kiem-Phong Vo (5/25/96)
*/
+/* these operations must be done without viewpathing */
+#define DT_NOVIEWPATH (DT_INSERT|DT_APPEND|DT_DELETE|\
+ DT_ATTACH|DT_DETACH|DT_RELINK|DT_CLEAR| \
+ DT_FLATTEN|DT_EXTRACT|DT_RESTORE|DT_STAT)
#if __STD_C
static Void_t* dtvsearch(Dt_t* dt, reg Void_t* obj, reg int type)
@@ -36,17 +40,18 @@ reg Void_t* obj;
reg int type;
#endif
{
+ int cmp;
Dt_t *d, *p;
- Void_t *o, *n, *ok, *nk;
- int cmp, lk, sz, ky;
- Dtcompar_f cmpf;
+ Void_t *o, *n, *oky, *nky;
- /* these operations only happen at the top level */
- if(type&(DT_INSERT|DT_DELETE|DT_CLEAR|DT_RENEW))
+ if(type&DT_NOVIEWPATH)
return (*(dt->meth->searchf))(dt,obj,type);
- if((type&(DT_MATCH|DT_SEARCH)) || /* order sets first/last done below */
- ((type&(DT_FIRST|DT_LAST)) && !(dt->meth->type&(DT_OBAG|DT_OSET)) ) )
+ o = NIL(Void_t*);
+
+ /* these ops look for the first appearance of an object of the right type */
+ if((type & (DT_MATCH|DT_SEARCH)) ||
+ ((type & (DT_FIRST|DT_LAST|DT_ATLEAST|DT_ATMOST)) && !(dt->meth->type&DT_ORDERED) ) )
{ for(d = dt; d; d = d->view)
if((o = (*(d->meth->searchf))(d,obj,type)) )
break;
@@ -54,27 +59,28 @@ reg int type;
return o;
}
- if(dt->meth->type & (DT_OBAG|DT_OSET) )
- { if(!(type & (DT_FIRST|DT_LAST|DT_NEXT|DT_PREV)) )
+ if(dt->meth->type & DT_ORDERED) /* ordered sets/bags */
+ { if(!(type & (DT_FIRST|DT_LAST|DT_NEXT|DT_PREV|DT_ATLEAST|DT_ATMOST)) )
return NIL(Void_t*);
- n = nk = NIL(Void_t*); p = NIL(Dt_t*);
+ /* find the min/max element that satisfies the op requirement */
+ n = nky = NIL(Void_t*); p = NIL(Dt_t*);
for(d = dt; d; d = d->view)
{ if(!(o = (*d->meth->searchf)(d, obj, type)) )
continue;
- _DTDSC(d->disc,ky,sz,lk,cmpf);
- ok = _DTKEY(o,ky,sz);
+ oky = _DTKEY(d->disc,o);
if(n) /* get the right one among all dictionaries */
- { cmp = _DTCMP(d,ok,nk,d->disc,cmpf,sz);
- if(((type & (DT_NEXT|DT_FIRST)) && cmp < 0) ||
- ((type & (DT_PREV|DT_LAST)) && cmp > 0) )
- goto a_dj;
+ { cmp = _DTCMP(d,oky,nky,d->disc);
+ if(((type & (DT_NEXT|DT_FIRST|DT_ATLEAST)) && cmp < 0) ||
+ ((type & (DT_PREV|DT_LAST|DT_ATMOST)) && cmp > 0) )
+ goto b_est;
}
- else /* looks good for now */
- { a_dj: p = d;
+ else
+ { b_est: /* current best element to fit op requirement */
+ p = d;
n = o;
- nk = ok;
+ nky = oky;
}
}
@@ -82,11 +88,11 @@ reg int type;
return n;
}
- /* non-ordered methods */
- if(!(type & (DT_NEXT|DT_PREV)) )
+ /* unordered collections */
+ if(!(type&(DT_NEXT|DT_PREV)) )
return NIL(Void_t*);
- if(!dt->walk || obj != _DTOBJ(dt->walk->data->here, dt->walk->disc->link) )
+ if(!dt->walk )
{ for(d = dt; d; d = d->view)
if((o = (*(d->meth->searchf))(d, obj, DT_SEARCH)) )
break;
@@ -124,12 +130,8 @@ reg Dt_t* view;
{
reg Dt_t* d;
- UNFLATTEN(dt);
- if(view)
- { UNFLATTEN(view);
- if(view->meth != dt->meth) /* must use the same method */
- return NIL(Dt_t*);
- }
+ if(view && view->meth != dt->meth) /* must use the same method */
+ return NIL(Dt_t*);
/* make sure there won't be a cycle */
for(d = view; d; d = d->view)
diff --git a/usr/src/lib/libast/common/cdt/dtwalk.c b/usr/src/contrib/ast/src/lib/libast/cdt/dtwalk.c
index 12710eee46..05c706ce1c 100644
--- a/usr/src/lib/libast/common/cdt/dtwalk.c
+++ b/usr/src/contrib/ast/src/lib/libast/cdt/dtwalk.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,17 +28,17 @@
*/
#if __STD_C
-int dtwalk(reg Dt_t* dt, int (*userf)(Dt_t*, Void_t*, Void_t*), Void_t* data)
+int dtwalk(Dt_t* dt, int (*userf)(Dt_t*, Void_t*, Void_t*), Void_t* data)
#else
int dtwalk(dt,userf,data)
-reg Dt_t* dt;
-int(* userf)();
-Void_t* data;
+Dt_t* dt;
+int(* userf)();
+Void_t* data;
#endif
{
- reg Void_t *obj, *next;
- reg Dt_t* walk;
- reg int rv;
+ Void_t *obj, *next;
+ Dt_t *walk;
+ int rv;
for(obj = dtfirst(dt); obj; )
{ if(!(walk = dt->walk) )
@@ -48,5 +48,6 @@ Void_t* data;
return rv;
obj = next;
}
+
return 0;
}
diff --git a/usr/src/lib/libast/common/comp/atexit.c b/usr/src/contrib/ast/src/lib/libast/comp/atexit.c
index 541ef0aac1..d0df2d524b 100644
--- a/usr/src/lib/libast/common/comp/atexit.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/atexit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/basename.c b/usr/src/contrib/ast/src/lib/libast/comp/basename.c
index 6cbc0532f1..912f8d67c9 100644
--- a/usr/src/lib/libast/common/comp/basename.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/basename.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/catopen.c b/usr/src/contrib/ast/src/lib/libast/comp/catopen.c
index 0a17cc9d8a..7bace39d4b 100644
--- a/usr/src/lib/libast/common/comp/catopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/catopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,6 +40,9 @@
#ifndef DEBUG_trace
#define DEBUG_trace 0
#endif
+#if DEBUG_trace
+#undef setlocale
+#endif
#if _lib_catopen
@@ -78,9 +81,9 @@ _ast_catopen(const char* name, int flag)
*/
#if DEBUG_trace
-sfprintf(sfstderr, "AHA#%d:%s %s\n", __LINE__, __FILE__, name);
+sfprintf(sfstderr, "AHA#%d:%s %s LC_MESSAGES=%s:%s\n", __LINE__, __FILE__, name, _ast_setlocale(LC_MESSAGES, 0), setlocale(LC_MESSAGES, 0));
#endif
- if ((s = mcfind(path, NiL, name, LC_MESSAGES, flag)) && (ip = sfopen(NiL, s, "r")))
+ if ((s = mcfind(NiL, name, LC_MESSAGES, flag, path, sizeof(path))) && (ip = sfopen(NiL, s, "r")))
{
#if DEBUG_trace
sfprintf(sfstderr, "AHA#%d:%s %s\n", __LINE__, __FILE__, s);
@@ -113,6 +116,7 @@ sfprintf(sfstderr, "AHA#%d:%s %s\n", __LINE__, __FILE__, s);
if ((cc->cvt = iconv_open("", "utf")) == (iconv_t)(-1) || !(cc->tmp = sfstropen()))
{
catclose(d);
+ free(cc);
return (_ast_nl_catd)(-1);
}
}
diff --git a/usr/src/lib/libast/common/comp/closelog.c b/usr/src/contrib/ast/src/lib/libast/comp/closelog.c
index 2ee0b47366..b8c848a167 100644
--- a/usr/src/lib/libast/common/comp/closelog.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/closelog.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/conf.sh b/usr/src/contrib/ast/src/lib/libast/comp/conf.sh
index efe6288145..795d0026e0 100644
--- a/usr/src/lib/libast/common/comp/conf.sh
+++ b/usr/src/contrib/ast/src/lib/libast/comp/conf.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1985-2010 AT&T Intellectual Property #
+# Copyright (c) 1985-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
@@ -21,7 +21,7 @@
########################################################################
: generate getconf and limits info
#
-# @(#)conf.sh (AT&T Research) 2008-01-31
+# @(#)conf.sh (AT&T Research) 2011-08-26
#
# this script generates these files from the table file in the first arg
# the remaining args are the C compiler name and flags
@@ -157,6 +157,22 @@ then if ./$tmp.exe
else LL_suffix=''
fi
+cat > $tmp.c <<!
+${head}
+int
+main()
+{
+ unsigned int u = 1U;
+ unsigned int ul = 1UL;
+
+ return 0;
+}
+!
+if $cc -o $tmp.exe $tmp.c >/dev/null 2>&1
+then U_suffix='U'
+else U_suffix=''
+fi
+
# set up the names and keys
keys=
@@ -225,7 +241,7 @@ case $append$extra in
;;
*" -$f- "*)
;;
- *) if iffe -n - hdr $f | grep _hdr_$f >/dev/null
+ *) if iffe -c "$cc" -n - hdr $f | grep _hdr_$f >/dev/null
then hdr="$hdr $f"
headers=$headers$nl#include$sp'<'$1'>'
else hdr="$hdr -$f-"
@@ -801,7 +817,8 @@ unsigned int conf[] = {
[ -f $tmp.1.e ] || cp $tmp.e $tmp.1.e
snl='\
'
- sed "s/[^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789][^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*/${snl}/g" $tmp.e |
+ grep 'error:' $tmp.e | sed "s/did you mean.*//" |
+ sed "s/[^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789][^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*/${snl}/g" |
grep '^[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz][_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*$' |
sort -u > $tmp.n
cmp -s $tmp.n $tmp.p && break
@@ -1105,6 +1122,7 @@ main()
;;
*) cat > $tmp.c <<!
${head}
+#include <stdio.h>
#include <sys/types.h>
#include <limits.h>
#include <unistd.h>$systeminfo$headers
@@ -1224,6 +1242,9 @@ printf("#endif\n");
case $flags in
*M*) conf_flags="${conf_flags}|CONF_MINMAX_DEF" ;;
esac
+ case $conf_minmax in
+ [-+0123456789]*) x= ;;
+ esac
break
;;
esac
@@ -1286,7 +1307,13 @@ ${script}
case $x in
?*) conf_minmax=$x
case $flags in
- *M*) conf_flags="${conf_flags}|CONF_MINMAX_DEF" ;;
+ *M*) case "|$conf_flags|" in
+ *'|CONF_MINMAX_DEF|'*)
+ ;;
+ *) conf_flags="${conf_flags}|CONF_MINMAX_DEF"
+ ;;
+ esac
+ ;;
esac
;;
esac
@@ -1349,7 +1376,7 @@ ${script}
conf_limit=${conf_limit}${LL_suffix}
;;
*[0123456789])
- conf_limit=${conf_limit}U${LL_suffix}
+ conf_limit=${conf_limit}${U_suffix}${LL_suffix}
;;
esac
case $conf_minmax in
@@ -1384,7 +1411,7 @@ ${script}
conf_minmax=${conf_minmax}${LL_suffix}
;;
*[0123456789])
- conf_minmax=${conf_minmax}U${LL_suffix}
+ conf_minmax=${conf_minmax}${U_suffix}${LL_suffix}
;;
esac
conf_limit="{ $conf_limit, 0 }" conf_minmax="{ $conf_minmax, 0 }"
@@ -1515,10 +1542,10 @@ typedef struct Prefix_s
} Prefix_t;
extern const Conf_t conf[];
-extern int conf_elements;
+extern const int conf_elements;
extern const Prefix_t prefix[];
-extern int prefix_elements;
+extern const int prefix_elements;
#endif
!
@@ -1564,7 +1591,7 @@ cat <<!
"SI", 2, CONF_SVID, CONF_sysinfo,
};
-int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
+const int prefix_elements = (int)sizeof(prefix) / (int)sizeof(prefix[0]);
/*
* conf strings sorted in ascending order
@@ -1577,7 +1604,7 @@ cat $tmp.t
cat <<!
};
-int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
+const int conf_elements = (int)sizeof(conf) / (int)sizeof(conf[0]);
!
} > $tmp.4
case $debug in
diff --git a/usr/src/lib/libast/common/comp/conf.tab b/usr/src/contrib/ast/src/lib/libast/comp/conf.tab
index d141d603bd..2dc05e0399 100644
--- a/usr/src/lib/libast/common/comp/conf.tab
+++ b/usr/src/contrib/ast/src/lib/libast/comp/conf.tab
@@ -1,7 +1,7 @@
#
# posix { getconf limits } macro table
#
-# @(#)conf.tab (AT&T Research) 2008-01-31
+# @(#)conf.tab (AT&T Research) 2010-06-28
#
# name standard section call flags [ header ... ] [ value ... ]
#
@@ -380,16 +380,27 @@ PHYS_PAGES SUN SC 1 0
PID_MAX SVID SC 1 LMU 30000 cc{
int main()
{
+ long v;
int fd;
int n;
char buf[1024];
- if ((fd = open("/proc/sys/kernel/pid_max", 0)) < 0)
- return 1;
- if ((n = read(fd, buf, sizeof(buf)-1)) < 2)
- return 1;
- buf[n] = 0;
- n = (int)strtol(buf, (char**)0, 0);
- printf("%ld", n);
+#ifdef PID_MAX
+ v = PID_MAX;
+#else
+ v = 99999;
+#endif
+ if ((fd = open("/proc/sys/kernel/pid_max", 0)) >= 0 && (n = read(fd, buf, sizeof(buf)-1)) > 1)
+ {
+ buf[n] = 0;
+ v = strtol(buf, (char**)0, 0);
+ }
+ else
+ {
+#ifdef __sgi
+ v = 0x7fffffff;
+#endif
+ }
+ printf("%ld", v);
return 0;
}
}
@@ -447,6 +458,9 @@ SELECT POSIX SC 1 FU
SEMAPHORES POSIX SC 1 CDFUW
SEM_NSEMS_MAX POSIX SC 1 LMU 256
SEM_VALUE_MAX POSIX SC 1 LMU 32767
+SF_BUFSIZE AST XX 1 MUX sh{
+ sed -e '/[ ]*#[ ]*define[ ][ ]*SF_BUFSIZE[ ]/!d' -e 's/^[^0-9]*//' -e 's/[^0-9]*$//' $PACKAGEROOT/src/lib/libast/include/sfio.h
+}
SH AST CS 1 MU sh{
ifs=$IFS
IFS=:
diff --git a/usr/src/lib/libast/common/comp/creat64.c b/usr/src/contrib/ast/src/lib/libast/comp/creat64.c
index 18d5d06f7c..7917f2f8c7 100644
--- a/usr/src/lib/libast/common/comp/creat64.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/creat64.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/dirname.c b/usr/src/contrib/ast/src/lib/libast/comp/dirname.c
index b744f7b790..b03d734143 100644
--- a/usr/src/lib/libast/common/comp/dirname.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/dirname.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/dup2.c b/usr/src/contrib/ast/src/lib/libast/comp/dup2.c
index 7a3e2049b9..6999972182 100644
--- a/usr/src/lib/libast/common/comp/dup2.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/dup2.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/eaccess.c b/usr/src/contrib/ast/src/lib/libast/comp/eaccess.c
index ac5ae5dcfb..1fe44a779f 100644
--- a/usr/src/lib/libast/common/comp/eaccess.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/eaccess.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/errno.c b/usr/src/contrib/ast/src/lib/libast/comp/errno.c
index 2e1f052d98..374a72034c 100644
--- a/usr/src/lib/libast/common/comp/errno.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/errno.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/execlp.c b/usr/src/contrib/ast/src/lib/libast/comp/execlp.c
index 8c090cd38a..42de6efeca 100644
--- a/usr/src/lib/libast/common/comp/execlp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/execlp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/execve.c b/usr/src/contrib/ast/src/lib/libast/comp/execve.c
index f1716f8540..9d7e2ff32c 100644
--- a/usr/src/lib/libast/common/comp/execve.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/execve.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/execvp.c b/usr/src/contrib/ast/src/lib/libast/comp/execvp.c
index 8346b939a7..1e34172f73 100644
--- a/usr/src/lib/libast/common/comp/execvp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/execvp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/execvpe.c b/usr/src/contrib/ast/src/lib/libast/comp/execvpe.c
index 9aee9cb9b9..c711c5010b 100644
--- a/usr/src/lib/libast/common/comp/execvpe.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/execvpe.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -48,7 +48,7 @@ execvpe(const char* name, char* const argv[], char* const envv[])
register const char* path = name;
char buffer[PATH_MAX];
- if (*path != '/' && !(path = pathpath(buffer, name, NULL, PATH_REGULAR|PATH_EXECUTE)))
+ if (*path != '/' && !(path = pathpath(name, NULL, PATH_REGULAR|PATH_EXECUTE, buffer, sizeof(buffer))))
path = name;
execve(path, argv, envv);
if (errno == ENOEXEC)
diff --git a/usr/src/lib/libast/common/include/ast_version.h b/usr/src/contrib/ast/src/lib/libast/comp/fakelink.h
index 1151836317..56835412e3 100644
--- a/usr/src/lib/libast/common/include/ast_version.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/fakelink.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,8 +21,14 @@
***********************************************************************/
#pragma prototyped
/*
- * Advanced Software Technology
- * AT&T Research
+ * AT&T Bell Laboratories
+ *
+ * fake symbolic link private interface
*/
-#define _AST_VERSION 20100102L
+#ifndef _FAKELINK_H
+#define _FAKELINK_H
+
+#define FAKELINK_MAGIC "!<symlink>"
+
+#endif
diff --git a/usr/src/lib/libast/common/comp/fcntl.c b/usr/src/contrib/ast/src/lib/libast/comp/fcntl.c
index 5573da3fe9..70adfeea44 100644
--- a/usr/src/lib/libast/common/comp/fcntl.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/fcntl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/comp/fmtmsg.h b/usr/src/contrib/ast/src/lib/libast/comp/fmtmsg.h
new file mode 100644
index 0000000000..9360c415c2
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/comp/fmtmsg.h
@@ -0,0 +1,141 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * fmtmsg interface definitions
+ */
+
+#ifndef _FMTMSG_H
+#define _FMTMSG_H
+
+#define MM_VERB_ENV "MSGVERB" /* keyword filter env var */
+#define MM_SEVERITY_ENV "SEV_LEVEL" /* alternate severity env var */
+
+/* max component length */
+
+#define MM_LABEL_1_MAX 10 /* label field 1 length */
+#define MM_LABEL_2_MAX 14 /* label field 2 length */
+
+/* classification type */
+
+#define MM_HARD 0x00000001L /* hardware */
+#define MM_SOFT 0x00000002L /* software */
+#define MM_FIRM 0x00000004L /* firmware */
+
+/* classification source */
+
+#define MM_APPL 0x00000010L /* application */
+#define MM_UTIL 0x00000020L /* utility */
+#define MM_OPSYS 0x00000040L /* kernel */
+
+/* classification display */
+
+#define MM_PRINT 0x00000100L /* stderr */
+#define MM_CONSOLE 0x00000200L /* console */
+
+/* classification status */
+
+#define MM_RECOVER 0x00001000L /* recoverable */
+#define MM_NRECOV 0x00002000L /* non-recoverable */
+
+/* severity */
+
+#define MM_NOSEV 0x0 /* no severity */
+#define MM_HALT 0x1 /* severe fault */
+#define MM_ERROR 0x2 /* fault */
+#define MM_WARNING 0x4 /* could be a problem */
+#define MM_INFO 0x8 /* not an error (noise?) */
+
+/* fmtmsg return value */
+
+#define MM_OK 0 /* succeeded */
+#define MM_NOTOK 3 /* failed completely */
+#define MM_NOMSG 1 /* stderr message failed */
+#define MM_NOCON 2 /* console message failed */
+
+/* null argument values -- 0 just doesn't get any respect */
+
+#define MM_NULLLBL (char*)0 /* label */
+#define MM_NULLSEV 0 /* severity */
+#define MM_NULLMC 0L /* class */
+#define MM_NULLTXT (char*)0 /* text */
+#define MM_NULLACT (char*)0 /* action */
+#define MM_NULLTAG (char*)0 /* tag */
+
+#ifdef MM_TABLES
+
+/* encoding support */
+
+typedef struct
+{
+ const char* name;
+ const char* display;
+ unsigned int value;
+} MM_table_t;
+
+#define mm_class _mm_class
+#define mm_severity _mm_severity()
+#define mm_verb _mm_verb
+
+#define MM_all 0xff
+#define MM_action 0x01
+#define MM_class 0x02
+#define MM_label 0x04
+#define MM_severity 0x08
+#define MM_source 0x10
+#define MM_status 0x20
+#define MM_tag 0x40
+#define MM_text 0x80
+
+#define MM_default (MM_action|MM_label|MM_severity|MM_tag|MM_text)
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+#if !_BLD_ast && defined(__IMPORT__)
+#define extern extern __IMPORT__
+#endif
+
+extern const MM_table_t mm_class[];
+extern const MM_table_t mm_verb[];
+
+#undef extern
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern const MM_table_t* mm_severity;
+
+#undef extern
+
+#endif
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern int fmtmsg(long, const char*, int, const char*, const char*, const char*);
+
+#undef extern
+
+#endif
diff --git a/usr/src/lib/libast/common/comp/fmtmsglib.c b/usr/src/contrib/ast/src/lib/libast/comp/fmtmsglib.c
index 695651f5e9..34842231fb 100644
--- a/usr/src/lib/libast/common/comp/fmtmsglib.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/fmtmsglib.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/fnmatch.c b/usr/src/contrib/ast/src/lib/libast/comp/fnmatch.c
index 8bd86be864..6c319988a0 100644
--- a/usr/src/lib/libast/common/comp/fnmatch.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/fnmatch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/fnmatch.h b/usr/src/contrib/ast/src/lib/libast/comp/fnmatch.h
index 0a6161c496..945e64546c 100644
--- a/usr/src/lib/libast/common/comp/fnmatch.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/fnmatch.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -42,7 +42,8 @@
#define FNM_ICASE 0x0020 /* ignore case in match */
#define FNM_LEADING_DIR 0x0040 /* match up to implicit / */
-#define FNM_CASEFOLD FNM_ICASE /* gnu compatibility */
+#define FNM_CASEFOLD FNM_ICASE /* gnu/bsd compatibility */
+#define FNM_IGNORECASE FNM_ICASE /* gnu/bsd compatibility */
#define FNM_FILE_NAME FNM_PATHNAME /* gnu compatibility */
/* fnmatch error codes -- other non-zero values from <regex.h> */
diff --git a/usr/src/lib/libast/common/comp/frexp.c b/usr/src/contrib/ast/src/lib/libast/comp/frexp.c
index 400a4d371a..02cd50ff6f 100644
--- a/usr/src/lib/libast/common/comp/frexp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/frexp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/frexpl.c b/usr/src/contrib/ast/src/lib/libast/comp/frexpl.c
index 3a35cf045e..5d90ad9d62 100644
--- a/usr/src/lib/libast/common/comp/frexpl.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/frexpl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/fsync.c b/usr/src/contrib/ast/src/lib/libast/comp/fsync.c
index 628c3641e3..4223fa05fc 100644
--- a/usr/src/lib/libast/common/comp/fsync.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/fsync.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/ftw.c b/usr/src/contrib/ast/src/lib/libast/comp/ftw.c
index c89bb683a1..4722628052 100644
--- a/usr/src/lib/libast/common/comp/ftw.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/ftw.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/ftw.h b/usr/src/contrib/ast/src/lib/libast/comp/ftw.h
index f9bf435262..a61f548c60 100644
--- a/usr/src/lib/libast/common/comp/ftw.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/ftw.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/getdate.c b/usr/src/contrib/ast/src/lib/libast/comp/getdate.c
index b1c2120364..455c5fba4b 100644
--- a/usr/src/lib/libast/common/comp/getdate.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getdate.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/getgroups.c b/usr/src/contrib/ast/src/lib/libast/comp/getgroups.c
index 33712c5fc8..8b90bf0958 100644
--- a/usr/src/lib/libast/common/comp/getgroups.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getgroups.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/getlogin.c b/usr/src/contrib/ast/src/lib/libast/comp/getlogin.c
index ae6db0f5b8..7611dbbb9e 100644
--- a/usr/src/lib/libast/common/comp/getlogin.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getlogin.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/getopt.c b/usr/src/contrib/ast/src/lib/libast/comp/getopt.c
index 44fe1156fc..c5c6f193a6 100644
--- a/usr/src/lib/libast/common/comp/getopt.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getopt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/getopt.h b/usr/src/contrib/ast/src/lib/libast/comp/getopt.h
index ee266593a0..110ce39f3f 100644
--- a/usr/src/lib/libast/common/comp/getopt.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getopt.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/getoptl.c b/usr/src/contrib/ast/src/lib/libast/comp/getoptl.c
index a6302da21c..edfa4f1d4a 100644
--- a/usr/src/lib/libast/common/comp/getoptl.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getoptl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -48,10 +48,9 @@ golly(int argc, char* const* argv, const char* optstring, const struct option* l
if (!up || optstring != lastoptstring || longopts != lastlongopts)
{
- if (!up && !(up = sfstropen()))
+ if (!up && !(up = sfstropen()) || !(t = strdup(optstring)))
return -1;
sfprintf(up, "[-1p%d]", flags);
- t = strdup(optstring);
for (o = longopts; o->name; o++)
{
if (o->flag || o->val <= 0 || o->val > UCHAR_MAX || !isalnum(o->val))
@@ -96,6 +95,7 @@ golly(int argc, char* const* argv, const char* optstring, const struct option* l
}
}
sfputc(up, '\n');
+ free(t);
if (!(usage = sfstruse(up)))
return -1;
lastoptstring = optstring;
diff --git a/usr/src/lib/libast/common/comp/getpgrp.c b/usr/src/contrib/ast/src/lib/libast/comp/getpgrp.c
index c4d8493d57..b38ad8abc9 100644
--- a/usr/src/lib/libast/common/comp/getpgrp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getpgrp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/getsubopt.c b/usr/src/contrib/ast/src/lib/libast/comp/getsubopt.c
index e0817d91ba..9d7162c22e 100644
--- a/usr/src/lib/libast/common/comp/getsubopt.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getsubopt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/getwd.c b/usr/src/contrib/ast/src/lib/libast/comp/getwd.c
index 56b04953b4..e600155b34 100644
--- a/usr/src/lib/libast/common/comp/getwd.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/getwd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/gross.c b/usr/src/contrib/ast/src/lib/libast/comp/gross.c
index 551eb08f21..cf5be0dd43 100644
--- a/usr/src/lib/libast/common/comp/gross.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/gross.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/comp/gross_sgi.h b/usr/src/contrib/ast/src/lib/libast/comp/gross_sgi.h
new file mode 100644
index 0000000000..7469789465
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/comp/gross_sgi.h
@@ -0,0 +1,188 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#if __sgi && _hdr_locale_attr
+
+/*
+ * irix 6.5 introduced __libc_attr referenced by
+ * ctype and locale macros; this hack lets
+ * 6.5 a.outs run on irix < 6.5
+ *
+ * NOTE: this hack also freezes the US locale
+ */
+
+#include <locale_attr.h>
+
+static __ctype_t _ast_ctype_tbl =
+{
+ {
+ 0x00000000, 0x00000020, 0x00000020, 0x00000020,
+ 0x00000020, 0x00000020, 0x00000020, 0x00000020,
+ 0x00000020, 0x00000020, 0x80000028, 0x00000028,
+ 0x00000028, 0x00000028, 0x00000028, 0x00000020,
+ 0x00000020, 0x00000020, 0x00000020, 0x00000020,
+ 0x00000020, 0x00000020, 0x00000020, 0x00000020,
+ 0x00000020, 0x00000020, 0x00000020, 0x00000020,
+ 0x00000020, 0x00000020, 0x00000020, 0x00000020,
+ 0x00000020, 0x80008008, 0x00000010, 0x00000010,
+ 0x00000010, 0x00000010, 0x00000010, 0x00000010,
+ 0x00000010, 0x00000010, 0x00000010, 0x00000010,
+ 0x00000010, 0x00000010, 0x00000010, 0x00000010,
+ 0x00000010, 0x00000084, 0x00000084, 0x00000084,
+ 0x00000084, 0x00000084, 0x00000084, 0x00000084,
+ 0x00000084, 0x00000084, 0x00000084, 0x00000010,
+ 0x00000010, 0x00000010, 0x00000010, 0x00000010,
+ 0x00000010, 0x00000010, 0x00000081, 0x00000081,
+ 0x00000081, 0x00000081, 0x00000081, 0x00000081,
+ 0x00000001, 0x00000001, 0x00000001, 0x00000001,
+ 0x00000001, 0x00000001, 0x00000001, 0x00000001,
+ 0x00000001, 0x00000001, 0x00000001, 0x00000001,
+ 0x00000001, 0x00000001, 0x00000001, 0x00000001,
+ 0x00000001, 0x00000001, 0x00000001, 0x00000001,
+ 0x00000010, 0x00000010, 0x00000010, 0x00000010,
+ 0x00000010, 0x00000010, 0x00000082, 0x00000082,
+ 0x00000082, 0x00000082, 0x00000082, 0x00000082,
+ 0x00000002, 0x00000002, 0x00000002, 0x00000002,
+ 0x00000002, 0x00000002, 0x00000002, 0x00000002,
+ 0x00000002, 0x00000002, 0x00000002, 0x00000002,
+ 0x00000002, 0x00000002, 0x00000002, 0x00000002,
+ 0x00000002, 0x00000002, 0x00000002, 0x00000002,
+ 0x00000010, 0x00000010, 0x00000010, 0x00000010,
+ 0x00000020, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000,
+ },
+ {
+ -1, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254,
+ 255,
+ },
+ {
+ -1, 0, 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254,
+ 255,
+ },
+ {
+ 000, 000, 000, 000, 000, 000, 000,
+ },
+};
+
+extern __attr_t ___libc_attr =
+{
+ &_ast_ctype_tbl,
+ { 0 },
+ { 0 },
+ { 1 },
+};
+
+#pragma weak __libc_attr = ___libc_attr
+
+#endif
diff --git a/usr/src/lib/libast/common/comp/hsearch.c b/usr/src/contrib/ast/src/lib/libast/comp/hsearch.c
index f0037d0684..43953e44ef 100644
--- a/usr/src/lib/libast/common/comp/hsearch.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/hsearch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/iconv.c b/usr/src/contrib/ast/src/lib/libast/comp/iconv.c
index 3f4c7d5855..e07fb644d1 100644
--- a/usr/src/lib/libast/common/comp/iconv.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/iconv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -271,7 +271,7 @@ _win_iconv(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
#if DEBUG_TRACE
error(DEBUG_TRACE, "AHA#%d _win_iconv from=0x%04x to=0x%04x\n", __LINE__, cc->from.index, cc->to.index);
#endif
- if (cc->from.index == cc->to.index)
+ if (cc->from.index == cc->to.index || cc->from.index != CP_UCS2 && cc->to.index == 0)
{
/*
* easy
@@ -423,7 +423,7 @@ _ast_iconv_name(register const char* m, register char* b, size_t n)
const _ast_iconv_list_t* bp;
register int c;
register char* e;
- int sub[2];
+ ssize_t sub[2];
char buf[16];
#if DEBUG_TRACE
char* o;
@@ -1113,11 +1113,11 @@ error(DEBUG_TRACE, "AHA#%d _ast_iconv_open f=%s:%s:%d t=%s:%s:%d\n", __LINE__, f
if (fc >= 0 && tc >= 0)
cc->from.map = ccmap(fc, tc);
#if _lib_iconv_open
- else if ((cc->cvt = iconv_open(to, fr)) != (iconv_t)(-1))
+ else if ((cc->cvt = iconv_open(t, f)) != (iconv_t)(-1) || (cc->cvt = iconv_open(to, fr)) != (iconv_t)(-1))
cc->from.fun = (_ast_iconv_f)iconv;
#endif
#if _UWIN
- else if ((cc->cvt = _win_iconv_open(cc, to, fr)) != (_ast_iconv_t)(-1))
+ else if ((cc->cvt = _win_iconv_open(cc, t, f)) != (_ast_iconv_t)(-1) || (cc->cvt = _win_iconv_open(cc, to, fr)) != (_ast_iconv_t)(-1))
cc->from.fun = (_ast_iconv_f)_win_iconv;
#endif
else
@@ -1330,6 +1330,8 @@ _ast_iconv(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
return n;
}
+#define OK ((size_t)-1)
+
/*
* write *fb size *fn to op
* fb,fn updated on return
@@ -1337,26 +1339,46 @@ _ast_iconv(_ast_iconv_t cd, char** fb, size_t* fn, char** tb, size_t* tn)
*/
ssize_t
-_ast_iconv_write(_ast_iconv_t cd, Sfio_t* op, char** fb, size_t* fn, size_t* e)
+_ast_iconv_write(_ast_iconv_t cd, Sfio_t* op, char** fb, size_t* fn, Iconv_disc_t* disc)
{
+ char* fo = *fb;
char* tb;
char* ts;
+ size_t* e;
size_t tn;
size_t r;
+ int ok;
+ Iconv_disc_t compat;
+
+ /*
+ * the old api had optional size_t* instead of Iconv_disc_t*
+ */
+ if (!disc || disc->version < 20110101L || disc->version >= 30000101L)
+ {
+ e = (size_t*)disc;
+ disc = &compat;
+ iconv_init(disc, 0);
+ }
+ else
+ e = 0;
r = 0;
tn = 0;
- while (*fn > 0)
+ ok = 1;
+ while (ok && *fn > 0)
{
- if (!(tb = (char*)sfreserve(op, -(tn + 1), SF_WRITE|SF_LOCKR)))
- return r ? r : -1;
+ if (!(tb = (char*)sfreserve(op, -(tn + 1), SF_WRITE|SF_LOCKR)) || !(tn = sfvalue(op)))
+ {
+ if (!r)
+ r = -1;
+ break;
+ }
ts = tb;
- tn = sfvalue(op);
#if DEBUG_TRACE
error(DEBUG_TRACE, "AHA#%d iconv_write ts=%p tn=%d", __LINE__, ts, tn);
for (;;)
#else
- while (_ast_iconv(cd, fb, fn, &ts, &tn) == (size_t)(-1))
+ while (*fn > 0 && _ast_iconv(cd, fb, fn, &ts, &tn) == (size_t)(-1))
#endif
{
#if DEBUG_TRACE
@@ -1364,26 +1386,46 @@ error(DEBUG_TRACE, "AHA#%d iconv_write ts=%p tn=%d", __LINE__, ts, tn);
error(DEBUG_TRACE, "AHA#%d iconv_write %d => %d `%-.*s'", __LINE__, *fn, tn, *fn, *fb);
_r = _ast_iconv(cd, fb, fn, &ts, &tn);
error(DEBUG_TRACE, "AHA#%d iconv_write %d => %d [%d]", __LINE__, *fn, tn, _r);
- if (_r != (size_t)(-1))
+ if (_r != (size_t)(-1) || !fn)
break;
#endif
- if (errno == E2BIG)
+ switch (errno)
+ {
+ case E2BIG:
break;
- if (e)
- (*e)++;
- if (!tn)
+ case EINVAL:
+ if (disc->errorf)
+ (*disc->errorf)(NiL, disc, ERROR_SYSTEM|2, "incomplete multibyte sequence at offset %I*u", sizeof(fo), *fb - fo);
+ goto bad;
+ default:
+ if (disc->errorf)
+ (*disc->errorf)(NiL, disc, ERROR_SYSTEM|2, "invalid multibyte sequence at offset %I*u", sizeof(fo), *fb - fo);
+ bad:
+ disc->errors++;
+ if (!(disc->flags & ICONV_FATAL))
+ {
+ if (!(disc->flags & ICONV_OMIT) && tn > 0)
+ {
+ *ts++ = (disc->fill >= 0) ? disc->fill : **fb;
+ tn--;
+ }
+ (*fb)++;
+ (*fn)--;
+ continue;
+ }
+ ok = 0;
break;
- *ts++ = *(*fb)++;
- tn--;
- (*fn)--;
+ }
+ break;
}
#if DEBUG_TRACE
error(DEBUG_TRACE, "AHA#%d iconv_write %d", __LINE__, ts - tb);
#endif
-
sfwrite(op, tb, ts - tb);
r += ts - tb;
}
+ if (e)
+ *e = disc->errors;
return r;
}
@@ -1392,50 +1434,97 @@ error(DEBUG_TRACE, "AHA#%d iconv_write %d", __LINE__, ts - tb);
*/
ssize_t
-_ast_iconv_move(_ast_iconv_t cd, Sfio_t* ip, Sfio_t* op, size_t n, size_t* e)
+_ast_iconv_move(_ast_iconv_t cd, Sfio_t* ip, Sfio_t* op, size_t n, Iconv_disc_t* disc)
{
char* fb;
char* fs;
char* tb;
char* ts;
+ size_t* e;
+ size_t fe;
size_t fn;
size_t fo;
+ size_t ft;
size_t tn;
size_t i;
ssize_t r = 0;
+ int ok = 1;
int locked;
+ Iconv_disc_t compat;
+
+ /*
+ * the old api had optional size_t* instead of Iconv_disc_t*
+ */
+ if (!disc || disc->version < 20110101L || disc->version >= 30000101L)
+ {
+ e = (size_t*)disc;
+ disc = &compat;
+ iconv_init(disc, 0);
+ }
+ else
+ e = 0;
+ tb = 0;
+ fe = OK;
+ ft = 0;
fn = n;
- for (;;)
+ do
{
- if (fn != SF_UNBOUND)
- fn = -((ssize_t)(fn & (((size_t)(~0))>>1)));
- if (!(fb = (char*)sfreserve(ip, fn, locked = SF_LOCKR)) &&
- !(fb = (char*)sfreserve(ip, fn, locked = 0)))
+ if (n != SF_UNBOUND)
+ n = -((ssize_t)(n & (((size_t)(~0))>>1)));
+ if ((!(fb = (char*)sfreserve(ip, n, locked = SF_LOCKR)) || !(fo = sfvalue(ip))) &&
+ (!(fb = (char*)sfreserve(ip, n, locked = 0)) || !(fo = sfvalue(ip))))
break;
fs = fb;
- fn = fo = sfvalue(ip);
+ fn = fo;
if (!(tb = (char*)sfreserve(op, SF_UNBOUND, SF_WRITE|SF_LOCKR)))
{
- sfread(ip, fb, 0);
- return r ? r : -1;
+ if (!r)
+ r = -1;
+ break;
}
ts = tb;
tn = sfvalue(op);
- while (_ast_iconv(cd, &fs, &fn, &ts, &tn) != (size_t)(-1) && fn > 0)
+ while (fn > 0 && _ast_iconv(cd, &fs, &fn, &ts, &tn) == (size_t)(-1))
{
- if (tn > 0)
+ switch (errno)
{
- *ts++ = '_';
- tn--;
+ case E2BIG:
+ break;
+ case EINVAL:
+ if (fe == ft + (fo - fn))
+ {
+ fe = OK;
+ if (disc->errorf)
+ (*disc->errorf)(NiL, disc, ERROR_SYSTEM|2, "incomplete multibyte sequence at offset %I*u", sizeof(ft), ft + (fo - fn));
+ goto bad;
+ }
+ fe = ft;
+ break;
+ default:
+ if (disc->errorf)
+ (*disc->errorf)(NiL, disc, ERROR_SYSTEM|2, "invalid multibyte sequence at offset %I*u", sizeof(ft), ft + (fo - fn));
+ bad:
+ disc->errors++;
+ if (!(disc->flags & ICONV_FATAL))
+ {
+ if (!(disc->flags & ICONV_OMIT) && tn > 0)
+ {
+ *ts++ = (disc->fill >= 0) ? disc->fill : *fs;
+ tn--;
+ }
+ fs++;
+ fn--;
+ continue;
+ }
+ ok = 0;
+ break;
}
- if (e)
- (*e)++;
- fs++;
- fn--;
+ break;
}
sfwrite(op, tb, ts - tb);
r += ts - tb;
+ ts = tb;
if (locked)
sfread(ip, fb, fs - fb);
else
@@ -1447,9 +1536,23 @@ _ast_iconv_move(_ast_iconv_t cd, Sfio_t* ip, Sfio_t* op, size_t n, size_t* e)
break;
n -= fs - fb;
}
+ ft += (fs - fb);
if (fn == fo)
fn++;
+ } while (ok);
+ if (fb && locked)
+ sfread(ip, fb, 0);
+ if (tb)
+ {
+ sfwrite(op, tb, 0);
+ if (ts > tb)
+ {
+ sfwrite(op, tb, ts - tb);
+ r += ts - tb;
+ }
}
+ if (e)
+ *e = disc->errors;
return r;
}
diff --git a/usr/src/lib/libast/common/comp/killpg.c b/usr/src/contrib/ast/src/lib/libast/comp/killpg.c
index 39ed90d8b8..725a1f99ac 100644
--- a/usr/src/lib/libast/common/comp/killpg.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/killpg.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/libgen.h b/usr/src/contrib/ast/src/lib/libast/comp/libgen.h
index e7adb22807..a2bb92a2ed 100644
--- a/usr/src/lib/libast/common/comp/libgen.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/libgen.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/link.c b/usr/src/contrib/ast/src/lib/libast/comp/link.c
index 524172d58e..571806f015 100644
--- a/usr/src/lib/libast/common/comp/link.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/link.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/localeconv.c b/usr/src/contrib/ast/src/lib/libast/comp/localeconv.c
index 698294b759..8cdc841707 100644
--- a/usr/src/lib/libast/common/comp/localeconv.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/localeconv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -53,8 +53,6 @@ static struct lconv debug_lconv =
CHAR_MAX,
};
-#if !_lib_localeconv
-
static struct lconv default_lconv =
{
".",
@@ -77,6 +75,8 @@ static struct lconv default_lconv =
CHAR_MAX,
};
+#if !_lib_localeconv
+
struct lconv*
localeconv(void)
{
@@ -92,5 +92,9 @@ localeconv(void)
struct lconv*
_ast_localeconv(void)
{
- return ((locales[AST_LC_MONETARY]->flags | locales[AST_LC_NUMERIC]->flags) & LC_debug) ? &debug_lconv : localeconv();
+ if ((locales[AST_LC_MONETARY]->flags | locales[AST_LC_NUMERIC]->flags) & LC_debug)
+ return &debug_lconv;
+ if ((locales[AST_LC_NUMERIC]->flags & (LC_default|LC_local)) == LC_local)
+ return locales[AST_LC_NUMERIC]->territory == &lc_territories[0] ? &default_lconv : &debug_lconv;
+ return localeconv();
}
diff --git a/usr/src/lib/libast/common/comp/lstat.c b/usr/src/contrib/ast/src/lib/libast/comp/lstat.c
index d86790a7e3..7531215c6c 100644
--- a/usr/src/lib/libast/common/comp/lstat.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/lstat.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/memccpy.c b/usr/src/contrib/ast/src/lib/libast/comp/memccpy.c
index 4b54ff9b7d..c973a2de6b 100644
--- a/usr/src/lib/libast/common/comp/memccpy.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/memccpy.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/memchr.c b/usr/src/contrib/ast/src/lib/libast/comp/memchr.c
index 96b2eaab15..d29405904c 100644
--- a/usr/src/lib/libast/common/comp/memchr.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/memchr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/memcmp.c b/usr/src/contrib/ast/src/lib/libast/comp/memcmp.c
index 990dbd4f08..b74540cb47 100644
--- a/usr/src/lib/libast/common/comp/memcmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/memcmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/memcpy.c b/usr/src/contrib/ast/src/lib/libast/comp/memcpy.c
index 984e88a7d6..25fa0b7a8c 100644
--- a/usr/src/lib/libast/common/comp/memcpy.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/memcpy.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/memmove.c b/usr/src/contrib/ast/src/lib/libast/comp/memmove.c
index ddb108f544..9d5ba594e7 100644
--- a/usr/src/lib/libast/common/comp/memmove.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/memmove.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/memset.c b/usr/src/contrib/ast/src/lib/libast/comp/memset.c
index 5736ce917c..359d157f8f 100644
--- a/usr/src/lib/libast/common/comp/memset.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/memset.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/mkdir.c b/usr/src/contrib/ast/src/lib/libast/comp/mkdir.c
index 66a3c5489c..4a74d680b9 100644
--- a/usr/src/lib/libast/common/comp/mkdir.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/mkdir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -39,7 +39,7 @@ mkdir(const char* path, mode_t mode)
register int n;
char* av[3];
- static char* cmd[] = { "/bin/mkdir", "/usr/5bin/mkdir", 0 };
+ static char* cmd[] = { "/bin/mkdir", 0 };
n = errno;
diff --git a/usr/src/lib/libast/common/comp/mkfifo.c b/usr/src/contrib/ast/src/lib/libast/comp/mkfifo.c
index 9f35156247..e4b26a4446 100644
--- a/usr/src/lib/libast/common/comp/mkfifo.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/mkfifo.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/mknod.c b/usr/src/contrib/ast/src/lib/libast/comp/mknod.c
index c1003c348d..8172a131e0 100644
--- a/usr/src/lib/libast/common/comp/mknod.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/mknod.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/mktemp.c b/usr/src/contrib/ast/src/lib/libast/comp/mktemp.c
index b1851ddf86..c29dc90954 100644
--- a/usr/src/lib/libast/common/comp/mktemp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/mktemp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/mktime.c b/usr/src/contrib/ast/src/lib/libast/comp/mktime.c
index 79864ff3cb..c39ca40e71 100644
--- a/usr/src/lib/libast/common/comp/mktime.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/mktime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/mount.c b/usr/src/contrib/ast/src/lib/libast/comp/mount.c
index 6efdad927f..eaf27e5114 100644
--- a/usr/src/lib/libast/common/comp/mount.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/mount.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/nftw.c b/usr/src/contrib/ast/src/lib/libast/comp/nftw.c
index 21684f23f3..6c8c97a65d 100644
--- a/usr/src/lib/libast/common/comp/nftw.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/nftw.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/omitted.c b/usr/src/contrib/ast/src/lib/libast/comp/omitted.c
index 10a20ba533..b517965cba 100644
--- a/usr/src/lib/libast/common/comp/omitted.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/omitted.c
@@ -69,6 +69,7 @@ extern unsigned int _alarm(unsigned int);
extern int _chmod(const char*, mode_t);
extern int _close(int);
extern pid_t _execve(const char*, char* const*, char* const*);
+extern uid_t _getuid(void);
extern int _link(const char*, const char*);
extern int _open(const char*, int, ...);
extern long _pathconf(const char*, int);
@@ -85,6 +86,90 @@ extern ssize_t _write(int, const void*, size_t);
#define extern __EXPORT__
#endif
+#if _win32_botch_access
+#define sysaccess _access
+#else
+#define sysaccess access
+#endif
+#if _win32_botch_alarm
+#define sysalarm _alarm
+#else
+#define sysalarm alarm
+#endif
+#if _win32_botch_chmod
+#define syschmod _chmod
+#else
+#define syschmod chmod
+#endif
+#if _win32_botch_copy
+#define sysclose _close
+#else
+#define sysclose close
+#endif
+#if _win32_botch_execve || _lib_spawn_mode
+#define sysexecve _execve
+#else
+#define sysexecve execve
+#endif
+#if CONVERT
+#define sysgetuid _getuid
+#else
+#define sysgetuid getuid
+#endif
+#if _win32_botch_link
+#define syslink _link
+#else
+#define syslink link
+#endif
+#if _win32_botch_open || _win32_botch_copy
+#define sysopen _open
+#else
+#define sysopen open
+#endif
+#if _win32_botch_pathconf
+#define syspathconf _pathconf
+#else
+#define syspathconf pathconf
+#endif
+#define sysread _read
+#if _win32_botch_rename
+#define sysrename _rename
+#else
+#define sysrename rename
+#endif
+#if _lib_spawn_mode
+#define sysspawnve _spawnve
+#else
+#define sysspawnve spawnve
+#endif
+#if _win32_botch_stat
+#define sysstat _stat
+#else
+#define sysstat stat
+#endif
+#if _win32_botch_truncate
+#define systruncate _truncate
+#else
+#define systruncate truncate
+#endif
+#if _win32_botch_unlink
+#define sysunlink _unlink
+#else
+#define sysunlink unlink
+#endif
+#if _win32_botch_utime
+#define sysutime _utime
+#define sysutimes _utimes
+#else
+#define sysutime utime
+#define sysutimes utimes
+#endif
+#if _win32_botch_copy
+#define syswrite _write
+#else
+#define syswrite write
+#endif
+
static char*
suffix(register const char* path)
{
@@ -109,7 +194,7 @@ execrate(const char* path, char* buf, int size, int physical)
if (suffix(path))
return 0;
oerrno = errno;
- if (physical || strlen(path) >= size || !(s = pathcanon(strcpy(buf, path), PATH_PHYSICAL|PATH_DOTDOT|PATH_EXISTS)))
+ if (physical || strlen(path) >= size || !(s = pathcanon(strcpy(buf, path), size, PATH_PHYSICAL|PATH_DOTDOT|PATH_EXISTS)))
snprintf(buf, size, "%s.exe", path);
else if (!suffix(buf) && ((buf + size) - s) >= 4)
strcpy(s, ".exe");
@@ -138,7 +223,7 @@ magic(const char* path, int* ux)
#endif
oerrno = errno;
- if ((fd = _open(path, O_RDONLY, 0)) >= 0)
+ if ((fd = sysopen(path, O_RDONLY, 0)) >= 0)
{
#if CONVERT
if (ux)
@@ -146,8 +231,8 @@ magic(const char* path, int* ux)
else
#endif
n = 2;
- r = (m = _read(fd, buf, n)) >= 2 && (buf[1] == 0x5a && (buf[0] == 0x4c || buf[0] == 0x4d) || ux && buf[0] == '#' && buf[1] == '!' && (*ux = 1) && !(ux = 0)) ? 0 : -1;
- close(fd);
+ r = (m = sysread(fd, buf, n)) >= 2 && (buf[1] == 0x5a && (buf[0] == 0x4c || buf[0] == 0x4d) || ux && buf[0] == '#' && buf[1] == '!' && (*ux = 1) && !(ux = 0)) ? 0 : -1;
+ sysclose(fd);
if (ux)
{
if (r)
@@ -184,10 +269,10 @@ access(const char* path, int op)
char buf[PATH_MAX];
oerrno = errno;
- if ((r = _access(path, op)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
+ if ((r = sysaccess(path, op)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
{
errno = oerrno;
- r = _access(buf, op);
+ r = sysaccess(buf, op);
}
return r;
}
@@ -210,7 +295,7 @@ alarm(unsigned int s)
else
r = a - n;
a = n + s - 1;
- (void)_alarm(s);
+ (void)sysalarm(s);
return r;
}
@@ -225,12 +310,12 @@ chmod(const char* path, mode_t mode)
int oerrno;
char buf[PATH_MAX];
- if ((r = _chmod(path, mode)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
+ if ((r = syschmod(path, mode)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
{
errno = oerrno;
- return _chmod(buf, mode);
+ return syschmod(buf, mode);
}
- if (!(r = _chmod(path, mode)) &&
+ if (!(r = syschmod(path, mode)) &&
(mode & (S_IXUSR|S_IXGRP|S_IXOTH)) &&
!suffix(path) &&
(strlen(path) + 4) < sizeof(buf))
@@ -239,7 +324,7 @@ chmod(const char* path, mode_t mode)
if (!magic(path, NiL))
{
snprintf(buf, sizeof(buf), "%s.exe", path);
- _rename(path, buf);
+ sysrename(path, buf);
}
errno = oerrno;
}
@@ -277,8 +362,6 @@ chmod(const char* path, mode_t mode)
* DOSPATHVARS='a b c' convert { a b c }
*/
-extern uid_t _getuid(void);
-
static int convertinit;
/*
@@ -336,7 +419,7 @@ getuid(void)
memcpy(t, s, n);
cygwin_win32_to_posix_path_list(s + n, t + n);
}
- return _getuid();
+ return sysgetuid();
}
#endif
@@ -401,12 +484,12 @@ runve(int mode, const char* path, char* const* argv, char* const* envv)
#endif
if (execrate(path, buf, sizeof(buf), 0))
{
- if (!_stat(buf, &st))
+ if (!sysstat(buf, &st))
path = (const char*)buf;
else
errno = oerrno;
}
- if (path != (const char*)buf && _stat(path, &st))
+ if (path != (const char*)buf && sysstat(path, &st))
return -1;
if (!S_ISREG(st.st_mode) || !(st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))
{
@@ -463,7 +546,7 @@ runve(int mode, const char* path, char* const* argv, char* const* envv)
s += 5;
do
{
- s = pathcat(tmp, s, ':', NiL, "");
+ s = pathcat(s, ':', NiL, "", tmp, sizeof(tmp));
if (streq(tmp, "/usr/bin/") || streq(tmp, "/bin/"))
{
n = 0;
@@ -523,7 +606,7 @@ runve(int mode, const char* path, char* const* argv, char* const* envv)
#if _lib_spawn_mode
if (mode != _P_OVERLAY)
{
- pid = _spawnve(mode, path, argv, envv);
+ pid = sysspawnve(mode, path, argv, envv);
#if defined(_P_DETACH) && defined(_P_NOWAIT)
if (pid > 0 && pgrp)
setpgid(pid, 0);
@@ -536,7 +619,7 @@ runve(int mode, const char* path, char* const* argv, char* const* envv)
if (pgrp)
setpgid(0, 0);
#endif
- pid = _execve(path, argv, envv);
+ pid = sysexecve(path, argv, envv);
}
if (m1)
free(m1);
@@ -588,12 +671,12 @@ link(const char* fp, const char* tp)
char tb[PATH_MAX];
oerrno = errno;
- if ((r = _link(fp, tp)) && errno == ENOENT && execrate(fp, fb, sizeof(fb), 1))
+ if ((r = syslink(fp, tp)) && errno == ENOENT && execrate(fp, fb, sizeof(fb), 1))
{
if (execrate(tp, tb, sizeof(tb), 1))
tp = tb;
errno = oerrno;
- r = _link(fb, tp);
+ r = syslink(fb, tp);
}
return r;
}
@@ -632,19 +715,19 @@ close(int fd)
exe[fd]->test = 0;
if (r > 0 && !fstat(fd, &st) && st.st_ino == exe[fd]->ino)
{
- if (r = _close(fd))
+ if (r = sysclose(fd))
return r;
oerrno = errno;
if (!stat(exe[fd]->path, &st) && st.st_ino == exe[fd]->ino)
{
snprintf(buf, sizeof(buf), "%s.exe", exe[fd]->path);
- _rename(exe[fd]->path, buf);
+ sysrename(exe[fd]->path, buf);
}
errno = oerrno;
return 0;
}
}
- return _close(fd);
+ return sysclose(fd);
}
extern ssize_t
@@ -652,7 +735,7 @@ write(int fd, const void* buf, size_t n)
{
if (fd >= 0 && fd < elementsof(exe) && exe[fd] && exe[fd]->test < 0)
exe[fd]->test = n >= 2 && ((unsigned char*)buf)[1] == 0x5a && (((unsigned char*)buf)[0] == 0x4c || ((unsigned char*)buf)[0] == 0x4d) && !lseek(fd, (off_t)0, SEEK_CUR);
- return _write(fd, buf, n);
+ return syswrite(fd, buf, n);
}
#endif
@@ -672,12 +755,12 @@ open(const char* path, int flags, ...)
va_start(ap, flags);
mode = (flags & O_CREAT) ? va_arg(ap, int) : 0;
oerrno = errno;
- fd = _open(path, flags, mode);
+ fd = sysopen(path, flags, mode);
#if _win32_botch_open
if (fd < 0 && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
{
errno = oerrno;
- fd = _open(buf, flags, mode);
+ fd = sysopen(buf, flags, mode);
}
#endif
#if _win32_botch_copy
@@ -704,9 +787,9 @@ open(const char* path, int flags, ...)
extern long
pathconf(const char* path, int op)
{
- if (_access(path, F_OK))
+ if (sysaccess(path, F_OK))
return -1;
- return _pathconf(path, op);
+ return syspathconf(path, op);
}
#endif
@@ -722,12 +805,12 @@ rename(const char* fp, const char* tp)
char tb[PATH_MAX];
oerrno = errno;
- if ((r = _rename(fp, tp)) && errno == ENOENT && execrate(fp, fb, sizeof(fb), 1))
+ if ((r = sysrename(fp, tp)) && errno == ENOENT && execrate(fp, fb, sizeof(fb), 1))
{
if (execrate(tp, tb, sizeof(tb), 1))
tp = tb;
errno = oerrno;
- r = _rename(fb, tp);
+ r = sysrename(fb, tp);
}
return r;
}
@@ -744,10 +827,10 @@ stat(const char* path, struct stat* st)
char buf[PATH_MAX];
oerrno = errno;
- if ((r = _stat(path, st)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
+ if ((r = sysstat(path, st)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
{
errno = oerrno;
- r = _stat(buf, st);
+ r = sysstat(buf, st);
}
return r;
}
@@ -764,10 +847,10 @@ truncate(const char* path, off_t offset)
char buf[PATH_MAX];
oerrno = errno;
- if ((r = _truncate(path, offset)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
+ if ((r = systruncate(path, offset)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
{
errno = oerrno;
- r = _truncate(buf, offset);
+ r = systruncate(buf, offset);
}
return r;
}
@@ -831,10 +914,10 @@ unlink(const char* path)
path = (const char*)buf;
}
#else
- if (_access(path, 0))
+ if (sysaccess(path, 0))
#if _win32_botch_access
{
- if (errno != ENOENT || !execrate(path, buf, sizeof(buf), 1) || _access(buf, 0))
+ if (errno != ENOENT || !execrate(path, buf, sizeof(buf), 1) || sysaccess(buf, 0))
return -1;
path = (const char*)buf;
}
@@ -852,7 +935,7 @@ unlink(const char* path)
base = ((getuid() & 0xffff) << 16) | (time(NiL) & 0xffff);
suffix = (getpid() & 0xfff) + count++;
snprintf(tmp, sizeof(tmp), deleted, drive, base, suffix);
- if (!_rename(path, tmp))
+ if (!sysrename(path, tmp))
{
path = (const char*)tmp;
goto try_delete;
@@ -860,24 +943,24 @@ unlink(const char* path)
if (errno != ENOTDIR && errno != ENOENT)
goto try_unlink;
tmp[DELETED_DIR_2] = 0;
- if (_access(tmp, 0))
+ if (sysaccess(tmp, 0))
{
mask = umask(0);
tmp[DELETED_DIR_1] = 0;
- if (_access(tmp, 0) && _mkdir(tmp, S_IRWXU|S_IRWXG|S_IRWXO))
+ if (sysaccess(tmp, 0) && mkdir(tmp, S_IRWXU|S_IRWXG|S_IRWXO))
{
umask(mask);
goto try_unlink;
}
tmp[DELETED_DIR_1] = '\\';
- r = _mkdir(tmp, S_IRWXU|S_IRWXG|S_IRWXO);
+ r = mkdir(tmp, S_IRWXU|S_IRWXG|S_IRWXO);
umask(mask);
if (r)
goto try_unlink;
errno = 0;
}
tmp[DELETED_DIR_2] = '\\';
- if (!errno && !_rename(path, tmp))
+ if (!errno && !sysrename(path, tmp))
{
path = (const char*)tmp;
goto try_delete;
@@ -886,7 +969,7 @@ unlink(const char* path)
if (errno == ENOENT)
{
#if !_win32_botch_access
- if (execrate(path, buf, sizeof(buf), 1) && !_rename(buf, tmp))
+ if (execrate(path, buf, sizeof(buf), 1) && !sysrename(buf, tmp))
path = (const char*)tmp;
#endif
goto try_unlink;
@@ -896,7 +979,7 @@ unlink(const char* path)
do
{
snprintf(tmp, sizeof(tmp), deleted, drive, base, suffix);
- if (!_rename(path, tmp))
+ if (!sysrename(path, tmp))
{
path = (const char*)tmp;
goto try_delete;
@@ -916,7 +999,7 @@ unlink(const char* path)
#endif
try_unlink:
errno = oerrno;
- return _unlink(path);
+ return sysunlink(path);
}
#endif
@@ -941,7 +1024,7 @@ ctime_now(const char* path)
int oerrno;
char tmp[MAX_PATH];
- if (_stat(path, &fs) || (fs.st_mode & S_IWUSR) || _chmod(path, (fs.st_mode | S_IWUSR) & S_IPERM))
+ if (sysstat(path, &fs) || (fs.st_mode & S_IWUSR) || syschmod(path, (fs.st_mode | S_IWUSR) & S_IPERM))
fs.st_mode = 0;
cygwin_conv_to_win32_path(path, tmp);
hp = CreateFile(tmp, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -953,7 +1036,7 @@ ctime_now(const char* path)
CloseHandle(hp);
}
if (fs.st_mode)
- _chmod(path, fs.st_mode & S_IPERM);
+ syschmod(path, fs.st_mode & S_IPERM);
errno = oerrno;
}
@@ -971,10 +1054,10 @@ utimes(const char* path, const struct timeval* ut)
char buf[PATH_MAX];
oerrno = errno;
- if ((r = _utimes(path, ut)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
+ if ((r = sysutimes(path, ut)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
{
errno = oerrno;
- r = _utimes(path = buf, ut);
+ r = sysutimes(path = buf, ut);
}
if (!r)
ctime_now(path);
@@ -989,10 +1072,10 @@ utime(const char* path, const struct utimbuf* ut)
char buf[PATH_MAX];
oerrno = errno;
- if ((r = _utime(path, ut)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
+ if ((r = sysutime(path, ut)) && errno == ENOENT && execrate(path, buf, sizeof(buf), 0))
{
errno = oerrno;
- r = _utime(path = buf, ut);
+ r = sysutime(path = buf, ut);
}
if (!r)
ctime_now(path);
diff --git a/usr/src/lib/libast/common/comp/open.c b/usr/src/contrib/ast/src/lib/libast/comp/open.c
index bd9d4ee482..6e2530f8f4 100644
--- a/usr/src/lib/libast/common/comp/open.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/open.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/openlog.c b/usr/src/contrib/ast/src/lib/libast/comp/openlog.c
index a4c902a168..518d441162 100644
--- a/usr/src/lib/libast/common/comp/openlog.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/openlog.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/putenv.c b/usr/src/contrib/ast/src/lib/libast/comp/putenv.c
index 235991e3c1..72b0f61066 100644
--- a/usr/src/lib/libast/common/comp/putenv.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/putenv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/re_comp.c b/usr/src/contrib/ast/src/lib/libast/comp/re_comp.c
index 73161646da..ad31f240dd 100644
--- a/usr/src/lib/libast/common/comp/re_comp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/re_comp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/re_comp.h b/usr/src/contrib/ast/src/lib/libast/comp/re_comp.h
index a464778002..616fb4c3c0 100644
--- a/usr/src/lib/libast/common/comp/re_comp.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/re_comp.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/readlink.c b/usr/src/contrib/ast/src/lib/libast/comp/readlink.c
index 284d3c9c6d..2af5d8fed5 100644
--- a/usr/src/lib/libast/common/comp/readlink.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/readlink.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -45,7 +45,7 @@ readlink(const char* path, char* buf, int siz)
if (siz > sizeof(FAKELINK_MAGIC))
{
- if ((fd = open(path, O_RDONLY)) < 0)
+ if ((fd = open(path, O_RDONLY|O_cloexec)) < 0)
return -1;
if (read(fd, buf, sizeof(FAKELINK_MAGIC)) == sizeof(FAKELINK_MAGIC) && !strcmp(buf, FAKELINK_MAGIC) && (n = read(fd, buf, siz)) > 0 && !buf[n - 1])
{
diff --git a/usr/src/lib/libast/common/comp/realpath.c b/usr/src/contrib/ast/src/lib/libast/comp/realpath.c
index a62577dfb7..54c87033c0 100644
--- a/usr/src/lib/libast/common/comp/realpath.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/realpath.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/regcmp.c b/usr/src/contrib/ast/src/lib/libast/comp/regcmp.c
index c1a34aa616..ddf5498219 100644
--- a/usr/src/lib/libast/common/comp/regcmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/regcmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -66,6 +66,7 @@ regcmp(const char* pattern, ...)
register int c;
register int p;
int b;
+ int e;
int i;
int j;
int nsub;
@@ -75,77 +76,83 @@ regcmp(const char* pattern, ...)
va_list ap;
va_start(ap, pattern);
- if (!pattern || !*pattern || !(sp = sfstropen()))
- return 0;
- memset(paren, 0, sizeof(paren));
- n = 0;
- p = -1;
- b = 0;
- nsub = 0;
- s = (char*)pattern;
- do
+ if (pattern || !*pattern || !(sp = sfstropen()))
+ e = 1;
+ else
{
- while (c = *s++)
+ e = 0;
+ memset(paren, 0, sizeof(paren));
+ n = 0;
+ p = -1;
+ b = 0;
+ nsub = 0;
+ s = (char*)pattern;
+ do
{
- if (c == '\\')
- {
- sfputc(sp, c);
- if (!(c = *s++))
- break;
- }
- else if (b)
- {
- if (c == ']')
- b = 0;
- }
- else if (c == '[')
+ while (c = *s++)
{
- b = 1;
- if (*s == '^')
+ if (c == '\\')
{
sfputc(sp, c);
- c = *s++;
+ if (!(c = *s++))
+ break;
}
- if (*s == ']')
+ else if (b)
{
- sfputc(sp, c);
- c = *s++;
+ if (c == ']')
+ b = 0;
}
- }
- else if (c == '(')
- {
- /*
- * someone explain in one sentence why
- * a cast is needed to make this work
- */
+ else if (c == '[')
+ {
+ b = 1;
+ if (*s == '^')
+ {
+ sfputc(sp, c);
+ c = *s++;
+ }
+ if (*s == ']')
+ {
+ sfputc(sp, c);
+ c = *s++;
+ }
+ }
+ else if (c == '(')
+ {
+ /*
+ * someone explain in one sentence why
+ * a cast is needed to make this work
+ */
- if (p < (int)(elementsof(paren) - 1))
- p++;
- paren[p] = ++n;
- }
- else if (c == ')' && p >= 0)
- {
- for (i = p; i > 0; i--)
- if (paren[i])
- break;
- if (*s == '$' && (j = *(s + 1)) >= '0' && j <= '9')
+ if (p < (int)(elementsof(paren) - 1))
+ p++;
+ paren[p] = ++n;
+ }
+ else if (c == ')' && p >= 0)
{
- s += 2;
- j -= '0';
- if (nsub <= j)
+ for (i = p; i > 0; i--)
+ if (paren[i])
+ break;
+ if (*s == '$' && (j = *(s + 1)) >= '0' && j <= '9')
{
- if (!nsub)
- memset(sub, 0, sizeof(sub));
- nsub = j + 1;
+ s += 2;
+ j -= '0';
+ if (nsub <= j)
+ {
+ if (!nsub)
+ memset(sub, 0, sizeof(sub));
+ nsub = j + 1;
+ }
+ sub[j] = paren[i] + 1;
}
- sub[j] = paren[i] + 1;
+ paren[i] = 0;
}
- paren[i] = 0;
+ sfputc(sp, c);
}
- sfputc(sp, c);
- }
- } while (s = va_arg(ap, char*));
+ } while (s = va_arg(ap, char*));
+ }
va_end(ap);
+ if (e)
+ return 0;
if (!(s = sfstruse(sp)))
{
sfstrclose(sp);
@@ -192,10 +199,16 @@ regex(const char* handle, const char* subject, ...)
va_start(ap, subject);
if (!(re = (Regex_t*)handle) || !subject)
- return 0;
- for (n = 0; n < re->nsub; n++)
- sub[n] = va_arg(ap, char*);
+ k = 1;
+ else
+ {
+ k = 0;
+ for (n = 0; n < re->nsub; n++)
+ sub[n] = va_arg(ap, char*);
+ }
va_end(ap);
+ if (k)
+ return 0;
if (regexec(&re->re, subject, SUB + 1, match, 0))
return 0;
for (n = 0; n < re->nsub; n++)
@@ -203,7 +216,7 @@ regex(const char* handle, const char* subject, ...)
{
i--;
k = match[i].rm_eo - match[i].rm_so;
- strncpy(sub[n], subject + match[i].rm_so, k);
+ strlcpy(sub[n], subject + match[i].rm_so, k);
*(sub[n] + k) = 0;
}
__loc1 = (char*)subject + match[0].rm_so;
diff --git a/usr/src/lib/libast/common/comp/regexp.c b/usr/src/contrib/ast/src/lib/libast/comp/regexp.c
index f28aeb58ab..d2e33a4841 100644
--- a/usr/src/lib/libast/common/comp/regexp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/regexp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/regexp.h b/usr/src/contrib/ast/src/lib/libast/comp/regexp.h
index c467310b9c..93b71858f2 100644
--- a/usr/src/lib/libast/common/comp/regexp.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/regexp.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/remove.c b/usr/src/contrib/ast/src/lib/libast/comp/remove.c
index b9a1589308..32a8e32348 100644
--- a/usr/src/lib/libast/common/comp/remove.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/remove.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/rename.c b/usr/src/contrib/ast/src/lib/libast/comp/rename.c
index c46c2389d5..2ab37705b3 100644
--- a/usr/src/lib/libast/common/comp/rename.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/rename.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/resolvepath.c b/usr/src/contrib/ast/src/lib/libast/comp/resolvepath.c
index 0c5d9eb3a2..a5cc4c9308 100644
--- a/usr/src/lib/libast/common/comp/resolvepath.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/resolvepath.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -33,6 +33,8 @@
#undef _def_map_ast
#include <ast_map.h>
+#undef _AST_API_H
+#include <ast_api.h>
#if defined(__EXPORT__)
#define extern __EXPORT__
@@ -65,6 +67,6 @@ resolvepath(const char* file, char* path, size_t size)
s = path + strlen(path);
*s++ = '/';
}
- strcpy(s, file);
- return pathcanon(path, PATH_PHYSICAL|PATH_DOTDOT|PATH_EXISTS) ? strlen(path) : -1;
+ strlcpy(s, file, size - (s - path));
+ return (s = pathcanon(path, size, PATH_PHYSICAL|PATH_DOTDOT|PATH_EXISTS)) ? (s - path) : -1;
}
diff --git a/usr/src/lib/libast/common/comp/rmdir.c b/usr/src/contrib/ast/src/lib/libast/comp/rmdir.c
index bf32bdcdb5..b27e60dee0 100644
--- a/usr/src/lib/libast/common/comp/rmdir.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/rmdir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -39,7 +39,7 @@ rmdir(const char* path)
struct stat st;
char* av[3];
- static char* cmd[] = { "/bin/rmdir", "/usr/5bin/rmdir", 0 };
+ static char* cmd[] = { "/bin/rmdir", 0 };
if (stat(path, &st) < 0) return(-1);
if (!S_ISDIR(st.st_mode))
diff --git a/usr/src/lib/libast/common/comp/setenv.c b/usr/src/contrib/ast/src/lib/libast/comp/setenv.c
index a703eb4f13..c2e3d65952 100644
--- a/usr/src/lib/libast/common/comp/setenv.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/setenv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/comp/setlocale.c b/usr/src/contrib/ast/src/lib/libast/comp/setlocale.c
new file mode 100644
index 0000000000..3d70e2f6fb
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/comp/setlocale.c
@@ -0,0 +1,2876 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+/*
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ */
+#pragma prototyped
+
+/*
+ * setlocale() intercept
+ * maintains a bitmask of non-default categories
+ * and a permanent locale namespace for pointer comparison
+ * and persistent private data for locale related functions
+ */
+
+#include <ast_standards.h>
+
+#include "lclib.h"
+
+#include <ast_wchar.h>
+#include <ctype.h>
+#include <mc.h>
+#include <namval.h>
+
+#if ( _lib_wcwidth || _lib_wctomb ) && _hdr_wctype
+#include <wctype.h>
+#endif
+
+#if _lib_wcwidth
+#undef wcwidth
+#else
+#define wcwidth 0
+#endif
+
+#if _lib_wctomb
+#undef wctomb
+#else
+#define wctomb 0
+#endif
+
+#ifdef mblen
+#undef mblen
+extern int mblen(const char*, size_t);
+#endif
+
+#undef mbtowc
+#undef setlocale
+#undef strcmp
+#undef strcoll
+#undef strxfrm
+#undef valid
+
+#ifndef AST_LC_CANONICAL
+#define AST_LC_CANONICAL LC_abbreviated
+#endif
+
+static void
+header(void)
+{
+ static int done = 0;
+
+ if (!done)
+ {
+ done = 1;
+ sfprintf(sfstderr, "locale %17s %16s %16s %16s %s\n", "CATEGORY", "AST", "SYSTEM", "PREVIOUS", "ATTRIBUTES");
+ }
+}
+
+#if _UWIN
+
+#include <ast_windows.h>
+
+#undef _lib_setlocale
+#define _lib_setlocale 1
+
+#define setlocale(c,l) native_setlocale(c,l)
+
+extern char* uwin_setlocale(int, const char*);
+
+/*
+ * convert locale to native locale name in buf
+ */
+
+static char*
+native_locale(const char* locale, char* buf, size_t siz)
+{
+ Lc_t* lc;
+ const Lc_attribute_list_t* ap;
+ int i;
+ unsigned long lcid;
+ unsigned long lang;
+ unsigned long ctry;
+ char lbuf[128];
+ char cbuf[128];
+
+ if (locale && *locale)
+ {
+ if (!(lc = lcmake(locale)))
+ return 0;
+ lang = lc->language->index;
+ ctry = 0;
+ for (ap = lc->attributes; ap; ap = ap->next)
+ if (ctry = ap->attribute->index)
+ break;
+ if (!ctry)
+ {
+ for (i = 0; i < elementsof(lc->territory->languages); i++)
+ if (lc->territory->languages[i] == lc->language)
+ {
+ ctry = lc->territory->indices[i];
+ break;
+ }
+ if (!ctry)
+ {
+ if (!lang)
+ return 0;
+ ctry = SUBLANG_DEFAULT;
+ }
+ }
+ lcid = MAKELCID(MAKELANGID(lang, ctry), SORT_DEFAULT);
+ }
+ else
+ lcid = GetUserDefaultLCID();
+ if (GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, lbuf, sizeof(lbuf)) <= 0 ||
+ GetLocaleInfo(lcid, LOCALE_SENGCOUNTRY, cbuf, sizeof(cbuf)) <= 0)
+ return 0;
+ if (lc->charset->ms)
+ sfsprintf(buf, siz, "%s_%s.%s", lbuf, cbuf, lc->charset->ms);
+ else
+ sfsprintf(buf, siz, "%s_%s", lbuf, cbuf);
+ return buf;
+}
+
+/*
+ * locale!=0 here
+ */
+
+static char*
+native_setlocale(int category, const char* locale)
+{
+ char* usr;
+ char* sys;
+ char buf[256];
+
+ if (!(usr = native_locale(locale, buf, sizeof(buf))))
+ return 0;
+
+ /*
+ * win32 doesn't have LC_MESSAGES
+ */
+
+ if (category == LC_MESSAGES)
+ return (char*)locale;
+ sys = uwin_setlocale(category, usr);
+ if (ast.locale.set & AST_LC_debug)
+ sfprintf(sfstderr, "locale uwin %17s %-24s %-24s\n", lc_categories[lcindex(category, 0)].name, usr, sys);
+ return sys;
+}
+
+#else
+
+#define native_locale(a,b,c) ((char*)0)
+
+#endif
+
+/*
+ * LC_COLLATE and LC_CTYPE native support
+ */
+
+#if !_lib_mbtowc || MB_LEN_MAX <= 1
+#define mblen 0
+#define mbtowc 0
+#endif
+
+#if !_lib_strcoll
+#define strcoll 0
+#endif
+
+#if !_lib_strxfrm
+#define strxfrm 0
+#endif
+
+/*
+ * LC_COLLATE and LC_CTYPE debug support
+ *
+ * mutibyte debug encoding
+ *
+ * DL0 [ '0' .. '4' ] c1 ... c4 DR0
+ * DL1 [ '0' .. '4' ] c1 ... c4 DR1
+ *
+ * with these ligatures
+ *
+ * ch CH sst SST
+ *
+ * and private collation order
+ *
+ * wide character display width is the low order 3 bits
+ * wctomb() uses DL1...DR1
+ */
+
+#define DEBUG_MB_CUR_MAX 7
+
+#if DEBUG_MB_CUR_MAX < MB_LEN_MAX
+#undef DEBUG_MB_CUR_MAX
+#define DEBUG_MB_CUR_MAX MB_LEN_MAX
+#endif
+
+#define DL0 '<'
+#define DL1 0xab /* 8-bit mini << on xterm */
+#define DR0 '>'
+#define DR1 0xbb /* 8-bit mini >> on xterm */
+
+#define DB ((int)sizeof(wchar_t)*8-1)
+#define DC 7 /* wchar_t embedded char bits */
+#define DX (DB/DC) /* wchar_t max embedded chars */
+#define DZ (DB-DX*DC+1) /* wchar_t embedded size bits */
+#define DD 3 /* # mb delimiter chars <n...> */
+
+static unsigned char debug_order[] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31,
+ 99, 100, 101, 102, 98, 103, 104, 105,
+ 106, 107, 108, 43, 109, 44, 42, 110,
+ 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 111, 112, 113, 114, 115, 116,
+ 117, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85,
+ 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 118, 119, 120, 121, 97,
+ 122, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 123, 124, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255,
+};
+
+static int
+debug_mbtowc(register wchar_t* p, register const char* s, size_t n)
+{
+ register const char* q;
+ register const char* r;
+ register int w;
+ register int dr;
+ wchar_t c;
+
+ if (n < 1)
+ return -1;
+ if (!s || !*s)
+ return 0;
+ switch (((unsigned char*)s)[0])
+ {
+ case DL0:
+ dr = DR0;
+ break;
+ case DL1:
+ dr = DR1;
+ break;
+ default:
+ single:
+ if (p)
+ *p = ((unsigned char*)s)[0] & ((1<<DC)-1);
+ return 1;
+ }
+ if (n < 2)
+ return -1;
+ if ((w = ((unsigned char*)s)[1]) < '0' || w > ('0' + DX))
+ goto single;
+ if ((w -= '0' - DD) > n)
+ return -1;
+ r = s + w - 1;
+ q = s += 2;
+ while (q < r && *q)
+ q++;
+ if (q != r || *((unsigned char*)q) != dr)
+ return -1;
+ if (p)
+ {
+ c = 1;
+ while (--q >= s)
+ {
+ c <<= DC;
+ c |= *((unsigned char*)q);
+ }
+ c <<= DZ;
+ c |= (w - DD);
+ *p = c;
+ }
+ return w;
+}
+
+static int
+debug_wctomb(char* s, wchar_t c)
+{
+ int w;
+ int i;
+ int k;
+
+ w = 0;
+ if (c >= 0 && c <= UCHAR_MAX)
+ {
+ w++;
+ if (s)
+ *s = c;
+ }
+ else if ((i = c & ((1<<DZ)-1)) > DX)
+ return -1;
+ else
+ {
+ w++;
+ if (s)
+ *s++ = DL0;
+ c >>= DZ;
+ w++;
+ if (s)
+ *s++ = i + '0';
+ while (i--)
+ {
+ w++;
+ if (s)
+ *s++ = (k = c & ((1<<DC)-1)) ? k : '?';
+ c >>= DC;
+ }
+ w++;
+ if (s)
+ *s++ = DR0;
+ }
+ return w;
+}
+
+static int
+debug_mblen(const char* s, size_t n)
+{
+ return debug_mbtowc(NiL, s, n);
+}
+
+static int
+debug_wcwidth(wchar_t c)
+{
+ if (c >= 0 && c <= UCHAR_MAX)
+ return 1;
+ if ((c &= ((1<<DZ)-1)) > DX)
+ return -1;
+ return c + DD;
+}
+
+static int
+debug_alpha(wchar_t c)
+{
+ return isalpha((c >> DZ) & ((1<<DC)-1));
+}
+
+static size_t
+debug_strxfrm(register char* t, register const char* s, size_t n)
+{
+ register const char* q;
+ register const char* r;
+ register char* e;
+ char* o;
+ register size_t z;
+ register int w;
+
+ o = t;
+ z = 0;
+ if (e = t)
+ e += n;
+ while (s[0])
+ {
+ if ((((unsigned char*)s)[0] == DL0 || ((unsigned char*)s)[0] == DL1) && (w = s[1]) >= '0' && w <= ('0' + DC))
+ {
+ w -= '0';
+ q = s + 2;
+ r = q + w;
+ while (q < r && *q)
+ q++;
+ if (*((unsigned char*)q) == DR0 || *((unsigned char*)q) == DR1)
+ {
+ if (t)
+ {
+ for (q = s + 2; q < r; q++)
+ if (t < e)
+ *t++ = debug_order[*q];
+ while (w++ < DX)
+ if (t < e)
+ *t++ = 1;
+ }
+ s = r + 1;
+ z += DX;
+ continue;
+ }
+ }
+ if ((s[0] == 'c' || s[0] == 'C') && (s[1] == 'h' || s[1] == 'H'))
+ {
+ if (t)
+ {
+ if (t < e)
+ *t++ = debug_order[s[0]];
+ if (t < e)
+ *t++ = debug_order[s[1]];
+ if (t < e)
+ *t++ = 1;
+ if (t < e)
+ *t++ = 1;
+ }
+ s += 2;
+ z += DX;
+ continue;
+ }
+ if ((s[0] == 's' || s[0] == 'S') && (s[1] == 's' || s[1] == 'S') && (s[2] == 't' || s[2] == 'T'))
+ {
+ if (t)
+ {
+ if (t < e)
+ *t++ = debug_order[s[0]];
+ if (t < e)
+ *t++ = debug_order[s[1]];
+ if (t < e)
+ *t++ = debug_order[s[2]];
+ if (t < e)
+ *t++ = 1;
+ }
+ s += 3;
+ z += DX;
+ continue;
+ }
+ if (t)
+ {
+ if (t < e)
+ *t++ = debug_order[s[0]];
+ if (t < e)
+ *t++ = 1;
+ if (t < e)
+ *t++ = 1;
+ if (t < e)
+ *t++ = 1;
+ }
+ s++;
+ z += DX;
+ }
+ if (!t)
+ return z;
+ if (t < e)
+ *t = 0;
+ return t - o;
+}
+
+static int
+debug_strcoll(const char* a, const char* b)
+{
+ char ab[1024];
+ char bb[1024];
+
+ debug_strxfrm(ab, a, sizeof(ab) - 1);
+ ab[sizeof(ab)-1] = 0;
+ debug_strxfrm(bb, b, sizeof(bb) - 1);
+ bb[sizeof(bb)-1] = 0;
+ return strcmp(ab, bb);
+}
+
+/*
+ * default locale
+ */
+
+static int
+default_wcwidth(wchar_t w)
+{
+ return w >= 0 && w <= 255 && !iscntrl(w) ? 1 : -1;
+}
+
+/*
+ * called when LC_COLLATE initialized or changes
+ */
+
+static int
+set_collate(Lc_category_t* cp)
+{
+ if (locales[cp->internal]->flags & LC_debug)
+ {
+ ast.collate = debug_strcoll;
+ ast.mb_xfrm = debug_strxfrm;
+ }
+ else if (locales[cp->internal]->flags & LC_default)
+ {
+ ast.collate = strcmp;
+ ast.mb_xfrm = 0;
+ }
+ else
+ {
+ ast.collate = strcoll;
+ ast.mb_xfrm = strxfrm;
+ }
+ return 0;
+}
+
+/*
+ * workaround the interesting sjis that translates unshifted 7 bit ascii!
+ */
+
+#if _hdr_wchar && _typ_mbstate_t && _lib_mbrtowc
+
+#define mb_state_zero ((mbstate_t*)&ast.pad[sizeof(ast.pad)-2*sizeof(mbstate_t)])
+#define mb_state ((mbstate_t*)&ast.pad[sizeof(ast.pad)-sizeof(mbstate_t)])
+
+static int
+sjis_mbtowc(register wchar_t* p, register const char* s, size_t n)
+{
+ if (n && p && s && (*s == '\\' || *s == '~') && !memcmp(mb_state, mb_state_zero, sizeof(mbstate_t)))
+ {
+ *p = *s;
+ return 1;
+ }
+ return mbrtowc(p, s, n, mb_state);
+}
+
+#endif
+
+#if 0
+
+#define utf8_wctomb wctomb
+
+#else
+
+static int
+utf8_wctomb(char* u, wchar_t w)
+{
+ return u ? wc2utf8(u, w) : 0;
+}
+
+#endif
+
+static const uint32_t utf8mask[] =
+{
+ 0x00000000,
+ 0x00000000,
+ 0xffffff80,
+ 0xfffff800,
+ 0xffff0000,
+ 0xffe00000,
+ 0xfc000000,
+};
+
+static const signed char utf8tab[256] =
+{
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6,-1,-1,
+};
+
+static int
+utf8_mbtowc(wchar_t* wp, const char* str, size_t n)
+{
+ register unsigned char* sp = (unsigned char*)str;
+ register int m;
+ register int i;
+ register int c;
+ register wchar_t w = 0;
+
+ if (!sp)
+ {
+ if(!wp)
+ ast.mb_sync = 0;
+ return 0;
+ }
+ if(!n)
+ return 0;
+ if ((m = utf8tab[*sp]) > 0)
+ {
+ if (m > n)
+ return -1;
+ if (wp)
+ {
+ if (m == 1)
+ {
+ *wp = *sp;
+ return 1;
+ }
+ w = *sp & ((1<<(8-m))-1);
+ for (i = m - 1; i > 0; i--)
+ {
+ c = *++sp;
+ if ((c&0xc0) != 0x80)
+ goto invalid;
+ w = (w<<6) | (c&0x3f);
+ }
+ if (!(utf8mask[m] & w) || w >= 0xd800 && (w <= 0xdfff || w >= 0xfffe && w <= 0xffff))
+ goto invalid;
+ *wp = w;
+ }
+ return m;
+ }
+ if (!*sp)
+ return 0;
+ invalid:
+#ifdef EILSEQ
+ errno = EILSEQ;
+#endif
+ ast.mb_sync = (const char*)sp - str;
+ return -1;
+}
+
+static int
+utf8_mblen(const char* str, size_t n)
+{
+ wchar_t w;
+
+ return utf8_mbtowc(&w, str, n);
+}
+
+static const unsigned char utf8_wcw[] =
+{
+ 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0x55,0x55,0x55,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0xff,0xff,0xff,0xff,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xf5,0xdf,0xdf,
+ 0xff,0x55,0xd5,0x5d,0x55,0x55,0x55,0x55,0x75,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0xd5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x15,0xc0,0x50,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0xd5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0xf5,0xff,
+ 0x55,0x55,0x55,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0xd5,0x57,0x55,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0xd7,0xff,0x03,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x30,0x10,
+ 0x41,0xfc,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0xff,0x55,0xfd,0xff,0xff,
+ 0xff,0xff,0xff,0xfd,0xff,0xff,0x7f,0x7f,0x57,0x55,0x55,0x55,0x55,0x55,0xd5,0xff,
+ 0x55,0x55,0x15,0x00,0x00,0xf0,0xff,0xff,0x55,0x55,0x55,0x55,0x54,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x05,0x00,0x00,0x00,0x14,0x04,0xf0,0x55,0x55,0x55,0xd5,
+ 0x55,0x55,0x55,0x35,0x51,0x55,0x55,0x55,0x55,0x55,0x55,0xfd,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x05,0x00,0x00,0xf4,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x43,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0x54,
+ 0x01,0x00,0x54,0xf1,0x01,0xfc,0x55,0x55,0x05,0x55,0x55,0x55,0xfd,0xff,0xff,0xff,
+ 0x53,0x57,0x55,0x7d,0x7d,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0xdd,0x5f,0xf5,0x5c,
+ 0x01,0x7c,0x7d,0xf1,0xff,0x7f,0xff,0x75,0x05,0x5f,0x55,0x55,0x55,0x55,0xd5,0xff,
+ 0xcf,0x57,0xd5,0x7f,0x7d,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0x5d,0xd7,0xf5,0x5c,
+ 0xc1,0x3f,0x3c,0xf0,0xff,0xff,0x57,0xdd,0xff,0x5f,0x55,0x55,0x50,0xfd,0xff,0xff,
+ 0x43,0x57,0x55,0x77,0x75,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0x5d,0x57,0xf5,0x54,
+ 0x01,0x30,0x74,0xf1,0xfd,0xff,0xff,0xff,0xfd,0x5f,0x55,0x55,0xff,0xff,0xff,0xff,
+ 0x53,0x57,0x55,0x7d,0x7d,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0x5d,0x5f,0xf5,0x14,
+ 0x01,0x7f,0x7d,0xf1,0xff,0x4f,0xff,0x75,0xf5,0x5f,0x55,0x55,0xfd,0xff,0xff,0xff,
+ 0x4f,0x57,0xd5,0x5f,0x5d,0xf5,0xd7,0x5d,0x7f,0xfd,0xd5,0x5f,0x55,0x75,0xf5,0x5f,
+ 0xd4,0x5f,0x5d,0xf1,0xff,0x7f,0xff,0xff,0xff,0x7f,0x55,0x55,0xd5,0xff,0xff,0xff,
+ 0x57,0x57,0x55,0x5d,0x5d,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0x55,0x57,0xf5,0x0f,
+ 0x54,0x0d,0x0c,0xf0,0xff,0xc3,0xff,0xff,0xf5,0x5f,0x55,0x55,0xff,0xff,0xff,0xff,
+ 0x5f,0x57,0x55,0x5d,0x5d,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0x55,0x57,0xf5,0x1f,
+ 0x55,0x4d,0x5d,0xf0,0xff,0xd7,0xff,0xdf,0xf5,0x5f,0x55,0x55,0xff,0xff,0xff,0xff,
+ 0x5f,0x57,0x55,0x5d,0x5d,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0x55,0x55,0xf5,0x5f,
+ 0x01,0x5f,0x5d,0xf1,0xff,0x7f,0xff,0xff,0xf5,0x5f,0x55,0x55,0xff,0xff,0xff,0xff,
+ 0x5f,0x57,0x55,0x55,0x55,0xd5,0x5f,0x55,0x55,0x55,0x55,0x55,0x75,0x55,0x55,0xf7,
+ 0x55,0xd5,0xcf,0x7f,0x05,0xcc,0x55,0x55,0xff,0xff,0xff,0xff,0x5f,0xfd,0xff,0xff,
+ 0x57,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x51,0x00,0xc0,0x7f,
+ 0x55,0x15,0x00,0x40,0x55,0x55,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xd7,0x7d,0xdd,0xf7,0xff,0x55,0x57,0x55,0x57,0x77,0x5f,0x57,0x51,0x00,0x30,0xf4,
+ 0x55,0xdd,0x00,0xf0,0x55,0x55,0xf5,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x50,0x55,0x55,0x55,0x55,0x55,0x55,0x11,0x51,0x55,
+ 0x55,0x55,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0xff,0x03,0x00,0x00,0x40,
+ 0x00,0x04,0x55,0xff,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5c,
+ 0x55,0x45,0x55,0x7d,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x75,0x55,0xd7,0x01,0xc4,0x0f,0xf1,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0xf5,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x7d,0xff,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xfa,0xbf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xff,
+ 0x55,0xd5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0xd5,0x5d,0xf5,0x55,0xd5,0x5d,0xf5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0xd5,0x5d,0xf5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0x5d,0xf5,0x55,0xd5,
+ 0x5d,0xf5,0x55,0xd5,0x55,0xd5,0x55,0x55,0x55,0x55,0x55,0xd5,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0xd5,0x5d,0xf5,0x55,0xd5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0xd5,0x55,0x55,0x55,0x55,0xd5,0xff,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0xfd,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xfd,0xff,0xff,
+ 0x57,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xfd,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xfd,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x5d,0x05,0xfc,0xff,0xff,0x55,0x55,0x55,0x55,0x05,0xd4,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x05,0xff,0xff,0xff,0x55,0x55,0x55,0x5d,0x0d,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x15,0x00,0x50,
+ 0x55,0x45,0x01,0x00,0x00,0x55,0x55,0xfd,0x55,0x55,0xf5,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0x15,0xc0,0x55,0x55,0xf5,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf1,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0xf5,0x55,0xf5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0xf5,0x55,0xf5,0x55,0x55,0x77,0x77,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x5d,0x55,0x55,
+ 0x55,0x5d,0x55,0x55,0x55,0x5f,0x55,0x57,0x55,0x55,0x55,0x55,0x5f,0x5d,0x55,0xd5,
+ 0x55,0x55,0x15,0x00,0x55,0x55,0x55,0x55,0x55,0x55,0x0f,0x40,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0xd5,0x7f,0xff,0x7f,0x00,0xff,0x0f,0x00,0xf5,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0xd5,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0xf5,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0x57,
+ 0x55,0x55,0x55,0xff,0x7f,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x69,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0xd5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0xd5,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x5f,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,
+ 0x55,0x55,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x57,0x5d,0xf5,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x57,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x77,0xd5,0xdf,0x55,0xd5,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0xfd,0x55,0x55,0x55,0x55,0x55,0x55,0x57,0x55,0x55,0xd5,
+ 0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xff,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xba,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xff,0xff,0xff,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xaa,0xaa,0xaa,0xff,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0x0a,0x00,0xaa,0xaa,0xaa,0x6a,
+ 0xab,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xea,0x83,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xff,0xab,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xfe,0xab,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xea,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xfe,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xff,0xff,0xff,0xab,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xbf,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xff,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xea,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xea,0xbf,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xfa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xea,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xfa,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xfe,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x00,0x00,0x00,0x00,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xfa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xea,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x55,0xd5,0xff,0xff,0x7f,0x55,0xff,0x47,0x55,0x55,0x55,0x55,0x55,0xd5,0x55,0xdd,
+ 0x75,0x5d,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xf5,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x7f,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0xff,0xff,0xff,0xff,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x5f,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x55,0x55,0xfd,
+ 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xea,0xab,0xaa,0xea,0xaa,0xaa,0xaa,0xaa,0xea,0xaa,0xff,0x55,0x5d,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x3d,
+ 0xab,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+ 0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0x56,0x55,0x55,0x55,0x55,0x55,0x55,0x55,
+ 0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0xd5,
+ 0x5f,0x55,0x5f,0x55,0x5f,0x55,0x5f,0xfd,0xaa,0xea,0x55,0xd5,0xff,0xff,0x03,0xf5
+};
+
+static int
+utf8_wcwidth(wchar_t c)
+{
+ int n;
+
+ return (n = (utf8_wcw[(c >> 2) & 0x3fff] >> ((c & 0x3) << 1)) & 0x3) == 3 ? -1 : n;
+}
+
+static const unsigned char utf8_wam[] =
+{
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,0xfe,0xff,0xff,0x07,
+ 0x00,0x00,0x00,0x00,0x00,0x04,0x20,0x04,0xff,0xff,0x7f,0xff,0xff,0xff,0x7f,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xfd,0xff,0x0f,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xf9,0x03,0x00,0x03,0x00,0x1f,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
+ 0x40,0xd7,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x3f,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0x03,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x3f,0x03,
+ 0xff,0xff,0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x7f,0x02,0xfe,0xff,0xff,0xff,
+ 0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x07,0x07,0x00,
+ 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,0xff,0x07,0x00,0x00,0xff,0xc3,0xfe,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0x00,0x60,0x00,0xff,0x1f,
+ 0x00,0x00,0xfd,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xff,0xff,0xff,0xff,0x3f,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0x23,0x00,0x00,0x01,0xff,0xc3,0xff,0x00,0x00,
+ 0xe0,0x9f,0xf9,0xff,0xff,0xfd,0xc5,0x03,0x00,0x00,0x00,0xb0,0xc3,0xff,0x03,0x00,
+ 0xe0,0x87,0xf9,0xff,0xff,0xfd,0x6d,0x03,0x00,0x00,0x00,0x5e,0xc0,0xff,0x1c,0x00,
+ 0xe0,0xaf,0xfb,0xff,0xff,0xfd,0xed,0x23,0x00,0x00,0x01,0x00,0xc1,0xff,0x00,0x00,
+ 0xe0,0x9f,0xf9,0xff,0xff,0xfd,0xcd,0x23,0x00,0x00,0x00,0xb0,0xc3,0xff,0x00,0x00,
+ 0xe8,0xc7,0x3d,0xd6,0x18,0xc7,0xbf,0x03,0x00,0x00,0x00,0x00,0x80,0xff,0x00,0x00,
+ 0xe0,0xdf,0xfd,0xff,0xff,0xfd,0xef,0x03,0x00,0x00,0x00,0x00,0xc3,0xff,0x00,0x00,
+ 0xe0,0xdf,0xfd,0xff,0xff,0xfd,0xef,0x03,0x00,0x00,0x00,0x40,0xc3,0xff,0x00,0x00,
+ 0xe0,0xdf,0xfd,0xff,0xff,0xfd,0xff,0x03,0x00,0x00,0x00,0x00,0xc3,0xff,0x00,0x00,
+ 0xe0,0xff,0x7f,0xfc,0xff,0xff,0xfb,0x2f,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xfe,0xff,0xff,0xff,0xff,0x7f,0xff,0x07,0xbf,0x7f,0xff,0x03,0x00,0x00,0x00,0x00,
+ 0x96,0x25,0xf0,0xfe,0xae,0xec,0x0d,0x20,0x5f,0x00,0xff,0x33,0x00,0x00,0x00,0x00,
+ 0x01,0x00,0x00,0x00,0xff,0x03,0x00,0x00,0xff,0xfe,0xff,0xff,0xff,0x07,0x00,0x00,
+ 0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xff,0xff,0xff,0xff,0xfb,0x06,0x00,0x00,0xff,0x03,0x3f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x3f,0x00,0xff,0xff,0xff,0xff,0xff,0x01,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x83,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x07,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,
+ 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x3d,0x7f,0x3d,0xff,0xff,0xff,0xff,
+ 0x7f,0x3d,0xff,0xff,0xff,0x7f,0x3d,0x7f,0x3d,0x7f,0x7f,0xff,0xff,0x7f,0xff,0xff,
+ 0xff,0x7f,0x3d,0x7f,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0x07,0x00,0xfe,0x03,0x00,
+ 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,
+ 0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0x7f,0x00,
+ 0xfe,0xff,0xff,0x07,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc7,0x01,0x00,
+ 0xff,0xdf,0x03,0x00,0xff,0xff,0x03,0x00,0xff,0xff,0x03,0x00,0xff,0xdf,0x01,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x80,0x10,0xff,0x03,0x00,0x00,
+ 0x00,0x00,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,
+ 0xff,0xff,0x3f,0x3f,0xff,0xff,0xff,0xff,0x3f,0x3f,0xff,0xaa,0xff,0xff,0xff,0x3f,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0x5f,0xdc,0x1f,0xcf,0x0f,0xff,0x1f,0xdc,0x1f,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x80,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x84,0xfc,0x2f,0x3e,0x50,0xbf,0xfb,0xe3,0xe0,0x03,0x00,0x00,0xff,0xff,0xff,0xff,
+ 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xe0,0x00,0x00,0x00,0xfe,0x03,0x3e,0x1f,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0x7f,0xe0,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,
+ 0xe0,0xff,0xff,0xff,0xff,0x1f,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0x7f,0x00,0x00,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x7f,0x00,0xf8,0xa0,0xff,0xfd,0x7f,0x5f,0xdb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0xff,0x0f,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdf,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,
+ 0x00,0x00,0xff,0x03,0xfe,0xff,0xff,0x07,0xfe,0xff,0xff,0x07,0xc0,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfc,0xfc,0xfc,0x1c,0x00,0x00,0x00,0x00
+};
+
+static int
+utf8_alpha(wchar_t c)
+{
+ return !!(utf8_wam[(c >> 3) & 0x1fff] & (1 << (c & 0x7)));
+}
+
+#if !_hdr_wchar || !_lib_wctype || !_lib_iswctype
+#undef iswalpha
+#define iswalpha default_iswalpha
+static int
+iswalpha(wchar_t c)
+{
+ return c <= 0x7f ? isalpha(c) : 0;
+}
+#endif
+
+typedef int (*Isw_f)(wchar_t);
+
+static int
+wide_wctomb(char* u, wchar_t w)
+{
+ int size = 0;
+
+ if (u)
+ {
+ size = wctomb(u, w);
+ if (size < 0)
+ {
+ *u = (char)(w & 0xff);
+ size = 1;
+ }
+ }
+
+ return size;
+}
+
+/*
+ * called when LC_CTYPE initialized or changes
+ */
+
+static int
+set_ctype(Lc_category_t* cp)
+{
+ ast.mb_sync = 0;
+ ast.mb_alpha = (Isw_f)iswalpha;
+#if AHA
+ if ((ast.locale.set & (AST_LC_debug|AST_LC_setlocale)) && !(ast.locale.set & AST_LC_internal))
+ sfprintf(sfstderr, "locale setf %17s %16s\n", cp->name, locales[cp->internal]->name);
+#endif
+ if (locales[cp->internal]->flags & LC_debug)
+ {
+ ast.mb_cur_max = DEBUG_MB_CUR_MAX;
+ ast.mb_len = debug_mblen;
+ ast.mb_towc = debug_mbtowc;
+ ast.mb_width = debug_wcwidth;
+ ast.mb_conv = debug_wctomb;
+ ast.mb_alpha = debug_alpha;
+ }
+ else if ((locales[cp->internal]->flags & LC_utf8) && !(ast.locale.set & AST_LC_test))
+ {
+ ast.mb_cur_max = 6;
+ ast.mb_len = utf8_mblen;
+ ast.mb_towc = utf8_mbtowc;
+ if ((locales[cp->internal]->flags & LC_local) || !(ast.mb_width = wcwidth))
+ ast.mb_width = utf8_wcwidth;
+ ast.mb_conv = utf8_wctomb;
+ ast.mb_alpha = utf8_alpha;
+ }
+ else if ((locales[cp->internal]->flags & LC_default) || (ast.mb_cur_max = MB_CUR_MAX) <= 1 || !(ast.mb_len = mblen) || !(ast.mb_towc = mbtowc))
+ {
+ ast.mb_cur_max = 1;
+ ast.mb_len = 0;
+ ast.mb_towc = 0;
+ ast.mb_width = default_wcwidth;
+ ast.mb_conv = 0;
+ }
+ else
+ {
+ if (!(ast.mb_width = wcwidth))
+ ast.mb_width = default_wcwidth;
+ ast.mb_conv = wide_wctomb;
+#ifdef mb_state
+ {
+ /*
+ * check for sjis that translates unshifted 7 bit ascii!
+ */
+
+ char* s;
+ char buf[2];
+
+ mbinit();
+ buf[1] = 0;
+ *(s = buf) = '\\';
+ if (mbchar(s) != buf[0])
+ {
+ memcpy(mb_state, mb_state_zero, sizeof(mbstate_t));
+ ast.mb_towc = sjis_mbtowc;
+ }
+ }
+#endif
+ }
+ return 0;
+}
+
+/*
+ * called when LC_NUMERIC initialized or changes
+ */
+
+static int
+set_numeric(Lc_category_t* cp)
+{
+ register int category = cp->internal;
+ struct lconv* lp;
+ Lc_numeric_t* dp;
+
+ static Lc_numeric_t default_numeric = { '.', -1 };
+ static Lc_numeric_t eu_numeric = { ',', '.' };
+ static Lc_numeric_t us_numeric = { '.', ',' };
+
+#if AHA
+ if ((ast.locale.set & (AST_LC_debug|AST_LC_setlocale)) && !(ast.locale.set & AST_LC_internal))
+ sfprintf(sfstderr, "locale setf %17s %16s\n", cp->name, locales[cp->internal]->name);
+#endif
+ if (!LCINFO(category)->data)
+ {
+ if (locales[cp->internal]->flags & LC_local)
+ dp = locales[cp->internal]->territory == &lc_territories[0] ? &default_numeric : *locales[cp->internal]->territory->code == 'e' ? &eu_numeric : &us_numeric;
+ else if ((lp = localeconv()) && (dp = newof(0, Lc_numeric_t, 1, 0)))
+ {
+ dp->decimal = lp->decimal_point && *lp->decimal_point ? *(unsigned char*)lp->decimal_point : '.';
+ dp->thousand = lp->thousands_sep && *lp->thousands_sep ? *(unsigned char*)lp->thousands_sep : -1;
+ }
+ else
+ dp = &default_numeric;
+ LCINFO(category)->data = (void*)dp;
+ }
+ return 0;
+}
+
+/*
+ * this table is indexed by AST_LC_[A-Z]*
+ */
+
+Lc_category_t lc_categories[] =
+{
+{ "LC_ALL", LC_ALL, AST_LC_ALL, 0 },
+{ "LC_COLLATE", LC_COLLATE, AST_LC_COLLATE, set_collate },
+{ "LC_CTYPE", LC_CTYPE, AST_LC_CTYPE, set_ctype },
+{ "LC_MESSAGES", LC_MESSAGES, AST_LC_MESSAGES, 0 },
+{ "LC_MONETARY", LC_MONETARY, AST_LC_MONETARY, 0 },
+{ "LC_NUMERIC", LC_NUMERIC, AST_LC_NUMERIC, set_numeric },
+{ "LC_TIME", LC_TIME, AST_LC_TIME, 0 },
+{ "LC_IDENTIFICATION",LC_IDENTIFICATION,AST_LC_IDENTIFICATION,0 },
+{ "LC_ADDRESS", LC_ADDRESS, AST_LC_ADDRESS, 0 },
+{ "LC_NAME", LC_NAME, AST_LC_NAME, 0 },
+{ "LC_TELEPHONE", LC_TELEPHONE, AST_LC_TELEPHONE, 0 },
+{ "LC_XLITERATE", LC_XLITERATE, AST_LC_XLITERATE, 0 },
+{ "LC_MEASUREMENT", LC_MEASUREMENT, AST_LC_MEASUREMENT, 0 },
+{ "LC_PAPER", LC_PAPER, AST_LC_PAPER, 0 },
+};
+
+static Lc_t* lang;
+static Lc_t* lc_all;
+
+typedef struct Unamval_s
+{
+ char* name;
+ unsigned int value;
+} Unamval_t;
+
+static const Unamval_t options[] =
+{
+ "debug", AST_LC_debug,
+ "find", AST_LC_find,
+ "setlocale", AST_LC_setlocale,
+ "test", AST_LC_test,
+ "translate", AST_LC_translate,
+ 0, 0
+};
+
+/*
+ * called by stropt() to set options
+ */
+
+static int
+setopt(void* a, const void* p, int n, const char* v)
+{
+ if (p)
+ {
+ if (n)
+ ast.locale.set |= ((Unamval_t*)p)->value;
+ else
+ ast.locale.set &= ~((Unamval_t*)p)->value;
+ }
+ return 0;
+}
+
+#if !_lib_setlocale
+
+#define setlocale(c,l) default_setlocale(c,l)
+
+static char*
+default_setlocale(int category, const char* locale)
+{
+ Lc_t* lc;
+
+ if (locale)
+ {
+ if (!(lc = lcmake(locale)) || !(lc->flags & LC_default))
+ return 0;
+ locales[0]->flags &= ~lc->flags;
+ locales[1]->flags &= ~lc->flags;
+ return lc->name;
+ }
+ return (locales[1]->flags & (1<<category)) ? locales[1]->name : locales[0]->name;
+}
+
+#endif
+
+#if !_UWIN
+
+/*
+ * workaround for systems that shall not be named (solaris,freebsd)
+ * the call free() with addresses that look like the came from the stack
+ */
+
+extern int _vmkeep(int);
+
+static char*
+_sys_setlocale(int category, const char* locale)
+{
+ char* r;
+ int k;
+
+ k = _vmkeep(1);
+ r = setlocale(category, locale);
+ (void)_vmkeep(k);
+ return r;
+}
+
+#define setlocale(a,b) _sys_setlocale(a,b)
+
+#endif
+
+/*
+ * set a single AST_LC_* locale category
+ * the caller must validate category
+ * lc==0 restores the previous state
+ */
+
+static char*
+single(int category, Lc_t* lc, unsigned int flags)
+{
+ const char* sys;
+ int i;
+
+#if AHA
+ if ((ast.locale.set & (AST_LC_debug|AST_LC_setlocale)) && !(ast.locale.set & AST_LC_internal))
+ sfprintf(sfstderr, "locale single %16s %16s flags %04x\n", lc_categories[category].name, lc ? lc->name : 0, flags);
+#endif
+ if (flags & (LC_setenv|LC_setlocale))
+ {
+ if (!(ast.locale.set & AST_LC_internal))
+ lc_categories[category].prev = lc;
+ if ((flags & LC_setenv) && lc_all && locales[category])
+ {
+ if (lc_categories[category].setf)
+ (*lc_categories[category].setf)(&lc_categories[category]);
+ return (char*)locales[category]->name;
+ }
+ }
+ if (!lc && (!(lc_categories[category].flags & LC_setlocale) || !(lc = lc_categories[category].prev)) && !(lc = lc_all) && !(lc = lc_categories[category].prev) && !(lc = lang))
+ lc = lcmake(NiL);
+ sys = 0;
+ if (locales[category] != lc)
+ {
+ if (lc_categories[category].external == -lc_categories[category].internal)
+ {
+ for (i = 1; i < AST_LC_COUNT; i++)
+ if (locales[i] == lc)
+ {
+ sys = (char*)lc->name;
+ break;
+ }
+ }
+ else if (lc->flags & (LC_debug|LC_local))
+ sys = setlocale(lc_categories[category].external, lcmake(NiL)->name);
+ else if (!(sys = setlocale(lc_categories[category].external, lc->name)) &&
+ (streq(lc->name, lc->code) || !(sys = setlocale(lc_categories[category].external, lc->code))) &&
+ !streq(lc->code, lc->language->code))
+ sys = setlocale(lc_categories[category].external, lc->language->code);
+ if (sys)
+ lc->flags |= LC_checked;
+ else
+ {
+ /*
+ * check for local override
+ * currently this means an LC_MESSAGES dir exists
+ */
+
+ if (!(lc->flags & LC_checked))
+ {
+ char path[PATH_MAX];
+
+ if (mcfind(lc->code, NiL, LC_MESSAGES, 0, path, sizeof(path)))
+ lc->flags |= LC_local;
+ lc->flags |= LC_checked;
+ }
+ if (!(lc->flags & LC_local))
+ return 0;
+ if (lc_categories[category].external != -lc_categories[category].internal)
+ setlocale(lc_categories[category].external, lcmake(NiL)->name);
+ }
+ locales[category] = lc;
+ if (lc_categories[category].setf && (*lc_categories[category].setf)(&lc_categories[category]))
+ {
+ locales[category] = lc_categories[category].prev;
+ return 0;
+ }
+ if ((lc->flags & LC_default) || category == AST_LC_MESSAGES && lc->name[0] == 'e' && lc->name[1] == 'n' && (lc->name[2] == 0 || lc->name[2] == '_' && lc->name[3] == 'U'))
+ ast.locale.set &= ~(1<<category);
+ else
+ ast.locale.set |= (1<<category);
+
+ }
+ else if (lc_categories[category].flags ^ flags)
+ {
+ lc_categories[category].flags &= ~(LC_setenv|LC_setlocale);
+ lc_categories[category].flags |= flags;
+ }
+ else
+ {
+ if (lc_categories[category].setf)
+ (*lc_categories[category].setf)(&lc_categories[category]);
+ return (char*)lc->name;
+ }
+ if ((ast.locale.set & (AST_LC_debug|AST_LC_setlocale)) && !(ast.locale.set & AST_LC_internal))
+ {
+ header();
+ sfprintf(sfstderr, "locale set %17s %16s %16s %16s", lc_categories[category].name, lc->name, sys, lc_categories[category].prev ? lc_categories[category].prev->name : NiL);
+ if (category == AST_LC_CTYPE)
+ sfprintf(sfstderr, " MB_CUR_MAX=%d%s%s%s%s%s"
+ , ast.mb_cur_max
+ , ast.mb_len == debug_mblen ? " debug_mblen" : ast.mb_len == utf8_mblen ? " utf8_mblen" : ast.mb_len == mblen ? " mblen" : ""
+ , ast.mb_towc == debug_mbtowc ? " debug_mbtowc" : ast.mb_towc == utf8_mbtowc ? " utf8_mbtowc" : ast.mb_towc == mbtowc ? " mbtowc"
+#ifdef mb_state
+ : ast.mb_towc == sjis_mbtowc ? " sjis_mbtowc"
+#endif
+ : ""
+ , ast.mb_width == debug_wcwidth ? " debug_wcwidth" : ast.mb_width == utf8_wcwidth ? " utf8_wcwidth" : ast.mb_width == wcwidth ? " wcwidth" : ast.mb_width == default_wcwidth ? " default_wcwidth" : ""
+ , ast.mb_conv == debug_wctomb ? " debug_wctomb" : ast.mb_conv == utf8_wctomb ? " utf8_wctomb" : ast.mb_conv == wctomb ? " wctomb" : ""
+ , ast.mb_alpha == debug_alpha ? " debug_alpha" : ast.mb_alpha == utf8_alpha ? " utf8_alpha" : ast.mb_alpha == (Isw_f)iswalpha ? " iswalpha" : ""
+ );
+ else if (category == AST_LC_NUMERIC)
+ {
+ Lc_numeric_t* dp = (Lc_numeric_t*)LCINFO(category)->data;
+
+ sfprintf(sfstderr, " decimal='%c' thousands='%c'", dp->decimal, dp->thousand >= 0 ? dp->thousand : 'X');
+ }
+ if ((locales[category]->flags | lc_categories[category].flags) & LC_default)
+ sfprintf(sfstderr, " default");
+ if ((locales[category]->flags | lc_categories[category].flags) & LC_local)
+ sfprintf(sfstderr, " local");
+ if ((locales[category]->flags | lc_categories[category].flags) & LC_setlocale)
+ sfprintf(sfstderr, " setlocale");
+ if ((locales[category]->flags | lc_categories[category].flags) & LC_setenv)
+ sfprintf(sfstderr, " setenv");
+ sfprintf(sfstderr, "\n");
+ }
+ return (char*)lc->name;
+}
+
+/*
+ * set composite AST_LC_ALL locale categories
+ * return <0:composite-error 0:not-composite >0:composite-ok
+ */
+
+static int
+composite(register const char* s, int initialize)
+{
+ register const char* t;
+ register int i;
+ register int j;
+ register int k;
+ int n;
+ int m;
+ const char* w;
+ Lc_t* p;
+ int cat[AST_LC_COUNT];
+ int stk[AST_LC_COUNT];
+ char buf[PATH_MAX / 2];
+
+ k = n = 0;
+ while (s[0] == 'L' && s[1] == 'C' && s[2] == '_')
+ {
+ n++;
+ j = 0;
+ w = s;
+ for (i = 1; i < AST_LC_COUNT; i++)
+ {
+ s = w;
+ t = lc_categories[i].name;
+ while (*t && *s++ == *t++);
+ if (!*t && *s++ == '=')
+ {
+ cat[j++] = i;
+ if (s[0] != 'L' || s[1] != 'C' || s[2] != '_')
+ break;
+ w = s;
+ i = -1;
+ }
+ }
+ for (s = w; *s && *s != '='; s++);
+ if (!*s)
+ {
+ for (i = 0; i < k; i++)
+ single(stk[i], NiL, 0);
+ return -1;
+ }
+ w = ++s;
+ for (;;)
+ {
+ if (!*s)
+ {
+ p = lcmake(w);
+ break;
+ }
+ else if (*s++ == ';')
+ {
+ if ((m = s - w - 1) >= sizeof(buf))
+ m = sizeof(buf) - 1;
+ memcpy(buf, w, m);
+ buf[m] = 0;
+ p = lcmake(buf);
+ break;
+ }
+ }
+ for (i = 0; i < j; i++)
+ if (!initialize)
+ {
+ if (!single(cat[i], p, 0))
+ {
+ for (i = 0; i < k; i++)
+ single(stk[i], NiL, 0);
+ return -1;
+ }
+ stk[k++] = cat[i];
+ }
+ else if (!lc_categories[cat[i]].prev && !(ast.locale.set & AST_LC_internal))
+ lc_categories[cat[i]].prev = p;
+ }
+ while (s[0] == '/' && s[1] && n < (AST_LC_COUNT - 1))
+ {
+ n++;
+ for (w = ++s; *s && *s != '/'; s++);
+ if (!*s)
+ p = lcmake(w);
+ else
+ {
+ if ((j = s - w - 1) >= sizeof(buf))
+ j = sizeof(buf) - 1;
+ memcpy(buf, w, j);
+ buf[j] = 0;
+ p = lcmake(buf);
+ }
+ if (!initialize)
+ {
+ if (!single(n, p, 0))
+ {
+ for (i = 1; i < n; i++)
+ single(i, NiL, 0);
+ return -1;
+ }
+ }
+ else if (!lc_categories[n].prev && !(ast.locale.set & AST_LC_internal))
+ lc_categories[n].prev = p;
+ }
+ return n;
+}
+
+/*
+ * setlocale() intercept
+ *
+ * locale:
+ * 0 query
+ * "" initialize from environment (if LC_ALL)
+ * "" AST_LC_setenv: value unset (defer to LANG)
+ * "*" AST_LC_setenv: value set (defer to LC_ALL)
+ * * set (override LC_ALL)
+ */
+
+char*
+_ast_setlocale(int category, const char* locale)
+{
+ register char* s;
+ register int i;
+ register int j;
+ int k;
+ int f;
+ Lc_t* p;
+ int cat[AST_LC_COUNT];
+
+ static Sfio_t* sp;
+ static int initialized;
+ static const char local[] = "local";
+
+ if ((category = lcindex(category, 0)) < 0)
+ return 0;
+ if (!locale)
+ {
+ /*
+ * return the current state
+ */
+
+ compose:
+ if (category != AST_LC_ALL && category != AST_LC_LANG)
+ return (char*)locales[category]->name;
+ if (!sp && !(sp = sfstropen()))
+ return 0;
+ for (i = 1; i < AST_LC_COUNT; i++)
+ cat[i] = -1;
+ for (i = 1, k = 0; i < AST_LC_COUNT; i++)
+ if (cat[i] < 0)
+ {
+ k++;
+ cat[i] = i;
+ for (j = i + 1; j < AST_LC_COUNT; j++)
+ if (locales[j] == locales[i])
+ cat[j] = i;
+ }
+ if (k == 1)
+ return (char*)locales[1]->name;
+ for (i = 1; i < AST_LC_COUNT; i++)
+ if (cat[i] >= 0 && !(locales[i]->flags & LC_default))
+ {
+ if (sfstrtell(sp))
+ sfprintf(sp, ";");
+ for (j = i, k = cat[i]; j < AST_LC_COUNT; j++)
+ if (cat[j] == k)
+ {
+ cat[j] = -1;
+ sfprintf(sp, "%s=", lc_categories[j].name);
+ }
+ sfprintf(sp, "%s", locales[i]->name);
+ }
+ if (!sfstrtell(sp))
+ return (char*)locales[0]->name;
+ return sfstruse(sp);
+ }
+ if (!ast.locale.serial++)
+ {
+ stropt(getenv("LC_OPTIONS"), options, sizeof(*options), setopt, NiL);
+ initialized = 0;
+ }
+ if ((ast.locale.set & (AST_LC_debug|AST_LC_setlocale)) && !(ast.locale.set & AST_LC_internal))
+ {
+ header();
+ sfprintf(sfstderr, "locale user %17s %16s %16s %16s%s%s\n", category == AST_LC_LANG ? "LANG" : lc_categories[category].name, locale && !*locale ? "''" : locale, "", "", initialized ? "" : " initial", (ast.locale.set & AST_LC_setenv) ? " setenv" : "");
+ }
+ if (ast.locale.set & AST_LC_setenv)
+ {
+ f = LC_setenv;
+ p = *locale ? lcmake(locale) : (Lc_t*)0;
+ }
+ else if (*locale)
+ {
+ f = LC_setlocale;
+ p = lcmake(locale);
+ }
+ else if (category == AST_LC_ALL)
+ {
+ if (!initialized)
+ {
+ char* u;
+ char tmp[256];
+
+ /*
+ * initialize from the environment
+ * precedence determined by X/Open
+ */
+
+ u = 0;
+ if ((s = getenv("LANG")) && *s)
+ {
+ if (streq(s, local) && (u || (u = native_locale(locale, tmp, sizeof(tmp)))))
+ s = u;
+ lang = lcmake(s);
+ }
+ else
+ lang = 0;
+ if ((s = getenv("LC_ALL")) && *s)
+ {
+ if (streq(s, local) && (u || (u = native_locale(locale, tmp, sizeof(tmp)))))
+ s = u;
+ lc_all = lcmake(s);
+ }
+ else
+ lc_all = 0;
+ for (i = 1; i < AST_LC_COUNT; i++)
+ if (lc_categories[i].flags & LC_setlocale)
+ /* explicitly set by setlocale() */;
+ else if ((s = getenv(lc_categories[i].name)) && *s)
+ {
+ if (streq(s, local) && (u || (u = native_locale(locale, tmp, sizeof(tmp)))))
+ s = u;
+ lc_categories[i].prev = lcmake(s);
+ }
+ else
+ lc_categories[i].prev = 0;
+ for (i = 1; i < AST_LC_COUNT; i++)
+ if (!single(i, lc_all && !(lc_categories[i].flags & LC_setlocale) ? lc_all : lc_categories[i].prev, 0))
+ {
+ while (i--)
+ single(i, NiL, 0);
+ return 0;
+ }
+ if (ast.locale.set & AST_LC_debug)
+ for (i = 1; i < AST_LC_COUNT; i++)
+ sfprintf(sfstderr, "locale env %17s %16s %16s %16s\n", lc_categories[i].name, locales[i]->name, "", lc_categories[i].prev ? lc_categories[i].prev->name : (char*)0);
+ initialized = 1;
+ }
+ goto compose;
+ }
+ else if (category == AST_LC_LANG || !(p = lc_categories[category].prev))
+ {
+ f = 0;
+ p = lcmake("C");
+ }
+ else
+ f = 0;
+ if (category == AST_LC_LANG)
+ {
+ if (lang != p)
+ {
+ lang = p;
+ if (!lc_all)
+ for (i = 1; i < AST_LC_COUNT; i++)
+ if (!single(i, lc_categories[i].prev, 0))
+ {
+ while (i--)
+ single(i, NiL, 0);
+ return 0;
+ }
+ }
+ }
+ else if (category != AST_LC_ALL)
+ {
+ if (f || !lc_all)
+ return single(category, p, f);
+ if (p && !(ast.locale.set & AST_LC_internal))
+ lc_categories[category].prev = p;
+ return (char*)locales[category]->name;
+ }
+ else if (composite(locale, 0) < 0)
+ return 0;
+ else if (lc_all != p)
+ {
+ lc_all = p;
+ for (i = 1; i < AST_LC_COUNT; i++)
+ if (!single(i, lc_all && !(lc_categories[i].flags & LC_setlocale) ? lc_all : lc_categories[i].prev, 0))
+ {
+ while (i--)
+ single(i, NiL, 0);
+ return 0;
+ }
+ }
+ goto compose;
+}
diff --git a/usr/src/lib/libast/common/comp/setlogmask.c b/usr/src/contrib/ast/src/lib/libast/comp/setlogmask.c
index e1c7d8ecd8..f1851a7f85 100644
--- a/usr/src/lib/libast/common/comp/setlogmask.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/setlogmask.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/setpgid.c b/usr/src/contrib/ast/src/lib/libast/comp/setpgid.c
index eafc872e26..c966919668 100644
--- a/usr/src/lib/libast/common/comp/setpgid.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/setpgid.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/setsid.c b/usr/src/contrib/ast/src/lib/libast/comp/setsid.c
index acb70123ef..60200fc44f 100644
--- a/usr/src/lib/libast/common/comp/setsid.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/setsid.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -60,7 +60,7 @@ setsid(void)
* drop the control tty
*/
- if ((fd = open("/dev/tty", O_RDONLY)) >= 0)
+ if ((fd = open("/dev/tty", O_RDONLY|O_cloexec)) >= 0)
{
ioctl(fd, TIOCNOTTY, 0);
close(fd);
diff --git a/usr/src/lib/libast/common/comp/sigflag.c b/usr/src/contrib/ast/src/lib/libast/comp/sigflag.c
index d1c4af627b..05ea22bf0a 100644
--- a/usr/src/lib/libast/common/comp/sigflag.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/sigflag.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/sigunblock.c b/usr/src/contrib/ast/src/lib/libast/comp/sigunblock.c
index 3eb9a28a9b..dfcb28bbe9 100644
--- a/usr/src/lib/libast/common/comp/sigunblock.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/sigunblock.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/spawnveg.c b/usr/src/contrib/ast/src/lib/libast/comp/spawnveg.c
index e61e20be62..6117e3ad1b 100644
--- a/usr/src/lib/libast/common/comp/spawnveg.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/spawnveg.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -130,6 +130,7 @@ spawnveg(const char* path, char* const argv[], char* const envv[], pid_t pgid)
#include <error.h>
#include <wait.h>
#include <sig.h>
+#include <ast_tty.h>
#include <ast_vfork.h>
#ifndef ENOSYS
@@ -193,25 +194,35 @@ spawnveg(const char* path, char* const argv[], char* const envv[], pid_t pgid)
fcntl(err[1], F_SETFD, FD_CLOEXEC);
}
#endif
- sigcritical(1);
+ sigcritical(SIG_REG_EXEC|SIG_REG_PROC);
#if _lib_vfork
pid = vfork();
#else
pid = fork();
#endif
- sigcritical(0);
if (pid == -1)
n = errno;
else if (!pid)
{
- if (pgid < 0)
+ sigcritical(0);
+ if (pgid == -1)
setsid();
- else if (pgid > 0)
+ else if (pgid)
{
- if (pgid == 1)
- pgid = 0;
- if (setpgid(0, pgid) < 0 && pgid && errno == EPERM)
- setpgid(0, 0);
+ m = 0;
+ if (pgid == 1 || pgid == -2 && (m = 1))
+ pgid = getpid();
+ if (setpgid(0, pgid) < 0 && errno == EPERM)
+ setpgid(pgid, 0);
+#if _lib_tcgetpgrp
+ if (m)
+ tcsetpgrp(2, pgid);
+#else
+#ifdef TIOCSPGRP
+ if (m)
+ ioctl(2, TIOCSPGRP, &pgid);
+#endif
+#endif
}
execve(path, argv, envv);
#if _real_vfork
@@ -219,8 +230,8 @@ spawnveg(const char* path, char* const argv[], char* const envv[], pid_t pgid)
#else
if (err[0] != -1)
{
- n = errno;
- write(err[1], &n, sizeof(n));
+ m = errno;
+ write(err[1], &m, sizeof(m));
}
#endif
_exit(errno == ENOENT ? EXIT_NOTFOUND : EXIT_NOEXEC);
@@ -237,15 +248,26 @@ spawnveg(const char* path, char* const argv[], char* const envv[], pid_t pgid)
if (err[0] != -1)
{
close(err[1]);
- if (pid != -1 && read(err[0], &m, sizeof(m)) == sizeof(m) && m)
+ if (pid != -1)
{
- while (waitpid(pid, NiL, 0) == -1 && errno == EINTR);
- rid = pid = -1;
- n = m;
+ m = 0;
+ while (read(err[0], &m, sizeof(m)) == -1)
+ if (errno != EINTR)
+ {
+ m = errno;
+ break;
+ }
+ if (m)
+ {
+ while (waitpid(pid, &n, 0) && errno == EINTR);
+ rid = pid = -1;
+ n = m;
+ }
}
close(err[0]);
}
#endif
+ sigcritical(0);
if (pid != -1 && pgid > 0)
{
/*
diff --git a/usr/src/lib/libast/common/comp/statvfs.c b/usr/src/contrib/ast/src/lib/libast/comp/statvfs.c
index 219ad9a4c2..b9bbf6849e 100644
--- a/usr/src/lib/libast/common/comp/statvfs.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/statvfs.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -80,9 +80,9 @@ us2v(register struct statfs* ufs, register struct stat* st, register struct stat
vfs->f_ffree = ufs->f_ffree;
vfs->f_favail = (ufs->f_ffree > 10) ? (ufs->f_ffree - 10) : 0;
vfs->f_fsid = st->st_dev;
- strncpy(vfs->f_basetype, FS_default, sizeof(vfs->f_basetype) - 1);
+ strlcpy(vfs->f_basetype, FS_default, sizeof(vfs->f_basetype) - 1);
vfs->f_namemax = 14;
- strncpy(vfs->f_fstr, vfs->f_basetype, sizeof(vfs->f_fstr) - 1);
+ strlcpy(vfs->f_fstr, vfs->f_basetype, sizeof(vfs->f_fstr) - 1);
}
extern int
@@ -131,9 +131,9 @@ s2v(register struct stat* st, register struct statvfs* vfs)
vfs->f_ffree = HUH;
vfs->f_favail = HUH;
vfs->f_fsid = st->st_dev;
- strncpy(vfs->f_basetype, FS_default, sizeof(vfs->f_basetype) - 1);
+ strlcpy(vfs->f_basetype, FS_default, sizeof(vfs->f_basetype));
vfs->f_namemax = 14;
- strncpy(vfs->f_fstr, vfs->f_basetype, sizeof(vfs->f_fstr) - 1);
+ strlcpy(vfs->f_fstr, vfs->f_basetype, sizeof(vfs->f_fstr));
}
extern int
diff --git a/usr/src/lib/libast/common/comp/strcasecmp.c b/usr/src/contrib/ast/src/lib/libast/comp/strcasecmp.c
index 22d54c27db..0ea1869d58 100644
--- a/usr/src/lib/libast/common/comp/strcasecmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strcasecmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strchr.c b/usr/src/contrib/ast/src/lib/libast/comp/strchr.c
index 20943fcdae..7b556c5248 100644
--- a/usr/src/lib/libast/common/comp/strchr.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strchr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strftime.c b/usr/src/contrib/ast/src/lib/libast/comp/strftime.c
index b954e17345..5c8d5bd85e 100644
--- a/usr/src/lib/libast/common/comp/strftime.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strftime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strncasecmp.c b/usr/src/contrib/ast/src/lib/libast/comp/strncasecmp.c
index 0ad34b32d1..c31252688c 100644
--- a/usr/src/lib/libast/common/comp/strncasecmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strncasecmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strptime.c b/usr/src/contrib/ast/src/lib/libast/comp/strptime.c
index eac8f6f2ee..981c98ba8d 100644
--- a/usr/src/lib/libast/common/comp/strptime.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strptime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strrchr.c b/usr/src/contrib/ast/src/lib/libast/comp/strrchr.c
index c05dded920..4e192ce0fa 100644
--- a/usr/src/lib/libast/common/comp/strrchr.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strrchr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strstr.c b/usr/src/contrib/ast/src/lib/libast/comp/strstr.c
index 03b6b64894..aa50058527 100644
--- a/usr/src/lib/libast/common/comp/strstr.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strstr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strtod.c b/usr/src/contrib/ast/src/lib/libast/comp/strtod.c
index 7b66e134e7..8817d5b3c1 100644
--- a/usr/src/lib/libast/common/comp/strtod.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strtod.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strtol.c b/usr/src/contrib/ast/src/lib/libast/comp/strtol.c
index ae883742c4..3d8e05897f 100644
--- a/usr/src/lib/libast/common/comp/strtol.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strtol.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strtold.c b/usr/src/contrib/ast/src/lib/libast/comp/strtold.c
index 2e6a4783f6..05e0082069 100644
--- a/usr/src/lib/libast/common/comp/strtold.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strtold.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -47,4 +47,6 @@
#undef _AST_STD_H
+#include <ast.h>
+
#include "sfstrtof.h"
diff --git a/usr/src/lib/libast/common/comp/strtoll.c b/usr/src/contrib/ast/src/lib/libast/comp/strtoll.c
index 4755b97ec2..c41d26d446 100644
--- a/usr/src/lib/libast/common/comp/strtoll.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strtoll.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strtoul.c b/usr/src/contrib/ast/src/lib/libast/comp/strtoul.c
index 3744872d49..f7082e17e4 100644
--- a/usr/src/lib/libast/common/comp/strtoul.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strtoul.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/strtoull.c b/usr/src/contrib/ast/src/lib/libast/comp/strtoull.c
index d857c4ceda..2837cc64c3 100644
--- a/usr/src/lib/libast/common/comp/strtoull.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/strtoull.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/swab.c b/usr/src/contrib/ast/src/lib/libast/comp/swab.c
index 5af0bde82c..4bc905d800 100644
--- a/usr/src/lib/libast/common/comp/swab.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/swab.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/symlink.c b/usr/src/contrib/ast/src/lib/libast/comp/symlink.c
index b0263ed927..d234d03e34 100644
--- a/usr/src/lib/libast/common/comp/symlink.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/symlink.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -45,7 +45,7 @@ symlink(const char* a, char* b)
int n;
int fd;
- if ((fd = open(b, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0)
+ if ((fd = open(b, O_CREAT|O_TRUNC|O_WRONLY|O_cloexec, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0)
return -1;
n = strlen(a) + 1;
n = (write(fd, FAKELINK_MAGIC, sizeof(FAKELINK_MAGIC)) != sizeof(FAKELINK_MAGIC) || write(fd, a, n) != n) ? -1 : 0;
diff --git a/usr/src/lib/libast/common/comp/syslog.c b/usr/src/contrib/ast/src/lib/libast/comp/syslog.c
index f9d9942808..204d2573bc 100644
--- a/usr/src/lib/libast/common/comp/syslog.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/syslog.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -266,11 +266,13 @@ sendlog(const char* msg)
p = (Namval_t*)&attempt[log.attempt++];
if (p->value && !(p->value & log.flags))
continue;
- if (*(s = p->name) != '/' && !(s = pathpath(buf, s, "", PATH_REGULAR|PATH_READ)))
+ if (*(s = p->name) != '/' && !(s = pathpath(buf, s, "", PATH_REGULAR|PATH_READ, sizeof(buf))))
continue;
- if ((log.fd = open(s, O_WRONLY|O_APPEND|O_NOCTTY)) < 0 && (log.fd = sockopen(s)) < 0)
+ if ((log.fd = open(s, O_WRONLY|O_APPEND|O_NOCTTY|O_cloexec)) < 0 && (log.fd = sockopen(s)) < 0)
continue;
+#if !O_cloexec
fcntl(log.fd, F_SETFD, FD_CLOEXEC);
+#endif
}
if (!n || write(log.fd, msg, n) > 0)
break;
diff --git a/usr/src/contrib/ast/src/lib/libast/comp/syslog.h b/usr/src/contrib/ast/src/lib/libast/comp/syslog.h
new file mode 100644
index 0000000000..48560344ac
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/comp/syslog.h
@@ -0,0 +1,132 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * posix syslog interface definitions
+ */
+
+#ifndef _SYSLOG_H
+#define _SYSLOG_H
+
+#include <stdarg.h>
+
+#define LOG_PRIBITS 3 /* priority bits */
+#define LOG_FACBITS 7 /* facility bits */
+
+#define LOG_PRIMASK ((1<<LOG_PRIBITS)-1)
+#define LOG_FACMASK (((1<<LOG_FACBITS)-1)<<LOG_PRIBITS)
+
+#define LOG_PRI(p) ((p)&((1<<LOG_PRIBITS)-1))
+#define LOG_FAC(p) (((p)>>LOG_PRIBITS)&((1<<LOG_FACBITS)-1))
+
+#define LOG_MAKEPRI(f,p) (((f)<<LOG_PRIBITS)|(p))
+
+/* syslog priority severity levels */
+
+#define LOG_EMERG 0 /* panic condition */
+#define LOG_ALERT 1 /* should be corrected immediately */
+#define LOG_CRIT 2 /* critical condition */
+#define LOG_ERR 3 /* error condition */
+#define LOG_WARNING 4 /* warning condition */
+#define LOG_NOTICE 5 /* no error but may need intervention */
+#define LOG_INFO 6 /* informational message */
+#define LOG_DEBUG 7 /* debug message */
+
+/* setlogmask masks */
+
+#define LOG_MASK(s) (1<<(s)) /* individual severity s */
+#define LOG_UPTO(s) ((1<<((s)+1))-1)/* up to and including s */
+
+/* syslog facilities */
+
+#define LOG_KERN (0<<LOG_PRIBITS) /* kernel */
+#define LOG_USER (1<<LOG_PRIBITS) /* user process -- default */
+#define LOG_MAIL (2<<LOG_PRIBITS) /* mail */
+#define LOG_DAEMON (3<<LOG_PRIBITS) /* daemon */
+#define LOG_AUTH (4<<LOG_PRIBITS) /* security/authorization */
+#define LOG_SYSLOG (5<<LOG_PRIBITS) /* syslog internal */
+#define LOG_LPR (6<<LOG_PRIBITS) /* line printer */
+#define LOG_NEWS (7<<LOG_PRIBITS) /* network news */
+#define LOG_UUCP (8<<LOG_PRIBITS) /* uucp */
+#define LOG_CRON (9<<LOG_PRIBITS) /* cron */
+#define LOG_AUDIT (13<<LOG_PRIBITS) /* audit daemon */
+#define LOG_LFMT (14<<LOG_PRIBITS) /* logalert */
+#define LOG_LOCAL0 (16<<LOG_PRIBITS) /* reserved for local use */
+#define LOG_LOCAL1 (17<<LOG_PRIBITS) /* reserved for local use */
+#define LOG_LOCAL2 (18<<LOG_PRIBITS) /* reserved for local use */
+#define LOG_LOCAL3 (19<<LOG_PRIBITS) /* reserved for local use */
+#define LOG_LOCAL4 (20<<LOG_PRIBITS) /* reserved for local use */
+#define LOG_LOCAL5 (21<<LOG_PRIBITS) /* reserved for local use */
+#define LOG_LOCAL6 (22<<LOG_PRIBITS) /* reserved for local use */
+#define LOG_LOCAL7 (23<<LOG_PRIBITS) /* reserved for local use */
+
+#define LOG_NFACILITIES 24
+
+/* openlog flags */
+
+#define LOG_PID 0x01 /* log the pid with each message */
+#define LOG_CONS 0x02 /* log to console if errors in sending */
+#define LOG_NDELAY 0x08 /* open right now */
+#define LOG_ODELAY 0x04 /* delay open until syslog() is called */
+#define LOG_NOWAIT 0x10 /* don't wait() for any child processes */
+#define LOG_PERROR 0x20 /* log to stderr too */
+#define LOG_LEVEL 0x40 /* tag messages with facility/level */
+
+#ifdef LOG_TABLES
+
+/* encoding support */
+
+#include <ast_namval.h>
+
+#define log_facility _log_facility
+#define log_severity _log_severity
+
+#define LOG_FACILITY(p) LOG_FAC(p) /* get facility index from pri */
+#define LOG_SEVERITY(p) LOG_PRI(p) /* get severity from pri */
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+#if !_BLD_ast && defined(__IMPORT__)
+#define extern extern __IMPORT__
+#endif
+
+extern const Namval_t log_facility[];
+extern const Namval_t log_severity[];
+
+#undef extern
+
+#endif
+
+#if _BLD_ast && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern void closelog(void);
+extern void openlog(const char*, int, int);
+extern int setlogmask(int);
+extern void syslog(int, const char*, ...);
+extern void vsyslog(int, const char*, va_list);
+
+#undef extern
+
+#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_namval.h b/usr/src/contrib/ast/src/lib/libast/comp/sysloglib.h
index 49e777be1d..5a894c49fe 100644
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_namval.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/sysloglib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,22 +21,34 @@
***********************************************************************/
#pragma prototyped
/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
+ * posix syslog implementation definitions
*/
-#ifndef _NAMVAL_H
-#define _NAMVAL_H
+#ifndef _SYSLOGLIB_H
+#define _SYSLOGLIB_H
+
+#include <syslog.h>
+
+#define log _log_info_
+#define sendlog _log_send_
+
+/*
+ * NOTE: syslog() has a static initializer for Syslog_state_t log
+ */
typedef struct
{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
+ int facility; /* openlog facility */
+ int fd; /* log to this fd */
+ int flags; /* openlog flags */
+ unsigned int mask; /* setlogmask mask */
+ int attempt; /* logfile attempt state */
+ char ident[64]; /* openlog ident */
+ char host[64]; /* openlog host name */
+} Syslog_state_t;
+
+extern Syslog_state_t log;
+
+extern void sendlog(const char*);
#endif
diff --git a/usr/src/lib/libast/common/comp/system.c b/usr/src/contrib/ast/src/lib/libast/comp/system.c
index a654b9641d..c0a3aa3c00 100644
--- a/usr/src/lib/libast/common/comp/system.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/system.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/tempnam.c b/usr/src/contrib/ast/src/lib/libast/comp/tempnam.c
index e2d447e9a6..3cf375ca14 100644
--- a/usr/src/lib/libast/common/comp/tempnam.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/tempnam.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/tmpnam.c b/usr/src/contrib/ast/src/lib/libast/comp/tmpnam.c
index a3a9470dd1..543ccdb1d5 100644
--- a/usr/src/lib/libast/common/comp/tmpnam.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/tmpnam.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/transition.c b/usr/src/contrib/ast/src/lib/libast/comp/transition.c
index e3692d9fa6..ba6537000c 100644
--- a/usr/src/lib/libast/common/comp/transition.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/transition.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/tsearch.c b/usr/src/contrib/ast/src/lib/libast/comp/tsearch.c
index 8e49ff14c5..486f0825b0 100644
--- a/usr/src/lib/libast/common/comp/tsearch.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/tsearch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -52,6 +52,8 @@ void _STUB_tsearch(){}
#include "dthdr.h"
+extern Void_t* dtfinger(Dt_t*);
+
/* POSIX tsearch library based on libcdt
** Written by Kiem-Phong Vo (AT&T Research, 07/19/95)
*/
@@ -111,7 +113,7 @@ int(* comparf)();
reg Tree_t* o;
if(!rootp ||
- (!(dt = *((Dt_t**)rootp)) && !(dt = dtopen((Dtdisc_t*)(&Treedisc),Dtorder))) )
+ (!(dt = *((Dt_t**)rootp)) && !(dt = dtopen((Dtdisc_t*)(&Treedisc),Dtoset))) )
return NIL(Void_t*);
/* dangerous to set comparf on each call but that's tsearch */
@@ -192,8 +194,8 @@ int(* comparf)();
/* the below routine assumes a particular layout of Dtlink_t.
** If this ever gets changed, this routine should be redone.
*/
-#define lchild link.hl._left
-#define rchild link.right
+#define lchild link.lh.__left
+#define rchild link.rh.__rght
#if __STD_C
static void _twalk(Tree_t* obj, void(*action)(const Void_t*,VISIT,int), int level)
diff --git a/usr/src/lib/libast/common/comp/unlink.c b/usr/src/contrib/ast/src/lib/libast/comp/unlink.c
index 5a7718c032..54508489e5 100644
--- a/usr/src/lib/libast/common/comp/unlink.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/unlink.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/unsetenv.c b/usr/src/contrib/ast/src/lib/libast/comp/unsetenv.c
index 4787ef0db8..867892a246 100644
--- a/usr/src/lib/libast/common/comp/unsetenv.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/unsetenv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/vfork.c b/usr/src/contrib/ast/src/lib/libast/comp/vfork.c
index de4680aea6..dfe2fd6b5d 100644
--- a/usr/src/lib/libast/common/comp/vfork.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/vfork.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/waitpid.c b/usr/src/contrib/ast/src/lib/libast/comp/waitpid.c
index 1b09472709..2995b19896 100644
--- a/usr/src/lib/libast/common/comp/waitpid.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/waitpid.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/wc.c b/usr/src/contrib/ast/src/lib/libast/comp/wc.c
index 2175f2caea..521b55accb 100644
--- a/usr/src/lib/libast/common/comp/wc.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/wc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/wordexp.c b/usr/src/contrib/ast/src/lib/libast/comp/wordexp.c
index 5becd0d9fd..33016dcda4 100644
--- a/usr/src/lib/libast/common/comp/wordexp.c
+++ b/usr/src/contrib/ast/src/lib/libast/comp/wordexp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/comp/wordexp.h b/usr/src/contrib/ast/src/lib/libast/comp/wordexp.h
index 81414115d4..69a1bb45cb 100644
--- a/usr/src/lib/libast/common/comp/wordexp.h
+++ b/usr/src/contrib/ast/src/lib/libast/comp/wordexp.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/dir/dirlib.h b/usr/src/contrib/ast/src/lib/libast/dir/dirlib.h
index d6d9aa708e..509ed0c560 100644
--- a/usr/src/lib/libast/common/dir/dirlib.h
+++ b/usr/src/contrib/ast/src/lib/libast/dir/dirlib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/dir/dirstd.h b/usr/src/contrib/ast/src/lib/libast/dir/dirstd.h
new file mode 100644
index 0000000000..79dc6ead42
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/dir/dirstd.h
@@ -0,0 +1,63 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * AT&T Bell Laboratories
+ *
+ * <dirent.h> for systems with no opendir()
+ */
+
+#ifndef _DIRENT_H
+#define _DIRENT_H
+
+typedef struct
+{
+ int dd_fd; /* file descriptor */
+#ifdef _DIR_PRIVATE_
+ _DIR_PRIVATE_
+#endif
+} DIR;
+
+struct dirent
+{
+ long d_fileno; /* entry serial number */
+ int d_reclen; /* entry length */
+ int d_namlen; /* entry name length */
+ char d_name[1]; /* entry name */
+};
+
+#ifndef _BLD_3d
+
+#ifdef rewinddir
+#undef rewinddir
+#define rewinddir(p) seekdir(p,0L)
+#endif
+
+extern DIR* opendir(const char*);
+extern void closedir(DIR*);
+extern struct dirent* readdir(DIR*);
+extern void seekdir(DIR*, long);
+extern long telldir(DIR*);
+
+#endif
+
+#endif
diff --git a/usr/src/lib/libast/common/dir/getdents.c b/usr/src/contrib/ast/src/lib/libast/dir/getdents.c
index 1cb90fbc34..22228cdfc3 100644
--- a/usr/src/lib/libast/common/dir/getdents.c
+++ b/usr/src/contrib/ast/src/lib/libast/dir/getdents.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/dir/opendir.c b/usr/src/contrib/ast/src/lib/libast/dir/opendir.c
index 08bbe06407..55c77fd8ea 100644
--- a/usr/src/lib/libast/common/dir/opendir.c
+++ b/usr/src/contrib/ast/src/lib/libast/dir/opendir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -52,10 +52,12 @@ opendir(register const char* path)
register int fd;
struct stat st;
- if ((fd = open(path, O_RDONLY)) < 0) return(0);
+ if ((fd = open(path, O_RDONLY|O_cloexec)) < 0) return(0);
if (fstat(fd, &st) < 0 ||
!S_ISDIR(st.st_mode) && (errno = ENOTDIR) ||
+#if !O_cloexec
fcntl(fd, F_SETFD, FD_CLOEXEC) ||
+#endif
!(dirp = freedirp ? freedirp :
#if defined(_DIR_PRIVATE_) || _ptr_dd_buf
newof(0, DIR, 1, DIRBLKSIZ)
diff --git a/usr/src/lib/libast/common/dir/readdir.c b/usr/src/contrib/ast/src/lib/libast/dir/readdir.c
index efb531efb7..1c595b7fe4 100644
--- a/usr/src/lib/libast/common/dir/readdir.c
+++ b/usr/src/contrib/ast/src/lib/libast/dir/readdir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/dir/rewinddir.c b/usr/src/contrib/ast/src/lib/libast/dir/rewinddir.c
index b875ae2bec..244690ad27 100644
--- a/usr/src/lib/libast/common/dir/rewinddir.c
+++ b/usr/src/contrib/ast/src/lib/libast/dir/rewinddir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/dir/seekdir.c b/usr/src/contrib/ast/src/lib/libast/dir/seekdir.c
index 6f4cc63956..8113584d2a 100644
--- a/usr/src/lib/libast/common/dir/seekdir.c
+++ b/usr/src/contrib/ast/src/lib/libast/dir/seekdir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/dir/telldir.c b/usr/src/contrib/ast/src/lib/libast/dir/telldir.c
index de2651b825..611d9e7857 100644
--- a/usr/src/lib/libast/common/dir/telldir.c
+++ b/usr/src/contrib/ast/src/lib/libast/dir/telldir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/memfatal.c b/usr/src/contrib/ast/src/lib/libast/disc/memfatal.c
index 9f2538265b..9016d36f98 100644
--- a/usr/src/lib/libast/common/disc/memfatal.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/memfatal.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -52,9 +52,11 @@ nomalloc(Vmalloc_t* region, int type, void* obj, Vmdisc_t* disc)
NoP(disc);
switch (type)
{
+#ifdef VM_BADADDR
case VM_BADADDR:
error(ERROR_SYSTEM|3, "invalid pointer %p passed to free or realloc", obj);
return(-1);
+#endif
case VM_NOMEM:
vmstat(region, &st);
error(ERROR_SYSTEM|3, "storage allocator out of space on %lu byte request ( region %lu segments %lu busy %lu:%lu:%lu free %lu:%lu:%lu )", (size_t)obj, st.extent, st.n_seg, st.n_busy, st.s_busy, st.m_busy, st.n_free, st.s_free, st.m_free);
diff --git a/usr/src/lib/libast/common/disc/sfdcdio.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcdio.c
index c887f69925..f96771ffaf 100644
--- a/usr/src/lib/libast/common/disc/sfdcdio.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcdio.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,7 +28,7 @@
*/
#ifndef FDIRECT
-#undef F_FIOINFO
+#undef F_DIOINFO
#endif
typedef struct _direct_s
diff --git a/usr/src/lib/libast/common/disc/sfdcdos.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcdos.c
index ec0bb10bf3..15b7865cc5 100644
--- a/usr/src/lib/libast/common/disc/sfdcdos.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcdos.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfdcfilter.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcfilter.c
index c4f4e3f53a..16a2219a22 100644
--- a/usr/src/lib/libast/common/disc/sfdcfilter.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcfilter.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfdchdr.h b/usr/src/contrib/ast/src/lib/libast/disc/sfdchdr.h
index 8acbefe8e2..7e5bbca0e5 100644
--- a/usr/src/lib/libast/common/disc/sfdchdr.h
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdchdr.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfdcmore.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcmore.c
index 96dc09b133..900b55d146 100644
--- a/usr/src/lib/libast/common/disc/sfdcmore.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcmore.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfdcprefix.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcprefix.c
index 136e2c51ae..29f3fd45f3 100644
--- a/usr/src/lib/libast/common/disc/sfdcprefix.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcprefix.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfdcseekable.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcseekable.c
index 9c9c6489c6..23c5b935a4 100644
--- a/usr/src/lib/libast/common/disc/sfdcseekable.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcseekable.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfdcslow.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcslow.c
index fe2bd5e677..e75f4388db 100644
--- a/usr/src/lib/libast/common/disc/sfdcslow.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcslow.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -78,6 +78,7 @@ Sfio_t* f;
{ free(disc);
return(-1);
}
+ sfset(f,SF_IOINTR,1);
return(0);
}
diff --git a/usr/src/lib/libast/common/disc/sfdcsubstr.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcsubstr.c
index 0477ddd37e..c0fae9bef5 100644
--- a/usr/src/lib/libast/common/disc/sfdcsubstr.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcsubstr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfdctee.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdctee.c
index 448de40cee..66bf71ea0c 100644
--- a/usr/src/lib/libast/common/disc/sfdctee.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdctee.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfdcunion.c b/usr/src/contrib/ast/src/lib/libast/disc/sfdcunion.c
index 310e38ecde..1f45909cc6 100644
--- a/usr/src/lib/libast/common/disc/sfdcunion.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfdcunion.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/disc/sfkeyprintf.c b/usr/src/contrib/ast/src/lib/libast/disc/sfkeyprintf.c
index 2db8988b0d..f44ac3a4b3 100644
--- a/usr/src/lib/libast/common/disc/sfkeyprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfkeyprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -332,9 +332,11 @@ getfmt(Sfio_t* sp, void* vp, Sffmt_t* dp)
}
/*
- * this is the 20000308 interface with Sffmt_t* callback args
+ * this is the original interface
*/
+#undef sfkeyprintf
+
int
sfkeyprintf(Sfio_t* sp, void* handle, const char* format, Sf_key_lookup_t lookup, Sf_key_convert_t convert)
{
@@ -343,7 +345,6 @@ sfkeyprintf(Sfio_t* sp, void* handle, const char* format, Sf_key_lookup_t lookup
Fmt_t fmt;
memset(&fmt, 0, sizeof(fmt));
- fmt.version = 20030909;
fmt.fmt.version = SFIO_VERSION;
fmt.fmt.form = (char*)format;
fmt.fmt.extf = getfmt;
@@ -354,23 +355,29 @@ sfkeyprintf(Sfio_t* sp, void* handle, const char* format, Sf_key_lookup_t lookup
for (i = 0; i < elementsof(fmt.tmp); i++)
if (fmt.tmp[i])
sfclose(fmt.tmp[i]);
+ for (i = 0; i < elementsof(fmt.re); i++)
+ if (fmt.re[i])
+ regfree(fmt.re[i]);
return r;
}
+#undef _AST_API_H
+
+#include <ast_api.h>
+
/*
- * this is the original interface
+ * Sffmt_t* callback args
*/
-#undef sfkeyprintf
-
int
-sfkeyprintf(Sfio_t* sp, void* handle, const char* format, Sf_key_lookup_t lookup, Sf_key_convert_t convert)
+sfkeyprintf_20000308(Sfio_t* sp, void* handle, const char* format, Sf_key_lookup_t lookup, Sf_key_convert_t convert)
{
register int i;
int r;
Fmt_t fmt;
memset(&fmt, 0, sizeof(fmt));
+ fmt.version = 20030909;
fmt.fmt.version = SFIO_VERSION;
fmt.fmt.form = (char*)format;
fmt.fmt.extf = getfmt;
@@ -381,8 +388,5 @@ sfkeyprintf(Sfio_t* sp, void* handle, const char* format, Sf_key_lookup_t lookup
for (i = 0; i < elementsof(fmt.tmp); i++)
if (fmt.tmp[i])
sfclose(fmt.tmp[i]);
- for (i = 0; i < elementsof(fmt.re); i++)
- if (fmt.re[i])
- regfree(fmt.re[i]);
return r;
}
diff --git a/usr/src/lib/libast/common/disc/sfstrtmp.c b/usr/src/contrib/ast/src/lib/libast/disc/sfstrtmp.c
index 0bfd0c2384..beed91bed7 100644
--- a/usr/src/lib/libast/common/disc/sfstrtmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/disc/sfstrtmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/features/align.c b/usr/src/contrib/ast/src/lib/libast/features/align.c
index 77adf4baac..e2c97c879f 100644
--- a/usr/src/lib/libast/common/features/align.c
+++ b/usr/src/contrib/ast/src/lib/libast/features/align.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -110,14 +110,15 @@ main()
v.u2 = u.u2 + i;
bits2 |= u.u1 ^ v.u1;
}
- printf("typedef unsigned %s ALIGN_INTEGRAL;\n", sizeof(char*) >= sizeof(long) ? "long" : sizeof(char*) >= sizeof(int) ? "int" : "short");
printf("\n");
printf("#define ALIGN_CHUNK %d\n", sizeof(char*) >= 4 ? 8192 : 1024);
- printf("#define ALIGN_INTEGRAL %s\n", sizeof(char*) >= sizeof(long) ? "long" : sizeof(char*) >= sizeof(int) ? "int" : "short");
- printf("#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))\n");
+ printf("#define ALIGN_INTEGRAL uintptr_t\n");
+ printf("#define ALIGN_INTEGER(x) ((char*)(x)-(char*)0)\n");
printf("#define ALIGN_POINTER(x) ((char*)(x))\n");
- if (bits2 == (align2 - 1)) printf("#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))\n");
- else printf("#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER(ALIGN_ALIGN(x)+(((y)+%d)/%d)-1)&~((((y)+%d)/%d)-1))\n", align0, align0, align0, align0);
+ if (bits2 == (align2 - 1))
+ printf("#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))\n");
+ else
+ printf("#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER(ALIGN_ALIGN(x)+(((y)+%d)/%d)-1)&~((((y)+%d)/%d)-1))\n", align0, align0, align0, align0);
printf("\n");
if (align0 == align2)
{
@@ -151,14 +152,34 @@ main()
printf("#define ALIGN_ALIGN1(x) ALIGN_TRUNC1((x)+%d)\n", align1 - 1);
printf("#define ALIGN_TRUNC1(x) ALIGN_POINTER(ALIGN_INTEGER((x)+%d)&0x%lx)\n", align1 - 1, ~(bits0|bits1));
}
+#if _X86_ || _X64_
+ printf("#if _X64_\n");
+ printf("#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffeULL)\n");
+ printf("#else\n");
+ printf("#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffe)\n");
+ printf("#endif\n");
+#else
printf("#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x%lx)\n", ~bit1);
+#endif
printf("#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x%lx)\n", bit1);
printf("#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x%lx)\n", bit1);
printf("\n");
printf("#define ALIGN_BIT2 0x%lx\n", bit2);
+#if _X86_ || _X64_
+ printf("#if _X64_\n");
+ printf("#define ALIGN_BOUND2 16\n");
+ printf("#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+15)\n");
+ printf("#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffeULL)\n");
+ printf("#else\n");
+ printf("#define ALIGN_BOUND2 8\n");
+ printf("#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+7)\n");
+ printf("#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffff8)\n");
+ printf("#endif\n");
+#else
printf("#define ALIGN_BOUND2 %d\n", align2);
printf("#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+%d)\n", align2 - 1);
printf("#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x%lx)\n", ~(bits0|bits1|bits2));
+#endif
printf("#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x%lx)\n", ~bit2);
printf("#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x%lx)\n", bit2);
printf("#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x%lx)\n", bit2);
diff --git a/usr/src/contrib/ast/src/lib/libast/features/api b/usr/src/contrib/ast/src/lib/libast/features/api
new file mode 100644
index 0000000000..edfe9be30a
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/features/api
@@ -0,0 +1,15 @@
+iff AST_API
+
+ver ast 20111111
+
+api ast 20120528 regexec regnexec regrexec regsubexec strgrpmatch
+
+api ast 20120411 cmdopen
+
+api ast 20110505 cmdopen
+
+api ast 20100601 pathaccess pathcanon pathcat pathkey pathpath pathprobe pathrepl
+
+api ast 20000308 sfkeyprintf
+
+print #define _AST_VERSION AST_VERSION /* pre-20100601 compatibility */
diff --git a/usr/src/contrib/ast/src/lib/libast/features/aso b/usr/src/contrib/ast/src/lib/libast/features/aso
new file mode 100644
index 0000000000..cf97abffb3
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/features/aso
@@ -0,0 +1,628 @@
+# ast atomic scalar operations feature tests
+
+if aso note{ gcc 4.1+ 64 bit memory atomic operations model }end link{
+ #include "FEATURE/common"
+ int main()
+ {
+ uint64_t i = 0;
+ return __sync_fetch_and_add(&i,7);
+ }
+ }end && {
+ #define _aso_cas8(p,o,n) __sync_val_compare_and_swap(p,o,n)
+ #define _aso_inc8(p) __sync_fetch_and_add(p,1)
+ #define _aso_dec8(p) __sync_fetch_and_sub(p,1)
+ #define _aso_cas16(p,o,n) __sync_val_compare_and_swap(p,o,n)
+ #define _aso_inc16(p) __sync_fetch_and_add(p,1)
+ #define _aso_dec16(p) __sync_fetch_and_sub(p,1)
+ #define _aso_cas32(p,o,n) __sync_val_compare_and_swap(p,o,n)
+ #define _aso_inc32(p) __sync_fetch_and_add(p,1)
+ #define _aso_dec32(p) __sync_fetch_and_sub(p,1)
+ #define _aso_cas64(p,o,n) __sync_val_compare_and_swap(p,o,n)
+ #define _aso_inc64(p) __sync_fetch_and_add(p,1)
+ #define _aso_dec64(p) __sync_fetch_and_sub(p,1)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint64_t)o,(uint64_t)n))
+ #else
+ #define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint32_t)o,(uint32_t)n))
+ #endif
+ }
+elif aso note{ gcc 4.1+ 32 bit memory atomic operations model }end link{
+ #include "FEATURE/common"
+ int main()
+ {
+ uint32_t i = 0;
+ return __sync_fetch_and_add(&i,7);
+ }
+ }end && {
+ #define _aso_cas8(p,o,n) __sync_val_compare_and_swap(p,o,n)
+ #define _aso_inc8(p) __sync_fetch_and_add(p,1)
+ #define _aso_dec8(p) __sync_fetch_and_sub(p,1)
+ #define _aso_cas16(p,o,n) __sync_val_compare_and_swap(p,o,n)
+ #define _aso_inc16(p) __sync_fetch_and_add(p,1)
+ #define _aso_dec16(p) __sync_fetch_and_sub(p,1)
+ #define _aso_cas32(p,o,n) __sync_val_compare_and_swap(p,o,n)
+ #define _aso_inc32(p) __sync_fetch_and_add(p,1)
+ #define _aso_dec32(p) __sync_fetch_and_sub(p,1)
+ #define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint32_t)o,(uint32_t)n))
+ }
+elif aso note{ <atomic.h> atomic_cas_64 }end link{
+ #include "FEATURE/common"
+ #include <atomic.h>
+ int main()
+ {
+ uint64_t i = 0;
+ uint32_t j = 1;
+ return atomic_cas_64(&i, 0, 1) != 0 || atomic_add_32_nv(&j, 1) != 1;
+ }
+ }end && {
+ #include <atomic.h>
+ #define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
+ #define _aso_inc8(p) (atomic_add_8_nv(p,1)-1)
+ #define _aso_dec8(p) (atomic_add_8_nv(p,-1)+1)
+ #define _aso_cas16(p,o,n) atomic_cas_16(p,o,n)
+ #define _aso_inc16(p) (atomic_add_16_nv(p,1)-1)
+ #define _aso_dec16(p) (atomic_add_16_nv(p,-1)+1)
+ #define _aso_cas32(p,o,n) atomic_cas_32(p,o,n)
+ #define _aso_inc32(p) (atomic_add_32_nv(p,1)-1)
+ #define _aso_dec32(p) (atomic_add_32_nv(p,-1)+1)
+ #define _aso_cas64(p,o,n) atomic_cas_64(p,o,n)
+ #define _aso_inc64(p) (atomic_add_64_nv(p,1)-1)
+ #define _aso_dec64(p) (atomic_add_64_nv(p,-1)+1)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_casptr(p,o,n) ((void*)atomic_cas_64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
+ #else
+ #define _aso_casptr(p,o,n) ((void*)atomic_cas_32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ #endif
+ }
+elif aso note{ <atomic.h> atomic_cas_32 }end link{
+ #include "FEATURE/common"
+ #include <atomic.h>
+ int main()
+ {
+ uint32_t i = 0;
+ return atomic_cas_32(&i, 0, 1) != 0 || (atomic_add_32_nv(&i, 1) - 1) != 1;
+ }
+ }end && {
+ #include <atomic.h>
+ #define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
+ #define _aso_inc8(p) (atomic_add_8_nv(p,1)-1)
+ #define _aso_dec8(p) (atomic_add_8_nv(p,-1)+1)
+ #define _aso_cas16(p,o,n) atomic_cas_16(p,o,n)
+ #define _aso_inc16(p) (atomic_add_16_nv(p,1)-1)
+ #define _aso_dec16(p) (atomic_add_16_nv(p,-1)+1)
+ #define _aso_cas32(p,o,n) atomic_cas_32(p,o,n)
+ #define _aso_inc32(p) (atomic_add_32_nv(p,1)-1)
+ #define _aso_dec32(p) (atomic_add_32_nv(p,-1)+1)
+ #define _aso_casptr(p,o,n) ((void*)atomic_cas_32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ }
+elif aso -latomic note{ <atomic.h> atomic_cas_64 with -latomic }end link{
+ #include "FEATURE/common"
+ #include <atomic.h>
+ int main()
+ {
+ uint64_t i = 0;
+ uint32_t j = 1;
+ return atomic_cas_64(&i, 0, 1) != 0 || (atomic_add_32_nv(&j, 1) - 1) != 1;
+ }
+ }end && {
+ #include <atomic.h>
+ #define _REQ_atomic
+ #define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
+ #define _aso_inc8(p) (atomic_add_8_nv(p,1)-1)
+ #define _aso_dec8(p) (atomic_add_8_nv(p,-1)+1)
+ #define _aso_cas16(p,o,n) atomic_cas_16(p,o,n)
+ #define _aso_inc16(p) (atomic_add_16_nv(p,1)-1)
+ #define _aso_dec16(p) (atomic_add_16_nv(p,-1)+1)
+ #define _aso_cas32(p,o,n) atomic_cas_32(p,o,n)
+ #define _aso_inc32(p) (atomic_add_32_nv(p,1)-1)
+ #define _aso_dec32(p) (atomic_add_32_nv(p,-1)+1)
+ #define _aso_cas64(p,o,n) atomic_cas_64(p,o,n)
+ #define _aso_inc64(p) (atomic_add_64_nv(p,1)-1)
+ #define _aso_dec64(p) (atomic_add_64_nv(p,-1)+1)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_casptr(p,o,n) ((void*)atomic_cas_64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
+ #else
+ #define _aso_casptr(p,o,n) ((void*)atomic_cas_32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ #endif
+ }
+elif aso note{ <atomic.h> atomic_cas_32 with -latomic }end link{
+ #include "FEATURE/common"
+ #include <atomic.h>
+ int main()
+ {
+ uint32_t i = 0;
+ return atomic_cas_32(&i, 0, 1) != 0 || (atomic_add_32_nv(&i, 1) - 1) != 1;
+ }
+ }end && {
+ #include <atomic.h>
+ #define _REQ_atomic
+ #define _aso_cas8(p,o,n) atomic_cas_8(p,o,n)
+ #define _aso_inc8(p) (atomic_add_8_nv(p,1)-1)
+ #define _aso_dec8(p) (atomic_add_8_nv(p,-1)+1)
+ #define _aso_cas16(p,o,n) atomic_cas_16(p,o,n)
+ #define _aso_inc16(p) (atomic_add_16_nv(p,1)-1)
+ #define _aso_dec16(p) (atomic_add_16_nv(p,-1)+1)
+ #define _aso_cas32(p,o,n) atomic_cas_32(p,o,n)
+ #define _aso_inc32(p) (atomic_add_32_nv(p,1)-1)
+ #define _aso_dec32(p) (atomic_add_32_nv(p,-1)+1)
+ #define _aso_casptr(p,o,n) ((void*)atomic_cas_32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ }
+elif aso note{ <atomic.h> cas64 }end link{
+ #include "FEATURE/common"
+ #include <atomic.h>
+ int main()
+ {
+ uint64_t i = 0;
+ uint32_t j = 1;
+ return cas64(&i, 0, 1) != 0 || (atomic_add_32_nv(&j, 1) - 1) != 1;
+ }
+ }end && {
+ #include <atomic.h>
+ #define _aso_cas8(p,o,n) cas8(p,o,n)
+ #define _aso_inc8(p) (atomic_add_8_nv(p,1)-1)
+ #define _aso_dec8(p) (atomic_add_8_nv(p,-1)+1)
+ #define _aso_cas16(p,o,n) cas16(p,o,n)
+ #define _aso_inc16(p) (atomic_add_16_nv(p,1)-1)
+ #define _aso_dec16(p) (atomic_add_16_nv(p,-1)+1)
+ #define _aso_cas32(p,o,n) cas32(p,o,n)
+ #define _aso_inc32(p) (atomic_add_32_nv(p,1)-1)
+ #define _aso_dec32(p) (atomic_add_32_nv(p,-1)+1)
+ #define _aso_cas64(p,o,n) cas64(p,o,n)
+ #define _aso_inc64(p) (atomic_add_64_nv(p,1)-1)
+ #define _aso_dec64(p) (atomic_add_64_nv(p,-1)+1)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_casptr(p,o,n) ((void*)cas64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
+ #else
+ #define _aso_casptr(p,o,n) ((void*)cas32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ #endif
+ }
+elif aso note{ <atomic.h> just cas64 }end link{
+ #include "FEATURE/common"
+ #include <atomic.h>
+ int main()
+ {
+ uint64_t i = 0;
+ uint32_t j = 1;
+ uint16_t k = 1;
+ uint8_t l = 1;
+ return cas64(&i, 0, 1) != 0 || cas32(&j, 0, 1) != 0 || cas16(&k, 0, 1) != 0 || cas8(&l, 0, 1) != 0;
+ }
+ }end && {
+ #include <atomic.h>
+ #define _aso_cas8(p,o,n) cas8(p,o,n)
+ #define _aso_cas16(p,o,n) cas16(p,o,n)
+ #define _aso_cas32(p,o,n) cas32(p,o,n)
+ #define _aso_cas64(p,o,n) cas64(p,o,n)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_casptr(p,o,n) ((void*)cas64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
+ #else
+ #define _aso_casptr(p,o,n) ((void*)cas32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ #endif
+ }
+elif aso note{ <atomic.h> cas32 }end link{
+ #include "FEATURE/common"
+ #include <atomic.h>
+ int main()
+ {
+ uint32_t i = 0;
+ return cas32(&i, 0, 1) != 0 || (atomic_add_32_nv(&i, 1) - 1) != 1;
+ }
+ }end && {
+ #include <atomic.h>
+ #define _aso_cas8(p,o,n) cas8(p,o,n)
+ #define _aso_inc8(p) (atomic_add_8_nv(p,1)-1)
+ #define _aso_dec8(p) (atomic_add_8_nv(p,-1)+1)
+ #define _aso_cas16(p,o,n) cas16(p,o,n)
+ #define _aso_inc16(p) (atomic_add_16_nv(p,1)-1)
+ #define _aso_dec16(p) (atomic_add_16_nv(p,-1)+1)
+ #define _aso_cas32(p,o,n) cas32(p,o,n)
+ #define _aso_inc32(p) (atomic_add_32_nv(p,1)-1)
+ #define _aso_dec32(p) (atomic_add_32_nv(p,-1)+1)
+ #define _aso_casptr(p,o,n) ((void*)cas32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ }
+elif aso note{ <atomic.h> just cas32 }end link{
+ #include "FEATURE/common"
+ #include <atomic.h>
+ int main()
+ {
+ uint32_t j = 1;
+ uint16_t k = 1;
+ uint8_t l = 1;
+ return cas32(&j, 0, 1) != 0 || cas16(&k, 0, 1) != 0 || cas8(&l, 0, 1) != 0;
+ }
+ }end && {
+ #include <atomic.h>
+ #define _aso_cas8(p,o,n) cas8(p,o,n)
+ #define _aso_cas16(p,o,n) cas16(p,o,n)
+ #define _aso_cas32(p,o,n) cas32(p,o,n)
+ #define _aso_casptr(p,o,n) ((void*)cas32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ }
+elif aso note{ winix Interlocked }end link{
+ #include <windows.h>
+ int main()
+ {
+ LONG i = 0;
+ LONGLONG j = 0;
+ return InterlockedCompareExchange(&i, 1, 0) != 0 ||
+ InterlockedIncrement(&i) != 1 ||
+ InterlockedDecrement(&i) != 2;
+ }
+ }end && {
+ #include <ast_windows.h>
+ #define _aso_cas32(p,o,n) InterlockedCompareExchange((LONG volatile*)p,n,o)
+ #define _aso_inc32(p) (InterlockedIncrement((LONG volatile*)p)-1)
+ #define _aso_dec32(p) (InterlockedDecrement((LONG volatile*)p)+1)
+ #if _X64
+ #define _aso_cas64(p,o,n) InterlockedCompareExchange64((LONGLONG volatile*)p,n,o)
+ #define _aso_inc64(p) (InterlockedIncrement64((LONGLONG volatile*)p)-1)
+ #define _aso_dec64(p) (InterlockedDecrement64((LONGLONG volatile*)p)+1)
+ #define _aso_casptr(p,o,n) ((void*)InterlockedCompareExchange64((LONGLONG volatile*)p,(LONGLONG)n,(LONGLONG)o))
+ #else
+ #if _BLD_posix
+ #include "dl.h"
+ typedef struct LL_s
+ {
+ LONG a;
+ LONG b;
+ } LL_t;
+ typedef union
+ {
+ LONGLONG i;
+ LL_t ll;
+ } LL_u;
+
+ #define _aso_cas64(p,o,n) _aso_InterlockedCompareExchange64((LONGLONG volatile*)p,n,o)
+ static LONGLONG _aso_InterlockedCompareExchange64_init(LONGLONG volatile*, LONGLONG, LONGLONG);
+ typedef LONGLONG (*_aso_InterlockedCompareExchange64_f)(LONGLONG volatile*, LONGLONG, LONGLONG);
+ static _aso_InterlockedCompareExchange64_f _aso_InterlockedCompareExchange64 = _aso_InterlockedCompareExchange64_init;
+ static LONGLONG _aso_InterlockedCompareExchange64_32(LONGLONG volatile* p, LONGLONG o, LONGLONG n)
+ {
+ LL_t* lp = (LL_t*)p;
+ LL_t* op = (LL_t*)&o;
+ LL_t* np = (LL_t*)&n;
+ LONGLONG r;
+
+ r = *p;
+ if (_aso_cas32(&lp->a, op->a, np->a) == op->a)
+ {
+ if (_aso_cas32(&lp->b, op->b, np->b) == op->b)
+ return o;
+ _aso_cas32(&lp->a, np->a, op->a);
+ }
+ return r;
+ }
+ static LONGLONG _aso_InterlockedCompareExchange64_init(LONGLONG volatile* p, LONGLONG o, LONGLONG n)
+ {
+ if (!(_aso_InterlockedCompareExchange64 = (_aso_InterlockedCompareExchange64_f)getsymbol(MODULE_kernel, "InterlockedCompareExchange64")))
+ _aso_InterlockedCompareExchange64 = _aso_InterlockedCompareExchange64_32;
+ return _aso_InterlockedCompareExchange64(p, o, n);
+ }
+
+ #define _aso_inc64(p) (_aso_InterlockedIncrement64((LONGLONG volatile*)p)-1)
+ typedef LONGLONG (*_aso_InterlockedIncrement64_f)(LONGLONG volatile*);
+ static LONGLONG _aso_InterlockedIncrement64_init(LONGLONG volatile*);
+ static _aso_InterlockedIncrement64_f _aso_InterlockedIncrement64 = _aso_InterlockedIncrement64_init;
+ static LONGLONG _aso_InterlockedIncrement64_32(LONGLONG volatile* p)
+ {
+ LONGLONG o;
+
+ do
+ {
+ o = *p;
+ } while (_aso_InterlockedCompareExchange64_32(p, o, o + 1) != o);
+ return o;
+ }
+ static LONGLONG _aso_InterlockedIncrement64_init(LONGLONG volatile* p)
+ {
+ if (!(_aso_InterlockedIncrement64 = (_aso_InterlockedIncrement64_f)getsymbol(MODULE_kernel, "InterlockedIncrement64")))
+ _aso_InterlockedIncrement64 = _aso_InterlockedIncrement64_32;
+ return _aso_InterlockedIncrement64(p);
+ }
+
+ #define _aso_dec64(p) (_aso_InterlockedDecrement64((LONGLONG volatile*)p)+1)
+ typedef LONGLONG (*_aso_InterlockedDecrement64_f)(LONGLONG volatile*);
+ static LONGLONG _aso_InterlockedDecrement64_init(LONGLONG volatile*);
+ static _aso_InterlockedDecrement64_f _aso_InterlockedDecrement64 = _aso_InterlockedDecrement64_init;
+ static LONGLONG _aso_InterlockedDecrement64_32(LONGLONG volatile* p)
+ {
+ LONGLONG o;
+
+ do
+ {
+ o = *p;
+ } while (_aso_InterlockedCompareExchange64_32(p, o, o - 1) != o);
+ return o;
+ }
+ static LONGLONG _aso_InterlockedDecrement64_init(LONGLONG volatile* p)
+ {
+ if (!(_aso_InterlockedDecrement64 = (_aso_InterlockedDecrement64_f)getsymbol(MODULE_kernel, "InterlockedDecrement64")))
+ _aso_InterlockedDecrement64 = _aso_InterlockedDecrement64_32;
+ return _aso_InterlockedDecrement64(p);
+ }
+ #endif
+ #define _aso_casptr(p,o,n) ((void*)InterlockedCompareExchange((LONG volatile*)p,(LONG)n,(LONG)o))
+ #endif
+ }
+elif aso note{ aix fetch and add }end link{
+ #include <sys/atomic_op.h>
+ int main()
+ {
+ int i = 0;
+ return fetch_and_add((atomic_p)&i,1);
+ }
+ }end && {
+ #include <sys/atomic_op.h>
+ #define _aso_incint(p) fetch_and_add((atomic_p)p,1)
+ #define _aso_decint(p) fetch_and_add((atomic_p)p,-1)
+ #define _aso_casint(p,o,n) (compare_and_swap((atomic_p)p,(int*)&o,(int)n) ? o : *p)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_casptr(p,o,n) (compare_and_swaplp((atomic_l)p,(long*)&o,(long)n) ? o : *(void**)p)
+ #else
+ #define _aso_casptr(p,o,n) (compare_and_swap((atomic_p)p,(int*)&o,(int)n) ? o : *(void**)p)
+ #endif
+ }
+elif aso note{ mips compare and swap }end link{
+ int main()
+ {
+ int i = 1;
+ return __compare_and_swap(&i, 0, 1) != 1;
+ }
+ }end && {
+ #define _aso_cas32(p,o,n) (__compare_and_swap(p,o,n) ? o : *p)
+ #define _aso_casptr(p,o,n) (__compare_and_swap((long*)p,(long)o,(long)n) ? o : *(void**)p)
+ }
+elif aso note{ i386|i386-64 asm compare and swap }end link{
+ #include "FEATURE/common"
+
+ static uint32_t
+ cas32(uint32_t volatile* p, uint32_t o, uint32_t n)
+ {
+ uint32_t r;
+
+ __asm__ __volatile__ (
+ "lock ; cmpxchg %3,%4"
+ : "=a"(r), "=m"(*p)
+ : "0"(o), "q"(n), "m"(*p)
+ : "memory", "cc"
+ );
+ return r;
+ }
+
+ #if _ast_sizeof_pointer == 8
+
+ static uint64_t
+ cas64(uint64_t volatile* p, uint64_t o, uint64_t n)
+ {
+ uint64_t r;
+
+ __asm__ __volatile__ (
+ "lock ; cmpxchg %3,%4"
+ : "=a"(r), "=m"(*p)
+ : "0"(o), "q"(n), "m"(*p)
+ : "memory", "cc"
+ );
+ return r;
+ }
+
+ #else
+
+ #define cas64(p,o,n) (*(p))
+
+ #endif
+
+ int main()
+ {
+ uint32_t i = 0;
+ uint64_t j = 0;
+ return cas32(&i, 0, 1) || cas64(&j, 0, 1);
+ }
+ }end && {
+ static uint32_t
+ cas32(uint32_t volatile* p, uint32_t o, uint32_t n)
+ {
+ uint32_t r;
+
+ __asm__ __volatile__ (
+ "lock ; cmpxchg %3,%4"
+ : "=a"(r), "=m"(*p)
+ : "0"(o), "q"(n), "m"(*p)
+ : "memory", "cc"
+ );
+ return r;
+ }
+
+ #if _ast_sizeof_pointer == 8
+
+ static uint64_t
+ cas64(uint64_t volatile* p, uint64_t o, uint64_t n)
+ {
+ uint64_t r;
+
+ __asm__ __volatile__ (
+ "lock ; cmpxchg %3,%4"
+ : "=a"(r), "=m"(*p)
+ : "0"(o), "q"(n), "m"(*p)
+ : "memory", "cc"
+ );
+ return r;
+ }
+
+ #endif
+
+ #define _aso_cas32(p,o,n) cas32(p,o,n)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_cas64(p,o,n) cas64(p,o,n)
+ #define _aso_casptr(p,o,n) ((void*)cas64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
+ #else
+ #define _aso_casptr(p,o,n) ((void*)cas32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ #endif
+ }
+elif aso note{ ia64 asm compare and swap }end link{
+ #include "FEATURE/common"
+
+ static uint32_t
+ cas32(uint32_t volatile* p, uint32_t o, uint32_t n)
+ {
+ uint32_t r;
+
+ __asm__ __volatile__ (
+ "zxt4 %3=%3 ;; mov ar.ccv=%3 ;; cmpxchg4.acq %0=%1,%2,ar.ccv"
+ : "=r"(r), "+S"(*p)
+ : "r"(n), "r"(o) : "memory"
+ );
+ return r;
+ }
+
+ static uint64_t
+ cas64(uint64_t volatile* p, uint64_t o, uint64_t n)
+ {
+ uint64_t r;
+
+ __asm__ __volatile__ (
+ "mov ar.ccv=%3 ;; cmpxchg8.acq %0=%1,%2,ar.ccv"
+ : "=r"(r), "+S"(*p)
+ : "r"(n), "r"(o) : "memory"
+ );
+ return r;
+ }
+
+ int main()
+ {
+ uint32_t i = 0;
+ uint64_t j = 0;
+ return cas32(&i, 0, 1) || cas64(&j, 0, 1);
+ }
+ }end && {
+ static uint32_t
+ cas32(uint32_t volatile* p, uint32_t o, uint32_t n)
+ {
+ uint32_t r;
+
+ __asm__ __volatile__ (
+ "zxt4 %3=%3 ;; mov ar.ccv=%3 ;; cmpxchg4.acq %0=%1,%2,ar.ccv"
+ : "=r"(r), "+S"(*p)
+ : "r"(n), "r"(o) : "memory"
+ );
+ return r;
+ }
+
+ static uint64_t
+ cas64(uint64_t volatile* p, uint64_t o, uint64_t n)
+ {
+ uint64_t r;
+
+ __asm__ __volatile__ (
+ "mov ar.ccv=%3 ;; cmpxchg8.acq %0=%1,%2,ar.ccv"
+ : "=r"(r), "+S"(*p)
+ : "r"(n), "r"(o) : "memory"
+ );
+ return r;
+ }
+
+ #define _aso_cas32(p,o,n) cas32(p,o,n)
+ #define _aso_cas64(p,o,n) cas64(p,o,n)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_casptr(p,o,n) ((void*)cas64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
+ #else
+ #define _aso_casptr(p,o,n) ((void*)cas32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ #endif
+ }
+elif aso note{ ppc asm compare and swap }end link{
+ #include "FEATURE/common"
+
+ static uint32_t
+ cas32(uint32_t volatile* p, uint32_t o, uint32_t n)
+ {
+ int r;
+
+ __asm__ __volatile__ (
+ "0: lwarx %0,0,%1 ;"
+ " xor. %0,%3,%0;"
+ " bne 1f;"
+ " stwcx. %2,0,%1;"
+ " bne- 0b;"
+ "1:"
+ : "=&r"(r)
+ : "r"(p), "r"(n), "r"(o)
+ : "cr0", "memory"
+ );
+ __asm__ __volatile__ ("isync" : : : "memory");
+ return r ? *p : o;
+ }
+
+ static uint64_t
+ cas64(uint64_t volatile* p, uint64_t o, uint64_t n)
+ {
+ long r;
+
+ __asm__ __volatile__ (
+ "0: ldarx %0,0,%1 ;"
+ " xor. %0,%3,%0;"
+ " bne 1f;"
+ " stdcx. %2,0,%1;"
+ " bne- 0b;"
+ "1:"
+ : "=&r"(r)
+ : "r"(p), "r"(n), "r"(o)
+ : "cr0", "memory"
+ );
+ __asm__ __volatile__ ("isync" : : : "memory");
+ return r ? *p : o;
+ }
+
+ int main()
+ {
+ uint32_t i = 0;
+ uint64_t j = 0;
+ return cas32(&i, 0, 1) || cas64(&j, 0, 1);
+ }
+ }end && {
+ static uint32_t
+ cas32(uint32_t volatile* p, uint32_t o, uint32_t n)
+ {
+ int r;
+
+ __asm__ __volatile__ (
+ "0: lwarx %0,0,%1 ;"
+ " xor. %0,%3,%0;"
+ " bne 1f;"
+ " stwcx. %2,0,%1;"
+ " bne- 0b;"
+ "1:"
+ : "=&r"(r)
+ : "r"(p), "r"(n), "r"(o)
+ : "cr0", "memory"
+ );
+ __asm__ __volatile__ ("isync" : : : "memory");
+ return r ? *p : o;
+ }
+
+ static uint64_t
+ cas64(uint64_t volatile* p, uint64_t o, uint64_t n)
+ {
+ long r;
+
+ __asm__ __volatile__ (
+ "0: ldarx %0,0,%1 ;"
+ " xor. %0,%3,%0;"
+ " bne 1f;"
+ " stdcx. %2,0,%1;"
+ " bne- 0b;"
+ "1:"
+ : "=&r"(r)
+ : "r"(p), "r"(n), "r"(o)
+ : "cr0", "memory"
+ );
+ __asm__ __volatile__ ("isync" : : : "memory");
+ return r ? *p : o;
+ }
+
+ #define _aso_cas32(p,o,n) cas32(p,o,n)
+ #define _aso_cas64(p,o,n) cas64(p,o,n)
+ #if _ast_sizeof_pointer == 8
+ #define _aso_casptr(p,o,n) ((void*)cas64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
+ #else
+ #define _aso_casptr(p,o,n) ((void*)cas32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
+ #endif
+ }
+endif
diff --git a/usr/src/contrib/ast/src/lib/libast/features/asometh b/usr/src/contrib/ast/src/lib/libast/features/asometh
new file mode 100644
index 0000000000..e61588b39e
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/features/asometh
@@ -0,0 +1,44 @@
+# aso method feature tests
+
+aso fcntl note{ fcntl(F_SETLCK[W]) work }end link{
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+
+ int main()
+ {
+ struct flock lock;
+
+ lock.l_type = F_WRLCK;
+ lock.l_whence = SEEK_SET;
+ lock.l_start = 0;
+ lock.l_len = 1;
+ return fcntl(1, F_SETLKW, &lock) < 0;
+ }
+}end
+
+aso semaphore note{ semget semop semctl work }end link{
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/ipc.h>
+ #include <sys/sem.h>
+
+ int main()
+ {
+ int id;
+ struct sembuf sem;
+
+ if ((id = semget(IPC_PRIVATE, 16, IPC_CREAT|IPC_EXCL|S_IRUSR|S_IWUSR)) < 0)
+ return 1;
+ sem.sem_num = 0;
+ sem.sem_op = 1;
+ sem.sem_flg = 0;
+ if (semop(id, &sem, 1) < 0)
+ return 1;
+ if (semctl(id, 0, IPC_RMID) < 0)
+ return 1;
+ return 0;
+ }
+}end
diff --git a/usr/src/lib/libast/common/features/botch.c b/usr/src/contrib/ast/src/lib/libast/features/botch.c
index 2832100292..d30547d916 100644
--- a/usr/src/lib/libast/common/features/botch.c
+++ b/usr/src/contrib/ast/src/lib/libast/features/botch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/features/ccode b/usr/src/contrib/ast/src/lib/libast/features/ccode
index 0175763008..0175763008 100644
--- a/usr/src/lib/libast/common/features/ccode
+++ b/usr/src/contrib/ast/src/lib/libast/features/ccode
diff --git a/usr/src/lib/libast/common/features/common b/usr/src/contrib/ast/src/lib/libast/features/common
index 75b4b2489e..500ce8701b 100644
--- a/usr/src/lib/libast/common/features/common
+++ b/usr/src/contrib/ast/src/lib/libast/features/common
@@ -2,6 +2,7 @@ iff AST_COMMON
hdr pthread,stdarg,stddef,stdint,inttypes,types,unistd
sys types
typ long.double,size_t,ssize_t
+typ __va_list stdio.h
mac SF_APPEND,SF_CLOSE sys/stat.h sys/socket.h
@@ -68,7 +69,7 @@ cat{
# define _NIL_(x) ((x)0)
#endif
- /* __INLINE__ is the inline keyword */
+ /* __INLINE__, if defined, is the inline keyword */
#if !defined(__INLINE__) && defined(__cplusplus)
# define __INLINE__ inline
#endif
@@ -136,6 +137,21 @@ cat{
#endif
}end
+if tst - note{ <stdarg.h>+<wchar.h> works }end compile{
+ /*<NOSTDIO>*/
+ #include <stdarg.h>
+ #include <wchar.h>
+ }end
+elif tst - note{ explicit <sys/va_list.h> before <stdarg.h>+<wchar.h> }end compile{
+ /*<NOSTDIO>*/
+ #include <sys/va_list.h>
+ #include <stdarg.h>
+ #include <wchar.h>
+ }end {
+ #include <sys/va_list.h>
+ }
+endif
+
tst ast_LL note{ LL numeric suffix supported }end compile{
int i = 1LL;
unsigned int u = 1ULL; /* NOTE: some compilers choke on 1LLU */
@@ -273,6 +289,61 @@ tst - -DN=1 - -DN=2 - -DN=3 - -DN=4 - -DN=5 - -DN=6 - -DN=7 - -DN=8 - -DN=0 outp
}
}end
+tst - output{
+ #include <string.h>
+ #include <sys/types.h>
+
+ #if _X86_ || _X64_
+ #define COND 1
+ #define CONDNAME "_X64_"
+ #else
+ #define COND 0
+ #endif
+
+ #define elementsof(x) (sizeof(x)/sizeof(x[0]))
+
+ static struct
+ {
+ char* name;
+ int size;
+ int cond;
+ } types[] =
+ {
+ "short", sizeof(short), 0,
+ "int", sizeof(int), 0,
+ "long", sizeof(long), 0,
+ "size_t", sizeof(size_t), 0,
+ "pointer", sizeof(void*), COND * 4,
+ "float", sizeof(float), 0,
+ "double", sizeof(double), 0,
+ #ifdef _typ_long_double
+ "long_double", sizeof(long double), 0,
+ #endif
+ };
+
+ int
+ main()
+ {
+ register int t;
+
+ for (t = 0; t < elementsof(types); t++)
+ #if COND
+ if (types[t].cond)
+ {
+ printf("#if %s\n", CONDNAME);
+ printf("#define _ast_sizeof_%s%s %d /* sizeof(%s) */\n", types[t].name, strlen(types[t].name) < 4 ? "\t" : "", types[t].cond * 2, types[t].name);
+ printf("#else\n");
+ printf("#define _ast_sizeof_%s%s %d /* sizeof(%s) */\n", types[t].name, strlen(types[t].name) < 4 ? "\t" : "", types[t].cond, types[t].name);
+ printf("#endif\n");
+ }
+ else
+ #endif
+ printf("#define _ast_sizeof_%s%s %d /* sizeof(%s) */\n", types[t].name, strlen(types[t].name) < 4 ? "\t" : "", types[t].size, types[t].name);
+ printf("\n");
+ return 0;
+ }
+}end
+
tst - -DN=1 - -DN=0 output{
#define _BYTESEX_H
@@ -374,11 +445,24 @@ typ uint64_t stdint.h inttypes.h no{
#endif
}end
typ intmax_t stdint.h inttypes.h no{
+ #undef _typ_intmax_t
+ #define _typ_intmax_t 1
typedef _ast_intmax_t intmax_t;
}end
typ uintmax_t stdint.h inttypes.h no{
+ #undef _typ_uintmax_t
+ #define _typ_uintmax_t 1
typedef unsigned _ast_intmax_t uintmax_t;
}end
+typ uintptr_t stdint.h inttypes.h no{
+ #undef _typ_uintptr_t
+ #define _typ_uintptr_t 1
+ #if _ast_sizeof_pointer == 8 && defined(_ast_int8_t)
+ typedef unsigned _ast_int8_t uintptr_t;
+ #else
+ typedef unsigned _ast_int4_t uintptr_t;
+ #endif
+}end
tst - -DTRY=1 - -DTRY=1 -Dvoid=char - -DTRY=2 - -DTRY=3 - -DTRY=4 output{
#if _STD_ && _hdr_stdarg
diff --git a/usr/src/lib/libast/common/features/dirent b/usr/src/contrib/ast/src/lib/libast/features/dirent
index 3e7d8d3900..a36d35a98f 100644
--- a/usr/src/lib/libast/common/features/dirent
+++ b/usr/src/contrib/ast/src/lib/libast/features/dirent
@@ -73,7 +73,7 @@ cat <<!
#ifndef _AST_STD_H
- #include $_nxt_dirent /* the native <dirent.h> */
+ #include ${_nxt_dirent-_nxt_dirent} /* the native <dirent.h> */
#else
@@ -89,7 +89,7 @@ cat <<!
#undef __ino64_t
#define __ino64_t int64_t
- #include $_nxt_dirent /* the native <dirent.h> */
+ #include ${_nxt_dirent-_nxt_dirent} /* the native <dirent.h> */
#undef __ino64_t
#define __ino64_t __ino64_t
@@ -120,7 +120,7 @@ cat <<!
#ifndef _AST_STD_H
- #include $_nxt_dirent /* the native <dirent.h> */
+ #include ${_nxt_dirent-_nxt_dirent} /* the native <dirent.h> */
#else
@@ -133,7 +133,7 @@ cat <<!
#undef off_t
#endif
- #include $_nxt_dirent /* the native <dirent.h> */
+ #include ${_nxt_dirent-_nxt_dirent} /* the native <dirent.h> */
#if _typ_off64_t
#define off_t off64_t
@@ -161,7 +161,7 @@ cat <<!
#ifndef _DIRENT_H
- #include $_nxt_dirent /* the native <dirent.h> */
+ #include ${_nxt_dirent-_nxt_dirent} /* the native <dirent.h> */
#ifndef _DIRENT_H
#define _DIRENT_H
diff --git a/usr/src/lib/libast/common/features/eaccess b/usr/src/contrib/ast/src/lib/libast/features/eaccess
index bf9710a2e6..bf9710a2e6 100644
--- a/usr/src/lib/libast/common/features/eaccess
+++ b/usr/src/contrib/ast/src/lib/libast/features/eaccess
diff --git a/usr/src/lib/libast/common/features/errno b/usr/src/contrib/ast/src/lib/libast/features/errno
index 271fe6d174..271fe6d174 100644
--- a/usr/src/lib/libast/common/features/errno
+++ b/usr/src/contrib/ast/src/lib/libast/features/errno
diff --git a/usr/src/lib/libast/common/features/fcntl.c b/usr/src/contrib/ast/src/lib/libast/features/fcntl.c
index e70685836f..cfa4636438 100644
--- a/usr/src/lib/libast/common/features/fcntl.c
+++ b/usr/src/contrib/ast/src/lib/libast/features/fcntl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -219,6 +219,11 @@ main()
}
printf("\n");
#endif
+#ifdef F_DUPFD_CLOEXEC
+ printf("#define F_dupfd_cloexec F_DUPFD_CLOEXEC\n");
+#else
+ printf("#define F_dupfd_cloexec F_DUPFD\n");
+#endif
#ifndef O_APPEND
#define NEED_O 1
@@ -315,6 +320,11 @@ main()
#ifndef O_BINARY
printf("#define O_BINARY 0\n");
#endif
+#ifdef O_CLOEXEC
+ printf("#define O_cloexec O_CLOEXEC\n");
+#else
+ printf("#define O_cloexec 0\n");
+#endif
#ifndef O_TEMPORARY
printf("#define O_TEMPORARY 0\n");
#endif
diff --git a/usr/src/lib/libast/common/features/float b/usr/src/contrib/ast/src/lib/libast/features/float
index de27bb235b..f789359f6a 100644
--- a/usr/src/lib/libast/common/features/float
+++ b/usr/src/contrib/ast/src/lib/libast/features/float
@@ -1,8 +1,40 @@
set prototyped
set nooptimize
-set stdio FEATURE/isoc99
+set stdio FEATURE/standards
hdr float,limits,math,values
-lib fpclassify,frexp,frexpl,ldexp,ldexpl,finite,finitel,isinf,isinfl,isnan,isnanl,signbit,copysign,copysignl FEATURE/isoc99 math.h -lm
+lib,npt frexp,frexpl,ldexp,ldexpl,finite,finitel,isinfl,isnanl,copysign,copysignl FEATURE/standards math.h -lm
+lib fpclassify -lm note{ fpclassify present and works }end link{
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <math.h>
+ int main() { return fpclassify(-0.0); }
+ }end
+lib isinf -lm note{ isinf present and works }end link{
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <math.h>
+ int main() { return isinf(-0.0); }
+ }end
+lib isnan -lm note{ isnan present and works }end link{
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <math.h>
+ int main() { return isnan(-0.0); }
+ }end
+lib signbit -lm note{ signbit present and works }end link{
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <math.h>
+ int main() { return signbit(-0.0); }
+ }end
tst ast_no_um2fm note{ no unsigned intmax => floatmax cast }end nolink{
#include "FEATURE/common"
@@ -847,16 +879,16 @@ tst - note{ missing floating point limits }end output{
#endif
printf("\n");
- #if !_lib_frexp
+ #if !_lib_frexp || _npt_frexp
printf("extern double frexp(double, int*);\n");
#endif
- #if !_lib_frexpl
+ #if !_lib_frexpl || _npt_frexpl
printf("extern _ast_fltmax_t frexpl(_ast_fltmax_t, int*);\n");
#endif
- #if !_lib_ldexp
+ #if !_lib_ldexp || _npt_ldexp
printf("extern double ldexp(double, int);\n");
#endif
- #if !_lib_ldexpl
+ #if !_lib_ldexpl || _npt_ldexpl
printf("extern _ast_fltmax_t ldexpl(_ast_fltmax_t, int);\n");
#endif
@@ -961,6 +993,7 @@ tst - -DSCAN=1 - -lm -DSTRTO=1 - -DMAC=1 - -DDIV=1 - -DEXP=1 - -DADD=1 - -DMPY=1
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
+ #include <strings.h>
#if _hdr_float
#include <float.h>
#endif
@@ -1062,6 +1095,7 @@ tst - -DSCAN=1 - -lm -DSTRTO=1 - -DMAC=1 - -DDIV=1 - -DEXP=1 - -DADD=1 - -DMPY=1
char* e;
#endif
+ bzero(&f, sizeof (f));
#if SCAN
if (sscanf(NAN, "%Lg", &f) != 1)
return 1;
@@ -1071,6 +1105,7 @@ tst - -DSCAN=1 - -lm -DSTRTO=1 - -DMAC=1 - -DDIV=1 - -DEXP=1 - -DADD=1 - -DMPY=1
return 1;
#endif
list("ldbl", "nan", &f, sizeof(f));
+ bzero(&f, sizeof (f));
#if SCAN
if (sscanf(INF, "%Lg", &f) != 1)
return 1;
diff --git a/usr/src/lib/libast/common/features/fs b/usr/src/contrib/ast/src/lib/libast/features/fs
index 4cc558e6a2..3caeedb2c9 100644
--- a/usr/src/lib/libast/common/features/fs
+++ b/usr/src/contrib/ast/src/lib/libast/features/fs
@@ -63,7 +63,6 @@ extern mkdir int (const char*, mode_t)
extern mkfifo int (const char*, mode_t)
extern mknod int (const char*, mode_t, dev_t)
extern stat int (const char*, struct stat*)
-extern mkfifo mode_t (mode_t)
define FS_default "ufs"
@@ -131,7 +130,7 @@ macro{
hdr mntent,mnttab stdio.h
sys mntent,mnttab stdio.h
-sys fs_types,mount,statfs,statvfs,vfs,vmount
+sys fs_types,mount,statfs,statvfs,vfs,vmount sys/param.h sys/ucred.h
mem mnttab.mt_dev,mnttab.mt_filsys,mnttab.mt_fstyp sys/types.h mnttab.h
mem mntent.mnt_opts,w_mntent.mnt_opts,mnttab.mnt_opts sys/types.h stdio.h mntent.h sys/mntent.h
@@ -144,7 +143,7 @@ ary f_reserved7 sys/types.h sys/statvfs.h note{ statvfs.f_reserved7 can double f
int f(vp)struct statvfs* vp;{return vp->f_reserved7[0] = 1;}
}end
-lib getmntent,getmntinfo,mntctl,mntopen,mntread,mntclose,setmntent
+lib getfsstat,getmntent,getmntinfo,mntctl,mntopen,mntread,mntclose,setmntent
lib w_getmntent
lib statfs,statvfs
@@ -167,6 +166,17 @@ lib getmntinfo_statvfs note{ getmntinfo uses statvfs -- since when? }end compile
}
}end
+lib getfsstat_statvfs note{ getfsstat uses statvfs -- just in case it is confused like getmntinfo }end compile{
+ #include <sys/types.h>
+ #include <sys/mount.h>
+ int
+ gfs(struct statvfs* fs)
+ {
+ fs->f_flag = 0;
+ return getfsstat(fs, sizeof(struct statvfs), MNT_WAIT);
+ }
+}end
+
cat{
#if _sys_statvfs
#include <sys/statvfs.h>
@@ -232,6 +242,10 @@ ary st_spare4 sys/types.h sys/stat.h note{ stat.st_spare4 is an array }end compi
int f(st)struct stat* st;{return st->st_spare4[0] = 1;}
}end
+ary st_extra sys/types.h sys/stat.h note{ stat.st_extra is an array }end compile{
+ int f(st)struct stat* st;{return st->st_extra[0] = 1;}
+}end
+
ary st_pad4 sys/types.h sys/stat.h note{ stat.st_pad4 is an array }end compile{
int f(st)struct stat* st;{return st->st_pad4[0] = 1;}
}end
diff --git a/usr/src/lib/libast/common/features/hack b/usr/src/contrib/ast/src/lib/libast/features/hack
index 2be7af9822..2be7af9822 100644
--- a/usr/src/lib/libast/common/features/hack
+++ b/usr/src/contrib/ast/src/lib/libast/features/hack
diff --git a/usr/src/lib/libast/common/features/iconv b/usr/src/contrib/ast/src/lib/libast/features/iconv
index 9f5f4c8962..92fd62f334 100644
--- a/usr/src/lib/libast/common/features/iconv
+++ b/usr/src/contrib/ast/src/lib/libast/features/iconv
@@ -34,11 +34,16 @@ tst output{
printf("#include <%s> /* the native iconv.h */\n", _nxt_iconv_str);
#endif
printf("\n");
- printf("#define CC_ICONV (-1)\n");
- printf("#define CC_UCS (-2)\n");
- printf("#define CC_SCU (-3)\n");
- printf("#define CC_UTF (-4)\n");
- printf("#define CC_UME (-5)\n");
+ printf("#define ICONV_VERSION 20110111L\n");
+ printf("\n");
+ printf("#define ICONV_FATAL 0x02\n");
+ printf("#define ICONV_OMIT 0x04\n");
+ printf("\n");
+ printf("#define CC_ICONV (-1)\n");
+ printf("#define CC_UCS (-2)\n");
+ printf("#define CC_SCU (-3)\n");
+ printf("#define CC_UTF (-4)\n");
+ printf("#define CC_UME (-5)\n");
printf("\n");
#if _lib_iconv_open
lib = "_ast_";
@@ -68,10 +73,23 @@ tst output{
lib = "";
#endif
printf("\n");
+ printf("typedef int (*Iconv_error_f)(void*, void*, int, ...);\n");
+ printf("\n");
+ printf("typedef struct Iconv_disc_s\n");
+ printf("{\n");
+ printf(" uint32_t version;\n");
+ printf(" Iconv_error_f errorf;\n");
+ printf(" size_t errors;\n");
+ printf(" uint32_t flags;\n");
+ printf(" int fill;\n");
+ printf("} Iconv_disc_t;\n");
+ printf("\n");
printf("typedef Ccmap_t %siconv_list_t;\n", lib);
printf("typedef void* %siconv_t;\n", lib);
printf("typedef size_t (*%siconv_f)(%siconv_t, char**, size_t*, char**, size_t*);\n", lib, lib);
printf("\n");
+ printf("#define iconv_init(d,e) (memset(d,0,sizeof(*(d))),(d)->version=ICONV_VERSION,(d)->errorf=(Iconv_error_f)(e),(d)->fill=(-1))\n");
+ printf("\n");
printf("#if _BLD_ast && defined(__EXPORT__)\n");
printf("#define extern __EXPORT__\n");
printf("#endif\n");
@@ -82,12 +100,12 @@ tst output{
printf("extern %siconv_list_t* %siconv_list(%siconv_list_t*);\n", lib, lib, lib);
printf("extern int %siconv_name(const char*, char*, size_t);\n", lib);
printf("#if _SFIO_H\n");
- printf("extern ssize_t %siconv_move(%siconv_t, Sfio_t*, Sfio_t*, size_t, size_t*);\n", lib, lib);
- printf("extern ssize_t %siconv_write(%siconv_t, Sfio_t*, char**, size_t*, size_t*);\n", lib, lib);
+ printf("extern ssize_t %siconv_move(%siconv_t, Sfio_t*, Sfio_t*, size_t, Iconv_disc_t*);\n", lib, lib);
+ printf("extern ssize_t %siconv_write(%siconv_t, Sfio_t*, char**, size_t*, Iconv_disc_t*);\n", lib, lib);
printf("#else\n");
printf("#if _SFSTDIO_H\n");
- printf("extern ssize_t %siconv_move(%siconv_t, FILE*, FILE*, size_t, size_t*);\n", lib, lib);
- printf("extern ssize_t %siconv_write(%siconv_t, FILE*, char**, size_t*, size_t*);\n", lib, lib);
+ printf("extern ssize_t %siconv_move(%siconv_t, FILE*, FILE*, size_t, Iconv_disc_t*);\n", lib, lib);
+ printf("extern ssize_t %siconv_write(%siconv_t, FILE*, char**, size_t*, Iconv_disc_t*);\n", lib, lib);
printf("#endif\n");
printf("#endif\n");
printf("\n");
diff --git a/usr/src/lib/libast/common/features/lib b/usr/src/contrib/ast/src/lib/libast/features/lib
index aeaf9b786b..0e3e330571 100644
--- a/usr/src/lib/libast/common/features/lib
+++ b/usr/src/contrib/ast/src/lib/libast/features/lib
@@ -3,7 +3,7 @@ ref -D_def_map_ast=1
cmd universe
hdr dirent,direntry,filio,fmtmsg,fnmatch,jioctl,libgen,limits
-hdr locale,ndir,nl_types,process,spawn,syslog,utime,vfork,wctype
+hdr locale,ndir,nl_types,process,spawn,syslog,utime,vfork
hdr wchar note{ <wchar.h> and isw*() really work }end execute{
#include <wchar.h>
int
@@ -13,6 +13,7 @@ hdr wchar note{ <wchar.h> and isw*() really work }end execute{
return iswalnum(w) == 0;
}
}end
+hdr wctype wchar.h
dat _tzname,tzname
@@ -52,7 +53,7 @@ mem inheritance.pgroup spawn.h
sys dir,filio,jioctl,localedef,ptem,resource
sys socket,stream,systeminfo,universe,vfork
-typ off64_t -D_LARGEFILE64_SOURCE
+typ ino64_t,off64_t -D_LARGEFILE64_SOURCE
typ struct.dirent64 -D_LARGEFILE64_SOURCE dirent.h
tst tst_errno note{ errno can be assigned }end link{
@@ -135,7 +136,7 @@ tst lib_poll_notimer note{ poll with no fds ignores timeout }end execute{
}
}end
-tst lib_select note{ select() has standard 5 arg interface }end link{
+tst lib_select sys/select.h note{ select() has standard 5 arg interface }end link{
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
@@ -152,6 +153,21 @@ tst lib_select note{ select() has standard 5 arg interface }end link{
}
}end
+tst sys_select note{ select() requires <sys/select.h> }end link{
+ #include <sys/select.h>
+ int
+ main()
+ { struct timeval tmb;
+ fd_set rd;
+ FD_ZERO(&rd);
+ FD_SET(0,&rd);
+ tmb.tv_sec = 0;
+ tmb.tv_usec = 0;
+ select(1,&rd,(fd_set*)0,(fd_set*)0,&tmb);
+ return 0;
+ }
+}end
+
tst pipe_rw note{ full duplex pipes }end execute{
_BEGIN_EXTERNS_
extern int pipe _ARG_((int*));
@@ -233,11 +249,11 @@ tst lib_posix_spawn unistd.h stdlib.h spawn.h -Dfork=______fork note{ posix_spaw
#include <signal.h>
#include <fcntl.h>
#include <string.h>
- #undef fork
/* if it uses fork() why bother? */
- pid_t fork _ARG_((void)) { return -1; }
- pid_t _fork _ARG_((void)) { return -1; }
- pid_t __fork _ARG_((void)) { return -1; }
+ #undef fork
+ pid_t fork _ARG_((void)) { NOTE("uses fork()"); return -1; }
+ pid_t _fork _ARG_((void)) { NOTE("uses _fork()"); return -1; }
+ pid_t __fork _ARG_((void)) { NOTE("uses __fork()"); return -1; }
int
main(argc, argv)
int argc;
@@ -254,40 +270,86 @@ tst lib_posix_spawn unistd.h stdlib.h spawn.h -Dfork=______fork note{ posix_spaw
_exit(signal(SIGHUP, SIG_DFL) != SIG_IGN);
signal(SIGHUP, SIG_IGN);
if (posix_spawnattr_init(&attr))
+ {
+ NOTE("posix_spawnattr_init() FAILED");
_exit(0);
+ }
if (posix_spawnattr_setpgroup(&attr, 0))
+ {
+ NOTE("posix_spawnattr_setpgroup() FAILED");
_exit(0);
+ }
if (posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETPGROUP))
+ {
+ NOTE("posix_spawnattr_setflags() FAILED");
_exit(0);
+ }
/* first try an a.out and verify that SIGHUP is ignored */
cmd[0] = argv[0];
cmd[1] = "test";
cmd[2] = 0;
if (posix_spawn(&pid, cmd[0], 0, &attr, cmd, 0))
+ {
+ NOTE("posix_spawn() FAILED");
_exit(0);
+ }
status = 1;
- if (wait(&status) < 0 || status != 0)
+ if (wait(&status) < 0)
+ {
+ NOTE("wait() FAILED");
+ _exit(0);
+ }
+ if (status != 0)
+ {
+ NOTE("SIGHUP ignored in parent not ignored in child");
_exit(0);
- /* passing ENOEXEC to the shell is bogus */
+ }
+ /* must return exec-type errors or its useless to us *unless* there is no [v]fork() */
n = strlen(cmd[0]);
if (n >= (sizeof(tmp) - 3))
+ {
+ NOTE("test executable path too long");
_exit(0);
+ }
strcpy(tmp, cmd[0]);
tmp[n] = '.';
tmp[n+1] = 's';
tmp[n+2] = 'h';
tmp[n+3] = 0;
- if (close(open(tmp, O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO)) < 0 || chmod(tmp, S_IRWXU|S_IRWXG|S_IRWXO) < 0)
+ if ((n = open(tmp, O_CREAT|O_WRONLY, S_IRWXU|S_IRWXG|S_IRWXO)) < 0 ||
+ chmod(tmp, S_IRWXU|S_IRWXG|S_IRWXO) < 0 ||
+ write(n, "exit 99\n", 8) != 8 ||
+ close(n) < 0)
+ {
+ NOTE("test script create FAILED");
_exit(0);
+ }
cmd[0] = tmp;
- n = 0;
+ n = 0; /* 0 means reject */
pid = -1;
if (posix_spawn(&pid, cmd[0], 0, &attr, cmd, 0))
+ {
n = 2;
+ NOTE("ENOEXEC produces posix_spawn() error (BEST)");
+ }
+ else if (pid == -1)
+ NOTE("ENOEXEC returns pid == -1");
+ else if (wait(&status) != pid)
+ NOTE("ENOEXEC produces no child process");
+ else if (!WIFEXITED(status))
+ NOTE("ENOEXEC produces signal exit");
else
{
- n = pid != -1 && waitpid(pid, &status, WNOHANG|WNOWAIT) == pid && ((status>>8)&0x7f) == 127;
- wait(&status);
+ status = WEXITSTATUS(status);
+ if (status == 127)
+ {
+ n = 1;
+ NOTE("ENOEXEC produces exit status 127 (GOOD)");
+ }
+ else if (status == 99)
+ NOTE("ENOEXEC invokes sh");
+ else if (status == 0)
+ NOTE("ENOEXEC reports no error");
}
_exit(n);
}
@@ -319,7 +381,7 @@ tst lib_spawn_mode unistd.h stdlib.h note{ first spawn arg is mode and it works
}
}end
-tst stream_peek note{ ioctl(I_PEEK) works }end execute{
+tst stream_peek note{ ioctl(I_PEEK) works on pipe() }end execute{
#include <sys/types.h>
#include <unistd.h>
#include <stropts.h>
@@ -339,7 +401,7 @@ tst stream_peek note{ ioctl(I_PEEK) works }end execute{
}
}end
-tst socket_peek note{ recv(MSG_PEEK) works }end execute{
+tst socket_peek note{ recv(MSG_PEEK) works on socketpair() }end execute{
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/usr/src/lib/libast/common/features/libpath.sh b/usr/src/contrib/ast/src/lib/libast/features/libpath.sh
index a722ea86a4..b3809fda7e 100644
--- a/usr/src/lib/libast/common/features/libpath.sh
+++ b/usr/src/contrib/ast/src/lib/libast/features/libpath.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1985-2010 AT&T Intellectual Property #
+# Copyright (c) 1985-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
diff --git a/usr/src/lib/libast/common/features/limits.c b/usr/src/contrib/ast/src/lib/libast/features/limits.c
index 2dee5ea32b..c6e82df0a3 100644
--- a/usr/src/lib/libast/common/features/limits.c
+++ b/usr/src/contrib/ast/src/lib/libast/features/limits.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/features/locale b/usr/src/contrib/ast/src/lib/libast/features/locale
new file mode 100644
index 0000000000..ffd19889ab
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/features/locale
@@ -0,0 +1,28 @@
+tst - note{ canonical UTF-8 name }end run{
+ ifs=$IFS
+ str=
+ sys=
+ for i in `PATH=/bin:/usr/bin:$PATH locale -a | grep -i '^[^C].*\.UTF[-8]*$'`
+ do IFS=.
+ set '' $i
+ IFS=$ifs
+ case $3 in
+ UTF-8) str=$3
+ break
+ ;;
+ *) if $SHELL -c "LC_CTYPE=$2.UTF-8 PATH=/bin:/usr/bin:$PATH locale LC_CTYPE | grep -i utf.*8" >/dev/null 2>&1
+ then str=UTF-8
+ break
+ fi
+ ;;
+ esac
+ sys=$3
+ done
+ case $str in
+ '') str=$sys ;;
+ esac
+ case $str in
+ '') echo "#define _locale_utf8_str 0" ;;
+ *) echo "#define _locale_utf8_str \"$str\"" ;;
+ esac
+}end
diff --git a/usr/src/lib/libast/common/features/map.c b/usr/src/contrib/ast/src/lib/libast/features/map.c
index d7fcdd2a43..52c35aa706 100644
--- a/usr/src/lib/libast/common/features/map.c
+++ b/usr/src/contrib/ast/src/lib/libast/features/map.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -33,6 +33,7 @@
#include "FEATURE/options"
#include "FEATURE/vmalloc"
#include "FEATURE/eaccess"
+#include "FEATURE/api"
#if _opt_map_libc && !defined(_map_libc)
#define _map_libc 1
@@ -537,6 +538,27 @@ main()
printf("#endif\n");
#endif
#endif
+
+ /*
+ * finally some features/api mediation
+ */
+
+#if defined(_API_ast_MAP) && _map_libc
+ {
+ register const char* s;
+ register const char* t;
+
+ static const char map[] = _API_ast_MAP;
+
+ printf("\n");
+ t = map;
+ do
+ {
+ for (s = t; *t && *t != ' '; t++);
+ printf("#define %-.*s _ast_%-.*s\n", t - s, s, t - s, s);
+ } while (*t++);
+ }
+#endif
printf("\n");
printf("#undef extern\n");
return 0;
diff --git a/usr/src/lib/libast/common/features/mmap b/usr/src/contrib/ast/src/lib/libast/features/mmap
index 41ac44e7ea..41ac44e7ea 100644
--- a/usr/src/lib/libast/common/features/mmap
+++ b/usr/src/contrib/ast/src/lib/libast/features/mmap
diff --git a/usr/src/lib/libast/common/features/mode.c b/usr/src/contrib/ast/src/lib/libast/features/mode.c
index fb6ef86e0a..68b5e685cd 100644
--- a/usr/src/lib/libast/common/features/mode.c
+++ b/usr/src/contrib/ast/src/lib/libast/features/mode.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/features/ndbm b/usr/src/contrib/ast/src/lib/libast/features/ndbm
index d12d15ced9..d12d15ced9 100644
--- a/usr/src/lib/libast/common/features/ndbm
+++ b/usr/src/contrib/ast/src/lib/libast/features/ndbm
diff --git a/usr/src/lib/libast/common/features/nl_types b/usr/src/contrib/ast/src/lib/libast/features/nl_types
index 02cae3e695..02cae3e695 100644
--- a/usr/src/lib/libast/common/features/nl_types
+++ b/usr/src/contrib/ast/src/lib/libast/features/nl_types
diff --git a/usr/src/lib/libast/common/features/omitted b/usr/src/contrib/ast/src/lib/libast/features/omitted
index 1e4eca422e..1e4eca422e 100644
--- a/usr/src/lib/libast/common/features/omitted
+++ b/usr/src/contrib/ast/src/lib/libast/features/omitted
diff --git a/usr/src/lib/libast/common/features/options b/usr/src/contrib/ast/src/lib/libast/features/options
index 500bd63ae6..500bd63ae6 100644
--- a/usr/src/lib/libast/common/features/options
+++ b/usr/src/contrib/ast/src/lib/libast/features/options
diff --git a/usr/src/lib/libast/common/features/param.sh b/usr/src/contrib/ast/src/lib/libast/features/param.sh
index 4842ffe497..7d4a856fdf 100644
--- a/usr/src/lib/libast/common/features/param.sh
+++ b/usr/src/contrib/ast/src/lib/libast/features/param.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1985-2010 AT&T Intellectual Property #
+# Copyright (c) 1985-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
diff --git a/usr/src/lib/libast/common/features/preroot.sh b/usr/src/contrib/ast/src/lib/libast/features/preroot.sh
index bbc99392b9..40ac2fc146 100644
--- a/usr/src/lib/libast/common/features/preroot.sh
+++ b/usr/src/contrib/ast/src/lib/libast/features/preroot.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1985-2010 AT&T Intellectual Property #
+# Copyright (c) 1985-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
diff --git a/usr/src/contrib/ast/src/lib/libast/features/prog b/usr/src/contrib/ast/src/lib/libast/features/prog
new file mode 100644
index 0000000000..365ce88eef
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/features/prog
@@ -0,0 +1,12 @@
+lib getexecname,_NSGetExecutablePath
+
+tst run{
+ for p in /proc/self/exe /proc/self/path/a.out
+ do if test -e $p
+ then echo "#define _PROC_PROG \"$p\""
+ break
+ fi
+ done
+}end
+
+_hdr_macho_o_dyld = hdr mach-o/dyld
diff --git a/usr/src/lib/libast/common/features/sfinit.c b/usr/src/contrib/ast/src/lib/libast/features/sfinit.c
index 71a7c100e2..ccd0527511 100644
--- a/usr/src/lib/libast/common/features/sfinit.c
+++ b/usr/src/contrib/ast/src/lib/libast/features/sfinit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/features/sfio b/usr/src/contrib/ast/src/lib/libast/features/sfio
index 6129a16c41..901935a974 100644
--- a/usr/src/lib/libast/common/features/sfio
+++ b/usr/src/contrib/ast/src/lib/libast/features/sfio
@@ -4,6 +4,16 @@ sys filio,ioctl
lib qfrexp,qldexp
key signed
+tst - note{ number of bits in pointer }end output{
+ #include <stdio.h>
+ int
+ main()
+ {
+ printf("#define _ptr_bits %d\n", sizeof(char*) * 8);
+ return 0;
+ }
+}end
+
tst tmp_rmfail note{ open files cannot be removed }end execute{
#include <string.h>
#include <time.h>
diff --git a/usr/src/lib/libast/common/features/sig.sh b/usr/src/contrib/ast/src/lib/libast/features/sig.sh
index 450f5c7c1b..706372b53c 100644
--- a/usr/src/lib/libast/common/features/sig.sh
+++ b/usr/src/contrib/ast/src/lib/libast/features/sig.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1985-2010 AT&T Intellectual Property #
+# Copyright (c) 1985-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
diff --git a/usr/src/lib/libast/common/features/siglist b/usr/src/contrib/ast/src/lib/libast/features/siglist
index 37d1bf0525..37d1bf0525 100644
--- a/usr/src/lib/libast/common/features/siglist
+++ b/usr/src/contrib/ast/src/lib/libast/features/siglist
diff --git a/usr/src/lib/libast/common/features/signal.c b/usr/src/contrib/ast/src/lib/libast/features/signal.c
index d1040a0c02..1f59852bde 100644
--- a/usr/src/lib/libast/common/features/signal.c
+++ b/usr/src/contrib/ast/src/lib/libast/features/signal.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -186,6 +186,10 @@ static struct _m_ map[] =
#define HAD_SIGSSTOP 1
"Sendable stop", "SSTOP", SIGSSTOP,
#endif
+#ifdef SIGSTKFLT
+#define HAD_SIGSTKFLT 1
+"Stack fault", "STKFLT", SIGSTKFLT,
+#endif
#ifdef gould
#define HAD_gould 1
"Stack overflow", "STKOV", 28,
@@ -303,9 +307,9 @@ main()
mapindex[j] = i;
}
#ifdef SIGRTMIN
- i = SIGRTMIN;
+ i = _SIGRTMIN;
#ifdef SIGRTMAX
- j = SIGRTMAX;
+ j = _SIGRTMAX;
#else
j = i;
#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/features/sizeof b/usr/src/contrib/ast/src/lib/libast/features/sizeof
new file mode 100644
index 0000000000..06c8707a1a
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/features/sizeof
@@ -0,0 +1,13 @@
+tst - note{ sizeof(integral-type) }end output{
+ #include "FEATURE/common"
+ int
+ main()
+ {
+ printf("#define _ast_sizeof_char %d\n", sizeof(char));
+ printf("#define _ast_sizeof_short %d\n", sizeof(short));
+ printf("#define _ast_sizeof_int %d\n", sizeof(int));
+ printf("#define _ast_sizeof_long %d\n", sizeof(long));
+ printf("#define _ast_sizeof_intmax_t %d\n", sizeof(_ast_intmax_t));
+ return 0;
+ }
+}end
diff --git a/usr/src/lib/libast/common/features/standards b/usr/src/contrib/ast/src/lib/libast/features/standards
index adee277e20..50e041a7d9 100644
--- a/usr/src/lib/libast/common/features/standards
+++ b/usr/src/contrib/ast/src/lib/libast/features/standards
@@ -1,7 +1,6 @@
set stdio
-if tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
+if tst note{ _ALL_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
#define _ALL_SOURCE 1
- #define _ISOC99_SOURCE 1
#define _POSIX_SOURCE 1
#define _POSIX_C_SOURCE 21000101L
#define _XOPEN_SOURCE 9900
@@ -15,9 +14,6 @@ if tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _X
#ifndef _ALL_SOURCE
#define _ALL_SOURCE 1
#endif
- #ifndef _ISOC99_SOURCE
- #define _ISOC99_SOURCE 1
- #endif
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE 1
#endif
@@ -34,9 +30,8 @@ if tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _X
#define __EXTENSIONS__ 1
#endif
}
-elif tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
+elif tst note{ _ALL_SOURCE & _POSIX_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
#define _ALL_SOURCE 1
- #define _ISOC99_SOURCE 1
#define _POSIX_SOURCE 1
#define _XOPEN_SOURCE 9900
#define _GNU_SOURCE 1
@@ -49,9 +44,6 @@ elif tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _XOPEN_SOURCE & __
#ifndef _ALL_SOURCE
#define _ALL_SOURCE 1
#endif
- #ifndef _ISOC99_SOURCE
- #define _ISOC99_SOURCE 1
- #endif
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE 1
#endif
@@ -65,8 +57,7 @@ elif tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _XOPEN_SOURCE & __
#define __EXTENSIONS__ 1
#endif
}
-elif tst note{ _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
- #define _ISOC99_SOURCE 1
+elif tst note{ _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{
#define _POSIX_SOURCE 1
#define _POSIX_C_SOURCE 21000101L
#define _XOPEN_SOURCE 9900
@@ -77,9 +68,6 @@ elif tst note{ _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE
#include <stdlib.h>
#include <unistd.h>
}end {
- #ifndef _ISOC99_SOURCE
- #define _ISOC99_SOURCE 1
- #endif
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE 1
#endif
@@ -151,3 +139,33 @@ else tst note{ __EXTENSIONS__ works }end compile{
#endif
}
endif
+
+if tst -D_ISOC99_SOURCE -lm note{ _ISOC99_SOURCE plays nice }end link{
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <math.h>
+ int main() { return signbit(-0.0); }
+ }end {
+ #ifndef _ISOC99_SOURCE
+ #define _ISOC99_SOURCE 1
+ #endif
+ }
+endif
+
+cat{
+
+/*
+ * this is a nasty game we all play to honor standards symbol visibility
+ * it would help if all implementations had
+ * _KITCHEN_SINK_SOURCE
+ * that enabled all symbols from the latest implemented standards
+ * that's probably the most useful but least portable request
+ */
+
+#if __MACH__
+#undef _POSIX_SOURCE
+#endif
+
+}end
diff --git a/usr/src/lib/libast/common/features/stdio b/usr/src/contrib/ast/src/lib/libast/features/stdio
index b323893998..b323893998 100644
--- a/usr/src/lib/libast/common/features/stdio
+++ b/usr/src/contrib/ast/src/lib/libast/features/stdio
diff --git a/usr/src/lib/libast/common/features/sys b/usr/src/contrib/ast/src/lib/libast/features/sys
index 87ad1e5f4a..3aa103e5e4 100644
--- a/usr/src/lib/libast/common/features/sys
+++ b/usr/src/contrib/ast/src/lib/libast/features/sys
@@ -12,9 +12,14 @@ print #endif
print #if !defined(_LARGEFILE_SOURCE)
print #define _LARGEFILE_SOURCE 1
print #endif
+print #if !defined(_LARGE_FILE_API)
+print #define _LARGE_FILE_API 1
+print #endif
print #else
print #undef _LARGEFILE64_SOURCE
print #undef _LARGEFILE_SOURCE
+print #undef _LARGE_FILE_API
+print #undef _typ_ino64_t
print #undef _typ_off64_t
print #undef _typ_struct_dirent64
print #undef _lib_creat64
@@ -30,6 +35,9 @@ print #undef _lib_stat64
print #undef _lib_statvfs64
print #undef _lib_truncate64
print #endif
+print #if !_lib_readdir64
+print #undef _typ_ino64_t
+print #endif
print #if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
print #define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
diff --git a/usr/src/contrib/ast/src/lib/libast/features/syscall b/usr/src/contrib/ast/src/lib/libast/features/syscall
new file mode 100644
index 0000000000..9788b9b5be
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/features/syscall
@@ -0,0 +1,18 @@
+lib sysgetcwd note{ syscall(SYS_getcwd,buf,len) implemented }end link{
+ #include <sys/syscall.h>
+ int main()
+ {
+ char buf[256];
+ return syscall(SYS_getcwd, buf, sizeof(buf)) < 0;
+ }
+}end
+
+if ( _lib_sysgetcwd ) {
+ #include <sys/syscall.h>
+}
+endif
+
+if ( _lib_sysgetcwd ) {
+ #define SYSGETCWD(a,b) syscall(SYS_getcwd,a,b)
+}
+endif
diff --git a/usr/src/lib/libast/common/features/time b/usr/src/contrib/ast/src/lib/libast/features/time
index 6c15113fb8..6c15113fb8 100644
--- a/usr/src/lib/libast/common/features/time
+++ b/usr/src/contrib/ast/src/lib/libast/features/time
diff --git a/usr/src/lib/libast/common/features/tmlib b/usr/src/contrib/ast/src/lib/libast/features/tmlib
index 221079c339..221079c339 100644
--- a/usr/src/lib/libast/common/features/tmlib
+++ b/usr/src/contrib/ast/src/lib/libast/features/tmlib
diff --git a/usr/src/lib/libast/common/features/tmx b/usr/src/contrib/ast/src/lib/libast/features/tmx
index ebf5c0ff81..ebf5c0ff81 100644
--- a/usr/src/lib/libast/common/features/tmx
+++ b/usr/src/contrib/ast/src/lib/libast/features/tmx
diff --git a/usr/src/lib/libast/common/features/tty b/usr/src/contrib/ast/src/lib/libast/features/tty
index a75edeb181..a75edeb181 100644
--- a/usr/src/lib/libast/common/features/tty
+++ b/usr/src/contrib/ast/src/lib/libast/features/tty
diff --git a/usr/src/lib/libast/common/features/tv b/usr/src/contrib/ast/src/lib/libast/features/tv
index ae15682121..ae15682121 100644
--- a/usr/src/lib/libast/common/features/tv
+++ b/usr/src/contrib/ast/src/lib/libast/features/tv
diff --git a/usr/src/lib/libast/common/features/tvlib b/usr/src/contrib/ast/src/lib/libast/features/tvlib
index 9b2f64fe28..9b2f64fe28 100644
--- a/usr/src/lib/libast/common/features/tvlib
+++ b/usr/src/contrib/ast/src/lib/libast/features/tvlib
diff --git a/usr/src/lib/libast/common/features/uwin b/usr/src/contrib/ast/src/lib/libast/features/uwin
index 9ff3ab078f..b42cea1d7d 100644
--- a/usr/src/lib/libast/common/features/uwin
+++ b/usr/src/contrib/ast/src/lib/libast/features/uwin
@@ -4,3 +4,7 @@ lib copysign,logb,finite,drem,sqrt,ilogb,remainder,scalb
lib _copysign,_finite,_scalb,__iob_func,_p__iob,__p__iob
dat _iob
+
+cat{
+ #define stricmp strcasecmp
+}end
diff --git a/usr/src/lib/libast/common/features/vfork b/usr/src/contrib/ast/src/lib/libast/features/vfork
index f1a0ea7d15..f1a0ea7d15 100644
--- a/usr/src/lib/libast/common/features/vfork
+++ b/usr/src/contrib/ast/src/lib/libast/features/vfork
diff --git a/usr/src/lib/libast/common/features/vmalloc b/usr/src/contrib/ast/src/lib/libast/features/vmalloc
index 2ef415cd2b..b3cc2d0d2b 100644
--- a/usr/src/lib/libast/common/features/vmalloc
+++ b/usr/src/contrib/ast/src/lib/libast/features/vmalloc
@@ -152,6 +152,59 @@ tst stk_down note{ stack grows downward }end execute{
int main() { return growdown() ? 0 : 1; }
}end
+tst malloc_hook note{ gnu malloc hooks work }end execute{
+ #include <malloc.h>
+
+ static int test_free_hit = 0;
+ static int test_malloc_hit = 0;
+ static int test_memalign_hit = 0;
+ static int test_realloc_hit = 0;
+
+ static void test_free_hook(void* ptr, const void* caller)
+ {
+ test_free_hit++;
+ }
+
+ static void* test_malloc_hook(size_t size, const void* caller)
+ {
+ test_malloc_hit++;
+ return 0;
+ }
+
+ static void* test_memalign_hook(size_t align, size_t size, const void* caller)
+ {
+ test_memalign_hit++;
+ return 0;
+ }
+
+ static void* test_realloc_hook(void* ptr, size_t size, const void* caller)
+ {
+ test_realloc_hit++;
+ return 0;
+ }
+
+ static void test_initialize_hook(void)
+ {
+ __free_hook = test_free_hook;
+ __malloc_hook = test_malloc_hook;
+ __memalign_hook = test_memalign_hook;
+ __realloc_hook = test_realloc_hook;
+ }
+
+ void (*__malloc_initialize_hook)(void) = test_initialize_hook;
+
+ int main()
+ {
+ void* p;
+
+ p = malloc(16);
+ p = realloc(p, 32);
+ free(p);
+ p = memalign(32, 32);
+ return !test_free_hit || !test_malloc_hit || !test_memalign_hit || !test_realloc_hit;
+ }
+}end
+
cat{
#include "FEATURE/mmap"
#if _BLD_INSTRUMENT || cray || _UWIN && _BLD_ast
diff --git a/usr/src/lib/libast/common/features/wait b/usr/src/contrib/ast/src/lib/libast/features/wait
index 74c8c8119a..74c8c8119a 100644
--- a/usr/src/lib/libast/common/features/wait
+++ b/usr/src/contrib/ast/src/lib/libast/features/wait
diff --git a/usr/src/lib/libast/common/features/wchar b/usr/src/contrib/ast/src/lib/libast/features/wchar
index 0c2199e8ef..ac51f0fbc5 100644
--- a/usr/src/lib/libast/common/features/wchar
+++ b/usr/src/contrib/ast/src/lib/libast/features/wchar
@@ -1,20 +1,57 @@
set prototyped
+iff
+set stdio ast_common.h
+set include .
+
+cat{
+ #ifndef _AST_WCHAR_H
+ #define _AST_WCHAR_H 1
+}end
+
lib mbstowcs,wctomb,wcrtomb,wcslen,wcstombs,wcwidth stdlib.h stdio.h wchar.h
lib towlower,towupper stdlib.h stdio.h wchar.h
typ mbstate_t stdlib.h stdio.h wchar.h
nxt wchar
-run{
-cat <<!
+cat{
#ifndef _SFSTDIO_H
#include <ast_common.h>
#include <stdio.h>
#endif
+}end
+
+if tst note{ <wchar.h> requires native <stdio.h> }end nocompile{
+ /*<NOSTDIO>*/
+ #define _STDIO_INCLUDED 1
+ #define FILE void
+ #include <wchar.h>
+ int tst;
+ }end
+ if tst note{ <stdio.h> defines __va_list for <wchar.h> }end compile{
+ /*<NOSTDIO>*/
+ #define _STDIO_INCLUDED 1
+ #define FILE void
+ #include <stdarg.h>
+ #define __va_list va_list
+ #include <wchar.h>
+ int tst;
+ }end && {
+ #define __va_list va_list
+ }
+ endif
+endif
+
+if hdr - wctype wchar.h
+ if ! npt - iswalpha wchar.h {
+ #include <wctype.h> /* <wchar.h> includes <wctype.h> */
+ }
+ endif
+endif
+
+run{
+cat <<!
#if _hdr_wchar && defined(_nxt_wchar)
- #include $_nxt_wchar /* the native wchar.h */
- #endif
- #if _hdr_wctype
- #include <wctype.h>
+ #include ${_nxt_wchar-_nxt_wchar} /* the native wchar.h */
#endif
#ifndef WEOF
@@ -107,5 +144,15 @@ cat <<!
extern int wscanf(const wchar_t*, ...);
#undef extern
+
+ #else
+
+ /* on some systems <wchar.h> is included multiple times with multiple effects */
+
+ #if _hdr_wchar && defined(_nxt_wchar)
+ #include ${_nxt_wchar-_nxt_wchar} /* the native wchar.h */
+ #endif
+
+ #endif
!
}end
diff --git a/usr/src/contrib/ast/src/lib/libast/features/wctype b/usr/src/contrib/ast/src/lib/libast/features/wctype
new file mode 100644
index 0000000000..0f59bc1cea
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/features/wctype
@@ -0,0 +1,14 @@
+set prototyped
+nxt wctype
+
+run{
+cat <<!
+ #if _hdr_wctype && defined(_nxt_wctype)
+ #include ${_nxt_wctype-_nxt_wctype} /* the native wctype.h */
+ #endif
+
+ #undef iswalpha
+
+ #define iswalpha(w) (ast.mb_alpha?(*ast.mb_alpha)(w):isalpha(w))
+!
+}end
diff --git a/usr/src/lib/libast/common/hash/hashalloc.c b/usr/src/contrib/ast/src/lib/libast/hash/hashalloc.c
index 6948e8ed37..8c923f373e 100644
--- a/usr/src/lib/libast/common/hash/hashalloc.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashalloc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/hashdump.c b/usr/src/contrib/ast/src/lib/libast/hash/hashdump.c
index 87e9a6db87..3c2829a84a 100644
--- a/usr/src/lib/libast/common/hash/hashdump.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashdump.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/hashfree.c b/usr/src/contrib/ast/src/lib/libast/hash/hashfree.c
index dd4100ae6d..b6998a3d70 100644
--- a/usr/src/lib/libast/common/hash/hashfree.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashfree.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/hashlast.c b/usr/src/contrib/ast/src/lib/libast/hash/hashlast.c
index acddf3a3f9..00834771be 100644
--- a/usr/src/lib/libast/common/hash/hashlast.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashlast.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/hashlib.h b/usr/src/contrib/ast/src/lib/libast/hash/hashlib.h
index a65ff0f5b1..2d225b9410 100644
--- a/usr/src/lib/libast/common/hash/hashlib.h
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashlib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/hashlook.c b/usr/src/contrib/ast/src/lib/libast/hash/hashlook.c
index 5c4f8ff7bf..4b0ae81e2c 100644
--- a/usr/src/lib/libast/common/hash/hashlook.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashlook.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/hashscan.c b/usr/src/contrib/ast/src/lib/libast/hash/hashscan.c
index fc6367d464..5162c08d30 100644
--- a/usr/src/lib/libast/common/hash/hashscan.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashscan.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -88,7 +88,7 @@ hashnext(register Hash_position_t* pos)
{
register Hash_bucket_t* b;
- if (!pos) return(pos->tab->root->last.bucket = 0);
+ if (!pos) return(0);
b = pos->bucket;
for (;;)
{
diff --git a/usr/src/lib/libast/common/hash/hashsize.c b/usr/src/contrib/ast/src/lib/libast/hash/hashsize.c
index eb04554ef1..0c458ba9e4 100644
--- a/usr/src/lib/libast/common/hash/hashsize.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashsize.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/hashview.c b/usr/src/contrib/ast/src/lib/libast/hash/hashview.c
index d99134ff16..585f1a1de9 100644
--- a/usr/src/lib/libast/common/hash/hashview.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashview.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/hashwalk.c b/usr/src/contrib/ast/src/lib/libast/hash/hashwalk.c
index 749f0c3c57..d3e4610507 100644
--- a/usr/src/lib/libast/common/hash/hashwalk.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/hashwalk.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/memhash.c b/usr/src/contrib/ast/src/lib/libast/hash/memhash.c
index 1e1c308443..24f6465627 100644
--- a/usr/src/lib/libast/common/hash/memhash.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/memhash.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/memsum.c b/usr/src/contrib/ast/src/lib/libast/hash/memsum.c
index 3f3ba2f750..c426215a87 100644
--- a/usr/src/lib/libast/common/hash/memsum.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/memsum.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/strhash.c b/usr/src/contrib/ast/src/lib/libast/hash/strhash.c
index 4e40151885..e9f4976ccc 100644
--- a/usr/src/lib/libast/common/hash/strhash.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/strhash.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/strkey.c b/usr/src/contrib/ast/src/lib/libast/hash/strkey.c
index d9f5ef7619..3ff7eada43 100644
--- a/usr/src/lib/libast/common/hash/strkey.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/strkey.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/hash/strsum.c b/usr/src/contrib/ast/src/lib/libast/hash/strsum.c
index 091e745751..92b413d299 100644
--- a/usr/src/lib/libast/common/hash/strsum.c
+++ b/usr/src/contrib/ast/src/lib/libast/hash/strsum.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/include/aso.h b/usr/src/contrib/ast/src/lib/libast/include/aso.h
new file mode 100644
index 0000000000..1007e9353a
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/include/aso.h
@@ -0,0 +1,183 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#ifndef _ASO_H
+#define _ASO_H 1
+
+#define ASO_VERSION 20111111L
+
+#include <ast_common.h>
+
+/*
+ * ast atomic scalar operations interface definitions
+ */
+
+/* asometh() types (ordered mutually exclusive flags) */
+#define ASO_NEXT (-1)
+#define ASO_SIGNAL 1
+#define ASO_THREAD 2
+#define ASO_PROCESS 4
+#define ASO_INTRINSIC 8
+
+/* asolock() operations */
+#define ASO_UNLOCK 0 /* unlock if key matches */
+#define ASO_TRYLOCK 1 /* matched key means successful attempt */
+#define ASO_LOCK 2 /* matched key first, then spin-lock */
+#define ASO_SPINLOCK 3 /* no matching of key before locking */
+
+/* Asoerror_f types */
+#define ASO_EMETHOD 0 /* method specific error */
+#define ASO_EHUNG 1 /* asoloop() possibly hung */
+
+/* for internal use, but standardized for libs such as CDT and Vmalloc */
+#define ASO_RELAX ((1<<2)-1) /* cycles between spin-loop yield */
+#define ASOLOOP(k) asoloop(++(k))
+
+#define ASODISC(d,e) (memset(d,0,sizeof(*(d))),(d)->version=ASO_VERSION,(d)->errorf=(e))
+
+typedef int (*Asoerror_f)(int, const char*);
+typedef void* (*Asoinit_f)(void*, const char*);
+typedef ssize_t (*Asolock_f)(void*, ssize_t, void volatile*);
+
+typedef struct Asodisc_s
+{
+ uint32_t version;
+ unsigned int hung;
+ Asoerror_f errorf;
+} Asodisc_t;
+
+typedef struct Asometh_s
+{
+ const char* name;
+ int type;
+ Asoinit_f initf;
+ Asolock_f lockf;
+ const char* details;
+} Asometh_t;
+
+#if (_BLD_aso || _BLD_taso) && defined(__EXPORT__)
+#define extern extern __EXPORT__
+#endif
+#if !(_BLD_aso || _BLD_taso) && defined(__IMPORT__)
+#define extern extern __IMPORT__
+#endif
+
+extern Asometh_t* asometh(int, void*);
+
+#undef extern
+
+#if _BLD_aso && defined(__EXPORT__)
+#define extern extern __EXPORT__
+#endif
+#if !_BLD_aso && defined(__IMPORT__)
+#define extern extern __IMPORT__
+#endif
+
+extern Asometh_t* _asometh(int, void*);
+extern int asoinit(const char*, Asometh_t*, Asodisc_t*);
+extern int asolock(unsigned int volatile*, unsigned int, int);
+extern int asoloop(uintmax_t);
+extern int asorelax(long);
+
+extern uint8_t asocas8(uint8_t volatile*, int, int);
+extern uint8_t asoget8(uint8_t volatile*);
+extern uint8_t asoinc8(uint8_t volatile*);
+extern uint8_t asodec8(uint8_t volatile*);
+
+#define asocaschar(p,o,n) asocas8(p,o,n)
+#define asogetchar(p) asoget8(p)
+#define asoincchar(p) asoinc8(p)
+#define asodecchar(p) asodec8(p)
+
+extern uint16_t asocas16(uint16_t volatile*, uint16_t, uint16_t);
+extern uint16_t asoget16(uint16_t volatile*);
+extern uint16_t asoinc16(uint16_t volatile*);
+extern uint16_t asodec16(uint16_t volatile*);
+
+#define asocasshort(p,o,n) asocas16(p,o,n)
+#define asogetshort(p) asoget16(p)
+#define asoincshort(p) asoinc16(p)
+#define asodecshort(p) asodec16(p)
+
+extern uint32_t asocas32(uint32_t volatile*, uint32_t, uint32_t);
+extern uint32_t asoget32(uint32_t volatile*);
+extern uint32_t asoinc32(uint32_t volatile*);
+extern uint32_t asodec32(uint32_t volatile*);
+
+#if _ast_sizeof_int == 4
+#define asocasint(p,o,n) asocas32((uint32_t volatile*)p,o,n)
+#define asogetint(p) asoget32((uint32_t volatile*)p)
+#define asoincint(p) asoinc32((uint32_t volatile*)p)
+#define asodecint(p) asodec32((uint32_t volatile*)p)
+#endif
+
+#if _ast_sizeof_long == 4
+#define asocaslong(p,o,n) asocas32((uint32_t volatile*)p,o,n)
+#define asogetlong(p) asoget32((uint32_t volatile*)p)
+#define asoinclong(p) asoinc32((uint32_t volatile*)p)
+#define asodeclong(p) asodec32((uint32_t volatile*)p)
+#endif
+
+#if _ast_sizeof_size_t == 4
+#define asocassize(p,o,n) asocas32((uint32_t volatile*)p,o,n)
+#define asogetsize(p) asoget32((uint32_t volatile*)p)
+#define asoincsize(p) asoinc32((uint32_t volatile*)p)
+#define asodecsize(p) asodec32((uint32_t volatile*)p)
+#endif
+
+#ifdef _ast_int8_t
+
+extern uint64_t asocas64(uint64_t volatile*, uint64_t, uint64_t);
+extern uint64_t asoget64(uint64_t volatile*);
+extern uint64_t asoinc64(uint64_t volatile*);
+extern uint64_t asodec64(uint64_t volatile*);
+
+#if _ast_sizeof_int == 8
+#define asocasint(p,o,n) asocas64((uint64_t volatile*)p,o,n)
+#define asogetint(p) asoget64((uint64_t volatile*)p)
+#define asoincint(p) asoinc64((uint64_t volatile*)p)
+#define asodecint(p) asodec64((uint64_t volatile*)p)
+#endif
+
+#if _ast_sizeof_long == 8
+#define asocaslong(p,o,n) asocas64((uint64_t volatile*)p,o,n)
+#define asogetlong(p) asoget64((uint64_t volatile*)p)
+#define asoinclong(p) asoinc64((uint64_t volatile*)p)
+#define asodeclong(p) asodec64((uint64_t volatile*)p)
+#endif
+
+#if _ast_sizeof_size_t == 8
+#define asocassize(p,o,n) asocas64((uint64_t volatile*)p,o,n)
+#define asogetsize(p) asoget64((uint64_t volatile*)p)
+#define asoincsize(p) asoinc64((uint64_t volatile*)p)
+#define asodecsize(p) asodec64((uint64_t volatile*)p)
+#endif
+
+#endif
+
+extern void* asocasptr(void volatile*, void*, void*);
+extern void* asogetptr(void volatile*);
+
+#undef extern
+
+#endif
diff --git a/usr/src/lib/libast/common/include/ast.h b/usr/src/contrib/ast/src/lib/libast/include/ast.h
index 595a42a7d4..d8cc9d314b 100644
--- a/usr/src/lib/libast/common/include/ast.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ast.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -30,8 +30,6 @@
#ifndef _AST_H
#define _AST_H
-#include <ast_version.h>
-
#ifndef _AST_STD_H
#include <ast_std.h>
#endif
@@ -167,6 +165,16 @@ typedef struct
#define FMT_PARAM 0x10 /* disable FMT_SHELL ${$( quote */
/*
+ * chrexp() flags
+ */
+
+#define FMT_EXP_CHAR 0x020 /* expand single byte chars */
+#define FMT_EXP_LINE 0x040 /* expand \n and \r */
+#define FMT_EXP_WIDE 0x080 /* expand \u \U \x wide chars */
+#define FMT_EXP_NOCR 0x100 /* skip \r */
+#define FMT_EXP_NONL 0x200 /* skip \n */
+
+/*
* multibyte macros
*/
@@ -176,12 +184,16 @@ typedef struct
#define mbcoll() (ast.mb_xfrm!=0)
#define mbwide() (mbmax()>1)
+#define mb2wc(w,p,n) (*ast.mb_towc)(&w,(char*)p,n)
#define mbchar(p) (mbwide()?((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),mbmax()))>0?((p+=ast.tmp_int),ast.tmp_wchar):(p+=ast.mb_sync+1,ast.tmp_int)):(*(unsigned char*)(p++)))
+#define mbnchar(p,n) (mbwide()?((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),n))>0?((p+=ast.tmp_int),ast.tmp_wchar):(p+=ast.mb_sync+1,ast.tmp_int)):(*(unsigned char*)(p++)))
#define mbinit() (mbwide()?(*ast.mb_towc)((wchar_t*)0,(char*)0,mbmax()):0)
#define mbsize(p) (mbwide()?(*ast.mb_len)((char*)(p),mbmax()):((p),1))
+#define mbnsize(p,n) (mbwide()?(*ast.mb_len)((char*)(p),n):((p),1))
#define mbconv(s,w) (ast.mb_conv?(*ast.mb_conv)(s,w):((*(s)=(w)),1))
-#define mbwidth(w) (ast.mb_width&&((ast.tmp_int=(*ast.mb_width)(w))>=0||(w)>UCHAR_MAX)?ast.tmp_int:1)
+#define mbwidth(w) (ast.mb_width?(*ast.mb_width)(w):1)
#define mbxfrm(t,f,n) (mbcoll()?(*ast.mb_xfrm)((char*)(t),(char*)(f),n):0)
+#define mbalpha(w) (ast.mb_alpha?(*ast.mb_alpha)(w):isalpha((w)&0xff))
/*
* common macros
@@ -245,11 +257,12 @@ extern void astwinsize(int, int*, int*);
extern ssize_t base64encode(const void*, size_t, void**, void*, size_t, void**);
extern ssize_t base64decode(const void*, size_t, void**, void*, size_t, void**);
extern int chresc(const char*, char**);
+extern int chrexp(const char*, char**, int*, int);
extern int chrtoi(const char*);
+extern char* conformance(const char*, size_t);
extern int eaccess(const char*, int);
-extern char* fmtbase(long, int, int);
-extern char* fmtbasell(intmax_t, int, int);
-#define fmtbase(a,b,c) fmtbasell((intmax_t)(a),b,c) /* until 2003-09-01 */
+extern char* fmtbase(intmax_t, int, int);
+#define fmtbasell(a,b,c) fmtbase(a,b,c) /* until 2014-01-01 */
extern char* fmtbuf(size_t);
extern char* fmtclock(Sfulong_t);
extern char* fmtelapsed(unsigned long, int);
@@ -260,6 +273,7 @@ extern char* fmtident(const char*);
extern char* fmtip4(uint32_t, int);
extern char* fmtfmt(const char*);
extern char* fmtgid(int);
+extern char* fmtint(intmax_t, int);
extern char* fmtmatch(const char*);
extern char* fmtmode(int, int);
extern char* fmtnesq(const char*, const char*, size_t);
@@ -277,9 +291,12 @@ extern void memfatal(void);
extern unsigned int memhash(const void*, int);
extern unsigned long memsum(const void*, int, unsigned long);
extern char* pathaccess(char*, const char*, const char*, const char*, int);
+extern char* pathaccess_20100601(const char*, const char*, const char*, int, char*, size_t);
extern char* pathbin(void);
extern char* pathcanon(char*, int);
+extern char* pathcanon_20100601(char*, size_t, int);
extern char* pathcat(char*, const char*, int, const char*, const char*);
+extern char* pathcat_20100601(const char*, int, const char*, const char*, char*, size_t);
extern int pathcd(const char*, const char*);
extern int pathcheck(const char*, const char*, Pathcheck_t*);
extern int pathexists(char*, int);
@@ -287,12 +304,16 @@ extern char* pathfind(const char*, const char*, const char*, char*, size_t);
extern int pathgetlink(const char*, char*, int);
extern int pathinclude(const char*);
extern char* pathkey(char*, char*, const char*, const char*, const char*);
+extern char* pathkey_20100601(const char*, const char*, const char*, char*, size_t, char*, size_t);
extern size_t pathnative(const char*, char*, size_t);
extern char* pathpath(char*, const char*, const char*, int);
+extern char* pathpath_20100601(const char*, const char*, int, char*, size_t);
extern size_t pathposix(const char*, char*, size_t);
extern char* pathprobe(char*, char*, const char*, const char*, const char*, int);
+extern char* pathprobe_20100601(const char*, const char*, const char*, int, char*, size_t, char*, size_t);
extern size_t pathprog(const char*, char*, size_t);
extern char* pathrepl(char*, const char*, const char*);
+extern char* pathrepl_20100601(char*, size_t, const char*, const char*);
extern int pathsetlink(const char*, const char*);
extern char* pathshell(void);
extern char* pathtemp(char*, size_t, const char*, const char*, int*);
@@ -302,10 +323,12 @@ extern int stracmp(const char*, const char*);
extern char* strcopy(char*, const char*);
extern unsigned long strelapsed(const char*, char**, int);
extern int stresc(char*);
+extern int strexp(char*, int);
extern long streval(const char*, char**, long(*)(const char*, char**));
extern long strexpr(const char*, char**, long(*)(const char*, char**, void*), void*);
extern int strgid(const char*);
extern int strgrpmatch(const char*, const char*, int*, int, int);
+extern int strgrpmatch_20120528(const char*, const char*, ssize_t*, int, int);
extern unsigned int strhash(const char*);
extern void* strlook(const void*, size_t, const char*);
extern int strmatch(const char*, const char*);
@@ -337,6 +360,7 @@ extern intmax_t strtonll(const char*, char**, char*, int);
extern int struid(const char*);
extern int struniq(char**, int);
extern int strvcmp(const char*, const char*);
+extern int wc2utf8(char*, uint32_t);
#undef extern
@@ -354,16 +378,29 @@ extern char** environ;
* really handy malloc()/free() (__FILE__,__LINE__,__FUNCTION__) tracing
* make with VMDEBUG==1 or debug=1 or CCFLAGS=$(CC.DEBUG)
* VMDEBUG==0 disables
- * at runtime export VMDEBUG or VMTRACE per vmalloc.3
+ * at runtime export VMALLOC_OPTIONS per vmalloc.3
* to list originating call locations
*/
#if !_std_malloc && !defined(VMFL) && !defined(_VMHDR_H) && \
- (!defined(VMDEBUG) || VMDEBUG) && (VMDEBUG || _BLD_DEBUG)
+ (VMDEBUG || !defined(VMDEBUG) && _BLD_DEBUG)
#define VMFL 1
#include <vmalloc.h>
#endif
+#include <ast_api.h>
+
+#undef AST_PLUGIN_VERSION
+#define AST_PLUGIN_VERSION(v) ((v)>AST_VERSION?(v):AST_VERSION)
+
+#if defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern unsigned long plugin_version(void);
+
+#undef extern
+
#endif
diff --git a/usr/src/lib/libast/common/include/ast_dir.h b/usr/src/contrib/ast/src/lib/libast/include/ast_dir.h
index 5b51a4b36b..260d4b601d 100644
--- a/usr/src/lib/libast/common/include/ast_dir.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ast_dir.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/ast_getopt.h b/usr/src/contrib/ast/src/lib/libast/include/ast_getopt.h
index 835b38a622..cf5efd3d10 100644
--- a/usr/src/lib/libast/common/include/ast_getopt.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ast_getopt.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/ast_std.h b/usr/src/contrib/ast/src/lib/libast/include/ast_std.h
index 2b2387b740..c50fd5462f 100644
--- a/usr/src/lib/libast/common/include/ast_std.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ast_std.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -36,6 +36,7 @@
#include <ast_common.h>
#if _BLD_ast
+#define _BLD_aso 1
#define _BLD_cdt 1
#define _BLD_sfio 1
#if !_UWIN
@@ -157,6 +158,7 @@ extern char* strerror(int);
#define AST_LC_LANG 255
#define AST_LC_internal 1
+#define AST_LC_test (1L<<26)
#define AST_LC_setenv (1L<<27)
#define AST_LC_find (1L<<28)
#define AST_LC_debug (1L<<29)
@@ -251,7 +253,9 @@ typedef struct
uint32_t mb_sync;
uint32_t version;
- char pad[936];
+ int (*mb_alpha)(wchar_t);
+
+ char pad[936 - sizeof(void*)];
} _Ast_info_t;
@@ -268,6 +272,10 @@ extern _Ast_info_t _ast_info;
/* largefile hackery -- ast uses the large versions by default */
+#if _typ_ino64_t
+#undef ino_t
+#define ino_t ino64_t
+#endif
#if _typ_off64_t
#undef off_t
#define off_t off64_t
diff --git a/usr/src/lib/libast/common/include/ast_windows.h b/usr/src/contrib/ast/src/lib/libast/include/ast_windows.h
index 000d2e4036..ed853e919f 100644
--- a/usr/src/lib/libast/common/include/ast_windows.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ast_windows.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/ccode.h b/usr/src/contrib/ast/src/lib/libast/include/ccode.h
index c3b63a081e..1335c8597d 100644
--- a/usr/src/lib/libast/common/include/ccode.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ccode.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/include/cdt.h b/usr/src/contrib/ast/src/lib/libast/include/cdt.h
new file mode 100644
index 0000000000..b757e74f2c
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/include/cdt.h
@@ -0,0 +1,354 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#ifndef _CDT_H
+#define _CDT_H 1
+
+/* Public interface for the dictionary library
+**
+** Written by Kiem-Phong Vo
+*/
+
+#ifndef CDT_VERSION
+#ifdef _API_ast
+#define CDT_VERSION _API_ast
+#else
+#define CDT_VERSION 20111111L
+#endif /*_AST_api*/
+#endif /*CDT_VERSION*/
+#ifndef AST_PLUGIN_VERSION
+#define AST_PLUGIN_VERSION(v) (v)
+#endif
+#define CDT_PLUGIN_VERSION AST_PLUGIN_VERSION(20111111L)
+
+#if _PACKAGE_ast
+#include <ast_std.h>
+#else
+#include <ast_common.h>
+#include <string.h>
+#endif
+
+/* commonly used integers */
+#define DT_ZERO ((unsigned int)0) /* all zero bits */
+#define DT_ONES (~DT_ZERO) /* all one bits */
+#define DT_HIBIT (~(DT_ONES >> 1) ) /* highest 1 bit */
+#define DT_LOBIT ((unsigned int)1) /* lowest 1 bit */
+#define DT_NBITS (sizeof(unsigned int)*8) /* #bits */
+
+/* type of an integer with the same size as a pointer */
+#define Dtuint_t uintptr_t
+
+/* various types used by CDT */
+typedef struct _dtlink_s Dtlink_t;
+typedef struct _dthold_s Dthold_t;
+typedef struct _dtdisc_s Dtdisc_t;
+typedef struct _dtmethod_s Dtmethod_t;
+typedef struct _dtdata_s Dtdata_t;
+typedef struct _dtuser_s Dtuser_t;
+typedef struct _dt_s Dt_t;
+typedef struct _dtstat_s Dtstat_t;
+typedef Void_t* (*Dtsearch_f)_ARG_((Dt_t*,Void_t*,int));
+typedef Void_t* (*Dtmake_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
+typedef void (*Dtfree_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
+typedef int (*Dtcompar_f)_ARG_((Dt_t*,Void_t*,Void_t*,Dtdisc_t*));
+typedef unsigned int (*Dthash_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
+typedef Void_t* (*Dtmemory_f)_ARG_((Dt_t*,Void_t*,size_t,Dtdisc_t*));
+typedef int (*Dtevent_f)_ARG_((Dt_t*,int,Void_t*,Dtdisc_t*));
+typedef int (*Dttype_f)_ARG_((Dt_t*,int));
+
+struct _dtuser_s /* for application to access and use */
+{ unsigned int lock; /* used by dtapplock */
+ Void_t* data; /* for whatever data */
+};
+
+struct _dtlink_s
+{
+#if CDT_VERSION < 20111111L
+ Dtlink_t* right; /* right child */
+ union
+ { unsigned int _hash; /* hash value */
+ Dtlink_t* _left; /* left child */
+ } hl;
+#else
+ union
+ { Dtlink_t* __rght; /* right child or next */
+ Dtlink_t* __ptbl; /* Dtrehash parent tbl */
+ } rh;
+ union
+ { Dtlink_t* __left; /* left child or prev */
+ unsigned int __hash; /* hash value of object */
+ } lh;
+#endif
+};
+
+/* private structure to hold an object */
+struct _dthold_s
+{ Dtlink_t hdr; /* header to hold obj */
+ Void_t* obj; /* application object */
+};
+
+/* method to manipulate dictionary structure */
+struct _dtmethod_s
+{ Dtsearch_f searchf; /* search function */
+ unsigned int type; /* type of operation */
+ int (*eventf)_ARG_((Dt_t*, int, Void_t*));
+ char* name; /* name of method */
+ char* description; /* description */
+};
+
+/* structure to hold methods that manipulate an object */
+struct _dtdisc_s
+{ int key; /* where the key resides */
+ int size; /* key size and type */
+ int link; /* offset to Dtlink_t field */
+ Dtmake_f makef; /* object constructor */
+ Dtfree_f freef; /* object destructor */
+ Dtcompar_f comparf;/* to compare two objects */
+ Dthash_f hashf; /* to compute hash value */
+ Dtmemory_f memoryf;/* to allocate/free memory */
+ Dtevent_f eventf; /* to process events */
+};
+
+#define DTDISC(dc,ky,sz,lk,mkf,frf,cmpf,hshf,memf,evf) \
+ ( (dc)->key = (int)(ky), (dc)->size = (int)(sz), (dc)->link = (int)(lk), \
+ (dc)->makef = (mkf), (dc)->freef = (frf), \
+ (dc)->comparf = (cmpf), (dc)->hashf = (hshf), \
+ (dc)->memoryf = (memf), (dc)->eventf = (evf) )
+
+#ifdef offsetof
+#define DTOFFSET(struct_s, member) offsetof(struct_s, member)
+#else
+#define DTOFFSET(struct_s, member) ((int)(&((struct_s*)0)->member))
+#endif
+
+/* the dictionary structure itself */
+struct _dt_s
+{ Dtsearch_f searchf;/* search function */
+ Dtdisc_t* disc; /* object type definitition */
+ Dtdata_t* data; /* sharable data */
+ Dtmemory_f memoryf;/* for memory allocation */
+ Dtmethod_t* meth; /* storage method */
+ ssize_t nview; /* #parent view dictionaries */
+ Dt_t* view; /* next on viewpath */
+ Dt_t* walk; /* dictionary being walked */
+ Dtuser_t* user; /* for user's usage */
+ Dttype_f typef; /* for binary compatibility */
+};
+
+/* structure to get status of a dictionary */
+#define DT_MAXRECURSE 1024 /* limit to avoid stack overflow */
+#define DT_MAXSIZE 256 /* limit for size of below arrays */
+struct _dtstat_s
+{ unsigned int meth; /* method type */
+ ssize_t size; /* total # of elements in dictionary */
+ ssize_t space; /* memory usage of data structure */
+ ssize_t mlev; /* max #levels in tree or hash table */
+ ssize_t msize; /* max #defined elts in below arrays */
+ ssize_t lsize[DT_MAXSIZE]; /* #objects by level */
+ ssize_t tsize[DT_MAXSIZE]; /* #tables by level */
+};
+
+/* supported storage methods */
+#define DT_SET 0000000001 /* unordered set, unique elements */
+#define DT_BAG 0000000002 /* unordered set, repeated elements */
+#define DT_OSET 0000000004 /* ordered set */
+#define DT_OBAG 0000000010 /* ordered multiset */
+#define DT_LIST 0000000020 /* linked list */
+#define DT_STACK 0000000040 /* stack: insert/delete at top */
+#define DT_QUEUE 0000000100 /* queue: insert top, delete at tail */
+#define DT_DEQUE 0000000200 /* deque: insert top, append at tail */
+#define DT_RHSET 0000000400 /* rhset: sharable unique objects */
+#define DT_RHBAG 0000001000 /* rhbag: sharable repeated objects */
+#define DT_METHODS 0000001777 /* all currently supported methods */
+#define DT_ORDERED (DT_OSET|DT_OBAG)
+
+/* asserts to dtdisc() to improve performance when changing disciplines */
+#define DT_SAMECMP 0000000001 /* compare functions are equivalent */
+#define DT_SAMEHASH 0000000002 /* hash functions are equivalent */
+
+/* operation types */
+#define DT_INSERT 0000000001 /* insert object if not found */
+#define DT_DELETE 0000000002 /* delete a matching object if any */
+#define DT_SEARCH 0000000004 /* look for an object */
+#define DT_NEXT 0000000010 /* look for next element */
+#define DT_PREV 0000000020 /* find previous element */
+#define DT_FIRST 0000000200 /* get first object */
+#define DT_LAST 0000000400 /* get last object */
+#define DT_MATCH 0000001000 /* find object matching key */
+#define DT_ATTACH 0000004000 /* attach an object to dictionary */
+#define DT_DETACH 0000010000 /* detach an object from dictionary */
+#define DT_APPEND 0000020000 /* append an object */
+#define DT_ATLEAST 0000040000 /* find the least elt >= object */
+#define DT_ATMOST 0000100000 /* find the biggest elt <= object */
+#define DT_REMOVE 0002000000 /* remove a specific object */
+#define DT_TOANNOUNCE (DT_INSERT|DT_DELETE|DT_SEARCH|DT_NEXT|DT_PREV|DT_FIRST|DT_LAST|DT_MATCH|DT_ATTACH|DT_DETACH|DT_APPEND|DT_ATLEAST|DT_ATMOST|DT_REMOVE)
+
+#define DT_RELINK 0000002000 /* re-inserting (dtdisc,dtmethod...) */
+#define DT_FLATTEN 0000000040 /* flatten objects into a list */
+#define DT_CLEAR 0000000100 /* clearing all objects */
+#define DT_EXTRACT 0000200000 /* FLATTEN and clear dictionary */
+#define DT_RESTORE 0000400000 /* reinsert a list of elements */
+#define DT_STAT 0001000000 /* get statistics of dictionary */
+#define DT_OPERATIONS (DT_TOANNOUNCE|DT_RELINK|DT_FLATTEN|DT_CLEAR|DT_EXTRACT|DT_RESTORE|DT_STAT)
+
+/* these bits may combine with the DT_METHODS and DT_OPERATIONS bits */
+#define DT_INDATA 0010000000 /* Dt_t was allocated with Dtdata_t */
+#define DT_SHARE 0020000000 /* concurrent access mode */
+#define DT_ANNOUNCE 0040000000 /* announcing a successful operation */
+ /* the actual event will be this bit */
+ /* combined with the operation bit */
+#define DT_OPTIMIZE 0100000000 /* optimizing data structure */
+
+/* events for discipline and method event-handling functions */
+#define DT_OPEN 1 /* a dictionary is being opened */
+#define DT_ENDOPEN 5 /* end of dictionary opening */
+#define DT_CLOSE 2 /* a dictionary is being closed */
+#define DT_ENDCLOSE 6 /* end of dictionary closing */
+#define DT_DISC 3 /* discipline is about to be changed */
+#define DT_METH 4 /* method is about to be changed */
+#define DT_HASHSIZE 7 /* initialize hash table size */
+#define DT_ERROR 0xbad /* announcing an error */
+
+_BEGIN_EXTERNS_ /* data structures and functions */
+#if _BLD_cdt && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+#if !_BLD_cdt && defined(__IMPORT__)
+#define extern __IMPORT__
+#endif
+
+extern Dtmethod_t* Dtset;
+extern Dtmethod_t* Dtbag;
+extern Dtmethod_t* Dtoset;
+extern Dtmethod_t* Dtobag;
+extern Dtmethod_t* Dtlist;
+extern Dtmethod_t* Dtstack;
+extern Dtmethod_t* Dtqueue;
+extern Dtmethod_t* Dtdeque;
+
+#if _PACKAGE_ast /* dtplugin() for proprietary and non-standard methods -- requires -ldll */
+
+#define dtplugin(name) ((Dtmethod_t*)dllmeth("cdt", name, CDT_PLUGIN_VERSION))
+
+#define Dtrhbag dtplugin("rehash:Dtrhbag")
+#define Dtrhset dtplugin("rehash:Dtrhset")
+
+#else
+
+#if CDTPROPRIETARY
+
+extern Dtmethod_t* Dtrhset;
+extern Dtmethod_t* Dtrhbag;
+
+#endif /*CDTPROPRIETARY*/
+
+#endif /*_PACKAGE_ast*/
+
+#undef extern
+
+#if _BLD_cdt && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern Dt_t* dtopen _ARG_((Dtdisc_t*, Dtmethod_t*));
+extern int dtclose _ARG_((Dt_t*));
+extern Dt_t* dtview _ARG_((Dt_t*, Dt_t*));
+extern Dtdisc_t* dtdisc _ARG_((Dt_t* dt, Dtdisc_t*, int));
+extern Dtmethod_t* dtmethod _ARG_((Dt_t*, Dtmethod_t*));
+extern int dtwalk _ARG_((Dt_t*, int(*)(Dt_t*,Void_t*,Void_t*), Void_t*));
+extern int dtcustomize _ARG_((Dt_t*, int, int));
+extern unsigned int dtstrhash _ARG_((unsigned int, Void_t*, ssize_t));
+extern int dtuserlock _ARG_((Dt_t*, unsigned int, int));
+extern Void_t* dtuserdata _ARG_((Dt_t*, Void_t*, unsigned int));
+
+/* deal with upward binary compatibility (operation bit translation, etc.) */
+extern Dt_t* _dtopen _ARG_((Dtdisc_t*, Dtmethod_t*, unsigned long));
+#define dtopen(dc,mt) _dtopen((dc), (mt), CDT_VERSION)
+
+#undef extern
+
+#if _PACKAGE_ast && !defined(_CDTLIB_H)
+
+#if _BLD_dll && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern void* dllmeth(const char*, const char*, unsigned long);
+
+#undef extern
+
+#endif
+
+_END_EXTERNS_
+
+/* internal functions for translating among holder, object and key */
+#define _DT(dt) ((Dt_t*)(dt))
+
+#define _DTLNK(dc,o) ((Dtlink_t*)((char*)(o) + (dc)->link) ) /* get link from obj */
+
+#define _DTO(dc,l) (Void_t*)((char*)(l) - (dc)->link) /* get object from link */
+#define _DTOBJ(dc,l) ((dc)->link >= 0 ? _DTO(dc,l) : ((Dthold_t*)(l))->obj )
+
+#define _DTK(dc,o) ((char*)(o) + (dc)->key) /* get key from object */
+#define _DTKEY(dc,o) (Void_t*)((dc)->size >= 0 ? _DTK(dc,o) : *((char**)_DTK(dc,o)) )
+
+#define _DTCMP(dt,k1,k2,dc) \
+ ((dc)->comparf ? (*(dc)->comparf)((dt), (k1), (k2), (dc)) : \
+ (dc)->size > 0 ? memcmp((Void_t*)(k1), ((Void_t*)k2), (dc)->size) : \
+ strcmp((char*)(k1), ((char*)k2)) )
+
+#define _DTHSH(dt,ky,dc) ((dc)->hashf ? (*(dc)->hashf)((dt), (ky), (dc)) : \
+ dtstrhash(0, (ky), (dc)->size) )
+
+#define dtvnext(d) (_DT(d)->view)
+#define dtvcount(d) (_DT(d)->nview)
+#define dtvhere(d) (_DT(d)->walk)
+
+#define dtlink(d,e) (((Dtlink_t*)(e))->rh.__rght)
+#define dtobj(d,e) _DTOBJ(_DT(d)->disc, (e))
+
+#define dtfirst(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_FIRST)
+#define dtnext(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_NEXT)
+#define dtatleast(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_ATLEAST)
+#define dtlast(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_LAST)
+#define dtprev(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_PREV)
+#define dtatmost(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_ATMOST)
+#define dtsearch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH)
+#define dtmatch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_MATCH)
+#define dtinsert(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_INSERT)
+#define dtappend(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_APPEND)
+#define dtdelete(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DELETE)
+#define dtremove(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_REMOVE)
+#define dtattach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_ATTACH)
+#define dtdetach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DETACH)
+#define dtclear(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_CLEAR)
+
+#define dtflatten(d) (Dtlink_t*)(*(_DT(d)->searchf))((d),(Void_t*)(0),DT_FLATTEN)
+#define dtextract(d) (Dtlink_t*)(*(_DT(d)->searchf))((d),(Void_t*)(0),DT_EXTRACT)
+#define dtrestore(d,l) (Dtlink_t*)(*(_DT(d)->searchf))((d),(Void_t*)(l),DT_RESTORE)
+
+#define dtstat(d,s) (ssize_t)(*(_DT(d)->searchf))((d),(Void_t*)(s),DT_STAT)
+#define dtsize(d) (ssize_t)(*(_DT(d)->searchf))((d),(Void_t*)(0),DT_STAT)
+
+#define DT_PRIME 17109811 /* 2#00000001 00000101 00010011 00110011 */
+#define dtcharhash(h,c) (((unsigned int)(h) + (unsigned int)(c)) * DT_PRIME )
+
+#endif /* _CDT_H */
diff --git a/usr/src/lib/libast/common/include/cmdarg.h b/usr/src/contrib/ast/src/lib/libast/include/cmdarg.h
index 59c12affad..3b26e5e68d 100644
--- a/usr/src/lib/libast/common/include/cmdarg.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/cmdarg.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,11 +28,16 @@
*/
#ifndef _CMDARG_H
-#define _CMDARG_H
+#define _CMDARG_H 1
+
+#include <error.h>
+
+#define CMD_VERSION 20120411L
#define CMD_CHECKED (1<<9) /* cmdopen() argv[0] ok */
#define CMD_EMPTY (1<<0) /* run once, even if no args */
#define CMD_EXACT (1<<1) /* last command must have argmax*/
+#define CMD_EXIT (1<<11) /* fatal error_info.exit() */
#define CMD_IGNORE (1<<2) /* ignore EXIT_QUIT exit */
#define CMD_INSERT (1<<3) /* argpat for insertion */
#define CMD_MINIMUM (1<<4) /* argmax is a minimum */
@@ -44,37 +49,40 @@
#define CMD_USER (1<<12)
-typedef struct /* cmd + args info */
+#define CMDDISC(d,f,e) (memset(d,0,sizeof(*(d))),(d)->version=CMD_VERSION,(d)->flags=(f),(d)->errorf=(e))
+
+struct Cmddisc_s;
+typedef struct Cmddisc_s Cmddisc_t;
+
+typedef int (*Cmdrun_f)(int, char**, Cmddisc_t*);
+
+struct Cmddisc_s
{
- struct
- {
- size_t args; /* total args */
- size_t commands; /* total commands */
- } total;
-
- int argcount; /* current arg count */
- int argmax; /* max # args */
- int echo; /* just an echo */
- int flags; /* CMD_* flags */
- int insertlen; /* strlen(insert) */
- int offset; /* post arg offset */
-
- char** argv; /* exec argv */
- char** firstarg; /* first argv file arg */
- char** insertarg; /* argv before insert */
- char** postarg; /* start of post arg list */
- char** nextarg; /* next argv file arg */
- char* nextstr; /* next string ends before here */
- char* laststr; /* last string ends before here */
- char* insert; /* replace with current arg */
- char buf[1]; /* argv and arg buffer */
+ uint32_t version; /* CMD_VERSION */
+ uint32_t flags; /* CMD_* flags */
+ Error_f errorf; /* optional error function */
+ Cmdrun_f runf; /* optional exec function */
+};
+
+typedef struct Cmdarg_s /* cmdopen() handle */
+{
+ const char* id; /* library id string */
+
+#ifdef _CMDARG_PRIVATE_
+ _CMDARG_PRIVATE_
+#endif
+
} Cmdarg_t;
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
+#ifndef cmdopen
extern Cmdarg_t* cmdopen(char**, int, int, const char*, int);
+#endif
+extern Cmdarg_t* cmdopen_20110505(char**, int, int, const char*, int, Error_f);
+extern Cmdarg_t* cmdopen_20120411(char**, int, int, const char*, Cmddisc_t*);
extern int cmdflush(Cmdarg_t*);
extern int cmdarg(Cmdarg_t*, const char*, int);
extern int cmdclose(Cmdarg_t*);
diff --git a/usr/src/lib/libast/common/include/debug.h b/usr/src/contrib/ast/src/lib/libast/include/debug.h
index df9931e07b..994fedb323 100644
--- a/usr/src/lib/libast/common/include/debug.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/debug.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/dt.h b/usr/src/contrib/ast/src/lib/libast/include/dt.h
index a1d8507b44..acc6713ae8 100644
--- a/usr/src/lib/libast/common/include/dt.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/dt.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,7 +32,10 @@
#endif
extern Dt_t* dtnew(Vmalloc_t*, Dtdisc_t*, Dtmethod_t*);
+extern Dt_t* _dtnew(Vmalloc_t*, Dtdisc_t*, Dtmethod_t*, unsigned long);
#undef extern
+#define dtnew(v,d,m) _dtnew(v,d,m,CDT_VERSION)
+
#endif
diff --git a/usr/src/lib/libast/common/include/error.h b/usr/src/contrib/ast/src/lib/libast/include/error.h
index d2581efa36..6baaf0d321 100644
--- a/usr/src/lib/libast/common/include/error.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/error.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -84,6 +84,12 @@
#define ERROR_PUSH 0x0040 /* push context */
#define ERROR_SET 0x0080 /* set context */
+#ifdef ECONNRESET
+#define ERROR_PIPE(e) ((e)==EPIPE||(e)==ECONNRESET||(e)==EIO)
+#else
+#define ERROR_PIPE(e) ((e)==EPIPE||(e)==EIO)
+#endif
+
/*
* errorpush()/errorpop() are obsolete -- use errorctx() instead
*/
diff --git a/usr/src/lib/libast/common/include/find.h b/usr/src/contrib/ast/src/lib/libast/include/find.h
index 8d18c0e8d6..81049beab7 100644
--- a/usr/src/lib/libast/common/include/find.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/find.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/fnv.h b/usr/src/contrib/ast/src/lib/libast/include/fnv.h
index 981cbf0880..793dde0c4a 100644
--- a/usr/src/lib/libast/common/include/fnv.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/fnv.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/fs3d.h b/usr/src/contrib/ast/src/lib/libast/include/fs3d.h
index 9240ce010a..9d3c992fc0 100644
--- a/usr/src/lib/libast/common/include/fs3d.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/fs3d.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,6 +40,10 @@
#define iview(p) ((p)->st_spare4[0])
#define IVIEW(p,v) ((p)->st_spare4[0]=(v))
#else
+#if _ary_st_extra
+#define iview(p) ((p)->st_extra[0])
+#define IVIEW(p,v) ((p)->st_extra[0]=(v))
+#else
#if _ary_st_pad4
#define iview(p) ((p)->st_pad4[0])
#define IVIEW(p,v) ((p)->st_pad4[0]=(v))
@@ -54,6 +58,7 @@
#endif
#endif
#endif
+#endif
/*
* special options
diff --git a/usr/src/lib/libast/common/include/fts.h b/usr/src/contrib/ast/src/lib/libast/include/fts.h
index a8f4f16a61..3a22ad2c8a 100644
--- a/usr/src/lib/libast/common/include/fts.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/fts.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/ftwalk.h b/usr/src/contrib/ast/src/lib/libast/include/ftwalk.h
index 0e70bc3d1b..a4f3955732 100644
--- a/usr/src/lib/libast/common/include/ftwalk.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ftwalk.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/glob.h b/usr/src/contrib/ast/src/lib/libast/include/glob.h
index 2f405922ae..a118db935e 100644
--- a/usr/src/lib/libast/common/include/glob.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/glob.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -114,6 +114,8 @@ struct _glob_
#define GLOB_ALTDIRFUNC 0x4000 /* gnu discipline functions */
#define GLOB_DISC 0x8000 /* discipline initialized */
+#define GLOB_GROUP 0x10000 /* REG_SHELL_GROUP */
+
/* gl_status */
#define GLOB_NOTDIR 0x0001 /* last gl_dirnext() not a dir */
diff --git a/usr/src/lib/libast/common/include/hash.h b/usr/src/contrib/ast/src/lib/libast/include/hash.h
index 36e33011cf..b91e5506fd 100644
--- a/usr/src/lib/libast/common/include/hash.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/hash.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/hashkey.h b/usr/src/contrib/ast/src/lib/libast/include/hashkey.h
index 8e9c793e7a..338f017497 100644
--- a/usr/src/lib/libast/common/include/hashkey.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/hashkey.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/hashpart.h b/usr/src/contrib/ast/src/lib/libast/include/hashpart.h
index 2d33003c57..ae382625c9 100644
--- a/usr/src/lib/libast/common/include/hashpart.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/hashpart.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/ip6.h b/usr/src/contrib/ast/src/lib/libast/include/ip6.h
index 0f89ae9a64..382ead8dac 100644
--- a/usr/src/lib/libast/common/include/ip6.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ip6.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,7 +21,7 @@
***********************************************************************/
#pragma prototyped
-#if !_IP6_H
+#ifndef _IP6_H
#define _IP6_H 1
#define IP6ADDR 16
@@ -32,7 +32,7 @@
#define extern __EXPORT__
#endif
-extern char* fmtip6(unsigned char*, int);
+extern char* fmtip6(const unsigned char*, int);
extern int strtoip6(const char*, char**, unsigned char*, unsigned char*);
#undef extern
diff --git a/usr/src/lib/libast/common/include/ls.h b/usr/src/contrib/ast/src/lib/libast/include/ls.h
index 0fbe0df523..fc1d623378 100644
--- a/usr/src/lib/libast/common/include/ls.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/ls.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/magic.h b/usr/src/contrib/ast/src/lib/libast/include/magic.h
index 4ea4393840..9b2f96bd53 100644
--- a/usr/src/lib/libast/common/include/magic.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/magic.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -47,6 +47,7 @@
#define MAGIC_MIME (1<<0) /* magictype returns MIME type */
#define MAGIC_VERBOSE (1<<1) /* verbose magic file errors */
+#define MAGIC_ALL (1<<2) /* list all table matches */
#define MAGIC_USER (1L<<16) /* first user flag bit */
diff --git a/usr/src/lib/libast/common/include/magicid.h b/usr/src/contrib/ast/src/lib/libast/include/magicid.h
index 178a62cb26..73197d7b3a 100644
--- a/usr/src/lib/libast/common/include/magicid.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/magicid.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/mc.h b/usr/src/contrib/ast/src/lib/libast/include/mc.h
index f4ac6f1934..a23c7bb09b 100644
--- a/usr/src/lib/libast/common/include/mc.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/mc.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -61,14 +61,14 @@
#define MC_MESSAGE_SET(s) mcindex(s,NiL,NiL,NiL)
-typedef struct
+typedef struct Mcset_s
{
char** msg;
int num;
int gen;
} Mcset_t;
-typedef struct
+typedef struct Mc_s
{
Mcset_t* set;
int num;
@@ -83,7 +83,7 @@ typedef struct
#define extern __EXPORT__
#endif
-extern char* mcfind(char*, const char*, const char*, int, int);
+extern char* mcfind(const char*, const char*, int, int, char*, size_t);
extern Mc_t* mcopen(Sfio_t*);
extern char* mcget(Mc_t*, int, int, const char*);
extern int mcput(Mc_t*, int, int, const char*);
diff --git a/usr/src/lib/libast/common/include/mime.h b/usr/src/contrib/ast/src/lib/libast/include/mime.h
index 8989a366d9..6fa76576a2 100644
--- a/usr/src/lib/libast/common/include/mime.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/mime.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/mnt.h b/usr/src/contrib/ast/src/lib/libast/include/mnt.h
index bf9c0a44fd..698c7300d9 100644
--- a/usr/src/lib/libast/common/include/mnt.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/mnt.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/modecanon.h b/usr/src/contrib/ast/src/lib/libast/include/modecanon.h
index 57cabb5523..5d1721f774 100644
--- a/usr/src/lib/libast/common/include/modecanon.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/modecanon.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/modex.h b/usr/src/contrib/ast/src/lib/libast/include/modex.h
index 9a9f557ab0..e8b52f74de 100644
--- a/usr/src/lib/libast/common/include/modex.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/modex.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/namval.h b/usr/src/contrib/ast/src/lib/libast/include/namval.h
index 49e777be1d..9c055cc0fd 100644
--- a/usr/src/lib/libast/common/include/namval.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/namval.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/option.h b/usr/src/contrib/ast/src/lib/libast/include/option.h
index 5cacaf5bd0..1d246902c9 100644
--- a/usr/src/lib/libast/common/include/option.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/option.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/proc.h b/usr/src/contrib/ast/src/lib/libast/include/proc.h
index 9b3e80c41d..76fdf837a0 100644
--- a/usr/src/lib/libast/common/include/proc.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/proc.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,6 +40,7 @@
#define PROC_GID (1<<5) /* setgid(getgid()) */
#define PROC_IGNORE (1<<6) /* ignore parent pipe errors */
#define PROC_IGNOREPATH (1<<16) /* procrun() intercept to ignore path */
+#define PROC_ORPHAN (1<<18) /* create orphaned process */
#define PROC_OVERLAY (1<<7) /* overlay current process if possible */
#define PROC_PARANOID (1<<8) /* restrict everything */
#define PROC_PRIVELEGED (1<<9) /* setuid(0), setgid(getegid()) */
@@ -64,10 +65,13 @@
#define PROC_sys_pgrp 0xa
#define PROC_sys_umask 0xb
+#define PROC_fd_ctty 0xc
+
#define PROC_op1(o,a) (((o)<<(2*PROC_ARG_BIT))|((a)&((PROC_ARG_NULL<<PROC_ARG_BIT)|PROC_ARG_NULL)))
#define PROC_op2(o,a,b) (((o)<<(2*PROC_ARG_BIT))|(((b)&PROC_ARG_NULL)<<PROC_ARG_BIT)|((a)&PROC_ARG_NULL))
#define PROC_FD_CLOSE(p,f) PROC_op2(PROC_fd_dup|(f),p,PROC_ARG_NULL)
+#define PROC_FD_CTTY(f) PROC_op1(PROC_fd_ctty,f)
#define PROC_FD_DUP(p,c,f) PROC_op2(PROC_fd_dup|(f),p,c)
#define PROC_SIG_DFL(s) PROC_op1(PROC_sig_dfl,s,0)
#define PROC_SIG_IGN(s) PROC_op1(PROC_sig_ign,s,0)
diff --git a/usr/src/lib/libast/common/include/recfmt.h b/usr/src/contrib/ast/src/lib/libast/include/recfmt.h
index 5ea55b3c6c..aaae3c0f99 100644
--- a/usr/src/lib/libast/common/include/recfmt.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/recfmt.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/regex.h b/usr/src/contrib/ast/src/lib/libast/include/regex.h
index 3d0132a7ec..7271abdaf8 100644
--- a/usr/src/lib/libast/common/include/regex.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/regex.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -36,8 +36,10 @@
#undef regmatch_t
#include <ast_common.h>
+#include <ast_wchar.h>
+#include <ast_api.h>
-#define REG_VERSION 20030916L
+#define REG_VERSION 20100930L
/* regcomp flags */
@@ -131,13 +133,18 @@ struct regdisc_s; typedef struct regdisc_s regdisc_t;
typedef int (*regclass_t)(int);
typedef uint32_t regflags_t;
-typedef int regoff_t;
typedef int (*regerror_t)(const regex_t*, regdisc_t*, int, ...);
typedef void* (*regcomp_t)(const regex_t*, const char*, size_t, regdisc_t*);
typedef int (*regexec_t)(const regex_t*, void*, const char*, size_t, const char*, size_t, char**, regdisc_t*);
typedef void* (*regresize_t)(void*, void*, size_t);
typedef int (*regrecord_t)(void*, const char*, size_t);
+#if ASTAPI(20120528)
+typedef ssize_t regoff_t;
+#else
+typedef int regoff_t;
+#endif
+
typedef struct regmatch_s
{
regoff_t rm_so; /* offset of start */
@@ -170,10 +177,11 @@ struct regdisc_s
typedef struct regstat_s
{
- regflags_t re_flags; /* REG_LEFT|REG_RIGHT */
+ regflags_t re_flags; /* REG_* */
ssize_t re_min; /* min anchored match length */
ssize_t re_max; /* max anchored match length */
ssize_t re_record; /* regrexec() match length */
+ regflags_t re_info; /* REG_* info */
} regstat_t;
struct regex_s
@@ -213,7 +221,7 @@ extern void regfree(regex_t*);
extern regclass_t regclass(const char*, char**);
extern int regaddclass(const char*, regclass_t);
-extern int regcollate(const char*, char**, char*, int);
+extern int regcollate(const char*, char**, char*, size_t, wchar_t*);
extern int regcomb(regex_t*, regex_t*);
extern size_t regdecomp(regex_t*, regflags_t, char*, size_t);
extern int regdup(regex_t*, regex_t*);
diff --git a/usr/src/lib/libast/common/include/sfdisc.h b/usr/src/contrib/ast/src/lib/libast/include/sfdisc.h
index 9c9c222914..b48eb43d63 100644
--- a/usr/src/lib/libast/common/include/sfdisc.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/sfdisc.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -47,8 +47,7 @@ typedef int (*Sf_key_lookup_t)(void*, Sffmt_t*, const char*, char**, Sflong_t*);
typedef char* (*Sf_key_convert_t)(void*, Sffmt_t*, const char*, char*, Sflong_t);
extern int sfkeyprintf(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t);
-#define sfkeyprintf sfkeyprintf_20000308 /* Sffmt_t* callback args */
-extern int sfkeyprintf(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t);
+extern int sfkeyprintf_20000308(Sfio_t*, void*, const char*, Sf_key_lookup_t, Sf_key_convert_t);
/*
* pure sfio read and/or write disciplines
diff --git a/usr/src/lib/libast/i386/include/ast/sfio.h b/usr/src/contrib/ast/src/lib/libast/include/sfio.h
index da6ebfd9f2..3530750033 100644
--- a/usr/src/lib/libast/i386/include/ast/sfio.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/sfio.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -22,7 +22,7 @@
#ifndef _SFIO_H
#define _SFIO_H 1
-#define SFIO_VERSION 20080717L
+#define SFIO_VERSION 20090915L
/* Public header file for the sfio library
**
@@ -110,7 +110,8 @@ struct _sffmt_s
#define SFFMT_IFLAG 002000000 /* 'I' flag */
#define SFFMT_JFLAG 004000000 /* 'j' flag, intmax_t */
#define SFFMT_CENTER 010000000 /* '=' flag, center justification */
-#define SFFMT_SET 017777770 /* flags settable on calling extf */
+#define SFFMT_CHOP 020000000 /* chop long string values from left */
+#define SFFMT_SET 037777770 /* flags settable on calling extf */
/* for sfmutex() call */
#define SFMTX_LOCK 0 /* up mutex count */
@@ -197,8 +198,6 @@ struct _sffmt_s
_BEGIN_EXTERNS_
-/* standard in/out/err streams */
-
#if _BLD_sfio && defined(__EXPORT__)
#define extern extern __EXPORT__
#endif
@@ -209,6 +208,7 @@ _BEGIN_EXTERNS_
extern ssize_t _Sfi;
extern ssize_t _Sfmaxr;
+/* standard in/out/err streams */
extern Sfio_t* sfstdin;
extern Sfio_t* sfstdout;
extern Sfio_t* sfstderr;
@@ -259,8 +259,10 @@ extern ssize_t sfnputc _ARG_((Sfio_t*, int, size_t));
extern int sfungetc _ARG_((Sfio_t*, int));
extern int sfprintf _ARG_((Sfio_t*, const char*, ...));
extern char* sfprints _ARG_((const char*, ...));
+extern ssize_t sfaprints _ARG_((char**, const char*, ...));
extern ssize_t sfsprintf _ARG_((char*, size_t, const char*, ...));
extern ssize_t sfvsprintf _ARG_((char*, size_t, const char*, va_list));
+extern ssize_t sfvasprints _ARG_((char**, const char*, va_list));
extern int sfvprintf _ARG_((Sfio_t*, const char*, va_list));
extern int sfscanf _ARG_((Sfio_t*, const char*, ...));
extern int sfsscanf _ARG_((const char*, const char*, ...));
@@ -426,7 +428,7 @@ __INLINE__ ssize_t sfmaxr(ssize_t n, int s) { return __sf_maxr(n,s); }
(((f)->_next < (f)->_data || (f)->_next > (f)->_data+(f)->_size) ? \
((f)->_next -= (p), (char*)0) : (char*)(f)->_next ) ) \
: (m) == SEEK_END ? \
- ( ((p) > 0 || (f)->_size+(p) < 0) ? (char*)0 : \
+ ( ((p) > 0 || (f)->_size < -(p)) ? (char*)0 : \
(char*)((f)->_next = (f)->_data+(f)->_size+(p)) ) \
: (char*)0 \
)
diff --git a/usr/src/lib/libast/i386/include/ast/sfio_s.h b/usr/src/contrib/ast/src/lib/libast/include/sfio_s.h
index 7f7483cc79..0fb33de7d0 100644
--- a/usr/src/lib/libast/i386/include/ast/sfio_s.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/sfio_s.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/i386/include/ast/sfio_t.h b/usr/src/contrib/ast/src/lib/libast/include/sfio_t.h
index 4240316aef..6e3a52c723 100644
--- a/usr/src/lib/libast/i386/include/ast/sfio_t.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/sfio_t.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -34,7 +34,7 @@
#define _SFIO_PRIVATE \
Sfoff_t extent; /* current file size */ \
Sfoff_t here; /* current physical location */ \
- unsigned char getr; /* the last sfgetr separator */ \
+ unsigned char unused_1;/* unused #1 */ \
unsigned char tiny[1];/* for unbuffered read stream */ \
unsigned short bits; /* private flags */ \
unsigned int mode; /* current io mode */ \
@@ -47,7 +47,14 @@
Sfoff_t lpos; /* last seek position */ \
size_t iosz; /* preferred size for I/O */ \
size_t blksz; /* preferred block size */ \
- Void_t* fill[1];/* modest expansion */
+ int getr; /* the last sfgetr separator */ \
+ _SFIO_PRIVATE_PAD
+
+#if _ast_sizeof_pointer == 8
+#define _SFIO_PRIVATE_PAD int pad;
+#else
+#define _SFIO_PRIVATE_PAD
+#endif
#include "sfio.h"
diff --git a/usr/src/lib/libast/common/include/shcmd.h b/usr/src/contrib/ast/src/lib/libast/include/shcmd.h
index e657add6af..16acdac6ac 100644
--- a/usr/src/lib/libast/common/include/shcmd.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/shcmd.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,39 +28,54 @@
#ifndef _SHCMD_H
#define _SHCMD_H 1
+#ifndef AST_PLUGIN_VERSION
+#define AST_PLUGIN_VERSION(v) (v)
+#endif
+#define SH_PLUGIN_VERSION AST_PLUGIN_VERSION(20111111L)
+
+#if __STDC__
+#define SHLIB(m) unsigned long plugin_version(void) { return SH_PLUGIN_VERSION; }
+#else
+#define SHLIB(m) unsigned long plugin_version() { return SH_PLUGIN_VERSION; }
+#endif
+
#ifndef SH_VERSION
# define Shell_t void
#endif
#ifndef NV_DEFAULT
# define Namval_t void
#endif
-#ifndef ERROR_NOTIFY
-# define ERROR_NOTIFY 1
-#endif
+#undef Shbltin_t
+struct Shbltin_s;
+typedef struct Shbltin_s Shbltin_t;
+
+#ifdef _SHTABLE_H /* pre-ksh93u+ -- obsolete */
typedef int (*Shbltin_f)(int, char**, void*);
+#else
+typedef int (*Shbltin_f)(int, char**, Shbltin_t*);
+#endif /* _SHTABLE_H */
-#undef Shbltin_t
-typedef struct Shbltin_s
+struct Shbltin_s
{
- Shell_t *shp;
- void *ptr;
+ Shell_t* shp;
+ void* ptr;
int version;
int (*shrun)(int, char**);
int (*shtrap)(const char*, int);
void (*shexit)(int);
- Namval_t *(*shbltin)(const char*, Shbltin_f, void*);
+ Namval_t* (*shbltin)(const char*, Shbltin_f, void*);
unsigned char notify;
unsigned char sigset;
unsigned char nosfio;
- Namval_t *bnode;
- Namval_t *vnode;
- char *data;
+ Namval_t* bnode;
+ Namval_t* vnode;
+ char* data;
int flags;
- char *(*shgetenv)(const char*);
- char *(*shsetenv)(const char*);
+ char* (*shgetenv)(const char*);
+ char* (*shsetenv)(const char*);
int invariant;
-} Shbltin_t;
+};
#if defined(SH_VERSION) || defined(_SH_PRIVATE)
# undef Shell_t
@@ -71,14 +86,18 @@ typedef struct Shbltin_s
# define sh_system(c,str) ((c)?(*sh_context(c)->shtrap)(str,0):system(str))
# define sh_exit(c,n) ((c)?(*sh_context(c)->shexit)(n):exit(n))
# define sh_checksig(c) ((c) && sh_context(c)->sigset)
+# define sh_builtin(c,n,f,p) ((c)?(*sh_context(c)->shbltin)(n,(Shbltin_f)(f),sh_context(p)):0)
# if defined(SFIO_VERSION) || defined(_AST_H)
# define LIB_INIT(c)
# else
# define LIB_INIT(c) ((c) && (sh_context(c)->nosfio = 1))
# endif
# ifndef _CMD_H
-# define cmdinit(ac,av,c,cat,flg) do { if((ac)<=0) return(0); \
- (sh_context(c)->notify = ((flg)&ERROR_NOTIFY)?1:0);} while(0)
+# ifndef ERROR_NOTIFY
+# define ERROR_NOTIFY 1
+# endif
+# define cmdinit(ac,av,c,cat,flg) do { if((ac)<=0) return(0); \
+ (sh_context(c)->notify = ((flg)&ERROR_NOTIFY)?1:0);} while(0)
# endif
#endif
diff --git a/usr/src/lib/libast/common/include/stack.h b/usr/src/contrib/ast/src/lib/libast/include/stack.h
index 0c80fd68c1..593a08cc6a 100644
--- a/usr/src/lib/libast/common/include/stack.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/stack.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/stak.h b/usr/src/contrib/ast/src/lib/libast/include/stak.h
index 621684e9bf..ee3477366a 100644
--- a/usr/src/lib/libast/common/include/stak.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/stak.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/stk.h b/usr/src/contrib/ast/src/lib/libast/include/stk.h
index 96bff0baa0..851e408a3e 100644
--- a/usr/src/lib/libast/common/include/stk.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/stk.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -66,12 +66,12 @@ extern Stk_t* stkopen(int);
extern Stk_t* stkinstall(Stk_t*, char*(*)(int));
extern int stkclose(Stk_t*);
extern int stklink(Stk_t*);
-extern char* stkalloc(Stk_t*, unsigned);
-extern char* stkcopy(Stk_t*,const char*);
-extern char* stkset(Stk_t*, char*, unsigned);
-extern char* _stkseek(Stk_t*, unsigned);
-extern char* stkfreeze(Stk_t*, unsigned);
-extern int stkon(Stk_t*, char *);
+extern char* stkalloc(Stk_t*, size_t);
+extern char* stkcopy(Stk_t*, const char*);
+extern char* stkset(Stk_t*, char*, size_t);
+extern char* _stkseek(Stk_t*, ssize_t);
+extern char* stkfreeze(Stk_t*, size_t);
+extern int stkon(Stk_t*, char*);
#undef extern
diff --git a/usr/src/lib/libast/common/include/swap.h b/usr/src/contrib/ast/src/lib/libast/include/swap.h
index 3bf037756b..03a81f4753 100644
--- a/usr/src/lib/libast/common/include/swap.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/swap.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/tar.h b/usr/src/contrib/ast/src/lib/libast/include/tar.h
index 6d410b6828..847d6c64ab 100644
--- a/usr/src/lib/libast/common/include/tar.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/tar.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/times.h b/usr/src/contrib/ast/src/lib/libast/include/times.h
index eeb8d57e1f..c0c458db23 100644
--- a/usr/src/lib/libast/common/include/times.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/times.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/tm.h b/usr/src/contrib/ast/src/lib/libast/include/tm.h
index b650d5de53..bbd59808e0 100644
--- a/usr/src/lib/libast/common/include/tm.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/tm.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/tok.h b/usr/src/contrib/ast/src/lib/libast/include/tok.h
index aae1837428..f89821881d 100644
--- a/usr/src/lib/libast/common/include/tok.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/tok.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/amd64/include/ast/usage.h b/usr/src/contrib/ast/src/lib/libast/include/usage.h
index 19d2b0fc14..c1ba3173e7 100644
--- a/usr/src/lib/libast/amd64/include/ast/usage.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/usage.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/vdb.h b/usr/src/contrib/ast/src/lib/libast/include/vdb.h
index 1f144c9e20..e6472154f1 100644
--- a/usr/src/lib/libast/common/include/vdb.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/vdb.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/include/vecargs.h b/usr/src/contrib/ast/src/lib/libast/include/vecargs.h
index 3d688b5b2b..548c0b4994 100644
--- a/usr/src/lib/libast/common/include/vecargs.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/vecargs.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/i386/include/ast/vmalloc.h b/usr/src/contrib/ast/src/lib/libast/include/vmalloc.h
index f13cc58879..482514328e 100644
--- a/usr/src/lib/libast/i386/include/ast/vmalloc.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/vmalloc.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -24,10 +24,10 @@
/* Public header file for the virtual malloc package.
**
-** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
+** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/1994.
*/
-#define VMALLOC_VERSION 20100101L
+#define VMALLOC_VERSION 20110808L
#if _PACKAGE_ast
#include <ast_std.h>
@@ -52,22 +52,28 @@ struct _vmstat_s
size_t m_free; /* largest free piece */
int n_seg; /* number of segments */
size_t extent; /* total size of region */
+ int n_region; /* #parallel regions (Vmregion) */
+ int n_open; /* #calls that finds open reg */
+ int n_lock; /* #calls where reg was locked */
+ int n_probe; /* #probes to find a region */
+ int mode; /* region mode bits */
};
struct _vmdisc_s
{ Vmemory_f memoryf; /* memory manipulator */
Vmexcept_f exceptf; /* exception handler */
size_t round; /* rounding requirement */
+ size_t size; /* actual size of discipline */
};
struct _vmethod_s
-{ Void_t* (*allocf)_ARG_((Vmalloc_t*,size_t));
- Void_t* (*resizef)_ARG_((Vmalloc_t*,Void_t*,size_t,int));
- int (*freef)_ARG_((Vmalloc_t*,Void_t*));
- long (*addrf)_ARG_((Vmalloc_t*,Void_t*));
- long (*sizef)_ARG_((Vmalloc_t*,Void_t*));
- int (*compactf)_ARG_((Vmalloc_t*));
- Void_t* (*alignf)_ARG_((Vmalloc_t*,size_t,size_t));
+{ Void_t* (*allocf)_ARG_((Vmalloc_t*,size_t,int));
+ Void_t* (*resizef)_ARG_((Vmalloc_t*,Void_t*,size_t,int,int));
+ int (*freef)_ARG_((Vmalloc_t*,Void_t*,int));
+ long (*addrf)_ARG_((Vmalloc_t*,Void_t*,int));
+ long (*sizef)_ARG_((Vmalloc_t*,Void_t*,int));
+ int (*compactf)_ARG_((Vmalloc_t*,int));
+ Void_t* (*alignf)_ARG_((Vmalloc_t*,size_t,size_t,int));
unsigned short meth;
};
@@ -75,21 +81,18 @@ struct _vmalloc_s
{ Vmethod_t meth; /* method for allocation */
char* file; /* file name */
int line; /* line number */
- Void_t* func; /* calling function */
+ char* func; /* calling function */
Vmdisc_t* disc; /* discipline to get space */
Vmdata_t* data; /* the real region data */
Vmalloc_t* next; /* linked list of regions */
-#ifdef _VM_PRIVATE_
- _VM_PRIVATE_
-#endif
};
-#undef VM_FLAGS /* solaris sys kernel clash */
-
-#define VM_TRUST 0000001 /* forgo some security checks */
-#define VM_TRACE 0000002 /* generate trace */
-#define VM_DBCHECK 0000004 /* check for boundary overwrite */
-#define VM_DBABORT 0000010 /* abort on any warning */
+#define VM_TRUST 0000000 /* obsolete */
+#define VM_TRACE 0000001 /* generate traces of calls */
+#define VM_DBCHECK 0000002 /* check for boundary overwrite */
+#define VM_DBABORT 0000004 /* abort on any warning */
+#define VM_SHARE 0000010 /* sharable across processes */
+#define VM_MEMORYF 0000020 /* vm was allocated by memoryf */
#define VM_FLAGS 0000017 /* user-settable flags */
#define VM_MTBEST 0000100 /* Vmbest method */
@@ -104,21 +107,25 @@ struct _vmalloc_s
#define VM_RSZERO 0000004 /* clear new space */
/* exception types */
-#define VM_OPEN 0 /* region being opened */
-#define VM_CLOSE 1 /* announce being closed */
-#define VM_NOMEM 2 /* can't obtain memory */
-#define VM_BADADDR 3 /* bad addr in vmfree/vmresize */
-#define VM_DISC 4 /* discipline being changed */
-#define VM_ALLOC 5 /* announcement from vmalloc() */
-#define VM_FREE 6 /* announcement from vmfree() */
-#define VM_RESIZE 7 /* announcement from vmresize() */
+#define VM_OPEN 1 /* region being opened */
+#define VM_ENDOPEN 2 /* end of region opening */
+#define VM_CLOSE 3 /* announce being closed */
+#define VM_ENDCLOSE 4 /* end of region closing */
+#define VM_DISC 5 /* discipline being changed */
+#define VM_NOMEM 6 /* can't obtain memory */
+#define VM_BADADDR (-1) /* currently a no-op */
+
+/* for application-specific data in shared/persistent regions */
+#define VM_MMGET 0 /* get data value (void*) */
+#define VM_MMSET 1 /* set data value (void*) */
+#define VM_MMADD 2 /* add data value (long) */
_BEGIN_EXTERNS_ /* public data */
#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern extern __EXPORT__
+#define extern extern __EXPORT__
#endif
#if !_BLD_vmalloc && defined(__IMPORT__)
-#define extern extern __IMPORT__
+#define extern extern __IMPORT__
#endif
extern Vmethod_t* Vmbest; /* best allocation */
@@ -127,10 +134,12 @@ extern Vmethod_t* Vmpool; /* pool allocation */
extern Vmethod_t* Vmdebug; /* allocation with debugging */
extern Vmethod_t* Vmprofile; /* profiling memory usage */
-extern Vmdisc_t* Vmdcheap; /* heap discipline */
-extern Vmdisc_t* Vmdcsbrk; /* sbrk discipline */
+extern Vmdisc_t* Vmdcsystem; /* get memory from the OS */
+extern Vmdisc_t* Vmdcheap; /* get memory from Vmheap */
+extern Vmdisc_t* Vmdcsbrk; /* like Vmdcsystem - legacy use */
-extern Vmalloc_t* Vmheap; /* heap region */
+extern Vmalloc_t _Vmheap; /* heap region - use with care! */
+extern Vmalloc_t* Vmheap; /* = &_Vmheap - safe to use */
extern Vmalloc_t* Vmregion; /* malloc region */
#undef extern
@@ -148,8 +157,10 @@ extern int vmcompact _ARG_(( Vmalloc_t* ));
extern Vmdisc_t* vmdisc _ARG_(( Vmalloc_t*, Vmdisc_t* ));
-extern Vmalloc_t* vmmopen _ARG_(( char*, Void_t*, size_t ));
-extern Void_t* vmmset _ARG_((Vmalloc_t*, int, Void_t*, int));
+extern Vmalloc_t* vmmopen _ARG_(( char*, int, ssize_t ));
+extern Void_t* vmmvalue _ARG_(( Vmalloc_t*, int, Void_t*, int ));
+extern void vmmrelease _ARG_(( Vmalloc_t*, int ));
+extern Void_t* vmmaddress _ARG_(( size_t ));
extern Void_t* vmalloc _ARG_(( Vmalloc_t*, size_t ));
extern Void_t* vmalign _ARG_(( Vmalloc_t*, size_t, size_t ));
@@ -176,8 +187,7 @@ extern int vmtrbusy _ARG_((Vmalloc_t*));
extern int vmstat _ARG_((Vmalloc_t*, Vmstat_t*));
extern int vmwalk _ARG_((Vmalloc_t*,
- int(*)(Vmalloc_t*,Void_t*,size_t,Vmdisc_t*,Void_t*),
- Void_t*));
+ int(*)(Vmalloc_t*,Void_t*,size_t,Vmdisc_t*,Void_t*), Void_t*));
extern char* vmstrdup _ARG_((Vmalloc_t*, const char*));
#if !defined(_BLD_vmalloc) && !defined(_AST_STD_H) && \
@@ -191,6 +201,7 @@ extern Void_t* calloc _ARG_(( size_t, size_t ));
extern Void_t* memalign _ARG_(( size_t, size_t ));
extern Void_t* valloc _ARG_(( size_t ));
#endif
+extern int setregmax _ARG_(( int ));
#undef extern
_END_EXTERNS_
@@ -204,7 +215,7 @@ _END_EXTERNS_
#if defined(__FILE__)
#define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__)
#else
-#define _VMFILE_(vm) (_VM_(vm)->file = 0)
+#define _VMFILE_(vm) (_VM_(vm)->file = (char*)0)
#endif
#if defined(__LINE__)
@@ -214,22 +225,22 @@ _END_EXTERNS_
#endif
#if defined(__FUNCTION__)
-#define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__)
+#define _VMFUNC_(vm) (_VM_(vm)->func = (char*)__FUNCTION__)
#else
-#define _VMFUNC_(vm) (_VM_(vm)->func = 0)
+#define _VMFUNC_(vm) (_VM_(vm)->func = (char*)0)
#endif
#define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm))
#define vmalloc(vm,sz) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
+ (*(_VM_(vm)->meth.allocf))((vm),(sz),0) )
#define vmresize(vm,d,sz,type) (_VMFL_(vm), \
(*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type)) )
+ ((vm),(Void_t*)(d),(sz),(type),0) )
#define vmfree(vm,d) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d)) )
+ (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d),0) )
#define vmalign(vm,sz,align) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.alignf))((vm),(sz),(align)) )
+ (*(_VM_(vm)->meth.alignf))((vm),(sz),(align),0) )
#undef malloc
#undef realloc
@@ -252,12 +263,13 @@ _END_EXTERNS_
#if !_std_malloc
#if __STD_C || defined(__STDPP__) || defined(__GNUC__)
-#define malloc(s) ( _VMFL_(Vmregion), (malloc)((size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), (realloc)((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), (calloc)((size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), (free)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), (memalign)((size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), (valloc)((size_t)(s)) )
+
+#define malloc(s) (_VMFL_(Vmregion), malloc((size_t)(s)) )
+#define realloc(d,s) (_VMFL_(Vmregion), realloc((Void_t*)(d),(size_t)(s)) )
+#define calloc(n,s) (_VMFL_(Vmregion), calloc((size_t)n, (size_t)(s)) )
+#define free(d) (_VMFL_(Vmregion), free((Void_t*)(d)) )
+#define memalign(a,s) (_VMFL_(Vmregion), memalign((size_t)(a),(size_t)(s)) )
+#define valloc(s) (_VMFL_(Vmregion), valloc((size_t)(s) )
#ifndef strdup
#define strdup(s) ( _VMFL_(Vmregion), (strdup)((char*)(s)) )
#endif
@@ -265,17 +277,17 @@ _END_EXTERNS_
#else
#define _VMNM_(a,b,c,d,e,f) a/**/b/**/c/**/d/**/e/**/f
-#define malloc(s) ( _VMFL_(Vmregion), _VMNM_(mallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), _VMNM_(reallo,/,*,*,/,c)\
- ( (Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), _VMNM_(callo,/,*,*,/,c)\
- ( (size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), _VMNM_(fre,/,*,*,/,e)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), _VMNM_(memalig,/,*,*,/,n)\
- ( (size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), _VMNM_(vallo,/,*,*,/,c)\
- ( (size_t)(s)) )
+#define malloc(s) (_VMFL_(Vmregion), _VMNM_(mallo,/,*,*,/,c)\
+ ((size_t)(s)) )
+#define realloc(d,s) (_VMFL_(Vmregion), _VMNM_(reallo,/,*,*,/,c)\
+ ((Void_t*)(d),(size_t)(s)) )
+#define calloc(n,s) (_VMFL_(Vmregion), _VMNM_(callo,/,*,*,/,c)\
+ ((size_t)n, (size_t)(s)) )
+#define free(d) (_VMFL_(Vmregion), _VMNM_(fre,/,*,*,/,e)((Void_t*)(d)) )
+#define memalign(a,s) (_VMFL_(Vmregion), _VMNM_(memalig,/,*,*,/,n)\
+ ((size_t)(a),(size_t)(s)) )
+#define valloc(s) (_VMFL_(Vmregion), _VMNM_(vallo,/,*,*,/,c)\
+ ((size_t)(s) )
#ifndef strdup
#define strdup(s) ( _VMFL_(Vmregion), _VMNM_(strdu,/,*,*,/,p)\
((char*)(s)) )
@@ -285,37 +297,39 @@ _END_EXTERNS_
#define cfree(d) free(d)
-#endif /* !_std_malloc */
+#endif /*!_std_malloc*/
-#endif /* _map_malloc */
+#endif /*_map_malloc*/
#endif /*VMFL*/
/* non-debugging/profiling allocation calls */
#ifndef vmalloc
-#define vmalloc(vm,sz) (*(_VM_(vm)->meth.allocf))((vm),(sz))
+#define vmalloc(vm,sz) (*(_VM_(vm)->meth.allocf))((vm),(sz),0)
#endif
#ifndef vmresize
#define vmresize(vm,d,sz,type) (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type))
+ ((vm),(Void_t*)(d),(sz),(type),0)
#endif
#ifndef vmfree
-#define vmfree(vm,d) (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d))
+#define vmfree(vm,d) (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d),0)
#endif
#ifndef vmalign
-#define vmalign(vm,sz,align) (*(_VM_(vm)->meth.alignf))((vm),(sz),(align))
+#define vmalign(vm,sz,align) (*(_VM_(vm)->meth.alignf))((vm),(sz),(align),0)
#endif
-#define vmaddr(vm,addr) (*(_VM_(vm)->meth.addrf))((vm),(Void_t*)(addr))
-#define vmsize(vm,addr) (*(_VM_(vm)->meth.sizef))((vm),(Void_t*)(addr))
-#define vmcompact(vm) (*(_VM_(vm)->meth.compactf))((vm))
+#define vmaddr(vm,addr) (*(_VM_(vm)->meth.addrf))((vm),(Void_t*)(addr),0)
+#define vmsize(vm,addr) (*(_VM_(vm)->meth.sizef))((vm),(Void_t*)(addr),0)
+#define vmcompact(vm) (*(_VM_(vm)->meth.compactf))((vm),0)
#define vmoldof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
(VM_RSMOVE) )
#define vmnewof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
(VM_RSMOVE|VM_RSCOPY|VM_RSZERO) )
-#define vmdata(vm) ((Void_t*)(_VM_(vm)->data))
+
+#define vmdata(vm) ((Void_t*)(_VM_(vm)->data) )
+#define vmlocked(vm) (*((unsigned int*)(_VM_(vm)->data)) )
#endif /* _VMALLOC_H */
diff --git a/usr/src/lib/libast/common/include/wait.h b/usr/src/contrib/ast/src/lib/libast/include/wait.h
index b50e6f0be2..0dff61930e 100644
--- a/usr/src/lib/libast/common/include/wait.h
+++ b/usr/src/contrib/ast/src/lib/libast/include/wait.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/man/LIBAST.3 b/usr/src/contrib/ast/src/lib/libast/man/LIBAST.3
index 380ebde2dc..380ebde2dc 100644
--- a/usr/src/lib/libast/common/man/LIBAST.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/LIBAST.3
diff --git a/usr/src/contrib/ast/src/lib/libast/man/aso.3 b/usr/src/contrib/ast/src/lib/libast/man/aso.3
new file mode 100644
index 0000000000..a9d077a159
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/man/aso.3
@@ -0,0 +1,357 @@
+.fp 5 CW
+.TH LIBASO 3
+.SH NAME
+\fBASO\fP \- Atomic Scalar Operations
+.SH SYNOPSIS
+.de Tp
+.fl
+.ne 2
+.TP
+..
+.de Ss
+.fl
+.ne 2
+.SS "\\$1"
+..
+.de Cs
+.nf
+.ft 5
+..
+.de Ce
+.ft 1
+.fi
+..
+.ta 1.0i 2.0i 3.0i 4.0i 5.0i
+.Cs
+#include <aso.h>
+.Ce
+.Ss "TYPES"
+.Cs
+typedef int (*Asoerror_f)(int, const char*);
+typedef void* (*Asoinit_f)(void*, const char*);
+typedef ssize_t (*Asolock_f)(void*, ssize_t, void volatile*);
+
+typedef struct Asodisc_s
+{
+ uint32_t version;
+ unsigned int hung;
+ Asoerror_f errorf;
+} Asodisc_t;
+
+typedef struct Asometh_s
+{
+ const char* name;
+ int type;
+ Asoinit_f initf;
+ Asolock_f lockf;
+ const char* details;
+} Asometh_t;
+.Ce
+.Ss "OPERATIONS"
+.Cs
+uint8_t asocas8(uint8_t volatile*, int, int);
+uint8_t asoget8(uint8_t volatile*);
+uint8_t asoinc8(uint8_t volatile*);
+uint8_t asodec8(uint8_t volatile*);
+
+uint16_t asocas16(uint16_t volatile*, uint16_t, uint16_t);
+uint16_t asoget16(uint16_t volatile*);
+uint16_t asoinc16(uint16_t volatile*);
+uint16_t asodec16(uint16_t volatile*);
+
+uint32_t asocas32(uint32_t volatile*, uint32_t, uint32_t);
+uint32_t asoget32(uint32_t volatile*);
+uint32_t asoinc32(uint32_t volatile*);
+uint32_t asodec32(uint32_t volatile*);
+
+uint64_t asocas64(uint64_t volatile*, uint64_t, uint64_t);
+uint64_t asoget64(uint64_t volatile*);
+uint64_t asoinc64(uint64_t volatile*);
+uint64_t asodec64(uint64_t volatile*);
+
+unsigned char asocaschar(unsigned char volatile*, int, int);
+unsigned char asogetchar(unsigned char volatile*);
+unsigned char asoincchar(unsigned char volatile*);
+unsigned char asodecchar(unsigned char volatile*);
+
+unsigned short asocasshort(unsigned short volatile*, unsigned short, unsigned short);
+unsigned short asogetshort(unsigned short volatile*);
+unsigned short asoincshort(unsigned short volatile*);
+unsigned short asodecshort(unsigned short volatile*);
+
+unsigned int asocasint(unsigned int volatile*, unsigned int, unsigned int);
+unsigned int asogetint(unsigned int volatile*);
+unsigned int asoincint(unsigned int volatile*);
+unsigned int asodecint(unsigned int volatile*);
+
+unsigned long asocaslong(unsigned long volatile*, unsigned long, unsigned long);
+unsigned long asogetlong(unsigned long volatile*);
+unsigned long asoinclong(unsigned long volatile*);
+unsigned long asodeclong(unsigned long volatile*);
+
+size_t asocassize(size_t volatile*, size_t, size_t);
+size_t asogetsize(size_t volatile*);
+size_t asoincsize(size_t volatile*);
+size_t asodecsize(size_t volatile*);
+
+void* asocasptr(void volatile*, void*, void*);
+void* asogetptr(void volatile*);
+
+void ASODISC(Asodisc_t*, Asoerror_f);
+Asometh_t* asometh(int, void*);
+int asoinit(const char*, Asometh_t*, Asodisc_t*);
+int asolock(unsigned int volatile*, unsigned int, int);
+int asoloop(uintmax_t);
+int asorelax(long);
+.Ce
+.SH DESCRIPTION
+.PP
+\fIASO\fP provides functions to perform atomic scalar operations.
+The functions on the type \f5uint32_t\fP will be fully described below.
+Other functions work similarly on their respective types.
+Some of the functions may be macros that call other functions.
+64 bit operations are provided if the compiler supports 64 bit integers and/or pointers.
+.PP
+.Ss "TYPES"
+.PP
+\f5uint8_t, uint16_t, uint32_t, uint64_t\fP
+
+These are \fIunsigned integer\fP types of different sizes in bits.
+For example, \f5uint32_t\fP represents the type of unsigned integer with 32 bits or 4 bytes.
+.PP
+.Ss "OPERATIONS"
+.PP
+.Ss " uint32_t asoget32(uint32_t* from);"
+This function returns the value \f5*from\fP.
+.PP
+.Ss " uint32_t asoinc32(uint32_t* dest);"
+.Ss " uint32_t asodec32(uint32_t* dest);"
+These functions increment \f5*dest\fP by 1 and decrement \f5*dest\fP by 1 in an atomic step.
+The return value is the old value in \f5*dest\fP.
+
+Consider an example where two concurrent threads/processes call \f5asoinc32()\fP
+on the same \f5dest\fP with values, say \fIv1\fP and \fIv2\fP.
+The eventual value in \f5dest\fP
+will be as if \f5*dest += 2\fP was performed in a single-threaded execution.
+
+That should be constrasted with a situation where, instead of \f5asoinc32()\fP or \f5asodec32()\fP,
+only normal increment (++) or decrement (--) were used.
+Then, the end result could be either \f5*dest += 1\fP or \f5*dest += 2\fP,
+depending on states of the hardware cache and process scheduling.
+.PP
+.Ss " uint32_t asocas32(uint32_t* dest, uint32_t tstval, uint32_t newval);"
+This function provides the atomic \fIcompare-and-swap\fP operation.
+If the current content of \f5dest\fP is equal to \f5tstval\fP then it will be set to \f5newval\fP.
+If multiple threads/processes are performing the same operations only one will succeed with a
+return value of \f5tstval\fP.
+The return value is the old value in \f5*dest\fP.
+.PP
+.Ss " void asorelax(long nsec)"
+This function causes the calling process or thread to briefly pause
+for \f5nsec\fP nanoseconds.
+It is useful to implement tight loops that occasionally yield control.
+.PP
+.Ss " int asolock(unsigned int* lock, unsigned int key, int type)"
+This function uses \f5key\fP, a non-zero unsigned integer, to lock or unlock the \f5lock\fP.
+It returns \f50\fP on success and \f5-1\fP on failure.
+The argument \f5type\fP can take one of the following values:
+.Tp
+\f5ASO_UNLOCK\fP:
+This unlocks the lock if it was locked with \f5key\fP. It is an error to try
+unlocking a lock of a different key.
+.Tp
+\f5ASO_TRYLOCK\fP:
+This makes a single attempt to use the given \f5key\fP to acquire a lock.
+An error will result if the lock is already locked with a different key.
+.Tp
+\f5ASO_LOCK\fP:
+This is a regular locking call. If the lock is locked with a different key,
+this call will wait until the lock is open, then lock it with the given \f5key\fP.
+.Tp
+\f5ASO_SPINLOCK\fP:
+Regardless of what key is currently locking the lock,
+this call will always wait until the lock is open, then lock it with the given \f5key\fP.
+Note that, if the lock is already locked with \f5key\fP, this call can result
+in a deadlock unless that lock can be opened by some other mechanism, e.g.,
+by a different process or thread.
+.PP
+.Ss " int asoloop(uintmax_t iteration);"
+This function is used to implement spin locks that periodically relinquish the processor:
+.Cs
+uintmax_t iteration;
+iteration = 0;
+for (;;) {
+ /* test resource with an aso*() call */
+ if (asoloop(++iteration))
+ /* an error occurred */;
+}
+.Ce
+The value of \f5iteration\fP should be \f51\fP (\fInot\fP \f50\fP) for the first loop iteration.
+\f50\fP is returned on success, \f5-1\fP on failure.
+If \f5iteration mod 4\fP is \f50\fP then \f5asorelax(1)\fP is called to temporarily relinquish
+the processor.
+If \f5Asodisc_t.hung != 0\fP and \f5Asodisc_t.errorf != 0\fP and
+\f5iteration mod (2**Asodisc_t.hung-1)\fP is \f50\fP,
+then \f5Asodisc_t.errorf\fP is called with type \f5ASO_HUNG\fP
+and \f5-1\fP is returned.
+.PP
+.Ss "DISCIPLINE"
+.PP
+The Asodisc_t discipline structure allows the caller to modify default behavior.
+The \fIASO\fP discipline is global for all threads and forked children of the current process.
+The discipline is set and modified by the \f5asoinit()\fP function, described below.
+The structure members are:
+.Tp
+\f5uint32_t version;\fP
+This must be set to \f5ASO_VERSION\fP by the caller and is used by the implementation to detect
+release differences between the caller and the implementation.
+The version is integer of the form \fIYYYYMMDD\fP where \fIYYYY\fP is the release year, \fIMM\fP
+is the release month, and \fIDD\fP is the release day of month.
+This allows the implementation to be forwards and backwards binary compatible with all releases.
+.Tp
+\f5unsigned int hung;\fP
+An error occurs if \f5asoloop\fP() is called \f52**Asometh_t.hung\fP times without gaining access to the loop resource.
+The default value \f50\fP disables the test.
+.Tp
+\f5Asoerror_f errorf;\fP
+\f5int (*errorf)(int type, const char* mesg);\fP
+If \f5errorf\fP != \f50\fP then it is called for each \fIASO\fP fatal library condition.
+\f5type\fP may be one of: \f5ASO_METHOD\fP - a method error; \f5ASO_HUNG\fP - \f5asoloop\fP() was called
+\f52**Asometh_t.hung\fP times with no access to the loop resource.
+\f5mesg\fP is a 0-terminated messsage description.
+.Ss " void ASODISC(Asodisc_t* disc, Asoerror_f errorf);"
+.PP
+This function-like-macro initializes \f5disc->version = ASO_VERSION\fP, \f5disc->errorf = errorf\fP,
+and the remaining \f5disc\fP members to \f50\fP.
+.PP
+.Ss "METHODS"
+.PP
+Several atomic locking methods are implemented for atomic operations
+not supported by \fIintrinsic\fP functions or assembly instructions.
+Methods are controlled by the \f5asometh()\fP and \f5asoinit()\fP
+functions, described below.
+The \fIASO\fP method is global for all threads and forked children of the current process.
+A given method may have multiple types.
+The methods types are:
+.Tp
+\f5ASO_INTRINSIC\fP:
+Some hardware platforms provide machine instructions to implement these operations directly.
+In that case, if a local compiler permits, calls to these \fIintrinsic\fP functions
+may be translated directly into their corresponding machine instructions.
+When necessary the implementation can use only the intrinsic \fIcompare-and-swap\fP
+function on the largest integer type to emulate all other \fIASO\fP operations.
+The \f5ASO_INTRINSIC\fP method type is the default when supported by the compiler.
+It may be used for single-process single-thread, multi-thread, and
+multi-process applications.
+When supported by the hardware / compiler, the library provides the "\fBintrinsic\fP" method with type
+\f5ASO_INTRINSIC|ASO_PROCESS|ASO_THREAD|ASO_SIGNAL\fP.
+.Tp
+\f5ASO_SIGNAL\fP:
+This method type is suitable only for single-process single-thread applications.
+It can be used to provide locking between asyncronous \fBsignal\fP(2) handlers
+and the main program.
+The library provides the "\fBsignal\fP" method with type \f5ASO_SIGNAL\fP.
+This is the default method type when \f5ASO_INTRINSIC\fP is not supported.
+.Tp
+\f5ASO_THREAD\fP:
+This method type is suitable for single-process single-thread, and multi-thread applications.
+It typically requires thread library support, and since the default \f5aso\fP library
+is not linked with a thread library, no \f5ASO_THREAD\fP method is provided by default.
+Threaded applications must link with \fB-ltaso\fP (before \fB-laso\fP or \fB-last\fP)
+in order to access \f5ASO_THREAD\fP methods.
+The \fB-ltaso\fP library provides the "\fBspin\fP" (using \fBpthread_spin_lock\fP(3)) and
+"\fBmutex"\fP (using \fBpthread_mutex_lock\fP(3)) methods with type \f5ASO_THREAD|ASO_SIGNAL\fP.
+.Tp
+\f5ASO_PROCESS\fP:
+This method type is suitable for single-process single-thread, and multi-process applications.
+Some \f5ASO_PROCESS\fP methods may also be suitable for multi-thread applications (if they have the \f5ASO_THREAD\fP type.)
+These methods are typically and noticably \fIslow\fP, up to 2 orders of magnitude slower than
+\f5ASO_INTRINSIC\fP for some applications.
+They are provided as a last resort when other methods are not available.
+The library provides the "\fBsemaphore\fP" method with type \f5ASO_PROCESS|ASO_THREAD|ASO_SIGNAL\fP
+and the "\fBfcntl\fP" method with type \f5ASO_PROCESS|ASO_SIGNAL\fP.
+
+.Ss " Asometh_t* asometh(int type, void* data);"
+This function looks up methods by type or name.
+If type is \f50\fP and \f5data\fP is \f50\fP then the current method is returned; a valid method
+will always be returned for this call.
+If type is \f50\fP then \f5data\fP is treated as a \f50\fP-terminated string method name;
+\f50\fP is returned if no matching method is found.
+The pseudo-type \f5ASO_NEXT\fP generates the list of all methods in successive calls:
+.Cs
+Asometh_t* meth;
+meth = 0;
+while (meth = asometh(ASO_NEXT, meth))
+ /* examine meth->... */
+.Ce
+Otherwise if \f5type\fP is not \f50\fP and not \f5ASO_NEXT\fP it is treated as a combination of the ordered types
+\f5ASO_THREAD\fP, \f5ASO_SIGNAL\fP, \f5ASO_INTRINSIC\fP, \f5ASO_PROCESS\fP:
+the first method with \f5(meth->type & type) != 0\fP is returned;
+\f50\fP is returned if no matching method is found.
+
+Method names are treated as a name, optionally followed by a list of
+\fB,\fP\fIname\fP=\fIvalue\fP details, and optionally ending with \fB,\fP\fIpathname\fP.
+The \fBsemaphore\fP method uses \fBsize\fP=\fInumber\fP to specify
+the number of semaphores and hashes \fIpathname\fP to determine the semaphore IPC key.
+The \fBfcntl\fP method uses \fBsize\fP=\fInumber\fP to specify
+the number of 1 byte file locks and uses \fIpathname\fP as the
+file to lock using \f5fcntl(F_SETLCK[W])\fP.
+
+.Ss " int asoinit(const char* details, Asometh_t* meth, Asodisc_t* disc);"
+This function sets the global discipline to \f5disc\fP,
+closes the current method (releasing its resources),
+temporarily instantiates the default method
+(either \f5ASO_INTRINSIC\fP if available or \f5AS_SIGNAL\fP otherwise),
+and initializes \f5meth\fP and instantiates it as the new method.
+If \f5disc\fP is \f50\fP the the global discpline is not modified.
+If \f5meth\fP is \f50\fP then \f51\fP is returned if \f5asoinit()\fP has
+already been called to initialize a method, otherwise \f50\fP is returned.
+If \f5meth->lockf\fP is \f50\fP and \f5(meth->type & ASO_INTRINSIC) != 0\fP
+then \f5-1\fP is returned and the current method is not changed.
+If an error occurs instantiating \f5meth\fP then the current method is
+set to the default and \f5-1\fP is returned.
+Otherwise \f50\fP is returned on success.
+
+Method resources are released by the next \f5asometh()\fP call,
+or by an \fIASO\fP cleanup function called via \f5atexit\fP(2).
+System global method resources are released on last use;
+this includes removing semaphore keys or
+physical files that may be used by some methods.
+In some cases \fIASO\fP maintains reference counts within
+the resource to determine last use.
+
+An application requiring a specific method must check the default method before
+using any \fIASO\fP operations. For example, a threaded application would
+do something like this:
+.Cs
+void* data = 0 /* \fIor\fP a method name string with optional details */
+Asometh_t* meth;
+if (data || !(asometh(0, 0)->type & (ASO_INTRINSIC|ASO_THREAD))) {
+ if (!(meth = asometh(ASO_INTRINSIC|ASO_THREAD, data)))
+ /* error -- suitable method not found */;
+ else if (asoinit(meth, 0, 0, ASO_VERSION))
+ /* error -- method initialization error */;
+}
+/* ready for \fIASO\fP operaions */
+.Ce
+A multi-process application would check for \f5(ASO_INTRINSIC|ASO_PROCESS)\fP
+instead of \f5(ASO_INTRINSIC|ASO_THREAD)\fP.
+
+.PP
+.SH IMPLEMENTATION NOTES
+Unlike other \fIAST\fP library discipline/method functions which can instantiate
+multiple discpline/method handles within a single process, the \fIASO\fP
+library allows only one discipline and method to be set at a time, with the additional
+restriction that it may only be set by the main and only thread of the calling process.
+For this reason there is no open/close interface with an instantation handle;
+instead the global discipline/method is simply initialized by \f5asoinit()\fP.
+
+\f5ASO_THREAD\fP and \f5ASO_PROCESS\fP methods rely on the \f5Asometh_t.lockf()\fP
+being sufficiently "heavy" to flush the calling thread/process memory cache
+so the subsequent \fIASO\fP operation operates on the physical memory location
+instead of the cached location. There is currently no other portable mechanism
+that guarantees this other than the \f5ASO_INTRINSIC\fP method.
+
+.PP
+.SH AUTHOR
+Kiem-Phong Vo, Adam Edgar, and Glenn Fowler
diff --git a/usr/src/lib/libast/common/man/ast.3 b/usr/src/contrib/ast/src/lib/libast/man/ast.3
index 8055be9dbc..8055be9dbc 100644
--- a/usr/src/lib/libast/common/man/ast.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/ast.3
diff --git a/usr/src/lib/libast/common/man/astsa.3 b/usr/src/contrib/ast/src/lib/libast/man/astsa.3
index 5b588a8ebe..5b588a8ebe 100644
--- a/usr/src/lib/libast/common/man/astsa.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/astsa.3
diff --git a/usr/src/lib/libast/common/man/cdt.3 b/usr/src/contrib/ast/src/lib/libast/man/cdt.3
index f353e3f0b1..46bfe13092 100644
--- a/usr/src/lib/libast/common/man/cdt.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/cdt.3
@@ -39,20 +39,26 @@ Dtstat_t;
Dt_t* dtopen(const Dtdisc_t* disc, const Dtmethod_t* meth);
int dtclose(Dt_t* dt);
void dtclear(dt);
-Dtmethod_t* dtmethod(Dt_t* dt, const Dtmethod_t* meth);
Dtdisc_t* dtdisc(Dt_t* dt, const Dtdisc_t* disc, int type);
+Dtmethod_t* dtmethod(Dt_t* dt, const Dtmethod_t* meth);
Dt_t* dtview(Dt_t* dt, Dt_t* view);
-int dttreeset(Dt_t* dt, int minp, int balance);
+int dtcustomize(Dt_t* dt, int type, Void_t* arg);
+int dtoptimize(Dt_t* dt);
+int dtshare(Dt_t* dt, int type);
+int dtlock(Dt_t* dt, unsigned int key, int type);
.Ce
.Ss "STORAGE METHODS"
.Cs
Dtmethod_t* Dtset;
Dtmethod_t* Dtbag;
+Dtmethod_t* Dtrhset;
+Dtmethod_t* Dtrhbag;
Dtmethod_t* Dtoset;
Dtmethod_t* Dtobag;
Dtmethod_t* Dtlist;
Dtmethod_t* Dtstack;
Dtmethod_t* Dtqueue;
+Dtmethod_t* Dtdeque;
.Ce
.Ss "DISCIPLINE"
.Cs
@@ -68,6 +74,7 @@ typedef int (*Dtevent_f)(Dt_t*, int, Void_t*, Dtdisc_t*);
.Ss "OBJECT OPERATIONS"
.Cs
Void_t* dtinsert(Dt_t* dt, Void_t* obj);
+Void_t* dtappend(Dt_t* dt, Void_t* obj);
Void_t* dtdelete(Dt_t* dt, Void_t* obj);
Void_t* dtattach(Dt_t* dt, Void_t* obj);
Void_t* dtdetach(Dt_t* dt, Void_t* obj);
@@ -77,25 +84,22 @@ Void_t* dtfirst(Dt_t* dt);
Void_t* dtnext(Dt_t* dt, Void_t* obj);
Void_t* dtlast(Dt_t* dt);
Void_t* dtprev(Dt_t* dt, Void_t* obj);
-Void_t* dtfinger(Dt_t* dt);
-Void_t* dtrenew(Dt_t* dt, Void_t* obj);
+Void_t* dtleast(Dt_t* dt, Void_t* obj);
+Void_t* dtmost(Dt_t* dt, Void_t* obj);
int dtwalk(Dt_t* dt, int (*userf)(Dt_t*, Void_t*, Void_t*), Void_t*);
Dtlink_t* dtflatten(Dt_t* dt);
-Dtlink_t* dtlink(Dt_t*, Dtlink_t* link);
+Dtlink_t* dtlink(Dt_t* dt, Dtlink_t* link);
Void_t* dtobj(Dt_t* dt, Dtlink_t* link);
Dtlink_t* dtextract(Dt_t* dt);
-int dtrestore(Dt_t* dt, Dtlink_t* link);
-
-#define DTTREESEARCH(Dt_t* dt, Void_t* obj, action)
-#define DTTREEMATCH(Dt_t* dt, Void_t* key, action)
+Dtlink_t* dtrestore(Dt_t* dt, Dtlink_t* link);
.Ce
.Ss "DICTIONARY STATUS"
.Cs
Dt_t* dtvnext(Dt_t* dt);
-int dtvcount(Dt_t* dt);
+ssize_t dtvcount(Dt_t* dt);
Dt_t* dtvhere(Dt_t* dt);
-int dtsize(Dt_t* dt);
-int dtstat(Dt_t* dt, Dtstat_t*, int all);
+ssize_t dtsize(Dt_t* dt);
+ssize_t dtstat(Dt_t* dt, Dtstat_t* st);
.Ce
.Ss "HASH FUNCTIONS"
.Cs
@@ -112,14 +116,14 @@ unordered set/multiset, ordered set/multiset, list, stack, and queue.
.Ss " Void_t*"
This type is used to pass objects between \fICdt\fP and application code.
\f5Void_t\fP is defined as \f5void\fP for ANSI-C and C++
-and \f5char\fP for other compilation environments.
+and \f5char\fP for older C compilation environments.
.PP
.Ss " Dt_t"
This is the type of a dictionary handle.
.PP
.Ss " Dtdisc_t"
-This defines the type of a discipline structure which describes
-object lay-out and manipulation functions.
+This defines the type of a discipline structure which define the lay-out of
+an object and functions to compare, hash, make, delete objects, etc. (see \f5dtdisc()\fP).
.PP
.Ss " Dtmethod_t"
This defines the type of a container method.
@@ -149,15 +153,6 @@ See also the events \f5DT_CLOSE\fP and \f5DT_ENDCLOSE\fP below.
.Ss " void dtclear(Dt_t* dt)"
This deletes all objects in \f5dt\fP without closing \f5dt\fP.
.PP
-.Ss " Dtmethod_t dtmethod(Dt_t* dt, const Dtmethod_t* meth)"
-If \f5meth\fP is \f5NULL\fP, \f5dtmethod()\fP returns the current method.
-Otherwise, it changes the storage method of \f5dt\fP to \f5meth\fP.
-Object order remains the same during a
-method switch among \f5Dtlist\fP, \f5Dtstack\fP and \f5Dtqueue\fP.
-Switching to and from \f5Dtset/Dtbag\fP and \f5Dtoset/Dtobag\fP may cause
-objects to be rehashed, reordered, or removed as the case requires.
-\f5dtmethod()\fP returns the previous method or \f5NULL\fP on error.
-.PP
.Ss " Dtdisc_t* dtdisc(Dt_t* dt, const Dtdisc_t* disc, int type)"
If \f5disc\fP is \f5NULL\fP, \f5dtdisc()\fP returns the current discipline.
Otherwise, it changes the discipline of \f5dt\fP to \f5disc\fP.
@@ -170,6 +165,12 @@ thus obviating the need to rehash.
\f5dtdisc()\fP returns the previous discipline on success
and \f5NULL\fP on error.
.PP
+.Ss " Dtmethod_t dtmethod(Dt_t* dt, const Dtmethod_t* meth)"
+If \f5meth\fP is \f5NULL\fP, \f5dtmethod()\fP returns the current method.
+Otherwise, it changes the storage method of \f5dt\fP to \f5meth\fP.
+Objects may be rehashed, reordered, or removed as appropriate.
+\f5dtmethod()\fP returns the previous method or \f5NULL\fP on error.
+.PP
.Ss " Dt_t* dtview(Dt_t* dt, Dt_t* view)"
A viewpath allows a search or walk starting from a dictionary to continue to another.
\f5dtview()\fP first terminates any current view from \f5dt\fP to another dictionary.
@@ -177,24 +178,56 @@ Then, if \f5view\fP is \f5NULL\fP, \f5dtview\fP returns the terminated view dict
If \f5view\fP is not \f5NULL\fP, a viewpath from \f5dt\fP to \f5view\fP is established.
\f5dtview()\fP returns \f5dt\fP on success and \f5NULL\fP on error.
.PP
-If two dictionaries on the same viewpath have the same values for the discipline fields
-\f5Dtdisc_t.link\fP, \f5Dtdisc_t.key\fP, \f5Dtdisc_t.size\fP, and \f5Dtdisc_t.hashf\fP,
-it is expected that key hashing will be the same.
-If not, undefined behaviors may result during a search or a walk.
+It is an error to have dictionaries on a viewpath with different storage methods.
+In addition, dictionaries on the same view path should
+treat objects in a consistent manner with respect to comparison or hashing.
+If not, undefined behaviors may result.
.PP
-.Ss " int dttreeset(Dt_t* dt, int minp, int balance)"
-This function only applies to dictionaries operated under the method \f5Dtoset\fP
-which uses top-down splay trees (see below). It returns 0 on success and -1 on error.
+.Ss " int dtcustomize(Dt_t* dt, int type, Void_t* arg)"
+This customizes a storage method. The \f5type\fP argument
+indicates the type of customization and \f5arg\fP gives additional
+information for the operation. Here are the types:
+.Tp
+\f5DT_SHARE\fP:
+This turns on/off the share mode for a dictionary.
+Concurrent accesses of a dictionary not in share mode
+may exhibit undefined behaviors including memory segmentation.
+
+Share mode allows multiple accessors, threads or processes, to access objects.
+Such objects could be in the same directory in the case of threads or shared
+memory in the case of processes.
+.Tp
+\f5DT_OPTIMIZE\fP:
+This causes the underlying method to optimize its internal
+data structure. For example, the splay tree underlying \f5Dtoset\fP
+would be balanced.
+.PP
+.Ss " int dtoptimize(Dt_t* dt)"
+This is a short-hand for invoking \f5dtcustomize()\fP with the \f5DT_OPTIMIZE\fP event.
+.PP
+.Ss " int dtshare(Dt_t* dt, int type)"
+This turns on or off share mode for dictionary \f5dt\fP depending on whether \f5type\fP
+is positive or non-positive. It returns -1 on failure.
+.PP
+.Ss " int dtlock(Dt_t* dt, unsigned int key, int type)"
+This globally locks/unlocks a dictionary using the given \f5key\fP.
+It returns 0 on success and -1 on failure.
+The value of \f5key\fP must not be 0.
+The argument \f5type\fP is used as follows:
+.Tp
+\f5type < 0\fP:
+Unlock the dictionary if it was locked with \f5key\fP.
+An error will result if the dictionary was locked with a different key.
.Tp
-\f5minp\fP:
-This parameter defines the minimum path length before a search path is adjusted.
-For example, \f5minp\fP equal 0 would mean that search paths are always adjusted.
-If \f5minp\fP is negative, the minimum search path is internally computed based
-on a function of the current dictionary size. This computed value is such that
-if the tree is balanced, it will never require adjusting.
+\f5type == 0\fP:
+Attempt to lock the dictionary with \f5key\fP if it is unlocked.
+An error will result if the dictionary was already locked with a different key.
.Tp
-\f5balance\fP:
-If this is non-zero, the tree will be made balanced.
+\f5type > 0\fP:
+Attempt to lock the dictionary with \f5key\fP.
+If the dictionary is already locked with a different key,
+the call will loop and wait until the lock is open to lock it.
+
.PP
.Ss "STORAGE METHODS"
.PP
@@ -211,17 +244,28 @@ Objects are ordered by comparisons.
.Ss " Dtbag"
Objects are unordered.
\f5Dtset\fP keeps unique objects.
-\f5Dtbag\fP allows repeatable objects and always keeps them together
-(note the effect on dictionary walking.)
-These methods use a hash table with chaining to manage the objects.
-See also the event \f5DT_HASHSIZE\fP below on how to manage hash table
-resizing when objects are inserted.
+\f5Dtbag\fP allows repeatable objects.
+The underlying data structure is a hash table with chaining to handle collisions.
+.PP
+.Ss " Dtrhset"
+.Ss " Dtrhbag"
+These methods are like \f5Dtset\fP and \f5Dtbag\fP but are based on
+a recursive hashing data structure that allows table extension without
+object relocation. The data structure also supports lock-free
+concurrent search operations for share dictionaries.
.PP
.Ss " Dtlist"
Objects are kept in a list.
-New objects are inserted either
-in front of \fIcurrent object\fP (see \f5dtfinger()\fP) if this is defined
-or at list front if there is no current object.
+\fIA current object\fP is always defined to be either the head of
+the list or an object resulting from a recent search or insert operation.
+The call \f5dtinsert()\fP will insert a new object
+in front of such a current object
+while the call \f5dtappend()\fP will append in back of it.
+.PP
+.Ss " Dtdeque"
+Objects are kept in a deque. This is similar to \f5Dtlist\fP
+except that objects are always inserted at the front and appended at the tail
+of the list.
.PP
.Ss " Dtstack"
Objects are kept in a stack, i.e., in reverse order of insertion.
@@ -239,8 +283,8 @@ Object format and associated management functions are
defined in the type \f5Dtdisc_t\fP:
.Cs
typedef struct
- { int key, size;
- int link;
+ { ssize_t key, size;
+ ssize_t link;
Dtmake_f makef;
Dtfree_f freef;
Dtcompar_f comparf;
@@ -249,7 +293,7 @@ defined in the type \f5Dtdisc_t\fP:
Dtevent_f eventf;
} Dtdisc_t;
.Ce
-.Ss " int key, size"
+.Ss " ssize_t key, size"
Each object \f5obj\fP is identified by a key used for object comparison or hashing.
\f5key\fP should be non-negative and defines an offset into \f5obj\fP.
If \f5size\fP is negative, the key is a null-terminated
@@ -259,16 +303,17 @@ If \f5size\fP is zero, the key is a null-terminated string with starting address
Finally, if \f5size\fP is positive, the key is a byte array of length \f5size\fP
starting at \f5(Void_t*)((char*)obj+key)\fP.
.PP
-.Ss " int link"
-Let \f5obj\fP be an object to be inserted into \f5dt\fP as discussed below.
-If \f5link\fP is negative, an internally allocated object holder is used
-to hold \f5obj\fP. Otherwise, \f5obj\fP should have
+.Ss " ssize_t link"
+Let \f5obj\fP be an object to be inserted into \f5dt\fP.
+If \f5link\fP is negative, an object holder of type \f5Dtlink_t\fP
+will be allocated to hold \f5obj\fP.
+Otherwise, \f5obj\fP should have
a \f5Dtlink_t\fP structure embedded \f5link\fP bytes into it,
i.e., at address \f5(Dtlink_t*)((char*)obj+link)\fP.
.PP
.Ss " Void_t* (*makef)(Dt_t* dt, Void_t* obj, Dtdisc_t* disc)"
If \f5makef\fP is not \f5NULL\fP,
-\f5dtinsert(dt,obj)\fP will call it
+\f5dtinsert(dt,obj)\fP or \f5dtappend()\fP will call it
to make a copy of \f5obj\fP suitable for insertion into \f5dt\fP.
If \f5makef\fP is \f5NULL\fP, \f5obj\fP itself will be inserted into \f5dt\fP.
.PP
@@ -300,9 +345,6 @@ If \f5addr\fP is not \f5NULL\fP and \f5size\fP is zero, \f5addr\fP is to be free
If \f5addr\fP is not \f5NULL\fP and \f5size\fP is positive,
\f5addr\fP is to be resized to the given size.
If \f5memoryf\fP is \f5NULL\fP, \fImalloc(3)\fP is used.
-When dictionaries share memory,
-a record of the first allocated memory segment should be kept
-so that it can be used to initialize other dictionaries (see below.)
.PP
.Ss " int (*eventf)(Dt_t* dt, int type, Void_t* data, Dtdisc_t* disc)"
If not \f5NULL\fP, \f5eventf\fP announces various events.
@@ -311,35 +353,49 @@ But a negative return value typically means failure.
Following are the events:
.Tp
\f5DT_OPEN\fP:
-\f5dt\fP is being opened.
-If \f5eventf\fP returns negative, the opening process terminates with failure.
-If \f5eventf\fP returns zero, the opening process proceeds normally.
-A positive return value indicates special treatment of memory as follows.
-If \f5*(Void_t**)data\fP is set to point to some memory segment
-as discussed in \f5memoryf\fP, that segment of memory is used to start
-the dictionary. If \f5*(Void_t**)data\fP is not set, this indicates that
-\f5dtopen()\fP should allocate the dictionary handle itself with
-\f5memoryf\fP so that all memories pertained to the dictionary are allocated
-via this function.
+This event is raised at the start of the process to open a new dictionary.
+The argument \f5data\fP will be a pointer to an object of type \f5Void_t*\fP
+initialized to \f5NULL\fP before the call. The return value of \f5eventf()\fP
+is significant as follows:
+
+On a negative return value, \f5dtopen()\fP will return failure.
+
+On a zero return value, \f5eventf()\fP may set \f5*(Void_t**)data\fP to some non-\f5NULL\fP
+value to indicate that the dictionary structure itself should be allocated
+along with the \f5Dtdisc_t.data\fP section.
+Otherwise, it will be allocated separately with \f5malloc(3)\fP.
+
+On a positive return value, the dictionary is being reconstructed
+based on existing states of some previous dictionary.
+In this case, \f5eventf()\fP should set \f5*(Void_t**)data\fP to point to
+the field \f5Dt_t.data\fP of the corresponding previous dictionary (see \f5DT_CLOSE\fP below).
+If the handle of the previous dictionary was created as discussed above
+in the case of the zero return value, it will be exactly restored.
+Otherwise, a new handle will be allocated with \f5malloc()\fP.
+The ability to create different dictionaries sharing the same set of objects
+allows for managing objects in shared and/or persistent memory.
.Tp
\f5DT_ENDOPEN\fP:
-This event announces that \f5dtopen()\fP has successfully opened
-a dictionary and is about to return. The \f5data\fP argument of
-\f5eventf\fP should be the new dictionary handle itself.
+This event is raised at the end of the process to open a dictionary.
+The return value of \f5eventf()\fP will be ignored.
.Tp
\f5DT_CLOSE\fP:
-\f5dt\fP is about to be closed. If \f5eventf\fP returns zero,
-the closing process proceeds normally. This means that all objects
-in the dictionary will be deleted and all associated memories freed.
-If \f5eventf\fP returns a positive value, objects will not be deleted.
-However, the dictionary handle itself will still be deallocated
-unless it was allocated via \f5memoryf\fP during \f5dtopen()\fP.
-This allows shared/persistent memory dictionaries to retain
-the relevant memories across dictionary openings and closings.
+This event is raised at the start of the process to close dictionary \f5dt\fP.
+The return value of \f5eventf\fP is significant as follows:
+
+On a negative return value, \f5dtclose()\fP will return failure.
+
+On a zero return value, all dictionary objects will be deleted and
+and all associated memory will be freed.
+
+On a positive return value, allocated objects and memory will be kept intact.
+This means that \f5dt->data\fP remains intact and can be reused in some future
+dictionary (see \f5DT_OPEN\fP above).
+Note, however, that \f5dt\fP itself would still be freed if it was allocated with \f5malloc(3)\fP.
.Tp
\f5DT_ENDCLOSE\fP:
-This event announces that \f5dtclose()\fP has successfully closed
-a dictionary and is about to return.
+This event is raised at the end of the process to close a dictionary.
+The return value of \f5eventf()\fP will be ignored.
.Tp
\f5DT_DISC\fP:
The discipline of \f5dt\fP is being changed to a new one given in
@@ -350,15 +406,23 @@ The method of \f5dt\fP is being changed to a new one given in
\f5(Dtmethod_t*)data\fP.
.Tp
\f5DT_HASHSIZE\fP:
-The hash table (for \f5Dtset\fP and \f5Dtbag\fP) is being resized.
-In this case, \f5*(int*)data\fP has the current size of the table.
-The application can set the new table size by first changing
-\f5*(int*)data\fP to the desired size, then return a positive value.
-The application can also fix the table size at the current value
-forever by setting \f5*(int*)data\fP to a negative value, then
-again return a positive value. A non-positive return value from
-the event handling function means that Cdt will be responsible
-for choosing the hash table size.
+This event is applicable to
+the methods \f5Dtset\fP, \f5Dtbag\fP, \f5Dtrhset\fP and \f5Dtrhbag\fP.
+It is typically issued when the respective internal data structure of
+a method is about to be initialized.
+If the return value of the event handling function is positive,
+\f5*(ssize_t*)data\fP is examined for further action;
+else, it is ignored.
+A positive return value means that the event function wishes to suggest a table size.
+It does that by setting \f5*(ssize_t*)data\fP to the desired size.
+Then, the actual table size will be the maximum of the absolute value
+of \f5*(ssize_t*)data\fP and some predefined value set by the method.
+In addition, if \f5*(ssize_t*)data\fP was negative,
+the \f5Dtset\fP and \f5Dtbag\fP methods will never resize the hash table.
+.Tp
+\f5DT_ERROR\fP:
+This event announces an error that occurred during some operations.
+The argument \f5(char*)data\fP is a null-terminated string describing the error.
.PP
.Ss "#define DTOFFSET(struct_s,member)"
This macro function computes the offset of \f5member\fP from the start
@@ -372,24 +436,22 @@ with the given values.
.Ss "OBJECT OPERATIONS"
.PP
.Ss " Void_t* dtinsert(Dt_t* dt, Void_t* obj)"
-This inserts an object prototyped by \f5obj\fP into \f5dt\fP.
+.Ss " Void_t* dtappend(Dt_t* dt, Void_t* obj)"
+These functions add an object prototyped by \f5obj\fP into \f5dt\fP.
+\f5dtinsert()\fP and \f5dtappend()\fP perform the same function
+for all methods except for \f5Dtlist\fP (see \f5Dtlist\fP for details).
If there is an existing object in \f5dt\fP matching \f5obj\fP
-and the storage method is \f5Dtset\fP or \f5Dtoset\fP,
-\f5dtinsert()\fP will simply return the matching object.
+and the storage method is \f5Dtset\fP, \f5Dtrhset\fP or \f5Dtoset\fP,
+\f5dtinsert()\fP and \f5dtappend()\fP will simply return the matching object.
Otherwise, a new object is inserted according to the method in use.
See \f5Dtdisc_t.makef\fP for object construction.
-\f5dtinsert()\fP returns the new object, a matching object as noted,
-or \f5NULL\fP on error.
+The new object or a matching object as noted will be returned on success
+while \f5NULL\fP is returned on error.
.PP
.Ss " Void_t* dtdelete(Dt_t* dt, Void_t* obj)"
If \f5obj\fP is \f5NULL\fP, methods \f5Dtstack\fP and \f5Dtqueue\fP
delete respectively stack top or queue head while other methods do nothing.
-If \f5obj\fP is not \f5NULL\fP, there are two cases.
-If the method in use is not \f5Dtbag\fP or \f5Dtobag\fP,
-the first object matching \f5obj\fP is deleted.
-On the other hand, if the method in use is \f5Dtbag\fP or \f5Dtobag\fP,
-the library check to see if \f5obj\fP is in the dictionary and delete it.
-If \f5obj\fP is not in the dictionary, some object matching it will be deleted.
+If \f5obj\fP is not \f5NULL\fP, an object matching \f5obj\fP is deleted.
See \f5Dtdisc_t.freef\fP for object destruction.
\f5dtdelete()\fP returns the deleted object (even if it was deallocated)
or \f5NULL\fP on error.
@@ -413,48 +475,42 @@ from some dictionary accessible from \f5dt\fP via a viewpath (see \f5dtview()\fP
.Ss " Void_t* dtfirst(Dt_t* dt)"
.Ss " Void_t* dtnext(Dt_t* dt, Void_t* obj)"
\f5dtfirst()\fP returns the first object in \f5dt\fP.
-\f5dtnext()\fP returns the object following \f5obj\fP.
+\f5dtnext()\fP returns the object that follows an object matching \f5obj\fP.
Objects are ordered based on the storage method in use.
For \f5Dtoset\fP and \f5Dtobag\fP, objects are ordered by object comparisons.
For \f5Dtstack\fP, objects are ordered in reverse order of insertion.
For \f5Dtqueue\fP, objects are ordered in order of insertion.
For \f5Dtlist\fP, objects are ordered by list position.
-For \f5Dtset\fP and \f5Dtbag\fP,
-objects are ordered by some internal order (more below).
-Thus, objects in a dictionary or a viewpath can be walked using
+For \f5Dtset\fP, \f5Dtbag\fP, \f5Dtrhset\fP and \f5Dtrhbag\fP,
+objects are ordered by some internal order defined at the time when these
+functions are called.
+
+Objects in a dictionary or a viewpath can be walked using
a \f5for(;;)\fP loop as below.
.Cs
for(obj = dtfirst(dt); obj; obj = dtnext(dt,obj))
.Ce
-When a dictionary uses \f5Dtset\fP or \f5Dtbag\fP,
-the object order is determined upon a call to \f5dtfirst()\fP/\f5dtlast()\fP.
-This order is frozen until a call \f5dtnext()\fP/\f5dtprev()\fP returns \f5NULL\fP
-or when these same functions are called with a \f5NULL\fP object argument.
-It is important that a \f5dtfirst()/dtlast()\fP call be
-balanced by a \f5dtnext()/dtprev()\fP call as described.
-Nested loops will require multiple balancing, once per loop.
-If loop balancing is not done carefully, either performance is degraded
-or unexpected behaviors may result.
+.PP
.Ss " Void_t* dtlast(Dt_t* dt)"
.Ss " Void_t* dtprev(Dt_t* dt, Void_t* obj)"
\f5dtlast()\fP and \f5dtprev()\fP are like \f5dtfirst()\fP and \f5dtnext()\fP
but work in reverse order.
-Note that dictionaries on a viewpath are still walked in order
-but objects in each dictionary are walked in reverse order.
-.PP
-.Ss " Void_t* dtfinger(Dt_t* dt)"
-This function returns the \fIcurrent object\fP of \f5dt\fP, if any.
-The current object is defined after a successful call to one of
-\f5dtsearch()\fP, \f5dtmatch()\fP, \f5dtinsert()\fP,
-\f5dtfirst()\fP, \f5dtnext()\fP, \f5dtlast()\fP, or \f5dtprev()\fP.
-As a side effect of this implementation of \fICdt\fP,
-when a dictionary is based on \f5Dtoset\fP and \f5Dtobag\fP,
-the current object is always defined and is the root of the tree.
-.PP
-.Ss " Void_t* dtrenew(Dt_t* dt, Void_t* obj)"
-This function repositions and perhaps rehashes
-an object \f5obj\fP after its key has been changed.
-\f5dtrenew()\fP only works if \f5obj\fP is the current object (see \f5dtfinger()\fP).
+For \f5Dtset\fP, \f5Dtbag\fP, \f5Dtrhset\fP and \f5Dtrhbag\fP,
+both reverse and forward orders are the same.
+Note that dictionaries on a viewpath are still walked in the order
+of the viewpath.
+.PP
+.Ss " Void_t* dtleast(Dt_t* dt, Void_t* obj)"
+.Ss " Void_t* dtmost(Dt_t* dt, Void_t* obj)"
+\f5dtleast()\fP returns the smallest object greater or equal to \f5obj\fP.
+\f5dtmost()\fP returns the largest object smaller or equal to \f5obj\fP.
+Again, object ordering depends on the storage method in use.
+For example, with \f5Dtoset\fP and \f5Dtobag\fP, the ordering of objects
+is well-defined and it is possible to call \f5dtleast()\fP or \f5dtmost()\fP
+on an object not in the dictionary and still get a meaningful result.
+On the other hand, with \f5Dtset\fP or \f5Dtrhset\fP, such a call will
+essentially be the same as \f5dtsearch()\fP because without matching
+an object, it cannot be determined what comes before or after.
.PP
.Ss " dtwalk(Dt_t* dt, int (*userf)(Dt_t*, Void_t*, Void_t*), Void_t* data)"
This function calls \f5(*userf)(walk,obj,data)\fP on each object in \f5dt\fP and
@@ -488,90 +544,56 @@ Beware that the flattened object list is unflattened on any
dictionary operations other than \f5dtlink()\fP.
.PP
.Ss " Dtlink_t* dtextract(Dt_t* dt)"
-.Ss " int dtrestore(Dt_t* dt, Dtlink_t* link)"
-\f5dtextract()\fP extracts all objects from \f5dt\fP and makes it appear empty.
+.Ss " Dtlink_t* dtrestore(Dt_t* dt, Dtlink_t* list)"
+\f5dtextract()\fP extracts the list of objects from \f5dt\fP and makes it appear empty.
\f5dtrestore()\fP repopulates \f5dt\fP with
-objects previously obtained via \f5dtextract()\fP.
-\f5dtrestore()\fP will fail if \f5dt\fP is not empty.
-These functions can be used
-to share a same \f5dt\fP handle among many sets of objects.
-They are useful to reduce dictionary overhead
-in an application that creates many concurrent dictionaries.
+a list of objects previously obtained via \f5dtextract()\fP.
It is important that the same discipline and method are in use at both
extraction and restoration. Otherwise, undefined behaviors may result.
-.PP
-.Ss " #define DTTREESEARCH(Dt_t* dt, Void_t* obj, action)"
-.Ss " #define DTTREEMATCH(Dt_t* dt, Void_t* key, action)"
-These macro functions are analogues of \f5dtsearch()\fP and \f5dtmatch()\fP
-but they can only be used on a dictionary based on a binary
-search tree, i.e., \f5Dtoset\fP or \f5Dtobag\fP.
-.Tp
-\f5obj\fP or \f5key\fP:
-These are used to find a matching object. If there is no match,
-the result is \f5NULL\fP.
-.Tp
-\f5action\fP:
-The matching object \f5o\fP (which may be \f5NULL\fP) will be processed as follow:
-
-.Cs
- action (o);
-.Ce
-
-Since \f5action\fP is used verbatim, it can be any C code
-fragment combinable with \f5(o)\fP to form a syntactically correct C statement.
-For example, suppose that the matching object is an integer, the below code
-accumulates the integer value in a variable \f5total\fP:
-
-.Cs
- DTTREEMATCH(dt, key, total += (int));
-.Ce
+These functions return \f5NULL\fP on error.
.PP
.Ss "DICTIONARY INFORMATION"
.PP
.Ss " Dt_t* dtvnext(Dt_t* dt)"
This returns the dictionary that \f5dt\fP is viewing, if any.
-.Ss " int dtvcount(Dt_t* dt)"
+.Ss " ssize_t dtvcount(Dt_t* dt)"
This returns the number of dictionaries that view \f5dt\fP.
.Ss " Dt_t* dtvhere(Dt_t* dt)"
This returns the dictionary \f5v\fP viewable from \f5dt\fP
where an object was found from the most recent search or walk operation.
-.Ss " int dtsize(Dt_t* dt)"
+.Ss " ssize_t dtsize(Dt_t* dt)"
This function returns the number of objects stored in \f5dt\fP.
.PP
-.Ss " int dtstat(Dt_t *dt, Dtstat_t* st, int all)"
+.Ss " ssize_t dtstat(Dt_t *dt, Dtstat_t* st)"
This function reports dictionary statistics.
-If \f5all\fP is non-zero, all fields of \f5st\fP are filled.
-Otherwise, only the \f5dt_type\fP and \f5dt_size\fP fields are filled.
-It returns \f50\fP on success and \f5-1\fP on error.
+It returns the number of objects stored in \f5dt\fP.
.PP
\f5Dtstat_t\fP contains the below fields:
.Tp
-\f5int dt_type\fP:
-This is one of \f5DT_SET\fP, \f5DT_BAG\fP, \f5DT_OSET\fP, \f5DT_OBAG\fP,
-\f5DT_LIST\fP, \f5DT_STACK\fP, and \f5DT_QUEUE\fP.
+\f5int meth\fP:
+This returns the method used for the dictionary, e.g., \f5DT_SET\fP, \f5DT_OSET\fP, etc.
.Tp
-\f5int dt_size\fP:
-This contains the number of objects in the dictionary.
+\f5ssize_t size\fP:
+This has the number of objects in the dictionary.
.Tp
-\f5int dt_n\fP:
-For \f5Dtset\fP and \f5Dtbag\fP,
-this is the number of non-empty chains in the hash table.
-For \f5Dtoset\fP and \f5Dtobag\fP,
-this is the deepest level in the tree (counting from zero.)
-Each level in the tree contains all nodes of equal distance from the root node.
-\f5dt_n\fP and the below two fields are undefined for other methods.
+\f5ssize_t mlev\fP:
+This returns the maximum number of levels in the data structure used for object storage, i.e.,
+the binary tree or the recursive hash table.
+For a hash table with chaining (i.e., \f5Dtset\fP and \f5Dtbag\fP),
+it gives the length of the longest chain.
.Tp
-\f5int dt_max\fP:
-For \f5Dtbag\fP and \f5Dtset\fP, this is the size of a largest chain.
-For \f5Dtoset\fP and \f5Dtobag\fP, this is the size of a largest level.
+\f5ssize_t lsize[]\fP:
+This gives the object counts at each level.
+For a hash table with chaining (i.e., \f5Dtset\fP and \f5Dtbag\fP),
+a level is defined as objects at that position in their chains.
+Since chains can be arbitrarily long, the report is limited
+to objects at a level less than \f5DT_MAXSIZE\fP.
.Tp
-\f5int* dt_count\fP:
-For \f5Dtset\fP and \f5Dtbag\fP,
-this is the list of counts for chains of particular sizes.
-For example, \f5dt_count[1]\fP is the number of chains of size \f51\fP.
-For \f5Dtoset\fP and \f5Dtobag\fP, this is the list of sizes of the levels.
-For example, \f5dt_count[1]\fP is the size of level \f51\fP.
+\f5ssize_t tsize[]\fP:
+For a hash table using a trie structure, this counts the number of
+sub-tables at each level. For example, \f5tsize[0]\fP should be 1
+only for this hash table type.
.PP
.Ss "HASH FUNCTIONS"
.PP
@@ -584,10 +606,12 @@ If \f5n\fP is positive, \f5str\fP is a byte array of length \f5n\fP;
otherwise, \f5str\fP is a null-terminated string.
.PP
.SH IMPLEMENTATION NOTES
+\f5Dtlist\fP, \f5Dtstack\fP and \f5Dtqueue\fP are based on doubly linked list.
+\f5Dtoset\fP and \f5Dtobag\fP are based on top-down splay trees.
\f5Dtset\fP and \f5Dtbag\fP are based on hash tables with
move-to-front collision chains.
-\f5Dtoset\fP and \f5Dtobag\fP are based on top-down splay trees.
-\f5Dtlist\fP, \f5Dtstack\fP and \f5Dtqueue\fP are based on doubly linked list.
+\f5Dtrhset\fP and \f5Dtrhbag\fP are based on a recursive hashing data structure
+that avoids table resizing.
.PP
.SH AUTHOR
Kiem-Phong Vo, kpv@research.att.com
diff --git a/usr/src/lib/libast/common/man/chr.3 b/usr/src/contrib/ast/src/lib/libast/man/chr.3
index 8d57648b49..8d57648b49 100644
--- a/usr/src/lib/libast/common/man/chr.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/chr.3
diff --git a/usr/src/lib/libast/common/man/compat.3 b/usr/src/contrib/ast/src/lib/libast/man/compat.3
index eb5e8a7b21..eb5e8a7b21 100644
--- a/usr/src/lib/libast/common/man/compat.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/compat.3
diff --git a/usr/src/lib/libast/common/man/error.3 b/usr/src/contrib/ast/src/lib/libast/man/error.3
index df47d342ba..df47d342ba 100644
--- a/usr/src/lib/libast/common/man/error.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/error.3
diff --git a/usr/src/lib/libast/common/man/find.3 b/usr/src/contrib/ast/src/lib/libast/man/find.3
index a14ceaee0f..a14ceaee0f 100644
--- a/usr/src/lib/libast/common/man/find.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/find.3
diff --git a/usr/src/lib/libast/common/man/fmt.3 b/usr/src/contrib/ast/src/lib/libast/man/fmt.3
index dbe1aab2ec..dbe1aab2ec 100644
--- a/usr/src/lib/libast/common/man/fmt.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/fmt.3
diff --git a/usr/src/lib/libast/common/man/fmtls.3 b/usr/src/contrib/ast/src/lib/libast/man/fmtls.3
index 50d872b8e1..50d872b8e1 100644
--- a/usr/src/lib/libast/common/man/fmtls.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/fmtls.3
diff --git a/usr/src/lib/libast/common/man/fs3d.3 b/usr/src/contrib/ast/src/lib/libast/man/fs3d.3
index 7dfd448e5e..7dfd448e5e 100644
--- a/usr/src/lib/libast/common/man/fs3d.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/fs3d.3
diff --git a/usr/src/lib/libast/common/man/ftwalk.3 b/usr/src/contrib/ast/src/lib/libast/man/ftwalk.3
index f339ab71a0..f339ab71a0 100644
--- a/usr/src/lib/libast/common/man/ftwalk.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/ftwalk.3
diff --git a/usr/src/lib/libast/common/man/getcwd.3 b/usr/src/contrib/ast/src/lib/libast/man/getcwd.3
index 340329690d..340329690d 100644
--- a/usr/src/lib/libast/common/man/getcwd.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/getcwd.3
diff --git a/usr/src/lib/libast/common/man/hash.3 b/usr/src/contrib/ast/src/lib/libast/man/hash.3
index 162d62d7fb..162d62d7fb 100644
--- a/usr/src/lib/libast/common/man/hash.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/hash.3
diff --git a/usr/src/lib/libast/common/man/iblocks.3 b/usr/src/contrib/ast/src/lib/libast/man/iblocks.3
index 0c615f86c4..0c615f86c4 100644
--- a/usr/src/lib/libast/common/man/iblocks.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/iblocks.3
diff --git a/usr/src/lib/libast/common/man/int.3 b/usr/src/contrib/ast/src/lib/libast/man/int.3
index 8d457c083d..8d457c083d 100644
--- a/usr/src/lib/libast/common/man/int.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/int.3
diff --git a/usr/src/lib/libast/common/man/ip6.3 b/usr/src/contrib/ast/src/lib/libast/man/ip6.3
index 1dadb05d9d..1dadb05d9d 100644
--- a/usr/src/lib/libast/common/man/ip6.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/ip6.3
diff --git a/usr/src/lib/libast/common/man/magic.3 b/usr/src/contrib/ast/src/lib/libast/man/magic.3
index e8bf0e328f..e8bf0e328f 100644
--- a/usr/src/lib/libast/common/man/magic.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/magic.3
diff --git a/usr/src/lib/libast/common/man/mem.3 b/usr/src/contrib/ast/src/lib/libast/man/mem.3
index 70da0db525..70da0db525 100644
--- a/usr/src/lib/libast/common/man/mem.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/mem.3
diff --git a/usr/src/lib/libast/common/man/mime.3 b/usr/src/contrib/ast/src/lib/libast/man/mime.3
index f540b2e3f3..f540b2e3f3 100644
--- a/usr/src/lib/libast/common/man/mime.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/mime.3
diff --git a/usr/src/lib/libast/common/man/modecanon.3 b/usr/src/contrib/ast/src/lib/libast/man/modecanon.3
index 4a5d128f9c..4a5d128f9c 100644
--- a/usr/src/lib/libast/common/man/modecanon.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/modecanon.3
diff --git a/usr/src/lib/libast/common/man/optget.3 b/usr/src/contrib/ast/src/lib/libast/man/optget.3
index 90afcb8f76..90afcb8f76 100644
--- a/usr/src/lib/libast/common/man/optget.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/optget.3
diff --git a/usr/src/lib/libast/common/man/path.3 b/usr/src/contrib/ast/src/lib/libast/man/path.3
index 8721888bb5..8721888bb5 100644
--- a/usr/src/lib/libast/common/man/path.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/path.3
diff --git a/usr/src/lib/libast/common/man/preroot.3 b/usr/src/contrib/ast/src/lib/libast/man/preroot.3
index 025fc221c0..025fc221c0 100644
--- a/usr/src/lib/libast/common/man/preroot.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/preroot.3
diff --git a/usr/src/lib/libast/common/man/proc.3 b/usr/src/contrib/ast/src/lib/libast/man/proc.3
index 64c1a6ef49..64c1a6ef49 100644
--- a/usr/src/lib/libast/common/man/proc.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/proc.3
diff --git a/usr/src/lib/libast/common/man/re.3 b/usr/src/contrib/ast/src/lib/libast/man/re.3
index 2e1010e434..2e1010e434 100644
--- a/usr/src/lib/libast/common/man/re.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/re.3
diff --git a/usr/src/lib/libast/common/man/regex.3 b/usr/src/contrib/ast/src/lib/libast/man/regex.3
index 7c15d21c46..7c15d21c46 100644
--- a/usr/src/lib/libast/common/man/regex.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/regex.3
diff --git a/usr/src/lib/libast/common/man/setenviron.3 b/usr/src/contrib/ast/src/lib/libast/man/setenviron.3
index 818f7fc0d4..818f7fc0d4 100644
--- a/usr/src/lib/libast/common/man/setenviron.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/setenviron.3
diff --git a/usr/src/lib/libast/common/man/sfdisc.3 b/usr/src/contrib/ast/src/lib/libast/man/sfdisc.3
index f0ce5b0dcd..f0ce5b0dcd 100644
--- a/usr/src/lib/libast/common/man/sfdisc.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/sfdisc.3
diff --git a/usr/src/lib/libast/common/man/sfio.3 b/usr/src/contrib/ast/src/lib/libast/man/sfio.3
index bd805d4ec9..f22d0b76d3 100644
--- a/usr/src/lib/libast/common/man/sfio.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/sfio.3
@@ -146,6 +146,9 @@ SFFMT_LLONG
SFFMT_SHORT
SFFMT_LDOUBLE
SFFMT_IFLAG
+SFFMT_JFLAG
+SFFMT_CENTER
+SFFMT_CHOP
SFFMT_ALTER
SFFMT_SKIP
SFFMT_ARGPOS
@@ -1061,6 +1064,12 @@ The bits are:
\f5SFFMT_IFLAG\fP: flag \f5I\fP in \f5sfprintf()\fP and \f5sfscanf()\fP.
+\f5SFFMT_JFLAG\fP: flag \f5j\fP in \f5sfprintf()\fP and \f5sfscanf()\fP.
+
+\f5SFFMT_CENTER\fP: flag \f5=\fP in \f5sfprintf()\fP and \f5sfscanf()\fP.
+
+\f5SFFMT_CHOP\fP: flag \f5-\fP in \fIprecis\fP in \f5sfprintf()\fP and \f5sfscanf()\fP.
+
\f5SFFMT_ALTER\fP: Flag \f5#\fP in \f5sfprintf()\fP and \f5sfscanf()\fP.
\f5SFFMT_SKIP\fP: Flag \f5*\fP in \f5sfscanf()\fP.
@@ -1232,7 +1241,7 @@ Doing so may cause unexpected behaviors.
\f5flag\fP:
The flag characters are
\f5h\fP, \f5hh\fP, \f5l\fP, \f5ll\fP, \f5L\fP, \f5I\fP, \f5j\fP, \f5t\fP, \f5z\fP,
-\f5\-\fP, \f5+\fP, \fIspace\fP, \f50\fP, \f5'\fP and \f5#\fP.
+\f5\-\fP, \f5+\fP, \fIspace\fP, \f50\fP, \f5'\fP, \f5=\fP and \f5#\fP.
Flag \f5I\fP defines the size or type of the object being formatted.
There are two cases: (1) \f5I\fP by itself and (2) \f5I\fP
@@ -1287,9 +1296,9 @@ of data already output into a \f5short\fP integer \f5n_output\fP.
.ft 1
.fi
-Flags \f5h\fP, \f5l\fP, and \f5L\fP are the ANSI-C conventions to
+Flags \f5h\fP, \f5l\fP, \f5j\fP and \f5L\fP are the ANSI-C conventions to
select the types of input objects.
-For example, \f5%hd\fP indicates a \f5short int\fP
+For example, \f5%hd\fP indicates a \f5short int\fP,
while \f5%ld\fP indicates a \f5long int\fP.
Flag \f5hh\fP addresses the byte value types, i.e., \f5char\fP and \f5unsigned char\fP.
@@ -1314,6 +1323,8 @@ Flag \f50\fP means padding with zeros on the left.
Flag \f5'\fP outputs thousands-separator used by the current locale.
\f5setlocale(3)\fP should have been used to set the desired locale.
+Flag \f5=\fP centers data within the field.
+
Flag \f5#\fP indicates an alternative format processing.
For \f5%o\fP, the first digit is always a zero.
For \f5%x\fP and \f5%X\fP, a non-zero result will have a prefix
@@ -1338,7 +1349,9 @@ After a first dot appears, an integral value defines a precision.
For floating point value patterns, precision is the number of precision digits.
For \f5%c\fP, precision defines the number of times to repeat the
character being formatted.
-For \f5%s\fP, precision defines the maximum number of characters to output.
+For \f5%s\fP, precision defines the maximum number of characters to output;
+-\f5precis\fP also defines the maximum number of characters to output, but
+retains the rightmost \f5precis\fP characters.
.Tp
\f5base\fP:
This is defined after exactly two dots have appeared.
diff --git a/usr/src/lib/libast/common/man/sig.3 b/usr/src/contrib/ast/src/lib/libast/man/sig.3
index db41a2b08c..db41a2b08c 100644
--- a/usr/src/lib/libast/common/man/sig.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/sig.3
diff --git a/usr/src/lib/libast/common/man/spawnveg.3 b/usr/src/contrib/ast/src/lib/libast/man/spawnveg.3
index 3dfd4248cf..3dfd4248cf 100644
--- a/usr/src/lib/libast/common/man/spawnveg.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/spawnveg.3
diff --git a/usr/src/lib/libast/common/man/stak.3 b/usr/src/contrib/ast/src/lib/libast/man/stak.3
index 5feac69db3..5feac69db3 100644
--- a/usr/src/lib/libast/common/man/stak.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/stak.3
diff --git a/usr/src/lib/libast/common/man/stk.3 b/usr/src/contrib/ast/src/lib/libast/man/stk.3
index 3e658216f7..3e658216f7 100644
--- a/usr/src/lib/libast/common/man/stk.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/stk.3
diff --git a/usr/src/lib/libast/common/man/strcopy.3 b/usr/src/contrib/ast/src/lib/libast/man/strcopy.3
index c08d885b23..c08d885b23 100644
--- a/usr/src/lib/libast/common/man/strcopy.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strcopy.3
diff --git a/usr/src/lib/libast/common/man/strdup.3 b/usr/src/contrib/ast/src/lib/libast/man/strdup.3
index 3b26ec4f23..3b26ec4f23 100644
--- a/usr/src/lib/libast/common/man/strdup.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strdup.3
diff --git a/usr/src/lib/libast/common/man/strelapsed.3 b/usr/src/contrib/ast/src/lib/libast/man/strelapsed.3
index 8c3fa4adde..8c3fa4adde 100644
--- a/usr/src/lib/libast/common/man/strelapsed.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strelapsed.3
diff --git a/usr/src/lib/libast/common/man/strerror.3 b/usr/src/contrib/ast/src/lib/libast/man/strerror.3
index 0084e3aae8..0084e3aae8 100644
--- a/usr/src/lib/libast/common/man/strerror.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strerror.3
diff --git a/usr/src/lib/libast/common/man/stresc.3 b/usr/src/contrib/ast/src/lib/libast/man/stresc.3
index c09a0e9fc8..c09a0e9fc8 100644
--- a/usr/src/lib/libast/common/man/stresc.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/stresc.3
diff --git a/usr/src/lib/libast/common/man/streval.3 b/usr/src/contrib/ast/src/lib/libast/man/streval.3
index 2b491c8595..2b491c8595 100644
--- a/usr/src/lib/libast/common/man/streval.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/streval.3
diff --git a/usr/src/lib/libast/common/man/strgid.3 b/usr/src/contrib/ast/src/lib/libast/man/strgid.3
index d7a26634c2..d7a26634c2 100644
--- a/usr/src/lib/libast/common/man/strgid.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strgid.3
diff --git a/usr/src/lib/libast/common/man/strmatch.3 b/usr/src/contrib/ast/src/lib/libast/man/strmatch.3
index 5f5af8989e..5f5af8989e 100644
--- a/usr/src/lib/libast/common/man/strmatch.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strmatch.3
diff --git a/usr/src/lib/libast/common/man/stropt.3 b/usr/src/contrib/ast/src/lib/libast/man/stropt.3
index f2a8dae882..f2a8dae882 100644
--- a/usr/src/lib/libast/common/man/stropt.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/stropt.3
diff --git a/usr/src/lib/libast/common/man/strperm.3 b/usr/src/contrib/ast/src/lib/libast/man/strperm.3
index 9b68946f5f..9b68946f5f 100644
--- a/usr/src/lib/libast/common/man/strperm.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strperm.3
diff --git a/usr/src/lib/libast/common/man/strsignal.3 b/usr/src/contrib/ast/src/lib/libast/man/strsignal.3
index 414198087c..414198087c 100644
--- a/usr/src/lib/libast/common/man/strsignal.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strsignal.3
diff --git a/usr/src/lib/libast/common/man/strsort.3 b/usr/src/contrib/ast/src/lib/libast/man/strsort.3
index c48cfc26c6..c48cfc26c6 100644
--- a/usr/src/lib/libast/common/man/strsort.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strsort.3
diff --git a/usr/src/lib/libast/common/man/strtape.3 b/usr/src/contrib/ast/src/lib/libast/man/strtape.3
index 06c33ba978..06c33ba978 100644
--- a/usr/src/lib/libast/common/man/strtape.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strtape.3
diff --git a/usr/src/lib/libast/common/man/strton.3 b/usr/src/contrib/ast/src/lib/libast/man/strton.3
index bfcf8918a0..bfcf8918a0 100644
--- a/usr/src/lib/libast/common/man/strton.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/strton.3
diff --git a/usr/src/lib/libast/common/man/struid.3 b/usr/src/contrib/ast/src/lib/libast/man/struid.3
index 522deb5b82..522deb5b82 100644
--- a/usr/src/lib/libast/common/man/struid.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/struid.3
diff --git a/usr/src/lib/libast/common/man/swap.3 b/usr/src/contrib/ast/src/lib/libast/man/swap.3
index 82176de205..82176de205 100644
--- a/usr/src/lib/libast/common/man/swap.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/swap.3
diff --git a/usr/src/lib/libast/common/man/tab.3 b/usr/src/contrib/ast/src/lib/libast/man/tab.3
index e1c76f3534..e1c76f3534 100644
--- a/usr/src/lib/libast/common/man/tab.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/tab.3
diff --git a/usr/src/lib/libast/common/man/tm.3 b/usr/src/contrib/ast/src/lib/libast/man/tm.3
index 12eb4ecf4a..12eb4ecf4a 100644
--- a/usr/src/lib/libast/common/man/tm.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/tm.3
diff --git a/usr/src/lib/libast/common/man/tmx.3 b/usr/src/contrib/ast/src/lib/libast/man/tmx.3
index 268d40a9e5..268d40a9e5 100644
--- a/usr/src/lib/libast/common/man/tmx.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/tmx.3
diff --git a/usr/src/lib/libast/common/man/tok.3 b/usr/src/contrib/ast/src/lib/libast/man/tok.3
index 46fbff9503..46fbff9503 100644
--- a/usr/src/lib/libast/common/man/tok.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/tok.3
diff --git a/usr/src/lib/libast/common/man/touch.3 b/usr/src/contrib/ast/src/lib/libast/man/touch.3
index 908a8b1e68..908a8b1e68 100644
--- a/usr/src/lib/libast/common/man/touch.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/touch.3
diff --git a/usr/src/lib/libast/common/man/tv.3 b/usr/src/contrib/ast/src/lib/libast/man/tv.3
index 82b0dc40c6..b90a5593fc 100644
--- a/usr/src/lib/libast/common/man/tv.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/tv.3
@@ -102,9 +102,9 @@ if
.L av
is greater than
.LR bv .
-.SS "time_t tvgetatime(const struct stat* st, Tv_t* tv)"
-.SS "time_t tvgetmtime(const struct stat* st, Tv_t* tv)"
-.SS "time_t tvgetctime(const struct stat* st, Tv_t* tv)"
+.SS "time_t tvgetatime(Tv_t* tv, const struct stat* st)"
+.SS "time_t tvgetmtime(Tv_t* tv, const struct stat* st)"
+.SS "time_t tvgetctime(Tv_t* tv, const struct stat* st)"
These macros set
.L tv
to the
@@ -113,9 +113,9 @@ the access, modify, or change time, respectively.
The seconds portion of
.L tv
is returned.
-.SS "time_t tvsetatime(struct stat* st, const Tv_t* tv)"
-.SS "time_t tvsetmtime(struct stat* st, const Tv_t* tv)"
-.SS "time_t tvsetctime(struct stat* st, const Tv_t* tv)"
+.SS "time_t tvsetatime(Tv_t* tv, struct stat* st)"
+.SS "time_t tvsetmtime(Tv_t* tv, struct stat* st)"
+.SS "time_t tvsetctime(Tv_t* tv, struct stat* st)"
These macros set the
.L st
access, modify, or change time, respectively, to
diff --git a/usr/src/lib/libast/common/man/vecargs.3 b/usr/src/contrib/ast/src/lib/libast/man/vecargs.3
index 29e492baf5..29e492baf5 100644
--- a/usr/src/lib/libast/common/man/vecargs.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/vecargs.3
diff --git a/usr/src/lib/libast/common/man/vmalloc.3 b/usr/src/contrib/ast/src/lib/libast/man/vmalloc.3
index e2df4990c5..253e283e37 100644
--- a/usr/src/lib/libast/common/man/vmalloc.3
+++ b/usr/src/contrib/ast/src/lib/libast/man/vmalloc.3
@@ -16,8 +16,10 @@ vmalloc \- virtual memory allocation
.MW "int vmset(Vmalloc_t* region, int flags, int type);"
.MW "Vmalloc_t* Vmheap;"
.MW "Vmdisc_t* vmdisc(Vmalloc_t* region, Vmdisc_t* disc);"
-.MW "Vmalloc_t* vmmopen(char* file, Void_t* base, size_t round);"
-.MW "Void_t* vmmset(Vmalloc_t* vm, int key, Void_t* data, int set);"
+.MW "Vmalloc_t* vmmopen(char* file, int project, ssize_t size);"
+.MW "Void_t* vmmvalue(Vmalloc_t* vm, int key, Void_t* value, int op);"
+.MW "Void_t* vmmcleanup(Vmalloc_t* vm);"
+.MW "Void_t* vmmaddress(size_t size);"
.fi
.SS "Allocation functions"
.nf
@@ -42,14 +44,16 @@ vmalloc \- virtual memory allocation
.fi
.SS "Information and statistics"
.nf
+.MW "int vmbusy(Vmalloc_t* region);"
.MW "Vmalloc_t* vmregion(Void_t* addr);"
.MW "Void_t* vmsegment(Vmalloc_t* region, Void_t* addr);"
-.MW "int vmwalk(Vmalloc_t* region, int(*walkf)(Vmalloc_t*, Void_t*, size_t, size_t, Vmdisc_t*, Void_t*), Void_t* handle);"
+.MW "int vmwalk(Vmalloc_t* region, int(*walkf)(Vmalloc_t*, Void_t*, size_t, Vmdisc_t*);"
.MW "long vmaddr(Vmalloc_t* region, Void_t* addr);"
.MW "long vmsize(Vmalloc_t* region, Void_t* addr);"
.MW "int vmstat(Vmalloc_t* vm, Vmstat_t* statb);"
.MW "int vmtrace(int fd);"
.MW "int vmtrbusy(Vmalloc_t* vm);"
+.MW "Void_t* vmdata(Vmalloc_t* vm);"
.fi
.SS "Malloc-compatible functions"
.nf
@@ -60,6 +64,7 @@ vmalloc \- virtual memory allocation
.MW "void free(Void_t* addr);"
.MW "Void_t* memalign(size_t align, size_t size);"
.MW "Void_t* valloc(size_t size);"
+.MW "int setregmax(int regmax);"
.fi
.SH DESCRIPTION
These functions for dynamic storage allocation work in
@@ -81,7 +86,7 @@ Two predefined regions are pointed to by:
.TP
.MW Vmheap
A general-purpose region, with best-fit
-allocation, and Unix memory discipline \f5Vmdcsbrk\fP.
+allocation, and system memory discipline \f5Vmdcsystem\fP.
.PP
These functions manipulate regions:
.PP
@@ -92,13 +97,12 @@ and a setting for control \fIflags\fP.
It returns a pointer to the region on success and \f5NULL\fP on failure.
The flags, represented by bit values or-ed together, are:
.TP
-.MW VM_TRUST
-Disable locking and consistency checks, except under method \f5Vmdebug\fP.
+.MW VM_SHARE
+This region may be accessed concurrently by multiple threads or processes.
.TP
.MW VM_TRACE
Place tracing messages for each allocation event
on the tracing file established by \fIvmtrace\fP.
-This turns off \f5VM_TRUST\fP.
.TP
\f5VM_DBCHECK\fP, \f5VM_DBABORT\fP
.br
@@ -139,20 +143,53 @@ has an \f5exceptf\fP function, it will be called with event \f5VM_DISC\fP.
This function always returns the current discipline.
.PP
.I vmmopen
-creates a region to allocate memory given by the system call \fImmap(2)\fP.
-The given \fIfile\fP is the backing store for the map.
-If \fIbase\fP is not \f5NULL\fP, it is the address to map the data to.
-The \fIround\fP argument asserts that the size of the region is always
-a multiple of this value. However, note that \fIvmmopen\fP has
-an internally defined minimum round value (typically 64K) which may be
-used if the given value is too small.
-.PP
-.I vmmset
-sets a \fIdata\fP value associated with a \fIkey\fP if \f5set\fP is non-zero.
-In this case, it returns the current data (before setting)
-if \fIkey\fP is previously set; otherwise, it returns the new \fIdata\fP value.
-If the argument \fIset\fP is zero,
-the call returns the current data value associated with \fIkey\fP, if any.
+creates a region to allocate memory obtained via either
+\fImmap(2)\fP when \fIproject < 0\fP or \fIshmget(2)\fP when \fIproject >= 0\fP.
+The region is built from a single memory segment
+guaranteed to be at least as large as \fIsize\fP.
+When \fIproject >= 0\fP,
+\fIfile\fP and \fIproject\fP are used in a call to \fIftok(3)\fP
+to get a key suitable for getting a shared memory segment via \fIshmget(2)\fP.
+Otherwise, \fIfile\fP is the backing store for the mapped data.
+In this case, not only the region may be used concurrently by different processes,
+it is also persistent. That is, process could even exit, move the file to
+a different but similar machine then restart and open the same
+region to continue working.
+.PP
+Note that Vmalloc can protect concurrent accesses only on region entry and exit
+for memory allocation operations.
+This means that at the time when regions are being opened or closed, there will be no
+protection for the memory segments being attached into or detached from process memory space.
+This limitation has a special impact on \fIvmmopen()\fP as follows.
+.PP
+A shared memory segment opened via \fIvmmopen()\fP corresponds uniquely
+to a combination of the \fIfile\fP and \fIproject\fP parameters.
+Thus, if multiple \fIvmmopen()\fP calls are done in the same process using a
+same combination of \fIfile\fP and \fIproject\fP,
+the joined behavior of such regions will be unpredictable when opening and closing
+are done concurrently with other memory allocation operations.
+Beware that this effect can be subtle with library functions that may attempt
+to create their own memory allocation regions.
+.PP
+.I vmmvalue
+manages pairs of \fIkey\fP and \fIvalue\fP in a region opened via \fIvmopen()\fP.
+If \fIop\fP is \f5VM_MMGET\fP, the value associated with \f5key\fP is returned.
+If \fIop\fP is \f5VM_MMSET\fP, the value associated with \f5key\fP will be
+set to \fIvalue\fP.
+If \fIop\fP is \f5VM_MMADD\fP, the value associated with \f5key\fP will be
+treated as a signed long value to which \f5val\fP (also treated as a signed long value)
+will be added.
+The call always returns the updated data value associated with \fIkey\fP.
+.PP
+.I vmmcleanup
+sets region up to remove backing store or \fIshmid\fP on closing.
+.PP
+.I vmmaddress
+computes an address suitable for attaching a shared memory segment or
+memory mapping a segment of file data of the given \fIsize\fP.
+The address is chosen with hope to minimize collision with other activities
+related to memory such as growth of stack space or space used
+for dynamically linked libraries, etc.
.SS "Allocation functions"
.I vmalloc
@@ -244,14 +281,13 @@ If this pointer is not \f5NULL\fP,
the function it points to is called to announce
events in a \fIregion\fP.
.PP
-There are two standard disciplines.
-In both,
-\f5round\fP is 0, and \f5exceptf\fP is \f5NULL\fP.
+There are two standard disciplines, both with \f5round\fP being 0 and \f5exceptf\fP being \f5NULL\fP.
.TP
-.MW Vmdcsbrk
-A discipline whose \f5memoryf\fP function gets space from \fIsbrk\fP(2).
-.br
-.ns
+.MW Vmdcsystem
+A discipline whose \f5memoryf\fP function gets space from the operation system
+via different available methods which include \fImmap(2)\fP, \fIsbrk(2)\fP and
+functions from the WIN32 API.
+For historical reason, \fIVmdcsbrk\fP is also available and functions like \fIVmdcsystem\fP.
.TP
.MW Vmdcheap
A discipline whose \f5memoryf\fP function gets space from the region \f5Vmheap\fP.
@@ -260,34 +296,63 @@ allocation is good for building throwaway data structures.
.PP
A \fImemoryf\fP
function returns a pointer to a memory segment on success, and \f5NULL\fP on failure.
-If \fIcsz\fP is 0, the function returns a new segment of size \fInsz\fP.
-Otherwise, the function attempts to change the length of the segment
-pointed to by \fIaddr\fP from \fIcsz\fP to \fInsz\fP.
-If this is successful, \f5memoryf\fP should return \fIaddr\fP (even if \fInsz\fP is 0).
+When \fInsz >= 0\fP and \fIcsz > 0\fP,
+the function first attempts to change the current segment \fIaddr\fP to fit \fInsz\fP
+(for example, \fInsz == 0\fP means deleting the segment \fIaddr\fP).
+If this attempt is successful, it should return \fIaddr\fP.
+Otherwise, if \fInsz > csz\fP, the function may try to allocate a new segment
+of size \fInsz-csz\fP. If successful, it should return the address of the new segment.
+In all other cases, it should return NULL.
.PP
An \fIexceptf\fP
function is called for events identified by \fItype\fP, which is coded thus:
.TP
.MW VM_OPEN
-A new region is being opened.
-If \fIexceptf\fP returns a zero value, the region opening proceeds normally.
-A negative return value causes \fIvmopen\fP to terminate with failure.
-A positive return value indicates that the new region is to manipulate memory
-already initialized by a previous \fIvmopen\fP call
-(perhaps by a different process on persistent or shared memory).
-In this case, the argument \f5(Void_t**)\fP\fIobj\fP should
-return the initial segment (which is of type \f5(Void_t*)\fP).
-\fIvmopen\fP will return failure if this segment is not returned or if it
-has not been properly initialized.
+This event is raised at the start of the process to open a new region.
+Argument \fIobj\fP will be a pointer to an object of type \f5Void_t*\fP
+initialized to NULL before the call. The return value of \fIexceptf\fP
+is significant as follows:
+
+On a negative return value, \fIvmopen\fP will terminate with failure.
+
+On a zero return value, \fIexceptf\fP may set \f5*((Void_t**)obj)\fP
+to some non-NULL value to tell \fIvmopen\fP
+to allocate the region handle itself via \fImemoryf\fP. Otherwise,
+the region handle will be allocated from the \f5Vmheap\fP region.
+
+On a positive return value,
+the new region is being reconstructed
+based on existing states of some previous region.
+In this case, \fIexceptf\fP should set \f5*(Void_t**)\fP\fIobj\fP to point to
+the field \f5Vmalloc_t.data\fP of the corresponding previous region
+(see \f5VM_CLOSE\fP below).
+If the handle of the previous region was allocated
+via \fImemoryf\fP as discussed above in the case of the zero return value,
+then it will be exactly restored. Otherwise, a new handle will be allocated from \f5Vmheap\fP.
+The ability to create regions sharing the same states allows for
+managing shared and/or persistent memory.
+.TP
+.MW VM_ENDOPEN
+This event is raised at the end of the process to open a new region.
+The return value of \fIexceptf\fP will be ignored.
.TP
.MW VM_CLOSE
-The region is being closed.
-The return value of \f5exceptf\fP is significant as follows.
-If negative, \fIvmclose\fP immediately returns with failure.
-If zero, \fIvmclose\fP proceeds normally by calling \f5memoryf\fP to free
+This event is raised at the start of the process to close a region,
+The return value of \fIexceptf\fP is significant as follows:
+
+On a negative return value, \fIvmclose\fP immediately returns with failure.
+
+On a zero return value, \fIvmclose\fP proceeds normally by calling \f5memoryf\fP to free
all allocated memory segments and also freeing the region itself.
-Finally, if positive, \fIvmclose\fP will only free the region
-without deallocating the allocated segments.
+
+On a positive return value, \fIvmclose\fP will only free the region
+without deallocating the associated memory segments. That is,
+the field \fIVmalloc_t.data\fP of the region handle remains intact.
+This is useful for managing shared and/or persistent memory (see \f5VM_OPEN\fP above).
+.TP
+.MW VM_ENDCLOSE
+This event is raised at the end of the process to close a region.
+The return value of \fIexceptf\fP will be ignored.
.TP
.MW VM_NOMEM
An attempt to extend the region by the amount
@@ -295,26 +360,12 @@ An attempt to extend the region by the amount
\fIexceptf\fP function may free blocks.
If the function returns a positive value the memory
request will be repeated.
-If zero, the allocation method
-will again invoke \fImemoryf\fP to get space.
-If negative, the allocation request will fail.
-.TP
-.MW VM_BADADDR
-Address \fIobj\fP, given to \fIvmfree\fP or \fIvmresize\fP,
-does not point to an allocated block from the region.
-The respective call will fail.
-.TP
-.MW VM_ALLOC
-Announce that a memory allocation request is finished and returning.
.TP
-.MW VM_FREE
-Announce that a memory freeing request is finished and returning.
-.TP
-.MW VM_RESIZE
-Announce that a memory resizing request is finished and returning.
+.MW VM_DISC
+The discipline structure is being changed.
.SS "Allocation methods"
-There are five methods, of type \f5Vmethod_t*\fP:
+Methods are of type \f5Vmethod_t*\fP.
.TP
.MW Vmbest
An approximately best-fit allocation strategy.
@@ -330,8 +381,7 @@ A strategy for blocks of one size,
set by the first \fIvmalloc\fP call after \fIvmopen\fP or \fIvmclear\fP.
.TP
.MW Vmdebug
-An allocation strategy with extra-stringent checking and locking
-regardless of the \f5VM_TRUST\fP flag.
+An allocation strategy with extra-stringent checking and locking.
It is useful for finding misuses of dynamically allocated
memory, such as writing beyond the boundary of a block, or
freeing a block twice.
@@ -410,13 +460,15 @@ These fields are only with the summary record for region.
They show the maximum busy space at any time and the extent of the region.
.SS "Information and statistics"
+.I vmbusy
+returns the busy status of a region.
+A region is busy if some allocation operation is accessing it.
+.PP
.I vmregion
returns the region to which the block pointed to by
\fIaddr\fP belongs.
This works only in regions that allocate with
\f5Vmbest\fP, \f5Vmdebug\fP or \f5Vmprofile\fP.
-If multiple regions manipulate the same segment of memory,
-\fIvmregion\fP returns the region that causes the creation that memory segment.
.PP
.I vmsegment
finds if some segment of memory in \fIregion\fP
@@ -426,10 +478,9 @@ It returns the address of a found segment or \f5NULL\fP if none found.
.I vmwalk
walks all segments in \fIregion\fP or if \fIregion\fP is \f5NULL\fP,
all segments in all regions.
-At each segment, \fI(*walkf)(vm,addr,size,segno,disc,handle)\fP
+At each segment, \fI(*walkf)(vm,addr,size,disc)\fP
is called where \fIvm\fP is the region, \fIaddr\fP is the segment,
-\fIsize\fP is the size of the segment, \fIsegno\fP is the segment ordinal counting from 0,
-\fIdisc\fP is the region's discipline, and \fIhandle\fP is the user supplied \fIvmwalk\fP handle.
+\fIsize\fP is the size of the segment, and \fIdisc\fP is the region's discipline.
If \fIwalkf\fP returns a negative value, the walk stops and returns the same value.
On success, \fIvmwalk\fP returns 0; otherwise, it returns \-1.
.PP
@@ -451,20 +502,31 @@ The function does not work for a \f5Vmlast\fP region except
on the latest allocated block.
.PP
.I vmstat
-gathers statistics on the given \fIregion\fP and returns that
-information in the \f5Vmstat_t\fP structure pointed to by \fIstatb\fP.
+gathers statistics on the given \fIregion\fP.
+If \f5region\fP is NULL, it computes statistics for the \fIMalloc\fP calls.
+This may include summing statistics from more than one regions constructed to avoid blocking
+due to parallel or asynchronous operations.
+If \fIstatb\fP is not NULL, \fIvmstat\fP computes and stores the statistics in \fIstatb\fP then returns 0.
+If \fIstatb\fP is NULL, no statistics will be computed and
+the returned value is either 1 if the region is busy, i.e.,
+being accessed by some allocation call or 0 otherwise.
+
A \f5Vmstat_t\fP structure has at least these members:
.in +.5i
.nf
.ta \w'\f5size_t \fP'u +\w'\f5extent \fP'u
-.MW "int n_busy; /* number of busy blocks */
-.MW "int n_free; /* number of free blocks */
+.MW "int n_busy; /* # of busy blocks */
+.MW "int n_free; /* # of free blocks */
.MW "size_t s_busy; /* total busy space */
.MW "size_t s_free; /* total free space */
-.MW "size_t m_busy; /* maximum size of busy block */
-.MW "size_t m_free; /* maximum size of free block */
-.MW "int n_seg; /* number of segments in region */
-.MW "size_t extent; /* total size of the region */
+.MW "size_t m_busy; /* maximum busy block size */
+.MW "size_t m_free; /* maximum free block size */
+.MW "int n_seg; /* count of segments */
+.MW "size_t extent; /* memory extent of region */
+.MW "int n_region; /* total Malloc regions */
+.MW "int n_open; /* non-blocked operations */
+.MW "int n_lock; /* blocked operations */
+.MW "int n_probe; /* region searches */
.fi
.in -.5i
.PP
@@ -506,99 +568,88 @@ A string that tells the region's method:
.I vmtrbusy
outputs a trace of all currently busy blocks in region \f5vm\fP.
This only works with the \f5Vmbest\fP, \f5Vmdebug\fP and \f5Vmprofile\fP methods.
+.PP
+.I vmdata
+returns the core data of the given region.
+The core data hold the data structures for allocated and free blocks.
+Depending on the region discipline,
+the core data of a region may be in shared or persistent memory even
+if the region pointer created with \fIvmopen\fP is always in private process memory.
.SS "Malloc-compatible functions"
-Functions in this set provide the behaviors of \fImalloc\fP(3).
-The functions
-\fImemalign\fP and \fIvalloc\fP allocate aligned blocks;
-\fIvalloc\fP further restricts alignment to page boundaries.
-.PP
-The \fImalloc\fP functions are instrumented for run-time debugging,
-profiling and tracing.
-When these modes are enabled, time and space performance will be affected.
+This set of functions implement \fImalloc\fP(3).
+They allocate via the \fIVmregion\fP region which is initially set
+to be \fIVmheap\fP.
+
+Concurrent accesses are supported unless an application
+change \fIVmregion\fP to something other than \fIVmheap\fP.
+New regions may be created on the fly to avoid blocking.
+The maximum number of regions that can be created
+this way is set to 64 by default. An application could
+reduce this number by calling \fIsetregmax(regmax)\fP to
+set the maximum number of these extra regions to \fIregmax\fP.
+\fIsetregmax()\fP always returns the previous value.
+.PP
+These functions are instrumented for run-time debugging, profiling and tracing.
For accurate reporting of files and line numbers,
-code should include \f5vmalloc.h\fP and compile with either \f5-DVMFL\fP
-or \f5-D_BLD_debug\fP (defined by \fBnmake\fP(1) for \f5-g\fP compilations).
-The
-.I VMALLOC_OPTIONS
-environment variable should be set before any memory allocation
-(e.g., before a process starts). Its value is a space-separated list of
-[\fBno\fP]\fIname\fP[=\fIvalue\fP] options that control runtime
-debugging/profiling and other modes:
+application code should include \f5vmalloc.h\fP and compile with \f5-DVMFL\fP.
+The \fBVMALLOC_OPTIONS\fP environment variable, checked once before the first
+memory allocation, controls the memory allocation method, debugging and tracing;
+its value is a comma or space separated list of
+\fB[no]\fP\fIname\fP\fB[=\fP\fIvalue\fP\fB]\fP options.
+The options are:
.TP
.B abort
-If Vmregion==Vmdebug then VM_DBABORT is set, otherwise _BLD_debug
-enabled assertions abort() on failure.
+If Vmregion==Vmdebug then VM_DBABORT is set, otherwise _BLD_DEBUG enabled assertions abort() on failure.
.TP
-.B check
-If Vmregion==Vmbest then the region is checked after every operation.
-.TP
-.BI method =method
-Sets Vmregion=\fImethod\fP if not already set.
-.I method
-(\fBVm\fP prefix optional) may be one of:
-.RS
+.B break
+Try sbrk() block allocator first.
.TP
-.B best
+.B check
+If Vmregion==Vmbest then the region is checked every op.
.TP
-.B debug
+.B free
+Disable addfreelist().
.TP
-.B last
+.B keep
+Disable free -- if code works with this enabled then it probably accesses freed data.
.TP
-.B profile
-.RE
+.BI method= method
+Sets Vmregion=\fImethod\fP if not defined, \fImethod\fP (Vm prefix optional) may be one of { \fBbest debug last profile\fP }.
.TP
.B mmap
-Prefer mmap() over brk() for region allocation.
-.TP
-.BI period =n
-Sets Vmregion=Vmdebug if not already set. If Vmregion==Vmdebug then
-the region is checked every \fIn\fP operations.
-.TP
-.BI profile =file
-Sets Vmregion=Vmprofile if not already set. If Vmregion==Vmprofile then
-profile info is printed to \fIfile\fP.
-.TP
-.B region
-If Vmregion==Vmbest then region block frees verify
-that the block belongs to the region.
-.BI start =n
-Sets Vmregion=Vmdebug if not already set. If Vmregion==Vmdebug then
-region checking starts after \fIn\fP operations.
-.TP
-.BI trace =file
-Operation trace info is printed to \fIfile\fP.
-.TP
-.BI warn =file
-Sets Vmregion=Vmdebug if not already set. If Vmregion==Vmdebug then
-warnings are printed to \fIfile\fP.
-.TP
-.BI watch =address
-Sets Vmregion=Vmdebug if not already set. If Vmregion==Vmdebug then
-operations on \fIaddress\fP are traced.
-.PP
-Output files are created if they don't exist.
-.BI & n
-and
-.BI /dev/fd/ n
-name the file descriptor
-.I n
-which must be open for writing. The pattern
-.B %p
-in a file name is replaced by the current process ID.
-.I VMALLOC_OPTIONS
-combines the features of these previously used env vars {
-.I "VMDEBUG VMETHOD VMPROFILE VMTRACE"
-}.
-For compatibility, if
-.I VMALLOC_OPTIONS
-is not defined, then {
-.I "VMDEBUG VMETHOD VMPROFILE VMTRACE"
-} will be checked -- this will be dropped in a future release.
+Try mmap() block allocator first if
+.B break
+is not set.
+.TP
+.BI period= n
+Sets Vmregion=Vmdebug if not defined, if Vmregion==Vmdebug the region is checked every \fIn\fP ops.
+.TP
+.BI profile= file
+Sets Vmregion=Vmprofile if not set, if Vmregion==Vmprofile then profile info printed to file \fIfile\fP.
+.TP
+.BI start= n
+Sets Vmregion=Vmdebug if not defined, if Vmregion==Vmdebug region checking starts after \fIn\fP ops.
+.TP
+.BI trace= file
+Enables tracing to file \fIfile\fP.
+.TP
+.BI warn= file
+Sets Vmregion=Vmdebug if not defined, if Vmregion==Vmdebug then warnings printed to file \fIfile\fP.
+.TP
+.BI watch= address
+Sets Vmregion=Vmdebug if not defined, if Vmregion==Vmdebug then \fIaddress\fP is watched.
+.P
+Output files are created if they don't exist. \fB&\fP\fBn\fP and \fB/dev/fd/\fP\fIn\fP name
+the file descriptor \fIn\fP which must be open for writing. The pattern \fB%p\fP
+in a file name is replaced by the process ID.
+.P
+.B VMALLOC_OPTIONS
+combines the features of these obsolete environment variables:
+{ \fBVMCHECK VMDEBUG VMETHOD VMPROFILE VMTRACE\fP }.
.SH RECENT CHANGES
-\f5Vmlast\fP: allocated blocks are now allowed to be resized (1998-09).
-\fIVMALLOC_OPTIONS\fP now controls all runtime settings (2010-01).
+\f5Vmlast\fP: allocated blocks are now allowed to be resized (09/1998).
.SH SEE ALSO
\fImtreplay\fP(1), \fImalloc\fP(3).
diff --git a/usr/src/lib/libast/common/misc/astintercept.c b/usr/src/contrib/ast/src/lib/libast/misc/astintercept.c
index a23658d84e..c4e84cba23 100644
--- a/usr/src/lib/libast/common/misc/astintercept.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/astintercept.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/cmdarg.c b/usr/src/contrib/ast/src/lib/libast/misc/cmdarg.c
index ae2810aaa3..c6b99c8bca 100644
--- a/usr/src/lib/libast/common/misc/cmdarg.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/cmdarg.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,12 +27,42 @@
* xargs/tw command arg list support
*/
+#define _AST_API_H 1
+
#include <ast.h>
-#include <ctype.h>
-#include <error.h>
+#include <cmdlib.h>
#include <proc.h>
-#include "cmdarg.h"
+static const char lib[] = "libast:cmdarg";
+
+static int
+cmdrun(int argc, char** argv, Cmddisc_t* disc)
+{
+ return procrun(argv[0], argv, PROC_ARGMOD|PROC_IGNOREPATH);
+}
+
+Cmdarg_t*
+cmdopen(char** argv, int argmax, int size, const char* argpat, int flags)
+{
+ Cmddisc_t disc;
+
+ memset(&disc, 0, sizeof(disc));
+ disc.version = CMD_VERSION;
+ if (!(flags & CMD_SILENT))
+ {
+ flags |= CMD_EXIT;
+ disc.errorf = errorf;
+ }
+ disc.flags = flags;
+ return cmdopen_20120411(argv, argmax, size, argpat, &disc);
+}
+
+#undef _AST_API_H
+
+#include <ast_api.h>
+
+#include <ctype.h>
+#include <proc.h>
#ifndef ARG_MAX
#define ARG_MAX (64*1024)
@@ -43,6 +73,18 @@
static const char* echo[] = { "echo", 0 };
+Cmdarg_t*
+cmdopen_20110505(char** argv, int argmax, int size, const char* argpat, int flags, Error_f errorf)
+{
+ Cmddisc_t disc;
+
+ memset(&disc, 0, sizeof(disc));
+ disc.version = CMD_VERSION;
+ disc.flags = flags;
+ disc.errorf = errorf;
+ return cmdopen_20120411(argv, argmax, size, argpat, &disc);
+}
+
/*
* open a cmdarg stream
* initialize the command for execution
@@ -50,13 +92,14 @@ static const char* echo[] = { "echo", 0 };
*/
Cmdarg_t*
-cmdopen(char** argv, int argmax, int size, const char* argpat, int flags)
+cmdopen_20120411(char** argv, int argmax, int size, const char* argpat, Cmddisc_t* disc)
{
register Cmdarg_t* cmd;
register int n;
register char** p;
register char* s;
char* sh;
+ char* exe;
int c;
int m;
int argc;
@@ -69,7 +112,7 @@ cmdopen(char** argv, int argmax, int size, const char* argpat, int flags)
{
for (p = argv + 1; *p; p++)
{
- if ((flags & CMD_POST) && argpat && streq(*p, argpat))
+ if ((disc->flags & CMD_POST) && argpat && streq(*p, argpat))
{
*p = 0;
post = p + 1;
@@ -93,7 +136,8 @@ cmdopen(char** argv, int argmax, int size, const char* argpat, int flags)
m = roundof(m, sizeof(char**));
if (size < m)
{
- error(2, "size must be at least %d", m);
+ if (disc->errorf)
+ (*disc->errorf)(NiL, sh, 2, "size must be at least %d", m);
return 0;
}
if ((m = x / 10) > 2048)
@@ -101,39 +145,45 @@ cmdopen(char** argv, int argmax, int size, const char* argpat, int flags)
if (size > (x - m))
size = x - m;
n = size - n;
- m = ((flags & CMD_INSERT) && argpat) ? (strlen(argpat) + 1) : 0;
+ m = ((disc->flags & CMD_INSERT) && argpat) ? (strlen(argpat) + 1) : 0;
if (!(cmd = newof(0, Cmdarg_t, 1, n + m)))
{
- error(ERROR_SYSTEM|2, "out of space");
+ if (disc->errorf)
+ (*disc->errorf)(NiL, sh, ERROR_SYSTEM|2, "out of space");
return 0;
}
+ cmd->id = lib;
+ cmd->disc = disc;
+ cmd->errorf = disc->errorf;
+ if (!(cmd->runf = disc->runf))
+ cmd->runf = cmdrun;
c = n / sizeof(char**);
if (argmax <= 0 || argmax > c)
argmax = c;
s = cmd->buf;
- if (!argv[0])
+ if (!(exe = argv[0]))
{
- argv = (char**)echo;
+ exe = *(argv = (char**)echo);
cmd->echo = 1;
}
- else if (streq(argv[0], echo[0]))
+ else if (streq(exe, echo[0]))
{
cmd->echo = 1;
- flags &= ~CMD_NEWLINE;
+ disc->flags &= ~CMD_NEWLINE;
}
- else if (!(flags & CMD_CHECKED))
+ else if (!(disc->flags & CMD_CHECKED))
{
- if (!pathpath(s, argv[0], NiL, PATH_REGULAR|PATH_EXECUTE))
+ if (!pathpath(exe, NiL, PATH_REGULAR|PATH_EXECUTE, s, n + m))
{
- if (!(flags & CMD_SILENT))
- {
- error(ERROR_SYSTEM|2, "%s: command not found", argv[0]);
- exit(EXIT_NOTFOUND);
- }
+ n = EXIT_NOTFOUND;
+ if (cmd->errorf)
+ (*cmd->errorf)(NiL, cmd, ERROR_SYSTEM|2, "%s: command not found", exe);
+ if (disc->flags & CMD_EXIT)
+ (*error_info.exit)(n);
free(cmd);
return 0;
}
- argv[0] = s;
+ exe = s;
}
s += strlen(s) + 1;
if (m)
@@ -146,7 +196,8 @@ cmdopen(char** argv, int argmax, int size, const char* argpat, int flags)
p = (char**)s;
n -= strlen(*p++ = sh) + 1;
cmd->argv = p;
- while (*p = *argv++)
+ *p++ = exe;
+ while (*p = *++argv)
p++;
if (m)
{
@@ -167,7 +218,7 @@ cmdopen(char** argv, int argmax, int size, const char* argpat, int flags)
cmd->firstarg = cmd->nextarg = p;
cmd->laststr = cmd->nextstr = cmd->buf + n;
cmd->argmax = argmax;
- cmd->flags = flags;
+ cmd->flags = disc->flags;
cmd->offset = ((cmd->postarg = post) ? (argc - (post - argv)) : 0) + 3;
return cmd;
}
@@ -189,8 +240,8 @@ cmdflush(register Cmdarg_t* cmd)
return 0;
if ((cmd->flags & CMD_MINIMUM) && cmd->argcount < cmd->argmax)
{
- if (!(cmd->flags & CMD_SILENT))
- error(2, "%d arg command would be too long", cmd->argcount);
+ if (cmd->errorf)
+ (*cmd->errorf)(NiL, cmd, 2, "%d arg command would be too long", cmd->argcount);
return -1;
}
cmd->total.args += cmd->argcount;
@@ -244,11 +295,12 @@ cmdflush(register Cmdarg_t* cmd)
}
if (b >= e)
{
- if (!(cmd->flags & CMD_SILENT))
- error(2, "%s: command too large after insert", a);
+ if (cmd->errorf)
+ (*cmd->errorf)(NiL, cmd, 2, "%s: command too large after insert", a);
return -1;
}
}
+ n = (int)(cmd->nextarg - cmd->argv);
cmd->nextarg = cmd->firstarg;
cmd->nextstr = cmd->laststr;
if (cmd->flags & (CMD_QUERY|CMD_TRACE))
@@ -260,7 +312,9 @@ cmdflush(register Cmdarg_t* cmd)
if (!(cmd->flags & CMD_QUERY))
sfprintf(sfstderr, "\n");
else if (astquery(1, "? "))
+ {
return 0;
+ }
}
if (cmd->echo)
{
@@ -269,24 +323,23 @@ cmdflush(register Cmdarg_t* cmd)
sfputr(sfstdout, s, *p ? n : '\n');
n = 0;
}
- else if ((n = procrun(*cmd->argv, cmd->argv, PROC_ARGMOD|PROC_IGNOREPATH)) == -1)
+ else if ((n = (*cmd->runf)(n, cmd->argv, cmd->disc)) == -1)
{
- if (!(cmd->flags & CMD_SILENT))
- {
- error(ERROR_SYSTEM|2, "%s: command exec error", *cmd->argv);
- exit(EXIT_NOTFOUND - 1);
- }
- return -1;
+ n = EXIT_NOTFOUND - 1;
+ if (cmd->errorf)
+ (*cmd->errorf)(NiL, cmd, ERROR_SYSTEM|2, "%s: command exec error", *cmd->argv);
+ if (cmd->flags & CMD_EXIT)
+ (*error_info.exit)(n);
}
else if (n >= EXIT_NOTFOUND - 1)
{
- if (!(cmd->flags & CMD_SILENT))
- exit(n);
+ if (cmd->flags & CMD_EXIT)
+ (*error_info.exit)(n);
}
else if (!(cmd->flags & CMD_IGNORE))
{
- if (n == EXIT_QUIT && !(cmd->flags & CMD_SILENT))
- exit(2);
+ if (n == EXIT_QUIT && (cmd->flags & CMD_EXIT))
+ (*error_info.exit)(2);
if (n)
error_info.errors++;
}
@@ -304,13 +357,14 @@ cmdarg(register Cmdarg_t* cmd, const char* file, register int len)
int r;
r = 0;
- if (len)
+ if (len > 0)
{
while ((cmd->nextstr -= len + 1) < (char*)(cmd->nextarg + cmd->offset))
{
if (cmd->nextarg == cmd->firstarg)
{
- error(2, "%s: path too long for exec args", file);
+ if (cmd->errorf)
+ (*cmd->errorf)(NiL, cmd, 2, "%s: path too long for exec args", file);
return -1;
}
if (i = cmdflush(cmd))
@@ -328,6 +382,8 @@ cmdarg(register Cmdarg_t* cmd, const char* file, register int len)
if (cmd->argcount >= cmd->argmax && (i = cmdflush(cmd)) > r)
r = i;
}
+ else
+ cmd->argcount += len;
return r;
}
@@ -342,12 +398,15 @@ cmdclose(Cmdarg_t* cmd)
if ((cmd->flags & CMD_EXACT) && cmd->argcount < cmd->argmax)
{
- if (!(cmd->flags & CMD_SILENT))
- error(2, "only %d arguments for last command", cmd->argcount);
- return -1;
+ if (cmd->errorf)
+ (*cmd->errorf)(NiL, cmd, 2, "only %d arguments for last command", cmd->argcount);
+ n = -1;
+ }
+ else
+ {
+ cmd->flags &= ~CMD_MINIMUM;
+ n = cmdflush(cmd);
}
- cmd->flags &= ~CMD_MINIMUM;
- n = cmdflush(cmd);
free(cmd);
return n;
}
diff --git a/usr/src/lib/libast/i386/include/ast/modex.h b/usr/src/contrib/ast/src/lib/libast/misc/cmdlib.h
index 4b73e19ffe..102ce8c743 100644
--- a/usr/src/lib/libast/i386/include/ast/modex.h
+++ b/usr/src/contrib/ast/src/lib/libast/misc/cmdlib.h
@@ -1,16 +1,14 @@
-
-/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,42 +19,39 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-
+#pragma prototyped
/*
- * AT&T Research
- *
- * external mode_t representation support
+ * cmdarg library private definitions
*/
-#ifndef _MODEX_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MODEX_H
-
-#include <ast_fs.h>
-#include <modecanon.h>
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int modei __PROTO__((int));
-extern __MANGLE__ int modex __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _S_IDPERM
-#define modei(m) ((m)&X_IPERM)
-#if _S_IDTYPE
-#define modex(m) (m)
-#endif
-#endif
+#ifndef _CMDLIB_H
+#define _CMDLIB_H 1
+
+#define _CMDARG_PRIVATE_ \
+ struct \
+ { \
+ size_t args; /* total args */ \
+ size_t commands; /* total commands */ \
+ } total; \
+ Error_f errorf; /* optional error callback */ \
+ Cmdrun_f runf; /* exec function */ \
+ int argcount; /* current arg count */ \
+ int argmax; /* max # args */ \
+ int echo; /* just an echo */ \
+ int flags; /* CMD_* flags */ \
+ int insertlen; /* strlen(insert) */ \
+ int offset; /* post arg offset */ \
+ Cmddisc_t* disc; /* discipline */ \
+ char** argv; /* exec argv */ \
+ char** firstarg; /* first argv file arg */ \
+ char** insertarg; /* argv before insert */ \
+ char** postarg; /* start of post arg list */ \
+ char** nextarg; /* next argv file arg */ \
+ char* nextstr; /* next string ends before here */ \
+ char* laststr; /* last string ends before here */ \
+ char* insert; /* replace with current arg */ \
+ char buf[1]; /* argv and arg buffer */
+
+#include <cmdarg.h>
#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/misc/conformance.c b/usr/src/contrib/ast/src/lib/libast/misc/conformance.c
new file mode 100644
index 0000000000..12ee2ca3ea
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/misc/conformance.c
@@ -0,0 +1,151 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#include <ast.h>
+#include <ctype.h>
+
+static char** ids;
+
+static const char* dflt[] = { "ast", "standard", 0 };
+
+/*
+ * initialize the conformance() id list
+ */
+
+static char**
+initconformance(void)
+{
+ char* m;
+ char** p;
+ char* t;
+ int h;
+ int i;
+ int j;
+ int c;
+ Sfio_t* sp;
+
+ static const char* conf[] = { "CONFORMANCE", "HOSTTYPE", "UNIVERSE" };
+
+ p = 0;
+ if (sp = sfstropen())
+ {
+ for (i = h = 0, j = 1; i < elementsof(conf); i++)
+ if (*(m = astconf(conf[i], NiL, NiL)) && (h |= (1<<i)) || !i && (m = "ast"))
+ {
+ t = m;
+ while ((c = *m++) && c != '.')
+ {
+ if (isupper(c))
+ c = tolower(c);
+ sfputc(sp, c);
+ }
+ sfputc(sp, 0);
+ j++;
+ if ((c = (m - t)) == 6 && strneq(t, "linux", 5))
+ {
+ sfputr(sp, "gnu", 0);
+ j++;
+ }
+ else if (c > 3 && strneq(t, "bsd", 3) || c == 7 && strneq(t, "debian", 7))
+ {
+ sfputr(sp, "bsd", 0);
+ j++;
+ }
+ if (h & 1)
+ break;
+ }
+ i = sfstrtell(sp);
+ sfstrseek(sp, 0, SEEK_SET);
+ if (p = newof(0, char*, j, i))
+ {
+ m = (char*)(p + j--);
+ memcpy(m, sfstrbase(sp), i);
+ i = 0;
+ p[i++] = m;
+ while (i < j)
+ {
+ while (*m++);
+ p[i++] = m;
+ }
+ p[i] = 0;
+ }
+ sfstrclose(sp);
+ }
+ if (!p)
+ p = (char**)dflt;
+ return ids = p;
+}
+
+/*
+ * return conformance id if s size n is in conformance
+ * prefix match of s on the conformance id table
+ * s==0 => "standard"
+ */
+
+char*
+conformance(const char* s, size_t n)
+{
+ char** p;
+ char** q;
+ char* m;
+ const char* e;
+ const char* t;
+
+ static uint32_t serial = ~(uint32_t)0;
+
+ if (!(p = ids) || serial != ast.env_serial)
+ {
+ serial = ast.env_serial;
+ if (ids)
+ {
+ if (ids != (char**)dflt)
+ free(ids);
+ ids = 0;
+ }
+ p = initconformance();
+ }
+ if (!s)
+ s = dflt[1];
+ if (!n)
+ n = strlen(s);
+ e = s + n;
+ if (*s == '(')
+ s++;
+ do
+ {
+ while (s < e && (isspace(*s) || *s == ',' || *s == '|'))
+ s++;
+ if (*s == ')')
+ break;
+ for (t = s; s < e && !isspace(*s) && *s != ',' && *s != '|' && *s != ')'; s++);
+ if (s == t)
+ break;
+ q = p;
+ while (m = *q++)
+ if (strneq(t, m, s - t))
+ return m;
+ if (s < e)
+ s++;
+ } while (s < e);
+ return 0;
+}
diff --git a/usr/src/lib/libast/common/misc/debug.c b/usr/src/contrib/ast/src/lib/libast/misc/debug.c
index 7c73276856..791973c5e6 100644
--- a/usr/src/lib/libast/common/misc/debug.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/debug.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -37,7 +37,7 @@ debug_fatal(const char* file, int line)
#if _sys_times
-#include <sys/times.h>
+#include <times.h>
#include <sys/resource.h>
double
diff --git a/usr/src/lib/libast/common/misc/error.c b/usr/src/contrib/ast/src/lib/libast/misc/error.c
index cf7c015084..8ac8c60191 100644
--- a/usr/src/lib/libast/common/misc/error.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/error.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/errorf.c b/usr/src/contrib/ast/src/lib/libast/misc/errorf.c
index 18d5284003..0a67e97716 100644
--- a/usr/src/lib/libast/common/misc/errorf.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/errorf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/errormsg.c b/usr/src/contrib/ast/src/lib/libast/misc/errormsg.c
index a8eef82a98..555d4f1bf0 100644
--- a/usr/src/lib/libast/common/misc/errormsg.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/errormsg.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/errorx.c b/usr/src/contrib/ast/src/lib/libast/misc/errorx.c
index 8cda4be51a..70466de9b0 100644
--- a/usr/src/lib/libast/common/misc/errorx.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/errorx.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -33,15 +33,16 @@ errorx(const char* loc, const char* cmd, const char* cat, const char* msg)
{
char* s;
- if (!error_info.translate) error_info.translate = translate; /* 2007-03-19 OLD_Error_info_t workaround */
+ if (!error_info.translate)
+ error_info.translate = translate; /* 2007-03-19 OLD_Error_info_t workaround */
if (ERROR_translating())
{
if (!loc)
loc = (const char*)locales[AST_LC_MESSAGES]->code;
- if (!cat)
- cat = (const char*)error_info.catalog;
if (!cmd)
cmd = (const char*)error_info.id;
+ if (!cat)
+ cat = (const char*)error_info.catalog;
if (s = (*error_info.translate)(loc, cmd, cat, msg))
return s;
}
diff --git a/usr/src/lib/libast/common/misc/fastfind.c b/usr/src/contrib/ast/src/lib/libast/misc/fastfind.c
index c5b86b679c..04d54d912c 100644
--- a/usr/src/lib/libast/common/misc/fastfind.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/fastfind.c
@@ -1,24 +1,3 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
#pragma prototyped
/*
* original code
@@ -263,7 +242,7 @@ findopen(const char* file, const char* pattern, const char* type, Finddisc_t* di
}
}
}
- else if (pathpath(fp->encode.file, path, "", PATH_REGULAR|PATH_READ|PATH_WRITE))
+ else if (pathpath(path, "", PATH_REGULAR|PATH_READ|PATH_WRITE, fp->encode.file, sizeof(fp->encode.file)))
{
path = fp->encode.file;
break;
@@ -271,7 +250,7 @@ findopen(const char* file, const char* pattern, const char* type, Finddisc_t* di
else if (b = strrchr(path, '/'))
{
sfsprintf(fp->encode.file, sizeof(fp->encode.file), "%-.*s", b - path, path);
- if (pathpath(fp->encode.temp, fp->encode.file, "", PATH_EXECUTE|PATH_READ|PATH_WRITE) &&
+ if (pathpath(fp->encode.file, "", PATH_EXECUTE|PATH_READ|PATH_WRITE, fp->encode.temp, sizeof(fp->encode.temp)) &&
!stat(fp->encode.temp, &st) && st.st_uid == uid && (st.st_mode & S_IWUSR))
{
sfsprintf(fp->encode.file, sizeof(fp->encode.file), "%s%s", fp->encode.temp, b);
@@ -339,7 +318,7 @@ findopen(const char* file, const char* pattern, const char* type, Finddisc_t* di
fp->encode.indexdisc.size = sizeof(unsigned long);
fp->encode.indexdisc.link = offsetof(Type_t, byindex);
s = "system/dir";
- if (!(fp->encode.namedict = dtopen(&fp->encode.namedisc, Dttree)) || !(fp->encode.indexdict = dtopen(&fp->encode.indexdisc, Dttree)) || !(tp = newof(0, Type_t, 1, strlen(s) + 1)))
+ if (!(fp->encode.namedict = dtopen(&fp->encode.namedisc, Dtoset)) || !(fp->encode.indexdict = dtopen(&fp->encode.indexdisc, Dtoset)) || !(tp = newof(0, Type_t, 1, strlen(s) + 1)))
{
if (fp->encode.namedict)
dtclose(fp->encode.namedict);
@@ -413,7 +392,7 @@ findopen(const char* file, const char* pattern, const char* type, Finddisc_t* di
break;
}
}
- else if ((path = pathpath(fp->decode.path, path, "", PATH_REGULAR|PATH_READ)) && (fp->fp = sfopen(NiL, path, "r")))
+ else if ((path = pathpath(path, "", PATH_REGULAR|PATH_READ, fp->decode.path, sizeof(fp->decode.path))) && (fp->fp = sfopen(NiL, path, "r")))
break;
}
if (!fp->fp)
@@ -543,7 +522,7 @@ findopen(const char* file, const char* pattern, const char* type, Finddisc_t* di
goto nospace;
else
sfsprintf(b, sizeof(fp->decode.temp) - 1, "%s/%s", p, s);
- s = pathcanon(b, 0);
+ s = pathcanon(b, sizeof(fp->decode.temp), 0);
*s = '/';
*(s + 1) = 0;
if (!(fp->dirs[q] = vmstrdup(fp->vm, b)))
@@ -552,7 +531,7 @@ findopen(const char* file, const char* pattern, const char* type, Finddisc_t* di
(fp->dirs[q])[s - b] = 0;
q++;
*s = 0;
- s = pathcanon(b, PATH_PHYSICAL);
+ s = pathcanon(b, sizeof(fp->decode.temp), PATH_PHYSICAL);
*s = '/';
*(s + 1) = 0;
if (!strneq(b, fp->dirs[q - 1], s - b))
diff --git a/usr/src/lib/libast/common/misc/findlib.h b/usr/src/contrib/ast/src/lib/libast/misc/findlib.h
index 78669ddbe7..e42e619084 100644
--- a/usr/src/lib/libast/common/misc/findlib.h
+++ b/usr/src/contrib/ast/src/lib/libast/misc/findlib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/fmtrec.c b/usr/src/contrib/ast/src/lib/libast/misc/fmtrec.c
index 5ebaa83b9d..36b2cd5823 100644
--- a/usr/src/lib/libast/common/misc/fmtrec.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/fmtrec.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/fs3d.c b/usr/src/contrib/ast/src/lib/libast/misc/fs3d.c
index bbd63a6240..cc708f2d1b 100644
--- a/usr/src/lib/libast/common/misc/fs3d.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/fs3d.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/fts.c b/usr/src/contrib/ast/src/lib/libast/misc/fts.c
index 05c801690d..d8bb34d16a 100644
--- a/usr/src/lib/libast/common/misc/fts.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/fts.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -550,14 +550,22 @@ info(FTS* fts, register FTSENT* f, const char* path, struct stat* sp, int flags)
struct stat sb;
f->symlink = 1;
- if (!(flags & FTS_PHYSICAL) && stat(path, &sb) >= 0)
+ if (flags & FTS_PHYSICAL)
+ {
+ TYPE(f, DT_LNK);
+ f->fts_info = FTS_SL;
+ }
+ else if (stat(path, &sb) >= 0)
{
*sp = sb;
flags = FTS_PHYSICAL;
goto again;
}
- TYPE(f, DT_LNK);
- f->fts_info = FTS_SL;
+ else
+ {
+ TYPE(f, DT_LNK);
+ f->fts_info = FTS_SLNONE;
+ }
}
#endif
else
@@ -605,7 +613,7 @@ toplist(FTS* fts, register char* const* pathnames)
break;
path = f->fts_name;
if (!physical)
- f->fts_namelen = (fts->flags & FTS_SEEDOTDIR) ? strlen(path) : (pathcanon(path, 0) - path);
+ f->fts_namelen = (fts->flags & FTS_SEEDOTDIR) ? strlen(path) : (pathcanon(path, strlen(path) + 1, 0) - path);
else if (*path != '.')
{
f->fts_namelen = strlen(path);
@@ -651,10 +659,15 @@ toplist(FTS* fts, register char* const* pathnames)
* away with calling your idea a hack
*/
- if (metaphysical && f->fts_info == FTS_SL && stat(path, &st) >= 0)
+ if (metaphysical && f->fts_info == FTS_SL)
{
- *f->fts_statp = st;
- info(fts, f, NiL, f->fts_statp, 0);
+ if (stat(path, &st) >= 0)
+ {
+ *f->fts_statp = st;
+ info(fts, f, NiL, f->fts_statp, 0);
+ }
+ else
+ f->fts_info = FTS_SLNONE;
}
#endif
if (bot)
@@ -792,7 +805,11 @@ fts_open(char* const* pathnames, int flags, int (*comparf)(FTSENT* const*, FTSEN
}
else
fts->todo = toplist(fts, pathnames);
+#if _HUH_1997_01_07
if (!fts->todo || fts->todo->fts_info == FTS_NS && !fts->todo->fts_link)
+#else
+ if (!fts->todo)
+#endif
{
fts_close(fts);
return 0;
diff --git a/usr/src/lib/libast/common/misc/ftwalk.c b/usr/src/contrib/ast/src/lib/libast/misc/ftwalk.c
index 6ad83f815e..30c293f22b 100644
--- a/usr/src/lib/libast/common/misc/ftwalk.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/ftwalk.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -135,12 +135,14 @@ ftwalk(const char* path, int (*userf)(Ftw_t*), int flags, int (*comparf)(Ftw_t*,
case FTS_DOT:
continue;
case FTS_ERR:
- case FTS_SLNONE:
e->info = FTS_NS;
break;
case FTS_NSOK:
e->info = FTS_NSOK;
break;
+ case FTS_SLNONE:
+ e->info = FTS_SL;
+ break;
}
rv = (*userf)((Ftw_t*)e);
e->info = oi;
diff --git a/usr/src/lib/libast/common/misc/ftwflags.c b/usr/src/contrib/ast/src/lib/libast/misc/ftwflags.c
index 9e7ee678b9..179a366abd 100644
--- a/usr/src/lib/libast/common/misc/ftwflags.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/ftwflags.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/getcwd.c b/usr/src/contrib/ast/src/lib/libast/misc/getcwd.c
index 2f60b17129..c5096480ec 100644
--- a/usr/src/lib/libast/common/misc/getcwd.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/getcwd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -35,6 +35,48 @@ NoN(getcwd)
#else
+#include "FEATURE/syscall"
+
+#if defined(SYSGETCWD)
+
+#include <error.h>
+
+#define ERROR(e) { errno = e; return 0; }
+
+char*
+getcwd(char* buf, size_t len)
+{
+ size_t n;
+ size_t r;
+ int oerrno;
+
+ if (buf)
+ return SYSGETCWD(buf, len) < 0 ? 0 : buf;
+ oerrno = errno;
+ n = PATH_MAX;
+ for (;;)
+ {
+ if (!(buf = newof(buf, char, n, 0)))
+ ERROR(ENOMEM);
+ if (SYSGETCWD(buf, n) >= 0)
+ {
+ if ((r = strlen(buf) + len + 1) != n && !(buf = newof(buf, char, r, 0)))
+ ERROR(ENOMEM);
+ break;
+ }
+ if (errno != ERANGE)
+ {
+ free(buf);
+ return 0;
+ }
+ n += PATH_MAX / 4;
+ }
+ errno = oerrno;
+ return buf;
+}
+
+#else
+
#include <ast_dir.h>
#include <error.h>
#include <fs3d.h>
@@ -288,3 +330,5 @@ getcwd(char* buf, size_t len)
}
#endif
+
+#endif
diff --git a/usr/src/lib/libast/common/misc/getenv.c b/usr/src/contrib/ast/src/lib/libast/misc/getenv.c
index 9252938d00..7e24817703 100644
--- a/usr/src/lib/libast/common/misc/getenv.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/getenv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/glob.c b/usr/src/contrib/ast/src/lib/libast/misc/glob.c
index 2bf92f30b9..b43a43a22c 100644
--- a/usr/src/lib/libast/common/misc/glob.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/glob.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -59,6 +59,7 @@ typedef int (*GL_stat_f)(const char*, struct stat*);
globlist_t* gl_match; \
Stak_t* gl_stak; \
int re_flags; \
+ int re_first; \
regex_t* gl_ignore; \
regex_t* gl_ignorei; \
regex_t re_ignore; \
@@ -90,16 +91,13 @@ gl_dirnext(glob_t* gp, void* handle)
struct dirent* dp;
while (dp = (struct dirent*)(*gp->gl_readdir)(handle))
-#ifdef D_FILENO
- if (D_FILENO(dp))
-#endif
- {
+ {
#ifdef D_TYPE
- if (D_TYPE(dp) != DT_UNKNOWN && D_TYPE(dp) != DT_DIR && D_TYPE(dp) != DT_LNK)
- gp->gl_status |= GLOB_NOTDIR;
+ if (D_TYPE(dp) != DT_UNKNOWN && D_TYPE(dp) != DT_DIR && D_TYPE(dp) != DT_LNK)
+ gp->gl_status |= GLOB_NOTDIR;
#endif
- return dp->d_name;
- }
+ return dp->d_name;
+ }
return 0;
}
@@ -204,7 +202,6 @@ trim(register char* sp, register char* p1, int* n1, register char* p2, int* n2)
{
register char* dp = sp;
register int c;
- register int n;
if (p1)
*n1 = 0;
@@ -212,8 +209,8 @@ trim(register char* sp, register char* p1, int* n1, register char* p2, int* n2)
*n2 = 0;
do
{
- if ((c = *sp++) == '\\' && (c = *sp++))
- n++;
+ if ((c = *sp++) == '\\')
+ c = *sp++;
if (sp == p1)
{
p1 = 0;
@@ -290,7 +287,7 @@ addmatch(register glob_t* gp, const char* dir, const char* pat, register const c
*/
static void
-glob_dir(glob_t* gp, globlist_t* ap)
+glob_dir(glob_t* gp, globlist_t* ap, int re_flags)
{
register char* rescan;
register char* prefix;
@@ -435,7 +432,8 @@ again:
if (pat[2])
{
pat += 3;
- while (*pat=='/') pat++;
+ while (*pat=='/')
+ pat++;
if (*pat)
continue;
}
@@ -453,7 +451,8 @@ skip:
*(restore2 = rescan - 1) = 0;
if (rescan && !complete && (gp->gl_flags & GLOB_STARSTAR))
{
- register char *p = rescan;
+ register char* p = rescan;
+
while (p[0] == '*' && p[1] == '*' && (p[2] == '/' || p[2]==0))
{
rescan = p;
@@ -490,23 +489,13 @@ skip:
if (err = regcomp(&rei, pat, gp->re_flags|REG_ICASE))
break;
prei = &rei;
- }
- pre = prei;
- if (gp->gl_ignore)
- {
- if (!gp->gl_ignorei)
+ if (gp->re_first)
{
- if (regcomp(&gp->re_ignorei, gp->gl_fignore, gp->re_flags|REG_ICASE))
- {
- gp->gl_error = GLOB_APPERR;
- break;
- }
- gp->gl_ignorei = &gp->re_ignorei;
+ gp->re_first = 0;
+ gp->re_flags = regstat(prei)->re_flags & ~REG_ICASE;
}
- ire = gp->gl_ignorei;
}
- else
- ire = 0;
+ pre = prei;
}
else
{
@@ -515,9 +504,26 @@ skip:
if (err = regcomp(&rec, pat, gp->re_flags))
break;
prec = &rec;
+ if (gp->re_first)
+ {
+ gp->re_first = 0;
+ gp->re_flags = regstat(prec)->re_flags;
+ }
}
pre = prec;
- ire = gp->gl_ignore;
+ }
+ if ((ire = gp->gl_ignore) && (gp->re_flags & REG_ICASE))
+ {
+ if (!gp->gl_ignorei)
+ {
+ if (regcomp(&gp->re_ignorei, gp->gl_fignore, re_flags|REG_ICASE))
+ {
+ gp->gl_error = GLOB_APPERR;
+ break;
+ }
+ gp->gl_ignorei = &gp->re_ignorei;
+ }
+ ire = gp->gl_ignorei;
}
if (restore2)
*restore2 = gp->gl_delim;
@@ -583,6 +589,7 @@ glob(const char* pattern, int flags, int (*errfn)(const char*, int), register gl
unsigned long f;
int n;
int x;
+ int re_flags;
const char* nocheck = pattern;
int optlen = 0;
@@ -653,6 +660,8 @@ glob(const char* pattern, int flags, int (*errfn)(const char*, int), register gl
gp->gl_type = gl_type;
if (!gp->gl_attr)
gp->gl_attr = gl_attr;
+ if (flags & GLOB_GROUP)
+ gp->re_flags |= REG_SHELL_GROUP;
if (flags & GLOB_ICASE)
gp->re_flags |= REG_ICASE;
if (!gp->gl_fignore)
@@ -743,15 +752,21 @@ glob(const char* pattern, int flags, int (*errfn)(const char*, int), register gl
pat = strcopy(ap->gl_begin, pattern + optlen);
if (suflen)
pat = strcopy(pat, gp->gl_suffix);
- gp->gl_pat = optlen ? strncpy(gp->gl_opt = pat + 1, pattern, optlen) : (char*)0;
+ if (optlen)
+ strlcpy(gp->gl_pat = gp->gl_opt = pat + 1, pattern, optlen);
+ else
+ gp->gl_pat = 0;
suflen = 0;
if (!(flags & GLOB_LIST))
gp->gl_match = 0;
+ re_flags = gp->re_flags;
+ gp->re_first = 1;
do
{
gp->gl_rescan = ap->gl_next;
- glob_dir(gp, ap);
+ glob_dir(gp, ap, re_flags);
} while (!gp->gl_error && (ap = gp->gl_rescan));
+ gp->re_flags = re_flags;
if (gp->gl_pathc == skip)
{
if (flags & GLOB_NOCHECK)
diff --git a/usr/src/lib/libast/common/misc/intercepts.h b/usr/src/contrib/ast/src/lib/libast/misc/intercepts.h
index 6afe67d5a8..15959ea5ec 100644
--- a/usr/src/lib/libast/common/misc/intercepts.h
+++ b/usr/src/contrib/ast/src/lib/libast/misc/intercepts.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/magic.c b/usr/src/contrib/ast/src/lib/libast/misc/magic.c
index d451db78e2..198144394b 100644
--- a/usr/src/lib/libast/common/misc/magic.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/magic.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,7 +29,7 @@
* the sum of the hacks {s5,v10,planix} is _____ than the parts
*/
-static const char id[] = "\n@(#)$Id: magic library (AT&T Research) 2008-09-10 $\0\n";
+static const char id[] = "\n@(#)$Id: magic library (AT&T Research) 2011-03-09 $\0\n";
static const char lib[] = "libast:magic";
@@ -473,23 +473,26 @@ vcdecomp(char* b, char* e, unsigned char* m, unsigned char* x)
*/
static char*
-ckmagic(register Magic_t* mp, const char* file, char* buf, struct stat* st, unsigned long off)
+ckmagic(register Magic_t* mp, const char* file, char* buf, char* end, struct stat* st, unsigned long off)
{
register Entry_t* ep;
register char* p;
register char* b;
register int level = 0;
int call = -1;
+ int all = 0;
int c;
+ int str;
char* q;
char* t;
+ char* cur;
char* base = 0;
unsigned long num;
unsigned long mask;
regmatch_t matches[10];
mp->swap = 0;
- b = mp->msg[0] = buf;
+ b = mp->msg[0] = cur = buf;
mp->mime = mp->cap[0] = 0;
mp->keep[0] = 0;
for (ep = mp->magic; ep; ep = ep->next)
@@ -513,13 +516,20 @@ ckmagic(register Magic_t* mp, const char* file, char* buf, struct stat* st, unsi
switch (ep->cont)
{
case '#':
- if (mp->keep[level] && b > buf)
+ if (mp->keep[level] && b > cur)
{
+ if ((mp->flags & MAGIC_ALL) && b < (end - 3))
+ {
+ all = 1;
+ *b++ = '\n';
+ cur = b;
+ continue;
+ }
*b = 0;
return buf;
}
mp->swap = 0;
- b = mp->msg[0] = buf;
+ b = mp->msg[0] = cur;
mp->mime = mp->cap[0] = 0;
if (ep->type == ' ')
continue;
@@ -690,9 +700,9 @@ ckmagic(register Magic_t* mp, const char* file, char* buf, struct stat* st, unsi
p = ep->value.sub->re_sub->re_buf;
q = T(ep->desc);
t = *q ? q : p;
- if (mp->keep[level]++ && b > buf && *(b - 1) != ' ' && *t && *t != ',' && *t != '.' && *t != '\b')
+ if (mp->keep[level]++ && b > cur && b < end && *(b - 1) != ' ' && *t && *t != ',' && *t != '.' && *t != '\b')
*b++ = ' ';
- b += sfsprintf(b, PATH_MAX - (b - buf), *q ? q : "%s", p + (*p == '\b'));
+ b += sfsprintf(b, end - b, *q ? q : "%s", p + (*p == '\b'));
if (ep->mime)
mp->mime = ep->mime;
goto checknest;
@@ -721,11 +731,11 @@ ckmagic(register Magic_t* mp, const char* file, char* buf, struct stat* st, unsi
ccmapstr(mp->x2n, p, ep->mask);
}
q = T(ep->desc);
- if (mp->keep[level]++ && b > buf && *(b - 1) != ' ' && *q && *q != ',' && *q != '.' && *q != '\b')
+ if (mp->keep[level]++ && b > cur && b < end && *(b - 1) != ' ' && *q && *q != ',' && *q != '.' && *q != '\b')
*b++ = ' ';
for (t = p; (c = *t) >= 0 && c <= 0177 && isprint(c) && c != '\n'; t++);
*t = 0;
- b += sfsprintf(b, PATH_MAX - (b - buf), q + (*q == '\b'), p);
+ b += sfsprintf(b, end - b, q + (*q == '\b'), p);
*t = c;
if (ep->mime)
mp->mime = ep->mime;
@@ -816,13 +826,16 @@ ckmagic(register Magic_t* mp, const char* file, char* buf, struct stat* st, unsi
case 'm':
c = mp->swap;
- t = ckmagic(mp, file, b + (b > buf), st, num);
+ t = ckmagic(mp, file, b + (b > cur), end, st, num);
mp->swap = c;
- if (!t)
+ if (t)
+ {
+ if (b > cur && b < end)
+ *b = ' ';
+ b += strlen(b);
+ }
+ else if (ep->cont == '&')
goto next;
- if (b > buf)
- *b = ' ';
- b += strlen(b);
break;
case 'r':
@@ -914,25 +927,50 @@ ckmagic(register Magic_t* mp, const char* file, char* buf, struct stat* st, unsi
} while (*p++ & 0x80);
if (!(p = getdata(mp, num, c)))
goto next;
- if (mp->keep[level]++ && b > buf && *(b - 1) != ' ')
+ if (mp->keep[level]++ && b > cur && b < (end - 1) && *(b - 1) != ' ')
{
*b++ = ',';
*b++ = ' ';
}
- b = vcdecomp(b, buf + PATH_MAX, (unsigned char*)p, (unsigned char*)p + c);
+ b = vcdecomp(b, cur + PATH_MAX, (unsigned char*)p, (unsigned char*)p + c);
goto checknest;
}
swapped:
q = T(ep->desc);
- if (mp->keep[level]++ && b > buf && *(b - 1) != ' ' && *q && *q != ',' && *q != '.' && *q != '\b')
+ if (mp->keep[level]++ && b > cur && b < end && *(b - 1) != ' ' && *q && *q != ',' && *q != '.' && *q != '\b')
*b++ = ' ';
- if (ep->type == 'd' || ep->type == 'D')
- b += sfsprintf(b, PATH_MAX - (b - buf), q + (*q == '\b'), fmttime("%?%l", (time_t)num));
+ if (*q == '\b')
+ q++;
+ str = 0;
+ for (t = q; *t; t++)
+ if (*t == '%' && (c = *(t + 1)))
+ {
+ if (c == '%')
+ t++;
+ else
+ while (c && c != '%')
+ {
+ if (c == 's')
+ {
+ str = 1;
+ break;
+ }
+ else if (c == 'c' || c == 'd' || c == 'i' || c == 'u' || c == 'x' || c == 'X')
+ goto format;
+ t++;
+ c = *(t + 1);
+ }
+ }
+ format:
+ if (!str)
+ b += sfsprintf(b, end - b, q, num, num == 1 ? "" : "s", 0, 0, 0, 0, 0, 0);
+ else if (ep->type == 'd' || ep->type == 'D')
+ b += sfsprintf(b, end - b, q, fmttime("%?%QL", (time_t)num), 0, 0, 0, 0, 0, 0, 0);
else if (ep->type == 'v')
- b += sfsprintf(b, PATH_MAX - (b - buf), q + (*q == '\b'), fmtversion(num));
+ b += sfsprintf(b, end - b, q, fmtversion(num), 0, 0, 0, 0, 0, 0, 0);
else
- b += sfsprintf(b, PATH_MAX - (b - buf), q + (*q == '\b'), num);
+ b += sfsprintf(b, end - b, q, fmtnum(num, 0), num == 1 ? "" : "s", 0, 0, 0, 0, 0, 0);
if (ep->mime && *ep->mime)
mp->mime = ep->mime;
checknest:
@@ -957,7 +995,7 @@ ckmagic(register Magic_t* mp, const char* file, char* buf, struct stat* st, unsi
mp->keep[level] = 0;
goto checknest;
}
- if (mp->keep[level] && b > buf)
+ if (all && b-- || mp->keep[level] && b > cur)
{
*b = 0;
return buf;
@@ -997,7 +1035,7 @@ ckenglish(register Magic_t* mp, int pun, int badpun)
*/
static char*
-cklang(register Magic_t* mp, const char* file, char* buf, struct stat* st)
+cklang(register Magic_t* mp, const char* file, char* buf, char* end, struct stat* st)
{
register int c;
register unsigned char* b;
@@ -1147,7 +1185,7 @@ cklang(register Magic_t* mp, const char* file, char* buf, struct stat* st)
}
if (!mp->idtab)
{
- if (mp->idtab = dtnew(mp->vm, &mp->dtdisc, Dthash))
+ if (mp->idtab = dtnew(mp->vm, &mp->dtdisc, Dtset))
for (q = 0; q < elementsof(dict); q++)
dtinsert(mp->idtab, &dict[q]);
else if (mp->disc->errorf)
@@ -1500,17 +1538,17 @@ cklang(register Magic_t* mp, const char* file, char* buf, struct stat* st)
if (code)
{
if (code == CC_ASCII)
- sfsprintf(buf, PATH_MAX, "ascii %s%s", t, s);
+ sfsprintf(buf, end - buf, "ascii %s%s", t, s);
else
{
- sfsprintf(buf, PATH_MAX, "ebcdic%d %s%s", code - 1, t, s);
+ sfsprintf(buf, end - buf, "ebcdic%d %s%s", code - 1, t, s);
mp->mime = "text/ebcdic";
}
s = buf;
}
else if (*t)
{
- sfsprintf(buf, PATH_MAX, "%s%s", t, s);
+ sfsprintf(buf, end - buf, "%s%s", t, s);
s = buf;
}
return s;
@@ -1521,7 +1559,7 @@ cklang(register Magic_t* mp, const char* file, char* buf, struct stat* st)
*/
static char*
-type(register Magic_t* mp, const char* file, struct stat* st, char* buf, int size)
+type(register Magic_t* mp, const char* file, struct stat* st, char* buf, char* end)
{
register char* s;
register char* t;
@@ -1538,8 +1576,8 @@ type(register Magic_t* mp, const char* file, struct stat* st, char* buf, int siz
{
mp->mime = "x-system/lnk";
s = buf;
- s += sfsprintf(s, PATH_MAX, T("symbolic link to "));
- if (pathgetlink(file, s, size - (s - buf)) < 0)
+ s += sfsprintf(s, end - s, T("symbolic link to "));
+ if (pathgetlink(file, s, end - s) < 0)
return T("cannot read symbolic link text");
return buf;
}
@@ -1552,7 +1590,7 @@ type(register Magic_t* mp, const char* file, struct stat* st, char* buf, int siz
if (S_ISCHR(st->st_mode))
{
mp->mime = "x-system/chr";
- sfsprintf(buf, PATH_MAX, T("character special (%s)"), fmtdev(st));
+ sfsprintf(buf, end - buf, T("character special (%s)"), fmtdev(st));
return buf;
}
if (S_ISFIFO(st->st_mode))
@@ -1584,8 +1622,8 @@ type(register Magic_t* mp, const char* file, struct stat* st, char* buf, int siz
mp->fbuf[mp->fbsz] = 0;
mp->xoff = 0;
mp->xbsz = 0;
- if (!(s = ckmagic(mp, file, buf, st, 0)))
- s = cklang(mp, file, buf, st);
+ if (!(s = ckmagic(mp, file, buf, end, st, 0)))
+ s = cklang(mp, file, buf, end, st);
}
}
if (!mp->mime)
@@ -2235,13 +2273,13 @@ magicload(register Magic_t* mp, const char* file, unsigned long flags)
{
if (list)
{
- if (!(t = pathpath(mp->fbuf, s, "", PATH_REGULAR|PATH_READ)) && !strchr(s, '/'))
+ if (!(t = pathpath(s, "", PATH_REGULAR|PATH_READ, mp->fbuf, sizeof(mp->fbuf))) && !strchr(s, '/'))
{
strcpy(mp->fbuf, s);
sfprintf(mp->tmp, "%s/%s", MAGIC_DIR, mp->fbuf);
if (!(s = sfstruse(mp->tmp)))
goto nospace;
- if (!(t = pathpath(mp->fbuf, s, "", PATH_REGULAR|PATH_READ)))
+ if (!(t = pathpath(s, "", PATH_REGULAR|PATH_READ, mp->fbuf, sizeof(mp->fbuf))))
goto next;
}
if (!(fp = sfopen(NiL, t, "r")))
@@ -2313,7 +2351,7 @@ magicopen(Magicdisc_t* disc)
mp->redisc.re_resizehandle = (void*)mp->vm;
mp->dtdisc.key = offsetof(Info_t, name);
mp->dtdisc.link = offsetof(Info_t, link);
- if (!(mp->tmp = sfstropen()) || !(mp->infotab = dtnew(mp->vm, &mp->dtdisc, Dthash)))
+ if (!(mp->tmp = sfstropen()) || !(mp->infotab = dtnew(mp->vm, &mp->dtdisc, Dtoset)))
goto bad;
for (n = 0; n < elementsof(info); n++)
dtinsert(mp->infotab, &info[n]);
@@ -2371,10 +2409,10 @@ magictype(register Magic_t* mp, Sfio_t* fp, const char* file, register struct st
{
if (mp->fp = fp)
off = sfseek(mp->fp, (off_t)0, SEEK_CUR);
- s = type(mp, file, st, mp->tbuf, sizeof(mp->tbuf));
+ s = type(mp, file, st, mp->tbuf, &mp->tbuf[sizeof(mp->tbuf)-1]);
if (mp->fp)
sfseek(mp->fp, off, SEEK_SET);
- if (!(mp->flags & MAGIC_MIME))
+ if (!(mp->flags & (MAGIC_MIME|MAGIC_ALL)))
{
if (S_ISREG(st->st_mode) && (st->st_size > 0) && (st->st_size < 128))
sfprintf(mp->tmp, "%s ", T("short"));
diff --git a/usr/src/contrib/ast/src/lib/libast/misc/magic.tab b/usr/src/contrib/ast/src/lib/libast/misc/magic.tab
new file mode 100644
index 0000000000..db217b2799
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/misc/magic.tab
@@ -0,0 +1,1723 @@
+#
+# @(#)magic (AT&T Research) 2012-05-11
+#
+# magic number database for file(1) and magic(3)
+#
+# the tab separated fields are:
+#
+# [op]offset type [mask]operator description mime
+#
+# + previous fields must match, current optional
+# & previous and current fields must match
+# { start nesting block
+# } end nesting block
+# s{ function declaration and call
+# } function return
+# s() function call
+#
+# offset byte offset for magic number test or (@offset) expr
+# or file meta-data from { atime blocks ctime fstype
+# gid mode mtime name nlink size uid }
+# type { byte short long quad date edit match }
+# mask optional &number before operator
+# operator comparison operator { < <= > >= != == (default) }
+# description file description for magic number match
+# mime optional mime type
+#
+# numeric values may be decimal, octal, or hex
+# the description string may have one printf format spec for the
+# matched magic number
+#
+
+0 short 070707 binary cpio archive application/pax
+0 string 070707 cpio archive application/pax
++76 edit %!PAX!C!\([^!]*\).*%\1% , compressed, version %s
++76 edit %!PAX!D!\([^!]*\).*%\1% , delta, version %s
++76 string DELTA!!! , delta, version 88
++76 match !(*!*) , [ %s ... ]
+0 string 070701 System V asc cpio archive application/pax
++110 string * , [ %s ... ]
+0 string 070702 System V aschk cpio archive application/pax
++110 string * , [ %s ... ]
+0 long 0177555 System III ar archive application/x-ar
+0 short 0177545 pdp11 ar archive application/x-ar
+0 long 0x04034b50 zip archive application/zip
++2 byte >0 , version %d
+&3 byte * .%d
+0 long 0x223e9f78 ms outlook tnef archive application/pax
+0 string MSCF ms cabinet archive application/pax
+&4 long 0
++25 byte * , version %d
++24 byte * .%d
+0 string \x52\x61\x72\x21\x1a\x07 rar archive application/pax
+0 long 0x0d010b05 make object application/x-nmake
+o{
++4 byte <037 (version %ld)
++4 edit %.*\(..\)/\(..\)/\(..\).*%19\3-\1-\2% , version %s
++4 edit %.*\(....-..-..\).*%\1% , version %s
+}
+0 long 0177535 make object, old magic application/x-nmake
+o()
+0 long 0x090f0301 jmake project db application/x-jmake
++4 string * , version %s
+0 long 0x0b130800 ksh binary script application/ksh
++4 byte * , version %ld
+0 string vkda delta application/x-vdelta
++4 byte >0 (version %ld)
+0 long 0x03040200 cql db application/x-cql
++4 byte * , version %d
++5 byte * .%d
++6 string * , %s
+0 string !<cdb-
++6 edit %\([^-]*\)-\([0-9.]*\)>.*%cql db, \1 format, version \2% %s application/x-cql
+0 long 0x08091800
++32 string * %s application/x-cql
++0 byte * hashed index
++4 long >0 , %d record%s
++8 long >0 , %d max
++12 date >0 , stamp %s
+0 string \1S\1B\1C\1S sbcs delta application/x-sbcs
+0 long 0100554 apl workspace application/x-apl
+0 short 017037 packed data application/zip
+0 string <ar> System V 1.0 ar archive application/x-ar
+0 string !<arch>\n/ ar library application/x-ar
++68 long 0x020b0619 , hp s800 relocatable
++68 long 0x02100619 , hp pa-risc 1.1 relocatable
++68 long 0x02110619 , hp pa-risc 1.2 relocatable
++68 long 0x02140619 , hp pa-risc 2.0 relocatable
+0 string !<arch>\n__.SYMDEF ar library, ranlib application/x-ar
+0 string !<arch>\n__________E ar library, hybrid application/x-ar
+0 string !<arch>\n_______[0-9_][0-9_][0-9_]E[BL]E[BL]_ ar library, hybrid application/x-ar
+o{
++22 byte 'X' , out of date
++20 byte 'U' , ucode members
++21 byte >='A' , %c-endian members
++19 byte >='A' , %c-endian hash
+}
+0 string !<arch>\n________64E ar library, 64 bit hybrid application/x-ar
+o()
+0 string !<arch> ar archive application/x-ar
+0 string <aiaff>\n aix ar library application/x-ar
+0 string <bigaf>\n aix ar library, big application/x-ar
+20 short 0xa7dc zoo archive application/x-zoo
+&22 short 0xfdc4
++32 byte * , version %ld
++33 byte * .%ld
+
+0 string \326\303\304\330 vcodex data application/x-vczip
++5 void vcodex()
+
+0 long 0x080456
+{
+85 byte <10 sun
++85 byte <3 m680%d0
++85 byte 3 sparc
++85 byte >3 *unknown*
+}
++85 byte * core dump x-system/core
++128 string * from `%s'
++132 string * from `%s'
+0 long 050632 core dump x-system/core
+0 long &0xfff00000==0xe8c00000 Alliant core dump
++160 string * from `%s'
+
+0 long 0x02100106 hp pa-risc 1.1 object x-system/obj
+0 long 0x02100107 hp pa-risc 1.1 executable x-system/exe
+o{
++(@144) long 0x054ef630 , dynamically linked
++96 long >0 , not stripped
+}
+0 long 0x02100108 hp pa-risc 1.1 executable, shared x-system/exe
+o()
+0 long 0x0210010b hp pa-risc 1.1 executable, demand-load x-system/exe
+o()
+0 long 0x0210010e hp pa-risc 1.1 shared library x-system/dll
+o()
+0 long 0x0210010d hp pa-risc 1.1 shared library x-system/dll
+s{
++96 long >0 , not stripped
+}
+
+0 long 0x02140106 hp pa-risc 2.0 object x-system/obj
+0 long 0x02140107 hp pa-risc 2.0 executable x-system/exe
+o()
+0 long 0x02140108 hp pa-risc 2.0 executable, shared x-system/exe
+o()
+0 long 0x0214010b hp pa-risc 2.0 executable, demand-load x-system/exe
+o()
+0 long 0x0214010e hp pa-risc 2.0 shared library x-system/dll
+o()
+0 long 0x0214010d hp pa-risc 2.0 shared library x-system/dll
+s()
+
+0 long 0x020b0106 hp s800 object x-system/obj
+0 long 0x020b0107 hp s800 executable x-system/exe
+o()
+0 long 0x020b0108 hp s800 executable, shared x-system/exe
+o()
+0 long 0x020b010b hp s800 executable, demand-load x-system/exe
+o()
+0 long 0x020b010d hp s800 shared library x-system/dll
+s()
+0 long 0x020b010e hp s800 shared library x-system/dll
+s()
+
+0 long 0x02080108 hp s500 executable, pure x-system/exe
+o{
++16 long >0 , version %ld
+}
+0 long 0x02080107 hp s500 executable x-system/exe
+o()
+0 long 0x02080106 hp s500 executable, relocatable x-system/obj
+o()
+0 long 0x020c0108 hp s200 executable, pure x-system/exe
+o{
++36 long >0 , not stripped
++4 short >0 , version %ld
+}
+0 long 0x020c0107 hp s200 executable x-system/exe
+o()
+0 long 0x020c010b hp s200 executable, demand-load x-system/exe
+o()
+0 long 0x020a0108 hp s200 2.x executable, pure x-system/exe
+o()
+0 long 0x020a0107 hp s200 2.x executable x-system/exe
+o()
+0 long 0x020c0106 hp s200 executable, relocatable x-system/exe
++4 short >0 , version %ld
+0 long 0x0208ff65 hp s500 old archive application/x-ar
+0 long 0x020cff65 hp s200 old archive application/x-ar
+0 long 0x020aff65 hp s200 old archive application/x-ar
+0 short 0x8000 hp lif file
+0 long 0x020c010c hp compiled Lisp
+0 long 0x4da7eee8 hp windows font
++8 byte >0 , version %ld
+
+0 string Joy!peffpwpc PowerPC executable
+0 short 0x01df PowerPC object x-system/obj
+&3 byte 3
+
+0 long 0x50900107 pyramid 90x executable x-system/exe
+o{
++0 long &0x7=0x3 , paged
++0 long &0x8 , pure
++16 long >0 , not stripped
+}
+0 long 0x50900108 pyramid 90x object x-system/obj
+0 long 0x5090010b pyramid 90x executable x-system/exe
+o()
+
+0 long 0x000001EB plan9 386 executable x-system/exe
+0 long 0x00000107 plan9 68020 executable x-system/exe
+&mode long &0111!=0
+0 long 0x00000197 plan9 hobbit executable x-system/exe
+0 long 0x00000407 plan9 mips executable x-system/exe
+0 long 0x000002AB plan9 sparc executable x-system/exe
+
+0 long 0x7E004501 plan9 386 object x-system/obj
+0 long 0x4D013201 plan9 68020 object x-system/obj
+0 long 0x430D013C plan9 hobbit object x-system/obj
+0 long 0x3A11013C plan9 mips object x-system/obj
+0 long 0x7410013C plan9 sparc object x-system/obj
+
+0 long &0x0030FFFF==0x00000064 linux 386
+&0 long &0x000F0000>0
++20 long &0xEFDFFFFF==0 executable x-system/exe
++20 long &0xEFDFFFFF!=0 shared library x-system/dll
++0 long 0x01080064 , pure
++0 long 0x010B0064 , paged
++0 long 0x00CC0064 , paged, no page 0
+{
+20 long &0xEFDFFFFF==0
+&16 long >0 , not stripped
+}
+216 long 0421 linux core dump x-system/core
+
+0 long 0x00cc0064 linux 386 kernel code x-system/exe
++size long <600000 , compressed
+510 short 0xaa55 linux 386 kernel image x-system/exe
++size long <600000 , compressed
+0 long 0x03010410 minix 386 executable x-system/exe
+0 long 0x000186a3 minix 386 object x-system/obj
+
+0 long 0314 bsd 386 executable, paged, no page 0 x-system/exe
++16 long >0 , not stripped
+0 long 0407 bsd 386 executable x-system/exe
+&mode long &0111!=0
++16 long >0 , not stripped
+0 long 0407 bsd-or-linux 386 object x-system/obj
+0 long 0410 bsd 386 executable, pure x-system/exe
++16 long >0 , not stripped
+0 long 0413 bsd 386 executable, paged x-system/exe
++16 long >0 , not stripped
+
+0 belong 0xcafebabe java object x-java/obj
+&4 belong >30
++6 beshort * version %d
++6 beshort * .%d
+
+a{
++4 long &0x00ffffff=1 vax
++4 long &0x00ffffff=2 romp
++4 long &0x00ffffff=3 architecture=%ld
++4 long &0x00ffffff=4 ns32032
++4 long &0x00ffffff=5 ns32332
++4 long &0x00ffffff=6 m68k
++4 long &0x00ffffff=7 i386
++4 long &0x00ffffff=8 mips
++4 long &0x00ffffff=9 ns32532
++4 long &0x00ffffff=10 architecture=%ld
++4 long &0x00ffffff=11 hp pa-risc
++4 long &0x00ffffff=12 acorn
++4 long &0x00ffffff=13 m88k
++4 long &0x00ffffff=14 sparc
++4 long &0x00ffffff=15 i860-big
++4 long &0x00ffffff=16 i860
++4 long &0x00ffffff=17 rs6000
++4 long &0x00ffffff=18 powerpc
++4 long &0x00ffffff>=19 architecture=%ld
++4 long &0x01000000!=0 \b-64
+}
+
+0 belong 0xcafebabe universal binary [
++4 belong loop(a,4,20)
++4 belong * ]
++010000 void magic()
++0 void * ...
+
+0 long &0xfffffffe=0xfeedface mach-o
++0 long &0x00000001!=0 64-bit
+a()
++12 long <=0 filetype=%ld
+{
+12 long 1 relocatable x-system/obj
+&mode long &0111!=0
+}
+{
+12 long 1 object x-system/obj
+&mode long &0111==0
+}
++12 long 2 executable x-system/exe
++12 long 3 fixed vm shared library x-system/dll
++12 long 4 core x-system/core
++12 long 5 preload executable x-system/exe
++12 long 6 shared library x-system/dll
++12 long 7 dynamic link editor x-system/exe
++12 long 8 bundle x-system/dll
++12 long >=9 filetype=%ld
+
+2 short 0407
+m{
+1 byte <10 sun
++1 byte <3 m680%d0
++1 byte 3 sparc
++1 byte >3 *unknown*
+}
++0 byte !=0xffffffff object x-system/obj
+2 short 0410
+m()
++0 byte !=0xffffffff executable, pure x-system/exe
+o{
+{
+0 byte &0200
+&20 long >=0x2000 , dynamically linked
+}
++16 long >0 , not stripped
+}
+2 short 0413
+m()
+{
+0 byte &0200
+&20 long <0x2000 shared library x-system/dll
+}
++0 byte !=0xffffffff executable, paged x-system/exe
+o()
+
+0 short 0420 Alliant virtual executable x-system/exe
++16 long >0 , not stripped
+o{
++2 short &0x0001 , 68020 only
++2 short &0x0002 , vector instructions
++2 short &0x0008 , IP only
++2 short &0x0010 , CE only
++2 short &0x0020 , common library
++2 short &0x0200 , no complex
+}
+0 short 0421 Alliant object x-system/obj
++16 long 0 , no symbols
+o()
+
+0 short 0x01df aix RISC
+{
+18 short &0x2002==0x0002 executable x-system/exe
++18 short &0x1000 , dynamically linked
++12 long >0 , not stripped
+}
++18 short &0x2002==0 object x-system/obj
++18 short &0x2000 shared library x-system/dll
+0 short 0x0103 aix RT executable x-system/exe
++2 byte 0x50 , pure
++28 long >0 , not stripped
++6 short >0 , version %ld
+0 short 0x0104 aix shared library x-system/dll
+0 short 0x0105 aix ctab data
+0 short 0xfe04 aix structured file
+
+0 short 0401 unix-rt ldp
+0 short 0405 old overlay
+0 short 0437 pdp11 kernel overlay
+
+0 short 0407 System III executable x-system/exe
+o{
++16 long >0 , not stripped
++2 short >0 , version %ld
+}
+0 short 0410 System III executable, pure x-system/exe
+o()
+0 short 0411 System III executable, separate I&D x-system/exe
+o()
+
+0 long 0407 vax object x-system/obj
+0 long 0410 vax executable, pure x-system/exe
+o{
++16 long >0 , not stripped
+}
+0 long 0413 vax executable, paged x-system/exe
+o()
+
+0 short 0413 vax executable, pure x-system/exe
++8 short >0 , not stripped
++15 byte >0 , version %ld
+
+0 short 0570 vax
+o{
+{
+16 short >0 executable x-system/exe
++12 long >0 , not stripped
++22 short >0 , version %ld
+}
++16 short 0 object x-system/obj
+}
+0 short 0575 vax
+o()
+0 short 0502 basic-16
+o()
+0 short 0503 basic-16 (TV)
+o()
+0 short 0510 x86
+o()
+0 short 0511 x86 (TV)
+o()
+0 short 0550 3b20
+o()
+0 short 0551 3b20d (TV)
+o()
+
+0 long 0x464c457f elf
+&4 byte <2
+&5 byte 1
+o{
+{
++18 short 0 machine=UNKNOWN
++18 short 1 3b
++18 short 2 sparc
++18 short 3 i386
++18 short 4 m68k
++18 short 5 m88k
++18 short 6 i486
++18 short 7 i860
+{
+18 short 8
+{
+36 long &0xf00000f0==0x00000000
++4 byte 1 mips2
++4 byte 2 mips4
+}
++36 long &0xf0000000==0x10000000 mips2
++36 long &0xf0000000==0x20000000 mips3
++36 long &0xf0000000==0x30000000 mips4
++36 long &0xf00000f0==0x00000040 mips4
++36 long &0xf0000000==0x40000000 mips5
++36 long &0xf0000000==0x50000000 mips6
++36 long &0xf0000000==0x60000000 mips7
++36 long &0xf0000000==0x70000000 mips8
++36 long &0xf0000000==0x80000000 mips9
+}
++18 short 9 amdahl
++18 short 10 mips_le
++18 short 11 rs6000
++18 short 15 pa
++18 short 16 n-cube
++18 short 17 fujitsu500
++18 short 18 sparc32+
++18 short 20 powerpc
++18 short 21 powerpc-64
++18 short 22 s390
++18 short 23 cell-BE
++18 short 36 nec-v800
++18 short 37 fujitsu-fr20
++18 short 38 trw-rh32
++18 short 39 fujitsu-mma
++18 short 40 arm
++18 short 41 alpha
++18 short 42 hitachi-sh
++18 short 43 sparc64-v9
++18 short 44 siemens-tricore
++18 short 45 argonaut
++18 short 46 hitachi-h8/300
++18 short 47 hitachi-h8/300h
++18 short 48 hitachi-h8s
++18 short 49 hitachi-h8/500
++18 short 50 itanium
++18 short 51 mips-x
++18 short 52 motorola-coldfire
++18 short 53 motorola-m68hc12
++18 short 54 fujutsu-mma
++18 short 55 siemens-pcp
++18 short 56 sony-ncpu
++18 short 57 denso-ndr1
++18 short 58 motorola-startcore
++18 short 59 toyota-me16
++18 short 60 stm-st100
++18 short 61 alc-tinyj
++18 short 62 x86-64
++18 short 63 sony-dsp
++18 short 66 siemens-fx66
++18 short 67 stm-st9-16
++18 short 68 stm-st7-8
++18 short 69 motorola-mc68hc16
++18 short 70 motorola-mc68hc11
++18 short 71 motorola-mc68hc08
++18 short 72 motorola-mc68hc05
++18 short 73 sgi-svx
++18 short 74 stm-st19-8
++18 short 75 vax
++18 short 76 axis, 32-bit
++18 short 77 infineon-javelin-32
++18 short 78 element-14-firepath-64
++18 short 79 lsi-zsp-16
++18 short 80 knuth-mmix-64
++18 short 81 harvard-huany
++18 short 82 sitera-prism
++18 short 83 amtel-avr-8
++18 short 84 fujitsu-fr30
++18 short 85 mitsubishi-d10v
++18 short 86 mitsubishi-d30v
++18 short 87 nec-v850
++18 short 88 matsushita-m32r
++18 short 89 matsushita-mn10300
++18 short 90 matsushita-mn10200
++18 short 91 picojava
++18 short 92 openrisc-32
++18 short 93 arc-tangent-a5
++18 short 94 tensilica-xtensa
++18 short 0x9026 alpha
++18 short 0xa390 s390
+|18 short * machine=0x%04lX
+}
++16 short 0 type=UNKNOWN
++16 short 1 object x-system/obj
++16 short 2 executable x-system/exe
++16 short 3 shared library x-system/dll
+{
+16 short 4 core dump x-system/core
++(@28+@42H*@44H+104) string * from `%s'
+}
++16 short >4 type=%d
++4 byte 0 , 16-bit
++4 byte 1 , 32-bit
++5 byte 1 , little-endian
+{
+18 short ==8
+&36 long &0x000000f0==0x00000000
+&4 byte 1 , old
+}
+{
+18 short 1
++36 long 1 , mau
+}
++20 long >1 , version %ld
+{
+16 short 2
+&(@28+4*32) long 2 , dynamically linked
+}
+}
+
+0 long 0x7f454c46 elf
+&4 byte 1
+&5 byte 2
+o()
+
+0 long 0x464c457f elf
+&4 byte 2
+&5 byte 1
+o{
+{
++18 short 0 machine=UNKNOWN
++18 short 1 3b
++18 short 2 sparc
++18 short 3 i386
++18 short 4 m68k
++18 short 5 m88k
++18 short 6 i486
++18 short 7 i860
+{
+18 short 8
+{
+48 long &0xf00000f0==0x00000000
++4 byte 1 mips2
++4 byte 2 mips4
+}
++48 long &0xf0000000==0x10000000 mips2
++48 long &0xf0000000==0x20000000 mips3
++48 long &0xf0000000==0x30000000 mips4
++48 long &0xf00000f0==0x00000040 mips4
++48 long &0xf0000000==0x40000000 mips5
++48 long &0xf0000000==0x50000000 mips6
++48 long &0xf0000000==0x60000000 mips7
++48 long &0xf0000000==0x70000000 mips8
++48 long &0xf0000000==0x80000000 mips9
+}
++18 short 9 amdahl
++18 short 10 mips_le
++18 short 11 rs6000
++18 short 15 pa
++18 short 16 n-cube
++18 short 17 fujitsu500
++18 short 18 sparc32+
++18 short 20 powerpc
++18 short 21 powerpc-64
++18 short 22 s390
++18 short 23 cell-BE
++18 short 36 nec-v800
++18 short 37 fujitsu-fr20
++18 short 38 trw-rh32
++18 short 39 fujitsu-mma
++18 short 40 arm
++18 short 41 alpha
++18 short 42 hitachi-sh
++18 short 43 sparc64-v9
++18 short 44 siemens-tricore
++18 short 45 argonaut
++18 short 46 hitachi-h8/300
++18 short 47 hitachi-h8/300h
++18 short 48 hitachi-h8s
++18 short 49 hitachi-h8/500
++18 short 50 itanium
++18 short 51 mips-x
++18 short 52 motorola-coldfire
++18 short 53 motorola-m68hc12
++18 short 54 fujutsu-mma
++18 short 55 siemens-pcp
++18 short 56 sony-ncpu
++18 short 57 denso-ndr1
++18 short 58 motorola-startcore
++18 short 59 toyota-me16
++18 short 60 stm-st100
++18 short 61 alc-tinyj
++18 short 62 x86-64
++18 short 63 sony-dsp
++18 short 66 siemens-fx66
++18 short 67 stm-st9-16
++18 short 68 stm-st7-8
++18 short 69 motorola-mc68hc16
++18 short 70 motorola-mc68hc11
++18 short 71 motorola-mc68hc08
++18 short 72 motorola-mc68hc05
++18 short 73 sgi-svx
++18 short 74 stm-st19-8
++18 short 75 vax
++18 short 76 axis-32
++18 short 77 infineon-javelin-32
++18 short 78 element-14-firepath-64
++18 short 79 lsi-zsp-16
++18 short 80 knuth-mmix-64
++18 short 81 harvard-huany
++18 short 82 sitera-prism
++18 short 83 amtel-avr-8
++18 short 84 fujitsu-fr30
++18 short 85 mitsubishi-d10v
++18 short 86 mitsubishi-d30v
++18 short 87 nec-v850
++18 short 88 matsushita-m32r
++18 short 89 matsushita-mn10300
++18 short 90 matsushita-mn10200
++18 short 91 picojava
++18 short 92 openrisc-32
++18 short 93 arc-tangent-a5
++18 short 94 tensilica-xtensa
++18 short 0x9026 alpha
++18 short 0xa390 s390
+|18 short * machine=0x%04lX
+}
++16 short 0 type=UNKNOWN
++16 short 1 object x-system/obj
++16 short 2 executable x-system/exe
++16 short 3 shared library x-system/dll
+{
+16 short 4 core dump x-system/core
++(@28+@42H*@44H+104) string * from `%s'
+}
++16 short >4 type=%ld
++4 byte 2 , 64-bit
++5 byte 1 , little-endian
++20 long >1 , version %ld
+{
+16 short 2
++(@32Q+3*56) long 2 , dynamically linked
++(@32Q+4*56) long 2 , dynamically linked
+}
+}
+
+0 long 0x7f454c46 elf
+&4 byte 2
+&5 byte 2
+o()
+
+0 lelong 000000407 netbsd little-endian object x-system/obj
++16 lelong 0 , stripped
+0 belong 000000407 netbsd big-endian object x-system/obj
++16 belong 0 , stripped
+
+0 belong&0377777777 041400413 netbsd i386
+d{
+0 byte &0x80
++20 lelong <4096 shared library x-system/dll
++20 lelong >=4096 executable, dynamically linked x-system/exe
+}
++0 byte ^0x80 executable x-system/exe
++16 lelong 0 , stripped
+0 belong&0377777777 041400410 netbsd i386 pure
+p{
++0 byte &0x80 executable, dynamically linked x-system/exe
++0 byte ^0x80 executable x-system/exe
++16 lelong 0 , stripped
+}
+0 belong&0377777777 041400407 netbsd i386
+n{
++0 byte &0x80 executable, dynamically linked, impure x-system/exe
+{
+0 byte ^0x80
++0 byte &0x40 position independent
++20 lelong !0 executable x-system/exe
++20 lelong =0 object x-system/obj
+}
++16 lelong 0 , stripped
+}
+0 belong&0377777777 041400507 netbsd i386 core
+c{
++12 string * from '%s' x-system/core
+}
+
+0 belong&0377777777 042000413 netbsd m68k4k
+d()
+0 belong&0377777777 042000410 netbsd m68k4k pure
+p()
+0 belong&0377777777 042000407 netbsd m68k4k
+n()
+0 belong&0377777777 042000507 netbsd m68k4k core
+c()
+
+0 belong&0377777777 042200413 netbsd ns32532
+d()
+0 belong&0377777777 042200410 netbsd ns32532 pure
+p()
+0 belong&0377777777 042200407 netbsd ns32532
+n()
+0 belong&0377777777 042200507 netbsd ns32532 core
+c()
+
+0 belong&0377777777 042600413 netbsd pmax
+d()
+0 belong&0377777777 042600410 netbsd pmax pure
+p()
+0 belong&0377777777 042600407 netbsd pmax
+n()
+0 belong&0377777777 042600507 netbsd pmax core
+c()
+
+0 belong&0377777777 043000413 netbsd vax 1k
+d()
+0 belong&0377777777 043000410 netbsd vax 1k pure
+p()
+0 belong&0377777777 043000407 netbsd vax 1k
+n()
+0 belong&0377777777 043000507 netbsd vax 1k core
+c()
+
+0 belong&0377777777 045400413 netbsd vax 4k
+d()
+0 belong&0377777777 045400410 netbsd vax 4k pure
+p()
+0 belong&0377777777 045400407 netbsd vax 4k
+n()
+0 belong&0377777777 045400507 netbsd vax 4k core
+c()
+
+0 belong&0377777777 041600413 netbsd m68k
+d{
+0 byte &0x80
++20 belong <8192 shared library x-system/dll
++20 belong >=8192 executable, dynamically linked x-system/exe
+}
++0 byte ^0x80 executable x-system/exe
++16 belong 0 , stripped
+0 belong&0377777777 041600410 netbsd m68k pure
+p()
+0 belong&0377777777 041600407 netbsd m68k
+n()
+0 belong&0377777777 041600507 netbsd m68k core
+c()
+0 belong&0377777777 042400413 netbsd sparc
+d()
+
+0 belong&0377777777 042400410 netbsd sparc pure
+p()
+0 belong&0377777777 042400407 netbsd sparc
+n()
+0 belong&0377777777 042400507 netbsd sparc core
+c()
+
+0 belong&0377777777 043400413 netbsd mips
+d()
+0 belong&0377777777 043400410 netbsd mips pure
+p()
+0 belong&0377777777 043400407 netbsd mips
+n()
+0 belong&0377777777 043400507 netbsd mips core
+c()
+
+0 belong&0377777777 043600413 netbsd arm32
+d()
+0 belong&0377777777 043600410 netbsd arm32 pure
+p()
+0 belong&0377777777 043600407 netbsd arm32
+n()
+0 belong&0377777777 043600507 netbsd arm32 core
+c()
+
+0 lelong 0x00070185 ECOFF netbsd alpha binary
++10 leshort 0x0000 , stripped x-system/obj
+0 belong&0377777777 043200507 netbsd alpha core
+c()
+
+0 short 0560 3b
+{
+16 short >0 executable x-system/exe
++12 long >0 , not stripped
+}
++16 short 0 object x-system/obj
++18 short &010000 , paging 3b2/300
++18 short &020000 , 32100
++18 short &040000 , mau
+{
+16 short >0
++20 short 0443 , shared library x-system/dll
++20 short 0410 , swapped
++20 short 0413 , paged
++22 short >0 , version %ld
+}
+0 short 0561 3b (TV)
+{
+16 short >0 executable x-system/exe
++12 long >0 , not stripped
+}
++16 short 0 object x-system/obj
++18 short &020000 , 32100 required
++18 short &040000 , mau hardware required
+
+0 short 0512 pc 286 small model (COFF)
+o{
+{
+16 short >0 executable x-system/exe
++12 long >0 , not stripped
+}
++16 short 0 object x-system/obj
+{
+16 short >0
+&22 short >0 , version %ld
+}
+}
+0 short 0522 pc 286 large model (COFF)
+o()
+
+0 short 0514 pc 386
+o{
+{
+16 short >0 executable x-system/exe
++12 long >0 , not stripped
+}
++16 short 0 object x-system/obj
+{
+16 short >0
+&22 short >0 , version %ld
+}
++0 short !=0x8664 , 32 bit
++0 short 0x8664 , 64 bit
+}
+0 short 0x8664 pc 386
+o()
+0 short 0524 pc 386
+o()
+0 short 0604 pc alpha
+o()
+
+0 short 0520 m68k
+{
+16 short >0 executable x-system/exe
++12 long >0 , not stripped
+}
++16 short 0 object x-system/obj
+{
+16 short >0
++20 short 0410 , pure
++20 short 0413 , paged
++22 short >0 , version %ld
+}
+
+0 short 0521 m68k executable, shared x-system/exe
+o{
++12 long >0 , not stripped
+}
+0 short 0522 m68k executable, shared, paged x-system/exe
+o()
+
+0 long 0x02c5e2c4 mvs OpenEdition object x-system/obj
+&4 long 0x40404040
+0 long 0xc9c5e6d7 mvs OpenEdition executable x-system/exe
+&4 long 0xd3d4c840
+
+0 short 0530 u370 5.2/5.0
+o{
+{
+20 long !=0440
+&18 short &01 executable x-system/exe
++0 short &01==0 , pure
++12 long >0 , not stripped
+}
++20 long 0440 shared library x-system/dll
++18 short &01==0 object x-system/obj
++18 byte &0x40 , BIG
++49 byte &0xf!=0 , pre-XA
+{
+18 short &01
++24 long >0 , version %ld
+}
+}
+0 short 0531 amdahl 5.2
+o()
+0 short 0534 amdahl 5.2
+o()
+0 short 0535 u370 5.2
+o()
+
+0 short 0700 ncr tower32
+o{
++18 short &0040000 68000
++18 short &0040000==0 68020
++18 short &0020000 \b+68881
+{
+18 short &0000001==0 object x-system/obj
++22 short >0 , version %ld
+}
+{
+18 short &0001 executable x-system/exe
++20 short 0413 , paged
++20 short 0443 shared library x-system/dll
++20 short 0410 , pure, swapped
++20 short 0407 , swapped
++12 long >0 , not stripped
+}
+}
+0 short 0720 ncr towe32r/600
+o()
+0 short 0740 ncr tower32/800
+o()
+0 short 0610 ncr tower/XP rel 2
+o()
+0 short 0615 ncr tower/XP rel 2
+o()
+0 short 0620 ncr tower/XP rel 3
+o()
+0 short 0625 ncr tower/XP rel 3
+o()
+0 short 0630 ncr tower32/600/400
+o()
+0 short 0640 ncr tower32/800
++18 short &00040000 compatible
+o()
+0 short 0645 ncr tower32/800 68010
+o()
+
+0 short 0457 DG MV pure executable x-system/exe
++40 long >0 , not stripped
++2 short >0 , version %ld
+0 short 0460 DG MV object x-system/obj
++2 short >0 , version %ld
+0 short 0541 m88k pure executable x-system/exe
++12 long >0 , not stripped
++22 short >0 , version %ld
+0 short 0555 m88k object x-system/obj
++22 short >0 , version %ld
+
+0 short &0xfffd==0x0160 mips
+{
+18 short &02 executable x-system/exe
++20 short 0410 , pure
++20 short 0413 , paged
++20 short 0443 , shared library x-system/dll
++8 long !=0 , not stripped
+}
++18 short &02==0 object x-system/obj
+o{
++0 short &0x2 , little-endian
++22 byte * , version %ld
++23 byte * .%ld
+}
+0 short &0xfffd==0x180 mips ucode x-system/obj
+o()
+0 long 0xdeadadb0 mips core dump x-system/core
+f{
++4 long 1
+&16 string * from `%s'
++0 long &0xff==0xb0 , 32-bit, old
++0 long &0xff==0xbb , 32-bit
++0 long &0xff==0x40 , 64-bit
+}
+0 long 0xbabec0bb mips core dump x-system/core
+f()
+0 long 0xdeadad40 mips core dump x-system/core
+f()
+
+0 short 0603 alpha
+{
+22 short &02
+&22 short &030000!=020000 executable x-system/exe
++24 short 0410 , pure
++24 short 0413 , paged
++22 short &020000 , dynamically linked
++16 long !=0 , not stripped
+}
++22 short &030000==020000 shared library x-system/dll
+{
+22 short &030002==0
++24 short 0407 object x-system/obj
+}
++27 byte * , version %ld
++26 byte * .%ld
+
+0 short 0432 compiled terminfo entry
+0 short 0433 curses screen image
+0 short 0434 curses screen image
+
+0 long 0x14031008 tcpdump cons headers application/x-tcpdump
+v{
++4 long >0 , version %d
+&8 long * .%d
+}
+0 long 0x14031004 tcpdump cons data application/x-tcpdump
+v()
+
+257 string ustar pax archive application/pax
+&156 match [gx]
+o{
+&99 byte 0
+&100 match +([ 0-7])?
+}
+
+257 string ustar\ \ gnu tar archive application/pax
+o{
+&99 byte 0
+&100 match +([ 0-7])?
++0 match ???* , [ %s ... ]
+}
+
+257 string ustar tar archive application/pax
+o()
+
+99 byte 0 old tar archive application/pax
+o()
+
+0 string \301\304\331\100\323\311\302\331\306 ca librarian archive application/pax
+
+0 match <[hH][tT][mM][lL]> html input text/html
+0 match <!?(--)[Dd][Oo][Cc][Tt][Yy][Pp][Ee] [Hh][Tt][Mm][Ll] html input text/html
+
+0 long 0x02f78301
++16 string TeX TeX dvi output application/x-dvi
+
+0 byte 0201 shell history application/sh
+&1 byte <07 version %d
+
+0 byte 1
+&1 byte 0150
+&2 match [0-9][0-9][0-9][0-9][0-9] sccs application/x-sccs
+
+0 short 0x5a4d
+o{
+&24 short 0x0040
+{
++(@60H) short 0x454c os/2 linear
++(@60H) short 0x454e os/2
++(@60H) short 0x4550 win32
++(@60H+4) short 0x014c 386
++(@60H+4) short 0x0150 powerpc
++(@60H+4) short 0x0162 mips
++(@60H+4) short 0x0166 mips, big endian?
++(@60H+4) short 0x0184 alpha
++(@60H+4) short 0x8664 386
+|(@60H+4) short * machine=0x%04lX
+}
++(@60H+22) short &0x2002==0x0002 executable x-system/exe
++(@60H+22) short &0x2000 shared library x-system/dll
++(@60H+22) short &0x0120==0 , 16 bit
++(@60H+22) short &0x0120==0x0100 , 32 bit
++(@60H+22) short &0x0120==0x0020 , 64 bit
++(@60H+92) short 0 , unknown subsystem
++(@60H+92) short 1 , native
++(@60H+92) short 2 , windows gui
++(@60H+92) short 5 , os2
++(@60H+92) short 7 , posix
++(@60H+92) short >7 , subsystem %d
++50 string PKWARE , self extracting zip
++36 string LHA's , self extracting lha
++233 string PKSFX2 , self extracting zip
+}
+
+0 short 0x5a4c
+o()
+
+0 long 0x4c000000
+&4 long 0x01140200 windows shortcut application/x-windows-lnk
+
+0 string PMCC windows GRP application/dos-grp
+369 string MICROSOFT windows PIF application/dos-pif
+0 long 0xffffffff dos device driver application/dos-drv
+&name match *.(SYS|sys)
+0 string LZ dos builtin
+0 byte 0xe9 dos executable, COM application/x-dos
+0 byte 0xeb dos executable, COM application/x-dos
+0 byte 0xf0 dos library application/x-ar
+0 byte 0x80 dos object, OMF application/dos-omf
+
+0 match x[ ]T[ ] ditroff application/x-ditroff
+&4 string * for %s
+0 string %! postscript input application/postscript
+{
+2 string PS-Adobe- , conforming
++11 match +([0-9]).+([0-9]) , version %s
+}
+0 string %PDF adobe acrobat file application/x-pdf
++5 match +([0-9]).+([0-9]) , version %s
+0 string @document( imagen input
+
+0 long 0x2e736e64 audio data audio/basic
+o{
++12 long 1 , 8-bit u-law
++12 long 2 , 8-bit linear pcm
++12 long 3 , 16-bit linear pcm
++12 long 4 , 24-bit linear pcm
++12 long 5 , 32-bit linear pcm
++12 long 6 , 32-bit floating point
++12 long 7 , 64-bit floating point
++12 long 23 , compressed (G.721 ADPCM)
++20 long =1 , mono
++20 long =2 , stereo
++20 short =3 , 3 channels
++20 short =4 , quad
++20 short >4 , %d channel%s
++16 long * , %d hz
+}
+0 long 0x0064732E dec audio data audio/x-dec
+o()
+
+0 string Creative\ Voice\ File soundblaster audio data audio/x-soundblaster
+0 long 0x4e54524b multitrack audio data file audio/x-multitrack
++4 long * , version %ld
+
+0 string MThd standard midi data audio/midi
++9 byte >0 , format %d
++11 byte >1 , %d channel%s
+0 string CTMF creative music data
+0 string SBI soundblaster instrument data
+0 string Creative\ Voice\ File creative labs voice data
+&19 byte 0x1A
++23 byte >0 , version %d
++22 byte >0 \b.%d
+
+0 string RIFF riff audio data audio/riff
++8 string AIFF aiff format
++8 string AIFC aiff-c format
++8 string WAVE , wave format
++8 string 8SVX 8svx format
++34 leshort >0 , %d bit
++22 leshort =1 , mono
++22 leshort =2 , stereo
++22 leshort =3 , 3 channels
++22 leshort =4 , quad
++22 leshort >4 , %d channel%s
++24 lelong >0 , %d hz
+
+8 long 0x41494646 aiff audio data audio/aiff
+8 long 0x41494643 aiff-C audio data audio/aiff
+0 long 0x4e54524b multitrack audio data audio/multitrack
+
+0 string ;vdb;ciao ciao virtual database application/x-ciao
+0 string ;vdb; vdb archive application/pax
++5 string * , %s
+
+0 string #pragma pp:checkpoint preprocessor checkpoint application/x-libpp
++22 edit %"\([^"]*\)".*%\1% , version %s
+
+#
+# pc application files
+#
+
+0 string HDR*PowerBuilder power builder library application/x-powerbuilder
++18 edit %\([0-9][0-9]\)\([0-9][0-9]\).*%\1.\2% , version %s
+
+#
+# database files
+#
+
+0 long 0x13579ace dbm 1.x database application/x-dbm
+0 string GDBM gnu dbm 2.x database application/x-gdbm
+
+12 long 0x00042253 bsd db queue
++16 long >0 version %d
++12 belong 0x00042253 , big-endian
++12 lelong 0x00042253 , little-endian
+
+0 long 0x00053162 bsd db btree application/x-bsd-db
++4 long >2 1.86
++4 long <3 1.85
++4 long >0 , version %d
++0 belong 0x00053162 , big-endian
++0 lelong 0x00053162 , little-endian
++16 long * , %d record%s
++20 long * , flags 0x%x
+
+12 long 0x00053162 bsd db btree
++16 long >0 version %d
++12 belong 0x00053162 , big-endian
++12 lelong 0x00053162 , little-endian
+
+0 long 0x00061561 bsd db hash application/x-bsd-db
++4 long >2 1.86
++4 long <3 1.85
++4 long >0 version %d
++8 long 4321 , big-endian
++8 long 1234 , little-endian
++56 long * , %d key%s
+
+12 long 0x00061561 bsd db hash
++16 long >0 version %d
++12 belong 0x00061561 , big-endian
++12 lelong 0x00061561 , little-endian
+
+0 long 0x950412de gnu message catalog application/x-locale
++4 long * , revision %d
++8 long * , %d message%s
+
+#
+# from the net
+#
+
+1 string # This is a shell archive. shar archive application/x-shar
+81 string # This is a shell archive. shar archive application/x-shar
+
+0 short 0x1f9d compressed data application/zip
+{
+2 byte &0200
+&2 byte &037>0 , %d bit%s
+}
+0 short 017436 packed data application/zip
+0 short 0x9d1f compressed data application/zip
++2 byte &0200 , blocked
++2 byte &037>0 , with %d bit%s
+
+0 short 0x1f10 pzip compressed data application/pzip
+&2 byte >0 , version %d
+&3 byte <10 .%d
+
+0 short 0x1f8b pzip compressed data application/pzip
+&10 short 0x9217
+
+0 short 0x1f8b gzip compressed data application/gzip
++9 byte 0 , dos
++9 byte 1 , amiga
++9 byte 2 , vms
++9 byte 3 , unix
++9 byte 5 , atari
++9 byte 6 , os/2
++9 byte 7 , mac
++9 byte 10 , tops/20
++9 byte 11 , win/32
++2 byte <8 , reserved
++2 byte 8 , deflate
++3 byte &0x1 , ascii
++3 byte &0x2 , continuation
++3 byte &0x4 , extra field
++3 byte &0x8 , original name
++3 byte &0x10 , comment
++3 byte &0x20 , encrypted
++8 byte 2 , max compression
++8 byte 4 , max speed
++4 ledate >0 , %s
+
+0 string BZh bzip compressed data application/zip
++3 byte >='0'&<='9' , %c00k blocks
+0 long 0x0000abcd NOC newbridge raw stats
+v{
++4 short * , version %d
++6 short * .%d
+}
+0 long 0x0e130414 NOC switch stats
+v()
+0 long 0x0e13130d NOC switch summary stats
+v()
+
+0 string \x{FD}7zXZ xz compressed data application/xz
+
+0 leshort 0 windows icon resource application/x-ms-icon
+&2 leshort 1
++4 leshort x , %d icon%s
+
+0 string begin 0 uuencoded data application/x-uuencode
+0 string \x89PNG PNG image data image/png
+&4 belong 0x0d0a1a0a
++16 belong x , %ld x
++20 belong x %ld
++24 byte x , %d-bit
++25 byte 0 , grayscale
++25 byte 2 , color RGB
++25 byte 3 , colormap
++25 byte 4 , gray+alpha
++25 byte 6 , color RGBA
+#+26 byte 0 , deflate/32K
++28 byte 0 , non-interlaced
++28 byte 1 , interlaced
+0 string \377\330\377 JPEG image image/jpeg
+0 string GIF GIF image image/gif
++3 string * , version %-.3s
+{
+6 leshort >0 , %d
+&8 leshort >0 x %d
+}
++10 byte &0x40 , interlaced
++10 byte &0x03==0x00 , 2 colors
++10 byte &0x03==0x01 , 4 colors
++10 byte &0x03==0x02 , 8 colors
++10 byte &0x03==0x03 , 16 colors
++10 byte &0x03==0x04 , 32 colors
++10 byte &0x03==0x05 , 64 colors
++10 byte &0x03==0x06 , 128 colors
++10 byte &0x03==0x07 , 256 colors
+0 short 0x4d4d TIFF image, big-endian image/tiff
++2 short >0 , version %d
+0 short 0x4949 TIFF image, little-endian image/tiff
++2 short >0 , version %d
+0 short 000732 sgi imagelib image image/x-imagelib
++6 short * , %d
++8 short * x %d
+
+0 string gimp xcf gimp XCF image image/x-gimp
++9 string file , version 0
+{
+9 string v , version
+&10 string * %s
+}
++14 belong x , %lu x
++18 belong x %lu
++22 belong 0 , rgb color
++22 belong 1 , greyscale
++22 belong 2 , indexed color
+
+0 string MOVI sgi movie video/x-sgi
+
+0 byte 0
+&4 string moov quicktime movie video/quicktime
+0 byte 0
+&4 string mdat quicktime movie video/quicktime
+8 string AVI avi movie video/avi
+0 long 0x000001BA mpeg movie video/mpeg
+0 long 0x000001B3 mpeg movie video/mpeg
+
+0 string <MakerFile frame maker file application/framemaker
+0 string {\\rtf rich text application/rtf
+
+0 long 0xd0cf11e0 ms powerpoint document application/x-powerpoint
+
+0 string ms C/C++ program database ms program database application/x-dbx
++33 string * , version %s
+
+0 string \377WPC corel wordperfect document application/x-wordperfect
+
+0 beshort 0xedab
+&2 beshort 0xeedb red hat package manager
++4 byte * v%d
++8 beshort 1 i386
++8 beshort 2 alpha
++8 beshort 3 sparc
++8 beshort 4 mips
++8 beshort 5 powerpc
++8 beshort 6 68k
++8 beshort 7 sgi
++8 beshort >7 unknown
++6 beshort 0 binary
++6 beshort 1 source
++10 string * , %s
+
+0 short 0x9900 pgp key public ring application/pgp
+0 short 0x9501 pgp key security ring application/pgp
+0 short 0x9500 pgp key security ring application/pgp
+0 string -----BEGIN\040PGP pgp armored data application/pgp
++15 string PUBLIC\040KEY\040BLOCK- , public key block
++15 string MESSAGE- , message
++15 string SIGNED\040MESSAGE- , signed message
++15 string PGP\040SIGNATURE- , signature
+
+0 string Core osf unknown core dump x-system/core
+&name match core*
++24 string * from `%s'
+
+0 match From[ ] mail message message/rfc822
+0 match (BABYL|From|Received|Return-Path|To)?(:)[ ] mail message message/partial
+
+0 string \001fcp X11 portable compiled font x-X11/font
+
+0 string \357\273\277 utf-8 encoded text application/x-iconv
+0 string \376\377 utf-16 encoded text application/x-iconv
+0 string \377\376 utf-16 encoded text, little-endian application/x-iconv
+
+32769 string CD001 ISO 9660 CD-ROM filesystem image data/x-filesystem
++32808 string * , '%s'
++34816 string \000CD001\001EL\ TORITO\ SPECIFICATION , bootable
+37633 string CD001 ISO 9660 CD-ROM filesystem image, raw 2352 byte sectors data/x-filesystem
+32776 string CDROM High Sierra CD-ROM filesystem image data/x-filesystem
+
+#
+# front compression data
+#
+
+0 byte 0
+&1 edit %^\([A-Z_][A-Z_]*\)-\([^0-9]*\)-\([0-9][0-9]\)%\1 data, with \2, version \3%l %s application/x-%s
+0 byte 0
+&1 edit %^\([A-Z_][A-Z_]*\)\([0-9][0-9]\)%\1 data, version \2%l %s application/x-%s
+
+#
+# generic binary magic
+#
+
+0 long 0x00010203
+&4 string * %s application/x-%s
+&12 string * %s data
+&24 version * , version %s
++28 long >0 , size %u
+{
+&28 long >=4
+&32 long >0 , %u
+}
+{
+&28 long >=8
+&36 long >0 , %u
+}
+
+#
+# local additions
+#
+
+0 match info mam mam program application/x-mam
+0 edit %^!<\([^>]*\)>.*%\1%l %s data application/x-%s
+0 string \015\023\007\000 ast message catalog application/x-locale
++4 string * , %s
+
+#
+# last chance
+#
+
+name match *.(o|obj) unknown object x-system/obj
+name match core unknown core dump x-system/core
+name match core.* unknown core dump x-system/core
+
+#
+# we resisted til now
+#
+
+0 void registry()
+|name match *.acp Office.ActorPreview application/x-ms-office
+|name match *.act Office.Actor application/x-ms-office
+|name match *.ade Microsoft Access project extension application/x-ms
+|name match *.adp Microsoft Access project application/x-ms
+|name match *.aif AIFF Audio audio/x-aiff
+|name match *.aifc AIFF Audio audio/aiff
+|name match *.aiff AIFF Audio audio/aiff
+|name match *.aim AOL Instant Messenger Launch application/x-aim
+|name match *.ani Animated Cursor application/x-ms-anifile
+|name match *.app Application file application/x-ms
+|name match *.arc WinZip File application/x-ms-winzip
+|name match *.arj WinZip File application/x-ms-winzip
+|name match *.art ART Image image/x-jg
+|name match *.asp Active Server Page application/x-ms
+|name match *.asx Windows Media Audio / Video application/x-ms
+|name match *.au Sound Clip audio/basic
+|name match *.avi Video Clip video/avi
+|name match *.awx Custom AppWizard application/x-ms-awxfile
+|name match *.b64 WinZip File application/x-ms-winzip
+|name match *.bas Microsoft Visual Basic class module application/x-ms
+|name match *.bat MS-DOS Batch File application/x-ms-batfile
+|name match *.bfc Briefcase application/x-ms-briefcase
+|name match *.bhx WinZip File application/x-ms-winzip
+|name match *.bmp Bitmap Image image/bmp
+|name match *.bpg Borland Project Group application/x-ms-borlandprojectgroup
+|name match *.bpk C++Builder Package application/x-ms-bcbpackage
+|name match *.bpr C++Builder Project application/x-ms-bcbproject
+|name match *.bsc Browser Information application/x-ms-bscfile
+|name match *.cda CD Audio Track application/x-ms-cdafile
+|name match *.cdf Channel File application/x-netcdf
+|name match *.cer Internet Security Certificate application/x-x509-ca-cert
+|name match *.cfg CFG File application/x-ms-cfg_auto_file
+|name match *.chm Compiled HTML Help file application/x-ms-help
+|name match *.cil Clip Gallery Download Package application/x-ms-clipgallerydownloadpackage
+|name match *.class Java class file application/x-java
+|name match *.clp Clipboard Clip application/x-ms-clpfile
+|name match *.cmd Windows Command Script application/x-ms-cmdfile
+|name match *.com MS-DOS Application application/x-ms-comfile
+|name match *.cpl Control Panel extension application/x-ms-cplfile
+|name match *.cpp C++ Source File application/x-c++
+|name match *.crt Internet Security Certificate application/x-x509-ca-cert
+|name match *.css HyperText Style Sheet text/css
+|name match *.csv Microsoft Excel Comma Separated Values File application/x-ms-excel
+|name match *.cur Cursor application/x-ms-curfile
+|name match *.cxx C++ Source File application/x-c++
+|name match *.dcx DCX Image Document application/x-ms-dcximage
+|name match *.der Internet Security Certificate application/x-x509-ca-cert
+|name match *.dfm C++Builder Form application/x-ms-bcbform
+|name match *.dic Text Document application/x-ms-txtfile
+|name match *.dif DV video/x-dv
+|name match *.dll Windows dynamic link library application/x-ms-dll
+|name match *.doc Microsoft Word Document application/x-ms-word
+|name match *.dot Microsoft Word Template application/x-ms-word
+|name match *.drv Device driver application/x-ms-drvfile
+|name match *.dsm Developer Studio Macro File application/x-ms-dsmfile
+|name match *.dsn Microsoft OLE DB Provider for ODBC Drivers application/x-ms-msdasql
+|name match *.dsp Project File application/x-ms-dspfile
+|name match *.dsw Project Workspace application/x-ms-dswfile
+|name match *.dv DV video/x-dv
+|name match *.ebh Ebasic Files application/x-ms-hclebasich
+|name match *.ebx Ebrun Files application/x-ms-hclebrun
+|name match *.exc Text Document application/x-ms-txtfile
+|name match *.exe Application application/x-msdownload
+|name match *.fav Outlook Bar Shortcuts application/x-ms-outlook
+|name match *.fdf Adobe Acrobat Forms Document application/x-ms-acroexch
+|name match *.fnd Saved Search application/x-ms-fndfile
+|name match *.fon Font file application/x-ms-fonfile
+|name match *.fs Ftp Files application/x-ms-hclftp
+|name match *.fxp Microsoft Visual FoxPro compiled program application/x-ms-foxpro
+|name match *.gfi Genigraphics GraphicsLink application/x-ms-graphicslink
+|name match *.gfx Genigraphics GraphicsLink application/x-ms-graphicslink
+|name match *.gif GIF Image image/gif
+|name match *.gim Genigraphics GraphicsLink application/x-ms-graphicslink
+|name match *.gix Genigraphics GraphicsLink application/x-ms-graphicslink
+|name match *.gna Genigraphics GraphicsLink application/x-ms-graphicslink
+|name match *.gnx Genigraphics GraphicsLink application/x-ms-graphicslink
+|name match *.gra Microsoft Graph 97 Chart application/x-ms-msgraph
+|name match *.grp Microsoft Program Group application/x-ms-msprogramgroup
+|name match *.gst MSMap.Datainst.8 application/x-ms-msmap
+|name match *.gwx Genigraphics GraphicsLink application/x-ms-graphicslink
+|name match *.gwz Genigraphics GraphicsLink application/x-ms-graphicslink
+|name match *.gz WinZip File application/gzip
+|name match *.hep HostExplorer Session Profile application/x-ms-hostexplorer
+|name match *.hlp Help File application/x-ms-help
+|name match *.hpp C++ Header File application/x-c++
+|name match *.hqx WinZip File application/mac-binhex40
+|name match *.hs3 HostExplorer Hotspot Definition application/x-ms-hostexplorer
+|name match *.hs5 HostExplorer Hotspot Definition application/x-ms-hostexplorer
+|name match *.hsv HostExplorer Hotspot Definition application/x-ms-hostexplorer
+|name match *.ht HyperTerminal File application/x-ms-htfile
+|name match *.hta HTML program application/x-ms
+|name match *.htm html source text/html
+|name match *.hts Hummingbird Telnet Program v6.0.0.0 application/x-ms-hummingbird
+|name match *.htt HyperText Template text/webviewhtml
+|name match *.htw HTML Document application/x-ms-htmlfile
+|name match *.htx HTML Document text/html
+|name match *.hxx C++ Header File application/x-c++
+|name match *.ico Icon application/x-ms-icon
+|name match *.idb Intermediate File application/x-ms-mdpxfile
+|name match *.ilk Intermediate File application/x-ms-mdpxfile
+|name match *.inf Setup Information application/x-ms-setup
+|name match *.ini Configuration Settings application/x-ms-config
+|name match *.ins Internet Communication Settings application/x-internet-signup
+|name match *.iqy Microsoft Excel Web Query File application/x-ms-iqyfile
+|name match *.isp Internet Communication Settings application/x-internet-signup
+|name match *.its Internet Document Set application/x-ms-its
+|name match *.ivt InfoViewer Title application/x-ms-ivt
+|name match *.jfif JPEG Image image/jpeg
+|name match *.job Scheduler Job Object application/x-ms-jobobject
+|name match *.jod Microsoft.Jet.OLEDB.3.51 application/x-ms-microsoft
+|name match *.jpe JPEG Image image/jpeg
+|name match *.jpeg JPEG Image image/jpeg
+|name match *.jpg JPEG Image image/jpeg
+|name match *.js JavaScript file application/x-java
+|name match *.jse JavaScript Encoded Script file application/x-ms
+|name match *.jsp JavaScript Page application/x-ms
+|name match *.km3 HostExplorer KeyMap Definition application/x-ms-hostexplorer
+|name match *.km5 HostExplorer KeyMap Definition application/x-ms-hostexplorer
+|name match *.kmv HostExplorer KeyMap Definition application/x-ms-hostexplorer
+|name match *.lam LAMDocument application/x-ms-lamdocument
+|name match *.ldb Microsoft Access Record-Locking Information application/x-ms-access
+|name match *.lnk Shortcut application/x-ms
+|name match *.log Text Document application/x-text
+|name match *.lzh WinZip File application/x-ms-winzip
+|name match *.m1v Movie Clip video/mpeg
+|name match *.mac MacPaint Image image/x-macpaint
+|name match *.mad Microsoft Access Module Shortcut application/x-ms-access
+|name match *.maf Microsoft Access Form Shortcut application/x-ms-access
+|name match *.mam Microsoft Access Macro Shortcut application/x-ms-access
+|name match *.maq Microsoft Access Query Shortcut application/x-ms-access
+|name match *.mar Microsoft Access Report Shortcut application/x-ms-access
+|name match *.mat Microsoft Access Table Shortcut application/x-ms-access
+|name match *.mda Microsoft Access Add-in application/x-ms-access
+|name match *.mdb Microsoft Access Database application/x-ms-access
+|name match *.mdb Microsoft Access program application/x-ms
+|name match *.mde Microsoft Access MDE Database application/x-ms-access
+|name match *.mdn Microsoft Access Blank Database Template application/x-ms-access
+|name match *.mdp Project Workspace application/x-ms-mdpfile
+|name match *.mdt Microsoft Access Add-in Data application/x-ms-access
+|name match *.mdw Microsoft Access Workgroup Information application/x-ms-access
+|name match *.mdz Microsoft Access Database Wizard Template application/x-ms-access
+|name match *.mht Microsoft MHTML Document 4.0 message/rfc822
+|name match *.mhtml Microsoft MHTML Document 4.0 message/rfc822
+|name match *.mid MIDI Sequence audio/mid
+|name match *.mmm Media Clip application/x-ms-mplayer
+|name match *.mov QuickTime Movie video/quicktime
+|name match *.mp2 Movie Clip video/mpeg
+|name match *.mpa Movie Clip video/mpeg
+|name match *.mpe Movie Clip video/mpeg
+|name match *.mpeg Movie Clip video/mpeg
+|name match *.mpg Movie Clip video/mpeg
+|name match *.msc Microsoft Common Console Document application/x-ms-mmc
+|name match *.msg Outlook Item application/x-ms-msgfile
+|name match *.msi Microsoft Windows Installer package application/x-ms
+|name match *.msp Windows Installer patch application/x-ms
+|name match *.mst Visual Test source files application/x-ms
+|name match *.nsc Netscape Conference Call File application/x-conference
+|name match *.obd Microsoft Office Binder application/x-ms-office
+|name match *.obt Microsoft Office Binder Template application/x-ms-office
+|name match *.obz Microsoft Office Binder Wizard application/x-ms-office
+|name match *.odl Object Definition Language File application/x-ms-odlfile
+|name match *.ofn Other Office Documents... application/x-ms-office
+|name match *.oft Outlook Item Template application/x-ms-outlook
+|name match *.ops Microsoft Office profile settings file application/x-ms
+|name match *.opx MS Organization Chart 2.0 application/x-ms-orgpluswopx
+|name match *.oss Office Search application/x-ms-ossfile
+|name match *.pcd Photo CD Image application/x-ms-pcdfile
+|name match *.pch Intermediate File application/x-ms-mdpxfile
+|name match *.pct PICT Image image/pict
+|name match *.pcx PCX Image application/x-ms-pcxfile
+|name match *.pdb Intermediate File application/x-ms-mdpxfile
+|name match *.pdf Adobe Acrobat Document application/pdf
+|name match *.pfm Type 1 Font file application/x-ms-pfmfile
+|name match *.php Perl CGI Script File application/x-perl
+|name match *.pic PICT Image image/pict
+|name match *.pict PICT Image image/pict
+|name match *.pif Shortcut to MS-DOS Program application/x-ms-piffile
+|name match *.pif Shortcut to MS-DOS program application/x-ms
+|name match *.pkg Microsoft Developer Extension application/x-ms-pkgfile
+|name match *.pma Performance Monitor File application/x-ms-perffile
+|name match *.pmc Performance Monitor File application/x-ms-perffile
+|name match *.pml Performance Monitor File application/x-ms-perffile
+|name match *.pmr Performance Monitor File application/x-ms-perffile
+|name match *.pmw Performance Monitor File application/x-ms-perffile
+|name match *.pnf Precompiled Setup Information application/x-ms-pnffile
+|name match *.png PNG Image application/x-ms-pngfile
+|name match *.pntg MacPaint Image image/x-macpaint
+|name match *.pop HostExplorer Poppad Definition application/x-ms-hostexplorer
+|name match *.pot Microsoft PowerPoint Template application/vnd.ms-powerpoint
+|name match *.ppa Microsoft PowerPoint Addin application/vnd.ms-powerpoint
+|name match *.pps Microsoft PowerPoint SlideShow application/vnd.ms-powerpoint
+|name match *.ppt Microsoft PowerPoint Presentation application/vnd.ms-powerpoint
+|name match *.prf System file application/x-ms
+|name match *.prg Program source file application/x-ms
+|name match *.psd Photoshop Image image/x-photoshop
+|name match *.pwz Microsoft PowerPoint Wizard application/vnd.ms-powerpoint
+|name match *.qif QuickTime Image image/x-quicktime
+|name match *.qk3 HostExplorer QuickKeys application/x-ms-hostexplorer
+|name match *.qk5 HostExplorer QuickKeys application/x-ms-hostexplorer
+|name match *.qkv HostExplorer QuickKeys application/x-ms-hostexplorer
+|name match *.qt QuickTime Movie video/quicktime
+|name match *.qti QuickTime Image image/x-quicktime
+|name match *.qtif QuickTime Image image/x-quicktime
+|name match *.qtp QuickTime Preferences application/x-ms-quicktimepreferences
+|name match *.qts QuickTime application/x-ms-quicktimesystem
+|name match *.qtx QuickTime Extension application/x-ms-quicktimeextension
+|name match *.que Scheduler Queue Object application/x-ms-queueobject
+|name match *.rc Resource Template application/x-ms-rcfile
+|name match *.rct Resource Template application/x-ms-rcfile
+|name match *.reg Registration Entries application/x-ms-regfile
+|name match *.res Intermediate File application/x-ms-mdpxfile
+|name match *.rmi MIDI Sequence audio/mid
+|name match *.rnk Dial-Up Shortcut application/x-ms-rnkfile
+|name match *.rtf Rich Text Format application/x-ms-word
+|name match *.rx XRX Files application/x-ms-hclbroadway
+|name match *.sbr Intermediate File application/x-ms-mdpxfile
+|name match *.sc2 Microsoft Schedule+ 7.0 Application application/x-ms-scheduleplus
+|name match *.scd Microsoft Schedule+ 7.0 Application application/x-ms-scheduleplus
+|name match *.scf Windows Explorer Command application/x-ms-explorer
+|name match *.sch Microsoft Schedule+ 7.0 Application application/x-ms-scheduleplus
+|name match *.scp Text Document application/x-ms-txtfile
+|name match *.scr Screen Saver application/x-ms-scrfile
+|name match *.sct Windows Script Component application/x-ms
+|name match *.sd2 Sound Designer 2 audio/x-sd2
+|name match *.ses Xsession Files application/x-ms-hclxsession
+|name match *.shb Shortcut into a document application/x-ms-docshortcut
+|name match *.shs Scrap object application/x-ms-shellscrap
+|name match *.shtml Netscape Hypertext Document application/x-ms-netscapemarkup
+|name match *.slk Microsoft Excel SLK Data Import Format application/x-ms-excel
+|name match *.snd Sound Clip audio/basic
+|name match *.stm HTML Document text/html
+|name match *.sys System file application/x-ms-sysfile
+|name match *.taz WinZip File application/x-ms-winzip
+|name match *.tga TGA Image application/x-ms-tgafile
+|name match *.tif TIF Image Document image/tiff
+|name match *.tlb Type Library application/x-ms-tlbfile
+|name match *.ttf TrueType Font file application/x-ms-ttffile
+|name match *.txt Text Document text/plain
+|name match *.tz WinZip File application/x-ms-winzip
+|name match *.udl Microsoft Data Link application/x-ms-msdasc
+|name match *.url Internet Shortcut application/x-ms-internetshortcut
+|name match *.uue WinZip File application/x-ms-winzip
+|name match *.vb Microsoft Visual Basic Scripting Edition (VBScript) file application/x-ms
+|name match *.vbe VBScript Encoded Script file application/x-ms
+|name match *.vbs VBScript file application/x-ms
+|name match *.vir Virus Infected File application/x-ms-virus
+|name match *.wav Wave Sound audio/x-wav
+|name match *.wbk Microsoft Word Backup Document application/x-ms-word
+|name match *.wiz Microsoft Word Wizard application/x-ms-word
+|name match *.wll Microsoft Word Addin application/x-ms-word
+|name match *.wpd corel wordperfect document application/x-wordperfect
+|name match *.wri Write Document application/x-ms-wrifile
+|name match *.wrl SGI.CosmoPlayer.1 application/x-ms-sgi
+|name match *.wrz SGI.CosmoPlayer.1 application/x-ms-sgi
+|name match *.ws Wstart Files application/x-ms-hclwstart
+|name match *.wsc Windows Script Component application/x-ms
+|name match *.wsf Windows Script file application/x-ms
+|name match *.wsh Windows Script Host Settings file application/x-ms
+|name match *.wtx Text Document application/x-ms-txtfile
+|name match *.xbm Netscape Hypertext Document image/x-xbitmap
+|name match *.xif XIF Image Document application/x-ms-xifimage
+|name match *.xla Microsoft Excel Add-In application/x-ms-excel
+|name match *.xlb Microsoft Excel Worksheet application/x-ms-excel
+|name match *.xlc Microsoft Excel Chart application/x-ms-excel
+|name match *.xld Microsoft Excel 5.0 DialogSheet application/x-ms-excel
+|name match *.xlk Microsoft Excel Backup File application/x-ms-excel
+|name match *.xll Microsoft Excel XLL Add-In application/x-ms-excel
+|name match *.xlm Microsoft Excel 4.0 Macro application/x-ms-excel
+|name match *.xls Microsoft Excel Worksheet application/vnd.ms-excel
+|name match *.xlt Microsoft Excel Template application/x-ms-excel
+|name match *.xlv Microsoft Excel VBA Module application/x-ms-excel
+|name match *.xlw Microsoft Excel Workspace application/x-ms-excel
+|name match *.xnk Microsoft Exchange Shortcut application/x-ms-exchange
+|name match *.xs Microsoft Exchange start Files application/x-ms-exchange
+|name match *.xxe WinZip File application/x-ms-winzip
+|name match *.zip WinZip File application/x-zip-compressed
diff --git a/usr/src/lib/libast/common/misc/mime.c b/usr/src/contrib/ast/src/lib/libast/misc/mime.c
index 2c8e4b33c1..051de6f163 100644
--- a/usr/src/lib/libast/common/misc/mime.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/mime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -550,7 +550,10 @@ static char*
expand(Mime_t* mp, char* s, const char* name, const char* type, const char* opts)
{
char* t;
+ char* v;
int c;
+ int e;
+ int n;
Parse_t pp;
mp->disc->flags |= MIME_PIPE;
@@ -562,15 +565,34 @@ expand(Mime_t* mp, char* s, const char* name, const char* type, const char* opts
case '\n':
break;
case '%':
- switch (c = *s++)
+ if ((c = *s++) == '{' && (e = '}') || c == '(' && (e = ')'))
+ {
+ for (t = s; *s && *s != e; s++);
+ n = s - t;
+ switch (*s)
+ {
+ case '}':
+ s++;
+ c = '{';
+ break;
+ case ')':
+ s++;
+ if (c = *s)
+ s++;
+ break;
+ }
+ }
+ else
+ t = 0;
+ switch (c)
{
case 's':
- sfputr(mp->buf, (char*)name, -1);
+ v = (char*)name;
mp->disc->flags &= ~MIME_PIPE;
- continue;
+ break;
case 't':
- sfputr(mp->buf, (char*)type, -1);
- continue;
+ v = (char*)type;
+ break;
case '{':
for (t = s; *s && *s != '}'; s++);
if (*s && (c = s++ - t) && (pp.next = (char*)opts))
@@ -582,8 +604,18 @@ expand(Mime_t* mp, char* s, const char* name, const char* type, const char* opts
break;
}
continue;
+ default:
+ sfputc(mp->buf, c);
+ continue;
}
- /*FALLTHROUGH*/
+ if (v && *v)
+ n = strlen(v);
+ else if (t)
+ v = t;
+ else
+ continue;
+ sfputr(mp->buf, fmtquote(v, 0, 0, n, FMT_SHELL), -1);
+ continue;
default:
sfputc(mp->buf, c);
continue;
@@ -784,7 +816,7 @@ mimeopen(Mimedisc_t* disc)
mp->dict.key = offsetof(Ent_t, name);
mp->dict.comparf = order;
mp->dict.freef = drop;
- if (!(mp->buf = sfstropen()) || !(mp->cap = dtopen(&mp->dict, Dtorder)))
+ if (!(mp->buf = sfstropen()) || !(mp->cap = dtopen(&mp->dict, Dtoset)))
{
mimeclose(mp);
return 0;
diff --git a/usr/src/lib/libast/common/misc/mimelib.h b/usr/src/contrib/ast/src/lib/libast/misc/mimelib.h
index 51dc072507..ebfa3433dc 100644
--- a/usr/src/lib/libast/common/misc/mimelib.h
+++ b/usr/src/contrib/ast/src/lib/libast/misc/mimelib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/mimetype.c b/usr/src/contrib/ast/src/lib/libast/misc/mimetype.c
index 526bbc7120..63fdd0b03c 100644
--- a/usr/src/lib/libast/common/misc/mimetype.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/mimetype.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/optctx.c b/usr/src/contrib/ast/src/lib/libast/misc/optctx.c
index e86deb1ec7..1dbdf71592 100644
--- a/usr/src/lib/libast/common/misc/optctx.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/optctx.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/optesc.c b/usr/src/contrib/ast/src/lib/libast/misc/optesc.c
index 26c6892fab..8b023c5227 100644
--- a/usr/src/lib/libast/common/misc/optesc.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/optesc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/optget.c b/usr/src/contrib/ast/src/lib/libast/misc/optget.c
index 8a11303b03..af5559b150 100644
--- a/usr/src/lib/libast/common/misc/optget.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/optget.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -76,7 +76,14 @@
#define FONT_ITALIC 2
#define FONT_LITERAL 4
-#define sep(c) ((c)=='-'||(c)=='_')
+#define HELP_head 0x01
+#define HELP_index 0x02
+
+#define TAG_NONE 0
+#define TAG_DIV 1
+#define TAG_DL 2
+
+#define SEP(c) ((c)=='-'||(c)=='_')
typedef struct Attr_s
{
@@ -129,6 +136,12 @@ typedef struct Push_s
int ch; /* localize() translation */
} Push_t;
+typedef struct Tag_s
+{
+ unsigned char level; /* indent level */
+ unsigned char id; /* TAG_* id */
+} Tag_t;
+
typedef struct Indent_s
{
int stop; /* tab column position */
@@ -139,6 +152,11 @@ static Indent_t indent[] =
0,2, 4,10, 12,18, 20,26, 28,34, 36,42, 44,50, 0,0
};
+static const char* end[] =
+{
+ "", "</DIV>\n", "</DL>\n"
+};
+
static const char term_off[] = {CC_esc,'[','0','m',0};
static const char term_B_on[] = {CC_esc,'[','1','m',0};
static const char term_I_on[] = {CC_esc,'[','1',';','4','m',0};
@@ -154,12 +172,16 @@ static const Font_t fonts[] =
static char native[] = "";
+static unsigned char map[UCHAR_MAX];
+
+static Optstate_t state;
+
#if !_PACKAGE_astsa
#define ID ast.id
#define C(s) ERROR_catalog(s)
-#define D(s) (opt_info.state->msgdict && dtmatch(opt_info.state->msgdict, (s)))
+#define D(s) (state.msgdict && dtmatch(state.msgdict, (s)))
#define T(i,c,m) (X(c)?translate(i,c,C(m)):(m))
#define X(c) (ERROR_translating()&&(c)!=native)
#define Z(x) C(x),sizeof(x)-1
@@ -183,7 +205,7 @@ translate(const char* cmd, const char* cat, const char* msg)
static char ID[] = "ast";
#define C(s) s
-#define D(s) (opt_info.state->msgdict && dtmatch(opt_info.state->msgdict, (s)))
+#define D(s) (state.msgdict && dtmatch(state.msgdict, (s)))
#define T(i,c,m) m
#define X(c) 0
#define Z(x) C(x),sizeof(x)-1
@@ -251,6 +273,11 @@ the \aoption\a output in the \aitem\a style. Otherwise print \
if not."),
':', C("\?\?\?\?\?\?ESC"),
C("Emit escape codes even if output is not a terminal."),
+ ':', C("\?\?\?\?\?\?MAN[=\asection\a]]"),
+ C("List the \bman\b(1) section title for \asection\a [the \
+current command]]."),
+ ':', C("\?\?\?\?\?\?SECTION"),
+ C("List the \bman\b(1) section number for the current command."),
':', C("\?\?\?\?\?\?TEST"),
C("Massage the output for regression testing."),
};
@@ -307,6 +334,7 @@ static Msg_t C_LC_MESSAGES_libast[] =
{ C("OPERANDS") },
{ C("OPTIONS") },
{ C("OUTPUT FILES") },
+ { C("PLUGIN") },
{ C("SEE ALSO") },
{ C("STDERR") },
{ C("STDIN") },
@@ -320,10 +348,6 @@ static Msg_t C_LC_MESSAGES_libast[] =
{ C("version") },
};
-static unsigned char map[UCHAR_MAX];
-
-static Optstate_t state;
-
/*
* 2007-03-19 move opt_info from _opt_info_ to (*_opt_data_)
* to allow future Opt_t growth
@@ -346,7 +370,13 @@ __EXTERN__(Opt_t*, _opt_infop_);
Opt_t* _opt_infop_ = &_opt_info_;
-#if _BLD_DEBUG
+Optstate_t*
+optstate(Opt_t* p)
+{
+ return &state;
+}
+
+#if DEBUG || _BLD_DEBUG
/*
* debug usage string segment format
@@ -405,6 +435,86 @@ show(register char* s)
#endif
+typedef struct Section_s
+{
+ const char section[4];
+ const char* name;
+} Section_t;
+
+static const Section_t sections[] =
+{
+ "1M", "MAKE ASSERTION OPERATORS AND RULES",
+ "1", "USER COMMANDS",
+ "2", "SYSTEM CALLS",
+ "3F", "FORTRAN LIBRARY ROUTINES",
+ "3K", "KERNEL VM LIBRARY FUNCTIONS",
+ "3L", "LIGHTWEIGHT PROCESSES LIBRARY",
+ "3M", "MATHEMATICAL LIBRARY",
+ "3N", "NETWORK FUNCTIONS",
+ "3R", "RPC SERVICES LIBRARY",
+ "3S", "STANDARD I/O FUNCTIONS",
+ "3V", "SYSTEM V LIBRARY",
+ "3", "C LIBRARY FUNCTIONS",
+ "4F", "PROTOCOL FAMILIES",
+ "4P", "PROTOCOLS",
+ "4", "DEVICES AND NETWORK INTERFACES",
+ "5P", "PLUGINS",
+ "5", "FILE FORMATS",
+ "6", "GAMES AND DEMOS",
+ "7", "PUBLIC FILES AND TABLES",
+ "8", "ADMINISTRATIVE COMMANDS",
+ "L", "LOCAL COMMANDS",
+};
+
+/*
+ * return section name given abbreviation
+ */
+
+static char*
+secname(char* section)
+{
+ int i;
+ char* b;
+ char* t;
+ const char* s;
+
+ b = t = fmtbuf(64);
+ if (section[1])
+ {
+ switch (section[2] ? section[2] : section[1])
+ {
+ case 'C':
+ s = "COMPATIBILITY ";
+ break;
+ case 'U':
+ s = "UWIN ";
+ break;
+ case 'X':
+ s = "MISCELLANEOUS ";
+ break;
+ default:
+ s = 0;
+ break;
+ }
+ if (s)
+ t = strcopy(t, s);
+ }
+ s = 0;
+ for (i = 0; i < elementsof(sections); i++)
+ if (section[0] == sections[i].section[0] && (section[1] == sections[i].section[1] || !sections[i].section[1]))
+ {
+ s = sections[i].name;
+ break;
+ }
+ if (!s)
+ {
+ t = strcopy(t, "SECTION ");
+ s = section;
+ }
+ strcopy(t, s);
+ return b;
+}
+
/*
* pop the push stack
*/
@@ -543,9 +653,39 @@ skip(register char* s, register int t1, register int t2, register int t3, regist
}
/*
+ * *s points to '(' on input
+ * return is one past matching ')'
+ */
+
+static char*
+nest(register char* s)
+{
+ int n;
+
+ n = 0;
+ for (;;)
+ {
+ switch (*s++)
+ {
+ case '(':
+ n++;
+ continue;
+ case ')':
+ if (!--n)
+ break;
+ continue;
+ default:
+ continue;
+ }
+ break;
+ }
+ return s;
+}
+
+/*
* match s with t
* t translated if possible
- * imbedded { - _ ' } ignored
+ * embedded { - _ ' } ignored
* * separates required prefix from optional suffix
* otherwise prefix match
*/
@@ -606,9 +746,9 @@ match(char* s, char* t, int version, const char* id, const char* catalog)
while (*w)
w++;
}
- else if (sep(*x))
+ else if (SEP(*x))
xw = ++x;
- else if (sep(*w) && w != s)
+ else if (SEP(*w) && w != s)
ww = ++w;
else if (*x == *w)
{
@@ -621,11 +761,11 @@ match(char* s, char* t, int version, const char* id, const char* catalog)
{
if (x != xw)
{
- while (*x && !sep(*x) && !isupper(*x))
+ while (*x && !SEP(*x) && !isupper(*x))
x++;
if (!*x)
break;
- if (sep(*x))
+ if (SEP(*x))
x++;
xw = x;
}
@@ -681,36 +821,113 @@ search(const void* tab, size_t num, size_t siz, char* s)
}
/*
- * save s and return the saved pointer
+ * save ap+bp+cp and return the saved pointer
*/
static char*
-save(const char* s)
+save(const char* ap, size_t az, const char* bp, size_t bz, const char* cp, size_t cz)
{
+ char* b;
+ char* e;
+ const char* ep;
Save_t* p;
Dtdisc_t* d;
+ char buf[1024];
static Dt_t* dict;
if (!dict)
{
if (!(d = newof(0, Dtdisc_t, 1, 0)))
- return (char*)s;
+ return (char*)ap;
d->key = offsetof(Save_t, text);
- if (!(dict = dtopen(d, Dthash)))
- return (char*)s;
+ if (!(dict = dtopen(d, Dtset)))
+ return (char*)ap;
}
- if (!(p = (Save_t*)dtmatch(dict, s)))
+ b = buf;
+ e = b + sizeof(buf) - 1;
+ for (ep = ap + az; b < e && ap < ep; *b++ = *ap++);
+ if (bp)
{
- if (!(p = newof(0, Save_t, 1, strlen(s))))
- return (char*)s;
- strcpy(p->text, s);
+ for (ep = bp + bz; b < e && bp < ep; *b++ = *bp++);
+ if (cp)
+ for (ep = cp + cz; b < e && cp < ep; *b++ = *cp++);
+ }
+ *b = 0;
+ if (!(p = (Save_t*)dtmatch(dict, buf)))
+ {
+ if (!(p = newof(0, Save_t, 1, b - buf)))
+ return (char*)ap;
+ strcpy(p->text, buf);
dtinsert(dict, p);
}
return p->text;
}
/*
+ * expand \f...\f info
+ * *p set to next char after second \f
+ * expanded value returned
+ */
+
+static char*
+expand(register char* s, register char* e, char** p, Sfio_t* ip, char* id)
+{
+ register int c;
+ register char* b = s;
+ int n;
+
+ n = sfstrtell(ip);
+ c = 1;
+ while ((!e || s < e) && (c = *s++) && c != '\f');
+ sfwrite(ip, b, s - b - 1);
+ sfputc(ip, 0);
+ b = sfstrbase(ip) + n;
+ n = sfstrtell(ip);
+ if (!c)
+ s--;
+ if (*b == '?')
+ {
+ if (!*++b || streq(b, "NAME"))
+ {
+ if (!(b = id))
+ b = "command";
+ sfstrseek(ip, 0, SEEK_SET);
+ sfputr(ip, b, -1);
+ n = 0;
+ }
+ else
+ n = 1;
+ }
+ else if (!opt_info.disc || !opt_info.disc->infof || (*opt_info.disc->infof)(&opt_info, ip, b, opt_info.disc) < 0)
+ n = 0;
+ *p = s;
+ if (s = sfstruse(ip))
+ s += n;
+ else
+ s = "error";
+ return s;
+}
+
+/*
+ * initialize the translation dictionary and flag maps
+ */
+
+static void
+initdict(void)
+{
+ register int n;
+
+ state.vp = sfstropen();
+ state.msgdisc.key = offsetof(Msg_t, text);
+ state.msgdisc.size = -1;
+ state.msgdisc.link = offsetof(Msg_t, link);
+ if (state.msgdict = dtopen(&state.msgdisc, Dtset))
+ for (n = 0; n < elementsof(C_LC_MESSAGES_libast); n++)
+ dtinsert(state.msgdict, C_LC_MESSAGES_libast + n);
+}
+
+/*
* initialize the attributes for pass p from opt string s
*/
@@ -722,32 +939,29 @@ init(register char* s, Optpass_t* p)
register int c;
register int a;
register int n;
+ char* e;
+ int l;
- if (!opt_info.state->msgdict)
+ if (!state.localized)
{
+ state.localized = 1;
#if !_PACKAGE_astsa
if (!ast.locale.serial)
setlocale(LC_ALL, "");
#endif
- opt_info.state->vp = sfstropen();
- opt_info.state->xp = sfstropen();
- opt_info.state->msgdisc.key = offsetof(Msg_t, text);
- opt_info.state->msgdisc.size = -1;
- opt_info.state->msgdisc.link = offsetof(Msg_t, link);
- if (opt_info.state->msgdict = dtopen(&opt_info.state->msgdisc, Dthash))
- for (n = 0; n < elementsof(C_LC_MESSAGES_libast); n++)
- dtinsert(opt_info.state->msgdict, C_LC_MESSAGES_libast + n);
+ state.xp = sfstropen();
if (!map[OPT_FLAGS[0]])
for (n = 0, t = OPT_FLAGS; *t; t++)
map[*t] = ++n;
}
#if _BLD_DEBUG
- error(-1, "optget debug");
+ error(-2, "optget debug");
#endif
p->oopts = s;
p->version = 0;
p->prefix = 2;
- p->section = 1;
+ p->section[0] = '1';
+ p->section[1] = 0;
p->flags = 0;
p->id = error_info.id;
p->catalog = 0;
@@ -772,10 +986,17 @@ init(register char* s, Optpass_t* p)
else
while (isdigit(*s))
p->version = p->version * 10 + (*s++ - '0');
- while (*s && *s != '?' && *s != ']')
+ while (*s && *s != ']')
{
- c = *s++;
- if (!isdigit(*s))
+ if ((c = *s++) == '?')
+ {
+ p->release = s;
+ while (*s && *s != ']')
+ if (isspace(*s++))
+ p->release = s;
+ break;
+ }
+ else if (!isdigit(*s))
n = 1;
else
{
@@ -788,6 +1009,9 @@ init(register char* s, Optpass_t* p)
case '+':
p->flags |= OPT_plus;
break;
+ case 'a':
+ p->flags |= OPT_append;
+ break;
case 'c':
p->flags |= OPT_cache;
break;
@@ -797,6 +1021,9 @@ init(register char* s, Optpass_t* p)
case 'l':
p->flags |= OPT_long;
break;
+ case 'm':
+ p->flags |= OPT_module;
+ break;
case 'n':
p->flags |= OPT_numeric;
break;
@@ -807,12 +1034,18 @@ init(register char* s, Optpass_t* p)
p->prefix = n;
break;
case 's':
- p->section = n;
- if (n > 1 && n < 6)
+ if (n > 1 && n < 5)
{
p->flags |= OPT_functions;
p->prefix = 0;
}
+ p->section[0] = '0' + (n % 10);
+ n = 1;
+ if (isupper(*s))
+ p->section[n++] = *s++;
+ if (isupper(*s))
+ p->section[n++] = *s++;
+ p->section[n] = 0;
break;
}
}
@@ -827,23 +1060,32 @@ init(register char* s, Optpass_t* p)
{
if (*s++ != '-')
{
- if (strneq(s - 1, "+NAME?", 6))
+ l = 0;
+ if (strneq(s - 1, "+NAME?", 6) && (s += 5) || strneq(s - 1, "+LIBRARY?", 9) && (s += 8) && (l = 1) || strneq(s - 1, "+PLUGIN?", 8) && (s += 7) && (l = 1))
{
- for (s += 5; *s == '\a' || *s == '\b' || *s == '\v' || *s == ' '; s++);
- if (*s != '\f')
+ for (; *s == '\a' || *s == '\b' || *s == '\v' || *s == ' '; s++);
+ if (*s == '\f')
+ {
+ if (*(s + 1) == '?' && *(s + 2) == '\f')
+ break;
+ s = expand(s + 1, NiL, &e, state.xp, p->id);
+ }
+ for (t = s; *t && *t != ' ' && *t != ']'; t++);
+ if (t > s)
{
- for (t = s; *t && *t != ' ' && *t != ']'; t++);
+ u = t;
+ if (*(t - 1) == '\a' || *(t - 1) == '\b' || *(t - 1) == '\v')
+ t--;
if (t > s)
{
- u = t;
- if (*(t - 1) == '\a' || *(t - 1) == '\b' || *(t - 1) == '\v')
- t--;
- if (t > s)
+ while (*u == ' ' || *u == '\\')
+ u++;
+ if (*u == '-' || *u == ']')
{
- while (*u == ' ' || *u == '\\')
- u++;
- if (*u == '-' || *u == ']')
- p->id = save(sfprints("%-.*s", t - s, s));
+ if (!l)
+ p->id = save(s, t - s, 0, 0, 0, 0);
+ else if ((a = strlen(p->id)) <= (n = t - s) || strncmp(p->id + a - n, s, n) || *(p->id + a - n - 1) != ':')
+ p->id = save(p->id, strlen(p->id), "::", 2, s, t - s);
}
}
}
@@ -863,9 +1105,9 @@ init(register char* s, Optpass_t* p)
p->id = "command";
}
else if (p->id == error_info.id)
- p->id = save(p->id);
+ p->id = save(p->id, strlen(p->id), 0, 0, 0, 0);
if (s = p->catalog)
- p->catalog = ((t = strchr(s, ']')) && (!p->id || (t - s) != strlen(p->id) || !strneq(s, p->id, t - s))) ? save(sfprints("%-.*s", t - s, s)) : (char*)0;
+ p->catalog = ((t = strchr(s, ']')) && (!p->id || (t - s) != strlen(p->id) || !strneq(s, p->id, t - s))) ? save(s, t - s, 0, 0, 0, 0) : (char*)0;
if (!p->catalog)
{
if (opt_info.disc && opt_info.disc->catalog && (!p->id || !streq(opt_info.disc->catalog, p->id)))
@@ -893,7 +1135,7 @@ init(register char* s, Optpass_t* p)
a++;
else if (*t == ']')
a--;
- if (!p->version && (t = strchr(s, '(')) && strchr(t, ')') && (opt_info.state->cp || (opt_info.state->cp = sfstropen())))
+ if (!p->version && (t = strchr(s, '(')) && strchr(t, ')') && (state.cp || (state.cp = sfstropen())))
{
/*
* solaris long option compatibility
@@ -901,40 +1143,40 @@ init(register char* s, Optpass_t* p)
p->version = 1;
for (t = p->oopts; t < s; t++)
- sfputc(opt_info.state->cp, *t);
+ sfputc(state.cp, *t);
n = t - p->oopts;
- sfputc(opt_info.state->cp, '[');
- sfputc(opt_info.state->cp, '-');
- sfputc(opt_info.state->cp, ']');
+ sfputc(state.cp, '[');
+ sfputc(state.cp, '-');
+ sfputc(state.cp, ']');
c = *s++;
while (c)
{
- sfputc(opt_info.state->cp, '[');
- sfputc(opt_info.state->cp, c);
+ sfputc(state.cp, '[');
+ sfputc(state.cp, c);
if (a = (c = *s++) == ':')
c = *s++;
if (c == '(')
{
- sfputc(opt_info.state->cp, ':');
+ sfputc(state.cp, ':');
for (;;)
{
while ((c = *s++) && c != ')')
- sfputc(opt_info.state->cp, c);
+ sfputc(state.cp, c);
if (!c || (c = *s++) != '(')
break;
- sfputc(opt_info.state->cp, '|');
+ sfputc(state.cp, '|');
}
}
- sfputc(opt_info.state->cp, ']');
+ sfputc(state.cp, ']');
if (a)
- sfputr(opt_info.state->cp, ":[string]", -1);
+ sfputr(state.cp, ":[string]", -1);
}
- if (!(p->oopts = s = sfstruse(opt_info.state->cp)))
+ if (!(p->oopts = s = sfstruse(state.cp)))
return -1;
s += n;
}
p->opts = s;
- message((-1, "version=%d prefix=%d section=%d flags=%04x id=%s catalog=%s", p->version, p->prefix, p->section, p->flags, p->id, p->catalog));
+ message((-2, "version=%d prefix=%d section=%s flags=%04x id=%s catalog=%s oopts=%p", p->version, p->prefix, p->section, p->flags, p->id, p->catalog, p->oopts));
return 0;
}
@@ -957,7 +1199,7 @@ font(int f, int style, int set)
case STYLE_api:
break;
default:
- if (opt_info.state->emphasis > 0)
+ if (state.emphasis > 0)
return fonts[f].term[set];
break;
}
@@ -965,51 +1207,6 @@ font(int f, int style, int set)
}
/*
- * expand \f...\f info
- * *p set to next char after second \f
- * expanded value returned
- */
-
-static char*
-expand(register char* s, register char* e, char** p, Sfio_t* ip, char* id)
-{
- register int c;
- register char* b = s;
- int n;
-
- n = sfstrtell(ip);
- c = 1;
- while ((!e || s < e) && (c = *s++) && c != '\f');
- sfwrite(ip, b, s - b - 1);
- sfputc(ip, 0);
- b = sfstrbase(ip) + n;
- n = sfstrtell(ip);
- if (!c)
- s--;
- if (*b == '?')
- {
- if (!*++b || streq(b, "NAME"))
- {
- if (!(b = id))
- b = "command";
- sfstrseek(ip, 0, SEEK_SET);
- sfputr(ip, b, -1);
- n = 0;
- }
- else
- n = 1;
- }
- else if (!opt_info.disc || !opt_info.disc->infof || (*opt_info.disc->infof)(&opt_info, ip, b, opt_info.disc) < 0)
- n = 0;
- *p = s;
- if (s = sfstruse(ip))
- s += n;
- else
- s = "error";
- return s;
-}
-
-/*
* push \f...\f info
*/
@@ -1100,6 +1297,7 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
int a;
int i;
char* p;
+ char* q;
char* w;
char* y;
int va;
@@ -1109,7 +1307,7 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
int n = 1;
Push_t* psp = 0;
- if ((ostyle = style) > (STYLE_nroff - (sep <= 0)) && f != FONT_LITERAL)
+ if ((ostyle = style) > (STYLE_nroff - (sep <= 0)) && f != FONT_LITERAL && f >= 0)
style = 0;
if (z < 0)
e = s + strlen(s);
@@ -1160,7 +1358,7 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
if (X(catalog) && (!level || *s == '\a' || *(s - 1) != '+') &&
(tsp = localize(psp, s, e, (sep || level) ? '?' : 0, sep || level, ip, version, id, catalog)))
{
- psp= tsp;
+ psp = tsp;
s = psp->nb;
e = psp->ne;
r = psp->ch > 0;
@@ -1168,22 +1366,25 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
switch (*s)
{
case '\a':
- if (f == FONT_ITALIC)
+ if (f == FONT_ITALIC || f < 0)
s++;
- f = 0;
+ if (f > 0)
+ f = 0;
break;
case '\b':
- if (f == FONT_BOLD)
+ if (f == FONT_BOLD || f < 0)
s++;
- f = 0;
+ if (f > 0)
+ f = 0;
break;
case '\v':
- if (f == FONT_LITERAL)
+ if (f == FONT_LITERAL || f < 0)
s++;
- f = 0;
+ if (f > 0)
+ f = 0;
break;
default:
- if (f)
+ if (f > 0)
sfputr(sp, font(f, style, 1), -1);
break;
}
@@ -1205,7 +1406,7 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
if (n)
{
n = 0;
- if (f)
+ if (f > 0)
{
sfputr(sp, font(f, style, 0), -1);
f = 0;
@@ -1222,7 +1423,7 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
if (va & OPT_optional)
sfputc(sp, '[');
sfputc(sp, '=');
- label(sp, 0, y, 0, -1, 0, style, FONT_ITALIC, ip, version, id, catalog);
+ label(sp, 0, y, 0, -1, 0, style, f >= 0 ? FONT_ITALIC : f, ip, version, id, catalog);
if (va & OPT_optional)
sfputc(sp, ']');
y = 0;
@@ -1256,34 +1457,47 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
case '\a':
a = FONT_ITALIC;
setfont:
- if (f & ~a)
+ if (f >= 0)
{
- sfputr(sp, font(f, style, 0), -1);
- f = 0;
- }
- if (!f && style == STYLE_html)
- {
- for (t = s; t < e && !isspace(*t) && !iscntrl(*t); t++);
- if (*t == c && *++t == '(')
+ if (f & ~a)
{
- w = t;
- while (++t < e && isdigit(*t));
- if (t < e && *t == ')' && t > w + 1)
+ sfputr(sp, font(f, style, 0), -1);
+ f = 0;
+ }
+ if (!f && style == STYLE_html)
+ {
+ for (t = s; t < e && !isspace(*t) && !iscntrl(*t); t++);
+ if (*t == c && *++t == '(')
{
- sfprintf(sp, "<NOBR><A href=\"../man%-.*s/%-.*s.html\">%s%-.*s%s</A>%-.*s</NOBR>"
- , t - w - 1, w + 1
- , w - s - 1, s
- , font(a, style, 1)
- , w - s - 1, s
- , font(a, style, 0)
- , t - w + 1, w
- );
- s = t + 1;
- continue;
+ w = t;
+ if (++t < e && isdigit(*t))
+ while (++t < e && isupper(*t));
+ if (t < e && *t == ')' && t > w + 1)
+ {
+ sfprintf(sp, "<NOBR><A href=\"../man%-.*s/"
+ , t - w - 1, w + 1
+ );
+ for (q = s; q < w - 1; q++)
+ if (*q == ':' && q < w - 2 && *(q + 1) == ':')
+ {
+ sfputc(sp, '-');
+ q++;
+ }
+ else
+ sfputc(sp, *q);
+ sfprintf(sp, ".html\">%s%-.*s%s</A>%-.*s</NOBR>"
+ , font(a, style, 1)
+ , w - s - 1, s
+ , font(a, style, 0)
+ , t - w + 1, w
+ );
+ s = t + 1;
+ continue;
+ }
}
}
+ sfputr(sp, font(a, style, !!(f ^= a)), -1);
}
- sfputr(sp, font(a, style, !!(f ^= a)), -1);
continue;
case '\b':
a = FONT_BOLD;
@@ -1352,6 +1566,13 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
continue;
}
break;
+ case '"':
+ if (style == STYLE_html)
+ {
+ sfputr(sp, "&quot;", -1);
+ continue;
+ }
+ break;
case '-':
if (ostyle == STYLE_nroff)
sfputc(sp, '\\');
@@ -1378,7 +1599,7 @@ label(register Sfio_t* sp, int sep, register char* s, int about, int z, int leve
sfputc(sp, c);
}
restore:
- if (f)
+ if (f > 0)
sfputr(sp, font(f, style, 0), -1);
if (about)
sfputc(sp, ')');
@@ -1469,7 +1690,7 @@ args(register Sfio_t* sp, register char* p, register int n, int flags, int style
*/
static int
-item(Sfio_t* sp, char* s, int about, int level, int style, Sfio_t* ip, int version, char* id, char* catalog)
+item(Sfio_t* sp, char* s, int about, int level, int style, Sfio_t* ip, int version, char* id, char* catalog, int* hflags)
{
register char* t;
int n;
@@ -1511,21 +1732,36 @@ item(Sfio_t* sp, char* s, int about, int level, int style, Sfio_t* ip, int versi
if (style == STYLE_html)
{
if (!level)
+ {
+ if (*hflags & HELP_head)
+ sfputr(sp, "</DIV>", '\n');
+ else
+ *hflags |= HELP_head;
sfputr(sp, "<H4>", -1);
+ }
sfputr(sp, "<A name=\"", -1);
if (s[-1] == '-' && s[0] == 'l' && s[1] == 'i' && s[2] == 'c' && s[3] == 'e' && s[4] == 'n' && s[5] == 's' && s[6] == 'e' && s[7] == '?')
for (t = s + 8; *t && *t != ']'; t++)
if (t[0] == 'p' && (!strncmp(t, "proprietary", 11) || !strncmp(t, "private", 7)) || t[0] == 'n' && !strncmp(t, "noncommercial", 13))
{
- opt_info.state->flags |= OPT_proprietary;
+ state.flags |= OPT_proprietary;
break;
}
- label(sp, 0, s, about, -1, level, 0, 0, ip, version, id, catalog);
+ label(sp, 0, s, about, -1, level, style, -1, ip, version, id, catalog);
sfputr(sp, "\">", -1);
label(sp, 0, s, about, -1, level, style, level ? FONT_BOLD : 0, ip, version, id, catalog);
sfputr(sp, "</A>", -1);
if (!level)
- sfputr(sp, "</H4>", -1);
+ {
+ if (!strncmp(s, C("SYNOPSIS"), strlen(C("SYNOPSIS"))))
+ sfputr(sp, "</H4>\n<DIV class=SY>", -1);
+ else
+ {
+ sfputr(sp, "</H4>\n<DIV class=SH>", -1);
+ if (!strncmp(s, C("NAME"), strlen(C("NAME"))) || !strncmp(s, C("PLUGIN"), strlen(C("PLUGIN"))))
+ *hflags |= HELP_index;
+ }
+ }
}
else
{
@@ -1561,15 +1797,15 @@ item(Sfio_t* sp, char* s, int about, int level, int style, Sfio_t* ip, int versi
#if _BLD_DEBUG
-static char* textout(Sfio_t*, char*, int, int, int, Sfio_t*, int, char*, char*);
+static char* textout(Sfio_t*, char*, char*, int, int, int, int, Sfio_t*, int, char*, char*, int*);
static char*
-trace_textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip, int version, char* id, char* catalog, int line)
+trace_textout(Sfio_t* sp, register char* p, char* conform, int conformlen, int style, int level, int bump, Sfio_t* ip, int version, char* id, char* catalog, int* hflags, int line)
{
static int depth = 0;
message((-21, "opthelp: txt#%d +++ %2d \"%s\" style=%d level=%d bump=%d", line, ++depth, show(p), style, level, bump));
- p = textout(sp, p, style, level, bump, ip, version, id, catalog);
+ p = textout(sp, p, conform, conformlen, style, level, bump, ip, version, id, catalog, hflags);
message((-21, "opthelp: txt#%d --- %2d \"%s\"", line, depth--, show(p)));
return p;
}
@@ -1577,15 +1813,16 @@ trace_textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio
#endif
static char*
-textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip, int version, char* id, char* catalog)
+textout(Sfio_t* sp, register char* s, char* conform, int conformlen, int style, int level, int bump, Sfio_t* ip, int version, char* id, char* catalog, int* hflags)
{
#if _BLD_DEBUG
-#define textout(sp,p,style,level,bump,ip,version,id,catalog) trace_textout(sp,p,style,level,bump,ip,version,id,catalog,__LINE__)
+#define textout(sp,s,conform,conformlen,style,level,bump,ip,version,id,catalog,hflags) trace_textout(sp,s,conform,conformlen,style,level,bump,ip,version,id,catalog,hflags,__LINE__)
#endif
register char* t;
register int c;
register int n;
- char* e;
+ char* w;
+ char* q;
int a;
int f;
int par;
@@ -1598,40 +1835,40 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
again:
about = 0;
- if ((c = *p) == GO)
+ if ((c = *s) == GO)
{
for (;;)
{
- while (*(p = next(p + 1, version)) == '\n');
- if (*p == GO)
+ while (*(s = next(s + 1, version)) == '\n');
+ if (*s == GO)
{
if (level > 1)
level++;
level++;
}
- else if (*p != OG)
+ else if (*s != OG)
{
- if (level <= 1 || *p != '[' || *(p + 1) != '-' || style == STYLE_man && *(p + 2) == '?' || isalpha(*(p + 2)))
+ if (level <= 1 || *s != '[' || *(s + 1) != '-' || style == STYLE_man && *(s + 2) == '?' || isalpha(*(s + 2)))
break;
- p = skip(p, 0, 0, 0, 1, level, 0, version);
+ s = skip(s, 0, 0, 0, 1, level, 0, version);
}
else if ((level -= 2) <= lev)
- return p + 1;
+ return s + 1;
}
- if (*p == '\f')
+ if (*s == '\f')
{
- psp = info(psp, p + 1, NiL, ip, id);
+ psp = info(psp, s + 1, NiL, ip, id);
if (psp->nb)
- p = psp->nb;
+ s = psp->nb;
else
{
- p = psp->ob;
+ s = psp->ob;
psp = psp->next;
}
}
- if (*p != '[')
- return p;
- c = *++p;
+ if (*s != '[')
+ return s;
+ c = *++s;
if (level > 1)
level++;
level++;
@@ -1641,44 +1878,44 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
if (style == STYLE_man)
{
about = 1;
- if (*(p + 1) == '-')
- p++;
+ if (*(s + 1) == '-')
+ s++;
}
else
for (;;)
{
- p = skip(p, 0, 0, 0, 1, level, 0, version);
- while (*(p = next(p + 1, version)) == '\n');
- if (*p == '[')
+ s = skip(s, 0, 0, 0, 1, level, 0, version);
+ while (*(s = next(s + 1, version)) == '\n');
+ if (*s == '[')
{
- if ((c = *++p) != '-')
+ if ((c = *++s) != '-')
break;
}
- else if (*p == GO)
+ else if (*s == GO)
goto again;
- else if (*p == OG)
- return p + 1;
+ else if (*s == OG)
+ return s + 1;
}
}
if (c == '+' || c == '-' && (bump = 3) || c != ' ' && level > 1)
{
- p = skip(t = p + 1, '?', 0, 0, 1, level, 0, version);
- if (c == '-' && (*t == '?' || isdigit(*t) || *p == '?' && *(p + 1) == '\n'))
+ s = skip(t = s + 1, '?', 0, 0, 1, level, 0, version);
+ if (c == '-' && (*t == '?' || isdigit(*t) || *s == '?' && *(s + 1) == '\n'))
{
- if ((c = *p) != '?')
- return skip(p, 0, 0, 0, 1, level, 1, version);
- e = C("version");
- par = item(sp, e, about, level, style, ip, version, id, ID);
+ if ((c = *s) != '?')
+ return skip(s, 0, 0, 0, 1, level, 1, version);
+ w = C("version");
+ par = item(sp, w, about, level, style, ip, version, id, ID, hflags);
for (;;)
{
- while (isspace(*(p + 1)))
- p++;
- e = p;
- if (e[1] == '@' && e[2] == '(' && e[3] == '#' && e[4] == ')')
- p = e + 4;
- else if (e[1] == '$' && e[2] == 'I' && e[3] == 'd' && e[4] == ':' && e[5] == ' ')
+ while (isspace(*(s + 1)))
+ s++;
+ w = s;
+ if (w[1] == '@' && w[2] == '(' && w[3] == '#' && w[4] == ')')
+ s = w + 4;
+ else if (w[1] == '$' && w[2] == 'I' && w[3] == 'd' && w[4] == ':' && w[5] == ' ')
{
- p = e + 5;
+ s = w + 5;
ident = 1;
}
else
@@ -1701,12 +1938,12 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
else
{
sfprintf(ip, "%s", t);
- if (e = sfstruse(ip))
- *((t = e) + 1) = '|';
+ if (w = sfstruse(ip))
+ *((t = w) + 1) = '|';
}
}
- par = item(sp, t, about, level, style, ip, version, id, catalog);
- c = *p;
+ par = item(sp, t, about, level, style, ip, version, id, catalog, hflags);
+ c = *s;
}
if (!about && level)
par = 0;
@@ -1721,53 +1958,63 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
par = 0;
}
if (c == ':')
- c = *(p = skip(p, '?', 0, 0, 1, 0, 0, version));
- if ((c == ']' || c == '?' && *(p + 1) == ']' && *(p + 2) != ']' && p++) && (c = *(p = next(p + 1, version))) == GO)
+ c = *(s = skip(s, '?', 0, 0, 1, 0, 0, version));
+ if ((c == ']' || c == '?' && *(s + 1) == ']' && *(s + 2) != ']' && s++) && (c = *(s = next(s + 1, version))) == GO)
{
- p = textout(sp, p, style, level + bump + par + 1, 0, ip, version, id, catalog);
- if (level > lev && *p && *(p = next(p, version)) == '[')
+ s = textout(sp, s, conform, conformlen, style, level + bump + par + 1, 0, ip, version, id, catalog, hflags);
+ if (level > lev && *s && *(s = next(s, version)) == '[')
{
- p++;
- message((-21, "textout#%d p=%s", __LINE__, show(p)));
+ s++;
+ message((-21, "textout#%d s=%s", __LINE__, show(s)));
goto again;
}
}
else if (c == '?' || c == ' ')
{
- p++;
+ s++;
if (c == ' ')
sfputc(sp, c);
else
{
- if (X(catalog) && (tsp = localize(psp, p, NiL, 0, 1, ip, version, id, catalog)))
+ if (X(catalog) && (tsp = localize(psp, s, NiL, 0, 1, ip, version, id, catalog)))
{
psp = tsp;
- p = psp->nb;
+ s = psp->nb;
}
if (style < STYLE_nroff)
for (n = 0; n < bump + 1; n++)
sfputc(sp, '\t');
}
+ if (conform)
+ {
+ sfprintf(sp, "[%-.*s %s] ", conformlen, conform, T(NiL, ID, "conformance"));
+ conform = 0;
+ }
+ if (*hflags & HELP_index)
+ {
+ *hflags &= ~HELP_index;
+ sfputr(sp, "<!--MAN-INDEX-->", -1);
+ }
f = 0;
for (;;)
{
- switch (c = *p++)
+ switch (c = *s++)
{
case 0:
if (!(tsp = psp))
{
if (f)
sfputr(sp, font(f, style, 0), -1);
- return p - 1;
+ return s - 1;
}
- p = psp->ob;
+ s = psp->ob;
psp = psp->next;
free(tsp);
continue;
case ']':
if (psp && psp->ch)
break;
- if (*p != ']')
+ if (*s != ']')
{
if (f)
{
@@ -1776,7 +2023,7 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
}
for (;;)
{
- if ((*p == '#' || *p == ':') && level > lev)
+ if ((*s == '#' || *s == ':') && level > lev)
{
char* o;
char* v;
@@ -1788,18 +2035,18 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
a = 0;
o = 0;
v = 0;
- if (*++p == '?' || *p == *(p - 1))
+ if (*++s == '?' || *s == *(s - 1))
{
- p++;
+ s++;
a |= OPT_optional;
}
- if (*(p = next(p, version)) == '[')
+ if (*(s = next(s, version)) == '[')
{
- p = skip(p + 1, ':', '?', 0, 1, 0, 0, version);
- while (*p == ':')
+ s = skip(s + 1, ':', '?', 0, 1, 0, 0, version);
+ while (*s == ':')
{
- p = skip(t = p + 1, ':', '?', 0, 1, 0, 0, version);
- m = p - t;
+ s = skip(t = s + 1, ':', '?', 0, 1, 0, 0, version);
+ m = s - t;
if (*t == '!')
{
o = t + 1;
@@ -1852,58 +2099,58 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
sfputr(sp, font(FONT_BOLD, style, 0), -1);
sfputc(sp, '.');
}
- p = skip(p, 0, 0, 0, 1, 0, 1, version);
+ s = skip(s, 0, 0, 0, 1, 0, 1, version);
}
- if (*(p = next(p, version)) == GO)
+ if (*(s = next(s, version)) == GO)
{
- p = textout(sp, p, style, level + bump + !level, 0, ip, version, id, catalog);
- if (*p && *(p = next(p, version)) == '[' && !isalnum(*(p + 1)))
+ s = textout(sp, s, 0, 0, style, level + bump + !level, 0, ip, version, id, catalog, hflags);
+ if (*s && *(s = next(s, version)) == '[' && !isalnum(*(s + 1)))
{
- p++;
- message((-21, "textout#%d p=%s", __LINE__, show(p)));
+ s++;
+ message((-21, "textout#%d s=%s", __LINE__, show(s)));
goto again;
}
}
- else if (*p == '[' && level > lev)
+ else if (*s == '[' && level > lev)
{
- p++;
+ s++;
goto again;
}
- else if (*p == '\f')
+ else if (*s == '\f')
{
- p++;
+ s++;
if (style != STYLE_keys)
{
- psp = info(psp, p, NiL, ip, id);
+ psp = info(psp, s, NiL, ip, id);
if (psp->nb)
- p = psp->nb;
+ s = psp->nb;
else
{
- p = psp->ob;
+ s = psp->ob;
psp = psp->next;
}
}
}
- else if (!*p)
+ else if (!*s)
{
if (!(tsp = psp))
break;
- p = psp->ob;
+ s = psp->ob;
psp = psp->next;
free(tsp);
}
- else if (*p != OG)
+ else if (*s != OG)
break;
else
{
- p++;
+ s++;
if ((level -= 2) <= lev)
break;
}
}
- return p;
+ return s;
}
- p++;
+ s++;
break;
case '\a':
a = FONT_ITALIC;
@@ -1915,22 +2162,32 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
}
if (!f && style == STYLE_html)
{
- for (t = p; *t && !isspace(*t) && !iscntrl(*t); t++);
+ for (t = s; *t && !isspace(*t) && !iscntrl(*t); t++);
if (*t == c && *++t == '(')
{
- e = t;
- while (isdigit(*++t));
- if (*t == ')' && t > e + 1)
+ w = t;
+ if (isdigit(*++t))
+ while (isupper(*++t));
+ if (*t == ')' && t > w + 1)
{
- sfprintf(sp, "<NOBR><A href=\"../man%-.*s/%-.*s.html\">%s%-.*s%s</A>%-.*s</NOBR>"
- , t - e - 1, e + 1
- , e - p - 1, p
+ sfprintf(sp, "<NOBR><A href=\"../man%-.*s/"
+ , t - w - 1, w + 1
+ );
+ for (q = s; q < w - 1; q++)
+ if (*q == ':' && q < w - 2 && *(q + 1) == ':')
+ {
+ sfputc(sp, '-');
+ q++;
+ }
+ else
+ sfputc(sp, *q);
+ sfprintf(sp, ".html\">%s%-.*s%s</A>%-.*s</NOBR>"
, font(a, style, 1)
- , e - p - 1, p
+ , w - s - 1, s
, font(a, style, 0)
- , t - e + 1, e
+ , t - w + 1, w
);
- p = t + 1;
+ s = t + 1;
continue;
}
}
@@ -1943,12 +2200,12 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
case '\f':
if (style != STYLE_keys)
{
- psp = info(psp, p, NiL, ip, id);
+ psp = info(psp, s, NiL, ip, id);
if (psp->nb)
- p = psp->nb;
+ s = psp->nb;
else
{
- p = psp->ob;
+ s = psp->ob;
psp = psp->next;
}
}
@@ -1957,23 +2214,23 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
a = FONT_LITERAL;
goto setfont;
case ' ':
- if (ident && *p == '$')
+ if (ident && *s == '$')
{
- while (*++p)
- if (*p == ']')
+ while (*++s)
+ if (*s == ']')
{
- if (*(p + 1) != ']')
+ if (*(s + 1) != ']')
break;
- p++;
+ s++;
}
continue;
}
case '\n':
case '\r':
case '\t':
- while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n')
- p++;
- if (*p == ']' && *(p + 1) != ']' && (!psp || !psp->ch))
+ while (*s == ' ' || *s == '\t' || *s == '\r' || *s == '\n')
+ s++;
+ if (*s == ']' && *(s + 1) != ']' && (!psp || !psp->ch))
continue;
c = ' ';
break;
@@ -1982,7 +2239,7 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
{
sfputr(sp, "&lt;", -1);
c = 0;
- for (t = p; *t; t++)
+ for (t = s; *t; t++)
if (!isalnum(*t) && *t != '_' && *t != '.' && *t != '-')
{
if (*t == '@')
@@ -1995,8 +2252,8 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
{
if (c)
{
- sfprintf(sp, "<A href=\"mailto:%-.*s\">%-.*s</A>&gt;", t - p, p, t - p, p);
- p = t + 1;
+ sfprintf(sp, "<A href=\"mailto:%-.*s\">%-.*s</A>&gt;", t - s, s, t - s, s);
+ s = t + 1;
}
break;
}
@@ -2044,10 +2301,10 @@ textout(Sfio_t* sp, register char* p, int style, int level, int bump, Sfio_t* ip
}
else if (c == '[' && level > lev)
{
- p++;
+ s++;
goto again;
}
- return p;
+ return s;
}
/*
@@ -2069,7 +2326,7 @@ list(Sfio_t* sp, register const List_t* lp)
/*
* return pointer to help message sans `Usage: command'
- * if oopts is 0 then opt_info.state->pass is used
+ * if oopts is 0 then state.pass is used
* what:
* 0 ?short by default, ?long if any long options used
* * otherwise see help_text[] (--???)
@@ -2100,6 +2357,8 @@ opthelp(const char* oopts, const char* what)
char* s;
char* d;
char* v;
+ char* cb;
+ char* dt;
char* ov;
char* pp;
char* rb;
@@ -2110,6 +2369,7 @@ opthelp(const char* oopts, const char* what)
int m;
int n;
int a;
+ int cl;
int sl;
int vl;
int ol;
@@ -2133,17 +2393,21 @@ opthelp(const char* oopts, const char* what)
Optpass_t* q;
Optpass_t* e;
Optpass_t one;
+ Optpass_t top;
Help_t* hp;
- short ptstk[elementsof(indent) + 2];
- short* pt;
+ Tag_t ptstk[elementsof(indent) + 2];
+ Tag_t* pt;
Sfio_t* vp;
Push_t* tsp;
char* opts = (char*)oopts;
+ char* section = "1";
int flags = 0;
+ int bflags = 0;
+ int dflags = 0;
+ int hflags = 0;
int matched = 0;
int paragraph = 0;
- int section = 1;
Push_t* psp = 0;
Sfio_t* sp_help = 0;
Sfio_t* sp_text = 0;
@@ -2153,10 +2417,10 @@ opthelp(const char* oopts, const char* what)
Sfio_t* sp_info = 0;
Sfio_t* sp_misc = 0;
- if (!(mp = opt_info.state->mp) && !(mp = opt_info.state->mp = sfstropen()))
+ if (!(mp = state.mp) && !(mp = state.mp = sfstropen()))
goto nospace;
if (!what)
- style = opt_info.state->style;
+ style = state.style;
else if (!*what)
style = STYLE_options;
else if (*what != '?')
@@ -2171,7 +2435,7 @@ opthelp(const char* oopts, const char* what)
}
else
{
- if ((style = opt_info.state->force) < STYLE_man)
+ if ((style = state.force) < STYLE_man)
style = STYLE_man;
if (!(sp_help = sfstropen()))
goto nospace;
@@ -2184,16 +2448,25 @@ opthelp(const char* oopts, const char* what)
if (!(opts = sfstruse(sp_help)))
goto nospace;
}
+
+ /*
+ * this is a workaround for static optjoin() data
+ * clobbered by plugins/builtins that may be called
+ * evaluating \f...\f -- it would be good to hide
+ * optjoin() interactions a bit more ...
+ */
+
+ top = state.pass[0];
again:
if (opts)
{
- for (i = 0; i < opt_info.state->npass; i++)
- if (opt_info.state->pass[i].oopts == opts)
+ for (i = 0; i < state.npass; i++)
+ if (state.pass[i].oopts == opts)
{
- o = &opt_info.state->pass[i];
+ o = &state.pass[i];
break;
}
- if (i >= opt_info.state->npass)
+ if (i >= state.npass)
{
o = &one;
if (init((char*)opts, o))
@@ -2201,18 +2474,22 @@ opthelp(const char* oopts, const char* what)
}
e = o + 1;
}
- else if (opt_info.state->npass > 0)
- {
- o = opt_info.state->pass;
- e = o + opt_info.state->npass;
- }
- else if (opt_info.state->npass < 0)
+ else
{
- o = &opt_info.state->cache->pass;
- e = o + 1;
+ if (state.npass > 0)
+ {
+ o = state.pass;
+ e = o + state.npass;
+ }
+ else if (state.npass < 0)
+ {
+ o = &state.cache->pass;
+ e = o + 1;
+ }
+ else
+ return T(NiL, ID, "[* call optget() before opthelp() *]");
+ oopts = (const char*)state.pass[0].oopts;
}
- else
- return T(NiL, ID, "[* call optget() before opthelp() *]");
if (style <= STYLE_usage)
{
if (!(sp_text = sfstropen()) || !(sp_info = sfstropen()))
@@ -2225,7 +2502,7 @@ opthelp(const char* oopts, const char* what)
case STYLE_api:
case STYLE_html:
case STYLE_nroff:
- opt_info.state->emphasis = 0;
+ state.emphasis = 0;
break;
case STYLE_usage:
case STYLE_keys:
@@ -2237,7 +2514,7 @@ opthelp(const char* oopts, const char* what)
sfputc(mp, '\f');
break;
default:
- if (!opt_info.state->emphasis)
+ if (!state.emphasis)
{
if (x = getenv("ERROR_OPTIONS"))
{
@@ -2245,12 +2522,12 @@ opthelp(const char* oopts, const char* what)
break;
if (strmatch(x, "*emphasi*"))
{
- opt_info.state->emphasis = 1;
+ state.emphasis = 1;
break;
}
}
if ((x = getenv("TERM")) && strmatch(x, "(ansi|vt100|xterm)*") && isatty(sffileno(sfstderr)))
- opt_info.state->emphasis = 1;
+ state.emphasis = 1;
}
break;
}
@@ -2260,8 +2537,6 @@ opthelp(const char* oopts, const char* what)
{
if (q->flags & OPT_ignore)
continue;
- if (section < q->section)
- section = q->section;
section = q->section;
flags |= q->flags;
p = q->opts;
@@ -2422,7 +2697,7 @@ opthelp(const char* oopts, const char* what)
}
else
{
- if (*(p + 1) == '\f' && (vp = opt_info.state->vp))
+ if (*(p + 1) == '\f' && (vp = state.vp))
p = expand(p + 2, NiL, &t, vp, id);
p = skip(p, ':', '?', 0, 1, 0, 0, version);
if (*p == ':')
@@ -2687,7 +2962,15 @@ opthelp(const char* oopts, const char* what)
vl = 0;
if (*p == '[')
{
- if ((c = *(p = next(p + 1, version))) == '-')
+ if ((c = *(p = next(p + 1, version))) == '(')
+ {
+ p = nest(cb = p);
+ cl = p - cb;
+ c = *p;
+ }
+ else
+ cb = 0;
+ if (c == '-')
{
if (style >= STYLE_man)
{
@@ -2696,13 +2979,13 @@ opthelp(const char* oopts, const char* what)
if (!sp_misc && !(sp_misc = sfstropen()))
goto nospace;
else
- p = textout(sp_misc, p, style, 1, 3, sp_info, version, id, catalog);
+ p = textout(sp_misc, p, cb, cl, style, 1, 3, sp_info, version, id, catalog, &hflags);
continue;
}
}
else if (style == STYLE_match && *what == '-')
{
- if (*(p + 1) == '?' || isdigit(*(p + 1)))
+ if (*(p + 1) == '?' || *(s = skip(p + 1, ':', '?', 0, 1, 0, 0, version)) == '?' && isspace(*(s + 1)))
s = C("version");
else
s = p + 1;
@@ -2717,7 +3000,7 @@ opthelp(const char* oopts, const char* what)
{
if (*(p + 1) == '-')
p++;
- p = textout(sp, p, style, 1, 3, sp_info, version, id, catalog);
+ p = textout(sp, p, cb, cl, style, 1, 3, sp_info, version, id, catalog, &hflags);
matched = -1;
continue;
}
@@ -2730,10 +3013,11 @@ opthelp(const char* oopts, const char* what)
{
if (style >= STYLE_man)
{
- p = textout(sp_body, p, style, 0, 0, sp_info, version, id, catalog);
+ p = textout(sp_body, p, cb, cl, style, 0, 0, sp_info, version, id, catalog, &bflags);
if (!sp_head)
{
sp_head = sp_body;
+ hflags = dflags = bflags;
if (!(sp_body = sfstropen()))
goto nospace;
}
@@ -2745,14 +3029,14 @@ opthelp(const char* oopts, const char* what)
{
if (p[1] == '?')
{
- p = textout(sp, p, style, 1, 3, sp_info, version, id, catalog);
+ p = textout(sp, p, cb, cl, style, 1, 3, sp_info, version, id, catalog, &hflags);
continue;
}
paragraph = 0;
}
if (match((char*)what + 1, p + 1, version, id, catalog))
{
- p = textout(sp, p, style, 1, 3, sp_info, version, id, catalog);
+ p = textout(sp, p, cb, cl, style, 1, 3, sp_info, version, id, catalog, &hflags);
matched = -1;
paragraph = 1;
continue;
@@ -2800,7 +3084,7 @@ opthelp(const char* oopts, const char* what)
}
else
{
- if (*p == '\f' && (vp = opt_info.state->vp))
+ if (*p == '\f' && (vp = state.vp))
p = expand(p + 1, NiL, &t, vp, id);
else
t = 0;
@@ -2974,7 +3258,7 @@ opthelp(const char* oopts, const char* what)
if (!head)
{
head = 1;
- item(sp_body, (flags & OPT_functions) ? C("FUNCTIONS") : C("OPTIONS"), 0, 0, style, sp_info, version, id, ID);
+ item(sp_body, (flags & OPT_functions) ? C("FUNCTIONS") : C("OPTIONS"), 0, 0, style, sp_info, version, id, ID, &bflags);
}
if (style >= STYLE_nroff)
{
@@ -3122,9 +3406,12 @@ opthelp(const char* oopts, const char* what)
if (style >= STYLE_match)
{
if (d)
- textout(sp_body, d, style, 0, 3, sp_info, version, id, catalog);
+ {
+ textout(sp_body, d, cb, cl, style, 0, 3, sp_info, version, id, catalog, &bflags);
+ cb = 0;
+ }
if (u)
- textout(sp_body, u, style, 0, 3, sp_info, version, id, catalog);
+ textout(sp_body, u, cb, cl, style, 0, 3, sp_info, version, id, catalog, &bflags);
if ((a & OPT_invert) && w && (d || u))
{
u = skip(w, ':', '?', 0, 1, 0, 0, version);
@@ -3134,11 +3421,11 @@ opthelp(const char* oopts, const char* what)
sfprintf(sp_info, " %s %s\bno%-.*s\b %s.", T(NiL, ID, "On by default; use"), "--"+2-prefix, u - w, w, T(NiL, ID, "to turn off"));
if (!(t = sfstruse(sp_info)))
goto nospace;
- textout(sp_body, t, style, 0, 0, sp_info, version, NiL, NiL);
+ textout(sp_body, t, 0, 0, style, 0, 0, sp_info, version, NiL, NiL, &bflags);
}
if (*p == GO)
{
- p = u ? skip(p + 1, 0, 0, 0, 0, 1, 1, version) : textout(sp_body, p, style, 4, 0, sp_info, version, id, catalog);
+ p = u ? skip(p + 1, 0, 0, 0, 0, 1, 1, version) : textout(sp_body, p, 0, 0, style, 4, 0, sp_info, version, id, catalog, &bflags);
y = "+?";
}
else
@@ -3161,7 +3448,7 @@ opthelp(const char* oopts, const char* what)
sfprintf(sp_info, "%s%s", y, T(NiL, ID, "The option value may be omitted."));
if (!(t = sfstruse(sp_info)))
goto nospace;
- textout(sp_body, t, style, 4, 0, sp_info, version, NiL, NiL);
+ textout(sp_body, t, 0, 0, style, 4, 0, sp_info, version, NiL, NiL, &bflags);
y = " ";
}
if (v)
@@ -3178,7 +3465,7 @@ opthelp(const char* oopts, const char* what)
sfputc(sp_info, '.');
if (!(t = sfstruse(sp_info)))
goto nospace;
- textout(sp_body, t, style, 4, 0, sp_info, version, NiL, NiL);
+ textout(sp_body, t, 0, 0, style, 4, 0, sp_info, version, NiL, NiL, &bflags);
}
}
else if (!mutex)
@@ -3187,7 +3474,7 @@ opthelp(const char* oopts, const char* what)
if (*p == GO)
{
if (style >= STYLE_match)
- p = textout(sp_body, p, style, 4, 0, sp_info, version, id, catalog);
+ p = textout(sp_body, p, 0, 0, style, 4, 0, sp_info, version, id, catalog, &bflags);
else
p = skip(p + 1, 0, 0, 0, 0, 1, 1, version);
}
@@ -3203,11 +3490,13 @@ opthelp(const char* oopts, const char* what)
for (t = p; *t == '\t' || *t == '\n'; t++);
if (*t)
{
- item(sp_body, C("IMPLEMENTATION"), 0, 0, style, sp_info, version, id, ID);
+ item(sp_body, C("IMPLEMENTATION"), 0, 0, style, sp_info, version, id, ID, &bflags);
sfputr(sp_body, p, -1);
}
}
}
+ if (oopts != o->oopts && oopts == top.oopts)
+ state.pass[0] = top;
version = o->version;
id = o->id;
catalog = o->catalog;
@@ -3226,6 +3515,7 @@ opthelp(const char* oopts, const char* what)
sfputc(sp, ']');
if (style == STYLE_nroff)
{
+ char rd[64];
char ud[64];
s = o->id;
@@ -3237,8 +3527,17 @@ opthelp(const char* oopts, const char* what)
*t++ = c;
}
*t = 0;
+ t = rd;
+ if (s = o->release)
+ {
+ *t++ = ' ';
+ while (t < &rd[sizeof(rd)-2] && (c = *s++) && c != ']')
+ *t++ = c;
+ }
+ *t = 0;
sfprintf(sp, "\
.\\\" format with nroff|troff|groff -man\n\
+.TH %s %s%s\n\
.fp 5 CW\n\
.nr mH 5\n\
.de H0\n\
@@ -3313,11 +3612,11 @@ opthelp(const char* oopts, const char* what)
.ft R\n\
.in -3n\n\
..\n\
-.TH %s %d\n\
"
-, o->prefix == 2 ? "\\\\-\\\\-" : o->prefix == 1 ? "\\\\-" : ""
, ud
, section
+, rd
+, o->prefix == 2 ? "\\\\-\\\\-" : o->prefix == 1 ? "\\\\-" : ""
);
}
if (style == STYLE_match)
@@ -3362,7 +3661,8 @@ opthelp(const char* oopts, const char* what)
sfclose(sp_head);
sp_head = 0;
}
- item(sp, C("SYNOPSIS"), 0, 0, style, sp_info, version, id, ID);
+ if (x)
+ item(sp, C("SYNOPSIS"), 0, 0, style, sp_info, version, id, ID, &hflags);
}
if (x)
{
@@ -3370,7 +3670,22 @@ opthelp(const char* oopts, const char* what)
xl = t - x;
if (style >= STYLE_match)
{
- args(sp, x, xl, flags, style, sp_info, version, id, catalog);
+ u = id;
+ if (o->flags & OPT_functions)
+ t = 0;
+ else if (t = strchr(u, ':'))
+ {
+ if ((o->flags & OPT_module) && *(t + 1) == ':' && *(t + 2))
+ {
+ u = t + 2;
+ t = 0;
+ }
+ else
+ *t = 0;
+ }
+ args(sp, x, xl, o->flags, style, sp_info, version, u, catalog);
+ if (t)
+ *t = ':';
x = 0;
}
}
@@ -3382,6 +3697,8 @@ opthelp(const char* oopts, const char* what)
sfputc(sp, ' ');
if (!(t = sfstruse(sp_body)))
goto nospace;
+ if (style == STYLE_html && !(dflags & HELP_head) && (bflags & HELP_head))
+ sfputr(sp, "\n</DIV>", '\n');
sfputr(sp, t, -1);
}
sfclose(sp_body);
@@ -3401,12 +3718,12 @@ opthelp(const char* oopts, const char* what)
}
if (!(p = sfstruse(sp)))
goto nospace;
- astwinsize(1, NiL, &opt_info.state->width);
- if (opt_info.state->width < 20)
- opt_info.state->width = OPT_WIDTH;
+ astwinsize(1, NiL, &state.width);
+ if (state.width < 20)
+ state.width = OPT_WIDTH;
m = strlen((style <= STYLE_long && error_info.id && !strchr(error_info.id, '/')) ? error_info.id : id) + 1;
- margin = style == STYLE_api ? (8 * 1024) : (opt_info.state->width - 1);
- if (!(opt_info.state->flags & OPT_preformat))
+ margin = style == STYLE_api ? (8 * 1024) : (state.width - 1);
+ if (!(state.flags & OPT_preformat))
{
if (style >= STYLE_man || matched < 0)
{
@@ -3428,11 +3745,12 @@ opthelp(const char* oopts, const char* what)
*t++ = c;
}
*t = 0;
- sfprintf(mp, "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n<HTML>\n<HEAD>\n<META name=\"generator\" content=\"optget (AT&T Research) 2000-04-01\">\n%s<TITLE>%s man document</TITLE>\n</HEAD>\n<BODY bgcolor=white>\n", (opt_info.state->flags & OPT_proprietary) ? "<!--INTERNAL-->\n" : "", id);
- sfprintf(mp, "<H4><TABLE width=100%%><TR><TH align=left>&nbsp;%s&nbsp;(&nbsp;%d&nbsp;)&nbsp;<TH align=center><A href=\".\" title=\"Index\">%s</A><TH align=right>%s&nbsp;(&nbsp;%d&nbsp;)</TR></TABLE></H4>\n<HR>\n", ud, section, T(NiL, ID, heading[section % 10]), ud, section);
- sfprintf(mp, "<DL compact>\n<DT>");
+ sfprintf(mp, "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n<HTML>\n<HEAD>\n<META name=\"generator\" content=\"optget (AT&T Research) 2011-11-11\">\n%s<TITLE>%s man document</TITLE>\n<STYLE type=\"text/css\">\ndiv.SH { padding-left:2em; text-indent:0em; }\ndiv.SY { padding-left:4em; text-indent:-2em; }\ndt { float:left; clear:both; }\ndd { margin-left:3em; }\n</STYLE>\n</HEAD>\n<BODY bgcolor=white>\n", (state.flags & OPT_proprietary) ? "<!--INTERNAL-->\n" : "", id);
+ sfprintf(mp, "<H4><TABLE width=100%%><TR><TH align=left>%s&nbsp;(&nbsp;%s&nbsp;)&nbsp;<TH align=center><A href=\".\" title=\"Index\">%s</A><TH align=right>%s&nbsp;(&nbsp;%s&nbsp;)</TR></TABLE></H4>\n<HR>\n", ud, section, T(NiL, ID, secname(section)), ud, section);
co = 2;
- *(pt = ptstk) = 0;
+ pt = ptstk;
+ pt->level = 0;
+ pt->id = TAG_DIV;
}
else
co = 0;
@@ -3476,20 +3794,32 @@ opthelp(const char* oopts, const char* what)
if (*p == '\n')
continue;
j = p - y;
- if (j > *pt)
+ if (j > pt->level)
{
- if (pt > ptstk)
- sfprintf(mp, "<DL compact>\n");
- *++pt = j;
- sfprintf(mp, "<DL compact>\n");
+ pt++;
+ pt->level = j;
+ pt->id = TAG_NONE;
+ for (y = p; *y && *y != '\n'; y++)
+ if (*y == '\t')
+ {
+ pt->id = TAG_DL;
+ sfprintf(mp, "<DL>\n");
+ break;
+ }
}
- else while (j < *pt)
+ else
+ while (j < pt->level && pt > ptstk)
+ {
+ sfprintf(mp, "%s", end[pt->id]);
+ pt--;
+ }
+ if (pt->id == TAG_DL)
{
- if (--pt > ptstk)
- sfprintf(mp, "</DL>\n");
- sfprintf(mp, "</DL>\n");
+ dt = p;
+ sfprintf(mp, "<DT>");
}
- co += sfprintf(mp, "<DT>");
+ else
+ dt = 0;
}
}
else if (c == '\t')
@@ -3499,7 +3829,46 @@ opthelp(const char* oopts, const char* what)
while (*p == '\t')
p++;
if (*p != '\n')
+ {
co += sfprintf(mp, "<DD>");
+ if (dt)
+ {
+ c = 0;
+ m = 0;
+ for (;;)
+ {
+ switch (*dt++)
+ {
+ case '\t':
+ break;
+ case '<':
+ c = '>';
+ continue;
+ case '>':
+ if (c == '>')
+ c = 0;
+ else
+ m++;
+ continue;
+ case '&':
+ c = ';';
+ continue;
+ case ';':
+ if (c == ';')
+ c = 0;
+ m++;
+ continue;
+ default:
+ if (!c)
+ m++;
+ continue;
+ }
+ break;
+ }
+ if (m >= 5)
+ co += sfprintf(mp, "<BR>");
+ }
+ }
}
else
{
@@ -3561,7 +3930,6 @@ opthelp(const char* oopts, const char* what)
sfputc(mp, c);
sfwrite(mp, "</NOBR", 6);
c = '>';
- tp = 0;
co += p - y + 6;
}
}
@@ -3677,13 +4045,13 @@ opthelp(const char* oopts, const char* what)
sfstrseek(mp, t - d, SEEK_SET);
if (style == STYLE_html)
{
+ sfprintf(mp, "\n");
while (pt > ptstk)
{
- if (--pt > ptstk)
- sfprintf(mp, "\n</DL>");
- sfprintf(mp, "\n</DL>");
+ sfprintf(mp, "%s", end[pt->id]);
+ pt--;
}
- sfprintf(mp, "</DL>\n</BODY>\n</HTML>");
+ sfprintf(mp, "</DIV>\n</BODY>\n</HTML>");
}
}
else
@@ -3766,7 +4134,7 @@ opterror(register char* p, int err, int version, char* id, char* catalog)
if (opt_info.num != LONG_MIN)
opt_info.num = (long)(opt_info.number = 0);
- if (!p || !(mp = opt_info.state->mp) && !(mp = opt_info.state->mp = sfstropen()))
+ if (!p || !(mp = state.mp) && !(mp = state.mp = sfstropen()))
goto nospace;
s = *p == '-' ? p : opt_info.name;
if (*p == '!')
@@ -3788,7 +4156,7 @@ opterror(register char* p, int err, int version, char* id, char* catalog)
if (*(p = next(p + 1, version)) == '[')
{
p = skip(s = p + 1, ':', '?', 0, 1, 0, 0, version);
- tp = X(catalog) ? opt_info.state->xp : mp;
+ tp = X(catalog) ? state.xp : mp;
while (s < p)
{
if ((c = *s++) == '?' || c == ']')
@@ -3926,27 +4294,25 @@ optget(register char** argv, const char* oopts)
_error_infop_ = &_error_info_;
if (!_opt_infop_)
_opt_infop_ = &_opt_info_;
- if (!opt_info.state)
- opt_info.state = &state;
#endif
if (!oopts)
return 0;
- opt_info.state->pindex = opt_info.index;
- opt_info.state->poffset = opt_info.offset;
+ state.pindex = opt_info.index;
+ state.poffset = opt_info.offset;
if (!opt_info.index)
{
opt_info.index = 1;
opt_info.offset = 0;
- if (opt_info.state->npass)
+ if (state.npass)
{
- opt_info.state->npass = 0;
- opt_info.state->join = 0;
+ state.npass = 0;
+ state.join = 0;
}
}
if (!argv)
cache = 0;
else
- for (pcache = 0, cache = opt_info.state->cache; cache; pcache = cache, cache = cache->next)
+ for (pcache = 0, cache = state.cache; cache; pcache = cache, cache = cache->next)
if (cache->pass.oopts == (char*)oopts)
break;
if (cache)
@@ -3954,41 +4320,41 @@ optget(register char** argv, const char* oopts)
if (pcache)
{
pcache->next = cache->next;
- cache->next = opt_info.state->cache;
- opt_info.state->cache = cache;
+ cache->next = state.cache;
+ state.cache = cache;
}
pass = &cache->pass;
- opt_info.state->npass = -1;
+ state.npass = -1;
}
else
{
if (!argv)
- n = opt_info.state->npass ? opt_info.state->npass : 1;
- else if ((n = opt_info.state->join - 1) < 0)
+ n = state.npass ? state.npass : 1;
+ else if ((n = state.join - 1) < 0)
n = 0;
- if (n >= opt_info.state->npass || opt_info.state->pass[n].oopts != (char*)oopts)
+ if (n >= state.npass || state.pass[n].oopts != (char*)oopts)
{
- for (m = 0; m < opt_info.state->npass && opt_info.state->pass[m].oopts != (char*)oopts; m++);
- if (m < opt_info.state->npass)
+ for (m = 0; m < state.npass && state.pass[m].oopts != (char*)oopts; m++);
+ if (m < state.npass)
n = m;
else
{
- if (n >= elementsof(opt_info.state->pass))
- n = elementsof(opt_info.state->pass) - 1;
- init((char*)oopts, &opt_info.state->pass[n]);
- if (opt_info.state->npass <= n)
- opt_info.state->npass = n + 1;
+ if (n >= elementsof(state.pass))
+ n = elementsof(state.pass) - 1;
+ init((char*)oopts, &state.pass[n]);
+ if (state.npass <= n)
+ state.npass = n + 1;
}
}
if (!argv)
return 0;
- pass = &opt_info.state->pass[n];
+ pass = &state.pass[n];
}
opts = pass->opts;
prefix = pass->prefix;
version = pass->version;
id = pass->id;
- if (!(xp = opt_info.state->xp) || (catalog = pass->catalog) && !X(catalog))
+ if (!(xp = state.xp) || (catalog = pass->catalog) && !X(catalog))
catalog = 0;
else /* if (!error_info.catalog) */
error_info.catalog = catalog;
@@ -4012,13 +4378,13 @@ optget(register char** argv, const char* oopts)
* finished with the previous arg
*/
- if (opt_info.index == 1 && opt_info.argv != opt_info.state->strv)
+ if (opt_info.index == 1 && opt_info.argv != state.strv)
{
opt_info.argv = 0;
- opt_info.state->argv[0] = 0;
- if (argv[0] && (opt_info.state->argv[0] = save(argv[0])))
- opt_info.argv = opt_info.state->argv;
- opt_info.state->style = STYLE_short;
+ state.argv[0] = 0;
+ if (argv[0] && (state.argv[0] = save(argv[0], strlen(argv[0]), 0, 0, 0, 0)))
+ opt_info.argv = state.argv;
+ state.style = STYLE_short;
}
if (!(s = argv[opt_info.index]))
return 0;
@@ -4114,11 +4480,10 @@ optget(register char** argv, const char* oopts)
return 0;
if (c == '+')
opt_info.arg = 0;
- message((-2, "c='%c' n=%d", c, n));
if (n == 2)
{
x = 0;
- opt_info.state->style = STYLE_long;
+ state.style = STYLE_long;
opt_info.option[0] = opt_info.name[0] = opt_info.name[1] = c;
w = &opt_info.name[prefix];
if ((*s == 'n' || *s == 'N') && (*(s + 1) == 'o' || *(s + 1) == 'O') && *(s + 2) && *(s + 2) != '=')
@@ -4177,8 +4542,19 @@ optget(register char** argv, const char* oopts)
* ? always triggers internal help
*/
- if (w && !v && (*(w + 1) || !(v = argv[opt_info.index]) || !++opt_info.index))
- v = w + 1;
+ if (!state.msgdict)
+ initdict();
+ if (w)
+ {
+ if (!v && (*(w + 1) || !(v = argv[opt_info.index]) || !++opt_info.index))
+ v = w + 1;
+ else if (w[0] != '?' || w[1])
+ {
+ s = w;
+ w = v;
+ v = s + 1;
+ }
+ }
opt_info.option[1] = c;
opt_info.option[2] = 0;
if (!w)
@@ -4188,6 +4564,8 @@ optget(register char** argv, const char* oopts)
}
goto help;
}
+ else if (w && !state.msgdict)
+ initdict();
numopt = 0;
f = 0;
s = opts;
@@ -4230,6 +4608,7 @@ optget(register char** argv, const char* oopts)
opt_info.num = (long)(opt_info.number = optnumber(opt_info.arg, &e, &err));
if (err || e == opt_info.arg)
{
+ opt_info.num = (long)(opt_info.number = 0);
if (!err && (k & OPT_cache_optional))
{
opt_info.arg = 0;
@@ -4257,6 +4636,7 @@ optget(register char** argv, const char* oopts)
opt_info.arg = 0;
opt_info.index--;
opt_info.offset = 0;
+ opt_info.num = (long)(opt_info.number = 0);
return c;
}
if (k & OPT_cache_string)
@@ -4295,8 +4675,8 @@ optget(register char** argv, const char* oopts)
cache->caching = c;
c = 0;
cache->pass = *pass;
- cache->next = opt_info.state->cache;
- opt_info.state->cache = cache;
+ cache->next = state.cache;
+ state.cache = cache;
}
}
else
@@ -4349,7 +4729,7 @@ optget(register char** argv, const char* oopts)
}
if (*s == '\f')
{
- psp = info(psp, s + 1, NiL, opt_info.state->xp, id);
+ psp = info(psp, s + 1, NiL, xp, id);
if (psp->nb)
s = psp->nb;
else
@@ -4364,8 +4744,14 @@ optget(register char** argv, const char* oopts)
break;
else if (*s == '[')
{
- f = s = next(s + 1, version);
- k = *f;
+ s = next(s + 1, version);
+ if (*s == '(')
+ {
+ s = nest(f = s);
+ if (!conformance(f, s - f))
+ goto disable;
+ }
+ k = *(f = s);
if (k == '+' || k == '-')
/* ignore */;
else if (k == '[' || version < 1)
@@ -4373,7 +4759,7 @@ optget(register char** argv, const char* oopts)
else if (w && !cache)
{
nov = no;
- if (*(s + 1) == '\f' && (vp = opt_info.state->vp))
+ if (*(s + 1) == '\f' && (vp = state.vp))
{
sfputc(vp, k);
s = expand(s + 2, NiL, &t, vp, id);
@@ -4438,13 +4824,13 @@ optget(register char** argv, const char* oopts)
}
m = 1;
}
- else if (*s == *w || sep(*s) && sep(*w))
+ else if (*s == *w || SEP(*s) && SEP(*w))
w++;
else if (*w == 0)
break;
- else if (!sep(*s))
+ else if (!SEP(*s))
{
- if (sep(*w))
+ if (SEP(*w))
{
if (*++w == *s)
{
@@ -4452,10 +4838,10 @@ optget(register char** argv, const char* oopts)
continue;
}
}
- else if (w == y || sep(*(w - 1)) || isupper(*(w - 1)) && islower(*w))
+ else if (w == y || SEP(*(w - 1)) || isupper(*(w - 1)) && islower(*w))
break;
- for (q = s; *q && !sep(*q) && *q != '|' && *q != '?' && *q != ']'; q++);
- if (!sep(*q))
+ for (q = s; *q && !SEP(*q) && *q != '|' && *q != '?' && *q != ']'; q++);
+ if (!SEP(*q))
break;
for (s = q; w > y && *w != *(s + 1); w--);
}
@@ -4495,13 +4881,13 @@ optget(register char** argv, const char* oopts)
}
m = 1;
}
- else if (*s == *w || sep(*s) && sep(*w))
+ else if (*s == *w || SEP(*s) && SEP(*w))
w++;
else if (*w == 0)
break;
- else if (!sep(*s))
+ else if (!SEP(*s))
{
- if (sep(*w))
+ if (SEP(*w))
{
if (*++w == *s)
{
@@ -4509,10 +4895,10 @@ optget(register char** argv, const char* oopts)
continue;
}
}
- else if (w == y || sep(*(w - 1)) || isupper(*(w - 1)) && islower(*w))
+ else if (w == y || SEP(*(w - 1)) || isupper(*(w - 1)) && islower(*w))
break;
- for (q = s; *q && !sep(*q) && *q != '|' && *q != '?' && *q != ']'; q++);
- if (!sep(*q))
+ for (q = s; *q && !SEP(*q) && *q != '|' && *q != '?' && *q != ']'; q++);
+ if (!SEP(*q))
break;
for (s = q; w > y && *w != *(s + 1); w--);
}
@@ -4598,6 +4984,7 @@ optget(register char** argv, const char* oopts)
a = t;
}
}
+ disable:
s = skip(s, 0, 0, 0, 1, 0, 1, version);
if (*s == GO)
s = skip(s + 1, 0, 0, 0, 0, 1, 1, version);
@@ -4920,6 +5307,7 @@ optget(register char** argv, const char* oopts)
opt_info.index++;
if (*(s + 1) == '?' && (*opt_info.arg == '-' || (pass->flags & OPT_plus) && *opt_info.arg == '+') && *(opt_info.arg + 1))
{
+ opt_info.num = (long)(opt_info.number = 0);
opt_info.index--;
opt_info.arg = 0;
}
@@ -5018,13 +5406,13 @@ optget(register char** argv, const char* oopts)
}
m = 1;
}
- else if (*s == *w || sep(*s) && sep(*w))
+ else if (*s == *w || SEP(*s) && SEP(*w))
w++;
else if (*w == 0)
break;
- else if (!sep(*s))
+ else if (!SEP(*s))
{
- if (sep(*w))
+ if (SEP(*w))
{
if (*++w == *s)
{
@@ -5032,10 +5420,10 @@ optget(register char** argv, const char* oopts)
continue;
}
}
- else if (w == y || sep(*(w - 1)) || isupper(*(w - 1)) && islower(*w))
+ else if (w == y || SEP(*(w - 1)) || isupper(*(w - 1)) && islower(*w))
break;
- for (q = s; *q && !sep(*q) && *q != '|' && *q != '?' && *q != ']'; q++);
- if (!sep(*q))
+ for (q = s; *q && !SEP(*q) && *q != '|' && *q != '?' && *q != ']'; q++);
+ if (!SEP(*q))
break;
for (s = q; w > y && *w != *(s + 1); w--);
}
@@ -5132,16 +5520,34 @@ optget(register char** argv, const char* oopts)
pop(psp);
return '?';
}
- opt_info.state->force = hp->style;
+ state.force = hp->style;
+ }
+ else if (match(s, "CONFORMANCE", -1, ID, NiL))
+ {
+ opt_info.arg = sfprints("\f%s", conformance(w, 0));
+ pop(psp);
+ return '?';
}
else if (match(s, "ESC", -1, ID, NiL) || match(s, "EMPHASIS", -1, ID, NiL))
- opt_info.state->emphasis = n;
+ state.emphasis = n;
+ else if (match(s, "MAN", -1, ID, NiL))
+ {
+ opt_info.arg = sfprints("\f%s", secname(*w != '?' ? w : pass->section));
+ pop(psp);
+ return '?';
+ }
else if (match(s, "PREFORMAT", -1, ID, NiL))
- opt_info.state->flags |= OPT_preformat;
+ state.flags |= OPT_preformat;
+ else if (match(s, "SECTION", -1, ID, NiL))
+ {
+ opt_info.arg = sfprints("\f%s", pass->section);
+ pop(psp);
+ return '?';
+ }
else if (match(s, "TEST", -1, ID, NiL))
{
- opt_info.state->width = OPT_WIDTH;
- opt_info.state->emphasis = 1;
+ state.width = OPT_WIDTH;
+ state.emphasis = 1;
}
else
{
@@ -5149,7 +5555,7 @@ optget(register char** argv, const char* oopts)
return opterror(v, 0, version, id, catalog);
}
psp = pop(psp);
- if (argv == opt_info.state->strv)
+ if (argv == state.strv)
return '#';
goto again;
}
@@ -5201,17 +5607,17 @@ optstr(const char* str, const char* opts)
again:
if (s)
{
- if (!(mp = opt_info.state->strp) && !(mp = opt_info.state->strp = sfstropen()))
+ if (!(mp = state.strp) && !(mp = state.strp = sfstropen()))
return 0;
- if (opt_info.state->str != s)
- opt_info.state->str = s;
+ if (state.str != s)
+ state.str = s;
else if (opt_info.index == 1)
s += opt_info.offset;
while (*s == ',' || *s == ' ' || *s == '\t' || *s == '\n' || *s == '\r')
s++;
if (!*s)
{
- opt_info.state->str = 0;
+ state.str = 0;
return 0;
}
if (*s == '-' || *s == '+')
@@ -5305,29 +5711,29 @@ optstr(const char* str, const char* opts)
}
}
}
- opt_info.argv = opt_info.state->strv;
- opt_info.state->strv[0] = T(NiL, ID, "option");
- if (!(opt_info.state->strv[1] = sfstruse(mp)))
+ opt_info.argv = state.strv;
+ state.strv[0] = T(NiL, ID, "option");
+ if (!(state.strv[1] = sfstruse(mp)))
goto nospace;
- opt_info.state->strv[2] = 0;
+ state.strv[2] = 0;
opt_info.offset = s - (char*)str;
}
if (opts)
{
- if (!opt_info.state->strv[1])
+ if (!state.strv[1])
{
- opt_info.state->str = 0;
+ state.str = 0;
return 0;
}
opt_info.index = 1;
v = opt_info.offset;
opt_info.offset = 0;
- c = optget(opt_info.state->strv, opts);
+ c = optget(state.strv, opts);
opt_info.index = 1;
opt_info.offset = v;
if (c == '#')
{
- s = opt_info.state->str;
+ s = state.str;
goto again;
}
if ((c == '?' || c == ':') && (opt_info.arg[0] == '-' && opt_info.arg[1] == '-'))
diff --git a/usr/src/lib/libast/common/misc/optjoin.c b/usr/src/contrib/ast/src/lib/libast/misc/optjoin.c
index 023738cf9a..1648decb4f 100644
--- a/usr/src/lib/libast/common/misc/optjoin.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/optjoin.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -53,6 +53,8 @@ optjoin(char** argv, ...)
register Optpass_f fun;
register Optpass_f rep;
Optpass_f err;
+ Optstate_t* state;
+ int r;
int more;
int user;
int last_index;
@@ -60,33 +62,35 @@ optjoin(char** argv, ...)
int err_index;
int err_offset;
- if (!opt_info.state)
- optget(NiL, NiL);
+ state = optstate(&opt_info);
err = rep = 0;
- for (;;)
+ r = -1;
+ while (r < 0)
{
va_start(ap, argv);
- opt_info.state->join = 0;
+ state->join = 0;
while (fun = va_arg(ap, Optpass_f))
{
last_index = opt_info.index;
last_offset = opt_info.offset;
- opt_info.state->join++;
+ state->join++;
user = (*fun)(argv, 0);
more = argv[opt_info.index] != 0;
if (!opt_info.again)
{
if (!more)
{
- opt_info.state->join = 0;
- return 0;
+ state->join = 0;
+ r = 0;
+ break;
}
if (!user)
{
if (*argv[opt_info.index] != '+')
{
- opt_info.state->join = 0;
- return 1;
+ state->join = 0;
+ r = 1;
+ break;
}
opt_info.again = -1;
}
@@ -102,8 +106,8 @@ optjoin(char** argv, ...)
err_offset = opt_info.offset;
}
opt_info.again = 0;
- opt_info.index = opt_info.state->pindex ? opt_info.state->pindex : 1;
- opt_info.offset = opt_info.state->poffset;
+ opt_info.index = state->pindex ? state->pindex : 1;
+ opt_info.offset = state->poffset;
}
if (!rep || opt_info.index != last_index || opt_info.offset != last_offset)
rep = fun;
@@ -111,8 +115,9 @@ optjoin(char** argv, ...)
{
if (!err)
{
- opt_info.state->join = 0;
- return 1;
+ state->join = 0;
+ r = 1;
+ break;
}
(*err)(argv, 1);
opt_info.offset = 0;
@@ -120,4 +125,5 @@ optjoin(char** argv, ...)
}
va_end(ap);
}
+ return r;
}
diff --git a/usr/src/contrib/ast/src/lib/libast/misc/optlib.h b/usr/src/contrib/ast/src/lib/libast/misc/optlib.h
new file mode 100644
index 0000000000..5cafed9857
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/misc/optlib.h
@@ -0,0 +1,115 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * Glenn Fowler
+ * AT&T Research
+ *
+ * command line option parser and usage formatter private definitions
+ */
+
+#ifndef _OPTLIB_H
+#define _OPTLIB_H
+
+#include <ast.h>
+#include <cdt.h>
+
+#define OPT_append 0x001
+#define OPT_cache 0x002
+#define OPT_functions 0x004
+#define OPT_ignore 0x008
+#define OPT_long 0x010
+#define OPT_minus 0x020
+#define OPT_module 0x040
+#define OPT_numeric 0x080
+#define OPT_old 0x100
+#define OPT_plus 0x200
+
+#define OPT_cache_flag 0x001
+#define OPT_cache_invert 0x002
+#define OPT_cache_numeric 0x004
+#define OPT_cache_optional 0x008
+#define OPT_cache_string 0x010
+
+#define OPT_CACHE 128
+#define OPT_FLAGS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+
+struct Optdisc_s;
+
+typedef struct Optpass_s
+{
+ char* opts;
+ char* oopts;
+ char* id;
+ char* catalog;
+ char* release;
+ char section[4];
+ unsigned char version;
+ unsigned char prefix;
+ unsigned short flags;
+} Optpass_t;
+
+typedef struct Optcache_s
+{
+ struct Optcache_s* next;
+ Optpass_t pass;
+ int caching;
+ unsigned char flags[sizeof(OPT_FLAGS)];
+} Optcache_t;
+
+typedef struct Optstate_s
+{
+ Sfio_t* mp; /* opt_info.msg string stream */
+ Sfio_t* vp; /* translation string stream */
+ Sfio_t* xp; /* translation string stream */
+ Sfio_t* cp; /* compatibility string stream */
+ Optpass_t pass[8]; /* optjoin() list */
+ char* argv[2]; /* initial argv copy */
+ char* strv[3]; /* optstr() argv */
+ char* str; /* optstr() string */
+ Sfio_t* strp; /* optstr() stream */
+ int force; /* force this style */
+ int pindex; /* prev index for backup */
+ int poffset; /* prev offset for backup */
+ int npass; /* # optjoin() passes */
+ int join; /* optjoin() pass # */
+ int plus; /* + ok */
+ int style; /* default opthelp() style */
+ int width; /* format line width */
+ int flags; /* display flags */
+ int emphasis; /* ansi term emphasis ok */
+ int localized; /* locale initialized */
+ Dtdisc_t msgdisc; /* msgdict discipline */
+ Dt_t* msgdict; /* default ast.id catalog msgs */
+ Optcache_t* cache; /* OPT_cache cache */
+ char** conformance; /* conformance id vector */
+} Optstate_t;
+
+#define _OPT_PRIVATE_ \
+ char pad[2*sizeof(void*)]; \
+ Optstate_t* state;
+
+#include <error.h>
+
+extern Optstate_t* optstate(Opt_t*);
+
+#endif
diff --git a/usr/src/lib/libast/common/misc/procclose.c b/usr/src/contrib/ast/src/lib/libast/misc/procclose.c
index bfc84f9d17..a4924545e6 100644
--- a/usr/src/lib/libast/common/misc/procclose.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/procclose.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -30,8 +30,6 @@
#include "proclib.h"
-#include <wait.h>
-
int
procclose(register Proc_t* p)
{
@@ -45,48 +43,53 @@ procclose(register Proc_t* p)
close(p->rfd);
if (p->wfd >= 0 && p->wfd != p->rfd)
close(p->wfd);
- if (p->flags & PROC_ZOMBIE)
- {
- /*
- * process may leave a zombie behind
- * give it a chance to do that but
- * don't hang waiting for it
- */
-
- flags |= WNOHANG;
- sleep(1);
- }
- if (!(p->flags & PROC_FOREGROUND))
- sigcritical(SIG_REG_EXEC|SIG_REG_PROC);
- while ((pid = waitpid(p->pid, &status, flags)) == -1 && errno == EINTR);
- if (pid != p->pid && (flags & WNOHANG))
+ if (p->flags & PROC_ORPHAN)
status = 0;
- if (!(p->flags & PROC_FOREGROUND))
- sigcritical(0);
else
{
- if (p->sigint != SIG_IGN)
- signal(SIGINT, p->sigint);
- if (p->sigquit != SIG_IGN)
- signal(SIGQUIT, p->sigquit);
+ if (p->flags & PROC_ZOMBIE)
+ {
+ /*
+ * process may leave a zombie behind
+ * give it a chance to do that but
+ * don't hang waiting for it
+ */
+
+ flags |= WNOHANG;
+ sleep(1);
+ }
+ if (!(p->flags & PROC_FOREGROUND))
+ sigcritical(SIG_REG_EXEC|SIG_REG_PROC);
+ while ((pid = waitpid(p->pid, &status, flags)) == -1 && errno == EINTR);
+ if (pid != p->pid && (flags & WNOHANG))
+ status = 0;
+ if (!(p->flags & PROC_FOREGROUND))
+ sigcritical(0);
+ else
+ {
+ if (p->sigint != SIG_IGN)
+ signal(SIGINT, p->sigint);
+ if (p->sigquit != SIG_IGN)
+ signal(SIGQUIT, p->sigquit);
#if defined(SIGCHLD)
#if _lib_sigprocmask
- sigprocmask(SIG_SETMASK, &p->mask, NiL);
+ sigprocmask(SIG_SETMASK, &p->mask, NiL);
#else
#if _lib_sigsetmask
- sigsetmask(p->mask);
+ sigsetmask(p->mask);
#else
- if (p->sigchld != SIG_DFL)
- signal(SIGCHLD, p->sigchld);
+ if (p->sigchld != SIG_DFL)
+ signal(SIGCHLD, p->sigchld);
#endif
#endif
#endif
+ }
+ status = status == -1 ?
+ EXIT_QUIT :
+ WIFSIGNALED(status) ?
+ EXIT_TERM(WTERMSIG(status)) :
+ EXIT_CODE(WEXITSTATUS(status));
}
- status = status == -1 ?
- EXIT_QUIT :
- WIFSIGNALED(status) ?
- EXIT_TERM(WTERMSIG(status)) :
- EXIT_CODE(WEXITSTATUS(status));
procfree(p);
}
else
diff --git a/usr/src/lib/libast/common/misc/procfree.c b/usr/src/contrib/ast/src/lib/libast/misc/procfree.c
index 920c9b2237..d14ff35ef2 100644
--- a/usr/src/lib/libast/common/misc/procfree.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/procfree.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/proclib.h b/usr/src/contrib/ast/src/lib/libast/misc/proclib.h
index 6221d7f999..c0dee8df31 100644
--- a/usr/src/lib/libast/common/misc/proclib.h
+++ b/usr/src/contrib/ast/src/lib/libast/misc/proclib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -30,9 +30,11 @@
#ifndef _PROCLIB_H
#define _PROCLIB_H
+#include <ast_standards.h>
#include <ast.h>
#include <errno.h>
#include <sig.h>
+#include <wait.h>
#if _lib_sigprocmask
typedef sigset_t Sig_mask_t;
diff --git a/usr/src/lib/libast/common/misc/procopen.c b/usr/src/contrib/ast/src/lib/libast/misc/procopen.c
index 9f0194cf42..2af92e747b 100644
--- a/usr/src/lib/libast/common/misc/procopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/procopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -34,13 +34,20 @@
#include "proclib.h"
#include <ls.h>
+#include <ast_tty.h>
/*
* not quite ready for _use_spawnveg
*/
-#if _use_spawnveg && _lib_fork
+#if _use_spawnveg
+#if _lib_fork
#undef _use_spawnveg
+#else
+#if _WINIX
+#define _lib_fork 1
+#endif
+#endif
#endif
#ifndef DEBUG_PROC
@@ -155,6 +162,11 @@ modify(Proc_t* proc, int forked, int op, long arg1, long arg2)
#if _lib_fork
if (forked)
{
+ int i;
+#ifndef TIOCSCTTY
+ char* s;
+#endif
+
switch (op)
{
case PROC_fd_dup:
@@ -173,6 +185,29 @@ modify(Proc_t* proc, int forked, int op, long arg1, long arg2)
close(arg1);
}
break;
+ case PROC_fd_ctty:
+ setsid();
+ for (i = 0; i <= 2; i++)
+ if (arg1 != i)
+ close(i);
+ arg2 = -1;
+#ifdef TIOCSCTTY
+ if (ioctl(arg1, TIOCSCTTY, NiL) < 0)
+ return -1;
+#else
+ if (!(s = ttyname(arg1)))
+ return -1;
+ if ((arg2 = open(s, O_RDWR)) < 0)
+ return -1;
+#endif
+ for (i = 0; i <= 2; i++)
+ if (arg1 != i && arg2 != i && fcntl(arg1, F_DUPFD, i) != i)
+ return -1;
+ if (arg1 > 2)
+ close(arg1);
+ if (arg2 > 2)
+ close(arg2);
+ break;
case PROC_sig_dfl:
signal(arg1, SIG_DFL);
break;
@@ -224,12 +259,14 @@ modify(Proc_t* proc, int forked, int op, long arg1, long arg2)
if (arg2 != PROC_ARG_NULL)
{
m->arg.fd.child.flag = fcntl(arg2, F_GETFD, 0);
- if ((m->save = fcntl(arg2, F_DUPFD, 3)) < 0)
+ if ((m->save = fcntl(arg2, F_dupfd_cloexec, 3)) < 0)
{
m->op = 0;
return -1;
}
+#if F_dupfd_cloexec == F_DUPFD
fcntl(m->save, F_SETFD, FD_CLOEXEC);
+#endif
close(arg2);
if (fcntl(arg1, F_DUPFD, arg2) != arg2)
return -1;
@@ -373,6 +410,9 @@ procopen(const char* cmd, char** argv, char** envv, long* modv, int flags)
char path[PATH_MAX];
char env[PATH_MAX + 2];
int pio[2];
+#if _lib_fork
+ int pop[2];
+#endif
#if !_pipe_rw && !_lib_socketpair
int poi[2];
#endif
@@ -387,19 +427,22 @@ procopen(const char* cmd, char** argv, char** envv, long* modv, int flags)
#endif
#if _lib_fork
- if (!argv && (flags & PROC_OVERLAY))
+ if (!argv && (flags & (PROC_ORPHAN|PROC_OVERLAY)))
#else
- if (!argv)
+ if (!argv || (flags & PROC_ORPHAN))
#endif
{
errno = ENOEXEC;
return 0;
}
pio[0] = pio[1] = -1;
+#if _lib_fork
+ pop[0] = pop[1] = -1;
+#endif
#if !_pipe_rw && !_lib_socketpair
poi[0] = poi[1] = -1;
#endif
- if (cmd && (!*cmd || !pathpath(path, cmd, NiL, PATH_REGULAR|PATH_EXECUTE)))
+ if (cmd && (!*cmd || !pathpath(cmd, NiL, PATH_REGULAR|PATH_EXECUTE, path, sizeof(path))))
goto bad;
switch (flags & (PROC_READ|PROC_WRITE))
{
@@ -431,7 +474,8 @@ procopen(const char* cmd, char** argv, char** envv, long* modv, int flags)
if (!setenviron(NiL))
goto bad;
#if _use_spawnveg
- newenv = 1;
+ if (!(flags & PROC_ORPHAN))
+ newenv = 1;
#endif
}
if (procfd >= 0)
@@ -460,7 +504,7 @@ procopen(const char* cmd, char** argv, char** envv, long* modv, int flags)
forked = 1;
}
#if _use_spawnveg
- else if (argv)
+ else if (argv && !(flags & PROC_ORPHAN))
proc->pid = 0;
#endif
#if _lib_fork
@@ -488,6 +532,8 @@ procopen(const char* cmd, char** argv, char** envv, long* modv, int flags)
#endif
#endif
}
+ if ((flags & PROC_ORPHAN) && pipe(pop))
+ goto bad;
proc->pid = fork();
if (!(flags & PROC_FOREGROUND))
sigcritical(0);
@@ -529,6 +575,22 @@ procopen(const char* cmd, char** argv, char** envv, long* modv, int flags)
v = 0;
#endif
+#if _lib_fork
+ if (flags & PROC_ORPHAN)
+ {
+ if (!(proc->pid = fork()))
+ {
+ close(pop[0]);
+ close(pop[1]);
+ }
+ else
+ {
+ if (proc->pid > 0)
+ write(pop[1], &proc->pid, sizeof(proc->pid));
+ _exit(EXIT_NOEXEC);
+ }
+ }
+#endif
#if DEBUG_PROC
stropt(getenv(PROC_ENV_OPTIONS), options, sizeof(*options), setopt, &debug);
#if _lib_fork
@@ -820,6 +882,13 @@ sfsync(sfstderr);
}
if (!proc->pid)
proc->pid = getpid();
+ else if (flags & PROC_ORPHAN)
+ {
+ while (waitpid(proc->pid, &i, 0) == -1 && errno == EINTR);
+ if (read(pop[0], &proc->pid, sizeof(proc->pid)) != sizeof(proc->pid))
+ goto bad;
+ close(pop[0]);
+ }
return proc;
}
bad:
@@ -858,6 +927,10 @@ sfsync(sfstderr);
close(pio[0]);
if (pio[1] >= 0)
close(pio[1]);
+ if (pop[0] >= 0)
+ close(pop[0]);
+ if (pop[1] >= 0)
+ close(pop[1]);
#if !_pipe_rw && !_lib_socketpair
if (poi[0] >= 0)
close(poi[0]);
diff --git a/usr/src/lib/libast/common/misc/procrun.c b/usr/src/contrib/ast/src/lib/libast/misc/procrun.c
index 8b6236b6bd..a37e0679d7 100644
--- a/usr/src/lib/libast/common/misc/procrun.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/procrun.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -43,7 +43,7 @@ procrun(const char* path, char** argv, int flags)
{
char buf[PATH_MAX];
- return pathpath(buf, path, NiL, PATH_REGULAR|PATH_EXECUTE) ? 0 : -1;
+ return pathpath(path, NiL, PATH_REGULAR|PATH_EXECUTE, buf, sizeof(buf)) ? 0 : -1;
}
return procclose(procopen(path, argv, NiL, NiL, flags|PROC_FOREGROUND|PROC_GID|PROC_UID));
}
diff --git a/usr/src/lib/libast/common/misc/recfmt.c b/usr/src/contrib/ast/src/lib/libast/misc/recfmt.c
index baf153469f..09c32204e6 100644
--- a/usr/src/lib/libast/common/misc/recfmt.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/recfmt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/reclen.c b/usr/src/contrib/ast/src/lib/libast/misc/reclen.c
index 9091e52052..ec927f8f5a 100644
--- a/usr/src/lib/libast/common/misc/reclen.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/reclen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/recstr.c b/usr/src/contrib/ast/src/lib/libast/misc/recstr.c
index dabed6b1e7..8ba83377fc 100644
--- a/usr/src/lib/libast/common/misc/recstr.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/recstr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -53,7 +53,7 @@ recstr(register const char* s, char** e)
{
case 'd':
case 'D':
- if (!*s)
+ if (!*++s)
n = '\n';
else
{
diff --git a/usr/src/lib/libast/common/misc/setenviron.c b/usr/src/contrib/ast/src/lib/libast/misc/setenviron.c
index 35d3397f51..368ebc66a1 100644
--- a/usr/src/lib/libast/common/misc/setenviron.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/setenviron.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -81,7 +81,7 @@ setenviron(const char* akey)
* kick 3d initialization
*/
- close(open(".", O_RDONLY));
+ close(open(".", O_RDONLY|O_cloexec));
v = environ;
}
if (!(p = newof(p, char*, n, 0)))
diff --git a/usr/src/lib/libast/common/misc/sigcrit.c b/usr/src/contrib/ast/src/lib/libast/misc/sigcrit.c
index e8c1ee2ecf..243c478a1c 100644
--- a/usr/src/lib/libast/common/misc/sigcrit.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/sigcrit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/sigdata.c b/usr/src/contrib/ast/src/lib/libast/misc/sigdata.c
index de0a489a08..657aeed738 100644
--- a/usr/src/lib/libast/common/misc/sigdata.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/sigdata.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/signal.c b/usr/src/contrib/ast/src/lib/libast/misc/signal.c
index 034c653a52..0d5fe9dcec 100644
--- a/usr/src/lib/libast/common/misc/signal.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/signal.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/stack.c b/usr/src/contrib/ast/src/lib/libast/misc/stack.c
index 6c5ca49ebc..fdad3ff906 100644
--- a/usr/src/lib/libast/common/misc/stack.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/stack.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/state.c b/usr/src/contrib/ast/src/lib/libast/misc/state.c
index 37b6e9e737..955c4edb28 100644
--- a/usr/src/lib/libast/common/misc/state.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/state.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,7 +21,7 @@
***********************************************************************/
#pragma prototyped
-static const char id[] = "\n@(#)$Id: ast (AT&T Research) 2010-01-02 $\0\n";
+static const char id[] = "\n@(#)$Id: ast (AT&T Research) 2012-05-28 $\0\n";
#include <ast.h>
diff --git a/usr/src/lib/libast/common/misc/stk.c b/usr/src/contrib/ast/src/lib/libast/misc/stk.c
index beb09381fc..d937437a9e 100644
--- a/usr/src/lib/libast/common/misc/stk.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/stk.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -53,7 +53,7 @@
*/
#define STK_ALIGN ALIGN_BOUND
-#define STK_FSIZE (1024*sizeof(int))
+#define STK_FSIZE (1024*sizeof(char*))
#define STK_HDRSIZE (sizeof(Sfio_t)+sizeof(Sfdisc_t))
typedef char* (*_stk_overflow_)(int);
@@ -82,9 +82,9 @@ struct stk
char *stkend; /* end of current stack frame */
};
-static int init; /* 1 when initialized */
+static size_t init; /* 1 when initialized */
static struct stk *stkcur; /* pointer to current stk */
-static char *stkgrow(Sfio_t*, unsigned);
+static char *stkgrow(Sfio_t*, size_t);
#define stream2stk(stream) ((stream)==stkstd? stkcur:\
((struct stk*)(((char*)(stream))+STK_HDRSIZE)))
@@ -132,7 +132,7 @@ static char *overflow(int n)
/*
* initialize stkstd, sfio operations may have already occcured
*/
-static void stkinit(int size)
+static void stkinit(size_t size)
{
register Sfio_t *sp;
init = size;
@@ -212,7 +212,7 @@ static int stkexcept(register Sfio_t *stream, int type, void* val, Sfdisc_t* dp)
*/
Sfio_t *stkopen(int flags)
{
- register int bsize;
+ register size_t bsize;
register Sfio_t *stream;
register struct stk *sp;
register struct frame *fp;
@@ -335,7 +335,7 @@ int stkon(register Sfio_t * stream, register char* loc)
* otherwise, the top of the stack is set to stkbot+<offset>
*
*/
-char *stkset(register Sfio_t * stream, register char* loc, unsigned offset)
+char *stkset(register Sfio_t * stream, register char* loc, size_t offset)
{
register struct stk *sp = stream2stk(stream);
register char *cp;
@@ -348,7 +348,7 @@ char *stkset(register Sfio_t * stream, register char* loc, unsigned offset)
while(1)
{
fp = (struct frame*)sp->stkbase;
- cp = sp->stkbase + roundof(sizeof(struct frame), STK_ALIGN);
+ cp = sp->stkbase + roundof(sizeof(struct frame), STK_ALIGN);
n = fp->nalias;
while(n-->0)
{
@@ -390,7 +390,7 @@ found:
/*
* allocate <n> bytes on the current stack
*/
-char *stkalloc(register Sfio_t *stream, register unsigned int n)
+char *stkalloc(register Sfio_t *stream, register size_t n)
{
register unsigned char *old;
if(!init)
@@ -407,12 +407,12 @@ char *stkalloc(register Sfio_t *stream, register unsigned int n)
/*
* begin a new stack word of at least <n> bytes
*/
-char *_stkseek(register Sfio_t *stream, register unsigned n)
+char *_stkseek(register Sfio_t *stream, register ssize_t n)
{
if(!init)
stkinit(n);
increment(seek);
- if(stkleft(stream) <= (int)n && !stkgrow(stream,n))
+ if(stkleft(stream) <= n && !stkgrow(stream,n))
return(0);
stream->_next = stream->_data+n;
return((char*)stream->_data);
@@ -422,7 +422,7 @@ char *_stkseek(register Sfio_t *stream, register unsigned n)
* advance the stack to the current top
* if extra is non-zero, first add a extra bytes and zero the first
*/
-char *stkfreeze(register Sfio_t *stream, register unsigned extra)
+char *stkfreeze(register Sfio_t *stream, register size_t extra)
{
register unsigned char *old, *top;
if(!init)
@@ -450,7 +450,7 @@ char *stkfreeze(register Sfio_t *stream, register unsigned extra)
char *stkcopy(Sfio_t *stream, const char* str)
{
register unsigned char *cp = (unsigned char*)str;
- register int n;
+ register size_t n;
register int off=stktell(stream);
char buff[40], *tp=buff;
if(off)
@@ -472,16 +472,19 @@ char *stkcopy(Sfio_t *stream, const char* str)
stkinit(n);
increment(copy);
if(stkleft(stream) <= n && !stkgrow(stream,n))
- return(0);
- strcpy((char*)(cp=stream->_data),str);
- stream->_data = stream->_next = cp+n;
- if(off)
+ cp = 0;
+ else
{
- _stkseek(stream,off);
- memcpy(stream->_data, tp, off);
- if(tp!=buff)
- free((void*)tp);
+ strcpy((char*)(cp=stream->_data),str);
+ stream->_data = stream->_next = cp+n;
+ if(off)
+ {
+ _stkseek(stream,off);
+ memcpy(stream->_data, tp, off);
+ }
}
+ if(tp!=buff)
+ free((void*)tp);
return((char*)cp);
}
@@ -492,14 +495,16 @@ char *stkcopy(Sfio_t *stream, const char* str)
* to the end is copied into the new stack frame
*/
-static char *stkgrow(register Sfio_t *stream, unsigned size)
+static char *stkgrow(register Sfio_t *stream, size_t size)
{
- register int n = size;
+ register size_t n = size;
register struct stk *sp = stream2stk(stream);
register struct frame *fp= (struct frame*)sp->stkbase;
register char *cp, *dp=0;
- register unsigned m = stktell(stream);
- int nn=0;
+ register size_t m = stktell(stream);
+ size_t endoff;
+ char *end=0;
+ int nn=0,add=1;
n += (m + sizeof(struct frame)+1);
if(sp->stkflags&STK_SMALL)
#ifndef USE_REALLOC
@@ -513,14 +518,24 @@ static char *stkgrow(register Sfio_t *stream, unsigned size)
nn = fp->nalias+1;
dp=sp->stkbase;
sp->stkbase = ((struct frame*)dp)->prev;
+ end = fp->end;
}
+ endoff = end - dp;
cp = newof(dp, char, n, nn*sizeof(char*));
if(!cp && (!sp->stkoverflow || !(cp = (*sp->stkoverflow)(n))))
return(0);
increment(grow);
count(addsize,n - (dp?m:0));
- if(dp && cp==dp)
+ if(dp==cp)
+ {
nn--;
+ add = 0;
+ }
+ else if(dp)
+ {
+ dp = cp;
+ end = dp + endoff;
+ }
fp = (struct frame*)cp;
fp->prev = sp->stkbase;
sp->stkbase = cp;
@@ -530,7 +545,10 @@ static char *stkgrow(register Sfio_t *stream, unsigned size)
if(fp->nalias=nn)
{
fp->aliases = (char**)fp->end;
- fp->aliases[nn-1] = dp + roundof(sizeof(struct frame),STK_ALIGN);
+ if(end && nn>1)
+ memmove(fp->aliases,end,(nn-1)*sizeof(char*));
+ if(add)
+ fp->aliases[nn-1] = dp + roundof(sizeof(struct frame),STK_ALIGN);
}
if(m && !dp)
{
diff --git a/usr/src/lib/libast/common/misc/systrace.c b/usr/src/contrib/ast/src/lib/libast/misc/systrace.c
index 072801a062..a084c29d70 100644
--- a/usr/src/lib/libast/common/misc/systrace.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/systrace.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/translate.c b/usr/src/contrib/ast/src/lib/libast/misc/translate.c
index f3754e694a..8b49273775 100644
--- a/usr/src/lib/libast/common/misc/translate.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/translate.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -47,6 +47,7 @@ typedef struct
nl_catd cat; /* message catalog handle */
int debug; /* special debug locale */
const char* locale; /* message catalog locale */
+ const char* nlspath; /* message catalog NLSPATH */
char name[1]; /* catalog name */
} Catalog_t;
@@ -71,7 +72,6 @@ typedef struct
Dtdisc_t catalog_disc; /* catalog dict discipline */
Dt_t* catalogs; /* catalog dictionary handle */
Sfio_t* tmp; /* temporary string stream */
- const char* debug; /* debug locale name */
int error; /* no dictionaries! */
char null[1]; /* null string */
} State_t;
@@ -129,17 +129,27 @@ sfprintf(sfstderr, "AHA#%d:%s set %d seq %d msg `%s'\n", __LINE__, __FILE__, set
static nl_catd
find(const char* locale, const char* catalog)
{
+ char* o;
+ nl_catd d;
char path[PATH_MAX];
-#if DEBUG_trace
- const char* ocatalog = catalog;
-#endif
- if (mcfind(path, locale, catalog, LC_MESSAGES, 0))
- catalog = (const char*)path;
-#if DEBUG_trace
-sfprintf(sfstderr, "AHA#%d:%s %s %s %s\n", __LINE__, __FILE__, locale, ocatalog, catalog);
-#endif
- return catopen(catalog, NL_CAT_LOCALE);
+ if (!mcfind(locale, catalog, LC_MESSAGES, 0, path, sizeof(path)) || (d = catopen(path, NL_CAT_LOCALE)) == NOCAT)
+ {
+ if (locale == (const char*)lc_categories[AST_LC_MESSAGES].prev)
+ o = 0;
+ else if (o = setlocale(LC_MESSAGES, NiL))
+ {
+ ast.locale.set |= AST_LC_internal;
+ setlocale(LC_MESSAGES, locale);
+ }
+ d = catopen(catalog, NL_CAT_LOCALE);
+ if (o)
+ {
+ setlocale(LC_MESSAGES, o);
+ ast.locale.set &= ~AST_LC_internal;
+ }
+ }
+ return d;
}
/*
@@ -150,9 +160,9 @@ static Catalog_t*
init(register char* s)
{
register Catalog_t* cp;
- register char* u;
register int n;
register int m;
+ register int set;
nl_catd d;
/*
@@ -173,20 +183,17 @@ init(register char* s)
* locate the default locale catalog
*/
- ast.locale.set |= AST_LC_internal;
- u = setlocale(LC_MESSAGES, NiL);
- setlocale(LC_MESSAGES, "C");
if ((d = find("C", s)) != NOCAT)
{
/*
* load the default locale messages
- * this assumes one mesage set for ast (AST_MESSAGE_SET)
+ * this assumes one mesage set for ast (AST_MESSAGE_SET or fallback to 1)
* different packages can share the same message catalog
* name by using different message set numbers
* see <mc.h> mcindex()
*
* this method requires a scan of each catalog, and the
- * catalogs do not advertize the max message number, so
+ * catalogs do not advertise the max message number, so
* we assume there are no messages after a gap of GAP
* missing messages
*/
@@ -197,7 +204,7 @@ init(register char* s)
for (;;)
{
n++;
- if ((s = catgets(d, AST_MESSAGE_SET, n, state.null)) != state.null && entry(cp->messages, AST_MESSAGE_SET, n, s))
+ if (((s = catgets(d, set = AST_MESSAGE_SET, n, state.null)) && *s || (s = catgets(d, set = 1, n, state.null)) && *s) && entry(cp->messages, set, n, s))
m = n;
else if ((n - m) > GAP)
break;
@@ -210,8 +217,6 @@ init(register char* s)
}
catclose(d);
}
- setlocale(LC_MESSAGES, u);
- ast.locale.set &= ~AST_LC_internal;
return cp;
}
@@ -296,6 +301,9 @@ translate(const char* loc, const char* cmd, const char* cat, const char* msg)
Catalog_t* cp;
Message_t* mp;
+ static uint32_t serial;
+ static char* nlspath;
+
oerrno = errno;
r = (char*)msg;
@@ -327,8 +335,6 @@ translate(const char* loc, const char* cmd, const char* cat, const char* msg)
state.error = 1;
goto done;
}
- if (streq(loc, "debug"))
- state.debug = loc;
}
/*
@@ -345,6 +351,7 @@ translate(const char* loc, const char* cmd, const char* cat, const char* msg)
#if DEBUG_trace > 1
sfprintf(sfstderr, "AHA#%d:%s cmd %s cat %s:%s id %s msg `%s'\n", __LINE__, __FILE__, cmd, cat, error_info.catalog, ast.id, msg);
#endif
+ cp = 0;
goto done;
}
@@ -355,9 +362,15 @@ sfprintf(sfstderr, "AHA#%d:%s cmd %s cat %s:%s id %s msg `%s'\n", __LINE__, __FI
#if DEBUG_trace
sfprintf(sfstderr, "AHA#%d:%s cp->locale `%s' %p loc `%s' %p\n", __LINE__, __FILE__, cp->locale, cp->locale, loc, loc);
#endif
- if (cp->locale != loc)
+ if (serial != ast.env_serial)
+ {
+ serial = ast.env_serial;
+ nlspath = getenv("NLSPATH");
+ }
+ if (cp->locale != loc || cp->nlspath != nlspath)
{
cp->locale = loc;
+ cp->nlspath = nlspath;
if (cp->cat != NOCAT)
catclose(cp->cat);
if ((cp->cat = find(cp->locale, cp->name)) == NOCAT)
@@ -382,37 +395,38 @@ sfprintf(sfstderr, "AHA#%d:%s cp->cat %p cp->debug %d NOCAT %p\n", __LINE__, __F
sfprintf(state.tmp, "(%s,%d,%d)%s", cp->name, mp->set, mp->seq, r);
r = tempuse(state.tmp, p);
}
- goto done;
}
-
- /*
- * get the translated message
- */
-
- r = catgets(cp->cat, mp->set, mp->seq, msg);
- if (ast.locale.set & AST_LC_translate)
- sfprintf(sfstderr, "translate locale=%s catalog=%s set=%d seq=%d \"%s\" => \"%s\"\n", cp->locale, cp->name, mp->set, mp->seq, msg, r == (char*)msg ? "NOPE" : r);
- if (r != (char*)msg)
+ else
{
- if (streq(r, (char*)msg))
- r = (char*)msg;
- else if (strcmp(fmtfmt(r), fmtfmt(msg)))
+ /*
+ * get the translated message
+ */
+
+ r = catgets(cp->cat, mp->set, mp->seq, msg);
+ if (r != (char*)msg)
{
- sfprintf(sfstderr, "locale %s catalog %s message %d.%d \"%s\" does not match \"%s\"\n", cp->locale, cp->name, mp->set, mp->seq, r, msg);
- r = (char*)msg;
+ if (streq(r, (char*)msg))
+ r = (char*)msg;
+ else if (strcmp(fmtfmt(r), fmtfmt(msg)))
+ {
+ sfprintf(sfstderr, "locale %s catalog %s message %d.%d \"%s\" does not match \"%s\"\n", cp->locale, cp->name, mp->set, mp->seq, r, msg);
+ r = (char*)msg;
+ }
+ }
+ if (ast.locale.set & AST_LC_debug)
+ {
+ p = tempget(state.tmp);
+ sfprintf(state.tmp, "(%s,%d,%d)%s", cp->name, mp->set, mp->seq, r);
+ r = tempuse(state.tmp, p);
}
}
- if (ast.locale.set & AST_LC_debug)
- {
- p = tempget(state.tmp);
- sfprintf(state.tmp, "(%s,%d,%d)%s", cp->name, mp->set, mp->seq, r);
- r = tempuse(state.tmp, p);
- }
+ if (ast.locale.set & AST_LC_translate)
+ sfprintf(sfstderr, "translate locale=%s catalog=%s set=%d seq=%d \"%s\" => \"%s\"\n", cp->locale, cp->name, mp->set, mp->seq, msg, r == (char*)msg ? "NOPE" : r);
done:
- if (r == (char*)msg && loc == state.debug)
+ if (r == (char*)msg && (!cp && streq(loc, "debug") || cp && cp->debug))
{
p = tempget(state.tmp);
- sfprintf(state.tmp, "(%s,%s,%s,\"%s\")", loc, cmd, cat, r);
+ sfprintf(state.tmp, "(%s,%s,%s,%s)", loc, cmd, cat, r);
r = tempuse(state.tmp, p);
}
errno = oerrno;
diff --git a/usr/src/lib/libast/common/misc/univdata.c b/usr/src/contrib/ast/src/lib/libast/misc/univdata.c
index 8421b07375..0cc04df620 100644
--- a/usr/src/lib/libast/common/misc/univdata.c
+++ b/usr/src/contrib/ast/src/lib/libast/misc/univdata.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/misc/univlib.h b/usr/src/contrib/ast/src/lib/libast/misc/univlib.h
index 4e05ae925e..ba319c5c45 100644
--- a/usr/src/lib/libast/common/misc/univlib.h
+++ b/usr/src/contrib/ast/src/lib/libast/misc/univlib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/obsolete/spawn.c b/usr/src/contrib/ast/src/lib/libast/obsolete/spawn.c
index 738653fcdb..282ec3a2a2 100644
--- a/usr/src/lib/libast/common/obsolete/spawn.c
+++ b/usr/src/contrib/ast/src/lib/libast/obsolete/spawn.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -88,7 +88,7 @@ spawnvpe(const char* name, char* const argv[], char* const envv[])
char buffer[PATH_MAX];
if (*path != '/')
- path = pathpath(buffer, name, NULL, PATH_REGULAR|PATH_EXECUTE);
+ path = pathpath(name, NULL, PATH_REGULAR|PATH_EXECUTE, buffer, sizeof(buffer));
if ((pid = spawnve(path, argv, envv)) >= 0)
return pid;
if (errno == ENOEXEC)
diff --git a/usr/src/lib/libast/common/path/pathaccess.c b/usr/src/contrib/ast/src/lib/libast/path/pathaccess.c
index 188d24d404..7bbec12afb 100644
--- a/usr/src/lib/libast/common/path/pathaccess.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathaccess.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,10 +32,22 @@
* path returned in path buffer
*/
+#define _AST_API_H 1
+
#include <ast.h>
char*
-pathaccess(register char* path, register const char* dirs, const char* a, const char* b, register int mode)
+pathaccess(char* path, const char* dirs, const char* a, const char* b, int mode)
+{
+ return pathaccess_20100601(dirs, a, b, mode, path, PATH_MAX);
+}
+
+#undef _AST_API_H
+
+#include <ast_api.h>
+
+char*
+pathaccess_20100601(register const char* dirs, const char* a, const char* b, register int mode, register char* path, size_t size)
{
int sib = a && a[0] == '.' && a[1] == '.' && a[2] == 0;
int sep = ':';
@@ -43,8 +55,8 @@ pathaccess(register char* path, register const char* dirs, const char* a, const
do
{
- dirs = pathcat(path, dirs, sep, a, b);
- pathcanon(path, 0);
+ dirs = pathcat(dirs, sep, a, b, path, size);
+ pathcanon(path, size, 0);
if ((!sib || *path == '/') && pathexists(path, mode))
{
if (*path == '/' || !(mode & PATH_ABSOLUTE))
diff --git a/usr/src/lib/libast/common/path/pathbin.c b/usr/src/contrib/ast/src/lib/libast/path/pathbin.c
index 3f455d8fe7..cc9cdfa4d5 100644
--- a/usr/src/lib/libast/common/path/pathbin.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathbin.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathcanon.c b/usr/src/contrib/ast/src/lib/libast/path/pathcanon.c
index b2dd0e4d80..8d3cfa641f 100644
--- a/usr/src/lib/libast/common/path/pathcanon.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathcanon.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -41,6 +41,8 @@
* will contain the components following the failure point
*/
+#define _AST_API_H 1
+
#include <ast.h>
#include <ls.h>
#include <fs3d.h>
@@ -49,6 +51,16 @@
char*
pathcanon(char* path, int flags)
{
+ return pathcanon_20100601(path, PATH_MAX, flags);
+}
+
+#undef _AST_API_H
+
+#include <ast_api.h>
+
+char*
+pathcanon_20100601(char* path, size_t size, int flags)
+{
register char* p;
register char* r;
register char* s;
@@ -66,6 +78,8 @@ pathcanon(char* path, int flags)
dots = loop = 0;
phys = path;
v = path + ((flags >> 5) & 01777);
+ if (!size)
+ size = strlen(path) + 1;
if (*path == '/')
{
if (*(path + 1) == '/' && *astconf("PATH_LEADING_SLASHES", NiL, NiL) == '1')
@@ -74,134 +88,135 @@ pathcanon(char* path, int flags)
return path + 1;
}
p = r = s = t = path;
- for (;;) switch (*t++ = *s++)
- {
- case '.':
- dots++;
- break;
- case 0:
- s--;
- /*FALLTHROUGH*/
- case '/':
- while (*s == '/') s++;
- switch (dots)
+ for (;;)
+ switch (*t++ = *s++)
{
- case 1:
- t -= 2;
+ case '.':
+ dots++;
break;
- case 2:
- if ((flags & (PATH_DOTDOT|PATH_EXISTS)) == PATH_DOTDOT && (t - 2) >= v)
+ case 0:
+ s--;
+ /*FALLTHROUGH*/
+ case '/':
+ while (*s == '/') s++;
+ switch (dots)
{
- struct stat st;
-
- *(t - 2) = 0;
- if (stat(phys, &st))
+ case 1:
+ t -= 2;
+ break;
+ case 2:
+ if ((flags & (PATH_DOTDOT|PATH_EXISTS)) == PATH_DOTDOT && (t - 2) >= v)
{
- strcpy(path, s);
- return 0;
+ struct stat st;
+
+ *(t - 2) = 0;
+ if (stat(phys, &st))
+ {
+ strcpy(path, s);
+ return 0;
+ }
+ *(t - 2) = '.';
}
- *(t - 2) = '.';
- }
#if PRESERVE_TRAILING_SLASH
- if (t - 5 < r) r = t;
+ if (t - 5 < r) r = t;
#else
- if (t - 5 < r)
- {
- if (t - 4 == r) t = r + 1;
- else r = t;
- }
+ if (t - 5 < r)
+ {
+ if (t - 4 == r) t = r + 1;
+ else r = t;
+ }
#endif
- else for (t -= 5; t > r && *(t - 1) != '/'; t--);
- break;
- case 3:
+ else for (t -= 5; t > r && *(t - 1) != '/'; t--);
+ break;
+ case 3:
#if defined(FS_3D)
- {
- char* x;
- char* o;
- int c;
-
- o = t;
- if ((t -= 5) <= path) t = path + 1;
- c = *t;
- *t = 0;
- if (x = pathnext(phys, s - (*s != 0), &visits))
{
- r = path;
- if (t == r + 1) x = r;
- v = s = t = x;
+ char* x;
+ char* o;
+ int c;
+
+ o = t;
+ if ((t -= 5) <= path) t = path + 1;
+ c = *t;
+ *t = 0;
+ if (x = pathnext(phys, s - (*s != 0), &visits))
+ {
+ r = path;
+ if (t == r + 1) x = r;
+ v = s = t = x;
+ }
+ else
+ {
+ *t = c;
+ t = o;
+ }
}
- else
+#else
+ r = t;
+#endif
+ break;
+ default:
+ if ((flags & PATH_PHYSICAL) && loop < 32 && (t - 1) > path)
{
- *t = c;
- t = o;
+ int c;
+ char buf[PATH_MAX];
+
+ c = *(t - 1);
+ *(t - 1) = 0;
+ dots = pathgetlink(phys, buf, sizeof(buf));
+ *(t - 1) = c;
+ if (dots > 0)
+ {
+ loop++;
+ strcpy(buf + dots, s - (*s != 0));
+ if (*buf == '/') p = r = path;
+ v = s = t = p;
+ strcpy(p, buf);
+ }
+ else if (dots < 0 && errno == ENOENT)
+ {
+ if (flags & PATH_EXISTS)
+ {
+ strcpy(path, s);
+ return 0;
+ }
+ flags &= ~(PATH_PHYSICAL|PATH_DOTDOT);
+ }
+ dots = 4;
}
+ break;
}
-#else
- r = t;
-#endif
- break;
- default:
- if ((flags & PATH_PHYSICAL) && loop < 32 && (t - 1) > path)
+ if (dots >= 4 && (flags & PATH_EXISTS) && (t - 1) >= v && (t > path + 1 || t > path && *(t - 1) && *(t - 1) != '/'))
{
- int c;
- char buf[PATH_MAX];
+ struct stat st;
- c = *(t - 1);
*(t - 1) = 0;
- dots = pathgetlink(phys, buf, sizeof(buf));
- *(t - 1) = c;
- if (dots > 0)
- {
- loop++;
- strcpy(buf + dots, s - (*s != 0));
- if (*buf == '/') p = r = path;
- v = s = t = p;
- strcpy(p, buf);
- }
- else if (dots < 0 && errno == ENOENT)
+ if (stat(phys, &st))
{
- if (flags & PATH_EXISTS)
- {
- strcpy(path, s);
- return 0;
- }
- flags &= ~(PATH_PHYSICAL|PATH_DOTDOT);
+ strcpy(path, s);
+ return 0;
}
- dots = 4;
+ v = t;
+ if (*s) *(t - 1) = '/';
}
- break;
- }
- if (dots >= 4 && (flags & PATH_EXISTS) && (t - 1) >= v && (t > path + 1 || t > path && *(t - 1) && *(t - 1) != '/'))
- {
- struct stat st;
-
- *(t - 1) = 0;
- if (stat(phys, &st))
+ if (!*s)
{
- strcpy(path, s);
- return 0;
- }
- v = t;
- if (*s) *(t - 1) = '/';
- }
- if (!*s)
- {
- if (t > path && !*(t - 1)) t--;
- if (t == path) *t++ = '.';
+ if (t > path && !*(t - 1)) t--;
+ if (t == path) *t++ = '.';
#if DONT_PRESERVE_TRAILING_SLASH
- else if (t > path + 1 && *(t - 1) == '/') t--;
+ else if (t > path + 1 && *(t - 1) == '/') t--;
#else
- else if ((s <= path || *(s - 1) != '/') && t > path + 1 && *(t - 1) == '/') t--;
+ else if ((s <= path || *(s - 1) != '/') && t > path + 1 && *(t - 1) == '/') t--;
#endif
- *t = 0;
- errno = oerrno;
- return t;
+ *t = 0;
+ errno = oerrno;
+ return t;
+ }
+ dots = 0;
+ p = t;
+ break;
+ default:
+ dots = 4;
+ break;
}
- dots = 0;
- p = t;
- break;
- default:
- dots = 4;
- break;
- }
}
diff --git a/usr/src/lib/libast/common/path/pathcat.c b/usr/src/contrib/ast/src/lib/libast/path/pathcat.c
index cc200c3411..2fa9cde14b 100644
--- a/usr/src/lib/libast/common/path/pathcat.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathcat.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,28 +27,72 @@
* single dir support for pathaccess()
*/
+#define _AST_API_H 1
+
#include <ast.h>
+/*
+ * building 3d flirts with the dark side
+ */
+
+#if _BLD_3d
+
+#undef pathcat
+#define pathcat_20100601 _3d_pathcat
+
+#else
+
+char*
+pathcat(char* path, const char* dirs, int sep, const char* a, const char* b)
+{
+ return pathcat_20100601(dirs, sep, a, b, path, PATH_MAX);
+}
+
+#endif
+
+#undef _AST_API
+
+#include <ast_api.h>
+
char*
-pathcat(char* path, register const char* dirs, int sep, const char* a, register const char* b)
+pathcat_20100601(register const char* dirs, int sep, const char* a, register const char* b, char* path, size_t size)
{
register char* s;
+ register char* e;
s = path;
+ e = path + size;
while (*dirs && *dirs != sep)
+ {
+ if (s >= e)
+ return 0;
*s++ = *dirs++;
+ }
if (s != path)
+ {
+ if (s >= e)
+ return 0;
*s++ = '/';
+ }
if (a)
{
while (*s = *a++)
- s++;
+ if (++s >= e)
+ return 0;
if (b)
+ {
+ if (s >= e)
+ return 0;
*s++ = '/';
+ }
}
else if (!b)
b = ".";
if (b)
- while (*s++ = *b++);
+ do
+ {
+ if (s >= e)
+ return 0;
+ } while (*s++ = *b++);
return *dirs ? (char*)++dirs : 0;
}
diff --git a/usr/src/lib/libast/common/path/pathcd.c b/usr/src/contrib/ast/src/lib/libast/path/pathcd.c
index b9cd837268..340a115a27 100644
--- a/usr/src/lib/libast/common/path/pathcd.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathcd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathcheck.c b/usr/src/contrib/ast/src/lib/libast/path/pathcheck.c
index 5857c5a896..4ff79f619f 100644
--- a/usr/src/lib/libast/common/path/pathcheck.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathcheck.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathexists.c b/usr/src/contrib/ast/src/lib/libast/path/pathexists.c
index 3bf4b53fc5..90b4ae70e4 100644
--- a/usr/src/lib/libast/common/path/pathexists.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathexists.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathfind.c b/usr/src/contrib/ast/src/lib/libast/path/pathfind.c
index 8a4c2fb236..54dc140790 100644
--- a/usr/src/lib/libast/common/path/pathfind.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathfind.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -136,12 +136,12 @@ pathfind(const char* name, const char* lib, const char* type, char* buf, size_t
for (dp = state.head; dp; dp = dp->next)
{
sfsprintf(tmp, sizeof(tmp), "%s/%s", dp->dir, name);
- if (pathpath(buf, tmp, "", PATH_REGULAR))
+ if (pathpath(tmp, "", PATH_REGULAR, buf, size))
return buf;
if (type)
{
sfsprintf(tmp, sizeof(tmp), "%s/%s.%s", dp->dir, name, type);
- if (pathpath(buf, tmp, "", PATH_REGULAR))
+ if (pathpath(tmp, "", PATH_REGULAR, buf, size))
return buf;
}
}
@@ -155,12 +155,12 @@ pathfind(const char* name, const char* lib, const char* type, char* buf, size_t
if (s = strrchr((char*)lib, ':'))
lib = (const char*)s + 1;
sfsprintf(tmp, sizeof(tmp), "lib/%s/%s", lib, name);
- if (pathpath(buf, tmp, "", PATH_REGULAR))
+ if (pathpath(tmp, "", PATH_REGULAR, buf, size))
return buf;
if (type)
{
sfsprintf(tmp, sizeof(tmp), "lib/%s/%s.%s", lib, name, type);
- if (pathpath(buf, tmp, "", PATH_REGULAR))
+ if (pathpath(tmp, "", PATH_REGULAR, buf, size))
return buf;
}
}
diff --git a/usr/src/lib/libast/common/path/pathgetlink.c b/usr/src/contrib/ast/src/lib/libast/path/pathgetlink.c
index a2fbd41d47..00225945d6 100644
--- a/usr/src/lib/libast/common/path/pathgetlink.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathgetlink.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathkey.c b/usr/src/contrib/ast/src/lib/libast/path/pathkey.c
index bc153ea7c8..2432d8372a 100644
--- a/usr/src/lib/libast/common/path/pathkey.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathkey.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,13 +32,26 @@
* ATTRIBUTES list of attribute names
*/
+#define _AST_API_H 1
+
#include <ast.h>
#include <ctype.h>
#include <fs3d.h>
#include <preroot.h>
+#include <ls.h>
+
+char*
+pathkey(char* key, char* attr, const char* lang, const char* tool, const char* path)
+{
+ return pathkey_20100601(lang, tool, path, key, 16, attr, PATH_MAX);
+}
+
+#undef _AST_API_H
+
+#include <ast_api.h>
char*
-pathkey(char* key, char* attr, const char* lang, const char* tool, const char* apath)
+pathkey_20100601(const char* lang, const char* tool, const char* apath, char* key, size_t keysize, char* attr, size_t attrsize)
{
register char* path = (char*)apath;
register char* s;
@@ -53,6 +66,9 @@ pathkey(char* key, char* attr, const char* lang, const char* tool, const char* a
char* env[elementsof(usr) + 3];
char* ver[2];
char tmp[PATH_MAX];
+#if _UWIN
+ struct stat st;
+#endif
static char let[] = "ABCDEFGHIJKLMNOP";
@@ -83,7 +99,7 @@ pathkey(char* key, char* attr, const char* lang, const char* tool, const char* a
flags = 0;
else
{
- strcpy(tmp, path);
+ strlcpy(tmp, path, sizeof(tmp));
*(flags = tmp + (flags - path)) = 0;
path = tmp;
}
@@ -93,7 +109,7 @@ pathkey(char* key, char* attr, const char* lang, const char* tool, const char* a
* 3D
*/
- if (fs3d(FS3D_TEST) && (c = mount(path, tmp, FS3D_GET|FS3D_ALL|FS3D_SIZE(PATH_MAX), NiL)) > 1 && c < PATH_MAX)
+ if (!flags && fs3d(FS3D_TEST) && (c = mount(path, tmp, FS3D_GET|FS3D_ALL|FS3D_SIZE(PATH_MAX), NiL)) > 1 && c < PATH_MAX)
path = tmp;
/*
@@ -119,6 +135,15 @@ pathkey(char* key, char* attr, const char* lang, const char* tool, const char* a
attr = strcopy(attr, k);
}
#endif
+#if _UWIN
+ if (!stat("/", &st) && st.st_ino == 64)
+ {
+ k = "/64";
+ n = memsum(k, strlen(k), n);
+ if (attr)
+ attr = strcopy(attr, k);
+ }
+#endif
/*
* universe
diff --git a/usr/src/lib/libast/common/path/pathnative.c b/usr/src/contrib/ast/src/lib/libast/path/pathnative.c
index 1f3eedb0e5..c683d17d38 100644
--- a/usr/src/lib/libast/common/path/pathnative.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathnative.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathpath.c b/usr/src/contrib/ast/src/lib/libast/path/pathpath.c
index 36be12d741..4c0831d803 100644
--- a/usr/src/lib/libast/common/path/pathpath.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathpath.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -33,10 +33,22 @@
* if path==0 then the space is malloc'd
*/
+#define _AST_API_H 1
+
#include <ast.h>
char*
-pathpath(register char* path, const char* p, const char* a, int mode)
+pathpath(char* path, const char* p, const char* a, int mode)
+{
+ return pathpath_20100601(p, a, mode, path, PATH_MAX);
+}
+
+#undef _AST_API_H
+
+#include <ast_api.h>
+
+char*
+pathpath_20100601(const char* p, const char* a, int mode, register char* path, size_t size)
{
register char* s;
char* x;
@@ -45,7 +57,11 @@ pathpath(register char* path, const char* p, const char* a, int mode)
static char* cmd;
if (!path)
+ {
path = buf;
+ if (!size || size > sizeof(buf))
+ size = sizeof(buf);
+ }
if (!p)
{
if (cmd)
@@ -53,7 +69,7 @@ pathpath(register char* path, const char* p, const char* a, int mode)
cmd = a ? strdup(a) : (char*)0;
return 0;
}
- if (strlen(p) < PATH_MAX)
+ if (strlen(p) < size)
{
strcpy(path, p);
if (pathexists(path, mode))
@@ -95,7 +111,7 @@ pathpath(register char* path, const char* p, const char* a, int mode)
strcpy(s + 1, "bin");
if (pathexists(path, PATH_EXECUTE))
{
- if (s = pathaccess(path, path, p, a, mode))
+ if (s = pathaccess(path, p, a, mode, path, size))
return path == buf ? strdup(s) : s;
goto normal;
}
@@ -105,7 +121,7 @@ pathpath(register char* path, const char* p, const char* a, int mode)
}
}
x = !a && strchr(p, '/') ? "" : pathbin();
- if (!(s = pathaccess(path, x, p, a, mode)) && !*x && (x = getenv("FPATH")))
- s = pathaccess(path, x, p, a, mode);
+ if (!(s = pathaccess(x, p, a, mode, path, size)) && !*x && (x = getenv("FPATH")))
+ s = pathaccess(x, p, a, mode, path, size);
return (s && path == buf) ? strdup(s) : s;
}
diff --git a/usr/src/lib/libast/common/path/pathposix.c b/usr/src/contrib/ast/src/lib/libast/path/pathposix.c
index fcfb053adc..d220591d58 100644
--- a/usr/src/lib/libast/common/path/pathposix.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathposix.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathprobe.c b/usr/src/contrib/ast/src/lib/libast/path/pathprobe.c
index a7cefd113c..004ee287af 100644
--- a/usr/src/lib/libast/common/path/pathprobe.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathprobe.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -41,11 +41,23 @@
* 0 returned if the info does not exist and cannot be generated
*/
+#define _AST_API_H 1
+
#include <ast.h>
#include <error.h>
#include <ls.h>
#include <proc.h>
+char*
+pathprobe(char* path, char* attr, const char* lang, const char* tool, const char* proc, int op)
+{
+ return pathprobe_20100601(lang, tool, proc, op, path, PATH_MAX, attr, PATH_MAX);
+}
+
+#undef _AST_API_H
+
+#include <ast_api.h>
+
#ifndef PROBE
#define PROBE "probe"
#endif
@@ -83,7 +95,7 @@ rofs(const char* path)
#endif
char*
-pathprobe(char* path, char* attr, const char* lang, const char* tool, const char* aproc, int op)
+pathprobe_20100601(const char* lang, const char* tool, const char* aproc, int op, char* path, size_t pathsize, char* attr, size_t attrsize)
{
char* proc = (char*)aproc;
register char* p;
@@ -121,7 +133,7 @@ pathprobe(char* path, char* attr, const char* lang, const char* tool, const char
strncopy(buf, proc, p - proc + 1);
proc = buf;
}
- if (!(proc = pathpath(cmd, proc, NiL, PATH_ABSOLUTE|PATH_REGULAR|PATH_EXECUTE)))
+ if (!(proc = pathpath(proc, NiL, PATH_ABSOLUTE|PATH_REGULAR|PATH_EXECUTE, cmd, sizeof(cmd))))
proc = (char*)aproc;
else if (p)
{
@@ -130,20 +142,23 @@ pathprobe(char* path, char* attr, const char* lang, const char* tool, const char
}
}
if (!path)
+ {
path = buf;
+ pathsize = sizeof(buf);
+ }
probe = PROBE;
x = lib + sizeof(lib) - 1;
k = lib + sfsprintf(lib, x - lib, "lib/%s/", probe);
p = k + sfsprintf(k, x - k, "%s/%s/", lang, tool);
- pathkey(key, attr, lang, tool, proc);
+ pathkey(lang, tool, proc, key, sizeof(key), attr, attrsize);
if (op >= -2)
{
strncopy(p, key, x - p);
- if (pathpath(path, lib, "", PATH_ABSOLUTE) && !stat(path, &st) && (st.st_mode & S_IWUSR))
+ if (pathpath(lib, "", PATH_ABSOLUTE, path, pathsize) && !stat(path, &st) && (st.st_mode & S_IWUSR))
return path == buf ? strdup(path) : path;
}
e = strncopy(p, probe, x - p);
- if (!pathpath(path, lib, "", PATH_ABSOLUTE|PATH_EXECUTE) || stat(path, &ps))
+ if (!pathpath(lib, "", PATH_ABSOLUTE|PATH_EXECUTE, path, pathsize) || stat(path, &ps))
return 0;
for (;;)
{
@@ -175,12 +190,12 @@ pathprobe(char* path, char* attr, const char* lang, const char* tool, const char
{
if (!(dir = dirs))
return 0;
- dirs = pathcat(path, dir, ':', "..", exe);
- pathcanon(path, 0);
+ dirs = pathcat(dir, ':', "..", exe, path, pathsize);
+ pathcanon(path, pathsize, 0);
if (*path == '/' && pathexists(path, PATH_REGULAR|PATH_EXECUTE))
{
- pathcat(path, dir, ':', "..", lib);
- pathcanon(path, 0);
+ pathcat(dir, ':', "..", lib, path, pathsize);
+ pathcanon(path, pathsize, 0);
if (*path == '/' && pathexists(path, PATH_REGULAR|PATH_EXECUTE) && !stat(path, &ps))
break;
}
@@ -241,11 +256,20 @@ pathprobe(char* path, char* attr, const char* lang, const char* tool, const char
{
if ((v = x - e) >= sizeof(ver))
v = sizeof(ver) - 1;
- for (k = p = ver;; k++)
+ k = p = ver;
+ for (;;)
{
if (k >= p)
{
- if (v <= 0 || (r = read(pp->rfd, k, v)) <= 0)
+ if (v <= 0)
+ break;
+ if ((r = read(pp->rfd, k, v)) < 0)
+ {
+ if (errno == EINTR)
+ continue;
+ break;
+ }
+ if (r <= 0)
break;
v -= r;
p = k + r;
@@ -254,6 +278,7 @@ pathprobe(char* path, char* attr, const char* lang, const char* tool, const char
break;
if (*k == n)
*k = ' ';
+ k++;
}
*k = 0;
if (strcmp(ver, e))
diff --git a/usr/src/lib/libast/common/path/pathprog.c b/usr/src/contrib/ast/src/lib/libast/path/pathprog.c
index 9b7936992c..62e96535b5 100644
--- a/usr/src/lib/libast/common/path/pathprog.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathprog.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -37,22 +37,29 @@
#include "FEATURE/prog"
+#if _hdr_macho_o_dyld && _lib__NSGetExecutablePath
+#include <mach-o/dyld.h>
+#else
+#undef _lib__NSGetExecutablePath
+#endif
+
static size_t
prog(const char* command, char* path, size_t size)
{
ssize_t n;
-#if _WINIX || _lib_getexecname
char* s;
-#endif
#if _WINIX
char* t;
char* e;
int c;
int q;
#endif
+#if _lib__NSGetExecutablePath
+ uint32_t z;
+#endif
#ifdef _PROC_PROG
- if ((n = readlink(_PROC_PROG, path, size)) > 0)
+ if ((n = readlink(_PROC_PROG, path, size)) > 0 && *path == '/')
{
if (n < size)
path[n] = 0;
@@ -60,13 +67,13 @@ prog(const char* command, char* path, size_t size)
}
#endif
#if _lib_getexecname
- if (s = (char*)getexecname())
- {
- n = strlen(s);
- if (n < size)
- strcpy(path, s);
- return n;
- }
+ if ((s = (char*)getexecname()) && *s == '/')
+ goto found;
+#endif
+#if _lib__NSGetExecutablePath
+ z = size;
+ if (!_NSGetExecutablePath(path, &z) && *path == '/')
+ return strlen(path);
#endif
#if _WINIX
if (s = GetCommandLine())
@@ -95,25 +102,27 @@ prog(const char* command, char* path, size_t size)
#endif
if (command)
{
- if ((n = strlen(command) + 1) <= size)
- memcpy(path, command, n);
- return n;
+ s = (char*)command;
+ goto found;
}
return 0;
+ found:
+ n = strlen(s);
+ if (n < size)
+ memcpy(path, s, n + 1);
+ return n;
}
size_t
pathprog(const char* command, char* path, size_t size)
{
+ char* rel;
ssize_t n;
- char buf[PATH_MAX];
- if ((n = prog(command, path, size)) > 0 && n <= size && *path != '/')
+ if ((n = prog(command, path, size)) > 0 && n < size && *path != '/' && (rel = strdup(path)))
{
- if (!pathpath(buf, path, NiL, PATH_REGULAR|PATH_EXECUTE))
- n = 0;
- else if ((n = strlen(buf) + 1) <= size)
- memcpy(path, buf, n);
+ n = pathpath(rel, NiL, PATH_REGULAR|PATH_EXECUTE, path, size) ? strlen(path) : 0;
+ free(rel);
}
return n;
}
diff --git a/usr/src/lib/libast/common/path/pathrepl.c b/usr/src/contrib/ast/src/lib/libast/path/pathrepl.c
index 31c5b5ac57..d16a3900d4 100644
--- a/usr/src/lib/libast/common/path/pathrepl.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathrepl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,19 +28,35 @@
* end of path returned
*/
+#define _AST_API_H 1
+
#include <ast.h>
char*
-pathrepl(register char* path, const char* match, register const char* replace)
+pathrepl(char* path, const char* match, const char* replace)
+{
+ return pathrepl_20100601(path, PATH_MAX, match, replace);
+}
+
+#undef _AST_API_H
+
+#include <ast_api.h>
+
+char*
+pathrepl_20100601(register char* path, size_t size, const char* match, register const char* replace)
{
register const char* m = match;
register const char* r;
char* t;
- if (!match) match = "";
- if (!replace) replace = "";
+ if (!match)
+ match = "";
+ if (!replace)
+ replace = "";
if (streq(match, replace))
return(path + strlen(path));
+ if (!size)
+ size = strlen(path) + 1;
for (;;)
{
while (*path && *path++ != '/');
diff --git a/usr/src/lib/libast/common/path/pathsetlink.c b/usr/src/contrib/ast/src/lib/libast/path/pathsetlink.c
index 1469595232..48aa4fe1f0 100644
--- a/usr/src/lib/libast/common/path/pathsetlink.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathsetlink.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathshell.c b/usr/src/contrib/ast/src/lib/libast/path/pathshell.c
index 64889c5376..f4b255722f 100644
--- a/usr/src/lib/libast/common/path/pathshell.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathshell.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathstat.c b/usr/src/contrib/ast/src/lib/libast/path/pathstat.c
index 2067e0ceec..6d414ca6e6 100644
--- a/usr/src/lib/libast/common/path/pathstat.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathstat.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/path/pathtemp.c b/usr/src/contrib/ast/src/lib/libast/path/pathtemp.c
index 21f9cf17a6..844c86ae5d 100644
--- a/usr/src/lib/libast/common/path/pathtemp.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathtemp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -297,7 +297,7 @@ pathtemp(char* buf, size_t len, const char* dir, const char* pfx, int* fdp)
*/
tmp.pid = getpid();
- tmp.rng = (uintptr_t)tmp.pid * ((uintptr_t)time(NiL) ^ (((uintptr_t)(&attempt)) >> 3) ^ (((uintptr_t)tmp.dir) >> 3));
+ tmp.rng = (uint32_t)tmp.pid * ((uint32_t)time(NiL) ^ (((uint32_t)integralof(&attempt)) >> 3) ^ (((uint32_t)integralof(tmp.dir)) >> 3));
if (!tmp.key)
tmp.key = (tmp.rng >> 16) | ((tmp.rng & 0xffff) << 16);
tmp.rng ^= tmp.key;
diff --git a/usr/src/lib/libast/common/path/pathtmp.c b/usr/src/contrib/ast/src/lib/libast/path/pathtmp.c
index 06b97755fa..aac0243fc0 100644
--- a/usr/src/lib/libast/common/path/pathtmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/path/pathtmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/port/astconf.c b/usr/src/contrib/ast/src/lib/libast/port/astconf.c
index b99eb27174..d1a829b89c 100644
--- a/usr/src/lib/libast/common/port/astconf.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/astconf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -26,7 +26,7 @@
* extended to allow some features to be set per-process
*/
-static const char id[] = "\n@(#)$Id: getconf (AT&T Research) 2009-07-02 $\0\n";
+static const char id[] = "\n@(#)$Id: getconf (AT&T Research) 2012-05-01 $\0\n";
#include "univlib.h"
@@ -36,6 +36,8 @@ static const char id[] = "\n@(#)$Id: getconf (AT&T Research) 2009-07-02 $\0\n";
#include <ctype.h>
#include <regex.h>
#include <proc.h>
+#include <ls.h>
+#include <sys/utsname.h>
#include "conftab.h"
#include "FEATURE/libpath"
@@ -88,8 +90,8 @@ static const char id[] = "\n@(#)$Id: getconf (AT&T Research) 2009-07-02 $\0\n";
#define _UNIV_DEFAULT "att"
#endif
-static char null[1];
-static char root[2] = "/";
+static char null[1];
+static char root[2] = "/";
typedef struct Feature_s
{
@@ -104,7 +106,7 @@ typedef struct Feature_s
short op;
} Feature_t;
-typedef struct
+typedef struct Lookup_s
{
Conf_t* conf;
const char* name;
@@ -116,7 +118,19 @@ typedef struct
static Feature_t dynamic[] =
{
-#define OP_conformance 0
+#define OP_architecture 0
+ {
+ &dynamic[OP_architecture+1],
+ "ARCHITECTURE",
+ &null[0],
+ 0,
+ 0,
+ 12,
+ CONF_AST,
+ 0,
+ OP_architecture
+ },
+#define OP_conformance 1
{
&dynamic[OP_conformance+1],
"CONFORMANCE",
@@ -128,7 +142,7 @@ static Feature_t dynamic[] =
0,
OP_conformance
},
-#define OP_fs_3d 1
+#define OP_fs_3d 2
{
&dynamic[OP_fs_3d+1],
"FS_3D",
@@ -140,7 +154,7 @@ static Feature_t dynamic[] =
0,
OP_fs_3d
},
-#define OP_getconf 2
+#define OP_getconf 3
{
&dynamic[OP_getconf+1],
"GETCONF",
@@ -156,7 +170,7 @@ static Feature_t dynamic[] =
CONF_READONLY,
OP_getconf
},
-#define OP_hosttype 3
+#define OP_hosttype 4
{
&dynamic[OP_hosttype+1],
"HOSTTYPE",
@@ -168,7 +182,7 @@ static Feature_t dynamic[] =
CONF_READONLY,
OP_hosttype
},
-#define OP_libpath 4
+#define OP_libpath 5
{
&dynamic[OP_libpath+1],
"LIBPATH",
@@ -184,7 +198,7 @@ static Feature_t dynamic[] =
0,
OP_libpath
},
-#define OP_libprefix 5
+#define OP_libprefix 6
{
&dynamic[OP_libprefix+1],
"LIBPREFIX",
@@ -200,7 +214,7 @@ static Feature_t dynamic[] =
0,
OP_libprefix
},
-#define OP_libsuffix 6
+#define OP_libsuffix 7
{
&dynamic[OP_libsuffix+1],
"LIBSUFFIX",
@@ -216,7 +230,7 @@ static Feature_t dynamic[] =
0,
OP_libsuffix
},
-#define OP_path_attributes 7
+#define OP_path_attributes 8
{
&dynamic[OP_path_attributes+1],
"PATH_ATTRIBUTES",
@@ -232,7 +246,7 @@ static Feature_t dynamic[] =
CONF_READONLY,
OP_path_attributes
},
-#define OP_path_resolve 8
+#define OP_path_resolve 9
{
&dynamic[OP_path_resolve+1],
"PATH_RESOLVE",
@@ -244,7 +258,7 @@ static Feature_t dynamic[] =
0,
OP_path_resolve
},
-#define OP_universe 9
+#define OP_universe 10
{
0,
"UNIVERSE",
@@ -261,11 +275,13 @@ static Feature_t dynamic[] =
}
};
-typedef struct
+typedef struct State_s
{
const char* id;
const char* name;
+ const char* standard;
+ const char* strict;
Feature_t* features;
int std;
@@ -284,9 +300,9 @@ typedef struct
} State_t;
-static State_t state = { "getconf", "_AST_FEATURES", dynamic, -1 };
+static State_t state = { "getconf", "_AST_FEATURES", "CONFORMANCE = standard", "POSIXLY_CORRECT", dynamic, -1 };
-static char* feature(const char*, const char*, const char*, unsigned int, Error_f);
+static char* feature(Feature_t*, const char*, const char*, const char*, unsigned int, Error_f);
/*
* return fmtbuf() copy of s
@@ -316,7 +332,7 @@ synthesize(register Feature_t* fp, const char* path, const char* value)
#if DEBUG_astconf
if (fp)
- error(-2, "astconf synthesize name=%s path=%s value=%s fp=%p%s", fp->name, path, value, fp, state.synthesizing ? " SYNTHESIZING" : "");
+ error(-6, "astconf synthesize name=%s path=%s value=%s fp=%p%s", fp->name, path, value, fp, state.synthesizing ? " SYNTHESIZING" : "");
#endif
if (state.synthesizing)
return null;
@@ -328,7 +344,7 @@ synthesize(register Feature_t* fp, const char* path, const char* value)
state.prefix = strlen(state.name) + 1;
n = state.prefix + 3 * MAXVAL;
- if (s = getenv(state.name))
+ if ((s = getenv(state.name)) || getenv(state.strict) && (s = (char*)state.standard))
n += strlen(s) + 1;
n = roundof(n, 32);
if (!(state.data = newof(0, char, n, 0)))
@@ -357,7 +373,7 @@ synthesize(register Feature_t* fp, const char* path, const char* value)
ve = 0;
*de = 0;
*se = 0;
- feature(s, d, v, 0, 0);
+ feature(0, s, d, v, 0, 0);
*se = ' ';
*de = ' ';
if (!ve)
@@ -453,7 +469,7 @@ synthesize(register Feature_t* fp, const char* path, const char* value)
*d++ = ' ';
for (s = (char*)value; *d = *s++; d++);
#if DEBUG_astconf
- error(-3, "astconf synthesize %s", state.data - state.prefix);
+ error(-7, "astconf synthesize %s", state.data - state.prefix);
#endif
setenviron(state.data - state.prefix);
if (state.notify)
@@ -489,12 +505,15 @@ initialize(register Feature_t* fp, const char* path, const char* command, const
register int ok = 1;
#if DEBUG_astconf
- error(-2, "astconf initialize name=%s path=%s command=%s succeed=%s fail=%s fp=%p%s", fp->name, path, command, succeed, fail, fp, state.synthesizing ? " SYNTHESIZING" : "");
+ error(-6, "astconf initialize name=%s path=%s command=%s succeed=%s fail=%s fp=%p%s", fp->name, path, command, succeed, fail, fp, state.synthesizing ? " SYNTHESIZING" : "");
#endif
switch (fp->op)
{
+ case OP_architecture:
+ ok = 1;
+ break;
case OP_conformance:
- ok = getenv("POSIXLY_CORRECT") != 0;
+ ok = getenv(state.strict) != 0;
break;
case OP_hosttype:
ok = 1;
@@ -516,7 +535,7 @@ initialize(register Feature_t* fp, const char* path, const char* command, const
Sfio_t* tmp;
#if DEBUG_astconf
- error(-2, "astconf initialize name=%s ok=%d PATH=%s", fp->name, ok, p);
+ error(-6, "astconf initialize name=%s ok=%d PATH=%s", fp->name, ok, p);
#endif
if (tmp = sfstropen())
{
@@ -527,7 +546,7 @@ initialize(register Feature_t* fp, const char* path, const char* command, const
case 0:
break;
case ':':
- if (command && (fp->op != OP_universe || !ok))
+ if (command && fp->op != OP_universe)
{
if (r = p - d - 1)
{
@@ -563,7 +582,7 @@ initialize(register Feature_t* fp, const char* path, const char* command, const
}
if (fp->op == OP_universe)
{
- if (strneq(p, "xpg", 3) || strneq(p, "5bin", 4))
+ if (strneq(p, "xpg", 3))
{
ok = 1;
break;
@@ -589,7 +608,7 @@ initialize(register Feature_t* fp, const char* path, const char* command, const
break;
}
#if DEBUG_astconf
- error(-1, "AHA#%d state.std=%d %s [%s] std=%s ast=%s value=%s ok=%d", __LINE__, state.std, fp->name, ok ? succeed : fail, fp->std, fp->ast, fp->value, ok);
+ error(-6, "state.std=%d %s [%s] std=%s ast=%s value=%s ok=%d", state.std, fp->name, ok ? succeed : fail, fp->std, fp->ast, fp->value, ok);
#endif
synthesize(fp, path, ok ? succeed : fail);
}
@@ -603,9 +622,14 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int
{
register Feature_t* sp;
register int n;
+#if _UWIN && ( _X86_ || _X64_ )
+ struct stat st;
+#else
+ static struct utsname uts;
+#endif
#if DEBUG_astconf
- error(-2, "astconf format name=%s path=%s value=%s flags=%04x fp=%p%s", fp->name, path, value, flags, fp, state.synthesizing ? " SYNTHESIZING" : "");
+ error(-6, "astconf format name=%s path=%s value=%s flags=%04x fp=%p%s", fp->name, path, value, flags, fp, state.synthesizing ? " SYNTHESIZING" : "");
#endif
if (value)
fp->flags &= ~CONF_GLOBAL;
@@ -614,27 +638,57 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int
switch (fp->op)
{
+ case OP_architecture:
+#if _UWIN && ( _X86_ || _X64_ )
+ if (!stat("/", &st))
+ {
+ if (st.st_ino == 64)
+ {
+ fp->value = "x64";
+ break;
+ }
+ if (st.st_ino == 32)
+ {
+ fp->value = "x86";
+ break;
+ }
+ }
+#if _X64_
+ fp->value = "x64";
+#else
+ fp->value = "x86";
+#endif
+#else
+ if (!uname(&uts))
+ return fp->value = uts.machine;
+ if (!(fp->value = getenv("HOSTNAME")))
+ fp->value = "unknown";
+#endif
+ break;
+
case OP_conformance:
if (value && STANDARD(value))
value = fp->std;
- n = state.std = streq(fp->value, fp->std);
+ state.std = streq(fp->value, fp->std);
#if DEBUG_astconf
- error(-1, "AHA#%d state.std=%d %s [%s] std=%s ast=%s value=%s", __LINE__, state.std, fp->name, value, fp->std, fp->ast, fp->value);
+ error(-6, "state.std=%d %s [%s] std=%s ast=%s value=%s", state.std, fp->name, value, fp->std, fp->ast, fp->value);
#endif
- if (!synthesize(fp, path, value))
+ if (state.synthesizing && value == (char*)fp->std)
+ fp->value = (char*)value;
+ else if (!synthesize(fp, path, value))
initialize(fp, path, NiL, fp->std, fp->value);
#if DEBUG_astconf
- error(-1, "AHA#%d state.std=%d %s [%s] std=%s ast=%s value=%s", __LINE__, state.std, fp->name, value, fp->std, fp->ast, fp->value);
+ error(-6, "state.std=%d %s [%s] std=%s ast=%s value=%s", state.std, fp->name, value, fp->std, fp->ast, fp->value);
#endif
- if (!n && STANDARD(fp->value))
+ if (!state.std && value == fp->std)
{
state.std = 1;
for (sp = state.features; sp; sp = sp->next)
if (sp->std && sp->op && sp->op != OP_conformance)
- astconf(sp->name, path, sp->std);
+ feature(sp, 0, path, sp->std, 0, 0);
}
#if DEBUG_astconf
- error(-1, "AHA#%d state.std=%d %s [%s] std=%s ast=%s value=%s", __LINE__, state.std, fp->name, value, fp->std, fp->ast, fp->value);
+ error(-6, "state.std=%d %s [%s] std=%s ast=%s value=%s", state.std, fp->name, value, fp->std, fp->ast, fp->value);
#endif
break;
@@ -673,7 +727,9 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int
break;
case OP_path_resolve:
- if (!synthesize(fp, path, value))
+ if (state.synthesizing && value == (char*)fp->std)
+ fp->value = (char*)value;
+ else if (!synthesize(fp, path, value))
initialize(fp, path, NiL, "logical", DEFAULT(OP_path_resolve));
break;
@@ -688,7 +744,7 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int
n = 0;
if (value)
{
- while (n < univ_max && !streq(value, univ_name[n])
+ while (n < univ_max && !streq(value, univ_name[n]))
n++;
if (n >= univ_max)
{
@@ -734,7 +790,10 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int
break;
default:
- synthesize(fp, path, value);
+ if (state.synthesizing && value == (char*)fp->std)
+ fp->value = (char*)value;
+ else
+ synthesize(fp, path, value);
break;
}
@@ -750,16 +809,16 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int
*/
static char*
-feature(const char* name, const char* path, const char* value, unsigned int flags, Error_f conferror)
+feature(register Feature_t* fp, const char* name, const char* path, const char* value, unsigned int flags, Error_f conferror)
{
- register Feature_t* fp;
register int n;
if (value && (streq(value, "-") || streq(value, "0")))
value = null;
- for (fp = state.features; fp && !streq(fp->name, name); fp = fp->next);
+ if (!fp)
+ for (fp = state.features; fp && !streq(fp->name, name); fp = fp->next);
#if DEBUG_astconf
- error(-2, "astconf feature name=%s path=%s value=%s flags=%04x fp=%p%s", name, path, value, flags, fp, state.synthesizing ? " SYNTHESIZING" : "");
+ error(-6, "astconf feature name=%s path=%s value=%s flags=%04x fp=%p%s", name, path, value, flags, fp, state.synthesizing ? " SYNTHESIZING" : "");
#endif
if (!fp)
{
@@ -840,7 +899,7 @@ lookup(register Lookup_t* look, const char* name, unsigned int flags)
if (name[p->length] == '(' || name[p->length] == '#')
{
look->conf = &num;
- strncpy((char*)num.name, name, sizeof(num.name));
+ strlcpy((char*)num.name, name, sizeof(num.name));
num.call = p->call;
num.flags = *name == 'C' ? CONF_STRING : 0;
num.op = (short)strtol(name + p->length + 1, &e, 10);
@@ -864,14 +923,14 @@ lookup(register Lookup_t* look, const char* name, unsigned int flags)
#endif
look->name = name;
#if DEBUG_astconf
- error(-2, "astconf normal name=%s standard=%d section=%d call=%d flags=%04x elements=%d", look->name, look->standard, look->section, look->call, flags, conf_elements);
+ error(-6, "astconf normal name=%s standard=%d section=%d call=%d flags=%04x elements=%d", look->name, look->standard, look->section, look->call, flags, conf_elements);
#endif
c = *((unsigned char*)name);
while (lo <= hi)
{
mid = lo + (hi - lo) / 2;
#if DEBUG_astconf
- error(-3, "astconf lookup name=%s mid=%s", name, mid->name);
+ error(-7, "astconf lookup name=%s mid=%s", name, mid->name);
#endif
if (!(v = c - *((unsigned char*)mid->name)) && !(v = strcmp(name, mid->name)))
{
@@ -906,7 +965,7 @@ lookup(register Lookup_t* look, const char* name, unsigned int flags)
look->flags |= CONF_MINMAX;
look->conf = mid;
#if DEBUG_astconf
- error(-2, "astconf lookup name=%s standard=%d:%d section=%d:%d call=%d:%d", look->name, look->standard, mid->standard, look->section, mid->section, look->call, mid->call);
+ error(-6, "astconf lookup name=%s standard=%d:%d section=%d:%d call=%d:%d", look->name, look->standard, mid->standard, look->section, mid->section, look->call, mid->call);
#endif
return 1;
}
@@ -944,6 +1003,7 @@ print(Sfio_t* sp, register Lookup_t* look, const char* name, const char* path, i
{
register Conf_t* p = look->conf;
register unsigned int flags = look->flags;
+ Feature_t* fp;
char* call;
char* f;
const char* s;
@@ -961,7 +1021,7 @@ print(Sfio_t* sp, register Lookup_t* look, const char* name, const char* path, i
olderrno = errno;
errno = 0;
#if DEBUG_astconf
- error(-1, "astconf name=%s:%s:%s standard=%d section=%d call=%s op=%d flags=|%s%s%s%s%s:|%s%s%s%s%s%s%s%s%s%s"
+ error(-5, "astconf name=%s:%s:%s standard=%d section=%d call=%s op=%d flags=|%s%s%s%s%s:|%s%s%s%s%s%s%s%s%s%s"
, name, look->name, p->name, p->standard, p->section, prefix[p->call + CONF_call].name, p->op
, (flags & CONF_FEATURE) ? "FEATURE|" : ""
, (flags & CONF_LIMIT) ? "LIMIT|" : ""
@@ -1091,7 +1151,7 @@ print(Sfio_t* sp, register Lookup_t* look, const char* name, const char* path, i
call = 0;
if (p->standard == CONF_AST)
{
- if (streq(p->name, "RELEASE") && (i = open("/proc/version", O_RDONLY)) >= 0)
+ if (streq(p->name, "RELEASE") && (i = open("/proc/version", O_RDONLY|O_cloexec)) >= 0)
{
n = read(i, buf, sizeof(buf) - 1);
close(i);
@@ -1275,6 +1335,11 @@ print(Sfio_t* sp, register Lookup_t* look, const char* name, const char* path, i
if (p->section > 1)
sfprintf(sp, "%d", p->section);
sfprintf(sp, "_%s=", (listflags & ASTCONF_lower) ? fmtlower(p->name) : p->name);
+ if (!defined && !name && (p->flags & CONF_MINMAX_DEF))
+ {
+ defined = 1;
+ v = p->minmax.number;
+ }
if (v != -1)
sfprintf(sp, "%I*d", sizeof(v), v);
else if (defined)
@@ -1294,6 +1359,10 @@ print(Sfio_t* sp, register Lookup_t* look, const char* name, const char* path, i
return call;
}
bad:
+ if (!(listflags & ~(ASTCONF_error|ASTCONF_system)))
+ for (fp = state.features; fp; fp = fp->next)
+ if (streq(name, fp->name))
+ return format(fp, path, 0, listflags, conferror);
return (listflags & ASTCONF_error) ? (char*)0 : null;
}
@@ -1310,7 +1379,7 @@ nativeconf(Proc_t** pp, const char* operand)
long ops[2];
#if DEBUG_astconf
- error(-2, "astconf defer %s %s", _pth_getconf, operand);
+ error(-6, "astconf defer %s %s", _pth_getconf, operand);
#endif
cmd[0] = (char*)state.id;
cmd[1] = (char*)operand;
@@ -1468,7 +1537,7 @@ astgetconf(const char* name, const char* path, const char* value, int flags, Err
}
}
}
- if ((look.standard < 0 || look.standard == CONF_AST) && look.call <= 0 && look.section <= 1 && (s = feature(look.name, path, value, flags, conferror)))
+ if ((look.standard < 0 || look.standard == CONF_AST) && look.call <= 0 && look.section <= 1 && (s = feature(0, look.name, path, value, flags, conferror)))
return s;
errno = EINVAL;
if (conferror && !(flags & ASTCONF_system))
@@ -1571,6 +1640,8 @@ astconflist(Sfio_t* sp, const char* path, int flags, const char* pattern)
continue;
}
}
+ look.standard = look.conf->standard;
+ look.section = look.conf->section;
print(sp, &look, NiL, path, flags, errorf);
}
#ifdef _pth_getconf_a
@@ -1626,7 +1697,7 @@ astconflist(Sfio_t* sp, const char* path, int flags, const char* pattern)
continue;
}
}
- if (!(s = feature(fp->name, path, NiL, 0, 0)) || !*s)
+ if (!(s = feature(fp, 0, path, NiL, 0, 0)) || !*s)
s = "0";
if (flags & ASTCONF_table)
{
diff --git a/usr/src/lib/libast/common/port/astcopy.c b/usr/src/contrib/ast/src/lib/libast/port/astcopy.c
index b946b7fd26..853eb9a746 100644
--- a/usr/src/lib/libast/common/port/astcopy.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/astcopy.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/port/astdynamic.c b/usr/src/contrib/ast/src/lib/libast/port/astdynamic.c
index fb038f2910..c3035a8029 100644
--- a/usr/src/lib/libast/common/port/astdynamic.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/astdynamic.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/port/astlicense.c b/usr/src/contrib/ast/src/lib/libast/port/astlicense.c
index 2461c67607..3082aef87b 100644
--- a/usr/src/lib/libast/common/port/astlicense.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/astlicense.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -36,6 +36,14 @@
#include <time.h>
#endif
+#ifndef O_cloexec
+#ifdef O_CLOEXEC
+#define O_cloexec 0
+#else
+#define O_cloexec 0
+#endif
+#endif
+
#undef copy
#undef BSD /* guess who defines this */
#undef END
@@ -63,22 +71,27 @@
#define AUTHOR 0
#define CLASS 1
#define COMPANY 2
-#define CONTRIBUTOR 3
-#define CORPORATION 4
-#define DOMAIN 5
-#define INCORPORATION 6
-#define LICENSE 7
-#define LOCATION 8
-#define NOTICE 9
-#define ORGANIZATION 10
-#define PACKAGE 11
-#define PARENT 12
-#define QUERY 13
-#define SINCE 14
-#define STYLE 15
-#define URL 16
-#define URLMD5 17
-#define VERSION 18
+#define COMPONENT 3
+#define CONTRIBUTOR 4
+#define CORPORATION 5
+#define DOMAIN 6
+#define ID 7
+#define INCORPORATION 8
+#define LICENSE 9
+#define LOCATION 10
+#define NAME 11
+#define NOTICE 12
+#define ORGANIZATION 13
+#define PACKAGE 14
+#define PARENT 15
+#define QUERY 16
+#define SINCE 17
+#define SOURCE 18
+#define START 19
+#define STYLE 20
+#define URL 21
+#define URLMD5 22
+#define VERSION 23
#define IDS 64
@@ -129,18 +142,23 @@ static const Item_t key[] =
KEY("author"),
KEY("class"),
KEY("company"),
+ KEY("component"),
KEY("contributor"),
KEY("corporation"),
KEY("domain"),
+ KEY("id"),
KEY("incorporation"),
KEY("license"),
KEY("location"),
+ KEY("name"),
KEY("notice"),
KEY("organization"),
KEY("package"),
KEY("parent"),
KEY("query"),
KEY("since"),
+ KEY("source"),
+ KEY("start"),
KEY("type"),
KEY("url"),
KEY("urlmd5"),
@@ -284,20 +302,28 @@ expand(Notice_t* notice, register Buffer_t* b, const Item_t* item)
register char* z;
register int c;
int m;
+ int i;
+ int k;
if (t = item->data)
{
q = item->quote;
e = t + item->size;
+ i = 0;
while (t < e)
{
if (*t == '$' && t < (e + 2) && *(t + 1) == '{')
{
- m = 0;
+ k = m = 0;
x = t += 2;
while (t < e && (c = *t++) != '}')
if (c == '.')
x = t;
+ else if (c == '-')
+ {
+ k = 1;
+ break;
+ }
else if (c == '/')
{
m = 1;
@@ -313,11 +339,28 @@ expand(Notice_t* notice, register Buffer_t* b, const Item_t* item)
PUT(b, c);
}
}
- if (m)
- while (t < e && *t++ != '}');
+ else if (k)
+ {
+ k = 0;
+ i++;
+ }
+ if (k || m)
+ {
+ k = 1;
+ while (t < e)
+ if ((c = *t++) == '{')
+ k++;
+ else if (c == '}' && !--k)
+ break;
+ }
}
else if (q > 0 && *t == '\\' && (*(t + 1) == q || *(t + 1) == '\\'))
t++;
+ else if (*t == '}' && i)
+ {
+ t++;
+ i--;
+ }
else
PUT(b, *t++);
}
@@ -337,11 +380,18 @@ copyright(Notice_t* notice, register Buffer_t* b)
copy(b, "Copyright (c) ", -1);
if (notice->test)
+ {
clock = (time_t)1000212300;
- else
+ t = ctime(&clock) + 20;
+ }
+ else if (!(t = notice->item[SOURCE].data))
+ {
time(&clock);
- t = ctime(&clock) + 20;
- if ((x = notice->item[SINCE].data) && strncmp(x, t, 4))
+ t = ctime(&clock) + 20;
+ }
+ if ((x = notice->item[START].data) && strncmp(t, x, 4) < 0)
+ t = x;
+ if ((x = notice->item[SINCE].data) && strncmp(x, t, 4) < 0)
{
expand(notice, b, &notice->item[SINCE]);
PUT(b, '-');
@@ -369,6 +419,77 @@ copyright(Notice_t* notice, register Buffer_t* b)
}
}
+typedef struct Stack_s
+{
+ char* info;
+ char* file;
+ int line;
+ int size;
+} Stack_t;
+
+static int
+push(Stack_t* sp, char* file, char* parent, char* info, int size, Buffer_t* buf)
+{
+ char* s;
+ char* t;
+ int i;
+ int n;
+ char path[1024];
+
+ if (size <= 8)
+ {
+ copy(buf, file, -1);
+ copy(buf, ": no space", -1);
+ PUT(buf, 0);
+ return -1;
+ }
+ if (*file != '/' && parent && (s = strrchr(parent, '/')))
+ {
+ n = s - parent + 1;
+ if ((strlen(file) + n + 1) <= sizeof(path))
+ {
+ memcpy(path, parent, n);
+ strcpy(path + n, file);
+ file = path;
+ }
+ }
+ if ((i = open(file, O_RDONLY|O_cloexec)) < 0)
+ {
+ /* this hack viewpath lookup works for default package setups */
+ if (file == path)
+ for (s = path; *s; s++)
+ if (s[0] == '/' && s[1] == 'a' && s[2] == 'r' && s[3] == 'c' && s[4] == 'h' && s[5] == '/')
+ {
+ t = s;
+ for (s += 6; *s && *s != '/'; s++);
+ while (*t++ = *s++);
+ i = open(file, O_RDONLY|O_cloexec);
+ }
+ if (i < 0)
+ {
+ copy(buf, file, -1);
+ copy(buf, ": cannot open", -1);
+ PUT(buf, 0);
+ return -1;
+ }
+ }
+ n = read(i, info, size - 1);
+ close(i);
+ if (n < 0)
+ {
+ copy(buf, file, -1);
+ copy(buf, ": cannot read", -1);
+ PUT(buf, 0);
+ return -1;
+ }
+ info[n++] = 0;
+ sp->file = file;
+ sp->info = info;
+ sp->line = 0;
+ sp->size = n;
+ return 0;
+}
+
/*
* read the license file and generate a comment in p, length size
* license length in p returned, -1 on error
@@ -389,10 +510,12 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
int q;
int contributor;
int first;
- int line;
+ int level;
int quote;
+ char* data;
char tmpbuf[COMLINE];
char info[8 * 1024];
+ Stack_t input[4];
Notice_t notice;
Item_t item;
Buffer_t buf;
@@ -400,34 +523,25 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
buf.end = (buf.buf = buf.nxt = p) + size;
tmp.end = (tmp.buf = tmp.nxt = tmpbuf) + sizeof(tmpbuf);
+ level = 0;
+ data = info;
+ level = -1;
+ if (options)
+ {
+ level++;
+ input[level].file = "<options>";
+ input[level].info = options;
+ input[level].line = 0;
+ }
if (file && *file)
{
- if ((i = open(file, O_RDONLY)) < 0)
- {
- copy(&buf, file, -1);
- copy(&buf, ": cannot open", -1);
- PUT(&buf, 0);
+ if (push(&input[++level], file, 0, data, &info[sizeof(info)] - data, &buf))
return -1;
- }
- n = read(i, info, sizeof(info) - 1);
- close(i);
- if (n < 0)
- {
- copy(&buf, file, -1);
- copy(&buf, ": cannot read", -1);
- PUT(&buf, 0);
- return -1;
- }
- s = info;
- s[n] = 0;
+ data += input[level].size;
}
- else if (!options)
+ if (level < 0)
return 0;
- else
- {
- s = options;
- options = 0;
- }
+ s = input[level].info;
notice.test = 0;
notice.type = NONE;
notice.verbose = 0;
@@ -440,13 +554,12 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
notice.item[STYLE] = notice.item[CLASS] = lic[notice.type];
notice.item[STYLE].quote = notice.item[CLASS].quote = 0;
contributor = i = k = 0;
- line = 0;
for (;;)
{
first = 1;
while (c = *s)
{
- while (c == ' ' || c == '\t' || c == '\n' && ++line || c == '\r' || c == ',' || c == ';' || c == ')')
+ while (c == ' ' || c == '\t' || c == '\n' && ++input[level].line || c == '\r' || c == ',' || c == ';' || c == ')')
c = *++s;
if (!c)
break;
@@ -455,24 +568,43 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
while (*++s && *s != '\n');
if (*s)
s++;
- line++;
+ input[level].line++;
+ continue;
+ }
+ if (c == '.')
+ {
+ while ((c = *++s) && (c == ' ' || c == '\t'));
+ file = s;
+ while (c && c != ' ' && c != '\t' && c != '\r' && c != '\n')
+ c = *++s;
+ *s = 0;
+ while (c && c != '\n')
+ c = *++s;
+ if (*file)
+ {
+ input[level].info = s + (c != 0);
+ if (++level >= (sizeof(input) / sizeof(input[0])) || push(&input[level], file, input[level-1].file, data, &info[sizeof(info)] - data, &buf))
+ return -1;
+ data += input[level].size;
+ s = input[level].info;
+ }
continue;
}
if (c == '\n')
{
s++;
- line++;
+ input[level].line++;
continue;
}
if (c == '[')
c = *++s;
x = s;
n = 0;
- while (c && c != '=' && c != ']' && c != ')' && c != ',' && c != ' ' && c != '\t' && c != '\n' && c != '\r')
+ while (c && c != '+' && c != '=' && c != ']' && c != ')' && c != ',' && c != ' ' && c != '\t' && c != '\n' && c != '\r')
c = *++s;
n = s - x;
h = lookup(key, x, n);
- if (c == ']')
+ if (c == '+' || c == ']')
c = *++s;
quote = 0;
if (c == '=' || first)
@@ -518,7 +650,7 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
i++;
continue;
case '\n':
- line++;
+ input[level].line++;
continue;
default:
continue;
@@ -532,7 +664,7 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
while ((c = *s) && (q == '"' && (c == '\\' && (*(s + 1) == '"' || *(s + 1) == '\\') && s++ && (quote = q)) || q && c != q || !q && c != ' ' && c != '\t' && c != '\n' && c != '\r' && c != ',' && c != ';'))
{
if (c == '\n')
- line++;
+ input[level].line++;
s++;
}
}
@@ -542,7 +674,7 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
v = x;
}
if (c == '\n')
- line++;
+ input[level].line++;
if (contributor)
{
for (i = 0; i < notice.ids; i++)
@@ -626,6 +758,8 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
notice.type = c;
notice.item[CLASS].data = lic[lic[c].quote].data;
notice.item[CLASS].size = lic[lic[c].quote].size;
+ if (notice.item[STYLE].data != lic[NONE].data)
+ h = -1;
break;
}
if (h >= 0)
@@ -638,15 +772,15 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
}
else
{
- if (file)
+ if (input[level].file)
{
copy(&buf, "\"", -1);
- copy(&buf, file, -1);
+ copy(&buf, input[level].file, -1);
copy(&buf, "\", line ", -1);
x = &tmpbuf[sizeof(tmpbuf)];
*--x = 0;
- line++;
- do *--x = ("0123456789")[line % 10]; while (line /= 10);
+ n = ++input[level].line;
+ do *--x = ("0123456789")[n % 10]; while (n /= 10);
copy(&buf, x, -1);
copy(&buf, ": ", -1);
}
@@ -658,9 +792,9 @@ astlicense(char* p, int size, char* file, char* options, int cc1, int cc2, int c
s++;
first = 0;
}
- if (!options || !*(s = options))
+ if (!level--)
break;
- options = 0;
+ s = input[level].info;
}
if (!k)
return 0;
diff --git a/usr/src/lib/libast/common/port/astmath.c b/usr/src/contrib/ast/src/lib/libast/port/astmath.c
index cc2d602f30..395312e66e 100644
--- a/usr/src/lib/libast/common/port/astmath.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/astmath.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/port/astquery.c b/usr/src/contrib/ast/src/lib/libast/port/astquery.c
index 3284783314..d0d87db824 100644
--- a/usr/src/lib/libast/common/port/astquery.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/astquery.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -45,26 +45,29 @@ astquery(int quit, const char* format, ...)
va_list ap;
register int n;
register int c;
+ int r;
Sfio_t* ip;
Sfio_t* op;
static Sfio_t* rfp;
static Sfio_t* wfp;
+ r = 0;
va_start(ap, format);
if (!format)
- return 0;
+ goto done;
+ r = -1;
if (!rfp)
{
c = errno;
if (isatty(sffileno(sfstdin)))
rfp = sfstdin;
else if (!(rfp = sfopen(NiL, "/dev/tty", "r")))
- return -1;
+ goto done;
if (isatty(sffileno(sfstderr)))
wfp = sfstderr;
else if (!(wfp = sfopen(NiL, "/dev/tty", "w")))
- return -1;
+ goto done;
errno = c;
}
if (quit & ERROR_PROMPT)
@@ -95,15 +98,17 @@ astquery(int quit, const char* format, ...)
case 'Q':
if (quit >= 0)
exit(quit);
- return -1;
+ goto done;
case '1':
case 'y':
case 'Y':
case '+':
- return 0;
+ r = 0;
+ goto done;
}
return 1;
}
+ done:
va_end(ap);
- /*NOTREACHED*/
+ return r;
}
diff --git a/usr/src/lib/libast/common/port/aststatic.c b/usr/src/contrib/ast/src/lib/libast/port/aststatic.c
index 9792f03a35..7517572689 100644
--- a/usr/src/lib/libast/common/port/aststatic.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/aststatic.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/port/astwinsize.c b/usr/src/contrib/ast/src/lib/libast/port/astwinsize.c
index 8c77f63942..d60ba75c0c 100644
--- a/usr/src/lib/libast/common/port/astwinsize.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/astwinsize.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -129,7 +129,7 @@ ttctl(register int fd, int op, void* tt)
{
for (fd = 0; fd <= 2; fd++)
if (!ioctl(fd, op, tt)) return(0);
- if ((fd = open("/dev/tty", O_RDONLY)) >= 0)
+ if ((fd = open("/dev/tty", O_RDONLY|O_cloexec)) >= 0)
{
v = ioctl(fd, op, tt);
close(fd);
diff --git a/usr/src/contrib/ast/src/lib/libast/port/atmain.C b/usr/src/contrib/ast/src/lib/libast/port/atmain.C
new file mode 100644
index 0000000000..b6d7560e2a
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/port/atmain.C
@@ -0,0 +1,37 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#if ! __MVS__
+
+void _STUB_atmain(){}
+
+#else
+
+extern "C" void _ast_init();
+
+class Atmain_t
+{
+public: Atmain_t() { _ast_init(); }
+};
+
+static Atmain_t atmain();
+
+#endif
diff --git a/usr/src/lib/libast/common/port/iblocks.c b/usr/src/contrib/ast/src/lib/libast/port/iblocks.c
index 07cea73b86..a768b84460 100644
--- a/usr/src/lib/libast/common/port/iblocks.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/iblocks.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/port/lc.c b/usr/src/contrib/ast/src/lib/libast/port/lc.c
index db94a6acbb..488dd8d5e1 100644
--- a/usr/src/lib/libast/common/port/lc.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/lc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,9 +27,18 @@
#include "lclib.h"
#include "lclang.h"
+#include "FEATURE/locale"
#include <ctype.h>
+typedef struct Local_s
+{
+ const char* name;
+ int size;
+} Local_t;
+
+#undef setlocale /* this file deals with the system locale */
+
static Lc_numeric_t default_numeric = { '.', -1 };
static Lc_t default_lc =
@@ -261,6 +270,8 @@ canonical(const Lc_language_t* lp, const Lc_territory_t* tp, const Lc_charset_t*
register char* s;
register char* e;
register const char* t;
+ char* p;
+ char* r;
if (!(flags & (LC_abbreviated|LC_default|LC_local|LC_qualified|LC_verbose)))
flags |= LC_abbreviated;
@@ -295,10 +306,15 @@ canonical(const Lc_language_t* lp, const Lc_territory_t* tp, const Lc_charset_t*
}
if (s < e)
{
- if (tp && tp != &lc_territories[0] && (!(flags & (LC_abbreviated|LC_default)) || !lp || !streq(lp->code, tp->code)))
+ if (tp && tp != &lc_territories[0])
{
+ r = 0;
if (lp)
+ {
+ if ((flags & (LC_abbreviated|LC_default)) && streq(lp->code, tp->code))
+ r = s;
*s++ = '_';
+ }
if (flags & LC_verbose)
{
u = 1;
@@ -317,16 +333,36 @@ canonical(const Lc_language_t* lp, const Lc_territory_t* tp, const Lc_charset_t*
}
else
for (t = tp->code; s < e && (*s = toupper(*t++)); s++);
+ if (r)
+ {
+ *s = 0;
+ if ((p = setlocale(LC_MESSAGES, 0)) && (p = strdup(p)))
+ {
+ if (!setlocale(LC_MESSAGES, buf))
+ {
+ *r = 0;
+ if (!setlocale(LC_MESSAGES, buf))
+ *r = '_';
+ }
+ setlocale(LC_MESSAGES, p);
+ free(p);
+ }
+ }
}
if (lp && (!(flags & (LC_abbreviated|LC_default)) || cp != lp->charset) && s < e)
{
*s++ = '.';
- for (t = cp->code; s < e && (c = *t++); s++)
- {
- if (islower(c))
- c = toupper(c);
- *s = c;
- }
+ t = cp->code;
+ if (streq(cp->code, "utf8") && (t = _locale_utf8_str))
+ for (; s < e && (c = *t++); s++)
+ *s = c;
+ else
+ for (t = cp->code; s < e && (c = *t++); s++)
+ {
+ if (islower(c))
+ c = toupper(c);
+ *s = c;
+ }
}
for (c = '@'; ap && s < e; ap = ap->next)
if (!(flags & (LC_abbreviated|LC_default|LC_verbose)) || !(ap->attribute->flags & LC_default))
@@ -408,6 +444,7 @@ lcmake(const char* name)
int z;
char buf[PATH_MAX / 2];
char tmp[PATH_MAX / 2];
+ Local_t local[2];
if (!(t = name) || !*t)
return &default_lc;
@@ -505,6 +542,10 @@ lcmake(const char* name)
}
}
*s = 0;
+#if AHA
+ if ((ast.locale.set & AST_LC_debug) && !(ast.locale.set & AST_LC_internal))
+ sfprintf(sfstderr, "locale make %s language=%s territory=%s charset=%s attributes=%s\n", name, language_name, territory_name, charset_name, attributes_name);
+#endif
tp = 0;
cp = ppa = 0;
al = 0;
@@ -529,6 +570,8 @@ lcmake(const char* name)
n = 1;
}
}
+ else if (streq(s, "c") || streq(s, "posix"))
+ lp = &lc_languages[0];
else
lp = 0;
if (!lp || !lp->code)
@@ -572,7 +615,15 @@ lcmake(const char* name)
name = ((Lc_language_t*)lp)->code = ((Lc_language_t*)lp)->name = (const char*)(lp + 1);
memcpy((char*)lp->code, s, z - 1);
tp = &lc_territories[0];
- cp = ((Lc_language_t*)lp)->charset = &lc_charsets[0];
+ cp = &lc_charsets[0];
+ if (charset_name)
+ for (ppa = lc_charsets; ppa->code; ppa++)
+ if (match_charset(charset_name, ppa))
+ {
+ cp = ppa;
+ break;
+ }
+ ((Lc_language_t*)lp)->charset = cp;
al = 0;
goto override;
}
@@ -613,9 +664,12 @@ lcmake(const char* name)
for (tp = lc_territories; tp->code; tp++)
if (streq(s, tp->code))
{
- for (i = 0; i < elementsof(tp->languages) && lp != tp->languages[i]; i++);
- if (i >= elementsof(tp->languages))
- tp = 0;
+ if (lp != &lc_languages[0])
+ {
+ for (i = 0; i < elementsof(tp->languages) && lp != tp->languages[i]; i++);
+ if (i >= elementsof(tp->languages))
+ tp = 0;
+ }
break;
}
}
@@ -686,6 +740,10 @@ lcmake(const char* name)
for (cp = lc_charsets; cp->code; cp++)
if (match_charset(s, cp))
break;
+#if AHA
+ if ((ast.locale.set & AST_LC_debug) && !(ast.locale.set & AST_LC_internal))
+ sfprintf(sfstderr, "locale make %s charset_name=%s cp=%s ppa=%s lp=%s\n", name, charset_name, cp ? cp->code : 0, ppa, lp->charset);
+#endif
if (!cp || !cp->code)
cp = ppa ? ppa : lp->charset;
mapped:
@@ -697,14 +755,41 @@ lcmake(const char* name)
override:
n = strlen(name) + 1;
+ local[0].name = default_lc.name;
+ local[0].size = strlen(local[0].name);
+ local[1].name = default_lc.code;
+ local[1].size = strlen(local[1].name);
+ i = -1;
+ for (c = 0; c < elementsof(local); ++c)
+ if (strneq(name, local[c].name, local[c].size))
+ {
+ switch (name[local[c].size])
+ {
+ case '.':
+ case '_':
+ case 0:
+ i = c;
+ z += local[!i].size + n;
+ break;
+ }
+ break;
+ }
if (!(lc = newof(0, Lc_t, 1, n + z)))
return 0;
strcpy((char*)(lc->name = (const char*)(lc + 1)), name);
- strcpy((char*)(lc->code = lc->name + n), s);
+ lc->code = lc->name + n;
+ if (i >= 0)
+ {
+ lc->flags |= LC_local;
+ strcpy((char*)lc->code, local[!i].name);
+ strcpy((char*)lc->code + local[!i].size, name + local[i].size);
+ }
+ else
+ strcpy((char*)lc->code, s);
lc->language = lp ? lp : &lc_languages[0];
lc->territory = tp ? tp : &lc_territories[0];
lc->charset = cp ? cp : &lc_charsets[0];
- if (!strcmp(lc->charset->code, "utf8"))
+ if (streq(lc->charset->code, "utf8"))
lc->flags |= LC_utf8;
lc->attributes = al;
for (i = 0; i < elementsof(lc->info); i++)
@@ -722,6 +807,8 @@ lcmake(const char* name)
#endif
lc->next = lcs;
lcs = lc;
+ if ((ast.locale.set & AST_LC_debug) && !(ast.locale.set & AST_LC_internal))
+ sfprintf(sfstderr, "locale make %17s %16s %16s %16s language=%s territory=%s charset=%s%s\n", "", lc->name, lc->code, "", lc->language->name, lc->territory->name, lc->charset->code, (lc->flags & LC_local) ? " local" : "");
return lc;
}
diff --git a/usr/src/lib/libast/common/port/lc.tab b/usr/src/contrib/ast/src/lib/libast/port/lc.tab
index 87905a10b5..87905a10b5 100644
--- a/usr/src/lib/libast/common/port/lc.tab
+++ b/usr/src/contrib/ast/src/lib/libast/port/lc.tab
diff --git a/usr/src/lib/libast/common/port/lcgen.c b/usr/src/contrib/ast/src/lib/libast/port/lcgen.c
index e91f69b39a..82eb88d003 100644
--- a/usr/src/lib/libast/common/port/lcgen.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/lcgen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -311,7 +311,7 @@ char** argv;
language_attribute_max = 0;
territory_language_max = 0;
state.language.count = 2;
- state.territory.count = 2;
+ state.territory.count = 3;
ve = &arg[elementsof(arg)];
fprintf(hf, "/* : : generated by %s : : */\n", command);
fprintf(hf, "#pragma prototyped\n");
@@ -332,8 +332,8 @@ char** argv;
fprintf(hf, "#define LC_undefined\t\t0x00100\n");
fprintf(hf, "#define LC_utf8\t\t\t0x00200\n");
fprintf(hf, "#define LC_verbose\t\t0x00400\n");
- fprintf(hf, "#define LC_setlocale\t\t\t0x10000\n");
- fprintf(hf, "#define LC_setenv\t\t\t0x20000\n");
+ fprintf(hf, "#define LC_setlocale\t\t0x10000\n");
+ fprintf(hf, "#define LC_setenv\t\t0x20000\n");
fprintf(hf, "#define LC_user\t\t\t0x40000\n");
fprintf(lf, "/* : : generated by %s : : */\n", command);
fprintf(lf, "\n");
@@ -609,8 +609,12 @@ char** argv;
break;
}
}
- fprintf(hf, "#define LC_language_attribute_max\t\t%d\n", language_attribute_max);
- fprintf(hf, "#define LC_territory_language_max\t\t%d\n", territory_language_max);
+ if (!language_attribute_max)
+ language_attribute_max = 1;
+ if (!territory_language_max)
+ territory_language_max = 1;
+ fprintf(hf, "\n#define LC_language_attribute_max\t%d\n", language_attribute_max);
+ fprintf(hf, "#define LC_territory_language_max\t%d\n", territory_language_max);
fprintf(hf, "\nstruct Lc_s;\n");
fprintf(hf, "\ntypedef struct Lc_info_s\n{\n");
fprintf(hf, "\tconst struct Lc_s*\tlc;\n");
@@ -743,6 +747,10 @@ char** argv;
for (i = 1; i < 2 * territory_language_max; i++)
fprintf(lf, "0,");
fprintf(lf, "},\n");
+ fprintf(lf, "{\"eu\",\"euro\",0,0,&lc_languages[0],");
+ for (i = 1; i < 2 * territory_language_max; i++)
+ fprintf(lf, "0,");
+ fprintf(lf, "},\n");
for (tp = (Territory_t*)state.territory.root; tp; tp = (Territory_t*)tp->link.next)
{
fprintf(lf, "{\"%s\",\"%s\",", tp->link.code, tp->name);
diff --git a/usr/src/lib/libast/common/port/lclang.h b/usr/src/contrib/ast/src/lib/libast/port/lclang.h
index 917a538744..356f2b0f08 100644
--- a/usr/src/lib/libast/common/port/lclang.h
+++ b/usr/src/contrib/ast/src/lib/libast/port/lclang.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,36 +27,94 @@
#include <ast_windows.h>
+#ifndef LANG_CHINESE_SIMPLIFIED
#define LANG_CHINESE_SIMPLIFIED LANG_CHINESE
+#endif
+#ifndef LANG_CHINESE_TRADITIONAL
#define LANG_CHINESE_TRADITIONAL LANG_CHINESE
+#endif
+#ifndef LANG_NORWEGIAN_BOKMAL
#define LANG_NORWEGIAN_BOKMAL LANG_NORWEGIAN
+#endif
+#ifndef LANG_NORWEGIAN_NYNORSK
#define LANG_NORWEGIAN_NYNORSK LANG_NORWEGIAN
+#endif
+#ifndef LANG_SERBO_CROATIAN
#define LANG_SERBO_CROATIAN LANG_CROATIAN
+#endif
+#ifndef CTRY_CZECH_REPUBLIC
#define CTRY_CZECH_REPUBLIC CTRY_CZECH
+#endif
+#ifndef SUBLANG_CHINESE_SIMPLIFIED_CHINA
#define SUBLANG_CHINESE_SIMPLIFIED_CHINA SUBLANG_CHINESE_SIMPLIFIED
+#endif
+#ifndef SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG
#define SUBLANG_CHINESE_SIMPLIFIED_HONG_KONG SUBLANG_CHINESE_HONGKONG
+#endif
+#ifndef SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE
#define SUBLANG_CHINESE_SIMPLIFIED_SINGAPORE SUBLANG_CHINESE_SINGAPORE
+#endif
+#ifndef SUBLANG_CHINESE_TRADITIONAL_TAIWAN
#define SUBLANG_CHINESE_TRADITIONAL_TAIWAN SUBLANG_CHINESE_TRADITIONAL
+#endif
+#ifndef SUBLANG_DUTCH_NETHERLANDS_ANTILLES
#define SUBLANG_DUTCH_NETHERLANDS_ANTILLES SUBLANG_DUTCH
+#endif
+#ifndef SUBLANG_DUTCH_BELGIUM
#define SUBLANG_DUTCH_BELGIUM SUBLANG_DUTCH_BELGIAN
+#endif
+#ifndef SUBLANG_ENGLISH_AUSTRALIA
#define SUBLANG_ENGLISH_AUSTRALIA SUBLANG_ENGLISH_AUS
+#endif
+#ifndef SUBLANG_ENGLISH_CANADA
#define SUBLANG_ENGLISH_CANADA SUBLANG_ENGLISH_CAN
+#endif
+#ifndef SUBLANG_ENGLISH_IRELAND
#define SUBLANG_ENGLISH_IRELAND SUBLANG_ENGLISH_EIRE
+#endif
+#ifndef SUBLANG_ENGLISH_NEW_ZEALAND
#define SUBLANG_ENGLISH_NEW_ZEALAND SUBLANG_ENGLISH_NZ
+#endif
+#ifndef SUBLANG_ENGLISH_TRINIDAD_TOBAGO
#define SUBLANG_ENGLISH_TRINIDAD_TOBAGO SUBLANG_ENGLISH_CARIBBEAN
+#endif
+#ifndef SUBLANG_ENGLISH_UNITED_KINGDOM
#define SUBLANG_ENGLISH_UNITED_KINGDOM SUBLANG_ENGLISH_UK
+#endif
+#ifndef SUBLANG_ENGLISH_UNITED_STATES
#define SUBLANG_ENGLISH_UNITED_STATES SUBLANG_ENGLISH_US
+#endif
+#ifndef SUBLANG_FRENCH_BELGIUM
#define SUBLANG_FRENCH_BELGIUM SUBLANG_FRENCH_BELGIAN
+#endif
+#ifndef SUBLANG_FRENCH_CANADA
#define SUBLANG_FRENCH_CANADA SUBLANG_FRENCH_CANADIAN
+#endif
+#ifndef SUBLANG_FRENCH_SWITZERLAND
#define SUBLANG_FRENCH_SWITZERLAND SUBLANG_FRENCH_SWISS
+#endif
+#ifndef SUBLANG_GERMAN_AUSTRIA
#define SUBLANG_GERMAN_AUSTRIA SUBLANG_GERMAN_AUSTRIAN
+#endif
+#ifndef SUBLANG_GERMAN_SWITZERLAND
#define SUBLANG_GERMAN_SWITZERLAND SUBLANG_GERMAN_SWISS
+#endif
+#ifndef SUBLANG_ITALIAN_SWITZERLAND
#define SUBLANG_ITALIAN_SWITZERLAND SUBLANG_ITALIAN_SWISS
+#endif
+#ifndef SUBLANG_NORWEGIAN_BOKMAL_NORWAY
#define SUBLANG_NORWEGIAN_BOKMAL_NORWAY SUBLANG_NORWEGIAN_BOKMAL
+#endif
+#ifndef SUBLANG_NORWEGIAN_NORWAY
#define SUBLANG_NORWEGIAN_NORWAY SUBLANG_NORWEGIAN_BOKMAL
+#endif
+#ifndef SUBLANG_NORWEGIAN_NYNORSK_NORWAY
#define SUBLANG_NORWEGIAN_NYNORSK_NORWAY SUBLANG_NORWEGIAN_NYNORSK
+#endif
+#ifndef SUBLANG_PORTUGUESE_BRAZIL
#define SUBLANG_PORTUGUESE_BRAZIL SUBLANG_PORTUGUESE_BRAZILIAN
+#endif
#endif
diff --git a/usr/src/lib/libast/common/port/lclib.h b/usr/src/contrib/ast/src/lib/libast/port/lclib.h
index 32eaacd176..5daeb8abe0 100644
--- a/usr/src/lib/libast/common/port/lclib.h
+++ b/usr/src/contrib/ast/src/lib/libast/port/lclib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/port/mc.c b/usr/src/contrib/ast/src/lib/libast/port/mc.c
index 5c26513f2f..f2ee65c4f1 100644
--- a/usr/src/lib/libast/common/port/mc.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/mc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -54,7 +54,7 @@
*/
char*
-mcfind(char* path, const char* locale, const char* catalog, int category, int nls)
+mcfind(const char* locale, const char* catalog, int category, int nls, char* path, size_t size)
{
register int c;
register char* s;
@@ -83,14 +83,12 @@ mcfind(char* path, const char* locale, const char* catalog, int category, int nl
errno = oerrno;
if (i)
return 0;
- strncpy(path, catalog, PATH_MAX-1);
+ strlcpy(path, catalog, size);
return path;
}
i = 0;
-#if !_lib_catopen
if ((p = getenv("NLSPATH")) && *p)
paths[i++] = p;
-#endif
paths[i++] = "share/lib/locale/%l/%C/%N";
paths[i++] = "share/locale/%l/%C/%N";
paths[i++] = "lib/locale/%l/%C/%N";
@@ -186,10 +184,10 @@ mcfind(char* path, const char* locale, const char* catalog, int category, int nl
else if (!catalog)
continue;
else
- strncpy(file, catalog, elementsof(file));
+ strlcpy(file, catalog, elementsof(file));
if (ast.locale.set & AST_LC_find)
sfprintf(sfstderr, "locale find %s\n", file);
- if (s = pathpath(path, file, "", (!catalog && category == AST_LC_MESSAGES) ? PATH_READ : (PATH_REGULAR|PATH_READ|PATH_ABSOLUTE)))
+ if (s = pathpath(file, "", (!catalog && category == AST_LC_MESSAGES) ? PATH_READ : (PATH_REGULAR|PATH_READ|PATH_ABSOLUTE), path, size))
{
if (ast.locale.set & (AST_LC_find|AST_LC_setlocale))
sfprintf(sfstderr, "locale path %s\n", s);
diff --git a/usr/src/lib/libast/common/port/mnt.c b/usr/src/contrib/ast/src/lib/libast/port/mnt.c
index 080abed431..31eeb760bf 100644
--- a/usr/src/lib/libast/common/port/mnt.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/mnt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -129,25 +129,34 @@ set(register Header_t* hp, const char* fs, const char* dir, const char* type, co
#undef MNT_REMOTE
-#if _lib_getmntinfo && _sys_mount
+#if _sys_mount && ( _lib_getfsstat || _lib_getmntinfo )
/*
- * 4.4 bsd
+ * 4.4 bsd getmntinfo
*
* what a crappy interface
* data returned in static buffer -- ok
* big chunk of allocated memory that cannot be freed -- come on
* *and* netbsd changed the interface somewhere along the line
* private interface? my bad -- public interface? par for the bsd course
+ *
+ * we assume getfsstat may suffer the same statfs/statvfs confusion
*/
#include <sys/param.h> /* expect some macro redefinitions here */
#include <sys/mount.h>
+#if _lib_getfsstat
+#if _lib_getfsstat_statvfs
+#define statfs statvfs
+#define f_flags f_flag
+#endif
+#else
#if _lib_getmntinfo_statvfs
#define statfs statvfs
#define f_flags f_flag
#endif
+#endif
typedef struct
{
@@ -155,6 +164,9 @@ typedef struct
struct statfs* next;
struct statfs* last;
char opt[256];
+#if _lib_getfsstat
+ struct statfs buf[1];
+#endif
} Handle_t;
#ifdef MFSNAMELEN
@@ -256,9 +268,21 @@ mntopen(const char* path, const char* mode)
register int n;
FIXARGS(path, mode, 0);
- if (!(mp = newof(0, Handle_t, 1, 0)))
+#if _lib_getfsstat
+ if ((n = getfsstat(NiL, 0, MNT_WAIT)) <= 0)
return 0;
- if ((n = getmntinfo(&mp->next, 0)) <= 0)
+ n = (n - 1) * sizeof(struct statfs);
+#else
+ n = 0;
+#endif
+ if (!(mp = newof(0, Handle_t, 1, n)))
+ return 0;
+#if _lib_getfsstat
+ n = getfsstat(mp->next = mp->buf, n + sizeof(struct statfs), MNT_WAIT);
+#else
+ n = getmntinfo(&mp->next, 0);
+#endif
+ if (n <= 0)
{
free(mp);
return 0;
@@ -392,11 +416,6 @@ mntread(void* handle)
t = "sfs";
break;
#endif
-#ifdef MNT_CACHEFS
- case MNT_CACHEFS:
- t = "cachefs";
- break;
-#endif
#ifdef MNT_NFS3
case MNT_NFS3:
t = "nfs3";
@@ -678,7 +697,7 @@ mntread(void* handle)
static char typ[32];
- set(&mp->hdr, mp->mnt->mnt_fsname, mp->mnt->mnt_dir, stat(mp->mnt->mnt_dir, &st) ? FS_default : strncpy(typ, fmtfs(&st), sizeof(typ) - 1), OPTIONS(mp->mnt));
+ set(&mp->hdr, mp->mnt->mnt_fsname, mp->mnt->mnt_dir, stat(mp->mnt->mnt_dir, &st) ? FS_default : strlcpy(typ, fmtfs(&st), sizeof(typ)), OPTIONS(mp->mnt));
#else
set(&mp->hdr, mp->mnt->mnt_fsname, mp->mnt->mnt_dir, mp->mnt->mnt_type, OPTIONS(mp->mnt));
#endif
diff --git a/usr/src/lib/libast/common/port/touch.c b/usr/src/contrib/ast/src/lib/libast/port/touch.c
index 7486062c03..c921181567 100644
--- a/usr/src/lib/libast/common/port/touch.c
+++ b/usr/src/contrib/ast/src/lib/libast/port/touch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/preroot/getpreroot.c b/usr/src/contrib/ast/src/lib/libast/preroot/getpreroot.c
index 8d48fa9825..3747d19bc8 100644
--- a/usr/src/lib/libast/common/preroot/getpreroot.c
+++ b/usr/src/contrib/ast/src/lib/libast/preroot/getpreroot.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/preroot/ispreroot.c b/usr/src/contrib/ast/src/lib/libast/preroot/ispreroot.c
index 235994a483..36bf62cdbc 100644
--- a/usr/src/lib/libast/common/preroot/ispreroot.c
+++ b/usr/src/contrib/ast/src/lib/libast/preroot/ispreroot.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/preroot/realopen.c b/usr/src/contrib/ast/src/lib/libast/preroot/realopen.c
index 6d3361ded3..387559b8d3 100644
--- a/usr/src/lib/libast/common/preroot/realopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/preroot/realopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/preroot/setpreroot.c b/usr/src/contrib/ast/src/lib/libast/preroot/setpreroot.c
index 1656e0703e..1e8b6c1af0 100644
--- a/usr/src/lib/libast/common/preroot/setpreroot.c
+++ b/usr/src/contrib/ast/src/lib/libast/preroot/setpreroot.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -42,7 +42,7 @@ setpreroot(register char** argv, const char* dir)
char** av;
char buf[PATH_MAX];
- if ((argv || (argv = opt_info.argv)) && (dir || (dir = getenv(PR_BASE)) && *dir) && !ispreroot(dir) && (*(cmd = *argv++) == '/' || (cmd = pathpath(buf, cmd, NiL, PATH_ABSOLUTE|PATH_REGULAR|PATH_EXECUTE))))
+ if ((argv || (argv = opt_info.argv)) && (dir || (dir = getenv(PR_BASE)) && *dir) && !ispreroot(dir) && (*(cmd = *argv++) == '/' || (cmd = pathpath(cmd, NiL, PATH_ABSOLUTE|PATH_REGULAR|PATH_EXECUTE, buf, sizeof(buf)))))
{
argc = 3;
for (ap = argv; *ap++; argc++);
@@ -50,7 +50,7 @@ setpreroot(register char** argv, const char* dir)
{
ap = av;
*ap++ = PR_COMMAND;
- *ap++ = dir;
+ *ap++ = (char*)dir;
*ap++ = cmd;
while (*ap++ = *argv++);
if (!(s = getenv(PR_SILENT)) || !*s)
diff --git a/usr/src/lib/libast/common/regex/regalloc.c b/usr/src/contrib/ast/src/lib/libast/regex/regalloc.c
index 8c90f5f7f3..03807a444c 100644
--- a/usr/src/lib/libast/common/regex/regalloc.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regalloc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/regex/regcache.c b/usr/src/contrib/ast/src/lib/libast/regex/regcache.c
index 438f7e79e1..a45f0e34f0 100644
--- a/usr/src/lib/libast/common/regex/regcache.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regcache.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -166,7 +166,7 @@ regcache(const char* pattern, regflags_t reflags, int* status)
cp->keep = 0;
regfree(&cp->re);
}
- if ((i = strlen(pattern) + 1) >= cp->size)
+ if ((i = strlen(pattern) + 1) > cp->size)
{
cp->size = roundof(i, ROUND);
if (!(cp->pattern = newof(cp->pattern, char, cp->size, 0)))
diff --git a/usr/src/lib/libast/common/regex/regclass.c b/usr/src/contrib/ast/src/lib/libast/regex/regclass.c
index e908d6821c..87ada74b5a 100644
--- a/usr/src/lib/libast/common/regex/regclass.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regclass.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -41,13 +41,6 @@ struct Ctype_s
static Ctype_t* ctypes;
-#define CTYPES 12
-#if _lib_wctype
-#define WTYPES 8
-#else
-#define WTYPES 0
-#endif
-
/*
* this stuff gets around posix failure to define isblank,
* and the fact that ctype functions are macros
@@ -99,6 +92,14 @@ static int Is_wc_5(int);
static int Is_wc_6(int);
static int Is_wc_7(int);
static int Is_wc_8(int);
+static int Is_wc_9(int);
+static int Is_wc_10(int);
+static int Is_wc_11(int);
+static int Is_wc_12(int);
+static int Is_wc_13(int);
+static int Is_wc_14(int);
+static int Is_wc_15(int);
+static int Is_wc_16(int);
#endif
@@ -119,6 +120,9 @@ static Ctype_t ctype[] =
{ SZ("upper"), Isupper },
{ SZ("word"), Isword },
{ SZ("xdigit"),Isxdigit},
+
+#define CTYPES 13
+
#if _lib_wctype
{ 0, 0, Is_wc_1 },
{ 0, 0, Is_wc_2 },
@@ -128,6 +132,21 @@ static Ctype_t ctype[] =
{ 0, 0, Is_wc_6 },
{ 0, 0, Is_wc_7 },
{ 0, 0, Is_wc_8 },
+ { 0, 0, Is_wc_9 },
+ { 0, 0, Is_wc_10 },
+ { 0, 0, Is_wc_11 },
+ { 0, 0, Is_wc_12 },
+ { 0, 0, Is_wc_13 },
+ { 0, 0, Is_wc_14 },
+ { 0, 0, Is_wc_15 },
+ { 0, 0, Is_wc_16 },
+
+#define WTYPES 16
+
+#else
+
+#define WTYPES 0
+
#endif
};
@@ -141,12 +160,23 @@ static int Is_wc_5(int c) { return iswctype(c, ctype[CTYPES+4].wtype); }
static int Is_wc_6(int c) { return iswctype(c, ctype[CTYPES+5].wtype); }
static int Is_wc_7(int c) { return iswctype(c, ctype[CTYPES+6].wtype); }
static int Is_wc_8(int c) { return iswctype(c, ctype[CTYPES+7].wtype); }
+static int Is_wc_9(int c) { return iswctype(c, ctype[CTYPES+8].wtype); }
+static int Is_wc_10(int c) { return iswctype(c, ctype[CTYPES+9].wtype); }
+static int Is_wc_11(int c) { return iswctype(c, ctype[CTYPES+10].wtype); }
+static int Is_wc_12(int c) { return iswctype(c, ctype[CTYPES+11].wtype); }
+static int Is_wc_13(int c) { return iswctype(c, ctype[CTYPES+12].wtype); }
+static int Is_wc_14(int c) { return iswctype(c, ctype[CTYPES+13].wtype); }
+static int Is_wc_15(int c) { return iswctype(c, ctype[CTYPES+14].wtype); }
+static int Is_wc_16(int c) { return iswctype(c, ctype[CTYPES+15].wtype); }
#endif
/*
* return pointer to ctype function for :class:] in s
* s points to the first char after the initial [
+ * dynamic wctype classes are locale-specific
+ * dynamic entry locale is punned in Ctype_t.next
+ * the search does a lazy (one entry at a time) flush on locale mismatch
* if e!=0 it points to next char in s
* 0 returned on error
*/
@@ -158,37 +188,62 @@ regclass(const char* s, char** e)
register int c;
register size_t n;
register const char* t;
+ Ctype_t* lc;
+ Ctype_t* xp;
+ Ctype_t* zp;
- if (c = *s++)
+ if (!(c = *s++))
+ return 0;
+ for (t = s; *t && (*t != c || *(t + 1) != ']'); t++);
+ if (*t != c || !(n = t - s))
+ return 0;
+ for (cp = ctypes; cp; cp = cp->next)
+ if (n == cp->size && strneq(s, cp->name, n))
+ goto found;
+ xp = zp = 0;
+ lc = (Ctype_t*)setlocale(LC_CTYPE, NiL);
+ for (cp = ctype; cp < &ctype[elementsof(ctype)]; cp++)
{
- for (t = s; *t && (*t != c || *(t + 1) != ']'); t++);
- if (*t != c)
- return 0;
- n = t - s;
- for (cp = ctypes; cp; cp = cp->next)
- if (n == cp->size && strneq(s, cp->name, n))
- goto found;
- for (cp = ctype; cp < &ctype[elementsof(ctype)]; cp++)
- {
#if _lib_wctype
- if (!cp->size && (cp->name = (const char*)memdup(s, n + 1)))
- {
- *((char*)cp->name + n) = 0;
- /* mvs.390 needs the (char*) cast -- barf */
- if (!(cp->wtype = wctype((char*)cp->name)))
- {
- free((char*)cp->name);
- return 0;
- }
- cp->size = n;
- goto found;
- }
+ if (!zp)
+ {
+ if (!cp->size)
+ zp = cp;
+ else if (!xp && cp->next && cp->next != lc)
+ xp = cp;
+ }
#endif
- if (n == cp->size && strneq(s, cp->name, n))
- goto found;
+ if (n == cp->size && strneq(s, cp->name, n) && (!cp->next || cp->next == lc))
+ goto found;
+ }
+#if _lib_wctype
+ if (!(cp = zp))
+ {
+ if (!(cp = xp))
+ return 0;
+ cp->size = 0;
+ if (!streq(cp->name, s))
+ {
+ free((char*)cp->name);
+ cp->name = 0;
}
}
- return 0;
+ if (!cp->name)
+ {
+ if (!(cp->name = (const char*)memdup(s, n + 1)))
+ return 0;
+ *((char*)cp->name + n) = 0;
+ }
+ /* mvs.390 needs the (char*) cast -- barf */
+ if (!(cp->wtype = wctype((char*)cp->name)))
+ {
+ free((char*)cp->name);
+ cp->name = 0;
+ return 0;
+ }
+ cp->size = n;
+ cp->next = lc;
+#endif
found:
if (e)
*e = (char*)t + 2;
diff --git a/usr/src/contrib/ast/src/lib/libast/regex/regcoll.c b/usr/src/contrib/ast/src/lib/libast/regex/regcoll.c
new file mode 100644
index 0000000000..4175309aac
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regcoll.c
@@ -0,0 +1,120 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * regex collation symbol support
+ */
+
+#include "reglib.h"
+
+/*
+ * return the collating symbol delimited by [c c], where c is either '=' or '.'
+ * s points to the first char after the initial [
+ * if e!=0 it is set to point to the next char in s on return
+ *
+ * the collating symbol is converted to multibyte in <buf,size>
+ * the return value is:
+ * -1 syntax error / invalid collating element
+ * >=0 size with 0-terminated mb character (*wc != 0)
+ * or collating element (*wc == 0) in buf
+ */
+
+int
+regcollate(register const char* s, char** e, char* buf, size_t size, wchar_t* wc)
+{
+ register int c;
+ register char* b;
+ register char* x;
+ const char* t;
+ int i;
+ int r;
+ int term;
+ wchar_t w;
+ char xfm[256];
+ char tmp[sizeof(xfm)];
+
+ if (size < 2 || (term = *s) != '.' && term != '=' || !*++s || *s == term && *(s + 1) == ']')
+ goto nope;
+ t = s;
+ w = mbchar(s);
+ if ((r = (s - t)) > 1)
+ {
+ if (*s++ != term || *s++ != ']')
+ goto oops;
+ goto done;
+ }
+ if (*s == term && *(s + 1) == ']')
+ {
+ s += 2;
+ goto done;
+ }
+ b = buf;
+ x = buf + size - 2;
+ s = t;
+ for (;;)
+ {
+ if (!(c = *s++))
+ goto oops;
+ if (c == term)
+ {
+ if (!(c = *s++))
+ goto oops;
+ if (c != term)
+ {
+ if (c != ']')
+ goto oops;
+ break;
+ }
+ }
+ if (b < x)
+ *b++ = c;
+ }
+ r = s - t - 2;
+ w = 0;
+ if (b >= x)
+ goto done;
+ *b = 0;
+ for (i = 0; i < r && i < sizeof(tmp) - 1; i++)
+ tmp[i] = '0';
+ tmp[i] = 0;
+ if (mbxfrm(xfm, buf, sizeof(xfm)) >= mbxfrm(xfm, tmp, sizeof(xfm)))
+ goto nope;
+ t = (const char*)buf;
+ done:
+ if (r <= size && (char*)t != buf)
+ {
+ memcpy(buf, t, r);
+ if (r < size)
+ buf[r] = 0;
+ }
+ if (wc)
+ *wc = w;
+ if (e)
+ *e = (char*)s;
+ return r;
+ oops:
+ s--;
+ nope:
+ if (e)
+ *e = (char*)s;
+ return -1;
+}
diff --git a/usr/src/lib/libast/common/regex/regcomp.c b/usr/src/contrib/ast/src/lib/libast/regex/regcomp.c
index 4573cc217b..4e4d481bf5 100644
--- a/usr/src/lib/libast/common/regex/regcomp.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regcomp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -122,7 +122,6 @@ typedef struct Cenv_s
int parno; /* number of last open paren */
int parnest; /* paren nest count */
int posixkludge; /* to make * nonspecial */
- int regexp; /* <regexp.h> compatibility */
Token_t token; /* token lookahead */
Stats_t stats; /* RE statistics */
int terminator; /* pattern terminator */
@@ -138,11 +137,16 @@ typedef struct Cenv_s
* allocate a new Rex_t node
*/
+#if _BLD_DEBUG
+#define node(a,b,c,d,e) node(a,b,c,d,e, const char* file, unsigned int line)
+#endif
+
static Rex_t*
node(Cenv_t* env, int type, int lo, int hi, size_t extra)
{
register Rex_t* e;
+ DEBUG_TEST(0x0800,(sfprintf(sfstdout, "%s:%d node(%d,%d,%d,%u)\n", file, line, type, lo, hi, sizeof(Rex_t) + extra)),(0));
if (e = (Rex_t*)alloc(env->disc, 0, sizeof(Rex_t) + extra))
{
memset(e, 0, sizeof(Rex_t) + extra);
@@ -159,6 +163,11 @@ node(Cenv_t* env, int type, int lo, int hi, size_t extra)
return e;
}
+#if _BLD_DEBUG
+#undef node
+#define node(a,b,c,d,e) node(a,b,c,d,e,__FILE__,__LINE__)
+#endif
+
/*
* free a Trie_node_t node
*/
@@ -769,7 +778,7 @@ magic(register Cenv_t* env, register int c, int escaped)
/*FALLTHROUGH*/
case T_BACK+8:
case T_BACK+9:
- if (env->type == SRE || c == T_BACK && !(env->flags & REG_LENIENT))
+ if (env->type == SRE || c == T_BACK && !(env->flags & (REG_LENIENT|REG_REGEXP)))
{
env->error = REG_BADESC;
goto bad;
@@ -787,7 +796,7 @@ magic(register Cenv_t* env, register int c, int escaped)
c = 0;
break;
case T_BAD:
- if (escaped == 1 && (env->flags & REG_LENIENT) && (c = mp[env->type+escaped+2]) >= T_META)
+ if (escaped == 1 && (env->flags & (REG_LENIENT|REG_REGEXP)) && (c = mp[env->type+escaped+2]) >= T_META)
return c;
goto bad;
}
@@ -858,7 +867,7 @@ magic(register Cenv_t* env, register int c, int escaped)
goto bad;
}
}
- else if (escaped && !(env->flags & REG_LENIENT) && c != ']')
+ else if (escaped && !(env->flags & (REG_LENIENT|REG_REGEXP)) && c != ']')
{
env->error = REG_BADESC;
goto bad;
@@ -894,7 +903,7 @@ magic(register Cenv_t* env, register int c, int escaped)
bad:
if (escaped == 2)
env->error = e;
- else if (env->flags & REG_LENIENT)
+ else if (env->flags & (REG_LENIENT|REG_REGEXP))
return o;
else if (escaped == 1 && !env->error)
{
@@ -962,7 +971,7 @@ token(register Cenv_t* env)
return c;
if (!(c = *(env->cursor + 1)) || c == env->terminator)
{
- if (env->flags & REG_LENIENT)
+ if (env->flags & (REG_LENIENT|REG_REGEXP))
{
if (c)
{
@@ -1186,7 +1195,7 @@ bra(Cenv_t* env)
if (*env->cursor == '^' || env->type >= SRE && *env->cursor == '!')
{
env->cursor++;
- neg = 1;
+ complicated = neg = 1;
}
else
neg = 0;
@@ -1206,7 +1215,7 @@ bra(Cenv_t* env)
if (!(c = *env->cursor) || c == env->terminator || c == env->delimiter && (env->flags & REG_ESCAPE))
goto error;
env->cursor += (w = MBSIZE(env->cursor));
- if (c == '\\' && ((env->flags & REG_CLASS_ESCAPE) || env->type >= SRE && env->parnest || *env->cursor == env->delimiter && (env->flags & REG_ESCAPE)))
+ if (c == '\\' && ((env->flags & REG_CLASS_ESCAPE) || *env->cursor == env->delimiter && (env->flags & REG_ESCAPE)))
{
if (*env->cursor)
{
@@ -1225,7 +1234,7 @@ bra(Cenv_t* env)
{
if (inrange > 1)
{
- if (env->type < SRE && !(env->flags & REG_LENIENT))
+ if (env->type < SRE && !(env->flags & (REG_LENIENT|REG_REGEXP)))
goto erange;
inrange = 0;
}
@@ -1242,7 +1251,7 @@ bra(Cenv_t* env)
c = w;
if (c > UCHAR_MAX)
{
- if (env->type < SRE && !(env->flags & REG_LENIENT) && !mbwide())
+ if (env->type < SRE && !(env->flags & (REG_LENIENT|REG_REGEXP)) && !mbwide())
goto erange;
c = UCHAR_MAX;
}
@@ -1276,7 +1285,7 @@ bra(Cenv_t* env)
{
if (!inrange && env->cursor != begin && *env->cursor != ']')
{
- if (env->type < SRE && !(env->flags & REG_LENIENT))
+ if (env->type < SRE && !(env->flags & (REG_LENIENT|REG_REGEXP)))
goto erange;
continue;
}
@@ -1294,7 +1303,7 @@ bra(Cenv_t* env)
case 0:
goto error;
case ':':
- if (env->regexp)
+ if (env->flags & REG_REGEXP)
goto normal;
if (inrange == 1)
{
@@ -1343,7 +1352,7 @@ bra(Cenv_t* env)
elements++;
continue;
case '=':
- if (env->regexp)
+ if (env->flags & REG_REGEXP)
goto normal;
if (inrange == 2)
goto erange;
@@ -1352,7 +1361,7 @@ bra(Cenv_t* env)
setadd(e->re.charclass, last);
elements++;
}
- if ((c = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)buf, sizeof(buf))) < 0)
+ if ((c = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)buf, sizeof(buf), NiL)) < 0)
goto ecollate;
if (c > 1)
collate++;
@@ -1364,9 +1373,9 @@ bra(Cenv_t* env)
elements++;
continue;
case '.':
- if (env->regexp)
+ if (env->flags & REG_REGEXP)
goto normal;
- if ((c = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)buf, sizeof(buf))) < 0)
+ if ((c = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)buf, sizeof(buf), NiL)) < 0)
goto ecollate;
if (c > 1)
collate++;
@@ -1388,7 +1397,7 @@ bra(Cenv_t* env)
{
for (i = last; i <= c; i++)
setadd(e->re.charclass, i);
- inrange = env->type >= SRE || (env->flags & REG_LENIENT);
+ inrange = env->type >= SRE || (env->flags & (REG_LENIENT|REG_REGEXP));
elements += 2;
}
else if (env->type >= SRE)
@@ -1398,7 +1407,7 @@ bra(Cenv_t* env)
elements += 2;
inrange = 1;
}
- else if (!(env->flags & REG_LENIENT))
+ else if (!(env->flags & (REG_LENIENT|REG_REGEXP)))
goto erange;
else
inrange = 0;
@@ -1423,10 +1432,9 @@ bra(Cenv_t* env)
Cchr_t key;
int rw;
int rc;
- int wc;
+ wchar_t wc;
unsigned char* rp;
unsigned char* pp;
- char* wp;
char cb[2][COLL_KEY_MAX+1];
static Dtdisc_t disc;
@@ -1436,7 +1444,7 @@ bra(Cenv_t* env)
if (!(dt = (Dt_t*)LCINFO(AST_LC_COLLATE)->data))
{
disc.key = offsetof(Cchr_t, key);
- if ((cc = newof(0, Cchr_t, elementsof(primary), 0)) && (dt = dtopen(&disc, Dttree)))
+ if ((cc = newof(0, Cchr_t, elementsof(primary), 0)) && (dt = dtopen(&disc, Dtoset)))
{
for (i = 0; i < elementsof(primary) - 1; i++, cc++)
{
@@ -1462,7 +1470,7 @@ bra(Cenv_t* env)
drop(env->disc, e);
if (ic = env->flags & REG_ICASE)
elements *= 2;
- if (!(e = node(env, REX_COLL_CLASS, 1, 1, (elements + 2) * sizeof(Celt_t))))
+ if (!(e = node(env, REX_COLL_CLASS, 1, 1, (elements + 3) * sizeof(Celt_t))))
return 0;
ce = (Celt_t*)e->re.data;
e->re.collate.invert = neg;
@@ -1475,7 +1483,7 @@ bra(Cenv_t* env)
goto error;
pp = env->cursor;
env->cursor += (w = MBSIZE(env->cursor));
- if (c == '\\' && ((env->flags & REG_CLASS_ESCAPE) || env->type >= SRE && env->parnest || *env->cursor == env->delimiter && (env->flags & REG_ESCAPE)))
+ if (c == '\\' && ((env->flags & REG_CLASS_ESCAPE) || *env->cursor == env->delimiter && (env->flags & REG_ESCAPE)))
{
if (*env->cursor)
{
@@ -1494,7 +1502,7 @@ bra(Cenv_t* env)
{
if (inrange > 1)
{
- if (env->type < SRE && !(env->flags & REG_LENIENT))
+ if (env->type < SRE && !(env->flags & (REG_LENIENT|REG_REGEXP)))
goto erange;
inrange = 0;
}
@@ -1536,7 +1544,7 @@ bra(Cenv_t* env)
{
if (!inrange && env->cursor != begin && *env->cursor != ']')
{
- if (env->type < SRE && !(env->flags & REG_LENIENT))
+ if (env->type < SRE && !(env->flags & (REG_LENIENT|REG_REGEXP)))
goto erange;
continue;
}
@@ -1553,7 +1561,7 @@ bra(Cenv_t* env)
case 0:
goto error;
case ':':
- if (env->regexp)
+ if (env->flags & REG_REGEXP)
goto complicated_normal;
if (inrange == 1)
ce = col(ce, ic, rp, rw, rc, NiL, 0, 0);
@@ -1589,7 +1597,7 @@ bra(Cenv_t* env)
inrange = 0;
continue;
case '=':
- if (env->regexp)
+ if (env->flags & REG_REGEXP)
goto complicated_normal;
if (inrange == 2)
goto erange;
@@ -1597,10 +1605,8 @@ bra(Cenv_t* env)
ce = col(ce, ic, rp, rw, rc, NiL, 0, 0);
pp = (unsigned char*)cb[inrange];
rp = env->cursor + 1;
- if ((rw = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)pp, COLL_KEY_MAX)) < 0)
+ if ((rw = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)pp, COLL_KEY_MAX, &wc)) < 0)
goto ecollate;
- wp = (char*)pp;
- wc = mbchar(wp);
c = 0;
if (ic)
{
@@ -1613,11 +1619,19 @@ bra(Cenv_t* env)
else if (iswlower(wc))
c = 'l';
}
+ i = 1;
for (;;)
{
mbxfrm(key.key, (char*)pp, COLL_KEY_MAX);
if (!(cc = (Cchr_t*)dtsearch(dt, &key)) && !(cc = (Cchr_t*)dtprev(dt, &key)))
+ {
+ if (i)
+ {
+ c = *pp;
+ goto singleton;
+ }
goto ecollate;
+ }
xc = (tc = (Cchr_t*)dtprev(dt, cc)) && !strcasecmp((char*)tc->nam, (char*)cc->nam) ? tc : cc;
if (c == 'l' || c == 'L' && !(c = 0))
ce->typ = COLL_range_lc;
@@ -1627,7 +1641,14 @@ bra(Cenv_t* env)
ce->typ = COLL_range;
strcpy((char*)ce->beg, (char*)xc->key);
if (!(cc = (Cchr_t*)dtnext(dt, cc)))
+ {
+ if (i)
+ {
+ c = *pp;
+ goto singleton;
+ }
goto ecollate;
+ }
if (!strcasecmp((char*)xc->nam, (char*)cc->nam) && (tc = (Cchr_t*)dtnext(dt, cc)))
cc = tc;
strcpy((char*)ce->end, (char*)cc->key);
@@ -1646,17 +1667,18 @@ bra(Cenv_t* env)
c = 'U';
}
rw = mbconv((char*)pp, wc);
+ i = 0;
}
inrange = 0;
c = *pp;
continue;
case '.':
- if (env->regexp)
+ if (env->flags & REG_REGEXP)
goto complicated_normal;
pp = (unsigned char*)cb[inrange];
- if ((w = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)pp, COLL_KEY_MAX)) < 0)
+ if ((w = regcollate((char*)env->cursor, (char**)&env->cursor, (char*)pp, COLL_KEY_MAX, NiL)) < 0)
goto ecollate;
- c = buf[0];
+ c = *pp;
break;
default:
complicated_normal:
@@ -1665,19 +1687,20 @@ bra(Cenv_t* env)
break;
}
}
+ singleton:
if (inrange == 2)
{
ce = col(ce, ic, rp, rw, rc, pp, w, c);
if (strcmp((char*)ce->beg, (char*)ce->end) > 0)
{
- if (env->type < SRE && !(env->flags & REG_LENIENT))
+ if (env->type < SRE && !(env->flags & (REG_LENIENT|REG_REGEXP)))
goto erange;
(ce-1)->typ = COLL_char;
strcpy((char*)ce->beg, (char*)(ce-1)->end);
ce->typ = COLL_char;
ce++;
}
- inrange = env->type >= SRE || (env->flags & REG_LENIENT);
+ inrange = env->type >= SRE || (env->flags & (REG_LENIENT|REG_REGEXP));
}
else if (inrange == 1)
ce = col(ce, ic, rp, rw, rc, NiL, 0, 0);
@@ -1998,7 +2021,7 @@ chr(register Cenv_t* env, int* escaped)
return c;
if (!(c = *(env->cursor + 1)) || c == env->terminator)
{
- if (env->flags & REG_LENIENT)
+ if (env->flags & (REG_LENIENT|REG_REGEXP))
return c ? c : '\\';
env->error = REG_EESCAPE;
return -1;
@@ -2020,6 +2043,7 @@ grp(Cenv_t* env, int parno)
Rex_t* e;
Rex_t* f;
int c;
+ int g;
int i;
int n;
int x;
@@ -2028,6 +2052,7 @@ grp(Cenv_t* env, int parno)
int beg;
unsigned char* p;
+ g = env->flags;
beg = env->pattern == env->cursor - env->token.len;
if (!(c = env->token.lex) && (c = *env->cursor))
env->cursor++;
@@ -2062,6 +2087,7 @@ grp(Cenv_t* env, int parno)
case 'R': /* pcre */
case 'S':
case 'U': /* pcre */
+ case 'V':
case 'X': /* pcre */
x = REX_GROUP;
i = 1;
@@ -2148,29 +2174,33 @@ grp(Cenv_t* env, int parno)
else
env->flags &= ~REG_COMMENT;
break;
+ case 'X':
+ if (typ >= 0 || env->type == ERE && (env->flags & REG_CLASS_ESCAPE))
+ break; /* PCRE_EXTRA */
+ /*FALLTHROUGH*/
case 'A':
- env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_SHELL|REG_LEFT|REG_RIGHT|REG_CLASS_ESCAPE);
+ env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_REGEXP|REG_SHELL|REG_LEFT|REG_RIGHT);
env->flags |= REG_AUGMENTED|REG_EXTENDED;
typ = ARE;
break;
case 'B':
case 'G':
- env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_SHELL|REG_LEFT|REG_RIGHT|REG_CLASS_ESCAPE);
+ env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_REGEXP|REG_SHELL|REG_LEFT|REG_RIGHT);
typ = BRE;
break;
case 'E':
- env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_SHELL|REG_LEFT|REG_RIGHT|REG_CLASS_ESCAPE);
+ env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_REGEXP|REG_SHELL|REG_LEFT|REG_RIGHT);
env->flags |= REG_EXTENDED;
typ = ERE;
break;
case 'F':
case 'L':
- env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_SHELL|REG_LEFT|REG_RIGHT|REG_CLASS_ESCAPE);
+ env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_REGEXP|REG_SHELL|REG_LEFT|REG_RIGHT);
env->flags |= REG_LITERAL;
typ = ERE;
break;
case 'K':
- env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_SHELL|REG_LEFT|REG_RIGHT|REG_CLASS_ESCAPE);
+ env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_REGEXP|REG_SHELL|REG_LEFT|REG_RIGHT);
env->flags |= REG_AUGMENTED|REG_SHELL|REG_LEFT|REG_RIGHT;
typ = KRE;
break;
@@ -2184,22 +2214,28 @@ grp(Cenv_t* env, int parno)
/* used by caller to disable glob(3) GLOB_STARSTAR */
break;
case 'P':
- env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_SHELL|REG_LEFT|REG_RIGHT|REG_CLASS_ESCAPE);
+ env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_REGEXP|REG_SHELL|REG_LEFT|REG_RIGHT);
env->flags |= REG_EXTENDED|REG_CLASS_ESCAPE;
typ = ERE;
break;
case 'S':
- env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_SHELL|REG_LEFT|REG_RIGHT|REG_CLASS_ESCAPE);
+ env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_REGEXP|REG_SHELL|REG_LEFT|REG_RIGHT);
env->flags |= REG_SHELL|REG_LEFT|REG_RIGHT;
typ = SRE;
break;
case 'U': /* PCRE_UNGREEDY */
- if (i)
- env->flags |= REG_MINIMAL;
- else
- env->flags &= ~REG_MINIMAL;
+ if (typ >= 0 || env->type == ERE && (env->flags & REG_CLASS_ESCAPE))
+ {
+ if (i)
+ env->flags |= REG_MINIMAL;
+ else
+ env->flags &= ~REG_MINIMAL;
+ }
break;
- case 'X': /* PCRE_EXTRA */
+ case 'V':
+ env->flags &= ~(REG_AUGMENTED|REG_EXTENDED|REG_LITERAL|REG_REGEXP|REG_SHELL|REG_LEFT|REG_RIGHT);
+ env->flags |= REG_REGEXP;
+ typ = BRE;
break;
default:
env->error = REG_BADRPT;
@@ -2369,7 +2405,7 @@ grp(Cenv_t* env, int parno)
c = c * 2 - 1;
if (!c || c > env->parno || !env->paren[c])
{
- if (!(env->flags & REG_LENIENT))
+ if (!(env->flags & (REG_LENIENT|REG_REGEXP)))
{
env->error = REG_ESUBREG;
return 0;
@@ -2481,28 +2517,37 @@ grp(Cenv_t* env, int parno)
env->error = REG_BADRPT;
return 0;
}
- if (x && !(e = alt(env, parno, 0)))
- return 0;
+ p = env->pattern;
+ i = env->type;
+ if (x)
+ {
+ if (typ >= 0)
+ env->type = typ;
+ if (!(e = alt(env, parno, 0)))
+ goto nope;
+ env->flags = g;
+ env->type = i;
+ }
c = token(env);
env->parnest--;
if (c != T_CLOSE && (!(env->flags & REG_LITERAL) || c != ')'))
{
env->error = REG_EPAREN;
- return 0;
+ goto nope;
}
eat(env);
- if (typ >= 0)
- {
- if (beg)
- env->pattern = env->cursor;
- env->type = typ;
- }
+ if (typ >= 0 && beg)
+ env->pattern = env->cursor;
if (!x)
+ {
+ if (typ >= 0)
+ env->type = typ;
return 0;
+ }
if (!(f = node(env, x, 0, 0, 0)))
{
drop(env->disc, e);
- return 0;
+ goto nope;
}
f->re.group.expr.rex = e;
if (x == REX_GROUP_BEHIND || x == REX_GROUP_BEHIND_NOT)
@@ -2512,7 +2557,7 @@ grp(Cenv_t* env, int parno)
drop(env->disc, f);
if (!env->error)
env->error = REG_ECOUNT;
- return 0;
+ goto nope;
}
f->re.group.size = env->stats.m;
memset(&env->stats, 0, sizeof(env->stats));
@@ -2524,7 +2569,13 @@ grp(Cenv_t* env, int parno)
f = rep(env, f, parno, env->parno);
break;
}
- return f;
+ if (f)
+ return f;
+ nope:
+ env->flags = g;
+ env->pattern = p;
+ env->type = i;
+ return 0;
}
static Rex_t*
@@ -2676,7 +2727,7 @@ seq(Cenv_t* env)
parno = ++env->parno;
if (!(e = alt(env, parno + 1, 0)))
break;
- if (e->type == REX_NULL && env->type == ERE && !(env->flags & REG_NULL))
+ if (e->type == REX_NULL && env->type == ERE && !(env->flags & (REG_NULL|REG_REGEXP)))
{
drop(env->disc, e);
env->error = (*env->cursor == 0 || *env->cursor == env->delimiter || *env->cursor == env->terminator) ? REG_EPAREN : REG_ENULL;
@@ -2864,7 +2915,7 @@ alt(Cenv_t* env, int number, int cond)
drop(env->disc, e);
return 0;
}
- if ((e->type == REX_NULL || f->type == REX_NULL) && !(env->flags & REG_NULL))
+ if ((e->type == REX_NULL || f->type == REX_NULL) && !(env->flags & (REG_NULL|REG_REGEXP)))
goto bad;
if (!cond && (g = trie(env, e, f)))
return g;
@@ -2990,7 +3041,7 @@ special(Cenv_t* env, regex_t* p)
Bm_mask_t* h;
unsigned char* v;
size_t* q;
- unsigned long l;
+ size_t l;
int i;
int j;
@@ -3137,7 +3188,7 @@ special(Cenv_t* env, regex_t* p)
break;
return 0;
case REX_NULL:
- if (env->flags & REG_NULL)
+ if (env->flags & (REG_NULL|REG_REGEXP))
break;
env->error = REG_ENULL;
return 1;
@@ -3250,14 +3301,17 @@ regcomp(regex_t* p, const char* pattern, regflags_t flags)
{
if (env.flags & REG_SHELL_PATH)
env.explicit = env.mappedslash;
+ if (!(env.flags & REG_SHELL_ESCAPED))
+ env.flags |= REG_CLASS_ESCAPE;
env.flags |= REG_LENIENT|REG_NULL;
env.type = env.type == BRE ? SRE : KRE;
}
+ else
+ env.flags &= ~(REG_SHELL_DOT|REG_SHELL_ESCAPED|REG_SHELL_GROUP|REG_SHELL_PATH);
if ((env.flags & (REG_NEWLINE|REG_SPAN)) == REG_NEWLINE)
env.explicit = env.mappednewline;
p->env->leading = (env.flags & REG_SHELL_DOT) ? env.mappeddot : -1;
env.posixkludge = !(env.flags & (REG_EXTENDED|REG_SHELL));
- env.regexp = !!(env.flags & REG_REGEXP);
env.token.lex = 0;
env.token.push = 0;
if (env.flags & REG_DELIMITED)
@@ -3281,43 +3335,34 @@ regcomp(regex_t* p, const char* pattern, regflags_t flags)
env.error = REG_EPAREN;
goto bad;
}
- p->env->stats.re_flags = env.flags & (REG_EXTENDED|REG_AUGMENTED|REG_SHELL);
- if (env.flags & REG_LEFT)
+ if ((env.flags & REG_LEFT) && p->env->rex->type != REX_BEG)
{
- if (p->env->rex->type != REX_BEG)
+ if (p->env->rex->type == REX_ALT)
+ env.flags &= ~REG_FIRST;
+ if (!(e = node(&env, REX_BEG, 0, 0, 0)))
{
- if (p->env->rex->type == REX_ALT)
- env.flags &= ~REG_FIRST;
- if (!(e = node(&env, REX_BEG, 0, 0, 0)))
- {
- regfree(p);
- return fatal(disc, REG_ESPACE, pattern);
- }
- e->next = p->env->rex;
- p->env->rex = e;
- p->env->once = 1;
+ regfree(p);
+ return fatal(disc, REG_ESPACE, pattern);
}
- p->env->stats.re_flags |= REG_LEFT;
+ e->next = p->env->rex;
+ p->env->rex = e;
+ p->env->once = 1;
}
for (e = p->env->rex; e->next; e = e->next);
p->env->done.type = REX_DONE;
p->env->done.flags = e->flags;
- if (env.flags & REG_RIGHT)
+ if ((env.flags & REG_RIGHT) && e->type != REX_END)
{
- if (e->type != REX_END)
+ if (p->env->rex->type == REX_ALT)
+ env.flags &= ~REG_FIRST;
+ if (!(f = node(&env, REX_END, 0, 0, 0)))
{
- if (p->env->rex->type == REX_ALT)
- env.flags &= ~REG_FIRST;
- if (!(f = node(&env, REX_END, 0, 0, 0)))
- {
- regfree(p);
- return fatal(disc, REG_ESPACE, pattern);
- }
- f->flags = e->flags;
- f->map = e->map;
- e->next = f;
+ regfree(p);
+ return fatal(disc, REG_ESPACE, pattern);
}
- p->env->stats.re_flags |= REG_RIGHT;
+ f->flags = e->flags;
+ f->map = e->map;
+ e->next = f;
}
if (stats(&env, p->env->rex))
{
diff --git a/usr/src/lib/libast/common/regex/regdecomp.c b/usr/src/contrib/ast/src/lib/libast/regex/regdecomp.c
index 1f239615b1..a9fe6f3153 100644
--- a/usr/src/lib/libast/common/regex/regdecomp.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regdecomp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/regex/regerror.c b/usr/src/contrib/ast/src/lib/libast/regex/regerror.c
index 3899e47008..439230817a 100644
--- a/usr/src/lib/libast/common/regex/regerror.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regerror.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -25,7 +25,7 @@
* posix regex error message handler
*/
-static const char id[] = "\n@(#)$Id: regex (AT&T Research) 2009-12-11 $\0\n";
+static const char id[] = "\n@(#)$Id: regex (AT&T Research) 2012-05-31 $\0\n";
#include "reglib.h"
@@ -69,7 +69,7 @@ regerror(int code, const regex_t* p, char* buf, size_t size)
s = (const char*)"unknown error";
if (size)
{
- strncpy(buf, s, size);
+ strlcpy(buf, s, size);
buf[size - 1] = 0;
}
else
diff --git a/usr/src/lib/libast/common/regex/regexec.c b/usr/src/contrib/ast/src/lib/libast/regex/regexec.c
index e73efa09bc..a472d843d5 100644
--- a/usr/src/lib/libast/common/regex/regexec.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regexec.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -52,3 +52,39 @@ regexec(const regex_t* p, const char* s, size_t nmatch, regmatch_t* match, regfl
}
return regnexec(p, s, s ? strlen(s) : 0, nmatch, match, flags);
}
+
+/*
+ * 20120528: regoff_t changed from int to ssize_t
+ */
+
+#if defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+#undef regexec
+#if _map_libc
+#define regexec _ast_regexec
+#endif
+
+extern int
+regexec(const regex_t* p, const char* s, size_t nmatch, oldregmatch_t* oldmatch, regflags_t flags)
+{
+ if (oldmatch)
+ {
+ regmatch_t* match;
+ size_t i;
+ int r;
+
+ if (!(match = oldof(0, regmatch_t, nmatch, 0)))
+ return -1;
+ if (!(r = regexec_20120528(p, s, nmatch, match, flags)))
+ for (i = 0; i < nmatch; i++)
+ {
+ oldmatch[i].rm_so = match[i].rm_so;
+ oldmatch[i].rm_eo = match[i].rm_eo;
+ }
+ free(match);
+ return r;
+ }
+ return regexec_20120528(p, s, 0, NiL, flags);
+}
diff --git a/usr/src/lib/libast/common/regex/regfatal.c b/usr/src/contrib/ast/src/lib/libast/regex/regfatal.c
index ae48477e90..09e8689e04 100644
--- a/usr/src/lib/libast/common/regex/regfatal.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regfatal.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/regex/reginit.c b/usr/src/contrib/ast/src/lib/libast/regex/reginit.c
index 23066fa5b5..e4719b41bc 100644
--- a/usr/src/lib/libast/common/regex/reginit.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/reginit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/regex/reglib.h b/usr/src/contrib/ast/src/lib/libast/regex/reglib.h
index 8d2d3ea707..1b3fc18efe 100644
--- a/usr/src/lib/libast/common/regex/reglib.h
+++ b/usr/src/contrib/ast/src/lib/libast/regex/reglib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -76,7 +76,7 @@ typedef struct regsubop_s
#define RE_DUP_INF (RE_DUP_MAX+1) /* infinity, for * */
#define BACK_REF_MAX 9
-#define REG_COMP (REG_DELIMITED|REG_ESCAPE|REG_EXTENDED|REG_FIRST|REG_ICASE|REG_NOSUB|REG_NEWLINE|REG_SHELL|REG_AUGMENTED|REG_LEFT|REG_LITERAL|REG_MINIMAL|REG_MULTIREF|REG_NULL|REG_RIGHT|REG_LENIENT|REG_MUSTDELIM)
+#define REG_COMP (~REG_EXEC)
#define REG_EXEC (REG_ADVANCE|REG_INVERT|REG_NOTBOL|REG_NOTEOL|REG_STARTEND)
#define REX_NULL 0 /* null string (internal) */
@@ -305,8 +305,8 @@ typedef struct Vector_s
char* vec; /* the data */
int inc; /* growth increment */
int siz; /* element size */
- int max; /* max index */
- int cur; /* current index -- user domain */
+ ssize_t max; /* max index */
+ ssize_t cur; /* current index -- user domain */
} Vector_t;
/*
@@ -555,6 +555,12 @@ typedef struct reglib_s /* library private regex_t info */
unsigned char test; /* debug/test bitmask */
} Env_t;
+typedef struct oldregmatch_s /* pre-20120528 regmatch_t */
+{
+ int rm_so; /* offset of start */
+ int rm_eo; /* offset of end */
+} oldregmatch_t;
+
typedef struct State_s /* shared state */
{
regmatch_t nomatch;
diff --git a/usr/src/lib/libast/common/regex/regnexec.c b/usr/src/contrib/ast/src/lib/libast/regex/regnexec.c
index 13bb1b7238..bd66422e0d 100644
--- a/usr/src/lib/libast/common/regex/regnexec.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regnexec.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -234,10 +234,9 @@ typedef struct
regmatch_t save[1];
} Match_frame_t;
-#define matchframe stkdata(stkstd,Match_frame_t)
#define matchpush(e,x) ((x)->re.group.number?_matchpush(e,x):0)
-#define matchcopy(e,x) ((x)->re.group.number?memcpy(matchframe->match,matchframe->save,matchframe->size):(void*)0)
-#define matchpop(e,x) ((x)->re.group.number?memcpy(matchframe->match,matchframe->save,matchframe->size),stkpop(stkstd):(void*)0)
+#define matchcopy(e,x) do if ((x)->re.group.number) { Match_frame_t* fp = (void*)stkframe(stkstd)->data; memcpy(fp->match, fp->save, fp->size); } while (0)
+#define matchpop(e,x) do if ((x)->re.group.number) { Match_frame_t* fp = (void*)stkframe(stkstd)->data; memcpy(fp->match, fp->save, fp->size); stkpop(stkstd); } while (0)
#define pospop(e) (--(e)->pos->cur)
@@ -371,12 +370,12 @@ showmatch(regmatch_t* p)
if (p->rm_so < 0)
sfputc(sfstdout, '?');
else
- sfprintf(sfstdout, "%d", p->rm_so);
+ sfprintf(sfstdout, "%z", p->rm_so);
sfputc(sfstdout, ',');
if (p->rm_eo < 0)
sfputc(sfstdout, '?');
else
- sfprintf(sfstdout, "%d", p->rm_eo);
+ sfprintf(sfstdout, "%z", p->rm_eo);
sfputc(sfstdout, ')');
}
@@ -442,7 +441,7 @@ parserep(Env_t* env, Rex_t* rex, Rex_t* cont, unsigned char* s, int n)
return BAD;
if (pospush(env, rex, s, BEG_ONE))
return BAD;
-DEBUG_TEST(0x0004,(sfprintf(sfstdout,"AHA#%04d 0x%04x PUSH %d (%d,%d)(%d,%d)(%d,%d) (%d,%d)(%d,%d)(%d,%d)\n", __LINE__, debug_flag, rex->re.group.number, env->best[0].rm_so, env->best[0].rm_eo, env->best[1].rm_so, env->best[1].rm_eo, env->best[2].rm_so, env->best[2].rm_eo, env->match[0].rm_so, env->match[0].rm_eo, env->match[1].rm_so, env->match[1].rm_eo, env->match[2].rm_so, env->match[2].rm_eo)),(0));
+DEBUG_TEST(0x0004,(sfprintf(sfstdout,"AHA#%04d 0x%04x PUSH %d (%z,%z)(%z,%z)(%z,%z) (%z,%z)(%z,%z)(%z,%z)\n", __LINE__, debug_flag, rex->re.group.number, env->best[0].rm_so, env->best[0].rm_eo, env->best[1].rm_so, env->best[1].rm_eo, env->best[2].rm_so, env->best[2].rm_eo, env->match[0].rm_so, env->match[0].rm_eo, env->match[1].rm_so, env->match[1].rm_eo, env->match[2].rm_so, env->match[2].rm_eo)),(0));
}
r = parse(env, rex->re.group.expr.rex, &catcher, s);
DEBUG_TEST(0x0010,(sfprintf(sfstdout, "AHA#%04d 0x%04x parserep parse %d %d `%-.*s'\n", __LINE__, debug_flag, rex->re.group.number, r, env->end - s, s)),(0));
@@ -450,7 +449,7 @@ DEBUG_TEST(0x0004,(sfprintf(sfstdout,"AHA#%04d 0x%04x PUSH %d (%d,%d)(%d,%d)(%
{
pospop(env);
matchpop(env, rex);
-DEBUG_TEST(0x0004,(sfprintf(sfstdout,"AHA#%04d 0x%04x POP %d %d (%d,%d)(%d,%d)(%d,%d) (%d,%d)(%d,%d)(%d,%d)\n", __LINE__, debug_flag, rex->re.group.number, r, env->best[0].rm_so, env->best[0].rm_eo, env->best[1].rm_so, env->best[1].rm_eo, env->best[2].rm_so, env->best[2].rm_eo, env->match[0].rm_so, env->match[0].rm_eo, env->match[1].rm_so, env->match[1].rm_eo, env->match[2].rm_so, env->match[2].rm_eo)),(0));
+DEBUG_TEST(0x0004,(sfprintf(sfstdout,"AHA#%04d 0x%04x POP %d %d (%z,%z)(%z,%z)(%z,%z) (%z,%z)(%z,%z)(%z,%z)\n", __LINE__, debug_flag, rex->re.group.number, r, env->best[0].rm_so, env->best[0].rm_eo, env->best[1].rm_so, env->best[1].rm_eo, env->best[2].rm_so, env->best[2].rm_eo, env->match[0].rm_so, env->match[0].rm_eo, env->match[1].rm_so, env->match[1].rm_eo, env->match[2].rm_so, env->match[2].rm_eo)),(0));
}
switch (r)
{
@@ -799,10 +798,10 @@ parse(Env_t* env, Rex_t* rex, Rex_t* cont, unsigned char* s)
{
int c;
int d;
- int i;
int m;
- int n;
int r;
+ ssize_t i;
+ ssize_t n;
int* f;
unsigned char* p;
unsigned char* t;
@@ -1038,7 +1037,7 @@ DEBUG_TEST(0x0008,(sfprintf(sfstdout, "AHA#%04d 0x%04x parse %s `%-.*s'\n", __LI
return BEST;
n = s - env->beg;
r = env->nsub;
- DEBUG_TEST(0x0100,(sfprintf(sfstdout,"AHA#%04d 0x%04x %s (%d,%d)(%d,%d)(%d,%d)(%d,%d) (%d,%d)(%d,%d)\n", __LINE__, debug_flag, rexname(rex), env->best[0].rm_so, env->best[0].rm_eo, env->best[1].rm_so, env->best[1].rm_eo, env->best[2].rm_so, env->best[2].rm_eo, env->best[3].rm_so, env->best[3].rm_eo, env->match[0].rm_so, env->match[0].rm_eo, env->match[1].rm_so, env->match[1].rm_eo)),(0));
+ DEBUG_TEST(0x0100,(sfprintf(sfstdout,"AHA#%04d 0x%04x %s (%z,%z)(%z,%z)(%z,%z)(%z,%z) (%z,%z)(%z,%z)\n", __LINE__, debug_flag, rexname(rex), env->best[0].rm_so, env->best[0].rm_eo, env->best[1].rm_so, env->best[1].rm_eo, env->best[2].rm_so, env->best[2].rm_eo, env->best[3].rm_so, env->best[3].rm_eo, env->match[0].rm_so, env->match[0].rm_eo, env->match[1].rm_so, env->match[1].rm_eo)),(0));
if ((i = env->best[0].rm_eo) >= 0)
{
if (rex->flags & REG_MINIMAL)
@@ -1069,7 +1068,7 @@ DEBUG_TEST(0x0008,(sfprintf(sfstdout, "AHA#%04d 0x%04x parse %s `%-.*s'\n", __LI
}
env->bestpos->cur = n;
memcpy(env->bestpos->vec, env->pos->vec, n * sizeof(Pos_t));
- DEBUG_TEST(0x0100,(sfprintf(sfstdout,"AHA#%04d 0x%04x %s (%d,%d)(%d,%d)(%d,%d)(%d,%d) (%d,%d)(%d,%d)\n", __LINE__, debug_flag, rexname(rex), env->best[0].rm_so, env->best[0].rm_eo, env->best[1].rm_so, env->best[1].rm_eo, env->best[2].rm_so, env->best[2].rm_eo, env->best[3].rm_so, env->best[3].rm_eo, env->match[0].rm_so, env->match[0].rm_eo, env->match[1].rm_so, env->match[1].rm_eo)),(0));
+ DEBUG_TEST(0x0100,(sfprintf(sfstdout,"AHA#%04d 0x%04x %s (%z,%z)(%z,%z)(%z,%z)(%z,%z) (%z,%z)(%z,%z)\n", __LINE__, debug_flag, rexname(rex), env->best[0].rm_so, env->best[0].rm_eo, env->best[1].rm_so, env->best[1].rm_eo, env->best[2].rm_so, env->best[2].rm_eo, env->best[3].rm_so, env->best[3].rm_eo, env->match[0].rm_so, env->match[0].rm_eo, env->match[1].rm_so, env->match[1].rm_eo)),(0));
return GOOD;
case REX_DOT:
if (LEADING(env, rex, s))
@@ -1616,6 +1615,7 @@ DEBUG_TEST(0x0200,(sfprintf(sfstdout,"AHA#%04d 0x%04x parse %s=>%s `%-.*s'\n", _
}
else
{
+ e = env->end;
if (!(rex->flags & REG_ICASE))
{
for (i = 0; i < m && s < e; i++, s = t)
@@ -1845,14 +1845,14 @@ list(Env_t* env, Rex_t* rex)
int
regnexec(const regex_t* p, const char* s, size_t len, size_t nmatch, regmatch_t* match, regflags_t flags)
{
- register int n;
- register int i;
- int j;
- int k;
- int m;
- int advance;
- Env_t* env;
- Rex_t* e;
+ register ssize_t n;
+ register int i;
+ int j;
+ int k;
+ int m;
+ int advance;
+ Env_t* env;
+ Rex_t* e;
DEBUG_INIT();
DEBUG_TEST(0x0001,(sfprintf(sfstdout, "AHA#%04d 0x%04x regnexec %d 0x%08x `%-.*s'\n", __LINE__, debug_flag, nmatch, flags, len, s)),(0));
@@ -2044,3 +2044,39 @@ regfree(regex_t* p)
}
}
}
+
+/*
+ * 20120528: regoff_t changed from int to ssize_t
+ */
+
+#if defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+#undef regnexec
+#if _map_libc
+#define regnexec _ast_regnexec
+#endif
+
+extern int
+regnexec(const regex_t* p, const char* s, size_t len, size_t nmatch, oldregmatch_t* oldmatch, regflags_t flags)
+{
+ if (oldmatch)
+ {
+ regmatch_t* match;
+ ssize_t i;
+ int r;
+
+ if (!(match = oldof(0, regmatch_t, nmatch, 0)))
+ return -1;
+ if (!(r = regnexec_20120528(p, s, len, nmatch, match, flags)))
+ for (i = 0; i < nmatch; i++)
+ {
+ oldmatch[i].rm_so = match[i].rm_so;
+ oldmatch[i].rm_eo = match[i].rm_eo;
+ }
+ free(match);
+ return r;
+ }
+ return regnexec_20120528(p, s, len, 0, NiL, flags);
+}
diff --git a/usr/src/lib/libast/common/regex/regrecord.c b/usr/src/contrib/ast/src/lib/libast/regex/regrecord.c
index 1a3b428ac1..001d14c099 100644
--- a/usr/src/lib/libast/common/regex/regrecord.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regrecord.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/regex/regrexec.c b/usr/src/contrib/ast/src/lib/libast/regex/regrexec.c
index a6d5fb5351..a31ac6b2fc 100644
--- a/usr/src/lib/libast/common/regex/regrexec.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regrexec.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -44,7 +44,7 @@ regrexec(const regex_t* p, const char* s, size_t len, size_t nmatch, regmatch_t*
register size_t* fail;
register Bm_mask_t** mask;
register size_t index;
- register int n;
+ register ssize_t n;
unsigned char* end;
size_t mid;
int complete;
@@ -143,3 +143,39 @@ regrexec(const regex_t* p, const char* s, size_t len, size_t nmatch, regmatch_t*
env->rex = e;
return n;
}
+
+/*
+ * 20120528: regoff_t changed from int to ssize_t
+ */
+
+#if defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+#undef regrexec
+#if _map_libc
+#define regrexec _ast_regrexec
+#endif
+
+extern int
+regrexec(const regex_t* p, const char* s, size_t len, size_t nmatch, oldregmatch_t* oldmatch, regflags_t flags, int sep, void* handle, regrecord_t record)
+{
+ if (oldmatch)
+ {
+ regmatch_t* match;
+ ssize_t i;
+ int r;
+
+ if (!(match = oldof(0, regmatch_t, nmatch, 0)))
+ return -1;
+ if (!(r = regrexec_20120528(p, s, len, nmatch, match, flags, sep, handle, record)))
+ for (i = 0; i < nmatch; i++)
+ {
+ oldmatch[i].rm_so = match[i].rm_so;
+ oldmatch[i].rm_eo = match[i].rm_eo;
+ }
+ free(match);
+ return r;
+ }
+ return regrexec_20120528(p, s, len, 0, NiL, flags, sep, handle, record);
+}
diff --git a/usr/src/lib/libast/common/regex/regstat.c b/usr/src/contrib/ast/src/lib/libast/regex/regstat.c
index 456bec1e86..c7f725fdbf 100644
--- a/usr/src/lib/libast/common/regex/regstat.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regstat.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,15 +32,22 @@ regstat(const regex_t* p)
{
register Rex_t* e;
+ p->env->stats.re_flags = p->env->flags;
+ p->env->stats.re_info = 0;
e = p->env->rex;
if (e && e->type == REX_BM)
+ {
+ p->env->stats.re_record = p->env->rex->re.bm.size;
e = e->next;
+ }
+ else
+ p->env->stats.re_record = 0;
if (e && e->type == REX_BEG)
e = e->next;
if (e && e->type == REX_STRING)
e = e->next;
if (!e || e->type == REX_END && !e->next)
- p->env->stats.re_flags |= REG_LITERAL;
+ p->env->stats.re_info |= REG_LITERAL;
p->env->stats.re_record = (p && p->env && p->env->rex->type == REX_BM) ? p->env->rex->re.bm.size : -1;
return &p->env->stats;
}
diff --git a/usr/src/lib/libast/common/regex/regsub.c b/usr/src/contrib/ast/src/lib/libast/regex/regsub.c
index 288ed1418f..8e89bea191 100644
--- a/usr/src/lib/libast/common/regex/regsub.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regsub.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/regex/regsubcomp.c b/usr/src/contrib/ast/src/lib/libast/regex/regsubcomp.c
index bc0f866a40..73bde4cd18 100644
--- a/usr/src/lib/libast/common/regex/regsubcomp.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regsubcomp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/regex/regsubexec.c b/usr/src/contrib/ast/src/lib/libast/regex/regsubexec.c
index d94635b548..d336906c54 100644
--- a/usr/src/lib/libast/common/regex/regsubexec.c
+++ b/usr/src/contrib/ast/src/lib/libast/regex/regsubexec.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -194,3 +194,44 @@ regsubexec(const regex_t* p, const char* s, size_t nmatch, regmatch_t* match)
b->re_len = b->re_cur - b->re_buf;
return 0;
}
+
+/*
+ * 20120528: regoff_t changed from int to ssize_t
+ */
+
+#if defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+#undef regsubexec
+#if _map_libc
+#define regsubexec _ast_regsubexec
+#endif
+
+extern int
+regsubexec(const regex_t* p, const char* s, size_t nmatch, oldregmatch_t* oldmatch)
+{
+ if (oldmatch)
+ {
+ regmatch_t* match;
+ ssize_t i;
+ int r;
+
+ if (!(match = oldof(0, regmatch_t, nmatch, 0)))
+ return -1;
+ for (i = 0; i < nmatch; i++)
+ {
+ match[i].rm_so = oldmatch[i].rm_so;
+ match[i].rm_eo = oldmatch[i].rm_eo;
+ }
+ if (!(r = regsubexec_20120528(p, s, nmatch, match)))
+ for (i = 0; i < nmatch; i++)
+ {
+ oldmatch[i].rm_so = match[i].rm_so;
+ oldmatch[i].rm_eo = match[i].rm_eo;
+ }
+ free(match);
+ return r;
+ }
+ return regsubexec_20120528(p, s, 0, NiL);
+}
diff --git a/usr/src/lib/libast/common/sfio/_sfclrerr.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfclrerr.c
index 6bb4de38f5..e00dc1b6dc 100644
--- a/usr/src/lib/libast/common/sfio/_sfclrerr.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfclrerr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfdlen.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfdlen.c
index 7eee346f37..0b0a9f5987 100644
--- a/usr/src/lib/libast/common/sfio/_sfdlen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfdlen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfeof.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfeof.c
index dfd8e9c6a2..63dc0027f1 100644
--- a/usr/src/lib/libast/common/sfio/_sfeof.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfeof.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sferror.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sferror.c
index a34d9168fd..43b1a037af 100644
--- a/usr/src/lib/libast/common/sfio/_sferror.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sferror.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sffileno.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sffileno.c
index 7b7dcf8692..f61a830927 100644
--- a/usr/src/lib/libast/common/sfio/_sffileno.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sffileno.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfgetc.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetc.c
index 0138c8a9f7..08a51b3a54 100644
--- a/usr/src/lib/libast/common/sfio/_sfgetc.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfgetl.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl.c
index 6aa31dd3d2..cc66462e0e 100644
--- a/usr/src/lib/libast/common/sfio/_sfgetl.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfgetl2.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl2.c
index c6728f5840..a6f9373cb7 100644
--- a/usr/src/lib/libast/common/sfio/_sfgetl2.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetl2.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfgetu.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu.c
index 4d8fd3f5f5..183f1a48a2 100644
--- a/usr/src/lib/libast/common/sfio/_sfgetu.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfgetu2.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu2.c
index aa878938c8..27f56614d6 100644
--- a/usr/src/lib/libast/common/sfio/_sfgetu2.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfgetu2.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfllen.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfllen.c
index fdce589fcc..2e735e376d 100644
--- a/usr/src/lib/libast/common/sfio/_sfllen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfllen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfopen.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfopen.c
index 80b669cbe6..c77f6edb77 100644
--- a/usr/src/lib/libast/common/sfio/_sfopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -43,11 +43,11 @@ char* file; /* file/string to be opened */
char* mode; /* mode of the stream */
#endif
{
- int fd, oldfd, oflags, sflags;
+ int fd, oldfd, oflags, fflags, sflags;
SFMTXDECL(f);
/* get the control flags */
- if((sflags = _sftype(mode,&oflags,NIL(int*))) == 0)
+ if((sflags = _sftype(mode,&oflags,&fflags,NIL(int*))) == 0)
return NIL(Sfio_t*);
/* changing the control flags */
@@ -74,11 +74,17 @@ char* mode; /* mode of the stream */
SFMTXRETURN(f,NIL(Sfio_t*));
}
- if(f->file >= 0 && (oflags &= (O_TEXT|O_BINARY|O_APPEND)) != 0 )
- { /* set file access control */
- int ctl = sysfcntlf(f->file, F_GETFL, 0);
- ctl = (ctl & ~(O_TEXT|O_BINARY|O_APPEND)) | oflags;
- sysfcntlf(f->file, F_SETFL, ctl);
+ if(f->file >= 0 )
+ { if ((oflags &= (O_TEXT|O_BINARY|O_APPEND)) != 0 )
+ { /* set file access control */
+ int ctl = sysfcntlf(f->file, F_GETFL, 0);
+ ctl = (ctl & ~(O_TEXT|O_BINARY|O_APPEND)) | oflags;
+ sysfcntlf(f->file, F_SETFL, ctl);
+ }
+#if !O_cloexec
+ if (fflags & SF_FD_CLOEXEC)
+ SETCLOEXEC(f->file);
+#endif
}
SFMTXRETURN(f,f);
@@ -137,21 +143,22 @@ char* mode; /* mode of the stream */
}
#if __STD_C
-int _sftype(reg const char* mode, int* oflagsp, int* uflagp)
+int _sftype(reg const char* mode, int* oflagsp, int* fflagsp, int* uflagp)
#else
-int _sftype(mode, oflagsp, uflagp)
+int _sftype(mode, oflagsp, fflagsp, uflagp)
reg char* mode;
int* oflagsp;
+int* fflagsp;
int* uflagp;
#endif
{
- reg int sflags, oflags, uflag;
+ reg int sflags, oflags, fflags, uflag;
if(!mode)
return 0;
/* construct the open flags */
- sflags = oflags = uflag = 0;
+ sflags = oflags = fflags = uflag = 0;
while(1) switch(*mode++)
{
case 'a' :
@@ -161,6 +168,10 @@ int* uflagp;
case 'b' :
oflags |= O_BINARY;
continue;
+ case 'e' :
+ oflags |= O_cloexec;
+ fflags |= SF_FD_CLOEXEC;
+ continue;
case 'm' :
sflags |= SF_MTSAFE;
uflag = 0;
@@ -210,6 +221,8 @@ int* uflagp;
oflags = (oflags&~O_ACCMODE)|O_RDWR;
if(oflagsp)
*oflagsp = oflags;
+ if(fflagsp)
+ *fflagsp = fflags;
if(uflagp)
*uflagp = uflag;
if((sflags&(SF_STRING|SF_RDWR)) == SF_STRING)
diff --git a/usr/src/lib/libast/common/sfio/_sfputc.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputc.c
index 350b027c26..8f577e48a6 100644
--- a/usr/src/lib/libast/common/sfio/_sfputc.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfputd.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputd.c
index 717d81c5d0..733caa618a 100644
--- a/usr/src/lib/libast/common/sfio/_sfputd.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfputl.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputl.c
index 98ba7209e8..a0e5870e5a 100644
--- a/usr/src/lib/libast/common/sfio/_sfputl.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfputm.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputm.c
index b238ea3229..bbcd9074ca 100644
--- a/usr/src/lib/libast/common/sfio/_sfputm.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfputu.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputu.c
index b3d448d46c..b746e3b296 100644
--- a/usr/src/lib/libast/common/sfio/_sfputu.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfputu.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfslen.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfslen.c
index 23db89f3fa..e34958e106 100644
--- a/usr/src/lib/libast/common/sfio/_sfslen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfslen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfstacked.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfstacked.c
index 98f8b9e89e..a785ed5ef4 100644
--- a/usr/src/lib/libast/common/sfio/_sfstacked.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfstacked.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfulen.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfulen.c
index 762b0b7da7..71bb258413 100644
--- a/usr/src/lib/libast/common/sfio/_sfulen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfulen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/_sfvalue.c b/usr/src/contrib/ast/src/lib/libast/sfio/_sfvalue.c
index 6d4847b0e9..b8dcce7838 100644
--- a/usr/src/lib/libast/common/sfio/_sfvalue.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/_sfvalue.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfclose.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfclose.c
index 446e11087d..ce9ff30144 100644
--- a/usr/src/lib/libast/common/sfio/sfclose.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfclose.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -35,7 +35,7 @@ Sfio_t* f;
{
reg int local, ex, rv;
Void_t* data = NIL(Void_t*);
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f, -1);
@@ -120,7 +120,15 @@ Sfio_t* f;
if(_Sfnotify)
(*_Sfnotify)(f, SF_CLOSING, (void*)((long)f->file));
if(f->file >= 0 && !(f->flags&SF_STRING))
- CLOSE(f->file);
+ { while(sysclosef(f->file) < 0 )
+ { if(errno == EINTR)
+ errno = 0;
+ else
+ { rv = -1;
+ break;
+ }
+ }
+ }
f->file = -1;
SFKILL(f);
diff --git a/usr/src/lib/libast/common/sfio/sfclrlock.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfclrlock.c
index f6b3a24667..711756a155 100644
--- a/usr/src/lib/libast/common/sfio/sfclrlock.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfclrlock.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -35,7 +35,7 @@ Sfio_t *f;
#endif
{
int rv;
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
/* already closed */
if(f && (f->mode&SF_AVAIL))
diff --git a/usr/src/lib/libast/common/sfio/sfcvt.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfcvt.c
index 646a89e2ea..0c727a1569 100644
--- a/usr/src/lib/libast/common/sfio/sfcvt.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfcvt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -20,7 +20,7 @@
* *
***********************************************************************/
#if __STDC__
-#include "FEATURE/isoc99"
+#include "FEATURE/standards"
#endif
#include "sfhdr.h"
@@ -32,41 +32,42 @@
static char *lc_inf = "inf", *uc_inf = "INF";
static char *lc_nan = "nan", *uc_nan = "NAN";
static char *Zero = "0";
-#define SF_INF ((_Sfi = 3), strncpy(buf, (format & SFFMT_UPPER) ? uc_inf : lc_inf, size))
-#define SF_NAN ((_Sfi = 3), strncpy(buf, (format & SFFMT_UPPER) ? uc_nan : lc_nan, size))
-#define SF_ZERO ((_Sfi = 1), strncpy(buf, Zero, size))
+#define SF_INF ((_Sfi = 3), strlcpy(buf, (format & SFFMT_UPPER) ? uc_inf : lc_inf, size), buf)
+#define SF_NAN ((_Sfi = 3), strlcpy(buf, (format & SFFMT_UPPER) ? uc_nan : lc_nan, size), buf)
+#define SF_ZERO ((_Sfi = 1), strlcpy(buf, Zero, size), buf)
#define SF_INTPART (SF_IDIGITS/2)
-#if ! _lib_isnan
+#if !_lib_isnan
+#undef isnan
+#undef isnanl
#if _lib_fpclassify
#define isnan(n) (fpclassify(n)==FP_NAN)
#define isnanl(n) (fpclassify(n)==FP_NAN)
#else
+#error "This is an invalid test for NaN"
#define isnan(n) (memcmp((void*)&n,(void*)&_Sfdnan,sizeof(n))==0)
#define isnanl(n) (memcmp((void*)&n,(void*)&_Sflnan,sizeof(n))==0)
#endif
#else
-#if ! _lib_isnanl
+#if !_lib_isnanl
+#undef isnanl
#define isnanl(n) isnan(n)
#endif
#endif
-#if ! _lib_signbit && defined(signbit)
-#undef _lib_signbit
-#define _lib_signbit 1
-#endif
-
-#if ! _lib_signbit
-#if ! _ast_fltmax_double
+#if !_lib_signbit
+#if !_ast_fltmax_double
static int neg0ld(Sfdouble_t f)
{
- Sfdouble_t z = -0.0;
+ Sfdouble_t z = 0;
+ z = -z;
return !memcmp(&f, &z, sizeof(f));
}
#endif
static int neg0d(double f)
{
- double z = -0.0;
+ double z = 0;
+ z = -z;
return !memcmp(&f, &z, sizeof(f));
}
#endif
diff --git a/usr/src/lib/libast/common/sfio/sfdisc.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfdisc.c
index 3958fc3671..8ffc559f82 100644
--- a/usr/src/lib/libast/common/sfio/sfdisc.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfdisc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -117,7 +117,7 @@ Sfdisc_t* disc;
Sfseek_f oseekf;
ssize_t n;
Dccache_t *dcca = NIL(Dccache_t*);
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f, NIL(Sfdisc_t*));
diff --git a/usr/src/lib/libast/common/sfio/sfdlen.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfdlen.c
index d44c98211b..69d6cb4b71 100644
--- a/usr/src/lib/libast/common/sfio/sfdlen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfdlen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfecvt.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfecvt.c
index d51e3fa050..35d034ba2c 100644
--- a/usr/src/lib/libast/common/sfio/sfecvt.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfecvt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfexcept.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfexcept.c
index b2025a8122..fc08d6e3df 100644
--- a/usr/src/lib/libast/common/sfio/sfexcept.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfexcept.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -38,7 +38,7 @@ Sfdisc_t* disc; /* discipline in use */
reg int ev, local, lock;
reg ssize_t size;
reg uchar* data;
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f,-1);
diff --git a/usr/src/lib/libast/common/sfio/sfextern.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfextern.c
index 88f500067e..e5f2c6e3e9 100644
--- a/usr/src/lib/libast/common/sfio/sfextern.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfextern.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -60,11 +60,7 @@ Sfextern_t _Sfextern =
};
ssize_t _Sfi = -1; /* value for a few fast macro functions */
-#ifdef _ast_int8_t
-ssize_t _Sfmaxr = 256*1024; /* default maximum size for a record */
-#else
-ssize_t _Sfmaxr = 16*1024; /* default maximum size for a record */
-#endif
+ssize_t _Sfmaxr = 0; /* default (unlimited) max record size */
#if vt_threaded
static Vtmutex_t _Sfmtxin, _Sfmtxout, _Sfmtxerr;
diff --git a/usr/src/lib/libast/common/sfio/sffcvt.c b/usr/src/contrib/ast/src/lib/libast/sfio/sffcvt.c
index f6e3431c24..ade6d5ee03 100644
--- a/usr/src/lib/libast/common/sfio/sffcvt.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sffcvt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sffilbuf.c b/usr/src/contrib/ast/src/lib/libast/sfio/sffilbuf.c
index d7209a7ca7..16d5e3afeb 100644
--- a/usr/src/lib/libast/common/sfio/sffilbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sffilbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -41,7 +41,7 @@ reg int n; /* see above */
{
reg ssize_t r;
reg int first, local, rcrv, rc, justseek;
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f,-1);
@@ -79,7 +79,7 @@ reg int n; /* see above */
s = r;
}
- memcpy(f->data, f->endb-s, s);
+ memmove(f->data, f->endb-s, s);
f->next = f->data + (s-r);
f->endb = f->data + s;
}
diff --git a/usr/src/lib/libast/common/sfio/sfflsbuf.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfflsbuf.c
index aaaa66d715..36d78dc58b 100644
--- a/usr/src/lib/libast/common/sfio/sfflsbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfflsbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -56,8 +56,9 @@ int c; /* if c>=0, c is also written out */
n = f->next - (data = f->data);
if(n == (f->endb-data) && (f->flags&SF_STRING))
- { /* extend string stream buffer */
- (void)SFWR(f,data,1,f->disc);
+ { /* call sfwr() to extend string buffer and process events */
+ w = ((f->bits&SF_PUTR) && f->val > 0) ? f->val : 1;
+ (void)SFWR(f, data, w, f->disc);
/* !(f->flags&SF_STRING) is required because exception
handlers may turn a string stream to a file stream */
diff --git a/usr/src/lib/libast/common/sfio/sfgetd.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetd.c
index 510c272305..8c885c9069 100644
--- a/usr/src/lib/libast/common/sfio/sfgetd.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -36,7 +36,7 @@ Sfio_t* f;
reg uchar *s, *ends, c;
reg int p, sign, exp;
Sfdouble_t v;
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f,-1.);
diff --git a/usr/src/lib/libast/common/sfio/sfgetl.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetl.c
index 01cbf756be..bc832292f0 100644
--- a/usr/src/lib/libast/common/sfio/sfgetl.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -36,7 +36,7 @@ Sfio_t* f;
Sflong_t v;
uchar *s, *ends, c;
int p;
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f,(Sflong_t)(-1));
diff --git a/usr/src/lib/libast/common/sfio/sfgetm.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetm.c
index a72e6b3d30..16598eb9a5 100644
--- a/usr/src/lib/libast/common/sfio/sfgetm.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfgetr.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetr.c
index 6d422692f5..a3b9d34165 100644
--- a/usr/src/lib/libast/common/sfio/sfgetr.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,7 +40,7 @@ int type;
uchar *s, *ends, *us;
int found;
Sfrsrv_t* rsrv;
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f, NIL(char*));
diff --git a/usr/src/lib/libast/common/sfio/sfgetu.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetu.c
index 2f26665c8a..d0d6b5ff81 100644
--- a/usr/src/lib/libast/common/sfio/sfgetu.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfgetu.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -36,7 +36,7 @@ Sfio_t* f;
Sfulong_t v;
uchar *s, *ends, c;
int p;
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f, (Sfulong_t)(-1));
diff --git a/usr/src/lib/libast/common/sfio/sfhdr.h b/usr/src/contrib/ast/src/lib/libast/sfio/sfhdr.h
index 5350181e72..4af60c1896 100644
--- a/usr/src/lib/libast/common/sfio/sfhdr.h
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfhdr.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -322,6 +322,9 @@
#if _hdr_wchar && _typ_mbstate_t && _lib_wcrtomb && _lib_mbrtowc
#define _has_multibyte 1 /* Xopen-compliant */
+#if _typ___va_list && !defined(__va_list)
+#define __va_list va_list
+#endif
#include <wchar.h>
#define SFMBCPY(to,fr) memcpy((to), (fr), sizeof(mbstate_t))
#define SFMBCLR(mb) memset((mb), 0, sizeof(mbstate_t))
@@ -357,8 +360,8 @@
#define SFMBCPY(to,fr)
#define SFMBCLR(mb)
#define SFMBSET(lhs,v)
-#define SFMBLEN(s,mb) (*(s) ? 1 : 0)
#define SFMBDCL(mb)
+#define SFMBLEN(s,mb) (*(s) ? 1 : 0)
#endif /* _has_multibyte */
/* dealing with streams that might be accessed concurrently */
@@ -435,6 +438,9 @@
/* functions for polling readiness of streams */
#if _lib_select
#undef _lib_poll
+#if _sys_select
+#include <sys/select.h>
+#endif
#else
#if _lib_poll_fd_1 || _lib_poll_fd_2
#define _lib_poll 1
@@ -465,7 +471,7 @@
#endif
/* alternative process forking */
-#if _lib_vfork && !defined(fork) && !defined(sparc) && !defined(__sparc)
+#if _lib_vfork && !defined(fork) && !defined(__sparc) && !defined(__sparc__)
#if _hdr_vfork
#include <vfork.h>
#endif
@@ -492,6 +498,7 @@
#define SF_PRIVATE 00000100 /* private stream to Sfio, no mutex */
#define SF_ENDING 00000200 /* no re-io on interrupts at closing */
#define SF_WIDE 00000400 /* in wide mode - stdio only */
+#define SF_PUTR 00001000 /* in sfputr() */
/* "bits" flags that must be cleared in sfclrlock */
#define SF_TMPBITS 00170000
@@ -553,9 +560,6 @@
#define SECOND 1000 /* millisecond units */
/* macros do determine stream types from sfstat_t data */
-#ifndef S_IFMT
-#define S_IFMT 0
-#endif
#ifndef S_IFDIR
#define S_IFDIR 0
#endif
@@ -568,6 +572,13 @@
#ifndef S_IFIFO
#define S_IFIFO 0
#endif
+#ifndef S_ISOCK
+#define S_ISOCK 0
+#endif
+
+#ifndef S_IFMT
+#define S_IFMT (S_IFDIR|S_IFREG|S_IFCHR|S_IFIFO|S_ISOCK)
+#endif
#ifndef S_ISDIR
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
@@ -580,7 +591,7 @@
#endif
#ifndef S_ISFIFO
-# ifdef S_IFIFO
+# if S_IFIFO
# define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO)
# else
# define S_ISFIFO(m) (0)
@@ -607,6 +618,8 @@
# endif /*FIOCLEX*/
#endif /*F_SETFD*/
+#define SF_FD_CLOEXEC 0x0001
+
/* a couple of error number that we use, default values are like Linux */
#ifndef EINTR
#define EINTR 4
@@ -634,7 +647,7 @@
do if (*(dp) == 0) { \
Lc_numeric_t* lv = (Lc_numeric_t*)LCINFO(AST_LC_NUMERIC)->data; \
*(dp) = lv->decimal; \
- if (tp) *(tp) = lv->thousand; \
+ *(tp) = lv->thousand; \
} while (0)
#endif /*!defined(SFSETLOCALE) && _PACKAGE_ast*/
@@ -644,11 +657,11 @@
do { struct lconv* lv; \
if(*(decimal) == 0) \
{ *(decimal) = '.'; \
- if (thousand) *(thousand) = -1; \
+ *(thousand) = -1; \
if((lv = localeconv())) \
{ if(lv->decimal_point && *lv->decimal_point) \
*(decimal) = *(unsigned char*)lv->decimal_point; \
- if(thousand && lv->thousands_sep && *lv->thousands_sep) \
+ if(lv->thousands_sep && *lv->thousands_sep) \
*(thousand) = *(unsigned char*)lv->thousands_sep; \
} \
} \
@@ -656,7 +669,7 @@
#endif /*!defined(SFSETLOCALE) && _lib_locale*/
#if !defined(SFSETLOCALE)
-#define SFSETLOCALE(decimal,thousand) (*(decimal)='.')
+#define SFSETLOCALE(decimal,thousand) (*(decimal)='.',*(thousand)=-1)
#endif
/* stream pool structure. */
@@ -785,6 +798,7 @@ struct _fmtpos_s
#define SFFMT_CLASS 040 /* %[ */
/* local variables used across sf-functions */
+typedef void (*Sfnotify_f)_ARG_((Sfio_t*, int, void*));
#define _Sfpage (_Sfextern.sf_page)
#define _Sfpool (_Sfextern.sf_pool)
#define _Sfpmove (_Sfextern.sf_pmove)
@@ -833,7 +847,11 @@ typedef struct _sfextern_s
((n) >= SF_GRAIN && (ssize_t)(n) >= (f)->size/16 ) )
/* number of pages to memory map at a time */
-#define SF_NMAP 4
+#if _ptr_bits >= 64
+#define SF_NMAP 1024
+#else
+#define SF_NMAP 32
+#endif
#ifndef MAP_VARIABLE
#define MAP_VARIABLE 0
@@ -1158,7 +1176,7 @@ extern char** _sfgetpath _ARG_((char*));
extern Sfextern_t _Sfextern;
extern int _sfmode _ARG_((Sfio_t*, int, int));
-extern int _sftype _ARG_((const char*, int*, int*));
+extern int _sftype _ARG_((const char*, int*, int*, int*));
#undef extern
@@ -1171,7 +1189,7 @@ extern int errno;
#if _ast_fltmax_double
#define frexpl frexp
#endif
-#if !__STDC__
+#if !_lib_frexpl
extern Sfdouble_t frexpl _ARG_((Sfdouble_t, int*));
#endif
#endif
@@ -1179,7 +1197,7 @@ extern Sfdouble_t frexpl _ARG_((Sfdouble_t, int*));
#if _ast_fltmax_double
#define ldexpl ldexp
#endif
-#if !__STDC__
+#if !_lib_ldexpl
extern Sfdouble_t ldexpl _ARG_((Sfdouble_t, int));
#endif
#endif
diff --git a/usr/src/lib/libast/common/sfio/sfllen.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfllen.c
index 9bf2eda3a3..4dd48797fd 100644
--- a/usr/src/lib/libast/common/sfio/sfllen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfllen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfmode.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfmode.c
index 5ba7358d25..31c6a9b9a6 100644
--- a/usr/src/lib/libast/common/sfio/sfmode.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfmode.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -98,8 +98,9 @@ static void _sfcleanup()
f->mode &= ~SF_POOL;
if((f->flags&SF_WRITE) && !(f->mode&SF_WRITE))
(void)_sfmode(f,SF_WRITE,1);
- if(((f->bits&SF_MMAP) && f->data) ||
- ((f->mode&SF_WRITE) && f->next == f->data) )
+ if(f->data &&
+ ((f->bits&SF_MMAP) ||
+ ((f->mode&SF_WRITE) && f->next == f->data) ) )
(void)SFSETBUF(f,NIL(Void_t*),0);
f->mode |= pool;
@@ -277,11 +278,15 @@ reg Sfio_t* f; /* stream to close */
#if _PACKAGE_ast
sigcritical(SIG_REG_EXEC|SIG_REG_PROC);
#endif
+ status = -1;
while ((pid = waitpid(p->pid,&status,0)) == -1 && errno == EINTR)
;
- if(pid == -1)
- status = -1;
#if _PACKAGE_ast
+ status = status == -1 ?
+ EXIT_QUIT :
+ WIFSIGNALED(status) ?
+ EXIT_TERM(WTERMSIG(status)) :
+ EXIT_CODE(WEXITSTATUS(status));
sigcritical(0);
#endif
diff --git a/usr/src/lib/libast/common/sfio/sfmove.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfmove.c
index d17bea90f3..9e3965750a 100644
--- a/usr/src/lib/libast/common/sfio/sfmove.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfmove.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -47,8 +47,8 @@ reg int rc; /* record separator */
Sfoff_t n_move, sk, cur;
uchar *rbuf = NIL(uchar*);
ssize_t rsize = 0;
- SFMTXDECL(fr);
- SFMTXDECL2(fw);
+ SFMTXDECL(fr); /* declare a shadow stream variable for from stream */
+ SFMTXDECL2(fw); /* declare a shadow stream variable for to stream */
SFMTXENTER(fr, (Sfoff_t)0);
if(fw)
diff --git a/usr/src/lib/libast/common/sfio/sfmutex.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfmutex.c
index ac17596b5b..cc3a4b7951 100644
--- a/usr/src/lib/libast/common/sfio/sfmutex.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfmutex.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfnew.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfnew.c
index 08b41e7f07..a6feddcf0f 100644
--- a/usr/src/lib/libast/common/sfio/sfnew.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfnew.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfnotify.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfnotify.c
index 3fc13a3290..06cc857a8d 100644
--- a/usr/src/lib/libast/common/sfio/sfnotify.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfnotify.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfnputc.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfnputc.c
index 85c9f6214d..58a1430fe6 100644
--- a/usr/src/lib/libast/common/sfio/sfnputc.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfnputc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -39,7 +39,7 @@ size_t n; /* number of time to repeat */
reg ssize_t p, w;
uchar buf[128];
reg int local;
- SFMTXDECL(f);
+ SFMTXDECL(f); /* declare a local stream variable for multithreading */
SFMTXENTER(f,-1);
diff --git a/usr/src/lib/libast/common/sfio/sfopen.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfopen.c
index 90403d535b..522bd9e810 100644
--- a/usr/src/lib/libast/common/sfio/sfopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfpeek.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfpeek.c
index 0cf32301f9..22cf807bc8 100644
--- a/usr/src/lib/libast/common/sfio/sfpeek.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfpeek.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfpkrd.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfpkrd.c
index cf66d7a46b..2572e6dc6d 100644
--- a/usr/src/lib/libast/common/sfio/sfpkrd.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfpkrd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -72,31 +72,51 @@ int action; /* >0: peeking, if rc>=0, get action records,
#if _stream_peek
if((t&STREAM_PEEK) && (ntry == 1 || tm < 0) )
{
- struct strpeek pbuf;
- pbuf.flags = 0;
- pbuf.ctlbuf.maxlen = -1;
- pbuf.ctlbuf.len = 0;
- pbuf.ctlbuf.buf = NIL(char*);
- pbuf.databuf.maxlen = n;
- pbuf.databuf.buf = buf;
- pbuf.databuf.len = 0;
-
- if((r = ioctl(fd,I_PEEK,&pbuf)) < 0)
- { if(errno == EINTR)
- return -1;
- t &= ~STREAM_PEEK;
+#ifdef __sun
+ /*
+ * I_PEEK on stdin can hang rsh+ksh on solaris
+ * this kludge will have to do until sun^H^H^Horacle fixes I_PEEK/rsh
+ */
+ static int stream_peek;
+ if (stream_peek == 0) /* this will be done just once */
+ { char *e;
+ stream_peek = (
+ getenv("LOGNAME") == 0 &&
+ getenv("MAIL") == 0 &&
+ ((e = getenv("LANG")) == 0 || strcmp(e, "C") == 0) &&
+ ((e = getenv("PATH")) == 0 || strncmp(e, "/usr/bin:", 9) == 0)
+ ) ? -1 : 1;
}
+ if(stream_peek < 0)
+ t &= ~STREAM_PEEK;
else
- { t &= ~SOCKET_PEEK;
- if(r > 0 && (r = pbuf.databuf.len) <= 0)
- { if(action <= 0) /* read past eof */
- r = sysreadf(fd,buf,1);
- return r;
+#endif
+ { struct strpeek pbuf;
+ pbuf.flags = 0;
+ pbuf.ctlbuf.maxlen = -1;
+ pbuf.ctlbuf.len = 0;
+ pbuf.ctlbuf.buf = NIL(char*);
+ pbuf.databuf.maxlen = n;
+ pbuf.databuf.buf = buf;
+ pbuf.databuf.len = 0;
+
+ if((r = ioctl(fd,I_PEEK,&pbuf)) < 0)
+ { if(errno == EINTR)
+ return -1;
+ t &= ~STREAM_PEEK;
+ }
+ else
+ { t &= ~SOCKET_PEEK;
+ if(r > 0 && (r = pbuf.databuf.len) <= 0)
+ { if(action <= 0) /* read past eof */
+ r = sysreadf(fd,buf,1);
+ return r;
+ }
+ if(r == 0)
+ r = -1;
+ else if(r > 0)
+ break;
}
- if(r == 0)
- r = -1;
- else if(r > 0)
- break;
}
}
#endif /* stream_peek */
@@ -203,39 +223,53 @@ int action; /* >0: peeking, if rc>=0, get action records,
#if _socket_peek
if(t&SOCKET_PEEK)
{
-#if __MACH__ && __APPLE__
- /*
- * work around macos 10.4 recv(MSG_PEEK) bug that consumes pipe() data
- */
-
- struct stat st;
- static int recv_peek_ok;
- if (!recv_peek_ok)
- {
- int fds[2];
+#if __MACH__ && __APPLE__ /* check 10.4 recv(MSG_PEEK) bug that consumes pipe data */
+ static int recv_peek_pipe;
+ if (recv_peek_pipe == 0) /* this will be done just once */
+ { int fds[2], r;
char tst[2];
- tst[0] = 'a';
- tst[1] = 'z';
- recv_peek_ok = (!pipe(fds) && write(fds[1], tst, 2) && recv(fds[0], tst, 1, MSG_PEEK) == 1 && tst[0] == 'a' && recv(fds[0], tst, 1, MSG_PEEK) == 1 && tst[0] == 'a') ? 1 : -1;
+
+ tst[0] = 'a'; tst[1] = 'z';
+
+ /* open a pipe and write to it */
+ recv_peek_pipe = 1;
+ if(recv_peek_pipe == 1 && pipe(fds) < 0)
+ recv_peek_pipe = -1;
+ if(recv_peek_pipe == 1 && write(fds[1], tst, 2) != 2)
+ recv_peek_pipe = -1;
+
+ /* try recv() to see if it gets anything */
+ tst[0] = tst[1] = 0;
+ if(recv_peek_pipe == 1 && (r = recv(fds[0], tst, 1, MSG_PEEK)) != 1)
+ recv_peek_pipe = -1;
+ if(recv_peek_pipe == 1 && tst[0] != 'a')
+ recv_peek_pipe = -1;
+
+ /* make sure that recv() did not consume data */
+ tst[0] = tst[1] = 0;
+ if(recv_peek_pipe == 1 && (r = recv(fds[0], tst, 2, MSG_PEEK)) != 2)
+ recv_peek_pipe = -1;
+ if(recv_peek_pipe == 1 && (tst[0] != 'a' || tst[1] != 'z') )
+ recv_peek_pipe = -1;
+
close(fds[0]);
close(fds[1]);
}
- if (recv_peek_ok < 0 && !fstat(fd, &st) && !S_ISSOCK(st.st_mode))
- {
- r = -1;
- t &= ~SOCKET_PEEK;
+
+ if(recv_peek_pipe < 0)
+ { struct stat st; /* recv should work on sockets */
+ if(fstat(fd, &st) < 0 || !S_ISSOCK(st.st_mode) )
+ { r = -1;
+ t &= ~SOCKET_PEEK;
+ }
}
- else
#endif
- while((r = recv(fd,(char*)buf,n,MSG_PEEK)) < 0)
+ while((t&SOCKET_PEEK) && (r = recv(fd,(char*)buf,n,MSG_PEEK)) < 0)
{ if(errno == EINTR)
return -1;
else if(errno == EAGAIN)
- { errno = 0;
- continue;
- }
- t &= ~SOCKET_PEEK;
- break;
+ errno = 0;
+ else t &= ~SOCKET_PEEK;
}
if(r >= 0)
{ t &= ~STREAM_PEEK;
diff --git a/usr/src/lib/libast/common/sfio/sfpoll.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfpoll.c
index 32bdf7d14c..09110aa324 100644
--- a/usr/src/lib/libast/common/sfio/sfpoll.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfpoll.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -37,7 +37,7 @@ reg int n; /* number of streams in array */
int tm; /* time in millisecs for select/poll */
#endif
{
- reg int r, c, m, np;
+ reg int r, c, m, np, eintr;
reg Sfio_t* f;
reg int *status, *check;
@@ -57,10 +57,13 @@ int tm; /* time in millisecs for select/poll */
#define HASAUXFD(f) (f->proc && f->proc->file >= 0 && f->proc->file != f->file)
- for(r = c = 0; r < n; ++r) /* compute streams that must be checked */
+ for(r = c = eintr = 0; r < n; ++r) /* compute streams that must be checked */
{ f = fa[r];
status[r] = 0;
+ /* terminate poll on interrupt? */
+ if(f->flags&SF_IOINTR)
+ eintr++;
/* check accessibility */
m = f->mode&SF_RDWR;
if((int)f->mode != m && _sfmode(f,m,0) < 0)
@@ -94,6 +97,8 @@ int tm; /* time in millisecs for select/poll */
status[r] |= SF_WRITE;
}
}
+ /* terminate poll on interrupt only if all streams marked SF_IOINTR */
+ eintr = eintr == n ? -1 : EINTR;
np = -1;
#if _lib_poll
@@ -131,7 +136,7 @@ int tm; /* time in millisecs for select/poll */
}
while((np = SFPOLL(fds,m,tm)) < 0 )
- { if(errno == EINTR || errno == EAGAIN)
+ { if(errno == eintr || errno == EAGAIN)
errno = 0;
else break;
}
@@ -193,7 +198,7 @@ int tm; /* time in millisecs for select/poll */
}
while((np = select(m+1,&rd,&wr,NIL(fd_set*),tmp)) < 0 )
- { if(errno == EINTR)
+ { if(errno == eintr)
errno = 0;
else break;
}
@@ -241,5 +246,5 @@ int tm; /* time in millisecs for select/poll */
}
free((Void_t*)status);
- return r;
+ return r ? r : np < 0 ? -1 : 0;
}
diff --git a/usr/src/lib/libast/common/sfio/sfpool.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfpool.c
index 6167d1738b..48345ef275 100644
--- a/usr/src/lib/libast/common/sfio/sfpool.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfpool.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfpopen.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfpopen.c
index a14d11e0e1..dac9e577b9 100644
--- a/usr/src/lib/libast/common/sfio/sfpopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfpopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -148,7 +148,7 @@ char* mode; /* mode of the stream */
if (!command || !command[0] || !mode)
return 0;
- sflags = _sftype(mode, NiL, NiL);
+ sflags = _sftype(mode, NIL(int*), NIL(int*), NIL(int*));
if(f == (Sfio_t*)(-1))
{ /* stdio compatibility mode */
@@ -196,7 +196,7 @@ char* mode; /* mode of the stream */
/* sanity check */
if(!command || !command[0] || !mode)
return NIL(Sfio_t*);
- sflags = _sftype(mode,NIL(int*),NIL(int*));
+ sflags = _sftype(mode,NIL(int*),NIL(int*),NIL(int*));
/* make pipes */
parent[0] = parent[1] = child[0] = child[1] = -1;
diff --git a/usr/src/lib/libast/common/sfio/sfprintf.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfprintf.c
index d886afe02e..c76682650d 100644
--- a/usr/src/lib/libast/common/sfio/sfprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -61,28 +61,32 @@ char* form;
va_list args;
#endif
{
- Sfio_t *f;
- ssize_t rv;
+ Sfio_t *f;
+ ssize_t rv;
+ Sfnotify_f notify = _Sfnotify;
/* make a temp stream */
- if(!(f = sfnew(NIL(Sfio_t*),NIL(char*),(size_t)SF_UNBOUND,
- -1,SF_WRITE|SF_STRING)) )
+ _Sfnotify = 0;
+ f = sfnew(NIL(Sfio_t*),NIL(char*),(size_t)SF_UNBOUND, -1,SF_WRITE|SF_STRING);
+ _Sfnotify = notify;
+ if(!f)
return -1;
- if((rv = sfvprintf(f,form,args)) >= 0 )
- { if(s && n > 0)
- { if((rv+1) >= n)
- n--;
- else
- n = rv;
- memcpy(s, f->data, n);
- s[n] = 0;
- }
- _Sfi = rv;
+ if((rv = sfvprintf(f,form,args)) < 0 )
+ return -1;
+ if(s && n > 0)
+ { if((rv+1) >= n)
+ n--;
+ else
+ n = rv;
+ memcpy(s, f->data, n);
+ s[n] = 0;
}
sfclose(f);
+ _Sfi = rv;
+
return rv;
}
diff --git a/usr/src/lib/libast/common/sfio/sfprints.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfprints.c
index 2e3f8d8659..183b24c3a3 100644
--- a/usr/src/lib/libast/common/sfio/sfprints.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfprints.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -37,13 +37,16 @@ va_list args;
#endif
{
reg int rv;
+ Sfnotify_f notify = _Sfnotify;
static Sfio_t* f;
- /* make a fake stream */
- if(!f &&
- !(f = sfnew(NIL(Sfio_t*),NIL(char*),(size_t)SF_UNBOUND,
- -1,SF_WRITE|SF_STRING)) )
- return NIL(char*);
+ if(!f) /* make a string stream to write into */
+ { _Sfnotify = 0;
+ f = sfnew(NIL(Sfio_t*),NIL(char*),(size_t)SF_UNBOUND, -1,SF_WRITE|SF_STRING);
+ _Sfnotify = notify;
+ if(!f)
+ return NIL(char*);
+ }
sfseek(f,(Sfoff_t)0,SEEK_SET);
rv = sfvprintf(f,form,args);
@@ -96,7 +99,7 @@ va_list args;
{ if(!(*sp = (char*)malloc(n = strlen(s)+1)) )
return -1;
memcpy(*sp, s, n);
- return n - 1;
+ return n-1;
}
}
diff --git a/usr/src/lib/libast/common/sfio/sfpurge.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfpurge.c
index c537893eb5..c3b4106fe8 100644
--- a/usr/src/lib/libast/common/sfio/sfpurge.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfpurge.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfputd.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfputd.c
index 7ce4ef5976..3129cd557e 100644
--- a/usr/src/lib/libast/common/sfio/sfputd.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfputd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfputl.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfputl.c
index 0645f24f3e..ceaa6b96d7 100644
--- a/usr/src/lib/libast/common/sfio/sfputl.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfputl.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfputm.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfputm.c
index 4390307b1e..8082a7b5d9 100644
--- a/usr/src/lib/libast/common/sfio/sfputm.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfputm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfputr.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfputr.c
index b2b2a6086f..21bfb0aebd 100644
--- a/usr/src/lib/libast/common/sfio/sfputr.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfputr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -34,8 +34,9 @@ char* s; /* string to write */
int rc; /* record separator. */
#endif
{
- reg ssize_t p, n, w;
- reg uchar* ps;
+ ssize_t p, n, w, sn;
+ uchar *ps;
+ char *ss;
SFMTXDECL(f);
SFMTXENTER(f,-1);
@@ -45,12 +46,24 @@ int rc; /* record separator. */
SFLOCK(f,0);
+ f->val = sn = -1; ss = (char*)s;
for(w = 0; (*s || rc >= 0); )
- { if(SFWPEEK(f,ps,p) < 0)
+ { /* need to communicate string size to exception handler */
+ if((f->flags&SF_STRING) && f->next >= f->endb )
+ { sn = sn < 0 ? strlen(s) : (sn - (s-ss));
+ ss = (char*)s; /* save current checkpoint */
+ f->val = sn + (rc >= 0 ? 1 : 0); /* space requirement */
+ f->bits |= SF_PUTR; /* tell sfflsbuf to use f->val */
+ }
+
+ SFWPEEK(f,ps,p);
+ f->bits &= ~SF_PUTR; /* remove any trace of this */
+
+ if(p < 0 ) /* something not right about buffering */
break;
if(p == 0 || (f->flags&SF_WHOLE) )
- { n = strlen(s);
+ { n = sn < 0 ? strlen(s) : sn - (s-ss);
if(p >= (n + (rc < 0 ? 0 : 1)) )
{ /* buffer can hold everything */
if(n > 0)
diff --git a/usr/src/lib/libast/common/sfio/sfputu.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfputu.c
index 3568c7655d..17f1567c30 100644
--- a/usr/src/lib/libast/common/sfio/sfputu.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfputu.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfraise.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfraise.c
index 1517520b5b..7ea4ef3c52 100644
--- a/usr/src/lib/libast/common/sfio/sfraise.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfraise.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfrd.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfrd.c
index 1a2c40b13f..09a493ca24 100644
--- a/usr/src/lib/libast/common/sfio/sfrd.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfrd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfread.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfread.c
index 503b417e7f..a3aed9776d 100644
--- a/usr/src/lib/libast/common/sfio/sfread.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfread.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfreserve.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfreserve.c
index 26e9ae2494..29772a2d54 100644
--- a/usr/src/lib/libast/common/sfio/sfreserve.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfreserve.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfresize.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfresize.c
index 9d4dabbab1..ae5c83cd41 100644
--- a/usr/src/lib/libast/common/sfio/sfresize.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfresize.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfscanf.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfscanf.c
index 4a37090218..12eec1abc1 100644
--- a/usr/src/lib/libast/common/sfio/sfscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfseek.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfseek.c
index 4eb1370b39..1f446bae55 100644
--- a/usr/src/lib/libast/common/sfio/sfseek.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfseek.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfset.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfset.c
index c9c0ddf093..a18662ed19 100644
--- a/usr/src/lib/libast/common/sfio/sfset.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfset.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -35,7 +35,7 @@ int flags;
int set;
#endif
{
- reg int oflags;
+ reg int oflags, tflags, rv;
SFMTXDECL(f);
SFMTXENTER(f,0);
@@ -43,9 +43,19 @@ int set;
if(flags == 0 && set == 0)
SFMTXRETURN(f, (f->flags&SF_FLAGS));
- if((oflags = (f->mode&SF_RDWR)) != (int)f->mode && _sfmode(f,oflags,0) < 0)
- SFMTXRETURN(f, 0);
-
+ if((oflags = (f->mode&SF_RDWR)) != (int)f->mode)
+ { /* avoid sfsetbuf() isatty() call if user sets (SF_LINE|SF_WCWIDTH) */
+ if(set && (flags & (SF_LINE|SF_WCWIDTH)) && !(f->flags & (SF_LINE|SF_WCWIDTH)))
+ { tflags = (SF_LINE|SF_WCWIDTH);
+ f->flags |= tflags;
+ }
+ else tflags = 0;
+ rv = _sfmode(f,oflags,0);
+ if(tflags)
+ f->flags &= ~tflags;
+ if(rv < 0)
+ SFMTXRETURN(f, 0);
+ }
if(flags == 0)
SFMTXRETURN(f, (f->flags&SF_FLAGS));
diff --git a/usr/src/lib/libast/common/sfio/sfsetbuf.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfsetbuf.c
index 8dee41ddd8..cb0240b16d 100644
--- a/usr/src/lib/libast/common/sfio/sfsetbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfsetbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -56,39 +56,51 @@ struct stat
#define sysfstatf(fd,st) (-1)
#endif /*_sys_stat*/
-static int setlinemode()
+#if _PACKAGE_ast && !defined(SFSETLINEMODE)
+#define SFSETLINEMODE 1
+#endif
+
+#if SFSETLINEMODE
+
+static int sfsetlinemode()
{ char* astsfio;
char* endw;
static int modes = -1;
static const char sf_line[] = "SF_LINE";
+ static const char sf_maxr[] = "SF_MAXR=";
static const char sf_wcwidth[] = "SF_WCWIDTH";
#define ISSEPAR(c) ((c) == ',' || (c) == ' ' || (c) == '\t')
if (modes < 0)
{ modes = 0;
- if(astsfio = getenv("_AST_SFIO_OPTIONS"))
+ if(astsfio = getenv("SFIO_OPTIONS"))
{ for(; *astsfio != 0; astsfio = endw)
{ while(ISSEPAR(*astsfio) )
- *astsfio++;
+ ++astsfio;
for(endw = astsfio; *endw && !ISSEPAR(*endw); ++endw)
;
- if((endw-astsfio) == (sizeof(sf_line)-1) &&
- strncmp(astsfio,sf_line,endw-astsfio) == 0)
- { if ((modes |= SF_LINE) == (SF_LINE|SF_WCWIDTH))
- break;
- }
- else if((endw-astsfio) == (sizeof(sf_wcwidth)-1) &&
- strncmp(astsfio,sf_wcwidth,endw-astsfio) == 0)
- { if ((modes |= SF_WCWIDTH) == (SF_LINE|SF_WCWIDTH))
- break;
- }
+ if((endw-astsfio) > (sizeof(sf_line)-1) &&
+ strncmp(astsfio,sf_line,sizeof(sf_line)-1) == 0)
+ modes |= SF_LINE;
+ else if((endw-astsfio) > (sizeof(sf_maxr)-1) &&
+ strncmp(astsfio,sf_maxr,sizeof(sf_maxr)-1) == 0)
+#if _PACKAGE_ast
+ _Sfmaxr = (ssize_t)strtonll(astsfio+sizeof(sf_maxr)-1,NiL,NiL,0);
+#else
+ _Sfmaxr = (ssize_t)strtol(astsfio+sizeof(sf_maxr)-1,NiL,0);
+#endif
+ else if((endw-astsfio) > (sizeof(sf_wcwidth)-1) &&
+ strncmp(astsfio,sf_wcwidth,sizeof(sf_wcwidth)-1) == 0)
+ modes |= SF_WCWIDTH;
}
}
}
return modes;
}
+#endif
+
#if __STD_C
Void_t* sfsetbuf(Sfio_t* f, Void_t* buf, size_t size)
#else
@@ -242,8 +254,10 @@ size_t size; /* buffer size, -1 for default size */
#endif
}
+#if SFSETLINEMODE
if(init)
- f->flags |= setlinemode();
+ f->flags |= sfsetlinemode();
+#endif
if(f->here >= 0)
{ f->extent = (Sfoff_t)st.st_size;
@@ -270,11 +284,19 @@ size_t size; /* buffer size, -1 for default size */
#if _sys_stat
else /* special case /dev/null */
{ reg int dev, ino;
+ static int null_checked, null_dev, null_ino;
dev = (int)st.st_dev;
ino = (int)st.st_ino;
- if(sysstatf(DEVNULL,&st) >= 0 &&
- dev == (int)st.st_dev &&
- ino == (int)st.st_ino)
+ if(!null_checked)
+ { if(sysstatf(DEVNULL,&st) < 0)
+ null_checked = -1;
+ else
+ { null_checked = 1;
+ null_dev = (int)st.st_dev;
+ null_ino = (int)st.st_ino;
+ }
+ }
+ if(null_checked >= 0 && dev == null_dev && ino == null_ino)
SFSETNULL(f);
}
#endif
diff --git a/usr/src/lib/libast/common/sfio/sfsetfd.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfsetfd.c
index 2d74af9a18..9ca373286a 100644
--- a/usr/src/lib/libast/common/sfio/sfsetfd.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfsetfd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfsize.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfsize.c
index 525f226cd0..7b6d4aab2a 100644
--- a/usr/src/lib/libast/common/sfio/sfsize.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfsize.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfsk.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfsk.c
index 1617880d6a..4b82a4d8ec 100644
--- a/usr/src/lib/libast/common/sfio/sfsk.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfsk.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfstack.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfstack.c
index 073ba9b61d..bc2ab13605 100644
--- a/usr/src/lib/libast/common/sfio/sfstack.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfstack.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfstrtod.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfstrtod.c
index ddbf2b127a..375d09fc00 100644
--- a/usr/src/lib/libast/common/sfio/sfstrtod.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfstrtod.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfstrtof.h b/usr/src/contrib/ast/src/lib/libast/sfio/sfstrtof.h
index 2bde892365..4b2f400760 100644
--- a/usr/src/lib/libast/common/sfio/sfstrtof.h
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfstrtof.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -211,6 +211,8 @@ S2F_function(str, end) char* str; char** end;
int decimal = 0;
int thousand = 0;
int part = 0;
+ int back_part;
+ S2F_batch back_n;
S2F_number v;
S2F_number p;
S2F_part_t parts[16];
@@ -412,12 +414,27 @@ S2F_function(str, end) char* str; char** end;
m = 0;
fraction = digits;
}
- else if (c != thousand)
+ else if (c != thousand || (c == thousand && decimal == -1))
break;
else if (!(m = digits))
+ {
+ SET(s, t, b);
break;
+ }
+ else
+ {
+ SET(s, t, b);
+ back_n = n;
+ back_part = part;
+ }
c = GET(s);
}
+ if (m && (digits - m) != 3)
+ {
+ REV(s, t, b);
+ n = back_n;
+ part = back_part;
+ }
/*
* don't forget the last part
diff --git a/usr/src/lib/libast/common/sfio/sfswap.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfswap.c
index 2366219b02..4ffc614565 100644
--- a/usr/src/lib/libast/common/sfio/sfswap.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfswap.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfsync.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfsync.c
index ebfc6e6c8a..4a9d16fa22 100644
--- a/usr/src/lib/libast/common/sfio/sfsync.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfsync.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sftable.c b/usr/src/contrib/ast/src/lib/libast/sfio/sftable.c
index c872f34709..9e57358150 100644
--- a/usr/src/lib/libast/common/sfio/sftable.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sftable.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -59,9 +59,7 @@ int type; /* >0: scanf, =0: printf, -1: internal */
Sffmt_t savft;
Fmtpos_t* fp; /* position array of arguments */
int argp, argn, maxp, need[FP_INDEX];
-#if _has_multibyte
SFMBDCL(fmbs)
-#endif
if(type < 0)
fp = NIL(Fmtpos_t*);
diff --git a/usr/src/lib/libast/common/sfio/sftell.c b/usr/src/contrib/ast/src/lib/libast/sfio/sftell.c
index 47d59bba95..49c183c170 100644
--- a/usr/src/lib/libast/common/sfio/sftell.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sftell.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sftmp.c b/usr/src/contrib/ast/src/lib/libast/sfio/sftmp.c
index 86532282ff..cdbfa4cd5b 100644
--- a/usr/src/lib/libast/common/sfio/sftmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sftmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -294,7 +294,7 @@ Sfdisc_t* disc;
reg int fd, m;
reg Sfio_t* sf;
Sfio_t newf, savf;
- void (*notifyf)_ARG_((Sfio_t*, int, void*));
+ Sfnotify_f notify = _Sfnotify;
NOTUSED(val);
@@ -303,9 +303,6 @@ Sfdisc_t* disc;
type != SF_DPUSH && type != SF_DPOP && type != SF_DBUFFER)
return 0;
- /* notify function */
- notifyf = _Sfnotify;
-
/* try to create the temp file */
SFCLEAR(&newf,NIL(Vtmutex_t*));
newf.flags = SF_STATIC;
@@ -318,7 +315,7 @@ Sfdisc_t* disc;
we are only interested in creating the file, not the stream */
_Sfnotify = 0;
sf = sfnew(&newf,NIL(Void_t*),(size_t)SF_UNBOUND,fd,SF_READ|SF_WRITE);
- _Sfnotify = notifyf;
+ _Sfnotify = notify;
if(!sf)
return -1;
@@ -343,6 +340,10 @@ Sfdisc_t* disc;
f->mutex = savf.mutex;
f->stdio = savf.stdio;
+ /* remove the SF_STATIC bit if it was only set above in making newf */
+ if(!(savf.flags&SF_STATIC) )
+ f->flags &= ~SF_STATIC;
+
if(savf.data)
{ SFSTRSIZE(&savf);
if(!(savf.flags&SF_MALLOC) )
@@ -355,15 +356,16 @@ Sfdisc_t* disc;
}
/* announce change of status */
- if(notifyf)
- (*notifyf)(f, SF_NEW, (void*)((long)f->file));
-
- f->disc = disc->disc;
+ f->disc = NIL(Sfdisc_t*);
+ if(_Sfnotify)
+ (*_Sfnotify)(f, SF_SETFD, (void*)((long)f->file));
/* erase all traces of newf */
newf.data = newf.endb = newf.endr = newf.endw = NIL(uchar*);
newf.file = -1;
+ _Sfnotify = 0;
sfclose(&newf);
+ _Sfnotify = notify;
return 1;
}
@@ -375,7 +377,9 @@ Sfio_t* sftmp(s)
size_t s;
#endif
{
- Sfio_t* f;
+ Sfio_t *f;
+ int rv;
+ Sfnotify_f notify = _Sfnotify;
static Sfdisc_t Tmpdisc =
{ NIL(Sfread_f), NIL(Sfwrite_f), NIL(Sfseek_f), _tmpexcept,
#if _tmp_rmfail
@@ -386,17 +390,27 @@ size_t s;
};
/* start with a memory resident stream */
- if(!(f = sfnew(NIL(Sfio_t*),NIL(char*),s,-1,SF_STRING|SF_READ|SF_WRITE)) )
+ _Sfnotify = 0; /* local computation so no notification */
+ f = sfnew(NIL(Sfio_t*),NIL(char*),s,-1,SF_STRING|SF_READ|SF_WRITE);
+ _Sfnotify = notify;
+ if(!f)
return NIL(Sfio_t*);
if(s != (size_t)SF_UNBOUND) /* set up a discipline for out-of-bound, etc. */
f->disc = &Tmpdisc;
- /* make the file now */
- if(s == 0 && _tmpexcept(f,SF_DPOP,NIL(Void_t*),f->disc) < 0)
- { sfclose(f);
- return NIL(Sfio_t*);
+ if(s == 0) /* make the file now */
+ { _Sfnotify = 0; /* local computation so no notification */
+ rv = _tmpexcept(f,SF_DPOP,NIL(Void_t*),f->disc);
+ _Sfnotify = notify;
+ if(rv < 0)
+ { sfclose(f);
+ return NIL(Sfio_t*);
+ }
}
+ if(_Sfnotify)
+ (*_Sfnotify)(f, SF_NEW, (void*)((long)f->file));
+
return f;
}
diff --git a/usr/src/lib/libast/common/sfio/sfungetc.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfungetc.c
index e9b90a6640..08ccc6df33 100644
--- a/usr/src/lib/libast/common/sfio/sfungetc.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfungetc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -59,7 +59,7 @@ int c; /* the value to be pushed back */
reg Sfio_t* uf;
SFMTXDECL(f);
- SFMTXENTER(f, -1)
+ SFMTXENTER(f, -1);
if(c < 0 || (f->mode != SF_READ && _sfmode(f,SF_READ,0) < 0))
SFMTXRETURN(f, -1);
diff --git a/usr/src/lib/libast/common/sfio/sfvprintf.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfvprintf.c
index b66f01457b..3f291c934c 100644
--- a/usr/src/lib/libast/common/sfio/sfvprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfvprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -299,7 +299,13 @@ loop_fmt :
}
case '-' :
- flags = (flags & ~(SFFMT_CENTER|SFFMT_ZERO)) | SFFMT_LEFT;
+ if(dot == 1)
+ { dot = 0;
+ precis = -1;
+ flags |= SFFMT_CHOP;
+ }
+ else
+ flags = (flags & ~(SFFMT_CENTER|SFFMT_ZERO)) | SFFMT_LEFT;
goto loop_flags;
case '0' :
if(!(flags&(SFFMT_LEFT|SFFMT_CENTER)) )
@@ -330,11 +336,11 @@ loop_fmt :
flags |= SFFMT_THOUSAND;
goto loop_flags;
- case '.' :
+ case '.':
dot += 1;
if(dot == 1)
{ /* so base can be defined without setting precis */
- if(*form != '.')
+ if(*form != '.' && !(flags & SFFMT_CHOP))
precis = 0;
}
else if(dot == 2)
@@ -415,13 +421,12 @@ loop_fmt :
base = v;
goto loop_flags;
+ /* 2012-06-27 I* will be deprecated and POSIX will probably settle on one of L* or z* */
+ case 'L' : /* long double or L* sizeof object length */
+ case 'z' : /* ssize_t or z* sizeof object length */
case 'I' : /* object length */
size = -1; flags = (flags & ~SFFMT_TYPES) | SFFMT_IFLAG;
- if(isdigit(*form) )
- { for(size = 0, n = *form; isdigit(n); n = *++form)
- size = size*10 + (n - '0');
- }
- else if(*form == '*')
+ if(*form == '*')
{ form = (*_Sffmtintf)(form+1,&n);
if(*form == '$')
{ form += 1;
@@ -445,6 +450,14 @@ loop_fmt :
}
else size = va_arg(args,int);
}
+ else if (fmt == 'L')
+ flags = (flags & ~SFFMT_TYPES) | SFFMT_LDOUBLE;
+ else if (fmt == 'z')
+ flags = (flags&~SFFMT_TYPES) | SFFMT_ZFLAG;
+ else if(isdigit(*form) )
+ { for(size = 0, n = *form; isdigit(n); n = *++form)
+ size = size*10 + (n - '0');
+ }
goto loop_flags;
case 'l' :
@@ -463,16 +476,9 @@ loop_fmt :
}
else flags |= SFFMT_SHORT;
goto loop_flags;
- case 'L' :
- size = -1; flags = (flags & ~SFFMT_TYPES) | SFFMT_LDOUBLE;
- goto loop_flags;
-
case 'j' :
size = -1; flags = (flags&~SFFMT_TYPES) | SFFMT_JFLAG;
goto loop_flags;
- case 'z' :
- size = -1; flags = (flags&~SFFMT_TYPES) | SFFMT_ZFLAG;
- goto loop_flags;
case 't' :
size = -1; flags = (flags&~SFFMT_TYPES) | SFFMT_TFLAG;
goto loop_flags;
@@ -725,7 +731,7 @@ loop_fmt :
w = v;
#endif
}
-#if _has_multibyte && defined(mbwidth)
+#ifdef mbwidth
else if (wc)
{ w = 0;
SFMBCLR(&mbs);
@@ -748,9 +754,7 @@ loop_fmt :
else
#endif
{ if((v = size) < 0)
- for(v = 0; sp[v]; ++v)
- if(v == precis)
- break;
+ for(v = 0; v != precis && sp[v]; ++v);
if(precis >= 0 && v > precis)
v = precis;
w = v;
@@ -762,11 +766,52 @@ loop_fmt :
SFnputc(f, ' ', k);
}
else
- {
- SFnputc(f, ' ', n);
+ { SFnputc(f, ' ', n);
n = 0;
}
}
+ if(n < 0 && (flags & SFFMT_CHOP) && width > 0 && precis < 0)
+ {
+#if _has_multibyte
+ if(flags & SFFMT_LONG)
+ { SFMBCLR(&mbs);
+ wsp = (wchar_t*)sp;
+ while(n < 0)
+ {
+#ifdef mbwidth
+ n += mbwidth(*wsp);
+#else
+ n++;
+#endif
+ wsp++;
+ w--;
+ }
+ sp = (char*)wsp;
+ }
+ else if (wc)
+ { SFMBCLR(&mbs);
+ osp = sp;
+ while(n < 0)
+ { ssp = sp;
+ if ((k = mbchar(sp)) <= 0)
+ { sp = ssp;
+ break;
+ }
+#ifdef mbwidth
+ n += mbwidth(k);
+#else
+ n++;
+#endif
+ }
+ v -= (sp - osp);
+ }
+ else
+#endif
+ { sp += -n;
+ v += n;
+ }
+ n = 0;
+ }
#if _has_multibyte
if(flags & SFFMT_LONG)
{ SFMBCLR(&mbs);
@@ -1164,6 +1209,8 @@ loop_fmt :
*endsp++ = fmt == 'a' ? 'x' : 'X';
if (!isxdigit(*ep))
goto infinite;
+ if (base < 0)
+ base = 0;
goto a_format;
}
else /* 'g' or 'G' format */
@@ -1202,6 +1249,8 @@ loop_fmt :
if(isalpha(*ep))
goto infinite;
sp = endsp = buf+1; /* reserve space for sign */
+ if (base <= 0)
+ base = 2;
a_format:
*endsp++ = *ep ? *ep++ : '0';
@@ -1226,7 +1275,7 @@ loop_fmt :
}
else n = 0;
*--ep = (char)('0' + n);
- if(endep-ep <= 1) /* at least 2 digits */
+ while((endep-ep) < base && ep > (buf+2)) /* at least base digits in exponent */
*--ep = '0';
/* the e/Exponent separator and sign */
diff --git a/usr/src/lib/libast/common/sfio/sfvscanf.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfvscanf.c
index 8ad68c325b..a757c2f919 100644
--- a/usr/src/lib/libast/common/sfio/sfvscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfvscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -140,9 +140,7 @@ int flags; /* SFFMT_LONG for wchar_t */
#endif
{
int c, endc, n;
-#if _has_multibyte
SFMBDCL(mbs)
-#endif
if(*form == '^') /* complementing this set */
{ ac->yes = 0;
@@ -556,13 +554,10 @@ loop_fmt:
base = v;
goto loop_flags;
+ case 'z' : /* ssize_t or object size */
case 'I' : /* object size */
size = -1; flags = (flags & ~SFFMT_TYPES) | SFFMT_IFLAG;
- if(isdigit(*form))
- { for(size = 0, n = *form; isdigit(n); n = *++form)
- size = size*10 + (n - '0');
- }
- else if(*form == '*')
+ if(*form == '*')
{ form = (*_Sffmtintf)(form+1,&n);
if(*form == '$')
{ form += 1;
@@ -586,6 +581,11 @@ loop_fmt:
}
else size = va_arg(args,int);
}
+ else if (fmt == 'z')
+ flags = (flags&~SFFMT_TYPES) | SFFMT_ZFLAG;
+ else if(isdigit(*form))
+ for(size = 0, n = *form; isdigit(n); n = *++form)
+ size = size*10 + (n - '0');
goto loop_flags;
case 'l' :
@@ -610,9 +610,6 @@ loop_fmt:
case 'j' :
size = -1; flags = (flags&~SFFMT_TYPES) | SFFMT_JFLAG;
goto loop_flags;
- case 'z' :
- size = -1; flags = (flags&~SFFMT_TYPES) | SFFMT_ZFLAG;
- goto loop_flags;
case 't' :
size = -1; flags = (flags&~SFFMT_TYPES) | SFFMT_TFLAG;
goto loop_flags;
diff --git a/usr/src/lib/libast/common/sfio/sfwalk.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfwalk.c
index 89b011ece9..7019863ea5 100644
--- a/usr/src/lib/libast/common/sfio/sfwalk.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfwalk.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/sfio/sfwr.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfwr.c
index bca87078fd..9f1c0f914c 100644
--- a/usr/src/lib/libast/common/sfio/sfwr.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfwr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -21,7 +21,10 @@
***********************************************************************/
#include "sfhdr.h"
-/* Write with discipline.
+/* Write data with discipline.
+** In the case of a string stream, this is used mainly to extend
+** the buffer. However, this is done here so that exception handling
+** is done uniformly across all stream types.
**
** Written by Kiem-Phong Vo.
*/
@@ -155,7 +158,7 @@ Sfdisc_t* disc;
f->flags &= ~(SF_EOF|SF_ERROR);
dc = disc;
- if(f->flags&SF_STRING) /* total required buffer */
+ if(f->flags&SF_STRING) /* just asking to extend buffer */
w = n + (f->next - f->data);
else
{ /* warn that a write is about to happen */
diff --git a/usr/src/lib/libast/common/sfio/sfwrite.c b/usr/src/contrib/ast/src/lib/libast/sfio/sfwrite.c
index f6c9cd9392..6e55484969 100644
--- a/usr/src/lib/libast/common/sfio/sfwrite.c
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/sfwrite.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -94,7 +94,7 @@ size_t n; /* number of bytes. */
w = f->endb - f->next;
- if(s == f->next) /* after sfreserve */
+ if(s == f->next && s < f->endb) /* after sfreserve */
{ if(w > (ssize_t)n)
w = (ssize_t)n;
f->next = (s += w);
@@ -135,7 +135,7 @@ size_t n; /* number of bytes. */
w = (ssize_t)n;
if(w <= 0) /* no forward progress possible */
break;
- memcpy(f->next, s, w);
+ memmove(f->next, s, w);
f->next += w;
}
diff --git a/usr/src/lib/libast/common/sfio/vthread.h b/usr/src/contrib/ast/src/lib/libast/sfio/vthread.h
index 031c28bcb5..40309580ce 100644
--- a/usr/src/lib/libast/common/sfio/vthread.h
+++ b/usr/src/contrib/ast/src/lib/libast/sfio/vthread.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/sparc/include/ast/bytesex.h b/usr/src/contrib/ast/src/lib/libast/std/bytesex.h
index 1f78d13287..d8a0783219 100644
--- a/usr/src/lib/libast/sparc/include/ast/bytesex.h
+++ b/usr/src/contrib/ast/src/lib/libast/std/bytesex.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/std/dirent.h b/usr/src/contrib/ast/src/lib/libast/std/dirent.h
index 05e76cadae..de52967502 100644
--- a/usr/src/lib/libast/common/std/dirent.h
+++ b/usr/src/contrib/ast/src/lib/libast/std/dirent.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/amd64/include/ast/endian.h b/usr/src/contrib/ast/src/lib/libast/std/endian.h
index 1c992dd490..c54e213928 100644
--- a/usr/src/lib/libast/amd64/include/ast/endian.h
+++ b/usr/src/contrib/ast/src/lib/libast/std/endian.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/amd64/include/ast/iconv.h b/usr/src/contrib/ast/src/lib/libast/std/iconv.h
index e65540c075..fb82d62c64 100644
--- a/usr/src/lib/libast/amd64/include/ast/iconv.h
+++ b/usr/src/contrib/ast/src/lib/libast/std/iconv.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/std/nl_types.h b/usr/src/contrib/ast/src/lib/libast/std/nl_types.h
index 581cc13a81..99299a7a49 100644
--- a/usr/src/lib/libast/common/std/nl_types.h
+++ b/usr/src/contrib/ast/src/lib/libast/std/nl_types.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/std/stdio.h b/usr/src/contrib/ast/src/lib/libast/std/stdio.h
index 0d9876a250..c3c09feab3 100644
--- a/usr/src/lib/libast/common/std/stdio.h
+++ b/usr/src/contrib/ast/src/lib/libast/std/stdio.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/std/wchar.h b/usr/src/contrib/ast/src/lib/libast/std/wchar.h
index 43c5ef1e98..9737c2d496 100644
--- a/usr/src/lib/libast/common/std/wchar.h
+++ b/usr/src/contrib/ast/src/lib/libast/std/wchar.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/amd64/include/ast/stdio.h b/usr/src/contrib/ast/src/lib/libast/std/wctype.h
index 0d9876a250..1a3a94fb78 100644
--- a/usr/src/lib/libast/amd64/include/ast/stdio.h
+++ b/usr/src/contrib/ast/src/lib/libast/std/wctype.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,4 +19,4 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-#include <ast_stdio.h>
+#include <ast_wctype.h>
diff --git a/usr/src/lib/libast/common/stdio/_doprnt.c b/usr/src/contrib/ast/src/lib/libast/stdio/_doprnt.c
index b198dc5b92..afa160df22 100644
--- a/usr/src/lib/libast/common/stdio/_doprnt.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_doprnt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_doscan.c b/usr/src/contrib/ast/src/lib/libast/stdio/_doscan.c
index f849cc378a..d112a40729 100644
--- a/usr/src/lib/libast/common/stdio/_doscan.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_doscan.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_filbuf.c b/usr/src/contrib/ast/src/lib/libast/stdio/_filbuf.c
index 803469de61..f74e6d7bb0 100644
--- a/usr/src/lib/libast/common/stdio/_filbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_filbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_flsbuf.c b/usr/src/contrib/ast/src/lib/libast/stdio/_flsbuf.c
index 6052e56df8..51cbcda59d 100644
--- a/usr/src/lib/libast/common/stdio/_flsbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_flsbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdfun.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdfun.c
index 4a625827a5..5858903d1b 100644
--- a/usr/src/lib/libast/common/stdio/_stdfun.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdfun.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdopen.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdopen.c
index 698cc6287c..dc997780f9 100644
--- a/usr/src/lib/libast/common/stdio/_stdopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdprintf.c
index 0b6380bd27..db57a8dbbe 100644
--- a/usr/src/lib/libast/common/stdio/_stdprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdscanf.c
index 259e60ff74..386a0cb2e8 100644
--- a/usr/src/lib/libast/common/stdio/_stdscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdsprnt.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdsprnt.c
index f9b57767e4..71c8f74b33 100644
--- a/usr/src/lib/libast/common/stdio/_stdsprnt.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdsprnt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdvbuf.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdvbuf.c
index 2cf7cffd4b..c9a286183c 100644
--- a/usr/src/lib/libast/common/stdio/_stdvbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdvbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdvsnprnt.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdvsnprnt.c
index 5986077e78..78fdf2db13 100644
--- a/usr/src/lib/libast/common/stdio/_stdvsnprnt.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdvsnprnt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdvsprnt.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdvsprnt.c
index e239e79cde..a3b78e6c42 100644
--- a/usr/src/lib/libast/common/stdio/_stdvsprnt.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdvsprnt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/_stdvsscn.c b/usr/src/contrib/ast/src/lib/libast/stdio/_stdvsscn.c
index 7c97f35d3f..0b1fd689bf 100644
--- a/usr/src/lib/libast/common/stdio/_stdvsscn.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/_stdvsscn.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/asprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/asprintf.c
index 11c23bcada..60f59ccff6 100644
--- a/usr/src/lib/libast/common/stdio/asprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/asprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/clearerr.c b/usr/src/contrib/ast/src/lib/libast/stdio/clearerr.c
index b23d627d2a..5d2e07ceac 100644
--- a/usr/src/lib/libast/common/stdio/clearerr.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/clearerr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fclose.c b/usr/src/contrib/ast/src/lib/libast/stdio/fclose.c
index 760658d771..17063cb3bf 100644
--- a/usr/src/lib/libast/common/stdio/fclose.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fclose.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fcloseall.c b/usr/src/contrib/ast/src/lib/libast/stdio/fcloseall.c
index 9b314b3fec..94c855305c 100644
--- a/usr/src/lib/libast/common/stdio/fcloseall.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fcloseall.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fdopen.c b/usr/src/contrib/ast/src/lib/libast/stdio/fdopen.c
index 79ddc09a35..2bfce16399 100644
--- a/usr/src/lib/libast/common/stdio/fdopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fdopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,7 +28,7 @@ fdopen(int fd, const char* mode)
{
int flags;
- if (fd < 0 || !(flags = _sftype(mode, NiL, NiL)))
+ if (fd < 0 || !(flags = _sftype(mode, NiL, NiL, NiL)))
return 0;
return sfnew(NiL, NiL, (size_t)SF_UNBOUND, fd, flags);
}
diff --git a/usr/src/lib/libast/common/stdio/feof.c b/usr/src/contrib/ast/src/lib/libast/stdio/feof.c
index 6379c36638..2b77397e38 100644
--- a/usr/src/lib/libast/common/stdio/feof.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/feof.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/ferror.c b/usr/src/contrib/ast/src/lib/libast/stdio/ferror.c
index 466dab00da..d374df1c72 100644
--- a/usr/src/lib/libast/common/stdio/ferror.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/ferror.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fflush.c b/usr/src/contrib/ast/src/lib/libast/stdio/fflush.c
index 3159ee3358..de6574b902 100644
--- a/usr/src/lib/libast/common/stdio/fflush.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fflush.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fgetc.c b/usr/src/contrib/ast/src/lib/libast/stdio/fgetc.c
index 4770f92c22..09d280fd58 100644
--- a/usr/src/lib/libast/common/stdio/fgetc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fgetc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fgetpos.c b/usr/src/contrib/ast/src/lib/libast/stdio/fgetpos.c
index 13c25eec68..16da6faa9c 100644
--- a/usr/src/lib/libast/common/stdio/fgetpos.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fgetpos.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fgets.c b/usr/src/contrib/ast/src/lib/libast/stdio/fgets.c
index e367164777..727974a546 100644
--- a/usr/src/lib/libast/common/stdio/fgets.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fgets.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fgetwc.c b/usr/src/contrib/ast/src/lib/libast/stdio/fgetwc.c
index b8d1c86c95..64f7d8301d 100644
--- a/usr/src/lib/libast/common/stdio/fgetwc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fgetwc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fgetws.c b/usr/src/contrib/ast/src/lib/libast/stdio/fgetws.c
index 77b785247b..d1adbed8cf 100644
--- a/usr/src/lib/libast/common/stdio/fgetws.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fgetws.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fileno.c b/usr/src/contrib/ast/src/lib/libast/stdio/fileno.c
index 4691796cf9..5ca6de8ad1 100644
--- a/usr/src/lib/libast/common/stdio/fileno.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fileno.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/flockfile.c b/usr/src/contrib/ast/src/lib/libast/stdio/flockfile.c
index a6d8a20c9e..43141ece6d 100644
--- a/usr/src/lib/libast/common/stdio/flockfile.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/flockfile.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fmemopen.c b/usr/src/contrib/ast/src/lib/libast/stdio/fmemopen.c
index 7b669fa4a7..c817bbf04f 100644
--- a/usr/src/lib/libast/common/stdio/fmemopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fmemopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,5 +28,5 @@ fmemopen(void* buf, size_t size, const char* mode)
{
STDIO_PTR(0, "fmemopen", Sfio_t*, (void*, size_t, const char*), (buf, size, mode))
- return sfnew(NiL, buf, size, -1, SF_STRING|_sftype(mode, NiL, NiL));
+ return sfnew(NiL, buf, size, -1, SF_STRING|_sftype(mode, NiL, NiL, NiL));
}
diff --git a/usr/src/lib/libast/common/stdio/fopen.c b/usr/src/contrib/ast/src/lib/libast/stdio/fopen.c
index 98582981f1..4b99fefa15 100644
--- a/usr/src/lib/libast/common/stdio/fopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/fprintf.c
index 57f0ce6a62..0939cc79c9 100644
--- a/usr/src/lib/libast/common/stdio/fprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fpurge.c b/usr/src/contrib/ast/src/lib/libast/stdio/fpurge.c
index 93a8650e52..eeaea0def8 100644
--- a/usr/src/lib/libast/common/stdio/fpurge.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fpurge.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fputc.c b/usr/src/contrib/ast/src/lib/libast/stdio/fputc.c
index bfe43a4169..72cf8742ad 100644
--- a/usr/src/lib/libast/common/stdio/fputc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fputc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fputs.c b/usr/src/contrib/ast/src/lib/libast/stdio/fputs.c
index d1692d353d..0fdc459c2b 100644
--- a/usr/src/lib/libast/common/stdio/fputs.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fputs.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fputwc.c b/usr/src/contrib/ast/src/lib/libast/stdio/fputwc.c
index fb82594124..1029a3b4e8 100644
--- a/usr/src/lib/libast/common/stdio/fputwc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fputwc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fputws.c b/usr/src/contrib/ast/src/lib/libast/stdio/fputws.c
index 7a9b42b313..3e1034ee84 100644
--- a/usr/src/lib/libast/common/stdio/fputws.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fputws.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fread.c b/usr/src/contrib/ast/src/lib/libast/stdio/fread.c
index bc51ce4286..c96a1e78e5 100644
--- a/usr/src/lib/libast/common/stdio/fread.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fread.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/freopen.c b/usr/src/contrib/ast/src/lib/libast/stdio/freopen.c
index a5e020c3c0..e8de05b251 100644
--- a/usr/src/lib/libast/common/stdio/freopen.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/freopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/fscanf.c
index 0c7192f059..2beb400dfd 100644
--- a/usr/src/lib/libast/common/stdio/fscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fseek.c b/usr/src/contrib/ast/src/lib/libast/stdio/fseek.c
index f6fd1688c8..1198a31771 100644
--- a/usr/src/lib/libast/common/stdio/fseek.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fseek.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fseeko.c b/usr/src/contrib/ast/src/lib/libast/stdio/fseeko.c
index da563e0708..0cf3186d42 100644
--- a/usr/src/lib/libast/common/stdio/fseeko.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fseeko.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fsetpos.c b/usr/src/contrib/ast/src/lib/libast/stdio/fsetpos.c
index 5594689870..cc9abbcbc1 100644
--- a/usr/src/lib/libast/common/stdio/fsetpos.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fsetpos.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/ftell.c b/usr/src/contrib/ast/src/lib/libast/stdio/ftell.c
index 2045a7d901..0437e4884f 100644
--- a/usr/src/lib/libast/common/stdio/ftell.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/ftell.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/ftello.c b/usr/src/contrib/ast/src/lib/libast/stdio/ftello.c
index 5d5cf6482c..f430fec83f 100644
--- a/usr/src/lib/libast/common/stdio/ftello.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/ftello.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/ftrylockfile.c b/usr/src/contrib/ast/src/lib/libast/stdio/ftrylockfile.c
index e7ab814e5d..28501e83b0 100644
--- a/usr/src/lib/libast/common/stdio/ftrylockfile.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/ftrylockfile.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/funlockfile.c b/usr/src/contrib/ast/src/lib/libast/stdio/funlockfile.c
index 783ac5e343..33195d587d 100644
--- a/usr/src/lib/libast/common/stdio/funlockfile.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/funlockfile.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fwide.c b/usr/src/contrib/ast/src/lib/libast/stdio/fwide.c
index c5c29f26ad..efcb453986 100644
--- a/usr/src/lib/libast/common/stdio/fwide.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fwide.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fwprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/fwprintf.c
index 74ec5c1d13..b4726e361d 100644
--- a/usr/src/lib/libast/common/stdio/fwprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fwprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fwrite.c b/usr/src/contrib/ast/src/lib/libast/stdio/fwrite.c
index 48e354de39..12bfe8910e 100644
--- a/usr/src/lib/libast/common/stdio/fwrite.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fwrite.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/fwscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/fwscanf.c
index 2a095cb40d..f64f203608 100644
--- a/usr/src/lib/libast/common/stdio/fwscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/fwscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/getc.c b/usr/src/contrib/ast/src/lib/libast/stdio/getc.c
index 9b7bfb4663..b04507fa39 100644
--- a/usr/src/lib/libast/common/stdio/getc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/getc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/getchar.c b/usr/src/contrib/ast/src/lib/libast/stdio/getchar.c
index c82793dacd..80781ebed1 100644
--- a/usr/src/lib/libast/common/stdio/getchar.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/getchar.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/getdelim.c b/usr/src/contrib/ast/src/lib/libast/stdio/getdelim.c
index 97053407af..331125ac96 100644
--- a/usr/src/lib/libast/common/stdio/getdelim.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/getdelim.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/getline.c b/usr/src/contrib/ast/src/lib/libast/stdio/getline.c
index 4e69c75258..914a5c1a64 100644
--- a/usr/src/lib/libast/common/stdio/getline.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/getline.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/getw.c b/usr/src/contrib/ast/src/lib/libast/stdio/getw.c
index f857036584..b0063bede4 100644
--- a/usr/src/lib/libast/common/stdio/getw.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/getw.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/getwc.c b/usr/src/contrib/ast/src/lib/libast/stdio/getwc.c
index 05ffd87718..7e4a39f44d 100644
--- a/usr/src/lib/libast/common/stdio/getwc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/getwc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -22,6 +22,7 @@
#pragma prototyped
#include "stdhdr.h"
+#include "ast_wchar.h"
wint_t
getwc(Sfio_t* f)
diff --git a/usr/src/lib/libast/common/stdio/getwchar.c b/usr/src/contrib/ast/src/lib/libast/stdio/getwchar.c
index 9258c9c807..4564c2a2bf 100644
--- a/usr/src/lib/libast/common/stdio/getwchar.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/getwchar.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -22,6 +22,7 @@
#pragma prototyped
#include "stdhdr.h"
+#include "ast_wchar.h"
wint_t
getwchar(void)
diff --git a/usr/src/lib/libast/common/stdio/pclose.c b/usr/src/contrib/ast/src/lib/libast/stdio/pclose.c
index d1f4a5998c..b06b25a892 100644
--- a/usr/src/lib/libast/common/stdio/pclose.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/pclose.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/popen.c b/usr/src/contrib/ast/src/lib/libast/stdio/popen.c
index ec99d32d21..61968aaa12 100644
--- a/usr/src/lib/libast/common/stdio/popen.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/popen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/printf.c b/usr/src/contrib/ast/src/lib/libast/stdio/printf.c
index 563d6e2c86..ca999f40b5 100644
--- a/usr/src/lib/libast/common/stdio/printf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/printf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/putc.c b/usr/src/contrib/ast/src/lib/libast/stdio/putc.c
index 80803e2a20..34d1b14f0b 100644
--- a/usr/src/lib/libast/common/stdio/putc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/putc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/putchar.c b/usr/src/contrib/ast/src/lib/libast/stdio/putchar.c
index e4007c04e3..5fb82175bc 100644
--- a/usr/src/lib/libast/common/stdio/putchar.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/putchar.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/puts.c b/usr/src/contrib/ast/src/lib/libast/stdio/puts.c
index 5163be9c13..3ef397bed6 100644
--- a/usr/src/lib/libast/common/stdio/puts.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/puts.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/putw.c b/usr/src/contrib/ast/src/lib/libast/stdio/putw.c
index d39cce6dbd..626439ddb1 100644
--- a/usr/src/lib/libast/common/stdio/putw.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/putw.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/putwc.c b/usr/src/contrib/ast/src/lib/libast/stdio/putwc.c
index dfc3581ca1..8a4e86e41c 100644
--- a/usr/src/lib/libast/common/stdio/putwc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/putwc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -22,6 +22,7 @@
#pragma prototyped
#include "stdhdr.h"
+#include "ast_wchar.h"
wint_t
putwc(wchar_t c, Sfio_t* f)
diff --git a/usr/src/lib/libast/common/stdio/putwchar.c b/usr/src/contrib/ast/src/lib/libast/stdio/putwchar.c
index 94772e1a10..70c967f195 100644
--- a/usr/src/lib/libast/common/stdio/putwchar.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/putwchar.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -22,6 +22,7 @@
#pragma prototyped
#include "stdhdr.h"
+#include "ast_wchar.h"
wint_t
putwchar(wchar_t c)
diff --git a/usr/src/lib/libast/common/stdio/rewind.c b/usr/src/contrib/ast/src/lib/libast/stdio/rewind.c
index 6def773202..d82985cfdd 100644
--- a/usr/src/lib/libast/common/stdio/rewind.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/rewind.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/scanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/scanf.c
index 542e572e45..5b2976e4a2 100644
--- a/usr/src/lib/libast/common/stdio/scanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/scanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/setbuf.c b/usr/src/contrib/ast/src/lib/libast/stdio/setbuf.c
index ab35560040..83d6132257 100644
--- a/usr/src/lib/libast/common/stdio/setbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/setbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/setbuffer.c b/usr/src/contrib/ast/src/lib/libast/stdio/setbuffer.c
index 83368bd412..6211c722b0 100644
--- a/usr/src/lib/libast/common/stdio/setbuffer.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/setbuffer.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/setlinebuf.c b/usr/src/contrib/ast/src/lib/libast/stdio/setlinebuf.c
index d23c201920..b18b1512bc 100644
--- a/usr/src/lib/libast/common/stdio/setlinebuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/setlinebuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/setvbuf.c b/usr/src/contrib/ast/src/lib/libast/stdio/setvbuf.c
index 39b4362e8f..c8a38f8cfc 100644
--- a/usr/src/lib/libast/common/stdio/setvbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/setvbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/snprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/snprintf.c
index db8a46e9c1..f30c2432bc 100644
--- a/usr/src/lib/libast/common/stdio/snprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/snprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -30,7 +30,7 @@ snprintf(char* s, int n, const char* fmt, ...)
int v;
va_start(args, fmt);
- v = s ? sfvsprintf(s, n, fmt, args) : -1;
+ v = sfvsprintf(s, n, fmt, args);
va_end(args);
return v;
}
diff --git a/usr/src/lib/libast/common/stdio/sprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/sprintf.c
index 4de333bf63..3a8139a274 100644
--- a/usr/src/lib/libast/common/stdio/sprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/sprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/sscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/sscanf.c
index f965439570..c04d2d32d0 100644
--- a/usr/src/lib/libast/common/stdio/sscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/sscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/stdhdr.h b/usr/src/contrib/ast/src/lib/libast/stdio/stdhdr.h
index 6911129f3b..1b2a930ab7 100644
--- a/usr/src/lib/libast/common/stdio/stdhdr.h
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/stdhdr.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/stdio_c99.c b/usr/src/contrib/ast/src/lib/libast/stdio/stdio_c99.c
index 01e289d213..f8d0f8d9d1 100644
--- a/usr/src/lib/libast/common/stdio/stdio_c99.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/stdio_c99.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/swprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/swprintf.c
index 93546cf85e..6bb0942f8f 100644
--- a/usr/src/lib/libast/common/stdio/swprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/swprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/swscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/swscanf.c
index 220c326e4d..00f27a4b29 100644
--- a/usr/src/lib/libast/common/stdio/swscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/swscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/tmpfile.c b/usr/src/contrib/ast/src/lib/libast/stdio/tmpfile.c
index ad8975b187..c913dc8bbf 100644
--- a/usr/src/lib/libast/common/stdio/tmpfile.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/tmpfile.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/ungetc.c b/usr/src/contrib/ast/src/lib/libast/stdio/ungetc.c
index 8f5a84aeae..e448beb83d 100644
--- a/usr/src/lib/libast/common/stdio/ungetc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/ungetc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/ungetwc.c b/usr/src/contrib/ast/src/lib/libast/stdio/ungetwc.c
index 15f787488c..4877f0c42b 100644
--- a/usr/src/lib/libast/common/stdio/ungetwc.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/ungetwc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vasprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vasprintf.c
index 8db739aaf7..f03397fd87 100644
--- a/usr/src/lib/libast/common/stdio/vasprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vasprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vfprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vfprintf.c
index 9632c3d5a9..04a2e2f664 100644
--- a/usr/src/lib/libast/common/stdio/vfprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vfprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vfscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vfscanf.c
index 43d48540f0..f9bcc016b6 100644
--- a/usr/src/lib/libast/common/stdio/vfscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vfscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vfwprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vfwprintf.c
index 331a65901b..b396792759 100644
--- a/usr/src/lib/libast/common/stdio/vfwprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vfwprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -57,7 +57,10 @@ vfwprintf(Sfio_t* f, const wchar_t* fmt, va_list args)
sfstrclose(t);
}
else
+ {
+ free(m);
v = -1;
+ }
}
else
v = -1;
diff --git a/usr/src/lib/libast/common/stdio/vfwscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vfwscanf.c
index 14a5c1ef2b..ca23f9a413 100644
--- a/usr/src/lib/libast/common/stdio/vfwscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vfwscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vprintf.c
index 6772dc38af..e8764f3865 100644
--- a/usr/src/lib/libast/common/stdio/vprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vscanf.c
index ca5c9ba2a8..33371d9b36 100644
--- a/usr/src/lib/libast/common/stdio/vscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vsnprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vsnprintf.c
index d7e3fd87ef..5cde8fafdc 100644
--- a/usr/src/lib/libast/common/stdio/vsnprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vsnprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -24,32 +24,29 @@
#include "stdhdr.h"
int
-vsnprintf(char* s, int n, const char* fmt, va_list args)
+vsnprintf(char* s, int n, const char* form, va_list args)
{
- Sfio_t f;
- int v;
+ Sfio_t* f;
+ ssize_t rv;
- if (!s)
+ /* make a temp stream */
+ if(!(f = sfnew(NIL(Sfio_t*),NIL(char*),(size_t)SF_UNBOUND,
+ -1,SF_WRITE|SF_STRING)) )
return -1;
- /*
- * make a fake stream
- */
+ if((rv = sfvprintf(f,form,args)) >= 0 )
+ { if(s && n > 0)
+ { if((rv+1) >= n)
+ n--;
+ else
+ n = rv;
+ memcpy(s, f->data, n);
+ s[n] = 0;
+ }
+ _Sfi = rv;
+ }
- SFCLEAR(&f, NiL);
- f.flags = SF_STRING|SF_WRITE;
- f.bits = SF_PRIVATE;
- f.mode = SF_WRITE;
- f.size = n - 1;
- f.data = f.next = f.endr = (uchar*)s;
- f.endb = f.endw = f.data + f.size;
+ sfclose(f);
- /*
- * call and fix up
- */
-
- v = sfvprintf(&f, fmt, args);
- *f.next = 0;
- _Sfi = f.next - f.data;
- return v;
+ return rv;
}
diff --git a/usr/src/lib/libast/common/stdio/vsprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vsprintf.c
index 1732087dfb..8e446148b4 100644
--- a/usr/src/lib/libast/common/stdio/vsprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vsprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vsscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vsscanf.c
index ad3ec60315..b7f14d6bd2 100644
--- a/usr/src/lib/libast/common/stdio/vsscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vsscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vswprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vswprintf.c
index c92d492450..ac09afb8dd 100644
--- a/usr/src/lib/libast/common/stdio/vswprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vswprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vswscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vswscanf.c
index 64a9fa240c..3f6d96cf0e 100644
--- a/usr/src/lib/libast/common/stdio/vswscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vswscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vwprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vwprintf.c
index 560f88bacb..60e9dea440 100644
--- a/usr/src/lib/libast/common/stdio/vwprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vwprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/vwscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/vwscanf.c
index 560acc8b73..dd5007ff6c 100644
--- a/usr/src/lib/libast/common/stdio/vwscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/vwscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/wprintf.c b/usr/src/contrib/ast/src/lib/libast/stdio/wprintf.c
index e0beb131e0..bf8949a5d3 100644
--- a/usr/src/lib/libast/common/stdio/wprintf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/wprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/stdio/wscanf.c b/usr/src/contrib/ast/src/lib/libast/stdio/wscanf.c
index 99777add18..7c783b8ff7 100644
--- a/usr/src/lib/libast/common/stdio/wscanf.c
+++ b/usr/src/contrib/ast/src/lib/libast/stdio/wscanf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/base64.c b/usr/src/contrib/ast/src/lib/libast/string/base64.c
index 7e1f59f869..fc079869ed 100644
--- a/usr/src/lib/libast/common/string/base64.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/base64.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/ccmap.c b/usr/src/contrib/ast/src/lib/libast/string/ccmap.c
index fbb07b8f6d..a42ccb6d41 100644
--- a/usr/src/lib/libast/common/string/ccmap.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/ccmap.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/ccmapid.c b/usr/src/contrib/ast/src/lib/libast/string/ccmapid.c
index 89ca51c588..328066f097 100644
--- a/usr/src/lib/libast/common/string/ccmapid.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/ccmapid.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -139,7 +139,7 @@ ccmapid(const char* name)
register int c;
const Ccmap_t* bp;
int n;
- int sub[2];
+ ssize_t sub[2];
bp = 0;
n = 0;
diff --git a/usr/src/lib/libast/common/string/ccnative.c b/usr/src/contrib/ast/src/lib/libast/string/ccnative.c
index a92ebb3f9c..500f1656f5 100644
--- a/usr/src/lib/libast/common/string/ccnative.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/ccnative.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/string/chresc.c b/usr/src/contrib/ast/src/lib/libast/string/chresc.c
new file mode 100644
index 0000000000..8773c4d66e
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/string/chresc.c
@@ -0,0 +1,237 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * Glenn Fowler
+ * AT&T Research
+ *
+ * return the next character in the string s
+ * \ character constants are expanded
+ * *p is updated to point to the next character in s
+ * *m is 1 if return value is wide
+ */
+
+#include <ast.h>
+#include <ctype.h>
+
+#include <ccode.h>
+#if !_PACKAGE_astsa
+#include <regex.h>
+#endif
+
+int
+chrexp(register const char* s, char** p, int* m, register int flags)
+{
+ register const char* q;
+ register int c;
+ const char* e;
+ const char* b;
+ char* r;
+ int n;
+ int w;
+
+ w = 0;
+ for (;;)
+ {
+ b = s;
+ switch (c = mbchar(s))
+ {
+ case 0:
+ s--;
+ break;
+ case '\\':
+ switch (c = *s++)
+ {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ c -= '0';
+ q = s + 2;
+ while (s < q)
+ switch (*s)
+ {
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ c = (c << 3) + *s++ - '0';
+ break;
+ default:
+ q = s;
+ break;
+ }
+ break;
+ case 'a':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ c = CC_bel;
+ break;
+ case 'b':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ c = '\b';
+ break;
+ case 'c': /*DEPRECATED*/
+ case 'C':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ if (c = *s)
+ {
+ s++;
+ if (c == '\\')
+ {
+ c = chrexp(s - 1, &r, 0, flags);
+ s = (const char*)r;
+ }
+ if (islower(c))
+ c = toupper(c);
+ c = ccmapc(c, CC_NATIVE, CC_ASCII);
+ c ^= 0x40;
+ c = ccmapc(c, CC_ASCII, CC_NATIVE);
+ }
+ break;
+ case 'e': /*DEPRECATED*/
+ case 'E':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ c = CC_esc;
+ break;
+ case 'f':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ c = '\f';
+ break;
+ case 'M':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ if (*s == '-')
+ {
+ s++;
+ c = CC_esc;
+ }
+ break;
+ case 'n':
+ if (flags & FMT_EXP_NONL)
+ continue;
+ if (!(flags & FMT_EXP_LINE))
+ goto noexpand;
+ c = '\n';
+ break;
+ case 'r':
+ if (flags & FMT_EXP_NOCR)
+ continue;
+ if (!(flags & FMT_EXP_LINE))
+ goto noexpand;
+ c = '\r';
+ break;
+ case 't':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ c = '\t';
+ break;
+ case 'v':
+ if (!(flags & FMT_EXP_CHAR))
+ goto noexpand;
+ c = CC_vt;
+ break;
+ case 'u':
+ case 'U':
+ case 'x':
+ if (q = c == 'u' ? (s + 4) : c == 'U' ? (s + 8) : (char*)0)
+ {
+ if (!(flags & FMT_EXP_WIDE))
+ goto noexpand;
+ w = 1;
+ }
+ b = e = s;
+ n = 0;
+ c = 0;
+ while (!e || !q || s < q)
+ {
+ switch (*s)
+ {
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ c = (c << 4) + *s++ - 'a' + 10;
+ n++;
+ continue;
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ c = (c << 4) + *s++ - 'A' + 10;
+ n++;
+ continue;
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ c = (c << 4) + *s++ - '0';
+ n++;
+ continue;
+ case '{':
+ case '[':
+ if (s != e)
+ break;
+ e = 0;
+ s++;
+ if (w && *s == 'U' && *(s + 1) == '+')
+ s += 2;
+ continue;
+ case '}':
+ case ']':
+ if (!e)
+ s++;
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+ if (n <= 2 && !(flags & FMT_EXP_CHAR) || n > 2 && (w = 1) && !(flags & FMT_EXP_WIDE))
+ {
+ c = '\\';
+ s = b;
+ }
+ break;
+ case 0:
+ s--;
+ break;
+ }
+ break;
+ default:
+ if ((s - b) > 1)
+ w = 1;
+ break;
+ }
+ break;
+ }
+ normal:
+ if (p)
+ *p = (char*)s;
+ if (m)
+ *m = w;
+ return c;
+ noexpand:
+ c = '\\';
+ s--;
+ goto normal;
+}
+
+int
+chresc(register const char* s, char** p)
+{
+ return chrexp(s, p, NiL, FMT_EXP_CHAR|FMT_EXP_LINE|FMT_EXP_WIDE);
+}
diff --git a/usr/src/lib/libast/common/string/chrtoi.c b/usr/src/contrib/ast/src/lib/libast/string/chrtoi.c
index 503fb41dc9..2d8a3e100e 100644
--- a/usr/src/lib/libast/common/string/chrtoi.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/chrtoi.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtbase.c b/usr/src/contrib/ast/src/lib/libast/string/fmtbase.c
index bbdbe8165e..a7262eb0c6 100644
--- a/usr/src/lib/libast/common/string/fmtbase.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtbase.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -31,26 +31,40 @@
#include <ast.h>
-#undef fmtbasell
-
char*
-fmtbasell(register intmax_t n, register int b, int p)
+fmtbase(intmax_t n, int b, int p)
{
char* buf;
int z;
+ if (!p)
+ {
+ if (!n)
+ return "0";
+ if (!b)
+ return fmtint(n, 0);
+ if (b == 10)
+ return fmtint(n, 1);
+ }
buf = fmtbuf(z = 72);
- if (!p && (n == 0 || b == 0))
- sfsprintf(buf, z, "%I*d", sizeof(n), n);
- else
- sfsprintf(buf, z, p ? "%#..*I*u" : "%..*I*u", b, sizeof(n), n);
+ sfsprintf(buf, z, p ? "%#..*I*u" : "%..*I*u", b, sizeof(n), n);
return buf;
}
-#undef fmtbase
+#if __OBSOLETE__ < 20140101
-char*
-fmtbase(long n, int b, int p)
+#undef fmtbasell
+
+#if defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern char*
+fmtbasell(intmax_t n, int b, int p)
{
- return fmtbasell((intmax_t)n, b, p);
+ return fmtbase(n, b, p);
}
+
+#undef extern
+
+#endif
diff --git a/usr/src/lib/libast/common/string/fmtbuf.c b/usr/src/contrib/ast/src/lib/libast/string/fmtbuf.c
index 7b7e21e27c..bc96af6565 100644
--- a/usr/src/lib/libast/common/string/fmtbuf.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtbuf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtclock.c b/usr/src/contrib/ast/src/lib/libast/string/fmtclock.c
index 6cba718e19..6e54cfa85f 100644
--- a/usr/src/lib/libast/common/string/fmtclock.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtclock.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtdev.c b/usr/src/contrib/ast/src/lib/libast/string/fmtdev.c
index 5445554976..9f20f5fa77 100644
--- a/usr/src/lib/libast/common/string/fmtdev.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtdev.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -24,7 +24,7 @@
* Glenn Fowler
* AT&T Bell Laboratories
*
- * idevice() formatter
+ * st_dev formatter
*/
#include <ast.h>
@@ -35,11 +35,14 @@ char*
fmtdev(struct stat* st)
{
char* buf;
+ unsigned long mm;
+ unsigned int ma;
+ unsigned int mi;
int z;
- unsigned int ma = major(idevice(st));
- unsigned int mi = minor(idevice(st));
-
+ mm = (S_ISBLK(st->st_mode) || S_ISCHR(st->st_mode)) ? idevice(st) : st->st_dev;
+ ma = major(mm);
+ mi = minor(mm);
buf = fmtbuf(z = 17);
if (ma == '#' && isalnum(mi))
{
diff --git a/usr/src/lib/libast/common/string/fmtelapsed.c b/usr/src/contrib/ast/src/lib/libast/string/fmtelapsed.c
index ae1ea5c474..a1c577918a 100644
--- a/usr/src/lib/libast/common/string/fmtelapsed.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtelapsed.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmterror.c b/usr/src/contrib/ast/src/lib/libast/string/fmterror.c
index 078c7be4c6..eeeb5bcd6f 100644
--- a/usr/src/lib/libast/common/string/fmterror.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmterror.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtesc.c b/usr/src/contrib/ast/src/lib/libast/string/fmtesc.c
index de3acdba22..753b195d0a 100644
--- a/usr/src/lib/libast/common/string/fmtesc.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtesc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -30,6 +30,10 @@
#include <ast.h>
#include <ccode.h>
#include <ctype.h>
+#if _hdr_wchar && _hdr_wctype
+#include <wchar.h>
+#include <wctype.h>
+#endif
/*
* quote string as of length n with qb...qe
@@ -47,6 +51,7 @@ fmtquote(const char* as, const char* qb, const char* qe, size_t n, int flags)
register unsigned char* e = s + n;
register char* b;
register int c;
+ register int m;
register int escaped;
register int spaced;
register int doublequote;
@@ -84,9 +89,15 @@ fmtquote(const char* as, const char* qb, const char* qe, size_t n, int flags)
escaped = spaced = !!(flags & FMT_ALWAYS);
while (s < e)
{
- if ((c = mbsize(s)) > 1)
+ if ((m = mbsize(s)) > 1 && (s + m) <= e)
{
- while (c-- && s < e)
+#if _hdr_wchar && _hdr_wctype
+ c = mbchar(s);
+ if (!spaced && !escaped && (iswspace(c) || iswcntrl(c)))
+ spaced = 1;
+ s -= m;
+#endif
+ while (m--)
*b++ = *s++;
}
else
diff --git a/usr/src/lib/libast/common/string/fmtfmt.c b/usr/src/contrib/ast/src/lib/libast/string/fmtfmt.c
index 91cdd3b9ce..639355ba60 100644
--- a/usr/src/lib/libast/common/string/fmtfmt.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtfmt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtfs.c b/usr/src/contrib/ast/src/lib/libast/string/fmtfs.c
index cdc00f504c..1d89b11efc 100644
--- a/usr/src/lib/libast/common/string/fmtfs.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtfs.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -70,7 +70,7 @@ fmtfs(struct stat* st)
{
disc.key = offsetof(Id_t, id);
disc.size = sizeof(dev_t);
- dict = dtopen(&disc, Dthash);
+ dict = dtopen(&disc, Dtset);
}
else if (ip = (Id_t*)dtmatch(dict, &st->st_dev))
return ip->name;
diff --git a/usr/src/lib/libast/common/string/fmtgid.c b/usr/src/contrib/ast/src/lib/libast/string/fmtgid.c
index 2132f7c284..25ef158b34 100644
--- a/usr/src/lib/libast/common/string/fmtgid.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtgid.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -71,7 +71,7 @@ fmtgid(int gid)
{
disc.key = offsetof(Id_t, id);
disc.size = sizeof(int);
- dict = dtopen(&disc, Dthash);
+ dict = dtopen(&disc, Dtset);
}
else if (ip = (Id_t*)dtmatch(dict, &gid))
return ip->name;
diff --git a/usr/src/lib/libast/common/string/fmtident.c b/usr/src/contrib/ast/src/lib/libast/string/fmtident.c
index 2896291fdb..0ffab5cedd 100644
--- a/usr/src/lib/libast/common/string/fmtident.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtident.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/string/fmtint.c b/usr/src/contrib/ast/src/lib/libast/string/fmtint.c
new file mode 100644
index 0000000000..932fe1e937
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtint.c
@@ -0,0 +1,122 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * format decimal integer
+ * David Korn
+ * AT&T Research
+ */
+
+#include <ast.h>
+
+static const char table[]=
+{
+ "000001002003004005006007008009010011012013014015016017018019"
+ "020021022023024025026027028029030031032033034035036037038039"
+ "040041042043044045046047048049050051052053054055056057058059"
+ "060061062063064065066067068069070071072073074075076077078079"
+ "080081082083084085086087088089090091092093094095096097098099"
+ "100101102103104105106107108109110111112113114115116117118119"
+ "120121122123124125126127128129130131132133134135136137138139"
+ "140141142143144145146147148149150151152153154155156157158159"
+ "160161162163164165166167168169170171172173174175176177178179"
+ "180181182183184185186187188189190191192193194195196197198199"
+ "200201202203204205206207208209210211212213214215216217218219"
+ "220221222223224225226227228229230231232233234235236237238239"
+ "240241242243244245246247248249250251252253254255256257258259"
+ "260261262263264265266267268269270271272273274275276277278279"
+ "280281282283284285286287288289290291292293294295296297298299"
+ "300301302303304305306307308309310311312313314315316317318319"
+ "320321322323324325326327328329330331332333334335336337338339"
+ "340341342343344345346347348349350351352353354355356357358359"
+ "360361362363364365366367368369370371372373374375376377378379"
+ "380381382383384385386387388389390391392393394395396397398399"
+ "400401402403404405406407408409410411412413414415416417418419"
+ "420421422423424425426427428429430431432433434435436437438439"
+ "440441442443444445446447448449450451452453454455456457458459"
+ "460461462463464465466467468469470471472473474475476477478479"
+ "480481482483484485486487488489490491492493494495496497498499"
+ "500501502503504505506507508509510511512513514515516517518519"
+ "520521522523524525526527528529530531532533534535536537538539"
+ "540541542543544545546547548549550551552553554555556557558559"
+ "560561562563564565566567568569570571572573574575576577578579"
+ "580581582583584585586587588589590591592593594595596597598599"
+ "600601602603604605606607608609610611612613614615616617618619"
+ "620621622623624625626627628629630631632633634635636637638639"
+ "640641642643644645646647648649650651652653654655656657658659"
+ "660661662663664665666667668669670671672673674675676677678679"
+ "680681682683684685686687688689690691692693694695696697698699"
+ "700701702703704705706707708709710711712713714715716717718719"
+ "720721722723724725726727728729730731732733734735736737738739"
+ "740741742743744745746747748749750751752753754755756757758759"
+ "760761762763764765766767768769770771772773774775776777778779"
+ "780781782783784785786787788789790791792793794795796797798799"
+ "800801802803804805806807808809810811812813814815816817818819"
+ "820821822823824825826827828829830831832833834835836837838839"
+ "840841842843844845846847848849850851852853854855856857858859"
+ "860861862863864865866867868869870871872873874875876877878879"
+ "880881882883884885886887888889890891892893894895896897898899"
+ "900901902903904905906907908909910911912913914915916917918919"
+ "920921922923924925926927928929930931932933934935936937938939"
+ "940941942943944945946947948949950951952953954955956957958959"
+ "960961962963964965966967968969970971972973974975976977978979"
+ "980981982983984985986987988989990991992993994995996997998999"
+};
+
+char*
+fmtint(intmax_t ll, int unsign)
+{
+ char *buff;
+ uintmax_t n,m;
+ int j=0,k=3*sizeof(ll);
+ if(unsign || ll>=0)
+ n = ll;
+ else
+ {
+ n = -ll;
+ j = 1;
+ }
+ if(n<10)
+ {
+ buff = fmtbuf(k=3);
+ buff[--k] = 0;
+ buff[--k] = '0' + n;
+ goto skip;
+ }
+ buff = fmtbuf(k);
+ buff[--k] = 0;
+ do
+ {
+ k -= 3;
+ if((m=n) >= 1000)
+ m = n%1000;
+ memcpy(buff+k,table+3*m,3);
+ n /= 1000;
+ }
+ while(n>0);
+ while(buff[k]=='0')
+ k++;
+skip:
+ if(j)
+ buff[--k] = '-';
+ return(&buff[k]);
+}
diff --git a/usr/src/lib/libast/common/string/fmtip4.c b/usr/src/contrib/ast/src/lib/libast/string/fmtip4.c
index 377d90cd22..3920c7f6aa 100644
--- a/usr/src/lib/libast/common/string/fmtip4.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtip4.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtip6.c b/usr/src/contrib/ast/src/lib/libast/string/fmtip6.c
index 5b1133a12d..50bac434f9 100644
--- a/usr/src/lib/libast/common/string/fmtip6.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtip6.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -71,22 +71,22 @@ dec(char* s, char* p, int n)
/*
* return pointer to normalized ipv6 address addr
- * with optional prefix bits if 0 < bits <= 128
+ * with optional prefix bits if 0 <= bits <= 128
* return value in short-term circular buffer
*/
char*
-fmtip6(unsigned char* addr, int bits)
+fmtip6(const unsigned char* addr, int bits)
{
- register unsigned char* a = addr;
- register int n = IP6ADDR;
- register int i;
- register int z;
- register int k;
- register int m;
- unsigned char r[IP6ADDR];
- char* b;
- char* s;
+ register const unsigned char* a = addr;
+ register int n = IP6ADDR;
+ register int i;
+ register int z;
+ register int k;
+ register int m;
+ unsigned char r[IP6ADDR];
+ char* b;
+ char* s;
static const char dig[] = "0123456789ABCDEF";
@@ -168,7 +168,7 @@ fmtip6(unsigned char* addr, int bits)
}
if (!z && *(s - 1) == ':')
*s++ = '0';
- if (bits > 0 && bits <= 128)
+ if (bits >= 0 && bits <= 128)
s = dec(s, "/", bits);
*s = 0;
return b;
diff --git a/usr/src/lib/libast/common/string/fmtls.c b/usr/src/contrib/ast/src/lib/libast/string/fmtls.c
index b446c4661c..7b791ddf0c 100644
--- a/usr/src/lib/libast/common/string/fmtls.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtls.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -85,7 +85,7 @@ fmtls(char* buf, const char* name, register struct stat* st, const char* info, c
else
s += sfsprintf(s, LS_W_MAX, "%8I*u ", sizeof(st->st_size), st->st_size);
tm = (flags & LS_ATIME) ? st->st_atime : (flags & LS_CTIME) ? st->st_ctime : st->st_mtime;
- s = tmfmt(s, LS_W_LONG / 2, "%?%l", &tm);
+ s = tmfmt(s, LS_W_LONG / 2, "%?%QL", &tm);
*s++ = ' ';
}
if (info)
diff --git a/usr/src/lib/libast/common/string/fmtmatch.c b/usr/src/contrib/ast/src/lib/libast/string/fmtmatch.c
index 6bb08731dd..2daf2f7041 100644
--- a/usr/src/lib/libast/common/string/fmtmatch.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtmatch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtmode.c b/usr/src/contrib/ast/src/lib/libast/string/fmtmode.c
index a710135e7f..2f9dc4f887 100644
--- a/usr/src/lib/libast/common/string/fmtmode.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtmode.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtnum.c b/usr/src/contrib/ast/src/lib/libast/string/fmtnum.c
index 14db553969..49fb9c3d83 100644
--- a/usr/src/lib/libast/common/string/fmtnum.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtnum.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtperm.c b/usr/src/contrib/ast/src/lib/libast/string/fmtperm.c
index ffc3b3c3f2..c10d3792f4 100644
--- a/usr/src/lib/libast/common/string/fmtperm.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtperm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtre.c b/usr/src/contrib/ast/src/lib/libast/string/fmtre.c
index 4667062aec..a4a887b43b 100644
--- a/usr/src/lib/libast/common/string/fmtre.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtre.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtscale.c b/usr/src/contrib/ast/src/lib/libast/string/fmtscale.c
index 3e3c656a7d..5a35577eaf 100644
--- a/usr/src/lib/libast/common/string/fmtscale.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtscale.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtsignal.c b/usr/src/contrib/ast/src/lib/libast/string/fmtsignal.c
index 84ffbe90ac..a802a1d626 100644
--- a/usr/src/lib/libast/common/string/fmtsignal.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtsignal.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmttime.c b/usr/src/contrib/ast/src/lib/libast/string/fmttime.c
index 3474e54027..f2cfbce962 100644
--- a/usr/src/lib/libast/common/string/fmttime.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmttime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmttmx.c b/usr/src/contrib/ast/src/lib/libast/string/fmttmx.c
index 13f60b39a9..1a427ac6d9 100644
--- a/usr/src/lib/libast/common/string/fmttmx.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmttmx.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmttv.c b/usr/src/contrib/ast/src/lib/libast/string/fmttv.c
index efb391d163..f4cdf1b2e9 100644
--- a/usr/src/lib/libast/common/string/fmttv.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmttv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/fmtuid.c b/usr/src/contrib/ast/src/lib/libast/string/fmtuid.c
index c3ea365d6b..44a1d448ad 100644
--- a/usr/src/lib/libast/common/string/fmtuid.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtuid.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -71,7 +71,7 @@ fmtuid(int uid)
{
disc.key = offsetof(Id_t, id);
disc.size = sizeof(int);
- dict = dtopen(&disc, Dthash);
+ dict = dtopen(&disc, Dtset);
}
else if (ip = (Id_t*)dtmatch(dict, &uid))
return ip->name;
diff --git a/usr/src/lib/libast/common/string/fmtversion.c b/usr/src/contrib/ast/src/lib/libast/string/fmtversion.c
index d5ef6a1cf9..10f2fc9517 100644
--- a/usr/src/lib/libast/common/string/fmtversion.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/fmtversion.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -39,7 +39,7 @@ fmtversion(register unsigned long v)
buf = cur = fmtbuf(n = 18);
end = cur + n;
- if (v >= 19700101L)
+ if (v >= 19700101L && v <= 29991231L)
sfsprintf(cur, end - cur, "%04lu-%02lu-%02lu", (v / 10000) % 10000, (v / 100) % 100, v % 100);
else
{
diff --git a/usr/src/lib/libast/common/string/memdup.c b/usr/src/contrib/ast/src/lib/libast/string/memdup.c
index 8664adc129..9282405dff 100644
--- a/usr/src/lib/libast/common/string/memdup.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/memdup.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/modedata.c b/usr/src/contrib/ast/src/lib/libast/string/modedata.c
index 3ae540df56..dc10d62f70 100644
--- a/usr/src/lib/libast/common/string/modedata.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/modedata.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/modei.c b/usr/src/contrib/ast/src/lib/libast/string/modei.c
index 27bbe28a16..163d633f80 100644
--- a/usr/src/lib/libast/common/string/modei.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/modei.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/modelib.h b/usr/src/contrib/ast/src/lib/libast/string/modelib.h
index 74e070e747..e654240446 100644
--- a/usr/src/lib/libast/common/string/modelib.h
+++ b/usr/src/contrib/ast/src/lib/libast/string/modelib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/modex.c b/usr/src/contrib/ast/src/lib/libast/string/modex.c
index 186d576dbf..a5e501a8c4 100644
--- a/usr/src/lib/libast/common/string/modex.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/modex.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/stracmp.c b/usr/src/contrib/ast/src/lib/libast/string/stracmp.c
index 7dacde4e55..05b5401fbb 100644
--- a/usr/src/lib/libast/common/string/stracmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/stracmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strcopy.c b/usr/src/contrib/ast/src/lib/libast/string/strcopy.c
index e726db97ec..de169e72b3 100644
--- a/usr/src/lib/libast/common/string/strcopy.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strcopy.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/string/strdup.c b/usr/src/contrib/ast/src/lib/libast/string/strdup.c
new file mode 100644
index 0000000000..56798736a0
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/string/strdup.c
@@ -0,0 +1,60 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#undef VMDEBUG
+#define VMDEBUG 0
+
+#if defined(_MSVCRT_H)
+#if defined(__STDPP__directive) && defined(__STDPP__hide)
+__STDPP__directive pragma pp:hide strdup
+#else
+#define strdup ______strdup
+#endif
+#endif
+
+#include <ast.h>
+
+#if defined(_MSVCRT_H)
+#if defined(__STDPP__directive) && defined(__STDPP__hide)
+__STDPP__directive pragma pp:nohide strdup
+#else
+#undef strdup
+#endif
+#endif
+
+/*
+ * return a copy of s using malloc
+ */
+
+#if defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern char*
+strdup(register const char* s)
+{
+ register char* t;
+ register int n;
+
+ return (s && (t = oldof(0, char, n = strlen(s) + 1, 0))) ? (char*)memcpy(t, s, n) : (char*)0;
+}
diff --git a/usr/src/lib/libast/common/string/strelapsed.c b/usr/src/contrib/ast/src/lib/libast/string/strelapsed.c
index c6bc318fcf..fa7d919d49 100644
--- a/usr/src/lib/libast/common/string/strelapsed.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strelapsed.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strerror.c b/usr/src/contrib/ast/src/lib/libast/string/strerror.c
index 2541efd847..166412685e 100644
--- a/usr/src/lib/libast/common/string/strerror.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strerror.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/stresc.c b/usr/src/contrib/ast/src/lib/libast/string/stresc.c
index 84cee6dd7a..59ec6c900f 100644
--- a/usr/src/lib/libast/common/string/stresc.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/stresc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -26,28 +26,31 @@
*
* convert \X character constants in s in place
* the length of the converted s is returned (may have embedded \0's)
+ * wide chars absent locale guidance default to UTF-8
+ * strexp() FMT_EXP_* flags passed to chrexp() for selective conversion
*/
#include <ast.h>
int
-stresc(register char* s)
+strexp(register char* s, int flags)
{
register char* t;
register unsigned int c;
char* b;
char* e;
+ int w;
b = t = s;
while (c = *s++)
{
if (c == '\\')
{
- c = chresc(s - 1, &e);
+ c = chrexp(s - 1, &e, &w, flags);
s = e;
- if (c > UCHAR_MAX)
+ if (w)
{
- t += mbconv(t, c);
+ t += mbwide() ? mbconv(t, c) : wc2utf8(t, c);
continue;
}
}
@@ -56,3 +59,9 @@ stresc(register char* s)
*t = 0;
return t - b;
}
+
+int
+stresc(register char* s)
+{
+ return strexp(s, FMT_EXP_CHAR|FMT_EXP_LINE|FMT_EXP_WIDE);
+}
diff --git a/usr/src/lib/libast/common/string/streval.c b/usr/src/contrib/ast/src/lib/libast/string/streval.c
index d5c8ee7ba3..d246184894 100644
--- a/usr/src/lib/libast/common/string/streval.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/streval.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strexpr.c b/usr/src/contrib/ast/src/lib/libast/string/strexpr.c
index 042ae380aa..23be2f5068 100644
--- a/usr/src/lib/libast/common/string/strexpr.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strexpr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strgid.c b/usr/src/contrib/ast/src/lib/libast/string/strgid.c
index 746d058930..55ebe23a96 100644
--- a/usr/src/lib/libast/common/string/strgid.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strgid.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -81,7 +81,7 @@ strgid(const char* name)
if (!dict)
{
disc.key = offsetof(Id_t, name);
- dict = dtopen(&disc, Dthash);
+ dict = dtopen(&disc, Dtset);
}
else if (ip = (Id_t*)dtmatch(dict, name))
return ip->id;
diff --git a/usr/src/lib/libast/common/string/strlcat.c b/usr/src/contrib/ast/src/lib/libast/string/strlcat.c
index 7a56c7540b..f5f17af8fc 100644
--- a/usr/src/lib/libast/common/string/strlcat.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strlcat.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strlcpy.c b/usr/src/contrib/ast/src/lib/libast/string/strlcpy.c
index e2fe9b7913..8410802dfe 100644
--- a/usr/src/lib/libast/common/string/strlcpy.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strlcpy.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strlook.c b/usr/src/contrib/ast/src/lib/libast/string/strlook.c
index 386be714fa..1868697a89 100644
--- a/usr/src/lib/libast/common/string/strlook.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strlook.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strmatch.c b/usr/src/contrib/ast/src/lib/libast/string/strmatch.c
index 9b6b7f2720..52bc8a2718 100644
--- a/usr/src/lib/libast/common/string/strmatch.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strmatch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -64,6 +64,8 @@ static struct State_s
int nmatch;
} matchstate;
+#define STR_INT 040000
+
/*
* subgroup match
* 0 returned if no match
@@ -75,10 +77,10 @@ static struct State_s
*/
int
-strgrpmatch(const char* b, const char* p, int* sub, int n, register int flags)
+strgrpmatch(const char* b, const char* p, ssize_t* sub, int n, register int flags)
{
register regex_t* re;
- register int* end;
+ register ssize_t* end;
register int i;
register regflags_t reflags;
@@ -95,7 +97,16 @@ strgrpmatch(const char* b, const char* p, int* sub, int n, register int flags)
if (!*p)
{
if (sub && n > 0)
- sub[0] = sub[1] = 0;
+ {
+ if (flags & STR_INT)
+ {
+ int* subi = (int*)sub;
+
+ subi[0] = subi[1] = 0;
+ }
+ else
+ sub[0] = sub[1] = 0;
+ }
return *b == 0;
}
@@ -134,11 +145,25 @@ strgrpmatch(const char* b, const char* p, int* sub, int n, register int flags)
if (!sub || n <= 0)
return 1;
i = re->re_nsub;
- end = sub + n * 2;
- for (n = 0; sub < end && n <= i; n++)
+ if (flags & STR_INT)
+ {
+ int* subi = (int*)sub;
+ int* endi = subi + n * 2;
+
+ for (n = 0; subi < endi && n <= i; n++)
+ {
+ *subi++ = matchstate.match[n].rm_so;
+ *subi++ = matchstate.match[n].rm_eo;
+ }
+ }
+ else
{
- *sub++ = matchstate.match[n].rm_so;
- *sub++ = matchstate.match[n].rm_eo;
+ end = sub + n * 2;
+ for (n = 0; sub < end && n <= i; n++)
+ {
+ *sub++ = matchstate.match[n].rm_so;
+ *sub++ = matchstate.match[n].rm_eo;
+ }
}
return i + 1;
}
@@ -165,7 +190,18 @@ strmatch(const char* s, const char* p)
char*
strsubmatch(const char* s, const char* p, int flags)
{
- int match[2];
+ ssize_t match[2];
return strgrpmatch(s, p, match, 1, (flags ? STR_MAXIMAL : 0)|STR_LEFT) ? (char*)s + match[1] : (char*)0;
}
+
+#undef strgrpmatch
+#if _map_libc
+#define strgrpmatch _ast_strgrpmatch
+#endif
+
+int
+strgrpmatch(const char* b, const char* p, int* sub, int n, int flags)
+{
+ return strgrpmatch_20120528(b, p, (ssize_t*)sub, n, flags|STR_INT);
+}
diff --git a/usr/src/lib/libast/common/string/strmode.c b/usr/src/contrib/ast/src/lib/libast/string/strmode.c
index 205c09c5a5..8ec8749055 100644
--- a/usr/src/lib/libast/common/string/strmode.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strmode.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strnacmp.c b/usr/src/contrib/ast/src/lib/libast/string/strnacmp.c
index 8449959c09..4a6c9c66f0 100644
--- a/usr/src/lib/libast/common/string/strnacmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strnacmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strncopy.c b/usr/src/contrib/ast/src/lib/libast/string/strncopy.c
index fa3b5e036d..65752ac8e2 100644
--- a/usr/src/lib/libast/common/string/strncopy.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strncopy.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strnpcmp.c b/usr/src/contrib/ast/src/lib/libast/string/strnpcmp.c
index ab4ec0d5d9..e8a41721cf 100644
--- a/usr/src/lib/libast/common/string/strnpcmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strnpcmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strntod.c b/usr/src/contrib/ast/src/lib/libast/string/strntod.c
index 94103313d0..bd178d9c39 100644
--- a/usr/src/lib/libast/common/string/strntod.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strntod.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strntol.c b/usr/src/contrib/ast/src/lib/libast/string/strntol.c
index 66b3ca9295..a10c07377b 100644
--- a/usr/src/lib/libast/common/string/strntol.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strntol.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strntold.c b/usr/src/contrib/ast/src/lib/libast/string/strntold.c
index 76c2b3e697..da20975ec8 100644
--- a/usr/src/lib/libast/common/string/strntold.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strntold.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strntoll.c b/usr/src/contrib/ast/src/lib/libast/string/strntoll.c
index 81abcd0b0c..b9c054d9bd 100644
--- a/usr/src/lib/libast/common/string/strntoll.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strntoll.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strnton.c b/usr/src/contrib/ast/src/lib/libast/string/strnton.c
index 0bed3df738..4f205c883a 100644
--- a/usr/src/lib/libast/common/string/strnton.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strnton.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strntonll.c b/usr/src/contrib/ast/src/lib/libast/string/strntonll.c
index bd466b9abc..cdb598fdf7 100644
--- a/usr/src/lib/libast/common/string/strntonll.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strntonll.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strntoul.c b/usr/src/contrib/ast/src/lib/libast/string/strntoul.c
index 8b201f060c..1bf69cba15 100644
--- a/usr/src/lib/libast/common/string/strntoul.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strntoul.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strntoull.c b/usr/src/contrib/ast/src/lib/libast/string/strntoull.c
index 0de71e2178..5b540bfba6 100644
--- a/usr/src/lib/libast/common/string/strntoull.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strntoull.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strnvcmp.c b/usr/src/contrib/ast/src/lib/libast/string/strnvcmp.c
index 0ebba65de4..41d2414aa1 100644
--- a/usr/src/lib/libast/common/string/strnvcmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strnvcmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/stropt.c b/usr/src/contrib/ast/src/lib/libast/string/stropt.c
index aff59e541b..91bd351380 100644
--- a/usr/src/lib/libast/common/string/stropt.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/stropt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strpcmp.c b/usr/src/contrib/ast/src/lib/libast/string/strpcmp.c
index 17bb4384ed..2c83d710c0 100644
--- a/usr/src/lib/libast/common/string/strpcmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strpcmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strperm.c b/usr/src/contrib/ast/src/lib/libast/string/strperm.c
index ccb878d2c0..455d232bc4 100644
--- a/usr/src/lib/libast/common/string/strperm.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strperm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strpsearch.c b/usr/src/contrib/ast/src/lib/libast/string/strpsearch.c
index e7ae3f3e69..69637d5e40 100644
--- a/usr/src/lib/libast/common/string/strpsearch.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strpsearch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strsearch.c b/usr/src/contrib/ast/src/lib/libast/string/strsearch.c
index 59a31d6f1a..0f3cdb6a15 100644
--- a/usr/src/lib/libast/common/string/strsearch.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strsearch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strsort.c b/usr/src/contrib/ast/src/lib/libast/string/strsort.c
index fd604ca261..e7ab49af9a 100644
--- a/usr/src/lib/libast/common/string/strsort.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strsort.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strtape.c b/usr/src/contrib/ast/src/lib/libast/string/strtape.c
index 00d40b701a..e31f227781 100644
--- a/usr/src/lib/libast/common/string/strtape.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strtape.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strtoi.h b/usr/src/contrib/ast/src/lib/libast/string/strtoi.h
index a13425e6d3..b1155a5dae 100644
--- a/usr/src/lib/libast/common/string/strtoi.h
+++ b/usr/src/contrib/ast/src/lib/libast/string/strtoi.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -75,9 +75,12 @@
* multiplier: . pseudo-float if m>1
* [bB] block (512)
* [cC] char (1)
- * [gG] giga (1024*1024*1024)
- * [kK] kilo (1024)
- * [mM] mega (1024*1024)
+ * [gG] giga (1000*1000*1000)
+ * [gG]i gibi (1024*1024*1024)
+ * [kK] kilo (1000)
+ * [kK]i kibi (1024)
+ * [mM] mega (1000*1000)
+ * [mM]i mibi (1024*1024)
*/
#include <ast.h>
@@ -476,11 +479,13 @@ S2I_function(a, e, base) const char* a; char** e; int base;
s--;
else
{
+ x = m != 1;
switch (c)
{
case 'b':
case 'B':
shift = 9;
+ x = 0;
break;
case 'k':
case 'K':
@@ -533,13 +538,34 @@ S2I_function(a, e, base) const char* a; char** e; int base;
if (S2I_valid(s))
switch (*s)
{
- case 'b':
- case 'B':
case 'i':
case 'I':
s++;
+ x = 0;
break;
}
+ if (S2I_valid(s))
+ switch (*s)
+ {
+ case 'b':
+ case 'B':
+ s++;
+ break;
+ }
+ if (x)
+ {
+ v = 1;
+ for (shift /= 10; shift; shift--)
+ {
+ if (v >= (S2I_max/1000))
+ {
+ v = 0;
+ overflow = 1;
+ }
+ v *= 1000;
+ }
+ }
+ else
#if S2I_unsigned
if (shift >= (sizeof(S2I_type) * CHAR_BIT))
#else
diff --git a/usr/src/lib/libast/common/string/strtoip4.c b/usr/src/contrib/ast/src/lib/libast/string/strtoip4.c
index 19371369c3..6d4aed2002 100644
--- a/usr/src/lib/libast/common/string/strtoip4.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strtoip4.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strtoip6.c b/usr/src/contrib/ast/src/lib/libast/string/strtoip6.c
index f4cf8dfbce..ff1c65246e 100644
--- a/usr/src/lib/libast/common/string/strtoip6.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strtoip6.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -187,10 +187,14 @@ strtoip6(register const char* s, char** e, unsigned char* addr, unsigned char* b
*b++ = 0;
if (bits)
{
- a = 0;
if (c == PFX)
+ {
+ a = 0;
while ((c = lex[*((unsigned char*)s++)]) < 10)
a = a * 10 + c;
+ }
+ else
+ a = 0xff;
*bits = a;
}
}
diff --git a/usr/src/lib/libast/common/string/strton.c b/usr/src/contrib/ast/src/lib/libast/string/strton.c
index dc48ae6202..f7cae8b91f 100644
--- a/usr/src/lib/libast/common/string/strton.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strton.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strtonll.c b/usr/src/contrib/ast/src/lib/libast/string/strtonll.c
index 01440a8a78..611fe4fe56 100644
--- a/usr/src/lib/libast/common/string/strtonll.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strtonll.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/struid.c b/usr/src/contrib/ast/src/lib/libast/string/struid.c
index 6b614e878d..9a26e8f87a 100644
--- a/usr/src/lib/libast/common/string/struid.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/struid.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -75,7 +75,7 @@ struid(const char* name)
if (!dict)
{
disc.key = offsetof(Id_t, name);
- dict = dtopen(&disc, Dthash);
+ dict = dtopen(&disc, Dtset);
}
else if (ip = (Id_t*)dtmatch(dict, name))
return ip->id;
diff --git a/usr/src/lib/libast/common/string/struniq.c b/usr/src/contrib/ast/src/lib/libast/string/struniq.c
index 9f0ff50eeb..498fd4ea04 100644
--- a/usr/src/lib/libast/common/string/struniq.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/struniq.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/strvcmp.c b/usr/src/contrib/ast/src/lib/libast/string/strvcmp.c
index 91a3ed12e7..036460db8c 100644
--- a/usr/src/lib/libast/common/string/strvcmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/strvcmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/swapget.c b/usr/src/contrib/ast/src/lib/libast/string/swapget.c
index 09ab1bcd95..b032bfc1b7 100644
--- a/usr/src/lib/libast/common/string/swapget.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/swapget.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/swapmem.c b/usr/src/contrib/ast/src/lib/libast/string/swapmem.c
index 72027dcb61..7a96bf0c03 100644
--- a/usr/src/lib/libast/common/string/swapmem.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/swapmem.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/swapop.c b/usr/src/contrib/ast/src/lib/libast/string/swapop.c
index f1c7a05055..aefe68736d 100644
--- a/usr/src/lib/libast/common/string/swapop.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/swapop.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/swapput.c b/usr/src/contrib/ast/src/lib/libast/string/swapput.c
index ff577e9df0..66373ae051 100644
--- a/usr/src/lib/libast/common/string/swapput.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/swapput.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/tok.c b/usr/src/contrib/ast/src/lib/libast/string/tok.c
index f5cfa4c66f..c781fb72a6 100644
--- a/usr/src/lib/libast/common/string/tok.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/tok.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/tokline.c b/usr/src/contrib/ast/src/lib/libast/string/tokline.c
index e7b3024b9a..b572651a4b 100644
--- a/usr/src/lib/libast/common/string/tokline.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/tokline.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/string/tokscan.c b/usr/src/contrib/ast/src/lib/libast/string/tokscan.c
index 526c476f1b..34f6dfcb96 100644
--- a/usr/src/lib/libast/common/string/tokscan.c
+++ b/usr/src/contrib/ast/src/lib/libast/string/tokscan.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/string/wc2utf8.c b/usr/src/contrib/ast/src/lib/libast/string/wc2utf8.c
new file mode 100644
index 0000000000..dbfe681f0b
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/string/wc2utf8.c
@@ -0,0 +1,78 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * Glenn Fowler
+ * AT&T Research
+ *
+ * convert wide character to utf8 in s
+ * s must have room for at least 6 bytes
+ * return value is the number of chars placed in s
+ * thanks Tom Duff
+ */
+
+#include <ast.h>
+
+typedef struct Utf8_s
+{
+ uint32_t range;
+ unsigned short prefix;
+ unsigned short shift;
+} Utf8_t;
+
+static const Utf8_t ops[] =
+{
+ { 0x00000080, 0x00, 0 },
+ { 0x00000800, 0xc0, 6 },
+ { 0x00010000, 0xe0, 12 },
+ { 0x00200000, 0xf0, 18 },
+ { 0x04000000, 0xf8, 24 },
+ { 0x80000000, 0xfc, 30 }
+};
+
+int
+wc2utf8(register char* s, register uint32_t w)
+{
+ register int i;
+ char* b;
+
+ for (i = 0; i < elementsof(ops); i++)
+ if (w < ops[i].range)
+ {
+ b = s;
+ *s++ = ops[i].prefix | (w >> ops[i].shift);
+ switch (ops[i].shift)
+ {
+ case 30: *s++ = 0x80 | ((w >> 24) & 0x3f);
+ /* FALLTHROUGH */
+ case 24: *s++ = 0x80 | ((w >> 18) & 0x3f);
+ /* FALLTHROUGH */
+ case 18: *s++ = 0x80 | ((w >> 12) & 0x3f);
+ /* FALLTHROUGH */
+ case 12: *s++ = 0x80 | ((w >> 6) & 0x3f);
+ /* FALLTHROUGH */
+ case 6: *s++ = 0x80 | (w & 0x3f);
+ }
+ return s - b;
+ }
+ return 0;
+}
diff --git a/usr/src/lib/libast/common/tm/tmdata.c b/usr/src/contrib/ast/src/lib/libast/tm/tmdata.c
index 7b5943a3de..1cdaf241ce 100644
--- a/usr/src/lib/libast/common/tm/tmdata.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmdata.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmdate.c b/usr/src/contrib/ast/src/lib/libast/tm/tmdate.c
index 8596b15431..e7ffb791be 100644
--- a/usr/src/lib/libast/common/tm/tmdate.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmdate.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmequiv.c b/usr/src/contrib/ast/src/lib/libast/tm/tmequiv.c
index 98d1a601ad..4ab07c9dbd 100644
--- a/usr/src/lib/libast/common/tm/tmequiv.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmequiv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmfix.c b/usr/src/contrib/ast/src/lib/libast/tm/tmfix.c
index 6095b7ec6d..5425a8bf73 100644
--- a/usr/src/lib/libast/common/tm/tmfix.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmfix.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmfmt.c b/usr/src/contrib/ast/src/lib/libast/tm/tmfmt.c
index b8919e844e..dda0ed0f28 100644
--- a/usr/src/lib/libast/common/tm/tmfmt.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmfmt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmform.c b/usr/src/contrib/ast/src/lib/libast/tm/tmform.c
index 252d0d0efa..4b608c83d5 100644
--- a/usr/src/lib/libast/common/tm/tmform.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmform.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmgoff.c b/usr/src/contrib/ast/src/lib/libast/tm/tmgoff.c
index 3a23f20a87..c8c8d579e2 100644
--- a/usr/src/lib/libast/common/tm/tmgoff.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmgoff.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tminit.c b/usr/src/contrib/ast/src/lib/libast/tm/tminit.c
index 26e870213f..191886195b 100644
--- a/usr/src/lib/libast/common/tm/tminit.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tminit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -35,6 +35,7 @@
#ifndef tzname
# if defined(__DYNAMIC__)
+# undef _dat_tzname
# define tzname __DYNAMIC__(tzname)
# else
# if !_dat_tzname
@@ -45,7 +46,7 @@
# endif
# endif
# endif
-# if _dat_tzname
+# if _dat_tzname && !defined(tzname)
extern char* tzname[];
# endif
#endif
diff --git a/usr/src/lib/libast/common/tm/tmleap.c b/usr/src/contrib/ast/src/lib/libast/tm/tmleap.c
index 3de239a7e6..87c2f042b6 100644
--- a/usr/src/lib/libast/common/tm/tmleap.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmleap.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmlex.c b/usr/src/contrib/ast/src/lib/libast/tm/tmlex.c
index ffdafdaaf2..4bcd864943 100644
--- a/usr/src/lib/libast/common/tm/tmlex.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmlex.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmlocale.c b/usr/src/contrib/ast/src/lib/libast/tm/tmlocale.c
index 09a4408249..98dafdb59f 100644
--- a/usr/src/lib/libast/common/tm/tmlocale.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmlocale.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -76,12 +76,28 @@ fixup(Lc_info_t* li, register char** b)
TM_TIME,
TM_DATE,
TM_DEFAULT,
+ TM_MERIDIAN,
+ TM_UT,
+ TM_DT,
+ TM_SUFFIXES,
+ TM_PARTS,
+ TM_HOURS,
+ TM_DAYS,
+ TM_LAST,
+ TM_THIS,
+ TM_NEXT,
+ TM_EXACT,
+ TM_NOISE,
+ TM_ORDINAL,
TM_CTIME,
TM_DATE_1,
TM_INTERNATIONAL,
TM_RECENT,
TM_DISTANT,
TM_MERIDIAN_TIME,
+ TM_ORDINALS,
+ TM_FINAL,
+ TM_WORK,
};
standardized(li, b);
@@ -558,7 +574,7 @@ load(Lc_info_t* li)
tm_info.format = tm_data.format;
if (!(tm_info.deformat = state.format))
tm_info.deformat = tm_info.format[TM_DEFAULT];
- if (mcfind(path, NiL, NiL, LC_TIME, 0) && (sp = sfopen(NiL, path, "r")))
+ if (mcfind(NiL, NiL, LC_TIME, 0, path, sizeof(path)) && (sp = sfopen(NiL, path, "r")))
{
n = sfsize(sp);
tp = 0;
diff --git a/usr/src/lib/libast/common/tm/tmmake.c b/usr/src/contrib/ast/src/lib/libast/tm/tmmake.c
index a8cd21aefd..04e0bedb7c 100644
--- a/usr/src/lib/libast/common/tm/tmmake.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmmake.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmpoff.c b/usr/src/contrib/ast/src/lib/libast/tm/tmpoff.c
index 45f0b0c7d0..0a25704bf3 100644
--- a/usr/src/lib/libast/common/tm/tmpoff.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmpoff.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -56,7 +56,7 @@ tmpoff(register char* s, size_t z, register const char* p, register int n, int d
}
else
*s++ = '-';
- s += sfsprintf(s, e - s, "%02d%02d", n / 60, n % 60);
+ s += sfsprintf(s, e - s, "%02d%s%02d", n / 60, d == -24*60 ? ":" : "", n % 60);
}
return s;
}
diff --git a/usr/src/lib/libast/common/tm/tmscan.c b/usr/src/contrib/ast/src/lib/libast/tm/tmscan.c
index 57c556ba1e..c2cda8015c 100644
--- a/usr/src/lib/libast/common/tm/tmscan.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmscan.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmsleep.c b/usr/src/contrib/ast/src/lib/libast/tm/tmsleep.c
index 046dc52100..3e4f84ec7b 100644
--- a/usr/src/lib/libast/common/tm/tmsleep.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmsleep.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmtime.c b/usr/src/contrib/ast/src/lib/libast/tm/tmtime.c
index 764f5268b7..086dd5ad39 100644
--- a/usr/src/lib/libast/common/tm/tmtime.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmtime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmtype.c b/usr/src/contrib/ast/src/lib/libast/tm/tmtype.c
index 4be985f1f1..ec45f52b13 100644
--- a/usr/src/lib/libast/common/tm/tmtype.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmtype.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmweek.c b/usr/src/contrib/ast/src/lib/libast/tm/tmweek.c
index 26265d8ba1..78ca98c7ca 100644
--- a/usr/src/lib/libast/common/tm/tmweek.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmweek.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmword.c b/usr/src/contrib/ast/src/lib/libast/tm/tmword.c
index 4ab0bedfd6..33ce66d273 100644
--- a/usr/src/lib/libast/common/tm/tmword.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmword.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxdate.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxdate.c
index 3be483572f..8048f7f604 100644
--- a/usr/src/lib/libast/common/tm/tmxdate.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxdate.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -705,6 +705,7 @@ tmxdate(register const char* s, char** e, Time_t now)
if ((*t == 'T' || *t == 't') && ((set|state) & (YEAR|MONTH|DAY)) == (YEAR|MONTH) && isdigit(*(t + 1)))
t++;
u = t + (*t == '-');
+ message((-1, "AHA#%d n=%d w=%d u='%c' f=%d t=\"%s\"", __LINE__, n, w, *u, f, t));
if ((w == 2 || w == 4) && (*u == 'W' || *u == 'w') && isdigit(*(u + 1)))
{
if (w == 4)
@@ -830,239 +831,250 @@ tmxdate(register const char* s, char** e, Time_t now)
}
else
{
- if (!(state & (LAST|NEXT|THIS)) && ((i = t - s) == 4 && (*t == '.' && isdigit(*(t + 1)) && isdigit(*(t + 2)) && *(t + 3) != '.' || (!*t || isspace(*t) || *t == '_' || isalnum(*t)) && n >= 0 && (n % 100) < 60 && ((m = (n / 100)) < 20 || m < 24 && !((set|state) & (YEAR|MONTH|HOUR|MINUTE)))) || i > 4 && i <= 12))
+ for (u = t; isspace(*u); u++);
+ message((-1, "AHA#%d n=%d u=\"%s\"", __LINE__, n, u));
+ if ((j = tmlex(u, NiL, tm_info.format, TM_NFORM, tm_info.format + TM_SUFFIXES, TM_PARTS - TM_SUFFIXES)) >= 0 && tm_data.lex[j] == TM_PARTS)
+ s = u;
+ else
{
- /*
- * various { date(1) touch(1) } formats
- *
- * [[cc]yy[mm]]ddhhmm[.ss[.nn...]]
- * [cc]yyjjj
- * hhmm[.ss[.nn...]]
- */
-
- flags = 0;
- if (state & CCYYMMDDHHMMSS)
- break;
- state |= CCYYMMDDHHMMSS;
- p = 0;
- if ((i == 7 || i == 5) && (!*t || *t == 'Z' || *t == 'z'))
- {
- if (i == 7)
- {
- dig4(s, m);
- if ((m -= 1900) < TM_WINDOW)
- break;
- }
- else if (dig2(s, m) < TM_WINDOW)
- m += 100;
- dig3(s, k);
- l = 1;
- j = 0;
- i = 0;
- n = 0;
- flags |= MONTH;
- }
- else if (i & 1)
- break;
- else
+ message((-1, "AHA#%d t=\"%s\"", __LINE__, t));
+ if (!(state & (LAST|NEXT|THIS)) && ((i = t - s) == 4 && (*t == '.' && isdigit(*(t + 1)) && isdigit(*(t + 2)) && *(t + 3) != '.' || (!*t || isspace(*t) || *t == '_' || isalnum(*t)) && n >= 0 && (n % 100) < 60 && ((m = (n / 100)) < 20 || m < 24 && !((set|state) & (YEAR|MONTH|HOUR|MINUTE)))) || i > 4 && i <= 12))
{
- u = t;
- if (i == 12)
+ /*
+ * various { date(1) touch(1) } formats
+ *
+ * [[cc]yy[mm]]ddhhmm[.ss[.nn...]]
+ * [cc]yyjjj
+ * hhmm[.ss[.nn...]]
+ */
+
+ message((-1, "AHA#%d t=\"%s\"", __LINE__, t));
+ flags = 0;
+ if (state & CCYYMMDDHHMMSS)
+ break;
+ state |= CCYYMMDDHHMMSS;
+ p = 0;
+ if ((i == 7 || i == 5) && (!*t || *t == 'Z' || *t == 'z'))
{
- x = s;
- dig2(x, m);
- if (m <= 12)
+ if (i == 7)
{
- u -= 4;
- i -= 4;
- x = s + 8;
- dig4(x, m);
- }
- else
dig4(s, m);
- if (m < 1969 || m >= 3000)
- break;
- m -= 1900;
- }
- else if (i == 10)
- {
- x = s;
- if (!dig2(x, m) || m > 12 || !dig2(x, m) || m > 31 || dig2(x, m) > 24 || dig2(x, m) > 60 || dig2(x, m) <= 60 && !(tm_info.flags & TM_DATESTYLE))
- dig2(s, m);
- else
- {
- u -= 2;
- i -= 2;
- x = s + 8;
- dig2(x, m);
+ if ((m -= 1900) < TM_WINDOW)
+ break;
}
- if (m < TM_WINDOW)
+ else if (dig2(s, m) < TM_WINDOW)
m += 100;
- }
- else
- m = tm->tm_year;
- if ((u - s) < 8)
- l = tm->tm_mon + 1;
- else if (dig2(s, l) <= 0 || l > 12)
- break;
- else
+ dig3(s, k);
+ l = 1;
+ j = 0;
+ i = 0;
+ n = 0;
flags |= MONTH;
- if ((u - s) < 6)
- k = tm->tm_mday;
- else if (dig2(s, k) < 1 || k > 31)
- break;
- else
- flags |= DAY;
- if ((u - s) < 4)
- break;
- if (dig2(s, j) > 24)
- break;
- if (dig2(s, i) > 59)
- break;
- flags |= HOUR|MINUTE;
- if ((u - s) == 2)
- {
- dig2(s, n);
- flags |= SECOND;
}
- else if (u - s)
+ else if (i & 1)
break;
- else if (*t != '.')
- n = 0;
else
{
- n = strtol(t + 1, &t, 10);
- flags |= SECOND;
- if (*t == '.')
+ u = t;
+ if (i == 12)
{
- q = 1000000000;
- while (isdigit(*++t))
- p += (*t - '0') * (q /= 10);
- set |= NSEC;
+ x = s;
+ dig2(x, m);
+ if (m <= 12)
+ {
+ u -= 4;
+ i -= 4;
+ x = s + 8;
+ dig4(x, m);
+ }
+ else
+ dig4(s, m);
+ if (m < 1969 || m >= 3000)
+ break;
+ m -= 1900;
+ }
+ else if (i == 10)
+ {
+ x = s;
+ if (!dig2(x, m) || m > 12 || !dig2(x, m) || m > 31 || dig2(x, m) > 24 || dig2(x, m) > 60 || dig2(x, m) <= 60 && !(tm_info.flags & TM_DATESTYLE))
+ dig2(s, m);
+ else
+ {
+ u -= 2;
+ i -= 2;
+ x = s + 8;
+ dig2(x, m);
+ }
+ if (m < TM_WINDOW)
+ m += 100;
+ }
+ else
+ m = tm->tm_year;
+ if ((u - s) < 8)
+ l = tm->tm_mon + 1;
+ else if (dig2(s, l) <= 0 || l > 12)
+ break;
+ else
+ flags |= MONTH;
+ if ((u - s) < 6)
+ k = tm->tm_mday;
+ else if (dig2(s, k) < 1 || k > 31)
+ break;
+ else
+ flags |= DAY;
+ if ((u - s) < 4)
+ break;
+ if (dig2(s, j) > 24)
+ break;
+ if (dig2(s, i) > 59)
+ break;
+ flags |= HOUR|MINUTE;
+ if ((u - s) == 2)
+ {
+ dig2(s, n);
+ flags |= SECOND;
}
+ else if (u - s)
+ break;
+ else if (*t != '.')
+ n = 0;
+ else
+ {
+ n = strtol(t + 1, &t, 10);
+ flags |= SECOND;
+ if (*t == '.')
+ {
+ q = 1000000000;
+ while (isdigit(*++t))
+ p += (*t - '0') * (q /= 10);
+ set |= NSEC;
+ }
+ }
+ if (n > (59 + TM_MAXLEAP))
+ break;
}
- if (n > (59 + TM_MAXLEAP))
- break;
+ save:
+ tm->tm_hour = j;
+ tm->tm_min = i;
+ tm->tm_sec = n;
+ tm->tm_nsec = p;
+ save_yymmdd:
+ tm->tm_mday = k;
+ save_yymm:
+ tm->tm_mon = l - 1;
+ tm->tm_year = m;
+ s = t;
+ set |= flags;
+ continue;
}
- save:
- tm->tm_hour = j;
- tm->tm_min = i;
- tm->tm_sec = n;
- tm->tm_nsec = p;
- save_yymmdd:
- tm->tm_mday = k;
- save_yymm:
- tm->tm_mon = l - 1;
- tm->tm_year = m;
- s = t;
- set |= flags;
- continue;
- }
- for (s = t; skip[*s]; s++);
- if (*s == ':' || *s == '.' && ((set|state) & (YEAR|MONTH|DAY|HOUR)) == (YEAR|MONTH|DAY))
- {
- c = *s;
- if ((state & HOUR) || n > 24)
- break;
- while (isspace(*++s) || *s == '_');
- if (!isdigit(*s))
- break;
- i = n;
- n = strtol(s, &t, 10);
- for (s = t; isspace(*s) || *s == '_'; s++);
- if (n > 59)
- break;
- j = n;
- m = 0;
- if (*s == c)
+ for (s = t; skip[*s]; s++);
+ message((-1, "AHA#%d s=\"%s\"", __LINE__, s));
+ if (*s == ':' || *s == '.' && ((set|state) & (YEAR|MONTH|DAY|HOUR)) == (YEAR|MONTH|DAY))
{
+ c = *s;
+ if ((state & HOUR) || n > 24)
+ break;
while (isspace(*++s) || *s == '_');
if (!isdigit(*s))
break;
+ i = n;
n = strtol(s, &t, 10);
- s = t;
- if (n > (59 + TM_MAXLEAP))
+ for (s = t; isspace(*s) || *s == '_'; s++);
+ if (n > 59)
break;
- set |= SECOND;
- while (isspace(*s))
- s++;
- if (*s == '.')
- {
- q = 1000000000;
- while (isdigit(*++s))
- m += (*s - '0') * (q /= 10);
- set |= NSEC;
- }
- }
- else
- n = 0;
- set |= HOUR|MINUTE;
- skip[':'] = 1;
- k = tm->tm_hour;
- tm->tm_hour = i;
- l = tm->tm_min;
- tm->tm_min = j;
- tm->tm_sec = n;
- tm->tm_nsec = m;
- while (isspace(*s))
- s++;
- switch (tmlex(s, &t, tm_info.format, TM_NFORM, tm_info.format + TM_MERIDIAN, 2))
- {
- case TM_MERIDIAN:
- s = t;
- if (i == 12)
- tm->tm_hour = i = 0;
- break;
- case TM_MERIDIAN+1:
- if (i < 12)
- tm->tm_hour = i += 12;
- break;
- }
- if (f >= 0 || (state & (LAST|NEXT)))
- {
- message((-1, "AHA#%d f=%d i=%d j=%d k=%d l=%d", __LINE__, f, i, j, k, l));
- state &= ~HOLD;
- if (f < 0)
+ j = n;
+ m = 0;
+ if (*s == c)
{
- if (state & LAST)
- f = -1;
- else if (state & NEXT)
- f = 1;
- else
- f = 0;
+ while (isspace(*++s) || *s == '_');
+ if (!isdigit(*s))
+ break;
+ n = strtol(s, &t, 10);
+ s = t;
+ if (n > (59 + TM_MAXLEAP))
+ break;
+ set |= SECOND;
+ while (isspace(*s))
+ s++;
+ if (*s == '.')
+ {
+ q = 1000000000;
+ while (isdigit(*++s))
+ m += (*s - '0') * (q /= 10);
+ set |= NSEC;
+ }
}
- if (f > 0)
+ else
+ n = 0;
+ set |= HOUR|MINUTE;
+ skip[':'] = 1;
+ k = tm->tm_hour;
+ tm->tm_hour = i;
+ l = tm->tm_min;
+ tm->tm_min = j;
+ tm->tm_sec = n;
+ tm->tm_nsec = m;
+ while (isspace(*s))
+ s++;
+ switch (tmlex(s, &t, tm_info.format, TM_NFORM, tm_info.format + TM_MERIDIAN, 2))
{
- if (i > k || i == k && j > l)
- f--;
+ case TM_MERIDIAN:
+ s = t;
+ if (i == 12)
+ tm->tm_hour = i = 0;
+ break;
+ case TM_MERIDIAN+1:
+ if (i < 12)
+ tm->tm_hour = i += 12;
+ break;
}
- else if (i < k || i == k && j < l)
- f++;
- if (f > 0)
+ if (f >= 0 || (state & (LAST|NEXT)))
{
- tm->tm_hour += f * 24;
- while (tm->tm_hour >= 24)
+ message((-1, "AHA#%d f=%d i=%d j=%d k=%d l=%d", __LINE__, f, i, j, k, l));
+ state &= ~HOLD;
+ if (f < 0)
{
- tm->tm_hour -= 24;
- tm->tm_mday++;
+ if (state & LAST)
+ f = -1;
+ else if (state & NEXT)
+ f = 1;
+ else
+ f = 0;
}
- }
- else if (f < 0)
- {
- tm->tm_hour += f * 24;
- while (tm->tm_hour < 24)
+ if (f > 0)
{
- tm->tm_hour += 24;
- tm->tm_mday--;
+ if (i > k || i == k && j > l)
+ f--;
+ }
+ else if (i < k || i == k && j < l)
+ f++;
+ if (f > 0)
+ {
+ tm->tm_hour += f * 24;
+ while (tm->tm_hour >= 24)
+ {
+ tm->tm_hour -= 24;
+ tm->tm_mday++;
+ }
+ }
+ else if (f < 0)
+ {
+ tm->tm_hour += f * 24;
+ while (tm->tm_hour < 24)
+ {
+ tm->tm_hour += 24;
+ tm->tm_mday--;
+ }
}
}
+ continue;
}
- continue;
}
}
}
for (;;)
{
+ message((-1, "AHA#%d s=\"%s\"", __LINE__, s));
if (*s == '-' || *s == '+')
{
if (((set|state) & (MONTH|DAY|HOUR|MINUTE)) == (MONTH|DAY|HOUR|MINUTE) || *s == '+' && (!isdigit(s[1]) || !isdigit(s[2]) || s[3] != ':' && (s[3] != '.' || ((set|state) & (YEAR|MONTH)) != (YEAR|MONTH))))
@@ -1080,6 +1092,7 @@ tmxdate(register const char* s, char** e, Time_t now)
{
x = s;
q = *s++;
+ message((-1, "AHA#%d n=%d q='%c'", __LINE__, n, q));
if (isalpha(*s))
{
q <<= 8;
@@ -1182,9 +1195,9 @@ tmxdate(register const char* s, char** e, Time_t now)
}
s = x;
}
- if (n < 1000)
+ if ((j = tmlex(s, &t, tm_info.format, TM_NFORM, tm_info.format + TM_SUFFIXES, TM_PARTS - TM_SUFFIXES)) >= 0)
{
- if ((j = tmlex(s, &t, tm_info.format, TM_NFORM, tm_info.format + TM_SUFFIXES, TM_PARTS - TM_SUFFIXES)) >= 0)
+ if (tm_data.lex[j] == TM_PARTS || n < 1000)
{
s = t;
switch (tm_data.lex[j])
@@ -1527,6 +1540,9 @@ tmxdate(register const char* s, char** e, Time_t now)
continue;
}
}
+ }
+ if (n < 1000)
+ {
if (!(state & ZONE) && (zp = tmzone(s, &t, type, &dst)))
{
s = t;
diff --git a/usr/src/lib/libast/common/tm/tmxduration.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxduration.c
index 64483c4f0c..eb456a9e09 100644
--- a/usr/src/lib/libast/common/tm/tmxduration.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxduration.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxfmt.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxfmt.c
index 25e283de26..2010c08040 100644
--- a/usr/src/lib/libast/common/tm/tmxfmt.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxfmt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -268,14 +268,11 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
case 'D': /* date */
p = tm_info.format[TM_DATE];
goto push;
- case 'E': /* OBSOLETE no pad day of month */
- cp = number(cp, ep, (long)tm->tm_mday, 0, width, pad);
- continue;
case 'e': /* blank padded day of month */
cp = number(cp, ep, (long)tm->tm_mday, -2, width, pad);
continue;
- case 'f': /* TM_DEFAULT override */
- p = tm_info.deformat;
+ case 'f': /* (AST) OBSOLETE use %Qf */
+ p = "%Qf";
goto push;
case 'F': /* ISO 8601:2000 standard date format */
p = "%Y-%m-%d";
@@ -305,24 +302,24 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
case 'H': /* hour (0 - 23) */
cp = number(cp, ep, (long)tm->tm_hour, 2, width, pad);
continue;
- case 'i': /* international `date(1)' date */
- p = tm_info.format[TM_INTERNATIONAL];
+ case 'i': /* (AST) OBSOLETE use %QI */
+ p = "%QI";
goto push;
case 'I': /* hour (0 - 12) */
if ((n = tm->tm_hour) > 12) n -= 12;
else if (n == 0) n = 12;
cp = number(cp, ep, (long)n, 2, width, pad);
continue;
- case 'J': /* Julian date (0 offset) */
- cp = number(cp, ep, (long)tm->tm_yday, 3, width, pad);
- continue;
case 'j': /* Julian date (1 offset) */
cp = number(cp, ep, (long)(tm->tm_yday + 1), 3, width, pad);
continue;
- case 'k': /* `date(1)' date */
- p = tm_info.format[TM_DATE_1];
+ case 'J': /* Julian date (0 offset) */
+ cp = number(cp, ep, (long)tm->tm_yday, 3, width, pad);
+ continue;
+ case 'k': /* (AST) OBSOLETE use %QD */
+ p = "%QD";
goto push;
- case 'K':
+ case 'K': /* (AST) largest to smallest */
switch (alt)
{
case 'E':
@@ -336,21 +333,11 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
break;
}
goto push;
- case 'l': /* `ls -l' date */
- if (t)
- {
- now = tmxgettime();
- if (warped(t, now))
- {
- p = tm_info.format[TM_DISTANT];
- goto push;
- }
- }
- p = tm_info.format[TM_RECENT];
+ case 'l': /* (AST) OBSOLETE use %QL */
+ p = "%QL";
goto push;
- case 'L': /* TM_DEFAULT */
- case 'O': /* OBSOLETE */
- p = tm_info.format[TM_DEFAULT];
+ case 'L': /* (AST) OBSOLETE use %Ql */
+ p = "%Ql";
goto push;
case 'm': /* month number */
cp = number(cp, ep, (long)(tm->tm_mon + 1), 2, width, pad);
@@ -362,30 +349,25 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
if (cp < ep)
*cp++ = '\n';
continue;
- case 'N': /* nanosecond part */
+ case 'N': /* (AST|GNU) nanosecond part */
cp = number(cp, ep, (long)tm->tm_nsec, 9, width, pad);
continue;
- case 'o': /* set options */
- if (arg)
- goto options;
- /*OBSOLETE*/
- p = tm_info.deformat;
- goto push;
+#if 0
+ case 'o': /* (UNUSED) */
+ continue;
+#endif
case 'p': /* meridian */
n = TM_MERIDIAN + (tm->tm_hour >= 12);
goto index;
- case 'q': /* time zone type (nation code) */
- if (!(flags & TM_UTC))
- {
- if ((zp = tm->tm_zone) != tm_info.local)
- for (; zp >= tm_data.zone; zp--)
- if (p = zp->type)
- goto string;
- else if (p = zp->type)
- goto string;
- }
+ case 'P': /* (AST|GNU) lower case meridian */
+ p = tm_info.format[TM_MERIDIAN + (tm->tm_hour >= 12)];
+ while (cp < ep && (n = *p++))
+ *cp++ = isupper(n) ? tolower(n) : n;
continue;
- case 'Q': /* %Q<alpha> or %Q<delim>recent<delim>distant<delim> */
+ case 'q': /* (AST) OBSOLETE use %Qz */
+ p = "%Qz";
+ goto push;
+ case 'Q': /* (AST) %Q<alpha> or %Q<delim>recent<delim>distant<delim> */
if (c = *format)
{
format++;
@@ -396,9 +378,107 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
case 'd': /* `ls -l' distant date */
p = tm_info.format[TM_DISTANT];
goto push;
+ case 'D': /* `date(1)' date */
+ p = tm_info.format[TM_DATE_1];
+ goto push;
+ case 'f': /* TM_DEFAULT override */
+ p = tm_info.deformat;
+ goto push;
+ case 'I': /* international `date(1)' date */
+ p = tm_info.format[TM_INTERNATIONAL];
+ goto push;
+ case 'l': /* TM_DEFAULT */
+ p = tm_info.format[TM_DEFAULT];
+ goto push;
+ case 'L': /* `ls -l' date */
+ if (t)
+ {
+ now = tmxgettime();
+ if (warped(t, now))
+ {
+ p = tm_info.format[TM_DISTANT];
+ goto push;
+ }
+ }
+ p = tm_info.format[TM_RECENT];
+ goto push;
+ case 'o': /* set options ( %([+-]flag...)o ) */
+ if (arg)
+ {
+ c = '+';
+ i = 0;
+ for (;;)
+ {
+ switch (*arg++)
+ {
+ case 0:
+ n = 0;
+ break;
+ case '=':
+ i = !i;
+ continue;
+ case '+':
+ case '-':
+ case '!':
+ c = *(arg - 1);
+ continue;
+ case 'l':
+ n = TM_LEAP;
+ break;
+ case 'n':
+ case 's':
+ n = TM_SUBSECOND;
+ break;
+ case 'u':
+ n = TM_UTC;
+ break;
+ default:
+ continue;
+ }
+ if (!n)
+ break;
+
+ /*
+ * right, the global state stinks
+ * but we respect its locale-like status
+ */
+
+ if (c == '+')
+ {
+ if (!(flags & n))
+ {
+ flags |= n;
+ tm_info.flags |= n;
+ tm = tmxtm(tm, t, (flags & TM_UTC) ? &tm_data.zone[2] : tm->tm_zone);
+ if (!i)
+ tm_info.flags &= ~n;
+ }
+ }
+ else if (flags & n)
+ {
+ flags &= ~n;
+ tm_info.flags &= ~n;
+ tm = tmxtm(tm, t, (flags & TM_UTC) ? &tm_data.zone[2] : tm->tm_zone);
+ if (!i)
+ tm_info.flags |= n;
+ }
+ }
+ }
+ break;
case 'r': /* `ls -l' recent date */
p = tm_info.format[TM_RECENT];
goto push;
+ case 'z': /* time zone nation code */
+ if (!(flags & TM_UTC))
+ {
+ if ((zp = tm->tm_zone) != tm_info.local)
+ for (; zp >= tm_data.zone; zp--)
+ if (p = zp->type)
+ goto string;
+ else if (p = zp->type)
+ goto string;
+ }
+ break;
default:
format--;
break;
@@ -434,7 +514,7 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
case 'R':
p = "%H:%M";
goto push;
- case 's': /* seconds[.nanoseconds] since the epoch */
+ case 's': /* (DEFACTO) seconds[.nanoseconds] since the epoch */
case '#':
now = t;
f = fmt;
@@ -476,6 +556,10 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
case 'U': /* week number, Sunday as first day */
cp = number(cp, ep, (long)tmweek(tm, 0, -1, -1), 2, width, pad);
continue;
+#if 0
+ case 'v': /* (UNUSED) */
+ continue;
+#endif
case 'V': /* ISO week number */
cp = number(cp, ep, (long)tmweek(tm, 2, -1, -1), 2, width, pad);
continue;
@@ -505,7 +589,7 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
continue;
}
if ((ep - cp) >= 16)
- cp = tmpoff(cp, ep - cp, "", (flags & TM_UTC) ? 0 : tm->tm_zone->west + (tm->tm_isdst ? tm->tm_zone->dst : 0), 24 * 60);
+ cp = tmpoff(cp, ep - cp, "", (flags & TM_UTC) ? 0 : tm->tm_zone->west + (tm->tm_isdst ? tm->tm_zone->dst : 0), pad == '_' ? -24 * 60 : 24 * 60);
continue;
case 'Z': /* time zone */
if (arg)
@@ -516,11 +600,7 @@ tmxfmt(char* buf, size_t len, const char* format, Time_t t)
}
p = (flags & TM_UTC) ? tm_info.format[TM_UT] : tm->tm_isdst && tm->tm_zone->daylight ? tm->tm_zone->daylight : tm->tm_zone->standard;
goto string;
- case '+': /* old %+flag */
- case '!': /* old %!flag */
- format--;
- /*FALLTHROUGH*/
- case '=': /* old %=[=][+-]flag */
+ case '=': /* (AST) OBSOLETE use %([+-]flag...)Qo (old %=[=][+-]flag) */
for (arg = argbuf; *format == '=' || *format == '-' || *format == '+' || *format == '!'; format++)
if (arg < &argbuf[sizeof(argbuf) - 2])
*arg++ = *format;
diff --git a/usr/src/lib/libast/common/tm/tmxgettime.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxgettime.c
index f60ba74083..7ce13f35ce 100644
--- a/usr/src/lib/libast/common/tm/tmxgettime.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxgettime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxleap.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxleap.c
index fb4a9fcf96..ce07c5a29e 100644
--- a/usr/src/lib/libast/common/tm/tmxleap.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxleap.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxmake.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxmake.c
index 921994fcbe..a985633982 100644
--- a/usr/src/lib/libast/common/tm/tmxmake.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxmake.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxscan.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxscan.c
index 86b0d83c69..8c0de8ea6b 100644
--- a/usr/src/lib/libast/common/tm/tmxscan.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxscan.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxsettime.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxsettime.c
index e8cede89d5..90bee750a1 100644
--- a/usr/src/lib/libast/common/tm/tmxsettime.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxsettime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxsleep.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxsleep.c
index fda46af055..9de8f9adaa 100644
--- a/usr/src/lib/libast/common/tm/tmxsleep.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxsleep.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxtime.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxtime.c
index fdbaed85e9..6951f8a437 100644
--- a/usr/src/lib/libast/common/tm/tmxtime.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxtime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmxtouch.c b/usr/src/contrib/ast/src/lib/libast/tm/tmxtouch.c
index f1dfab1f81..e711a623cf 100644
--- a/usr/src/lib/libast/common/tm/tmxtouch.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmxtouch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tmzone.c b/usr/src/contrib/ast/src/lib/libast/tm/tmzone.c
index 30cac0e37e..230a5f3ebf 100644
--- a/usr/src/lib/libast/common/tm/tmzone.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tmzone.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -58,7 +58,7 @@ tmzone(register const char* name, char** end, const char* type, int* dst)
tmset(tm_info.zone);
if ((*name == '+' || *name == '-') && (fixed.west = tmgoff(name, &e, TM_LOCALZONE)) != TM_LOCALZONE && !*e)
{
- fixed.standard = fixed.daylight = strncpy(off, name, sizeof(off) - 1);
+ strlcpy(fixed.standard = fixed.daylight = off, name, sizeof(off));
if (end)
*end = e;
if (dst)
diff --git a/usr/src/lib/libast/common/tm/tvcmp.c b/usr/src/contrib/ast/src/lib/libast/tm/tvcmp.c
index c955e0f064..2716d3d93d 100644
--- a/usr/src/lib/libast/common/tm/tvcmp.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tvcmp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,15 +32,15 @@ int
tvcmp(register const Tv_t* a, register const Tv_t* b)
{
if (a->tv_sec < b->tv_sec)
- return 1;
- if (a->tv_sec > b->tv_sec)
return -1;
+ if (a->tv_sec > b->tv_sec)
+ return 1;
if (a->tv_nsec != TV_NSEC_IGNORE && b->tv_nsec != TV_NSEC_IGNORE)
{
if (a->tv_nsec < b->tv_nsec)
- return 1;
- if (a->tv_nsec > b->tv_nsec)
return -1;
+ if (a->tv_nsec > b->tv_nsec)
+ return 1;
}
return 0;
}
diff --git a/usr/src/lib/libast/common/tm/tvgettime.c b/usr/src/contrib/ast/src/lib/libast/tm/tvgettime.c
index dc6cfabefa..12866e3098 100644
--- a/usr/src/lib/libast/common/tm/tvgettime.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tvgettime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tvsettime.c b/usr/src/contrib/ast/src/lib/libast/tm/tvsettime.c
index cff60a05b7..4e3842b7ea 100644
--- a/usr/src/lib/libast/common/tm/tvsettime.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tvsettime.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/tm/tvsleep.c b/usr/src/contrib/ast/src/lib/libast/tm/tvsleep.c
index 7ada03eacb..bd38500a4a 100644
--- a/usr/src/lib/libast/common/tm/tvsleep.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tvsleep.c
@@ -45,4 +45,4 @@ int tvsleep(const Tv_t *tv, Tv_t *rv) {
rv->tv_nsec = srv.tv_nsec;
}
return r;
-}
+ }
diff --git a/usr/src/lib/libast/common/tm/tvtouch.c b/usr/src/contrib/ast/src/lib/libast/tm/tvtouch.c
index 58f6bcfc00..7a8567fe07 100644
--- a/usr/src/lib/libast/common/tm/tvtouch.c
+++ b/usr/src/contrib/ast/src/lib/libast/tm/tvtouch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -147,7 +147,7 @@ tvtouch(const char* path, register const Tv_t* av, register const Tv_t* mv, cons
return -1;
umask(mode = umask(0));
mode = (~mode) & (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
- if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)) < 0)
+ if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_cloexec, mode)) < 0)
return -1;
close(fd);
errno = oerrno;
@@ -251,7 +251,7 @@ tvtouch(const char* path, register const Tv_t* av, register const Tv_t* mv, cons
errno = EINVAL;
return -1;
}
- if ((fd = open(path, O_RDWR)) >= 0)
+ if ((fd = open(path, O_RDWR|O_cloexec)) >= 0)
{
char c;
@@ -271,14 +271,14 @@ tvtouch(const char* path, register const Tv_t* av, register const Tv_t* mv, cons
return -1;
umask(mode = umask(0));
mode = (~mode) & (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
- if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)) < 0)
+ if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC|O_cloexec, mode)) < 0)
return -1;
close(fd);
errno = oerrno;
if (av == (const Tv_t*)&now && mv == (const Tv_t*)&now)
return 0;
#if _lib_utimets
- return utimets(path, am);
+ return utimets(path, ts);
#else
#if _lib_utimes
return utimes(path, am);
diff --git a/usr/src/lib/libast/common/uwin/a64l.c b/usr/src/contrib/ast/src/lib/libast/uwin/a64l.c
index dd6ea1da01..20416c6acc 100644
--- a/usr/src/lib/libast/common/uwin/a64l.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/a64l.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/uwin/acosh.c b/usr/src/contrib/ast/src/lib/libast/uwin/acosh.c
index 9248e915de..9248e915de 100644
--- a/usr/src/lib/libast/common/uwin/acosh.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/acosh.c
diff --git a/usr/src/lib/libast/common/uwin/asinh.c b/usr/src/contrib/ast/src/lib/libast/uwin/asinh.c
index 6c8f54cabc..6c8f54cabc 100644
--- a/usr/src/lib/libast/common/uwin/asinh.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/asinh.c
diff --git a/usr/src/lib/libast/common/uwin/atanh.c b/usr/src/contrib/ast/src/lib/libast/uwin/atanh.c
index b5e9a78b94..b5e9a78b94 100644
--- a/usr/src/lib/libast/common/uwin/atanh.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/atanh.c
diff --git a/usr/src/lib/libast/common/uwin/cbrt.c b/usr/src/contrib/ast/src/lib/libast/uwin/cbrt.c
index 14f21b5868..f28d337b4d 100644
--- a/usr/src/lib/libast/common/uwin/cbrt.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/cbrt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/uwin/crypt.c b/usr/src/contrib/ast/src/lib/libast/uwin/crypt.c
index 5d9569e053..5d9569e053 100644
--- a/usr/src/lib/libast/common/uwin/crypt.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/crypt.c
diff --git a/usr/src/lib/libast/common/uwin/erf.c b/usr/src/contrib/ast/src/lib/libast/uwin/erf.c
index 4a61f78658..4a61f78658 100644
--- a/usr/src/lib/libast/common/uwin/erf.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/erf.c
diff --git a/usr/src/lib/libast/common/uwin/err.c b/usr/src/contrib/ast/src/lib/libast/uwin/err.c
index dd972a7013..123a64eddf 100644
--- a/usr/src/lib/libast/common/uwin/err.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/err.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/uwin/exp.c b/usr/src/contrib/ast/src/lib/libast/uwin/exp.c
index d1e15bda15..d1e15bda15 100644
--- a/usr/src/lib/libast/common/uwin/exp.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/exp.c
diff --git a/usr/src/lib/libast/common/uwin/exp__E.c b/usr/src/contrib/ast/src/lib/libast/uwin/exp__E.c
index 5c131a8e40..5c131a8e40 100644
--- a/usr/src/lib/libast/common/uwin/exp__E.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/exp__E.c
diff --git a/usr/src/lib/libast/common/uwin/expm1.c b/usr/src/contrib/ast/src/lib/libast/uwin/expm1.c
index 1e7f694b35..1e7f694b35 100644
--- a/usr/src/lib/libast/common/uwin/expm1.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/expm1.c
diff --git a/usr/src/lib/libast/common/uwin/gamma.c b/usr/src/contrib/ast/src/lib/libast/uwin/gamma.c
index 0cb1d1fac9..0cb1d1fac9 100644
--- a/usr/src/lib/libast/common/uwin/gamma.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/gamma.c
diff --git a/usr/src/lib/libast/common/uwin/getpass.c b/usr/src/contrib/ast/src/lib/libast/uwin/getpass.c
index 06179793e6..bb65996d4a 100644
--- a/usr/src/lib/libast/common/uwin/getpass.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/getpass.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/uwin/lgamma.c b/usr/src/contrib/ast/src/lib/libast/uwin/lgamma.c
index d37357d35f..d37357d35f 100644
--- a/usr/src/lib/libast/common/uwin/lgamma.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/lgamma.c
diff --git a/usr/src/lib/libast/common/uwin/log.c b/usr/src/contrib/ast/src/lib/libast/uwin/log.c
index e9365a3363..e9365a3363 100644
--- a/usr/src/lib/libast/common/uwin/log.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/log.c
diff --git a/usr/src/lib/libast/common/uwin/log1p.c b/usr/src/contrib/ast/src/lib/libast/uwin/log1p.c
index 1fad21f312..1fad21f312 100644
--- a/usr/src/lib/libast/common/uwin/log1p.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/log1p.c
diff --git a/usr/src/lib/libast/common/uwin/log__L.c b/usr/src/contrib/ast/src/lib/libast/uwin/log__L.c
index 3276e694bc..3276e694bc 100644
--- a/usr/src/lib/libast/common/uwin/log__L.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/log__L.c
diff --git a/usr/src/contrib/ast/src/lib/libast/uwin/mathimpl.h b/usr/src/contrib/ast/src/lib/libast/uwin/mathimpl.h
new file mode 100644
index 0000000000..12857f0b29
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/mathimpl.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 1988, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)mathimpl.h 8.1 (Berkeley) 6/4/93
+ */
+
+#include <sys/cdefs.h>
+#include <math.h>
+
+#if defined(vax)||defined(tahoe)
+
+/* Deal with different ways to concatenate in cpp */
+# ifdef __STDC__
+# define cat3(a,b,c) a ## b ## c
+# else
+# define cat3(a,b,c) a/**/b/**/c
+# endif
+
+/* Deal with vax/tahoe byte order issues */
+# ifdef vax
+# define cat3t(a,b,c) cat3(a,b,c)
+# else
+# define cat3t(a,b,c) cat3(a,c,b)
+# endif
+
+# define vccast(name) (*(const double *)(cat3(name,,x)))
+
+ /*
+ * Define a constant to high precision on a Vax or Tahoe.
+ *
+ * Args are the name to define, the decimal floating point value,
+ * four 16-bit chunks of the float value in hex
+ * (because the vax and tahoe differ in float format!), the power
+ * of 2 of the hex-float exponent, and the hex-float mantissa.
+ * Most of these arguments are not used at compile time; they are
+ * used in a post-check to make sure the constants were compiled
+ * correctly.
+ *
+ * People who want to use the constant will have to do their own
+ * #define foo vccast(foo)
+ * since CPP cannot do this for them from inside another macro (sigh).
+ * We define "vccast" if this needs doing.
+ */
+# define vc(name, value, x1,x2,x3,x4, bexp, xval) \
+ const static long cat3(name,,x)[] = {cat3t(0x,x1,x2), cat3t(0x,x3,x4)};
+
+# define ic(name, value, bexp, xval) ;
+
+#else /* vax or tahoe */
+
+ /* Hooray, we have an IEEE machine */
+# undef vccast
+# define vc(name, value, x1,x2,x3,x4, bexp, xval) ;
+
+# define ic(name, value, bexp, xval) \
+ const static double name = value;
+
+#endif /* defined(vax)||defined(tahoe) */
+
+
+/*
+ * Functions internal to the math package, yet not static.
+ */
+extern double __exp__E();
+extern double __log__L();
+
+struct Double {double a, b;};
+double __exp__D __P((double, double));
+struct Double __log__D __P((double));
+
+/*
+ * All externs exported after this point
+ */
+#if defined(_BLD_ast) && defined(__EXPORT__)
+#define extern __EXPORT__
+#endif
+
+extern double copysign(double, double);
diff --git a/usr/src/contrib/ast/src/lib/libast/uwin/mini.sym b/usr/src/contrib/ast/src/lib/libast/uwin/mini.sym
new file mode 100644
index 0000000000..3a75e548c9
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/mini.sym
@@ -0,0 +1,84 @@
+_ast_init
+_sfdlen
+_sffilbuf
+_sfflsbuf
+_sfgetl
+_sfgetl2
+_sfgetu
+_sfgetu2
+_sfllen
+_sfputd
+_sfputl
+_sfputu
+_stdgets
+_stdscanf
+_stdsprintf
+_stkseek
+printf
+remove
+sfclose
+sfclrerr
+sfclrlock
+sfdisc
+sfdlen
+sfdostext
+sfeof
+sferror
+sffcvt
+sffileno
+sfgetc
+sfgetd
+sfgetl
+sfgetr
+sfgetu
+sfkeyprintf
+sfllen
+sfmove
+sfnew
+sfnotify
+sfnputc
+sfopen
+sfpkrd
+sfpoll
+sfpool
+sfpopen
+sfprintf
+sfprints
+sfpurge
+sfputc
+sfputd
+sfputl
+sfputr
+sfputu
+sfrd
+sfread
+sfreserve
+sfscanf
+sfseek
+sfset
+sfsetbuf
+sfsetfd
+sfsize
+sfsk
+sfslen
+sfslowio
+sfsprintf
+sfsscanf
+sfstack
+sfstacked
+sfswap
+sfsync
+sftell
+sftmp
+sfulen
+sfungetc
+sfvalue
+sfvprintf
+sfvscanf
+sfwr
+sfwrite
+sigflag
+sprintf
+system
+mktemp
+strdup
diff --git a/usr/src/lib/libast/common/uwin/rand48.c b/usr/src/contrib/ast/src/lib/libast/uwin/rand48.c
index e0d96254a2..184a3b7f45 100644
--- a/usr/src/lib/libast/common/uwin/rand48.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/rand48.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/uwin/random.c b/usr/src/contrib/ast/src/lib/libast/uwin/random.c
index 6b46d631d9..6b46d631d9 100644
--- a/usr/src/lib/libast/common/uwin/random.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/random.c
diff --git a/usr/src/lib/libast/common/uwin/rcmd.c b/usr/src/contrib/ast/src/lib/libast/uwin/rcmd.c
index af296840f6..af296840f6 100644
--- a/usr/src/lib/libast/common/uwin/rcmd.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/rcmd.c
diff --git a/usr/src/lib/libast/common/uwin/rint.c b/usr/src/contrib/ast/src/lib/libast/uwin/rint.c
index f883f794e8..9c8801145b 100644
--- a/usr/src/lib/libast/common/uwin/rint.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/rint.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libast/uwin/rlib.h b/usr/src/contrib/ast/src/lib/libast/uwin/rlib.h
new file mode 100644
index 0000000000..bb9738b501
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/rlib.h
@@ -0,0 +1,80 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#include <ast_std.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <ctype.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+
+#if 0
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+#include <net/if.h>
+#include <linux/sockios.h>
+#endif
+
+#ifndef sigmask
+#define sigmask(n) ((unsigned long)1 << ((n) - 1))
+#endif
+
+extern void _sethtent(int f);
+extern void _endhtent(void);
+extern struct hostent *_gethtent(void);
+extern struct hostent *_gethtbyname(const char *name);
+extern struct hostent *_gethtbyaddr(const char *addr, int len,
+ int type);
+extern int _validuser(FILE *hostf, const char *rhost,
+ const char *luser, const char *ruser, int baselen);
+extern int _checkhost(const char *rhost, const char *lhost, int len);
+
+#if 0
+extern void putlong(u_long l, u_char *msgp);
+extern void putshort(u_short l, u_char *msgp);
+extern u_int32_t _getlong(register const u_char *msgp);
+extern u_int16_t _getshort(register const u_char *msgp);
+extern void p_query(char *msg);
+extern void fp_query(char *msg, FILE *file);
+extern char *p_cdname(char *cp, char *msg, FILE *file);
+extern char *p_rr(char *cp, char *msg, FILE *file);
+extern char *p_type(int type);
+extern char * p_class(int class);
+extern char *p_time(u_long value);
+#endif
+
+extern char * hostalias(const char *name);
+extern void sethostfile(char *name);
+extern void _res_close (void);
+extern void ruserpass(const char *host, char **aname, char **apass);
+extern char* index(const char*, int);
+extern int strcasecmp(const char*, const char*);
+extern void bcopy(const void*, void*, size_t);
diff --git a/usr/src/lib/libast/common/uwin/support.c b/usr/src/contrib/ast/src/lib/libast/uwin/support.c
index 769444e358..769444e358 100644
--- a/usr/src/lib/libast/common/uwin/support.c
+++ b/usr/src/contrib/ast/src/lib/libast/uwin/support.c
diff --git a/usr/src/lib/libast/common/vec/vecargs.c b/usr/src/contrib/ast/src/lib/libast/vec/vecargs.c
index 25bf6fc286..421ade0e8c 100644
--- a/usr/src/lib/libast/common/vec/vecargs.c
+++ b/usr/src/contrib/ast/src/lib/libast/vec/vecargs.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/vec/vecfile.c b/usr/src/contrib/ast/src/lib/libast/vec/vecfile.c
index 9b8492d030..499b29aacb 100644
--- a/usr/src/lib/libast/common/vec/vecfile.c
+++ b/usr/src/contrib/ast/src/lib/libast/vec/vecfile.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -45,7 +45,7 @@ vecfile(const char* file)
struct stat st;
vec = 0;
- if ((fd = open(file, O_RDONLY)) >= 0)
+ if ((fd = open(file, O_RDONLY|O_cloexec)) >= 0)
{
if (!fstat(fd, &st) && S_ISREG(st.st_mode) && (n = st.st_size) > 0 && (buf = newof(0, char, n + 1, 0)))
{
diff --git a/usr/src/lib/libast/common/vec/vecfree.c b/usr/src/contrib/ast/src/lib/libast/vec/vecfree.c
index 46a6e793a8..12b3bc2787 100644
--- a/usr/src/lib/libast/common/vec/vecfree.c
+++ b/usr/src/contrib/ast/src/lib/libast/vec/vecfree.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/vec/vecload.c b/usr/src/contrib/ast/src/lib/libast/vec/vecload.c
index bdb3fffe8e..5f83470c16 100644
--- a/usr/src/lib/libast/common/vec/vecload.c
+++ b/usr/src/contrib/ast/src/lib/libast/vec/vecload.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/vec/vecstring.c b/usr/src/contrib/ast/src/lib/libast/vec/vecstring.c
index 9489d18c65..6aeac9ddc3 100644
--- a/usr/src/lib/libast/common/vec/vecstring.c
+++ b/usr/src/contrib/ast/src/lib/libast/vec/vecstring.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libast/common/vmalloc/malloc.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/malloc.c
index 84f61120ad..ae77a22127 100644
--- a/usr/src/lib/libast/common/vmalloc/malloc.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/malloc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -91,22 +91,24 @@ typedef struct ______mstats Mstats_t;
/* malloc compatibility functions
**
** These are aware of debugging/profiling and are driven by the
-** VMALLOC_OPTIONS environment variable which is a space-separated
-** list of [no]name[=value] options:
+** VMALLOC_OPTIONS environment variable which is a comma or space
+** separated list of [no]name[=value] options:
**
** abort if Vmregion==Vmdebug then VM_DBABORT is set,
-** otherwise _BLD_debug enabled assertions abort()
+** otherwise _BLD_DEBUG enabled assertions abort()
** on failure
+** break try sbrk() block allocator first
** check if Vmregion==Vmbest then the region is checked every op
+** free disable addfreelist()
+** keep disable free -- if code works with this enabled then it
+** probably accesses free'd data
** method=m sets Vmregion=m if not defined, m (Vm prefix optional)
** may be one of { best debug last profile }
-** mmap prefer mmap() over brk() for region allocation
+** mmap try mmap() block allocator first
** period=n sets Vmregion=Vmdebug if not defined, if
** Vmregion==Vmdebug the region is checked every n ops
** profile=f sets Vmregion=Vmprofile if not set, if
** Vmregion==Vmprofile then profile info printed to file f
-** region if Vmregion==Vmbest then block free verifies
-** that the block belongs to the region
** start=n sets Vmregion=Vmdebug if not defined, if
** Vmregion==Vmdebug region checking starts after n ops
** trace=f enables tracing to file f
@@ -120,7 +122,7 @@ typedef struct ______mstats Mstats_t;
** in a file name is replaced by the process ID.
**
** VMALLOC_OPTIONS combines the features of these previously used env vars:
-** { VMDEBUG VMETHOD VMPROFILE VMTRACE }
+** { VMCHECK VMDEBUG VMETHOD VMPROFILE VMTRACE }
**
** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
*/
@@ -154,6 +156,27 @@ static int _Vmpffd = -1;
#undef mstats
#undef realloc
#undef valloc
+
+#if _malloc_hook
+
+#include <malloc.h>
+
+#undef calloc
+#undef cfree
+#undef free
+#undef malloc
+#undef memalign
+#undef realloc
+
+#define calloc _ast_calloc
+#define cfree _ast_cfree
+#define free _ast_free
+#define malloc _ast_malloc
+#define memalign _ast_memalign
+#define realloc _ast_realloc
+
+#endif
+
#endif
#if _WINIX
@@ -244,6 +267,222 @@ static int vmflinit()
return 0;
}
+/* use multiple regions to reduce blocking by concurrent threads */
+#if _mem_mmap_anon || _mem_mmap_zero
+static Vmalloc_t *Region[64]; /* list of concurrent regions */
+static unsigned int Regmax = 64; /* max number of regions */
+#else
+static Vmalloc_t* Region[1]; /* list of concurrent regions */
+static unsigned int Regmax = 0;
+#endif
+static unsigned int Regnum = 0; /* current #concurrent regions */
+
+/* statistics */
+static unsigned int Regopen = 0; /* #allocation calls opened */
+static unsigned int Reglock = 0; /* #allocation calls locked */
+static unsigned int Regprobe = 0; /* #probes to find a region */
+
+int setregmax(int regmax)
+{
+ int oldmax = Regmax;
+
+ if(regmax >= Regnum && regmax <= sizeof(Region)/sizeof(Region[0]))
+ Regmax = regmax;
+
+ return oldmax;
+}
+
+/* return statistics */
+int _mallocstat(Vmstat_t* st)
+{
+ Vmstat_t vmst;
+ int k;
+
+ if(vmstat(Vmregion, st) < 0) /* add up all stats */
+ return -1;
+ for(k = 0; k < Regnum; ++k)
+ { if(!Region[k])
+ continue;
+ if(vmstat(Region[k], &vmst) < 0 )
+ return -1;
+ st->n_busy += vmst.n_busy;
+ st->n_free += vmst.n_free;
+ st->s_busy += vmst.s_busy;
+ st->s_free += vmst.s_free;
+ st->m_busy += vmst.m_busy;
+ st->m_free += vmst.m_free;
+ st->n_seg += vmst.n_seg;
+ st->extent += vmst.extent;
+ }
+
+ st->n_region = Regnum+1;
+ st->n_open = Regopen;
+ st->n_lock = Reglock;
+ st->n_probe = Regprobe;
+
+ return 0;
+}
+
+/* find the region that a block was allocated from */
+static Vmalloc_t* regionof(Void_t* addr)
+{
+ int k;
+
+#if USE_NATIVE
+#define CAUTIOUS 1
+#else
+#define CAUTIOUS 0
+#endif
+ if(CAUTIOUS || Vmregion->meth.meth != VM_MTBEST )
+ { /* addr will not be dereferenced here */
+ if(vmaddr(Vmregion,addr) == 0 )
+ return Vmregion;
+ for(k = 0; k < Regnum; ++k)
+ if(Region[k] && vmaddr(Region[k], addr) == 0 )
+ return Region[k];
+ return NIL(Vmalloc_t*);
+ }
+ else
+ { /* fast, but susceptible to bad data */
+ Vmdata_t *vd = SEG(BLOCK(addr))->vmdt;
+ if(Vmregion->data == vd )
+ return Vmregion;
+ for(k = 0; k < Regnum; ++k)
+ if(Region[k] && Region[k]->data == vd)
+ return Region[k];
+ return NIL(Vmalloc_t*);
+ }
+}
+
+/* manage a cache of free objects */
+typedef struct _regfree_s
+{ struct _regfree_s* next;
+} Regfree_t;
+static Regfree_t *Regfree;
+
+static void addfreelist(Regfree_t* data)
+{
+ unsigned int k;
+ Regfree_t *head;
+
+ for(k = 0;; ASOLOOP(k) )
+ { data->next = head = Regfree;
+ if(asocasptr(&Regfree, head, data) == (Void_t*)head )
+ return;
+ }
+}
+
+static void clrfreelist()
+{
+ Regfree_t *list, *next;
+ Vmalloc_t *vm;
+
+ if(!(list = Regfree) )
+ return; /* nothing to do */
+
+ if(asocasptr(&Regfree, list, NIL(Regfree_t*)) != list )
+ return; /* somebody else is doing it */
+
+ for(; list; list = next)
+ { next = list->next;
+ if(vm = regionof((Void_t*)list))
+ { if(asocasint(&vm->data->lock, 0, 1) == 0) /* can free this now */
+ { (void)(*vm->meth.freef)(vm, (Void_t*)list, 1);
+ vm->data->lock = 0;
+ }
+ else addfreelist(list); /* ah well, back in the queue */
+ }
+ }
+}
+
+/* get a suitable region to allocate from */
+typedef struct _regdisc_s
+{ Vmdisc_t disc;
+ char slop[64]; /* to absorb any extra data in Vmdcsystem */
+} Regdisc_t;
+
+static int regexcept(Vmalloc_t* vm, int type, Void_t* data, Vmdisc_t* disc)
+{
+ if(type == VM_OPEN)
+ { if(data) /* make vmopen allocate all memory using discipline */
+ *(Void_t**)data = data; /* just make it non-NULL */
+ return 0;
+ }
+ return 0;
+}
+
+static Vmalloc_t* getregion(int* local)
+{
+ Vmalloc_t *vm;
+ int p, pos;
+
+ static unsigned int Rand = 0xdeadbeef; /* a cheap prng */
+#define RAND() (Rand = Rand*16777617 + 3)
+
+ clrfreelist();
+
+ if(Regmax <= 0 )
+ { /* uni-process/thread */
+ *local = 1;
+ Vmregion->data->lock = 1;
+ return Vmregion;
+ }
+ else if(asocasint(&Vmregion->data->lock, 0, 1) == 0 )
+ { /* Vmregion is open, so use it */
+ *local = 1;
+ asoincint(&Regopen);
+ return Vmregion;
+ }
+
+ asoincint(&Regprobe); /* probe Region[] to find an open region */
+ if(Regnum == 0)
+ pos = 0;
+ else for(pos = p = RAND()%Regnum;; )
+ { if(Region[p] && asocasint(&Region[p]->data->lock, 0, 1) == 0 )
+ { *local = 1;
+ asoincint(&Regopen);
+ return Region[p];
+ }
+ if((p = (p+1)%Regnum) == pos )
+ break;
+ }
+
+ /* grab the next open slot for a new region */
+ while((p = Regnum) < Regmax)
+ if(asocasint(&Regnum, p, p+1) == p )
+ break;
+ if(p < Regmax) /* this slot is now ours */
+ { static Regdisc_t Regdisc;
+ if(!Regdisc.disc.exceptf) /* one time initialization */
+ { GETPAGESIZE(_Vmpagesize);
+ memcpy(&Regdisc, Vmdcsystem, Vmdcsystem->size);
+ Regdisc.disc.round = ROUND(_Vmpagesize, 64*1024);
+ Regdisc.disc.exceptf = regexcept;
+ }
+
+ /**/ASSERT(Region[p] == NIL(Vmalloc_t*));
+ if((vm = vmopen(&Regdisc.disc, Vmbest, VM_SHARE)) != NIL(Vmalloc_t*) )
+ { vm->data->lock = 1; /* lock new region now */
+ *local = 1;
+ asoincint(&Regopen);
+ return (Region[p] = vm);
+ }
+ else Region[p] = Vmregion; /* better than nothing */
+ }
+
+ /* must return something */
+ vm = Region[pos] ? Region[pos] : Vmregion;
+ if(asocasint(&vm->data->lock, 0, 1) == 0)
+ { *local = 1;
+ asoincint(&Regopen);
+ }
+ else
+ { *local = 0;
+ asoincint(&Reglock);
+ }
+ return vm;
+}
+
#if __STD_C
extern Void_t* calloc(reg size_t n_obj, reg size_t s_obj)
#else
@@ -252,8 +491,18 @@ reg size_t n_obj;
reg size_t s_obj;
#endif
{
+ Void_t *addr;
+ Vmalloc_t *vm;
+ int local = 0;
VMFLINIT();
- return VMRECORD((*Vmregion->meth.resizef)(Vmregion,NIL(Void_t*),n_obj*s_obj,VM_RSZERO));
+
+ vm = getregion(&local);
+ addr = (*vm->meth.resizef)(vm, NIL(Void_t*), n_obj*s_obj, VM_RSZERO, local);
+ if(local)
+ { /**/ASSERT(vm->data->lock == 1);
+ vm->data->lock = 0;
+ }
+ return VMRECORD(addr);
}
#if __STD_C
@@ -263,8 +512,18 @@ extern Void_t* malloc(size)
reg size_t size;
#endif
{
+ Void_t *addr;
+ Vmalloc_t *vm;
+ int local = 0;
VMFLINIT();
- return VMRECORD((*Vmregion->meth.allocf)(Vmregion,size));
+
+ vm = getregion(&local);
+ addr = (*vm->meth.allocf)(vm, size, local);
+ if(local)
+ { /**/ASSERT(vm->data->lock == 1);
+ vm->data->lock = 0;
+ }
+ return VMRECORD(addr);
}
#if __STD_C
@@ -275,44 +534,49 @@ reg Void_t* data; /* block to be reallocated */
reg size_t size; /* new size */
#endif
{
-#if USE_NATIVE
-#undef realloc
-#if __STD_C
- extern Void_t* realloc(Void_t*, size_t);
-#else
- extern Void_t* realloc();
-#endif
-#endif
-
+ ssize_t copy;
+ Void_t *addr;
+ Vmalloc_t *vm;
VMFLINIT();
-#if _PACKAGE_ast
- if(data && Vmregion->meth.meth != VM_MTDEBUG &&
-#if !USE_NATIVE
- !(Vmregion->data->mode&VM_TRUST) &&
-#endif
- (*Vmregion->meth.addrf)(Vmregion,data) != 0 )
- {
+ if(!data)
+ return malloc(size);
+ else if((vm = regionof(data)) )
+ { if(vm == Vmregion && vm != Vmheap) /* no multiple region usage here */
+ { addr = (*vm->meth.resizef)(vm, data, size, VM_RSCOPY|VM_RSMOVE, 0);
+ return VMRECORD(addr);
+ }
+ if(asocasint(&vm->data->lock, 0, 1) == 0 ) /* region is open */
+ { addr = (*vm->meth.resizef)(vm, data, size, VM_RSCOPY|VM_RSMOVE, 1);
+ vm->data->lock = 0;
+ return VMRECORD(addr);
+ }
+ else if(Regmax > 0 && Vmregion == Vmheap && (addr = malloc(size)) )
+ { if((copy = SIZE(BLOCK(data))&~BITS) > size )
+ copy = size;
+ memcpy(addr, data, copy);
+ addfreelist((Regfree_t*)data);
+ return VMRECORD(addr);
+ }
+ else /* this may block but it is the best that we can do now */
+ { addr = (*vm->meth.resizef)(vm, data, size, VM_RSCOPY|VM_RSMOVE, 0);
+ return VMRECORD(addr);
+ }
+ }
+ else /* not our data */
+ {
#if USE_NATIVE
- return realloc(data, size);
+#undef realloc /* let the native realloc() take care of it */
+#if __STD_C
+ extern Void_t* realloc(Void_t*, size_t);
#else
- Void_t* newdata;
- if((newdata = (*Vmregion->meth.allocf)(Vmregion,size)) )
- memcpy(newdata,data,size);
- return VMRECORD(newdata);
+ extern Void_t* realloc();
#endif
- }
+ return realloc(data, size);
+#else
+ return NIL(Void_t*);
#endif
-
-#if USE_NATIVE
- { Void_t* newdata;
- if (newdata = (*Vmregion->meth.resizef)(Vmregion,data,size,VM_RSCOPY|VM_RSMOVE))
- return newdata;
- return VMRECORD(realloc(data, size));
}
-#else
- return VMRECORD((*Vmregion->meth.resizef)(Vmregion,data,size,VM_RSCOPY|VM_RSMOVE));
-#endif
}
#if __STD_C
@@ -322,37 +586,31 @@ extern void free(data)
reg Void_t* data;
#endif
{
-#if USE_NATIVE
-#undef free
-#if __STD_C
- extern void free(Void_t*);
-#else
- extern void free();
-#endif
-#endif
-
+ Vmalloc_t *vm;
VMFLINIT();
-#if _PACKAGE_ast
- if(data && Vmregion->meth.meth != VM_MTDEBUG &&
-#if !USE_NATIVE
- !(Vmregion->data->mode&VM_TRUST) &&
-#endif
- (*Vmregion->meth.addrf)(Vmregion,data) != 0)
+ if(!data || (_Vmassert & VM_keep))
+ return;
+ else if((vm = regionof(data)) )
+ {
+ if(vm == Vmregion && Vmregion != Vmheap || (_Vmassert & VM_free))
+ (void)(*vm->meth.freef)(vm, data, 0);
+ else addfreelist((Regfree_t*)data);
+ return;
+ }
+ else /* not our data */
{
#if USE_NATIVE
+#undef free /* let the native free() take care of it */
+#if __STD_C
+ extern void free(Void_t*);
+#else
+ extern void free();
+#endif
free(data);
#endif
return;
}
-#endif
-
-#if USE_NATIVE
- if ((*Vmregion->meth.freef)(Vmregion,data) != 0)
- free(data);
-#else
- (void)(*Vmregion->meth.freef)(Vmregion,data);
-#endif
}
#if __STD_C
@@ -373,13 +631,20 @@ reg size_t align;
reg size_t size;
#endif
{
- Void_t* addr;
-
+ Void_t *addr;
+ Vmalloc_t *vm;
+ int local = 0;
VMFLINIT();
+
+ vm = getregion(&local);
VMBLOCK
- addr = VMRECORD((*Vmregion->meth.alignf)(Vmregion,size,align));
+ addr = (*vm->meth.alignf)(vm, size, align, local);
+ if(local)
+ { /**/ASSERT(vm->data->lock == 1);
+ vm->data->lock = 0;
+ }
VMUNBLOCK
- return addr;
+ return VMRECORD(addr);
}
#if __STD_C
@@ -411,8 +676,9 @@ reg size_t size;
#endif
{
VMFLINIT();
+
GETPAGESIZE(_Vmpagesize);
- return VMRECORD((*Vmregion->meth.alignf)(Vmregion,size,_Vmpagesize));
+ return VMRECORD(memalign(_Vmpagesize, size));
}
#if __STD_C
@@ -423,8 +689,9 @@ reg size_t size;
#endif
{
VMFLINIT();
+
GETPAGESIZE(_Vmpagesize);
- return VMRECORD((*Vmregion->meth.alignf)(Vmregion,ROUND(size,_Vmpagesize),_Vmpagesize));
+ return VMRECORD(memalign(_Vmpagesize, ROUND(size,_Vmpagesize)) );
}
#if !_PACKAGE_ast
@@ -476,26 +743,32 @@ size_t size;
char* file;
int line;
Void_t* func;
- reg Alloca_t* f;
+ Alloca_t* f;
+ Vmalloc_t *vm;
static Alloca_t* Frame;
VMFLINIT();
- VMFLF(Vmregion,file,line,func);
- while(Frame)
+
+ VMFLF(Vmregion,file,line,func); /* save info before freeing frames */
+
+ while(Frame) /* free unused frames */
{ if(( _stk_down && &array[0] > Frame->head.head.addr) ||
(!_stk_down && &array[0] < Frame->head.head.addr) )
- { f = Frame;
- Frame = f->head.head.next;
- (void)(*Vmregion->meth.freef)(Vmregion,f);
+ { f = Frame; Frame = f->head.head.next;
+ if((vm = regionof(f)) )
+ (void)(*vm->meth.freef)(vm, f, 0);
+ /* else: something bad happened. just keep going */
}
else break;
}
- Vmregion->file = file;
+ Vmregion->file = file; /* restore file/line info before allocation */
Vmregion->line = line;
Vmregion->func = func;
- f = (Alloca_t*)(*Vmregion->meth.allocf)(Vmregion,size+sizeof(Alloca_t)-1);
+ f = (Alloca_t*)(*Vmregion->meth.allocf)(Vmregion, size+sizeof(Alloca_t)-1, 0);
+
+ /* if f is NULL, this mimics a stack overflow with a memory error! */
f->head.head.addr = &array[0];
f->head.head.next = Frame;
Frame = f;
@@ -511,6 +784,59 @@ size_t size;
#else
+#if _malloc_hook
+
+static void vm_free_hook(void* ptr, const void* caller)
+{
+ free(ptr);
+}
+
+static void* vm_malloc_hook(size_t size, const void* caller)
+{
+ void* r;
+
+ r = malloc(size);
+ return r;
+}
+
+static void* vm_memalign_hook(size_t align, size_t size, const void* caller)
+{
+ void* r;
+
+ r = memalign(align, size);
+ return r;
+}
+
+static void* vm_realloc_hook(void* ptr, size_t size, const void* caller)
+{
+ void* r;
+
+ r = realloc(ptr, size);
+ return r;
+}
+
+static void vm_initialize_hook(void)
+{
+ __free_hook = vm_free_hook;
+ __malloc_hook = vm_malloc_hook;
+ __memalign_hook = vm_memalign_hook;
+ __realloc_hook = vm_realloc_hook;
+}
+
+void (*__malloc_initialize_hook)(void) = vm_initialize_hook;
+
+#if 0 /* 2012-02-29 this may be needed to cover shared libs */
+
+void __attribute__ ((constructor)) vm_initialize_initialize_hook(void)
+{
+ vm_initialize_hook();
+ __malloc_initialize_hook = vm_initialize_hook;
+}
+
+#endif
+
+#else
+
/* intercept _* __* __libc_* variants */
#if __lib__malloc
@@ -564,6 +890,8 @@ extern Void_t* F1(__libc_valloc, size_t,n) { return valloc(n); }
#endif
#endif
+#endif /* _malloc_hook */
+
#endif /* _map_malloc */
#undef extern
@@ -668,6 +996,8 @@ extern Mstats_t mstats()
* _ast_* counterparts for object compatibility
*/
+#define setregmax(n)
+
#undef calloc
extern Void_t* calloc _ARG_((size_t, size_t));
@@ -702,17 +1032,22 @@ extern Void_t* valloc _ARG_((size_t));
#define extern __EXPORT__
#endif
-extern Void_t* F2(_ast_calloc, size_t,n, size_t,m) { return calloc(n, m); }
-extern Void_t F1(_ast_cfree, Void_t*,p) { free(p); }
+#if !_malloc_hook
+
extern Void_t F1(_ast_free, Void_t*,p) { free(p); }
extern Void_t* F1(_ast_malloc, size_t,n) { return malloc(n); }
#if _lib_memalign
extern Void_t* F2(_ast_memalign, size_t,a, size_t,n) { return memalign(a, n); }
#endif
+extern Void_t* F2(_ast_realloc, Void_t*,p, size_t,n) { return realloc(p, n); }
+
+#endif
+
+extern Void_t* F2(_ast_calloc, size_t,n, size_t,m) { return calloc(n, m); }
+extern Void_t F1(_ast_cfree, Void_t*,p) { free(p); }
#if _lib_pvalloc
extern Void_t* F1(_ast_pvalloc, size_t,n) { return pvalloc(n); }
#endif
-extern Void_t* F2(_ast_realloc, Void_t*,p, size_t,n) { return realloc(p, n); }
#if _lib_valloc
extern Void_t* F1(_ast_valloc, size_t,n) { return valloc(n); }
#endif
@@ -735,8 +1070,12 @@ extern Void_t* F1(_ast_valloc, size_t,n) { return valloc(n); }
#if !_UWIN
+#if !_malloc_hook
+
#include <malloc.h>
+#endif
+
typedef struct mallinfo Mallinfo_t;
typedef struct mstats Mstats_t;
@@ -822,6 +1161,31 @@ char* ends;
return begs;
}
+#define FD_PRIVATE (3*OPEN_MAX/4)
+
+#if __STD_C
+int _vmfd(int fd)
+#else
+int _vmfd(fd)
+int fd;
+#endif
+{
+ int pd;
+
+ if (fd >= 0)
+ {
+ if (fd < FD_PRIVATE && (pd = fcntl(fd, F_DUPFD, FD_PRIVATE)) >= 0)
+ {
+ close(fd);
+ fd = pd;
+ }
+#ifdef FD_CLOEXEC
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+ }
+ return fd;
+}
+
#if __STD_C
static int createfile(char* file)
#else
@@ -862,11 +1226,14 @@ char* file;
if (*file == '&' && *(file += 1) || strncmp(file, "/dev/fd/", 8) == 0 && *(file += 8))
fd = dup((int)atou(&file));
else if (*file)
+ {
#if _PACKAGE_ast
fd = open(file, O_WRONLY|O_CREAT|O_TRUNC, CREAT_MODE);
#else
fd = creat(file, CREAT_MODE);
#endif
+ fd = _vmfd(fd);
+ }
else
return -1;
#if _PACKAGE_ast
@@ -914,74 +1281,19 @@ void _vmoptions()
v = &buf[sizeof(buf)-1];
if (s = getenv("VMALLOC_OPTIONS"))
COPY(t, v, s);
-#if 1 /* backwards compatibility until 2011 */
- else
- {
- char* p;
-
- if (s = getenv("VMDEBUG"))
- {
- switch (*s++)
- {
- case 0:
- break;
- case 'a':
- p = " abort";
- COPY(t, v, p);
- break;
- case 'w':
- p = " warn";
- COPY(t, v, p);
- break;
- case '0':
- if (*s-- == 'x')
- {
- p = " watch=";
- COPY(t, v, p);
- COPY(t, v, s);
- break;
- }
- /*FALLTHROUGH*/
- default:
- p = " period=";
- COPY(t, v, p);
- COPY(t, v, s);
- break;
- }
- }
- if ((s = getenv("VMETHOD")) && *s)
- {
- p = " method=";
- COPY(t, v, p);
- COPY(t, v, s);
- }
- if ((s = getenv("VMPROFILE")) && *s)
- {
- p = " profile=";
- COPY(t, v, p);
- COPY(t, v, s);
- }
- if ((s = getenv("VMTRACE")) && *s)
- {
- p = " trace=";
- COPY(t, v, p);
- COPY(t, v, s);
- }
- }
-#endif
if (t > buf)
{
*t = 0;
s = buf;
for (;;)
{
- while (*s == ' ' || *s == '\t' || *s == '\r' || *s == '\n')
+ while (*s == ',' || *s == ' ' || *s == '\t' || *s == '\r' || *s == '\n')
s++;
if (!*(t = s))
break;
v = 0;
while (*s)
- if (*s == ' ' || *s == '\t' || *s == '\r' || *s == '\n')
+ if (*s == ',' || *s == ' ' || *s == '\t' || *s == '\r' || *s == '\n')
{
*s++ = 0;
break;
@@ -1000,39 +1312,47 @@ void _vmoptions()
{
case 'a': /* abort */
if (!vm)
- vm = vmopen(Vmdcsbrk, Vmdebug, 0);
+ vm = vmopen(Vmdcsystem, Vmdebug, 0);
if (vm && vm->meth.meth == VM_MTDEBUG)
vmset(vm, VM_DBABORT, 1);
else
_Vmassert |= VM_abort;
break;
+ case 'b': /* break */
+ _Vmassert |= VM_break;
+ break;
case 'c': /* check */
_Vmassert |= VM_check;
break;
+ case 'f': /* free */
+ _Vmassert |= VM_free;
+ break;
+ case 'k': /* keep */
+ _Vmassert |= VM_keep;
+ break;
case 'm':
- switch (t[1])
- {
- case 'e': /* method=<method> */
- if (v && !vm)
+ if (v)
+ switch (t[1])
{
- if ((v[0] == 'V' || v[0] == 'v') && (v[1] == 'M' || v[1] == 'm'))
- v += 2;
- if (strcmp(v, "debug") == 0)
- vm = vmopen(Vmdcsbrk, Vmdebug, 0);
- else if (strcmp(v, "profile") == 0)
- vm = vmopen(Vmdcsbrk, Vmprofile, 0);
- else if (strcmp(v, "last") == 0)
- vm = vmopen(Vmdcsbrk, Vmlast, 0);
- else if (strcmp(v, "best") == 0)
- vm = Vmheap;
+ case 'e': /* method=METHOD */
+ if (!vm)
+ {
+ if ((v[0] == 'V' || v[0] == 'v') && (v[1] == 'M' || v[1] == 'm'))
+ v += 2;
+ if (strcmp(v, "debug") == 0)
+ vm = vmopen(Vmdcsystem, Vmdebug, 0);
+ else if (strcmp(v, "profile") == 0)
+ vm = vmopen(Vmdcsystem, Vmprofile, 0);
+ else if (strcmp(v, "last") == 0)
+ vm = vmopen(Vmdcsystem, Vmlast, 0);
+ else if (strcmp(v, "best") == 0)
+ vm = Vmheap;
+ }
+ break;
+ case 'm': /* mmap */
+ _Vmassert |= VM_mmap;
+ break;
}
- break;
- case 'm': /* mmap */
-#if _mem_mmap_anon || _mem_mmap_zero
- _Vmassert |= VM_mmap;
-#endif
- break;
- }
break;
case 'p':
if (v)
@@ -1040,24 +1360,21 @@ void _vmoptions()
{
case 'e': /* period=<count> */
if (!vm)
- vm = vmopen(Vmdcsbrk, Vmdebug, 0);
+ vm = vmopen(Vmdcsystem, Vmdebug, 0);
if (vm && vm->meth.meth == VM_MTDEBUG)
_Vmdbcheck = atou(&v);
break;
case 'r': /* profile=<path> */
if (!vm)
- vm = vmopen(Vmdcsbrk, Vmprofile, 0);
+ vm = vmopen(Vmdcsystem, Vmprofile, 0);
if (v && vm && vm->meth.meth == VM_MTPROFILE)
_Vmpffd = createfile(v);
break;
}
break;
- case 'r': /* region */
- _Vmassert |= VM_region;
- break;
case 's': /* start=<count> */
if (!vm)
- vm = vmopen(Vmdcsbrk, Vmdebug, 0);
+ vm = vmopen(Vmdcsystem, Vmdebug, 0);
if (v && vm && vm->meth.meth == VM_MTDEBUG)
_Vmdbstart = atou(&v);
break;
@@ -1070,13 +1387,13 @@ void _vmoptions()
{
case 'r': /* warn=<path> */
if (!vm)
- vm = vmopen(Vmdcsbrk, Vmdebug, 0);
+ vm = vmopen(Vmdcsystem, Vmdebug, 0);
if (v && vm && vm->meth.meth == VM_MTDEBUG && (fd = createfile(v)) >= 0)
vmdebug(fd);
break;
case 't': /* watch=<addr> */
if (!vm)
- vm = vmopen(Vmdcsbrk, Vmdebug, 0);
+ vm = vmopen(Vmdcsystem, Vmdebug, 0);
if (v && vm && vm->meth.meth == VM_MTDEBUG && (n = atou(&v)) >= 0)
vmdbwatch((Void_t*)n);
break;
@@ -1095,13 +1412,19 @@ void _vmoptions()
Vmregion = vm;
}
- /* enable tracing */
+ /* enable tracing -- this currently disables multiple regions */
- if (trace && (fd = createfile(trace)) >= 0)
+ if (trace)
{
- vmset(Vmregion, VM_TRACE, 1);
- vmtrace(fd);
+ setregmax(0);
+ if ((fd = createfile(trace)) >= 0)
+ {
+ vmset(Vmregion, VM_TRACE, 1);
+ vmtrace(fd);
+ }
}
+ else if (Vmregion != Vmheap || asometh(0, 0)->type == ASO_SIGNAL)
+ setregmax(0);
/* make sure that profile data is output upon exiting */
@@ -1119,4 +1442,35 @@ void _vmoptions()
}
}
+/*
+ * ast semi-private workaround for system functions
+ * that misbehave by passing bogus addresses to free()
+ *
+ * not prototyped in any header to keep it ast semi-private
+ *
+ * to keep malloc() data by disabling free()
+ * extern _vmkeep(int);
+ * int r = _vmkeep(1);
+ * and to restore to the previous state
+ * (void)_vmkeep(r);
+ */
+
+int
+#if __STD_C
+_vmkeep(int v)
+#else
+_vmkeep(v)
+int v;
+#endif
+{
+ int r;
+
+ r = !!(_Vmassert & VM_keep);
+ if (v)
+ _Vmassert |= VM_keep;
+ else
+ _Vmassert &= ~VM_keep;
+ return r;
+}
+
#endif /*_UWIN*/
diff --git a/usr/src/lib/libast/common/vmalloc/vmbest.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmbest.c
index 76e903d1f4..711a84f29b 100644
--- a/usr/src/lib/libast/common/vmalloc/vmbest.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmbest.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -41,17 +41,8 @@ static int N_resize; /* # of resize calls */
static int N_wild; /* # allocated from the wild block */
static int N_last; /* # allocated from last free block */
static int N_reclaim; /* # of bestreclaim calls */
-
-#undef VM_TRUST /* always check for locking, etc.s */
-#define VM_TRUST 0
#endif /*DEBUG*/
-#if _BLD_posix
-#define logmsg(d,a ...) logsrc(d,__FILE__,__LINE__,a)
-
-extern int logsrc(int, const char*, int, const char*, ...);
-#endif /*_BLD_posix*/
-
#define COMPACT 8 /* factor to decide when to compact */
/* Check to see if a block is in the free tree */
@@ -208,7 +199,7 @@ Block_t* freeb; /* known to be free but not on any free list */
{ rv = -1; /**/ASSERT(0); }
/* must have a self-reference pointer */
- if(*SELF(b) != b)
+ if(SELF(b) != b)
{ rv = -1; /**/ASSERT(0); }
/* segment pointer should be well-defined */
@@ -378,7 +369,6 @@ int c;
reg size_t size, s;
reg Block_t *fp, *np, *t, *list;
reg int n, saw_wanted;
- reg Seg_t *seg;
/**/COUNT(N_reclaim);
/**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
@@ -414,26 +404,8 @@ int c;
if(!ISJUNK(size)) /* already done */
continue;
- if(_Vmassert & VM_region)
- { /* see if this address is from region */
- for(seg = vd->seg; seg; seg = seg->next)
- if(fp >= SEGBLOCK(seg) && fp < (Block_t*)seg->baddr )
- break;
- if(!seg) /* must be a bug in application code! */
- { /**/ ASSERT(seg != NIL(Seg_t*));
- continue;
- }
- }
-
if(ISPFREE(size)) /* backward merge */
{ fp = LAST(fp);
-#if _BLD_posix
- if (fp < (Block_t*)0x00120000)
- {
- logmsg(0, "bestreclaim fp=%p", fp);
- ASSERT(!fp);
- }
-#endif
s = SIZE(fp); /**/ASSERT(!(s&BITS));
REMOVE(vd,fp,INDEX(s),t,bestsearch);
size = (size&~BITS) + s + sizeof(Head_t);
@@ -442,13 +414,6 @@ int c;
for(;;) /* forward merge */
{ np = (Block_t*)((Vmuchar_t*)fp+size+sizeof(Head_t));
-#if _BLD_posix
- if (np < (Block_t*)0x00120000)
- {
- logmsg(0, "bestreclaim np=%p", np);
- ASSERT(!np);
- }
-#endif
s = SIZE(np); /**/ASSERT(s > 0);
if(!ISBUSY(s))
{ /**/ASSERT((s&BITS) == 0);
@@ -459,7 +424,7 @@ int c;
else if(ISJUNK(s))
{ /* reclaim any touched junk list */
if((int)C_INDEX(s) < c)
- c = C_INDEX(s);
+ c = (int)C_INDEX(s);
SIZE(np) = 0;
CLRBITS(s);
}
@@ -472,7 +437,7 @@ int c;
np = NEXT(fp); /**/ASSERT(ISBUSY(SIZE(np)));
/**/ASSERT(!ISJUNK(SIZE(np)));
SETPFREE(SIZE(np));
- *(SELF(fp)) = fp;
+ SELF(fp) = fp;
if(fp == wanted) /* to be consumed soon */
{ /**/ASSERT(!saw_wanted); /* should be seen just once */
@@ -554,28 +519,19 @@ int c;
}
#if __STD_C
-static int bestcompact(Vmalloc_t* vm)
+static int bestcompact(Vmalloc_t* vm, int local)
#else
-static int bestcompact(vm)
+static int bestcompact(vm, local)
Vmalloc_t* vm;
+int local;
#endif
{
reg Seg_t *seg, *next;
- reg Block_t *bp, *t;
+ reg Block_t *bp, *tp;
reg size_t size, segsize, round;
- reg int local, inuse;
reg Vmdata_t* vd = vm->data;
- SETINUSE(vd, inuse);
-
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local);
- if(ISLOCK(vd,local))
- { CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd,local);
- }
+ SETLOCK(vm, local);
bestreclaim(vd,NIL(Block_t*),0);
@@ -611,8 +567,9 @@ Vmalloc_t* vm;
vd->wild = NIL(Block_t*);
vd->pool = 0;
}
- else REMOVE(vd,bp,INDEX(size),t,bestsearch);
- CLRPFREE(SIZE(NEXT(bp)));
+ else REMOVE(vd,bp,INDEX(size),tp,bestsearch);
+ tp = NEXT(bp); /* avoid strict-aliasing pun */
+ CLRPFREE(SIZE(tp));
if(size < (segsize = seg->size))
size += sizeof(Head_t);
@@ -640,44 +597,32 @@ Vmalloc_t* vm;
if(!local && _Vmtrace && (vd->mode&VM_TRACE) && VMETHOD(vd) == VM_MTBEST)
(*_Vmtrace)(vm, (Vmuchar_t*)0, (Vmuchar_t*)0, 0, 0);
- CLRLOCK(vd,local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
+ CLRLOCK(vm, local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRINUSE(vd, inuse);
return 0;
}
#if __STD_C
-static Void_t* bestalloc(Vmalloc_t* vm, reg size_t size )
+static Void_t* bestalloc(Vmalloc_t* vm, size_t size , int local)
#else
-static Void_t* bestalloc(vm,size)
+static Void_t* bestalloc(vm, size, local)
Vmalloc_t* vm; /* region allocating from */
-reg size_t size; /* desired block size */
+size_t size; /* desired block size */
+int local; /* internal call */
#endif
{
reg Vmdata_t* vd = vm->data;
reg size_t s;
reg int n;
- reg Block_t *tp, *np;
- reg int local, inuse;
- size_t orgsize = 0;
-
- VMOPTIONS();
+ reg Block_t *tp, *np, *ap;
+ size_t orgsize = size;
/**/COUNT(N_alloc);
+ /**/ASSERT(local ? (vd->lock == 1) : 1 );
- SETINUSE(vd, inuse);
-
- if(!(local = vd->mode&VM_TRUST))
- { GETLOCAL(vd,local); /**/ASSERT(!ISLOCK(vd,local));
- if(ISLOCK(vd,local) )
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,local);
- orgsize = size;
- }
+ SETLOCK(vm,local);
- /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
+ /**/ ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
/**/ ASSERT(HEADSIZE == sizeof(Head_t));
/**/ ASSERT(BODYSIZE == sizeof(Body_t));
/**/ ASSERT((ALIGN%(BITS+1)) == 0 );
@@ -712,95 +657,77 @@ reg size_t size; /* desired block size */
CACHE(vd)[S_CACHE] = tp;
}
- for(;;)
- { for(n = S_CACHE; n >= 0; --n) /* best-fit except for coalescing */
- { bestreclaim(vd,NIL(Block_t*),n);
- if(vd->root && (tp = bestsearch(vd,size,NIL(Block_t*))) )
- goto got_block;
- }
-
- /**/ASSERT(!vd->free);
- if((tp = vd->wild) && SIZE(tp) >= size)
- { /**/COUNT(N_wild);
- vd->wild = NIL(Block_t*);
- goto got_block;
- }
-
- KPVCOMPACT(vm,bestcompact);
- if((tp = (*_Vmextend)(vm,size,bestsearch)) )
+ for(n = S_CACHE; n >= 0; --n) /* best-fit except for coalescing */
+ { bestreclaim(vd,NIL(Block_t*),n);
+ if(vd->root && (tp = bestsearch(vd,size,NIL(Block_t*))) )
goto got_block;
- else if(vd->mode&VM_AGAIN)
- vd->mode &= ~VM_AGAIN;
- else
- { CLRLOCK(vd,local);
- CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
}
-got_block:
- /**/ ASSERT(!ISBITS(SIZE(tp)));
- /**/ ASSERT(SIZE(tp) >= size);
- /**/ ASSERT((SIZE(tp)%ALIGN) == 0);
- /**/ ASSERT(!vd->free);
+ /**/ASSERT(!vd->free);
+ if((tp = vd->wild) && SIZE(tp) >= size)
+ { /**/COUNT(N_wild);
+ vd->wild = NIL(Block_t*);
+ goto got_block;
+ }
+
+ /* need to extend the arena */
+ KPVCOMPACT(vm,bestcompact);
+ if((tp = (*_Vmextend)(vm,size,bestsearch)) )
+ { got_block:
+ /**/ ASSERT(!ISBITS(SIZE(tp)));
+ /**/ ASSERT(SIZE(tp) >= size);
+ /**/ ASSERT((SIZE(tp)%ALIGN) == 0);
+ /**/ ASSERT(!vd->free);
+
+ /* tell next block that we are no longer a free block */
+ np = NEXT(tp);
+ CLRPFREE(SIZE(np)); /**/ ASSERT(ISBUSY(SIZE(np)));
- /* tell next block that we are no longer a free block */
- CLRPFREE(SIZE(NEXT(tp))); /**/ ASSERT(ISBUSY(SIZE(NEXT(tp))));
+ if((s = SIZE(tp)-size) >= (sizeof(Head_t)+BODYSIZE) )
+ { SIZE(tp) = size;
- if((s = SIZE(tp)-size) >= (sizeof(Head_t)+BODYSIZE) )
- { SIZE(tp) = size;
+ np = NEXT(tp);
+ SEG(np) = SEG(tp);
+ SIZE(np) = (s - sizeof(Head_t)) | BUSY|JUNK;
- np = NEXT(tp);
- SEG(np) = SEG(tp);
- SIZE(np) = (s - sizeof(Head_t)) | BUSY|JUNK;
-
- if(VMWILD(vd,np))
- { SIZE(np) &= ~BITS;
- *SELF(np) = np; /**/ASSERT(ISBUSY(SIZE(NEXT(np))));
- SETPFREE(SIZE(NEXT(np)));
- vd->wild = np;
+ if(VMWILD(vd,np))
+ { SIZE(np) &= ~BITS;
+ SELF(np) = np;
+ ap = NEXT(np); /**/ASSERT(ISBUSY(SIZE(ap)));
+ SETPFREE(SIZE(ap));
+ vd->wild = np;
+ }
+ else vd->free = np;
}
- else vd->free = np;
- }
- SETBUSY(SIZE(tp));
+ SETBUSY(SIZE(tp));
+ }
done:
- if(!local && (vd->mode&VM_TRACE) && _Vmtrace && VMETHOD(vd) == VM_MTBEST)
+ if(tp && !local && (vd->mode&VM_TRACE) && _Vmtrace && VMETHOD(vd) == VM_MTBEST)
(*_Vmtrace)(vm,NIL(Vmuchar_t*),(Vmuchar_t*)DATA(tp),orgsize,0);
- /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRLOCK(vd,local);
- ANNOUNCE(local, vm, VM_ALLOC, DATA(tp), vm->disc);
+ CLRLOCK(vm,local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRINUSE(vd, inuse);
- return DATA(tp);
+ return tp ? DATA(tp) : NIL(Void_t*);
}
#if __STD_C
-static long bestaddr(Vmalloc_t* vm, Void_t* addr )
+static long bestaddr(Vmalloc_t* vm, Void_t* addr, int local )
#else
-static long bestaddr(vm, addr)
+static long bestaddr(vm, addr, local)
Vmalloc_t* vm; /* region allocating from */
Void_t* addr; /* address to check */
+int local;
#endif
{
reg Seg_t* seg;
reg Block_t *b, *endb;
reg long offset;
reg Vmdata_t* vd = vm->data;
- reg int local, inuse;
-
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local); /**/ASSERT(!ISLOCK(vd,local));
- if(ISLOCK(vd,local))
- { CLRINUSE(vd, inuse);
- return -1L;
- }
- SETLOCK(vd,local);
- }
+ /**/ASSERT(local ? (vd->lock == 1) : 1 );
+ SETLOCK(vm, local);
offset = -1L; b = endb = NIL(Block_t*);
for(seg = vd->seg; seg; seg = seg->next)
@@ -811,12 +738,10 @@ Void_t* addr; /* address to check */
break;
}
- if(local && !(vd->mode&VM_TRUST) ) /* from bestfree or bestresize */
+ if(local ) /* from bestfree or bestresize */
{ b = BLOCK(addr);
if(seg && SEG(b) == seg && ISBUSY(SIZE(b)) && !ISJUNK(SIZE(b)) )
offset = 0;
- if(offset != 0 && vm->disc->exceptf)
- (void)(*vm->disc->exceptf)(vm,VM_BADADDR,addr,vm->disc);
}
else if(seg)
{ while(b < endb)
@@ -826,7 +751,7 @@ Void_t* addr; /* address to check */
if((Vmuchar_t*)addr >= data && (Vmuchar_t*)addr < data+size)
{ if(ISJUNK(SIZE(b)) || !ISBUSY(SIZE(b)))
offset = -1L;
- else offset = (Vmuchar_t*)addr - data;
+ else offset = (long)((Vmuchar_t*)addr - data);
goto done;
}
@@ -835,50 +760,42 @@ Void_t* addr; /* address to check */
}
done:
- CLRLOCK(vd,local);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm,local);
return offset;
}
#if __STD_C
-static int bestfree(Vmalloc_t* vm, Void_t* data )
+static int bestfree(Vmalloc_t* vm, Void_t* data, int local )
#else
-static int bestfree(vm, data )
+static int bestfree(vm, data, local )
Vmalloc_t* vm;
Void_t* data;
+int local;
#endif
{
reg Vmdata_t* vd = vm->data;
reg Block_t *bp;
reg size_t s;
- reg int local, inuse;
#ifdef DEBUG
- if((local = (int)integralof(data)) >= 0 && local <= 0xf)
- { int vmassert = _Vmassert;
- _Vmassert = local ? local : vmassert ? vmassert : (VM_check|VM_abort);
+ if(((char*)data - (char*)0) <= 1)
+ { _Vmassert |= VM_check;
_vmbestcheck(vd, NIL(Block_t*));
- _Vmassert = local ? local : vmassert;
+ if (!data)
+ _Vmassert &= ~VM_check;
return 0;
}
-#endif
-
+#else
if(!data) /* ANSI-ism */
return 0;
+#endif
/**/COUNT(N_free);
+ /**/ASSERT(local ? (vd->lock == 1) : 1 );
- SETINUSE(vd, inuse);
-
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local); /**/ASSERT(!ISLOCK(vd,local));
- if(ISLOCK(vd,local) || KPVADDR(vm,data,bestaddr) != 0 )
- { CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd,local);
- }
+ SETLOCK(vm, local);
+ /**/ASSERT(KPVADDR(vm, data, bestaddr) == 0);
/**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
bp = BLOCK(data); s = SIZE(bp);
@@ -914,65 +831,51 @@ Void_t* data;
if(!local && _Vmtrace && (vd->mode&VM_TRACE) && VMETHOD(vd) == VM_MTBEST )
(*_Vmtrace)(vm,(Vmuchar_t*)data,NIL(Vmuchar_t*), (s&~BITS), 0);
- /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRLOCK(vd,local);
- ANNOUNCE(local, vm, VM_FREE, data, vm->disc);
+ CLRLOCK(vm, local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRINUSE(vd, inuse);
return 0;
}
#if __STD_C
-static Void_t* bestresize(Vmalloc_t* vm, Void_t* data, reg size_t size, int type)
+static Void_t* bestresize(Vmalloc_t* vm, Void_t* data, reg size_t size, int type, int local)
#else
-static Void_t* bestresize(vm,data,size,type)
+static Void_t* bestresize(vm, data, size, type, local)
Vmalloc_t* vm; /* region allocating from */
Void_t* data; /* old block of data */
reg size_t size; /* new size */
int type; /* !=0 to move, <0 for not copy */
+int local;
#endif
{
reg Block_t *rp, *np, *t;
- int local, inuse;
- size_t s, bs, oldsize = 0, orgsize = 0;
- Void_t *oldd, *orgdata = NIL(Void_t*);
+ size_t s, bs;
+ size_t oldz = 0, orgsize = size;
+ Void_t *oldd = 0, *orgdata = data;
Vmdata_t *vd = vm->data;
/**/COUNT(N_resize);
+ /**/ASSERT(local ? (vd->lock == 1) : 1);
- SETINUSE(vd, inuse);
-
- if(!data)
- { if((data = bestalloc(vm,size)) )
- { oldsize = 0;
- size = size <= BODYSIZE ? BODYSIZE : ROUND(size,ALIGN);
- }
- goto done;
+ if(!data) /* resizing a NULL block is the same as allocating */
+ { data = bestalloc(vm, size, local);
+ if(data && (type&VM_RSZERO) )
+ memset((Void_t*)data, 0, size);
+ return data;
}
- if(size == 0)
- { (void)bestfree(vm,data);
- CLRINUSE(vd, inuse);
+ if(size == 0) /* resizing to zero size is the same as freeing */
+ { (void)bestfree(vm, data, local);
return NIL(Void_t*);
}
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local); /**/ASSERT(!ISLOCK(vd,local));
- if(ISLOCK(vd,local) || (!local && KPVADDR(vm,data,bestaddr) != 0 ) )
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,local);
-
- orgdata = data; /* for tracing */
- orgsize = size;
- }
+ SETLOCK(vm, local);
+ /**/ASSERT(KPVADDR(vm, data, bestaddr) == 0);
/**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
size = size <= BODYSIZE ? BODYSIZE : ROUND(size,ALIGN);
rp = BLOCK(data); /**/ASSERT(ISBUSY(SIZE(rp)) && !ISJUNK(SIZE(rp)));
- oldsize = SIZE(rp); CLRBITS(oldsize);
- if(oldsize < size)
- { np = (Block_t*)((Vmuchar_t*)rp + oldsize + sizeof(Head_t));
+ oldz = SIZE(rp); CLRBITS(oldz);
+ if(oldz < size)
+ { np = (Block_t*)((Vmuchar_t*)rp + oldz + sizeof(Head_t));
do /* forward merge as much as possible */
{ s = SIZE(np); /**/ASSERT(!ISPFREE(s));
if(np == vd->free)
@@ -981,7 +884,7 @@ int type; /* !=0 to move, <0 for not copy */
}
else if(ISJUNK(s) )
{
- if(!bestreclaim(vd,np,C_INDEX(s)) )
+ if(!bestreclaim(vd,np,(int)C_INDEX(s)) )
/**/ASSERT(0); /* oops: did not see np! */
s = SIZE(np); /**/ASSERT(s%ALIGN == 0);
}
@@ -1043,43 +946,32 @@ int type; /* !=0 to move, <0 for not copy */
}
}
+ if(data && (type&VM_RSZERO) && (size = SIZE(BLOCK(data))&~BITS) > oldz )
+ memset((Void_t*)((Vmuchar_t*)data + oldz), 0, size-oldz);
+
if(!local && _Vmtrace && data && (vd->mode&VM_TRACE) && VMETHOD(vd) == VM_MTBEST)
(*_Vmtrace)(vm, (Vmuchar_t*)orgdata, (Vmuchar_t*)data, orgsize, 0);
- /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRLOCK(vd,local);
- ANNOUNCE(local, vm, VM_RESIZE, data, vm->disc);
-
-done: if(data && (type&VM_RSZERO) && (size = SIZE(BLOCK(data))&~BITS) > oldsize )
- memset((Void_t*)((Vmuchar_t*)data + oldsize), 0, size-oldsize);
+ CLRLOCK(vm, local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRINUSE(vd, inuse);
return data;
}
#if __STD_C
-static long bestsize(Vmalloc_t* vm, Void_t* addr )
+static long bestsize(Vmalloc_t* vm, Void_t* addr, int local )
#else
-static long bestsize(vm, addr)
+static long bestsize(vm, addr, local)
Vmalloc_t* vm; /* region allocating from */
Void_t* addr; /* address to check */
+int local;
#endif
{
- reg Seg_t* seg;
- reg Block_t *b, *endb;
- reg long size;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
-
- SETINUSE(vd, inuse);
+ Seg_t *seg;
+ Block_t *b, *endb;
+ long size;
+ Vmdata_t *vd = vm->data;
- if(!(vd->mode&VM_TRUST) )
- { if(ISLOCK(vd,0))
- { CLRINUSE(vd, inuse);
- return -1L;
- }
- SETLOCK(vd,0);
- }
+ SETLOCK(vm, local);
size = -1L;
for(seg = vd->seg; seg; seg = seg->next)
@@ -1103,42 +995,31 @@ Void_t* addr; /* address to check */
}
done:
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
return size;
}
#if __STD_C
-static Void_t* bestalign(Vmalloc_t* vm, size_t size, size_t align)
+static Void_t* bestalign(Vmalloc_t* vm, size_t size, size_t align, int local)
#else
-static Void_t* bestalign(vm, size, align)
+static Void_t* bestalign(vm, size, align, local)
Vmalloc_t* vm;
size_t size;
size_t align;
+int local;
#endif
{
- reg Vmuchar_t *data;
- reg Block_t *tp, *np;
- reg Seg_t* seg;
- reg int local, inuse;
- reg size_t s, extra, orgsize = 0, orgalign = 0;
- reg Vmdata_t* vd = vm->data;
+ Vmuchar_t *data;
+ Block_t *tp, *np;
+ Seg_t *seg;
+ size_t s, extra;
+ size_t orgsize = size, orgalign = align;
+ Vmdata_t *vd = vm->data;
if(size <= 0 || align <= 0)
return NIL(Void_t*);
- SETINUSE(vd, inuse);
-
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local); /**/ASSERT(!ISLOCK(vd,local));
- if(ISLOCK(vd,local) )
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,local);
- orgsize = size;
- orgalign = align;
- }
+ SETLOCK(vm, local);
/**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
size = size <= BODYSIZE ? BODYSIZE : ROUND(size,ALIGN);
@@ -1198,232 +1079,209 @@ size_t align;
bestreclaim(vd,NIL(Block_t*),0); /* coalesce all free blocks */
- if(!local && !(vd->mode&VM_TRUST) && _Vmtrace && (vd->mode&VM_TRACE) )
+ if(!local && _Vmtrace && (vd->mode&VM_TRACE) )
(*_Vmtrace)(vm,NIL(Vmuchar_t*),data,orgsize,orgalign);
done:
- /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRLOCK(vd,local);
- ANNOUNCE(local, vm, VM_ALLOC, (Void_t*)data, vm->disc);
+ CLRLOCK(vm, local); /**/ASSERT(_vmbestcheck(vd, NIL(Block_t*)) == 0);
- CLRINUSE(vd, inuse);
return (Void_t*)data;
}
-
+/* The below implements the discipline Vmdcsbrk and the heap region Vmheap.
+** There are 5 alternative ways to get raw memory:
+** win32, sbrk, mmap_anon, mmap_zero and reusing the native malloc
+** The selection of method done here is to enable our malloc implementation
+** to work with concurrent threads. The sbrk/brk interface is unfortunately
+** not atomic. Thus, we prefer mmap_anon or mmap_zero if they are available.
+*/
#if _mem_win32
-#if _PACKAGE_ast
-#include <ast_windows.h>
-#else
-#include <windows.h>
+#undef _mem_mmap_anon
+#undef _mem_mmap_zero
+#undef _mem_sbrk
#endif
-#endif /* _lib_win32 */
-
#if _mem_mmap_anon
-#include <sys/mman.h>
-#ifndef MAP_ANON
-#define MAP_ANON MAP_ANONYMOUS
+#undef _mem_mmap_zero
+#if !_PACKAGE_ast
+#undef _mem_sbrk
+#endif
#endif
-#endif /* _mem_mmap_anon */
-
#if _mem_mmap_zero
-#include <sys/fcntl.h>
-#include <sys/mman.h>
-typedef struct _mmapdisc_s
-{ Vmdisc_t disc;
- int fd;
- off_t offset;
-} Mmapdisc_t;
-
-#ifndef OPEN_MAX
-#define OPEN_MAX 64
+#if !_PACKAGE_ast
+#undef _mem_sbrk
#endif
-#define OPEN_PRIVATE (3*OPEN_MAX/4)
-#endif /* _mem_mmap_zero */
-
-/* failure mode of mmap, sbrk and brk */
-#ifndef MAP_FAILED
-#define MAP_FAILED ((Void_t*)(-1))
#endif
-#define BRK_FAILED ((Void_t*)(-1))
-/* make sure that allocated memory are addressable */
+#if __linux__
-#if _PACKAGE_ast
-#include <sig.h>
-#else
-#include <signal.h>
-typedef void (*Sig_handler_t)(int);
-#endif
+/* make sure that allocated memory is addressable */
+#include <signal.h>
+typedef void (*Sig_f)(int);
static int Gotsegv = 0;
-#if __STD_C
static void sigsegv(int sig)
-#else
-static void sigsegv(sig)
-int sig;
-#endif
-{
+{
if(sig == SIGSEGV)
Gotsegv = 1;
}
-
-#if __STD_C
-static int okaddr(Void_t* addr, size_t nsize)
-#else
-static int okaddr(addr, nsize)
-Void_t* addr;
-size_t nsize;
-#endif
+static int chkaddr(Vmuchar_t* addr, size_t nsize)
{
- Sig_handler_t segv;
- int rv;
+ Sig_f segv;
+ int rv;
Gotsegv = 0; /* catch segment fault */
segv = signal(SIGSEGV, sigsegv);
- if(Gotsegv == 0)
- rv = *((char*)addr);
- if(Gotsegv == 0)
- rv += *(((char*)addr)+nsize-1);
- if(Gotsegv == 0)
- rv = rv == 0 ? 0 : 1;
- else rv = -1;
+ rv = *(addr+nsize-1);
+ rv = Gotsegv ? -1 : rv;
signal(SIGSEGV, segv); /* restore signal catcher */
Gotsegv = 0;
return rv;
}
+#else
-/* A discipline to get raw memory using sbrk/VirtualAlloc/mmap */
-#if __STD_C
-static Void_t* sbrkmem(Vmalloc_t* vm, Void_t* caddr,
- size_t csize, size_t nsize, Vmdisc_t* disc)
+/* known !__linux__ guarantee that brk-addresses are valid */
+
+#define chkaddr(a,n) (0)
+
+#endif /*__linux__*/
+
+#if _mem_win32 /* getting memory on a window system */
+#if _PACKAGE_ast
+#include <ast_windows.h>
#else
-static Void_t* sbrkmem(vm, caddr, csize, nsize, disc)
-Vmalloc_t* vm; /* region doing allocation from */
-Void_t* caddr; /* current address */
-size_t csize; /* current size */
-size_t nsize; /* new size */
-Vmdisc_t* disc; /* discipline structure */
+#include <windows.h>
#endif
-{
-#undef _done_sbrkmem
-#if !defined(_done_sbrkmem) && defined(_mem_win32)
-#define _done_sbrkmem 1
- NOTUSED(vm);
- NOTUSED(disc);
+static Void_t* win32mem(Void_t* caddr, size_t csize, size_t nsize)
+{ /**/ ASSERT(csize > 0 || nsize > 0)
if(csize == 0)
- return (Void_t*)VirtualAlloc(0,nsize,MEM_COMMIT,PAGE_READWRITE);
+ { caddr = (Void_t*)VirtualAlloc(0,nsize,MEM_COMMIT,PAGE_READWRITE);
+ return caddr;
+ }
else if(nsize == 0)
- return VirtualFree((LPVOID)caddr,0,MEM_RELEASE) ? caddr : NIL(Void_t*);
+ { (void)VirtualFree((LPVOID)caddr,0,MEM_RELEASE);
+ return caddr;
+ }
else return NIL(Void_t*);
-#endif /* MUST_WIN32 */
+}
+#endif /* _mem_win32 */
-#if !defined(_done_sbrkmem) && (_mem_sbrk || _mem_mmap_zero || _mem_mmap_anon)
-#define _done_sbrkmem 1
- Vmuchar_t *addr;
-#if _mem_mmap_zero
- Mmapdisc_t *mmdc = (Mmapdisc_t*)disc;
-#else
- NOTUSED(disc);
-#endif
- NOTUSED(vm);
+#if _mem_sbrk /* getting space via brk/sbrk - not concurrent-ready */
+static Void_t* sbrkmem(Void_t* caddr, size_t csize, size_t nsize)
+{
+ Vmuchar_t *addr = (Vmuchar_t*)sbrk(0);
- if(csize == 0) /* allocating new memory */
- {
+ if(!addr || addr == (Vmuchar_t*)(-1) )
+ return NIL(Void_t*);
-#if _mem_sbrk /* try using sbrk() and brk() */
- if(!(_Vmassert & VM_mmap))
- {
- addr = (Vmuchar_t*)sbrk(0); /* old break value */
- if(addr && addr != (Vmuchar_t*)BRK_FAILED )
- {
- if((addr+nsize) < addr)
- return NIL(Void_t*);
- if(brk(addr+nsize) == 0 )
- { if(okaddr(addr,nsize) >= 0)
- return addr;
- (void)brk(addr); /* release reserved address */
- }
- }
- }
+ if(csize > 0 && addr != (Vmuchar_t*)caddr+csize)
+ return NIL(Void_t*);
+ else if(csize == 0)
+ caddr = addr;
+
+ /**/ASSERT(addr == (Vmuchar_t*)caddr+csize);
+ if(nsize < csize)
+ addr -= csize-nsize;
+ else if((addr += nsize-csize) < (Vmuchar_t*)caddr )
+ return NIL(Void_t*);
+
+ if(brk(addr) != 0 )
+ return NIL(Void_t*);
+ else if(nsize > csize && chkaddr(caddr, nsize) < 0 )
+ { (void)brk((Vmuchar_t*)caddr+csize);
+ return NIL(Void_t*);
+ }
+ else return caddr;
+}
#endif /* _mem_sbrk */
-#if _mem_mmap_anon /* anonymous mmap */
- addr = (Vmuchar_t*)mmap(0, nsize, PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, -1, 0);
- if(addr && addr != (Vmuchar_t*)MAP_FAILED)
- { if(okaddr(addr,nsize) >= 0)
- return addr;
- (void)munmap((char*)addr, nsize); /* release reserved address */
- }
-#endif /* _mem_mmap_anon */
+#if _mem_mmap_anon || _mem_mmap_zero /* get space using mmap */
+#include <fcntl.h>
+#include <sys/mman.h>
-#if _mem_mmap_zero /* mmap from /dev/zero */
- if(mmdc->fd < 0)
+#ifndef MAP_ANON
+#ifdef MAP_ANONYMOUS
+#define MAP_ANON MAP_ANONYMOUS
+#else
+#define MAP_ANON 0
+#endif
+#endif /*MAP_ANON*/
+
+#ifndef OPEN_MAX
+#define OPEN_MAX 64
+#endif
+#define FD_INIT (-1) /* uninitialized file desc */
+#define FD_NONE (-2) /* no mapping with file desc */
+
+typedef struct _mmdisc_s
+{ Vmdisc_t disc;
+ int fd;
+ off_t offset;
+} Mmdisc_t;
+
+static Void_t* mmapmem(Void_t* caddr, size_t csize, size_t nsize, Mmdisc_t* mmdc)
+{
+#if _mem_mmap_zero
+ if(mmdc) /* /dev/zero mapping */
+ { if(mmdc->fd == FD_INIT ) /* open /dev/zero for mapping */
{ int fd;
- if(mmdc->fd != -1)
- return NIL(Void_t*);
if((fd = open("/dev/zero", O_RDONLY)) < 0 )
- { mmdc->fd = -2;
+ { mmdc->fd = FD_NONE;
return NIL(Void_t*);
}
- if(fd >= OPEN_PRIVATE || (mmdc->fd = dup2(fd,OPEN_PRIVATE)) < 0 )
- mmdc->fd = fd;
- else close(fd);
-#ifdef FD_CLOEXEC
- fcntl(mmdc->fd, F_SETFD, FD_CLOEXEC);
-#endif
- }
- addr = (Vmuchar_t*)mmap(0, nsize, PROT_READ|PROT_WRITE,
- MAP_PRIVATE, mmdc->fd, mmdc->offset);
- if(addr && addr != (Vmuchar_t*)MAP_FAILED)
- { if(okaddr(addr, nsize) >= 0)
- { mmdc->offset += nsize;
- return addr;
- }
- (void)munmap((char*)addr, nsize); /* release reserved address */
+ mmdc->fd = _vmfd(fd);
}
-#endif /* _mem_mmap_zero */
- return NIL(Void_t*);
+ if(mmdc->fd == FD_NONE)
+ return NIL(Void_t*);
}
- else
- {
+#endif /* _mem_mmap_zero */
-#if _mem_sbrk
- addr = (Vmuchar_t*)sbrk(0);
- if(!addr || addr == (Vmuchar_t*)BRK_FAILED)
- addr = caddr;
- else if(((Vmuchar_t*)caddr+csize) == addr) /* in sbrk-space */
- { if(nsize <= csize)
- addr -= csize-nsize;
- else if((addr += nsize-csize) < (Vmuchar_t*)caddr)
- return NIL(Void_t*); /* wrapped around address */
- else return brk(addr) == 0 ? caddr : NIL(Void_t*);
+ /**/ASSERT(csize > 0 || nsize > 0);
+ if(csize == 0)
+ { nsize = ROUND(nsize, _Vmpagesize);
+ caddr = NIL(Void_t*);
+#if _mem_mmap_zero
+ if(mmdc && mmdc->fd >= 0 )
+ caddr = mmap(0, nsize, PROT_READ|PROT_WRITE, MAP_PRIVATE, mmdc->fd, mmdc->offset);
+#endif
+#if _mem_mmap_anon
+ if(!mmdc )
+ caddr = mmap(0, nsize, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
+#endif
+ if(!caddr || caddr == (Void_t*)(-1))
+ return NIL(Void_t*);
+ else if(chkaddr((Vmuchar_t*)caddr, nsize) < 0 )
+ { (void)munmap(caddr, nsize);
+ return NIL(Void_t*);
+ }
+ else
+ { if(mmdc)
+ mmdc->offset += nsize;
+ return caddr;
}
-#else
- addr = caddr;
-#endif /* _mem_sbrk */
-
-#if _mem_mmap_zero || _mem_mmap_anon
- if(((Vmuchar_t*)caddr+csize) > addr) /* in mmap-space */
- if(nsize == 0 && munmap(caddr,csize) == 0)
- return caddr;
-#endif /* _mem_mmap_zero || _mem_mmap_anon */
-
- return NIL(Void_t*);
}
-#endif /*_done_sbrkmem*/
+ else if(nsize == 0)
+ { Vmuchar_t *addr = (Vmuchar_t*)sbrk(0);
+ if(addr < (Vmuchar_t*)caddr ) /* in sbrk space */
+ return NIL(Void_t*);
+ else
+ { (void)munmap(caddr, csize);
+ return caddr;
+ }
+ }
+ else return NIL(Void_t*);
+}
+#endif /* _mem_map_anon || _mem_mmap_zero */
-#if !_done_sbrkmem /* use native malloc/free as a last resort */
- /**/ASSERT(_std_malloc); /* _std_malloc should be well-defined */
- NOTUSED(vm);
- NOTUSED(disc);
+#if _std_malloc /* using native malloc as a last resource */
+static Void_t* mallocmem(Void_t* caddr, size_t csize, size_t nsize)
+{
+ /**/ASSERT(csize > 0 || nsize > 0);
if(csize == 0)
return (Void_t*)malloc(nsize);
else if(nsize == 0)
@@ -1431,13 +1289,52 @@ Vmdisc_t* disc; /* discipline structure */
return caddr;
}
else return NIL(Void_t*);
-#endif /* _done_sbrkmem */
}
+#endif
+/* A discipline to get raw memory using VirtualAlloc/mmap/sbrk */
+static Void_t* getmemory(Vmalloc_t* vm, Void_t* caddr, size_t csize, size_t nsize, Vmdisc_t* disc)
+{
+ Vmuchar_t *addr;
+
+ if((csize > 0 && !caddr) || (csize == 0 && nsize == 0) )
+ return NIL(Void_t*);
+
+#if _mem_win32
+ if((addr = win32mem(caddr, csize, nsize)) )
+ return (Void_t*)addr;
+#endif
+#if _mem_sbrk
+#if 1 /* no sbrk() unless explicit VM_break */
+ if((_Vmassert & VM_break) && (addr = sbrkmem(caddr, csize, nsize)) )
+#else /* asoinit(0,0,0)==0 => the application did not request a specific aso method => sbrk() ok */
+ if(((_Vmassert & VM_break) || !(_Vmassert & VM_mmap) && !asoinit(0, 0, 0)) && (addr = sbrkmem(caddr, csize, nsize)) )
+#endif
+ return (Void_t*)addr;
+#endif
+#if _mem_mmap_anon
+ if((addr = mmapmem(caddr, csize, nsize, (Mmdisc_t*)0)) )
+ return (Void_t*)addr;
+#endif
#if _mem_mmap_zero
-static Mmapdisc_t _Vmdcsbrk = { { sbrkmem, NIL(Vmexcept_f), 64*1024 }, -1, 0 };
+ if((addr = mmapmem(caddr, csize, nsize, (Mmdisc_t*)disc)) )
+ return (Void_t*)addr;
+#endif
+#if _mem_sbrk
+ if(!(_Vmassert & VM_break) && (addr = sbrkmem(caddr, csize, nsize)) )
+ return (Void_t*)addr;
+#endif
+#if _std_malloc
+ if((addr = mallocmem(caddr, csize, nsize)) )
+ return (Void_t*)addr;
+#endif
+ return NIL(Void_t*);
+}
+
+#if _mem_mmap_zero || _mem_mmap_anon
+static Mmdisc_t _Vmdcsystem = { { getmemory, NIL(Vmexcept_f), 64*1024, sizeof(Mmdisc_t) }, FD_INIT, 0 };
#else
-static Vmdisc_t _Vmdcsbrk = { sbrkmem, NIL(Vmexcept_f), 0 };
+static Vmdisc_t _Vmdcsystem = { getmemory, NIL(Vmexcept_f), 0, sizeof(Vmdisc_t) };
#endif
static Vmethod_t _Vmbest =
@@ -1455,13 +1352,16 @@ static Vmethod_t _Vmbest =
/* The heap region */
static Vmdata_t _Vmdata =
{
- VM_MTBEST|VM_TRUST, /* mode */
+ 0, /* lock */
+ VM_MTBEST|VM_SHARE, /* mode */
0, /* incr */
0, /* pool */
NIL(Seg_t*), /* seg */
NIL(Block_t*), /* free */
NIL(Block_t*), /* wild */
- NIL(Block_t*), /* root */
+ NIL(Block_t*) /* root */
+ /* tiny[] */
+ /* cache[] */
};
Vmalloc_t _Vmheap =
{
@@ -1477,7 +1377,7 @@ Vmalloc_t _Vmheap =
NIL(char*), /* file */
0, /* line */
0, /* func */
- (Vmdisc_t*)(&_Vmdcsbrk), /* disc */
+ (Vmdisc_t*)(&_Vmdcsystem), /* disc */
&_Vmdata, /* data */
NIL(Vmalloc_t*) /* next */
};
@@ -1485,7 +1385,8 @@ Vmalloc_t _Vmheap =
__DEFINE__(Vmalloc_t*, Vmheap, &_Vmheap);
__DEFINE__(Vmalloc_t*, Vmregion, &_Vmheap);
__DEFINE__(Vmethod_t*, Vmbest, &_Vmbest);
-__DEFINE__(Vmdisc_t*, Vmdcsbrk, (Vmdisc_t*)(&_Vmdcsbrk) );
+__DEFINE__(Vmdisc_t*, Vmdcsystem, (Vmdisc_t*)(&_Vmdcsystem) );
+__DEFINE__(Vmdisc_t*, Vmdcsbrk, (Vmdisc_t*)(&_Vmdcsystem) );
#ifdef NoF
NoF(vmbest)
diff --git a/usr/src/lib/libast/common/vmalloc/vmclear.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmclear.c
index fd3f17f8f4..c4b81079e8 100644
--- a/usr/src/lib/libast/common/vmalloc/vmclear.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmclear.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -38,21 +38,12 @@ int vmclear(vm)
Vmalloc_t* vm;
#endif
{
- reg Seg_t* seg;
- reg Seg_t* next;
- reg Block_t* tp;
- reg size_t size, s;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
+ Seg_t *seg, *next;
+ Block_t *tp;
+ size_t size, s;
+ Vmdata_t *vd = vm->data;
- SETINUSE(vd, inuse);
- if(!(vd->mode&VM_TRUST) )
- { if(ISLOCK(vd,0))
- { CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd,0);
- }
+ SETLOCK(vm, 0);
vd->free = vd->wild = NIL(Block_t*);
vd->pool = 0;
@@ -86,8 +77,8 @@ Vmalloc_t* vm;
SIZE(tp) = BUSY;
}
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, 0);
+
return 0;
}
diff --git a/usr/src/lib/libast/common/vmalloc/vmclose.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmclose.c
index 39ff5dc603..576cbe40db 100644
--- a/usr/src/lib/libast/common/vmalloc/vmclose.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmclose.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -41,47 +41,49 @@ Vmalloc_t* vm;
Seg_t *seg, *vmseg, *next;
Vmalloc_t *v, *last;
Vmdata_t* vd = vm->data;
- int ev = 0;
+ Vmdisc_t* disc = vm->disc;
+ int mode, rv = 0;
- if(vm == Vmheap)
+ if(vm == Vmheap) /* the heap is never freed */
return -1;
- if(!(vd->mode&VM_TRUST) && ISLOCK(vd,0))
+ if(vm->disc->exceptf && /* announcing closing event */
+ (rv = (*vm->disc->exceptf)(vm,VM_CLOSE,(Void_t*)1,vm->disc)) < 0 )
return -1;
- if(vm->disc->exceptf &&
- (ev = (*vm->disc->exceptf)(vm,VM_CLOSE,NIL(Void_t*),vm->disc)) < 0 )
- return -1;
-
- /* make this region inaccessible until it disappears */
- vd->mode &= ~VM_TRUST;
- SETLOCK(vd,0);
+ mode = vd->mode; /* remember this in case it gets destroyed below */
- if((vd->mode&VM_MTPROFILE) && _Vmpfclose)
+ if((mode&VM_MTPROFILE) && _Vmpfclose)
(*_Vmpfclose)(vm);
- /* remove from linked list of regions */
+ /* remove from linked list of regions */
+ _vmlock(NIL(Vmalloc_t*), 1);
for(last = Vmheap, v = last->next; v; last = v, v = v->next)
{ if(v == vm)
{ last->next = v->next;
break;
}
}
+ _vmlock(NIL(Vmalloc_t*), 0);
- if(ev == 0)
- { vmseg = NIL(Seg_t*);
+ if(rv == 0) /* deallocate memory obtained from the system */
+ { /* lock-free because alzheimer can cause deadlocks :) */
+ vmseg = NIL(Seg_t*);
for(seg = vd->seg; seg; seg = next)
{ next = seg->next;
- if(seg->extent == seg->size)
- vmseg = seg;
- else (*vm->disc->memoryf)(vm,seg->addr,seg->extent,0,vm->disc);
+ if(seg->extent == seg->size) /* root segment */
+ vmseg = seg; /* don't free this yet */
+ else (*disc->memoryf)(vm,seg->addr,seg->extent,0,disc);
}
- if(vmseg)
- (*vm->disc->memoryf)(vm,vmseg->addr,vmseg->extent,0,vm->disc);
+ if(vmseg) /* now safe to free root segment */
+ (*disc->memoryf)(vm,vmseg->addr,vmseg->extent,0,disc);
}
- else CLRLOCK(vd,0);
- vmfree(Vmheap,vm);
+ if(disc->exceptf) /* finalizing closing */
+ (void)(*disc->exceptf)(vm, VM_ENDCLOSE, (Void_t*)0, disc);
+
+ if(!(mode & VM_MEMORYF) )
+ vmfree(Vmheap,vm);
return 0;
}
diff --git a/usr/src/lib/libast/common/vmalloc/vmdcheap.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmdcheap.c
index 59ed6bfed1..88edc725d3 100644
--- a/usr/src/lib/libast/common/vmalloc/vmdcheap.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmdcheap.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -44,10 +44,9 @@ size_t nsize; /* new size */
Vmdisc_t* disc; /* discipline structure */
#endif
{
- NOTUSED(vm);
- NOTUSED(disc);
-
- if(csize == 0)
+ if(csize == 0 && nsize == 0)
+ return NIL(Void_t*);
+ else if(csize == 0)
return vmalloc(Vmheap,nsize);
else if(nsize == 0)
return vmfree(Vmheap,caddr) >= 0 ? caddr : NIL(Void_t*);
diff --git a/usr/src/lib/libast/common/vmalloc/vmdebug.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmdebug.c
index 3cb1e3963e..22bb207598 100644
--- a/usr/src/lib/libast/common/vmalloc/vmdebug.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmdebug.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -54,8 +54,6 @@ static Void_t* Dbwatch[S_WATCH];
#define DB_WATCH 4
#define DB_RESIZED 5
-#define LONGV(x) ((Vmulong_t)(x))
-
static int Dbinit = 0;
#define DBINIT() (Dbinit ? 0 : (dbinit(), Dbinit=1) )
static void dbinit()
@@ -77,6 +75,7 @@ int fd;
return old;
}
+
/* just an entry point to make it easy to set break point */
#if __STD_C
static void vmdbwarn(Vmalloc_t* vm, char* mesg, int n)
@@ -97,15 +96,15 @@ int n;
/* issue a warning of some type */
#if __STD_C
static void dbwarn(Vmalloc_t* vm, Void_t* data, int where,
- const char* file, int line, const Void_t* func, int type)
+ char* file, int line, Void_t* func, int type)
#else
static void dbwarn(vm, data, where, file, line, func, type)
Vmalloc_t* vm; /* region holding the block */
Void_t* data; /* data block */
int where; /* byte that was corrupted */
-const char* file; /* file where call originates */
+char* file; /* file where call originates */
int line; /* line number of call */
-const Void_t* func; /* function called from */
+Void_t* func; /* function called from */
int type; /* operation being done */
#endif
{
@@ -149,7 +148,7 @@ int type; /* operation being done */
}
else if(type == DB_WATCH)
{ bufp = (*_Vmstrcpy)(bufp, "size", '=');
- bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(DBSIZE(data),-1), ':');
+ bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)((Vmulong_t)DBSIZE(data),-1), ':');
if(where == DB_ALLOC)
bufp = (*_Vmstrcpy)(bufp,"just allocated", ':');
else if(where == DB_FREE)
@@ -161,11 +160,11 @@ int type; /* operation being done */
}
else if(type == DB_CHECK)
{ bufp = (*_Vmstrcpy)(bufp, "bad byte at", '=');
- bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(LONGV(where),-1), ':');
+ bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(where),-1), ':');
if((s = DBFILE(data)) && (bufp + strlen(s) + SLOP) < endbuf)
{ bufp = (*_Vmstrcpy)(bufp,"allocated at", '=');
bufp = (*_Vmstrcpy)(bufp, s, ',');
- bufp = (*_Vmstrcpy)(bufp,(*_Vmitoa)(LONGV(DBLINE(data)),-1),':');
+ bufp = (*_Vmstrcpy)(bufp,(*_Vmitoa)(VLONG(DBLINE(data)),-1),':');
}
}
@@ -173,27 +172,27 @@ int type; /* operation being done */
if(file && file[0] && line > 0 && (bufp + strlen(file) + SLOP) < endbuf)
{ bufp = (*_Vmstrcpy)(bufp, "detected at", '=');
bufp = (*_Vmstrcpy)(bufp, file, ',');
- bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(LONGV(line),-1), ',');
+ bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(line),-1), ',');
bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(func),-1), ':');
}
- *(bufp - 1) = '\n';
+ *bufp++ = '\n';
*bufp = '\0';
- vmdbwarn(vm,buf,(bufp-buf));
+ vmdbwarn(vm,buf,(int)(bufp-buf));
}
/* check for watched address and issue warnings */
#if __STD_C
static void dbwatch(Vmalloc_t* vm, Void_t* data,
- const char* file, int line, const Void_t* func, int type)
+ char* file, int line, Void_t* func, int type)
#else
static void dbwatch(vm, data, file, line, func, type)
Vmalloc_t* vm;
Void_t* data;
-const char* file;
+char* file;
int line;
-const Void_t* func;
+Void_t* func;
int type;
#endif
{
@@ -209,12 +208,12 @@ int type;
/* record information about the block */
#if __STD_C
-static void dbsetinfo(Vmuchar_t* data, size_t size, const char* file, int line)
+static void dbsetinfo(Vmuchar_t* data, size_t size, char* file, int line)
#else
static void dbsetinfo(data, size, file, line)
Vmuchar_t* data; /* real address not the one from Vmbest */
size_t size; /* the actual requested size */
-const char* file; /* file where the request came from */
+char* file; /* file where the request came from */
int line; /* and line number */
#endif
{
@@ -235,13 +234,13 @@ int line; /* and line number */
if(db)
{ (*_Vmstrcpy)(db->file,file,0);
db->next = Dbfile;
- Dbfile = db->next;
+ Dbfile = db;
}
}
else if(last) /* move-to-front heuristic */
{ last->next = db->next;
db->next = Dbfile;
- Dbfile = db->next;
+ Dbfile = db;
}
}
@@ -262,27 +261,21 @@ int line; /* and line number */
** if block is live, 0 if no match.
*/
#if __STD_C
-static long dbaddr(Vmalloc_t* vm, Void_t* addr)
+static long dbaddr(Vmalloc_t* vm, Void_t* addr, int local)
#else
-static long dbaddr(vm, addr)
+static long dbaddr(vm, addr, local)
Vmalloc_t* vm;
Void_t* addr;
+int local;
#endif
{
reg Block_t *b, *endb;
- reg Seg_t* seg;
- reg Vmuchar_t* data;
+ reg Seg_t *seg;
+ reg Vmuchar_t *data;
reg long offset = -1L;
- reg Vmdata_t* vd = vm->data;
- reg int local, inuse;
+ reg Vmdata_t *vd = vm->data;
- SETINUSE(vd, inuse);
- GETLOCAL(vd,local);
- if(ISLOCK(vd,local) || !addr)
- { CLRINUSE(vd, inuse);
- return -1L;
- }
- SETLOCK(vd,local);
+ SETLOCK(vm, local);
b = endb = NIL(Block_t*);
for(seg = vd->seg; seg; seg = seg->next)
@@ -295,7 +288,7 @@ Void_t* addr;
if(!seg)
goto done;
- if(local) /* must be vmfree or vmresize checking address */
+ if(local) /* must be vmfree or vmresize checking address */
{ if(DBSEG(addr) == seg)
{ b = DBBLOCK(addr);
if(ISBUSY(SIZE(b)) && !ISJUNK(SIZE(b)) )
@@ -312,7 +305,7 @@ Void_t* addr;
{ data = DB2DEBUG(data);
if((Vmuchar_t*)addr >= data &&
(Vmuchar_t*)addr < data+DBSIZE(data))
- offset = (Vmuchar_t*)addr - data;
+ offset = (long)((Vmuchar_t*)addr - data);
}
goto done;
}
@@ -321,32 +314,26 @@ Void_t* addr;
}
done:
- CLRLOCK(vd,local);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
return offset;
}
#if __STD_C
-static long dbsize(Vmalloc_t* vm, Void_t* addr)
+static long dbsize(Vmalloc_t* vm, Void_t* addr, int local)
#else
-static long dbsize(vm, addr)
+static long dbsize(vm, addr, local)
Vmalloc_t* vm;
Void_t* addr;
+int local;
#endif
{
- reg Block_t *b, *endb;
- reg Seg_t* seg;
- reg long size;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
+ Block_t *b, *endb;
+ Seg_t *seg;
+ long size;
+ Vmdata_t *vd = vm->data;
- SETINUSE(vd, inuse);
- if(ISLOCK(vd,0))
- { CLRINUSE(vd, inuse);
- return -1L;
- }
- SETLOCK(vd,0);
+ SETLOCK(vm, local);
size = -1L;
for(seg = vd->seg; seg; seg = seg->next)
@@ -365,37 +352,30 @@ Void_t* addr;
b = (Block_t*)((Vmuchar_t*)DATA(b) + (SIZE(b)&~BITS) );
}
}
+
done:
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
return size;
}
#if __STD_C
-static Void_t* dballoc(Vmalloc_t* vm, size_t size)
+static Void_t* dballoc(Vmalloc_t* vm, size_t size, int local)
#else
-static Void_t* dballoc(vm, size)
+static Void_t* dballoc(vm, size, local)
Vmalloc_t* vm;
size_t size;
+int local;
#endif
{
- reg size_t s;
- reg Vmuchar_t* data;
- reg char* file;
- reg int line;
- reg Void_t* func;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
-
- SETINUSE(vd, inuse);
+ size_t s;
+ Vmuchar_t *data;
+ char *file;
+ int line;
+ Void_t *func;
+ Vmdata_t *vd = vm->data;
VMFLF(vm,file,line,func);
- if(ISLOCK(vd,0) )
- { dbwarn(vm,NIL(Vmuchar_t*),0,file,line,func,DB_ALLOC);
- CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,0);
+ SETLOCK(vm, local);
if(vd->mode&VM_DBCHECK)
vmdbcheck(vm);
@@ -421,181 +401,159 @@ size_t size;
dbwatch(vm,data,file,line,func,DB_ALLOC);
done:
- CLRLOCK(vd,0);
- ANNOUNCE(0, vm, VM_ALLOC, (Void_t*)data, vm->disc);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
+
return (Void_t*)data;
}
#if __STD_C
-static int dbfree(Vmalloc_t* vm, Void_t* data )
+static int dbfree(Vmalloc_t* vm, Void_t* data, int local )
#else
-static int dbfree(vm, data )
+static int dbfree(vm, data, local )
Vmalloc_t* vm;
Void_t* data;
+int local;
#endif
{
- char* file;
+ char *file;
int line;
- Void_t* func;
- reg long offset;
- reg int rv, *ip, *endip;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
-
- SETINUSE(vd, inuse);
+ Void_t *func;
+ long offset;
+ int rv, *ip, *endip;
+ Vmdata_t *vd = vm->data;
VMFLF(vm,file,line,func);
if(!data)
- { CLRINUSE(vd, inuse);
return 0;
- }
- if(ISLOCK(vd,0) )
- { dbwarn(vm,NIL(Vmuchar_t*),0,file,line,func,DB_FREE);
- CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd,0);
+ SETLOCK(vm, local);
if(vd->mode&VM_DBCHECK)
vmdbcheck(vm);
if((offset = KPVADDR(vm,data,dbaddr)) != 0)
{ dbwarn(vm,(Vmuchar_t*)data,offset == -1L ? 0 : 1,file,line,func,DB_FREE);
- if(vm->disc->exceptf)
- (void)(*vm->disc->exceptf)(vm,VM_BADADDR,data,vm->disc);
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
- return -1;
+ rv = -1;
}
+ else
+ { if(Dbnwatch > 0)
+ dbwatch(vm,data,file,line,func,DB_FREE);
- if(Dbnwatch > 0)
- dbwatch(vm,data,file,line,func,DB_FREE);
+ if((vd->mode&VM_TRACE) && _Vmtrace)
+ { vm->file = file; vm->line = line; vm->func = func;
+ (*_Vmtrace)(vm,(Vmuchar_t*)data,NIL(Vmuchar_t*),DBSIZE(data),0);
+ }
- if((vd->mode&VM_TRACE) && _Vmtrace)
- { vm->file = file; vm->line = line; vm->func = func;
- (*_Vmtrace)(vm,(Vmuchar_t*)data,NIL(Vmuchar_t*),DBSIZE(data),0);
- }
+ /* clear free space */
+ ip = (int*)data;
+ endip = ip + (DBSIZE(data)+sizeof(int)-1)/sizeof(int);
+ while(ip < endip)
+ *ip++ = 0;
- /* clear free space */
- ip = (int*)data;
- endip = ip + (DBSIZE(data)+sizeof(int)-1)/sizeof(int);
- while(ip < endip)
- *ip++ = 0;
+ rv = KPVFREE((vm), (Void_t*)DB2BEST(data), (*Vmbest->freef));
+ }
- rv = KPVFREE((vm), (Void_t*)DB2BEST(data), (*Vmbest->freef));
- CLRLOCK(vd,0);
- ANNOUNCE(0, vm, VM_FREE, data, vm->disc);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
return rv;
}
/* Resizing an existing block */
#if __STD_C
-static Void_t* dbresize(Vmalloc_t* vm, Void_t* addr, reg size_t size, int type)
+static Void_t* dbresize(Vmalloc_t* vm, Void_t* addr, reg size_t size, int type, int local)
#else
-static Void_t* dbresize(vm,addr,size,type)
-Vmalloc_t* vm; /* region allocating from */
-Void_t* addr; /* old block of data */
-reg size_t size; /* new size */
-int type; /* !=0 for movable, >0 for copy */
+static Void_t* dbresize(vm, addr, size, type, local)
+Vmalloc_t* vm; /* region allocating from */
+Void_t* addr; /* old block of data */
+reg size_t size; /* new size */
+int type; /* !=0 for movable, >0 for copy */
+int local;
#endif
{
- reg Vmuchar_t* data;
- reg size_t s, oldsize;
- reg long offset;
+ Vmuchar_t *data;
+ long offset;
+ size_t s, oldsize;
char *file, *oldfile;
int line, oldline;
- Void_t* func;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
+ Void_t *func;
+ Vmdata_t *vd = vm->data;
+ VMFLF(vm,file,line,func);
- SETINUSE(vd, inuse);
if(!addr)
- { oldsize = 0;
- data = (Vmuchar_t*)dballoc(vm,size);
- goto done;
+ { vm->file = file; vm->line = line;
+ data = (Vmuchar_t*)dballoc(vm, size, local);
+ if(data && (type&VM_RSZERO) )
+ memset((Void_t*)data, 0, size);
+ return data;
}
if(size == 0)
- { (void)dbfree(vm,addr);
- CLRINUSE(vd, inuse);
+ { vm->file = file; vm->line = line;
+ (void)dbfree(vm, addr, local);
return NIL(Void_t*);
}
- VMFLF(vm,file,line,func);
-
- if(ISLOCK(vd,0) )
- { dbwarn(vm,NIL(Vmuchar_t*),0,file,line,func,DB_RESIZE);
- CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,0);
+ SETLOCK(vm, local);
if(vd->mode&VM_DBCHECK)
vmdbcheck(vm);
if((offset = KPVADDR(vm,addr,dbaddr)) != 0)
{ dbwarn(vm,(Vmuchar_t*)addr,offset == -1L ? 0 : 1,file,line,func,DB_RESIZE);
- if(vm->disc->exceptf)
- (void)(*vm->disc->exceptf)(vm,VM_BADADDR,addr,vm->disc);
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
-
- if(Dbnwatch > 0)
- dbwatch(vm,addr,file,line,func,DB_RESIZE);
-
- /* Vmbest data block */
- data = DB2BEST(addr);
- oldsize = DBSIZE(addr);
- oldfile = DBFILE(addr);
- oldline = DBLINE(addr);
-
- /* do the resize */
- s = ROUND(size,ALIGN) + DB_EXTRA;
- if(s < sizeof(Body_t))
- s = sizeof(Body_t);
- data = (Vmuchar_t*)KPVRESIZE(vm,(Void_t*)data,s,
- (type&~VM_RSZERO),(*(Vmbest->resizef)) );
- if(!data) /* failed, reset data for old block */
- { dbwarn(vm,NIL(Vmuchar_t*),DB_ALLOC,file,line,func,DB_RESIZE);
- dbsetinfo((Vmuchar_t*)addr,oldsize,oldfile,oldline);
+ data = NIL(Vmuchar_t*);
}
else
- { data = DB2DEBUG(data);
- dbsetinfo(data,size,file,line);
+ { if(Dbnwatch > 0)
+ dbwatch(vm,addr,file,line,func,DB_RESIZE);
+
+ /* Vmbest data block */
+ data = DB2BEST(addr);
+ oldsize = DBSIZE(addr);
+ oldfile = DBFILE(addr);
+ oldline = DBLINE(addr);
+
+ /* do the resize */
+ s = ROUND(size,ALIGN) + DB_EXTRA;
+ if(s < sizeof(Body_t))
+ s = sizeof(Body_t);
+ data = (Vmuchar_t*)KPVRESIZE(vm,(Void_t*)data,s,
+ (type&~VM_RSZERO),(*(Vmbest->resizef)) );
+ if(!data) /* failed, reset data for old block */
+ { dbwarn(vm,NIL(Vmuchar_t*),DB_ALLOC,file,line,func,DB_RESIZE);
+ dbsetinfo((Vmuchar_t*)addr,oldsize,oldfile,oldline);
+ }
+ else
+ { data = DB2DEBUG(data);
+ dbsetinfo(data,size,file,line);
+
+ if((vd->mode&VM_TRACE) && _Vmtrace)
+ { vm->file = file; vm->line = line;
+ (*_Vmtrace)(vm,(Vmuchar_t*)addr,data,size,0);
+ }
+ if(Dbnwatch > 0)
+ dbwatch(vm,data,file,line,func,DB_RESIZED);
+ }
- if((vd->mode&VM_TRACE) && _Vmtrace)
- { vm->file = file; vm->line = line;
- (*_Vmtrace)(vm,(Vmuchar_t*)addr,data,size,0);
+ if(data && (type&VM_RSZERO) && size > oldsize)
+ { Vmuchar_t *d = data+oldsize, *ed = data+size;
+ do { *d++ = 0; } while(d < ed);
}
- if(Dbnwatch > 0)
- dbwatch(vm,data,file,line,func,DB_RESIZED);
}
- CLRLOCK(vd,0);
- ANNOUNCE(0, vm, VM_RESIZE, (Void_t*)data, vm->disc);
+ CLRLOCK(vm, local);
-done: if(data && (type&VM_RSZERO) && size > oldsize)
- { reg Vmuchar_t *d = data+oldsize, *ed = data+size;
- do { *d++ = 0; } while(d < ed);
- }
- CLRINUSE(vd, inuse);
return (Void_t*)data;
}
/* compact any residual free space */
#if __STD_C
-static int dbcompact(Vmalloc_t* vm)
+static int dbcompact(Vmalloc_t* vm, int local)
#else
-static int dbcompact(vm)
+static int dbcompact(vm, local)
Vmalloc_t* vm;
+int local;
#endif
{
- return (*(Vmbest->compactf))(vm);
+ return (*(Vmbest->compactf))(vm, local);
}
/* check for memory overwrites over all live blocks */
@@ -615,7 +573,7 @@ Vmalloc_t* vm;
if(vd->mode & (VM_MTDEBUG|VM_MTBEST|VM_MTPROFILE))
{ if(_vmbestcheck(vd, NIL(Block_t*)) < 0)
return -1;
- if(!(vd->mode&VM_MTDEBUG))
+ if(!(vd->mode&VM_MTDEBUG) )
return 0;
}
else return -1;
@@ -646,7 +604,7 @@ Vmalloc_t* vm;
{ if(*begp == DB_MAGIC)
continue;
set_bad:
- dbwarn(vm,data,begp-data,NIL(char*),0,0,DB_CHECK);
+ dbwarn(vm,data,(long)(begp-data),vm->file,vm->line,0,DB_CHECK);
DBSETBAD(data);
rv += 1;
goto next;
@@ -664,7 +622,7 @@ Vmalloc_t* vm;
Void_t* vmdbwatch(Void_t* addr)
#else
Void_t* vmdbwatch(addr)
-Void_t* addr; /* address to insert */
+Void_t* addr; /* address to insert */
#endif
{
reg int n;
@@ -693,54 +651,43 @@ Void_t* addr; /* address to insert */
}
#if __STD_C
-static Void_t* dbalign(Vmalloc_t* vm, size_t size, size_t align)
+static Void_t* dbalign(Vmalloc_t* vm, size_t size, size_t align, int local)
#else
-static Void_t* dbalign(vm, size, align)
+static Void_t* dbalign(vm, size, align, local)
Vmalloc_t* vm;
size_t size;
size_t align;
+int local;
#endif
{
- reg Vmuchar_t* data;
- reg size_t s;
- reg char* file;
- reg int line;
- reg Void_t* func;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
-
- SETINUSE(vd, inuse);
+ Vmuchar_t *data;
+ size_t s;
+ char *file;
+ int line;
+ Void_t *func;
+ Vmdata_t *vd = vm->data;
VMFLF(vm,file,line,func);
if(size <= 0 || align <= 0)
- { CLRINUSE(vd, inuse);
return NIL(Void_t*);
- }
- if(ISLOCK(vd,0) )
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,0);
+ SETLOCK(vm, local);
if((s = ROUND(size,ALIGN) + DB_EXTRA) < sizeof(Body_t))
s = sizeof(Body_t);
- if(!(data = (Vmuchar_t*)KPVALIGN(vm,s,align,(*(Vmbest->alignf)))) )
- goto done;
-
- data += DB_HEAD;
- dbsetinfo(data,size,file,line);
+ if((data = (Vmuchar_t*)KPVALIGN(vm,s,align,(*(Vmbest->alignf)))) )
+ { data += DB_HEAD;
+ dbsetinfo(data,size,file,line);
- if((vd->mode&VM_TRACE) && _Vmtrace)
- { vm->file = file; vm->line = line; vm->func = func;
- (*_Vmtrace)(vm,NIL(Vmuchar_t*),data,size,align);
+ if((vd->mode&VM_TRACE) && _Vmtrace)
+ { vm->file = file; vm->line = line; vm->func = func;
+ (*_Vmtrace)(vm,NIL(Vmuchar_t*),data,size,align);
+ }
}
-done:
- CLRLOCK(vd,0);
- ANNOUNCE(0, vm, VM_ALLOC, (Void_t*)data, vm->disc);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
+
return (Void_t*)data;
}
@@ -757,11 +704,11 @@ Vmalloc_t* vm;
vmstat(vm ? vm : Vmregion, &st);
bufp = buf;
bufp = (*_Vmstrcpy)(bufp, "n_busy", '=');
- bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)((Vmulong_t)st.n_busy,-1), ',');
+ bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(st.n_busy),-1), ',');
bufp = (*_Vmstrcpy)(bufp, " s_busy", '=');
bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(st.s_busy),-1), '\n');
bufp = (*_Vmstrcpy)(bufp, "n_free", '=');
- bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)((Vmulong_t)st.n_free,-1), ',');
+ bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(st.n_free),-1), ',');
bufp = (*_Vmstrcpy)(bufp, " s_free", '=');
bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(st.s_free),-1), '\n');
bufp = (*_Vmstrcpy)(bufp, "m_busy", '=');
@@ -769,7 +716,7 @@ Vmalloc_t* vm;
bufp = (*_Vmstrcpy)(bufp, " m_free", '=');
bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(st.m_free),-1), '\n');
bufp = (*_Vmstrcpy)(bufp, "n_segment", '=');
- bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)((Vmulong_t)st.n_seg,-1), ',');
+ bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(st.n_seg),-1), ',');
bufp = (*_Vmstrcpy)(bufp, " extent", '=');
bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(st.extent),-1), '\n');
*bufp = 0;
diff --git a/usr/src/lib/libast/common/vmalloc/vmdisc.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmdisc.c
index 139b34b423..3f4efbfb39 100644
--- a/usr/src/lib/libast/common/vmalloc/vmdisc.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmdisc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,7 +28,7 @@ void _STUB_vmdisc(){}
#include "vmhdr.h"
/* Change the discipline for a region. The old discipline
-** is returned. If the new discipline is NIL then the
+** is returned. If the new discipline is NULL then the
** discipline is not changed.
**
** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
@@ -44,9 +44,7 @@ Vmdisc_t* disc;
Vmdisc_t* old = vm->disc;
if(disc)
- { if(disc->memoryf != old->memoryf)
- return NIL(Vmdisc_t*);
- if(old->exceptf &&
+ { if(old->exceptf &&
(*old->exceptf)(vm,VM_DISC,(Void_t*)disc,old) != 0 )
return NIL(Vmdisc_t*);
vm->disc = disc;
diff --git a/usr/src/lib/libast/common/vmalloc/vmexit.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmexit.c
index ea81177546..c027fd56ca 100644
--- a/usr/src/lib/libast/common/vmalloc/vmexit.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmexit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,7 +19,7 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-#if defined(_UWIN)
+#if defined(_UWIN) && defined(_BLD_ast)
void _STUB_vmexit(){}
diff --git a/usr/src/lib/libast/common/vmalloc/vmgetmem.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmgetmem.c
index 607c10f280..e205fd3832 100644
--- a/usr/src/lib/libast/common/vmalloc/vmgetmem.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmgetmem.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -19,13 +19,7 @@
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-#if defined(_UWIN) && defined(_BLD_ast)
-
-void _STUB_vmgetmem(){}
-
-#else
-
-#include "vmhdr.h"
+#include <vmalloc.h>
/*
* vm open/close/resize - a handy default for discipline memory functions
@@ -55,5 +49,3 @@ size_t size;
vmclose(vm);
return 0;
}
-
-#endif
diff --git a/usr/src/lib/libast/common/vmalloc/vmhdr.h b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmhdr.h
index d1b04f7505..3a70acd713 100644
--- a/usr/src/lib/libast/common/vmalloc/vmhdr.h
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmhdr.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -71,31 +71,24 @@
#define _npt_sbrk 1
#endif
-#ifndef integralof
-#define integralof(x) (((char*)(x))-((char*)0))
-#endif
+#undef free
+#undef malloc
+#undef realloc
#endif /*_PACKAGE_ast*/
#include "FEATURE/vmalloc"
-#include <setjmp.h>
+#include <aso.h> /* atomic scalor operations */
+#include <setjmp.h> /* use the type jmp_buf for alignment */
-/* the below macros decide which combinations of sbrk() or mmap() to used */
+/* extra information needed about methods to get memory from the system */
#if defined(_WIN32)
-#define _mem_win32 1
-#undef _mem_sbrk
-#undef _mem_mmap_anon
-#undef _mem_mmap_zero
+#define _mem_win32 1 /* use the VirtualAlloc interface */
#endif
-
-#if _mem_mmap_anon
-#undef _mem_mmap_zero
-#endif
-
#if !_mem_win32 && !_mem_sbrk && !_mem_mmap_anon && !_mem_mmap_zero
#undef _std_malloc
-#define _std_malloc 1 /* do not define malloc/free/realloc */
+#define _std_malloc 1 /* use native malloc/free/realloc */
#endif
typedef unsigned char Vmuchar_t;
@@ -107,10 +100,6 @@ typedef struct _block_s Block_t;
typedef struct _seg_s Seg_t;
typedef struct _pfobj_s Pfobj_t;
-#if !_typ_ssize_t
-typedef int ssize_t;
-#endif
-
#define NIL(t) ((t)0)
#define reg register
#if __STD_C
@@ -119,8 +108,9 @@ typedef int ssize_t;
#define NOTUSED(x) (&x,1)
#endif
+
/* convert an address to an integral value */
-#define VLONG(addr) ((Vmulong_t)((char*)(addr) - (char*)0) )
+#define VLONG(addr) ((Vmulong_t)((Vmuchar_t*)((Vmulong_t)addr) - (Vmuchar_t*)0) )
/* Round x up to a multiple of y. ROUND2 does powers-of-2 and ROUNDX does others */
#define ROUND2(x,y) (((x) + ((y)-1)) & ~((y)-1))
@@ -130,10 +120,12 @@ typedef int ssize_t;
/* compute a value that is a common multiple of x and y */
#define MULTIPLE(x,y) ((x)%(y) == 0 ? (x) : (y)%(x) == 0 ? (y) : (y)*(x))
-#define VM_check 0x0001 /* enable detailed checks */
-#define VM_abort 0x0002 /* abort() on assertion failure */
-#define VM_region 0x0004 /* enable region segment checks */
-#define VM_mmap 0x0010 /* favor mmap allocation */
+#define VM_abort 0x0001 /* abort() on assertion failure */
+#define VM_break 0x0002 /* try sbrk() block allocator first */
+#define VM_check 0x0004 /* enable detailed checks */
+#define VM_free 0x0008 /* disable addfreelist() */
+#define VM_keep 0x0010 /* disable free() */
+#define VM_mmap 0x0020 /* try mmap() block allocator first */
#if _UWIN
#include <ast_windows.h>
@@ -146,11 +138,11 @@ typedef int ssize_t;
#endif /*DEBUG*/
#if DEBUG
extern void _vmmessage _ARG_((const char*, long, const char*, long));
+#define MESSAGE(s) _vmmessage(__FILE__,__LINE__,s,0)
#define ABORT() (_Vmassert & VM_abort)
#define CHECK() (_Vmassert & VM_check)
#define ASSERT(p) ((p) ? 0 : (MESSAGE("Assertion failed"), ABORT() ? (abort(),0) : 0))
#define COUNT(n) ((n) += 1)
-#define MESSAGE(s) _vmmessage(__FILE__,__LINE__,s,0)
#else
#define ABORT() (0)
#define ASSERT(p)
@@ -160,25 +152,12 @@ extern void _vmmessage _ARG_((const char*, long, const char*, long));
#endif /*DEBUG*/
#define VMPAGESIZE 8192
-
-#if _AST_PAGESIZE > VMPAGESIZE
-#undef VMPAGESIZE
-#define VMPAGESIZE _AST_PAGESIZE
-#endif
-
-#if _lib_getpagesize && !defined(_AST_PAGESIZE)
-#define GETPAGESIZE(x) ((x) ? (x) : \
- (((x)=getpagesize()) < VMPAGESIZE ? ((x)=VMPAGESIZE) : (x)) )
+#if _lib_getpagesize
+#define GETPAGESIZE(x) ((x) ? (x) : ((x)=getpagesize()) )
#else
#define GETPAGESIZE(x) ((x) = VMPAGESIZE)
#endif
-#ifdef _AST_PAGESIZE
-#define VMHEAPINCR (_Vmpagesize*1)
-#else
-#define VMHEAPINCR (_Vmpagesize*4)
-#endif
-
/* Blocks are allocated such that their sizes are 0%(BITS+1)
** This frees up enough low order bits to store state information
*/
@@ -206,36 +185,20 @@ extern void _vmmessage _ARG_((const char*, long, const char*, long));
#define OFFSET(t,e) ((size_t)(&(((t*)0)->e)) )
-/* these bits share the "mode" field with the public bits */
-#define VM_AGAIN 0010000 /* research the arena for space */
-#define VM_LOCK 0020000 /* region is locked */
-#define VM_LOCAL 0040000 /* local call, bypass lock */
-#define VM_INUSE 0004000 /* some operation is running */
-#define VM_UNUSED 0100060
#define VMETHOD(vd) ((vd)->mode&VM_METHODS)
-/* test/set/clear lock state */
-#define SETINUSE(vd,iu) (((iu) = (vd)->mode&VM_INUSE), ((vd)->mode |= VM_INUSE) )
-#define CLRINUSE(vd,iu) ((iu) ? 0 : ((vd)->mode &= ~VM_INUSE) )
-#define SETLOCAL(vd) ((vd)->mode |= VM_LOCAL)
-#define GETLOCAL(vd,l) (((l) = (vd)->mode&VM_LOCAL), ((vd)->mode &= ~VM_LOCAL) )
-#define ISLOCK(vd,l) ((l) ? 0 : ((vd)->mode & VM_LOCK) )
-#define SETLOCK(vd,l) ((l) ? 0 : ((vd)->mode |= VM_LOCK) )
-#define CLRLOCK(vd,l) ((l) ? 0 : ((vd)->mode &= ~VM_LOCK) )
-
-/* announcing entry/exit of allocation calls */
-#define ANNOUNCE(lc, vm,ev,dt,dc) \
- (( ((lc)&VM_LOCAL) || !(dc) || !(dc)->exceptf ) ? 0 : \
- (*(dc)->exceptf)((vm), (ev), (Void_t*)(dt), (dc)) )
-
+/* lock and unlock regions during concurrent accesses */
+#define SETLOCK(vm,l) ((l) ? 0 : _vmlock((vm), 1) )
+#define CLRLOCK(vm,l) ((l) ? 0 : _vmlock((vm), 0) )
/* local calls */
-#define KPVALLOC(vm,sz,func) (SETLOCAL((vm)->data), func((vm),(sz)) )
-#define KPVALIGN(vm,sz,al,func) (SETLOCAL((vm)->data), func((vm),(sz),(al)) )
-#define KPVFREE(vm,d,func) (SETLOCAL((vm)->data), func((vm),(d)) )
-#define KPVRESIZE(vm,d,sz,mv,func) (SETLOCAL((vm)->data), func((vm),(d),(sz),(mv)) )
-#define KPVADDR(vm,addr,func) (SETLOCAL((vm)->data), func((vm),(addr)) )
-#define KPVCOMPACT(vm,func) (SETLOCAL((vm)->data), func((vm)) )
+#define KPVALLOC(vm,sz,func) (func((vm),(sz),1) )
+#define KPVRESIZE(vm,dt,sz,mv,func) (func((vm),(dt),(sz),(mv),1) )
+#define KPVFREE(vm,dt,func) (func((vm),(dt),1) )
+#define KPVADDR(vm,addr,func) (func((vm),(addr),1) )
+#define KPVSIZE(vm,addr,func) (func((vm),(addr),1) )
+#define KPVCOMPACT(vm,func) (func((vm),1) )
+#define KPVALIGN(vm,sz,al,func) (func((vm),(sz),(al),1) )
/* ALIGN is chosen so that a block can store all primitive types.
** It should also be a multiple of ALIGNB==(BITS+1) so the size field
@@ -299,9 +262,11 @@ struct _body_s
Block_t** self; /* self pointer when free */
};
#define BODYSIZE ROUND(sizeof(struct _body_s),ALIGN)
+
union _body_u
{ Vmuchar_t data[BODYSIZE]; /* to standardize size */
struct _body_s body;
+ Block_t* self[1];
};
/* After all the songs and dances, we should now have:
@@ -337,8 +302,9 @@ struct _tiny_s
#define TINY(vd) ((vd)->tiny)
#define CACHE(vd) ((vd)->cache)
-struct _vmdata_s
-{ int mode; /* current mode for region */
+struct _vmdata_s /* core region data - could be in shared/persistent memory */
+{ unsigned int lock; /* lock status */
+ int mode; /* current mode for region */
size_t incr; /* allocate in multiple of this */
size_t pool; /* size of an elt in a Vmpool region */
Seg_t* seg; /* list of segments */
@@ -348,7 +314,6 @@ struct _vmdata_s
Block_t* tiny[S_TINY]; /* small blocks */
Block_t* cache[S_CACHE+1]; /* delayed free blocks */
};
-/* Vmdata_t typedef in <vmalloc.h> */
#include "vmalloc.h"
@@ -382,11 +347,10 @@ struct _seg_s
#define LINK(b) ((b)->body.body.link)
#define LEFT(b) ((b)->body.body.left)
#define RIGHT(b) ((b)->body.body.right)
-#define VM(b) (SEG(b)->vm)
#define DATA(b) ((Void_t*)((b)->body.data) )
#define BLOCK(d) ((Block_t*)((char*)(d) - sizeof(Head_t)) )
-#define SELF(b) ((Block_t**)((b)->body.data + SIZE(b) - sizeof(Block_t*)) )
+#define SELF(b) (b)->body.self[SIZE(b)/sizeof(Block_t*)-1]
#define LAST(b) (*((Block_t**)(((char*)(b)) - sizeof(Block_t*)) ) )
#define NEXT(b) ((Block_t*)((b)->body.data + SIZE(b)) )
@@ -478,9 +442,10 @@ struct _seg_s
#define DBTAIL(d,begp,endp) \
(((begp) = (Vmuchar_t*)(d)+DBSIZE(d)), ((endp) = (Vmuchar_t*)(&DBLN(d))) )
-/* external symbols for internal use by vmalloc */
+
+/* external symbols for use inside vmalloc only */
typedef Block_t* (*Vmsearch_f)_ARG_((Vmdata_t*, size_t, Block_t*));
-typedef struct _vmextern_
+typedef struct _vmextern_s
{ Block_t* (*vm_extend)_ARG_((Vmalloc_t*, size_t, Vmsearch_f ));
ssize_t (*vm_truncate)_ARG_((Vmalloc_t*, Seg_t*, size_t, int));
size_t vm_pagesize;
@@ -489,6 +454,7 @@ typedef struct _vmextern_
void (*vm_trace)_ARG_((Vmalloc_t*,
Vmuchar_t*, Vmuchar_t*, size_t, size_t));
void (*vm_pfclose)_ARG_((Vmalloc_t*));
+ unsigned int vm_lock;
int vm_assert;
int vm_options;
} Vmextern_t;
@@ -500,13 +466,16 @@ typedef struct _vmextern_
#define _Vmitoa (_Vmextern.vm_itoa)
#define _Vmtrace (_Vmextern.vm_trace)
#define _Vmpfclose (_Vmextern.vm_pfclose)
+#define _Vmlock (_Vmextern.vm_lock)
#define _Vmassert (_Vmextern.vm_assert)
#define _Vmoptions (_Vmextern.vm_options)
-#define VMOPTIONS() do { if (!_Vmoptions) { _vmoptions(); } } while (0)
+#define VMOPTIONS() do { if (!_Vmoptions) { _vmoptions(); } } while (0)
-extern void _vmoptions _ARG_((void));
extern int _vmbestcheck _ARG_((Vmdata_t*, Block_t*));
+extern int _vmfd _ARG_((int));
+extern int _vmlock _ARG_((Vmalloc_t*, int));
+extern void _vmoptions _ARG_((void));
_BEGIN_EXTERNS_
@@ -553,10 +522,11 @@ extern void _cleanup _ARG_(( void ));
#endif /*_PACKAGE_ast*/
-_END_EXTERNS_
-
-#if _UWIN
-#define abort() (DebugBreak(),abort())
+/* for vmdcsbrk.c */
+#if !_typ_ssize_t
+typedef int ssize_t;
#endif
+_END_EXTERNS_
+
#endif /* _VMHDR_H */
diff --git a/usr/src/lib/libast/common/vmalloc/vmlast.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmlast.c
index a9c5e2171a..b60ea58146 100644
--- a/usr/src/lib/libast/common/vmalloc/vmlast.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmlast.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -33,53 +33,40 @@ void _STUB_vmlast(){}
*/
#if __STD_C
-static Void_t* lastalloc(Vmalloc_t* vm, size_t size)
+static Void_t* lastalloc(Vmalloc_t* vm, size_t size, int local)
#else
-static Void_t* lastalloc(vm, size)
+static Void_t* lastalloc(vm, size, local)
Vmalloc_t* vm;
size_t size;
+int local;
#endif
{
- reg Block_t *tp, *next;
- reg Seg_t *seg, *last;
- reg size_t s;
- reg Vmdata_t* vd = vm->data;
- reg int local, inuse;
- size_t orgsize = 0;
-
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST))
- { GETLOCAL(vd,local);
- if(ISLOCK(vd,local))
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,local);
- orgsize = size;
- }
+ Block_t *tp, *next;
+ Seg_t *seg, *last;
+ size_t s;
+ Vmdata_t *vd = vm->data;
+ size_t orgsize = size;
+
+ SETLOCK(vm, local);
size = size < ALIGN ? ALIGN : ROUND(size,ALIGN);
- for(;;)
- { for(last = NIL(Seg_t*), seg = vd->seg; seg; last = seg, seg = seg->next)
- { if(!(tp = seg->free) || (SIZE(tp)+sizeof(Head_t)) < size)
- continue;
- if(last)
- { last->next = seg->next;
- seg->next = vd->seg;
- vd->seg = seg;
- }
- goto got_block;
+ for(last = NIL(Seg_t*), seg = vd->seg; seg; last = seg, seg = seg->next)
+ { if(!(tp = seg->free) || (SIZE(tp)+sizeof(Head_t)) < size)
+ continue;
+ if(last)
+ { last->next = seg->next;
+ seg->next = vd->seg;
+ vd->seg = seg;
}
+ goto got_block;
+ }
- /* there is no usable free space in region, try extending */
- if((tp = (*_Vmextend)(vm,size,NIL(Vmsearch_f))) )
- { seg = SEG(tp);
- goto got_block;
- }
- else if(vd->mode&VM_AGAIN)
- vd->mode &= ~VM_AGAIN;
- else goto done;
+ /* there is no usable free space in region, try extending */
+ if((tp = (*_Vmextend)(vm,size,NIL(Vmsearch_f))) )
+ { seg = SEG(tp);
+ goto got_block;
}
+ else goto done;
got_block:
if((s = SIZE(tp)) >= size)
@@ -96,110 +83,86 @@ got_block:
(*_Vmtrace)(vm, NIL(Vmuchar_t*), (Vmuchar_t*)tp, orgsize, 0);
done:
- CLRLOCK(vd,local);
- ANNOUNCE(local, vm, VM_ALLOC, (Void_t*)tp, vm->disc);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
+
return (Void_t*)tp;
}
#if __STD_C
-static int lastfree(Vmalloc_t* vm, reg Void_t* data )
+static int lastfree(Vmalloc_t* vm, reg Void_t* data, int local )
#else
-static int lastfree(vm, data)
+static int lastfree(vm, data, local)
Vmalloc_t* vm;
-reg Void_t* data;
+Void_t* data;
+int local;
#endif
{
- reg Seg_t* seg;
- reg Block_t* fp;
- reg size_t s;
- reg Vmdata_t* vd = vm->data;
- reg int local, inuse;
+ Seg_t *seg;
+ Block_t *fp;
+ size_t s;
+ Vmdata_t *vd = vm->data;
if(!data)
return 0;
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd, local);
- if(ISLOCK(vd, local))
- { CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd, local);
- }
+ SETLOCK(vm, local);
+
if(data != (Void_t*)vd->free)
- { if(!local && vm->disc->exceptf)
- (void)(*vm->disc->exceptf)(vm,VM_BADADDR,data,vm->disc);
- CLRLOCK(vd, local);
- CLRINUSE(vd, inuse);
- return -1;
- }
+ data = NIL(Void_t*); /* signaling an error */
+ else
+ { seg = vd->seg;
+ if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
+ { if(seg->free )
+ s = (Vmuchar_t*)(seg->free) - (Vmuchar_t*)data;
+ else s = (Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data;
+ (*_Vmtrace)(vm, (Vmuchar_t*)data, NIL(Vmuchar_t*), s, 0);
+ }
- seg = vd->seg;
- if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
- { if(seg->free )
- s = (Vmuchar_t*)(seg->free) - (Vmuchar_t*)data;
- else s = (Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data;
- (*_Vmtrace)(vm, (Vmuchar_t*)data, NIL(Vmuchar_t*), s, 0);
+ vd->free = NIL(Block_t*);
+ fp = (Block_t*)data;
+ SEG(fp) = seg;
+ SIZE(fp) = ((Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data) - sizeof(Head_t);
+ seg->free = fp;
+ seg->last = NIL(Block_t*);
}
- vd->free = NIL(Block_t*);
- fp = (Block_t*)data;
- SEG(fp) = seg;
- SIZE(fp) = ((Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data) - sizeof(Head_t);
- seg->free = fp;
- seg->last = NIL(Block_t*);
+ CLRLOCK(vm, local);
- CLRLOCK(vd, local);
- ANNOUNCE(local, vm, VM_FREE, data, vm->disc);
-
- CLRINUSE(vd, inuse);
- return 0;
+ return data ? 0 : -1;
}
#if __STD_C
-static Void_t* lastresize(Vmalloc_t* vm, reg Void_t* data, size_t size, int type )
+static Void_t* lastresize(Vmalloc_t* vm, reg Void_t* data, size_t size, int type, int local)
#else
-static Void_t* lastresize(vm, data, size, type )
+static Void_t* lastresize(vm, data, size, type, local )
Vmalloc_t* vm;
reg Void_t* data;
size_t size;
int type;
+int local;
#endif
{
- reg Block_t* tp;
- reg Seg_t *seg;
- reg size_t oldsize;
- reg ssize_t s, ds;
- reg Vmdata_t* vd = vm->data;
- reg int local, inuse;
- reg Void_t* addr;
- Void_t* orgdata = NIL(Void_t*);
- size_t orgsize = 0;
-
- SETINUSE(vd, inuse);
+ Block_t *tp;
+ Seg_t *seg;
+ ssize_t s, ds;
+ Void_t *addr;
+ size_t oldsize = 0;
+ Void_t *orgdata = data;
+ size_t orgsize = size;
+ Vmdata_t *vd = vm->data;
+
if(!data)
- { oldsize = 0;
- data = lastalloc(vm,size);
- goto done;
+ { data = lastalloc(vm, size, local);
+ if(data && (type&VM_RSZERO) )
+ memset(data, 0, size);
+ return data;
}
if(size <= 0)
- { (void)lastfree(vm,data);
- CLRINUSE(vd, inuse);
+ { (void)lastfree(vm, data, local);
return NIL(Void_t*);
}
- if(!(local = vd->mode&VM_TRUST))
- { GETLOCAL(vd, local);
- if(ISLOCK(vd, local))
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd, local);
- orgdata = data;
- orgsize = size;
- }
+ SETLOCK(vm, local);
if(data == (Void_t*)vd->free)
seg = vd->seg;
@@ -210,9 +173,8 @@ int type;
break;
if(!seg || (VLONG(data)%ALIGN) != 0 ||
(seg->last && (Vmuchar_t*)data > (Vmuchar_t*)seg->last) )
- { CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
- return NIL(Void_t*);
+ { data = NIL(Void_t*);
+ goto done;
}
}
@@ -294,76 +256,79 @@ int type;
if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
(*_Vmtrace)(vm,(Vmuchar_t*)orgdata,(Vmuchar_t*)data,orgsize,0);
- }
- CLRLOCK(vd, local);
- ANNOUNCE(local, vm, VM_RESIZE, data, vm->disc);
+ if((type&VM_RSZERO) && size > oldsize)
+ memset((Void_t*)((Vmuchar_t*)data + oldsize), 0, size-oldsize);
+ }
-done: if(data && (type&VM_RSZERO) && size > oldsize)
- memset((Void_t*)((Vmuchar_t*)data + oldsize), 0, size-oldsize);
+done: CLRLOCK(vm, local);
- CLRINUSE(vd, inuse);
return data;
}
#if __STD_C
-static long lastaddr(Vmalloc_t* vm, Void_t* addr)
+static long lastaddr(Vmalloc_t* vm, Void_t* addr, int local)
#else
-static long lastaddr(vm, addr)
+static long lastaddr(vm, addr, local)
Vmalloc_t* vm;
Void_t* addr;
+int local;
#endif
{
- reg Vmdata_t* vd = vm->data;
+ long offset;
+ Vmdata_t *vd = vm->data;
+
+ SETLOCK(vm, local);
- if(!(vd->mode&VM_TRUST) && ISLOCK(vd,0))
- return -1L;
if(!vd->free || addr < (Void_t*)vd->free || addr >= (Void_t*)vd->seg->baddr)
- return -1L;
- else return (Vmuchar_t*)addr - (Vmuchar_t*)vd->free;
+ offset = -1L;
+ else offset = (long)((Vmuchar_t*)addr - (Vmuchar_t*)vd->free);
+
+ CLRLOCK(vm, local);
+
+ return offset;
}
#if __STD_C
-static long lastsize(Vmalloc_t* vm, Void_t* addr)
+static long lastsize(Vmalloc_t* vm, Void_t* addr, int local)
#else
-static long lastsize(vm, addr)
+static long lastsize(vm, addr, local)
Vmalloc_t* vm;
Void_t* addr;
+int local;
#endif
{
- reg Vmdata_t* vd = vm->data;
+ long size;
+ Vmdata_t *vd = vm->data;
+
+ SETLOCK(vm, local);
- if(!(vd->mode&VM_TRUST) && ISLOCK(vd,0))
- return -1L;
if(!vd->free || addr != (Void_t*)vd->free )
- return -1L;
+ size = -1L;
else if(vd->seg->free)
- return (Vmuchar_t*)vd->seg->free - (Vmuchar_t*)addr;
- else return (Vmuchar_t*)vd->seg->baddr - (Vmuchar_t*)addr - sizeof(Head_t);
+ size = (long)((Vmuchar_t*)vd->seg->free - (Vmuchar_t*)addr);
+ else size = (long)((Vmuchar_t*)vd->seg->baddr - (Vmuchar_t*)addr - sizeof(Head_t));
+
+ CLRLOCK(vm, local);
+
+ return size;
}
#if __STD_C
-static int lastcompact(Vmalloc_t* vm)
+static int lastcompact(Vmalloc_t* vm, int local)
#else
-static int lastcompact(vm)
+static int lastcompact(vm, local)
Vmalloc_t* vm;
+int local;
#endif
{
- reg Block_t* fp;
- reg Seg_t *seg, *next;
- reg size_t s;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
-
- SETINUSE(vd, inuse);
- if(!(vd->mode&VM_TRUST))
- { if(ISLOCK(vd,0))
- { CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd,0);
- }
+ ssize_t s;
+ Block_t *fp;
+ Seg_t *seg, *next;
+ Vmdata_t *vd = vm->data;
+
+ SETLOCK(vm, local);
for(seg = vd->seg; seg; seg = next)
{ next = seg->next;
@@ -383,41 +348,30 @@ Vmalloc_t* vm;
if((vd->mode&VM_TRACE) && _Vmtrace)
(*_Vmtrace)(vm,(Vmuchar_t*)0,(Vmuchar_t*)0,0,0);
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
return 0;
}
#if __STD_C
-static Void_t* lastalign(Vmalloc_t* vm, size_t size, size_t align)
+static Void_t* lastalign(Vmalloc_t* vm, size_t size, size_t align, int local)
#else
-static Void_t* lastalign(vm, size, align)
+static Void_t* lastalign(vm, size, align, local)
Vmalloc_t* vm;
size_t size;
size_t align;
+int local;
#endif
{
- reg Vmuchar_t* data;
- reg Seg_t* seg;
- reg Block_t* next;
- reg int local, inuse;
- reg size_t s, orgsize = 0, orgalign = 0;
- reg Vmdata_t* vd = vm->data;
+ Vmuchar_t *data;
+ Seg_t *seg;
+ Block_t *next;
+ size_t s, orgsize = size, orgalign = align;
+ Vmdata_t *vd = vm->data;
if(size <= 0 || align <= 0)
return NIL(Void_t*);
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local);
- if(ISLOCK(vd,local) )
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,local);
- orgsize = size;
- orgalign = align;
- }
+ SETLOCK(vm, local);
size = size <= TINYSIZE ? TINYSIZE : ROUND(size,ALIGN);
align = MULTIPLE(align,ALIGN);
@@ -446,14 +400,12 @@ size_t align;
vd->free = seg->last = (Block_t*)data;
- if(!local && !(vd->mode&VM_TRUST) && _Vmtrace && (vd->mode&VM_TRACE) )
+ if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
(*_Vmtrace)(vm,NIL(Vmuchar_t*),data,orgsize,orgalign);
done:
- CLRLOCK(vd,local);
- ANNOUNCE(local, vm, VM_ALLOC, (Void_t*)data, vm->disc);
+ CLRLOCK(vm, local);
- CLRINUSE(vd, inuse);
return (Void_t*)data;
}
diff --git a/usr/src/contrib/ast/src/lib/libast/vmalloc/vmmopen.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmmopen.c
new file mode 100644
index 0000000000..2a6ef8e1ee
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmmopen.c
@@ -0,0 +1,515 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#if defined(_UWIN) && defined(_BLD_ast)
+
+void _STUB_vmmapopen(){}
+
+#else
+
+#include "vmhdr.h"
+#include <sys/types.h>
+#include <string.h>
+#if _hdr_unistd
+#include <unistd.h>
+#endif
+
+#undef ALIGN /* some sys/param.h define this */
+
+#include <sys/mman.h> /* mmap() headers */
+#include <sys/file.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <sys/shm.h> /* shm headers */
+#include <sys/ipc.h>
+
+#undef ALIGN
+#define ALIGN sizeof(struct _align_s)
+
+/* Create a region to allocate based on mmap() or shmget().
+** Both ways provide for share memory allocation.
+** mmap() also allows for allocating persistent data.
+**
+** Written by Kiem-Phong Vo (kpv@research.att.com)
+*/
+
+#define MM_INIT 001 /* initialization mode */
+
+#define MM_RELEASE 010 /* release share mem */
+#define MM_CLEANUP 020 /* clean up resources */
+
+/* magic word signaling region is being initialized */
+#define MM_LETMEDOIT ((unsigned int)(('N'<<24) | ('B'<<16) | ('&'<<8) | ('I')) )
+
+/* magic word signaling file/segment is ready */
+#define MM_MAGIC ((unsigned int)(('P'<<24) | ('&'<<16) | ('N'<<8) | ('8')) )
+
+/* default mimimum region size */
+#define MM_MINSIZE (64*_Vmpagesize)
+
+/* macros to get the data section and size */
+#define MMHEAD(file) ROUND(sizeof(Mmvm_t)+strlen(file), ALIGN)
+#define MMDATA(mmvm) ((Vmuchar_t*)(mmvm)->base + MMHEAD(mmvm->file))
+#define MMSIZE(mmvm) ((mmvm)->size - MMHEAD(mmvm->file))
+
+#ifdef S_IRUSR
+#define FILE_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)
+#else
+#define FILE_MODE 0644
+#endif
+
+/* to store key/value pairs for application */
+typedef struct _mmuser_s Mmuser_t;
+struct _mmuser_s
+{ Mmuser_t* next; /* link list */
+ int key; /* identifying key */
+ Void_t* val; /* associated value */
+};
+
+typedef struct _mmvm_s
+{ unsigned int magic; /* magic bytes */
+ Void_t* base; /* address to map to */
+ ssize_t size; /* total data size */
+ ssize_t busy; /* amount in use */
+ Mmuser_t* user; /* stored (key,val)'s */
+ int proj; /* project number */
+ char file[1];/* file name */
+} Mmvm_t;
+
+typedef struct _mmdisc_s
+{ Vmdisc_t disc; /* Vmalloc discipline */
+ int flag; /* various modes */
+ Mmvm_t* mmvm; /* shared memory data */
+ ssize_t size; /* desired file size */
+ int shmid; /* ID of the shared mem */
+ int proj; /* shm project ID */
+ char file[1];/* backing store/ftok() */
+} Mmdisc_t;
+
+#if DEBUG
+#include <stdio.h>
+#include <string.h>
+int _vmmdump(Vmalloc_t* vm, int fd)
+{
+ char mesg[1024];
+ Mmdisc_t *mmdc = (Mmdisc_t*)vm->disc;
+
+ fd = fd < 0 ? 2 : fd;
+ sprintf(mesg, "File: %s\n", mmdc->file ); write(fd, mesg, strlen(mesg));
+ sprintf(mesg, "Project: %10d\n", mmdc->proj); write(fd, mesg, strlen(mesg));
+ sprintf(mesg, "Memory: %#010lx\n", mmdc->mmvm); write(fd, mesg, strlen(mesg));
+ sprintf(mesg, "Size: %10d\n", mmdc->size); write(fd, mesg, strlen(mesg));
+ sprintf(mesg, "Shmid: %10d\n", mmdc->shmid); write(fd, mesg, strlen(mesg));
+
+ sprintf(mesg, "File header:\n"); write(fd, mesg, strlen(mesg));
+ sprintf(mesg, "Magic: %10d\n", mmdc->mmvm->magic); write(fd, mesg, strlen(mesg));
+ sprintf(mesg, "Base: %#010lx\n", mmdc->mmvm->base); write(fd, mesg, strlen(mesg));
+ sprintf(mesg, "Size: %10d\n", mmdc->mmvm->size); write(fd, mesg, strlen(mesg));
+ sprintf(mesg, "Busy: %10d\n", mmdc->mmvm->busy); write(fd, mesg, strlen(mesg));
+ return 0;
+}
+#endif /*DEBUG*/
+
+/* fix the mapped address for a region */
+static Mmvm_t* mmfix(Mmvm_t* mmvm, Mmdisc_t* mmdc, int fd)
+{
+ Void_t *base = mmvm->base;
+ ssize_t size = mmvm->size;
+
+ if(base != (Void_t*)mmvm) /* mmvm is not right yet */
+ { /**/ASSERT(!base || (base && (VLONG(base)%_Vmpagesize) == 0) );
+ if(mmdc->proj < 0)
+ { munmap((Void_t*)mmvm, size);
+ mmvm = (Mmvm_t*)mmap(base, size, (PROT_READ|PROT_WRITE),
+ (MAP_FIXED|MAP_SHARED), fd, (off_t)0 );
+ }
+ else
+ { shmdt((Void_t*)mmvm);
+ mmvm = (Mmvm_t*)shmat(mmdc->shmid, base, 0);
+ }
+ if(!mmvm || mmvm == (Mmvm_t*)(-1) )
+ mmvm = NIL(Mmvm_t*);
+ }
+
+ return mmvm;
+}
+
+/* initialize region data */
+static int mminit(Mmdisc_t* mmdc)
+{
+ Void_t *base;
+ int try, k;
+ int fd = -1;
+ key_t key = -1;
+ ssize_t extent, size = 0;
+ Mmvm_t *mmvm = NIL(Mmvm_t*);
+ int rv = -1;
+
+ if(mmdc->mmvm) /* already done this */
+ return 0;
+
+ /* fixed size region so make it reasonably large */
+ if((size = mmdc->size) < MM_MINSIZE )
+ size = MM_MINSIZE;
+ size += MMHEAD(mmdc->file) + ALIGN;
+ size = ROUND(size, _Vmpagesize);
+
+ /* this op can happen simultaneously in different processes */
+ if((fd = open(mmdc->file, O_RDWR|O_CREAT, FILE_MODE)) < 0)
+ return -1;
+
+ /* get/create the initial segment of data */
+ if(mmdc->proj < 0 ) /* proj < 0 means doing mmap() */
+ { /* Note that the location being written to is always zero! */
+ if((extent = (ssize_t)lseek(fd, (off_t)0, SEEK_END)) < 0)
+ goto done;
+ if(extent < size) /* make the file size large enough */
+ if(lseek(fd, (off_t)size, 0) != (off_t)size || write(fd, "", 1) != 1 )
+ goto done;
+
+ /* map the file into memory */
+ mmvm = (Mmvm_t*)mmap(NIL(Void_t*), size, (PROT_READ|PROT_WRITE),
+ MAP_SHARED, fd, (off_t)0 );
+ }
+ else
+ { /* make the key and get/create an id for the share mem segment */
+ if((key = ftok(mmdc->file, mmdc->proj)) < 0 )
+ goto done;
+ if((mmdc->shmid = shmget(key, size, IPC_CREAT|FILE_MODE)) < 0 )
+ goto done;
+
+ /* map the data segment into memory */
+ mmvm = (Mmvm_t*)shmat(mmdc->shmid, NIL(Void_t*), 0);
+ }
+
+ if(!mmvm || mmvm == (Mmvm_t*)(-1) ) /* initial mapping failed */
+ goto done;
+
+ /* all processes compete for the chore to initialize data */
+ if(asocasint(&mmvm->magic, 0, MM_LETMEDOIT) == 0 ) /* lucky winner: us! */
+ { if(!(base = vmmaddress(size)) ) /* get a suitable base for the map */
+ base = (Void_t*)mmvm;
+ mmdc->flag |= MM_INIT;
+ mmvm->base = base;
+ mmvm->size = size;
+ mmvm->busy = 0;
+ mmvm->proj = mmdc->proj;
+ strcpy(mmvm->file, mmdc->file);
+ if(mmdc->proj < 0 ) /* flush to file */
+ msync((Void_t*)mmvm, MMHEAD(mmvm->file), MS_SYNC);
+
+ if(mmvm->base != (Void_t*)mmvm) /* not yet at the right address */
+ if(!(mmvm = mmfix(mmvm, mmdc, fd)) )
+ goto done;
+ rv = 0; /* success, return this value to indicate a new map */
+ }
+ else /* wait for someone else to finish initialization */
+ { /**/ASSERT(!(mmdc->flag&MM_INIT));
+ if(mmvm->magic != MM_LETMEDOIT && mmvm->magic != MM_MAGIC)
+ goto done;
+
+ for(try = 0, k = 0;; ASOLOOP(k) ) /* waiting */
+ { if(asocasint(&mmvm->magic, MM_MAGIC, MM_MAGIC) == MM_MAGIC )
+ break;
+ else if((try += 1) <= 0 ) /* too many tries */
+ goto done;
+ }
+
+ /* mapped the wrong memory */
+ if(mmvm->proj != mmdc->proj || strcmp(mmvm->file, mmdc->file) != 0 )
+ goto done;
+
+ if(mmvm->base != (Void_t*)mmvm) /* not yet at the right address */
+ if(!(mmvm = mmfix(mmvm, mmdc, fd)) )
+ goto done;
+ rv = 1; /* success, return this value to indicate a finished map */
+ }
+
+done: (void)close(fd);
+
+ if(rv >= 0 ) /* successful construction of region */
+ { /**/ASSERT(mmvm && mmvm != (Mmvm_t*)(-1));
+ mmdc->mmvm = mmvm;
+ }
+ else if(mmvm && mmvm != (Mmvm_t*)(-1)) /* error, remove map */
+ { if(mmdc->proj < 0)
+ (void)munmap((Void_t*)mmvm, size);
+ else (void)shmdt((Void_t*)mmvm);
+ }
+
+ return rv;
+}
+
+#if __STD_C /* end a file mapping */
+static int mmend(Mmdisc_t* mmdc)
+#else
+static int mmend(mmdc)
+Mmdisc_t* mmdc;
+#endif
+{
+ Mmvm_t *mmvm;
+ struct shmid_ds shmds;
+
+ if(!(mmvm = mmdc->mmvm) )
+ return 0;
+
+ if(mmdc->proj < 0 )
+ { (void)msync(mmvm->base, mmvm->size, MS_ASYNC);
+ if(mmdc->flag&MM_RELEASE)
+ { if(mmvm->base )
+ (void)munmap(mmvm->base, mmvm->size);
+ }
+ if(mmdc->flag&MM_CLEANUP)
+ (void)unlink(mmdc->file);
+ }
+ else
+ { if(mmdc->flag&MM_RELEASE)
+ { if(mmvm->base )
+ (void)shmdt(mmvm->base);
+ }
+ if(mmdc->flag&MM_CLEANUP)
+ { if(mmdc->shmid >= 0 )
+ (void)shmctl(mmdc->shmid, IPC_RMID, &shmds);
+ }
+ }
+
+ mmdc->mmvm = NIL(Mmvm_t*);
+ return 0;
+}
+
+#if __STD_C
+static Void_t* mmgetmem(Vmalloc_t* vm, Void_t* caddr,
+ size_t csize, size_t nsize, Vmdisc_t* disc)
+#else
+static Void_t* mmgetmem(vm, caddr, csize, nsize, disc)
+Vmalloc_t* vm;
+Void_t* caddr;
+size_t csize;
+size_t nsize;
+Vmdisc_t* disc;
+#endif
+{
+ Mmvm_t *mmvm;
+ Mmdisc_t *mmdc = (Mmdisc_t*)disc;
+
+ if(!(mmvm = mmdc->mmvm) ) /* bad data */
+ return NIL(Void_t*);
+
+ /* this region allows only a single busy block! */
+ if(caddr) /* resizing/freeing an existing block */
+ { if(caddr == MMDATA(mmvm) && nsize <= MMSIZE(mmvm) )
+ { mmvm->busy = nsize;
+ return MMDATA(mmvm);
+ }
+ else return NIL(Void_t*);
+ }
+ else /* requesting a new block */
+ { if(mmvm->busy == 0 )
+ { mmvm->busy = nsize;
+ return MMDATA(mmvm);
+ }
+ else return NIL(Void_t*);
+ }
+}
+
+#if __STD_C
+static int mmexcept(Vmalloc_t* vm, int type, Void_t* data, Vmdisc_t* disc)
+#else
+static int mmexcept(vm, type, data, disc)
+Vmalloc_t* vm;
+int type;
+Void_t* data;
+Vmdisc_t* disc;
+#endif
+{
+ int rv;
+ Void_t *base;
+ Mmdisc_t *mmdc = (Mmdisc_t*)disc;
+
+ if(type == VM_OPEN)
+ { if(data) /* VM_OPEN event at start of vmopen() */
+ { if((rv = mminit(mmdc)) < 0 ) /* initialization failed */
+ return -1;
+ else if(rv == 0) /* just started a new map */
+ { /**/ASSERT(mmdc->flag&MM_INIT);
+ /**/ASSERT(mmdc->mmvm->magic == MM_LETMEDOIT);
+ return 0;
+ }
+ else /* an existing map was reconstructed */
+ { /**/ASSERT(!(mmdc->flag&MM_INIT));
+ /**/ASSERT(mmdc->mmvm->magic == MM_MAGIC);
+ *((Void_t**)data) = MMDATA(mmdc->mmvm);
+ return 1;
+ }
+ }
+ else return 0;
+ }
+ else if(type == VM_ENDOPEN) /* at end of vmopen() */
+ { if(mmdc->flag&MM_INIT) /* this is the initializing process! */
+ { /**/ASSERT(mmdc->mmvm->magic == MM_LETMEDOIT);
+ asocasint(&mmdc->mmvm->magic, MM_LETMEDOIT, MM_MAGIC);
+
+ if(mmdc->proj < 0) /* sync data to file now */
+ msync((Void_t*)mmdc->mmvm, MMHEAD(mmdc->file), MS_SYNC);
+ } /**/ASSERT(mmdc->mmvm->magic == MM_MAGIC);
+ return 0;
+ }
+ else if(type == VM_CLOSE)
+ return 1; /* tell vmclose not to free memory segments */
+ else if(type == VM_ENDCLOSE) /* this is the final closing event */
+ { (void)mmend(mmdc);
+ (void)vmfree(Vmheap, mmdc);
+ return 0; /* all done */
+ }
+ else return 0;
+}
+
+#if __STD_C
+Vmalloc_t* vmmopen(char* file, int proj, ssize_t size )
+#else
+Vmalloc_t* vmmopen(file, proj, size )
+char* file; /* file for key or data backing */
+int proj; /* project ID, < 0 doing mmap */
+ssize_t size; /* desired size for mem segment */
+#endif
+{
+ Vmalloc_t *vm;
+ Mmdisc_t *mmdc;
+
+ GETPAGESIZE(_Vmpagesize);
+
+ if(!file || !file[0] )
+ return NIL(Vmalloc_t*);
+
+ /* create discipline structure for getting memory from mmap */
+ if(!(mmdc = vmalloc(Vmheap, sizeof(Mmdisc_t)+strlen(file))) )
+ return NIL(Vmalloc_t*);
+ memset(mmdc, 0, sizeof(Mmdisc_t));
+ mmdc->disc.memoryf = mmgetmem;
+ mmdc->disc.exceptf = mmexcept;
+ mmdc->disc.round = _Vmpagesize; /* round request to this size */
+ mmdc->mmvm = NIL(Mmvm_t*);
+ mmdc->size = size;
+ mmdc->shmid = -1;
+ mmdc->flag = 0;
+ mmdc->proj = proj;
+ strcpy(mmdc->file, file);
+
+ /* now open the Vmalloc_t handle to return to application */
+ if(!(vm = vmopen(&mmdc->disc, Vmbest, VM_SHARE)) )
+ { (void)mmend(mmdc);
+ (void)vmfree(Vmheap, mmdc);
+ return NIL(Vmalloc_t*);
+ }
+ else
+ { /**/ASSERT(mmdc->mmvm && mmdc->mmvm->magic == MM_MAGIC);
+ return vm;
+ }
+}
+
+/* to store (key,value) data in the map */
+#if __STD_C
+Void_t* vmmvalue(Vmalloc_t* vm, int key, Void_t* val, int oper)
+#else
+Void_t* vmmvalue(vm, key, val, oper)
+Vmalloc_t* vm; /* a region based on vmmapopen */
+int key; /* key of data to be set */
+Void_t* val; /* data to be set */
+int oper; /* operation type */
+#endif
+{
+ Mmuser_t *u;
+ Mmdisc_t *mmdc = (Mmdisc_t*)vm->disc;
+ Mmvm_t *mmvm = mmdc->mmvm;
+
+ /* check to see if operation is well-defined */
+ if(oper != VM_MMGET && oper != VM_MMSET && oper != VM_MMADD)
+ return NIL(Void_t*);
+
+ SETLOCK(vm, 0);
+
+ /* find the key */
+ for(u = mmvm->user; u; u = u->next)
+ if(u->key == key)
+ break;
+
+ if(!u && (oper == VM_MMSET || oper == VM_MMADD) )
+ { if((u = KPVALLOC(vm, sizeof(Mmuser_t), vm->meth.allocf)) )
+ { u->val = NIL(Void_t*);
+ u->key = key;
+ u->next = mmvm->user;
+ mmvm->user = u;
+ }
+ }
+
+ if(u) /* update data and set value to return */
+ { if(oper == VM_MMSET)
+ u->val = val;
+ else if(oper == VM_MMADD)
+ u->val = (Void_t*)((long)(u->val) + (long)(val));
+ val = u->val;
+ }
+ else val = NIL(Void_t*);
+
+ CLRLOCK(vm, 0);
+
+ return val;
+}
+
+void vmmrelease(Vmalloc_t* vm, int type)
+{
+ Mmdisc_t *mmdc = (Mmdisc_t*)vm->disc;
+
+ mmdc->flag |= MM_RELEASE;
+ if(type > 0)
+ mmdc->flag |= MM_CLEANUP;
+}
+
+/* suggest an address usable for mapping memory */
+Void_t* vmmaddress(size_t size)
+{
+#if !defined(_map_min) || !defined(_map_max) || !defined(_map_dir)
+ return NIL(Void_t*);
+#else
+ Void_t *avail;
+ static Vmuchar_t *min = (Vmuchar_t*)_map_min;
+ static Vmuchar_t *max = (Vmuchar_t*)_map_max;
+
+ GETPAGESIZE(_Vmpagesize);
+ size = ROUND(size, _Vmpagesize);
+
+ if(_map_dir == 0 || (min+size) > max)
+ avail = NIL(Void_t*);
+ else if(_map_dir > 0)
+ { avail = (Void_t*)min;
+ min += size;
+ }
+ else
+ { max -= size;
+ avail = (Void_t*)max;
+ }
+
+ return avail;
+#endif
+}
+
+#endif
diff --git a/usr/src/contrib/ast/src/lib/libast/vmalloc/vmopen.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmopen.c
new file mode 100644
index 0000000000..5f6912f2f6
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmopen.c
@@ -0,0 +1,180 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* Phong Vo <kpv@research.att.com> *
+* *
+***********************************************************************/
+#if defined(_UWIN) && defined(_BLD_ast)
+
+void _STUB_vmopen(){}
+
+#else
+
+#include "vmhdr.h"
+
+/* Opening a new region of allocation.
+** Note that because of possible exotic memory types,
+** all region data must be stored within the space given
+** by the discipline.
+**
+** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
+*/
+
+/* this structure lives in the top data segment of the region */
+typedef struct _vminit_s
+{ union
+ { Vmdata_t vd; /* root of usable data space */
+ Vmuchar_t a[ROUND(sizeof(Vmdata_t),ALIGN)];
+ } vd;
+ union
+ { Vmalloc_t vm; /* embedded region if needed */
+ Vmuchar_t a[ROUND(sizeof(Vmalloc_t),ALIGN)];
+ } vm;
+ union
+ { Seg_t seg; /* space for segment */
+ Vmuchar_t a[ROUND(sizeof(Seg_t),ALIGN)];
+ } seg;
+ Block_t block[16]; /* space for a few blocks */
+} Vminit_t;
+
+#if __STD_C
+Vmalloc_t* vmopen(Vmdisc_t* disc, Vmethod_t* meth, int mode)
+#else
+Vmalloc_t* vmopen(disc, meth, mode)
+Vmdisc_t* disc; /* discipline to get segments */
+Vmethod_t* meth; /* method to manage space */
+int mode; /* type of region */
+#endif
+{
+ Vmalloc_t *vm, *vmp, vmproto;
+ Vmdata_t *vd;
+ Vminit_t *init;
+ size_t algn, size, incr;
+ Block_t *bp, *np;
+ Seg_t *seg;
+ Vmuchar_t *addr;
+ int rv;
+
+ if(!meth || !disc || !disc->memoryf )
+ return NIL(Vmalloc_t*);
+
+ GETPAGESIZE(_Vmpagesize);
+
+ vmp = &vmproto; /* avoid memory allocation here! */
+ memset(vmp, 0, sizeof(Vmalloc_t));
+ memcpy(&vmp->meth, meth, sizeof(Vmethod_t));
+ vmp->disc = disc;
+
+ mode &= VM_FLAGS; /* start with user-settable flags */
+ size = 0;
+
+ if(disc->exceptf)
+ { addr = NIL(Vmuchar_t*);
+ if((rv = (*disc->exceptf)(vmp,VM_OPEN,(Void_t*)(&addr),disc)) < 0)
+ return NIL(Vmalloc_t*);
+ else if(rv == 0 )
+ { if(addr) /* vm itself is in memory from disc->memoryf */
+ mode |= VM_MEMORYF;
+ }
+ else if(rv > 0) /* the data section is being restored */
+ { if(!(init = (Vminit_t*)addr) )
+ return NIL(Vmalloc_t*);
+ size = -1; /* to tell that addr was not from disc->memoryf */
+ vd = &init->vd.vd; /**/ASSERT(VLONG(vd)%ALIGN == 0);
+ goto done;
+ }
+ }
+
+ /* make sure vd->incr is properly rounded and get initial memory */
+ incr = disc->round <= 0 ? _Vmpagesize : disc->round;
+ incr = MULTIPLE(incr,ALIGN);
+ size = ROUND(sizeof(Vminit_t),incr); /* get initial memory */
+ if(!(addr = (Vmuchar_t*)(*disc->memoryf)(vmp, NIL(Void_t*), 0, size, disc)) )
+ return NIL(Vmalloc_t*);
+ memset(addr, 0, size);
+
+ /* initialize region data */
+ algn = (size_t)(VLONG(addr)%ALIGN);
+ init = (Vminit_t*)(addr + (algn ? ALIGN-algn : 0)); /**/ASSERT(VLONG(init)%ALIGN == 0);
+ vd = &init->vd.vd; /**/ASSERT(VLONG(vd)%ALIGN == 0);
+ vd->mode = mode | meth->meth;
+ vd->incr = incr;
+ vd->pool = 0;
+ vd->free = vd->wild = NIL(Block_t*);
+
+ if(vd->mode&(VM_MTBEST|VM_MTDEBUG|VM_MTPROFILE))
+ { int k;
+ vd->root = NIL(Block_t*);
+ for(k = S_TINY-1; k >= 0; --k)
+ TINY(vd)[k] = NIL(Block_t*);
+ for(k = S_CACHE; k >= 0; --k)
+ CACHE(vd)[k] = NIL(Block_t*);
+ }
+
+ vd->seg = &init->seg.seg; /**/ ASSERT(VLONG(vd->seg)%ALIGN == 0);
+ seg = vd->seg;
+ seg->next = NIL(Seg_t*);
+ seg->vmdt = vd;
+ seg->addr = (Void_t*)addr;
+ seg->extent = size;
+ seg->baddr = addr + size;
+ seg->size = size; /* Note: this size is unusually large to mark seg as
+ the root segment and can be freed only at closing */
+ seg->free = NIL(Block_t*);
+
+ /* make a data block out of the remainder */
+ bp = SEGBLOCK(seg);
+ SEG(bp) = seg;
+ size = ((seg->baddr - (Vmuchar_t*)bp)/ALIGN) * ALIGN; /**/ ASSERT(size > 0);
+ SIZE(bp) = size - 2*sizeof(Head_t); /**/ASSERT(SIZE(bp) > 0 && (SIZE(bp)%ALIGN) == 0);
+ SELF(bp) = bp;
+ /**/ ASSERT(SIZE(bp)%ALIGN == 0);
+ /**/ ASSERT(VLONG(bp)%ALIGN == 0);
+
+ /* make a fake header for next block in case of noncontiguous segments */
+ np = NEXT(bp);
+ SEG(np) = seg;
+ SIZE(np) = BUSY|PFREE;
+
+ if(vd->mode&(VM_MTLAST|VM_MTPOOL))
+ seg->free = bp;
+ else vd->wild = bp;
+
+done: /* now make the region handle */
+ if(vd->mode&VM_MEMORYF)
+ vm = &init->vm.vm;
+ else if(!(vm = vmalloc(Vmheap, sizeof(Vmalloc_t))) )
+ { if(size > 0)
+ (void)(*disc->memoryf)(vmp, addr, size, 0, disc);
+ return NIL(Vmalloc_t*);
+ }
+ memcpy(vm, vmp, sizeof(Vmalloc_t));
+ vm->data = vd;
+
+ if(disc->exceptf) /* signaling that vmopen succeeded */
+ (void)(*disc->exceptf)(vm, VM_ENDOPEN, NIL(Void_t*), disc);
+
+ /* add to the linked list of regions */
+ _vmlock(NIL(Vmalloc_t*), 1);
+ vm->next = Vmheap->next; Vmheap->next = vm;
+ _vmlock(NIL(Vmalloc_t*), 0);
+
+ return vm;
+}
+
+#endif
diff --git a/usr/src/lib/libast/common/vmalloc/vmpool.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmpool.c
index 965712cf9b..2c65a66061 100644
--- a/usr/src/lib/libast/common/vmalloc/vmpool.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmpool.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -39,36 +39,29 @@ void _STUB_vmpool(){}
*/
#if __STD_C
-static Void_t* poolalloc(Vmalloc_t* vm, reg size_t size)
+static Void_t* poolalloc(Vmalloc_t* vm, reg size_t size, int local)
#else
-static Void_t* poolalloc(vm, size )
+static Void_t* poolalloc(vm, size, local )
Vmalloc_t* vm;
reg size_t size;
+int local;
#endif
{
- reg Vmdata_t* vd = vm->data;
reg Block_t *tp, *next;
reg size_t s;
- reg Seg_t* seg;
- reg int local, inuse;
+ reg Seg_t *seg;
+ reg Vmdata_t *vd = vm->data;
if(size <= 0)
return NIL(Void_t*);
+
if(size != vd->pool)
{ if(vd->pool <= 0)
vd->pool = size;
else return NIL(Void_t*);
}
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local);
- if(ISLOCK(vd, local))
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd, local);
- }
+ SETLOCK(vm, local);
if((tp = vd->free) ) /* there is a ready free block */
{ vd->free = SEGLINK(tp);
@@ -81,21 +74,17 @@ reg size_t size;
for(tp = NIL(Block_t*), seg = vd->seg; seg; seg = seg->next)
{ if((tp = seg->free) &&
(s = (SIZE(tp) & ~BITS) + sizeof(Head_t)) >= size )
- goto has_blk;
+ goto got_blk;
}
- for(;;) /* must extend region */
- { if((tp = (*_Vmextend)(vm,ROUND(size,vd->incr),NIL(Vmsearch_f))) )
- { s = (SIZE(tp) & ~BITS) + sizeof(Head_t);
- seg = SEG(tp);
- goto has_blk;
- }
- else if(vd->mode&VM_AGAIN)
- vd->mode &= ~VM_AGAIN;
- else goto done;
+ if((tp = (*_Vmextend)(vm,ROUND(size,vd->incr),NIL(Vmsearch_f))) )
+ { s = (SIZE(tp) & ~BITS) + sizeof(Head_t);
+ seg = SEG(tp);
+ goto got_blk;
}
+ else goto done;
-has_blk: /* if get here, (tp, s, seg) must be well-defined */
+got_blk: /* if get here, (tp, s, seg) must be well-defined */
next = (Block_t*)((Vmuchar_t*)tp+size);
if((s -= size) <= (size + sizeof(Head_t)) )
{ for(; s >= size; s -= size)
@@ -116,37 +105,28 @@ done:
if(!local && (vd->mode&VM_TRACE) && _Vmtrace && tp)
(*_Vmtrace)(vm,NIL(Vmuchar_t*),(Vmuchar_t*)tp,vd->pool,0);
- CLRLOCK(vd, local);
- ANNOUNCE(local, vm, VM_ALLOC, (Void_t*)tp, vm->disc);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
+
return (Void_t*)tp;
}
#if __STD_C
-static long pooladdr(Vmalloc_t* vm, reg Void_t* addr)
+static long pooladdr(Vmalloc_t* vm, reg Void_t* addr, int local)
#else
-static long pooladdr(vm, addr)
+static long pooladdr(vm, addr, local)
Vmalloc_t* vm;
reg Void_t* addr;
+int local;
#endif
{
- reg Block_t *bp, *tp;
- reg Vmuchar_t *laddr, *baddr;
- reg size_t size;
- reg Seg_t* seg;
- reg long offset;
- reg Vmdata_t* vd = vm->data;
- reg int local, inuse;
-
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST))
- { GETLOCAL(vd,local);
- if(ISLOCK(vd,local))
- { CLRINUSE(vd, inuse);
- return -1L;
- }
- SETLOCK(vd,local);
- }
+ Block_t *bp, *tp;
+ Vmuchar_t *laddr, *baddr;
+ size_t size;
+ Seg_t *seg;
+ long offset;
+ Vmdata_t* vd = vm->data;
+
+ SETLOCK(vm, local);
offset = -1L;
for(seg = vd->seg; seg; seg = seg->next)
@@ -170,45 +150,31 @@ reg Void_t* addr;
}
done :
- CLRLOCK(vd,local);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
+
return offset;
}
#if __STD_C
-static int poolfree(reg Vmalloc_t* vm, reg Void_t* data )
+static int poolfree(reg Vmalloc_t* vm, reg Void_t* data, int local )
#else
-static int poolfree(vm, data)
-reg Vmalloc_t* vm;
-reg Void_t* data;
+static int poolfree(vm, data, local)
+Vmalloc_t* vm;
+Void_t* data;
+int local;
#endif
{
- reg Block_t* bp;
- reg Vmdata_t* vd = vm->data;
- reg int local, inuse;
+ Block_t *bp;
+ Vmdata_t *vd = vm->data;
if(!data)
return 0;
+ if(vd->pool <= 0)
+ return -1;
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST))
- { GETLOCAL(vd, local);
-
- if(ISLOCK(vd, local) || vd->pool <= 0)
- { CLRINUSE(vd, inuse);
- return -1;
- }
-
- if(KPVADDR(vm,data,pooladdr) != 0)
- { if(vm->disc->exceptf)
- (void)(*vm->disc->exceptf)(vm,VM_BADADDR,data,vm->disc);
- CLRINUSE(vd, inuse);
- return -1;
- }
-
- SETLOCK(vd, local);
- }
+ SETLOCK(vm, local);
+ /**/ASSERT(KPVADDR(vm, data, pooladdr) == 0);
bp = (Block_t*)data;
SIZE(bp) = POOLFREE;
SEGLINK(bp) = vd->free;
@@ -217,98 +183,77 @@ reg Void_t* data;
if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
(*_Vmtrace)(vm, (Vmuchar_t*)data, NIL(Vmuchar_t*), vd->pool, 0);
- CLRLOCK(vd,local);
- ANNOUNCE(local, vm, VM_FREE, data, vm->disc);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
+
return 0;
}
#if __STD_C
-static Void_t* poolresize(Vmalloc_t* vm, Void_t* data, size_t size, int type )
+static Void_t* poolresize(Vmalloc_t* vm, Void_t* data, size_t size, int type, int local )
#else
-static Void_t* poolresize(vm, data, size, type )
+static Void_t* poolresize(vm, data, size, type, local )
Vmalloc_t* vm;
Void_t* data;
size_t size;
int type;
+int local;
#endif
{
- int local, inuse;
- reg Vmdata_t* vd = vm->data;
+ Vmdata_t *vd = vm->data;
NOTUSED(type);
- SETINUSE(vd, inuse);
if(!data)
- { if((data = poolalloc(vm,size)) && (type&VM_RSZERO) )
- { reg int *d = (int*)data, *ed = (int*)((char*)data+size);
- do { *d++ = 0;} while(d < ed);
- }
- CLRINUSE(vd, inuse);
+ { data = poolalloc(vm, size, local);
+ if(data && (type&VM_RSZERO) )
+ memset(data, 0, size);
return data;
}
if(size == 0)
- { (void)poolfree(vm,data);
- CLRINUSE(vd, inuse);
+ { (void)poolfree(vm, data, local);
return NIL(Void_t*);
}
+ if(size != vd->pool)
+ return NIL(Void_t*);
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd, local);
+ SETLOCK(vm, local);
- if(ISLOCK(vd, local) )
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
+ /**/ASSERT(KPVADDR(vm, data, pooladdr) == 0);
- if(size != vd->pool || KPVADDR(vm,data,pooladdr) != 0)
- { if(vm->disc->exceptf)
- (void)(*vm->disc->exceptf)(vm,VM_BADADDR,data,vm->disc);
- CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
+ if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
+ (*_Vmtrace)(vm, (Vmuchar_t*)data, (Vmuchar_t*)data, size, 0);
- if((vd->mode&VM_TRACE) && _Vmtrace)
- (*_Vmtrace)(vm, (Vmuchar_t*)data, (Vmuchar_t*)data, size, 0);
- }
+ CLRLOCK(vm, local);
- ANNOUNCE(local, vm, VM_RESIZE, data, vm->disc);
- CLRINUSE(vd, inuse);
return data;
}
#if __STD_C
-static long poolsize(Vmalloc_t* vm, Void_t* addr)
+static long poolsize(Vmalloc_t* vm, Void_t* addr, int local)
#else
-static long poolsize(vm, addr)
+static long poolsize(vm, addr, local)
Vmalloc_t* vm;
Void_t* addr;
+int local;
#endif
{
- return pooladdr(vm,addr) == 0 ? (long)vm->data->pool : -1L;
+ return pooladdr(vm, addr, local) == 0 ? (long)vm->data->pool : -1L;
}
#if __STD_C
-static int poolcompact(Vmalloc_t* vm)
+static int poolcompact(Vmalloc_t* vm, int local)
#else
-static int poolcompact(vm)
+static int poolcompact(vm, local)
Vmalloc_t* vm;
+int local;
#endif
{
- reg Block_t* fp;
- reg Seg_t *seg, *next;
- reg size_t s;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
-
- SETINUSE(vd, inuse);
- if(!(vd->mode&VM_TRUST))
- { if(ISLOCK(vd,0))
- { CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd,0);
- }
+ ssize_t s;
+ Block_t *fp;
+ Seg_t *seg, *next;
+ Vmdata_t *vd = vm->data;
+
+ SETLOCK(vm, local);
for(seg = vd->seg; seg; seg = next)
{ next = seg->next;
@@ -325,21 +270,22 @@ Vmalloc_t* vm;
seg->free = fp;
}
- if((vd->mode&VM_TRACE) && _Vmtrace)
+ if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
(*_Vmtrace)(vm, (Vmuchar_t*)0, (Vmuchar_t*)0, 0, 0);
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
+
return 0;
}
#if __STD_C
-static Void_t* poolalign(Vmalloc_t* vm, size_t size, size_t align)
+static Void_t* poolalign(Vmalloc_t* vm, size_t size, size_t align, int local)
#else
-static Void_t* poolalign(vm, size, align)
+static Void_t* poolalign(vm, size, align, local)
Vmalloc_t* vm;
size_t size;
size_t align;
+int local;
#endif
{
NOTUSED(vm);
diff --git a/usr/src/lib/libast/common/vmalloc/vmprivate.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmprivate.c
index 96d93d75c6..2d8feec10d 100644
--- a/usr/src/lib/libast/common/vmalloc/vmprivate.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmprivate.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,8 @@ void _STUB_vmprivate(){}
#include "vmhdr.h"
-static char* Version = "\n@(#)$Id: Vmalloc (AT&T Research) 2010-01-01 $\0\n";
+static char* Version = "\n@(#)$Id: Vmalloc (AT&T Labs - Research) 2011-08-08 $\0\n";
+
/* Private code used in the vmalloc library
**
@@ -36,9 +37,9 @@ static char* Version = "\n@(#)$Id: Vmalloc (AT&T Research) 2010-01-01 $\0\n";
/* Get more memory for a region */
#if __STD_C
-static Block_t* vmextend(reg Vmalloc_t* vm, size_t size, Vmsearch_f searchf )
+static Block_t* _vmextend(reg Vmalloc_t* vm, size_t size, Vmsearch_f searchf )
#else
-static Block_t* vmextend(vm, size, searchf )
+static Block_t* _vmextend(vm, size, searchf )
reg Vmalloc_t* vm; /* region to increase in size */
size_t size; /* desired amount of space */
Vmsearch_f searchf; /* tree search function */
@@ -46,21 +47,14 @@ Vmsearch_f searchf; /* tree search function */
{
reg size_t s;
reg Seg_t* seg;
- reg Block_t *bp, *t;
+ reg Block_t *bp, *tp, *np;
reg Vmuchar_t* addr = (Vmuchar_t*)Version; /* shut compiler warning */
reg Vmdata_t* vd = vm->data;
- reg Vmemory_f memoryf = vm->disc->memoryf;
- reg Vmexcept_f exceptf = vm->disc->exceptf;
GETPAGESIZE(_Vmpagesize);
-#if DEBUG /* trace all allocation calls through the heap */
- if(!_Vmtrace && vm == Vmheap && (vd->mode&VM_TRUST) )
- VMOPTIONS();
-#endif
-
if(vd->incr <= 0) /* this is just _Vmheap on the first call */
- vd->incr = VMHEAPINCR;
+ vd->incr = _Vmpagesize*sizeof(Void_t*);
/* Get slightly more for administrative data */
s = size + sizeof(Seg_t) + sizeof(Block_t) + sizeof(Head_t) + 2*ALIGN;
@@ -73,46 +67,25 @@ Vmsearch_f searchf; /* tree search function */
if(size > 2*vd->incr && vm->disc->round < vd->incr)
vd->incr *= 2;
- /* see if we can extend the current segment */
- if(!(seg = vd->seg) )
+ if(!(seg = vd->seg) ) /* there is no current segment */
addr = NIL(Vmuchar_t*);
- else
- { if(!vd->wild || SEG(vd->wild) != seg)
- s = 0;
- else
- { s = SIZE(vd->wild) + sizeof(Head_t);
- if((s = (s/vd->incr)*vd->incr) == size)
- size += vd->incr;
- }
- addr = (Vmuchar_t*)(*memoryf)(vm,seg->addr,seg->extent,
- seg->extent+size-s,vm->disc);
- if(!addr)
- seg = NIL(Seg_t*);
- else
- { /**/ASSERT(addr == (Vmuchar_t*)seg->addr);
- addr += seg->extent;
- size -= s;
- }
+ else /* see if we can extend the current segment */
+ { addr = (Vmuchar_t*)(*vm->disc->memoryf)(vm,seg->addr,seg->extent,
+ seg->extent+size,vm->disc);
+ if(addr == (Vmuchar_t*)seg->addr)
+ addr += seg->extent; /* seg successfully extended */
+ else seg = NIL(Seg_t*); /* a new segment was created */
}
- while(!addr) /* try to get space */
- { if((addr = (Vmuchar_t*)(*memoryf)(vm,NIL(Void_t*),0,size,vm->disc)) )
- break;
-
- /* check with exception handler to see if we should continue */
- if(!exceptf)
- return NIL(Block_t*);
- else
- { int rv, lock;
- lock = vd->mode&VM_LOCK;
- vd->mode &= ~VM_LOCK;
- rv = (*exceptf)(vm,VM_NOMEM,(Void_t*)size,vm->disc);
- vd->mode |= lock;
- if(rv <= 0)
- { if(rv == 0)
- vd->mode |= VM_AGAIN;
- return NIL(Block_t*);
+ if(!addr) /* create a new segment */
+ { if(!(addr = (Vmuchar_t*)(*vm->disc->memoryf)(vm, NIL(Void_t*), 0, size, vm->disc)) )
+ { if(vm->disc->exceptf) /* announce that no more memory is available */
+ {
+ CLRLOCK(vm, 0);
+ (void)(*vm->disc->exceptf)(vm, VM_NOMEM, (Void_t*)size, vm->disc);
+ SETLOCK(vm, 0);
}
+ return NIL(Block_t*);
}
}
@@ -123,6 +96,7 @@ Vmsearch_f searchf; /* tree search function */
if(vd->mode&(VM_MTBEST|VM_MTDEBUG|VM_MTPROFILE) )
{ /**/ ASSERT((SIZE(bp)&~BITS) == 0);
/**/ ASSERT(SEG(bp) == seg);
+
if(!ISPFREE(SIZE(bp)) )
SIZE(bp) = size - sizeof(Head_t);
else
@@ -130,7 +104,7 @@ Vmsearch_f searchf; /* tree search function */
bp = LAST(bp);
if(bp == vd->wild)
vd->wild = NIL(Block_t*);
- else REMOVE(vd,bp,INDEX(SIZE(bp)),t,(*searchf));
+ else REMOVE(vd,bp,INDEX(SIZE(bp)),tp,(*searchf));
SIZE(bp) += size;
}
}
@@ -186,19 +160,20 @@ Vmsearch_f searchf; /* tree search function */
}
/* make a fake header for possible segmented memory */
- t = NEXT(bp);
- SEG(t) = seg;
- SIZE(t) = BUSY;
+ tp = NEXT(bp);
+ SEG(tp) = seg;
+ SIZE(tp) = BUSY;
/* see if the wild block is still wild */
- if((t = vd->wild) && (seg = SEG(t)) != vd->seg)
- { CLRPFREE(SIZE(NEXT(t)));
+ if((tp = vd->wild) && (seg = SEG(tp)) != vd->seg)
+ { np = NEXT(tp);
+ CLRPFREE(SIZE(np));
if(vd->mode&(VM_MTBEST|VM_MTDEBUG|VM_MTPROFILE) )
- { SIZE(t) |= BUSY|JUNK;
- LINK(t) = CACHE(vd)[C_INDEX(SIZE(t))];
- CACHE(vd)[C_INDEX(SIZE(t))] = t;
+ { SIZE(tp) |= BUSY|JUNK;
+ LINK(tp) = CACHE(vd)[C_INDEX(SIZE(tp))];
+ CACHE(vd)[C_INDEX(SIZE(tp))] = tp;
}
- else seg->free = t;
+ else seg->free = tp;
vd->wild = NIL(Block_t*);
}
@@ -208,9 +183,9 @@ Vmsearch_f searchf; /* tree search function */
/* Truncate a segment if possible */
#if __STD_C
-static ssize_t vmtruncate(Vmalloc_t* vm, Seg_t* seg, size_t size, int exact)
+static ssize_t _vmtruncate(Vmalloc_t* vm, Seg_t* seg, size_t size, int exact)
#else
-static ssize_t vmtruncate(vm, seg, size, exact)
+static ssize_t _vmtruncate(vm, seg, size, exact)
Vmalloc_t* vm; /* containing region */
Seg_t* seg; /* the one to be truncated */
size_t size; /* amount of free space */
@@ -234,8 +209,8 @@ int exact;
less = _Vmpagesize;
less = (size/less)*less;
less = (less/vd->incr)*vd->incr;
- if(less > 0 && size > (size_t)less && (size-(size_t)less) < sizeof(Block_t) )
- less = (size_t)less <= vd->incr ? 0 : (size_t)less - vd->incr;
+ if(less > 0 && (ssize_t)size > less && (size-less) < sizeof(Block_t) )
+ less = less <= (ssize_t)vd->incr ? 0 : less - vd->incr;
}
if(less <= 0 ||
@@ -279,10 +254,31 @@ int exact;
}
}
+int _vmlock(Vmalloc_t* vm, int locking)
+{
+ if(!vm) /* some sort of global locking */
+ { if(!locking) /* turn off lock */
+ asolock(&_Vmlock, 1, ASO_UNLOCK);
+ else asolock(&_Vmlock, 1, ASO_SPINLOCK);
+ }
+ else if(vm->data->mode&VM_SHARE)
+ { if(!locking) /* turning off the lock */
+ asolock(&vm->data->lock, 1, ASO_UNLOCK);
+ else asolock(&vm->data->lock, 1, ASO_SPINLOCK);
+ }
+ else
+ { if(!locking)
+ vm->data->lock = 0;
+ else vm->data->lock = 1;
+ }
+ return 0;
+}
+
+
/* Externally visible names but local to library */
Vmextern_t _Vmextern =
-{ vmextend, /* _Vmextend */
- vmtruncate, /* _Vmtruncate */
+{ _vmextend, /* _Vmextend */
+ _vmtruncate, /* _Vmtruncate */
0, /* _Vmpagesize */
NIL(char*(*)_ARG_((char*,const char*,int))), /* _Vmstrcpy */
NIL(char*(*)_ARG_((Vmulong_t,int))), /* _Vmitoa */
diff --git a/usr/src/lib/libast/common/vmalloc/vmprofile.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmprofile.c
index 6651865844..7dc54e829a 100644
--- a/usr/src/lib/libast/common/vmalloc/vmprofile.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmprofile.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -73,18 +73,18 @@ static Pfobj_t** Pftable; /* hash table */
static Vmalloc_t* Vmpf; /* heap for our own use */
#if __STD_C
-static Pfobj_t* pfsearch(Vmalloc_t* vm, const char* file, int line)
+static Pfobj_t* pfsearch(Vmalloc_t* vm, char* file, int line)
#else
static Pfobj_t* pfsearch(vm, file, line)
Vmalloc_t* vm; /* region allocating from */
-const char* file; /* the file issuing the allocation request */
+char* file; /* the file issuing the allocation request */
int line; /* line number */
#endif
{
- reg Pfobj_t *pf, *last;
- reg Vmulong_t h;
- reg int n;
- reg const char* cp;
+ reg Pfobj_t *pf, *last;
+ reg Vmulong_t h;
+ reg int n;
+ reg char *cp;
if(!Vmpf && !(Vmpf = vmopen(Vmdcheap,Vmpool,0)) )
return NIL(Pfobj_t*);
@@ -207,13 +207,13 @@ Vmalloc_t* vm;
}
#if __STD_C
-static void pfsetinfo(Vmalloc_t* vm, Vmuchar_t* data, size_t size, const char* file, int line)
+static void pfsetinfo(Vmalloc_t* vm, Vmuchar_t* data, size_t size, char* file, int line)
#else
static void pfsetinfo(vm, data, size, file, line)
Vmalloc_t* vm;
Vmuchar_t* data;
size_t size;
-const char* file;
+char* file;
int line;
#endif
{
@@ -229,7 +229,7 @@ int line;
}
if((pf = pfsearch(vm,file,line)) )
- { PFALLOC(pf) += size;
+ { PFALLOC(pf) += (Vmulong_t)size;
PFNALLOC(pf) += 1;
}
PFOBJ(data) = pf;
@@ -238,7 +238,7 @@ int line;
if(pf)
{ /* update region statistics */
pf = PFREGION(pf);
- PFALLOC(pf) += size;
+ PFALLOC(pf) += (Vmulong_t)size;
PFNALLOC(pf) += 1;
if((s = PFALLOC(pf) - PFFREE(pf)) > PFMAX(pf) )
PFMAX(pf) = s;
@@ -361,7 +361,7 @@ int fd;
reg Pfobj_t *pf, *list, *next, *last;
reg int n;
reg Vmulong_t nalloc, alloc, nfree, free;
- reg Seg_t* seg;
+ reg Seg_t *seg;
char buf[1024], *bufp, *endbuf;
#define INITBUF() (bufp = buf, endbuf = buf+sizeof(buf)-128)
#define CHKBUF() (bufp >= endbuf ? (write(fd,buf,bufp-buf), bufp=buf) : bufp)
@@ -413,7 +413,7 @@ int fd;
continue;
alloc = 0;
for(seg = PFVM(pf)->data->seg; seg; seg = seg->next)
- alloc += seg->extent;
+ alloc += (Vmulong_t)seg->extent;
bufp = (*_Vmstrcpy)(bufp,"region", '=');
bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(PFVM(pf)),0), ':');
bufp = pfsummary(bufp,PFNALLOC(pf),PFALLOC(pf),
@@ -461,94 +461,72 @@ int fd;
}
#if __STD_C
-static Void_t* pfalloc(Vmalloc_t* vm, size_t size)
+static Void_t* pfalloc(Vmalloc_t* vm, size_t size, int local)
#else
-static Void_t* pfalloc(vm, size)
+static Void_t* pfalloc(vm, size, local)
Vmalloc_t* vm;
size_t size;
+int local;
#endif
{
- reg size_t s;
- reg Void_t* data;
- reg char* file;
- reg int line, local, inuse;
- reg Void_t* func;
- reg Vmdata_t* vd = vm->data;
+ reg size_t s;
+ reg Void_t *data;
+ reg char *file;
+ reg int line;
+ reg Void_t *func;
+ reg Vmdata_t *vd = vm->data;
VMFLF(vm,file,line,func);
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd, local);
- if(ISLOCK(vd, local))
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd, local);
- }
- s = ROUND(size,ALIGN) + PF_EXTRA;
- if(!(data = KPVALLOC(vm,s,(*(Vmbest->allocf))) ) )
- goto done;
+ SETLOCK(vm, local);
- pfsetinfo(vm,(Vmuchar_t*)data,size,file,line);
+ s = ROUND(size,ALIGN) + PF_EXTRA;
+ if((data = KPVALLOC(vm,s,(*(Vmbest->allocf))) ) )
+ { pfsetinfo(vm,(Vmuchar_t*)data,size,file,line);
- if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
- { vm->file = file; vm->line = line; vm->func = func;
- (*_Vmtrace)(vm,NIL(Vmuchar_t*),(Vmuchar_t*)data,size,0);
+ if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
+ { vm->file = file; vm->line = line; vm->func = func;
+ (*_Vmtrace)(vm,NIL(Vmuchar_t*),(Vmuchar_t*)data,size,0);
+ }
}
-done:
- CLRLOCK(vd, local);
- ANNOUNCE(local, vm, VM_ALLOC, (Void_t*)data, vm->disc);
- CLRINUSE(vd, inuse);
+
+ CLRLOCK(vm, local);
+
return data;
}
#if __STD_C
-static int pffree(Vmalloc_t* vm, Void_t* data)
+static int pffree(Vmalloc_t* vm, Void_t* data, int local)
#else
-static int pffree(vm, data)
+static int pffree(vm, data, local)
Vmalloc_t* vm;
Void_t* data;
+int local;
#endif
{
- reg Pfobj_t* pf;
- reg size_t s;
- reg char* file;
- reg int line, rv, local, inuse;
- reg Void_t* func;
- reg Vmdata_t* vd = vm->data;
+ reg Pfobj_t *pf;
+ reg size_t s;
+ reg char *file;
+ reg int line, rv;
+ reg Void_t *func;
+ reg Vmdata_t *vd = vm->data;
VMFLF(vm,file,line,func);
if(!data)
return 0;
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local);
- if(ISLOCK(vd,local))
- { CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd,local);
- }
-
- if(KPVADDR(vm,data,Vmbest->addrf) != 0 )
- { if(vm->disc->exceptf)
- (void)(*vm->disc->exceptf)(vm,VM_BADADDR,data,vm->disc);
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
- return -1;
- }
+ SETLOCK(vm,local);
+ /**/ASSERT(KPVADDR(vm, data, Vmbest->addrf) == 0 );
pf = PFOBJ(data);
s = PFSIZE(data);
if(pf)
{ PFNFREE(pf) += 1;
- PFFREE(pf) += s;
+ PFFREE(pf) += (Vmulong_t)s;
pf = PFREGION(pf);
PFNFREE(pf) += 1;
- PFFREE(pf) += s;
+ PFFREE(pf) += (Vmulong_t)s;
}
if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
@@ -557,72 +535,58 @@ Void_t* data;
}
rv = KPVFREE((vm), (Void_t*)data, (*Vmbest->freef));
- CLRLOCK(vd,local);
- ANNOUNCE(local, vm, VM_FREE, data, vm->disc);
- CLRINUSE(vd, inuse);
+
+ CLRLOCK(vm, local);
+
return rv;
}
#if __STD_C
-static Void_t* pfresize(Vmalloc_t* vm, Void_t* data, size_t size, int type)
+static Void_t* pfresize(Vmalloc_t* vm, Void_t* data, size_t size, int type, int local)
#else
-static Void_t* pfresize(vm, data, size, type)
+static Void_t* pfresize(vm, data, size, type, local)
Vmalloc_t* vm;
Void_t* data;
size_t size;
int type;
+int local;
#endif
{
- reg Pfobj_t* pf;
- reg size_t s;
- reg size_t news;
- reg Void_t* addr;
- reg char* file;
- reg int line, local, inuse;
- reg Void_t* func;
- reg size_t oldsize;
- reg Vmdata_t* vd = vm->data;
-
- SETINUSE(vd, inuse);
+ reg Pfobj_t *pf;
+ reg size_t s, news;
+ reg Void_t *addr;
+ reg char *file;
+ reg int line;
+ reg Void_t *func;
+ reg size_t oldsize;
+ reg Vmdata_t *vd = vm->data;
+
if(!data)
- { oldsize = 0;
- addr = pfalloc(vm,size);
- goto done;
+ { addr = pfalloc(vm, size, local);
+ if(addr && (type&VM_RSZERO) )
+ memset(addr, 0, size);
+ return addr;
}
if(size == 0)
- { (void)pffree(vm,data);
- CLRINUSE(vd, inuse);
+ { (void)pffree(vm, data, local);
return NIL(Void_t*);
}
VMFLF(vm,file,line,func);
- if(!(local = vd->mode&VM_TRUST))
- { GETLOCAL(vd, local);
- if(ISLOCK(vd, local))
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd, local);
- }
- if(KPVADDR(vm,data,Vmbest->addrf) != 0 )
- { if(vm->disc->exceptf)
- (void)(*vm->disc->exceptf)(vm,VM_BADADDR,data,vm->disc);
- CLRLOCK(vd, local);
- CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
+ SETLOCK(vm, local);
+ /**/ASSERT(KPVADDR(vm,data,Vmbest->addrf) == 0 );
pf = PFOBJ(data);
s = oldsize = PFSIZE(data);
news = ROUND(size,ALIGN) + PF_EXTRA;
if((addr = KPVRESIZE(vm,data,news,(type&~VM_RSZERO),Vmbest->resizef)) )
{ if(pf)
- { PFFREE(pf) += s;
+ { PFFREE(pf) += (Vmulong_t)s;
PFNFREE(pf) += 1;
pf = PFREGION(pf);
- PFFREE(pf) += s;
+ PFFREE(pf) += (Vmulong_t)s;
PFNFREE(pf) += 1;
pfsetinfo(vm,(Vmuchar_t*)addr,size,file,line);
}
@@ -633,102 +597,94 @@ int type;
}
}
else if(pf) /* reset old info */
- { PFALLOC(pf) -= s;
+ { PFALLOC(pf) -= (Vmulong_t)s;
PFNALLOC(pf) -= 1;
pf = PFREGION(pf);
- PFALLOC(pf) -= s;
+ PFALLOC(pf) -= (Vmulong_t)s;
PFNALLOC(pf) -= 1;
file = PFFILE(pf);
line = PFLINE(pf);
pfsetinfo(vm,(Vmuchar_t*)data,s,file,line);
}
- CLRLOCK(vd, local);
- ANNOUNCE(local, vm, VM_RESIZE, (Void_t*)addr, vm->disc);
-
-done: if(addr && (type&VM_RSZERO) && oldsize < size)
+ if(addr && (type&VM_RSZERO) && oldsize < size)
{ reg Vmuchar_t *d = (Vmuchar_t*)addr+oldsize, *ed = (Vmuchar_t*)addr+size;
do { *d++ = 0; } while(d < ed);
}
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, local);
+
return addr;
}
#if __STD_C
-static long pfsize(Vmalloc_t* vm, Void_t* addr)
+static long pfsize(Vmalloc_t* vm, Void_t* addr, int local)
#else
-static long pfsize(vm, addr)
+static long pfsize(vm, addr, local)
Vmalloc_t* vm;
Void_t* addr;
+int local;
#endif
{
- return (*Vmbest->addrf)(vm,addr) != 0 ? -1L : (long)PFSIZE(addr);
+ return (*Vmbest->addrf)(vm, addr, local) != 0 ? -1L : (long)PFSIZE(addr);
}
#if __STD_C
-static long pfaddr(Vmalloc_t* vm, Void_t* addr)
+static long pfaddr(Vmalloc_t* vm, Void_t* addr, int local)
#else
-static long pfaddr(vm, addr)
+static long pfaddr(vm, addr, local)
Vmalloc_t* vm;
Void_t* addr;
+int local;
#endif
{
- return (*Vmbest->addrf)(vm,addr);
+ return (*Vmbest->addrf)(vm, addr, local);
}
#if __STD_C
-static int pfcompact(Vmalloc_t* vm)
+static int pfcompact(Vmalloc_t* vm, int local)
#else
-static int pfcompact(vm)
+static int pfcompact(vm, local)
Vmalloc_t* vm;
+int local;
#endif
{
- return (*Vmbest->compactf)(vm);
+ return (*Vmbest->compactf)(vm, local);
}
#if __STD_C
-static Void_t* pfalign(Vmalloc_t* vm, size_t size, size_t align)
+static Void_t* pfalign(Vmalloc_t* vm, size_t size, size_t align, int local)
#else
-static Void_t* pfalign(vm, size, align)
+static Void_t* pfalign(vm, size, align, local)
Vmalloc_t* vm;
size_t size;
size_t align;
+int local;
#endif
{
- reg size_t s;
- reg Void_t* data;
- reg char* file;
- reg int line, local, inuse;
- reg Void_t* func;
- reg Vmdata_t* vd = vm->data;
+ reg size_t s;
+ reg Void_t *data;
+ reg char *file;
+ reg int line;
+ reg Void_t *func;
+ reg Vmdata_t *vd = vm->data;
VMFLF(vm,file,line,func);
- SETINUSE(vd, inuse);
- if(!(local = vd->mode&VM_TRUST) )
- { GETLOCAL(vd,local);
- if(ISLOCK(vd, local))
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd, local);
- }
+ SETLOCK(vm, local);
s = (size <= TINYSIZE ? TINYSIZE : ROUND(size,ALIGN)) + PF_EXTRA;
- if(!(data = KPVALIGN(vm,s,align,Vmbest->alignf)) )
- goto done;
-
- pfsetinfo(vm,(Vmuchar_t*)data,size,file,line);
+ if((data = KPVALIGN(vm,s,align,Vmbest->alignf)) )
+ { pfsetinfo(vm,(Vmuchar_t*)data,size,file,line);
- if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
- { vm->file = file; vm->line = line; vm->func = func;
- (*_Vmtrace)(vm,NIL(Vmuchar_t*),(Vmuchar_t*)data,size,align);
+ if(!local && (vd->mode&VM_TRACE) && _Vmtrace)
+ { vm->file = file; vm->line = line; vm->func = func;
+ (*_Vmtrace)(vm,NIL(Vmuchar_t*),(Vmuchar_t*)data,size,align);
+ }
}
-done:
- CLRLOCK(vd, local);
- ANNOUNCE(local, vm, VM_ALLOC, data, vm->disc);
- CLRINUSE(vd, inuse);
+
+ CLRLOCK(vm, local);
+
return data;
}
diff --git a/usr/src/lib/libast/common/vmalloc/vmregion.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmregion.c
index cfdbb67016..9aa1172ef7 100644
--- a/usr/src/lib/libast/common/vmalloc/vmregion.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmregion.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -48,9 +48,12 @@ Void_t* addr;
return NIL(Vmalloc_t*);
vd = SEG(BLOCK(addr))->vmdt;
+
+ _vmlock(NIL(Vmalloc_t*), 1);
for(vm = Vmheap; vm; vm = vm->next)
if(vm->data == vd)
break;
+ _vmlock(NIL(Vmalloc_t*), 0);
return vm;
}
diff --git a/usr/src/lib/libast/common/vmalloc/vmsegment.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmsegment.c
index 7d7dbad275..9cf658de5a 100644
--- a/usr/src/lib/libast/common/vmalloc/vmsegment.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmsegment.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,26 +40,18 @@ Vmalloc_t* vm; /* region */
Void_t* addr; /* address */
#endif
{
- reg Seg_t* seg;
- reg Vmdata_t* vd = vm->data;
- reg int inuse;
+ Seg_t *seg;
+ Vmdata_t *vd = vm->data;
- SETINUSE(vd, inuse);
- if(!(vd->mode&VM_TRUST))
- { if(ISLOCK(vd,0))
- { CLRINUSE(vd, inuse);
- return NIL(Void_t*);
- }
- SETLOCK(vd,0);
- }
+ SETLOCK(vm, 0);
for(seg = vd->seg; seg; seg = seg->next)
if((Vmuchar_t*)addr >= (Vmuchar_t*)seg->addr &&
(Vmuchar_t*)addr < (Vmuchar_t*)seg->baddr )
break;
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, 0);
+
return seg ? (Void_t*)seg->addr : NIL(Void_t*);
}
diff --git a/usr/src/lib/libast/common/vmalloc/vmset.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmset.c
index 7997f8e1e3..c437692baa 100644
--- a/usr/src/lib/libast/common/vmalloc/vmset.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmset.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -41,32 +41,20 @@ int flags; /* flags must be in VM_FLAGS */
int on; /* !=0 if turning on, else turning off */
#endif
{
- reg int mode, inuse;
- reg Vmdata_t* vd = vm->data;
+ int mode;
+ Vmdata_t *vd = vm->data;
if(flags == 0 && on == 0)
return vd->mode;
- SETINUSE(vd, inuse);
- if(!(vd->mode&VM_TRUST) )
- { if(ISLOCK(vd,0))
- { CLRINUSE(vd, inuse);
- return 0;
- }
- SETLOCK(vd,0);
- }
+ SETLOCK(vm, 0);
mode = vd->mode;
-
if(on)
vd->mode |= (flags&VM_FLAGS);
else vd->mode &= ~(flags&VM_FLAGS);
- if(vd->mode&(VM_TRACE|VM_MTDEBUG))
- vd->mode &= ~VM_TRUST;
-
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
+ CLRLOCK(vm, 0);
return mode;
}
diff --git a/usr/src/lib/libast/common/vmalloc/vmstat.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmstat.c
index 9693c460b3..8d13de8d83 100644
--- a/usr/src/lib/libast/common/vmalloc/vmstat.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmstat.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,30 +40,37 @@ Vmalloc_t* vm;
Vmstat_t* st;
#endif
{
- reg Seg_t* seg;
- reg Block_t *b, *endb;
- reg size_t s = 0;
- reg Vmdata_t* vd = vm ? vm->data : Vmregion->data;
- reg int inuse;
-
- SETINUSE(vd, inuse);
- if(!st)
- { CLRINUSE(vd, inuse);
- return inuse ? 1 : 0;
- }
- if(!(vd->mode&VM_TRUST))
- { if(ISLOCK(vd,0))
- { CLRINUSE(vd, inuse);
- return -1;
- }
- SETLOCK(vd,0);
+ size_t s;
+ Seg_t *seg;
+ Block_t *b, *endb;
+ Vmdata_t *vd;
+ Void_t *d;
+
+ if(!st) /* just checking lock state of region */
+ return (vm ? vm : Vmregion)->data->lock;
+
+ memset(st, 0, sizeof(Vmstat_t));
+
+ if(!vm)
+ { /* getting data for malloc */
+#if ( !_std_malloc || !_BLD_ast ) && !_AST_std_malloc
+ extern int _mallocstat(Vmstat_t*);
+ return _mallocstat(st);
+#else
+ return -1;
+#endif
}
+ SETLOCK(vm, 0);
+
st->n_busy = st->n_free = 0;
st->s_busy = st->s_free = st->m_busy = st->m_free = 0;
st->n_seg = 0;
st->extent = 0;
+ vd = vm->data;
+ st->mode = vd->mode;
+ s = 0;
if(vd->mode&VM_MTLAST)
st->n_busy = 0;
else if((vd->mode&VM_MTPOOL) && (s = vd->pool) > 0)
@@ -89,10 +96,11 @@ Vmstat_t* st;
st->n_free += 1;
}
else /* get the real size */
- { if(vd->mode&VM_MTDEBUG)
- s = DBSIZE(DB2DEBUG(DATA(b)));
+ { d = DATA(b);
+ if(vd->mode&VM_MTDEBUG)
+ s = DBSIZE(DB2DEBUG(d));
else if(vd->mode&VM_MTPROFILE)
- s = PFSIZE(DATA(b));
+ s = PFSIZE(d);
if(s > st->m_busy)
st->m_busy = s;
st->s_busy += s;
@@ -101,6 +109,7 @@ Vmstat_t* st;
b = (Block_t*)((Vmuchar_t*)DATA(b) + (SIZE(b)&~BITS) );
}
+ /**/ASSERT(st->extent >= (st->s_busy + st->s_free));
}
else if(vd->mode&VM_MTLAST)
{ if((s = seg->free ? (SIZE(seg->free) + sizeof(Head_t)) : 0) > 0)
@@ -127,9 +136,9 @@ Vmstat_t* st;
st->s_free = (st->m_free = vd->pool)*st->n_free;
}
- CLRLOCK(vd,0);
- CLRINUSE(vd, inuse);
- return inuse ? 1 : 0;
+ CLRLOCK(vm, 0);
+
+ return 0;
}
#endif
diff --git a/usr/src/lib/libast/common/vmalloc/vmstrdup.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmstrdup.c
index 211666621a..2172f6ea8a 100644
--- a/usr/src/lib/libast/common/vmalloc/vmstrdup.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmstrdup.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,7 +40,7 @@ register char* s;
#endif
{
register char* t;
- register int n;
+ register size_t n;
return (s && (t = vmalloc(v, n = strlen(s) + 1))) ? (char*)memcpy(t, s, n) : (char*)0;
}
diff --git a/usr/src/lib/libast/common/vmalloc/vmtrace.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmtrace.c
index 7ecbb5490f..22edba3978 100644
--- a/usr/src/lib/libast/common/vmalloc/vmtrace.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmtrace.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -112,7 +112,7 @@ size_t align; /* alignment */
Vmdata_t* vd = vm->data;
const char* file = 0;
int line = 0;
- const Void_t* func = 0;
+ const char* func = 0;
int comma;
int n;
int m;
@@ -176,7 +176,7 @@ size_t align; /* alignment */
{ if(comma)
*bufp++ = ',';
bufp = trstrcpy(bufp, "func", '=');
-#if _PACKAGE_ast
+#if 1
bufp = trstrcpy(bufp, (const char*)func, 0);
#else
bufp = trstrcpy(bufp, tritoa((Vmulong_t)func,0), 0);
@@ -192,7 +192,6 @@ size_t align; /* alignment */
write(Trfile,buf,(bufp-buf));
}
-#if DEBUG
#if __STD_C
void _vmmessage(const char* s1, long n1, const char* s2, long n2)
#else
@@ -203,7 +202,7 @@ const char* s2;
long n2;
#endif
{
- char buf[1024], *bufp;
+ char buf[1024], *bufp;
bufp = buf;
bufp = trstrcpy(bufp, "vmalloc", ':');
@@ -219,11 +218,12 @@ long n2;
if (n2)
bufp = trstrcpy(bufp, tritoa(n2, 0), ':');
}
+
bufp = trstrcpy(bufp, tritoa((long)getpid(), 1), ':');
+
*bufp++ = '\n';
write(2,buf,(bufp-buf));
}
-#endif
#if __STD_C
int vmtrace(int file)
diff --git a/usr/src/lib/libast/common/vmalloc/vmwalk.c b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmwalk.c
index 7336d65589..d7a8e36d32 100644
--- a/usr/src/lib/libast/common/vmalloc/vmwalk.c
+++ b/usr/src/contrib/ast/src/lib/libast/vmalloc/vmwalk.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -37,41 +37,33 @@ int vmwalk(Vmalloc_t* vm, int(*segf)(Vmalloc_t*, Void_t*, size_t, Vmdisc_t*, Voi
#else
int vmwalk(vm, segf, handle)
Vmalloc_t* vm;
-int(* segf)(/* Vmalloc_t*, Void_t*, size_t, Vmdisc_t* */);
+int(* segf)(/* Vmalloc_t*, Void_t*, size_t, Vmdisc_t*, Void_t* */);
Void_t* handle;
#endif
{
- reg Seg_t* seg;
- reg int rv;
+ reg Seg_t *seg;
+ reg int rv = 0;
if(!vm)
- { for(vm = Vmheap; vm; vm = vm->next)
- { if(!(vm->data->mode&VM_TRUST) && ISLOCK(vm->data,0) )
- continue;
-
- SETLOCK(vm->data,0);
+ { _vmlock(NIL(Vmalloc_t*), 1);
+ for(vm = Vmheap; vm; vm = vm->next)
+ { SETLOCK(vm, 0);
for(seg = vm->data->seg; seg; seg = seg->next)
- { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle);
- if(rv < 0)
- return rv;
- }
- CLRLOCK(vm->data,0);
+ if((rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle)) < 0 )
+ break;
+ CLRLOCK(vm, 0);
}
+ _vmlock(NIL(Vmalloc_t*), 0);
}
else
- { if(!(vm->data->mode&VM_TRUST) && ISLOCK(vm->data,0) )
- return -1;
-
- SETLOCK(vm->data,0);
+ { SETLOCK(vm, 0);
for(seg = vm->data->seg; seg; seg = seg->next)
- { rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle);
- if(rv < 0)
- return rv;
- }
- CLRLOCK(vm->data,0);
+ if((rv = (*segf)(vm, seg->addr, seg->extent, vm->disc, handle)) < 0 )
+ break;
+ CLRLOCK(vm, 0);
}
- return 0;
+ return rv;
}
#endif
diff --git a/usr/src/contrib/ast/src/lib/libcmd/Makefile b/usr/src/contrib/ast/src/lib/libcmd/Makefile
new file mode 100644
index 0000000000..0a4f37d8c4
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libcmd/Makefile
@@ -0,0 +1,90 @@
+/*
+ * command library -- commands small enough to be builtins
+ */
+
+:PACKAGE: ast
+
+LICENSE = since=1992,author=gsf+dgk
+
+CCFLAGS = $(CC.SUFFIX.DEBUG:+$(CC.DEBUG)) $(CC.OPTIMIZE) $(CC.DLL)
+
+/* 2009-04-15 ld.so experiment -- may become a default for all plugins */
+CC.DLL.ORIGIN = $(CC.LD.ORIGIN:C,/.*,,)
+LDFLAGS = $(CC.DLL.ORIGIN)
+
+CP = $(STDCP|"cp")
+CHMOD = $(STDCHMOD|"chmod")
+
+HOSTTYPE == "$(CC.HOSTTYPE)"
+
+cmd 1.2 :LIBRARY: RELEASE cmdinit.c \
+ cmd.h rev.h wc.h \
+ basename.c cat.c chgrp.c chmod.c chown.c cksum.c cmp.c \
+ comm.c cp.c cut.c dirname.c date.c expr.c fds.c fmt.c fold.c \
+ getconf.c head.c id.c join.c ln.c logname.c md5sum.c mkdir.c \
+ mkfifo.c mktemp.c mv.c paste.c pathchk.c pids.c rev.c rm.c \
+ rmdir.c stty.c sum.c sync.c tail.c tee.c tty.c uname.c uniq.c \
+ vmstate.c wc.c revlib.c wclib.c sumlib.o \
+ fts_fix.c lib.c \
+ -lfsg -lmd -lutil
+
+sumlib.o : +lsum
+ $(AR) x $(*:O=1) $(<)
+
+$(INCLUDEDIR) :INSTALLPROTO: cmd.h cmdext.h cmdlist.h
+
+"win32*" :NOOPTIMIZE: id.c
+
+src = $(*$(*$(*cmd)):N=*.c:T=F)
+
+cmdext.h : (src) $$(-mam:+$$(src))
+ {
+ cat <<!
+ $("#")pragma prototyped
+ $("/")*
+ $(" ")* -lcmd extern function prototypes
+ $(" ")*/
+
+ $("#")include <shcmd.h>
+
+ !
+ $(SED) \
+ -e '/^b_[a-z_][a-z_0-9]*(/!d' \
+ -e 's/^b_//' \
+ -e 's/(.*//' \
+ -e 's/.*/extern int b_&(int, char**, Shbltin_t*);/' \
+ $($(~:O=1)) |
+ $(SORT) -u
+ } > 1.$(tmp).h
+ if $(CMP) $(CMPFLAGS) 1.$(tmp).h $(<)
+ then $(RM) $(RMFLAGS) 1.$(tmp).h
+ else $(MV) 1.$(tmp).h $(<)
+ fi
+
+cmdlist.h : (src) $$(-mam:+$$(src))
+ {
+ cat <<!
+ $("#")pragma prototyped
+ $("/")*
+ $(" ")* -lcmd function list -- define your own CMDLIST()
+ $(" ")*/
+
+ !
+ $(SED) \
+ -e '/^b_[a-z_][a-z_0-9]*(/!d' \
+ -e 's/^b_//' \
+ -e 's/(.*//' \
+ -e 's/.*/CMDLIST(&)/' \
+ $($(~):T=F) |
+ $(SORT) -u
+ } > 1.$(tmp).h
+ if $(CMP) $(CMPFLAGS) 1.$(tmp).h $(<)
+ then $(RM) $(RMFLAGS) 1.$(tmp).h
+ else $(MV) 1.$(tmp).h $(<)
+ fi
+
+if CC.HOSTTYPE == "sun4"
+ pathsetlink == symlink /* ld.so workaround */
+end
+
+ignore dlldefs.h /* prevents bootstrap double build */
diff --git a/usr/src/contrib/ast/src/lib/libcmd/Mamfile b/usr/src/contrib/ast/src/lib/libcmd/Mamfile
new file mode 100644
index 0000000000..a1a2e4c762
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libcmd/Mamfile
@@ -0,0 +1,916 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+setv INSTALLROOT ../../..
+setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
+setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS ${mam_cc_DLL}
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS ""
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+make cmd
+make libcmd.a archive
+make cmd.req
+exec - set -
+exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c 1.${COTEMP}.c &&
+exec - x=`${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
+exec - {
+exec - case "" in
+exec - *?) echo " " ;;
+exec - esac
+exec - for i in cmd fsg md util ast
+exec - do case $i in
+exec - "cmd"|cmd)
+exec - ;;
+exec - *) if test -f ${INSTALLROOT}/lib/lib/$i
+exec - then y=`cat ${INSTALLROOT}/lib/lib/$i`
+exec - case $y in
+exec - *-?*) echo "" $y ;;
+exec - esac
+exec - continue
+exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a
+exec - then case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) continue ;;
+exec - esac
+exec - ;;
+exec - esac
+exec - fi
+exec - ;;
+exec - esac
+exec - echo " -l$i"
+exec - done
+exec - } > cmd.req
+exec - rm -f 1.${COTEMP}.*
+done cmd.req generated
+make cmdinit.o
+make cmdinit.c
+make ${PACKAGE_ast_INCLUDE}/shcmd.h implicit
+make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
+done ${PACKAGE_ast_INCLUDE}/shcmd.h
+make cmd.h implicit
+make ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit
+done ${PACKAGE_ast_INCLUDE}/dlldefs.h dontcare ignore
+make cmdext.h implicit
+prev cmdinit.c
+make basename.c
+prev cmd.h implicit
+done basename.c
+make cat.c
+make ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare
+done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare
+done ${PACKAGE_ast_INCLUDE}/endian.h dontcare
+prev cmd.h implicit
+done cat.c
+make chgrp.c
+make FEATURE/symlink implicit
+meta FEATURE/symlink features/%>FEATURE/% features/symlink symlink
+make features/symlink
+done features/symlink
+bind -lutil
+bind -last
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libutil} ${mam_libast} : run features/symlink
+done FEATURE/symlink generated
+make fts_fix.h implicit
+make ${PACKAGE_ast_INCLUDE}/fts.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_mode.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+make ${PACKAGE_ast_INCLUDE}/regex.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare
+done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare
+make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare
+done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/regex.h dontcare
+make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
+prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/fts.h dontcare
+done fts_fix.h
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ls.h
+make ${PACKAGE_ast_INCLUDE}/cdt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/cdt.h
+prev cmd.h implicit
+done chgrp.c
+make chmod.c
+prev FEATURE/symlink implicit
+prev fts_fix.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done chmod.c
+make chown.c
+prev cmd.h implicit
+done chown.c
+make cksum.c
+make ${PACKAGE_ast_INCLUDE}/error.h implicit
+make ${PACKAGE_ast_INCLUDE}/option.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare
+make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/option.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/error.h
+prev fts_fix.h implicit
+make ${PACKAGE_ast_INCLUDE}/modex.h implicit
+make ${PACKAGE_ast_INCLUDE}/modecanon.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/modecanon.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/modex.h
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+make ${PACKAGE_ast_INCLUDE}/sum.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/sum.h
+prev cmd.h implicit
+done cksum.c
+make cmp.c
+make ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_ccode.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_ccode.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ccode.h
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done cmp.c
+make comm.c
+prev cmd.h implicit
+done comm.c
+make cp.c
+make ${PACKAGE_ast_INCLUDE}/tmx.h implicit
+make ${PACKAGE_ast_INCLUDE}/tv.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done ${PACKAGE_ast_INCLUDE}/tv.h dontcare
+make ${PACKAGE_ast_INCLUDE}/tm.h implicit
+make ${PACKAGE_ast_INCLUDE}/times.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_time.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/times.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/tm.h dontcare
+done ${PACKAGE_ast_INCLUDE}/tmx.h
+make ${PACKAGE_ast_INCLUDE}/stk.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/stk.h
+make ${PACKAGE_ast_INCLUDE}/hashkey.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/hashkey.h
+make ${PACKAGE_ast_INCLUDE}/fs3d.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/fs3d.h
+prev fts_fix.h implicit
+prev ${PACKAGE_ast_INCLUDE}/times.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done cp.c
+make cut.c
+prev cmd.h implicit
+done cut.c
+make dirname.c
+prev cmd.h implicit
+done dirname.c
+make date.c
+prev ${PACKAGE_ast_INCLUDE}/times.h implicit
+prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit
+make ${PACKAGE_ast_INCLUDE}/proc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/proc.h
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done date.c
+make expr.c
+prev ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev cmd.h implicit
+done expr.c
+make fds.c
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make FEATURE/sockets implicit
+meta FEATURE/sockets features/%>FEATURE/% features/sockets sockets
+make features/sockets
+done features/sockets
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libutil} ${mam_libast} : run features/sockets
+done FEATURE/sockets generated
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done fds.c
+make fmt.c
+prev cmd.h implicit
+done fmt.c
+make fold.c
+prev cmd.h implicit
+done fold.c
+make getconf.c
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev ${PACKAGE_ast_INCLUDE}/proc.h implicit
+prev cmd.h implicit
+done getconf.c
+make head.c
+prev cmd.h implicit
+done head.c
+make id.c
+make fsg.h implicit
+done fsg.h dontcare virtual
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+make FEATURE/ids implicit
+meta FEATURE/ids features/%>FEATURE/% features/ids ids
+make features/ids
+done features/ids
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libutil} ${mam_libast} : run features/ids
+done FEATURE/ids generated
+prev cmd.h implicit
+done id.c
+make join.c
+prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+make ${PACKAGE_ast_INCLUDE}/sfdisc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfdisc.h
+prev cmd.h implicit
+done join.c
+make ln.c
+prev cmd.h implicit
+done ln.c
+make logname.c
+prev cmd.h implicit
+done logname.c
+make md5sum.c
+prev cmd.h implicit
+done md5sum.c
+make mkdir.c
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done mkdir.c
+make mkfifo.c
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done mkfifo.c
+make mktemp.c
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done mktemp.c
+make mv.c
+prev cmd.h implicit
+done mv.c
+make paste.c
+prev cmd.h implicit
+done paste.c
+make pathchk.c
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done pathchk.c
+make pids.c
+prev ${PACKAGE_ast_INCLUDE}/sfdisc.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_tty.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_tty.h
+prev cmd.h implicit
+done pids.c
+make rev.c
+make rev.h implicit
+done rev.h
+prev cmd.h implicit
+done rev.c
+make rm.c
+prev ${PACKAGE_ast_INCLUDE}/fs3d.h implicit
+prev fts_fix.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done rm.c
+make rmdir.c
+prev cmd.h implicit
+done rmdir.c
+make stty.c
+prev ${PACKAGE_ast_INCLUDE}/ast_tty.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+prev cmd.h implicit
+done stty.c
+make sum.c
+prev cmd.h implicit
+done sum.c
+make sync.c
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done sync.c
+make tail.c
+prev rev.h implicit
+prev ${PACKAGE_ast_INCLUDE}/tv.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done tail.c
+make tee.c
+make ${PACKAGE_ast_INCLUDE}/sig.h implicit
+done ${PACKAGE_ast_INCLUDE}/sig.h
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+prev cmd.h implicit
+done tee.c
+make tty.c
+prev cmd.h implicit
+done tty.c
+make uname.c
+make FEATURE/utsname implicit
+meta FEATURE/utsname features/%>FEATURE/% features/utsname utsname
+make features/utsname
+done features/utsname
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libutil} ${mam_libast} : run features/utsname
+done FEATURE/utsname generated
+prev ${PACKAGE_ast_INCLUDE}/proc.h implicit
+prev cmd.h implicit
+done uname.c
+make uniq.c
+prev cmd.h implicit
+done uniq.c
+make vmstate.c
+prev ${PACKAGE_ast_INCLUDE}/sfdisc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev cmd.h implicit
+done vmstate.c
+make wc.c
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+make wc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done wc.h
+prev cmd.h implicit
+done wc.c
+make revlib.c
+prev rev.h implicit
+prev cmd.h implicit
+done revlib.c
+make wclib.c
+make ${PACKAGE_ast_INCLUDE}/lc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/lc.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+prev wc.h implicit
+prev cmd.h implicit
+done wclib.c
+make fts_fix.c
+prev fts_fix.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done fts_fix.c
+make lib.c
+prev cmd.h implicit
+done lib.c
+exec - {
+exec - cat <<!
+exec - #pragma prototyped
+exec - /*
+exec - * -lcmd extern function prototypes
+exec - */
+exec -
+exec - #include <shcmd.h>
+exec -
+exec - !
+exec - sed \
+exec - -e '/^b_[a-z_][a-z_0-9]*(/!d' \
+exec - -e 's/^b_//' \
+exec - -e 's/(.*//' \
+exec - -e 's/.*/extern int b_&(int, char**, Shbltin_t*);/' \
+exec - ${PACKAGEROOT}/src/lib/libcmd/cmdinit.c ${PACKAGEROOT}/src/lib/libcmd/basename.c ${PACKAGEROOT}/src/lib/libcmd/cat.c ${PACKAGEROOT}/src/lib/libcmd/chgrp.c ${PACKAGEROOT}/src/lib/libcmd/chmod.c ${PACKAGEROOT}/src/lib/libcmd/chown.c ${PACKAGEROOT}/src/lib/libcmd/cksum.c ${PACKAGEROOT}/src/lib/libcmd/cmp.c ${PACKAGEROOT}/src/lib/libcmd/comm.c ${PACKAGEROOT}/src/lib/libcmd/cp.c ${PACKAGEROOT}/src/lib/libcmd/cut.c ${PACKAGEROOT}/src/lib/libcmd/dirname.c ${PACKAGEROOT}/src/lib/libcmd/date.c ${PACKAGEROOT}/src/lib/libcmd/expr.c ${PACKAGEROOT}/src/lib/libcmd/fds.c ${PACKAGEROOT}/src/lib/libcmd/fmt.c ${PACKAGEROOT}/src/lib/libcmd/fold.c ${PACKAGEROOT}/src/lib/libcmd/getconf.c ${PACKAGEROOT}/src/lib/libcmd/head.c ${PACKAGEROOT}/src/lib/libcmd/id.c ${PACKAGEROOT}/src/lib/libcmd/join.c ${PACKAGEROOT}/src/lib/libcmd/ln.c ${PACKAGEROOT}/src/lib/libcmd/logname.c ${PACKAGEROOT}/src/lib/libcmd/md5sum.c ${PACKAGEROOT}/src/lib/libcmd/mkdir.c ${PACKAGEROOT}/src/lib/libcmd/mkfifo.c ${PACKAGEROOT}/src/lib/libcmd/mktemp.c ${PACKAGEROOT}/src/lib/libcmd/mv.c ${PACKAGEROOT}/src/lib/libcmd/paste.c ${PACKAGEROOT}/src/lib/libcmd/pathchk.c ${PACKAGEROOT}/src/lib/libcmd/pids.c ${PACKAGEROOT}/src/lib/libcmd/rev.c ${PACKAGEROOT}/src/lib/libcmd/rm.c ${PACKAGEROOT}/src/lib/libcmd/rmdir.c ${PACKAGEROOT}/src/lib/libcmd/stty.c ${PACKAGEROOT}/src/lib/libcmd/sum.c ${PACKAGEROOT}/src/lib/libcmd/sync.c ${PACKAGEROOT}/src/lib/libcmd/tail.c ${PACKAGEROOT}/src/lib/libcmd/tee.c ${PACKAGEROOT}/src/lib/libcmd/tty.c ${PACKAGEROOT}/src/lib/libcmd/uname.c ${PACKAGEROOT}/src/lib/libcmd/uniq.c ${PACKAGEROOT}/src/lib/libcmd/vmstate.c ${PACKAGEROOT}/src/lib/libcmd/wc.c ${PACKAGEROOT}/src/lib/libcmd/revlib.c ${PACKAGEROOT}/src/lib/libcmd/wclib.c ${PACKAGEROOT}/src/lib/libcmd/fts_fix.c ${PACKAGEROOT}/src/lib/libcmd/lib.c |
+exec - sort -u
+exec - } > 1.${COTEMP}.h
+exec - if cmp 2>/dev/null -s 1.${COTEMP}.h cmdext.h
+exec - then rm -f 1.${COTEMP}.h
+exec - else mv 1.${COTEMP}.h cmdext.h
+exec - fi
+prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit
+done cmdext.h dontcare generated
+prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit
+make ${PACKAGE_ast_INCLUDE}/stak.h implicit
+prev ${PACKAGE_ast_INCLUDE}/stk.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/stak.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done cmd.h
+done cmdinit.c
+meta cmdinit.o %.c>%.o cmdinit.c cmdinit
+prev cmdinit.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_cmd -D_PACKAGE_ast -c cmdinit.c
+done cmdinit.o generated
+make basename.o
+prev basename.c
+meta basename.o %.c>%.o basename.c basename
+prev basename.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c basename.c
+done basename.o generated
+make cat.o
+prev cat.c
+meta cat.o %.c>%.o cat.c cat
+prev cat.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -D_BLD_cmd -D_PACKAGE_ast -c cat.c
+done cat.o generated
+make chgrp.o
+prev chgrp.c
+meta chgrp.o %.c>%.o chgrp.c chgrp
+prev chgrp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c chgrp.c
+done chgrp.o generated
+make chmod.o
+prev chmod.c
+meta chmod.o %.c>%.o chmod.c chmod
+prev chmod.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c chmod.c
+done chmod.o generated
+make chown.o
+prev chown.c
+meta chown.o %.c>%.o chown.c chown
+prev chown.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_cmd -D_PACKAGE_ast -c chown.c
+done chown.o generated
+make cksum.o
+prev cksum.c
+meta cksum.o %.c>%.o cksum.c cksum
+prev cksum.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c cksum.c
+done cksum.o generated
+make cmp.o
+prev cmp.c
+meta cmp.o %.c>%.o cmp.c cmp
+prev cmp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c cmp.c
+done cmp.o generated
+make comm.o
+prev comm.c
+meta comm.o %.c>%.o comm.c comm
+prev comm.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c comm.c
+done comm.o generated
+make cp.o
+prev cp.c
+meta cp.o %.c>%.o cp.c cp
+prev cp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c cp.c
+done cp.o generated
+make cut.o
+prev cut.c
+meta cut.o %.c>%.o cut.c cut
+prev cut.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c cut.c
+done cut.o generated
+make dirname.o
+prev dirname.c
+meta dirname.o %.c>%.o dirname.c dirname
+prev dirname.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c dirname.c
+done dirname.o generated
+make date.o
+prev date.c
+meta date.o %.c>%.o date.c date
+prev date.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c date.c
+done date.o generated
+make expr.o
+prev expr.c
+meta expr.o %.c>%.o expr.c expr
+prev expr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c expr.c
+done expr.o generated
+make fds.o
+prev fds.c
+meta fds.o %.c>%.o fds.c fds
+prev fds.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c fds.c
+done fds.o generated
+make fmt.o
+prev fmt.c
+meta fmt.o %.c>%.o fmt.c fmt
+prev fmt.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c fmt.c
+done fmt.o generated
+make fold.o
+prev fold.c
+meta fold.o %.c>%.o fold.c fold
+prev fold.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c fold.c
+done fold.o generated
+make getconf.o
+prev getconf.c
+meta getconf.o %.c>%.o getconf.c getconf
+prev getconf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c getconf.c
+done getconf.o generated
+make head.o
+prev head.c
+meta head.o %.c>%.o head.c head
+prev head.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c head.c
+done head.o generated
+make id.o
+prev id.c
+meta id.o %.c>%.o id.c id
+prev id.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c id.c
+done id.o generated
+make join.o
+prev join.c
+meta join.o %.c>%.o join.c join
+prev join.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c join.c
+done join.o generated
+make ln.o
+prev ln.c
+meta ln.o %.c>%.o ln.c ln
+prev ln.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_cmd -D_PACKAGE_ast -c ln.c
+done ln.o generated
+make logname.o
+prev logname.c
+meta logname.o %.c>%.o logname.c logname
+prev logname.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c logname.c
+done logname.o generated
+make md5sum.o
+prev md5sum.c
+meta md5sum.o %.c>%.o md5sum.c md5sum
+prev md5sum.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_cmd -D_PACKAGE_ast -c md5sum.c
+done md5sum.o generated
+make mkdir.o
+prev mkdir.c
+meta mkdir.o %.c>%.o mkdir.c mkdir
+prev mkdir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c mkdir.c
+done mkdir.o generated
+make mkfifo.o
+prev mkfifo.c
+meta mkfifo.o %.c>%.o mkfifo.c mkfifo
+prev mkfifo.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c mkfifo.c
+done mkfifo.o generated
+make mktemp.o
+prev mktemp.c
+meta mktemp.o %.c>%.o mktemp.c mktemp
+prev mktemp.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c mktemp.c
+done mktemp.o generated
+make mv.o
+prev mv.c
+meta mv.o %.c>%.o mv.c mv
+prev mv.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_cmd -D_PACKAGE_ast -c mv.c
+done mv.o generated
+make paste.o
+prev paste.c
+meta paste.o %.c>%.o paste.c paste
+prev paste.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c paste.c
+done paste.o generated
+make pathchk.o
+prev pathchk.c
+meta pathchk.o %.c>%.o pathchk.c pathchk
+prev pathchk.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c pathchk.c
+done pathchk.o generated
+make pids.o
+prev pids.c
+meta pids.o %.c>%.o pids.c pids
+prev pids.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c pids.c
+done pids.o generated
+make rev.o
+prev rev.c
+meta rev.o %.c>%.o rev.c rev
+prev rev.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c rev.c
+done rev.o generated
+make rm.o
+prev rm.c
+meta rm.o %.c>%.o rm.c rm
+prev rm.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c rm.c
+done rm.o generated
+make rmdir.o
+prev rmdir.c
+meta rmdir.o %.c>%.o rmdir.c rmdir
+prev rmdir.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c rmdir.c
+done rmdir.o generated
+make stty.o
+prev stty.c
+meta stty.o %.c>%.o stty.c stty
+prev stty.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c stty.c
+done stty.o generated
+make sum.o
+prev sum.c
+meta sum.o %.c>%.o sum.c sum
+prev sum.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_cmd -D_PACKAGE_ast -c sum.c
+done sum.o generated
+make sync.o
+prev sync.c
+meta sync.o %.c>%.o sync.c sync
+prev sync.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c sync.c
+done sync.o generated
+make tail.o
+prev tail.c
+meta tail.o %.c>%.o tail.c tail
+prev tail.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c tail.c
+done tail.o generated
+make tee.o
+prev tee.c
+meta tee.o %.c>%.o tee.c tee
+prev tee.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c tee.c
+done tee.o generated
+make tty.o
+prev tty.c
+meta tty.o %.c>%.o tty.c tty
+prev tty.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c tty.c
+done tty.o generated
+make uname.o
+prev uname.c
+meta uname.o %.c>%.o uname.c uname
+prev uname.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -DHOSTTYPE=\""${mam_cc_HOSTTYPE}"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c uname.c
+done uname.o generated
+make uniq.o
+prev uniq.c
+meta uniq.o %.c>%.o uniq.c uniq
+prev uniq.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_BLD_cmd -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c uniq.c
+done uniq.o generated
+make vmstate.o
+prev vmstate.c
+meta vmstate.o %.c>%.o vmstate.c vmstate
+prev vmstate.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c vmstate.c
+done vmstate.o generated
+make wc.o
+prev wc.c
+meta wc.o %.c>%.o wc.c wc
+prev wc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libcmd"\" -D_PACKAGE_ast -D_BLD_cmd -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1992-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libcmd]"\" -c wc.c
+done wc.o generated
+make revlib.o
+prev revlib.c
+meta revlib.o %.c>%.o revlib.c revlib
+prev revlib.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_cmd -D_PACKAGE_ast -c revlib.c
+done revlib.o generated
+make wclib.o
+prev wclib.c
+meta wclib.o %.c>%.o wclib.c wclib
+prev wclib.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_cmd -c wclib.c
+done wclib.o generated
+make sumlib.o
+bind -lsum
+exec - ${AR} x ${mam_libsum} sumlib.o
+done sumlib.o generated
+make fts_fix.o
+prev fts_fix.c
+meta fts_fix.o %.c>%.o fts_fix.c fts_fix
+prev fts_fix.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c fts_fix.c
+done fts_fix.o generated
+make lib.o
+prev lib.c
+meta lib.o %.c>%.o lib.c lib
+prev lib.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_cmd -D_PACKAGE_ast -c lib.c
+done lib.o generated
+exec - ${AR} rc libcmd.a cmdinit.o basename.o cat.o chgrp.o chmod.o chown.o cksum.o cmp.o comm.o cp.o cut.o dirname.o date.o expr.o fds.o fmt.o fold.o getconf.o head.o id.o join.o ln.o logname.o md5sum.o mkdir.o mkfifo.o mktemp.o mv.o paste.o pathchk.o
+exec - ${AR} rc libcmd.a pids.o rev.o rm.o rmdir.o stty.o sum.o sync.o tail.o tee.o tty.o uname.o uniq.o vmstate.o wc.o revlib.o wclib.o sumlib.o fts_fix.o lib.o
+exec - (ranlib libcmd.a) >/dev/null 2>&1 || true
+done libcmd.a generated
+done cmd virtual
+prev libcmd.a archive
+make ${INSTALLROOT}/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib
+exec - then mkdir -p ${INSTALLROOT}/lib
+exec - fi
+done ${INSTALLROOT}/lib generated
+make ${INSTALLROOT}/lib/libcmd.a archive
+prev ${INSTALLROOT}/lib
+prev libcmd.a archive
+exec - test '' = 'libcmd.a' || ${STDCMP} 2>/dev/null -s libcmd.a ${INSTALLROOT}/lib/libcmd.a || { ${STDMV} ${INSTALLROOT}/lib/libcmd.a ${INSTALLROOT}/lib/libcmd.a.old 2>/dev/null || true; ${STDCP} libcmd.a ${INSTALLROOT}/lib/libcmd.a ;}
+exec - (ranlib ${INSTALLROOT}/lib/libcmd.a) >/dev/null 2>&1 || true
+done ${INSTALLROOT}/lib/libcmd.a generated
+make ${INSTALLROOT}/lib/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib/lib
+exec - then mkdir -p ${INSTALLROOT}/lib/lib
+exec - fi
+done ${INSTALLROOT}/lib/lib generated
+make ${INSTALLROOT}/lib/lib/cmd
+prev ${INSTALLROOT}/lib/lib
+prev cmd.req
+exec - test '' = 'cmd.req' || ${STDCMP} 2>/dev/null -s cmd.req ${INSTALLROOT}/lib/lib/cmd || { ${STDMV} ${INSTALLROOT}/lib/lib/cmd ${INSTALLROOT}/lib/lib/cmd.old 2>/dev/null || true; ${STDCP} cmd.req ${INSTALLROOT}/lib/lib/cmd ;}
+done ${INSTALLROOT}/lib/lib/cmd generated
+make ${PACKAGE_ast_INCLUDE}
+exec - if silent test ! -d ${PACKAGE_ast_INCLUDE}
+exec - then mkdir -p ${PACKAGE_ast_INCLUDE}
+exec - fi
+done ${PACKAGE_ast_INCLUDE} generated
+make ${PACKAGE_ast_INCLUDE}/cmd.h
+prev ${PACKAGE_ast_INCLUDE}
+prev cmd.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1992,author=gsf+dgk' cmd.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/cmd.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/cmd.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/cmd.h generated
+make ${PACKAGE_ast_INCLUDE}/cmdext.h
+prev cmdext.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1992,author=gsf+dgk' cmdext.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/cmdext.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/cmdext.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/cmdext.h generated
+make ${PACKAGE_ast_INCLUDE}/cmdlist.h
+make cmdlist.h
+prev cmdinit.c
+prev basename.c
+prev cat.c
+prev chgrp.c
+prev chmod.c
+prev chown.c
+prev cksum.c
+prev cmp.c
+prev comm.c
+prev cp.c
+prev cut.c
+prev dirname.c
+prev date.c
+prev expr.c
+prev fds.c
+prev fmt.c
+prev fold.c
+prev getconf.c
+prev head.c
+prev id.c
+prev join.c
+prev ln.c
+prev logname.c
+prev md5sum.c
+prev mkdir.c
+prev mkfifo.c
+prev mktemp.c
+prev mv.c
+prev paste.c
+prev pathchk.c
+prev pids.c
+prev rev.c
+prev rm.c
+prev rmdir.c
+prev stty.c
+prev sum.c
+prev sync.c
+prev tail.c
+prev tee.c
+prev tty.c
+prev uname.c
+prev uniq.c
+prev vmstate.c
+prev wc.c
+prev revlib.c
+prev wclib.c
+prev fts_fix.c
+prev lib.c
+exec - {
+exec - cat <<!
+exec - #pragma prototyped
+exec - /*
+exec - * -lcmd function list -- define your own CMDLIST()
+exec - */
+exec -
+exec - !
+exec - sed \
+exec - -e '/^b_[a-z_][a-z_0-9]*(/!d' \
+exec - -e 's/^b_//' \
+exec - -e 's/(.*//' \
+exec - -e 's/.*/CMDLIST(&)/' \
+exec - |
+exec - sort -u
+exec - } > 1.${COTEMP}.h
+exec - if cmp 2>/dev/null -s 1.${COTEMP}.h cmdlist.h
+exec - then rm -f 1.${COTEMP}.h
+exec - else mv 1.${COTEMP}.h cmdlist.h
+exec - fi
+done cmdlist.h generated
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1992,author=gsf+dgk' cmdlist.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/cmdlist.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/cmdlist.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/cmdlist.h generated
+done install virtual
+make test
+done test dontcare virtual
diff --git a/usr/src/lib/libcmd/common/RELEASE b/usr/src/contrib/ast/src/lib/libcmd/RELEASE
index fba77c1c29..93cc198b2d 100644
--- a/usr/src/lib/libcmd/common/RELEASE
+++ b/usr/src/contrib/ast/src/lib/libcmd/RELEASE
@@ -1,3 +1,39 @@
+12-06-25 getconf.c: don't defer to native getconf if we are it -- doh
+12-06-19 tail.c: be nice and use sh_sigcheck() and tvsleep() to verify interrupts
+12-05-31 cat,head,tee: use errno==EPIPE => ERROR_PIPE(errno)
+12-05-25 vmstate.c: #include <sfdisc.h> for sfkeyprintf() prototype
+12-04-20 chgrp.c,chmod.c,cksum.c,cp.c: default fts_flags()|FTS_META (to disable pure FTS_PHYSICAL)
+12-03-26 cp.c: fix --interactive astquery() logic that ignored no&quit!
+12-02-14 rm.c: --force ignores no file operands specified
+12-01-10 b_* (int, char**, void*) => (int, char**, Shbltin_t*)
+11-08-27 pids.c: add getsid() iffe test
+10-08-16 chmod.c: add -l alias for { -h --symlink }
+11-08-16 chgrp.c: change lchmod() ref to lchown()
+11-05-03 cp.c: do not delete src if mv to dest fails -- doh
+11-03-28 chmod.c,chgrp.c: fix --symlink logic
+11-03-26 rm.c: don't eaccess() check symlinks!
+11-01-27 date: add { -R, --rfc-2822, -T, --rfc-3339=type }
+11-01-03 chgrp.c: --symlink => --physical
+10-12-10 rm.c: fix not-writable logic
+10-12-01 tee.c: add iterrupt logic for slow open(1) -- needs to be generalized
+10-11-30 chgrp.c: add -N,--numeric to bypass name lookup
+10-10-20 cp: add --timestamps (preserv timestamps and permissions)
+10-10-20 ln: fix 'cannot replace existing file' logic
+10-10-10 cp,mv: add --remove-destination
+10-08-11 cp.c,expr.c: use conformance("standard",0) test
+10-08-11 cut.c: use mbnsize() instead of mblen() (for ast C.UTF-8)
+10-07-28 chgrp.c,chmod.c,cksum.c: fts_path for diagnostics, not fts_accpath!
+10-06-14 rm.c: fix -rfu logic
+10-06-12 paste.c: repeat after me: do not modify argv[i]
+10-06-01 sync with ast api 20100601
+10-05-09 tail.c: fix -0f bug that inially listed the entire file
+10-05-06 basename.c: add { -a,--all -s,--suffux=suffix } from BSD
+10-04-12 cat.c: fix -v bug that dumped core and make consistent with cmp --print-chars
+10-04-11 cmp.c: add --print-bytes, --count=n, --differences=n
+10-04-08 vmstate.c: add { method flags } vars for Vmstat_t.mode
+10-04-08 mkdir.c: fix check for { S_ISUID S_ISGID S_ISVTX } after successful mkdir(2)
+10-04-01 stty.c: add --fd=fd option
+10-03-23 tail.c: fix -f large initial offset bug that didn't copy all data
10-03-07 tail.c: sfsync(sfstdout) after all -f done, fix -f partial line
10-03-05 mktemp.c: add --regress=seed for testing
10-03-05 vmstate.c: add
diff --git a/usr/src/lib/libcmd/common/basename.c b/usr/src/contrib/ast/src/lib/libcmd/basename.c
index 74da190ce8..9461183576 100644
--- a/usr/src/lib/libcmd/common/basename.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/basename.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,30 +29,37 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: basename (AT&T Research) 1999-04-10 $\n]"
+"[-?\n@(#)$Id: basename (AT&T Research) 2010-05-06 $\n]"
USAGE_LICENSE
"[+NAME?basename - strip directory and suffix from filenames]"
"[+DESCRIPTION?\bbasename\b removes all leading directory components "
- "from the file name defined by \astring\a. If the file name "
- "defined by \astring\a has a suffix that ends in \asuffix\a, "
- "it is removed as well.]"
-"[+?If \astring\a consists solely of \b/\b characters the output will "
- "be a single \b/\b unless \bPATH_LEADING_SLASHES\b returned by "
- "\bgetconf\b(1) is \b1\b and \astring\a consists of multiple "
- "\b/\b characters in which case \b//\b will be output. "
- "Otherwise, trailing \b/\b characters are removed, and if "
- "there are any remaining \b/\b characters in \astring\a, "
- "all characters up to and including the last \b/\b are removed. "
- "Finally, if \asuffix\a is specified, and is identical the end "
- "of \astring\a, these characters are removed. The characters "
- "not removed from \astring\a will be written to standard output.]"
+ "from the file name defined by \astring\a. If the file name defined by "
+ "\astring\a has a suffix that ends in \asuffix\a, it is removed as "
+ "well.]"
+"[+?If \astring\a consists solely of \b/\b characters the output will be "
+ "a single \b/\b unless \bPATH_LEADING_SLASHES\b returned by "
+ "\bgetconf\b(1) is \b1\b and \astring\a consists of multiple \b/\b "
+ "characters in which case \b//\b will be output. Otherwise, trailing "
+ "\b/\b characters are removed, and if there are any remaining \b/\b "
+ "characters in \astring\a, all characters up to and including the last "
+ "\b/\b are removed. Finally, if \asuffix\a is specified, and is "
+ "identical the end of \astring\a, these characters are removed. The "
+ "characters not removed from \astring\a will be written on a single line "
+ "to the standard output.]"
+"[a:all?All operands are treated as \astring\a and each modified "
+ "pathname is printed on a separate line on the standard output.]"
+"[s:suffix?All operands are treated as \astring\a and each modified "
+ "pathname, with \asuffix\a removed if it exists, is printed on a "
+ "separate line on the standard output.]:[suffix]"
"\n"
"\n string [suffix]\n"
+"string ...\n"
"\n"
-"[+EXIT STATUS?]{"
+"[+EXIT STATUS?]"
+ "{"
"[+0?Successful Completion.]"
"[+>0?An error occurred.]"
-"}"
+ "}"
"[+SEE ALSO?\bdirname\b(1), \bgetconf\b(1), \bbasename\b(3)]"
;
@@ -92,25 +99,41 @@ static void namebase(Sfio_t *outfile, register char *pathname, char *suffix)
}
int
-b_basename(int argc,register char *argv[], void* context)
+b_basename(int argc, register char** argv, Shbltin_t* context)
{
- register int n;
+ char* string;
+ char* suffix = 0;
+ int all = 0;
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
+ switch (optget(argv, usage))
+ {
+ case 'a':
+ all = 1;
+ continue;
+ case 's':
+ all = 1;
+ suffix = opt_info.arg;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
+ break;
+ }
break;
}
argv += opt_info.index;
argc -= opt_info.index;
- if(error_info.errors || argc < 1 || argc > 2)
+ if (error_info.errors || argc < 1 || !all && argc > 2)
error(ERROR_usage(2), "%s", optusage(NiL));
- namebase(sfstdout,argv[0],argv[1]);
- return(0);
+ if (!all)
+ namebase(sfstdout, argv[0], argv[1]);
+ else
+ while (string = *argv++)
+ namebase(sfstdout, string, suffix);
+ return 0;
}
-
diff --git a/usr/src/lib/libcmd/common/cat.c b/usr/src/contrib/ast/src/lib/libcmd/cat.c
index dbec90c1da..f477fdf2b2 100644
--- a/usr/src/lib/libcmd/common/cat.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/cat.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -31,7 +31,7 @@
#include <fcntl.h>
static const char usage[] =
-"[-?\n@(#)$Id: cat (AT&T Research) 2009-03-31 $\n]"
+"[-?\n@(#)$Id: cat (AT&T Research) 2012-05-31 $\n]"
USAGE_LICENSE
"[+NAME?cat - concatenate files]"
"[+DESCRIPTION?\bcat\b copies each \afile\a in sequence to the standard"
@@ -47,15 +47,15 @@ USAGE_LICENSE
"[s?Equivalent to \b-S\b for \aatt\a universe and \b-B\b otherwise.]"
"[t?Equivalent to \b-vT\b.]"
"[u:unbuffer?The output is not delayed by buffering.]"
-"[v:show-nonprinting?Causes non-printing characters (whith the exception of"
-" tabs, new-lines, and form-feeds) to be output as printable charater"
-" sequences. ASCII control characters are printed as \b^\b\an\a,"
-" where \an\a is the corresponding ASCII character in the range"
-" octal 100-137. The DEL character (octal 0177) is copied"
-" as \b^?\b. Other non-printable characters are copied as \bM-\b\ax\a"
-" where \ax\a is the ASCII character specified by the low-order seven"
-" bits. Multibyte characters in the current locale are treated as"
-" printable characters.]"
+"[v:show-nonprinting|print-chars?Print characters as follows: space and "
+ "printable characters as themselves; control characters as \b^\b "
+ "followed by a letter of the alphabet; and characters with the high bit "
+ "set as the lower 7 bit character prefixed by \bM^\b for 7 bit "
+ "non-printable characters and \bM-\b for all other characters. If the 7 "
+ "bit character encoding is not ASCII then the characters are converted "
+ "to ASCII to determine \ahigh bit set\a, and if set it is cleared and "
+ "converted back to the native encoding. Multibyte characters in the "
+ "current locale are treated as printable characters.]"
"[A:show-all?Equivalent to \b-vET\b.]"
"[B:squeeze-blank?Multiple adjacent new-line characters are replace by one"
" new-line.]"
@@ -138,11 +138,10 @@ vcat(register char* states, Sfio_t* ip, Sfio_t* op, Reserve_f reserve, int flags
int any;
int header;
- unsigned char meta[4];
+ unsigned char meta[3];
unsigned char tmp[32];
meta[0] = 'M';
- meta[1] = '-';
last = -1;
*(cp = buf = end = tmp) = 0;
any = 0;
@@ -252,21 +251,21 @@ vcat(register char* states, Sfio_t* ip, Sfio_t* op, Reserve_f reserve, int flags
switch (n)
{
case T_ERROR:
- if (cp != end)
+ if (cp < end)
{
n = T_CONTROL;
goto flush;
}
return -1;
case T_EOF:
- if (cp != end)
+ if (cp < end)
{
n = T_CONTROL;
goto flush;
}
return 0;
case T_ENDBUF:
- if (cp != end)
+ if (cp < end)
{
n = T_CONTROL;
goto flush;
@@ -274,13 +273,13 @@ vcat(register char* states, Sfio_t* ip, Sfio_t* op, Reserve_f reserve, int flags
c = last;
if (!(nxt = (unsigned char*)(*reserve)(ip, SF_UNBOUND, 0)))
{
- *(cp = end = tmp) = 0;
- states[0] = sfvalue(ip) ? T_ERROR : T_EOF;
+ *(cp = end = tmp + sizeof(tmp) - 1) = 0;
+ states[0] = (m = sfvalue(ip)) ? T_ERROR : T_EOF;
last = -1;
}
else if ((m = sfvalue(ip)) <= 0)
{
- *(cp = end = tmp) = 0;
+ *(cp = end = tmp + sizeof(tmp) - 1) = 0;
states[0] = m ? T_ERROR : T_EOF;
last = -1;
}
@@ -318,15 +317,16 @@ vcat(register char* states, Sfio_t* ip, Sfio_t* op, Reserve_f reserve, int flags
} while (states[c = *++cp] == T_CONTROL);
break;
case T_CNTL8BIT:
- meta[2] = '^';
+ meta[1] = '^';
do
{
n = c & ~0200;
- meta[3] = printof(n);
- sfwrite(op, (char*)meta, 4);
+ meta[2] = printof(n);
+ sfwrite(op, (char*)meta, 3);
} while (states[c = *++cp] == T_CNTL8BIT && raw);
break;
case T_EIGHTBIT:
+ meta[1] = '-';
do
{
meta[2] = c & ~0200;
@@ -346,7 +346,7 @@ vcat(register char* states, Sfio_t* ip, Sfio_t* op, Reserve_f reserve, int flags
{
if ((n = states[*++cp]) == T_ENDBUF)
{
- if (cp != end || last != '\n')
+ if (cp < end || last != '\n')
break;
if (!(nxt = (unsigned char*)(*reserve)(ip, SF_UNBOUND, 0)))
{
@@ -393,7 +393,7 @@ vcat(register char* states, Sfio_t* ip, Sfio_t* op, Reserve_f reserve, int flags
}
int
-b_cat(int argc, char** argv, void* context)
+b_cat(int argc, char** argv, Shbltin_t* context)
{
register int n;
register int flags = 0;
@@ -539,7 +539,7 @@ b_cat(int argc, char** argv, void* context)
n = -1;
if (fp != sfstdin)
sfclose(fp);
- if (n < 0 && errno != EPIPE)
+ if (n < 0 && !ERROR_PIPE(errno) && errno != EINTR)
{
if (cp)
error(ERROR_system(0), "%s: read error", cp);
diff --git a/usr/src/lib/libcmd/common/chgrp.c b/usr/src/contrib/ast/src/lib/libcmd/chgrp.c
index 5272171787..680e46294e 100644
--- a/usr/src/lib/libcmd/common/chgrp.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/chgrp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,7 +28,7 @@
*/
static const char usage_1[] =
-"[-?@(#)$Id: chgrp (AT&T Research) 2009-07-02 $\n]"
+"[-?@(#)$Id: chgrp (AT&T Research) 2012-04-20 $\n]"
USAGE_LICENSE
;
@@ -53,8 +53,8 @@ static const char usage_2[] =
"\bmtime\b of \afile\a.]:[file]"
"[c:changes?Describe only files whose ownership actually changes.]"
"[f:quiet|silent?Do not report files whose ownership fails to change.]"
-"[l|h:symlink?Change the ownership of the symbolic links on systems that "
- "support this.]"
+"[h|l:symlink?Change the ownership of symbolic links on systems that "
+ "support \blchown\b(2). Implies \b--physical\b.]"
"[m:map?The first operand is interpreted as a file that contains a map "
"of space separated \afrom_uid:from_gid to_uid:to_gid\a pairs. The "
"\auid\a or \agid\a part of each pair may be omitted to mean any \auid\a "
@@ -65,6 +65,10 @@ static const char usage_2[] =
"determined it is not overridden by any subsequent match. Unmatched "
"files are silently ignored.]"
"[n:show?Show actions but don't execute.]"
+"[N:numeric?By default numeric user and group id operands are first "
+ "interpreted as names; if no name exists then they are interpreted as "
+ "explicit numeric ids. \b--numeric\b interprets numeric id operands as "
+ "numeric ids.]"
"[r:reference?Omit the explicit ownership operand and use the ownership "
"of \afile\a instead.]:[file]"
"[u:unmapped?Print a diagnostic for each file for which either the "
@@ -90,7 +94,7 @@ static const char usage_3[] =
"[+0?All files changed successfully.]"
"[+>0?Unable to change ownership of one or more files.]"
"}"
-"[+SEE ALSO?\bchmod\b(1), \btw\b(1), \bgetconf\b(1), \bls\b(1)]"
+"[+SEE ALSO?\bchmod\b(1), \bchown\b(2), \btw\b(1), \bgetconf\b(1), \bls\b(1)]"
;
#if defined(__STDPP__directive) && defined(__STDPP__hide)
@@ -105,6 +109,10 @@ __STDPP__directive pragma pp:hide lchown
#include <ctype.h>
#include <fts_fix.h>
+#ifndef ENOSYS
+#define ENOSYS EINVAL
+#endif
+
#include "FEATURE/symlink"
#if defined(__STDPP__directive) && defined(__STDPP__hide)
@@ -128,32 +136,19 @@ typedef struct Map_s /* uid/gid map */
#define NOID (-1)
-#define OPT_CHOWN (1<<0) /* chown */
-#define OPT_FORCE (1<<1) /* ignore errors */
-#define OPT_GID (1<<2) /* have gid */
-#define OPT_LCHOWN (1<<3) /* lchown */
-#define OPT_SHOW (1<<4) /* show but don't do */
-#define OPT_TEST (1<<5) /* canonicalize output */
-#define OPT_UID (1<<6) /* have uid */
-#define OPT_UNMAPPED (1<<7) /* unmapped file diagnostic */
-#define OPT_VERBOSE (1<<8) /* have uid */
+#define OPT_CHOWN 0x0001 /* chown */
+#define OPT_FORCE 0x0002 /* ignore errors */
+#define OPT_GID 0x0004 /* have gid */
+#define OPT_LCHOWN 0x0008 /* lchown */
+#define OPT_NUMERIC 0x0010 /* favor numeric ids */
+#define OPT_SHOW 0x0020 /* show but don't do */
+#define OPT_TEST 0x0040 /* canonicalize output */
+#define OPT_UID 0x0080 /* have uid */
+#define OPT_UNMAPPED 0x0100 /* unmapped file diagnostic */
+#define OPT_VERBOSE 0x0200 /* have uid */
extern int lchown(const char*, uid_t, gid_t);
-#if !_lib_lchown
-
-#ifndef ENOSYS
-#define ENOSYS EINVAL
-#endif
-
-int
-lchown(const char* path, uid_t uid, gid_t gid)
-{
- return ENOSYS;
-}
-
-#endif /* _lib_chown */
-
/*
* parse uid and gid from s
*/
@@ -163,6 +158,7 @@ getids(register char* s, char** e, Key_t* key, int options)
{
register char* t;
register int n;
+ register int m;
char* z;
char buf[64];
@@ -181,10 +177,12 @@ getids(register char* s, char** e, Key_t* key, int options)
{
if (*s)
{
- if ((n = struid(s)) == NOID)
+ n = (int)strtol(s, &z, 0);
+ if (*z || !(options & OPT_NUMERIC))
{
- n = (int)strtol(s, &z, 0);
- if (*z)
+ if ((m = struid(s)) != NOID)
+ n = m;
+ else if (*z)
error(ERROR_exit(1), "%s: unknown user", s);
}
key->uid = n;
@@ -199,10 +197,12 @@ getids(register char* s, char** e, Key_t* key, int options)
}
if (*s)
{
- if ((n = strgid(s)) == NOID)
+ n = (int)strtol(s, &z, 0);
+ if (*z || !(options & OPT_NUMERIC))
{
- n = (int)strtol(s, &z, 0);
- if (*z)
+ if ((m = strgid(s)) != NOID)
+ n = m;
+ else if (*z)
error(ERROR_exit(1), "%s: unknown group", s);
}
key->gid = n;
@@ -211,8 +211,13 @@ getids(register char* s, char** e, Key_t* key, int options)
*e = t;
}
+/*
+ * NOTE: we only use the native lchown() on symlinks just in case
+ * the implementation is a feckless stub
+ */
+
int
-b_chgrp(int argc, char** argv, void* context)
+b_chgrp(int argc, char** argv, Shbltin_t* context)
{
register int options = 0;
register char* s;
@@ -237,7 +242,7 @@ b_chgrp(int argc, char** argv, void* context)
int (*chownf)(const char*, uid_t, gid_t);
cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY);
- flags = fts_flags() | FTS_TOP | FTS_NOPOSTORDER | FTS_NOSEEDOTDIR;
+ flags = fts_flags() | FTS_META | FTS_TOP | FTS_NOPOSTORDER | FTS_NOSEEDOTDIR;
before = ~0;
if (!(sp = sfstropen()))
error(ERROR_SYSTEM|3, "out of space");
@@ -273,19 +278,22 @@ b_chgrp(int argc, char** argv, void* context)
case 'f':
options |= OPT_FORCE;
continue;
- case 'l':
+ case 'h':
options |= OPT_LCHOWN;
continue;
case 'm':
memset(&mapdisc, 0, sizeof(mapdisc));
mapdisc.key = offsetof(Map_t, key);
mapdisc.size = sizeof(Key_t);
- if (!(map = dtopen(&mapdisc, Dthash)))
+ if (!(map = dtopen(&mapdisc, Dtset)))
error(ERROR_exit(1), "out of space [id map]");
continue;
case 'n':
options |= OPT_SHOW;
continue;
+ case 'N':
+ options |= OPT_NUMERIC;
+ continue;
case 'r':
if (stat(opt_info.arg, &st))
error(ERROR_exit(1), "%s: cannot stat", opt_info.arg);
@@ -330,6 +338,12 @@ b_chgrp(int argc, char** argv, void* context)
if (error_info.errors || argc < 2)
error(ERROR_usage(2), "%s", optusage(NiL));
s = *argv;
+ if (options & OPT_LCHOWN)
+ {
+ flags &= ~FTS_META;
+ flags |= FTS_PHYSICAL;
+ logical = 0;
+ }
if (logical)
flags &= ~(FTS_META|FTS_PHYSICAL);
if (map)
@@ -383,11 +397,29 @@ b_chgrp(int argc, char** argv, void* context)
while (!sh_checksig(context) && (ent = fts_read(fts)))
switch (ent->fts_info)
{
- case FTS_F:
- case FTS_D:
case FTS_SL:
case FTS_SLNONE:
+ if (options & OPT_LCHOWN)
+ {
+#if _lib_lchown
+ chownf = lchown;
+ op = "lchown";
+ goto commit;
+#else
+ if (!(options & OPT_FORCE))
+ {
+ errno = ENOSYS;
+ error(ERROR_system(0), "%s: cannot change symlink owner/group", ent->fts_path);
+ }
+#endif
+ }
+ break;
+ case FTS_F:
+ case FTS_D:
anyway:
+ chownf = chown;
+ op = "chown";
+ commit:
if ((unsigned long)ent->fts_statp->st_ctime >= before)
break;
if (map)
@@ -432,16 +464,6 @@ b_chgrp(int argc, char** argv, void* context)
}
if (uid != ent->fts_statp->st_uid && uid != NOID || gid != ent->fts_statp->st_gid && gid != NOID)
{
- if ((ent->fts_info & FTS_SL) && (flags & FTS_PHYSICAL) && (options & OPT_LCHOWN))
- {
- op = "lchown";
- chownf = lchown;
- }
- else
- {
- op = "chown";
- chownf = chown;
- }
if (options & (OPT_SHOW|OPT_VERBOSE))
{
if (options & OPT_TEST)
@@ -452,24 +474,24 @@ b_chgrp(int argc, char** argv, void* context)
sfprintf(sfstdout, "%s uid:%05d->%05d gid:%05d->%05d %s\n", op, ent->fts_statp->st_uid, uid, ent->fts_statp->st_gid, gid, ent->fts_path);
}
if (!(options & OPT_SHOW) && (*chownf)(ent->fts_accpath, uid, gid) && !(options & OPT_FORCE))
- error(ERROR_system(0), "%s: cannot change%s", ent->fts_accpath, s);
+ error(ERROR_system(0), "%s: cannot change%s", ent->fts_path, s);
}
break;
case FTS_DC:
if (!(options & OPT_FORCE))
- error(ERROR_warn(0), "%s: directory causes cycle", ent->fts_accpath);
+ error(ERROR_warn(0), "%s: directory causes cycle", ent->fts_path);
break;
case FTS_DNR:
if (!(options & OPT_FORCE))
- error(ERROR_system(0), "%s: cannot read directory", ent->fts_accpath);
+ error(ERROR_system(0), "%s: cannot read directory", ent->fts_path);
goto anyway;
case FTS_DNX:
if (!(options & OPT_FORCE))
- error(ERROR_system(0), "%s: cannot search directory", ent->fts_accpath);
+ error(ERROR_system(0), "%s: cannot search directory", ent->fts_path);
goto anyway;
case FTS_NS:
if (!(options & OPT_FORCE))
- error(ERROR_system(0), "%s: not found", ent->fts_accpath);
+ error(ERROR_system(0), "%s: not found", ent->fts_path);
break;
}
fts_close(fts);
diff --git a/usr/src/lib/libcmd/common/chmod.c b/usr/src/contrib/ast/src/lib/libcmd/chmod.c
index 7bfcf09dc8..beaab67223 100644
--- a/usr/src/lib/libcmd/common/chmod.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/chmod.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,7 +28,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: chmod (AT&T Research) 2009-07-02 $\n]"
+"[-?\n@(#)$Id: chmod (AT&T Research) 2012-04-20 $\n]"
USAGE_LICENSE
"[+NAME?chmod - change the access permissions of files]"
"[+DESCRIPTION?\bchmod\b changes the permission of each file "
@@ -107,8 +107,8 @@ USAGE_LICENSE
"[R:recursive?Change the mode for files in subdirectories recursively.]"
"[c:changes?Describe only files whose permission actually change.]"
"[f:quiet|silent?Do not report files whose permissioins fail to change.]"
-"[h:symlink?Change the mode of the symbolic links on systems that "
- "support this.]"
+"[h|l:symlink?Change the mode of symbolic links on systems that "
+ "support \blchmod\b(2). Implies \b--physical\b.]"
"[i:ignore-umask?Ignore the \bumask\b(2) value in symbolic mode "
"expressions. This is probably how you expect \bchmod\b to work.]"
"[n:show?Show actions but do not change any file modes.]"
@@ -122,8 +122,8 @@ USAGE_LICENSE
"[+0?All files changed successfully.]"
"[+>0?Unable to change mode of one or more files.]"
"}"
-"[+SEE ALSO?\bchgrp\b(1), \bchown\b(1), \btw\b(1), \bgetconf\b(1), \bls\b(1), "
- "\bumask\b(2)]"
+"[+SEE ALSO?\bchgrp\b(1), \bchown\b(1), \blchmod\b(1), \btw\b(1), \bgetconf\b(1), "
+ "\bls\b(1), \bumask\b(2)]"
;
@@ -137,6 +137,10 @@ __STDPP__directive pragma pp:hide lchmod
#include <ls.h>
#include <fts_fix.h>
+#ifndef ENOSYS
+#define ENOSYS EINVAL
+#endif
+
#include "FEATURE/symlink"
#if defined(__STDPP__directive) && defined(__STDPP__hide)
@@ -147,8 +151,13 @@ __STDPP__directive pragma pp:nohide lchmod
extern int lchmod(const char*, mode_t);
+/*
+ * NOTE: we only use the native lchmod() on symlinks just in case
+ * the implementation is a feckless stub
+ */
+
int
-b_chmod(int argc, char** argv, void* context)
+b_chmod(int argc, char** argv, Shbltin_t* context)
{
register int mode;
register int force = 0;
@@ -162,13 +171,11 @@ b_chmod(int argc, char** argv, void* context)
int notify = 0;
int ignore = 0;
int show = 0;
-#if _lib_lchmod
int chlink = 0;
-#endif
struct stat st;
cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY);
- flags = fts_flags() | FTS_TOP | FTS_NOPOSTORDER | FTS_NOSEEDOTDIR;
+ flags = fts_flags() | FTS_META | FTS_TOP | FTS_NOPOSTORDER | FTS_NOSEEDOTDIR;
/*
* NOTE: we diverge from the normal optget boilerplate
@@ -186,9 +193,7 @@ b_chmod(int argc, char** argv, void* context)
force = 1;
continue;
case 'h':
-#if _lib_lchmod
chlink = 1;
-#endif
continue;
case 'i':
ignore = 1;
@@ -231,6 +236,12 @@ b_chmod(int argc, char** argv, void* context)
argv += opt_info.index;
if (error_info.errors || !*argv || !amode && !*(argv + 1))
error(ERROR_usage(2), "%s", optusage(NiL));
+ if (chlink)
+ {
+ flags &= ~FTS_META;
+ flags |= FTS_PHYSICAL;
+ logical = 0;
+ }
if (logical)
flags &= ~(FTS_META|FTS_PHYSICAL);
if (ignore)
@@ -248,11 +259,6 @@ b_chmod(int argc, char** argv, void* context)
error(ERROR_exit(1), "%s: invalid mode", amode);
}
}
- chmodf =
-#if _lib_lchmod
- chlink ? lchmod :
-#endif
- chmod;
if (!(fts = fts_open(argv, flags, NiL)))
{
if (ignore)
@@ -263,17 +269,28 @@ b_chmod(int argc, char** argv, void* context)
switch (ent->fts_info)
{
case FTS_SL:
- if (chmodf == chmod)
+ case FTS_SLNONE:
+ if (chlink)
{
- if (!(flags & FTS_PHYSICAL) || (flags & FTS_META) && ent->fts_level == 1)
- fts_set(NiL, ent, FTS_FOLLOW);
- break;
+#if _lib_lchmod
+ chmodf = lchmod;
+ goto commit;
+#else
+ if (!force)
+ {
+ errno = ENOSYS;
+ error(ERROR_system(0), "%s: cannot change symlink mode", ent->fts_path);
+ }
+#endif
}
- /*FALLTHROUGH*/
+ break;
case FTS_F:
case FTS_D:
- case FTS_SLNONE:
anyway:
+ chmodf = chmod;
+#if _lib_lchmod
+ commit:
+#endif
if (amode)
mode = strperm(amode, &last, ent->fts_statp->st_mode);
if (show || (*chmodf)(ent->fts_accpath, mode) >= 0)
@@ -282,23 +299,23 @@ b_chmod(int argc, char** argv, void* context)
sfprintf(sfstdout, "%s: mode changed to %0.4o (%s)\n", ent->fts_path, mode, fmtmode(mode, 1)+1);
}
else if (!force)
- error(ERROR_system(0), "%s: cannot change mode", ent->fts_accpath);
+ error(ERROR_system(0), "%s: cannot change mode", ent->fts_path);
break;
case FTS_DC:
if (!force)
- error(ERROR_warn(0), "%s: directory causes cycle", ent->fts_accpath);
+ error(ERROR_warn(0), "%s: directory causes cycle", ent->fts_path);
break;
case FTS_DNR:
if (!force)
- error(ERROR_system(0), "%s: cannot read directory", ent->fts_accpath);
+ error(ERROR_system(0), "%s: cannot read directory", ent->fts_path);
goto anyway;
case FTS_DNX:
if (!force)
- error(ERROR_system(0), "%s: cannot search directory", ent->fts_accpath);
+ error(ERROR_system(0), "%s: cannot search directory", ent->fts_path);
goto anyway;
case FTS_NS:
if (!force)
- error(ERROR_system(0), "%s: not found", ent->fts_accpath);
+ error(ERROR_system(0), "%s: not found", ent->fts_path);
break;
}
fts_close(fts);
diff --git a/usr/src/lib/libcmd/common/chown.c b/usr/src/contrib/ast/src/lib/libcmd/chown.c
index 4e0bea0a7b..3896635ec7 100644
--- a/usr/src/lib/libcmd/common/chown.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/chown.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,7 +32,7 @@ static const char id[] = "\n@(#)$Id: chown (AT&T Research) 1997-11-11 $\0\n";
#include <cmd.h>
int
-b_chown(int argc, char** argv, void* context)
+b_chown(int argc, char** argv, Shbltin_t* context)
{
NoP(id[0]);
return b_chgrp(argc, argv, context);
diff --git a/usr/src/lib/libcmd/common/cksum.c b/usr/src/contrib/ast/src/lib/libcmd/cksum.c
index c42e865b09..0dba27d20a 100644
--- a/usr/src/lib/libcmd/common/cksum.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/cksum.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: sum (AT&T Research) 2009-11-28 $\n]"
+"[-?\n@(#)$Id: sum (AT&T Research) 2012-04-20 $\n]"
USAGE_LICENSE
"[+NAME?cksum,md5sum,sum - print file checksum and block count]"
"[+DESCRIPTION?\bsum\b lists the checksum, and for most methods the block"
@@ -439,7 +439,7 @@ optinfo(Opt_t* op, Sfio_t* sp, const char* s, Optdisc_t* dp)
}
int
-b_cksum(int argc, register char** argv, void* context)
+b_cksum(int argc, register char** argv, Shbltin_t* context)
{
register int flags;
char* file;
@@ -453,7 +453,7 @@ b_cksum(int argc, register char** argv, void* context)
cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY);
memset(&state, 0, sizeof(state));
- flags = fts_flags() | FTS_TOP | FTS_NOPOSTORDER;
+ flags = fts_flags() | FTS_META | FTS_TOP | FTS_NOPOSTORDER;
state.flags = SUM_SIZE;
state.warn = 1;
logical = 1;
@@ -608,16 +608,16 @@ b_cksum(int argc, register char** argv, void* context)
}
break;
case FTS_DC:
- error(ERROR_warn(0), "%s: directory causes cycle", ent->fts_accpath);
+ error(ERROR_warn(0), "%s: directory causes cycle", ent->fts_path);
break;
case FTS_DNR:
- error(ERROR_system(0), "%s: cannot read directory", ent->fts_accpath);
+ error(ERROR_system(0), "%s: cannot read directory", ent->fts_path);
break;
case FTS_DNX:
- error(ERROR_system(0), "%s: cannot search directory", ent->fts_accpath);
+ error(ERROR_system(0), "%s: cannot search directory", ent->fts_path);
break;
case FTS_NS:
- error(ERROR_system(0), "%s: not found", ent->fts_accpath);
+ error(ERROR_system(0), "%s: not found", ent->fts_path);
break;
}
fts_close(fts);
diff --git a/usr/src/lib/libcmd/common/cmd.h b/usr/src/contrib/ast/src/lib/libcmd/cmd.h
index a78755bbc0..2146e74394 100644
--- a/usr/src/lib/libcmd/common/cmd.h
+++ b/usr/src/contrib/ast/src/lib/libcmd/cmd.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -59,7 +59,7 @@
#else
-extern int CMD_STANDALONE(int, char**, void*);
+extern int CMD_STANDALONE(int, char**, Shbltin_t*);
#endif
@@ -70,7 +70,7 @@ extern int CMD_STANDALONE(int, char**, void*);
*/
static int
-cmdinit(int argc, register char** argv, void* context, const char* catalog, int flags)
+cmdinit(int argc, register char** argv, Shbltin_t* context, const char* catalog, int flags)
{
register char* cp;
register char* pp;
@@ -154,7 +154,7 @@ main(int argc, char** argv)
#define extern extern __EXPORT__
#endif
-extern int _cmd_init(int, char**, void*, const char*, int);
+extern int _cmd_init(int, char**, Shbltin_t*, const char*, int);
#undef extern
diff --git a/usr/src/lib/libcmd/common/cmdinit.c b/usr/src/contrib/ast/src/lib/libcmd/cmdinit.c
index 70a65cd1b2..a25a51ec20 100644
--- a/usr/src/lib/libcmd/common/cmdinit.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/cmdinit.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
#include <shcmd.h>
int
-_cmd_init(int argc, char** argv, void* context, const char* catalog, int flags)
+_cmd_init(int argc, char** argv, Shbltin_t* context, const char* catalog, int flags)
{
register char* cp;
@@ -42,7 +42,7 @@ _cmd_init(int argc, char** argv, void* context, const char* catalog, int flags)
}
else if (flags & ERROR_NOTIFY)
{
- ((Shbltin_t*)(context))->notify = 1;
+ context->notify = 1;
flags &= ~ERROR_NOTIFY;
}
error_info.flags |= flags;
@@ -67,7 +67,7 @@ _cmd_init(int argc, char** argv, void* context, const char* catalog, int flags)
#undef cmdinit
extern void
-cmdinit(char** argv, void* context, const char* catalog, int flags)
+cmdinit(char** argv, Shbltin_t* context, const char* catalog, int flags)
{
_cmd_init(0, argv, context, catalog, flags);
}
diff --git a/usr/src/contrib/ast/src/lib/libcmd/cmp.c b/usr/src/contrib/ast/src/lib/libcmd/cmp.c
new file mode 100644
index 0000000000..9e2c8d76b4
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libcmd/cmp.c
@@ -0,0 +1,399 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ */
+
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* David Korn <dgk@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * David Korn
+ * Glenn Fowler
+ * AT&T Bell Laboratories
+ *
+ * cmp
+ */
+
+static const char usage[] =
+"[-?\n@(#)$Id: cmp (AT&T Research) 2010-04-11 $\n]"
+USAGE_LICENSE
+"[+NAME?cmp - compare two files]"
+"[+DESCRIPTION?\bcmp\b compares two files \afile1\a and \afile2\a. "
+ "\bcmp\b writes no output if the files are the same. By default, if the "
+ "files differ, the byte and line number at which the first difference "
+ "occurred are written to standard output. Bytes and lines are numbered "
+ "beginning with 1.]"
+"[+?If \askip1\a or \askip2\a are specified, or the \b-i\b option is "
+ "specified, initial bytes of the corresponding file are skipped before "
+ "beginning the compare. The skip values are in bytes or can have a "
+ "suffix of \bk\b for kilobytes or \bm\b for megabytes.]"
+"[+?If either \afile1\a or \afiles2\a is \b-\b, \bcmp\b uses standard "
+ "input starting at the current location.]"
+"[b:print-bytes?Print differing bytes as 3 digit octal values.]"
+"[c:print-chars?Print differing bytes as follows: non-space printable "
+ "characters as themselves; space and control characters as \b^\b "
+ "followed by a letter of the alphabet; and characters with the high bit "
+ "set as the lower 7 bit character prefixed by \bM^\b for 7 bit space and "
+ "non-printable characters and \bM-\b for all other characters. If the 7 "
+ "bit character encoding is not ASCII then the characters are converted "
+ "to ASCII to determine \ahigh bit set\a, and if set it is cleared and "
+ "converted back to the native encoding. Multibyte characters in the "
+ "current locale are treated as printable characters.]"
+"[d:differences?Print at most \adifferences\a differences using "
+ "\b--verbose\b output format. \b--differences=0\b is equivalent to "
+ "\b--silent\b.]#[differences]"
+"[i:ignore-initial|skip?Skip the the first \askip1\a bytes in \afile1\a "
+ "and the first \askip2\a bytes in \afile2\a. If \askip2\a is omitted "
+ "then \askip1\a is used.]:[skip1[::skip2]]:=0::0]"
+"[l:verbose?Write the decimal byte number and the differing bytes (in "
+ "octal) for each difference.]"
+"[n:count|bytes?Compare at most \acount\a bytes.]#[count]"
+"[s:quiet|silent?Write nothing for differing files; return non-zero exit "
+ "status only.]"
+"\n"
+"\nfile1 file2 [skip1 [skip2]]\n"
+"\n"
+"[+EXIT STATUS?]"
+ "{"
+ "[+0?The files or portions compared are identical.]"
+ "[+1?The files are different.]"
+ "[+>1?An error occurred.]"
+ "}"
+"[+SEE ALSO?\bcomm\b(1), \bdiff\b(1), \bcat\b(1)]"
+;
+
+#include <cmd.h>
+#include <ls.h>
+#include <ctype.h>
+#include <ccode.h>
+
+#define CMP_VERBOSE 0x01
+#define CMP_SILENT 0x02
+#define CMP_CHARS 0x04
+#define CMP_BYTES 0x08
+
+static void
+pretty(Sfio_t *out, int o, int delim, int flags)
+{
+ int c;
+ int m;
+ char* s;
+ char buf[10];
+
+ s = buf;
+ if ((flags & CMP_BYTES) || !(flags & CMP_CHARS))
+ {
+ *s++ = ' ';
+ if ((flags & CMP_CHARS) && delim != -1)
+ *s++ = ' ';
+ *s++ = '0' + ((o >> 6) & 07);
+ *s++ = '0' + ((o >> 3) & 07);
+ *s++ = '0' + (o & 07);
+ }
+ if (flags & CMP_CHARS)
+ {
+ *s++ = ' ';
+ c = ccmapc(o, CC_NATIVE, CC_ASCII);
+ if (c & 0x80)
+ {
+ m = 1;
+ *s++ = 'M';
+ c &= 0x7f;
+ o = ccmapc(c, CC_ASCII, CC_NATIVE);
+ }
+ else
+ m = 0;
+ if (isspace(o) || !isprint(o))
+ {
+ if (!m)
+ *s++ = ' ';
+ *s++ = '^';
+ c ^= 0x40;
+ o = ccmapc(c, CC_ASCII, CC_NATIVE);
+ }
+ else if (m)
+ *s++ = '-';
+ else
+ {
+ *s++ = ' ';
+ *s++ = ' ';
+ }
+ *s++ = o;
+ }
+ *s = 0;
+ sfputr(out, buf, delim);
+}
+
+/*
+ * compare two files
+ */
+
+static int
+cmp(const char* file1, Sfio_t* f1, const char* file2, Sfio_t* f2, int flags, Sfoff_t count, Sfoff_t differences)
+{
+ register int c1;
+ register int c2;
+ register unsigned char* p1 = 0;
+ register unsigned char* p2 = 0;
+ register Sfoff_t lines = 1;
+ register unsigned char* e1 = 0;
+ register unsigned char* e2 = 0;
+ Sfoff_t pos = 0;
+ int n1 = 0;
+ int ret = 0;
+ unsigned char* last;
+
+ for (;;)
+ {
+ if ((c1 = e1 - p1) <= 0)
+ {
+ if (count > 0 && !(count -= n1))
+ return ret;
+ if (!(p1 = (unsigned char*)sfreserve(f1, SF_UNBOUND, 0)) || (c1 = sfvalue(f1)) <= 0)
+ {
+ if (sferror(f1)) {
+ error(ERROR_exit(2),
+ "read error on %s", file1);
+ }
+ if ((e2 - p2) > 0 || sfreserve(f2, SF_UNBOUND, 0) && sfvalue(f2) > 0)
+ {
+ ret = 1;
+ if (!(flags & CMP_SILENT))
+ error(ERROR_exit(1), "EOF on %s", file1);
+ }
+ if (sferror(f2)) {
+ error(ERROR_exit(2),
+ "read error on %s", file2);
+ }
+ return ret;
+ }
+ if (count > 0 && c1 > count)
+ c1 = (int)count;
+ e1 = p1 + c1;
+ n1 = c1;
+ }
+ if ((c2 = e2 - p2) <= 0)
+ {
+ if (!(p2 = (unsigned char*)sfreserve(f2, SF_UNBOUND, 0)) || (c2 = sfvalue(f2)) <= 0)
+ {
+ if (sferror(f2)) {
+ error(ERROR_exit(2),
+ "read error on %s", file2);
+ }
+ if (!(flags & CMP_SILENT))
+ error(ERROR_exit(1), "EOF on %s", file2);
+ return 1;
+ }
+ e2 = p2 + c2;
+ }
+ if (c1 > c2)
+ c1 = c2;
+ pos += c1;
+ if (flags & CMP_SILENT)
+ {
+ if (memcmp(p1, p2, c1))
+ return 1;
+ p1 += c1;
+ p2 += c1;
+ }
+ else
+ {
+ last = p1 + c1;
+ while (p1 < last)
+ {
+ if ((c1 = *p1++) != *p2++)
+ {
+ if (differences >= 0)
+ {
+ if (!differences)
+ return 1;
+ differences--;
+ }
+#if 0
+ if (!flags)
+ sfprintf(sfstdout, "%s %s differ: char %I*d, line %I*u\n", file1, file2, sizeof(pos), pos - (last - p1), sizeof(lines), lines);
+ else
+ {
+ sfprintf(sfstdout, "%6I*d", sizeof(pos), pos - (last - p1));
+ pretty(sfstdout, c1, -1, flags);
+ pretty(sfstdout, *(p2-1), '\n', flags);
+ }
+#else
+ if (flags & CMP_VERBOSE)
+ sfprintf(sfstdout, "%6I*d", sizeof(pos), pos - (last - p1));
+ else
+ sfprintf(sfstdout, "%s %s differ: char %I*d, line %I*u", file1, file2, sizeof(pos), pos - (last - p1), sizeof(lines), lines);
+ if (flags & (CMP_BYTES|CMP_CHARS|CMP_VERBOSE))
+ {
+ sfputc(sfstdout, (flags & CMP_VERBOSE) ? ' ' : ',');
+ pretty(sfstdout, c1, -1, flags);
+ pretty(sfstdout, *(p2-1), '\n', flags);
+ }
+ else
+ sfputc(sfstdout, '\n');
+#endif
+ if (!differences || differences < 0 && !(flags & CMP_VERBOSE))
+ return 1;
+ ret = 1;
+ }
+ if (c1 == '\n')
+ lines++;
+ }
+ }
+ }
+}
+
+int
+b_cmp(int argc, register char** argv, Shbltin_t* context)
+{
+ char* s;
+ char* e;
+ char* file1;
+ char* file2;
+ int n;
+ struct stat s1;
+ struct stat s2;
+
+ Sfio_t* f1 = 0;
+ Sfio_t* f2 = 0;
+ Sfoff_t o1 = 0;
+ Sfoff_t o2 = 0;
+ Sfoff_t count = -1;
+ Sfoff_t differences = -1;
+ int flags = 0;
+
+ NoP(argc);
+ cmdinit(argc, argv, context, ERROR_CATALOG, 0);
+ for (;;)
+ {
+ switch (optget(argv, usage))
+ {
+ case 'b':
+ flags |= CMP_BYTES;
+ continue;
+ case 'c':
+ flags |= CMP_CHARS;
+ continue;
+ case 'd':
+ flags |= CMP_VERBOSE;
+ differences = opt_info.number;
+ continue;
+ case 'i':
+ o1 = strtoll(opt_info.arg, &e, 0);
+ if (*e == ':')
+ o2 = strtoll(e + 1, &e, 0);
+ else
+ o2 = o1;
+ if (*e)
+ {
+ error(2, "%s: skip1:skip2 expected", opt_info.arg);
+ break;
+ }
+ continue;
+ case 'l':
+ flags |= CMP_VERBOSE;
+ continue;
+ case 'n':
+ count = opt_info.number;
+ continue;
+ case 's':
+ flags |= CMP_SILENT;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
+ break;
+ }
+ break;
+ }
+ argv += opt_info.index;
+ if (error_info.errors || !(file1 = *argv++) || !(file2 = *argv++))
+ error(ERROR_usage(2), "%s", optusage(NiL));
+ n = 2;
+ if (streq(file1, "-"))
+ f1 = sfstdin;
+ else if (!(f1 = sfopen(NiL, file1, "r")))
+ {
+ if (!(flags & CMP_SILENT))
+ error(ERROR_system(0), "%s: cannot open", file1);
+ goto done;
+ }
+ if (streq(file2, "-"))
+ f2 = sfstdin;
+ else if (!(f2 = sfopen(NiL, file2, "r")))
+ {
+ if (!(flags & CMP_SILENT))
+ error(ERROR_system(0), "%s: cannot open", file2);
+ goto done;
+ }
+ if (s = *argv++)
+ {
+ o1 = strtoll(s, &e, 0);
+ if (*e)
+ {
+ error(ERROR_exit(0), "%s: %s: invalid skip", file1, s);
+ goto done;
+ }
+ if (s = *argv++)
+ {
+ o2 = strtoll(s, &e, 0);
+ if (*e)
+ {
+ error(ERROR_exit(0), "%s: %s: invalid skip", file2, s);
+ goto done;
+ }
+ }
+ if (*argv)
+ {
+ error(ERROR_usage(0), "%s", optusage(NiL));
+ goto done;
+ }
+ }
+ if (o1 && sfseek(f1, o1, SEEK_SET) != o1)
+ {
+ if (!(flags & CMP_SILENT))
+ error(ERROR_exit(0), "EOF on %s", file1);
+ n = 1;
+ goto done;
+ }
+ if (o2 && sfseek(f2, o2, SEEK_SET) != o2)
+ {
+ if (!(flags & CMP_SILENT))
+ error(ERROR_exit(0), "EOF on %s", file2);
+ n = 1;
+ goto done;
+ }
+ if (fstat(sffileno(f1), &s1))
+ error(ERROR_system(0), "%s: cannot stat", file1);
+ else if (fstat(sffileno(f2), &s2))
+ error(ERROR_system(0), "%s: cannot stat", file1);
+ else if (s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev && o1 == o2)
+ n = 0;
+ else
+ n = ((flags & CMP_SILENT) && S_ISREG(s1.st_mode) && S_ISREG(s2.st_mode) && (s1.st_size - o1) != (s2.st_size - o2)) ? 1 : cmp(file1, f1, file2, f2, flags, count, differences);
+ done:
+ if (f1 && f1 != sfstdin)
+ sfclose(f1);
+ if (f2 && f2 != sfstdin)
+ sfclose(f2);
+ return n;
+}
diff --git a/usr/src/lib/libcmd/common/comm.c b/usr/src/contrib/ast/src/lib/libcmd/comm.c
index dcae3ba22e..8080001235 100644
--- a/usr/src/lib/libcmd/common/comm.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/comm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -145,30 +145,33 @@ static int comm(Sfio_t *in1, Sfio_t *in2, register Sfio_t *out,register int mode
}
int
-b_comm(int argc, char *argv[], void* context)
+b_comm(int argc, char *argv[], Shbltin_t* context)
{
- register int n;
register int mode = C_FILE1|C_FILE2|C_COMMON;
register char *cp;
Sfio_t *f1, *f2;
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case '1':
- mode &= ~C_FILE1;
- break;
- case '2':
- mode &= ~C_FILE2;
- break;
- case '3':
- mode &= ~C_COMMON;
- break;
- case ':':
- error(2, "%s",opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s",opt_info.arg);
+ switch (optget(argv, usage))
+ {
+ case '1':
+ mode &= ~C_FILE1;
+ continue;
+ case '2':
+ mode &= ~C_FILE2;
+ continue;
+ case '3':
+ mode &= ~C_COMMON;
+ continue;
+ case ':':
+ error(2, "%s",opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s",opt_info.arg);
+ break;
+ }
break;
}
argv += opt_info.index;
@@ -196,6 +199,5 @@ b_comm(int argc, char *argv[], void* context)
sfclose(f1);
if(f2!=sfstdin)
sfclose(f2);
- return(error_info.errors);
+ return error_info.errors;
}
-
diff --git a/usr/src/lib/libcmd/common/cp.c b/usr/src/contrib/ast/src/lib/libcmd/cp.c
index 66b946b7f5..5ef17bec34 100644
--- a/usr/src/lib/libcmd/common/cp.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/cp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,89 +27,99 @@
*/
static const char usage_head[] =
-"[-?@(#)$Id: cp (AT&T Research) 2010-01-20 $\n]"
+"[-?@(#)$Id: cp (AT&T Research) 2012-04-20 $\n]"
USAGE_LICENSE
;
static const char usage_cp[] =
"[+NAME?cp - copy files]"
-"[+DESCRIPTION?If the last argument names an existing directory, \bcp\b"
-" copies each \afile\a into a file with the same name in that"
-" directory. Otherwise, if only two files are given, \bcp\b copies"
-" the first onto the second. It is an error if the last argument is"
-" not a directory and more than two files are given. By default"
-" directories are not copied.]"
-
-"[a:archive?Preserve as much as possible of the structure and attributes of"
-" the original files in the copy. Equivalent to \b--physical\b"
-" \b--preserve\b \b--recursive\b.]"
+"[+DESCRIPTION?If the last argument names an existing directory, \bcp\b "
+ "copies each \afile\a into a file with the same name in that directory. "
+ "Otherwise, if only two files are given, \bcp\b copies the first onto "
+ "the second. It is an error if the last argument is not a directory and "
+ "more than two files are given. By default directories are not copied.]"
+
+"[a:archive?Preserve as much as possible of the structure and attributes "
+ "of the original files in the copy. Equivalent to \b--physical\b "
+ "\b--preserve\b \b--recursive\b.]"
+"[A:attributes?Preserve selected file attributes:]:[eipt]"
+ "{"
+ "[+e?Everything permissible.]"
+ "[+i?Owner uid and gid.]"
+ "[+p?Permissions.]"
+ "[+t?Access and modify times.]"
+ "}"
"[p:preserve?Preserve file owner, group, permissions and timestamps.]"
-"[h:hierarchy|parents?Form the name of each destination file by appending"
-" to the target directory a slash and the specified source file name."
-" The last argument must be an existing directory. Missing destination"
-" directories are created.]"
-"[H:metaphysical?Follow command argument symbolic links, otherwise don't"
-" follow.]"
+"[h:hierarchy|parents?Form the name of each destination file by "
+ "appending to the target directory a slash and the specified source file "
+ "name. The last argument must be an existing directory. Missing "
+ "destination directories are created.]"
+"[H:metaphysical?Follow command argument symbolic links, otherwise don't "
+ "follow.]"
"[l:link?Make hard links to destination files instead of copies.]"
-"[L:logical|dereference?Follow symbolic links and copy the files"
-" they point to.]"
-"[P|d:physical|nodereference?Don't follow symbolic links; copy symbolic"
-" rather than the files they point to.]"
+"[U:remove-destination?Remove existing destination files before copying.]"
+"[L:logical|dereference?Follow symbolic links and copy the files they "
+ "point to.]"
+"[P|d:physical|nodereference?Don't follow symbolic links; copy symbolic "
+ "rather than the files they point to.]"
;
static const char usage_ln[] =
"[+NAME?ln - link files]"
-"[+DESCRIPTION?If the last argument names an existing directory, \bln\b"
-" links each \afile\a into a file with the same name in that"
-" directory. Otherwise, if only two files are given, \bln\b links"
-" the first onto the second. It is an error if the last argument is"
-" not a directory and more than two files are given. By default"
-" directories are not linked.]"
+"[+DESCRIPTION?If the last argument names an existing directory, \bln\b "
+ "links each \afile\a into a file with the same name in that directory. "
+ "Otherwise, if only two files are given, \bln\b links the first onto the "
+ "second. It is an error if the last argument is not a directory and more "
+ "than two files are given. By default directories are not linked.]"
;
static const char usage_mv[] =
"[+NAME?mv - rename files]"
-"[+DESCRIPTION?If the last argument names an existing directory, \bmv\b"
-" renames each \afile\a into a file with the same name in that"
-" directory. Otherwise, if only two files are given, \bmv\b renames"
-" the first onto the second. It is an error if the last argument is"
-" not a directory and more than two files are given. If a source and"
-" destination file reside on different filesystems then \bmv\b copies"
-" the file contents to the destination and then deletes the source"
-" file.]"
+"[+DESCRIPTION?If the last argument names an existing directory, \bmv\b "
+ "renames each \afile\a into a file with the same name in that directory. "
+ "Otherwise, if only two files are given, \bmv\b renames the first onto "
+ "the second. It is an error if the last argument is not a directory and "
+ "more than two files are given. If a source and destination file reside "
+ "on different filesystems then \bmv\b copies the file contents to the "
+ "destination and then deletes the source file.]"
+
+"[U:remove-destination?Remove existing destination files before moving.]"
;
static const char usage_tail[] =
"[f:force?Replace existing destination files.]"
-"[i:interactive|prompt?Prompt whether to replace existing destination files."
-" An affirmative response (\by\b or \bY\b) replaces the file, a quit"
-" response (\bq\b or \bQ\b) exits immediately, and all other"
-" responses skip the file.]"
+"[i:interactive|prompt?Prompt whether to replace existing destination "
+ "files. An affirmative response (\by\b or \bY\b) replaces the file, a "
+ "quit response (\bq\b or \bQ\b) exits immediately, and all other "
+ "responses skip the file.]"
"[r|R:recursive?Operate on the contents of directories recursively.]"
"[s:symlink|symbolic-link?Make symbolic links to destination files.]"
-"[u:update?Replace a destination file only if its modification time is older"
-" than the corresponding source file modification time.]"
+"[u:update?Replace a destination file only if its modification time is "
+ "older than the corresponding source file modification time.]"
"[v:verbose?Print the name of each file before operating on it.]"
-"[b:backup?Make backups of files that are about to be replaced. See"
-" \b--suffix\b and \b--version-control\b for more information.]"
"[F:fsync|sync?\bfsync\b(2) each file after it is copied.]"
-"[S:backup-suffix|suffix?A backup file is made by renaming the file to the"
-" same name with the backup suffix appended. The backup suffix is"
-" determined in this order: this option, the \bSIMPLE_BACKUP_SUFFIX\b,"
-" environment variable, or the default value \b~\b.]:[suffix]"
-"[V:backup-type|version-control?The backup type is determined in this order:"
-" this option, the \bVERSION_CONTROL\b environment variable, or the"
-" default value \bexisting\b. \atype\a may be one of:]:[type]{"
-" [+numbered|t?Always make numbered backups. The numbered backup"
-" suffix is \b.\aSNS\a, where \aS\a is the"
-" \bbackup-suffix\b and \aN\a is the version number,"
-" starting at 1, incremented with each version.]"
-" [+existing|nil?Make numbered backups of files that already"
-" have them, otherwise simple backups.]"
-" [+simple|never?Always make simple backups.]"
-"}"
-"[x|X|l:xdev|local|mount|one-file-system?Do not descend into directories in"
-" different filesystems than their parents.]"
+"[B:backup?Make backups of files that are about to be replaced. "
+ "\b--suffix\b sets the backup suffix. The backup type is determined in "
+ "this order: this option, the \bVERSION_CONTROL\b environment variable, "
+ "or the default value \bexisting\b. \atype\a may be one of:]:?[type]"
+ "{"
+ "[+numbered|t?Always make numbered backups. The numbered backup "
+ "suffix is \b.\aSNS\a, where \aS\a is the \bbackup-suffix\b and "
+ "\aN\a is the version number, starting at 1, incremented with "
+ "each version.]"
+ "[+existing|nil?Make numbered backups of files that already have "
+ "them, otherwise simple backups.]"
+ "[+simple|never?Always make simple backups.]"
+ "[+none|off?Disable backups.]"
+ "}"
+"[S:suffix?A backup file is made by renaming the file to the same name "
+ "with the backup suffix appended. The backup suffix is determined in "
+ "this order: this option, the \bSIMPLE_BACKUP_SUFFIX\b, environment "
+ "variable, or the default value \b~\b.]:[suffix]"
+"[b?\b--backup\b using the type in the \bVERSION_CONTROL\b environment "
+ "variable.]"
+"[x|X:xdev|local|mount|one-file-system?Do not descend into directories "
+ "in different filesystems than their parents.]"
"\n"
"\nsource destination\n"
@@ -135,6 +145,10 @@ static const char usage_tail[] =
#define LN 2
#define MV 3
+#define PRESERVE_IDS 0x1 /* preserve uid gid */
+#define PRESERVE_PERM 0x2 /* preserve permissions */
+#define PRESERVE_TIME 0x4 /* preserve times */
+
#define BAK_replace 0 /* no backup -- just replace */
#define BAK_existing 1 /* number if already else simple*/
#define BAK_number 2 /* append .suffix number suffix */
@@ -142,7 +156,7 @@ static const char usage_tail[] =
typedef struct State_s /* program state */
{
- void* context; /* builtin context */
+ Shbltin_t* context; /* builtin context */
int backup; /* BAK_* type */
int directory; /* destination is directory */
int flags; /* FTS_* flags */
@@ -156,8 +170,9 @@ typedef struct State_s /* program state */
int perm; /* permissions to preserve */
int postsiz; /* state.path post index */
int presiz; /* state.path pre index */
- int preserve; /* preserve { id mode time } */
+ int preserve; /* preserve { ids perms times } */
int recursive; /* subtrees too */
+ int remove; /* remove destination before op */
int suflen; /* strlen(state.suffix) */
int sync; /* fsync() each file after copy */
int uid; /* caller uid */
@@ -192,22 +207,25 @@ preserve(State_t* state, const char* path, struct stat* ns, struct stat* os)
{
int n;
- if (tmxtouch(path, tmxgetatime(os), tmxgetmtime(os), TMX_NOTIME, 0))
+ if ((state->preserve & PRESERVE_TIME) && tmxtouch(path, tmxgetatime(os), tmxgetmtime(os), TMX_NOTIME, 0))
error(ERROR_SYSTEM|2, "%s: cannot reset access and modify times", path);
- n = ((ns->st_uid != os->st_uid) << 1) | (ns->st_gid != os->st_gid);
- if (n && chown(state->path, os->st_uid, os->st_gid))
- switch (n)
- {
- case 01:
- error(ERROR_SYSTEM|2, "%s: cannot reset group to %s", path, fmtgid(os->st_gid));
- break;
- case 02:
- error(ERROR_SYSTEM|2, "%s: cannot reset owner to %s", path, fmtuid(os->st_uid));
- break;
- case 03:
- error(ERROR_SYSTEM|2, "%s: cannot reset owner to %s and group to %s", path, fmtuid(os->st_uid), fmtgid(os->st_gid));
- break;
- }
+ if (state->preserve & PRESERVE_IDS)
+ {
+ n = ((ns->st_uid != os->st_uid) << 1) | (ns->st_gid != os->st_gid);
+ if (n && chown(state->path, os->st_uid, os->st_gid))
+ switch (n)
+ {
+ case 01:
+ error(ERROR_SYSTEM|2, "%s: cannot reset group to %s", path, fmtgid(os->st_gid));
+ break;
+ case 02:
+ error(ERROR_SYSTEM|2, "%s: cannot reset owner to %s", path, fmtuid(os->st_uid));
+ break;
+ case 03:
+ error(ERROR_SYSTEM|2, "%s: cannot reset owner to %s and group to %s", path, fmtuid(os->st_uid), fmtgid(os->st_gid));
+ break;
+ }
+ }
}
/*
@@ -318,7 +336,7 @@ visit(State_t* state, register FTSENT* ent)
{
if ((ent->fts_statp->st_mode & S_IPERM) != (st.st_mode & S_IPERM) && chmod(state->path, ent->fts_statp->st_mode & S_IPERM))
error(ERROR_SYSTEM|2, "%s: cannot reset directory mode to %s", state->path, fmtmode(st.st_mode & S_IPERM, 0) + 1);
- if (state->preserve)
+ if (state->preserve & (PRESERVE_IDS|PRESERVE_TIME))
preserve(state, state->path, &st, ent->fts_statp);
}
}
@@ -406,7 +424,7 @@ visit(State_t* state, register FTSENT* ent)
* target is in top 3d view
*/
- if (st.st_dev == ent->fts_statp->st_dev && st.st_ino == ent->fts_statp->st_ino)
+ if (state->op != LN && st.st_dev == ent->fts_statp->st_dev && st.st_ino == ent->fts_statp->st_ino)
{
if (state->op == MV)
{
@@ -429,17 +447,20 @@ visit(State_t* state, register FTSENT* ent)
}
if (state->verbose)
sfputr(sfstdout, state->path, '\n');
- rm = state->op == LN || ent->fts_info == FTS_SL;
+ rm = state->remove || ent->fts_info == FTS_SL;
if (!rm || !state->force)
{
- if ((n = open(state->path, O_RDWR|O_BINARY)) >= 0)
+ if (S_ISLNK(st.st_mode) && (n = -1) || (n = open(state->path, O_RDWR|O_BINARY|O_cloexec)) >= 0)
{
- close(n);
+ if (n >= 0)
+ close(n);
if (state->force)
/* ok */;
else if (state->interactive)
{
- if (astquery(-1, "%s %s? ", state->opname, state->path) < 0 || sh_checksig(state->context))
+ if ((n = astquery(-1, "%s %s? ", state->opname, state->path)) < 0 || sh_checksig(state->context))
+ return -1;
+ if (n)
return 0;
}
else if (state->op == LN)
@@ -460,7 +481,9 @@ visit(State_t* state, register FTSENT* ent)
fmtmode(st.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO), 0) + 1;
if (state->interactive)
{
- if (astquery(-1, "override protection %s for %s? ", protection, state->path) < 0 || sh_checksig(state->context))
+ if ((n = astquery(-1, "override protection %s for %s? ", protection, state->path)) < 0 || sh_checksig(state->context))
+ return -1;
+ if (n)
return 0;
rm = 1;
}
@@ -567,12 +590,12 @@ visit(State_t* state, register FTSENT* ent)
}
else if (state->op == CP || S_ISREG(ent->fts_statp->st_mode) || S_ISDIR(ent->fts_statp->st_mode))
{
- if (ent->fts_statp->st_size > 0 && (rfd = open(ent->fts_path, O_RDONLY|O_BINARY)) < 0)
+ if (ent->fts_statp->st_size > 0 && (rfd = open(ent->fts_path, O_RDONLY|O_BINARY|O_cloexec)) < 0)
{
error(ERROR_SYSTEM|2, "%s: cannot read", ent->fts_path);
return 0;
}
- else if ((wfd = open(state->path, st.st_mode ? (state->wflags & ~O_EXCL) : state->wflags, ent->fts_statp->st_mode & state->perm)) < 0)
+ else if ((wfd = open(state->path, (st.st_mode ? (state->wflags & ~O_EXCL) : state->wflags)|O_cloexec, ent->fts_statp->st_mode & state->perm)) < 0)
{
error(ERROR_SYSTEM|2, "%s: cannot write", state->path);
if (ent->fts_statp->st_size > 0)
@@ -586,29 +609,28 @@ visit(State_t* state, register FTSENT* ent)
error(ERROR_SYSTEM|2, "%s: %s read stream error", ent->fts_path, state->path);
close(rfd);
close(wfd);
+ return 0;
}
- else
+ if (!(op = sfnew(NiL, NiL, SF_UNBOUND, wfd, SF_WRITE)))
{
- n = 0;
- if (!(op = sfnew(NiL, NiL, SF_UNBOUND, wfd, SF_WRITE)))
- {
- error(ERROR_SYSTEM|2, "%s: %s write stream error", ent->fts_path, state->path);
- close(wfd);
- sfclose(ip);
- }
- else
- {
- if (sfmove(ip, op, (Sfoff_t)SF_UNBOUND, -1) < 0)
- n |= 3;
- if (!sfeof(ip))
- n |= 1;
- if (sfsync(op) || state->sync && fsync(wfd) || sfclose(op))
- n |= 2;
- if (sfclose(ip))
- n |= 1;
- if (n)
- error(ERROR_SYSTEM|2, "%s: %s %s error", ent->fts_path, state->path, n == 1 ? ERROR_translate(0, 0, 0, "read") : n == 2 ? ERROR_translate(0, 0, 0, "write") : ERROR_translate(0, 0, 0, "io"));
- }
+ error(ERROR_SYSTEM|2, "%s: %s write stream error", ent->fts_path, state->path);
+ close(wfd);
+ sfclose(ip);
+ return 0;
+ }
+ n = 0;
+ if (sfmove(ip, op, (Sfoff_t)SF_UNBOUND, -1) < 0)
+ n |= 3;
+ if (!sfeof(ip))
+ n |= 1;
+ if (sfsync(op) || state->sync && fsync(wfd) || sfclose(op))
+ n |= 2;
+ if (sfclose(ip))
+ n |= 1;
+ if (n)
+ {
+ error(ERROR_SYSTEM|2, "%s: %s %s error", ent->fts_path, state->path, n == 1 ? ERROR_translate(0, 0, 0, "read") : n == 2 ? ERROR_translate(0, 0, 0, "write") : ERROR_translate(0, 0, 0, "io"));
+ return 0;
}
}
else
@@ -635,9 +657,10 @@ visit(State_t* state, register FTSENT* ent)
error(ERROR_SYSTEM|2, "%s: cannot stat", state->path);
else
{
- if ((ent->fts_statp->st_mode & state->perm) != (st.st_mode & state->perm) && chmod(state->path, ent->fts_statp->st_mode & state->perm))
+ if ((state->preserve & PRESERVE_PERM) && (ent->fts_statp->st_mode & state->perm) != (st.st_mode & state->perm) && chmod(state->path, ent->fts_statp->st_mode & state->perm))
error(ERROR_SYSTEM|2, "%s: cannot reset mode to %s", state->path, fmtmode(st.st_mode & state->perm, 0) + 1);
- preserve(state, state->path, &st, ent->fts_statp);
+ if (state->preserve & (PRESERVE_IDS|PRESERVE_TIME))
+ preserve(state, state->path, &st, ent->fts_statp);
}
}
if (state->op == MV && remove(ent->fts_path))
@@ -653,7 +676,7 @@ visit(State_t* state, register FTSENT* ent)
}
int
-b_cp(int argc, register char** argv, void* context)
+b_cp(int argc, register char** argv, Shbltin_t* context)
{
register char* file;
register char* s;
@@ -667,7 +690,7 @@ b_cp(int argc, register char** argv, void* context)
struct stat st;
State_t* state;
Shbltin_t* sh;
- void* cleanup = context;
+ Shbltin_t* cleanup = context;
cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY);
if (!(sh = CMD_CONTEXT(context)) || !(state = (State_t*)sh->ptr))
@@ -688,7 +711,7 @@ b_cp(int argc, register char** argv, void* context)
if (!state->tmp && !(state->tmp = sfstropen()))
error(ERROR_SYSTEM|3, "out of space [tmp string]");
sfputr(state->tmp, usage_head, -1);
- standard = !strcmp(astconf("CONFORMANCE", NiL, NiL), "standard");
+ standard = !!conformance(0, 0);
switch (error_info.id[0])
{
case 'c':
@@ -704,6 +727,7 @@ b_cp(int argc, register char** argv, void* context)
state->op = LN;
state->flags |= FTS_PHYSICAL;
state->link = link;
+ state->remove = 1;
state->stat = lstat;
path_resolve = 1;
break;
@@ -712,7 +736,7 @@ b_cp(int argc, register char** argv, void* context)
sfputr(state->tmp, usage_mv, -1);
state->op = MV;
state->flags |= FTS_PHYSICAL;
- state->preserve = 1;
+ state->preserve = PRESERVE_IDS|PRESERVE_PERM|PRESERVE_TIME;
state->stat = lstat;
path_resolve = 1;
break;
@@ -730,10 +754,37 @@ b_cp(int argc, register char** argv, void* context)
{
case 'a':
state->flags |= FTS_PHYSICAL;
- state->preserve = 1;
+ state->preserve = PRESERVE_IDS|PRESERVE_PERM|PRESERVE_TIME;
state->recursive = 1;
path_resolve = 1;
continue;
+ case 'A':
+ s = opt_info.arg;
+ for (;;)
+ {
+ switch (*s++)
+ {
+ case 0:
+ break;
+ case 'e':
+ state->preserve |= PRESERVE_IDS|PRESERVE_PERM|PRESERVE_TIME;
+ continue;
+ case 'i':
+ state->preserve |= PRESERVE_IDS;
+ continue;
+ case 'p':
+ state->preserve |= PRESERVE_PERM;
+ continue;
+ case 't':
+ state->preserve |= PRESERVE_TIME;
+ continue;
+ default:
+ error(1, "%s=%c: unknown attribute flag", opt_info.option, *(s - 1));
+ continue;
+ }
+ break;
+ }
+ continue;
case 'b':
state->backup = 1;
continue;
@@ -756,7 +807,7 @@ b_cp(int argc, register char** argv, void* context)
state->stat = lstat;
continue;
case 'p':
- state->preserve = 1;
+ state->preserve = PRESERVE_IDS|PRESERVE_PERM|PRESERVE_TIME;
continue;
case 'r':
state->recursive = 1;
@@ -777,6 +828,10 @@ b_cp(int argc, register char** argv, void* context)
case 'x':
state->flags |= FTS_XDEV;
continue;
+ case 'B':
+ backup_type = opt_info.arg;
+ state->backup = 1;
+ continue;
case 'F':
#if _lib_fsync
state->sync = 1;
@@ -806,8 +861,8 @@ b_cp(int argc, register char** argv, void* context)
case 'S':
state->suffix = opt_info.arg;
continue;
- case 'V':
- backup_type = opt_info.arg;
+ case 'U':
+ state->remove = 1;
continue;
case '?':
error(ERROR_USAGE|4, "%s", opt_info.arg);
@@ -841,7 +896,7 @@ b_cp(int argc, register char** argv, void* context)
if (state->backup)
{
if (!(file = backup_type) && !(backup_type = getenv("VERSION_CONTROL")))
- state->backup = BAK_existing;
+ state->backup = 0;
else
switch (strkey(backup_type))
{
@@ -867,6 +922,14 @@ b_cp(int argc, register char** argv, void* context)
case HASHKEY1('s'):
state->backup = BAK_simple;
break;
+ case HASHKEY4('n','o','n','e'):
+ case HASHKEY3('n','o','n'):
+ case HASHKEY2('n','o'):
+ case HASHKEY3('o','f','f'):
+ case HASHKEY2('o','f'):
+ case HASHKEY1('o'):
+ state->backup = 0;
+ break;
case HASHKEY6('n','u','m','b','e','r'):
case HASHKEY5('n','u','m','b','e'):
case HASHKEY4('n','u','m','b'):
@@ -887,7 +950,7 @@ b_cp(int argc, register char** argv, void* context)
if (argc <= 0 || error_info.errors)
error(ERROR_USAGE|4, "%s", optusage(NiL));
if (!path_resolve)
- state->flags |= fts_flags();
+ state->flags |= fts_flags() | FTS_META;
file = argv[argc];
argv[argc] = 0;
if (s = strrchr(file, '/'))
@@ -898,7 +961,7 @@ b_cp(int argc, register char** argv, void* context)
s = 0;
}
if (file != (char*)dot)
- pathcanon(file, 0);
+ pathcanon(file, 0, 0);
if (!(state->directory = !stat(file, &st) && S_ISDIR(st.st_mode)) && argc > 1)
error(ERROR_USAGE|4, "%s", optusage(NiL));
if (s && !state->directory)
diff --git a/usr/src/lib/libcmd/common/cut.c b/usr/src/contrib/ast/src/lib/libcmd/cut.c
index 6b6cabe60e..89d24c1914 100644
--- a/usr/src/lib/libcmd/common/cut.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/cut.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: cut (AT&T Research) 2009-12-04 $\n]"
+"[-?\n@(#)$Id: cut (AT&T Research) 2010-08-11 $\n]"
USAGE_LICENSE
"[+NAME?cut - cut out selected columns or fields of each line of a file]"
"[+DESCRIPTION?\bcut\b bytes, characters, or character-delimited fields "
@@ -113,8 +113,6 @@ typedef struct Cut_s
#define SP_WORD 2
#define SP_WIDE 3
-#define mb2wc(w,p,n) (*ast.mb_towc)(&w,(char*)p,n)
-
/*
* compare the first of an array of integers
*/
@@ -287,7 +285,7 @@ cutcols(Cut_t* cut, Sfio_t* fdin, Sfio_t* fdout)
{
if (!(*s & 0x80))
z = 1;
- else if ((z = mblen(s, w)) <= 0)
+ else if ((z = mbnsize(s, w)) <= 0)
{
if (s == bp && xx)
{
@@ -317,7 +315,7 @@ cutcols(Cut_t* cut, Sfio_t* fdin, Sfio_t* fdout)
while (w > 0 && ncol > 0)
{
ncol--;
- if (!(*s & 0x80) || (z = mblen(s, w)) <= 0)
+ if (!(*s & 0x80) || (z = mbnsize(s, w)) <= 0)
z = 1;
s += z;
w -= z;
@@ -568,7 +566,7 @@ cutfields(Cut_t* cut, Sfio_t* fdin, Sfio_t* fdout)
}
int
-b_cut(int argc, char** argv, void* context)
+b_cut(int argc, char** argv, Shbltin_t* context)
{
register char* cp = 0;
register Sfio_t* fp;
@@ -586,7 +584,7 @@ b_cut(int argc, char** argv, void* context)
wdelim.len = ldelim.len = 1;
for (;;)
{
- switch (n = optget(argv, usage))
+ switch (optget(argv, usage))
{
case 0:
break;
@@ -598,7 +596,7 @@ b_cut(int argc, char** argv, void* context)
continue;
}
cp = opt_info.arg;
- if(n=='b')
+ if(opt_info.option[1]=='b')
mode |= C_BYTES;
else
mode |= C_CHARS;
diff --git a/usr/src/lib/libcmd/common/date.c b/usr/src/contrib/ast/src/lib/libcmd/date.c
index ce011e2960..3f9a3031f1 100644
--- a/usr/src/lib/libcmd/common/date.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/date.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: date (AT&T Research) 2009-03-03 $\n]"
+"[-?\n@(#)$Id: date (AT&T Research) 2011-01-27 $\n]"
USAGE_LICENSE
"[+NAME?date - set/list/convert dates]"
"[+DESCRIPTION?\bdate\b sets the current date and time (with appropriate"
@@ -89,12 +89,12 @@ USAGE_LICENSE
" [+a?abbreviated weekday name]"
" [+A?full weekday name]"
" [+b?abbreviated month name]"
+" [+B?full month name]"
" [+c?\bctime\b(3) style date without the trailing newline]"
" [+C?2-digit century]"
" [+d?day of month number]"
" [+D?date as \amm/dd/yy\a]"
" [+e?blank padded day of month number]"
-" [+E?unpadded day of month number]"
" [+f?locale default override date format]"
" [+F?%ISO 8601:2000 standard date format; equivalent to Y-%m-%d]"
" [+g?\bls\b(1) \b-l\b recent date with \ahh:mm\a]"
@@ -136,7 +136,7 @@ USAGE_LICENSE
" [+y?2-digit year (you'll be sorry)]"
" [+Y?4-digit year]"
" [+z?time zone \aSHHMM\a west of GMT offset where S is"
-" \b+\b or \b-\b]"
+" \b+\b or \b-\b, use pad _ for \aSHH:MM\a]"
" [+Z?time zone name]"
" [+=[=]][-+]]flag?set (default or +) or clear (-) \aflag\a"
" for the remainder of \aformat\a, or for the remainder"
@@ -168,8 +168,17 @@ USAGE_LICENSE
" [+&?Call the \btmdate\b(3) heuristic parser. This is"
" is the default when \b--parse\b is omitted.]"
"}"
+"[R:rfc-2822?List date and time in RFC 2822 format "
+ "(%a, %-e %h %Y %H:%M:%S %z).]"
+"[T:rfc-3339?List date and time in RFC 3339 format according to "
+ "\atype\a:]:[type]"
+ "{"
+ "[d:date?(%Y-%m-%d)]"
+ "[s:seconds?(%Y-%m-%d %H:%M:%S%_z)]"
+ "[n:ns|nanoseconds?(%Y-%m-%d %H:%M:%S.%N%_z)]"
+ "}"
"[s:show?Show the date without setting the system time.]"
-"[u:utc|gmt|zulu?Output dates in \acoordinated universal time\a (UTC).]"
+"[u:utc|gmt|zulu|universal?Output dates in \acoordinated universal time\a (UTC).]"
"[U:unelapsed?Interpret each argument as \bfmtelapsed\b(3) elapsed"
" time and list the \bstrelapsed\b(3) 1/\ascale\a seconds.]#[scale]"
"[z:list-zones?List the known time zone table and exit. The table columns"
@@ -207,7 +216,7 @@ typedef struct Fmt
*/
static int
-settime(void* context, const char* cmd, Time_t now, int adjust, int network)
+settime(Shbltin_t* context, const char* cmd, Time_t now, int adjust, int network)
{
char* s;
char** argv;
@@ -265,7 +274,7 @@ convert(register Fmt_t* f, char* s, Time_t now)
}
int
-b_date(int argc, register char** argv, void* context)
+b_date(int argc, register char** argv, Shbltin_t* context)
{
register int n;
register char* s;
@@ -312,7 +321,7 @@ b_date(int argc, register char** argv, void* context)
show = 1;
continue;
case 'e':
- format = "%#";
+ format = "%s";
continue;
case 'E':
elapsed = 1;
@@ -339,9 +348,26 @@ b_date(int argc, register char** argv, void* context)
f->format = opt_info.arg;
fmts = f;
continue;
+ case 'R':
+ format = "%a, %-e %h %Y %H:%M:%S %z";
+ continue;
case 's':
show = 1;
continue;
+ case 'T':
+ switch (opt_info.num)
+ {
+ case 'd':
+ format = "%Y-%m-%d";
+ continue;
+ case 'n':
+ format = "%Y-%m-%d %H:%M:%S.%N%_z";
+ continue;
+ case 's':
+ format = "%Y-%m-%d %H:%M:%S%_z";
+ continue;
+ }
+ continue;
case 'u':
tm_info.flags |= TM_UTC;
continue;
diff --git a/usr/src/lib/libcmd/common/dirname.c b/usr/src/contrib/ast/src/lib/libcmd/dirname.c
index 076460eb97..a0704d5a2e 100644
--- a/usr/src/lib/libcmd/common/dirname.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/dirname.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -96,30 +96,33 @@ static void l_dirname(register Sfio_t *outfile, register const char *pathname)
}
int
-b_dirname(int argc,register char *argv[], void* context)
+b_dirname(int argc, char** argv, Shbltin_t* context)
{
- register int n;
- int mode = 0;
- char buf[PATH_MAX];
+ int mode = 0;
+ char buf[PATH_MAX];
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case 'f':
- mode |= PATH_REGULAR;
- break;
- case 'r':
- mode &= ~PATH_REGULAR;
- mode |= PATH_READ;
- break;
- case 'x':
- mode |= PATH_EXECUTE;
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
+ switch (optget(argv, usage))
+ {
+ case 'f':
+ mode |= PATH_REGULAR;
+ continue;
+ case 'r':
+ mode &= ~PATH_REGULAR;
+ mode |= PATH_READ;
+ continue;
+ case 'x':
+ mode |= PATH_EXECUTE;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
+ break;
+ }
break;
}
argv += opt_info.index;
@@ -128,9 +131,9 @@ b_dirname(int argc,register char *argv[], void* context)
error(ERROR_usage(2),"%s", optusage(NiL));
if(!mode)
l_dirname(sfstdout,argv[0]);
- else if(pathpath(buf, argv[0], "", mode))
+ else if(pathpath(argv[0], "", mode, buf, sizeof(buf)))
sfputr(sfstdout, buf, '\n');
else
error(1|ERROR_WARNING, "%s: relative path not found", argv[0]);
- return(0);
+ return 0;
}
diff --git a/usr/src/lib/libcmd/common/expr.c b/usr/src/contrib/ast/src/lib/libcmd/expr.c
index 537408e507..a19b042215 100644
--- a/usr/src/lib/libcmd/common/expr.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/expr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: expr (AT&T Research) 2008-01-30 $\n]"
+"[-?\n@(#)$Id: expr (AT&T Research) 2010-08-11 $\n]"
USAGE_LICENSE
"[+NAME?expr - evaluate arguments as an expression]"
"[+DESCRIPTION?\bexpr\b evaluates an expression given as arguments and writes "
@@ -489,14 +489,14 @@ static int expr_or(State_t* state, Node_t *np)
}
int
-b_expr(int argc, char *argv[], void *context)
+b_expr(int argc, char** argv, Shbltin_t* context)
{
State_t state;
Node_t node;
int n;
- cmdinit(argc, argv,context, ERROR_CATALOG, 0);
- state.standard = !strcmp(astconf("CONFORMANCE", NiL, NiL), "standard");
+ cmdinit(argc, argv, context, ERROR_CATALOG, 0);
+ state.standard = !!conformance(0, 0);
#if 0
if (state.standard)
state.arglist = argv+1;
diff --git a/usr/src/lib/libcmd/common/fds.c b/usr/src/contrib/ast/src/lib/libcmd/fds.c
index 0eb22bb1fd..4dc934f773 100644
--- a/usr/src/lib/libcmd/common/fds.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/fds.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -156,7 +156,7 @@ static const NV_t family[] =
#endif
int
-b_fds(int argc, char** argv, void* context)
+b_fds(int argc, char** argv, Shbltin_t* context)
{
register char* s;
register int i;
@@ -200,10 +200,10 @@ b_fds(int argc, char** argv, void* context)
continue;
case '?':
error(ERROR_USAGE|4, "%s", opt_info.arg);
- continue;
+ break;
case ':':
error(2, "%s", opt_info.arg);
- continue;
+ break;
}
break;
}
diff --git a/usr/src/lib/libcmd/common/features/ids b/usr/src/contrib/ast/src/lib/libcmd/features/ids
index 04be5755cf..c8f7faa580 100644
--- a/usr/src/lib/libcmd/common/features/ids
+++ b/usr/src/contrib/ast/src/lib/libcmd/features/ids
@@ -1,5 +1,6 @@
lib endgrent,getgrent,setgrent
lib fsid,getfsgid,isfsg sys/types.h sys/fss.h fsg.h -lfsg
+lib getsid unistd.h
mac fsid sys/types.h sys/fss.h fsg.h
cat{
#if !_lib_fsid && _mac_fsid
diff --git a/usr/src/lib/libcmd/common/features/sockets b/usr/src/contrib/ast/src/lib/libcmd/features/sockets
index 2660abb8df..2660abb8df 100644
--- a/usr/src/lib/libcmd/common/features/sockets
+++ b/usr/src/contrib/ast/src/lib/libcmd/features/sockets
diff --git a/usr/src/lib/libcmd/common/features/symlink b/usr/src/contrib/ast/src/lib/libcmd/features/symlink
index a7d86b09f5..789db0beb3 100644
--- a/usr/src/lib/libcmd/common/features/symlink
+++ b/usr/src/contrib/ast/src/lib/libcmd/features/symlink
@@ -1,5 +1,6 @@
lib lchmod note{ lchmod implemented }end execute{
- #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
#include <errno.h>
int
main()
@@ -10,7 +11,8 @@ lib lchmod note{ lchmod implemented }end execute{
}end
lib lchown note{ lchown implemented }end execute{
- #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
#include <errno.h>
int
main()
diff --git a/usr/src/lib/libcmd/common/features/utsname b/usr/src/contrib/ast/src/lib/libcmd/features/utsname
index 7254867181..7254867181 100644
--- a/usr/src/lib/libcmd/common/features/utsname
+++ b/usr/src/contrib/ast/src/lib/libcmd/features/utsname
diff --git a/usr/src/lib/libcmd/common/fmt.c b/usr/src/contrib/ast/src/lib/libcmd/fmt.c
index 2830e2191b..e3207678b6 100644
--- a/usr/src/lib/libcmd/common/fmt.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/fmt.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -562,7 +562,7 @@ dofmt(Fmt_t* fp)
}
int
-b_fmt(int argc, char** argv, void *context)
+b_fmt(int argc, char** argv, Shbltin_t* context)
{
register int n;
char* cp;
@@ -582,20 +582,21 @@ b_fmt(int argc, char** argv, void *context)
fmt.retain = 0;
fmt.section = 1;
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage))
- switch (n)
+ for (;;)
+ {
+ switch (n = optget(argv, usage))
{
case 'c':
case 'o':
case 's':
case 'u':
setoption(&fmt, n);
- break;
+ continue;
case 'w':
if (opt_info.num < TABSZ || opt_info.num>= sizeof(outbuf))
error(2, "width out of range");
fmt.endbuf = &outbuf[opt_info.num];
- break;
+ continue;
case ':':
error(2, "%s", opt_info.arg);
break;
@@ -603,6 +604,8 @@ b_fmt(int argc, char** argv, void *context)
error(ERROR_usage(2), "%s", opt_info.arg);
break;
}
+ break;
+ }
argv += opt_info.index;
if (error_info.errors)
error(ERROR_usage(2), "%s", optusage(NiL));
diff --git a/usr/src/lib/libcmd/common/fold.c b/usr/src/contrib/ast/src/lib/libcmd/fold.c
index e371570095..7e94ffdd28 100644
--- a/usr/src/lib/libcmd/common/fold.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/fold.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -167,7 +167,7 @@ static void fold(Sfio_t *in, Sfio_t *out, register int width, const char *cont,
}
int
-b_fold(int argc, char *argv[], void* context)
+b_fold(int argc, char** argv, Shbltin_t* context)
{
register int n, width=WIDTH;
register Sfio_t *fp;
@@ -186,8 +186,6 @@ b_fold(int argc, char *argv[], void* context)
{
switch (optget(argv, usage))
{
- case 0:
- break;
case 'b':
cols['\r'] = cols['\b'] = 0;
cols['\t'] = cols[' '];
diff --git a/usr/src/lib/libcmd/common/fts_fix.c b/usr/src/contrib/ast/src/lib/libcmd/fts_fix.c
index cc007e06c7..61b61ba8c6 100644
--- a/usr/src/lib/libcmd/common/fts_fix.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/fts_fix.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -18,6 +18,7 @@
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
+#pragma prototyped
/*
* -lcmd specific workaround to handle
* fts_namelen
diff --git a/usr/src/lib/libcmd/common/fts_fix.h b/usr/src/contrib/ast/src/lib/libcmd/fts_fix.h
index e4d411a82e..96f4448f04 100644
--- a/usr/src/lib/libcmd/common/fts_fix.h
+++ b/usr/src/contrib/ast/src/lib/libcmd/fts_fix.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -18,6 +18,7 @@
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
+#pragma prototyped
/*
* -lcmd specific workaround to handle
* fts_namelen
diff --git a/usr/src/lib/libcmd/common/getconf.c b/usr/src/contrib/ast/src/lib/libcmd/getconf.c
index d7d02c98ac..6e47abc6fa 100644
--- a/usr/src/lib/libcmd/common/getconf.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/getconf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: getconf (AT&T Research) 2008-04-24 $\n]"
+"[-?\n@(#)$Id: getconf (AT&T Research) 2012-06-25 $\n]"
USAGE_LICENSE
"[+NAME?getconf - get configuration values]"
"[+DESCRIPTION?\bgetconf\b displays the system configuration value for"
@@ -104,15 +104,18 @@ USAGE_LICENSE
"\n[ name [ path [ value ] ] ... ]\n"
"\n"
-"[+ENVIRONMENT]{"
-" [+_AST_FEATURES?Process local writable values that are different from"
-" the default are stored in the \b_AST_FEATURES\b environment"
-" variable. The \b_AST_FEATURES\b value is a space-separated"
-" list of \aname\a \apath\a \avalue\a 3-tuples, where"
-" \aname\a is the system configuration name, \apath\a is the"
-" corresponding path, \b-\b if no path is applicable, and"
-" \avalue\a is the system configuration value.]"
-"}"
+"[+ENVIRONMENT]"
+ "{"
+ "[+_AST_FEATURES?Process local writable values that are "
+ "different from the default are stored in the \b_AST_FEATURES\b "
+ "environment variable. The \b_AST_FEATURES\b value is a "
+ "space-separated list of \aname\a \apath\a \avalue\a 3-tuples, "
+ "where \aname\a is the system configuration name, \apath\a is "
+ "the corresponding path, \b-\b if no path is applicable, and "
+ "\avalue\a is the system configuration value. \b_AST_FEATURES\b "
+ "is an implementation detail of process inheritance; it may "
+ "change or vanish in the future; don't rely on it.]"
+ "}"
"[+SEE ALSO?\bpathchk\b(1), \bconfstr\b(2), \bpathconf\b(2),"
" \bsysconf\b(2), \bastgetconf\b(3)]"
;
@@ -128,7 +131,7 @@ typedef struct Path_s
} Path_t;
int
-b_getconf(int argc, char** argv, void* context)
+b_getconf(int argc, char** argv, Shbltin_t* context)
{
register char* name;
register char* path;
@@ -239,7 +242,8 @@ b_getconf(int argc, char** argv, void* context)
astconflist(sfstdout, path, flags, pattern);
else
{
- flags = native ? (ASTCONF_system|ASTCONF_error) : 0;
+ if (native)
+ flags |= (ASTCONF_system|ASTCONF_error);
do
{
if (!(path = *++argv))
@@ -261,7 +265,12 @@ b_getconf(int argc, char** argv, void* context)
if (error_info.errors)
break;
if (!s)
- goto defer;
+ {
+ if (native)
+ goto defer;
+ error(2, "%s: unknown name", name);
+ break;
+ }
if (!value)
{
if (flags & ASTCONF_write)
diff --git a/usr/src/lib/libcmd/common/head.c b/usr/src/contrib/ast/src/lib/libcmd/head.c
index 80ce196b7e..426e7db80f 100644
--- a/usr/src/lib/libcmd/common/head.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/head.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-n?\n@(#)$Id: head (AT&T Research) 2006-09-27 $\n]"
+"[-n?\n@(#)$Id: head (AT&T Research) 2012-05-31 $\n]"
USAGE_LICENSE
"[+NAME?head - output beginning portion of one or more files ]"
"[+DESCRIPTION?\bhead\b copies one or more input files to standard "
@@ -68,7 +68,7 @@ USAGE_LICENSE
#include <cmd.h>
int
-b_head(int argc, register char** argv, void* context)
+b_head(int argc, register char** argv, Shbltin_t* context)
{
static const char header_fmt[] = "\n==> %s <==\n";
@@ -139,7 +139,7 @@ b_head(int argc, register char** argv, void* context)
format = (char*)header_fmt;
if (skip > 0)
sfmove(fp, NiL, skip, delim);
- if (sfmove(fp, sfstdout, keep, delim) < 0 && errno != EPIPE)
+ if (sfmove(fp, sfstdout, keep, delim) < 0 && !ERROR_PIPE(errno) && errno != EINTR)
error(ERROR_system(0), "%s: read error", cp);
if (fp != sfstdin)
sfclose(fp);
diff --git a/usr/src/lib/libcmd/common/id.c b/usr/src/contrib/ast/src/lib/libcmd/id.c
index 1465d76b7b..aa0a65b198 100644
--- a/usr/src/lib/libcmd/common/id.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/id.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -416,39 +416,43 @@ getids(Sfio_t* sp, const char* name, register int flags)
}
int
-b_id(int argc, char *argv[], void* context)
+b_id(int argc, char** argv, Shbltin_t* context)
{
register int flags = 0;
register int n;
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case 'a':
- break;
- case 'G':
- flags |= GG_FLAG;
- break;
- case 'g':
- flags |= G_FLAG;
- break;
- case 'n':
- flags |= N_FLAG;
- break;
- case 'r':
- flags |= R_FLAG;
- break;
- case 's':
- flags |= S_FLAG;
- break;
- case 'u':
- flags |= U_FLAG;
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
+ switch (optget(argv, usage))
+ {
+ case 'a':
+ continue;
+ case 'G':
+ flags |= GG_FLAG;
+ continue;
+ case 'g':
+ flags |= G_FLAG;
+ continue;
+ case 'n':
+ flags |= N_FLAG;
+ continue;
+ case 'r':
+ flags |= R_FLAG;
+ continue;
+ case 's':
+ flags |= S_FLAG;
+ continue;
+ case 'u':
+ flags |= U_FLAG;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
+ break;
+ }
break;
}
argv += opt_info.index;
diff --git a/usr/src/lib/libcmd/common/join.c b/usr/src/contrib/ast/src/lib/libcmd/join.c
index 4ef3c40860..675577c5fe 100644
--- a/usr/src/lib/libcmd/common/join.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/join.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -159,7 +159,7 @@ typedef struct Join_s
int mb;
char* same;
int samesize;
- void* context;
+ Shbltin_t* context;
File_t file[2];
} Join_t;
@@ -255,9 +255,9 @@ getolist(Join_t* jp, const char* first, char** arglist)
cp = str;
}
/* need to accept obsolescent command syntax */
- while (1)
+ while (cp = *argv)
{
- if (!(cp= *argv) || cp[1]!='.' || (*cp!='1' && *cp!='2'))
+ if (cp[1]!='.' || (*cp!='1' && *cp!='2'))
{
if (*cp=='0' && cp[1]==0)
{
@@ -447,18 +447,8 @@ getrec(Join_t* jp, int index, int discard)
return (unsigned char*)"";
}
-static unsigned char*
-_trace_getrec(Join_t* jp, int index, int discard)
-{
- unsigned char* r;
-
- r = getrec(jp, index, discard);
- return r;
-}
-#define getrec _trace_getrec
-
#if DEBUG_TRACE
-static unsigned char* u1,u2,u3;
+static unsigned char* u1;
#define getrec(p,n,d) (u1 = getrec(p, n, d), sfprintf(sfstdout, "[G%d#%d@%I*d:%-.8s]", __LINE__, n, sizeof(Sfoff_t), sftell(p->file[n].iop), u1), u1)
#endif
@@ -780,7 +770,7 @@ sfprintf(sfstdout, "[2#%d:0,%lld,%lld]", __LINE__, lo, hi);
}
}
#if DEBUG_TRACE
-sfprintf(sfstdout, "[X#%d:?,%p,%p,%d%,%d,%d%s]", __LINE__, cp1, cp2, cmp, lo, hi, (jp->outmode & C_COMMON) ? ",COMMON" : "");
+sfprintf(sfstdout, "[X#%d:?,%p,%p,%d,%d,%d%s]", __LINE__, cp1, cp2, cmp, lo, hi, (jp->outmode & C_COMMON) ? ",COMMON" : "");
#endif
if (cp2)
{
@@ -823,7 +813,7 @@ sfprintf(sfstdout, "[X#%d:%d,%p,%p,%d,%02o,%02o%s]", __LINE__, n, cp1, cp2, cmp,
}
int
-b_join(int argc, char** argv, void* context)
+b_join(int argc, char** argv, Shbltin_t* context)
{
register int n;
register char* cp;
@@ -840,8 +830,6 @@ b_join(int argc, char** argv, void* context)
{
switch (n = optget(argv, usage))
{
- case 0:
- break;
case 'j':
/*
* check for obsolete "-j1 field" and "-j2 field"
diff --git a/usr/src/lib/libast/common/std/iconv.h b/usr/src/contrib/ast/src/lib/libcmd/lib.c
index e65540c075..2f0bb4159f 100644
--- a/usr/src/lib/libast/common/std/iconv.h
+++ b/usr/src/contrib/ast/src/lib/libcmd/lib.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -16,7 +16,10 @@
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
-#include <ast_iconv.h>
+#pragma prototyped
+
+#include <cmd.h>
+
+SHLIB(cmd)
diff --git a/usr/src/lib/libcmd/common/ln.c b/usr/src/contrib/ast/src/lib/libcmd/ln.c
index c898e7fb05..709b450fd2 100644
--- a/usr/src/lib/libcmd/common/ln.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/ln.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,7 +29,7 @@
#include <cmd.h>
int
-b_ln(int argc, register char** argv, void* context)
+b_ln(int argc, register char** argv, Shbltin_t* context)
{
return b_cp(argc, argv, context);
}
diff --git a/usr/src/lib/libcmd/common/logname.c b/usr/src/contrib/ast/src/lib/libcmd/logname.c
index d23f694c7f..5dce0e211a 100644
--- a/usr/src/lib/libcmd/common/logname.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/logname.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -50,7 +50,7 @@ USAGE_LICENSE
#include <cmd.h>
int
-b_logname(int argc, char** argv, void* context)
+b_logname(int argc, char** argv, Shbltin_t* context)
{
register char* logname;
diff --git a/usr/src/lib/libcmd/common/md5sum.c b/usr/src/contrib/ast/src/lib/libcmd/md5sum.c
index 28a1c435e4..bd0b25ffd1 100644
--- a/usr/src/lib/libcmd/common/md5sum.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/md5sum.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,7 +29,7 @@
#include <cmd.h>
int
-b_md5sum(int argc, register char** argv, void* context)
+b_md5sum(int argc, register char** argv, Shbltin_t* context)
{
return b_cksum(argc, argv, context);
}
diff --git a/usr/src/lib/libcmd/common/mkdir.c b/usr/src/contrib/ast/src/lib/libcmd/mkdir.c
index 491d990f64..bdd6ecfd1f 100644
--- a/usr/src/lib/libcmd/common/mkdir.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/mkdir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: mkdir (AT&T Research) 2009-12-03 $\n]"
+"[-?\n@(#)$Id: mkdir (AT&T Research) 2010-04-08 $\n]"
USAGE_LICENSE
"[+NAME?mkdir - make directories]"
"[+DESCRIPTION?\bmkdir\b creates one or more directories. By "
@@ -62,16 +62,17 @@ USAGE_LICENSE
#define DIRMODE (S_IRWXU|S_IRWXG|S_IRWXO)
int
-b_mkdir(int argc, char** argv, void* context)
+b_mkdir(int argc, char** argv, Shbltin_t* context)
{
- register char* arg;
+ register char* path;
register int n;
register mode_t mode = DIRMODE;
register mode_t mask = 0;
register int mflag = 0;
register int pflag = 0;
register int vflag = 0;
- char* name;
+ int made;
+ char* part;
mode_t dmode;
struct stat st;
@@ -80,13 +81,11 @@ b_mkdir(int argc, char** argv, void* context)
{
switch (optget(argv, usage))
{
- case 0:
- break;
case 'm':
mflag = 1;
- mode = strperm(arg = opt_info.arg, &opt_info.arg, mode);
- if (*opt_info.arg)
- error(ERROR_exit(0), "%s: invalid mode", arg);
+ mode = strperm(opt_info.arg, &part, mode);
+ if (*part)
+ error(ERROR_exit(0), "%s: invalid mode", opt_info.arg);
continue;
case 'p':
pflag = 1;
@@ -96,10 +95,10 @@ b_mkdir(int argc, char** argv, void* context)
continue;
case ':':
error(2, "%s", opt_info.arg);
- continue;
+ break;
case '?':
error(ERROR_usage(2), "%s", opt_info.arg);
- continue;
+ break;
}
break;
}
@@ -120,60 +119,69 @@ b_mkdir(int argc, char** argv, void* context)
umask(mask);
mask = 0;
}
- while (arg = *argv++)
+ while (path = *argv++)
{
- if (mkdir(arg, mode) < 0)
+ if (!mkdir(path, mode))
+ {
+ if (vflag)
+ error(0, "%s: directory created", path);
+ made = 1;
+ }
+ else if (!pflag || !(errno == ENOENT || errno == EEXIST || errno == ENOTDIR))
+ {
+ error(ERROR_system(0), "%s:", path);
+ continue;
+ }
+ else if (errno == EEXIST)
+ continue;
+ else
{
- if (!pflag || !(errno == ENOENT || errno == EEXIST || errno == ENOTDIR))
- {
- error(ERROR_system(0), "%s:", arg);
- continue;
- }
- if (errno == EEXIST)
- continue;
-
/*
* -p option, preserve intermediates
* first eliminate trailing /'s
*/
- n = strlen(arg);
- while (n > 0 && arg[--n] == '/');
- arg[n + 1] = 0;
- for (name = arg, n = *arg; n;)
+ made = 0;
+ n = strlen(path);
+ while (n > 0 && path[--n] == '/');
+ path[n + 1] = 0;
+ for (part = path, n = *part; n;)
{
/* skip over slashes */
- while (*arg == '/')
- arg++;
+ while (*part == '/')
+ part++;
/* skip to next component */
- while ((n = *arg) && n != '/')
- arg++;
- *arg = 0;
- if (mkdir(name, n ? dmode : mode) < 0 && errno != EEXIST && access(name, F_OK) < 0)
+ while ((n = *part) && n != '/')
+ part++;
+ *part = 0;
+ if (mkdir(path, n ? dmode : mode) < 0 && errno != EEXIST && access(path, F_OK) < 0)
{
- *arg = n;
- error(ERROR_system(0), "%s:", name);
+ error(ERROR_system(0), "%s: cannot create intermediate directory", path);
+ *part = n;
break;
}
if (vflag)
- error(0, "%s: directory created", name);
- if (!(*arg = n) && (mode & (S_ISVTX|S_ISUID|S_ISGID)))
+ error(0, "%s: directory created", path);
+ if (!(*part = n))
{
- if (stat(name, &st))
- {
- error(ERROR_system(0), "%s: cannot stat", name);
- break;
- }
- if ((st.st_mode & (S_ISVTX|S_ISUID|S_ISGID)) != (mode & (S_ISVTX|S_ISUID|S_ISGID)) && chmod(name, mode))
- {
- error(ERROR_system(0), "%s: cannot change mode from %s to %s", name, fmtperm(st.st_mode & (S_ISVTX|S_ISUID|S_ISGID)), fmtperm(mode));
- break;
- }
+ made = 1;
+ break;
}
}
}
- else if (vflag)
- error(0, "%s: directory created", arg);
+ if (made && (mode & (S_ISVTX|S_ISUID|S_ISGID)))
+ {
+ if (stat(path, &st))
+ {
+ error(ERROR_system(0), "%s: cannot stat", path);
+ break;
+ }
+ if ((st.st_mode & (S_ISVTX|S_ISUID|S_ISGID)) != (mode & (S_ISVTX|S_ISUID|S_ISGID)) && chmod(path, mode))
+ {
+ error(ERROR_system(0), "%s: cannot change mode from %s to %s", path, fmtperm(st.st_mode & (S_ISVTX|S_ISUID|S_ISGID)), fmtperm(mode));
+ break;
+ }
+ }
}
if (mask)
umask(mask);
diff --git a/usr/src/lib/libcmd/common/mkfifo.c b/usr/src/contrib/ast/src/lib/libcmd/mkfifo.c
index f44e10aa01..25861a13e1 100644
--- a/usr/src/lib/libcmd/common/mkfifo.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/mkfifo.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -50,7 +50,7 @@ USAGE_LICENSE
#include <ls.h>
int
-b_mkfifo(int argc, char *argv[], void* context)
+b_mkfifo(int argc, char** argv, Shbltin_t* context)
{
register char* arg;
register mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;
@@ -62,8 +62,6 @@ b_mkfifo(int argc, char *argv[], void* context)
{
switch (optget(argv, usage))
{
- case 0:
- break;
case 'm':
mflag = 1;
mode = strperm(arg = opt_info.arg, &opt_info.arg, mode);
@@ -72,10 +70,10 @@ b_mkfifo(int argc, char *argv[], void* context)
continue;
case ':':
error(2, "%s", opt_info.arg);
- continue;
+ break;
case '?':
error(ERROR_usage(2), "%s", opt_info.arg);
- continue;
+ break;
}
break;
}
diff --git a/usr/src/lib/libcmd/common/mktemp.c b/usr/src/contrib/ast/src/lib/libcmd/mktemp.c
index a9444045de..d95f86463e 100644
--- a/usr/src/lib/libcmd/common/mktemp.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/mktemp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -64,7 +64,7 @@ USAGE_LICENSE
#include <ls.h>
int
-b_mktemp(int argc, char** argv, void* context)
+b_mktemp(int argc, char** argv, Shbltin_t* context)
{
mode_t mode = 0;
mode_t mask;
@@ -83,8 +83,6 @@ b_mktemp(int argc, char** argv, void* context)
{
switch (optget(argv, usage))
{
- case 0:
- break;
case 'd':
fdp = 0;
continue;
@@ -115,10 +113,10 @@ b_mktemp(int argc, char** argv, void* context)
continue;
case ':':
error(2, "%s", opt_info.arg);
- continue;
+ break;
case '?':
error(ERROR_usage(2), "%s", opt_info.arg);
- continue;
+ break;
}
break;
}
diff --git a/usr/src/lib/libcmd/common/mv.c b/usr/src/contrib/ast/src/lib/libcmd/mv.c
index 1055a9c553..f282bdc9be 100644
--- a/usr/src/lib/libcmd/common/mv.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/mv.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,7 +29,7 @@
#include <cmd.h>
int
-b_mv(int argc, register char** argv, void* context)
+b_mv(int argc, register char** argv, Shbltin_t* context)
{
return b_cp(argc, argv, context);
}
diff --git a/usr/src/lib/libcmd/common/paste.c b/usr/src/contrib/ast/src/lib/libcmd/paste.c
index 0c20109dda..cb22e8ecfe 100644
--- a/usr/src/lib/libcmd/common/paste.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/paste.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,7 +29,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: paste (AT&T Research) 2009-11-28 $\n]"
+"[-?\n@(#)$Id: paste (AT&T Research) 2010-06-12 $\n]"
USAGE_LICENSE
"[+NAME?paste - merge lines of files]"
"[+DESCRIPTION?\bpaste\b concatenates the corresponding lines of a "
@@ -172,7 +172,7 @@ static int spaste(Sfio_t *in,register Sfio_t* out,register const char *delim,int
}
int
-b_paste(int argc,register char *argv[], void* context)
+b_paste(int argc, char** argv, Shbltin_t* context)
{
register int n, sflag=0;
register Sfio_t *fp, **streams;
@@ -184,19 +184,23 @@ b_paste(int argc,register char *argv[], void* context)
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
delim = 0;
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case 'd':
- delim = opt_info.arg;
- break;
- case 's':
- sflag++;
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
+ switch (optget(argv, usage))
+ {
+ case 'd':
+ delim = opt_info.arg;
+ continue;
+ case 's':
+ sflag++;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
+ break;
+ }
break;
}
argv += opt_info.index;
@@ -208,6 +212,8 @@ b_paste(int argc,register char *argv[], void* context)
delim[0] = '\t';
delim[1] = 0;
}
+ if (!(delim = strdup(delim)))
+ error(ERROR_system(1), "out of space");
dlen = dsiz = stresc(delim);
mp = 0;
if (mbwide())
@@ -223,7 +229,10 @@ b_paste(int argc,register char *argv[], void* context)
if(dlen < dsiz)
{
if (!(mp = newof(0, Delim_t, dlen, 0)))
+ {
+ free(delim);
error(ERROR_system(1), "out of space");
+ }
cp = delim;
dlen = 0;
while (cp < ep)
@@ -274,5 +283,6 @@ b_paste(int argc,register char *argv[], void* context)
}
if (mp)
free(mp);
+ free(delim);
return(error_info.errors);
}
diff --git a/usr/src/lib/libcmd/common/pathchk.c b/usr/src/contrib/ast/src/lib/libcmd/pathchk.c
index 6fafac4feb..0cba4bd2f9 100644
--- a/usr/src/lib/libcmd/common/pathchk.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/pathchk.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -228,7 +228,7 @@ static int pathchk(char* path, int mode)
}
int
-b_pathchk(int argc, char** argv, void* context)
+b_pathchk(int argc, char** argv, Shbltin_t* context)
{
register int mode = 0;
register char* s;
@@ -238,8 +238,6 @@ b_pathchk(int argc, char** argv, void* context)
{
switch (optget(argv, usage))
{
- case 0:
- break;
case 'a':
mode |= COMPONENTS|PATH;
continue;
@@ -251,10 +249,10 @@ b_pathchk(int argc, char** argv, void* context)
continue;
case ':':
error(2, "%s", opt_info.arg);
- continue;
+ break;
case '?':
error(ERROR_usage(2), "%s", opt_info.arg);
- continue;
+ break;
}
break;
}
diff --git a/usr/src/lib/libcmd/common/pids.c b/usr/src/contrib/ast/src/lib/libcmd/pids.c
index e88ac96ce3..638f3d3cc5 100644
--- a/usr/src/lib/libcmd/common/pids.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/pids.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -23,7 +23,7 @@
#define FORMAT "PID=%(pid)d PPID=%(ppid)d PGID=%(pgid)d TID=%(tid)d SID=%(sid)d"
static const char usage[] =
-"[-?\n@(#)$Id: pids (AT&T Research) 2008-04-01 $\n]"
+"[-?\n@(#)$Id: pids (AT&T Research) 2011-08-27 $\n]"
USAGE_LICENSE
"[+NAME?pids - list calling shell process ids]"
"[+DESCRIPTION?When invoked as a shell builtin, \bpids\b lists one or "
@@ -65,7 +65,7 @@ key(void* handle, Sffmt_t* fp, const char* arg, char** ps, Sflong_t* pn)
if (!(s = fp->t_str) || streq(s, "pid"))
*pn = getpid();
else if (streq(s, "pgid"))
- *pn = getpgid(0);
+ *pn = getpgrp();
else if (streq(s, "ppid"))
*pn = getppid();
else if (streq(s, "tid") || streq(s, "tty"))
@@ -76,7 +76,11 @@ key(void* handle, Sffmt_t* fp, const char* arg, char** ps, Sflong_t* pn)
*pn = tid;
}
else if (streq(s, "sid"))
+#if _lib_getsid
*pn = getsid(0);
+#else
+ *pn = -1;
+#endif
else if (streq(s, "format"))
*ps = (char*)handle;
else
@@ -88,7 +92,7 @@ key(void* handle, Sffmt_t* fp, const char* arg, char** ps, Sflong_t* pn)
}
int
-b_pids(int argc, char** argv, void* context)
+b_pids(int argc, char** argv, Shbltin_t* context)
{
char* format = 0;
@@ -102,10 +106,10 @@ b_pids(int argc, char** argv, void* context)
continue;
case '?':
error(ERROR_USAGE|4, "%s", opt_info.arg);
- continue;
+ break;
case ':':
error(2, "%s", opt_info.arg);
- continue;
+ break;
}
break;
}
diff --git a/usr/src/lib/libcmd/common/rev.c b/usr/src/contrib/ast/src/lib/libcmd/rev.c
index 5f0a98f4c7..98411204f5 100644
--- a/usr/src/lib/libcmd/common/rev.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/rev.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -88,7 +88,11 @@ static int rev_char(Sfio_t *in, Sfio_t *out)
cp += mbconv(cp, *--xp);
*cp++ = '\n';
if (sfwrite(out, bp, cp - bp) < 0)
+ {
+ if (wp)
+ free(wp);
return -1;
+ }
}
if (wp)
free(wp);
@@ -110,7 +114,7 @@ static int rev_char(Sfio_t *in, Sfio_t *out)
}
int
-b_rev(int argc, register char** argv, void* context)
+b_rev(int argc, register char** argv, Shbltin_t* context)
{
register Sfio_t *fp;
register char *cp;
@@ -118,16 +122,20 @@ b_rev(int argc, register char** argv, void* context)
NOT_USED(argc);
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case 'l':
- line=1;
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
+ switch (optget(argv, usage))
+ {
+ case 'l':
+ line=1;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
+ break;
+ }
break;
}
argv += opt_info.index;
diff --git a/usr/src/lib/libcmd/common/rev.h b/usr/src/contrib/ast/src/lib/libcmd/rev.h
index 2d37ede916..c71e6893cb 100644
--- a/usr/src/lib/libcmd/common/rev.h
+++ b/usr/src/contrib/ast/src/lib/libcmd/rev.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libcmd/common/revlib.c b/usr/src/contrib/ast/src/lib/libcmd/revlib.c
index 90b44a0128..afddbe987b 100644
--- a/usr/src/lib/libcmd/common/revlib.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/revlib.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libcmd/common/rm.c b/usr/src/contrib/ast/src/lib/libcmd/rm.c
index dfcb13f3fc..0ae46308e4 100644
--- a/usr/src/lib/libcmd/common/rm.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/rm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: rm (AT&T Research) 2009-06-18 $\n]"
+"[-?\n@(#)$Id: rm (AT&T Research) 2012-02-14 $\n]"
USAGE_LICENSE
"[+NAME?rm - remove files]"
"[+DESCRIPTION?\brm\b removes the named \afile\a arguments. By default it"
@@ -47,7 +47,8 @@ USAGE_LICENSE
" The caller requires sufficient privilege, not to mention a strong"
" constitution, to use this option. Even though the directory must"
" not be empty, \brm\b still attempts to empty it before removal.]"
-"[f:force?Ignore nonexistent files and never prompt the user.]"
+"[f:force?Ignore nonexistent files, ignore no file operands specified,"
+" and never prompt the user.]"
"[i:interactive|prompt?Prompt whether to remove each file."
" An affirmative response (\by\b or \bY\b) removes the file, a quit"
" response (\bq\b or \bQ\b) causes \brm\b to exit immediately, and"
@@ -81,7 +82,7 @@ USAGE_LICENSE
typedef struct State_s /* program state */
{
- void* context; /* builtin context */
+ Shbltin_t* context; /* builtin context */
int clobber; /* clear out file data first */
int directory; /* remove(dir) not rmdir(dir) */
int force; /* force actions */
@@ -122,6 +123,8 @@ rm(State_t* state, register FTSENT* ent)
case FTS_DNX:
if (state->unconditional)
{
+ if (!beenhere(ent))
+ break;
if (!chmod(ent->fts_name, (ent->fts_statp->st_mode & S_IPERM)|S_IRWXU))
{
fts_set(NiL, ent, FTS_AGAIN);
@@ -156,7 +159,7 @@ rm(State_t* state, register FTSENT* ent)
}
if (!beenhere(ent))
{
- if (state->unconditional && (ent->fts_statp->st_mode ^ S_IRWXU))
+ if (state->unconditional && (ent->fts_statp->st_mode & S_IRWXU) != S_IRWXU)
chmod(path, (ent->fts_statp->st_mode & S_IPERM)|S_IRWXU);
if (ent->fts_level > 0)
{
@@ -262,38 +265,26 @@ rm(State_t* state, register FTSENT* ent)
break;
}
}
- else if (!state->force && state->terminal && S_ISREG(ent->fts_statp->st_mode))
+ else if (!(ent->fts_info & FTS_SL) && !state->force && state->terminal && eaccess(path, W_OK))
{
- if ((n = open(path, O_RDWR)) < 0)
- {
- if (
-#ifdef ENOENT
- errno != ENOENT &&
-#endif
-#ifdef EROFS
- errno != EROFS &&
-#endif
- (v = astquery(-1, "override protection %s for %s? ",
+ if ((v = astquery(-1, "override protection %s for %s? ",
#ifdef ETXTBSY
- errno == ETXTBSY ? "``running program''" :
+ errno == ETXTBSY ? "``running program''" :
#endif
- ent->fts_statp->st_uid != state->uid ? "``not owner''" :
- fmtmode(ent->fts_statp->st_mode & S_IPERM, 0) + 1, ent->fts_path)) < 0 ||
- sh_checksig(state->context))
- return -1;
- if (v > 0)
- {
- nonempty(ent);
- break;
- }
+ ent->fts_statp->st_uid != state->uid ? "``not owner''" :
+ fmtmode(ent->fts_statp->st_mode & S_IPERM, 0) + 1, ent->fts_path)) < 0 ||
+ sh_checksig(state->context))
+ return -1;
+ if (v > 0)
+ {
+ nonempty(ent);
+ break;
}
- else
- close(n);
}
#if _lib_fsync
if (state->clobber && S_ISREG(ent->fts_statp->st_mode) && ent->fts_statp->st_size > 0)
{
- if ((n = open(path, O_WRONLY)) < 0)
+ if ((n = open(path, O_WRONLY|O_cloexec)) < 0)
error(ERROR_SYSTEM|2, "%s: cannot clear data", ent->fts_path);
else
{
@@ -336,7 +327,7 @@ rm(State_t* state, register FTSENT* ent)
}
int
-b_rm(int argc, register char** argv, void* context)
+b_rm(int argc, register char** argv, Shbltin_t* context)
{
State_t state;
FTS* fts;
@@ -382,18 +373,20 @@ b_rm(int argc, register char** argv, void* context)
continue;
case '?':
error(ERROR_USAGE|4, "%s", opt_info.arg);
- continue;
+ break;
case ':':
error(2, "%s", opt_info.arg);
- continue;
+ break;
}
break;
}
argv += opt_info.index;
if (*argv && streq(*argv, "-") && !streq(*(argv - 1), "--"))
argv++;
- if (error_info.errors || !*argv)
+ if (error_info.errors || !*argv && !state.force)
error(ERROR_USAGE|4, "%s", optusage(NiL));
+ if (!*argv)
+ return 0;
/*
* do it
diff --git a/usr/src/lib/libcmd/common/rmdir.c b/usr/src/contrib/ast/src/lib/libcmd/rmdir.c
index b57eebb60b..f03b99b2b2 100644
--- a/usr/src/lib/libcmd/common/rmdir.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/rmdir.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -54,7 +54,7 @@ USAGE_LICENSE
#include <cmd.h>
int
-b_rmdir(int argc, char** argv, void* context)
+b_rmdir(int argc, char** argv, Shbltin_t* context)
{
register char* dir;
register char* end;
@@ -64,22 +64,26 @@ b_rmdir(int argc, char** argv, void* context)
int sflag = 0;
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case 'e':
- eflag = 1;
- break;
- case 'p':
- pflag = 1;
- break;
- case 's':
- sflag = 1;
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
+ switch (optget(argv, usage))
+ {
+ case 'e':
+ eflag = 1;
+ continue;
+ case 'p':
+ pflag = 1;
+ continue;
+ case 's':
+ sflag = 1;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
+ break;
+ }
break;
}
argv += opt_info.index;
diff --git a/usr/src/lib/libcmd/common/stty.c b/usr/src/contrib/ast/src/lib/libcmd/stty.c
index 1a696a78b4..9afcd58d81 100644
--- a/usr/src/lib/libcmd/common/stty.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/stty.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -26,35 +26,37 @@
*/
static const char usage[] =
-"[-?@(#)$Id: stty (AT&T Research) 2008-11-10 $\n]"
+"[-?@(#)$Id: stty (AT&T Research) 2010-04-01 $\n]"
USAGE_LICENSE
"[+NAME?stty - set or get terminal modes]"
"[+DESCRIPTION?\bstty\b sets certain terminal I/O modes for the device "
- "that is the current standard input; without arguments, it writes "
- "the settings of certain modes to standard output.]"
-
+ "that is the current standard input; without arguments, it writes the "
+ "settings of certain modes to standard output.]"
"[a:all?Writes to standard output all of the mode settings.]"
-"[g:save?Writes the current settings to standard output in a form that can "
- "be used as an argument to another \bstty\b command. The \brows\b "
- "and \bcolumns\b values are not included.]"
-"[t:terminal-group?Print the terminal group id of the device, -1 if unknown.]"
+"[f|F:fd|file?Use \afd\a as the terminal fd.]#[fd:=0]"
+"[g:save?Writes the current settings to standard output in a form that "
+ "can be used as an argument to another \bstty\b command. The \brows\b "
+ "and \bcolumns\b values are not included.]"
+"[t:terminal-group?Print the terminal group id of the device, -1 if "
+ "unknown.]"
"\n"
"\n[mode ...]\n"
"\n"
"[+EXTENDED DESCRIPTION?Modes are specified either as a single name or "
- "as a name followed by a value. As indicated below, many of the "
- "mode names can be preceded by a \b-\b to negate its meaning. "
- "Modes are listed by group corresponding to field in the "
- "\btermios\b structure defined in \b<termios.h>\b. Modes "
- "in the last group are implemented using options in the previous "
- "groups. Note that many combinations of modes make no sense, but "
- "no sanity checking is performed. The modes are selected from the "
- "following:]{\fabc\f}"
-
-"[+EXIT STATUS?]{"
- "[+0?All modes reported or set successfully.]"
- "[+>0?Standard input not a terminaol or one or more modes failed.]"
-"}"
+ "as a name followed by a value. As indicated below, many of the mode "
+ "names can be preceded by a \b-\b to negate its meaning. Modes are "
+ "listed by group corresponding to field in the \btermios\b structure "
+ "defined in \b<termios.h>\b. Modes in the last group are implemented "
+ "using options in the previous groups. Note that many combinations of "
+ "modes make no sense, but no sanity checking is performed. The modes are "
+ "selected from the following:]"
+ "{\fabc\f}"
+"[+EXIT STATUS?]"
+ "{"
+ "[+0?All modes reported or set successfully.]"
+ "[+>0?Standard input not a terminaol or one or more modes "
+ "failed.]"
+ "}"
"[+SEE ALSO?\btegetattr\b(2), \btcsetattr\b(2), \bioctl\b(2)]"
;
@@ -894,17 +896,16 @@ static int infof(Opt_t* op, Sfio_t* sp, const char* s, Optdisc_t* dp)
#endif /* _lib_tcgetpgrp */
int
-b_stty(int argc, char** argv, void* context)
+b_stty(int argc, char** argv, Shbltin_t* context)
{
struct termios tty;
register int n;
register int flags = 0;
+ int fd = 0;
const Tty_t* tp;
Optdisc_t disc;
cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_INTERACTIVE);
- if (tcgetattr(0, &tty) < 0)
- error(ERROR_system(1),"not a tty");
memset(&disc, 0, sizeof(disc));
disc.version = OPT_VERSION;
disc.infof = infof;
@@ -913,6 +914,9 @@ b_stty(int argc, char** argv, void* context)
{
switch (n = optget(argv, usage))
{
+ case 'f':
+ fd = (int)opt_info.num;
+ continue;
case 'a':
case 'g':
case 't':
@@ -948,6 +952,8 @@ b_stty(int argc, char** argv, void* context)
argv += opt_info.index;
if (error_info.errors || (flags && *argv) || (flags&(flags-1)))
error(ERROR_usage(2), "%s", optusage(NiL));
+ if (tcgetattr(fd, &tty) < 0)
+ error(ERROR_system(1), "not a tty");
if (flags & T_FLAG)
sfprintf(sfstdout, "%d\n", tcgetpgrp(0));
else if (*argv)
diff --git a/usr/src/lib/libcmd/common/sum.c b/usr/src/contrib/ast/src/lib/libcmd/sum.c
index 9f26249153..64c6c9edd9 100644
--- a/usr/src/lib/libcmd/common/sum.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/sum.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -29,7 +29,7 @@
#include <cmd.h>
int
-b_sum(int argc, register char** argv, void* context)
+b_sum(int argc, register char** argv, Shbltin_t* context)
{
return b_cksum(argc, argv, context);
}
diff --git a/usr/src/lib/libcmd/common/sync.c b/usr/src/contrib/ast/src/lib/libcmd/sync.c
index 16ccfeb718..0531725183 100644
--- a/usr/src/lib/libcmd/common/sync.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/sync.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -51,7 +51,7 @@ USAGE_LICENSE
#include <ls.h>
int
-b_sync(int argc, char** argv, void* context)
+b_sync(int argc, char** argv, Shbltin_t* context)
{
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
for (;;)
diff --git a/usr/src/lib/libcmd/common/tail.c b/usr/src/contrib/ast/src/lib/libcmd/tail.c
index b65ec1a9f3..ce52f9f3d6 100644
--- a/usr/src/lib/libcmd/common/tail.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/tail.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -28,7 +28,7 @@
*/
static const char usage[] =
-"+[-?\n@(#)$Id: tail (AT&T Research) 2010-03-23 $\n]"
+"+[-?\n@(#)$Id: tail (AT&T Research) 2012-06-19 $\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 "
@@ -102,7 +102,7 @@ USAGE_LICENSE
#include <cmd.h>
#include <ctype.h>
#include <ls.h>
-#include <tm.h>
+#include <tv.h>
#include <rev.h>
#define COUNT (1<<0)
@@ -267,8 +267,6 @@ init(Tail_t* tp, Sfoff_t number, int delim, int flags, const char** format)
if (tp->sp == sfstdin)
tp->sp = 0;
}
- else if (!number)
- offset = 0;
else
offset = 1;
if (!tp->name || streq(tp->name, "-"))
@@ -400,7 +398,7 @@ num(register const char* s, char** e, int* f, int o)
}
int
-b_tail(int argc, char** argv, void* context)
+b_tail(int argc, char** argv, Shbltin_t* context)
{
register Sfio_t* ip;
register int n;
@@ -424,6 +422,7 @@ b_tail(int argc, char** argv, void* context)
register Tail_t* pp;
register Tail_t* hp;
Tail_t* files;
+ Tv_t tv;
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
for (;;)
@@ -634,12 +633,17 @@ b_tail(int argc, char** argv, void* context)
pp->next = 0;
hp = 0;
n = 1;
+ tv.tv_sec = 1;
+ tv.tv_nsec = 0;
while (fp = files)
{
if (n)
n = 0;
- else
- sleep(1);
+ else if (sh_checksig(context) || tvsleep(&tv, NiL))
+ {
+ error_info.errors++;
+ break;
+ }
pp = 0;
while (fp)
{
@@ -682,7 +686,11 @@ b_tail(int argc, char** argv, void* context)
{
i = 3;
while (--i && stat(fp->name, &st))
- sleep(1);
+ if (sh_checksig(context) || tvsleep(&tv, NiL))
+ {
+ error_info.errors++;
+ goto done;
+ }
if (i && (fp->dev != st.st_dev || fp->ino != st.st_ino) && !init(fp, 0, 0, flags, &format))
{
if (!(flags & SILENT))
@@ -709,6 +717,10 @@ b_tail(int argc, char** argv, void* context)
if (sfsync(sfstdout))
error(ERROR_system(1), "write error");
}
+ done:
+ for (fp = files; fp; fp = fp->next)
+ if (fp->sp && fp->sp != sfstdin)
+ sfclose(fp->sp);
}
else
{
@@ -769,7 +781,7 @@ b_tail(int argc, char** argv, void* context)
}
if (ip != sfstdin)
sfclose(ip);
- } while (file = *argv++);
+ } while ((file = *argv++) && !sh_checksig(context));
}
return error_info.errors != 0;
}
diff --git a/usr/src/lib/libcmd/common/tee.c b/usr/src/contrib/ast/src/lib/libcmd/tee.c
index 89eb57457f..b3247a35aa 100644
--- a/usr/src/lib/libcmd/common/tee.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/tee.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -27,7 +27,7 @@
*/
static const char usage[] =
-"[-?\n@(#)$Id: tee (AT&T Research) 2009-06-19 $\n]"
+"[-?\n@(#)$Id: tee (AT&T Research) 2012-05-31 $\n]"
USAGE_LICENSE
"[+NAME?tee - duplicate standard input]"
"[+DESCRIPTION?\btee\b copies standard input to standard output "
@@ -107,10 +107,10 @@ tee_cleanup(register Tee_t* tp)
}
int
-b_tee(int argc, register char** argv, void* context)
+b_tee(int argc, register char** argv, Shbltin_t* context)
{
register Tee_t* tp = 0;
- register int oflag = O_WRONLY|O_TRUNC|O_CREAT|O_BINARY;
+ register int oflag = O_WRONLY|O_TRUNC|O_CREAT|O_BINARY|O_cloexec;
register int* hp;
register char* cp;
int line;
@@ -177,7 +177,9 @@ b_tee(int argc, register char** argv, void* context)
hp = tp->fd;
while (cp = *argv++)
{
- if ((*hp = open(cp, oflag, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0)
+ while ((*hp = open(cp, oflag, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0 && errno == EINTR)
+ errno = 0;
+ if (*hp < 0)
error(ERROR_system(0), "%s: cannot create", cp);
else
hp++;
@@ -193,7 +195,7 @@ b_tee(int argc, register char** argv, void* context)
else
error(ERROR_exit(0), "out of space");
}
- if ((sfmove(sfstdin, sfstdout, SF_UNBOUND, -1) < 0 || !sfeof(sfstdin)) && errno != EPIPE)
+ if ((sfmove(sfstdin, sfstdout, SF_UNBOUND, -1) < 0 || !sfeof(sfstdin)) && !ERROR_PIPE(errno) && errno != EINTR)
error(ERROR_system(0), "read error");
if (sfsync(sfstdout))
error(ERROR_system(0), "write error");
diff --git a/usr/src/lib/libcmd/common/tty.c b/usr/src/contrib/ast/src/lib/libcmd/tty.c
index 684838578e..f5e6acaea3 100644
--- a/usr/src/lib/libcmd/common/tty.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/tty.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -54,25 +54,33 @@ USAGE_LICENSE
#endif
int
-b_tty(int argc, char *argv[], void* context)
+b_tty(int argc, char** argv, Shbltin_t* context)
{
- register int n,sflag=0,lflag=0;
- register char *tty;
+ register int sflag = 0;
+ register int lflag = 0;
+ register char* tty;
+#if _mac_STWLINE
+ int n;
+#endif
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case 'l':
- lflag++;
- break;
- case 's':
- sflag++;
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
+ switch (optget(argv, usage))
+ {
+ case 'l':
+ lflag++;
+ continue;
+ case 's':
+ sflag++;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
+ break;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
+ break;
+ }
break;
}
if(error_info.errors)
@@ -87,7 +95,7 @@ b_tty(int argc, char *argv[], void* context)
if(lflag)
{
#if _mac_STWLINE
- if (n = ioctl(0, STWLINE, 0)) >= 0)
+ if ((n = ioctl(0, STWLINE, 0)) >= 0)
error(ERROR_OUTPUT, 1, "synchronous line %d", n);
else
#endif
diff --git a/usr/src/lib/libcmd/common/uname.c b/usr/src/contrib/ast/src/lib/libcmd/uname.c
index 88ceec400d..4412ebcb6c 100644
--- a/usr/src/lib/libcmd/common/uname.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/uname.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -249,7 +249,7 @@ uname(register struct utsname* ut)
} while (0)
int
-b_uname(int argc, char** argv, void* context)
+b_uname(int argc, char** argv, Shbltin_t* context)
{
register long flags = 0;
register int sep = 0;
@@ -435,7 +435,7 @@ b_uname(int argc, char** argv, void* context)
#if _lib_gethostid
sfsprintf(s = buf, sizeof(buf), "%08x", gethostid());
#else
- /*NOP*/;
+ {/*NOP*/};
#endif
output(OPT_hostid, s, "hostid");
}
@@ -451,7 +451,7 @@ b_uname(int argc, char** argv, void* context)
#if _lib_getdomainname
getdomainname(s, sizeof(buf));
#else
- /*NOP*/;
+ {/*NOP*/};
#endif
output(OPT_domain, s, "domain");
}
diff --git a/usr/src/lib/libcmd/common/uniq.c b/usr/src/contrib/ast/src/lib/libcmd/uniq.c
index 78fee1c603..1336acd487 100644
--- a/usr/src/lib/libcmd/common/uniq.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/uniq.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -243,9 +243,9 @@ static int uniq(Sfio_t *fdin, Sfio_t *fdout, int fields, int chars, int width, i
}
int
-b_uniq(int argc, char** argv, void* context)
+b_uniq(int argc, char** argv, Shbltin_t* context)
{
- register int n, mode=0;
+ register int mode=0;
register char *cp;
int fields=0, chars=0, width=-1;
Sfio_t *fpin, *fpout;
@@ -254,53 +254,57 @@ b_uniq(int argc, char** argv, void* context)
Compare_f compare = (Compare_f)memcmp;
cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
+ for (;;)
{
- case 'c':
- mode |= C_FLAG;
- break;
- case 'd':
- mode |= D_FLAG;
- break;
- case 'D':
- mode |= D_FLAG;
- switch ((int)opt_info.num)
+ switch (optget(argv, usage))
{
- case 'p':
- sep = 1;
- break;
+ case 'c':
+ mode |= C_FLAG;
+ continue;
+ case 'd':
+ mode |= D_FLAG;
+ continue;
+ case 'D':
+ mode |= D_FLAG;
+ switch ((int)opt_info.num)
+ {
+ case 'p':
+ sep = 1;
+ break;
+ case 's':
+ sep = 0;
+ break;
+ default:
+ sep = -1;
+ break;
+ }
+ all = &sep;
+ continue;
+ case 'i':
+ compare = (Compare_f)strncasecmp;
+ continue;
+ case 'u':
+ mode |= U_FLAG;
+ continue;
+ case 'f':
+ if(*opt_info.option=='-')
+ fields = opt_info.num;
+ else
+ chars = opt_info.num;
+ continue;
case 's':
- sep = 0;
+ chars = opt_info.num;
+ continue;
+ case 'w':
+ width = opt_info.num;
+ continue;
+ case ':':
+ error(2, "%s", opt_info.arg);
break;
- default:
- sep = -1;
+ case '?':
+ error(ERROR_usage(2), "%s", opt_info.arg);
break;
}
- all = &sep;
- break;
- case 'i':
- compare = (Compare_f)strncasecmp;
- break;
- case 'u':
- mode |= U_FLAG;
- break;
- case 'f':
- if(*opt_info.option=='-')
- fields = opt_info.num;
- else
- chars = opt_info.num;
- break;
- case 's':
- chars = opt_info.num;
- break;
- case 'w':
- width = opt_info.num;
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
break;
}
argv += opt_info.index;
diff --git a/usr/src/lib/libcmd/common/vmstate.c b/usr/src/contrib/ast/src/lib/libcmd/vmstate.c
index 79722972d2..81b05165a8 100644
--- a/usr/src/lib/libcmd/common/vmstate.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/vmstate.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -20,10 +20,10 @@
***********************************************************************/
#pragma prototyped
-#define FORMAT "region=%(region)p size=%(size)d segments=%(segments)d busy=(%(busy_size)d,%(busy_blocks)d,%(busy_max)d) free=(%(free_size)d,%(free_blocks)d,%(free_max)d)"
+#define FORMAT "region=%(region)p method=%(method)s flags=%(flags)s size=%(size)d segments=%(segments)d busy=(%(busy_size)d,%(busy_blocks)d,%(busy_max)d) free=(%(free_size)d,%(free_blocks)d,%(free_max)d)"
static const char usage[] =
-"[-?\n@(#)$Id: vmstate (AT&T Research) 2010-03-05 $\n]"
+"[-?\n@(#)$Id: vmstate (AT&T Research) 2010-04-08 $\n]"
USAGE_LICENSE
"[+NAME?vmstate - list the calling process vmalloc region state]"
"[+DESCRIPTION?When invoked as a shell builtin, \bvmstate\b lists the "
@@ -34,6 +34,8 @@ USAGE_LICENSE
"%[-+]][\awidth\a[.\aprecis\a[.\abase\a]]]]]](\aid\a)\achar\a. The "
"supported \aid\as are:]:[format:=" FORMAT "]"
"{"
+ "[+method?The vmalloc method name.]"
+ "[+flags?The vmalloc method flags.]"
"[+size?The total region size.]"
"[+segments?The number of segments in the region.]"
"[+busy_size?The total busy block size.]"
@@ -48,6 +50,7 @@ USAGE_LICENSE
#include <cmd.h>
#include <vmalloc.h>
+#include <sfdisc.h>
typedef struct State_s
{
@@ -81,6 +84,24 @@ key(void* handle, Sffmt_t* fp, const char* arg, char** ps, Sflong_t* pn)
*pn = state->vs.n_busy;
else if (streq(s, "busy_max"))
*pn = state->vs.m_busy;
+ else if (streq(s, "flags"))
+ {
+ *ps = s = fmtbuf(32);
+#ifdef VM_TRUST
+ if (state->vs.mode & VM_TRUST)
+ s = strcopy(s, "TRUST|");
+#endif
+ if (state->vs.mode & VM_TRACE)
+ s = strcopy(s, "TRACE|");
+ if (state->vs.mode & VM_DBCHECK)
+ s = strcopy(s, "DBCHECK|");
+ if (state->vs.mode & VM_DBABORT)
+ s = strcopy(s, "DBABORT|");
+ if (s > *ps)
+ *(s - 1) = 0;
+ else
+ strcpy(s, "0");
+ }
else if (streq(s, "free_size"))
*pn = state->vs.s_free;
else if (streq(s, "free_blocks"))
@@ -89,6 +110,21 @@ key(void* handle, Sffmt_t* fp, const char* arg, char** ps, Sflong_t* pn)
*pn = state->vs.m_free;
else if (streq(s, "format"))
*ps = (char*)state->format;
+ else if (streq(s, "method"))
+ {
+ if (state->vs.mode & VM_MTBEST)
+ *ps = "best";
+ else if (state->vs.mode & VM_MTPOOL)
+ *ps = "pool";
+ else if (state->vs.mode & VM_MTLAST)
+ *ps = "last";
+ else if (state->vs.mode & VM_MTDEBUG)
+ *ps = "debug";
+ else if (state->vs.mode & VM_MTPROFILE)
+ *ps = "profile";
+ else
+ *ps = "UNKNOWN";
+ }
else
{
error(2, "%s: unknown format identifier", s);
@@ -101,7 +137,6 @@ static int
visit(Vmalloc_t* vm, void* addr, size_t size, Vmdisc_t* disc, void* handle)
{
State_t* state = (State_t*)handle;
- Vmstat_t vs;
if (vm != state->vm)
{
@@ -113,7 +148,7 @@ visit(Vmalloc_t* vm, void* addr, size_t size, Vmdisc_t* disc, void* handle)
}
int
-b_vmstate(int argc, char** argv, void* context)
+b_vmstate(int argc, char** argv, Shbltin_t* context)
{
register int i;
State_t state;
@@ -129,10 +164,10 @@ b_vmstate(int argc, char** argv, void* context)
continue;
case '?':
error(ERROR_USAGE|4, "%s", opt_info.arg);
- continue;
+ break;
case ':':
error(2, "%s", opt_info.arg);
- continue;
+ break;
}
break;
}
diff --git a/usr/src/lib/libcmd/common/wc.c b/usr/src/contrib/ast/src/lib/libcmd/wc.c
index 7c988872db..42956a0b5b 100644
--- a/usr/src/lib/libcmd/common/wc.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/wc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -87,7 +87,7 @@ static void printout(register Wc_t *wp, register char *name,register int mode)
}
int
-b_wc(int argc,register char **argv, void* context)
+b_wc(int argc,register char **argv, Shbltin_t* context)
{
register char *cp;
register int mode=0, n;
diff --git a/usr/src/lib/libcmd/common/wc.h b/usr/src/contrib/ast/src/lib/libcmd/wc.h
index cb2a51ed5f..972767f175 100644
--- a/usr/src/lib/libcmd/common/wc.h
+++ b/usr/src/contrib/ast/src/lib/libcmd/wc.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libcmd/common/wclib.c b/usr/src/contrib/ast/src/lib/libcmd/wclib.c
index 77732723ab..e30acc7a6b 100644
--- a/usr/src/lib/libcmd/common/wclib.c
+++ b/usr/src/contrib/ast/src/lib/libcmd/wclib.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
+* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -18,6 +18,9 @@
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
+/*
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ */
#pragma prototyped
/*
* David Korn
@@ -341,6 +344,8 @@ int wc_count(Wc_t *wp, Sfio_t *fd, const char* file)
int xspace;
int wasspace = 1;
unsigned char* start;
+ int flagm = 0;
+
lastchar = 0;
start = (endbuff = side) + 1;
@@ -367,6 +372,7 @@ int wc_count(Wc_t *wp, Sfio_t *fd, const char* file)
if(mbc(lasttype))
{
c = lasttype;
+ flagm = 1;
goto mbyte;
}
if(!lasttype && spc(type[*cp]))
@@ -415,6 +421,18 @@ int wc_count(Wc_t *wp, Sfio_t *fd, const char* file)
skip = (c&7);
adjust += skip;
state = 0;
+ if (flagm == 1) {
+ flagm = 0;
+ oldc = *cp;
+ if (xspace && (
+ iswspace
+ (*cp)
+ == 1)) {
+ state
+ = 8;
+ }
+ continue;
+ }
if(skip==2 && (cp[-1]&0xc)==0 && (state=(cp[-1]&0x3)))
oldc = *cp;
else if(xspace && cp[-1]==0xc2)
diff --git a/usr/src/contrib/ast/src/lib/libdll/Makefile b/usr/src/contrib/ast/src/lib/libdll/Makefile
new file mode 100644
index 0000000000..1fdde57576
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libdll/Makefile
@@ -0,0 +1,17 @@
+:PACKAGE: ast
+
+LICENSE = since=1997,author=gsf
+
+CCFLAGS = $(CC.OPTIMIZE) $(CC.DLL)
+
+dll 1.0 :LIBRARY: dlfcn.c dllopen.c dllfind.c dllplug.c dll_lib.c \
+ dllnext.c dlllook.c dllscan.c dllcheck.c dllerror.c \
+ -ldl -ldld
+
+win32.i386-64 :NOOPTIMIZE: dllscan.c
+
+$(INCLUDEDIR) :INSTALLPROTO: dlldefs.h
+
+dlldefs.h :COPY: FEATURE/dll
+
+:: RELEASE
diff --git a/usr/src/contrib/ast/src/lib/libdll/Mamfile b/usr/src/contrib/ast/src/lib/libdll/Mamfile
new file mode 100644
index 0000000000..fbeea49a90
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libdll/Mamfile
@@ -0,0 +1,322 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+setv INSTALLROOT ../../..
+setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
+setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS ${mam_cc_DLL}
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+make dll
+make libdll.a archive
+make dll.req
+exec - set -
+exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c 1.${COTEMP}.c &&
+exec - x=`${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
+exec - {
+exec - case "" in
+exec - *?) echo " " ;;
+exec - esac
+exec - for i in dll dl dld ast
+exec - do case $i in
+exec - "dll"|dll)
+exec - ;;
+exec - *) if test -f ${INSTALLROOT}/lib/lib/$i
+exec - then y=`cat ${INSTALLROOT}/lib/lib/$i`
+exec - case $y in
+exec - *-?*) echo "" $y ;;
+exec - esac
+exec - continue
+exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a
+exec - then case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) continue ;;
+exec - esac
+exec - ;;
+exec - esac
+exec - fi
+exec - ;;
+exec - esac
+exec - echo " -l$i"
+exec - done
+exec - } > dll.req
+exec - rm -f 1.${COTEMP}.*
+done dll.req generated
+make dlfcn.o
+make dlfcn.c
+make dll.h implicit
+done dll.h dontcare virtual
+make xcoff.h implicit
+done xcoff.h dontcare virtual
+make dl.h implicit
+done dl.h dontcare virtual
+make ${PACKAGE_ast_INCLUDE}/error.h implicit
+make ${PACKAGE_ast_INCLUDE}/option.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare
+make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare
+make ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare
+done ${PACKAGE_ast_INCLUDE}/endian.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+make ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare
+done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare
+make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare
+done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
+done ${PACKAGE_ast_INCLUDE}/regex.h dontcare
+make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
+prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare
+done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare
+make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/option.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/error.h
+make dlldefs.h implicit
+make FEATURE/dll
+meta FEATURE/dll features/%>FEATURE/% features/dll dll
+make features/dll
+done features/dll
+bind -ldl dontcare
+bind -last
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdl} ${mam_libast} : run features/dll
+done FEATURE/dll generated
+exec - cmp 2>/dev/null -s FEATURE/dll dlldefs.h || { rm -f dlldefs.h; silent test -d . || mkdir .; cp FEATURE/dll dlldefs.h; }
+done dlldefs.h generated
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done dlfcn.c
+meta dlfcn.o %.c>%.o dlfcn.c dlfcn
+prev dlfcn.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dlfcn.c
+done dlfcn.o generated
+make dllopen.o
+make dllopen.c
+make dlllib.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev dlldefs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done dlllib.h
+done dllopen.c
+meta dllopen.o %.c>%.o dllopen.c dllopen
+prev dllopen.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllopen.c
+done dllopen.o generated
+make dllfind.o
+make dllfind.c
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev dlldefs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done dllfind.c
+meta dllfind.o %.c>%.o dllfind.c dllfind
+prev dllfind.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllfind.c
+done dllfind.o generated
+make dllplug.o
+make dllplug.c
+prev dlllib.h implicit
+done dllplug.c
+meta dllplug.o %.c>%.o dllplug.c dllplug
+prev dllplug.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllplug.c
+done dllplug.o generated
+make dll_lib.o
+make dll_lib.c
+prev dlllib.h implicit
+done dll_lib.c
+meta dll_lib.o %.c>%.o dll_lib.c dll_lib
+prev dll_lib.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dll_lib.c
+done dll_lib.o generated
+make dllnext.o
+make dllnext.c
+make rld_interface.h implicit
+done rld_interface.h dontcare virtual
+prev dlldefs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done dllnext.c
+meta dllnext.o %.c>%.o dllnext.c dllnext
+prev dllnext.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dllnext.c
+done dllnext.o generated
+make dlllook.o
+make dlllook.c
+prev dlldefs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done dlllook.c
+meta dlllook.o %.c>%.o dlllook.c dlllook
+prev dlllook.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dlllook.c
+done dlllook.o generated
+make dllscan.o
+make dllscan.c
+prev dlldefs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+make ${PACKAGE_ast_INCLUDE}/fts.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_mode.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/fts.h
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/cdt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/cdt.h
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done dllscan.c
+meta dllscan.o %.c>%.o dllscan.c dllscan
+prev dllscan.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} -I. -I${PACKAGE_ast_INCLUDE} -D_BLD_dll -D_PACKAGE_ast -c dllscan.c
+done dllscan.o generated
+make dllcheck.o
+make dllcheck.c
+prev dlllib.h implicit
+done dllcheck.c
+meta dllcheck.o %.c>%.o dllcheck.c dllcheck
+prev dllcheck.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllcheck.c
+done dllcheck.o generated
+make dllerror.o
+make dllerror.c
+prev dlllib.h implicit
+done dllerror.c
+meta dllerror.o %.c>%.o dllerror.c dllerror
+prev dllerror.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_dll -c dllerror.c
+done dllerror.o generated
+exec - ${AR} rc libdll.a dlfcn.o dllopen.o dllfind.o dllplug.o dll_lib.o dllnext.o dlllook.o dllscan.o dllcheck.o dllerror.o
+exec - (ranlib libdll.a) >/dev/null 2>&1 || true
+done libdll.a generated
+done dll virtual
+prev libdll.a archive
+make ${INSTALLROOT}/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib
+exec - then mkdir -p ${INSTALLROOT}/lib
+exec - fi
+done ${INSTALLROOT}/lib generated
+make ${INSTALLROOT}/lib/libdll.a archive
+prev ${INSTALLROOT}/lib
+prev libdll.a archive
+exec - test '' = 'libdll.a' || ${STDCMP} 2>/dev/null -s libdll.a ${INSTALLROOT}/lib/libdll.a || { ${STDMV} ${INSTALLROOT}/lib/libdll.a ${INSTALLROOT}/lib/libdll.a.old 2>/dev/null || true; ${STDCP} libdll.a ${INSTALLROOT}/lib/libdll.a ;}
+exec - (ranlib ${INSTALLROOT}/lib/libdll.a) >/dev/null 2>&1 || true
+done ${INSTALLROOT}/lib/libdll.a generated
+make ${INSTALLROOT}/lib/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib/lib
+exec - then mkdir -p ${INSTALLROOT}/lib/lib
+exec - fi
+done ${INSTALLROOT}/lib/lib generated
+make ${INSTALLROOT}/lib/lib/dll
+prev ${INSTALLROOT}/lib/lib
+prev dll.req
+exec - test '' = 'dll.req' || ${STDCMP} 2>/dev/null -s dll.req ${INSTALLROOT}/lib/lib/dll || { ${STDMV} ${INSTALLROOT}/lib/lib/dll ${INSTALLROOT}/lib/lib/dll.old 2>/dev/null || true; ${STDCP} dll.req ${INSTALLROOT}/lib/lib/dll ;}
+done ${INSTALLROOT}/lib/lib/dll generated
+make ${PACKAGE_ast_INCLUDE}
+exec - if silent test ! -d ${PACKAGE_ast_INCLUDE}
+exec - then mkdir -p ${PACKAGE_ast_INCLUDE}
+exec - fi
+done ${PACKAGE_ast_INCLUDE} generated
+make ${PACKAGE_ast_INCLUDE}/dlldefs.h
+prev ${PACKAGE_ast_INCLUDE}
+prev dlldefs.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1997,author=gsf' dlldefs.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/dlldefs.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/dlldefs.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/dlldefs.h generated
+done install virtual
+make test
+done test dontcare virtual
diff --git a/usr/src/lib/libdll/common/RELEASE b/usr/src/contrib/ast/src/lib/libdll/RELEASE
index 14edf74176..214029e607 100644
--- a/usr/src/lib/libdll/common/RELEASE
+++ b/usr/src/contrib/ast/src/lib/libdll/RELEASE
@@ -1,3 +1,13 @@
+12-07-25 add debug diagnostics
+11-10-11 dll_lib.c: add { dllnames() dll_lib() }
+10-10-20 dllscan.c: version arg "-" => 0
+10-10-19 dllplug.c: fix bug that wiped out dlopen() error message
+10-10-19 dllplug.c: un-localize lookup names (happens with cut and paste)
+10-10-19 dllscan.c: still no code for implicit libs missed by dlopen()
+10-08-02 dllplug.c: fix local path dllcheck() call
+10-05-28 dllplug.c: add dllplugin() with dllcheck() version check
+10-05-28 dllcheck.c: add dllcheck() to do plugin_version() checks
+10-05-28 dllerror.c: add dllerror(int retain) for dll*() and dl*() messages
09-11-17 dllscan.c: handle name[-.]version in dlsopen()
09-04-15 dllopen.c: add, use dllopen() internally to wrap dlopen()
08-05-12 dllscan.c: LIBSUFFIX==.dylib => default plugin version match 0.0
diff --git a/usr/src/lib/libdll/common/dlfcn.c b/usr/src/contrib/ast/src/lib/libdll/dlfcn.c
index f4238c6861..3abad2a988 100644
--- a/usr/src/lib/libdll/common/dlfcn.c
+++ b/usr/src/contrib/ast/src/lib/libdll/dlfcn.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1997-2010 AT&T Intellectual Property *
+* Copyright (c) 1997-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libdll/dll_lib.c b/usr/src/contrib/ast/src/lib/libdll/dll_lib.c
new file mode 100644
index 0000000000..377ba1b9e3
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libdll/dll_lib.c
@@ -0,0 +1,188 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1997-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * Glenn Fowler
+ * AT&T Research
+ */
+
+#include "dlllib.h"
+
+typedef void* (*Dll_lib_f)(const char*, void*, const char*);
+
+typedef struct Dll_lib_s
+{
+ struct Dll_lib_s* next;
+ Dll_lib_f libf;
+ char* path;
+ char base[1];
+} Dll_lib_t;
+
+/*
+ * split <name,base,type,opts> from name into names
+ */
+
+Dllnames_t*
+dllnames(const char* id, const char* name, Dllnames_t* names)
+{
+ char* s;
+ char* t;
+ char* b;
+ char* e;
+ size_t n;
+
+ n = strlen(id);
+ if (strneq(name, id, n) && (streq(name + n, "_s") || streq(name + n, "_t")))
+ return 0;
+ if (!names)
+ {
+ s = fmtbuf(sizeof(Dllnames_t*) + sizeof(names) - 1);
+ if (n = (s - (char*)0) % sizeof(names))
+ s += sizeof(names) - n;
+ names = (Dllnames_t*)s;
+ }
+
+ /*
+ * determine the base name
+ */
+
+ if ((s = strrchr(name, '/')) || (s = strrchr(name, '\\')))
+ s++;
+ else
+ s = (char*)name;
+ if (strneq(s, "lib", 3))
+ s += 3;
+ b = names->base = names->data;
+ e = b + sizeof(names->data) - 1;
+ t = s;
+ while (b < e && *t && *t != '.' && *t != '-' && *t != ':')
+ *b++ = *t++;
+ *b++ = 0;
+
+ /*
+ * determine the optional type
+ */
+
+ if (t = strrchr(s, ':'))
+ {
+ names->name = b;
+ while (b < e && s < t)
+ *b++ = *s++;
+ *b++ = 0;
+ names->type = b;
+ while (b < e && *++t)
+ *b++ = *t;
+ *b++ = 0;
+ }
+ else
+ {
+ names->name = (char*)name;
+ names->type = 0;
+ }
+ *(names->path = b) = 0;
+ names->opts = 0;
+ names->id = (char*)id;
+ return names;
+}
+
+/*
+ * return method pointer for <id,version> in names
+ */
+
+void*
+dll_lib(Dllnames_t* names, unsigned long version, Dllerror_f dllerrorf, void* disc)
+{
+ void* dll;
+ Dll_lib_t* lib;
+ Dll_lib_f libf;
+ ssize_t n;
+ char sym[64];
+
+ static Dll_lib_t* loaded;
+
+ if (!names)
+ return 0;
+
+ /*
+ * check if plugin already loaded
+ */
+
+ for (lib = loaded; lib; lib = lib->next)
+ if (streq(names->base, lib->base))
+ {
+ libf = lib->libf;
+ goto init;
+ }
+
+ /*
+ * load
+ */
+
+ if (!(dll = dllplugin(names->id, names->name, NiL, version, NiL, RTLD_LAZY, names->path, names->data + sizeof(names->data) - names->path)) && (streq(names->name, names->base) || !(dll = dllplugin(names->id, names->base, NiL, version, NiL, RTLD_LAZY, names->path, names->data + sizeof(names->data) - names->path))))
+ {
+ if (dllerrorf)
+ (*dllerrorf)(NiL, disc, 2, "%s: library not found", names->name);
+ else
+ errorf("dll", NiL, -1, "dll_lib: %s version %lu library not found", names->name, version);
+ return 0;
+ }
+
+ /*
+ * init
+ */
+
+ sfsprintf(sym, sizeof(sym), "%s_lib", names->id);
+ if (!(libf = (Dll_lib_f)dlllook(dll, sym)))
+ {
+ if (dllerrorf)
+ (*dllerrorf)(NiL, disc, 2, "%s: %s: initialization function not found in library", names->path, sym);
+ else
+ errorf("dll", NiL, -1, "dll_lib: %s version %lu initialization function %s not found in library", names->name, version, sym);
+ return 0;
+ }
+
+ /*
+ * add to the loaded list
+ */
+
+ if (lib = newof(0, Dll_lib_t, 1, (n = strlen(names->base)) + strlen(names->path) + 1))
+ {
+ lib->libf = libf;
+ strcpy(lib->base, names->base);
+ strcpy(lib->path = lib->base + n + 1, names->path);
+ lib->next = loaded;
+ loaded = lib;
+ errorf("dll", NiL, -1, "dll_lib: %s version %lu loaded from %s", names->name, version, lib->path);
+ }
+ init:
+ return (*libf)(names->path, disc, names->type);
+}
+
+/*
+ * return method pointer for <id,name,version>
+ */
+
+void*
+dllmeth(const char* id, const char* name, unsigned long version)
+{
+ Dllnames_t names;
+
+ return dll_lib(dllnames(id, name, &names), version, 0, 0);
+}
diff --git a/usr/src/contrib/ast/src/lib/libdll/dllcheck.c b/usr/src/contrib/ast/src/lib/libdll/dllcheck.c
new file mode 100644
index 0000000000..ed0923ba67
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libdll/dllcheck.c
@@ -0,0 +1,85 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1997-2012 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+/*
+ * Glenn Fowler
+ * AT&T Research
+ */
+
+#include "dlllib.h"
+
+/*
+ * return plugin version for dll
+ * 0 if there is none
+ * path!=0 enables library level diagnostics
+ */
+
+extern unsigned long
+dllversion(void* dll, const char* path)
+{
+ Dll_plugin_version_f pvf;
+
+ if (pvf = (Dll_plugin_version_f)dlllook(dll, "plugin_version"))
+ return (*pvf)();
+ if (path)
+ {
+ state.error = 1;
+ sfsprintf(state.errorbuf, sizeof(state.errorbuf), "plugin_version() not found");
+ errorf("dll", NiL, 1, "dllversion: %s: %s", path, state.errorbuf);
+ }
+ return 0;
+}
+
+/*
+ * check if dll on path has plugin version >= ver
+ * 1 returned on success, 0 on failure
+ * path!=0 enables library level diagnostics
+ * cur!=0 gets actual version
+ */
+
+extern int
+dllcheck(void* dll, const char* path, unsigned long ver, unsigned long* cur)
+{
+ unsigned long v;
+
+ state.error = 0;
+ if (ver || cur)
+ {
+ v = dllversion(dll, path);
+ if (cur)
+ *cur = v;
+ }
+ if (!ver)
+ return 1;
+ if (!v)
+ return 0;
+ if (v < ver)
+ {
+ if (path)
+ {
+ state.error = 1;
+ sfsprintf(state.errorbuf, sizeof(state.errorbuf), "plugin version %lu older than caller %lu", v, ver);
+ errorf("dll", NiL, 1, "dllcheck: %s: %s", path, state.errorbuf);
+ }
+ return 0;
+ }
+ errorf("dll", NiL, -1, "dllversion: %s: %lu >= %lu", path, v, ver);
+ return 1;
+}
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_namval.h b/usr/src/contrib/ast/src/lib/libdll/dllerror.c
index 49e777be1d..dd0278d0de 100644
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_namval.h
+++ b/usr/src/contrib/ast/src/lib/libdll/dllerror.c
@@ -1,42 +1,52 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
+* Copyright (c) 1997-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
- *
- * common name-value struct support
*/
-#ifndef _NAMVAL_H
-#define _NAMVAL_H
+#include "dlllib.h"
-typedef struct
+Dllstate_t state;
+
+/*
+ * return error message from last failed dl*() call
+ * retain==0 resets the last dl*() error
+ */
+
+extern char*
+dllerror(int retain)
{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
+ char* s;
-#endif
+ if (state.error)
+ {
+ state.error = retain;
+ return state.errorbuf;
+ }
+ s = dlerror();
+ if (retain)
+ {
+ state.error = retain;
+ sfsprintf(state.errorbuf, sizeof(state.errorbuf), "%s", s);
+ }
+ return s;
+}
diff --git a/usr/src/lib/libdll/common/dllfind.c b/usr/src/contrib/ast/src/lib/libdll/dllfind.c
index 536f73a3cd..6446663f0a 100644
--- a/usr/src/lib/libdll/common/dllfind.c
+++ b/usr/src/contrib/ast/src/lib/libdll/dllfind.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1997-2010 AT&T Intellectual Property *
+* Copyright (c) 1997-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libdll/dlllib.h b/usr/src/contrib/ast/src/lib/libdll/dlllib.h
new file mode 100644
index 0000000000..c5fb1ab16f
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libdll/dlllib.h
@@ -0,0 +1,34 @@
+/***********************************************************************
+* *
+* This software is part of the ast package *
+* Copyright (c) 1997-2011 AT&T Intellectual Property *
+* and is licensed under the *
+* Eclipse Public License, Version 1.0 *
+* by AT&T Intellectual Property *
+* *
+* A copy of the License is available at *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
+* *
+* Information and Software Systems Research *
+* AT&T Research *
+* Florham Park NJ *
+* *
+* Glenn Fowler <gsf@research.att.com> *
+* *
+***********************************************************************/
+#pragma prototyped
+
+#include <ast.h>
+#include <dlldefs.h>
+#include <error.h>
+
+#define state _dll_state
+
+typedef struct Dllstate_s
+{
+ int error;
+ char errorbuf[128];
+} Dllstate_t;
+
+extern Dllstate_t state;
diff --git a/usr/src/lib/libdll/common/dlllook.c b/usr/src/contrib/ast/src/lib/libdll/dlllook.c
index f9d8e03267..15688d7bcc 100644
--- a/usr/src/lib/libdll/common/dlllook.c
+++ b/usr/src/contrib/ast/src/lib/libdll/dlllook.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1997-2010 AT&T Intellectual Property *
+* Copyright (c) 1997-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -24,6 +24,7 @@
*/
#include <ast.h>
+#include <error.h>
#include <dlldefs.h>
/*
@@ -40,7 +41,9 @@ dlllook(void* dll, const char* name)
{
buf[0] = '_';
strcpy(buf + 1, name);
- addr = dlsym(dll, buf);
+ name = (const char*)buf;
+ addr = dlsym(dll, name);
}
+ errorf("dll", NiL, -1, "dlllook: %s addr %p", name, addr);
return addr;
}
diff --git a/usr/src/lib/libdll/common/dllnext.c b/usr/src/contrib/ast/src/lib/libdll/dllnext.c
index 178a053d52..9e81c4ab26 100644
--- a/usr/src/lib/libdll/common/dllnext.c
+++ b/usr/src/contrib/ast/src/lib/libdll/dllnext.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1997-2010 AT&T Intellectual Property *
+* Copyright (c) 1997-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libdll/common/dllopen.c b/usr/src/contrib/ast/src/lib/libdll/dllopen.c
index f0a0609bd6..0fac2d0b1c 100644
--- a/usr/src/lib/libdll/common/dllopen.c
+++ b/usr/src/contrib/ast/src/lib/libdll/dllopen.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1997-2010 AT&T Intellectual Property *
+* Copyright (c) 1997-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -23,9 +23,7 @@
* at&t research
*/
-#include <ast.h>
-#include <dlldefs.h>
-#include <error.h>
+#include "dlllib.h"
#if 0
@@ -70,6 +68,7 @@ dllopen(const char* name, int mode)
}
path = sfprints("%-.*s%s%c%s=%-.*s%s%s", len, dir, base, 0, info->env, len, dir, olibpath ? ":" : "", olibpath ? olibpath : "");
environ[0] = path + strlen(path) + 1;
+ state.error = 0;
dll = dlopen(path, mode);
if (environ == nenv)
environ = 0;
@@ -87,6 +86,7 @@ dllopen(const char* name, int mode)
void*
dllopen(const char* name, int mode)
{
+ state.error = 0;
return dlopen(name, mode);
}
diff --git a/usr/src/lib/libdll/common/dllplug.c b/usr/src/contrib/ast/src/lib/libdll/dllplug.c
index a4a623dced..63a6cefedc 100644
--- a/usr/src/lib/libdll/common/dllplug.c
+++ b/usr/src/contrib/ast/src/lib/libdll/dllplug.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1997-2010 AT&T Intellectual Property *
+* Copyright (c) 1997-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -23,9 +23,7 @@
* AT&T Research
*/
-#include <ast.h>
-#include <dlldefs.h>
-#include <error.h>
+#include "dlllib.h"
/*
* find and load lib plugin/module library name with optional version ver and dlopen() flags
@@ -35,14 +33,15 @@
*/
extern void*
-dllplug(const char* lib, const char* name, const char* ver, int flags, char* path, size_t size)
+dllplugin(const char* lib, const char* name, const char* ver, unsigned long rel, unsigned long* cur, int flags, char* path, size_t size)
{
void* dll;
+ int err;
int hit;
Dllscan_t* dls;
Dllent_t* dle;
- hit = 0;
+ err = hit = 0;
for (;;)
{
if (dls = dllsopen(lib, name, ver))
@@ -50,24 +49,78 @@ dllplug(const char* lib, const char* name, const char* ver, int flags, char* pat
while (dle = dllsread(dls))
{
hit = 1;
+#if 0
+ again:
+#endif
if (dll = dllopen(dle->path, flags|RTLD_GLOBAL|RTLD_PARENT))
{
+ if (!dllcheck(dll, dle->path, rel, cur))
+ {
+ err = state.error;
+ dlclose(dll);
+ dll = 0;
+ continue;
+ }
if (path && size)
- strncopy(path, dle->path, size);
+ strlcpy(path, dle->path, size);
break;
}
else
- errorf("dll", NiL, 1, "%s: dlopen failed: %s", dle->path, dlerror());
+ {
+#if 0
+ /*
+ * dlopen() should load implicit libraries
+ * this code does that
+ * but it doesn't help on galadriel
+ */
+
+ char* s;
+ char* e;
+
+ if ((s = dllerror(1)) && (e = strchr(s, ':')))
+ {
+ *e = 0;
+ error(1, "AHA %s implicit", s);
+ dll = dllplugin(lib, s, 0, 0, 0, flags, path, size);
+ *e = ':';
+ if (dll)
+ {
+ error(1, "AHA implicit %s => %s", s, path);
+ goto again;
+ }
+ }
+#endif
+ errorf("dll", NiL, 1, "dllplugin: %s dlopen failed: %s", dle->path, dllerror(1));
+ err = state.error;
+ }
}
dllsclose(dls);
}
if (hit)
+ {
+ if (!dll)
+ state.error = err;
return dll;
+ }
if (!lib)
break;
lib = 0;
}
- if ((dll = dllopen(name, flags)) && dll && path && size)
- strncopy(path, name, size);
+ if (dll = dllopen(name, flags))
+ {
+ if (!dllcheck(dll, name, rel, cur))
+ {
+ dlclose(dll);
+ dll = 0;
+ }
+ else if (path && size)
+ strlcpy(path, name, size);
+ }
return dll;
}
+
+extern void*
+dllplug(const char* lib, const char* name, const char* ver, int flags, char* path, size_t size)
+{
+ return dllplugin(lib, name, ver, 0, NiL, flags, path, size);
+}
diff --git a/usr/src/lib/libdll/common/dllscan.c b/usr/src/contrib/ast/src/lib/libdll/dllscan.c
index 811c2d61ed..344f4beab4 100644
--- a/usr/src/lib/libdll/common/dllscan.c
+++ b/usr/src/contrib/ast/src/lib/libdll/dllscan.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1997-2010 AT&T Intellectual Property *
+* Copyright (c) 1997-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -217,6 +217,8 @@ dllsopen(const char* lib, const char* name, const char* version)
Dllinfo_t* info;
Vmalloc_t* vm;
int i;
+ int j;
+ int k;
char buf[32];
if (!(vm = vmopen(Vmdcheap, Vmlast, 0)))
@@ -236,7 +238,7 @@ dllsopen(const char* lib, const char* name, const char* version)
lib = 0;
i = 0;
}
- if (version && *version && (*version != '-' || *(version + 1)))
+ if (version && (!*version || *version == '-' && !*(version + 1)))
version = 0;
if (!(scan = vmnewof(vm, 0, Dllscan_t, 1, i)) || !(scan->tmp = sfstropen()))
{
@@ -266,19 +268,37 @@ dllsopen(const char* lib, const char* name, const char* version)
memcpy(scan->pb, name, t - (char*)name);
name = (const char*)(t + 1);
}
- if (name && !version)
- for (t = (char*)name; *t; t++)
- if ((*t == '-' || *t == '.' || *t == '?') && isdigit(*(t + 1)))
+ if (name)
+ {
+ i = strlen(name);
+ j = strlen(info->prefix);
+ if (!j || i > j && strneq(name, info->prefix, j))
+ {
+ k = strlen(info->suffix);
+ if (i > k && streq(name + i - k, info->suffix))
{
- if (*t != '-')
- scan->flags |= DLL_MATCH_VERSION;
- version = t + 1;
- if (!(s = vmnewof(vm, 0, char, t - (char*)name, 1)))
+ i -= j + k;
+ if (!(t = vmnewof(vm, 0, char, i, 1)))
goto bad;
- memcpy(s, name, t - (char*)name);
- name = (const char*)s;
- break;
+ memcpy(t, name + j, i);
+ t[i] = 0;
+ name = (const char*)t;
}
+ }
+ if (!version)
+ for (t = (char*)name; *t; t++)
+ if ((*t == '-' || *t == '.' || *t == '?') && isdigit(*(t + 1)))
+ {
+ if (*t != '-')
+ scan->flags |= DLL_MATCH_VERSION;
+ version = t + 1;
+ if (!(s = vmnewof(vm, 0, char, t - (char*)name, 1)))
+ goto bad;
+ memcpy(s, name, t - (char*)name);
+ name = (const char*)s;
+ break;
+ }
+ }
if (!version)
{
scan->flags |= DLL_MATCH_VERSION;
@@ -482,7 +502,7 @@ dllsread(register Dllscan_t* scan)
scan->disc.key = offsetof(Uniq_t, name);
scan->disc.size = 0;
scan->disc.link = offsetof(Uniq_t, link);
- if (!(scan->dict = dtopen(&scan->disc, Dthash)))
+ if (!(scan->dict = dtopen(&scan->disc, Dtset)))
return 0;
dtinsert(scan->dict, scan->uniq);
}
@@ -501,5 +521,6 @@ dllsread(register Dllscan_t* scan)
strcpy(scan->uniq->name, b);
scan->entry.name = b;
scan->entry.path = p;
+ errorf("dll", NiL, -1, "dllsread: %s bound to %s", b, p);
return &scan->entry;
}
diff --git a/usr/src/lib/libdll/common/features/dll b/usr/src/contrib/ast/src/lib/libdll/features/dll
index 70e790be7d..691012f40c 100644
--- a/usr/src/lib/libdll/common/features/dll
+++ b/usr/src/contrib/ast/src/lib/libdll/features/dll
@@ -169,6 +169,9 @@ tst - output{
printf("#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */\n");
printf("#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */\n");
printf("\n");
+ printf("typedef unsigned long (*Dll_plugin_version_f)(void);\n");
+ printf("typedef int (*Dllerror_f)(void*, void*, int, ...);\n");
+ printf("\n");
printf("typedef struct Dllinfo_s\n");
printf("{\n");
printf(" char** sibling; /* sibling dirs on $PATH */\n");
@@ -181,6 +184,17 @@ tst - output{
printf("#endif\n");
printf("} Dllinfo_t;\n");
printf("\n");
+ printf("typedef struct Dllnames_s\n");
+ printf("{\n");
+ printf(" char* id;\n");
+ printf(" char* name;\n");
+ printf(" char* base;\n");
+ printf(" char* type;\n");
+ printf(" char* opts;\n");
+ printf(" char* path;\n");
+ printf(" char data[1024];\n");
+ printf("} Dllnames_t;\n");
+ printf("\n");
printf("typedef struct Dllent_s\n");
printf("{\n");
printf(" char* path;\n");
@@ -210,11 +224,18 @@ tst - output{
printf("#endif\n");
printf("\n");
printf("extern Dllinfo_t* dllinfo(void);\n");
+ printf("extern void* dllplugin(const char*, const char*, const char*, unsigned long, unsigned long*, int, char*, size_t);\n");
printf("extern void* dllplug(const char*, const char*, const char*, int, char*, size_t);\n");
printf("extern void* dllfind(const char*, const char*, int, char*, size_t);\n");
+ printf("extern Dllnames_t* dllnames(const char*, const char*, Dllnames_t*);\n");
+ printf("extern void* dll_lib(Dllnames_t*, unsigned long, Dllerror_f, void*);\n");
+ printf("extern void* dllmeth(const char*, const char*, unsigned long);\n");
printf("extern void* dllopen(const char*, int);\n");
printf("extern void* dllnext(int);\n");
printf("extern void* dlllook(void*, const char*);\n");
+ printf("extern int dllcheck(void*, const char*, unsigned long, unsigned long*);\n");
+ printf("extern unsigned long dllversion(void*, const char*);\n");
+ printf("extern char* dllerror(int);\n");
#if _hdr_rld_interface
if (i >= 0)
{
diff --git a/usr/src/lib/libpp/common/BUGS b/usr/src/contrib/ast/src/lib/libpp/BUGS
index 1d3304d103..1d3304d103 100644
--- a/usr/src/lib/libpp/common/BUGS
+++ b/usr/src/contrib/ast/src/lib/libpp/BUGS
diff --git a/usr/src/lib/libpp/common/HISTORY b/usr/src/contrib/ast/src/lib/libpp/HISTORY
index 37d9156541..37d9156541 100644
--- a/usr/src/lib/libpp/common/HISTORY
+++ b/usr/src/contrib/ast/src/lib/libpp/HISTORY
diff --git a/usr/src/contrib/ast/src/lib/libpp/Makefile b/usr/src/contrib/ast/src/lib/libpp/Makefile
new file mode 100644
index 0000000000..d8a4ab88de
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libpp/Makefile
@@ -0,0 +1,196 @@
+/*
+ * C preprocessor library
+ */
+
+:PACKAGE: ast
+
+LICENSE = since=1986,author=gsf
+
+ID = pp
+
+DEBUG ==
+
+IDNAME = "$(ID)"
+
+$(ID) 2.0 :LIBRARY: BUGS NOTES RELEASE HISTORY pp.3 \
+ pp.h ppfsm.h ppkey.h pplib.h pp.tab \
+ ppargs.c ppbuiltin.c ppcall.c ppcomment.c \
+ ppcontext.c ppcontrol.c ppcpp.c ppdata.c \
+ pperror.c ppexpr.c ppfsm.c ppincref.c ppinput.c ppkey.c \
+ pplex.c ppline.c ppmacref.c ppmisc.c ppop.c pppragma.c \
+ ppprintf.c ppproto.c ppsearch.c pptrace.c
+
+"hp.pa*" :NOOPTIMIZE: ppfsm.c
+"osf.alpha*" :NOOPTIMIZE: ppcall.c
+"sol*.i386*" :NOOPTIMIZE: ppcpp.c pplex.c
+
+ppdef.h : gentab pp.tab
+ $(*:N=*gentab:P=A) -d $(*:N=*.tab) > $(<)
+
+pptab.h : gentab pp.tab
+ $(*:N=*gentab:P=A) -t $(*:N=*.tab) > $(<)
+
+:INSTALLDIR: gentab ppsym
+
+gentab :: gentab.sh
+
+ppsym :: ppsym.c +last
+
+/* MAM workaround */
+if "$(-mam)"
+.ALL : .INSERT ppsym
+end
+
+$(INCLUDEDIR) :INSTALLPROTO: pp.h ppkey.h
+
+$(INCLUDEDIR) :INSTALLDIR: pp.yacc ppkey.yacc
+
+C $(ID) :PROBE: pp.probe pp.def pp.key ppsym probe.ini
+
+probe.ini : (CC.HOSTTYPE) probe.win32
+ t=$(CC.HOSTTYPE)
+ ifs=$IFS
+ IFS=.
+ set x $t
+ IFS=$ifs
+ t=$2
+ set x $(*)
+ while :
+ do shift
+ case $# in
+ 0) break ;;
+ esac
+ case $1 in
+ *probe.$t)
+ break
+ esac
+ done
+ case $1 in
+ ?*) cmp -s $1 $(<) || cp $1 $(<) ;;
+ *) : > $(<)
+ esac
+
+%.yacc : %.h pp.h
+ $(RM) -f $(<)
+ {
+ $(*:N!=$(>):?$(SED) -n -e '/^#define T_TOKEN/p' -e '/^#define N_/p' $(*:N!=$(>))$("\n")??)cat $(>)
+ } > 1.$(tmp).c
+ $(STDED|ED) $(STDEDFLAGS|EDFLAGS) 1.$(tmp).c <<'!'
+ g/^#define N_/m0
+ v/^#define [NT]_/d
+ 1,$s/^#define \(T_[A-Z0-9_]*\).*/&\
+ printf(" \1 %d", \1);/
+ g/^printf.*T_HEADER/d
+ g/^printf.*T_KEYWORD/d
+ g/^printf.*T_TOKCAT/d
+ g/^printf.*T_TOKEN/d
+ 0a
+ $("#")include <stdio.h>
+ int
+ main(argc, argv)
+ int argc;
+ char** argv;
+ {
+ printf("%%token /*generated from $(>)*/");
+ .
+ $a
+ printf("\n");
+ return 0;
+ }
+ .
+ w
+ q
+ !
+ $(CC.NATIVE|CC) -o $(tmp).exe 1.$(tmp).c
+ ./$(tmp).exe > $(<)
+ $(RM) -f 1.$(tmp).c $(tmp).exe
+
+ppdebug.h : ppfsm.h ppdef.h pplib.h
+ : > 1.$(tmp).c
+ $(STDED|ED) $(STDEDFLAGS|EDFLAGS) 1.$(tmp).c <<'!'
+ r $(*:N=*fsm.h)
+ 1,/^#define PROTO/-d
+ /^#define LAST/,$d
+ v/^#define/d
+ g/PROTOMAIN/d
+ 1,$s/^#define //
+ 1,$s/[^A-Za-z0-9_].*//
+ 1,$s/.*/ "&", &,/
+ 1i
+ $("/")*
+ * preprocessor library debug maps
+ *$("/")
+ struct map
+ {
+ char* nam;
+ long val;
+ };
+ static struct map pplexmap[] =
+ {
+ .
+ $a
+ };
+ .
+ ka
+ r $(*:N=*def.h)
+ $("'")a+1,/^#define ADD/-d
+ /^$/,$d
+ $("'")a+1,$s/^#define //
+ $("'")a+1,$s/[ ].*//
+ $("'")a+1,$s/.*/ "&", &,/
+ $("'")aa
+ static struct map ppstatemap[] =
+ {
+ .
+ $a
+ };
+ .
+ ka
+ r $(*:N=*def.h)
+ $("'")a+1,/^#define ALLMULTIPLE/-d
+ /^$/,$d
+ $("'")a+1,$s/^#define //
+ $("'")a+1,$s/[ ].*//
+ $("'")a+1,$s/.*/ "&", &,/
+ $("'")aa
+ static struct map ppmodemap[] =
+ {
+ .
+ $a
+ };
+ .
+ ka
+ r $(*:N=*def.h)
+ $("'")a+1,/^#define ELSEIF/-d
+ /^$/,$d
+ $("'")a+1,$s/^#define //
+ $("'")a+1,$s/[ ].*//
+ $("'")a+1,$s/.*/ "&", &,/
+ $("'")aa
+ static struct map ppoptionmap[] =
+ {
+ .
+ $a
+ };
+ .
+ ka
+ r $(*:N=*lib.h)
+ $("'")a+1,/^#define IN_BUFFER/-d
+ /^$/,$d
+ $("'")a+1,$s/^#define IN_//
+ $("'")a+1,$s/[ ].*//
+ $("'")a+1,$s/.*/ "&", IN_&,/
+ $("'")aa
+ static struct map ppinmap[] =
+ {
+ .
+ $a
+ };
+ .
+ w
+ q
+ !
+ if $(CMP) -s 1.$(tmp).c $(<)
+ then $(RM) -f 1.$(tmp).c
+ else $(MV) 1.$(tmp).c $(<)
+ fi
diff --git a/usr/src/contrib/ast/src/lib/libpp/Mamfile b/usr/src/contrib/ast/src/lib/libpp/Mamfile
new file mode 100644
index 0000000000..496077fb6c
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libpp/Mamfile
@@ -0,0 +1,811 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+setv INSTALLROOT ../../..
+setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
+setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+make ppsym
+make ppsym.o
+make ppsym.c
+make ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare
+done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare
+done ${PACKAGE_ast_INCLUDE}/endian.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare
+make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+make ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare
+done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare
+make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare
+done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
+done ${PACKAGE_ast_INCLUDE}/regex.h dontcare
+make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
+prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare
+done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare
+make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast.h
+done ppsym.c
+meta ppsym.o %.c>%.o ppsym.c ppsym
+prev ppsym.c
+setv _BLD_pp -U_BLD_pp
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppsym.c
+done ppsym.o generated
+bind -last
+exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L${INSTALLROOT}/lib} -o ppsym ppsym.o ${mam_libast} ${mam_libast}
+done ppsym generated
+make pp
+make libpp.a archive
+make pp.req
+exec - set -
+exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c 1.${COTEMP}.c &&
+exec - x=`${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
+exec - {
+exec - case "" in
+exec - *?) echo " " ;;
+exec - esac
+exec - for i in pp ast
+exec - do case $i in
+exec - "pp"|pp)
+exec - ;;
+exec - *) if test -f ${INSTALLROOT}/lib/lib/$i
+exec - then y=`cat ${INSTALLROOT}/lib/lib/$i`
+exec - case $y in
+exec - *-?*) echo "" $y ;;
+exec - esac
+exec - continue
+exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a
+exec - then case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -L../../lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) continue ;;
+exec - esac
+exec - ;;
+exec - esac
+exec - fi
+exec - ;;
+exec - esac
+exec - echo " -l$i"
+exec - done
+exec - } > pp.req
+exec - rm -f 1.${COTEMP}.*
+done pp.req generated
+make ppargs.o
+make ppargs.c
+make pplib.h implicit
+prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+make ppkey.h implicit
+done ppkey.h dontcare
+make ppdef.h implicit
+make gentab
+make gentab.sh
+done gentab.sh
+meta gentab %.sh>% gentab.sh gentab
+prev gentab.sh
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : gentab contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n gentab.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 0 in
+exec - 0) cp gentab.sh gentab
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < gentab.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - gentab.sh <<'!'
+exec -
+exec - !
+exec - } > gentab
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - gentab.sh > gentab <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec -
+exec - !
+exec - ;;
+exec - esac
+exec - silent test -w gentab -a -x gentab || chmod u+w,+x gentab
+done gentab generated
+make pp.tab
+done pp.tab
+exec - ${INSTALLROOT}/src/lib/libpp/gentab -d pp.tab > ppdef.h
+done ppdef.h dontcare generated
+make pp.h implicit
+make ${PACKAGE_ast_INCLUDE}/ccode.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_ccode.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_ccode.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ccode.h dontcare
+make ${PACKAGE_ast_INCLUDE}/error.h implicit
+make ${PACKAGE_ast_INCLUDE}/option.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/option.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/error.h dontcare
+make ${PACKAGE_ast_INCLUDE}/hash.h implicit
+make ${PACKAGE_ast_INCLUDE}/hashpart.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/hashpart.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/hash.h dontcare
+done pp.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/error.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done pplib.h
+done ppargs.c
+meta ppargs.o %.c>%.o ppargs.c ppargs
+prev ppargs.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1986-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libpp]"\" -c ppargs.c
+done ppargs.o generated
+make ppbuiltin.o
+make ppbuiltin.c
+make ${PACKAGE_ast_INCLUDE}/times.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_time.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/times.h
+prev pplib.h implicit
+done ppbuiltin.c
+meta ppbuiltin.o %.c>%.o ppbuiltin.c ppbuiltin
+prev ppbuiltin.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppbuiltin.c
+done ppbuiltin.o generated
+make ppcall.o
+make ppcall.c
+prev pplib.h implicit
+done ppcall.c
+meta ppcall.o %.c>%.o ppcall.c ppcall
+prev ppcall.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppcall.c
+done ppcall.o generated
+make ppcomment.o
+make ppcomment.c
+prev pplib.h implicit
+done ppcomment.c
+meta ppcomment.o %.c>%.o ppcomment.c ppcomment
+prev ppcomment.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppcomment.c
+done ppcomment.o generated
+make ppcontext.o
+make ppcontext.c
+prev pplib.h implicit
+done ppcontext.c
+meta ppcontext.o %.c>%.o ppcontext.c ppcontext
+prev ppcontext.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppcontext.c
+done ppcontext.o generated
+make ppcontrol.o
+make ppcontrol.c
+prev ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev pplib.h implicit
+done ppcontrol.c
+meta ppcontrol.o %.c>%.o ppcontrol.c ppcontrol
+prev ppcontrol.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppcontrol.c
+done ppcontrol.o generated
+make ppcpp.o
+make ppcpp.c
+make pplex.c implicit
+make ${PACKAGE_ast_INCLUDE}/wait.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wait.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_wait.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/wait.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ls.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_mode.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ls.h dontcare
+make ppfsm.h implicit
+done ppfsm.h
+prev pplib.h implicit
+done pplex.c
+done ppcpp.c
+meta ppcpp.o %.c>%.o ppcpp.c ppcpp
+prev ppcpp.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppcpp.c
+done ppcpp.o generated
+make ppdata.o
+make ppdata.c
+prev pplib.h implicit
+done ppdata.c
+meta ppdata.o %.c>%.o ppdata.c ppdata
+prev ppdata.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppdata.c
+done ppdata.o generated
+make pperror.o
+make pperror.c
+prev pplib.h implicit
+done pperror.c
+meta pperror.o %.c>%.o pperror.c pperror
+prev pperror.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c pperror.c
+done pperror.o generated
+make ppexpr.o
+make ppexpr.c
+prev ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev pplib.h implicit
+done ppexpr.c
+meta ppexpr.o %.c>%.o ppexpr.c ppexpr
+prev ppexpr.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppexpr.c
+done ppexpr.o generated
+make ppfsm.o
+make ppfsm.c
+prev ppfsm.h implicit
+prev pplib.h implicit
+done ppfsm.c
+meta ppfsm.o %.c>%.o ppfsm.c ppfsm
+prev ppfsm.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppfsm.c
+done ppfsm.o generated
+make ppincref.o
+make ppincref.c
+prev pplib.h implicit
+done ppincref.c
+meta ppincref.o %.c>%.o ppincref.c ppincref
+prev ppincref.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppincref.c
+done ppincref.o generated
+make ppinput.o
+make ppinput.c
+make ../../lib/libast/path/pathnative.c implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done ../../lib/libast/path/pathnative.c
+prev pplib.h implicit
+done ppinput.c
+meta ppinput.o %.c>%.o ppinput.c ppinput
+prev ppinput.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppinput.c
+done ppinput.o generated
+make ppkey.o
+make ppkey.c
+prev ppkey.h implicit
+prev pplib.h implicit
+done ppkey.c
+meta ppkey.o %.c>%.o ppkey.c ppkey
+prev ppkey.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppkey.c
+done ppkey.o generated
+make pplex.o
+prev pplex.c
+meta pplex.o %.c>%.o pplex.c pplex
+prev pplex.c
+exec - ${CC} ${mam_cc_FLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c pplex.c
+done pplex.o generated
+make ppline.o
+make ppline.c
+prev pplib.h implicit
+done ppline.c
+meta ppline.o %.c>%.o ppline.c ppline
+prev ppline.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppline.c
+done ppline.o generated
+make ppmacref.o
+make ppmacref.c
+prev pplib.h implicit
+done ppmacref.c
+meta ppmacref.o %.c>%.o ppmacref.c ppmacref
+prev ppmacref.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppmacref.c
+done ppmacref.o generated
+make ppmisc.o
+make ppmisc.c
+prev pplib.h implicit
+done ppmisc.c
+meta ppmisc.o %.c>%.o ppmisc.c ppmisc
+prev ppmisc.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppmisc.c
+done ppmisc.o generated
+make ppop.o
+make ppop.c
+make ${PACKAGE_ast_INCLUDE}/preroot.h implicit
+done ${PACKAGE_ast_INCLUDE}/preroot.h
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+make pptab.h implicit
+prev gentab
+prev pp.tab
+exec - ${INSTALLROOT}/src/lib/libpp/gentab -t pp.tab > pptab.h
+done pptab.h generated
+prev pplib.h implicit
+done ppop.c
+meta ppop.o %.c>%.o ppop.c ppop
+prev ppop.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppop.c
+done ppop.o generated
+make pppragma.o
+make pppragma.c
+prev pplib.h implicit
+done pppragma.c
+meta pppragma.o %.c>%.o pppragma.c pppragma
+prev pppragma.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c pppragma.c
+done pppragma.o generated
+make ppprintf.o
+make ppprintf.c
+prev pplib.h implicit
+done ppprintf.c
+meta ppprintf.o %.c>%.o ppprintf.c ppprintf
+prev ppprintf.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppprintf.c
+done ppprintf.o generated
+make ppproto.o
+make ppproto.c
+make ../libast/port/astlicense.c implicit
+prev ${PACKAGE_ast_INCLUDE}/ast.h implicit
+done ../libast/port/astlicense.c dontcare
+prev ppfsm.h implicit
+prev pplib.h implicit
+make ${PACKAGE_ast_INCLUDE}/hashkey.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/hashkey.h dontcare
+prev ppfsm.c implicit
+done ppproto.c
+meta ppproto.o %.c>%.o ppproto.c ppproto
+prev ppproto.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppproto.c
+done ppproto.o generated
+make ppsearch.o
+make ppsearch.c
+prev ${PACKAGE_ast_INCLUDE}/ls.h implicit
+make ${PACKAGE_ast_INCLUDE}/vdb.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/vdb.h dontcare
+prev pplib.h implicit
+done ppsearch.c
+meta ppsearch.o %.c>%.o ppsearch.c ppsearch
+prev ppsearch.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c ppsearch.c
+done ppsearch.o generated
+make pptrace.o
+make pptrace.c
+make ${PACKAGE_ast_INCLUDE}/sig.h implicit
+done ${PACKAGE_ast_INCLUDE}/sig.h dontcare
+make ppdebug.h implicit
+prev ppfsm.h
+prev ppdef.h
+prev pplib.h
+exec - : > 1.${COTEMP}.c
+exec - ${STDED} ${STDEDFLAGS} 1.${COTEMP}.c <<'!'
+exec - r ppfsm.h
+exec - 1,/^#define PROTO/-d
+exec - /^#define LAST/,$d
+exec - v/^#define/d
+exec - g/PROTOMAIN/d
+exec - 1,$s/^#define //
+exec - 1,$s/[^A-Za-z0-9_].*//
+exec - 1,$s/.*/ "&", &,/
+exec - 1i
+exec - /*
+exec - * preprocessor library debug maps
+exec - */
+exec - struct map
+exec - {
+exec - char* nam;
+exec - long val;
+exec - };
+exec - static struct map pplexmap[] =
+exec - {
+exec - .
+exec - $a
+exec - };
+exec - .
+exec - ka
+exec - r ppdef.h
+exec - 'a+1,/^#define ADD/-d
+exec - /^$/,$d
+exec - 'a+1,$s/^#define //
+exec - 'a+1,$s/[ ].*//
+exec - 'a+1,$s/.*/ "&", &,/
+exec - 'aa
+exec - static struct map ppstatemap[] =
+exec - {
+exec - .
+exec - $a
+exec - };
+exec - .
+exec - ka
+exec - r ppdef.h
+exec - 'a+1,/^#define ALLMULTIPLE/-d
+exec - /^$/,$d
+exec - 'a+1,$s/^#define //
+exec - 'a+1,$s/[ ].*//
+exec - 'a+1,$s/.*/ "&", &,/
+exec - 'aa
+exec - static struct map ppmodemap[] =
+exec - {
+exec - .
+exec - $a
+exec - };
+exec - .
+exec - ka
+exec - r ppdef.h
+exec - 'a+1,/^#define ELSEIF/-d
+exec - /^$/,$d
+exec - 'a+1,$s/^#define //
+exec - 'a+1,$s/[ ].*//
+exec - 'a+1,$s/.*/ "&", &,/
+exec - 'aa
+exec - static struct map ppoptionmap[] =
+exec - {
+exec - .
+exec - $a
+exec - };
+exec - .
+exec - ka
+exec - r pplib.h
+exec - 'a+1,/^#define IN_BUFFER/-d
+exec - /^$/,$d
+exec - 'a+1,$s/^#define IN_//
+exec - 'a+1,$s/[ ].*//
+exec - 'a+1,$s/.*/ "&", IN_&,/
+exec - 'aa
+exec - static struct map ppinmap[] =
+exec - {
+exec - .
+exec - $a
+exec - };
+exec - .
+exec - w
+exec - q
+exec - !
+exec - if cmp 2>/dev/null -s 1.${COTEMP}.c ppdebug.h
+exec - then rm -f 1.${COTEMP}.c
+exec - else mv 1.${COTEMP}.c ppdebug.h
+exec - fi
+done ppdebug.h dontcare generated
+prev ppfsm.h implicit
+prev pplib.h implicit
+done pptrace.c
+meta pptrace.o %.c>%.o pptrace.c pptrace
+prev pptrace.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c pptrace.c
+done pptrace.o generated
+exec - ${AR} rc libpp.a ppargs.o ppbuiltin.o ppcall.o ppcomment.o ppcontext.o ppcontrol.o ppcpp.o ppdata.o pperror.o ppexpr.o ppfsm.o ppincref.o ppinput.o ppkey.o pplex.o ppline.o ppmacref.o ppmisc.o ppop.o pppragma.o ppprintf.o ppproto.o ppsearch.o pptrace.o
+exec - (ranlib libpp.a) >/dev/null 2>&1 || true
+done libpp.a generated
+done pp virtual
+prev libpp.a archive
+make ${INSTALLROOT}/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib
+exec - then mkdir -p ${INSTALLROOT}/lib
+exec - fi
+done ${INSTALLROOT}/lib generated
+make ${INSTALLROOT}/lib/libpp.a archive
+prev ${INSTALLROOT}/lib
+prev libpp.a archive
+exec - test '' = 'libpp.a' || ${STDCMP} 2>/dev/null -s libpp.a ${INSTALLROOT}/lib/libpp.a || { ${STDMV} ${INSTALLROOT}/lib/libpp.a ${INSTALLROOT}/lib/libpp.a.old 2>/dev/null || true; ${STDCP} libpp.a ${INSTALLROOT}/lib/libpp.a ;}
+exec - (ranlib ${INSTALLROOT}/lib/libpp.a) >/dev/null 2>&1 || true
+done ${INSTALLROOT}/lib/libpp.a generated
+make ${INSTALLROOT}/man/man3
+exec - if silent test ! -d ${INSTALLROOT}/man/man3
+exec - then mkdir -p ${INSTALLROOT}/man/man3
+exec - fi
+done ${INSTALLROOT}/man/man3 generated
+make ${INSTALLROOT}/man/man3/pp.3
+prev ${INSTALLROOT}/man/man3
+make pp.3
+done pp.3
+exec - test '' = 'pp.3' || ${STDCMP} 2>/dev/null -s pp.3 ${INSTALLROOT}/man/man3/pp.3 || { ${STDMV} ${INSTALLROOT}/man/man3/pp.3 ${INSTALLROOT}/man/man3/pp.3.old 2>/dev/null || true; ${STDCP} pp.3 ${INSTALLROOT}/man/man3/pp.3 ;}
+done ${INSTALLROOT}/man/man3/pp.3 generated
+make ${INSTALLROOT}/lib/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib/lib
+exec - then mkdir -p ${INSTALLROOT}/lib/lib
+exec - fi
+done ${INSTALLROOT}/lib/lib generated
+make ${INSTALLROOT}/lib/lib/pp
+prev ${INSTALLROOT}/lib/lib
+prev pp.req
+exec - test '' = 'pp.req' || ${STDCMP} 2>/dev/null -s pp.req ${INSTALLROOT}/lib/lib/pp || { ${STDMV} ${INSTALLROOT}/lib/lib/pp ${INSTALLROOT}/lib/lib/pp.old 2>/dev/null || true; ${STDCP} pp.req ${INSTALLROOT}/lib/lib/pp ;}
+done ${INSTALLROOT}/lib/lib/pp generated
+make ${PACKAGE_ast_INCLUDE}
+exec - if silent test ! -d ${PACKAGE_ast_INCLUDE}
+exec - then mkdir -p ${PACKAGE_ast_INCLUDE}
+exec - fi
+done ${PACKAGE_ast_INCLUDE} generated
+make ${PACKAGE_ast_INCLUDE}/pp.h
+prev ${PACKAGE_ast_INCLUDE}
+prev pp.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1986,author=gsf' pp.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/pp.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/pp.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/pp.h generated
+make ${PACKAGE_ast_INCLUDE}/ppkey.h
+prev ppkey.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1986,author=gsf' ppkey.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/ppkey.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/ppkey.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/ppkey.h generated
+make ${PACKAGE_ast_INCLUDE}/pp.yacc
+make pp.yacc
+meta pp.yacc %.h>%.yacc pp.h pp
+prev pp.h
+prev pp.h
+exec - rm -f pp.yacc
+exec - {
+exec - cat pp.h
+exec - } > 1.${COTEMP}.c
+exec - ${STDED} ${STDEDFLAGS} 1.${COTEMP}.c <<'!'
+exec - g/^#define N_/m0
+exec - v/^#define [NT]_/d
+exec - 1,$s/^#define \(T_[A-Z0-9_]*\).*/&\
+exec - printf(" \1 %d", \1);/
+exec - g/^printf.*T_HEADER/d
+exec - g/^printf.*T_KEYWORD/d
+exec - g/^printf.*T_TOKCAT/d
+exec - g/^printf.*T_TOKEN/d
+exec - 0a
+exec - #include <stdio.h>
+exec - int
+exec - main(argc, argv)
+exec - int argc;
+exec - char** argv;
+exec - {
+exec - printf("%%token /*generated from pp.h*/");
+exec - .
+exec - $a
+exec - printf("\n");
+exec - return 0;
+exec - }
+exec - .
+exec - w
+exec - q
+exec - !
+exec - ${CC} -o ${COTEMP}.exe 1.${COTEMP}.c
+exec - ./${COTEMP}.exe > pp.yacc
+exec - rm -f 1.${COTEMP}.c ${COTEMP}.exe
+done pp.yacc generated
+exec - test '' = 'pp.yacc' || ${STDCMP} 2>/dev/null -s pp.yacc ${PACKAGE_ast_INCLUDE}/pp.yacc || { ${STDMV} ${PACKAGE_ast_INCLUDE}/pp.yacc ${PACKAGE_ast_INCLUDE}/pp.yacc.old 2>/dev/null || true; ${STDCP} pp.yacc ${PACKAGE_ast_INCLUDE}/pp.yacc ;}
+done ${PACKAGE_ast_INCLUDE}/pp.yacc generated
+make ${PACKAGE_ast_INCLUDE}/ppkey.yacc
+make ppkey.yacc
+meta ppkey.yacc %.h>%.yacc ppkey.h ppkey
+prev ppkey.h
+prev pp.h
+exec - rm -f ppkey.yacc
+exec - {
+exec - sed -n -e '/^#define T_TOKEN/p' -e '/^#define N_/p' pp.h
+exec - cat ppkey.h
+exec - } > 1.${COTEMP}.c
+exec - ${STDED} ${STDEDFLAGS} 1.${COTEMP}.c <<'!'
+exec - g/^#define N_/m0
+exec - v/^#define [NT]_/d
+exec - 1,$s/^#define \(T_[A-Z0-9_]*\).*/&\
+exec - printf(" \1 %d", \1);/
+exec - g/^printf.*T_HEADER/d
+exec - g/^printf.*T_KEYWORD/d
+exec - g/^printf.*T_TOKCAT/d
+exec - g/^printf.*T_TOKEN/d
+exec - 0a
+exec - #include <stdio.h>
+exec - int
+exec - main(argc, argv)
+exec - int argc;
+exec - char** argv;
+exec - {
+exec - printf("%%token /*generated from ppkey.h*/");
+exec - .
+exec - $a
+exec - printf("\n");
+exec - return 0;
+exec - }
+exec - .
+exec - w
+exec - q
+exec - !
+exec - ${CC} -o ${COTEMP}.exe 1.${COTEMP}.c
+exec - ./${COTEMP}.exe > ppkey.yacc
+exec - rm -f 1.${COTEMP}.c ${COTEMP}.exe
+done ppkey.yacc generated
+exec - test '' = 'ppkey.yacc' || ${STDCMP} 2>/dev/null -s ppkey.yacc ${PACKAGE_ast_INCLUDE}/ppkey.yacc || { ${STDMV} ${PACKAGE_ast_INCLUDE}/ppkey.yacc ${PACKAGE_ast_INCLUDE}/ppkey.yacc.old 2>/dev/null || true; ${STDCP} ppkey.yacc ${PACKAGE_ast_INCLUDE}/ppkey.yacc ;}
+done ${PACKAGE_ast_INCLUDE}/ppkey.yacc generated
+make ${INSTALLROOT}/lib/probe/C/pp
+exec - if silent test ! -d ${INSTALLROOT}/lib/probe/C/pp
+exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/pp
+exec - fi
+done ${INSTALLROOT}/lib/probe/C/pp generated
+make ${INSTALLROOT}/lib/probe/C/pp/probe
+prev ${INSTALLROOT}/lib/probe/C/pp
+make probe
+meta probe %.sh>% probe.sh probe
+make probe.sh
+make ${INSTALLROOT}/lib/probe/C/probe
+done ${INSTALLROOT}/lib/probe/C/probe
+make pp.probe
+done pp.probe
+exec - cat ${INSTALLROOT}/lib/probe/C/probe pp.probe > probe.sh
+done probe.sh generated
+exec - case static,port:$OPTIND:$RANDOM in
+exec - ?*:*:*|*::*|*:*:$RANDOM)
+exec - ;;
+exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null
+exec - then if grep '### .*archaic.* ###' >/dev/null
+exec - then : probe contains archaic constructs :
+exec - else ENV= LC_ALL=C $SHELL -n probe.sh
+exec - fi
+exec - fi
+exec - ;;
+exec - esac
+exec - case '${mam_cc_SHELLMAGIC}' in
+exec - "") case 0 in
+exec - 0) cp probe.sh probe
+exec - ;;
+exec - *) {
+exec - i=`(read x; echo $x) < probe.sh`
+exec - case $i in
+exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+exec - esac
+exec - cat - probe.sh <<'!'
+exec -
+exec - !
+exec - } > probe
+exec - ;;
+exec - esac
+exec - ;;
+exec - *) cat - probe.sh > probe <<'!'
+exec - ${mam_cc_SHELLMAGIC}
+exec -
+exec - !
+exec - ;;
+exec - esac
+exec - silent test -w probe -a -x probe || chmod u+w,+x probe
+done probe generated
+exec - test '' = 'probe' || ${STDCMP} 2>/dev/null -s probe ${INSTALLROOT}/lib/probe/C/pp/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/pp/probe ${INSTALLROOT}/lib/probe/C/pp/probe.old 2>/dev/null || true; ${STDCP} probe ${INSTALLROOT}/lib/probe/C/pp/probe ;}
+done ${INSTALLROOT}/lib/probe/C/pp/probe generated
+make ${INSTALLROOT}/lib/probe/C/pp/pp.def
+make pp.def
+done pp.def
+exec - test '' = 'pp.def' || ${STDCMP} 2>/dev/null -s pp.def ${INSTALLROOT}/lib/probe/C/pp/pp.def || { ${STDMV} ${INSTALLROOT}/lib/probe/C/pp/pp.def ${INSTALLROOT}/lib/probe/C/pp/pp.def.old 2>/dev/null || true; ${STDCP} pp.def ${INSTALLROOT}/lib/probe/C/pp/pp.def ;}
+done ${INSTALLROOT}/lib/probe/C/pp/pp.def generated
+make ${INSTALLROOT}/lib/probe/C/pp/pp.key
+make pp.key
+done pp.key
+exec - test '' = 'pp.key' || ${STDCMP} 2>/dev/null -s pp.key ${INSTALLROOT}/lib/probe/C/pp/pp.key || { ${STDMV} ${INSTALLROOT}/lib/probe/C/pp/pp.key ${INSTALLROOT}/lib/probe/C/pp/pp.key.old 2>/dev/null || true; ${STDCP} pp.key ${INSTALLROOT}/lib/probe/C/pp/pp.key ;}
+done ${INSTALLROOT}/lib/probe/C/pp/pp.key generated
+make ${INSTALLROOT}/lib/probe/C/pp/ppsym
+prev ppsym
+exec - test '' = 'ppsym' || ${STDCMP} 2>/dev/null -s ppsym ${INSTALLROOT}/lib/probe/C/pp/ppsym || { ${STDMV} ${INSTALLROOT}/lib/probe/C/pp/ppsym ${INSTALLROOT}/lib/probe/C/pp/ppsym.old 2>/dev/null || true; ${STDCP} ppsym ${INSTALLROOT}/lib/probe/C/pp/ppsym ;}
+done ${INSTALLROOT}/lib/probe/C/pp/ppsym generated
+make ${INSTALLROOT}/lib/probe/C/pp/probe.ini
+make probe.ini
+make probe.win32
+done probe.win32
+exec - t=${mam_cc_HOSTTYPE}
+exec - ifs=$IFS
+exec - IFS=.
+exec - set x $t
+exec - IFS=$ifs
+exec - t=$2
+exec - set x probe.win32
+exec - while :
+exec - do shift
+exec - case $# in
+exec - 0) break ;;
+exec - esac
+exec - case $1 in
+exec - *probe.$t)
+exec - break
+exec - esac
+exec - done
+exec - case $1 in
+exec - ?*) cmp -s $1 probe.ini || cp $1 probe.ini ;;
+exec - *) : > probe.ini
+exec - esac
+done probe.ini generated
+exec - test '' = 'probe.ini' || ${STDCMP} 2>/dev/null -s probe.ini ${INSTALLROOT}/lib/probe/C/pp/probe.ini || { ${STDMV} ${INSTALLROOT}/lib/probe/C/pp/probe.ini ${INSTALLROOT}/lib/probe/C/pp/probe.ini.old 2>/dev/null || true; ${STDCP} probe.ini ${INSTALLROOT}/lib/probe/C/pp/probe.ini ;}
+done ${INSTALLROOT}/lib/probe/C/pp/probe.ini generated
+done install virtual
+make test
+done test dontcare virtual
diff --git a/usr/src/lib/libpp/common/NOTES b/usr/src/contrib/ast/src/lib/libpp/NOTES
index 85ab42e74b..85ab42e74b 100644
--- a/usr/src/lib/libpp/common/NOTES
+++ b/usr/src/contrib/ast/src/lib/libpp/NOTES
diff --git a/usr/src/lib/libpp/common/RELEASE b/usr/src/contrib/ast/src/lib/libpp/RELEASE
index 0e09f6089d..92168c271f 100644
--- a/usr/src/lib/libpp/common/RELEASE
+++ b/usr/src/contrib/ast/src/lib/libpp/RELEASE
@@ -1,3 +1,14 @@
+12-06-06 ppline.c: preserve hosted sync even for normal sync
+12-02-29 pp.probe: handle predefined function-like macro definitions
+12-02-14 ppproto.c: fix "already noticed" logic
+11-08-30 ppproto.c: bump BLOCK to 16*1024 for (ppargs.c self-doc!)
+11-03-15 ppop.c: add ppok() readonly check for subset of ppop(PP_*)
+11-03-02 ppop.c,ppcontrol.c: use ppset() to handle readonly values
+10-09-01 RE errors => exit(2)
+10-09-01 ppcall.c: no disgnostic for 0 actual args for 1 formal arg
+10-06-29 ppargs.c: ignore -H<number> (hpux /opt/langtools/lbin/cpp.ansi)
+10-06-16 ppsearch.c: try parent prefix if -I- include search fails
+10-06-01 sync with ast api 20100601
09-02-02 pp.probe,probe.win32: check for compiler supplied __FUNCTION__
09-02-02 ppop.c: include pp_default.h/probe at end of builtin script
09-01-20 probe.win32: elide #pragma comment.*linker.*manifest
diff --git a/usr/src/lib/libpp/common/gentab.sh b/usr/src/contrib/ast/src/lib/libpp/gentab.sh
index 5000d3ab90..77e432121d 100644
--- a/usr/src/lib/libpp/common/gentab.sh
+++ b/usr/src/contrib/ast/src/lib/libpp/gentab.sh
@@ -1,14 +1,14 @@
########################################################################
# #
# This software is part of the ast package #
-# Copyright (c) 1986-2009 AT&T Intellectual Property #
+# Copyright (c) 1986-2011 AT&T Intellectual Property #
# and is licensed under the #
-# Common Public License, Version 1.0 #
+# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
+# http://www.eclipse.org/org/documents/epl-v10.html #
+# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
diff --git a/usr/src/lib/libpp/common/pp.3 b/usr/src/contrib/ast/src/lib/libpp/pp.3
index 988185bd24..988185bd24 100644
--- a/usr/src/lib/libpp/common/pp.3
+++ b/usr/src/contrib/ast/src/lib/libpp/pp.3
diff --git a/usr/src/lib/libpp/common/pp.def b/usr/src/contrib/ast/src/lib/libpp/pp.def
index f44dac94a5..f44dac94a5 100644
--- a/usr/src/lib/libpp/common/pp.def
+++ b/usr/src/contrib/ast/src/lib/libpp/pp.def
diff --git a/usr/src/lib/libpp/common/pp.h b/usr/src/contrib/ast/src/lib/libpp/pp.h
index c8c30ae074..72c1f695a4 100644
--- a/usr/src/lib/libpp/common/pp.h
+++ b/usr/src/contrib/ast/src/lib/libpp/pp.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/pp.key b/usr/src/contrib/ast/src/lib/libpp/pp.key
index 36de339f36..36de339f36 100644
--- a/usr/src/lib/libpp/common/pp.key
+++ b/usr/src/contrib/ast/src/lib/libpp/pp.key
diff --git a/usr/src/lib/libpp/common/pp.probe b/usr/src/contrib/ast/src/lib/libpp/pp.probe
index 5d18c26eda..26f9ffd27f 100644
--- a/usr/src/lib/libpp/common/pp.probe
+++ b/usr/src/contrib/ast/src/lib/libpp/pp.probe
@@ -2,7 +2,7 @@
# Glenn Fowler
# AT&T Research
#
-# @(#)pp.probe (AT&T Research) 2009-02-02
+# @(#)pp.probe (AT&T Research) 2012-02-29
#
# C probe for libpp
#
@@ -565,7 +565,8 @@ echo "$predef" >> all.pp
do echo "\"\", 0 };" >> cpp$i.$src
done
}
-preval="`for i in 0 1 2 3 4 5;do $cc -E cpp$i.$src;done | sed -e '/\".*\".*,.*,/!d' -e 's/[^\"]*\"\\([^\"]*\\)\"[ ]*,[ ]*([ ]*long[ ]*)[ ]*\\(.*\\)[ ]*-[ ]*1[ ]*,[ ]*\$/\\1 \\2 =/g'` `$cc -dM -E stdc.$src | sed -e '/[ ]*#[ ]*define/!d' -e '/\"/d' -e 's/[ ]*#[ ]*define[ ]*\\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)[ ]*\\(.*\\)/\\1 \\2 =/'`"
+preval="`for i in 0 1 2 3 4 5;do $cc -E cpp$i.$src;done | sed -e '/\".*\".*,.*,/!d' -e 's/[^\"]*\"\\([^\"]*\\)\"[ ]*,[ ]*([ ]*long[ ]*)[ ]*\\(.*\\)[ ]*-[ ]*1[ ]*,[ ]*\$/\\1 \\2 =/g' -e '/\\(^[^ ]*\\) \1 *=$/d'` `$cc -dM -E stdc.$src | sed -e '/[ ]*#[ ]*define/!d' -e '/\"/d' -e 's/[ ]*#[ ]*define[ ]*\\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*([^)]*)\\)[ ]*\\(.*\\)/\\1 \\2 =/' -e 's/[ ]*#[ ]*define[ ]*\\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)[ ]*\\(.*\\)/\\1 \\2 =/'`"
+ print -r "$preval" > /tmp/probe/preval
for i in bufld namei quota reboot utsname vfs
do echo "#include <sys/$i.h>" > t.$src
@@ -725,6 +726,17 @@ $i"
*) break ;;
esac
done
+ case $m in
+ __*_BIT__|__*_DIG__|__*_MIN__|__*_MAX__|__*_TYPE__|*_FLT_*|*_DBL_*|*_LDBL_*)
+ case $nopredef in
+ 0) nopredef=1
+ continue
+ ;;
+ 1) continue
+ ;;
+ esac
+ ;;
+ esac
case $nopredef in
2) ;;
*) case $v in
diff --git a/usr/src/lib/libpp/common/pp.tab b/usr/src/contrib/ast/src/lib/libpp/pp.tab
index 30a576d404..30a576d404 100644
--- a/usr/src/lib/libpp/common/pp.tab
+++ b/usr/src/contrib/ast/src/lib/libpp/pp.tab
diff --git a/usr/src/lib/libpp/common/ppargs.c b/usr/src/contrib/ast/src/lib/libpp/ppargs.c
index 567b216512..483457f564 100644
--- a/usr/src/lib/libpp/common/ppargs.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppargs.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -138,7 +138,9 @@ USAGE_LICENSE
" compatibility.]:[assertion]"
"[E:preprocess?Ignored for compatibility with ancient compilers.]"
"[H:include-reference?Emit \b#include\b file paths on the standard error,"
-" one per line, indented to show nesting.]"
+" one per line, indented to show nesting. If the optional \asize\a"
+" argument is specified then the entire \b-H\b option is"
+" ignored.]#?[size]"
"[T?If not \bgcc\b(1) then truncate identifiers to \alength\a"
" characters for compatibility with old AT&T (I guess only Lucent needs"
" them now) compilers.]#?[length]"
@@ -426,7 +428,8 @@ ppargs(char** argv, int last)
ppop(PP_ASSERT, opt_info.arg);
break;
case 'H':
- ppop(PP_INCREF, ppincref);
+ if (!opt_info.arg)
+ ppop(PP_INCREF, ppincref);
break;
case 'T':
if (!(pp.arg_style & STYLE_gnu))
diff --git a/usr/src/lib/libpp/common/ppbuiltin.c b/usr/src/contrib/ast/src/lib/libpp/ppbuiltin.c
index e33d2641d4..f9cb4daefe 100644
--- a/usr/src/lib/libpp/common/ppbuiltin.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppbuiltin.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppcall.c b/usr/src/contrib/ast/src/lib/libpp/ppcall.c
index 2c18530e6e..2f52c781b5 100644
--- a/usr/src/lib/libpp/common/ppcall.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppcall.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -405,9 +405,8 @@ ppcall(register struct ppsymbol* sym, int tok)
{
if (p > mp->arg[0] && ++m || (sym->flags & SYM_VARIADIC))
c++;
- if (c != mac->arity && !(sym->flags & SYM_EMPTY))
+ if (c != (n = mac->arity) && (c > 0 || n > 1) && !(sym->flags & SYM_EMPTY))
{
- n = mac->arity;
if (!(sym->flags & SYM_VARIADIC))
error(1, "%s: %d actual argument%s expected", sym->name, n, n == 1 ? "" : "s");
else if (c < --n)
diff --git a/usr/src/lib/libpp/common/ppcomment.c b/usr/src/contrib/ast/src/lib/libpp/ppcomment.c
index 8099e46dac..217e4eb87d 100644
--- a/usr/src/lib/libpp/common/ppcomment.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppcomment.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppcontext.c b/usr/src/contrib/ast/src/lib/libpp/ppcontext.c
index f87a2fff33..ace1c94900 100644
--- a/usr/src/lib/libpp/common/ppcontext.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppcontext.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppcontrol.c b/usr/src/contrib/ast/src/lib/libpp/ppcontrol.c
index eaa7b200ba..2a2e6e6f86 100644
--- a/usr/src/lib/libpp/common/ppcontrol.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppcontrol.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -533,7 +533,7 @@ ppcontrol(void)
}
}
else if (i1 != REG_NOMATCH)
- regfatal(&map->re, 3, i1);
+ regfatal(&map->re, 4, i1);
c = '\n';
if (map = var.best)
{
@@ -552,13 +552,13 @@ ppcontrol(void)
{
n++;
if (i0 = regsubexec(&edit->re, p, elementsof(match), match))
- regfatal(&edit->re, 3, i0);
+ regfatal(&edit->re, 4, i0);
p = edit->re.re_sub->re_buf;
if (edit->re.re_sub->re_flags & REG_SUB_STOP)
break;
}
else if (i0 != REG_NOMATCH)
- regfatal(&edit->re, 3, i0);
+ regfatal(&edit->re, 4, i0);
if (n && *p)
{
p1 = s = oldof(0, char, 0, strlen(p) + 32);
@@ -636,7 +636,7 @@ ppcontrol(void)
if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX)))
error(1, "#%s: non-standard directive", pp.token);
#endif
- /*FALLTHROUGH*/
+ /* FALLTHROUGH */
case DEFINE:
n2 = error_info.line;
if ((c = pplex()) == '#' && directive == DEFINE)
@@ -1470,7 +1470,7 @@ ppcontrol(void)
case T_STRING:
s = error_info.file;
if (*(p = pp.token))
- pathcanon(p, 0);
+ pathcanon(p, 0, 0);
fp = ppsetfile(p);
error_info.file = fp->name;
if (error_info.line == 1)
@@ -1903,7 +1903,7 @@ ppcontrol(void)
*/
if (i0 = regcomp(&map->re, s, REG_AUGMENTED|REG_DELIMITED|REG_LENIENT|REG_NULL))
- regfatal(&map->re, 3, i0);
+ regfatal(&map->re, 4, i0);
if (*(s += map->re.re_npat))
{
error(2, "%s: invalid characters after pattern: %s ", p3, s);
@@ -1929,7 +1929,7 @@ ppcontrol(void)
if (!(i0 = regcomp(&edit->re, s, REG_AUGMENTED|REG_DELIMITED|REG_LENIENT|REG_NULL)) && !(i0 = regsubcomp(&edit->re, s += edit->re.re_npat, NiL, 0, 0)))
s += edit->re.re_npat;
if (i0)
- regfatal(&edit->re, 3, i0);
+ regfatal(&edit->re, 4, i0);
if (*s)
{
error(2, "%s: invalid characters after substitution: %s ", p3, s);
diff --git a/usr/src/lib/libpp/common/ppcpp.c b/usr/src/contrib/ast/src/lib/libpp/ppcpp.c
index a886799950..08b89aac53 100644
--- a/usr/src/lib/libpp/common/ppcpp.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppcpp.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppdata.c b/usr/src/contrib/ast/src/lib/libpp/ppdata.c
index f06f64feb7..28ee0cd26c 100644
--- a/usr/src/lib/libpp/common/ppdata.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppdata.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -48,7 +48,7 @@
* only within macro bodies
*/
-static const char id[] = "\n@(#)$Id: libpp (AT&T Research) 2009-02-02 $\0\n";
+static const char id[] = "\n@(#)$Id: libpp (AT&T Research) 2012-06-06 $\0\n";
#include "pplib.h"
@@ -137,6 +137,7 @@ struct ppglobals pp =
0, /* ro_state */
0, /* ro_mode */
0, /* ro_option */
+ {0}, /* ro_op[] */
{0}, /* cdir */
{0}, /* hostdir */
0, /* ppdefault */
diff --git a/usr/src/lib/libpp/common/pperror.c b/usr/src/contrib/ast/src/lib/libpp/pperror.c
index 531a08a57d..c506d686d2 100644
--- a/usr/src/lib/libpp/common/pperror.c
+++ b/usr/src/contrib/ast/src/lib/libpp/pperror.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppexpr.c b/usr/src/contrib/ast/src/lib/libpp/ppexpr.c
index 225034b97d..d65da87c3c 100644
--- a/usr/src/lib/libpp/common/ppexpr.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppexpr.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -72,9 +72,9 @@ exists(int op, char* pred, register char* args)
{
while ((c = pplex()) == T_STRING)
{
- if (pathaccess(pp.path, pp.token, file, NiL, 0))
+ if (pathaccess(pp.token, file, NiL, 0, pp.path, MAXTOKEN + 1))
{
- pathcanon(pp.path, 0);
+ pathcanon(pp.path, 0, 0);
message((-2, "%s: %s found", pred, pp.path));
c = 1;
goto done;
@@ -127,7 +127,7 @@ compare(char* pred, char* args, int match)
if (!match)
c = strcmp(tmp, pp.token);
else if ((c = regcomp(&re, pp.token, REG_AUGMENTED|REG_LENIENT|REG_NULL)) || (c = regexec(&re, tmp, NiL, 0, 0)) && c != REG_NOMATCH)
- regfatal(&re, 3, c);
+ regfatal(&re, 4, c);
else
{
c = !c;
diff --git a/usr/src/lib/libpp/common/ppfsm.c b/usr/src/contrib/ast/src/lib/libpp/ppfsm.c
index 05b28a64ef..aaf2ebcc27 100644
--- a/usr/src/lib/libpp/common/ppfsm.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppfsm.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppfsm.h b/usr/src/contrib/ast/src/lib/libpp/ppfsm.h
index 4640bcebc2..a3b69b8c85 100644
--- a/usr/src/lib/libpp/common/ppfsm.h
+++ b/usr/src/contrib/ast/src/lib/libpp/ppfsm.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppincref.c b/usr/src/contrib/ast/src/lib/libpp/ppincref.c
index 6080d3ed54..a2293df27e 100644
--- a/usr/src/lib/libpp/common/ppincref.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppincref.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppinput.c b/usr/src/contrib/ast/src/lib/libpp/ppinput.c
index b940fa9fe9..5f379d6cc4 100644
--- a/usr/src/lib/libpp/common/ppinput.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppinput.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -32,12 +32,7 @@
* convert path to native representation
*/
-#if 0
#include "../../lib/libast/path/pathnative.c" /* drop in 2002 */
-#else
-/* Modified by gisburn 2006-08-18 for OpenSolaris ksh93-integration */
-#include "../../libast/common/path/pathnative.c"
-#endif
static char*
native(register const char* s)
diff --git a/usr/src/lib/libpp/common/ppkey.c b/usr/src/contrib/ast/src/lib/libpp/ppkey.c
index 6953a01908..3009fdde8e 100644
--- a/usr/src/lib/libpp/common/ppkey.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppkey.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppkey.h b/usr/src/contrib/ast/src/lib/libpp/ppkey.h
index 6c8515fe8f..a3dd03d934 100644
--- a/usr/src/lib/libpp/common/ppkey.h
+++ b/usr/src/contrib/ast/src/lib/libpp/ppkey.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/pplex.c b/usr/src/contrib/ast/src/lib/libpp/pplex.c
index 4fd2bbae0b..36aa5ac122 100644
--- a/usr/src/lib/libpp/common/pplex.c
+++ b/usr/src/contrib/ast/src/lib/libpp/pplex.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -1182,8 +1182,8 @@ ppcpp(void)
case '9':
if (!(st & COMPATIBILITY)) goto unknown;
if (st & STRICT) error(1, "%c: invalid character in octal character escape", c);
- /*FALLTHROUGH*/
#endif
+ /*FALLTHROUGH*/
case '0':
case '1':
case '2':
@@ -1207,8 +1207,8 @@ ppcpp(void)
break;
}
if (st & STRICT) error(1, "%c: invalid character in octal character escape", c);
- /*FALLTHROUGH*/
#endif
+ /*FALLTHROUGH*/
case '0':
case '1':
case '2':
@@ -2415,6 +2415,7 @@ pool(void)
{
case -1:
error(ERROR_SYSTEM|3, "cannot fork pool");
+ /* FALLTHROUGH */
case 0:
atexit(poolstatus);
error_info.errors = 0;
@@ -2426,7 +2427,7 @@ pool(void)
if (open(ofile, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) != 1)
error(ERROR_SYSTEM|3, "%s: cannot create", ofile);
pp.outfile = ofile;
- pathcanon(ifile, 0);
+ pathcanon(ifile, 0, 0);
ifile = ppsetfile(ifile)->name;
#if CHECKPOINT
if (pp.mode & DUMP)
diff --git a/usr/src/lib/libpp/common/pplib.h b/usr/src/contrib/ast/src/lib/libpp/pplib.h
index 5738078f3a..2b86d7f36b 100644
--- a/usr/src/lib/libpp/common/pplib.h
+++ b/usr/src/contrib/ast/src/lib/libpp/pplib.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -261,6 +261,7 @@ struct pathid /* physical file name and id */
long ro_state; /* readonly state */ \
long ro_mode; /* readonly mode */ \
long ro_option; /* readonly option */ \
+ long ro_op[2]; /* readonly op */ \
struct pathid cdir; /* arg C dir */ \
struct pathid hostdir; /* arg host dir */ \
char* ppdefault; /* arg default info file */ \
@@ -312,6 +313,7 @@ struct pathid /* physical file name and id */
long ro_state; /* original pp.ro_state */ \
long ro_mode; /* original pp.ro_mode */ \
long ro_option; /* original pp.ro_option */ \
+ long ro_op[2]; /* original pp.ro_op[] */ \
int on; /* PP_RESET enabled */ \
Hash_table_t* symtab; /* original pp.symtab scope */ \
} reset; /* PP_RESET state */ \
@@ -424,17 +426,7 @@ struct pathid /* physical file name and id */
*/
#define MEMCPY(to,fr,n) \
- do switch(n) \
- { default : memcpy(to,fr,n); to += n; fr += n; break; \
- case 7 : *to++ = *fr++; \
- case 6 : *to++ = *fr++; \
- case 5 : *to++ = *fr++; \
- case 4 : *to++ = *fr++; \
- case 3 : *to++ = *fr++; \
- case 2 : *to++ = *fr++; \
- case 1 : *to++ = *fr++; \
- case 0 : break; \
- } while (0)
+ { memcpy((Void_t*)to,(Void_t*)fr,n); to += n; fr += n; }
#define NEWDIRECTIVE (-1)
@@ -449,9 +441,9 @@ struct pathid /* physical file name and id */
#define pptokchr(c) pptokstr(NiL,(c))
#define pushcontrol() do { if (pp.control++ >= pp.maxcon) ppnest(); } while (0)
#define pushframe(m) (m->next->prev=m,m=m->next)
-#define setmode(m,v) ((v)?(pp.mode|=(m)):(pp.mode&=~(m)))
-#define setoption(m,v) ((v)?(pp.option|=(m)):(pp.option&=~(m)))
-#define setstate(s,v) ((v)?(pp.state|=(s)):(pp.state&=~(s)))
+#define setmode(m,v) ppset(&pp.mode,m,v)
+#define setoption(m,v) ppset(&pp.option,m,v)
+#define setstate(m,v) ppset(&pp.state,m,v)
#define tracing (error_info.trace<0)
#define ppgetfile(x) ((struct ppfile*)hashlook(pp.filtab,x,HASH_LOOKUP,NiL))
@@ -809,6 +801,7 @@ _PP_DELAY_ endif
#define pppush _pp_push
#define pprefmac _pp_refmac
#define ppsearch _pp_search
+#define ppset _pp_set
#define ppstatestr _pp_statestr
#define pptokstr _pp_tokstr
#define pptrace _pp_trace
@@ -841,6 +834,7 @@ extern int pppredargs(void);
extern void pppush(int, char*, char*, int);
extern struct ppsymbol* pprefmac(char*, int);
extern int ppsearch(char*, int, int);
+extern int ppset(long*, long, int);
extern char* ppstatestr(long);
extern char* pptokstr(char*, int);
extern void pptrace(int);
diff --git a/usr/src/lib/libpp/common/ppline.c b/usr/src/contrib/ast/src/lib/libpp/ppline.c
index 5bd0014bde..47bca904a1 100644
--- a/usr/src/lib/libpp/common/ppline.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppline.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -55,14 +55,14 @@ ppline(int line, char* file)
{
if (!(pp.flags & PP_linefile))
file = 0;
- type[1] = PP_sync;
+ type[1] = ((pp.flags & (PP_hosted|PP_linehosted)) == (PP_hosted|PP_linehosted)) ? PP_sync_hosted : PP_sync;
}
if (!(pp.flags & PP_linetype) || *pp.lineid || type[1] == PP_sync)
type[0] = 0;
else
{
type[0] = ' ';
- if ((pp.flags & (PP_hosted|PP_linehosted)) == (PP_hosted|PP_linehosted))
+ if ((pp.flags & (PP_hosted|PP_linehosted)) == (PP_hosted|PP_linehosted) && type[1] != PP_sync_hosted)
{
type[2] = ' ';
type[3] = PP_sync_hosted;
diff --git a/usr/src/lib/libpp/common/ppmacref.c b/usr/src/contrib/ast/src/lib/libpp/ppmacref.c
index 4b54d66bd0..cb58e988cb 100644
--- a/usr/src/lib/libpp/common/ppmacref.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppmacref.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppmisc.c b/usr/src/contrib/ast/src/lib/libpp/ppmisc.c
index f4dea77f5c..7297f6be47 100644
--- a/usr/src/lib/libpp/common/ppmisc.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppmisc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppop.c b/usr/src/contrib/ast/src/lib/libpp/ppop.c
index 16c0260cd2..255fdfaadf 100644
--- a/usr/src/lib/libpp/common/ppop.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppop.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -40,22 +40,28 @@
* initialization files have lowest precedence
*/
-static void
-set(register long* p, register long op, int val)
+int
+ppset(register long* p, register long op, int val)
{
long* r;
r = p == &pp.state ? &pp.ro_state : p == &pp.mode ? &pp.ro_mode : &pp.ro_option;
- if (!(pp.mode & INIT) || !(pp.in->type == IN_FILE) || !(*r & op))
+ if ((pp.mode & INIT) && pp.in->type == IN_FILE && (*r & op))
{
- if (!pp.initialized && !(pp.mode & INIT))
- *r |= op;
- if (val)
- *p |= op;
- else
- *p &= ~op;
+ debug((-7, "set %s %s skipped -- readonly", p == &pp.state ? "state" : p == &pp.mode ? "mode" : "option", p == &pp.state ? ppstatestr(*r) : p == &pp.mode ? ppmodestr(*r) : ppoptionstr(*r)));
+ return 0;
+ }
+ if (!pp.initialized && (!(pp.mode & INIT) || !(pp.mode & BUILTIN)) && (p != &pp.mode || !(op & BUILTIN)) && (p != &pp.option || !(op & PREDEFINED)))
+ {
+ *r |= op;
+ debug((-7, "set %s %s readonly", p == &pp.state ? "state" : p == &pp.mode ? "mode" : "option", p == &pp.state ? ppstatestr(*r) : p == &pp.mode ? ppmodestr(*r) : ppoptionstr(*r)));
}
- debug((-7, "set(%s)=%s", p == &pp.state ? "state" : p == &pp.mode ? "mode" : "option", p == &pp.state ? ppstatestr(*p) : p == &pp.mode ? ppmodestr(*p) : ppoptionstr(*p)));
+ if (val)
+ *p |= op;
+ else
+ *p &= ~op;
+ debug((-7, "set %s %s", p == &pp.state ? "state" : p == &pp.mode ? "mode" : "option", p == &pp.state ? ppstatestr(*r) : p == &pp.mode ? ppmodestr(*r) : ppoptionstr(*r)));
+ return 1;
}
/*
@@ -177,7 +183,7 @@ ppmapinclude(char* file, register char* s)
}
if (!token)
break;
- pathcanon(pp.token, 0);
+ pathcanon(pp.token, 0, 0);
fp = ppsetfile(pp.token);
if (mp)
{
@@ -319,6 +325,33 @@ undefine(void* p)
}
/*
+ * return non-zero if its ok to ppop(op)
+ */
+
+static int
+ppok(int op)
+{
+ long n;
+ long* r;
+
+ r = &pp.ro_op[op >> 5];
+ n = 1L << op;
+ if ((pp.mode & INIT) && pp.in->type == IN_FILE && (*r & n))
+ {
+ debug((-7, "set op %d index %d skipped -- readonly", op, op >> 5));
+ return 0;
+ }
+ else if (!pp.initialized && (!(pp.mode & INIT) || !(pp.mode & BUILTIN)))
+ {
+ *r |= n;
+ debug((-7, "set op %d index %d readonly", op, op >> 5));
+ }
+ else
+ debug((-7, "set op %d index %d", op, op >> 5));
+ return 1;
+}
+
+/*
* pp operations
*
* NOTE: PP_INIT must be done before the first pplex() call
@@ -335,6 +368,7 @@ ppop(int op, ...)
register char* s;
int c;
long n;
+ long* r __unused;
char* t;
struct ppdirs* dp;
struct ppdirs* hp;
@@ -385,7 +419,7 @@ ppop(int op, ...)
}
else if (!pp.c)
{
- if (!*p || stat((pathcanon(p, 0), p), &st))
+ if (!*p || stat((pathcanon(p, 0, 0), p), &st))
pp.c = c;
else
{
@@ -434,18 +468,20 @@ ppop(int op, ...)
pp.flags &= ~PP_comment;
break;
case PP_COMPATIBILITY:
- set(&pp.state, COMPATIBILITY, va_arg(ap, int));
+ if (ppset(&pp.state, COMPATIBILITY, va_arg(ap, int)))
+ {
#if COMPATIBLE
- if (pp.initialized)
- ppfsm(FSM_COMPATIBILITY, NiL);
+ if (pp.initialized)
+ ppfsm(FSM_COMPATIBILITY, NiL);
#else
- if (pp.state & COMPATIBILITY)
- error(3, "preprocessor not compiled with compatibility dialect enabled [COMPATIBLE]");
+ if (pp.state & COMPATIBILITY)
+ error(3, "preprocessor not compiled with compatibility dialect enabled [COMPATIBLE]");
#endif
- if (pp.state & COMPATIBILITY)
- pp.flags |= PP_compatibility;
- else
- pp.flags &= ~PP_compatibility;
+ if (pp.state & COMPATIBILITY)
+ pp.flags |= PP_compatibility;
+ else
+ pp.flags &= ~PP_compatibility;
+ }
break;
case PP_COMPILE:
if (pp.initialized)
@@ -510,7 +546,7 @@ ppop(int op, ...)
error_info.file = 0;
break;
case PP_DUMP:
- set(&pp.mode, DUMP, va_arg(ap, int));
+ ppset(&pp.mode, DUMP, va_arg(ap, int));
#if !CHECKPOINT
if (pp.mode & DUMP)
error(3, "preprocessor not compiled with checkpoint enabled [CHECKPOINT]");
@@ -539,7 +575,7 @@ ppop(int op, ...)
else if (streq(p, "-"))
{
if (pp.initialized)
- set(&pp.mode, HOSTED, c);
+ ppset(&pp.mode, HOSTED, c);
else
{
pp.hosted = c ? 1 : 2;
@@ -552,7 +588,7 @@ ppop(int op, ...)
}
else if (!pp.hosted)
{
- if (!*p || stat((pathcanon(p, 0), p), &st))
+ if (!*p || stat((pathcanon(p, 0, 0), p), &st))
pp.hosted = 1;
else
{
@@ -582,7 +618,7 @@ ppop(int op, ...)
case PP_IGNORE:
if (p = va_arg(ap, char*))
{
- pathcanon(p, 0);
+ pathcanon(p, 0, 0);
ppsetfile(p)->guard = INC_IGNORE;
message((-3, "%s: ignore", p));
}
@@ -595,7 +631,7 @@ ppop(int op, ...)
case PP_INCLUDE:
if ((p = va_arg(ap, char*)) && *p)
{
- pathcanon(p, 0);
+ pathcanon(p, 0, 0);
if (stat(p, &st))
break;
for (dp = pp.stddirs; dp = dp->next;)
@@ -750,7 +786,7 @@ ppop(int op, ...)
ppop(PP_COMPATIBILITY, 1);
ppop(PP_HOSTDIR, "-", 1);
ppop(PP_SPACEOUT, 1);
- set(&pp.state, DISABLE, va_arg(ap, int));
+ ppset(&pp.state, DISABLE, va_arg(ap, int));
}
}
@@ -838,7 +874,7 @@ ppop(int op, ...)
if (ppsearch(pp.ppdefault, T_STRING, SEARCH_EXISTS) < 0)
{
free(pp.ppdefault);
- if (!(pp.ppdefault = pathprobe(pp.path, NiL, "C", pp.pass, pp.probe ? pp.probe : PPPROBE, 0)))
+ if (!(pp.ppdefault = pathprobe("C", pp.pass, pp.probe ? pp.probe : PPPROBE, 0, pp.path, MAXTOKEN + 1, NiL, 0)))
error(1, "cannot determine default definitions for %s", pp.probe ? pp.probe : PPPROBE);
}
if (pp.probe)
@@ -1103,7 +1139,7 @@ ppop(int op, ...)
error_info.file = 0;
if (*p)
{
- pathcanon(p, 0);
+ pathcanon(p, 0, 0);
p = ppsetfile(p)->name;
}
}
@@ -1181,7 +1217,7 @@ ppop(int op, ...)
error(ERROR_SYSTEM|3, "%s: cannot read", p);
if (strmatch(p, "*.(s|S|as|AS|asm|ASM)"))
{
- set(&pp.mode, CATLITERAL, 0);
+ ppset(&pp.mode, CATLITERAL, 0);
ppop(PP_SPACEOUT, 1);
}
break;
@@ -1203,46 +1239,59 @@ ppop(int op, ...)
case PP_KEYARGS:
if (pp.initialized)
goto before;
- set(&pp.option, KEYARGS, va_arg(ap, int));
+ ppset(&pp.option, KEYARGS, va_arg(ap, int));
if (pp.option & KEYARGS)
#if MACKEYARGS
- set(&pp.mode, CATLITERAL, 1);
+ ppset(&pp.mode, CATLITERAL, 1);
#else
error(3, "preprocessor not compiled with macro keyword arguments enabled [MACKEYARGS]");
#endif
break;
case PP_LINE:
- pp.linesync = va_arg(ap, PPLINESYNC);
+ if (ppok(op))
+ pp.linesync = va_arg(ap, PPLINESYNC);
break;
case PP_LINEBASE:
- if (va_arg(ap, int))
- pp.flags |= PP_linebase;
- else
- pp.flags &= ~PP_linebase;
+ if (ppok(op))
+ {
+ if (va_arg(ap, int))
+ pp.flags |= PP_linebase;
+ else
+ pp.flags &= ~PP_linebase;
+ }
break;
case PP_LINEFILE:
- if (va_arg(ap, int))
- pp.flags |= PP_linefile;
- else
- pp.flags &= ~PP_linefile;
+ if (ppok(op))
+ {
+ if (va_arg(ap, int))
+ pp.flags |= PP_linefile;
+ else
+ pp.flags &= ~PP_linefile;
+ }
break;
case PP_LINEID:
- if (!(p = va_arg(ap, char*)))
- pp.lineid = "";
- else if (*p != '-')
- pp.lineid = strdup(p);
- else
- pp.option |= IGNORELINE;
+ if (ppok(op))
+ {
+ if (!(p = va_arg(ap, char*)))
+ pp.lineid = "";
+ else if (*p != '-')
+ pp.lineid = strdup(p);
+ else
+ pp.option |= IGNORELINE;
+ }
break;
case PP_LINETYPE:
- if ((n = va_arg(ap, int)) >= 1)
- pp.flags |= PP_linetype;
- else
- pp.flags &= ~PP_linetype;
- if (n >= 2)
- pp.flags |= PP_linehosted;
- else
- pp.flags &= ~PP_linehosted;
+ if (ppok(op))
+ {
+ if ((n = va_arg(ap, int)) >= 1)
+ pp.flags |= PP_linetype;
+ else
+ pp.flags &= ~PP_linetype;
+ if (n >= 2)
+ pp.flags |= PP_linehosted;
+ else
+ pp.flags &= ~PP_linehosted;
+ }
break;
case PP_LOCAL:
if (pp.initialized)
@@ -1256,15 +1305,15 @@ ppop(int op, ...)
pp.macref = va_arg(ap, PPMACREF);
break;
case PP_MULTIPLE:
- set(&pp.mode, ALLMULTIPLE, va_arg(ap, int));
+ ppset(&pp.mode, ALLMULTIPLE, va_arg(ap, int));
break;
case PP_NOHASH:
- set(&pp.option, NOHASH, va_arg(ap, int));
+ ppset(&pp.option, NOHASH, va_arg(ap, int));
break;
case PP_NOISE:
op = va_arg(ap, int);
- set(&pp.option, NOISE, op);
- set(&pp.option, NOISEFILTER, op < 0);
+ ppset(&pp.option, NOISE, op);
+ ppset(&pp.option, NOISEFILTER, op < 0);
break;
case PP_OPTARG:
pp.optarg = va_arg(ap, PPOPTARG);
@@ -1279,20 +1328,17 @@ ppop(int op, ...)
break;
case PP_PASSTHROUGH:
if (!(pp.state & COMPILE))
- set(&pp.state, PASSTHROUGH, va_arg(ap, int));
+ ppset(&pp.state, PASSTHROUGH, va_arg(ap, int));
break;
case PP_PEDANTIC:
- set(&pp.mode, PEDANTIC, va_arg(ap, int));
+ ppset(&pp.mode, PEDANTIC, va_arg(ap, int));
break;
case PP_PLUSCOMMENT:
- set(&pp.option, PLUSCOMMENT, va_arg(ap, int));
- if (pp.initialized)
+ if (ppset(&pp.option, PLUSCOMMENT, va_arg(ap, int)) && pp.initialized)
ppfsm(FSM_PLUSPLUS, NiL);
break;
case PP_PLUSPLUS:
- set(&pp.option, PLUSPLUS, va_arg(ap, int));
- set(&pp.option, PLUSCOMMENT, va_arg(ap, int));
- if (pp.initialized)
+ if (ppset(&pp.option, PLUSPLUS, va_arg(ap, int)) && ppset(&pp.option, PLUSCOMMENT, va_arg(ap, int)) && pp.initialized)
ppfsm(FSM_PLUSPLUS, NiL);
break;
case PP_POOL:
@@ -1340,7 +1386,7 @@ ppop(int op, ...)
ppfsm(c ? FSM_QUOTADD : FSM_QUOTDEL, p);
break;
case PP_REGUARD:
- set(&pp.option, REGUARD, va_arg(ap, int));
+ ppset(&pp.option, REGUARD, va_arg(ap, int));
break;
case PP_RESERVED:
if ((pp.state & COMPILE) && (p = va_arg(ap, char*)))
@@ -1390,7 +1436,7 @@ ppop(int op, ...)
}
break;
case PP_SPACEOUT:
- set(&pp.state, SPACEOUT, va_arg(ap, int));
+ ppset(&pp.state, SPACEOUT, va_arg(ap, int));
break;
case PP_STANDALONE:
if (pp.initialized)
@@ -1413,13 +1459,15 @@ ppop(int op, ...)
}
break;
case PP_STRICT:
- set(&pp.state, TRANSITION, 0);
- pp.flags &= ~PP_transition;
- set(&pp.state, STRICT, va_arg(ap, int));
- if (pp.state & STRICT)
- pp.flags |= PP_strict;
- else
- pp.flags &= ~PP_strict;
+ if (ppset(&pp.state, STRICT, va_arg(ap, int)))
+ {
+ if (ppset(&pp.state, TRANSITION, 0))
+ pp.flags &= ~PP_transition;
+ if (pp.state & STRICT)
+ pp.flags |= PP_strict;
+ else
+ pp.flags &= ~PP_strict;
+ }
break;
case PP_TEST:
if (p = va_arg(ap, char*))
@@ -1477,20 +1525,22 @@ ppop(int op, ...)
}
break;
case PP_TRANSITION:
- set(&pp.state, STRICT, 0);
- pp.flags &= ~PP_strict;
- set(&pp.state, TRANSITION, va_arg(ap, int));
- if (pp.state & TRANSITION)
- pp.flags |= PP_transition;
- else
- pp.flags &= ~PP_transition;
+ if (ppset(&pp.state, TRANSITION, va_arg(ap, int)))
+ {
+ if (ppset(&pp.state, STRICT, 0))
+ pp.flags &= ~PP_strict;
+ if (pp.state & TRANSITION)
+ pp.flags |= PP_transition;
+ else
+ pp.flags &= ~PP_transition;
+ }
break;
case PP_TRUNCATE:
if (pp.initialized)
goto before;
if ((op = va_arg(ap, int)) < 0)
op = 0;
- set(&pp.option, TRUNCATE, op);
+ ppset(&pp.option, TRUNCATE, op);
if (pp.option & TRUNCATE)
{
Hash_bucket_t* b;
@@ -1529,7 +1579,7 @@ ppop(int op, ...)
else
dp->type &= ~TYPE_VENDOR;
}
- else if (!stat((pathcanon(p, 0), p), &st))
+ else if (!stat((pathcanon(p, 0, 0), p), &st))
{
c = 0;
for (dp = pp.firstdir; dp; dp = dp->next)
@@ -1544,7 +1594,7 @@ ppop(int op, ...)
}
break;
case PP_WARN:
- set(&pp.state, WARN, va_arg(ap, int));
+ ppset(&pp.state, WARN, va_arg(ap, int));
break;
before:
error(3, "ppop(%d): preprocessor operation must be done before PP_INIT", op);
diff --git a/usr/src/lib/libpp/common/pppragma.c b/usr/src/contrib/ast/src/lib/libpp/pppragma.c
index 99d3dfa388..18166fe753 100644
--- a/usr/src/lib/libpp/common/pppragma.c
+++ b/usr/src/contrib/ast/src/lib/libpp/pppragma.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppprintf.c b/usr/src/contrib/ast/src/lib/libpp/ppprintf.c
index 4a7f09e8ba..648bbd243c 100644
--- a/usr/src/lib/libpp/common/ppprintf.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppprintf.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/ppproto.c b/usr/src/contrib/ast/src/lib/libpp/ppproto.c
index 2a197b231a..9aaeb5a223 100644
--- a/usr/src/lib/libpp/common/ppproto.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppproto.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -46,16 +46,24 @@
#endif
-#define MAGICGEN "/* : : generated by proto : : */\n"
+#define GENERATED "/* : : generated by proto : : */\n"
-#define MAGICDIR "pragma" /* proto magic directive */
-#define MAGICARG "prototyped" /* proto magic directive arg */
-#define MAGICOFF "noticed" /* no notice if found in pragma */
-#define MAGICTOP 64 /* must be in these top lines */
-#define NOTICED "Copyright" /* no notice if found in magic */
-#define PUBLICDOMAIN "Public Domain" /* no notice if found in magic */
+#define PRAGMADIR "pragma" /* pragma directive */
+#define MAGICTOP 80 /* must be in these top lines */
-struct proto /* proto buffer state */
+#ifndef elementsof
+#define elementsof(x) (sizeof(x)/sizeof(x[0]))
+#endif
+
+typedef struct Key_s
+{
+ const char* name;
+ size_t size;
+ int hit;
+ int val;
+} Key_t;
+
+typedef struct Proto_s /* proto buffer state */
{
int brace; /* {..} level */
int call; /* call level */
@@ -86,7 +94,7 @@ struct proto /* proto buffer state */
/* output buffer */
/* slide buffer */
/* input buffer */
-};
+} Proto_t;
/*
* proto is separate from pp so these undef's are ok
@@ -166,12 +174,36 @@ struct proto /* proto buffer state */
#ifndef CHUNK
#define CHUNK 1024
#endif
-#define BLOCK (8*CHUNK)
+#define BLOCK (16*CHUNK)
#define T_VA_START (N_TOKEN+1)
#define RESERVED(b,e,n) ((((long)(b))<<16)|(((long)(e))<<8)|((long)(n)))
+#define KEYENT(s,m,v) {s,sizeof(s)-1,m,v}
+
+#define HIT_prototyped 0x01
+#define HIT_noticed 0x02
+
+static const Key_t pragmas[] =
+{
+ KEYENT("prototyped", HIT_prototyped, 1), /* NOTE: first entry */
+ KEYENT("noprototyped", HIT_prototyped, 0),
+ KEYENT("noticed", HIT_noticed, 1),
+ KEYENT("nonoticed", HIT_noticed, 0),
+};
+
+#if PROTOMAIN
+static const Key_t notices[] =
+{
+ KEYENT("Copyright", HIT_noticed, 1),
+ KEYENT("COPYRIGHT", HIT_noticed, 1),
+ KEYENT("copyright", HIT_noticed, 1),
+ KEYENT("Public Domain", HIT_noticed, 0),
+ KEYENT("PUBLIC DOMAIN", HIT_noticed, 0),
+};
+#endif
+
/*
* generate integer
* pointer to end returned
@@ -225,7 +257,7 @@ sstrlen(register const char* s)
*/
static int
-sstrncmp(register const char* s, register char* t, register int n)
+sstrncmp(register const char* s, register const char* t, register int n)
{
register const char* e = s + n;
@@ -261,7 +293,7 @@ proto_error(char* iob, int level, char* msg, char* arg)
p = strcopy(buf, "proto: ");
if (iob)
{
- register struct proto* proto = (struct proto*)(iob - sizeof(struct proto));
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
if (proto->line)
{
@@ -333,7 +365,7 @@ memcopy(register char* s, register char* t, int n)
*/
static char*
-linesync(register struct proto* proto, register char* p, register long n)
+linesync(register Proto_t* proto, register char* p, register long n)
{
#if PROTOMAIN
if (proto->flags & LINESYNC)
@@ -356,7 +388,7 @@ linesync(register struct proto* proto, register char* p, register long n)
*/
static char*
-init(struct proto* proto, char* op, int flags)
+init(Proto_t* proto, char* op, int flags)
{
register char* s;
@@ -540,7 +572,7 @@ directive(register char* s, int dir)
*/
static int
-lex(register struct proto* proto, register long flags)
+lex(register Proto_t* proto, register long flags)
{
register char* ip;
register char* op;
@@ -1327,7 +1359,7 @@ if !defined(va_start)\n\
*v++ = ' ';
v = memcopy(v, im, ie - im);
*v = 0;
- proto_error((char*)proto + sizeof(struct proto), 2, op, NiL);
+ proto_error((char*)proto + sizeof(Proto_t), 2, op, NiL);
}
ip--;
/*UNDENT...*/
@@ -1478,7 +1510,7 @@ if !defined(va_start)\n\
else if (*ie == ')')
{
if (op > om && *(op - 1) == '(')
- proto_error((char*)proto + sizeof(struct proto), 1, "function pointer argument prototype omitted", NiL);
+ proto_error((char*)proto + sizeof(Proto_t), 1, "function pointer argument prototype omitted", NiL);
PUTCHR(*ie++);
while (*ie == ' ' || *ie == '\t' || *ie == '\n') ie++;
}
@@ -2063,27 +2095,40 @@ if !defined(va_start)\n\
else if (flags & (INIT_DEFINE|INIT_INCLUDE))
{
#if PROTOMAIN
- if ((flags & YACC) && c == '%' && *ip == '{') t = 0;
+ if ((flags & YACC) && c == '%' && *ip == '{')
+ t = 0;
else
#endif
{
- if (c == '#') for (t = ip; *t == ' ' || *t == '\t'; t++);
- else t = "";
- if (*t++ == 'i' && *t++ == 'f' && *t++ == 'n' && *t++ == 'd' && *t++ == 'e' && *t++ == 'f')
+ if (c == '#')
{
+ for (t = ip; *t == ' ' || *t == '\t'; t++);
+ if (*t++ == 'i' && *t++ == 'f' && *t++ == 'n' && *t++ == 'd' && *t++ == 'e' && *t++ == 'f')
+ {
#if !PROTOMAIN
- while (*t == ' ' || *t == '\t') t++;
- if (*t != '_')
+ while (*t == ' ' || *t == '\t') t++;
+ if (*t != '_')
#endif
- t = 0;
+ t = 0;
+ }
}
+ else
+ t = "";
}
if (t)
{
+#if PROTOMAIN
+ n = ip - proto->tp;
+ ip -= n;
+ op -= n;
+#else
ip = bp;
op = proto->op;
+#endif
}
- else while (*ip != '\n') *op++ = *ip++;
+ else
+ while (*ip != '\n')
+ *op++ = *ip++;
op = init(proto, op, flags);
op = linesync(proto, op, proto->line);
flags &= ~(INIT_DEFINE|INIT_INCLUDE);
@@ -2101,7 +2146,7 @@ if !defined(va_start)\n\
void
pppclose(char* iob)
{
- register struct proto* proto = (struct proto*)(iob - sizeof(struct proto));
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
if (proto->flags & MORE) close(proto->fd);
free((char*)proto); /* some ANSI cc's botch the free() prototype */
@@ -2122,11 +2167,16 @@ pppclose(char* iob)
char*
pppopen(char* file, int fd, char* notice, char* options, char* package, char* comment, int flags)
{
- register struct proto* proto;
+ register Proto_t* proto;
register char* iob;
register long n;
register char* s;
+ char* t;
int pragma;
+ int clr;
+ int hit;
+ int i;
+ int z;
char* b;
#if PROTOMAIN
int comlen;
@@ -2160,7 +2210,7 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
* file read in one chunk
*/
- if (!(proto = newof(0, struct proto, 1, 4 * n + 2)))
+ if (!(proto = newof(0, Proto_t, 1, 4 * n + 2)))
return 0;
proto->iz = n;
proto->oz = 3 * n;
@@ -2174,7 +2224,7 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
*/
n = BLOCK;
- if (!(proto = newof(0, struct proto, 1, 5 * n + 2)))
+ if (!(proto = newof(0, Proto_t, 1, 5 * n + 2)))
return 0;
proto->iz = n;
proto->oz = 3 * n;
@@ -2182,7 +2232,7 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
}
proto->fd = fd;
proto->package = package;
- iob = (char*)proto + sizeof(struct proto);
+ iob = (char*)proto + sizeof(Proto_t);
proto->op = proto->ob = iob;
proto->ip = proto->ib = iob + proto->oz + n;
if (m) proto->options |= REGULAR;
@@ -2227,43 +2277,53 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
if (!notice && !options || (comlen = astlicense(com, sizeof(com), NiL, "type=check", proto->cc[0], proto->cc[1], proto->cc[2])) <= 0)
*com = 0;
#endif
+ hit = (notice || options) ? 0 : HIT_noticed;
pragma = -1;
s = proto->ip;
m = MAGICTOP;
- while (m-- > 0 && *s)
+ while (m-- > 0 && *s && hit != (HIT_prototyped|HIT_noticed))
{
- while (*s == ' ' || *s == '\t') s++;
+ while (*s == ' ' || *s == '\t')
+ s++;
if (*s == '#')
{
b = s++;
- while (*s == ' ' || *s == '\t') s++;
- if (!strncmp(s, MAGICDIR, sizeof(MAGICDIR) - 1) && (*(s += sizeof(MAGICDIR) - 1) == ' ' || *s == '\t'))
+ while (*s == ' ' || *s == '\t')
+ s++;
+ if (*s == *PRAGMADIR && !strncmp(s, PRAGMADIR, sizeof(PRAGMADIR) - 1) && (*(s += sizeof(PRAGMADIR) - 1) == ' ' || *s == '\t'))
{
- while (*s == ' ' || *s == '\t') s++;
- if (*s == 'n' && *(s + 1) == 'o')
+ clr = 0;
+ while (*s && *s != '\r' && *s != '\n')
{
- s += 2;
- pragma = -2;
- }
- if (!strncmp(s, MAGICARG, sizeof(MAGICARG) - 1) && (*(s += sizeof(MAGICARG) - 1) == ' ' || *s == '\t' || *s == '\n' || *s == '\r'))
- while (*s)
- {
- if ((*(s - 1) == ' ' || *(s - 1) == '\t') && *s == *MAGICOFF && !strncmp(s, MAGICOFF, sizeof(MAGICOFF) - 1))
- notice = options = 0;
- if (*s++ == '\n')
+ for (; *s == ' ' || *s == '\t'; s++);
+ for (t = s; *s && *s != ' ' && *s != '\t' && *s != '\r' && *s != '\n'; s++);
+ z = s - t;
+ for (i = 0; i < elementsof(pragmas); i++)
+ if (pragmas[i].size == z && !strncmp(t, pragmas[i].name, z))
{
- pragma += 2;
+ clr = 1;
+ hit |= pragmas[i].hit;
+ switch (pragmas[i].hit)
+ {
+ case HIT_noticed:
+ notice = options = 0;
+ break;
+ case HIT_prototyped:
+ pragma = pragmas[i].val;
+ break;
+ }
+ }
+ }
+ if (clr)
+ {
#if PROTOMAIN
- if (!(flags & PROTO_DISABLE) || (flags & PROTO_NOPRAGMA))
+ if (!(flags & PROTO_DISABLE) || (flags & PROTO_NOPRAGMA))
#endif
- for (s--; b < s; *b++ = ' ');
- goto magic;
- }
- }
- pragma = -1;
+ for (; b < s; *b++ = ' ');
+ }
}
}
- else if (*s == '/' && !strncmp(s, MAGICGEN, sizeof(MAGICGEN) - 1))
+ else if (*s == *GENERATED && !strncmp(s, GENERATED, sizeof(GENERATED) - 1))
{
pragma = 0;
break;
@@ -2271,40 +2331,40 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
#if PROTOMAIN
else if (*s == '%' && *(s + 1) == '{')
proto->flags |= YACC;
- if (notice || options)
+ else if (!(hit & HIT_noticed))
{
if (*s == *com && !strncmp(s, com, comlen))
+ {
+ hit |= HIT_noticed;
notice = options = 0;
+ }
else
- while (*s)
- {
- if (*s == *NOTICED && !strncmp(s, NOTICED, sizeof(NOTICED) - 1))
- {
- s += sizeof(NOTICED) - 1;
- while (*s == ' ' || *s == '\t')
- s++;
- if (*s == '(' && (*(s + 1) == 'c' || *(s + 1) == 'C') && *(s + 2) == ')' || *s >= '0' && *s <= '9' && *(s + 1) >= '0' && *(s + 1) <= '9')
+ for (; *s && *s != '\n' && !(hit & HIT_noticed); s++)
+ for (i = 0; i < elementsof(notices); i++)
+ if (*s == notices[i].name[0] && !strncmp(s, notices[i].name, notices[i].size))
{
- notice = options = 0;
+ s += notices[i].size;
+ if (notices[i].val)
+ {
+ while (*s == ' ' || *s == '\t')
+ s++;
+ if (*s == '(' && (*(s + 1) == 'c' || *(s + 1) == 'C') && *(s + 2) == ')' || *s >= '0' && *s <= '9' && *(s + 1) >= '0' && *(s + 1) <= '9')
+ {
+ hit |= notices[i].hit;
+ notice = options = 0;
+ }
+ }
+ else
+ {
+ hit |= notices[i].hit;
+ notice = options = 0;
+ }
break;
}
- }
- if (*s == *PUBLICDOMAIN && !strncmp(s, PUBLICDOMAIN, sizeof(PUBLICDOMAIN) - 1))
- {
- notice = options = 0;
- break;
- }
- else if (*s++ == '\n')
- {
- s--;
- break;
- }
- }
}
#endif
while (*s && *s++ != '\n');
}
- magic:
if (flags & PROTO_PLUSPLUS) proto->flags |= PLUSPLUS;
if (flags & PROTO_TEST) proto->test = 1;
if (flags & PROTO_EXTERNALIZE) proto->options |= EXTERNALIZE;
@@ -2348,7 +2408,7 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
if (proto->cc[0])
{
if ((comlen = astlicense(proto->op, proto->oz, notice, options, proto->cc[0], proto->cc[1], proto->cc[2])) < 0)
- proto_error((char*)proto + sizeof(struct proto), 1, proto->op, NiL);
+ proto_error((char*)proto + sizeof(Proto_t), 1, proto->op, NiL);
else
proto->op += comlen;
}
@@ -2376,7 +2436,7 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
if (notice || options)
{
if ((comlen = astlicense(proto->op, proto->oz, notice, options, proto->cc[0], proto->cc[1], proto->cc[2])) < 0)
- proto_error((char*)proto + sizeof(struct proto), 1, proto->op, NiL);
+ proto_error((char*)proto + sizeof(Proto_t), 1, proto->op, NiL);
else
proto->op += comlen;
}
@@ -2394,9 +2454,9 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
if (flags & PROTO_CLASSIC)
{
*proto->op++ = '#';
- proto->op = strcopy(proto->op, MAGICDIR);
+ proto->op = strcopy(proto->op, PRAGMADIR);
*proto->op++ = ' ';
- proto->op = strcopy(proto->op, MAGICARG);
+ proto->op = strcopy(proto->op, pragmas[0].name);
*proto->op++ = '\n';
}
else
@@ -2409,14 +2469,14 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
if (proto->flags & YACC)
{
proto->op = strcopy(proto->op, "\n%{\n" + !notice);
- proto->op = strcopy(proto->op, MAGICGEN);
+ proto->op = strcopy(proto->op, GENERATED);
proto->op = strcopy(proto->op, "%}\n");
}
else
{
if (n || notice || options)
*proto->op++ = '\n';
- proto->op = strcopy(proto->op, MAGICGEN);
+ proto->op = strcopy(proto->op, GENERATED);
if (n)
proto->op = linesync(proto, proto->op, proto->line);
else if (proto->flags & (INIT_DEFINE|INIT_INCLUDE))
@@ -2445,7 +2505,7 @@ pppopen(char* file, int fd, char* notice, char* options, char* package, char* co
int
pppread(char* iob)
{
- register struct proto* proto = (struct proto*)(iob - sizeof(struct proto));
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
register int n;
if (proto->flags & PASS)
@@ -2544,7 +2604,7 @@ pppread(char* iob)
int
pppdrop(char* iob)
{
- register struct proto* proto = (struct proto*)(iob - sizeof(struct proto));
+ register Proto_t* proto = (Proto_t*)(iob - sizeof(Proto_t));
if (proto->flags & MORE)
{
diff --git a/usr/src/lib/libpp/common/ppsearch.c b/usr/src/contrib/ast/src/lib/libpp/ppsearch.c
index 9730ad177f..451658c8c6 100644
--- a/usr/src/lib/libpp/common/ppsearch.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppsearch.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2012 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -146,9 +146,9 @@ search(register struct ppfile* fp, register struct ppdirs* dp, int type, int fla
(fp->flags & INC_BOUND(INC_STANDARD)) ? "STANDARD|" : "",
dp ? (dp->index == INC_PREFIX ? "pre" : dp->index == INC_LOCAL ? "lcl" : dp->index == INC_VENDOR ? "vnd" : "std") : NiL,
dp ? dp->name : NiL,
- !(fp->flags & INC_MEMBER(INC_PREFIX)) && (xp = fp->bound[INC_PREFIX]) ? xp->name : NiL,
- !(fp->flags & INC_MEMBER(INC_LOCAL)) && (xp = fp->bound[INC_LOCAL]) ? xp->name : NiL,
- !(fp->flags & INC_MEMBER(INC_VENDOR)) && (xp = fp->bound[INC_VENDOR]) ? xp->name : NiL,
+ !(fp->flags & INC_MEMBER(INC_PREFIX)) && fp->bound[INC_PREFIX] ? fp->bound[INC_PREFIX]->name : NiL,
+ !(fp->flags & INC_MEMBER(INC_LOCAL)) && fp->bound[INC_LOCAL] ? fp->bound[INC_LOCAL]->name : NiL,
+ !(fp->flags & INC_MEMBER(INC_VENDOR)) && fp->bound[INC_VENDOR] ? fp->bound[INC_VENDOR]->name : NiL,
!(fp->flags & INC_MEMBER(INC_STANDARD)) && (xp = fp->bound[INC_STANDARD]) ? xp->name : NiL,
error_info.file
));
@@ -289,7 +289,7 @@ search(register struct ppfile* fp, register struct ppdirs* dp, int type, int fla
*t = 0;
if (!streq(s, VDB_DIRECTORY))
{
- pathcanon(s, 0);
+ pathcanon(s, 0, 0);
ap = newof(0, struct ppmember, 1, 0);
ap->archive = dp;
ap->offset = strtol(t + 1, &t, 10);
@@ -370,7 +370,7 @@ if (pp.test & 0x0020) error(1, "VDB#%d %s %s index=%d data=<%lu,%lu>", __LINE__,
strcpy(pp.path, fp->name);
else
sfsprintf(pp.path, PATH_MAX - 1, "%s/%s", dp->name, fp->name);
- pathcanon(pp.path, 0);
+ pathcanon(pp.path, PATH_MAX, 0);
if (!xp || !streq(xp->name, pp.path))
{
fp->bound[index] = xp = ppsetfile(pp.path);
@@ -418,7 +418,7 @@ if (pp.test & 0x0020) error(1, "VDB#%d %s %s index=%d data=<%lu,%lu>", __LINE__,
strcpy(pp.path, fp->name);
else
sfsprintf(pp.path, PATH_MAX - 1, "%s/%s", dp->name, fp->name);
- pathcanon(pp.path, 0);
+ pathcanon(pp.path, PATH_MAX, 0);
if (!(flags & SEARCH_SKIP))
{
int found;
@@ -597,17 +597,20 @@ ppsearch(char* file, int type, int flags)
register struct ppfile* fp;
register char* s;
register struct ppdirs* dp;
+ char* t;
struct oplist* cp;
struct ppfile* xp;
int dospath;
int chop;
int fd;
int index;
+ int prefix;
char name[MAXTOKEN + 1];
pp.include = 0;
fd = -1;
chop = 0;
+ prefix = pp.chop ? -1 : 0;
if (s = strchr(file, '\\'))
{
do *s++ = '/'; while (s = strchr(s, '\\'));
@@ -616,7 +619,7 @@ ppsearch(char* file, int type, int flags)
else
dospath = 0;
again:
- pathcanon(file, 0);
+ pathcanon(file, 0, 0);
if (chop)
for (cp = pp.chop; cp; cp = cp->next)
if (strneq(file, cp->value, cp->op))
@@ -738,12 +741,14 @@ ppsearch(char* file, int type, int flags)
if (fd >= 0)
{
sfsprintf(name, sizeof(name) - 1, "%s/%s", pp.in->prefix, fp->name);
- pathcanon(name, 0);
+ pathcanon(name, sizeof(name), 0);
xp = ppsetfile(name);
if ((fd = search(xp, dp, type, flags)) >= 0)
return fd;
}
}
+ else if (!prefix)
+ prefix = 1;
}
if ((fd = search(fp, dp, type, flags)) < 0)
{
@@ -770,7 +775,7 @@ ppsearch(char* file, int type, int flags)
{
file[1] = file[0];
file[0] = '/';
- pathcanon(file, 0);
+ pathcanon(file, 0, 0);
dospath = 2;
goto again;
}
@@ -787,6 +792,22 @@ ppsearch(char* file, int type, int flags)
type = T_STRING;
goto again;
}
+ if (prefix > 0)
+ {
+ prefix = -1;
+ if (error_info.file && *error_info.file && (s = strrchr(error_info.file + 1, '/')))
+ {
+ *s = 0;
+ if (t = strrchr(error_info.file + 1, '/'))
+ {
+ sfsprintf(name, sizeof(name), "%s/%s", t + 1, file);
+ file = ppsetfile(name)->name;
+ }
+ *s = '/';
+ if (t)
+ goto again;
+ }
+ }
if (!(pp.mode & GENDEPS))
{
if (!(pp.option & ALLPOSSIBLE) || pp.in->prev->prev)
diff --git a/usr/src/lib/libpp/common/ppsym.c b/usr/src/contrib/ast/src/lib/libpp/ppsym.c
index 1fd5ea9105..c4776ae962 100644
--- a/usr/src/lib/libpp/common/ppsym.c
+++ b/usr/src/contrib/ast/src/lib/libpp/ppsym.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libpp/common/pptrace.c b/usr/src/contrib/ast/src/lib/libpp/pptrace.c
index d46e50e23d..d7e32ef9c4 100644
--- a/usr/src/lib/libpp/common/pptrace.c
+++ b/usr/src/contrib/ast/src/lib/libpp/pptrace.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1986-2009 AT&T Intellectual Property *
+* Copyright (c) 1986-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/contrib/ast/src/lib/libpp/probe.win32 b/usr/src/contrib/ast/src/lib/libpp/probe.win32
new file mode 100755
index 0000000000..2202e9b441
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libpp/probe.win32
@@ -0,0 +1,412 @@
+:
+# @(#)probe.win32 (AT&T Research) 2009-03-19
+#
+# win32 specific pp C probe initialization
+# wrapped cc's are easy on uwin
+#
+# 2> easy.err to avoid mysterious hang with bcc
+
+# begin preamble shared with the make probe.ini
+
+IFS=$'\n'
+
+chmod 777 .
+
+typeset -A header version
+
+# we are probing on behalf of libpp and nmake
+# so the native preprocessor must be forced in
+# order to bootstrap libpp and nmake
+
+nativepp=-1
+export nativepp
+
+probe_header="
+stddef.h
+"
+for inc in syslimits.h winerror.h ostream bits/ctype_base.h stream.h
+do echo "#include <$inc>" > easy.c
+ if $cc -E easy.c > /dev/null 2> easy.err
+ then probe_header="$probe_header
+$inc
+"
+ fi
+done
+
+{
+for i in $probe_header
+do echo "#include <$i>"
+done
+echo '#ifdef __cplusplus'
+echo "int _Pr0b3_cplus=__cplusplus;"
+echo '#endif'
+echo '#ifdef _UWIN'
+echo "int _Pr0b3_uwin=_UWIN;"
+echo '#endif'
+echo '#ifdef __BORLANDC__'
+echo "int _Pr0b3_version_BORLAND=__BORLANDC__;"
+echo '#endif'
+echo '#ifdef __DMC__'
+echo "int _Pr0b3_version_DM=__DMC__;"
+echo '#endif'
+echo '#ifdef _MSC_VER'
+echo "int _Pr0b3_version_MS=_MSC_VER;"
+echo '#endif'
+echo '#ifdef __ICL'
+echo "int _Pr0b3_version_ICL=__ICL;"
+echo '#endif'
+echo '#ifdef __LCC__'
+echo "int _Pr0b3_version_LCC=0+__LCC__;"
+echo '#endif'
+echo '#ifdef __MINGW32__'
+echo "int _Pr0b3_version_MINGW=__MINGW32__;"
+echo '#endif'
+echo '#ifdef __INTERIX'
+echo "int _Pr0b3_version_INTERIX=__INTERIX;"
+echo '#endif'
+echo '#ifdef __WATCOMC__'
+echo "int _Pr0b3_version_WATCOM=__WATCOMC__;"
+echo '#endif'
+} > easy.c
+
+include=
+uwin=
+cplus=
+
+$cc -E easy.c 2>&1 |
+egrep -i '^(#(line)? 1 .*\.[hH]| *int +_Pr0b3_[a-zA-Z_]* *= *[0-9])' |
+sed -e 's,_Pr0b3_,,' \
+ -e 's/.*"\(.*\)".*/\1/' \
+ -e 's,^ *,,' \
+ -e 's, *$,,' \
+ -e 's, *= *,=,' \
+ -e 's,^\(.\):[\\/]*,/\1/,' \
+ -e 's,[\\/][\\/]*,/,g' \
+ -e 's,^\(/.*\)/\(.*\)$,header[\2]="\1",' \
+ -e 's, *int *\(.*\);.*,\1,' \
+ -e 's,^version_\(.*\)=,version[\1]=,' \
+ > easy.sh
+. ./easy.sh
+
+include=
+for i in $probe_header
+do d=${header[$i]}
+ if [[ $d ]]
+ then include="$include
+$d"
+ elif [[ $i == */* ]]
+ then d=${header[${i##*/}]}
+ if [[ $d == */${i%/*} ]]
+ then include="$include
+${d%/${i%/*}}"
+ fi
+ fi
+done
+
+i=$($cc -V 2> easy.err)
+if test "" != "$i" -a -d "$i/include"
+then include="$i/include
+$include"
+fi
+
+stdinclude=
+for inc in $include
+do if [[ ${inc%/*} -ef /msdev/platformsdk ]]
+ then inc=/msdev/platformsdk/${inc##*/}
+ elif [[ ${inc%/*} -ef /platformsdk ]]
+ then inc=/platformsdk/${inc##*/}
+ fi
+ for dup in $stdinclude
+ do [[ $inc -ef $dup ]] && continue 2
+ done
+ stdinclude="$stdinclude
+$inc"
+done
+
+# end preamble shared with the make probe.ini
+
+pragexpand='#pragma pp:pragmaexpand'
+
+if [[ ${version[BORLAND]} ]]
+then version=${version[BORLAND]} VERSION=__BORLANDC__
+ reserved="#pragma pp:reserved __asm=GROUP __based=GROUP __cdecl __declspec=GROUP __except __export __far __fastcall __finally __huge __inline __int16 __int32 __int64 __int8 __leave __near __novtordisp __pascal __restrict __stdcall __syscall __try __unaligned __wchar_t
+#pragma pp:reserved _asm=GROUP _based=GROUP _cdecl _declspec=GROUP _except _export _far _fastcall _finally _fortran _huge _int16 _int32 _int64 _int8 _leave _near _pascal _stdcall _syscall _try
+#pragma pp:reserved cdecl const enum far fortran huge near pascal signed void volatile"
+ specific="#define <long long> __int64
+#define <__int64 int> __int64
+#define <__int64 unsigned> unsigned __int64"
+ pragexpand='#pragma pp:nopragmaexpand'
+ pragmas="#pragma pp:nocatliteral
+#pragma pp:stringsplit
+#pragma pp:lineid line"
+elif [[ ${version[DM]} ]]
+then version=${version[DM]} VERSION=__DMC__
+ reserved="#pragma pp:reserved _Bool _Complex _Imaginary asm=GROUP _asm=GROUP __asm=GROUP const enum _fortran __inline _int64 __int64 __restrict signed void volatile _based=GROUP __based=GROUP cdecl _cdecl __cdecl _declspec=GROUP __declspec=GROUP _except __except _export __export far _far __far _fastcall __fastcall _finally __finally huge _huge __huge _interrupt __interrupt _leave __leave _loadds __loadds near _near __near pascal _pascal __pascal _saveregs __saveregs _segname __segname _stdcall __stdcall _syscall __syscall _try __try _cs __cs _ss __ss _unaligned __unaligned"
+ specific="#define __TIMESTAMP__ __DATE__ \" \" __TIME__"
+ pragmas="#pragma pp:transition
+#pragma pp:elseif
+#pragma pp:lineid line"
+elif [[ ${version[MS]} ]]
+then version=${version[MS]} VERSION=_MSC_VER
+ reserved="#pragma pp:reserved __asm=GROUP __based=GROUP __cdecl __declspec=GROUP __except __export __far __fastcall __finally __huge __inline __int16 __int32 __int64 __int8 __leave __near __novtordisp __pascal __restrict __stdcall __syscall __try __unaligned __wchar_t
+#pragma pp:reserved _asm=GROUP _based=GROUP _cdecl _declspec=GROUP _except _export _far _fastcall _finally _fortran _huge _int16 _int32 _int64 _int8 _leave _near _pascal _stdcall _syscall _try
+#pragma pp:reserved cdecl const enum far fortran huge near pascal signed void volatile"
+ specific="#define <long long> __int64
+#define <__int64 int> __int64
+#define <__int64 unsigned> unsigned __int64"
+ pragmas="#pragma pp:lineid line"
+elif [[ ${version[LCC]} ]]
+then version=${version[LCC]} VERSION=__LCC__
+ reserved="#pragma pp:reserved _Bool _Complex _asm=GROUP const enum inline __inline __int64 restrict signed void volatile _cdecl __cdecl __declspec=GROUP __except _huge _stdcall __stdcall __try"
+ specific="#pragma pp:map \"/#(pragma )?import>/\" \"/#(pragma )?import(.*)/__STDPP__IMPORT__(\2)/\"
+#macdef __STDPP__IMPORT__(x)
+#pragma pp:noallmultiple
+#include x
+#pragma pp:allmultiple
+#endmac
+"
+ pragmas="#pragma pp:hostedtransition
+#pragma pp:strict
+#pragma pp:spaceout
+#pragma pp:elseif
+"
+elif [[ ${version[MINGW]} ]]
+then version=${version[MINGW]} VERSION=__MINGW32__
+ reserved="#pragma pp:reserved __declspec=GROUP __alignof=GROUP __alignof__=GROUP __attribute=GROUP __attribute__=GROUP __extension__=GROUP asm=GROUP __asm=GROUP __asm__=GROUP const __const __const__ enum inline __inline __inline__ __restrict __restrict__ signed __signed __signed__ typeof=GROUP __typeof=GROUP __typeof__=GROUP void volatile __volatile __volatile__ __cdecl _stdcall __stdcall"
+ specific="#define __declspec(x) __attribute__((x))"
+ pragexpand='#pragma pp:nopragmaexpand'
+ pragmas='#pragma pp:map "/#include_next>/" ",[^\<]*\<,#include <.../,"
+#pragma pp:lineid
+#pragma pp:linetype 2'
+fi
+
+undef_predef=
+echo "char* fun() { return (char*)__FUNCTION__; }
+int main() { return !fun(); }" > easy.c
+rm -f easy.exe
+if $cc -o easy.exe easy.c && test -x easy.exe
+then undef_predef="$undef_predef
+#undef __FUNCTION__"
+fi
+
+dialect=ansi
+if [[ $cplus ]]
+then dialect=C++
+fi
+
+if [[ $version == [0-9]* && $stdinclude ]]
+then hosttype=$(package)
+ machine=${hosttype#*.}
+ case $uwin in
+ [0-9]*) standard="
+#pragma pp:include \"/usr/include\""
+ assert="
+#define #system(unix)
+#define #release(V)
+#define #release(system5)
+#define #version(${version})"
+ ;;
+ *) predefined=""
+ standard=""
+ assert=""
+ ;;
+ esac
+ for inc in $stdinclude
+ do standard="$standard
+#pragma pp:include \"$inc\""
+ done
+ : the payoff
+ set -- $cc
+ cmd=$1
+ shift
+ set -- $(whence $cmd) "$@"
+ if "$@" -v >/dev/null 2>&1
+ then v=$("$@" -v 2>/dev/null)
+ if [[ $v ]]
+ then v=";VERSION;-v;$v;PATH;$*"
+ fi
+ else v=
+ fi
+ if [[ ! $v ]]
+ then v="$*"
+ fi
+ cat >&3 <<!
+/* $v
+*/
+
+#pragma pp:predefined
+#define _STD_INCLUDE_DIR ...
+#define _${machine}_ 1
+!
+ {
+ cat <<'!'
+#ifdef unix
+char* str_unix = "#define unix" unix ;
+char* str___unix__ = "#define __unix__" 1 ;
+#else
+#ifdef __unix__
+char* str___unix__ = "#define __unix__" __unix__ ;
+#endif
+#endif
+!
+ premac="
+M_I86
+M_I386
+M_I386CM
+M_I386LM
+M_I386MM
+M_I386SM
+MSDOS
+NO_EXT_KEYS
+_ALPHA_
+_AXP64_
+_CPPUNWIND
+_GENIA64_
+_INTEGRAL_MAX_BITS
+_MSC_EXTENSIONS
+_MSC_VER
+_M_ALPHA
+_M_ALPHA_
+_M_AMD64
+_M_IA64
+_M_IX86
+_M_MRX000
+_M_PPC
+_NTSYSTEM_
+_POSIX_
+_PUSHPOP_SUPPORTED
+_STDCALL_SUPPORTED
+_UWIN
+_WIN32
+_WIN64
+_X64_
+_X86_
+_stdcall
+__BORLANDC__
+__CHAR_SIGNED__
+__CHAR_UNSIGNED__
+__COMPACT__
+__DEFALIGN
+__DMC__
+__DOS__
+__ECL__
+__EDG__
+__FLAT__
+__FPCE__
+__FPI__
+__GNUC__
+__GNUC_MINOR__
+__GNUG__
+__HUGE__
+__I86__
+__ICL
+__INITIAL_POINTER_SIZE
+__INLINE_8087
+__INLINE__FUNCTIONS__
+__INTEL_COMPILER
+__INTERIX
+__INTSIZE
+__LARGE__
+__LCCDEBUGLEVEL
+__LCCOPTIMLEVEL
+__LCC__
+__MEDIUM__
+__MINGW32__
+__MSVCRT__
+__NT__
+__OPENNT
+__OS2__
+__QNX__
+__SC__
+__SMALL__
+__STATIC__
+__STDC__
+__STDC_HOSTED__
+__STDC_IEC_559__
+__STDC_IEC_559_COMPLEX__
+__STDC_ISO_10646__
+__STDC_VERSION__
+__STRLEN
+__TURBOC__
+__WATCOMC__
+__WIN32__
+__WINDOWS__
+__WINDOWS_386__
+__WINVER__
+__ZTC__
+__cdecl
+__cplusplus
+__i386
+__i386__
+__i486
+__i486__
+__i586
+__i586__
+__i686
+__i686__
+__k6
+__k6__
+__pentium
+__pentium__
+__pentiumpro
+__pentiumpro__
+__stdcall
+"
+ echo "#define s(x) #x"
+ echo "#define q(x) s(x)"
+ for i in $premac
+ do echo "#ifdef $i"
+ echo "char* str_$i = \"#define $i\" q(:$i:);"
+ echo "#endif"
+ done
+ } > easy.c
+ $cc -E easy.c > easy.out 2>&1
+ sed -e '/=/!d' -e 's,[^"]*,echo ,' -e 's/":/"/' -e 's/:"/"/' easy.out > easy.sh
+ . ./easy.sh >&3
+ if [[ $cc == *CC ]]
+ then src=cpp
+ else src=c
+ fi
+ print 'typedef char wchar_t;' > easy.$src
+ if ! $cc -c easy.$src >/dev/null 2>&1
+ then print -u3 '#define _WCHAR_T_DEFINED 1'
+ print -u3 '#define _NATIVE_WCHAR_T_DEFINED 1'
+ if [[ ! $reserved ]]
+ then reserved="#pragma pp:reserved"
+ fi
+ reserved="$reserved wchar_t"
+ fi
+ cat >&3 <<!
+#pragma pp:nopredefined
+
+$specific
+
+#define #hosttype(${hosttype})${assert}
+#define #architecture(${machine})
+#define #model()
+#define #machine(${machine})
+#define #addressing()
+#define #preroot()
+#define #universe(att)
+#define #dialect(${dialect})
+$undef_predef
+
+$reserved
+
+$pragmas
+
+#pragma pp:pluscomment
+$pragexpand
+#pragma pp:zeof
+#pragma pp:id "$"${standard}
+#pragma pp:nocatliteral
+#pragma pp:stringsplit
+#pragma pp:headerexpand
+#pragma pp:map "/#(pragma )?ident>/"
+#pragma pp:map "/#pragma lint:/" ",#pragma lint:(.*),##/*\1*/,u"
+#pragma pp:map "/#(pragma )?sccs>/"
+#pragma pp:map "/#pragma once/" ",#pragma once,#pragma pp:nomultiple,"
+#pragma pp:map "/#pragma comment.*linker.*manifest/"
+!
+ exit 0
+fi
diff --git a/usr/src/contrib/ast/src/lib/libsum/Makefile b/usr/src/contrib/ast/src/lib/libsum/Makefile
new file mode 100644
index 0000000000..31de0de58e
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libsum/Makefile
@@ -0,0 +1,11 @@
+:PACKAGE: ast
+
+LICENSE = since=1996,author=gsf
+
+CCFLAGS = $(CC.OPTIMIZE) $(CC.PIC)
+
+sum 1.0 :LIBRARY: sum.h sumlib.c -lmd
+
+$(INCLUDEDIR) :INSTALLPROTO: sum.h
+
+:: RELEASE
diff --git a/usr/src/contrib/ast/src/lib/libsum/Mamfile b/usr/src/contrib/ast/src/lib/libsum/Mamfile
new file mode 100644
index 0000000000..987722ac3e
--- /dev/null
+++ b/usr/src/contrib/ast/src/lib/libsum/Mamfile
@@ -0,0 +1,247 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+setv INSTALLROOT ../../..
+setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast
+setv PACKAGE_ast_LIB ${INSTALLROOT}/lib
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS ${mam_cc_PIC}
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+make sum
+make libsum.a archive
+make sum.req
+exec - set -
+exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c 1.${COTEMP}.c &&
+exec - x=`${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` &&
+exec - {
+exec - case "" in
+exec - *?) echo " " ;;
+exec - esac
+exec - for i in sum md ast
+exec - do case $i in
+exec - "sum"|sum)
+exec - ;;
+exec - *) if test -f ${INSTALLROOT}/lib/lib/$i
+exec - then y=`cat ${INSTALLROOT}/lib/lib/$i`
+exec - case $y in
+exec - *-?*) echo "" $y ;;
+exec - esac
+exec - continue
+exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a
+exec - then case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' $x ;} | sed -e 's/[][()+@?]/#/g' || :` in
+exec - *$x*) continue ;;
+exec - esac
+exec - ;;
+exec - esac
+exec - fi
+exec - ;;
+exec - esac
+exec - echo " -l$i"
+exec - done
+exec - } > sum.req
+exec - rm -f 1.${COTEMP}.*
+done sum.req generated
+make sumlib.o
+make sumlib.c
+make sum-sha2.c implicit
+make ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare
+done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare
+done ${PACKAGE_ast_INCLUDE}/endian.h dontcare
+done sum-sha2.c dontcare
+make sum-sha1.c implicit
+done sum-sha1.c dontcare
+make sum-md5.c implicit
+done sum-md5.c dontcare
+make sum-lmd.c implicit
+make sha2.h implicit
+done sha2.h dontcare virtual
+make sha1.h implicit
+done sha1.h dontcare virtual
+make md5.h implicit
+done md5.h dontcare virtual
+make md4.h implicit
+done md4.h dontcare virtual
+done sum-lmd.c dontcare
+make sum-prng.c implicit
+make ${PACKAGE_ast_INCLUDE}/fnv.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/prototyped.h dontcare
+done ${PACKAGE_ast_INCLUDE}/fnv.h
+done sum-prng.c
+make sum-crc.c implicit
+done sum-crc.c
+make sum-bsd.c implicit
+done sum-bsd.c
+make sum-ast4.c implicit
+done sum-ast4.c
+make sum-att.c implicit
+done sum-att.c
+make FEATURE/sum implicit
+meta FEATURE/sum features/%>FEATURE/% features/sum sum
+make features/sum
+done features/sum
+bind -last
+exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libast} : run features/sum
+done FEATURE/sum generated
+make ${PACKAGE_ast_INCLUDE}/hashpart.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/hashpart.h
+make ${PACKAGE_ast_INCLUDE}/swap.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/swap.h
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make sum.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare
+make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+make ${PACKAGE_ast_INCLUDE}/regex.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+make ${PACKAGE_ast_INCLUDE}/wctype.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+make ${PACKAGE_ast_INCLUDE}/wchar.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit
+done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare
+done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare
+make ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit
+make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare
+done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/regex.h dontcare
+make ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare
+done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit
+make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit
+prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+prev ${PACKAGE_ast_INCLUDE}/endian.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare
+make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare
+done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare
+make ${PACKAGE_ast_INCLUDE}/sfio.h implicit
+prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare
+prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit
+prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit
+done ${PACKAGE_ast_INCLUDE}/ast.h dontcare
+done sum.h
+done sumlib.c
+meta sumlib.o %.c>%.o sumlib.c sumlib
+prev sumlib.c
+exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -c sumlib.c
+done sumlib.o generated
+exec - ${AR} rc libsum.a sumlib.o
+exec - (ranlib libsum.a) >/dev/null 2>&1 || true
+done libsum.a generated
+done sum virtual
+prev libsum.a archive
+make ${INSTALLROOT}/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib
+exec - then mkdir -p ${INSTALLROOT}/lib
+exec - fi
+done ${INSTALLROOT}/lib generated
+make ${INSTALLROOT}/lib/libsum.a archive
+prev ${INSTALLROOT}/lib
+prev libsum.a archive
+exec - test '' = 'libsum.a' || ${STDCMP} 2>/dev/null -s libsum.a ${INSTALLROOT}/lib/libsum.a || { ${STDMV} ${INSTALLROOT}/lib/libsum.a ${INSTALLROOT}/lib/libsum.a.old 2>/dev/null || true; ${STDCP} libsum.a ${INSTALLROOT}/lib/libsum.a ;}
+exec - (ranlib ${INSTALLROOT}/lib/libsum.a) >/dev/null 2>&1 || true
+done ${INSTALLROOT}/lib/libsum.a generated
+make ${INSTALLROOT}/lib/lib
+exec - if silent test ! -d ${INSTALLROOT}/lib/lib
+exec - then mkdir -p ${INSTALLROOT}/lib/lib
+exec - fi
+done ${INSTALLROOT}/lib/lib generated
+make ${INSTALLROOT}/lib/lib/sum
+prev ${INSTALLROOT}/lib/lib
+prev sum.req
+exec - test '' = 'sum.req' || ${STDCMP} 2>/dev/null -s sum.req ${INSTALLROOT}/lib/lib/sum || { ${STDMV} ${INSTALLROOT}/lib/lib/sum ${INSTALLROOT}/lib/lib/sum.old 2>/dev/null || true; ${STDCP} sum.req ${INSTALLROOT}/lib/lib/sum ;}
+done ${INSTALLROOT}/lib/lib/sum generated
+make ${PACKAGE_ast_INCLUDE}
+exec - if silent test ! -d ${PACKAGE_ast_INCLUDE}
+exec - then mkdir -p ${PACKAGE_ast_INCLUDE}
+exec - fi
+done ${PACKAGE_ast_INCLUDE} generated
+make ${PACKAGE_ast_INCLUDE}/sum.h
+prev ${PACKAGE_ast_INCLUDE}
+prev sum.h
+exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1996,author=gsf' sum.h > 1.${COTEMP}.x
+exec - if cmp 2>/dev/null -s ${PACKAGE_ast_INCLUDE}/sum.h 1.${COTEMP}.x
+exec - then rm -f 1.${COTEMP}.x
+exec - else mv 1.${COTEMP}.x ${PACKAGE_ast_INCLUDE}/sum.h
+exec - fi
+done ${PACKAGE_ast_INCLUDE}/sum.h generated
+done install virtual
+make test
+done test dontcare virtual
diff --git a/usr/src/lib/libsum/common/RELEASE b/usr/src/contrib/ast/src/lib/libsum/RELEASE
index d662f77c03..e8d899aee2 100644
--- a/usr/src/lib/libsum/common/RELEASE
+++ b/usr/src/contrib/ast/src/lib/libsum/RELEASE
@@ -1,3 +1,4 @@
+12-02-29 sum-sha2.c: bitcount[] order reversed to allow a single noalias buffer copy
09-09-28 sumlib.c: use simple (faster) method name match function
08-06-05 sum-lmd.c: align context to largest int
08-05-01 sumlib.c: add some -lmd verification checks
diff --git a/usr/src/lib/libsum/common/features/sum b/usr/src/contrib/ast/src/lib/libsum/features/sum
index ce15b4995e..ce15b4995e 100644
--- a/usr/src/lib/libsum/common/features/sum
+++ b/usr/src/contrib/ast/src/lib/libsum/features/sum
diff --git a/usr/src/lib/libsum/common/sum-ast4.c b/usr/src/contrib/ast/src/lib/libsum/sum-ast4.c
index 1285b765de..763b18a19d 100644
--- a/usr/src/lib/libsum/common/sum-ast4.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-ast4.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
+* Copyright (c) 1996-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libsum/common/sum-att.c b/usr/src/contrib/ast/src/lib/libsum/sum-att.c
index 1dc2ec6214..801e5bc772 100644
--- a/usr/src/lib/libsum/common/sum-att.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-att.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
+* Copyright (c) 1996-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -58,15 +58,15 @@ att_block(register Sum_t* p, const void* s, size_t n)
register const unsigned char* e = b + n;
register uint32_t s0, s1, s2, s3, s4, s5, s6, s7;
register unsigned int i;
-
+
s0=s1=s2=s3=s4=s5=s6=s7=0U;
-
+
sum_prefetch((void *)b);
-
+
while (n > CBLOCK_SIZE)
{
sum_prefetch((b+CBLOCK_SIZE));
-
+
/* Compiler will unroll for() loops per #pragma unroll */
for (i=0 ; i < (CBLOCK_SIZE/8) ; i++)
{
@@ -88,7 +88,7 @@ att_block(register Sum_t* p, const void* s, size_t n)
n-=8;
}
}
-
+
c+=s0+s1+s2+s3+s4+s5+s6+s7;
while (b < e)
diff --git a/usr/src/lib/libsum/common/sum-bsd.c b/usr/src/contrib/ast/src/lib/libsum/sum-bsd.c
index 9980e8b07e..e54c00e76f 100644
--- a/usr/src/lib/libsum/common/sum-bsd.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-bsd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
+* Copyright (c) 1996-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libsum/common/sum-crc.c b/usr/src/contrib/ast/src/lib/libsum/sum-crc.c
index f105338b94..1c329349fb 100644
--- a/usr/src/lib/libsum/common/sum-crc.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-crc.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
+* Copyright (c) 1996-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
@@ -112,7 +112,7 @@ Crcnum_t posix_cksum_tab[256] = {
0x933eb0bbU, 0x97ffad0cU, 0xafb010b1U, 0xab710d06U, 0xa6322bdfU,
0xa2f33668U, 0xbcb4666dU, 0xb8757bdaU, 0xb5365d03U, 0xb1f740b4U
};
-
+
static Sum_t*
crc_open(const Method_t* method, const char* name)
{
@@ -144,65 +144,65 @@ crc_open(const Method_t* method, const char* name)
}
else
{
- polynomial = 0xedb88320;
- s = name;
- while (*(t = s))
+ polynomial = 0xedb88320;
+ s = name;
+ while (*(t = s))
+ {
+ for (t = s, v = 0; *s && *s != '-'; s++)
+ if (*s == '=' && !v)
+ v = s;
+ i = (v ? v : s) - t;
+ if (isdigit(*t) || v && i >= 4 && strneq(t, "poly", 4) && (t = v + 1))
+ polynomial = strtoul(t, NiL, 0);
+ else if (strneq(t, "done", i))
+ sum->done = v ? strtoul(v + 1, NiL, 0) : ~sum->done;
+ else if (strneq(t, "init", i))
+ sum->init = v ? strtoul(v + 1, NiL, 0) : ~sum->init;
+ else if (strneq(t, "rotate", i))
+ sum->rotate = 1;
+ else if (strneq(t, "size", i))
{
- for (t = s, v = 0; *s && *s != '-'; s++)
- if (*s == '=' && !v)
- v = s;
- i = (v ? v : s) - t;
- if (isdigit(*t) || v && i >= 4 && strneq(t, "poly", 4) && (t = v + 1))
- polynomial = strtoul(t, NiL, 0);
- else if (strneq(t, "done", i))
- sum->done = v ? strtoul(v + 1, NiL, 0) : ~sum->done;
- else if (strneq(t, "init", i))
- sum->init = v ? strtoul(v + 1, NiL, 0) : ~sum->init;
- else if (strneq(t, "rotate", i))
- sum->rotate = 1;
- else if (strneq(t, "size", i))
- {
- sum->addsize = 1;
- if (v)
- sum->xorsize = strtoul(v + 1, NiL, 0);
- }
- if (*s == '-')
- s++;
+ sum->addsize = 1;
+ if (v)
+ sum->xorsize = strtoul(v + 1, NiL, 0);
}
- if (sum->rotate)
- {
- Crcnum_t t;
- Crcnum_t p[8];
+ if (*s == '-')
+ s++;
+ }
+ if (sum->rotate)
+ {
+ Crcnum_t t;
+ Crcnum_t p[8];
- p[0] = polynomial;
- for (i = 1; i < 8; i++)
- p[i] = (p[i-1] << 1) ^ ((p[i-1] & 0x80000000) ? polynomial : 0);
- for (i = 0; i < elementsof(sum->tabdata); i++)
+ p[0] = polynomial;
+ for (i = 1; i < 8; i++)
+ p[i] = (p[i-1] << 1) ^ ((p[i-1] & 0x80000000) ? polynomial : 0);
+ for (i = 0; i < elementsof(sum->tabdata); i++)
+ {
+ t = 0;
+ x = i;
+ for (j = 0; j < 8; j++)
{
- t = 0;
- x = i;
- for (j = 0; j < 8; j++)
- {
- if (x & 1)
- t ^= p[j];
- x >>= 1;
- }
- sum->tabdata[i] = t;
+ if (x & 1)
+ t ^= p[j];
+ x >>= 1;
}
+ sum->tabdata[i] = t;
}
- else
+ }
+ else
+ {
+ for (i = 0; i < elementsof(sum->tabdata); i++)
{
- for (i = 0; i < elementsof(sum->tabdata); i++)
- {
- x = i;
- for (j = 0; j < 8; j++)
- x = (x>>1) ^ ((x & 1) ? polynomial : 0);
- sum->tabdata[i] = x;
- }
+ x = i;
+ for (j = 0; j < 8; j++)
+ x = (x>>1) ^ ((x & 1) ? polynomial : 0);
+ sum->tabdata[i] = x;
}
sum->tab=sum->tabdata;
}
+ }
return (Sum_t*)sum;
}
@@ -253,7 +253,7 @@ crc_block(Sum_t* p, const void* s, size_t n)
n-=CBLOCK_SIZE;
}
-
+
while (b < e)
{
CRCROTATE(sum, c, *b++);
@@ -271,7 +271,7 @@ crc_block(Sum_t* p, const void* s, size_t n)
n-=CBLOCK_SIZE;
}
-
+
while (b < e)
{
CRC(sum, c, *b++);
diff --git a/usr/src/lib/libsum/common/sum-lmd.c b/usr/src/contrib/ast/src/lib/libsum/sum-lmd.c
index ca104c394b..24e82c5480 100644
--- a/usr/src/lib/libsum/common/sum-lmd.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-lmd.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
+* Copyright (c) 1996-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libsum/common/sum-md5.c b/usr/src/contrib/ast/src/lib/libsum/sum-md5.c
index ffe49bdc3b..8f3b7f60f7 100644
--- a/usr/src/lib/libsum/common/sum-md5.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-md5.c
@@ -1,22 +1,3 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* *
-***********************************************************************/
#pragma prototyped
/*
diff --git a/usr/src/lib/libsum/common/sum-prng.c b/usr/src/contrib/ast/src/lib/libsum/sum-prng.c
index 71ec34f25e..8a85e47e0a 100644
--- a/usr/src/lib/libsum/common/sum-prng.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-prng.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
+* Copyright (c) 1996-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libsum/common/sum-sha1.c b/usr/src/contrib/ast/src/lib/libsum/sum-sha1.c
index 732bfd3d0c..76723fd169 100644
--- a/usr/src/lib/libsum/common/sum-sha1.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-sha1.c
@@ -1,22 +1,3 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* *
-***********************************************************************/
#pragma prototyped
/*
diff --git a/usr/src/lib/libsum/common/sum-sha2.c b/usr/src/contrib/ast/src/lib/libsum/sum-sha2.c
index d42674eba1..9dd52e741f 100644
--- a/usr/src/lib/libsum/common/sum-sha2.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sum-sha2.c
@@ -1,28 +1,10 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* *
-***********************************************************************/
#pragma prototyped
#if _typ_int64_t
/*
* Aaron D. Gifford's SHA {256,384,512} code transcribed into a -lsum method
+ * with bitcount[] order reversed to allow a single noalias buffer copy
*/
/*
@@ -211,9 +193,9 @@ typedef u_int64_t sha2_word64; /* Exactly 8 bytes */
*/
#define ADDINC128(w,n) { \
- (w)[0] += (sha2_word64)(n); \
- if ((w)[0] < (n)) { \
- (w)[1]++; \
+ (w)[1] += (sha2_word64)(n); \
+ if ((w)[1] < (n)) { \
+ (w)[0]++; \
} \
}
@@ -758,8 +740,8 @@ sha256_done(Sum_t* p)
/* Begin padding with a 1 bit: */
*sha->buffer = 0x80;
}
- /* Set the bit count: */
- *(sha2_word64*)&sha->buffer[SHA256_SHORT_BLOCK_LENGTH] = sha->bitcount;
+ /* Store the length of input data (in bits): */
+ MEMCPY_BCOPY(&sha->buffer[SHA256_SHORT_BLOCK_LENGTH], &sha->bitcount, 8);
/* Final transform: */
SHA256_Transform(sha, (sha2_word32*)sha->buffer);
@@ -1017,7 +999,7 @@ sha512_block(register Sum_t* p, const void* s, size_t len)
if (!len)
return 0;
- usedspace = (sha->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
+ usedspace = (sha->bitcount[1] >> 3) % SHA512_BLOCK_LENGTH;
if (usedspace > 0) {
/* Calculate how much free space is available in the buffer */
freespace = SHA512_BLOCK_LENGTH - usedspace;
@@ -1089,7 +1071,7 @@ sha512_done(Sum_t* p)
unsigned int usedspace;
register int i;
- usedspace = (sha->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
+ usedspace = (sha->bitcount[1] >> 3) % SHA512_BLOCK_LENGTH;
#if BYTE_ORDER == LITTLE_ENDIAN
/* Convert FROM host byte order */
REVERSE64(sha->bitcount[0],sha->bitcount[0]);
@@ -1120,8 +1102,7 @@ sha512_done(Sum_t* p)
*sha->buffer = 0x80;
}
/* Store the length of input data (in bits): */
- *(sha2_word64*)&sha->buffer[SHA512_SHORT_BLOCK_LENGTH] = sha->bitcount[1];
- *(sha2_word64*)&sha->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = sha->bitcount[0];
+ MEMCPY_BCOPY(&sha->buffer[SHA512_SHORT_BLOCK_LENGTH], &sha->bitcount[0], 16);
/* Final transform: */
SHA512_Transform(sha, (sha2_word64*)sha->buffer);
diff --git a/usr/src/lib/libsum/common/sum.h b/usr/src/contrib/ast/src/lib/libsum/sum.h
index 254130e108..af8ba60aef 100644
--- a/usr/src/lib/libsum/common/sum.h
+++ b/usr/src/contrib/ast/src/lib/libsum/sum.h
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
+* Copyright (c) 1996-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/libsum/common/sumlib.c b/usr/src/contrib/ast/src/lib/libsum/sumlib.c
index 7b87c93986..7515eb455d 100644
--- a/usr/src/lib/libsum/common/sumlib.c
+++ b/usr/src/contrib/ast/src/lib/libsum/sumlib.c
@@ -1,14 +1,14 @@
/***********************************************************************
* *
* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
+* Copyright (c) 1996-2011 AT&T Intellectual Property *
* and is licensed under the *
-* Common Public License, Version 1.0 *
+* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
+* http://www.eclipse.org/org/documents/epl-v10.html *
+* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile
index 55fc83ac7f..59e47c2bd6 100644
--- a/usr/src/lib/Makefile
+++ b/usr/src/lib/Makefile
@@ -30,8 +30,8 @@
# Copyright 2018 Nexenta Systems, Inc.
# Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
# Copyright 2017 RackTop Systems.
-# Copyirght 2018 Jason King
-# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+# Copyright 2018 Jason King
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
include ../Makefile.master
@@ -92,7 +92,6 @@ SUBDIRS += \
libadt_jni \
libadutils \
libaio \
- libast \
libavl \
libbe \
libbrand \
@@ -100,7 +99,6 @@ SUBDIRS += \
libbsm \
libc_db \
libcfgadm \
- libcmd \
libcmdutils \
libcommputil \
libcontract \
@@ -119,7 +117,6 @@ SUBDIRS += \
libdisasm \
libdiskmgt \
libdladm \
- libdll \
libdlpi \
libdns_sd \
libdoor \
@@ -186,7 +183,6 @@ SUBDIRS += \
libpicltree \
libpkg \
libpool \
- libpp \
libproc \
libproject \
libpthread \
@@ -209,7 +205,6 @@ SUBDIRS += \
libsendfile \
libsff \
libshare \
- libshell \
libsip \
libsldap \
libslp \
@@ -220,7 +215,6 @@ SUBDIRS += \
libsrpt \
libstmf \
libstmfproxy \
- libsum \
libsun_ima \
libsysevent \
libtecla \
@@ -315,17 +309,14 @@ MSGSUBDIRS= \
gss_mechs/mech_dh \
gss_mechs/mech_krb5 \
krb5 \
- libast \
libbsm \
libc \
libcfgadm \
- libcmd \
libcontract \
libcurses \
libdhcputil \
libdiskmgt \
libdladm \
- libdll \
libgrubmgmt \
libgss \
libidmap \
@@ -342,18 +333,15 @@ MSGSUBDIRS= \
libpicl \
libpkg \
libpool \
- libpp \
libreparse \
libsasl \
libscf \
libsecdb \
libshare \
- libshell \
libsldap \
libslp \
libsmbfs \
libsmedia \
- libsum \
libtsol \
libuutil \
libvrrpadm \
@@ -380,11 +368,9 @@ HDRSUBDIRS= \
hal \
hbaapi \
libads \
- libast \
libbrand \
libbsm \
libc \
- libcmd \
libcmdutils \
libcommputil \
libcontract \
@@ -402,7 +388,6 @@ HDRSUBDIRS= \
libdisasm \
libdiskmgt \
libdladm \
- libdll \
libdlpi \
libdns_sd \
libdtrace \
@@ -448,7 +433,6 @@ HDRSUBDIRS= \
libpicl \
libpicltree \
libpool \
- libpp \
libproc \
libraidcfg \
librcm \
@@ -462,7 +446,6 @@ HDRSUBDIRS= \
libsec \
libsff \
libshare \
- libshell \
libsip \
libslp \
libsmbfs \
@@ -473,7 +456,6 @@ HDRSUBDIRS= \
libsrpt \
libstmf \
libstmfproxy \
- libsum \
libsun_ima \
libsysevent \
libtecla \
@@ -609,7 +591,6 @@ libbe: libzfs libinstzones libuuid libgen libdevinfo libefi libficl \
libbsm: libinetutil libscf libsecdb libtsol
libcfgadm: libdevinfo
libcontract: libnvpair
-libcmd: libsum libast
libcmdutils: libavl libnvpair
libcpc: libpctx
libcrypt: libgen
@@ -624,7 +605,6 @@ libdiskmgt: libdevid libdevinfo libadm libefi libkstat libsysevent
$(INTEL_BLD)libdiskmgt: libfdisk
libdladm: libdevinfo libinetutil libscf librcm libexacct libkstat \
libpool
-libdll: libast
libdlpi: libinetutil libdladm
libds: libsysevent
libdtrace: libproc libgen libctf libmapmalloc
@@ -663,7 +643,6 @@ libpcp: libumem libdevinfo
libpctx: libproc
libpkg: libscf libadm
libpool: libscf libexacct
-libpp: libast
libppt: libpcidb libdevinfo libcmdutils
libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf
$(INTEL_BLD)libproc: libsaveargs
@@ -680,7 +659,6 @@ libsec: libavl libidmap
libsecdb: libnsl
libsff: libnvpair
libshare: libscf libzfs libuuid libfsmgt libsecdb libumem libsmbfs
-libshell: libast libcmd libdll libsecdb
libsip: libmd5
libsldap: libldap5 libscf
libsmbfs: libkrb5 libsec libidmap pkcs11
@@ -688,7 +666,6 @@ libsmbios: libdevinfo
libsrpt: libstmf
libstmf: libscf
libstmfproxy: libstmf libpthread
-libsum: libast
libsun_ima: libdevinfo libsysevent
libsysevent: libsecdb
libtecla: libcurses
diff --git a/usr/src/lib/libast/Makefile b/usr/src/lib/libast/Makefile
deleted file mode 100644
index d9faffb382..0000000000
--- a/usr/src/lib/libast/Makefile
+++ /dev/null
@@ -1,159 +0,0 @@
-#
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-SHELL=/usr/bin/ksh93
-
-include ../Makefile.lib
-
-SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
-
-all := TARGET= all
-clean := TARGET= clean
-clobber := TARGET= clobber
-install := TARGET= install
-_msg := TARGET= _msg
-
-.KEEP_STATE:
-
-all clean clobber install _msg: $(SUBDIRS)
-
-LIBRARY= libast.a
-
-HDRS= \
- align.h \
- ast_botch.h \
- ast_ccode.h \
- ast_common.h \
- ast_dir.h \
- ast_dirent.h \
- ast_fcntl.h \
- ast_float.h \
- ast_fs.h \
- ast_getopt.h \
- ast_iconv.h \
- ast_lib.h \
- ast_limits.h \
- ast_map.h \
- ast_mmap.h \
- ast_mode.h \
- ast_namval.h \
- ast_ndbm.h \
- ast_nl_types.h \
- ast_param.h \
- ast_standards.h \
- ast_std.h \
- ast_stdio.h \
- ast_sys.h \
- ast_time.h \
- ast_tty.h \
- ast_version.h \
- ast_vfork.h \
- ast_wait.h \
- ast_wchar.h \
- ast_windows.h \
- ast.h \
- bytesex.h \
- ccode.h \
- cdt.h \
- debug.h \
- dirent.h \
- dt.h \
- endian.h \
- error.h \
- find.h \
- fnmatch.h \
- fnv.h \
- fs3d.h \
- fts.h \
- ftw.h \
- ftwalk.h \
- getopt.h \
- glob.h \
- hash.h \
- hashkey.h \
- hashpart.h \
- iconv.h \
- ip6.h \
- lc.h \
- ls.h \
- magic.h \
- magicid.h \
- mc.h \
- mime.h \
- mnt.h \
- modecanon.h \
- modex.h \
- namval.h \
- nl_types.h \
- option.h \
- preroot.h \
- proc.h \
- prototyped.h \
- re_comp.h \
- recfmt.h \
- regex.h \
- regexp.h \
- sfdisc.h \
- sfio_s.h \
- sfio_t.h \
- sfio.h \
- shcmd.h \
- sig.h \
- stack.h \
- stak.h \
- stdio.h \
- stk.h \
- swap.h \
- tar.h \
- times.h \
- tm.h \
- tmx.h \
- tok.h \
- tv.h \
- usage.h \
- vdb.h \
- vecargs.h \
- vmalloc.h \
- wait.h \
- wchar.h \
- wordexp.h
-
-HDRDIR32= $(MACH)/include/ast
-HDRDIR64= $(MACH64)/include/ast
-include ../Makefile.asthdr
-
-install_h: $(ROOTHDRS)
-
-# We don't check these header files because they're owned by AT&T/AST
-check:
-
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
-
-include ../Makefile.targ
diff --git a/usr/src/lib/libast/Makefile.com b/usr/src/lib/libast/Makefile.com
deleted file mode 100644
index 4385e64f53..0000000000
--- a/usr/src/lib/libast/Makefile.com
+++ /dev/null
@@ -1,767 +0,0 @@
-#
-# 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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# Copyright (c) 2019, Joyent, Inc.
-
-SHELL=/usr/bin/ksh93
-
-LIBRARY= libast.a
-VERS= .1
-
-# platform-independent sources are in common/
-OBJECTS += \
- common/cdt/dtclose.o \
- common/cdt/dtdisc.o \
- common/cdt/dtextract.o \
- common/cdt/dtflatten.o \
- common/cdt/dthash.o \
- common/cdt/dtlist.o \
- common/cdt/dtmethod.o \
- common/cdt/dtnew.o \
- common/cdt/dtopen.o \
- common/cdt/dtrenew.o \
- common/cdt/dtrestore.o \
- common/cdt/dtsize.o \
- common/cdt/dtstat.o \
- common/cdt/dtstrhash.o \
- common/cdt/dttree.o \
- common/cdt/dttreeset.o \
- common/cdt/dtview.o \
- common/cdt/dtwalk.o \
- common/comp/atexit.o \
- common/comp/basename.o \
- common/comp/catopen.o \
- common/comp/closelog.o \
- common/comp/creat64.o \
- common/comp/dirname.o \
- common/comp/dup2.o \
- common/comp/eaccess.o \
- common/comp/errno.o \
- common/comp/execlp.o \
- common/comp/execve.o \
- common/comp/execvp.o \
- common/comp/execvpe.o \
- common/comp/fcntl.o \
- common/comp/fmtmsglib.o \
- common/comp/fnmatch.o \
- common/comp/frexp.o \
- common/comp/frexpl.o \
- common/comp/fsync.o \
- common/comp/ftw.o \
- common/comp/getdate.o \
- common/comp/getgroups.o \
- common/comp/getlogin.o \
- common/comp/getopt.o \
- common/comp/getoptl.o \
- common/comp/getpgrp.o \
- common/comp/getsubopt.o \
- common/comp/getwd.o \
- common/comp/gross.o \
- common/comp/hsearch.o \
- common/comp/iconv.o \
- common/comp/killpg.o \
- common/comp/link.o \
- common/comp/localeconv.o \
- common/comp/lstat.o \
- common/comp/memccpy.o \
- common/comp/memchr.o \
- common/comp/memcmp.o \
- common/comp/memcpy.o \
- common/comp/memmove.o \
- common/comp/memset.o \
- common/comp/mkdir.o \
- common/comp/mkfifo.o \
- common/comp/mknod.o \
- common/comp/mktemp.o \
- common/comp/mktime.o \
- common/comp/mount.o \
- common/comp/nftw.o \
- common/comp/omitted.o \
- common/comp/open.o \
- common/comp/openlog.o \
- common/comp/putenv.o \
- common/comp/re_comp.o \
- common/comp/readlink.o \
- common/comp/realpath.o \
- common/comp/regcmp.o \
- common/comp/regexp.o \
- common/comp/remove.o \
- common/comp/rename.o \
- common/comp/resolvepath.o \
- common/comp/rmdir.o \
- common/comp/setenv.o \
- common/comp/setlocale.o \
- common/comp/setlogmask.o \
- common/comp/setpgid.o \
- common/comp/setsid.o \
- common/comp/sigunblock.o \
- common/comp/sigflag.o \
- common/comp/spawnveg.o \
- common/comp/statvfs.o \
- common/comp/strcasecmp.o \
- common/comp/strchr.o \
- common/comp/strftime.o \
- common/comp/strncasecmp.o \
- common/comp/strptime.o \
- common/comp/strrchr.o \
- common/comp/strstr.o \
- common/comp/strtod.o \
- common/comp/strtol.o \
- common/comp/strtold.o \
- common/comp/strtoll.o \
- common/comp/strtoul.o \
- common/comp/strtoull.o \
- common/comp/swab.o \
- common/comp/symlink.o \
- common/comp/syslog.o \
- common/comp/system.o \
- common/comp/tempnam.o \
- common/comp/tmpnam.o \
- common/comp/transition.o \
- common/comp/tsearch.o \
- common/comp/unlink.o \
- common/comp/unsetenv.o \
- common/comp/vfork.o \
- common/comp/waitpid.o \
- common/comp/wc.o \
- common/comp/wordexp.o \
- common/dir/getdents.o \
- common/dir/opendir.o \
- common/dir/readdir.o \
- common/dir/rewinddir.o \
- common/dir/seekdir.o \
- common/dir/telldir.o \
- common/disc/memfatal.o \
- common/disc/sfdcdio.o \
- common/disc/sfdcdos.o \
- common/disc/sfdcfilter.o \
- common/disc/sfdcmore.o \
- common/disc/sfdcprefix.o \
- common/disc/sfdcseekable.o \
- common/disc/sfdcslow.o \
- common/disc/sfdcsubstr.o \
- common/disc/sfdctee.o \
- common/disc/sfdcunion.o \
- common/disc/sfkeyprintf.o \
- common/disc/sfstrtmp.o \
- common/hash/hashalloc.o \
- common/hash/hashdump.o \
- common/hash/hashfree.o \
- common/hash/hashlast.o \
- common/hash/hashlook.o \
- common/hash/hashscan.o \
- common/hash/hashsize.o \
- common/hash/hashview.o \
- common/hash/hashwalk.o \
- common/hash/memhash.o \
- common/hash/memsum.o \
- common/hash/strhash.o \
- common/hash/strkey.o \
- common/hash/strsum.o \
- common/misc/astintercept.o \
- common/misc/debug.o \
- common/misc/cmdarg.o \
- common/misc/error.o \
- common/misc/errorf.o \
- common/misc/errormsg.o \
- common/misc/errorx.o \
- common/misc/fastfind.o \
- common/misc/fmtrec.o \
- common/misc/fs3d.o \
- common/misc/fts.o \
- common/misc/ftwalk.o \
- common/misc/ftwflags.o \
- common/misc/getcwd.o \
- common/misc/getenv.o \
- common/misc/glob.o \
- common/misc/magic.o \
- common/misc/mime.o \
- common/misc/mimetype.o \
- common/misc/optesc.o \
- common/misc/optget.o \
- common/misc/optjoin.o \
- common/misc/optctx.o \
- common/misc/procclose.o \
- common/misc/procfree.o \
- common/misc/procopen.o \
- common/misc/procrun.o \
- common/misc/recfmt.o \
- common/misc/reclen.o \
- common/misc/recstr.o \
- common/misc/setenviron.o \
- common/misc/sigcrit.o \
- common/misc/sigdata.o \
- common/misc/signal.o \
- common/misc/stack.o \
- common/misc/state.o \
- common/misc/stk.o \
- common/misc/systrace.o \
- common/misc/translate.o \
- common/misc/univdata.o \
- common/obsolete/spawn.o \
- common/path/pathaccess.o \
- common/path/pathbin.o \
- common/path/pathcanon.o \
- common/path/pathcat.o \
- common/path/pathcd.o \
- common/path/pathcheck.o \
- common/path/pathexists.o \
- common/path/pathfind.o \
- common/path/pathgetlink.o \
- common/path/pathkey.o \
- common/path/pathnative.o \
- common/path/pathpath.o \
- common/path/pathposix.o \
- common/path/pathprobe.o \
- common/path/pathprog.o \
- common/path/pathrepl.o \
- common/path/pathsetlink.o \
- common/path/pathshell.o \
- common/path/pathstat.o \
- common/path/pathtemp.o \
- common/path/pathtmp.o \
- common/port/astconf.o \
- common/port/astcopy.o \
- common/port/astdynamic.o \
- common/port/astlicense.o \
- common/port/astquery.o \
- common/port/aststatic.o \
- common/port/astwinsize.o \
- common/port/iblocks.o \
- common/port/lc.o \
- common/port/mc.o \
- common/port/mnt.o \
- common/port/touch.o \
- common/preroot/getpreroot.o \
- common/preroot/ispreroot.o \
- common/preroot/realopen.o \
- common/preroot/setpreroot.o \
- common/regex/regalloc.o \
- common/regex/regcache.o \
- common/regex/regclass.o \
- common/regex/regcoll.o \
- common/regex/regcomp.o \
- common/regex/regdecomp.o \
- common/regex/regerror.o \
- common/regex/regexec.o \
- common/regex/regfatal.o \
- common/regex/reginit.o \
- common/regex/regnexec.o \
- common/regex/regrecord.o \
- common/regex/regrexec.o \
- common/regex/regstat.o \
- common/regex/regsub.o \
- common/regex/regsubcomp.o \
- common/regex/regsubexec.o \
- common/sfio/_sfclrerr.o \
- common/sfio/_sfdlen.o \
- common/sfio/_sfeof.o \
- common/sfio/_sferror.o \
- common/sfio/_sffileno.o \
- common/sfio/_sfgetc.o \
- common/sfio/_sfgetl.o \
- common/sfio/_sfgetl2.o \
- common/sfio/_sfgetu.o \
- common/sfio/_sfgetu2.o \
- common/sfio/_sfllen.o \
- common/sfio/_sfopen.o \
- common/sfio/_sfputc.o \
- common/sfio/_sfputd.o \
- common/sfio/_sfputl.o \
- common/sfio/_sfputm.o \
- common/sfio/_sfputu.o \
- common/sfio/_sfslen.o \
- common/sfio/_sfstacked.o \
- common/sfio/_sfulen.o \
- common/sfio/_sfvalue.o \
- common/sfio/sfclose.o \
- common/sfio/sfclrlock.o \
- common/sfio/sfcvt.o \
- common/sfio/sfdisc.o \
- common/sfio/sfdlen.o \
- common/sfio/sfecvt.o \
- common/sfio/sfexcept.o \
- common/sfio/sfextern.o \
- common/sfio/sffcvt.o \
- common/sfio/sffilbuf.o \
- common/sfio/sfflsbuf.o \
- common/sfio/sfgetd.o \
- common/sfio/sfgetl.o \
- common/sfio/sfgetm.o \
- common/sfio/sfgetr.o \
- common/sfio/sfgetu.o \
- common/sfio/sfllen.o \
- common/sfio/sfmode.o \
- common/sfio/sfmove.o \
- common/sfio/sfmutex.o \
- common/sfio/sfnew.o \
- common/sfio/sfnotify.o \
- common/sfio/sfnputc.o \
- common/sfio/sfopen.o \
- common/sfio/sfpeek.o \
- common/sfio/sfpkrd.o \
- common/sfio/sfpoll.o \
- common/sfio/sfpool.o \
- common/sfio/sfpopen.o \
- common/sfio/sfprintf.o \
- common/sfio/sfprints.o \
- common/sfio/sfpurge.o \
- common/sfio/sfputd.o \
- common/sfio/sfputl.o \
- common/sfio/sfputm.o \
- common/sfio/sfputr.o \
- common/sfio/sfputu.o \
- common/sfio/sfraise.o \
- common/sfio/sfrd.o \
- common/sfio/sfread.o \
- common/sfio/sfreserve.o \
- common/sfio/sfresize.o \
- common/sfio/sfscanf.o \
- common/sfio/sfseek.o \
- common/sfio/sfset.o \
- common/sfio/sfsetbuf.o \
- common/sfio/sfsetfd.o \
- common/sfio/sfsize.o \
- common/sfio/sfsk.o \
- common/sfio/sfstack.o \
- common/sfio/sfstrtod.o \
- common/sfio/sfswap.o \
- common/sfio/sfsync.o \
- common/sfio/sftable.o \
- common/sfio/sftell.o \
- common/sfio/sftmp.o \
- common/sfio/sfungetc.o \
- common/sfio/sfvprintf.o \
- common/sfio/sfvscanf.o \
- common/sfio/sfwalk.o \
- common/sfio/sfwr.o \
- common/sfio/sfwrite.o \
- common/stdio/_doprnt.o \
- common/stdio/_doscan.o \
- common/stdio/_filbuf.o \
- common/stdio/_flsbuf.o \
- common/stdio/_stdfun.o \
- common/stdio/_stdopen.o \
- common/stdio/_stdprintf.o \
- common/stdio/_stdscanf.o \
- common/stdio/_stdsprnt.o \
- common/stdio/_stdvbuf.o \
- common/stdio/_stdvsnprnt.o \
- common/stdio/_stdvsprnt.o \
- common/stdio/_stdvsscn.o \
- common/stdio/asprintf.o \
- common/stdio/clearerr.o \
- common/stdio/fclose.o \
- common/stdio/fcloseall.o \
- common/stdio/fdopen.o \
- common/stdio/feof.o \
- common/stdio/ferror.o \
- common/stdio/fflush.o \
- common/stdio/fgetc.o \
- common/stdio/fgetpos.o \
- common/stdio/fgets.o \
- common/stdio/fgetwc.o \
- common/stdio/fgetws.o \
- common/stdio/fileno.o \
- common/stdio/flockfile.o \
- common/stdio/fmemopen.o \
- common/stdio/fopen.o \
- common/stdio/fprintf.o \
- common/stdio/fpurge.o \
- common/stdio/fputc.o \
- common/stdio/fputs.o \
- common/stdio/fputwc.o \
- common/stdio/fputws.o \
- common/stdio/funlockfile.o \
- common/stdio/fread.o \
- common/stdio/freopen.o \
- common/stdio/fscanf.o \
- common/stdio/fseek.o \
- common/stdio/fseeko.o \
- common/stdio/fsetpos.o \
- common/stdio/ftell.o \
- common/stdio/ftello.o \
- common/stdio/ftrylockfile.o \
- common/stdio/fwide.o \
- common/stdio/fwprintf.o \
- common/stdio/fwrite.o \
- common/stdio/fwscanf.o \
- common/stdio/getc.o \
- common/stdio/getchar.o \
- common/stdio/getdelim.o \
- common/stdio/getline.o \
- common/stdio/getw.o \
- common/stdio/getwc.o \
- common/stdio/getwchar.o \
- common/stdio/pclose.o \
- common/stdio/popen.o \
- common/stdio/printf.o \
- common/stdio/putc.o \
- common/stdio/putchar.o \
- common/stdio/puts.o \
- common/stdio/putw.o \
- common/stdio/putwc.o \
- common/stdio/putwchar.o \
- common/stdio/rewind.o \
- common/stdio/scanf.o \
- common/stdio/setbuf.o \
- common/stdio/setbuffer.o \
- common/stdio/setlinebuf.o \
- common/stdio/setvbuf.o \
- common/stdio/snprintf.o \
- common/stdio/sprintf.o \
- common/stdio/sscanf.o \
- common/stdio/stdio_c99.o \
- common/stdio/swprintf.o \
- common/stdio/swscanf.o \
- common/stdio/tmpfile.o \
- common/stdio/ungetc.o \
- common/stdio/ungetwc.o \
- common/stdio/vasprintf.o \
- common/stdio/vfprintf.o \
- common/stdio/vfscanf.o \
- common/stdio/vfwprintf.o \
- common/stdio/vfwscanf.o \
- common/stdio/vprintf.o \
- common/stdio/vscanf.o \
- common/stdio/vsnprintf.o \
- common/stdio/vsprintf.o \
- common/stdio/vsscanf.o \
- common/stdio/vswprintf.o \
- common/stdio/vswscanf.o \
- common/stdio/vwprintf.o \
- common/stdio/vwscanf.o \
- common/stdio/wprintf.o \
- common/stdio/wscanf.o \
- common/string/base64.o \
- common/string/ccmap.o \
- common/string/ccmapid.o \
- common/string/ccnative.o \
- common/string/chresc.o \
- common/string/chrtoi.o \
- common/string/fmtbase.o \
- common/string/fmtbuf.o \
- common/string/fmtclock.o \
- common/string/fmtdev.o \
- common/string/fmtelapsed.o \
- common/string/fmterror.o \
- common/string/fmtesc.o \
- common/string/fmtfmt.o \
- common/string/fmtfs.o \
- common/string/fmtgid.o \
- common/string/fmtident.o \
- common/string/fmtip4.o \
- common/string/fmtip6.o \
- common/string/fmtls.o \
- common/string/fmtmatch.o \
- common/string/fmtmode.o \
- common/string/fmtnum.o \
- common/string/fmtperm.o \
- common/string/fmtre.o \
- common/string/fmtscale.o \
- common/string/fmtsignal.o \
- common/string/fmttime.o \
- common/string/fmttmx.o \
- common/string/fmttv.o \
- common/string/fmtuid.o \
- common/string/fmtversion.o \
- common/string/memdup.o \
- common/string/modedata.o \
- common/string/modei.o \
- common/string/modex.o \
- common/string/stracmp.o \
- common/string/strcopy.o \
- common/string/strdup.o \
- common/string/strelapsed.o \
- common/string/strerror.o \
- common/string/stresc.o \
- common/string/streval.o \
- common/string/strexpr.o \
- common/string/strgid.o \
- common/string/strlcat.o \
- common/string/strlcpy.o \
- common/string/strlook.o \
- common/string/strmatch.o \
- common/string/strmode.o \
- common/string/strnacmp.o \
- common/string/strncopy.o \
- common/string/strnpcmp.o \
- common/string/strntod.o \
- common/string/strntol.o \
- common/string/strntold.o \
- common/string/strntoll.o \
- common/string/strnton.o \
- common/string/strntoul.o \
- common/string/strntonll.o \
- common/string/strntoull.o \
- common/string/strnvcmp.o \
- common/string/stropt.o \
- common/string/strpcmp.o \
- common/string/strperm.o \
- common/string/strpsearch.o \
- common/string/strsearch.o \
- common/string/strsort.o \
- common/string/strtape.o \
- common/string/strtoip4.o \
- common/string/strtoip6.o \
- common/string/strton.o \
- common/string/strtonll.o \
- common/string/struid.o \
- common/string/struniq.o \
- common/string/strvcmp.o \
- common/string/swapget.o \
- common/string/swapmem.o \
- common/string/swapop.o \
- common/string/swapput.o \
- common/string/tok.o \
- common/string/tokline.o \
- common/string/tokscan.o \
- common/tm/tmdata.o \
- common/tm/tmdate.o \
- common/tm/tmequiv.o \
- common/tm/tmfix.o \
- common/tm/tmfmt.o \
- common/tm/tmform.o \
- common/tm/tmgoff.o \
- common/tm/tminit.o \
- common/tm/tmleap.o \
- common/tm/tmlex.o \
- common/tm/tmlocale.o \
- common/tm/tmmake.o \
- common/tm/tmpoff.o \
- common/tm/tmscan.o \
- common/tm/tmsleep.o \
- common/tm/tmtime.o \
- common/tm/tmtype.o \
- common/tm/tmweek.o \
- common/tm/tmword.o \
- common/tm/tmxdate.o \
- common/tm/tmxduration.o \
- common/tm/tmxfmt.o \
- common/tm/tmxgettime.o \
- common/tm/tmxleap.o \
- common/tm/tmxmake.o \
- common/tm/tmxscan.o \
- common/tm/tmxsettime.o \
- common/tm/tmxsleep.o \
- common/tm/tmxtime.o \
- common/tm/tmxtouch.o \
- common/tm/tmzone.o \
- common/tm/tvcmp.o \
- common/tm/tvgettime.o \
- common/tm/tvsettime.o \
- common/tm/tvsleep.o \
- common/tm/tvtouch.o \
- common/uwin/a64l.o \
- common/uwin/acosh.o \
- common/uwin/asinh.o \
- common/uwin/atanh.o \
- common/uwin/cbrt.o \
- common/uwin/crypt.o \
- common/uwin/erf.o \
- common/uwin/err.o \
- common/uwin/exp.o \
- common/uwin/exp__E.o \
- common/uwin/expm1.o \
- common/uwin/gamma.o \
- common/uwin/getpass.o \
- common/uwin/lgamma.o \
- common/uwin/log.o \
- common/uwin/log1p.o \
- common/uwin/log__L.o \
- common/uwin/rand48.o \
- common/uwin/random.o \
- common/uwin/rcmd.o \
- common/uwin/rint.o \
- common/uwin/support.o \
- common/vec/vecargs.o \
- common/vec/vecfile.o \
- common/vec/vecfree.o \
- common/vec/vecload.o \
- common/vec/vecstring.o \
- common/vmalloc/malloc.o \
- common/vmalloc/vmbest.o \
- common/vmalloc/vmclear.o \
- common/vmalloc/vmclose.o \
- common/vmalloc/vmdcheap.o \
- common/vmalloc/vmdebug.o \
- common/vmalloc/vmdisc.o \
- common/vmalloc/vmexit.o \
- common/vmalloc/vmgetmem.o \
- common/vmalloc/vmlast.o \
- common/vmalloc/vmmopen.o \
- common/vmalloc/vmopen.o \
- common/vmalloc/vmpool.o \
- common/vmalloc/vmprivate.o \
- common/vmalloc/vmprofile.o \
- common/vmalloc/vmregion.o \
- common/vmalloc/vmsegment.o \
- common/vmalloc/vmset.o \
- common/vmalloc/vmstat.o \
- common/vmalloc/vmstrdup.o \
- common/vmalloc/vmtrace.o \
- common/vmalloc/vmwalk.o
-
-# We are storing the object files into subdirs avoid the
-# confusion with having 550+ object files in the toplevel pics/
-# directory (this matches the way how the original AST build system
-# deals with this "logistic" issue) - the rules below ensure that
-# the destination directory is available.
-OBJDIRS += \
- common/cdt \
- common/comp \
- common/dir \
- common/disc \
- common/hash \
- common/misc \
- common/obsolete \
- common/path \
- common/port \
- common/preroot \
- common/regex \
- common/sfio \
- common/stdio \
- common/string \
- common/tm \
- common/uwin \
- common/vec \
- common/vmalloc
-PICSDIRS= $(OBJDIRS:%=pics/%)
-mkpicdirs:
- @mkdir -p $(PICSDIRS)
-
-# We need our own rules here since some source files come from
-# the plaftorm-specific directories and the default rules do
-# not cover this
-pics/%.o: ../%.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
- $(POST_PROCESS_O)
-
-include ../../Makefile.astmsg
-
-include ../../Makefile.lib
-
-# mapfile-vers does not live with the sources in in common/ to make
-# automated code updates easier.
-MAPFILES= ../mapfile-vers
-
-# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
-include ../../../Makefile.ast
-
-# special rule because sources live both ../common (normal)
-# and $(TRANSMACH) (generated)
-SRCS= $(OBJECTS:%.o=../%.c)
-
-LIBS = $(DYNLIB)
-
-LDLIBS += \
- -lsocket \
- -lm \
- -lc
-
-SRCDIR = ../common
-
-# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
-# case - it MUST come as the last element but future changes in -D options
-# may then cause silent breakage in the AST sources because the last -D
-# option specified overrides previous -D options so we prefer the current
-# way to explicitly list each single flag.
-# Notes:
-# - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
-# - Be careful with "-D__OBSOLETE__=xxx". Make sure this is in sync with
-# upstream (see Mamfile) and do not change the |__OBSOLETE__| value
-# without examining the symbols that will be removed, and evaluating
-# whether that breaks compatibility with upstream binaries.
-CPPFLAGS = \
- $(DTEXTDOM) $(DTS_ERRNO) \
- $(ASTPLATFORMCPPFLAGS) \
- -Isrc/lib/libast \
- -I$(SRCDIR) \
- -I$(SRCDIR)/comp \
- -I$(SRCDIR)/include \
- -I$(SRCDIR)/std \
- -I$(SRCDIR)/dir \
- -I$(SRCDIR)/port \
- -I$(SRCDIR)/sfio \
- -I$(SRCDIR)/astsa \
- -I$(SRCDIR)/misc \
- -I$(SRCDIR)/string \
- -Iinclude/ast \
- -I$(ROOT)/usr/include \
- '-DCONF_LIBSUFFIX=".so"' \
- '-DCONF_LIBPREFIX="lib"' \
- -DERROR_CATALOG=\""libast"\" \
- -D__OBSOLETE__=20100101 \
- -D_BLD_ast \
- -D_PACKAGE_ast \
- -D_BLD_DLL
-
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
-
-CERRWARN += -_gcc=-Wno-parentheses
-CERRWARN += $(CNOWARN_UNINIT)
-CERRWARN += -_gcc=-Wno-char-subscripts
-CERRWARN += -_gcc=-Wno-clobbered
-CERRWARN += -_gcc=-Wno-unused-variable
-CERRWARN += -_gcc=-Wno-unused-but-set-variable
-CERRWARN += -_gcc=-Wno-unused-but-set-parameter
-CERRWARN += -_gcc=-Wno-unused-value
-CERRWARN += -_gcc=-Wno-unused-function
-CERRWARN += -_gcc=-Wno-unused-label
-CERRWARN += -_gcc=-Wno-implicit-function-declaration
-CERRWARN += -_gcc=-Wno-empty-body
-CERRWARN += -_gcc=-Wno-type-limits
-CERRWARN += -_gcc=-Wno-address
-
-SMATCH=off
-
-pics/$(MACH)/src/lib/libast/conftab.o \
-pics/$(MACH64)/src/lib/libast/conftab.o := CERRWARN += -erroff=E_INIT_DOES_NOT_FIT
-pics/common/comp/setlocale.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/common/comp/setlocale.o := CERRWARN += -erroff=E_INIT_DOES_NOT_FIT
-pics/common/comp/setlocale.o := CERRWARN += -erroff=E_INIT_SIGN_EXTEND
-pics/common/hash/hashlook.o := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
-pics/common/hash/memhash.o := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
-pics/common/hash/memsum.o := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
-pics/common/hash/strhash.o := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
-pics/common/hash/strsum.o := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
-pics/common/misc/recstr.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/common/misc/translate.o := CERRWARN += -erroff=E_INTEGER_OVERFLOW_DETECTED
-pics/common/path/pathkey.o := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
-pics/common/port/astconf.o := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
-pics/common/stdio/fflush.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
-pics/common/stdio/getline.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
-pics/common/sfio/sfmove.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
-pics/common/sfio/sfrd.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
-pics/common/sfio/sfvscanf.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
-pics/common/tm/tmxduration.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
-
-.KEEP_STATE:
-
-all: mkpicdirs .WAIT $(LIBS)
-
-include ../../Makefile.targ
diff --git a/usr/src/lib/libast/THIRDPARTYLICENSE b/usr/src/lib/libast/THIRDPARTYLICENSE
deleted file mode 100644
index 50c6364c06..0000000000
--- a/usr/src/lib/libast/THIRDPARTYLICENSE
+++ /dev/null
@@ -1,245 +0,0 @@
-+------------------------------------------------------------------------------+
-| This license covers all software that refers to the URL |
-| http://www.opensource.org/licenses/cpl1.0.txt |
-+------------------------------------------------------------------------------+
-
-Common Public License Version 1.0
-
- THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
- PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
- THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
- 1. DEFINITIONS
-
- "Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and
- documentation distributed under this Agreement, and
-
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from
- and are distributed by that particular Contributor. A Contribution
- 'originates' from a Contributor if it was added to the Program by
- such Contributor itself or anyone acting on such Contributor's
- behalf. Contributions do not include additions to the Program
- which: (i) are separate modules of software distributed in
- conjunction with the Program under their own license agreement, and
- (ii) are not derivative works of the Program.
-
- "Contributor" means any person or entity that distributes the Program.
-
- "Licensed Patents " mean patent claims licensable by a Contributor
- which are necessarily infringed by the use or sale of its Contribution
- alone or when combined with the Program.
-
- "Program" means the Contributions distributed in accordance with this
- Agreement.
-
- "Recipient" means anyone who receives the Program under this
- Agreement, including all Contributors.
-
- 2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free copyright
- license to reproduce, prepare derivative works of, publicly
- display, publicly perform, distribute and sublicense the
- Contribution of such Contributor, if any, and such derivative
- works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free patent
- license under Licensed Patents to make, use, sell, offer to sell,
- import and otherwise transfer the Contribution of such Contributor,
- if any, in source code and object code form. This patent license
- shall apply to the combination of the Contribution and the Program
- if, at the time the Contribution is added by the Contributor, such
- addition of the Contribution causes such combination to be covered
- by the Licensed Patents. The patent license shall not apply to any
- other combinations which include the Contribution. No hardware per
- se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the
- licenses to its Contributions set forth herein, no assurances are
- provided by any Contributor that the Program does not infringe the
- patent or other intellectual property rights of any other entity.
- Each Contributor disclaims any liability to Recipient for claims
- brought by any other entity based on infringement of intellectual
- property rights or otherwise. As a condition to exercising the
- rights and licenses granted hereunder, each Recipient hereby
- assumes sole responsibility to secure any other intellectual
- property rights needed, if any. For example, if a third party
- patent license is required to allow Recipient to distribute the
- Program, it is Recipient's responsibility to acquire that license
- before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has
- sufficient copyright rights in its Contribution, if any, to grant
- the copyright license set forth in this Agreement.
-
- 3. REQUIREMENTS
-
- A Contributor may choose to distribute the Program in object code form
- under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all
- warranties and conditions, express and implied, including
- warranties or conditions of title and non-infringement, and implied
- warranties or conditions of merchantability and fitness for a
- particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all
- liability for damages, including direct, indirect, special,
- incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement
- are offered by that Contributor alone and not by any other party;
- and
-
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software
- exchange.
-
- When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the
- Program.
-
- Contributors may not remove or alter any copyright notices contained
- within the Program.
-
- Each Contributor must identify itself as the originator of its
- Contribution, if any, in a manner that reasonably allows subsequent
- Recipients to identify the originator of the Contribution.
-
- 4. COMMERCIAL DISTRIBUTION
-
- Commercial distributors of software may accept certain
- responsibilities with respect to end users, business partners and the
- like. While this license is intended to facilitate the commercial use
- of the Program, the Contributor who includes the Program in a
- commercial product offering should do so in a manner which does not
- create potential liability for other Contributors. Therefore, if a
- Contributor includes the Program in a commercial product offering,
- such Contributor ("Commercial Contributor") hereby agrees to defend
- and indemnify every other Contributor ("Indemnified Contributor")
- against any losses, damages and costs (collectively "Losses") arising
- from claims, lawsuits and other legal actions brought by a third party
- against the Indemnified Contributor to the extent caused by the acts
- or omissions of such Commercial Contributor in connection with its
- distribution of the Program in a commercial product offering. The
- obligations in this section do not apply to any claims or Losses
- relating to any actual or alleged intellectual property infringement.
- In order to qualify, an Indemnified Contributor must: a) promptly
- notify the Commercial Contributor in writing of such claim, and b)
- allow the Commercial Contributor to control, and cooperate with the
- Commercial Contributor in, the defense and any related settlement
- negotiations. The Indemnified Contributor may participate in any such
- claim at its own expense.
-
- For example, a Contributor might include the Program in a commercial
- product offering, Product X. That Contributor is then a Commercial
- Contributor. If that Commercial Contributor then makes performance
- claims, or offers warranties related to Product X, those performance
- claims and warranties are such Commercial Contributor's responsibility
- alone. Under this section, the Commercial Contributor would have to
- defend claims against the other Contributors related to those
- performance claims and warranties, and if a court requires any other
- Contributor to pay any damages as a result, the Commercial Contributor
- must pay those damages.
-
- 5. NO WARRANTY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
- PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
- WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
- OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
- responsible for determining the appropriateness of using and
- distributing the Program and assumes all risks associated with its
- exercise of rights under this Agreement, including but not limited to
- the risks and costs of program errors, compliance with applicable
- laws, damage to or loss of data, programs or equipment, and
- unavailability or interruption of operations.
-
- 6. DISCLAIMER OF LIABILITY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
- ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
- WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
- DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
- HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 7. GENERAL
-
- If any provision of this Agreement is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability of
- the remainder of the terms of this Agreement, and without further
- action by the parties hereto, such provision shall be reformed to the
- minimum extent necessary to make such provision valid and enforceable.
-
- If Recipient institutes patent litigation against a Contributor with
- respect to a patent applicable to software (including a cross-claim or
- counterclaim in a lawsuit), then any patent licenses granted by that
- Contributor to such Recipient under this Agreement shall terminate as
- of the date such litigation is filed. In addition, if Recipient
- institutes patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Program
- itself (excluding combinations of the Program with other software or
- hardware) infringes such Recipient's patent(s), then such Recipient's
- rights granted under Section 2(b) shall terminate as of the date such
- litigation is filed.
-
- All Recipient's rights under this Agreement shall terminate if it
- fails to comply with any of the material terms or conditions of this
- Agreement and does not cure such failure in a reasonable period of
- time after becoming aware of such noncompliance. If all Recipient's
- rights under this Agreement terminate, Recipient agrees to cease use
- and distribution of the Program as soon as reasonably practicable.
- However, Recipient's obligations under this Agreement and any licenses
- granted by Recipient relating to the Program shall continue and
- survive.
-
- Everyone is permitted to copy and distribute copies of this Agreement,
- but in order to avoid inconsistency the Agreement is copyrighted and
- may only be modified in the following manner. The Agreement Steward
- reserves the right to publish new versions (including revisions) of
- this Agreement from time to time. No one other than the Agreement
- Steward has the right to modify this Agreement. IBM is the initial
- Agreement Steward. IBM may assign the responsibility to serve as the
- Agreement Steward to a suitable separate entity. Each new version of
- the Agreement will be given a distinguishing version number. The
- Program (including Contributions) may always be distributed subject to
- the version of the Agreement under which it was received. In addition,
- after a new version of the Agreement is published, Contributor may
- elect to distribute the Program (including its Contributions) under
- the new version. Except as expressly stated in Sections 2(a) and 2(b)
- above, Recipient receives no rights or licenses to the intellectual
- property of any Contributor under this Agreement, whether expressly,
- by implication, estoppel or otherwise. All rights in the Program not
- expressly granted under this Agreement are reserved.
-
- This Agreement is governed by the laws of the State of New York and
- the intellectual property laws of the United States of America. No
- party to this Agreement will bring a legal action under this Agreement
- more than one year after the cause of action arose. Each party waives
- its rights to a jury trial in any resulting litigation.
-
-Copyright (c) 2004 by the Open Source Initiative
-This is a copy of the license posted on 2004-10-06 at:
- http://www.opensource.org/licenses/cpl
diff --git a/usr/src/lib/libast/THIRDPARTYLICENSE.descrip b/usr/src/lib/libast/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index 718db11918..0000000000
--- a/usr/src/lib/libast/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-AT&T ADVANCED SOFTWARE TECHNOLOGY LIBRARY (LIBAST)
diff --git a/usr/src/lib/libast/amd64/include/ast/align.h b/usr/src/lib/libast/amd64/include/ast/align.h
deleted file mode 100644
index 949cc99b7a..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/align.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
-#ifndef _def_align_ast
-#define _def_align_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
-
-#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
-#define ALIGN_POINTER(x) ((char*)(x))
-#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
-
-#define ALIGN_BOUND ALIGN_BOUND2
-#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
-
-#define ALIGN_BIT1 0x1
-#define ALIGN_BOUND1 ALIGN_BOUND2
-#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
-#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffe)
-#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
-#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
-
-#define ALIGN_BIT2 0x2
-#define ALIGN_BOUND2 16
-#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+15)
-#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffff0)
-#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffd)
-#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
-#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast.h b/usr/src/lib/libast/amd64/include/ast/ast.h
deleted file mode 100644
index 5c0d5dcd30..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast.h
+++ /dev/null
@@ -1,388 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Advanced Software Technology Library
- * AT&T Research
- *
- * std + posix + ast
- */
-
-#ifndef _AST_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_H
-
-#include <ast_version.h>
-
-#ifndef _AST_STD_H
-#include <ast_std.h>
-#endif
-
-#ifndef _SFIO_H
-#include <sfio.h>
-#endif
-
-#ifndef ast
-#define ast _ast_info
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 1024
-#endif
-
-/*
- * workaround botched headers that assume <stdio.h>
- */
-
-#ifndef FILE
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-#define FILE struct _sfio_s
-#ifndef __FILE_typedef
-#define __FILE_typedef 1
-#endif
-#ifndef _FILEDEFED
-#define _FILEDEFED 1
-#endif
-#endif
-
-/*
- * exit() support -- this matches shell exit codes
- */
-
-#define EXIT_BITS 8 /* # exit status bits */
-
-#define EXIT_USAGE 2 /* usage exit code */
-#define EXIT_QUIT ((1<<(EXIT_BITS))-1) /* parent should quit */
-#define EXIT_NOTFOUND ((1<<(EXIT_BITS-1))-1) /* command not found */
-#define EXIT_NOEXEC ((1<<(EXIT_BITS-1))-2) /* other exec error */
-
-#define EXIT_CODE(x) ((x)&((1<<EXIT_BITS)-1))
-#define EXIT_CORE(x) (EXIT_CODE(x)|(1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))
-#define EXIT_TERM(x) (EXIT_CODE(x)|(1<<EXIT_BITS))
-
-/*
- * NOTE: for compatibility the following work for EXIT_BITS={7,8}
- */
-
-#define EXIT_STATUS(x) (((x)&((1<<(EXIT_BITS-2))-1))?(x):EXIT_CODE((x)>>EXIT_BITS))
-
-#define EXITED_CORE(x) (((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))==((1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))||((x)&((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))==((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))
-#define EXITED_TERM(x) ((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))
-
-/*
- * astconflist() flags
- */
-
-#define ASTCONF_parse 0x0001
-#define ASTCONF_write 0x0002
-#define ASTCONF_read 0x0004
-#define ASTCONF_lower 0x0008
-#define ASTCONF_base 0x0010
-#define ASTCONF_defined 0x0020
-#define ASTCONF_quote 0x0040
-#define ASTCONF_table 0x0080
-#define ASTCONF_matchcall 0x0100
-#define ASTCONF_matchname 0x0200
-#define ASTCONF_matchstandard 0x0400
-#define ASTCONF_error 0x0800
-#define ASTCONF_system 0x1000
-#define ASTCONF_AST 0x2000
-
-/*
- * pathcanon() flags
- */
-
-#define PATH_PHYSICAL 01
-#define PATH_DOTDOT 02
-#define PATH_EXISTS 04
-#define PATH_VERIFIED(n) (((n)&01777)<<5)
-
-/*
- * pathaccess() flags
- */
-
-#define PATH_READ 004
-#define PATH_WRITE 002
-#define PATH_EXECUTE 001
-#define PATH_REGULAR 010
-#define PATH_ABSOLUTE 020
-
-/*
- * touch() flags
- */
-
-#define PATH_TOUCH_CREATE 01
-#define PATH_TOUCH_VERBATIM 02
-
-/*
- * pathcheck() info
- */
-
-typedef struct
-{
- unsigned long date;
- char* feature;
- char* host;
- char* user;
-} Pathcheck_t;
-
-/*
- * strgrpmatch() flags
- */
-
-#define STR_MAXIMAL 01 /* maximal match */
-#define STR_LEFT 02 /* implicit left anchor */
-#define STR_RIGHT 04 /* implicit right anchor */
-#define STR_ICASE 010 /* ignore case */
-#define STR_GROUP 020 /* (|&) inside [@|&](...) only */
-
-/*
- * fmtquote() flags
- */
-
-#define FMT_ALWAYS 0x01 /* always quote */
-#define FMT_ESCAPED 0x02 /* already escaped */
-#define FMT_SHELL 0x04 /* escape $ ` too */
-#define FMT_WIDE 0x08 /* don't escape 8 bit chars */
-#define FMT_PARAM 0x10 /* disable FMT_SHELL ${$( quote */
-
-/*
- * multibyte macros
- */
-
-#define mbmax() (ast.mb_cur_max)
-#define mberr() (ast.tmp_int<0)
-
-#define mbcoll() (ast.mb_xfrm!=0)
-#define mbwide() (mbmax()>1)
-
-#define mbchar(p) (mbwide()?((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),mbmax()))>0?((p+=ast.tmp_int),ast.tmp_wchar):(p+=ast.mb_sync+1,ast.tmp_int)):(*(unsigned char*)(p++)))
-#define mbinit() (mbwide()?(*ast.mb_towc)((wchar_t*)0,(char*)0,mbmax()):0)
-#define mbsize(p) (mbwide()?(*ast.mb_len)((char*)(p),mbmax()):((p),1))
-#define mbconv(s,w) (ast.mb_conv?(*ast.mb_conv)(s,w):((*(s)=(w)),1))
-#define mbwidth(w) (ast.mb_width&&((ast.tmp_int=(*ast.mb_width)(w))>=0||(w)>UCHAR_MAX)?ast.tmp_int:1)
-#define mbxfrm(t,f,n) (mbcoll()?(*ast.mb_xfrm)((char*)(t),(char*)(f),n):0)
-
-/*
- * common macros
- */
-
-#define elementsof(x) (sizeof(x)/sizeof(x[0]))
-#define integralof(x) (((char*)(x))-((char*)0))
-#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
-#define oldof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)malloc(sizeof(t)*(n)+(x)))
-#define pointerof(x) ((__V_*)((char*)0+(x)))
-#define roundof(x,y) (((x)+(y)-1)&~((y)-1))
-#define ssizeof(x) ((int)sizeof(x))
-
-#define streq(a,b) (*(a)==*(b)&&!strcmp(a,b))
-#define strneq(a,b,n) (*(a)==*(b)&&!strncmp(a,b,n))
-#define strsignal(s) fmtsignal(s)
-
-#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
-#define NiL 0
-#define NoP(x) (void)(x)
-#else
-#define NiL ((char*)0)
-#define NoP(x) (&x,1)
-#endif
-
-#if !defined(NoF)
-#if defined(__STDC__) || defined(__STDPP__)
-#define NoF(x) void _DATA_ ## x () {}
-#else
-#define NoF(x) void _DATA_/**/x () {}
-#endif
-#if !defined(_DATA_)
-#define _DATA_
-#endif
-#endif
-
-#if !defined(NoN)
-#if defined(__STDC__) || defined(__STDPP__)
-#define NoN(x) void _STUB_ ## x () {}
-#else
-#define NoN(x) void _STUB_/**/x () {}
-#endif
-#if !defined(_STUB_)
-#define _STUB_
-#endif
-#endif
-
-#define NOT_USED(x) NoP(x)
-
-typedef int (*Error_f) __PROTO__((__V_*, __V_*, int, ...));
-
-typedef int (*Ast_confdisc_f) __PROTO__((const char*, const char*, const char*));
-typedef int (*Strcmp_context_f) __PROTO__((const char*, const char*, __V_*));
-typedef int (*Strcmp_f) __PROTO__((const char*, const char*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* astgetconf __PROTO__((const char*, const char*, const char*, int, Error_f));
-extern __MANGLE__ char* astconf __PROTO__((const char*, const char*, const char*));
-extern __MANGLE__ Ast_confdisc_f astconfdisc __PROTO__((Ast_confdisc_f));
-extern __MANGLE__ void astconflist __PROTO__((Sfio_t*, const char*, int, const char*));
-extern __MANGLE__ off_t astcopy __PROTO__((int, int, off_t));
-extern __MANGLE__ int astlicense __PROTO__((char*, int, char*, char*, int, int, int));
-extern __MANGLE__ int astquery __PROTO__((int, const char*, ...));
-extern __MANGLE__ void astwinsize __PROTO__((int, int*, int*));
-
-extern __MANGLE__ ssize_t base64encode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
-extern __MANGLE__ ssize_t base64decode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
-extern __MANGLE__ int chresc __PROTO__((const char*, char**));
-extern __MANGLE__ int chrtoi __PROTO__((const char*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ char* fmtbase __PROTO__((long, int, int));
-extern __MANGLE__ char* fmtbasell __PROTO__((intmax_t, int, int));
-#define fmtbase(a,b,c) fmtbasell((intmax_t)(a),b,c) /* until 2003-09-01 */
-extern __MANGLE__ char* fmtbuf __PROTO__((size_t));
-extern __MANGLE__ char* fmtclock __PROTO__((Sfulong_t));
-extern __MANGLE__ char* fmtelapsed __PROTO__((unsigned long, int));
-extern __MANGLE__ char* fmterror __PROTO__((int));
-extern __MANGLE__ char* fmtesc __PROTO__((const char*));
-extern __MANGLE__ char* fmtesq __PROTO__((const char*, const char*));
-extern __MANGLE__ char* fmtident __PROTO__((const char*));
-extern __MANGLE__ char* fmtip4 __PROTO__((uint32_t, int));
-extern __MANGLE__ char* fmtfmt __PROTO__((const char*));
-extern __MANGLE__ char* fmtgid __PROTO__((int));
-extern __MANGLE__ char* fmtmatch __PROTO__((const char*));
-extern __MANGLE__ char* fmtmode __PROTO__((int, int));
-extern __MANGLE__ char* fmtnesq __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ char* fmtnum __PROTO__((unsigned long, int));
-extern __MANGLE__ char* fmtperm __PROTO__((int));
-extern __MANGLE__ char* fmtquote __PROTO__((const char*, const char*, const char*, size_t, int));
-extern __MANGLE__ char* fmtre __PROTO__((const char*));
-extern __MANGLE__ char* fmtscale __PROTO__((Sfulong_t, int));
-extern __MANGLE__ char* fmtsignal __PROTO__((int));
-extern __MANGLE__ char* fmttime __PROTO__((const char*, time_t));
-extern __MANGLE__ char* fmtuid __PROTO__((int));
-extern __MANGLE__ char* fmtversion __PROTO__((unsigned long));
-extern __MANGLE__ __V_* memdup __PROTO__((const __V_*, size_t));
-extern __MANGLE__ void memfatal __PROTO__((void));
-extern __MANGLE__ unsigned int memhash __PROTO__((const __V_*, int));
-extern __MANGLE__ unsigned long memsum __PROTO__((const __V_*, int, unsigned long));
-extern __MANGLE__ char* pathaccess __PROTO__((char*, const char*, const char*, const char*, int));
-extern __MANGLE__ char* pathbin __PROTO__((void));
-extern __MANGLE__ char* pathcanon __PROTO__((char*, int));
-extern __MANGLE__ char* pathcat __PROTO__((char*, const char*, int, const char*, const char*));
-extern __MANGLE__ int pathcd __PROTO__((const char*, const char*));
-extern __MANGLE__ int pathcheck __PROTO__((const char*, const char*, Pathcheck_t*));
-extern __MANGLE__ int pathexists __PROTO__((char*, int));
-extern __MANGLE__ char* pathfind __PROTO__((const char*, const char*, const char*, char*, size_t));
-extern __MANGLE__ int pathgetlink __PROTO__((const char*, char*, int));
-extern __MANGLE__ int pathinclude __PROTO__((const char*));
-extern __MANGLE__ char* pathkey __PROTO__((char*, char*, const char*, const char*, const char*));
-extern __MANGLE__ size_t pathnative __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathpath __PROTO__((char*, const char*, const char*, int));
-extern __MANGLE__ size_t pathposix __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathprobe __PROTO__((char*, char*, const char*, const char*, const char*, int));
-extern __MANGLE__ size_t pathprog __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathrepl __PROTO__((char*, const char*, const char*));
-extern __MANGLE__ int pathsetlink __PROTO__((const char*, const char*));
-extern __MANGLE__ char* pathshell __PROTO__((void));
-extern __MANGLE__ char* pathtemp __PROTO__((char*, size_t, const char*, const char*, int*));
-extern __MANGLE__ char* pathtmp __PROTO__((char*, const char*, const char*, int*));
-extern __MANGLE__ char* setenviron __PROTO__((const char*));
-extern __MANGLE__ int stracmp __PROTO__((const char*, const char*));
-extern __MANGLE__ char* strcopy __PROTO__((char*, const char*));
-extern __MANGLE__ unsigned long strelapsed __PROTO__((const char*, char**, int));
-extern __MANGLE__ int stresc __PROTO__((char*));
-extern __MANGLE__ long streval __PROTO__((const char*, char**, long(*)(const char*, char**)));
-extern __MANGLE__ long strexpr __PROTO__((const char*, char**, long(*)(const char*, char**, __V_*), __V_*));
-extern __MANGLE__ int strgid __PROTO__((const char*));
-extern __MANGLE__ int strgrpmatch __PROTO__((const char*, const char*, int*, int, int));
-extern __MANGLE__ unsigned int strhash __PROTO__((const char*));
-extern __MANGLE__ __V_* strlook __PROTO__((const __V_*, size_t, const char*));
-extern __MANGLE__ int strmatch __PROTO__((const char*, const char*));
-extern __MANGLE__ int strmode __PROTO__((const char*));
-extern __MANGLE__ int strnacmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ char* strncopy __PROTO__((char*, const char*, size_t));
-extern __MANGLE__ int strnpcmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ double strntod __PROTO__((const char*, size_t, char**));
-extern __MANGLE__ _ast_fltmax_t strntold __PROTO__((const char*, size_t, char**));
-extern __MANGLE__ long strntol __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ intmax_t strntoll __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ long strnton __PROTO__((const char*, size_t, char**, char*, int));
-extern __MANGLE__ unsigned long strntoul __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ intmax_t strntonll __PROTO__((const char*, size_t, char**, char*, int));
-extern __MANGLE__ uintmax_t strntoull __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ int strnvcmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ int stropt __PROTO__((const char*, const __V_*, int, int(*)(__V_*, const __V_*, int, const char*), __V_*));
-extern __MANGLE__ int strpcmp __PROTO__((const char*, const char*));
-extern __MANGLE__ int strperm __PROTO__((const char*, char**, int));
-extern __MANGLE__ __V_* strpsearch __PROTO__((const __V_*, size_t, size_t, const char*, char**));
-extern __MANGLE__ __V_* strsearch __PROTO__((const __V_*, size_t, size_t, Strcmp_f, const char*, __V_*));
-extern __MANGLE__ void strsort __PROTO__((char**, int, int(*)(const char*, const char*)));
-extern __MANGLE__ char* strsubmatch __PROTO__((const char*, const char*, int));
-extern __MANGLE__ unsigned long strsum __PROTO__((const char*, unsigned long));
-extern __MANGLE__ char* strtape __PROTO__((const char*, char**));
-extern __MANGLE__ int strtoip4 __PROTO__((const char*, char**, uint32_t*, unsigned char*));
-extern __MANGLE__ long strton __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ intmax_t strtonll __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ int struid __PROTO__((const char*));
-extern __MANGLE__ int struniq __PROTO__((char**, int));
-extern __MANGLE__ int strvcmp __PROTO__((const char*, const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/*
- * C library global data symbols not prototyped by <unistd.h>
- */
-
-#if !defined(environ) && defined(__DYNAMIC__)
-#define environ __DYNAMIC__(environ)
-#else
-extern __MANGLE__ char** environ;
-#endif
-
-/*
- * really handy malloc()/free() (__FILE__,__LINE__,__FUNCTION__) tracing
- * make with VMDEBUG==1 or debug=1 or CCFLAGS=$(CC.DEBUG)
- * VMDEBUG==0 disables
- * at runtime export VMDEBUG or VMTRACE per vmalloc.3
- * to list originating call locations
- */
-
-#if !_std_malloc && !defined(VMFL) && !defined(_VMHDR_H) && \
- (!defined(VMDEBUG) || VMDEBUG) && (VMDEBUG || _BLD_DEBUG)
-
-#define VMFL 1
-#include <vmalloc.h>
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_botch.h b/usr/src/lib/libast/amd64/include/ast/ast_botch.h
deleted file mode 100644
index a03d7853d6..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_botch.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_ccode.h b/usr/src/lib/libast/amd64/include/ast/ast_ccode.h
deleted file mode 100644
index 95dff2c590..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_ccode.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
-#ifndef _def_ccode_ast
-#define _def_ccode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define CC_ASCII 1 /* ISO-8859-1 */
-#define CC_EBCDIC_E 2 /* Xopen dd(1) EBCDIC */
-#define CC_EBCDIC_I 3 /* Xopen dd(1) IBM */
-#define CC_EBCDIC_O 4 /* IBM-1047 mvs OpenEdition */
-#define CC_EBCDIC_S 5 /* Siemens posix-bc */
-#define CC_EBCDIC_H 6 /* IBM-37 AS/400 */
-#define CC_EBCDIC_M 7 /* IBM mvs cobol */
-#define CC_EBCDIC_U 8 /* microfocus cobol */
-
-#define CC_MAPS 8 /* number of code maps */
-
-#define CC_EBCDIC CC_EBCDIC_E
-#define CC_EBCDIC1 CC_EBCDIC_E
-#define CC_EBCDIC2 CC_EBCDIC_I
-#define CC_EBCDIC3 CC_EBCDIC_O
-
-#define CC_NATIVE CC_ASCII /* native character code */
-#define CC_ALIEN CC_EBCDIC /* alien character code */
-
-#define CC_bel 0007 /* bel character */
-#define CC_esc 0033 /* esc character */
-#define CC_sub 0032 /* sub character */
-#define CC_vt 0013 /* vt character */
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_common.h b/usr/src/lib/libast/amd64/include/ast/ast_common.h
deleted file mode 100644
index 55f0a40c73..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_common.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
-#ifndef _AST_COMMON_H
-#define _AST_COMMON_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_pthread 1 /* #include <pthread.h> ok */
-#define _hdr_stdarg 1 /* #include <stdarg.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdint 1 /* #include <stdint.h> ok */
-#define _hdr_inttypes 1 /* #include <inttypes.h> ok */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_long_double 1 /* long double is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _std_proto 1 /* standard C prototypes ok */
-#define _ptr_void 1 /* standard C void* ok */
-/* disable non-standard linux/gnu inlines */
-#ifdef __GNUC__
-# undef __OPTIMIZE_SIZE__
-# define __OPTIMIZE_SIZE__ 1
-#endif
-
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && __STDC__
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && (__cplusplus || c_plusplus)
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && _std_proto
-# define __STD_C 1
-#endif
-#if !defined(__STD_C)
-# define __STD_C 0
-#endif
-
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-# if __cplusplus || c_plusplus
-# define _BEGIN_EXTERNS_ extern "C" {
-# define _END_EXTERNS_ }
-# else
-# define _BEGIN_EXTERNS_
-# define _END_EXTERNS_
-# endif
-#endif
-
-/* _ARG_ simplifies function prototyping among flavors of C */
-#ifndef _ARG_
-# if __STD_C
-# define _ARG_(x) x
-# else
-# define _ARG_(x) ()
-# endif
-#endif
-
-/* _NIL_ simplifies defining nil pointers to a given type */
-#ifndef _NIL_
-# define _NIL_(x) ((x)0)
-#endif
-
-/* __INLINE__ is the inline keyword */
-#if !defined(__INLINE__) && defined(__cplusplus)
-# define __INLINE__ inline
-#endif
-#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-#endif
-
-/* Void_t is defined so that Void_t* can address any type */
-#ifndef Void_t
-# if __STD_C
-# define Void_t void
-# else
-# define Void_t char
-# endif
-#endif
-
-/* windows variants and veneers */
-#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
-# define _WINIX 1
-#endif
-
-/* dynamic linked library external scope handling */
-#ifdef __DYNAMIC__
-# undef __DYNAMIC__
-# ifndef _DLL
-# define _DLL 1
-# endif
-#endif
-#if _dll_import
-# if _BLD_STATIC && !_BLD_DLL
-# undef _DLL
-# else
-# if !_UWIN && !defined(_DLL)
-# define _DLL 1
-# endif
-# endif
-# if !defined(__EXPORT__) && _BLD_DLL
-# define __EXPORT__ __declspec(dllexport)
-# endif
-# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
-# define __IMPORT__ __declspec(dllimport)
-# endif
-# if _BLD_DLL && _UWIN
-# define __DYNAMIC__(v) (_ast_getdll()->_ast_ ## v)
-# endif
-#endif
-#if !defined(_astimport)
-# if defined(__IMPORT__) && defined(_DLL)
-# define _astimport __IMPORT__
-# else
-# define _astimport extern
-# endif
-#endif
-#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
-# ifdef __STDC__
-# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
-# else
-# define __EXTERN__(T,obj) extern T obj; T* _imp__/**/obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__/**/obj = &obj
-# endif
-#else
-# define __EXTERN__(T,obj) extern T obj
-# define __DEFINE__(T,obj,val) T obj = val
-#endif
-
-#define _ast_LL 1 /* LL numeric suffix supported */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intmax_long 1
-#define _ast_intswap 7
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt16_t long double
-#define _ast_fltmax_t _ast_flt16_t
-#define _typ_int8_t 1 /* int8_t is a type */
-#define _typ_uint8_t 1 /* uint8_t is a type */
-#define _typ_int16_t 1 /* int16_t is a type */
-#define _typ_uint16_t 1 /* uint16_t is a type */
-#define _typ_int32_t 1 /* int32_t is a type */
-#define _typ_uint32_t 1 /* uint32_t is a type */
-#define _typ_int64_t 1 /* int64_t is a type */
-#define _typ_uint64_t 1 /* uint64_t is a type */
-#define _typ_intmax_t 1 /* intmax_t is a type */
-#define _typ_uintmax_t 1 /* uintmax_t is a type */
-
-#ifndef va_listref
-#ifndef va_start
-#if __STD_C
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-#define va_listref(p) (&(p)) /* pass va_list to varargs function */
-#define va_listval(p) (*(p)) /* retrieve va_list from va_arg(ap,va_listarg) */
-#define va_listarg va_list* /* va_arg() va_list type */
-#endif
-#ifndef _AST_STD_H
-# if __STD_C && _hdr_stddef
-# include <stddef.h>
-# endif
-# if _sys_types
-# include <sys/types.h>
-# endif
-# if _hdr_stdint
-# include <stdint.h>
-# else
-# if _hdr_inttypes
-# include <inttypes.h>
-# endif
-# endif
-#endif
-#if !_typ_size_t
-# define _typ_size_t 1
- typedef int size_t;
-#endif
-#if !_typ_ssize_t
-# define _typ_ssize_t 1
- typedef int ssize_t;
-#endif
-#ifndef _AST_STD_H
-# if !_def_map_ast
-# include <ast_map.h>
-# endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_dir.h b/usr/src/lib/libast/amd64/include/ast/ast_dir.h
deleted file mode 100644
index c873ed3253..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_dir.h
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * AT&T Research
- *
- * common dirent maintenance interface
- */
-
-#ifndef _AST_DIR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_DIR_H
-
-#include <ast_lib.h>
-
-#if _mem_d_fileno_dirent || _mem_d_ino_dirent
-#if !_mem_d_fileno_dirent
-#undef _mem_d_fileno_dirent
-#define _mem_d_fileno_dirent 1
-#define d_fileno d_ino
-#endif
-#endif
-
-#if _BLD_ast
-#include "dirlib.h"
-#else
-#include <dirent.h>
-#endif
-
-#if _mem_d_fileno_dirent
-#define D_FILENO(d) ((d)->d_fileno)
-#endif
-
-#if _mem_d_namlen_dirent
-#define D_NAMLEN(d) ((d)->d_namlen)
-#else
-#define D_NAMLEN(d) (strlen((d)->d_name))
-#endif
-
-#if _mem_d_reclen_dirent
-#define D_RECLEN(d) ((d)->d_reclen)
-#else
-#define D_RECLEN(d) D_RECSIZ(d,D_NAMLEN(d))
-#endif
-
-#define D_RECSIZ(d,n) (sizeof(*(d))-sizeof((d)->d_name)+((n)+sizeof(char*))&~(sizeof(char*)-1))
-
-/*
- * NOTE: 2003-03-27 mac osx bug symlink==DT_REG bug discovered;
- * the kernel *and* all directories must be fixed, so d_type
- * is summarily disabled until we see that happen
- */
-
-#if _mem_d_type_dirent && defined(DT_UNKNOWN) && defined(DT_REG) && defined(DT_DIR) && defined(DT_LNK) && ! ( __APPLE__ || __MACH__ )
-#define D_TYPE(d) ((d)->d_type)
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_dirent.h b/usr/src/lib/libast/amd64/include/ast/ast_dirent.h
deleted file mode 100644
index bd67b35177..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_dirent.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
-#ifndef _def_dirent_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dirent_ast 1
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _nxt_dirent <../include/dirent.h> /* include path for the native <dirent.h> */
-#define _nxt_dirent_str "../include/dirent.h" /* include string for the native <dirent.h> */
-/*
- * <dirent.h> for systems with ok <dirent.h>
- */
-
-#ifndef _DIRENT_H
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#ifndef _DIRENT_H
-#define _DIRENT_H
-#endif
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_fcntl.h b/usr/src/lib/libast/amd64/include/ast/ast_fcntl.h
deleted file mode 100644
index 3eeb1c5002..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_fcntl.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
-#ifndef _def_fcntl_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fcntl_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <ast_fs.h>
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#define O_BINARY 0
-#define O_TEMPORARY 0
-#define O_TEXT 0
-
-#include <ast_fs.h>
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_fstat64
-#define fstat fstat64
-#endif
-#if _lib_lstat64
-#define lstat lstat64
-#endif
-#if _lib_stat64
-#define stat stat64
-#endif
-#if _lib_creat64
-#define creat creat64
-#endif
-#if _lib_mmap64
-#define mmap mmap64
-#endif
-#if _lib_open64
-#undef open
-#define open open64
-#endif
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_float.h b/usr/src/lib/libast/amd64/include/ast/ast_float.h
deleted file mode 100644
index 341a22cb09..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_float.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
-#ifndef _def_float_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_float_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_float 1 /* #include <float.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_math 1 /* #include <math.h> ok */
-#define _hdr_values 1 /* #include <values.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
-#define _lib_frexp 1 /* frexp() in default lib(s) */
-#define _lib_frexpl 1 /* frexpl() in default lib(s) */
-#define _lib_ldexp 1 /* ldexp() in default lib(s) */
-#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
-#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
-#define _lib_copysign 1 /* copysign() in default lib(s) */
-#define _lib_copysignl 1 /* copysignl() in default lib(s) */
-#include <ast_common.h>
-#include <float.h>
-#include <math.h>
-#ifndef FLT_DIG
-#define FLT_DIG 6
-#endif
-#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
-#endif
-#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
-#endif
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
-#endif
-#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
-#endif
-#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
-#endif
-#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
-#endif
-#ifndef DBL_DIG
-#define DBL_DIG 15
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
-#endif
-#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
-#endif
-#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
-#endif
-#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
-#endif
-#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
-#endif
-#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
-#endif
-#ifndef LDBL_DIG
-#define LDBL_DIG 18
-#endif
-#ifndef LDBL_MAX
-#define LDBL_MAX 1.1897314953572317650213E+4932L
-#endif
-#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
-#endif
-#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
-#endif
-#ifndef LDBL_MIN
-#define LDBL_MIN 3.3621031431120935062627E-4932L
-#endif
-#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
-#endif
-#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
-#endif
-
-
-#define USHRT_DIG 4
-#define UINT_DIG 9
-#define ULONG_DIG 19
-#define UINTMAX_DIG ULONG_DIG
-
-#define FLT_ULONG_MAX 18446744073709551615.0F
-#define FLT_ULLONG_MAX FLT_ULONG_MAX
-#define FLT_UINTMAX_MAX FLT_ULONG_MAX
-#define FLT_LONG_MAX 9223372036854775807.0F
-#define FLT_LLONG_MAX FLT_LONG_MAX
-#define FLT_INTMAX_MAX FLT_LONG_MAX
-#define FLT_LONG_MIN (-9223372036854775808.0F)
-#define FLT_LLONG_MIN FLT_LONG_MIN
-#define FLT_INTMAX_MIN FLT_LONG_MIN
-
-#define DBL_ULONG_MAX 18446744073709551615.0
-#define DBL_ULLONG_MAX DBL_ULONG_MAX
-#define DBL_UINTMAX_MAX DBL_ULONG_MAX
-#define DBL_LONG_MAX 9223372036854775807.0
-#define DBL_LLONG_MAX DBL_LONG_MAX
-#define DBL_INTMAX_MAX DBL_LONG_MAX
-#define DBL_LONG_MIN (-9223372036854775808.0)
-#define DBL_LLONG_MIN DBL_LONG_MIN
-#define DBL_INTMAX_MIN DBL_LONG_MIN
-
-#define LDBL_ULONG_MAX 18446744073709551615.0L
-#define LDBL_ULLONG_MAX LDBL_ULONG_MAX
-#define LDBL_UINTMAX_MAX LDBL_ULONG_MAX
-#define LDBL_LONG_MAX 9223372036854775807.0L
-#define LDBL_LLONG_MAX LDBL_LONG_MAX
-#define LDBL_INTMAX_MAX LDBL_LONG_MAX
-#define LDBL_LONG_MIN (-9223372036854775808.0L)
-#define LDBL_LLONG_MIN LDBL_LONG_MIN
-#define LDBL_INTMAX_MIN LDBL_LONG_MIN
-
-#define FLTMAX_UINTMAX_MAX LDBL_UINTMAX_MAX
-#define FLTMAX_INTMAX_MAX LDBL_INTMAX_MAX
-#define FLTMAX_INTMAX_MIN LDBL_INTMAX_MIN
-
-typedef union _ast_dbl_exp_u
-{
- uint32_t e[sizeof(double)/4];
- double f;
-} _ast_dbl_exp_t;
-
-#define _ast_dbl_exp_index 1
-#define _ast_dbl_exp_shift 20
-
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 2
-#define _ast_fltmax_exp_shift 0
-
-#define _ast_flt_unsigned_max_t unsigned long long
-#define _ast_flt_nan_init 0xff,0xff,0xff,0x7f
-#define _ast_flt_inf_init 0x00,0x00,0x80,0x7f
-#define _ast_dbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f
-#define _ast_dbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f
-#define _ast_ldbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x40,0x00,0x00,0x00,0x00,0x00
-#define _ast_ldbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x40,0x00,0x00,0x00,0x00,0x00
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_fs.h b/usr/src/lib/libast/amd64/include/ast/ast_fs.h
deleted file mode 100644
index d217c488c4..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_fs.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
-#ifndef _def_fs_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fs_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _lib_lstat 1 /* lstat() in default lib(s) */
-#define _lib_mknod 1 /* mknod() in default lib(s) */
-#define _lib_sync 1 /* sync() in default lib(s) */
-#include <sys/stat.h>
-#include <sys/mkdev.h>
-#define FS_default "ufs"
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
-#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
-#define _sys_mount 1 /* #include <sys/mount.h> ok */
-#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
-#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
-#define _sys_vfs 1 /* #include <sys/vfs.h> ok */
-#define _mem_st_blocks_stat 1 /* st_blocks is a member of struct stat */
-#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
-#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
-#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
-#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
-#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
-#define _lib_getmntent 1 /* getmntent() in default lib(s) */
-#define _lib_statfs 1 /* statfs() in default lib(s) */
-#define _lib_statvfs 1 /* statvfs() in default lib(s) */
-#define _lib_statfs4 1 /* compile{\ passed */
-#if _sys_statvfs
-#include <sys/statvfs.h>
-#if !_mem_statvfs_f_basetype
-#if _ary_f_reserved7
-#define f_basetype f_reserved7
-#endif
-#endif
-#else
-#define _mem_f_basetype_statvfs 1
-#define _mem_f_frsize_statvfs 1
-struct statvfs
-{
-unsigned long f_bsize; /* fundamental file system block size */
-unsigned long f_frsize; /* fragment size */
-unsigned long f_blocks; /* total # of blocks of f_frsize on fs */
-unsigned long f_bfree; /* total # of free blocks of f_frsize */
-unsigned long f_bavail; /* # of free blocks avail to non-superuser */
-unsigned long f_files; /* total # of file nodes (inodes) */
-unsigned long f_ffree; /* total # of free file nodes */
-unsigned long f_favail; /* # of free nodes avail to non-superuser */
-unsigned long f_fsid; /* file system id (dev for now) */
-char f_basetype[16]; /* target fs type name, null-terminated */
-unsigned long f_flag; /* bit-mask of flags */
-unsigned long f_namemax; /* maximum file name length */
-char f_fstr[32]; /* filesystem-specific string */
-unsigned long f_filler[16]; /* reserved for future expansion */
-};
-extern __MANGLE__ int fstatvfs __PROTO__((int, struct statvfs*));
-extern __MANGLE__ int statvfs __PROTO__((const char*, struct statvfs*));
-#endif
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_statvfs64 && !defined(statvfs)
-#define statvfs statvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int statvfs64 __PROTO__((const char*, struct statvfs64*));
-#endif
-#endif
-#if _lib_fstatvfs64 && !defined(fstatvfs)
-#define fstatvfs fstatvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int fstatvfs64 __PROTO__((int, struct statvfs64*));
-#endif
-#endif
-
-#define _str_st_fstype 1 /* stat.st_fstype is a string */
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_getopt.h b/usr/src/lib/libast/amd64/include/ast/ast_getopt.h
deleted file mode 100644
index c86d826a72..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_getopt.h
+++ /dev/null
@@ -1,25 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#ifdef _AST_STD_I
-#undef _AST_GETOPT_H
-#define _AST_GETOPT_H -1
-#endif
-#ifndef _AST_GETOPT_H
-#define _AST_GETOPT_H 1
-
-extern __MANGLE__ int opterr;
-extern __MANGLE__ int optind;
-extern __MANGLE__ int optopt;
-extern __MANGLE__ char* optarg;
-
-extern __MANGLE__ int getopt __PROTO__((int, char* const*, const char*));
-extern __MANGLE__ int getsubopt __PROTO__((char**, char* const*, char**));
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_iconv.h b/usr/src/lib/libast/amd64/include/ast/ast_iconv.h
deleted file mode 100644
index 145235024c..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_iconv.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
-#ifndef _def_iconv_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_iconv_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_iconv 1 /* #include <iconv.h> ok */
-#define _lib_iconv_open 1 /* iconv_open() in default lib(s) */
-#define _lib_iconv_close 1 /* iconv_close() in default lib(s) */
-#define _lib_iconv 1 /* iconv() in default lib(s) */
-#define _nxt_iconv <../include/iconv.h> /* include path for the native <iconv.h> */
-#define _nxt_iconv_str "../include/iconv.h" /* include string for the native <iconv.h> */
-#include <ast_common.h>
-#include <ccode.h>
-#include <../include/iconv.h> /* the native iconv.h */
-
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
-
-#ifndef _ICONV_LIST_PRIVATE_
-#undef iconv_t
-#define iconv_t _ast_iconv_t
-#undef iconv_f
-#define iconv_f _ast_iconv_f
-#undef iconv_list_t
-#define iconv_list_t _ast_iconv_list_t
-#undef iconv_open
-#define iconv_open _ast_iconv_open
-#undef iconv
-#define iconv _ast_iconv
-#undef iconv_close
-#define iconv_close _ast_iconv_close
-#undef iconv_list
-#define iconv_list _ast_iconv_list
-#undef iconv_move
-#define iconv_move _ast_iconv_move
-#undef iconv_name
-#define iconv_name _ast_iconv_name
-#undef iconv_write
-#define iconv_write _ast_iconv_write
-#endif
-
-typedef Ccmap_t _ast_iconv_list_t;
-typedef __V_* _ast_iconv_t;
-typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ _ast_iconv_t _ast_iconv_open __PROTO__((const char*, const char*));
-extern __MANGLE__ size_t _ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
-extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
-extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
-#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
-#else
-#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_lib.h b/usr/src/lib/libast/amd64/include/ast/ast_lib.h
deleted file mode 100644
index 2373fccd39..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_lib.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
-#ifndef _def_lib_ast
-#define _def_lib_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _hdr_fmtmsg 1 /* #include <fmtmsg.h> ok */
-#define _hdr_fnmatch 1 /* #include <fnmatch.h> ok */
-#define _hdr_libgen 1 /* #include <libgen.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_locale 1 /* #include <locale.h> ok */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_spawn 1 /* #include <spawn.h> ok */
-#define _hdr_syslog 1 /* #include <syslog.h> ok */
-#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
-#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
-#define _dat__tzname 1 /* _tzname in default lib(s) */
-#define _dat_tzname 1 /* tzname in default lib(s) */
-#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
-#define _lib_atexit 1 /* atexit() in default lib(s) */
-#define _lib_bcopy 1 /* bcopy() in default lib(s) */
-#define _lib_bzero 1 /* bzero() in default lib(s) */
-#define _lib_catclose 1 /* catclose() in default lib(s) */
-#define _lib_catgets 1 /* catgets() in default lib(s) */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_confstr 1 /* confstr() in default lib(s) */
-#define _lib_dup2 1 /* dup2() in default lib(s) */
-#define _lib_execlp 1 /* execlp() in default lib(s) */
-#define _lib_execve 1 /* execve() in default lib(s) */
-#define _lib_execvp 1 /* execvp() in default lib(s) */
-#define _lib_fchmod 1 /* fchmod() in default lib(s) */
-#define _lib_fcntl 1 /* fcntl() in default lib(s) */
-#define _lib_fmtmsg 1 /* fmtmsg() in default lib(s) */
-#define _lib_fnmatch 1 /* fnmatch() in default lib(s) */
-#define _lib_fork 1 /* fork() in default lib(s) */
-#define _lib_fsync 1 /* fsync() in default lib(s) */
-#define _lib_getdents 1 /* getdents() in default lib(s) */
-#define _lib_getdtablesize 1 /* getdtablesize() in default lib(s) */
-#define _lib_getdate 1 /* getdate() in default lib(s) */
-#define _lib_getgroups 1 /* getgroups() in default lib(s) */
-#define _lib_gethostname 1 /* gethostname() in default lib(s) */
-#define _lib_getlogin 1 /* getlogin() in default lib(s) */
-#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_getopt 1 /* getopt() in default lib(s) */
-#define _lib_getsubopt 1 /* getsubopt() in default lib(s) */
-#define _lib_getopt_long 1 /* getopt_long() in default lib(s) */
-#define _lib_getopt_long_only 1 /* getopt_long_only() in default lib(s) */
-#define _lib_glob 1 /* glob() in default lib(s) */
-#define _lib_index 1 /* index() in default lib(s) */
-#define _lib_iswblank 1 /* iswblank() in default lib(s) */
-#define _lib_iswctype 1 /* iswctype() in default lib(s) */
-#define _lib_killpg 1 /* killpg() in default lib(s) */
-#define _lib_link 1 /* link() in default lib(s) */
-#define _lib_localeconv 1 /* localeconv() in default lib(s) */
-#define _lib_madvise 1 /* madvise() in default lib(s) */
-#define _lib_mbtowc 1 /* mbtowc() in default lib(s) */
-#define _lib_mbrtowc 1 /* mbrtowc() in default lib(s) */
-#define _lib_memalign 1 /* memalign() in default lib(s) */
-#define _lib_memchr 1 /* memchr() in default lib(s) */
-#define _lib_memcpy 1 /* memcpy() in default lib(s) */
-#define _lib_memmove 1 /* memmove() in default lib(s) */
-#define _lib_memset 1 /* memset() in default lib(s) */
-#define _lib_mkdir 1 /* mkdir() in default lib(s) */
-#define _lib_mkfifo 1 /* mkfifo() in default lib(s) */
-#define _lib_mktemp 1 /* mktemp() in default lib(s) */
-#define _lib_mktime 1 /* mktime() in default lib(s) */
-#define _lib_mount 1 /* mount() in default lib(s) */
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _lib_pathconf 1 /* pathconf() in default lib(s) */
-#define _lib_readlink 1 /* readlink() in default lib(s) */
-#define _lib_remove 1 /* remove() in default lib(s) */
-#define _lib_rename 1 /* rename() in default lib(s) */
-#define _lib_rewinddir 1 /* rewinddir() in default lib(s) */
-#define _lib_rindex 1 /* rindex() in default lib(s) */
-#define _lib_rmdir 1 /* rmdir() in default lib(s) */
-#define _lib_setlocale 1 /* setlocale() in default lib(s) */
-#define _lib_setpgid 1 /* setpgid() in default lib(s) */
-#define _lib_setpgrp 1 /* setpgrp() in default lib(s) */
-#define _lib_setreuid 1 /* setreuid() in default lib(s) */
-#define _lib_setsid 1 /* setsid() in default lib(s) */
-#define _lib_setuid 1 /* setuid() in default lib(s) */
-#define _lib_sigaction 1 /* sigaction() in default lib(s) */
-#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
-#define _lib_socketpair 1 /* socketpair() in default lib(s) */
-#define _lib_strchr 1 /* strchr() in default lib(s) */
-#define _lib_strcoll 1 /* strcoll() in default lib(s) */
-#define _lib_strdup 1 /* strdup() in default lib(s) */
-#define _lib_strerror 1 /* strerror() in default lib(s) */
-#define _lib_strcasecmp 1 /* strcasecmp() in default lib(s) */
-#define _lib_strncasecmp 1 /* strncasecmp() in default lib(s) */
-#define _lib_strrchr 1 /* strrchr() in default lib(s) */
-#define _lib_strstr 1 /* strstr() in default lib(s) */
-#define _lib_strxfrm 1 /* strxfrm() in default lib(s) */
-#define _lib_strftime 1 /* strftime() in default lib(s) */
-#define _lib_swab 1 /* swab() in default lib(s) */
-#define _lib_symlink 1 /* symlink() in default lib(s) */
-#define _lib_sysconf 1 /* sysconf() in default lib(s) */
-#define _lib_sysinfo 1 /* sysinfo() in default lib(s) */
-#define _lib_syslog 1 /* syslog() in default lib(s) */
-#define _lib_telldir 1 /* telldir() in default lib(s) */
-#define _lib_tmpnam 1 /* tmpnam() in default lib(s) */
-#define _lib_tzset 1 /* tzset() in default lib(s) */
-#define _lib_unlink 1 /* unlink() in default lib(s) */
-#define _lib_utime 1 /* utime() in default lib(s) */
-#define _lib_wctype 1 /* wctype() in default lib(s) */
-#define _lib_ftruncate 1 /* ftruncate() in default lib(s) */
-#define _lib_truncate 1 /* truncate() in default lib(s) */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _lib_strtod 1 /* strtod() in default lib(s) */
-#define _lib_strtold 1 /* strtold() in default lib(s) */
-#define _lib_strtol 1 /* strtol() in default lib(s) */
-#define _lib_strtoll 1 /* strtoll() in default lib(s) */
-#define _lib_strtoul 1 /* strtoul() in default lib(s) */
-#define _lib_strtoull 1 /* strtoull() in default lib(s) */
-#define _hdr_signal 1 /* #include <signal.h> ok */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
-#define _npt_sigflag 1 /* sigflag() needs a prototype */
-#define _mem_d_ino_dirent 1 /* d_ino is a member of struct dirent */
-#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
-#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
-#define _mem_DIR 1 /* DIR is a non-opaque struct */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
-#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
-#define _sys_resource 1 /* #include <sys/resource.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _sys_stream 1 /* #include <sys/stream.h> ok */
-#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_off64_t 1 /* off64_t is a type */
-#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
-#define _tst_errno 1 /* errno can be assigned */
-#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
-#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
-#define _lib_select 1 /* select() has standard 5 arg interface */
-#define _pipe_rw 1 /* full duplex pipes */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _lib_vfork 1 /* vfork exists and it works */
-#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
-#define _hdr_string 1 /* #include <string.h> ok */
-#define _lib_memcmp 1 /* standard memcmp interface that works */
-#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_memccpy 1 /* standard memccpy interface that works */
-#define _lib_utime_now 1 /* utime works with 0 time vector */
-#define _UNIV_DEFAULT "att" /* default universe name */
-#define _std_cleanup 1 /* stuck with standard _cleanup */
-#define _std_strcoll 1 /* standard strcoll works */
-#if !_AST_no_spawnveg
-#define _use_spawnveg 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_limits.h b/usr/src/lib/libast/amd64/include/ast/ast_limits.h
deleted file mode 100644
index 0cb6224a85..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_limits.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
-#ifndef _def_limits_ast
-#define _def_limits_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#ifndef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-#ifndef CHAR_MIN
-#define CHAR_MIN -128
-#endif
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1000000
-#endif
-#ifndef INT_MIN
-#define INT_MIN -2147483648
-#endif
-#ifndef LLONG_MAX
-#define LLONG_MAX 9223372036854775807
-#endif
-#ifndef LLONG_MIN
-#define LLONG_MIN -9223372036854775808
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN -2147483648
-#endif
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 5
-#endif
-#ifndef OPEN_MAX_CEIL
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-#define OPEN_MAX_CEIL OPEN_MAX
-#endif
-#ifndef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 4096
-#endif
-#ifndef PTRDIFF_MAX
-#define PTRDIFF_MAX 9223372036854775807
-#endif
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN -9223372036854775808
-#endif
-#ifndef SCHAR_MAX
-#define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-#define SCHAR_MIN -128
-#endif
-#ifndef SHRT_MIN
-#define SHRT_MIN -32768
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX 2147483647
-#endif
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN -2147483648
-#endif
-#ifndef SIZE_MAX
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295
-#endif
-#define SIZE_MAX UINT_MAX
-#endif
-#ifndef SSIZE_MAX
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-#define SSIZE_MAX INT_MAX
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#ifndef ULLONG_MAX
-#define ULLONG_MAX 18446744073709551615
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX 4294967295
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX 65535
-#endif
-#ifndef WCHAR_MAX
-#define WCHAR_MAX 2147483647
-#endif
-#ifndef WCHAR_MIN
-#define WCHAR_MIN -2147483648
-#endif
-#ifndef WINT_MAX
-#define WINT_MAX 2147483647
-#endif
-#ifndef WINT_MIN
-#define WINT_MIN -2147483648
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_map.h b/usr/src/lib/libast/amd64/include/ast/ast_map.h
deleted file mode 100644
index 530740b442..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_map.h
+++ /dev/null
@@ -1,471 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
-#ifndef _def_map_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_map_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-/*
- * prototypes provided for standard interfaces hijacked
- * by ast and mapped to _ast_* but already prototyped
- * unmapped in native headers included by <ast_std.h>
- */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-
-#define _map_libc 1
-#undef basename
-#define basename _ast_basename
-#undef dirname
-#define dirname _ast_dirname
-#undef eaccess
-#define eaccess _ast_eaccess
-#undef execvpe
-#define execvpe _ast_execvpe
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-#undef fnmatch
-#define fnmatch _ast_fnmatch
-#undef fts_children
-#define fts_children _ast_fts_children
-#undef fts_close
-#define fts_close _ast_fts_close
-#undef fts_flags
-#define fts_flags _ast_fts_flags
-#undef fts_notify
-#define fts_notify _ast_fts_notify
-#undef fts_open
-#define fts_open _ast_fts_open
-#undef fts_read
-#define fts_read _ast_fts_read
-#undef fts_set
-#define fts_set _ast_fts_set
-#undef ftw
-#define ftw _ast_ftw
-#undef ftwalk
-#define ftwalk _ast_ftwalk
-#undef ftwflags
-#define ftwflags _ast_ftwflags
-#undef getcwd
-#define getcwd _ast_getcwd
-extern __MANGLE__ char* getcwd __PROTO__((char*, size_t));
-#undef getdate
-#define getdate _ast_getdate
-#undef getopt
-#define getopt _ast_getopt
-#undef getsubopt
-#define getsubopt _ast_getsubopt
-#undef getopt_long
-#define getopt_long _ast_getopt_long
-#undef getopt_long_only
-#define getopt_long_only _ast_getopt_long_only
-#undef optopt
-#define optopt _ast_optopt
-#undef optarg
-#define optarg _ast_optarg
-#undef optind
-#define optind _ast_optind
-#undef opterr
-#define opterr _ast_opterr
-#undef getwd
-#define getwd _ast_getwd
-extern __MANGLE__ char* getwd __PROTO__((char*));
-#undef glob
-#define glob _ast_glob
-#undef globfree
-#define globfree _ast_globfree
-#undef memdup
-#define memdup _ast_memdup
-#undef memfatal
-#define memfatal _ast_memfatal
-#undef memhash
-#define memhash _ast_memhash
-#undef memsum
-#define memsum _ast_memsum
-#undef mkstemp
-#define mkstemp _ast_mkstemp
-extern __MANGLE__ int mkstemp __PROTO__((char*));
-#undef mktemp
-#define mktemp _ast_mktemp
-extern __MANGLE__ char* mktemp __PROTO__((char*));
-#undef mktime
-#define mktime _ast_mktime
-#undef nftw
-#define nftw _ast_nftw
-#undef optctx
-#define optctx _ast_optctx
-#undef optesc
-#define optesc _ast_optesc
-#undef optget
-#define optget _ast_optget
-#undef opthelp
-#define opthelp _ast_opthelp
-#undef optjoin
-#define optjoin _ast_optjoin
-#undef optstr
-#define optstr _ast_optstr
-#undef optusage
-#define optusage _ast_optusage
-#undef pathaccess
-#define pathaccess _ast_pathaccess
-#undef pathbin
-#define pathbin _ast_pathbin
-#undef pathcanon
-#define pathcanon _ast_pathcanon
-#undef pathcat
-#define pathcat _ast_pathcat
-#undef pathcd
-#define pathcd _ast_pathcd
-#undef pathcheck
-#define pathcheck _ast_pathcheck
-#undef pathexists
-#define pathexists _ast_pathexists
-#undef pathfind
-#define pathfind _ast_pathfind
-#undef pathgetlink
-#define pathgetlink _ast_pathgetlink
-#undef pathinclude
-#define pathinclude _ast_pathinclude
-#undef pathkey
-#define pathkey _ast_pathkey
-#undef pathnative
-#define pathnative _ast_pathnative
-#undef pathpath
-#define pathpath _ast_pathpath
-#undef pathposix
-#define pathposix _ast_pathposix
-#undef pathprobe
-#define pathprobe _ast_pathprobe
-#undef pathprog
-#define pathprog _ast_pathprog
-#undef pathrepl
-#define pathrepl _ast_pathrepl
-#undef pathsetlink
-#define pathsetlink _ast_pathsetlink
-#undef pathshell
-#define pathshell _ast_pathshell
-#undef pathstat
-#define pathstat _ast_pathstat
-#undef pathtemp
-#define pathtemp _ast_pathtemp
-#undef pathtmp
-#define pathtmp _ast_pathtmp
-#undef procclose
-#define procclose _ast_procclose
-#undef procfree
-#define procfree _ast_procfree
-#undef procopen
-#define procopen _ast_procopen
-#undef procrun
-#define procrun _ast_procrun
-#undef putenv
-#define putenv _ast_putenv
-#undef re_comp
-#define re_comp _ast_re_comp
-#undef re_exec
-#define re_exec _ast_re_exec
-#undef realpath
-#define realpath _ast_realpath
-extern __MANGLE__ char* realpath __PROTO__((const char*, char*));
-#undef regaddclass
-#define regaddclass _ast_regaddclass
-#undef regalloc
-#define regalloc _ast_regalloc
-#undef regcache
-#define regcache _ast_regcache
-#undef regclass
-#define regclass _ast_regclass
-#undef regcmp
-#define regcmp _ast_regcmp
-#undef regcollate
-#define regcollate _ast_regcollate
-#undef regcomb
-#define regcomb _ast_regcomb
-#undef regcomp
-#define regcomp _ast_regcomp
-#undef regdecomp
-#define regdecomp _ast_regdecomp
-#undef regdup
-#define regdup _ast_regdup
-#undef regerror
-#define regerror _ast_regerror
-#undef regex
-#define regex _ast_regex
-#undef regexec
-#define regexec _ast_regexec
-#undef regfatal
-#define regfatal _ast_regfatal
-#undef regfatalpat
-#define regfatalpat _ast_regfatalpat
-#undef regfree
-#define regfree _ast_regfree
-#undef regncomp
-#define regncomp _ast_regncomp
-#undef regnexec
-#define regnexec _ast_regnexec
-#undef regrecord
-#define regrecord _ast_regrecord
-#undef regrexec
-#define regrexec _ast_regrexec
-#undef regstat
-#define regstat _ast_regstat
-#undef regsub
-#define regsub _ast_regsub
-#undef regsubcomp
-#define regsubcomp _ast_regsubcomp
-#undef regsubexec
-#define regsubexec _ast_regsubexec
-#undef regsubflags
-#define regsubflags _ast_regsubflags
-#undef regsubfree
-#define regsubfree _ast_regsubfree
-#undef remove
-#define remove _ast_remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#undef resolvepath
-#define resolvepath _ast_resolvepath
-extern __MANGLE__ int resolvepath __PROTO__((const char*, char*, size_t));
-#undef setenv
-#define setenv _ast_setenv
-extern __MANGLE__ int setenv __PROTO__((const char*, const char*, int));
-#undef setenviron
-#define setenviron _ast_setenviron
-#undef sigcritical
-#define sigcritical _ast_sigcritical
-#undef signal
-#define signal _ast_signal
-#undef sigunblock
-#define sigunblock _ast_sigunblock
-#undef stracmp
-#define stracmp _ast_stracmp
-#undef strcopy
-#define strcopy _ast_strcopy
-#undef strelapsed
-#define strelapsed _ast_strelapsed
-#undef stresc
-#define stresc _ast_stresc
-#undef streval
-#define streval _ast_streval
-#undef strexpr
-#define strexpr _ast_strexpr
-#undef strftime
-#define strftime _ast_strftime
-#undef strgid
-#define strgid _ast_strgid
-#undef strgrpmatch
-#define strgrpmatch _ast_strgrpmatch
-#undef strhash
-#define strhash _ast_strhash
-#undef strkey
-#define strkey _ast_strkey
-#undef strlcat
-#define strlcat _ast_strlcat
-extern __MANGLE__ size_t strlcat __PROTO__((char*, const char*, size_t));
-#undef strlcpy
-#define strlcpy _ast_strlcpy
-extern __MANGLE__ size_t strlcpy __PROTO__((char*, const char*, size_t));
-#undef strlook
-#define strlook _ast_strlook
-#undef strmatch
-#define strmatch _ast_strmatch
-#undef strmode
-#define strmode _ast_strmode
-#undef strnacmp
-#define strnacmp _ast_strnacmp
-#undef strncopy
-#define strncopy _ast_strncopy
-#undef strntod
-#define strntod _ast_strntod
-#undef strntol
-#define strntol _ast_strntol
-#undef strntold
-#define strntold _ast_strntold
-#undef strntoll
-#define strntoll _ast_strntoll
-#undef strntoul
-#define strntoul _ast_strntoul
-#undef strntoull
-#define strntoull _ast_strntoull
-#undef stropt
-#define stropt _ast_stropt
-#undef strperm
-#define strperm _ast_strperm
-#undef strpsearch
-#define strpsearch _ast_strpsearch
-#undef strptime
-#define strptime _ast_strptime
-#undef strsearch
-#define strsearch _ast_strsearch
-#undef strsort
-#define strsort _ast_strsort
-#undef strsubmatch
-#define strsubmatch _ast_strsubmatch
-#undef strsum
-#define strsum _ast_strsum
-#undef strtape
-#define strtape _ast_strtape
-#undef strtoip4
-#define strtoip4 _ast_strtoip4
-#undef strton
-#define strton _ast_strton
-#undef strtonll
-#define strtonll _ast_strtonll
-#undef struid
-#define struid _ast_struid
-#undef struniq
-#define struniq _ast_struniq
-#undef system
-#define system _ast_system
-extern __MANGLE__ int system __PROTO__((const char*));
-#undef tempnam
-#define tempnam _ast_tempnam
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-#undef tmpnam
-#define tmpnam _ast_tmpnam
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-#undef touch
-#define touch _ast_touch
-#undef wordexp
-#define wordexp _ast_wordexp
-#undef wordfree
-#define wordfree _ast_wordfree
-#undef unsetenv
-#define unsetenv _ast_unsetenv
-
-/* cannot override local malloc */
-#define _map_malloc 1
-#undef calloc
-#define calloc _ast_calloc
-extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
-#undef cfree
-#define cfree _ast_cfree
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-#undef free
-#define free _ast_free
-extern __MANGLE__ void free __PROTO__((__V_*));
-#undef malloc
-#define malloc _ast_malloc
-extern __MANGLE__ __V_* malloc __PROTO__((size_t));
-#undef memalign
-#define memalign _ast_memalign
-extern __MANGLE__ __V_* memalign __PROTO__((size_t, size_t));
-#undef realloc
-#define realloc _ast_realloc
-extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
-#undef strdup
-#define strdup _ast_strdup
-extern __MANGLE__ char* strdup __PROTO__((const char*));
-#undef valloc
-#define valloc _ast_valloc
-extern __MANGLE__ __V_* valloc __PROTO__((size_t));
-#undef strtol
-#define strtol _ast_strtol
-#undef strtoul
-#define strtoul _ast_strtoul
-#undef strtoll
-#define strtoll _ast_strtoll
-#undef strtoull
-#define strtoull _ast_strtoull
-#undef strtod
-#define strtod _ast_strtod
-#undef strtold
-#define strtold _ast_strtold
-extern __MANGLE__ long strtol __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned long strtoul __PROTO__((const char*, char**, int));
-extern __MANGLE__ double strtod __PROTO__((const char*, char**));
-#if !_UWIN
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
-extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_mmap.h b/usr/src/lib/libast/amd64/include/ast/ast_mmap.h
deleted file mode 100644
index 6c80867204..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_mmap.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
-#ifndef _def_mmap_ast
-#define _def_mmap_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_mmap 1 /* standard mmap interface that works */
-#define _lib_mmap64 1 /* mmap64 interface and implementation work */
-#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
-#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
-
-/* some systems get it wrong but escape concise detection */
-#ifndef _NO_MMAP
-#if __CYGWIN__
-#define _NO_MMAP 1
-#endif
-#endif
-
-#if _NO_MMAP
-#undef _lib_mmap
-#undef _lib_mmap64
-#undef _mmap_anon
-#undef _mmap_devzero
-#undef _mmap_worthy
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_mode.h b/usr/src/lib/libast/amd64/include/ast/ast_mode.h
deleted file mode 100644
index 8feea4a027..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_mode.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
-#ifndef _def_mode_ast
-#define _def_mode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define S_ITYPE(m) ((m)&S_IFMT)
-
-#define S_IPERM (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-
-#define _S_IDPERM 1
-#define _S_IDTYPE 1
-
-#define BUFFERSIZE 8192
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_namval.h b/usr/src/lib/libast/amd64/include/ast/ast_namval.h
deleted file mode 100644
index fefe46a0c7..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_namval.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_ndbm.h b/usr/src/lib/libast/amd64/include/ast/ast_ndbm.h
deleted file mode 100644
index 4e4e1648c4..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_ndbm.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
-#ifndef _def_ndbm_ast
-#define _def_ndbm_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_ndbm 1 /* #include <ndbm.h> ok */
-#include <ndbm.h>
-#define _use_ndbm 1
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_nl_types.h b/usr/src/lib/libast/amd64/include/ast/ast_nl_types.h
deleted file mode 100644
index 8fcc5b887a..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_nl_types.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
-#ifndef _def_nl_types_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_nl_types_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_nl_langinfo 1 /* nl_langinfo() in default lib(s) */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_langinfo 1 /* #include <langinfo.h> ok */
-#define _nxt_nl_types <../include/nl_types.h> /* include path for the native <nl_types.h> */
-#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native <nl_types.h> */
-#include <limits.h>
-#include <../include/nl_types.h> /* the native nl_types.h */
-
-#undef NL_SETMAX
-#define NL_SETMAX 1023
-#undef NL_MSGMAX
-#define NL_MSGMAX 32767
-#undef nl_catd
-#define nl_catd _ast_nl_catd
-#undef catopen
-#define catopen _ast_catopen
-#undef catgets
-#define catgets _ast_catgets
-#undef catclose
-#define catclose _ast_catclose
-
-typedef __V_* nl_catd;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ nl_catd catopen __PROTO__((const char*, int));
-extern __MANGLE__ char* catgets __PROTO__((nl_catd, int, int, const char*));
-extern __MANGLE__ int catclose __PROTO__((nl_catd));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_param.h b/usr/src/lib/libast/amd64/include/ast/ast_param.h
deleted file mode 100644
index f462205952..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_param.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
-#ifndef _def_param_ast
-#define _def_param_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#include <sys/param.h>
-#ifndef S_IFDIR
-#include <sys/stat.h>
-#endif
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_standards.h b/usr/src/lib/libast/amd64/include/ast/ast_standards.h
deleted file mode 100644
index 16a8b849f3..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_standards.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_std.h b/usr/src/lib/libast/amd64/include/ast/ast_std.h
deleted file mode 100644
index f98d1861b9..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_std.h
+++ /dev/null
@@ -1,374 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Advanced Software Technology Library
- * AT&T Research
- *
- * a union of standard headers that works
- * with local extensions enabled
- * and local omission compensation
- */
-
-#ifndef _AST_STD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_STD_H 1
-#define _AST_STD_I 1
-
-#include <ast_common.h>
-
-#if _BLD_ast
-#define _BLD_cdt 1
-#define _BLD_sfio 1
-#if !_UWIN
-#define _BLD_vmalloc 1
-#endif
-#endif
-
-#ifdef _SFSTDIO_H
-#define _SKIP_SFSTDIO_H
-#else
-#define _SFSTDIO_H
-#ifndef FILE
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-#define FILE struct _sfio_s
-#ifndef __FILE_typedef
-#define __FILE_typedef 1
-#endif
-#ifndef _FILEDEFED
-#define _FILEDEFED 1
-#endif
-#endif
-#endif
-
-#include <ast_lib.h>
-#include <ast_sys.h>
-#include <ast_getopt.h> /* <stdlib.h> does this */
-#include <ast_fcntl.h>
-#include <ast_limits.h>
-#include <ast_botch.h>
-
-#ifdef _SKIP_SFSTDIO_H
-#undef _SKIP_SFSTDIO_H
-#else
-#undef _SFSTDIO_H
-#undef FILE
-#endif
-
-/* locale stuff */
-
-#if !_hdr_locale
-
-struct lconv
-{
- char* decimal_point;
- char* thousands_sep;
- char* grouping;
- char* int_curr_symbol;
- char* currency_symbol;
- char* mon_decimal_point;
- char* mon_thousands_sep;
- char* mon_grouping;
- char* positive_sign;
- char* negative_sign;
- char int_frac_digits;
- char frac_digits;
- char p_cs_precedes;
- char p_sep_by_space;
- char n_cs_precedes;
- char n_sep_by_space;
- char p_sign_posn;
- char n_sign_posn;
-};
-
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_UWIN /* for ast54 compatibility */
-
-#undef getenv
-#define getenv _ast_getenv
-
-#undef setenviron
-#define setenviron _ast_setenviron
-
-extern __MANGLE__ char* getenv __PROTO__((const char*));
-
-#endif
-
-#undef localeconv
-#define localeconv _ast_localeconv
-
-#undef setlocale
-#define setlocale _ast_setlocale
-
-#undef strerror
-#define strerror _ast_strerror
-
-extern __MANGLE__ struct lconv* localeconv __PROTO__((void));
-extern __MANGLE__ char* setenviron __PROTO__((const char*));
-extern __MANGLE__ char* setlocale __PROTO__((int, const char*));
-extern __MANGLE__ char* strerror __PROTO__((int));
-
-#define AST_MESSAGE_SET 3 /* see <mc.h> mcindex() */
-
-/*
- * maintain this order when adding categories
- */
-
-#define AST_LC_ALL 0
-#define AST_LC_COLLATE 1
-#define AST_LC_CTYPE 2
-#define AST_LC_MESSAGES 3
-#define AST_LC_MONETARY 4
-#define AST_LC_NUMERIC 5
-#define AST_LC_TIME 6
-#define AST_LC_IDENTIFICATION 7
-#define AST_LC_ADDRESS 8
-#define AST_LC_NAME 9
-#define AST_LC_TELEPHONE 10
-#define AST_LC_XLITERATE 11
-#define AST_LC_MEASUREMENT 12
-#define AST_LC_PAPER 13
-#define AST_LC_COUNT 14
-#define AST_LC_LANG 255
-
-#define AST_LC_internal 1
-#define AST_LC_setenv (1L<<27)
-#define AST_LC_find (1L<<28)
-#define AST_LC_debug (1L<<29)
-#define AST_LC_setlocale (1L<<30)
-#define AST_LC_translate (1L<<31)
-
-#ifndef LC_ALL
-#define LC_ALL (-AST_LC_ALL)
-#endif
-#ifndef LC_COLLATE
-#define LC_COLLATE (-AST_LC_COLLATE)
-#endif
-#ifndef LC_CTYPE
-#define LC_CTYPE (-AST_LC_CTYPE)
-#endif
-#ifndef LC_MESSAGES
-#define LC_MESSAGES (-AST_LC_MESSAGES)
-#endif
-#ifndef LC_MONETARY
-#define LC_MONETARY (-AST_LC_MONETARY)
-#endif
-#ifndef LC_NUMERIC
-#define LC_NUMERIC (-AST_LC_NUMERIC)
-#endif
-#ifndef LC_TIME
-#define LC_TIME (-AST_LC_TIME)
-#endif
-#ifndef LC_ADDRESS
-#define LC_ADDRESS (-AST_LC_ADDRESS)
-#endif
-#ifndef LC_IDENTIFICATION
-#define LC_IDENTIFICATION (-AST_LC_IDENTIFICATION)
-#endif
-#ifndef LC_NAME
-#define LC_NAME (-AST_LC_NAME)
-#endif
-#ifndef LC_TELEPHONE
-#define LC_TELEPHONE (-AST_LC_TELEPHONE)
-#endif
-#ifndef LC_XLITERATE
-#define LC_XLITERATE (-AST_LC_XLITERATE)
-#endif
-#ifndef LC_MEASUREMENT
-#define LC_MEASUREMENT (-AST_LC_MEASUREMENT)
-#endif
-#ifndef LC_PAPER
-#define LC_PAPER (-AST_LC_PAPER)
-#endif
-#ifndef LC_LANG
-#define LC_LANG (-AST_LC_LANG)
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#undef strcoll
-#if _std_strcoll
-#define strcoll _ast_info.collate
-#else
-#define strcoll strcmp
-#endif
-
-typedef struct
-{
-
- char* id;
-
- struct
- {
- uint32_t serial;
- uint32_t set;
- } locale;
-
- long tmp_long;
- size_t tmp_size;
- short tmp_short;
- char tmp_char;
- wchar_t tmp_wchar;
-
- int (*collate) __PROTO__((const char*, const char*));
-
- int tmp_int;
- __V_* tmp_pointer;
-
- int mb_cur_max;
- int (*mb_len) __PROTO__((const char*, size_t));
- int (*mb_towc) __PROTO__((wchar_t*, const char*, size_t));
- size_t (*mb_xfrm) __PROTO__((char*, const char*, size_t));
- int (*mb_width) __PROTO__((wchar_t));
- int (*mb_conv) __PROTO__((char*, wchar_t));
-
- uint32_t env_serial;
- uint32_t mb_sync;
- uint32_t version;
-
- char pad[936];
-
-} _Ast_info_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ _Ast_info_t _ast_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/* largefile hackery -- ast uses the large versions by default */
-
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if !defined(ftruncate) && _lib_ftruncate64
-#define ftruncate ftruncate64
-extern __MANGLE__ int ftruncate64 __PROTO__((int, off64_t));
-#endif
-#if !defined(lseek) && _lib_lseek64
-#define lseek lseek64
-extern __MANGLE__ off64_t lseek64 __PROTO__((int, off64_t, int));
-#endif
-#if !defined(truncate) && _lib_truncate64
-#define truncate truncate64
-extern __MANGLE__ int truncate64 __PROTO__((const char*, off64_t));
-#endif
-
-/* direct macro access for bsd crossover */
-
-#if !defined(__cplusplus)
-
-#if !defined(memcpy) && !defined(_lib_memcpy) && defined(_lib_bcopy)
-#define memcpy(t,f,n) (bcopy(f,t,n),(t))
-#endif
-
-#if !defined(memzero) && !defined(_lib_memzero)
-#if defined(_lib_memset) || !defined(_lib_bzero)
-#define memzero(b,n) memset(b,0,n)
-#else
-#define memzero(b,n) (bzero(b,n),(b))
-#endif
-#endif
-
-#endif
-
-#if !defined(remove)
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-
-#if !defined(rename)
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-
-#if !defined(strchr) && !defined(_lib_strchr) && defined(_lib_index)
-#define strchr(s,c) index(s,c)
-#endif
-
-#if !defined(strrchr) && !defined(_lib_strrchr) && defined(_lib_rindex)
-#define strrchr(s,c) rindex(s,c)
-#endif
-
-/* and now introducing prototypes botched by the standard(s) */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#undef getpgrp
-#define getpgrp() _ast_getpgrp()
-extern __MANGLE__ int _ast_getpgrp __PROTO__((void));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/*
- * and finally, standard interfaces hijacked by ast
- * _AST_STD_I delays headers that require <ast_map.h>
- */
-
-#include <ast_map.h>
-
-#undef _AST_STD_I
-
-#if _AST_GETOPT_H < 0
-#undef _AST_GETOPT_H
-#include <ast_getopt.h>
-#endif
-
-#if _GETOPT_H < 0
-#undef _GETOPT_H
-#include <getopt.h>
-#endif
-
-#if _REGEX_H < 0
-#undef _REGEX_H
-#include <regex.h>
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_stdio.h b/usr/src/lib/libast/amd64/include/ast/ast_stdio.h
deleted file mode 100644
index f437852a77..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_stdio.h
+++ /dev/null
@@ -1,608 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
-#ifndef _SFSTDIO_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFSTDIO_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define __FILE_typedef 1
-#define _FILE_DEFINED 1
-#define _FILE_defined 1
-#define _FILEDEFED 1
-
-#ifndef __FILE_TAG
-#define __FILE_TAG _sfio_s
-#endif
-
-#undef FILE
-#undef _FILE
-#undef fpos_t
-#undef fpos64_t
-
-typedef struct _sfio_s _sfio_FILE;
-
-#define FILE _sfio_FILE
-#define _FILE FILE
-
-#if !defined(__FILE) && !__CYGWIN__
-#undef __FILE
-#define __FILE FILE
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define BUFSIZ SF_BUFSIZE
-
-#else
-
-#ifndef BUFSIZ
-#define BUFSIZ 8192
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#include <ast_std.h>
-
-#include <sfio_s.h>
-
-#if __cplusplus
-#define _sf_(f) (f)
-#else
-#define _sf_(f) ((struct _sfio_s*)(f))
-#endif
-
-#define _SF_EOF 0000200
-#define _SF_ERROR 0000400
-
-#endif
-
-#ifdef _NO_LARGEFILE64_SOURCE
-#undef _LARGEFILE64_SOURCE
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#undef off_t
-#endif
-
-#define fpos_t _ast_fpos_t
-#if _typ_int64_t
-#define fpos64_t _ast_fpos_t
-#endif
-
-typedef struct _ast_fpos_s
-{
- intmax_t _sf_offset;
- unsigned char _sf_state[64 - sizeof(intmax_t)];
-} _ast_fpos_t;
-
-#define _base _data
-#define _ptr _next
-#define _IOFBF 0
-#define _IONBF 1
-#define _IOLBF 2
-
-#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
-
-#undef FILE
-#define FILE FILE
-typedef struct _sfio_s FILE;
-
-#undef strerror
-extern __MANGLE__ char* strerror(int) __THROW;
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-extern __MANGLE__ void flockfile __PROTO__((FILE*));
-extern __MANGLE__ int ftrylockfile __PROTO__((FILE*));
-extern __MANGLE__ void funlockfile __PROTO__((FILE*));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 1024
-#endif
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 20
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-
-#define _doprnt _ast_doprnt
-#define _doscan _ast_doscan
-#define asprintf _ast_asprintf
-#define clearerr _ast_clearerr
-#define fclose _ast_fclose
-#define fdopen _ast_fdopen
-#define fflush _ast_fflush
-#define fgetc _ast_fgetc
-#define fgetpos _ast_fgetpos
-#define fgetpos64 _ast_fgetpos64
-#define fgets _ast_fgets
-#define fopen _ast_fopen
-#define fprintf _ast_fprintf
-#define fpurge _ast_fpurge
-#define fputs _ast_fputs
-#define fread _ast_fread
-#define freopen _ast_freopen
-#define fscanf _ast_fscanf
-#define fseek _ast_fseek
-#define fseek64 _ast_fseek64
-#define fseeko _ast_fseeko
-#define fseeko64 _ast_fseeko64
-#define fsetpos _ast_fsetpos
-#define fsetpos64 _ast_fsetpos64
-#define ftell _ast_ftell
-#define ftell64 _ast_ftell64
-#define ftello _ast_ftello
-#define ftello64 _ast_ftello64
-#define fwrite _ast_fwrite
-#define gets _ast_gets
-#define getw _ast_getw
-#define pclose _ast_pclose
-#define popen _ast_popen
-#define printf _ast_printf
-#define puts _ast_puts
-#define putw _ast_putw
-#define rewind _ast_rewind
-#define scanf _ast_scanf
-#define setbuf _ast_setbuf
-#undef setbuffer
-#define setbuffer _ast_setbuffer
-#define setlinebuf _ast_setlinebuf
-#define setvbuf _ast_setvbuf
-#define snprintf _ast_snprintf
-#define sprintf _ast_sprintf
-#define sscanf _ast_sscanf
-#define tmpfile _ast_tmpfile
-#define ungetc _ast_ungetc
-#define vasprintf _ast_vasprintf
-#define vfprintf _ast_vfprintf
-#define vfscanf _ast_vfscanf
-#define vprintf _ast_vprintf
-#define vscanf _ast_vscanf
-#define vsnprintf _ast_vsnprintf
-#define vsprintf _ast_vsprintf
-#define vsscanf _ast_vsscanf
-#define fcloseall _ast_fcloseall
-#define _filbuf _ast__filbuf
-#define fmemopen _ast_fmemopen
-#define __getdelim _ast___getdelim
-#define getdelim _ast_getdelim
-#define getline _ast_getline
-#define clearerr_unlocked _ast_clearerr_unlocked
-#define feof_unlocked _ast_feof_unlocked
-#define ferror_unlocked _ast_ferror_unlocked
-#define fflush_unlocked _ast_fflush_unlocked
-#define fgetc_unlocked _ast_fgetc_unlocked
-#define fgets_unlocked _ast_fgets_unlocked
-#define fileno_unlocked _ast_fileno_unlocked
-#define fputc_unlocked _ast_fputc_unlocked
-#define fputs_unlocked _ast_fputs_unlocked
-#define fread_unlocked _ast_fread_unlocked
-#define fwrite_unlocked _ast_fwrite_unlocked
-#define getc_unlocked _ast_getc_unlocked
-#define getchar_unlocked _ast_getchar_unlocked
-#define putc_unlocked _ast_putc_unlocked
-#define putchar_unlocked _ast_putchar_unlocked
-#define flockfile _ast_flockfile
-#define ftrylockfile _ast_ftrylockfile
-#define funlockfile _ast_funlockfile
-
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:initial
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
-#endif
-#ifndef L_ctermid
-#define L_ctermid 9
-#endif
-#ifndef L_tmpnam
-#define L_tmpnam 25
-#endif
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#if defined(__cplusplus) && defined(__THROW)
-extern __MANGLE__ char* ctermid(char*) __THROW;
-#else
-extern __MANGLE__ char* ctermid __PROTO__((char*));
-#endif
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-extern __MANGLE__ void perror __PROTO__((const char*));
-#ifndef _AST_STD_H
-#ifndef remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-#ifndef rename
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#ifdef _LARGEFILE64_SOURCE
-
-#undef fpos_t
-#undef off_t
-#undef fgetpos
-#undef fsetpos
-#undef fseek
-#undef fseeko
-#undef ftell
-#undef ftello
-
-#define fpos_t fpos64_t
-#if _typ_off64_t
-#define off_t off64_t
-#else
-#define off_t int64_t
-#endif
-
-#define fgetpos fgetpos64
-#define fsetpos fsetpos64
-#define fseek fseek64
-#define fseeko fseeko64
-#define ftell ftell64
-#define ftello ftello64
-
-#endif
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_DLL && _DLL_INDIRECT_DATA
-
-#define stdin ((FILE*)_ast_dll->_ast_stdin)
-#define stdout ((FILE*)_ast_dll->_ast_stdout)
-#define stderr ((FILE*)_ast_dll->_ast_stderr)
-
-#else
-
-#define stdin (&_Sfstdin)
-#define stdout (&_Sfstdout)
-#define stderr (&_Sfstderr)
-
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define feof(f) sfeof(f)
-#define ferror(f) sferror(f)
-#define fileno(f) sffileno(f)
-#define fputc(c,f) sfputc(f,c)
-#define getc(f) sfgetc(f)
-#define getchar() sfgetc(sfstdin)
-#define putc(c,f) sfputc(f,c)
-#define putchar(c) sfputc(sfstdout,c)
-
-#else
-
-#if !_UWIN
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-#endif
-
-extern __MANGLE__ FILE _Sfstdin;
-extern __MANGLE__ FILE _Sfstdout;
-extern __MANGLE__ FILE _Sfstderr;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define feof(f) (_sf_(f)->_flags&_SF_EOF)
-#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
-#define fileno(f) (_sf_(f)->_file)
-#define fputc(c,f) (_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
-#define getc(f) (_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
-#define getchar() getc(stdin)
-#define putc(c,f) fputc(c,f)
-#define putchar(c) fputc(c,stdout)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _sffilbuf __PROTO__((FILE*, int));
-extern __MANGLE__ int _sfflsbuf __PROTO__((FILE*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_sys.h b/usr/src/lib/libast/amd64/include/ast/ast_sys.h
deleted file mode 100644
index 07bdf9e214..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_sys.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
-#ifndef _AST_SYS_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_SYS_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#if __mips == 2 && !defined(_NO_LARGEFILE64_SOURCE)
-#define _NO_LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_NO_LARGEFILE64_SOURCE) && _typ_off64_t && _lib_lseek64 && _lib_stat64
-#if !defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#else
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#undef _typ_off64_t
-#undef _typ_struct_dirent64
-#undef _lib_creat64
-#undef _lib_fstat64
-#undef _lib_fstatvfs64
-#undef _lib_ftruncate64
-#undef _lib_lseek64
-#undef _lib_lstat64
-#undef _lib_mmap64
-#undef _lib_open64
-#undef _lib_readdir64
-#undef _lib_stat64
-#undef _lib_statvfs64
-#undef _lib_truncate64
-#endif
-#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
-#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
-#endif
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <locale.h>
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _typ_dev_t 1 /* dev_t is a type */
-#define _typ_nlink_t 1 /* nlink_t is a type */
-#define _typ_gid_t 1 /* gid_t is a type */
-#define _typ_mode_t 1 /* mode_t is a type */
-#define _typ_uid_t 1 /* uid_t is a type */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _typ_wchar_t 1 /* wchar_t is a type */
-#define _typ_pid_t 1 /* pid_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _typ_wint_t 1 /* wint_t is a type */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _typ_socklen_t 1 /* socklen_t is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_ino_t 1 /* ino_t is a type */
-#define _typ_off_t 1 /* off_t is a type */
-#define _typ_ptrdiff_t 1 /* ptrdiff_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#define _typ_div_t 1 /* div_t is a type */
-#define _typ_ldiv_t 1 /* ldiv_t is a type */
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
-extern __MANGLE__ pid_t spawnveg __PROTO__((const char*, char* const[], char* const[], pid_t));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#if !defined(va_start)
-#if defined(__STDARG__)
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_time.h b/usr/src/lib/libast/amd64/include/ast/ast_time.h
deleted file mode 100644
index 57162a8148..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_time.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
-#ifndef _def_time_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_time_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */
-#define _lib_usleep 1 /* usleep() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#include <sys/time.h>
-
-#include <sys/times.h>
-
-#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
-#define CLOCKS_PER_SEC CLK_TCK
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_tty.h b/usr/src/lib/libast/amd64/include/ast/ast_tty.h
deleted file mode 100644
index 87b4daafa2..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_tty.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
-#ifndef _def_tty_ast
-#define _def_tty_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_termios 1 /* #include <termios.h> ok */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
-
-#ifdef _hdr_termios
-# if _mac__POSIX_VDISABLE
-# undef _POSIX_VDISABLE
-# endif
-# include <termios.h>
-#else
-# if defined(_sys_termios) && defined(_lib_tcgetattr)
-# include <sys/termios.h>
-# define _hdr_termios 1
-# else
-# undef _sys_termios
-# endif /* _sys_termios */
-#endif /* _hdr_termios */
-
-#ifdef _hdr_termios
-# undef _hdr_sgtty
-# undef tcgetattr
-# undef tcsetattr
-# undef tcgetpgrp
-# undef tcsetpgrp
-# undef cfgetospeed
-# ifndef TCSANOW
-# define TCSANOW TCSETS
-# define TCSADRAIN TCSETSW
-# define TCSAFLUSH TCSETSF
-# endif /* TCSANOW */
- /* The following corrects bugs in some implementations */
-# if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
-# define TCSAFLUSH TCSADFLUSH
-# endif /* TCSADFLUSH */
-# ifndef _lib_tcgetattr
-# undef tcgetattr
-# define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
-# undef tcsetattr
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# undef cfgetospeed
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# endif /* _lib_tcgetattr */
-# undef TIOCGETC
-#else
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# ifdef _hdr_termio
-# include <termio.h>
-# else
-# ifdef _sys_termio
-# include <sys/termio.h>
-# define _hdr_termio 1
-# endif /* _sys_termio */
-# endif /* _hdr_termio */
-# ifdef _hdr_termio
-# define termios termio
-# undef TIOCGETC
-# define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-
-# ifdef _sys_bsdtty
-# include <sys/bsdtty.h>
-# endif /* _sys_bsdtty */
-# else
-# ifdef _hdr_sgtty
-# include <sgtty.h>
-# ifndef LPENDIN
-# ifdef _sys_nttyio
-# include <sys/nttyio.h>
-# endif /* _sys_nttyio */
-# endif /* LPENDIN */
-# define termios sgttyb
-# ifdef TIOCSETN
-# undef TCSETAW
-# endif /* TIOCSETN */
-# ifdef TIOCGETP
-# define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# else
-# define tcgetattr(fd,tty) gtty(fd, tty)
-# define tcsetattr(fd,action,tty) stty(fd, tty)
-# endif /* TIOCGETP */
-# else
-# ifdef _sys_ttyio
-# include <sys/ttyio.h>
-# endif
-# endif /* _hdr_sgtty */
-# endif /* hdr_termio */
-
-# ifndef TCSANOW
-# ifdef TCSETAW
-# define TCSANOW TCSETA
-# define TCSAFLUSH TCSETAF
-# else
-# ifdef TIOCSETN
-# define TCSANOW TIOCSETN
-# define TCSADRAIN TIOCSETN
-# define TCSAFLUSH TIOCSETP
-# endif /* TIOCSETN */
-# endif /* TCSETAW */
-# endif /* TCSANOW */
-#endif /* _hdr_termios */
-
-/* set ECHOCTL if driver can echo control charaters as ^c */
-#ifdef LCTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LCTLECH
-# endif /* !ECHOCTL */
-#endif /* LCTLECH */
-#ifdef LNEW_CTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LNEW_CTLECH
-# endif /* !ECHOCTL */
-#endif /* LNEW_CTLECH */
-#ifdef LNEW_PENDIN
-# ifndef PENDIN
-# define PENDIN LNEW_PENDIN
-# endif /* !PENDIN */
-#endif /* LNEW_PENDIN */
-
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_version.h b/usr/src/lib/libast/amd64/include/ast/ast_version.h
deleted file mode 100644
index b3ba546e3a..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_version.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#define _AST_VERSION 20100102L
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_vfork.h b/usr/src/lib/libast/amd64/include/ast/ast_vfork.h
deleted file mode 100644
index 4a00223b7c..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_vfork.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
-#ifndef _def_vfork_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_vfork_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_wait.h b/usr/src/lib/libast/amd64/include/ast/ast_wait.h
deleted file mode 100644
index 2b5130388e..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_wait.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
-#ifndef _def_wait_ast
-#define _def_wait_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_wait 1 /* wait() in default lib(s) */
-#define _lib_wait3 1 /* wait3() in default lib(s) */
-#define _lib_wait4 1 /* wait4() in default lib(s) */
-#define _lib_waitpid 1 /* waitpid() in default lib(s) */
-#define _sys_wait 1 /* #include <sys/wait.h> ok */
-#define _ok_wif 1 /* posix wait macros ok */
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_wchar.h b/usr/src/lib/libast/amd64/include/ast/ast_wchar.h
deleted file mode 100644
index c51ac5461f..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_wchar.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_wchar_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */
-#define _lib_wctomb 1 /* wctomb() in default lib(s) */
-#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */
-#define _lib_wcslen 1 /* wcslen() in default lib(s) */
-#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */
-#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */
-#define _lib_towlower 1 /* towlower() in default lib(s) */
-#define _lib_towupper 1 /* towupper() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_mbstate_t 1 /* mbstate_t is a type */
-#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */
-#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */
-#ifndef _SFSTDIO_H
-#include <ast_common.h>
-#include <stdio.h>
-#endif
-#if _hdr_wchar && defined(_nxt_wchar)
-#include <../include/wchar.h> /* the native wchar.h */
-#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
-
-#ifndef WEOF
-#define WEOF (-1)
-#endif
-
-#undef fgetwc
-#undef fgetws
-#undef fputwc
-#undef fputws
-#undef getwc
-#undef getwchar
-#undef getws
-#undef putwc
-#undef putwchar
-#undef ungetwc
-
-#define fgetwc _ast_fgetwc
-#define fgetws _ast_fgetws
-#define fputwc _ast_fputwc
-#define fputws _ast_fputws
-#define fwide _ast_fwide
-#define fwprintf _ast_fwprintf
-#define fwscanf _ast_fwscanf
-#define getwc _ast_getwc
-#define getwchar _ast_getwchar
-#define getws _ast_getws
-#define putwc _ast_putwc
-#define putwchar _ast_putwchar
-#define swprintf _ast_swprintf
-#define swscanf _ast_swscanf
-#define ungetwc _ast_ungetwc
-#define vfwprintf _ast_vfwprintf
-#define vfwscanf _ast_vfwscanf
-#define vswprintf _ast_vswprintf
-#define vswscanf _ast_vswscanf
-#define vwprintf _ast_vwprintf
-#define vwscanf _ast_vwscanf
-#define wprintf _ast_wprintf
-#define wscanf _ast_wscanf
-
-#if !_typ_mbstate_t
-#undef _typ_mbstate_t
-#define _typ_mbstate_t 1
-typedef char mbstate_t;
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_mbstowcs
-extern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t));
-#endif
-#if !_lib_wctomb
-extern __MANGLE__ int wctomb __PROTO__((char*, wchar_t));
-#endif
-#if !_lib_wcrtomb
-extern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
-#endif
-#if !_lib_wcslen
-extern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*));
-#endif
-#if !_lib_wcstombs
-extern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t));
-#endif
-
-extern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ wint_t fgetwc __PROTO__((FILE*));
-extern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*));
-extern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*));
-extern __MANGLE__ int fwide __PROTO__((FILE*, int));
-extern __MANGLE__ wint_t getwc __PROTO__((FILE*));
-extern __MANGLE__ wint_t getwchar __PROTO__((void));
-extern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*));
-extern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ wint_t putwchar __PROTO__((wchar_t));
-extern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
-extern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
-extern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*));
-extern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
-extern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
-extern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...));
-extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ast_windows.h b/usr/src/lib/libast/amd64/include/ast/ast_windows.h
deleted file mode 100644
index 65590c17b4..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ast_windows.h
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * AT&T Research
- *
- * ast <windows.h> wrapper
- * for libast only
- * include after ast headers
- */
-
-#ifndef _AST_WINDOWS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_WINDOWS_H 1
-
-#undef SF_ERROR /* clash in <oaidl.h> */
-
-#include <windows.h>
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ccode.h b/usr/src/lib/libast/amd64/include/ast/ccode.h
deleted file mode 100644
index ae50c63b16..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ccode.h
+++ /dev/null
@@ -1,101 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * character code map interface
- *
- * NOTE: used for mapping between 8-bit character encodings
- * ISO character sets are handled by sfio
- */
-
-#ifndef _CHARCODE_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _CHARCODE_H 1
-
-#include <ast_common.h>
-#include <ast_ccode.h>
-
-typedef struct Ccmap_s
-{
- const char* name; /* code set name */
- const char* match; /* strmatch() pattern */
- const char* desc; /* code set description */
- const char* canon; /* canonical name format */
- const char* index; /* default index */
- int ccode; /* <ccode.h> code index */
- __V_* data; /* map specific data */
-} Ccmap_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ unsigned char* _ccmap __PROTO__((int, int));
-extern __MANGLE__ __V_* _ccmapcpy __PROTO__((unsigned char*, __V_*, const __V_*, size_t));
-extern __MANGLE__ __V_* _ccmapstr __PROTO__((unsigned char*, __V_*, size_t));
-
-extern __MANGLE__ int ccmapid __PROTO__((const char*));
-extern __MANGLE__ char* ccmapname __PROTO__((int));
-extern __MANGLE__ __V_* ccnative __PROTO__((__V_*, const __V_*, size_t));
-extern __MANGLE__ Ccmap_t* ccmaplist __PROTO__((Ccmap_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define CCOP(i,o) ((i)==(o)?0:(((o)<<8)|(i)))
-#define CCIN(x) ((x)&0xFF)
-#define CCOUT(x) (((x)>>8)&0xFF)
-#define CCCONVERT(x) ((x)&0xFF00)
-
-#define CCCVT(x) CCMAP(x,0)
-#define CCMAP(i,o) ((i)==(o)?(unsigned char*)0:_ccmap(i,o))
-#define CCMAPCHR(m,c) ((m)?(m)[c]:(c))
-#define CCMAPCPY(m,t,f,n) ((m)?_ccmapcpy(m,t,f,n):memcpy(t,f,n))
-#define CCMAPSTR(m,s,n) ((m)?_ccmapstr(m,s,n):(__V_*)(s))
-
-#define ccmap(i,o) CCMAP(i,o)
-#define ccmapchr(m,c) CCMAPCHR(m,c)
-#define ccmapcpy(m,t,f,n) CCMAPCPY(m,t,f,n)
-#define ccmapstr(m,s,n) CCMAPSTR(m,s,n)
-
-#define CCMAPC(c,i,o) ((i)==(o)?(c):CCMAP(i,o)[c])
-#define CCMAPM(t,f,n,i,o) ((i)==(o)?memcpy(t,f,n):_ccmapcpy(CCMAP(i,o),t,f,n))
-#define CCMAPS(s,n,i,o) ((i)==(o)?(__V_*)(s):_ccmapstr(CCMAP(i,o),s,n))
-
-#define ccmapc(c,i,o) CCMAPC(c,i,o)
-#define ccmapm(t,f,n,i,o) CCMAPM(t,f,n,i,o)
-#define ccmaps(s,n,i,o) CCMAPS(s,n,i,o)
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/cdt.h b/usr/src/lib/libast/amd64/include/ast/cdt.h
deleted file mode 100644
index 1044207b76..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/cdt.h
+++ /dev/null
@@ -1,311 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _CDT_H
-#define _CDT_H 1
-
-/* Public interface for the dictionary library
-**
-** Written by Kiem-Phong Vo
-*/
-
-#define CDT_VERSION 20050420L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _dtlink_s Dtlink_t;
-typedef struct _dthold_s Dthold_t;
-typedef struct _dtdisc_s Dtdisc_t;
-typedef struct _dtmethod_s Dtmethod_t;
-typedef struct _dtdata_s Dtdata_t;
-typedef struct _dt_s Dt_t;
-typedef struct _dt_s Dict_t; /* for libdict compatibility */
-typedef struct _dtstat_s Dtstat_t;
-typedef Void_t* (*Dtsearch_f)_ARG_((Dt_t*,Void_t*,int));
-typedef Void_t* (*Dtmake_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef void (*Dtfree_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef int (*Dtcompar_f)_ARG_((Dt_t*,Void_t*,Void_t*,Dtdisc_t*));
-typedef unsigned int (*Dthash_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef Void_t* (*Dtmemory_f)_ARG_((Dt_t*,Void_t*,size_t,Dtdisc_t*));
-typedef int (*Dtevent_f)_ARG_((Dt_t*,int,Void_t*,Dtdisc_t*));
-
-struct _dtlink_s
-{ Dtlink_t* right; /* right child */
- union
- { unsigned int _hash; /* hash value */
- Dtlink_t* _left; /* left child */
- } hl;
-};
-
-/* private structure to hold an object */
-struct _dthold_s
-{ Dtlink_t hdr; /* header */
- Void_t* obj; /* user object */
-};
-
-/* method to manipulate dictionary structure */
-struct _dtmethod_s
-{ Dtsearch_f searchf; /* search function */
- int type; /* type of operation */
-};
-
-/* stuff that may be in shared memory */
-struct _dtdata_s
-{ int type; /* type of dictionary */
- Dtlink_t* here; /* finger to last search element */
- union
- { Dtlink_t** _htab; /* hash table */
- Dtlink_t* _head; /* linked list */
- } hh;
- int ntab; /* number of hash slots */
- int size; /* number of objects */
- int loop; /* number of nested loops */
- int minp; /* min path before splay, always even */
- /* for hash dt, > 0: fixed table size */
-};
-
-/* structure to hold methods that manipulate an object */
-struct _dtdisc_s
-{ int key; /* where the key begins in an object */
- int size; /* key size and type */
- int link; /* offset to Dtlink_t field */
- Dtmake_f makef; /* object constructor */
- Dtfree_f freef; /* object destructor */
- Dtcompar_f comparf;/* to compare two objects */
- Dthash_f hashf; /* to compute hash value of an object */
- Dtmemory_f memoryf;/* to allocate/free memory */
- Dtevent_f eventf; /* to process events */
-};
-
-#define DTDISC(dc,ky,sz,lk,mkf,frf,cmpf,hshf,memf,evf) \
- ( (dc)->key = (ky), (dc)->size = (sz), (dc)->link = (lk), \
- (dc)->makef = (mkf), (dc)->freef = (frf), \
- (dc)->comparf = (cmpf), (dc)->hashf = (hshf), \
- (dc)->memoryf = (memf), (dc)->eventf = (evf) )
-
-#ifdef offsetof
-#define DTOFFSET(struct_s, member) offsetof(struct_s, member)
-#else
-#define DTOFFSET(struct_s, member) ((int)(&((struct_s*)0)->member))
-#endif
-
-/* the dictionary structure itself */
-struct _dt_s
-{ Dtsearch_f searchf;/* search function */
- Dtdisc_t* disc; /* method to manipulate objs */
- Dtdata_t* data; /* sharable data */
- Dtmemory_f memoryf;/* function to alloc/free memory */
- Dtmethod_t* meth; /* dictionary method */
- int type; /* type information */
- int nview; /* number of parent view dictionaries */
- Dt_t* view; /* next on viewpath */
- Dt_t* walk; /* dictionary being walked */
- Void_t* user; /* for user's usage */
-};
-
-/* structure to get status of a dictionary */
-struct _dtstat_s
-{ int dt_meth; /* method type */
- int dt_size; /* number of elements */
- int dt_n; /* number of chains or levels */
- int dt_max; /* max size of a chain or a level */
- int* dt_count; /* counts of chains or levels by size */
-};
-
-/* flag set if the last search operation actually found the object */
-#define DT_FOUND 0100000
-
-/* supported storage methods */
-#define DT_SET 0000001 /* set with unique elements */
-#define DT_BAG 0000002 /* multiset */
-#define DT_OSET 0000004 /* ordered set (self-adjusting tree) */
-#define DT_OBAG 0000010 /* ordered multiset */
-#define DT_LIST 0000020 /* linked list */
-#define DT_STACK 0000040 /* stack */
-#define DT_QUEUE 0000100 /* queue */
-#define DT_METHODS 0000177 /* all currently supported methods */
-
-/* asserts to dtdisc() */
-#define DT_SAMECMP 0000001 /* compare methods equivalent */
-#define DT_SAMEHASH 0000002 /* hash methods equivalent */
-
-/* types of search */
-#define DT_INSERT 0000001 /* insert object if not found */
-#define DT_DELETE 0000002 /* delete object if found */
-#define DT_SEARCH 0000004 /* look for an object */
-#define DT_NEXT 0000010 /* look for next element */
-#define DT_PREV 0000020 /* find previous element */
-#define DT_RENEW 0000040 /* renewing an object */
-#define DT_CLEAR 0000100 /* clearing all objects */
-#define DT_FIRST 0000200 /* get first object */
-#define DT_LAST 0000400 /* get last object */
-#define DT_MATCH 0001000 /* find object matching key */
-#define DT_VSEARCH 0002000 /* search using internal representation */
-#define DT_ATTACH 0004000 /* attach an object to the dictionary */
-#define DT_DETACH 0010000 /* detach an object from the dictionary */
-
-/* events */
-#define DT_OPEN 1 /* a dictionary is being opened */
-#define DT_CLOSE 2 /* a dictionary is being closed */
-#define DT_DISC 3 /* discipline is about to be changed */
-#define DT_METH 4 /* method is about to be changed */
-#define DT_ENDOPEN 5 /* dtopen() is done */
-#define DT_ENDCLOSE 6 /* dtclose() is done */
-#define DT_HASHSIZE 7 /* setting hash table size */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-#if !_BLD_cdt && defined(__IMPORT__)
-#define extern __IMPORT__
-#endif
-
-extern Dtmethod_t* Dtset;
-extern Dtmethod_t* Dtbag;
-extern Dtmethod_t* Dtoset;
-extern Dtmethod_t* Dtobag;
-extern Dtmethod_t* Dtlist;
-extern Dtmethod_t* Dtstack;
-extern Dtmethod_t* Dtqueue;
-
-/* compatibility stuff; will go away */
-#ifndef KPVDEL
-extern Dtmethod_t* Dtorder;
-extern Dtmethod_t* Dttree;
-extern Dtmethod_t* Dthash;
-extern Dtmethod_t _Dttree;
-extern Dtmethod_t _Dthash;
-extern Dtmethod_t _Dtlist;
-extern Dtmethod_t _Dtqueue;
-extern Dtmethod_t _Dtstack;
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Dt_t* dtopen _ARG_((Dtdisc_t*, Dtmethod_t*));
-extern int dtclose _ARG_((Dt_t*));
-extern Dt_t* dtview _ARG_((Dt_t*, Dt_t*));
-extern Dtdisc_t* dtdisc _ARG_((Dt_t* dt, Dtdisc_t*, int));
-extern Dtmethod_t* dtmethod _ARG_((Dt_t*, Dtmethod_t*));
-
-extern Dtlink_t* dtflatten _ARG_((Dt_t*));
-extern Dtlink_t* dtextract _ARG_((Dt_t*));
-extern int dtrestore _ARG_((Dt_t*, Dtlink_t*));
-
-extern int dttreeset _ARG_((Dt_t*, int, int));
-
-extern int dtwalk _ARG_((Dt_t*, int(*)(Dt_t*,Void_t*,Void_t*), Void_t*));
-
-extern Void_t* dtrenew _ARG_((Dt_t*, Void_t*));
-
-extern int dtsize _ARG_((Dt_t*));
-extern int dtstat _ARG_((Dt_t*, Dtstat_t*, int));
-extern unsigned int dtstrhash _ARG_((unsigned int, Void_t*, int));
-
-#if !_PACKAGE_ast
-extern int memcmp _ARG_((const Void_t*, const Void_t*, size_t));
-extern int strcmp _ARG_((const char*, const char*));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* internal functions for translating among holder, object and key */
-#define _DT(dt) ((Dt_t*)(dt))
-#define _DTDSC(dc,ky,sz,lk,cmpf) \
- (ky = (dc)->key, sz = (dc)->size, lk = (dc)->link, cmpf = (dc)->comparf)
-#define _DTLNK(o,lk) ((Dtlink_t*)((char*)(o) + lk) )
-#define _DTOBJ(e,lk) ((lk) < 0 ? ((Dthold_t*)(e))->obj : (Void_t*)((char*)(e) - (lk)) )
-#define _DTKEY(o,ky,sz) (Void_t*)((sz) < 0 ? *((char**)((char*)(o)+(ky))) : ((char*)(o)+(ky)))
-
-#define _DTCMP(dt,k1,k2,dc,cmpf,sz) \
- ((cmpf) ? (*cmpf)(dt,k1,k2,dc) : \
- ((sz) <= 0 ? strcmp(k1,k2) : memcmp(k1,k2,sz)) )
-#define _DTHSH(dt,ky,dc,sz) ((dc)->hashf ? (*(dc)->hashf)(dt,ky,dc) : dtstrhash(0,ky,sz) )
-
-/* special search function for tree structure only */
-#define _DTMTCH(dt,key,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = (key); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define _DTSRCH(dt,obj,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = _DTKEY(obj, _ky, _sz); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define DTTREEMATCH(dt,key,action) _DTMTCH(_DT(dt),(Void_t*)(key),action)
-#define DTTREESEARCH(dt,obj,action) _DTSRCH(_DT(dt),(Void_t*)(obj),action)
-
-#define dtvnext(d) (_DT(d)->view)
-#define dtvcount(d) (_DT(d)->nview)
-#define dtvhere(d) (_DT(d)->walk)
-
-#define dtlink(d,e) (((Dtlink_t*)(e))->right)
-#define dtobj(d,e) _DTOBJ((e), _DT(d)->disc->link)
-#define dtfinger(d) (_DT(d)->data->here ? dtobj((d),_DT(d)->data->here):(Void_t*)(0))
-
-#define dtfirst(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_FIRST)
-#define dtnext(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_NEXT)
-#define dtleast(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_NEXT)
-#define dtlast(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_LAST)
-#define dtprev(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_PREV)
-#define dtmost(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_PREV)
-#define dtsearch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH)
-#define dtmatch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_MATCH)
-#define dtinsert(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_INSERT)
-#define dtdelete(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DELETE)
-#define dtattach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_ATTACH)
-#define dtdetach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DETACH)
-#define dtclear(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_CLEAR)
-#define dtfound(d) (_DT(d)->type & DT_FOUND)
-
-#define DT_PRIME 17109811 /* 2#00000001 00000101 00010011 00110011 */
-#define dtcharhash(h,c) (((unsigned int)(h) + (unsigned int)(c)) * DT_PRIME )
-
-#endif /* _CDT_H */
diff --git a/usr/src/lib/libast/amd64/include/ast/debug.h b/usr/src/lib/libast/amd64/include/ast/debug.h
deleted file mode 100644
index 6dfee2254a..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/debug.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * common ast debug definitions
- * include after the ast headers
- */
-
-#ifndef _DEBUG_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _DEBUG_H
-
-#include <ast.h>
-#include <error.h>
-
-#if !defined(DEBUG) && _BLD_DEBUG
-#define DEBUG _BLD_DEBUG
-#endif
-
-#if DEBUG || _BLD_DEBUG
-
-#define debug(x) x
-#define message(x) do if (error_info.trace < 0) { error x; } while (0)
-#define messagef(x) do if (error_info.trace < 0) { errorf x; } while (0)
-
-#define DEBUG_BEGTIME() debug_elapsed(1)
-#define DEBUG_GETTIME() debug_elapsed(0)
-#define DEBUG_ASSERT(p) ((p) ? 0 : (debug_fatal(__FILE__, __LINE__),0))
-#define DEBUG_COUNT(n) ((n) += 1)
-#define DEBUG_TALLY(c,n,v) ((c) ? ((n) += (v)) : (n))
-#define DEBUG_INCREASE(n) ((n) += 1)
-#define DEBUG_DECREASE(n) ((n) -= 1)
-#define DEBUG_DECLARE(t,v) t v
-#define DEBUG_SET(n,v) ((n) = (v))
-#define DEBUG_PRINT(fd,s,v) do {char _b[1024];write(fd,_b,sfsprintf(_b,sizeof(_b),s,v));} while(0)
-#define DEBUG_WRITE(fd,d,n) write((fd),(d),(n))
-#define DEBUG_TEMP(temp) (temp) /* debugging stuff that should be removed */
-#define DEBUG_BREAK break
-#define DEBUG_CONTINUE continue
-#define DEBUG_GOTO(label) do { debug_fatal(__FILE__, __LINE__); goto label; } while(0)
-#define DEBUG_RETURN(x) do { debug_fatal(__FILE__, __LINE__); return(x); } while(0)
-
-#else
-
-#define debug(x)
-#define message(x)
-#define messagef(x)
-
-#define DEBUG_BEGTIME()
-#define DEBUG_GETTIME()
-#define DEBUG_ASSERT(p)
-#define DEBUG_COUNT(n)
-#define DEBUG_TALLY(c,n,v)
-#define DEBUG_INCREASE(n)
-#define DEBUG_DECREASE(n)
-#define DEBUG_DECLARE(t,v)
-#define DEBUG_SET(n,v)
-#define DEBUG_PRINT(fd,s,v)
-#define DEBUG_WRITE(fd,d,n)
-#define DEBUG_TEMP(x)
-#define DEBUG_BREAK break
-#define DEBUG_CONTINUE continue
-#define DEBUG_GOTO(label) goto label
-#define DEBUG_RETURN(x) return(x)
-
-#endif
-
-#ifndef BREAK
-#define BREAK DEBUG_BREAK
-#endif
-#ifndef CONTINUE
-#define CONTINUE DEBUG_CONTINUE
-#endif
-#ifndef GOTO
-#define GOTO(label) DEBUG_GOTO(label)
-#endif
-#ifndef RETURN
-#define RETURN(x) DEBUG_RETURN(x)
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ double debug_elapsed __PROTO__((int));
-extern __MANGLE__ void debug_fatal __PROTO__((const char*, int));
-extern __MANGLE__ void systrace __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/dt.h b/usr/src/lib/libast/amd64/include/ast/dt.h
deleted file mode 100644
index b6b356aee7..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/dt.h
+++ /dev/null
@@ -1,49 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-#ifndef _DT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _DT_H 1
-
-#include <cdt.h>
-#include <vmalloc.h>
-
-#if _BLD_cdt && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Dt_t* dtnew __PROTO__((Vmalloc_t*, Dtdisc_t*, Dtmethod_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/error.h b/usr/src/lib/libast/amd64/include/ast/error.h
deleted file mode 100644
index c0e21dadd7..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/error.h
+++ /dev/null
@@ -1,196 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * option, error and message formatter external definitions
- */
-
-#ifndef _ERROR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _ERROR_H
-
-#include <ast.h>
-#include <option.h>
-#include <errno.h>
-
-#define ERROR_VERSION 20070319L
-
-#if !defined(errno) && defined(__DYNAMIC__)
-#define errno __DYNAMIC__(errno)
-#endif
-
-#define ERROR_debug(n) (-(n))
-#define ERROR_exit(n) ((n)+ERROR_ERROR)
-#define ERROR_system(n) (((n)+ERROR_ERROR)|ERROR_SYSTEM)
-#define ERROR_usage(n) ((((n)?2:0)+ERROR_ERROR)|ERROR_USAGE)
-#define ERROR_warn(n) (ERROR_WARNING)
-
-#ifndef ERROR_catalog
-#define ERROR_catalog(t) t
-#endif
-#ifndef ERROR_dictionary
-#define ERROR_dictionary(t) t
-#endif
-
-#ifndef ERROR_translate
-#define ERROR_translating() (error_info.translate&&(ast.locale.set&(1<<AST_LC_MESSAGES)))
-#define ERROR_translate(l,i,d,m) (ERROR_translating()?errorx((const char*)(l),(const char*)(i),(const char*)(d),(const char*)(m)):(char*)(m))
-#endif
-
-#define ERROR_INFO 0 /* info message -- no err_id */
-#define ERROR_WARNING 1 /* warning message */
-#define ERROR_ERROR 2 /* error message -- no err_exit */
-#define ERROR_FATAL 3 /* error message with err_exit */
-#define ERROR_NOEXEC EXIT_NOEXEC /* shell convention */
-#define ERROR_NOENT EXIT_NOTFOUND /* shell convention */
-#define ERROR_PANIC ERROR_LEVEL /* panic message with err_exit */
-
-#define ERROR_LEVEL 0x00ff /* level portion of status */
-#define ERROR_SYSTEM 0x0100 /* report system errno message */
-#define ERROR_OUTPUT 0x0200 /* next arg is error fd */
-#define ERROR_SOURCE 0x0400 /* next 2 args are FILE,LINE */
-#define ERROR_USAGE 0x0800 /* usage message */
-#define ERROR_PROMPT 0x1000 /* omit trailing newline */
-#define ERROR_NOID 0x2000 /* omit err_id */
-#define ERROR_LIBRARY 0x4000 /* library routine error */
-
-#define ERROR_INTERACTIVE 0x0001 /* context is interactive */
-#define ERROR_SILENT 0x0002 /* context is silent */
-#define ERROR_NOTIFY 0x0004 /* main(-sig,0,ctx) on signal */
-
-#define ERROR_FREE 0x0010 /* free context on pop */
-#define ERROR_POP 0x0020 /* pop context */
-#define ERROR_PUSH 0x0040 /* push context */
-#define ERROR_SET 0x0080 /* set context */
-
-/*
- * errorpush()/errorpop() are obsolete -- use errorctx() instead
- */
-
-#ifndef ERROR_CONTEXT_T
-#define ERROR_CONTEXT_T Error_info_t
-#endif
-
-#define ERROR_CONTEXT_BASE ((Error_context_t*)&error_info.context)
-
-#define errorpush(p,f) (*(p)= *ERROR_CONTEXT_BASE,*ERROR_CONTEXT_BASE=error_info.empty,error_info.context=(Error_context_t*)(p),error_info.flags=(f))
-#define errorpop(p) (*ERROR_CONTEXT_BASE= *(p))
-
-typedef struct Error_info_s Error_info_t;
-typedef struct Error_context_s Error_context_t;
-
-#define ERROR_CONTEXT \
- ERROR_CONTEXT_T* context; /* prev context stack element */ \
- int errors; /* >= ERROR_ERROR count */ \
- int flags; /* context flags */ \
- int line; /* input|output line number */ \
- int warnings; /* ERROR_WARNING count */ \
- char* file; /* input|output file name */ \
- char* id; /* command id */
-
-struct Error_context_s /* context stack element */
-{
- ERROR_CONTEXT
-};
-
-struct Error_info_s /* error state */
-{
- int fd; /* write(2) fd */
-
- void (*exit) __PROTO__((int)); /* error exit */
- ssize_t (*write) __PROTO__((int, const __V_*, size_t)); /* error output */
-
- /* the rest are implicitly initialized */
-
- int clear; /* default clear ERROR_* flags */
- int core; /* level>=core -> core dump */
- int indent; /* debug trace indent level */
- int init; /* initialized */
- int last_errno; /* last reported errno */
- int mask; /* multi level debug trace mask */
- int set; /* default set ERROR_* flags */
- int trace; /* debug trace level */
-
- char* version; /* ERROR_SOURCE command version */
-
- int (*auxilliary) __PROTO__((Sfio_t*, int, int)); /* aux info to append */
-
- ERROR_CONTEXT /* top of context stack */
-
- Error_context_t empty; /* empty context stack element */
-
- unsigned long time; /* debug time trace */
-
- char* (*translate) __PROTO__((const char*, const char*, const char*, const char*)); /* format translator */
-
- const char* catalog; /* message catalog */
-};
-
-#ifndef errno
-extern __MANGLE__ int errno; /* system call error status */
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Error_info_t* _error_infop_;
-
-#define error_info (*_error_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ void error __PROTO__((int, ...));
-extern __MANGLE__ int errormsg __PROTO__((const char*, int, ...));
-extern __MANGLE__ int errorf __PROTO__((__V_*, __V_*, int, ...));
-extern __MANGLE__ void errorv __PROTO__((const char*, int, va_list));
-#ifndef errorx
-extern __MANGLE__ char* errorx __PROTO__((const char*, const char*, const char*, const char*));
-#endif
-extern __MANGLE__ Error_info_t* errorctx __PROTO__((Error_info_t*, int, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/find.h b/usr/src/lib/libast/amd64/include/ast/find.h
deleted file mode 100644
index 374858aced..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/find.h
+++ /dev/null
@@ -1,97 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * fast find interface definitions
- */
-
-#ifndef _FIND_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FIND_H
-
-#define FIND_VERSION 19980301L
-
-#ifndef FIND_CODES
-#define FIND_CODES "lib/find/codes"
-#endif
-
-#define FIND_CODES_ENV "FINDCODES"
-
-#define FIND_GENERATE (1<<0) /* generate new codes */
-#define FIND_ICASE (1<<1) /* ignore case in match */
-#define FIND_GNU (1<<2) /* generate gnu format codes */
-#define FIND_OLD (1<<3) /* generate old format codes */
-#define FIND_TYPE (1<<4) /* generate type with codes */
-#define FIND_VERIFY (1<<5) /* verify the dir hierarchy */
-
-#define FIND_USER (1L<<16) /* first user flag bit */
-
-struct Find_s;
-struct Finddisc_s;
-
-typedef int (*Findverify_f) __PROTO__((struct Find_s*, const char*, size_t, struct Finddisc_s*));
-
-typedef struct Finddisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* FIND_* flags */
- Error_f errorf; /* error function */
- Findverify_f verifyf; /* dir verify function */
- char** dirs; /* dir prefixes to search */
-} Finddisc_t;
-
-typedef struct Find_s
-{
- const char* id; /* library id string */
- unsigned long stamp; /* codes time stamp */
-
-#ifdef _FIND_PRIVATE_
- _FIND_PRIVATE_
-#endif
-
-} Find_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Find_t* findopen __PROTO__((const char*, const char*, const char*, Finddisc_t*));
-extern __MANGLE__ char* findread __PROTO__((Find_t*));
-extern __MANGLE__ int findwrite __PROTO__((Find_t*, const char*, size_t, const char*));
-extern __MANGLE__ int findclose __PROTO__((Find_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/fnmatch.h b/usr/src/lib/libast/amd64/include/ast/fnmatch.h
deleted file mode 100644
index 764009c3b7..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/fnmatch.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix fnmatch interface definitions
- */
-
-#ifndef _FNMATCH_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FNMATCH_H
-
-#include <ast_common.h>
-
-/* fnmatch flags */
-
-#define FNM_NOESCAPE 0x0001 /* \ is literal */
-#define FNM_PATHNAME 0x0002 /* explicit match for / */
-#define FNM_PERIOD 0x0004 /* explicit match for leading . */
-#define FNM_NOSYS 0x0010 /* not implemented */
-
-/* nonstandard fnmatch() flags */
-
-#define FNM_AUGMENTED 0x0008 /* enable ! & ( | ) */
-#define FNM_ICASE 0x0020 /* ignore case in match */
-#define FNM_LEADING_DIR 0x0040 /* match up to implicit / */
-
-#define FNM_CASEFOLD FNM_ICASE /* gnu compatibility */
-#define FNM_FILE_NAME FNM_PATHNAME /* gnu compatibility */
-
-/* fnmatch error codes -- other non-zero values from <regex.h> */
-
-#define FNM_NOMATCH 1 /* == REG_NOMATCH */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int fnmatch __PROTO__((const char*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/fnv.h b/usr/src/lib/libast/amd64/include/ast/fnv.h
deleted file mode 100644
index 2312a20118..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/fnv.h
+++ /dev/null
@@ -1,81 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * Landon Kurt Knoll
- * Phong Vo
- *
- * FNV-1 linear congruent checksum/hash/PRNG
- * see http://www.isthe.com/chongo/tech/comp/fnv/
- */
-
-#ifndef _FNV_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FNV_H
-
-#include <ast_common.h>
-
-#define FNV_INIT 0x811c9dc5L
-#define FNV_MULT 0x01000193L
-
-#define FNVINIT(h) (h = FNV_INIT)
-#define FNVPART(h,c) (h = (h) * FNV_MULT ^ (c))
-#define FNVSUM(h,s,n) do { \
- register size_t _i_ = 0; \
- while (_i_ < n) \
- FNVPART(h, ((unsigned char*)s)[_i_++]); \
- } while (0)
-
-#if _typ_int64_t
-
-#ifdef _ast_LL
-
-#define FNV_INIT64 0xcbf29ce484222325LL
-#define FNV_MULT64 0x00000100000001b3LL
-
-#else
-
-#define FNV_INIT64 ((int64_t)0xcbf29ce484222325)
-#define FNV_MULT64 ((int64_t)0x00000100000001b3)
-
-#endif
-
-#define FNVINIT64(h) (h = FNV_INIT64)
-#define FNVPART64(h,c) (h = (h) * FNV_MULT64 ^ (c))
-#define FNVSUM64(h,s,n) do { \
- register int _i_ = 0; \
- while (_i_ < n) \
- FNVPART64(h, ((unsigned char*)s)[_i_++]); \
- } while (0)
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/fs3d.h b/usr/src/lib/libast/amd64/include/ast/fs3d.h
deleted file mode 100644
index bae8dde927..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/fs3d.h
+++ /dev/null
@@ -1,123 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * 3d fs interface definitions
- */
-
-#ifndef _FS3D_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FS3D_H
-
-#include <ast_fs.h>
-
-#if _int_st_spare1
-#define iview(p) ((p)->st_spare1)
-#define IVIEW(p,v) ((p)->st_spare1=(v))
-#else
-#if _ary_st_spare4
-#define iview(p) ((p)->st_spare4[0])
-#define IVIEW(p,v) ((p)->st_spare4[0]=(v))
-#else
-#if _ary_st_pad4
-#define iview(p) ((p)->st_pad4[0])
-#define IVIEW(p,v) ((p)->st_pad4[0]=(v))
-#else
-#if _mem_st_rdev_stat
-#define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev)
-#define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0)
-#else
-#define iview(p) 0
-#define IVIEW(p,v)
-#endif
-#endif
-#endif
-#endif
-
-/*
- * special options
- */
-
-#define FS3D_init "/#option/init"
-#define FS3D_on "/#option/3d"
-#define FS3D_off "/#option/2d"
-
-/*
- * fs3d(3) ops
- */
-
-#define FS3D_OP(o,a) (((a)<<3)|(o))
-
-#define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */
-#define FS3D_OFF FS3D_OP_OFF
-#define FS3D_ON FS3D_OP_ON
-#define FS3D_TEST FS3D_OP_TEST
-#define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n)
-
-#define FS3D_op(x) ((x)&07)
-#define FS3D_arg(x) (((x)>>3)&07777)
-
-#define FS3D_OP_OFF 0
-#define FS3D_OP_ON 1
-#define FS3D_OP_TEST 2
-#define FS3D_OP_LIMIT 3
-#define FS3D_OP_INIT 7
-
-/*
- * mount(2) ops
- */
-
-#define FS3D_ALL (FS3D_VIEW|FS3D_VERSION)
-#define FS3D_VIEW 002
-#define FS3D_VERSION 004
-#define FS3D_GET 010
-#define FS3D_SIZE(n) ((n)<<4)
-#define FS3D_SIZEOF(n) ((n)>>4)
-
-#if !_BLD_3d
-#define mount(s,t,f,d) fs3d_mount(s,t,f,d)
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int fs3d __PROTO__((int));
-extern __MANGLE__ int fs3d_mount __PROTO__((const char*, char*, int, __V_*));
-extern __MANGLE__ char* pathnext __PROTO__((char*, char*, long*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/fts.h b/usr/src/lib/libast/amd64/include/ast/fts.h
deleted file mode 100644
index 1bf72a114d..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/fts.h
+++ /dev/null
@@ -1,173 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * David Korn
- * Phong Vo
- * AT&T Research
- *
- * fts interface definitions
- */
-
-#ifndef _FTS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTS_H
-
-#include <ast_std.h>
-#include <ast_fs.h>
-#include <ast_mode.h>
-
-/*
- * fts_open flags
- */
-
-#define FTS_LOGICAL 0 /* logical traversal, follow symlinks */
-#define FTS_META (1<<0) /* follow top dir symlinks even if phys */
-#define FTS_NOCHDIR (1<<1) /* don't chdir */
-#define FTS_NOPOSTORDER (1<<2) /* no postorder visits */
-#define FTS_NOPREORDER (1<<3) /* no preorder visits */
-#define FTS_NOSEEDOTDIR (1<<11) /* never retain leading . dir */
-#define FTS_NOSTAT (1<<4) /* don't stat children */
-#define FTS_ONEPATH (1<<5) /* pathnames arg is one const char* */
-#define FTS_PHYSICAL (1<<6) /* physical traversal, don't follow */
-#define FTS_SEEDOT (1<<7) /* return . and .. */
-#define FTS_SEEDOTDIR (1<<10) /* always retain leading . dir */
-#define FTS_TOP (1<<8) /* don't traverse subdirectories */
-#define FTS_XDEV (1<<9) /* don't cross mount points */
-
-#define FTS_USER (1<<12) /* first user flag bit */
-
-#define FTS_COMFOLLOW FTS_META
-
-/*
- * fts_info flags
- */
-
-#define FTS_DEFAULT 0 /* ok, someone must have wanted this */
-
-#define FTS_NS (1<<0) /* stat failed */
-#define FTS_F (1<<1) /* file - not directory or symbolic link*/
-#define FTS_SL (1<<2) /* symbolic link */
-#define FTS_D (1<<3) /* directory - pre-order visit */
-
-#define FTS_C (1<<4) /* causes cycle */
-#define FTS_ERR (1<<5) /* some other error */
-#define FTS_DD (1<<6) /* . or .. */
-#define FTS_NR (1<<7) /* cannot read */
-#define FTS_NX (1<<8) /* cannot search */
-#define FTS_OK (1<<9) /* no info but otherwise ok */
-#define FTS_P (1<<10) /* post-order visit */
-
-#define FTS_DC (FTS_D|FTS_C) /* dir - would cause cycle */
-#define FTS_DNR (FTS_D|FTS_NR) /* dir - no read permission */
-#define FTS_DNX (FTS_D|FTS_NX) /* dir - no search permission */
-#define FTS_DOT (FTS_D|FTS_DD) /* . or .. */
-#define FTS_DP (FTS_D|FTS_P) /* dir - post-order visit */
-#define FTS_NSOK (FTS_NS|FTS_OK) /* no stat (because you asked) */
-#define FTS_SLNONE (FTS_SL|FTS_NS) /* symlink - to nowhere */
-
-/*
- * fts_set flags
- */
-
-#define FTS_AGAIN FTS_TOP /* process entry again */
-#define FTS_FOLLOW FTS_META /* follow FTS_SL symlink */
-#define FTS_SKIP FTS_NOSTAT /* skip FTS_D directory */
-#define FTS_STAT FTS_PHYSICAL /* stat() done by user */
-
-typedef struct Fts FTS;
-typedef struct Ftsent FTSENT;
-
-struct Ftsent
-{
- char* fts_accpath; /* path relative to . */
- char* fts_name; /* file name */
- char* fts_path; /* path relative to top dir */
- FTSENT* fts_cycle; /* offender if cycle */
- FTSENT* fts_link; /* next child */
- FTSENT* fts_parent; /* parent directory */
- struct stat* fts_statp; /* stat info */
-#ifdef _FTSENT_LOCAL_PRIVATE_
- _FTSENT_LOCAL_PRIVATE_
-#else
- __V_* fts_pointer; /* local pointer value */
-#endif
- long fts_number; /* local numeric value */
- int fts_errno; /* errno for this entry */
- unsigned short fts_info; /* info flags */
-
- unsigned short _fts_namelen; /* old fts_namelen */
- unsigned short _fts_pathlen; /* old fts_pathlen */
- short _fts_level; /* old fts_level */
-
- short _fts_status; /* <ftwalk.h> compatibility */
- struct stat _fts_statb; /* <ftwalk.h> compatibility */
-
- FTS* fts; /* fts_open() handle */
- size_t fts_namelen; /* strlen(fts_name) */
- size_t fts_pathlen; /* strlen(fts_path) */
- ssize_t fts_level; /* file tree depth, 0 at top */
-
-#ifdef _FTSENT_PRIVATE_
- _FTSENT_PRIVATE_
-#endif
-
-};
-
-struct Fts
-{
- int fts_errno; /* last errno */
- __V_* fts_handle; /* user defined handle */
-
-#ifdef _FTS_PRIVATE_
- _FTS_PRIVATE_
-#endif
-
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ FTSENT* fts_children __PROTO__((FTS*, int));
-extern __MANGLE__ int fts_close __PROTO__((FTS*));
-extern __MANGLE__ int fts_flags __PROTO__((void));
-extern __MANGLE__ int fts_local __PROTO__((FTSENT*));
-extern __MANGLE__ int fts_notify __PROTO__((int(*)(FTS*, FTSENT*, __V_*), __V_*));
-extern __MANGLE__ FTS* fts_open __PROTO__((char* const*, int, int(*)(FTSENT* const*, FTSENT* const*)));
-extern __MANGLE__ FTSENT* fts_read __PROTO__((FTS*));
-extern __MANGLE__ int fts_set __PROTO__((FTS*, FTSENT*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ftw.h b/usr/src/lib/libast/amd64/include/ast/ftw.h
deleted file mode 100644
index 68feb09bb3..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ftw.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * ftw,nftw over ftwalk
- */
-
-#ifndef _FTW_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTW_H
-
-#define FTW FTWALK
-#include <ftwalk.h>
-#undef FTW
-
-#define FTW_SLN (FTW_SL|FTW_NR)
-
-#define FTW_PHYS (FTW_PHYSICAL)
-#define FTW_CHDIR (FTW_DOT)
-#define FTW_DEPTH (FTW_POST)
-#define FTW_OPEN (0)
-
-struct FTW
-{
- int quit;
- int base;
- int level;
-};
-
-#define FTW_SKD FTW_SKIP
-#define FTW_PRUNE FTW_SKIP
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int ftw __PROTO__((const char*, int(*)(const char*, const struct stat*, int), int));
-extern __MANGLE__ int nftw __PROTO__((const char*, int(*)(const char*, const struct stat*, int, struct FTW*), int, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ftwalk.h b/usr/src/lib/libast/amd64/include/ast/ftwalk.h
deleted file mode 100644
index 673b1c2824..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ftwalk.h
+++ /dev/null
@@ -1,135 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Phong Vo
- * Glenn Fowler
- * AT&T Research
- *
- * ast ftwalk interface definitions
- * ftwalk was the initial improvement on ftw and nftw
- * which formed the basis for the POSIX fts proposal
- *
- * NOTE: this file is in cahoots with the fts implementation
- */
-
-#ifndef _FTWALK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTWALK_H
-
-#define fts_info info
-#define fts_level level
-#define fts_link link
-#define fts_name name
-#define fts_namelen namelen
-#define fts_parent parent
-#define fts_path path
-#define fts_pathlen pathlen
-#define _fts_status status
-#define _fts_statb statb
-
-#define FTSENT Ftw_t /* <fts.h> internal */
-#define Ftsent FTW /* <fts.h> internal */
-
-#define _FTSENT_LOCAL_PRIVATE_ /* <fts.h> internal */ \
- union \
- { \
- long number; /* local numeric value */ \
- __V_* pointer; /* local pointer value */ \
- } local;
-
-#include <fts.h>
-
-/*
- * ftwalk() argument flags
- */
-
-#define FTW_CANON FTS_CANON
-#define FTW_CHILDREN (FTS_USER<<0)
-#define FTW_DELAY FTS_NOSTAT
-#define FTW_DOT FTS_NOCHDIR
-#define FTW_META FTS_META
-#define FTW_MOUNT FTS_XDEV
-#define FTW_MULTIPLE FTS_ONEPATH
-#define FTW_NOSEEDOTDIR FTS_NOSEEDOTDIR
-#define FTW_PHYSICAL FTS_PHYSICAL
-#define FTW_POST (FTS_USER<<1)
-#define FTW_SEEDOTDIR FTS_SEEDOTDIR
-#define FTW_TOP FTS_TOP
-#define FTW_TWICE (FTS_USER<<2)
-#define FTW_USER (FTS_USER<<3)
-
-/*
- * Ftw_t.info type bits
- */
-
-#define FTW_C FTS_C
-#define FTW_D FTS_D
-#define FTW_DC FTS_DC
-#define FTW_DNR FTS_DNR
-#define FTW_DNX FTS_DNX
-#define FTW_DP FTS_DP
-#define FTW_F FTS_F
-#define FTW_NR FTS_NR
-#define FTW_NS FTS_NS
-#define FTW_NSOK FTS_NSOK
-#define FTW_NX FTS_NX
-#define FTW_P FTS_P
-#define FTW_SL FTS_SL
-
-/*
- * Ftw_t.status entry values
- */
-
-#define FTW_NAME FTS_DOT /* access by Ftw_t.name */
-#define FTW_PATH FTS_NOCHDIR /* access by Ftw_t.path */
-
-/*
- * Ftw_t.status return values
- */
-
-#define FTW_AGAIN FTS_AGAIN
-#define FTW_FOLLOW FTS_FOLLOW
-#define FTW_NOPOST FTS_NOPOSTORDER
-#define FTW_SKIP FTS_SKIP
-#define FTW_STAT FTS_STAT
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int ftwalk __PROTO__((const char*, int(*)(Ftw_t*), int, int(*)(Ftw_t*, Ftw_t*)));
-extern __MANGLE__ int ftwflags __PROTO__((void));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/glob.h b/usr/src/lib/libast/amd64/include/ast/glob.h
deleted file mode 100644
index e2708229c7..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/glob.h
+++ /dev/null
@@ -1,155 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix glob interface definitions with gnu extensions
- */
-
-#ifndef _GLOB_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _GLOB_H
-
-#define GLOB_VERSION 20060717L
-
-#include <stdlib.h>
-
-struct dirent;
-struct stat;
-
-struct _glob_;
-struct _globlist_;
-
-typedef struct _glob_ glob_t;
-typedef struct _globlist_ globlist_t;
-
-struct _globlist_
-{
- globlist_t* gl_next;
- char* gl_begin;
- unsigned char gl_flags;
- char gl_path[1];
-};
-
-struct _glob_
-{
- size_t gl_pathc;
- char** gl_pathv;
- size_t gl_offs;
- globlist_t* gl_list;
- int gl_flags;
-
- /* GLOB_DISC data -- memset(&gl,0,sizeof(gl)) before using! */
-
- const char* gl_fignore;
- const char* gl_suffix;
- unsigned char* gl_intr;
-
- int gl_delim;
-
- __V_* gl_handle;
- __V_* (*gl_diropen) __PROTO__((glob_t*, const char*));
- char* (*gl_dirnext) __PROTO__((glob_t*, __V_*));
- void (*gl_dirclose) __PROTO__((glob_t*, __V_*));
- int (*gl_type) __PROTO__((glob_t*, const char*, int));
- int (*gl_attr) __PROTO__((glob_t*, const char*, int));
-
- /* gnu extensions -- but how do you synthesize dirent and stat? */
-
- __V_* (*gl_opendir) __PROTO__((const char*));
- struct dirent* (*gl_readdir) __PROTO__((__V_*));
- void (*gl_closedir) __PROTO__((__V_*));
- int (*gl_stat) __PROTO__((const char*, struct stat*));
- int (*gl_lstat) __PROTO__((const char*, struct stat*));
-
- /* ast additions */
-
- char* (*gl_nextdir) __PROTO__((glob_t*, char*));
- unsigned long gl_status;
- unsigned long gl_version;
- unsigned short gl_extra;
-
-#ifdef _GLOB_PRIVATE_
- _GLOB_PRIVATE_
-#else
- char* gl_pad[23];
-#endif
-
-};
-
-/* standard interface */
-#define GLOB_APPEND 0x0001 /* append to previous */
-#define GLOB_DOOFFS 0x0002 /* gl_offs defines argv offset */
-#define GLOB_ERR 0x0004 /* abort on error */
-#define GLOB_MARK 0x0008 /* append / to directories */
-#define GLOB_NOCHECK 0x0010 /* nomatch is original pattern */
-#define GLOB_NOESCAPE 0x0020 /* don't treat \ specially */
-#define GLOB_NOSORT 0x0040 /* don't sort the list */
-
-/* extended interface */
-#define GLOB_STARSTAR 0x0080 /* enable [/]**[/] expansion */
-#define GLOB_BRACE 0x0100 /* enable {...} expansion */
-#define GLOB_ICASE 0x0200 /* ignore case on match */
-#define GLOB_COMPLETE 0x0400 /* shell file completeion */
-#define GLOB_AUGMENTED 0x0800 /* augmented shell patterns */
-#define GLOB_STACK 0x1000 /* allocate on current stack */
-#define GLOB_LIST 0x2000 /* just create gl_list */
-#define GLOB_ALTDIRFUNC 0x4000 /* gnu discipline functions */
-#define GLOB_DISC 0x8000 /* discipline initialized */
-
-/* gl_status */
-#define GLOB_NOTDIR 0x0001 /* last gl_dirnext() not a dir */
-
-/* gl_type return */
-#define GLOB_NOTFOUND 0 /* does not exist */
-#define GLOB_DEV 1 /* exists but not DIR EXE REG */
-#define GLOB_DIR 2 /* directory */
-#define GLOB_EXE 3 /* executable regular file */
-#define GLOB_REG 4 /* regular file */
-
-/* error return values */
-#define GLOB_ABORTED 1
-#define GLOB_NOMATCH 2
-#define GLOB_NOSPACE 3
-#define GLOB_INTR 4
-#define GLOB_APPERR 5
-#define GLOB_NOSYS 6
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int glob __PROTO__((const char*, int, int(*)(const char*,int), glob_t*));
-extern __MANGLE__ void globfree __PROTO__((glob_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif /* _GLOB_H */
diff --git a/usr/src/lib/libast/amd64/include/ast/hash.h b/usr/src/lib/libast/amd64/include/ast/hash.h
deleted file mode 100644
index 0023ea06f5..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/hash.h
+++ /dev/null
@@ -1,213 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * hash table library interface definitions
- *
- * NOTE: new code should use the more general <cdt.h>
- */
-
-#ifndef _HASH_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASH_H
-
-#define HASH_ALLOCATE (1L<<0) /* allocate new key names */
-#define HASH_FIXED (1L<<1) /* fixed table size */
-#define HASH_HASHED (1L<<6) /* key names already hashed */
-#define HASH_RESIZE (1L<<2) /* table has been resized */
-#define HASH_SCANNING (1L<<3) /* currently scanning scope */
-#define HASH_SCOPE (1L<<4) /* push scope / create in bot */
-#define HASH_STATIC (1L<<5) /* static table allocation */
-
-#define HASH_CREATE (1L<<8) /* create bucket if not found */
-#define HASH_DELETE (1L<<9) /* delete bucket if found */
-#define HASH_LOOKUP 0 /* default op */
-#define HASH_RENAME (1L<<7) /* rename bucket if found */
-
-#define HASH_BUCKET (1L<<11) /* name is installed bucket */
-#define HASH_INSTALL (1L<<12) /* install allocated bucket */
-#define HASH_NOSCOPE (1L<<13) /* top scope only */
-#define HASH_OPAQUE (1L<<14) /* opaque bucket */
-#define HASH_VALUE (1L<<15) /* value bucket field used */
-
-#define HASH_SIZE(n) (((long)(n))<<16) /* fixed bucket size */
-#define HASH_SIZEOF(f) ((((long)(f))>>16)&0xffff) /* extract size */
-
-#define HASH_DELETED ((unsigned long)1<<(8*sizeof(int)-1)) /* deleted placeholder */
-#define HASH_KEEP (1L<<(8*sizeof(int)-2)) /* no free on bucket */
-#define HASH_HIDDEN (1L<<(8*sizeof(int)-3)) /* hidden by scope */
-#define HASH_HIDES (1L<<(8*sizeof(int)-4)) /* hides lower scope */
-#define HASH_OPAQUED (1L<<(8*sizeof(int)-5)) /* opaqued placeholder */
-#define HASH_FREENAME (1L<<(8*sizeof(int)-6)) /* free bucket name */
-
-#define HASH_RESET (HASH_RESIZE|HASH_SCOPE|HASH_STATIC|HASH_VALUE)
-#define HASH_INTERNAL (HASH_BUCKET|HASH_RESIZE|HASH_SCANNING|HASH_STATIC)
-#define HASH_FLAGS (HASH_DELETED|HASH_FREENAME|HASH_HIDDEN|HASH_HIDES|HASH_KEEP|HASH_OPAQUED)
-
-#define HASH_alloc 1
-#define HASH_clear 2
-#define HASH_compare 3
-#define HASH_free 4
-#define HASH_hash 5
-#define HASH_meanchain 6
-#define HASH_name 7
-#define HASH_namesize 8
-#define HASH_set 9
-#define HASH_size 10
-#define HASH_table 11
-#define HASH_va_list 12
-
-#define HASH_bucketsize 13
-
-#define HASH_region 14
-
-#include <hashpart.h>
-
-#define hashclear(t,f) ((t)->flags &= ~((f) & ~HASH_INTERNAL))
-#define hashcover(b) (((b)->hash&HASH_HIDES)?(Hash_bucket_t*)((b)->name):(Hash_bucket_t*)0)
-#define hashdel(t,n) hashlook(t, (char*)(n), HASH_DELETE, (char*)0)
-#define hashget(t,n) hashlook(t, (char*)(n), HASH_LOOKUP|HASH_VALUE, (char*)0)
-#define hashgetbucket(s) ((Hash_bucket_t*)((s)-((sizeof(Hash_bucket_t)+sizeof(char*)-1)/sizeof(char*))*sizeof(char*)))
-#define hashkeep(b) ((b)->hash|=HASH_KEEP)
-#define hashname(b) ((((b)->hash&HASH_HIDES)?((Hash_bucket_t*)((b)->name)):(b))->name)
-#define hashput(t,n,v) hashlook(t, (char*)(n), HASH_CREATE|HASH_VALUE, (char*)(v))
-#define hashref(t,n) hashlook(t, (char*)(n), HASH_LOOKUP|HASH_INTERNAL|HASH_VALUE, (char*)0)
-#define hashscope(t) ((t)->scope)
-#define hashset(t,f) ((t)->flags |= ((f) & ~HASH_INTERNAL))
-
-/*
- * DEPRECATED renames for compatibility
- */
-
-#define Hashbin_t Hash_bucket_t
-#define HASHBUCKET Hash_bucket_t
-#define Hashhdr_t Hash_header_t
-#define HASHHEADER Hash_header_t
-#define Hashpos_t Hash_position_t
-#define HASHPOSITION Hash_position_t
-#define Hashtab_t Hash_table_t
-#define HASHTABLE Hash_table_t
-
-#define vhashalloc hashvalloc
-#define hashvalloc(t,a) hashalloc(t,HASH_va_list,a,0)
-
-/*
- * the #define's avoid union tags
- */
-
-typedef struct Hash_bucket Hash_bucket_t;
-typedef struct Hash_root Hash_root_t;
-typedef struct Hash_table Hash_table_t;
-
-#define HASH_HEADER /* common bucket header */ \
- Hash_bucket_t* next; /* next in collision chain */ \
- unsigned int hash; /* hash flags and value */ \
- char* name /* key name */
-
-#define HASH_DEFAULT /* HASH_VALUE bucket elements */ \
- char* value /* key value */
-
-typedef struct /* bucket header */
-{
- HASH_HEADER;
-} Hash_header_t;
-
-struct Hash_bucket /* prototype bucket */
-{
- HASH_HEADER;
- HASH_DEFAULT;
-};
-
-typedef struct /* hash scan bucket position */
-{
- Hash_bucket_t* bucket; /* bucket */
-#ifdef _HASH_POSITION_PRIVATE_
- _HASH_POSITION_PRIVATE_
-#endif
-} Hash_position_t;
-
-typedef struct /* last lookup cache */
-{
- Hash_table_t* table; /* last lookup table */
- Hash_bucket_t* bucket; /* last lookup bucket */
-#ifdef _HASH_LAST_PRIVATE_
- _HASH_LAST_PRIVATE_
-#endif
-} Hash_last_t;
-
-struct Hash_root /* root hash table information */
-{
- int accesses; /* number of accesses */
- int collisions; /* number of collisions */
- int flags; /* flags: see HASH_[A-Z]* */
- Hash_last_t last; /* last lookup cache */
- __V_* context; /* user defined context */
-#ifdef _HASH_ROOT_PRIVATE_
- _HASH_ROOT_PRIVATE_
-#endif
-};
-
-struct Hash_table /* hash table information */
-{
- Hash_root_t* root; /* root hash table information */
- int size; /* table size */
- int buckets; /* active bucket count */
- char* name; /* table name */
- Hash_table_t* scope; /* scope covered table */
- short flags; /* flags: see HASH_[A-Z]* */
-#ifdef _HASH_TABLE_PRIVATE_
- _HASH_TABLE_PRIVATE_
-#endif
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Hash_table_t* hashalloc __PROTO__((Hash_table_t*, ...));
-extern __MANGLE__ void hashdone __PROTO__((Hash_position_t*));
-extern __MANGLE__ void hashdump __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ Hash_table_t* hashfree __PROTO__((Hash_table_t*));
-extern __MANGLE__ Hash_bucket_t* hashlast __PROTO__((Hash_table_t*));
-extern __MANGLE__ char* hashlook __PROTO__((Hash_table_t*, const char*, long, const char*));
-extern __MANGLE__ Hash_bucket_t* hashnext __PROTO__((Hash_position_t*));
-extern __MANGLE__ Hash_position_t* hashscan __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ void hashsize __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ Hash_table_t* hashview __PROTO__((Hash_table_t*, Hash_table_t*));
-extern __MANGLE__ int hashwalk __PROTO__((Hash_table_t*, int, int (*)(const char*, char*, __V_*), __V_*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/hashpart.h b/usr/src/lib/libast/amd64/include/ast/hashpart.h
deleted file mode 100644
index 5d33aac61d..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/hashpart.h
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * K. P. Vo
- * G. S. Fowler
- * AT&T Research
- *
- * ``the best'' combined linear congruent checksum/hash/PRNG
- */
-
-#ifndef _HASHPART_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASHPART_H
-
-#define HASH_ADD(h) (0x9c39c33dL)
-
-#if __sparc__ || __sparc || sparc
-
-#define HASH_A(h,n) ((((h) << 2) - (h)) << (n))
-#define HASH_B(h,n) ((((h) << 4) - (h)) << (n))
-#define HASH_C(h,n) ((HASH_A(h,7) + HASH_B(h,0)) << (n))
-#define HASH_MPY(h) (HASH_C(h,22)+HASH_C(h,10)+HASH_A(h,6)+HASH_A(h,3)+(h))
-
-#else
-
-#define HASH_MPY(h) ((h)*0x63c63cd9L)
-
-#endif
-
-#define HASHPART(h,c) (h = HASH_MPY(h) + HASH_ADD(h) + (c))
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ip6.h b/usr/src/lib/libast/amd64/include/ast/ip6.h
deleted file mode 100644
index 2712064a7e..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ip6.h
+++ /dev/null
@@ -1,28 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#if !_IP6_H
-#define _IP6_H 1
-
-#define IP6ADDR 16
-#define IP6BITS IP6ADDR
-#define IP6PREFIX (IP6ADDR+1)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* fmtip6 __PROTO__((unsigned char*, int));
-extern __MANGLE__ int strtoip6 __PROTO__((const char*, char**, unsigned char*, unsigned char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/lc.h b/usr/src/lib/libast/amd64/include/ast/lc.h
deleted file mode 100644
index 65fdab45ab..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/lc.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated by ./lcgen : : */
-
-
-#ifndef _LC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LC_H 1
-
-#include <ast.h>
-
-#define LC_abbreviated 0x00001
-#define LC_checked 0x00002
-#define LC_debug 0x00004
-#define LC_default 0x00008
-#define LC_defined 0x00010
-#define LC_local 0x00020
-#define LC_primary 0x00040
-#define LC_qualified 0x00080
-#define LC_undefined 0x00100
-#define LC_utf8 0x00200
-#define LC_verbose 0x00400
-#define LC_setlocale 0x10000
-#define LC_setenv 0x20000
-#define LC_user 0x40000
-#define LC_language_attribute_max 2
-#define LC_territory_language_max 4
-
-struct Lc_s;
-
-typedef struct Lc_info_s
-{
- const struct Lc_s* lc;
- unsigned long number;
- __V_* data;
-} Lc_info_t;
-
-typedef struct Lc_attribute_s
-{
- const char* name;
- unsigned long flags;
- unsigned long index;
-} Lc_attribute_t;
-
-typedef struct Lc_charset_s
-{
- const char* code;
- const char* alternates;
- const char* ms;
- unsigned long index;
-} Lc_charset_t;
-
-typedef struct Lc_language_s
-{
- const char* code;
- const char* name;
- const char* alternates;
- const Lc_charset_t* charset;
- unsigned long flags;
- unsigned long index;
- const Lc_attribute_t* attributes[LC_language_attribute_max];
-} Lc_language_t;
-
-typedef struct Lc_territory_s
-{
- const char* code;
- const char* name;
- unsigned long flags;
- unsigned long index;
- const Lc_language_t* languages[LC_territory_language_max];
-#ifdef _LC_TERRITORY_PRIVATE_
- _LC_TERRITORY_PRIVATE_
-#endif
-} Lc_territory_t;
-
-typedef struct Lc_map_s
-{
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_t* attribute;
-} Lc_map_t;
-
-typedef struct Lc_attribute_list_s
-{
- struct Lc_attribute_list_s* next;
- const Lc_attribute_t* attribute;
-} Lc_attribute_list_t;
-
-typedef struct Lc_s
-{
- const char* name;
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_list_t* attributes;
- unsigned long flags;
- unsigned long index;
-#ifdef _LC_PRIVATE_
- _LC_PRIVATE_
-#endif
-} Lc_t;
-
-struct Lc_category_s;
-
-typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
-
-typedef struct Lc_category_s
-{
- const char* name;
- int external;
- int internal;
- Lc_category_set_f setf;
- Lc_t* prev;
- unsigned int flags;
-} Lc_category_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
-extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
-extern __MANGLE__ int lcindex __PROTO__((int, int));
-extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
-extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
-extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/ls.h b/usr/src/lib/libast/amd64/include/ast/ls.h
deleted file mode 100644
index a8a5fcb0e0..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/ls.h
+++ /dev/null
@@ -1,99 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * ls formatter interface definitions
- */
-
-#ifndef _LS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LS_H
-
-#include <ast_std.h>
-#include <ast_fs.h>
-#include <ast_mode.h>
-
-/*
- * some systems (could it beee AIX) pollute the std name space
- */
-
-#undef fileid
-#define fileid fileID
-
-#define LS_BLOCKSIZE 512
-
-#define iblocks(p) _iblocks(p)
-
-#if _mem_st_rdev_stat
-#define idevice(p) ((p)->st_rdev)
-#define IDEVICE(p,v) ((p)->st_rdev=(v))
-#else
-#define idevice(p) 0
-#define IDEVICE(p,v)
-#endif
-
-#define LS_ATIME (1<<0) /* list st_atime */
-#define LS_BLOCKS (1<<1) /* list blocks used by file */
-#define LS_CTIME (1<<2) /* list st_ctime */
-#define LS_EXTERNAL (1<<3) /* st_mode is modex canonical */
-#define LS_INUMBER (1<<4) /* list st_ino */
-#define LS_LONG (1<<5) /* long listing */
-#define LS_MARK (1<<6) /* append file name marks */
-#define LS_NOGROUP (1<<7) /* omit group name for LS_LONG */
-#define LS_NOUSER (1<<8) /* omit user name for LS_LONG */
-#define LS_NUMBER (1<<9) /* number instead of name */
-
-#define LS_USER (1<<10) /* first user flag bit */
-
-#define LS_W_BLOCKS 6 /* LS_BLOCKS field width */
-#define LS_W_INUMBER 9 /* LS_INUMBER field width */
-#define LS_W_LONG 57 /* LS_LONG width (w/o names) */
-#define LS_W_LINK 4 /* link text width (w/o names) */
-#define LS_W_MARK 1 /* LS_MARK field width */
-#define LS_W_NAME 9 /* group|user name field width */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ off_t _iblocks __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtdev __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtfs __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtls __PROTO__((char*, const char*, struct stat*, const char*, const char*, int));
-extern __MANGLE__ int pathstat __PROTO__((const char*, struct stat*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/magic.h b/usr/src/lib/libast/amd64/include/ast/magic.h
deleted file mode 100644
index 8683016e80..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/magic.h
+++ /dev/null
@@ -1,96 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * magic interface definitions
- */
-
-#ifndef _MAGIC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MAGIC_H
-
-#include <sfio.h>
-#include <ls.h>
-
-#define MAGIC_VERSION 19961031L
-
-#ifndef MAGIC_FILE
-#define MAGIC_FILE "lib/file/magic"
-#endif
-
-#ifndef MAGIC_DIR
-#define MAGIC_DIR "lib/file"
-#endif
-
-#define MAGIC_FILE_ENV "MAGICFILE"
-
-#define MAGIC_MIME (1<<0) /* magictype returns MIME type */
-#define MAGIC_VERBOSE (1<<1) /* verbose magic file errors */
-
-#define MAGIC_USER (1L<<16) /* first user flag bit */
-
-struct Magic_s;
-struct Magicdisc_s;
-
-typedef struct Magicdisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* MAGIC_* flags */
- Error_f errorf; /* error function */
-} Magicdisc_t;
-
-typedef struct Magic_s
-{
- const char* id; /* library id string */
-
-#ifdef _MAGIC_PRIVATE_
- _MAGIC_PRIVATE_
-#endif
-
-} Magic_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Magic_t* magicopen __PROTO__((Magicdisc_t*));
-extern __MANGLE__ int magicload __PROTO__((Magic_t*, const char*, unsigned long));
-extern __MANGLE__ int magiclist __PROTO__((Magic_t*, Sfio_t*));
-extern __MANGLE__ char* magictype __PROTO__((Magic_t*, Sfio_t*, const char*, struct stat*));
-extern __MANGLE__ int magicclose __PROTO__((Magic_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/magicid.h b/usr/src/lib/libast/amd64/include/ast/magicid.h
deleted file mode 100644
index 1dca0c1e42..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/magicid.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * generic binary magic id definitions
- */
-
-#ifndef _MAGICID_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MAGICID_H 1
-
-#include <ast_common.h>
-
-#define MAGICID 0x00010203
-
-typedef uint32_t Magicid_data_t;
-
-typedef struct Magicid_s
-{
- Magicid_data_t magic; /* magic number */
- char name[8]; /* generic data/application name*/
- char type[12]; /* specific data type */
- Magicid_data_t version; /* YYYYMMDD or 0xWWXXYYZZ */
- Magicid_data_t size;
-} Magicid_t;
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/mc.h b/usr/src/lib/libast/amd64/include/ast/mc.h
deleted file mode 100644
index b84df7239e..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/mc.h
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * machine independent binary message catalog interface
- *
- * file layout
- * all numbers are sfputu() format
- *
- * 4 char magic (^M^S^G0)
- * <method locale YYYY-MM-DD>\0
- * (<optional strings>\0)*
- * \0
- * string table size
- * #msgs total
- * #max set number
- * #set-id 1
- * #msgs in set 1
- * ...
- * #set-id #sets
- * #msgs in set #sets
- * end of sets (0)
- * msg(1,1) size
- * ...
- * msg(#sets,#msgs) size
- * string table
- */
-
-#ifndef _MC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MC_H
-
-#include <ast.h>
-
-#define MC_MAGIC "\015\023\007\000"
-#define MC_MAGIC_SIZE 4
-
-#define MC_SET_MAX 1023
-#define MC_NUM_MAX 32767
-
-#define MC_NLS (1<<10)
-
-#define MC_MESSAGE_SET(s) mcindex(s,NiL,NiL,NiL)
-
-typedef struct
-{
- char** msg;
- int num;
- int gen;
-} Mcset_t;
-
-typedef struct
-{
- Mcset_t* set;
- int num;
- int gen;
- char* translation;
-#ifdef _MC_PRIVATE_
- _MC_PRIVATE_
-#endif
-} Mc_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* mcfind __PROTO__((char*, const char*, const char*, int, int));
-extern __MANGLE__ Mc_t* mcopen __PROTO__((Sfio_t*));
-extern __MANGLE__ char* mcget __PROTO__((Mc_t*, int, int, const char*));
-extern __MANGLE__ int mcput __PROTO__((Mc_t*, int, int, const char*));
-extern __MANGLE__ int mcdump __PROTO__((Mc_t*, Sfio_t*));
-extern __MANGLE__ int mcindex __PROTO__((const char*, char**, int*, int*));
-extern __MANGLE__ int mcclose __PROTO__((Mc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/mime.h b/usr/src/lib/libast/amd64/include/ast/mime.h
deleted file mode 100644
index 5943b58eaa..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/mime.h
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * mime/mailcap interface
- */
-
-#ifndef _MIMETYPE_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MIMETYPE_H 1
-
-#include <sfio.h>
-#include <ls.h>
-
-#define MIME_VERSION 19970717L
-
-#ifndef MIME_FILES
-#define MIME_FILES "~/.mailcap:/usr/local/etc/mailcap:/usr/etc/mailcap:/etc/mailcap:/etc/mail/mailcap:/usr/public/lib/mailcap"
-#endif
-
-#define MIME_FILES_ENV "MAILCAP"
-
-#define MIME_LIST (1<<0) /* mimeload arg is : list */
-#define MIME_NOMAGIC (1<<1) /* no magic for mimetype() */
-#define MIME_PIPE (1<<2) /* mimeview() io is piped */
-#define MIME_REPLACE (1<<3) /* replace existing definition */
-
-#define MIME_USER (1L<<16) /* first user flag bit */
-
-struct Mime_s;
-typedef struct Mime_s Mime_t;
-
-struct Mimedisc_s;
-typedef struct Mimedisc_s Mimedisc_t;
-
-typedef int (*Mimevalue_f) __PROTO__((Mime_t*, __V_*, char*, size_t, Mimedisc_t*));
-
-struct Mimedisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* MIME_* flags */
- Error_f errorf; /* error function */
- Mimevalue_f valuef; /* value extraction function */
-};
-
-struct Mime_s
-{
- const char* id; /* library id string */
-
-#ifdef _MIME_PRIVATE_
- _MIME_PRIVATE_
-#endif
-
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Mime_t* mimeopen __PROTO__((Mimedisc_t*));
-extern __MANGLE__ int mimeload __PROTO__((Mime_t*, const char*, unsigned long));
-extern __MANGLE__ int mimelist __PROTO__((Mime_t*, Sfio_t*, const char*));
-extern __MANGLE__ int mimeclose __PROTO__((Mime_t*));
-extern __MANGLE__ int mimeset __PROTO__((Mime_t*, char*, unsigned long));
-extern __MANGLE__ char* mimetype __PROTO__((Mime_t*, Sfio_t*, const char*, struct stat*));
-extern __MANGLE__ char* mimeview __PROTO__((Mime_t*, const char*, const char*, const char*, const char*));
-extern __MANGLE__ int mimehead __PROTO__((Mime_t*, __V_*, size_t, size_t, char*));
-extern __MANGLE__ int mimecmp __PROTO__((const char*, const char*, char**));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/mnt.h b/usr/src/lib/libast/amd64/include/ast/mnt.h
deleted file mode 100644
index 8bf8c12814..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/mnt.h
+++ /dev/null
@@ -1,69 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * mounted filesystem scan interface
- */
-
-#ifndef _MNT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MNT_H 1
-
-#undef MNT_REMOTE /* aix clash */
-#define MNT_REMOTE (1<<0) /* remote mount */
-
-typedef struct
-{
- char* fs; /* filesystem name */
- char* dir; /* mounted dir */
- char* type; /* filesystem type */
- char* options; /* options */
- int freq; /* backup frequency */
- int npass; /* number of parallel passes */
- int flags; /* MNT_* flags */
-} Mnt_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ __V_* mntopen __PROTO__((const char*, const char*));
-extern __MANGLE__ Mnt_t* mntread __PROTO__((__V_*));
-extern __MANGLE__ int mntwrite __PROTO__((__V_*, const Mnt_t*));
-extern __MANGLE__ int mntclose __PROTO__((__V_*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/modecanon.h b/usr/src/lib/libast/amd64/include/ast/modecanon.h
deleted file mode 100644
index 3fa425af8f..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/modecanon.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * canonical mode_t representation
- */
-
-#ifndef _MODECANON_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MODECANON_H
-
-#define X_ITYPE(m) ((m)&X_IFMT)
-
-#define X_IFMT 0170000
-#define X_IFWHT 0160000
-#define X_IFDOOR 0150000
-#define X_IFSOCK 0140000
-#define X_IFLNK 0120000
-#define X_IFCTG 0110000
-#define X_IFREG 0100000
-#define X_IFBLK 0060000
-#define X_IFDIR 0040000
-#define X_IFCHR 0020000
-#define X_IFIFO 0010000
-
-#define X_IPERM 0007777
-#define X_ISUID 0004000
-#define X_ISGID 0002000
-#define X_ISVTX 0001000
-#define X_IRUSR 0000400
-#define X_IWUSR 0000200
-#define X_IXUSR 0000100
-#define X_IRGRP 0000040
-#define X_IWGRP 0000020
-#define X_IXGRP 0000010
-#define X_IROTH 0000004
-#define X_IWOTH 0000002
-#define X_IXOTH 0000001
-
-#define X_IRWXU (X_IRUSR|X_IWUSR|X_IXUSR)
-#define X_IRWXG (X_IRGRP|X_IWGRP|X_IXGRP)
-#define X_IRWXO (X_IROTH|X_IWOTH|X_IXOTH)
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/namval.h b/usr/src/lib/libast/amd64/include/ast/namval.h
deleted file mode 100644
index fefe46a0c7..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/namval.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/option.h b/usr/src/lib/libast/amd64/include/ast/option.h
deleted file mode 100644
index 5439707f8e..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/option.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * command line option parse interface
- */
-
-#ifndef _OPTION_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _OPTION_H
-
-#include <ast.h>
-
-#define OPT_VERSION 20070319L
-
-#define OPT_USER (1L<<16) /* first user flag bit */
-
-struct Opt_s;
-struct Optdisc_s;
-
-typedef int (*Optinfo_f) __PROTO__((struct Opt_s*, Sfio_t*, const char*, struct Optdisc_s*));
-
-typedef struct Optdisc_s
-{
- unsigned long version; /* OPT_VERSION */
- unsigned long flags; /* OPT_* flags */
- char* catalog; /* error catalog id */
- Optinfo_f infof; /* runtime info function */
-} Optdisc_t;
-
-/* NOTE: Opt_t member order fixed by a previous binary release */
-
-#ifndef _OPT_PRIVATE_
-#define _OPT_PRIVATE_ \
- char pad[3*sizeof(__V_*)];
-#endif
-
-typedef struct Opt_s
-{
- int again; /* see optjoin() */
- char* arg; /* {:,#} string argument */
- char** argv; /* most recent argv */
- int index; /* argv index */
- char* msg; /* error/usage message buffer */
- long num; /* OBSOLETE -- use number */
- int offset; /* char offset in argv[index] */
- char option[8]; /* current flag {-,+} + option */
- char name[64]; /* current long name or flag */
- Optdisc_t* disc; /* user discipline */
- intmax_t number; /* # numeric argument */
- unsigned char assignment; /* option arg assigment op */
- unsigned char pads[sizeof(__V_*)-1];
- _OPT_PRIVATE_
-} Opt_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Opt_t* _opt_infop_;
-
-#define opt_info (*_opt_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define optinit(d,f) (memset(d,0,sizeof(*(d))),(d)->version=OPT_VERSION,(d)->infof=(f),opt_info.disc=(d))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int optget __PROTO__((char**, const char*));
-extern __MANGLE__ int optjoin __PROTO__((char**, ...));
-extern __MANGLE__ char* opthelp __PROTO__((const char*, const char*));
-extern __MANGLE__ char* optusage __PROTO__((const char*));
-extern __MANGLE__ int optstr __PROTO__((const char*, const char*));
-extern __MANGLE__ int optesc __PROTO__((Sfio_t*, const char*, int));
-extern __MANGLE__ Opt_t* optctx __PROTO__((Opt_t*, Opt_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/preroot.h b/usr/src/lib/libast/amd64/include/ast/preroot.h
deleted file mode 100644
index a10163329c..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/preroot.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/proc.h b/usr/src/lib/libast/amd64/include/ast/proc.h
deleted file mode 100644
index 4161e1a385..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/proc.h
+++ /dev/null
@@ -1,115 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * process library interface
- */
-
-#ifndef _PROC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _PROC_H
-
-#include <ast.h>
-
-#define PROC_ARGMOD (1<<0) /* argv[-1],argv[0] can be modified */
-#define PROC_BACKGROUND (1<<1) /* shell background (&) setup */
-#define PROC_CHECK (1<<17) /* check that command exists */
-#define PROC_CLEANUP (1<<2) /* close parent redirect fds on error */
-#define PROC_DAEMON (1<<3) /* daemon setup */
-#define PROC_ENVCLEAR (1<<4) /* clear environment */
-#define PROC_FOREGROUND (1<<14) /* system(3) setup */
-#define PROC_GID (1<<5) /* setgid(getgid()) */
-#define PROC_IGNORE (1<<6) /* ignore parent pipe errors */
-#define PROC_IGNOREPATH (1<<16) /* procrun() intercept to ignore path */
-#define PROC_OVERLAY (1<<7) /* overlay current process if possible */
-#define PROC_PARANOID (1<<8) /* restrict everything */
-#define PROC_PRIVELEGED (1<<9) /* setuid(0), setgid(getegid()) */
-#define PROC_READ (1<<10) /* proc pipe fd 1 returned */
-#define PROC_SESSION (1<<11) /* session leader */
-#define PROC_UID (1<<12) /* setuid(getuid()) */
-#define PROC_WRITE (1<<13) /* proc pipe fd 0 returned */
-#define PROC_ZOMBIE (1<<15) /* proc may leave a zombie behind */
-
-#define PROC_ARG_BIT 14 /* bits per op arg */
-#define PROC_OP_BIT 4 /* bits per op */
-
-#define PROC_ARG_NULL ((1<<PROC_ARG_BIT)-1)
-
-#define PROC_fd_dup 0x4
-#define PROC_FD_CHILD 0x1
-#define PROC_FD_PARENT 0x2
-
-#define PROC_sig_dfl 0x8
-#define PROC_sig_ign 0x9
-
-#define PROC_sys_pgrp 0xa
-#define PROC_sys_umask 0xb
-
-#define PROC_op1(o,a) (((o)<<(2*PROC_ARG_BIT))|((a)&((PROC_ARG_NULL<<PROC_ARG_BIT)|PROC_ARG_NULL)))
-#define PROC_op2(o,a,b) (((o)<<(2*PROC_ARG_BIT))|(((b)&PROC_ARG_NULL)<<PROC_ARG_BIT)|((a)&PROC_ARG_NULL))
-
-#define PROC_FD_CLOSE(p,f) PROC_op2(PROC_fd_dup|(f),p,PROC_ARG_NULL)
-#define PROC_FD_DUP(p,c,f) PROC_op2(PROC_fd_dup|(f),p,c)
-#define PROC_SIG_DFL(s) PROC_op1(PROC_sig_dfl,s,0)
-#define PROC_SIG_IGN(s) PROC_op1(PROC_sig_ign,s,0)
-#define PROC_SYS_PGRP(g) PROC_op1(PROC_sys_pgrp,g)
-#define PROC_SYS_UMASK(m) PROC_op1(PROC_sys_umask,m,0)
-
-#define PROC_OP(x) (((x)>>(2*PROC_ARG_BIT))&((1<<PROC_OP_BIT)-1))
-#define PROC_ARG(x,n) ((n)?(((x)>>(((n)-1)*PROC_ARG_BIT))&PROC_ARG_NULL):(((x)&~((1<<(2*PROC_ARG_BIT))-1))==~((1<<(2*PROC_ARG_BIT))-1))?(-1):((x)&~((1<<(2*PROC_ARG_BIT))-1)))
-
-typedef struct
-{
- pid_t pid; /* process id */
- pid_t pgrp; /* process group id */
- int rfd; /* read fd if applicable */
- int wfd; /* write fd if applicable */
-
-#ifdef _PROC_PRIVATE_
-_PROC_PRIVATE_
-#endif
-
-} Proc_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int procclose __PROTO__((Proc_t*));
-extern __MANGLE__ int procfree __PROTO__((Proc_t*));
-extern __MANGLE__ Proc_t* procopen __PROTO__((const char*, char**, char**, long*, int));
-extern __MANGLE__ int procrun __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/prototyped.h b/usr/src/lib/libast/amd64/include/ast/prototyped.h
deleted file mode 100644
index 113fb94d24..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/prototyped.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/re_comp.h b/usr/src/lib/libast/amd64/include/ast/re_comp.h
deleted file mode 100644
index ec1d512e40..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/re_comp.h
+++ /dev/null
@@ -1,52 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * re_comp interface definitions
- *
- * OBSOLETE: use <regex.h>
- */
-
-#ifndef _RE_COMP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _RE_COMP_H
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* re_comp __PROTO__((const char*));
-extern __MANGLE__ int re_exec __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/recfmt.h b/usr/src/lib/libast/amd64/include/ast/recfmt.h
deleted file mode 100644
index fcd56de020..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/recfmt.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * record format interface
- */
-
-#ifndef _RECFMT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _RECFMT_H 1
-
-#include <ast.h>
-
-typedef uint32_t Recfmt_t;
-
-#define REC_delimited 0
-#define REC_fixed 1
-#define REC_variable 2
-#define REC_method 14
-#define REC_none 15
-
-#define REC_M_path 0
-#define REC_M_data 1
-
-#define RECTYPE(f) (((f)>>28)&((1<<4)-1))
-
-#define REC_D_TYPE(d) ((REC_delimited<<28)|((d)&((1<<8)-1)))
-#define REC_D_DELIMITER(f) ((f)&((1<<8)-1))
-
-#define REC_F_TYPE(s) ((REC_fixed<<28)|((s)&((1<<28)-1)))
-#define REC_F_SIZE(f) ((f)&((1<<28)-1))
-
-#define REC_U_TYPE(t,a) (((t)<<28)|((a)&((1<<28)-1)))
-#define REC_U_ATTRIBUTES(f) ((f)&~((1<<28)-1))
-
-#define REC_V_TYPE(h,o,z,l,i) ((REC_variable<<28)|((h)<<23)|((o)<<19)|(((z)-1)<<18)|((l)<<17)|((i)<<16))
-#define REC_V_RECORD(f,s) (((f)&(((1<<16)-1)<<16))|(s))
-#define REC_V_HEADER(f) (((f)>>23)&((1<<5)-1))
-#define REC_V_OFFSET(f) (((f)>>19)&((1<<4)-1))
-#define REC_V_LENGTH(f) ((((f)>>18)&1)+1)
-#define REC_V_LITTLE(f) (((f)>>17)&1)
-#define REC_V_INCLUSIVE(f) (((f)>>16)&1)
-#define REC_V_SIZE(f) ((f)&((1<<16)-1))
-#define REC_V_ATTRIBUTES(f) ((f)&~((1<<16)-1))
-
-#define REC_M_TYPE(i) ((REC_method<<28)|(i))
-#define REC_M_INDEX(f) ((f)&((1<<28)-1))
-
-#define REC_N_TYPE() 0xffffffff
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* fmtrec __PROTO__((Recfmt_t, int));
-extern __MANGLE__ Recfmt_t recfmt __PROTO__((const __V_*, size_t, off_t));
-extern __MANGLE__ Recfmt_t recstr __PROTO__((const char*, char**));
-extern __MANGLE__ ssize_t reclen __PROTO__((Recfmt_t, const __V_*, size_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/regex.h b/usr/src/lib/libast/amd64/include/ast/regex.h
deleted file mode 100644
index 9b7299c814..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/regex.h
+++ /dev/null
@@ -1,230 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#ifdef _AST_STD_I
-#define _REGEX_H -1
-#define regex_t int
-#define regmatch_t int
-#endif
-#ifndef _REGEX_H
-#define _REGEX_H 1
-#undef regex_t
-#undef regmatch_t
-
-#include <ast_common.h>
-
-#define REG_VERSION 20030916L
-
-/* regcomp flags */
-
-#define REG_AUGMENTED 0x00000001 /* enable ! & < > */
-#define REG_EXTENDED 0x00000002 /* enable ( | ) */
-#define REG_ICASE 0x00000004 /* ignore case in match */
-#define REG_NEWLINE 0x00000008 /* ^/$ match embedded \n */
-#define REG_NOSUB 0x00000010 /* don't report subexp matches */
-#define REG_SHELL 0x00000020 /* shell pattern syntax */
-
-/* nonstandard regcomp flags */
-
-#define REG_LEFT 0x00000100 /* implicit ^... */
-#define REG_LITERAL 0x00000200 /* no operators */
-#define REG_MINIMAL 0x00000400 /* minimal match */
-#define REG_NULL 0x00000800 /* allow null patterns */
-#define REG_RIGHT 0x00001000 /* implicit ...$ */
-#define REG_LENIENT 0x00002000 /* look the other way */
-#define REG_ESCAPE 0x00004000 /* \ escapes delimiter in [...] */
-#define REG_FIRST 0x00008000 /* first match found will do */
-#define REG_MULTIPLE 0x00010000 /* multiple \n sep patterns */
-#define REG_DISCIPLINE 0x00020000 /* regex_t.re_disc is valid */
-#define REG_SPAN 0x00040000 /* . matches \n */
-#define REG_COMMENT 0x00080000 /* ignore pattern space & #...\n*/
-#define REG_MULTIREF 0x00100000 /* multiple digit backrefs */
-#define REG_MUSTDELIM 0x08000000 /* all delimiters required */
-#define REG_DELIMITED 0x10000000 /* pattern[0] is delimiter */
-#define REG_CLASS_ESCAPE 0x80000000 /* \ escapes in [...] */
-
-#define REG_SHELL_DOT 0x00200000 /* explicit leading . match */
-#define REG_SHELL_ESCAPED 0x00400000 /* \ not special */
-#define REG_SHELL_GROUP 0x20000000 /* (|&) inside [@|&](...) only */
-#define REG_SHELL_PATH 0x00800000 /* explicit / match */
-
-#define REG_REGEXP 0x40000000 /* <regexp.h> compatibility */
-
-/* regexec flags */
-
-#define REG_NOTBOL 0x00000040 /* ^ is not a special char */
-#define REG_NOTEOL 0x00000080 /* $ is not a special char */
-
-/* nonstandard regexec flags */
-
-#define REG_INVERT 0x01000000 /* invert regrexec match sense */
-#define REG_STARTEND 0x02000000 /* subject==match[0].rm_{so,eo} */
-#define REG_ADVANCE 0x04000000 /* advance match[0].rm_{so,eo} */
-
-/* regalloc flags */
-
-#define REG_NOFREE 0x00000001 /* don't free */
-
-/* regsub flags */
-
-#define REG_SUB_ALL 0x00000001 /* substitute all occurrences */
-#define REG_SUB_LOWER 0x00000002 /* substitute to lower case */
-#define REG_SUB_UPPER 0x00000004 /* substitute to upper case */
-#define REG_SUB_PRINT 0x00000010 /* internal no-op */
-#define REG_SUB_NUMBER 0x00000020 /* internal no-op */
-#define REG_SUB_STOP 0x00000040 /* internal no-op */
-#define REG_SUB_WRITE 0x00000080 /* internal no-op */
-#define REG_SUB_LAST 0x00000100 /* last substitution option */
-#define REG_SUB_FULL 0x00000200 /* fully delimited */
-#define REG_SUB_USER 0x00001000 /* first user flag bit */
-
-/* regex error codes */
-
-#define REG_ENOSYS (-1) /* not supported */
-#define REG_NOMATCH 1 /* regexec didn't match */
-#define REG_BADPAT 2 /* invalid regular expression */
-#define REG_ECOLLATE 3 /* invalid collation element */
-#define REG_ECTYPE 4 /* invalid character class */
-#define REG_EESCAPE 5 /* trailing \ in pattern */
-#define REG_ESUBREG 6 /* invalid \digit backreference */
-#define REG_EBRACK 7 /* [...] imbalance */
-#define REG_EPAREN 8 /* \(...\) or (...) imbalance */
-#define REG_EBRACE 9 /* \{...\} or {...} imbalance */
-#define REG_BADBR 10 /* invalid {...} digits */
-#define REG_ERANGE 11 /* invalid [...] range endpoint */
-#define REG_ESPACE 12 /* out of space */
-#define REG_BADRPT 13 /* unary op not preceded by re */
-#define REG_ENULL 14 /* empty subexpr in pattern */
-#define REG_ECOUNT 15 /* re component count overflow */
-#define REG_BADESC 16 /* invalid \char escape */
-#define REG_VERSIONID 17 /* version id (pseudo error) */
-#define REG_EFLAGS 18 /* flags conflict */
-#define REG_EDELIM 19 /* invalid or omitted delimiter */
-#define REG_PANIC 20 /* unrecoverable internal error */
-
-struct regex_s; typedef struct regex_s regex_t;
-struct regdisc_s; typedef struct regdisc_s regdisc_t;
-
-typedef int (*regclass_t) __PROTO__((int));
-typedef uint32_t regflags_t;
-typedef int regoff_t;
-typedef int (*regerror_t) __PROTO__((const regex_t*, regdisc_t*, int, ...));
-typedef __V_* (*regcomp_t) __PROTO__((const regex_t*, const char*, size_t, regdisc_t*));
-typedef int (*regexec_t) __PROTO__((const regex_t*, __V_*, const char*, size_t, const char*, size_t, char**, regdisc_t*));
-typedef __V_* (*regresize_t) __PROTO__((__V_*, __V_*, size_t));
-typedef int (*regrecord_t) __PROTO__((__V_*, const char*, size_t));
-
-typedef struct regmatch_s
-{
- regoff_t rm_so; /* offset of start */
- regoff_t rm_eo; /* offset of end */
-} regmatch_t;
-
-typedef struct regsub_s
-{
- regflags_t re_flags; /* regsubcomp() flags */
- char* re_buf; /* regsubexec() output buffer */
- size_t re_len; /* re_buf length */
- int re_min; /* regsubcomp() min matches */
-#ifdef _REG_SUB_PRIVATE_
- _REG_SUB_PRIVATE_
-#endif
-} regsub_t;
-
-struct regdisc_s
-{
- unsigned long re_version; /* discipline version */
- regflags_t re_flags; /* discipline flags */
- regerror_t re_errorf; /* error function */
- int re_errorlevel; /* errorf level */
- regresize_t re_resizef; /* alloc/free function */
- __V_* re_resizehandle;/* resizef handle */
- regcomp_t re_compf; /* (?{...}) compile function */
- regexec_t re_execf; /* (?{...}) execute function */
- unsigned char* re_map; /* external to native ccode map */
-};
-
-typedef struct regstat_s
-{
- regflags_t re_flags; /* REG_LEFT|REG_RIGHT */
- ssize_t re_min; /* min anchored match length */
- ssize_t re_max; /* max anchored match length */
- ssize_t re_record; /* regrexec() match length */
-} regstat_t;
-
-struct regex_s
-{
- size_t re_nsub; /* number of subexpressions */
- struct reglib_s*re_info; /* library private info */
- size_t re_npat; /* number of pattern chars used */
- regdisc_t* re_disc; /* REG_DISCIPLINE discipline */
- regsub_t* re_sub; /* regsubcomp() data */
-};
-
-#define reginit(disc) (memset(disc,0,sizeof(*(disc))),(disc)->re_version=REG_VERSION)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int regcomp __PROTO__((regex_t*, const char*, regflags_t));
-extern __MANGLE__ size_t regerror __PROTO__((int, const regex_t*, char*, size_t));
-extern __MANGLE__ int regexec __PROTO__((const regex_t*, const char*, size_t, regmatch_t*, regflags_t));
-extern __MANGLE__ void regfree __PROTO__((regex_t*));
-
-/* nonstandard hooks */
-
-#define _REG_cache 1 /* have regcache() */
-#define _REG_class 1 /* have regclass() */
-#define _REG_collate 1 /* have regcollate(), regclass() */
-#define _REG_comb 1 /* have regcomb() */
-#define _REG_decomp 1 /* have regdecomp() */
-#define _REG_dup 1 /* have regdup() */
-#define _REG_fatal 1 /* have regfatal(), regfatalpat() */
-#define _REG_ncomp 1 /* have regncomp() */
-#define _REG_nexec 1 /* have regnexec() */
-#define _REG_rexec 1 /* have regrexec(), regrecord() */
-#define _REG_stat 1 /* have regstat() */
-#define _REG_subcomp 1 /* have regsubcomp(), regsubexec() */
-
-extern __MANGLE__ regclass_t regclass __PROTO__((const char*, char**));
-extern __MANGLE__ int regaddclass __PROTO__((const char*, regclass_t));
-extern __MANGLE__ int regcollate __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ int regcomb __PROTO__((regex_t*, regex_t*));
-extern __MANGLE__ size_t regdecomp __PROTO__((regex_t*, regflags_t, char*, size_t));
-extern __MANGLE__ int regdup __PROTO__((regex_t*, regex_t*));
-extern __MANGLE__ int regncomp __PROTO__((regex_t*, const char*, size_t, regflags_t));
-extern __MANGLE__ int regnexec __PROTO__((const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t));
-extern __MANGLE__ void regfatal __PROTO__((regex_t*, int, int));
-extern __MANGLE__ void regfatalpat __PROTO__((regex_t*, int, int, const char*));
-extern __MANGLE__ int regrecord __PROTO__((const regex_t*));
-extern __MANGLE__ int regrexec __PROTO__((const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t, int, __V_*, regrecord_t));
-extern __MANGLE__ regstat_t* regstat __PROTO__((const regex_t*));
-
-extern __MANGLE__ regex_t* regcache __PROTO__((const char*, regflags_t, int*));
-
-extern __MANGLE__ int regsubcomp __PROTO__((regex_t*, const char*, const regflags_t*, int, regflags_t));
-extern __MANGLE__ int regsubexec __PROTO__((const regex_t*, const char*, size_t, regmatch_t*));
-extern __MANGLE__ int regsubflags __PROTO__((regex_t*, const char*, char**, int, const regflags_t*, int*, regflags_t*));
-extern __MANGLE__ void regsubfree __PROTO__((regex_t*));
-
-/* obsolete hooks */
-
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-
-extern __MANGLE__ void regalloc __PROTO__((__V_*, regresize_t, regflags_t));
-extern __MANGLE__ int regsub __PROTO__((const regex_t*, struct _sfio_s*, const char*, const char*, size_t, regmatch_t*, regflags_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/regexp.h b/usr/src/lib/libast/amd64/include/ast/regexp.h
deleted file mode 100644
index ea2df629b5..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/regexp.h
+++ /dev/null
@@ -1,139 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * regexp interface and partial implementation
- * what a novel approach
- * don't do it again
- *
- * OBSOLETE: use <regex.h>
- */
-
-#ifndef _REGEXP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _REGEXP_H
-
-#define NBRA 9
-
-typedef struct
-{
- char* re_braslist[NBRA];
- char* re_braelist[NBRA];
- char* re_loc1;
- char* re_loc2;
- char* re_locs;
- int re_circf;
- int re_nbra;
- int re_nodelim;
- int re_sed;
-} regexp_t;
-
-#define braslist _re_info.re_braslist
-#define braelist _re_info.re_braelist
-#define circf _re_info.re_circf
-#define loc1 _re_info.re_loc1
-#define loc2 _re_info.re_loc2
-#define locs _re_info.re_locs
-#define nbra _re_info.re_nbra
-#define nodelim _re_info.re_nodelim
-#define sed _re_info.re_sed
-
-#define advance(a,b) _re_exec(&_re_info,a,b,1)
-#define compile(a,b,c,d) _re_read(&_re_info,a,b,c,d)
-#define step(a,b) _re_exec(&_re_info,a,b,0)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _re_comp __PROTO__((regexp_t*, const char*, char*, unsigned int));
-extern __MANGLE__ int _re_exec __PROTO__((regexp_t*, const char*, const char*, int));
-extern __MANGLE__ char* _re_putc __PROTO__((int));
-extern __MANGLE__ char* _re_read __PROTO__((regexp_t*, const char*, char*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#ifndef _REGEXP_DECLARE
-
-regexp_t _re_info;
-
-char*
-_re_read __PARAM__((register regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof), (re, instring, ep, endbuf, seof)) __OTORP__(register regexp_t* re; const char* instring; char* ep; const char* endbuf; int seof;){
- register int c;
-
- static const char* prev;
-
-#ifdef INIT
- INIT;
-#endif
-
- re->re_nodelim = 0;
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- {
- if (c != seof)
- {
- UNGETC(c);
- re->re_nodelim = 1;
- }
- if (!re->re_sed && !prev)
- { ERROR(41); }
- RETURN((char*)endbuf);
- }
- UNGETC(c);
- prev = 0;
- for (;;)
- {
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- {
- if (re->re_sed)
- { ERROR(36); }
- UNGETC(c);
- re->re_nodelim = 1;
- break;
- }
- if (c == '\\')
- {
- _re_putc(c);
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- { ERROR(36); }
- }
- _re_putc(c);
- }
- if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
- { ERROR(c); }
- prev = endbuf;
- RETURN((char*)prev);
-}
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/sfdisc.h b/usr/src/lib/libast/amd64/include/ast/sfdisc.h
deleted file mode 100644
index bc6e00b335..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/sfdisc.h
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * sfio discipline interface definitions
- */
-
-#ifndef _SFDISC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFDISC_H
-
-#include <ast.h>
-
-#define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#define SFSK_DISCARD SFDCEVENT('S','K',1)
-
-/*
- * %(...) printf support
- */
-
-typedef int (*Sf_key_lookup_t) __PROTO__((__V_*, Sffmt_t*, const char*, char**, Sflong_t*));
-typedef char* (*Sf_key_convert_t) __PROTO__((__V_*, Sffmt_t*, const char*, char*, Sflong_t));
-
-extern __MANGLE__ int sfkeyprintf __PROTO__((Sfio_t*, __V_*, const char*, Sf_key_lookup_t, Sf_key_convert_t));
-#define sfkeyprintf sfkeyprintf_20000308 /* Sffmt_t* callback args */
-extern __MANGLE__ int sfkeyprintf __PROTO__((Sfio_t*, __V_*, const char*, Sf_key_lookup_t, Sf_key_convert_t));
-
-/*
- * pure sfio read and/or write disciplines
- */
-
-extern __MANGLE__ int sfdcdio __PROTO__((Sfio_t*, size_t));
-extern __MANGLE__ int sfdcdos __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdcfilter __PROTO__((Sfio_t*, const char*));
-extern __MANGLE__ int sfdcmore __PROTO__((Sfio_t*, const char*, int, int));
-extern __MANGLE__ int sfdcprefix __PROTO__((Sfio_t*, const char*));
-extern __MANGLE__ int sfdcseekable __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdcslow __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdctee __PROTO__((Sfio_t*, Sfio_t*));
-extern __MANGLE__ int sfdcunion __PROTO__((Sfio_t*, Sfio_t**, int));
-
-extern __MANGLE__ Sfio_t* sfdcsubstream __PROTO__((Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/sfio.h b/usr/src/lib/libast/amd64/include/ast/sfio.h
deleted file mode 100644
index da6ebfd9f2..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/sfio.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_H
-#define _SFIO_H 1
-
-#define SFIO_VERSION 20080717L
-
-/* Public header file for the sfio library
-**
-** Written by Kiem-Phong Vo
-*/
-
-typedef struct _sfio_s Sfio_t;
-typedef struct _sfdisc_s Sfdisc_t;
-
-#if defined(_AST_STD_H) || defined(_PACKAGE_ast) && defined(_SFIO_PRIVATE)
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif /* _PACKAGE_ast */
-
-/* Sfoff_t should be large enough for largest file address */
-#define Sfoff_t intmax_t
-#define Sflong_t intmax_t
-#define Sfulong_t uintmax_t
-#define Sfdouble_t _ast_fltmax_t
-
-typedef ssize_t (*Sfread_f)_ARG_((Sfio_t*, Void_t*, size_t, Sfdisc_t*));
-typedef ssize_t (*Sfwrite_f)_ARG_((Sfio_t*, const Void_t*, size_t, Sfdisc_t*));
-typedef Sfoff_t (*Sfseek_f)_ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*));
-typedef int (*Sfexcept_f)_ARG_((Sfio_t*, int, Void_t*, Sfdisc_t*));
-typedef int (*Sfwalk_f)_ARG_((Sfio_t*, Void_t*));
-
-/* discipline structure */
-struct _sfdisc_s
-{ Sfread_f readf; /* read function */
- Sfwrite_f writef; /* write function */
- Sfseek_f seekf; /* seek function */
- Sfexcept_f exceptf; /* to handle exceptions */
- Sfdisc_t* disc; /* the continuing discipline */
-};
-
-#include <sfio_s.h>
-
-/* formatting environment */
-typedef struct _sffmt_s Sffmt_t;
-typedef int (*Sffmtext_f)_ARG_((Sfio_t*, Void_t*, Sffmt_t*));
-typedef int (*Sffmtevent_f)_ARG_((Sfio_t*, int, Void_t*, Sffmt_t*));
-struct _sffmt_s
-{ long version;/* version of this structure */
- Sffmtext_f extf; /* function to process arguments */
- Sffmtevent_f eventf; /* process events */
-
- char* form; /* format string to stack */
- va_list args; /* corresponding arg list */
-
- int fmt; /* format character */
- ssize_t size; /* object size */
- int flags; /* formatting flags */
- int width; /* width of field */
- int precis; /* precision required */
- int base; /* conversion base */
-
- char* t_str; /* type string */
- ssize_t n_str; /* length of t_str */
-
- Void_t* mbs; /* multibyte state for format string */
-
- Void_t* none; /* unused for now */
-};
-#define sffmtversion(fe,type) \
- ((type) ? ((fe)->version = SFIO_VERSION) : (fe)->version)
-
-#define SFFMT_SSHORT 000000010 /* 'hh' flag, char */
-#define SFFMT_TFLAG 000000020 /* 't' flag, ptrdiff_t */
-#define SFFMT_ZFLAG 000000040 /* 'z' flag, size_t */
-
-#define SFFMT_LEFT 000000100 /* left-justification */
-#define SFFMT_SIGN 000000200 /* must have a sign */
-#define SFFMT_BLANK 000000400 /* if not signed, prepend a blank */
-#define SFFMT_ZERO 000001000 /* zero-padding on the left */
-#define SFFMT_ALTER 000002000 /* alternate formatting */
-#define SFFMT_THOUSAND 000004000 /* thousand grouping */
-#define SFFMT_SKIP 000010000 /* skip assignment in scanf() */
-#define SFFMT_SHORT 000020000 /* 'h' flag */
-#define SFFMT_LONG 000040000 /* 'l' flag */
-#define SFFMT_LLONG 000100000 /* 'll' flag */
-#define SFFMT_LDOUBLE 000200000 /* 'L' flag */
-#define SFFMT_VALUE 000400000 /* value is returned */
-#define SFFMT_ARGPOS 001000000 /* getting arg for $ patterns */
-#define SFFMT_IFLAG 002000000 /* 'I' flag */
-#define SFFMT_JFLAG 004000000 /* 'j' flag, intmax_t */
-#define SFFMT_CENTER 010000000 /* '=' flag, center justification */
-#define SFFMT_SET 017777770 /* flags settable on calling extf */
-
-/* for sfmutex() call */
-#define SFMTX_LOCK 0 /* up mutex count */
-#define SFMTX_TRYLOCK 1 /* try to up mutex count */
-#define SFMTX_UNLOCK 2 /* down mutex count */
-#define SFMTX_CLRLOCK 3 /* clear mutex count */
-
-/* various constants */
-#ifndef NULL
-#define NULL 0
-#endif
-#ifndef EOF
-#define EOF (-1)
-#endif
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-/* bits for various types of files */
-#define SF_READ 0000001 /* open for reading */
-#define SF_WRITE 0000002 /* open for writing */
-#define SF_STRING 0000004 /* a string stream */
-#define SF_APPENDWR 0000010 /* file is in append mode only */
-#define SF_MALLOC 0000020 /* buffer is malloc-ed */
-#define SF_LINE 0000040 /* line buffering */
-#define SF_SHARE 0000100 /* stream with shared file descriptor */
-#define SF_EOF 0000200 /* eof was detected */
-#define SF_ERROR 0000400 /* an error happened */
-#define SF_STATIC 0001000 /* a stream that cannot be freed */
-#define SF_IOCHECK 0002000 /* call exceptf before doing IO */
-#define SF_PUBLIC 0004000 /* SF_SHARE and follow physical seek */
-#define SF_MTSAFE 0010000 /* need thread safety */
-#define SF_WHOLE 0020000 /* preserve wholeness of sfwrite/sfputr */
-#define SF_IOINTR 0040000 /* return on interrupts */
-#define SF_WCWIDTH 0100000 /* wcwidth display stream */
-
-#define SF_FLAGS 0177177 /* PUBLIC FLAGS PASSABLE TO SFNEW() */
-#define SF_SETS 0177163 /* flags passable to sfset() */
-
-#ifndef _SF_NO_OBSOLETE
-#define SF_BUFCONST 0400000 /* unused flag - for compatibility only */
-#endif
-
-/* for sfgetr/sfreserve to hold a record */
-#define SF_LOCKR 0000010 /* lock record, stop access to stream */
-#define SF_LASTR 0000020 /* get the last incomplete record */
-
-/* exception events: SF_NEW(0), SF_READ(1), SF_WRITE(2) and the below */
-#define SF_SEEK 3 /* seek error */
-#define SF_CLOSING 4 /* when stream is about to be closed */
-#define SF_DPUSH 5 /* when discipline is being pushed */
-#define SF_DPOP 6 /* when discipline is being popped */
-#define SF_DPOLL 7 /* see if stream is ready for I/O */
-#define SF_DBUFFER 8 /* buffer not empty during push or pop */
-#define SF_SYNC 9 /* announcing start/end synchronization */
-#define SF_PURGE 10 /* a sfpurge() call was issued */
-#define SF_FINAL 11 /* closing is done except stream free */
-#define SF_READY 12 /* a polled stream is ready */
-#define SF_LOCKED 13 /* stream is in a locked state */
-#define SF_ATEXIT 14 /* process is exiting */
-#define SF_EVENT 100 /* start of user-defined events */
-
-/* for stack and disciplines */
-#define SF_POPSTACK ((Sfio_t*)0) /* pop the stream stack */
-#define SF_POPDISC ((Sfdisc_t*)0) /* pop the discipline stack */
-
-/* for the notify function and discipline exception */
-#define SF_NEW 0 /* new stream */
-#define SF_SETFD (-1) /* about to set the file descriptor */
-#define SF_MTACCESS (-2) /* starting a multi-threaded stream */
-
-#define SF_BUFSIZE 8192 /* default buffer size */
-#define SF_UNBOUND (-1) /* unbounded buffer size */
-
-/* namespace incursion workarounds -- migrate to the new names */
-#if !_mac_SF_APPEND
-#define SF_APPEND SF_APPENDWR /* BSDI sys/stat.h */
-#endif
-#if !_mac_SF_CLOSE
-#define SF_CLOSE SF_CLOSING /* AIX sys/socket.h */
-#endif
-
-_BEGIN_EXTERNS_
-
-/* standard in/out/err streams */
-
-#if _BLD_sfio && defined(__EXPORT__)
-#define extern extern __EXPORT__
-#endif
-#if !_BLD_sfio && defined(__IMPORT__)
-#define extern extern __IMPORT__
-#endif
-
-extern ssize_t _Sfi;
-extern ssize_t _Sfmaxr;
-
-extern Sfio_t* sfstdin;
-extern Sfio_t* sfstdout;
-extern Sfio_t* sfstderr;
-
-#if _UWIN
-#undef extern
-#endif
-
-extern Sfio_t _Sfstdin;
-extern Sfio_t _Sfstdout;
-extern Sfio_t _Sfstderr;
-
-#undef extern
-
-#if _BLD_sfio && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Sfio_t* sfnew _ARG_((Sfio_t*, Void_t*, size_t, int, int));
-extern Sfio_t* sfopen _ARG_((Sfio_t*, const char*, const char*));
-extern Sfio_t* sfpopen _ARG_((Sfio_t*, const char*, const char*));
-extern Sfio_t* sfstack _ARG_((Sfio_t*, Sfio_t*));
-extern Sfio_t* sfswap _ARG_((Sfio_t*, Sfio_t*));
-extern Sfio_t* sftmp _ARG_((size_t));
-extern int sfwalk _ARG_((Sfwalk_f, Void_t*, int));
-extern int sfpurge _ARG_((Sfio_t*));
-extern int sfpoll _ARG_((Sfio_t**, int, int));
-extern Void_t* sfreserve _ARG_((Sfio_t*, ssize_t, int));
-extern int sfresize _ARG_((Sfio_t*, Sfoff_t));
-extern int sfsync _ARG_((Sfio_t*));
-extern int sfclrlock _ARG_((Sfio_t*));
-extern Void_t* sfsetbuf _ARG_((Sfio_t*, Void_t*, size_t));
-extern Sfdisc_t* sfdisc _ARG_((Sfio_t*,Sfdisc_t*));
-extern int sfraise _ARG_((Sfio_t*, int, Void_t*));
-extern int sfnotify _ARG_((void(*)(Sfio_t*, int, void*)));
-extern int sfset _ARG_((Sfio_t*, int, int));
-extern int sfsetfd _ARG_((Sfio_t*, int));
-extern Sfio_t* sfpool _ARG_((Sfio_t*, Sfio_t*, int));
-extern ssize_t sfread _ARG_((Sfio_t*, Void_t*, size_t));
-extern ssize_t sfwrite _ARG_((Sfio_t*, const Void_t*, size_t));
-extern Sfoff_t sfmove _ARG_((Sfio_t*, Sfio_t*, Sfoff_t, int));
-extern int sfclose _ARG_((Sfio_t*));
-extern Sfoff_t sftell _ARG_((Sfio_t*));
-extern Sfoff_t sfseek _ARG_((Sfio_t*, Sfoff_t, int));
-extern ssize_t sfputr _ARG_((Sfio_t*, const char*, int));
-extern char* sfgetr _ARG_((Sfio_t*, int, int));
-extern ssize_t sfnputc _ARG_((Sfio_t*, int, size_t));
-extern int sfungetc _ARG_((Sfio_t*, int));
-extern int sfprintf _ARG_((Sfio_t*, const char*, ...));
-extern char* sfprints _ARG_((const char*, ...));
-extern ssize_t sfsprintf _ARG_((char*, size_t, const char*, ...));
-extern ssize_t sfvsprintf _ARG_((char*, size_t, const char*, va_list));
-extern int sfvprintf _ARG_((Sfio_t*, const char*, va_list));
-extern int sfscanf _ARG_((Sfio_t*, const char*, ...));
-extern int sfsscanf _ARG_((const char*, const char*, ...));
-extern int sfvsscanf _ARG_((const char*, const char*, va_list));
-extern int sfvscanf _ARG_((Sfio_t*, const char*, va_list));
-
-/* mutex locking for thread-safety */
-extern int sfmutex _ARG_((Sfio_t*, int));
-
-/* io functions with discipline continuation */
-extern ssize_t sfrd _ARG_((Sfio_t*, Void_t*, size_t, Sfdisc_t*));
-extern ssize_t sfwr _ARG_((Sfio_t*, const Void_t*, size_t, Sfdisc_t*));
-extern Sfoff_t sfsk _ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*));
-extern ssize_t sfpkrd _ARG_((int, Void_t*, size_t, int, long, int));
-
-/* portable handling of primitive types */
-extern int sfdlen _ARG_((Sfdouble_t));
-extern int sfllen _ARG_((Sflong_t));
-extern int sfulen _ARG_((Sfulong_t));
-
-extern int sfputd _ARG_((Sfio_t*, Sfdouble_t));
-extern int sfputl _ARG_((Sfio_t*, Sflong_t));
-extern int sfputu _ARG_((Sfio_t*, Sfulong_t));
-extern int sfputm _ARG_((Sfio_t*, Sfulong_t, Sfulong_t));
-extern int sfputc _ARG_((Sfio_t*, int));
-
-extern Sfdouble_t sfgetd _ARG_((Sfio_t*));
-extern Sflong_t sfgetl _ARG_((Sfio_t*));
-extern Sfulong_t sfgetu _ARG_((Sfio_t*));
-extern Sfulong_t sfgetm _ARG_((Sfio_t*, Sfulong_t));
-extern int sfgetc _ARG_((Sfio_t*));
-
-extern int _sfputd _ARG_((Sfio_t*, Sfdouble_t));
-extern int _sfputl _ARG_((Sfio_t*, Sflong_t));
-extern int _sfputu _ARG_((Sfio_t*, Sfulong_t));
-extern int _sfputm _ARG_((Sfio_t*, Sfulong_t, Sfulong_t));
-extern int _sfflsbuf _ARG_((Sfio_t*, int));
-
-extern int _sffilbuf _ARG_((Sfio_t*, int));
-
-extern int _sfdlen _ARG_((Sfdouble_t));
-extern int _sfllen _ARG_((Sflong_t));
-extern int _sfulen _ARG_((Sfulong_t));
-
-/* miscellaneous function analogues of fast in-line functions */
-extern Sfoff_t sfsize _ARG_((Sfio_t*));
-extern int sfclrerr _ARG_((Sfio_t*));
-extern int sfeof _ARG_((Sfio_t*));
-extern int sferror _ARG_((Sfio_t*));
-extern int sffileno _ARG_((Sfio_t*));
-extern int sfstacked _ARG_((Sfio_t*));
-extern ssize_t sfvalue _ARG_((Sfio_t*));
-extern ssize_t sfslen _ARG_((void));
-extern ssize_t sfmaxr _ARG_((ssize_t, int));
-
-#undef extern
-_END_EXTERNS_
-
-/* coding long integers in a portable and compact fashion */
-#define SF_SBITS 6
-#define SF_UBITS 7
-#define SF_BBITS 8
-#define SF_SIGN (1 << SF_SBITS)
-#define SF_MORE (1 << SF_UBITS)
-#define SF_BYTE (1 << SF_BBITS)
-#define SF_U1 SF_MORE
-#define SF_U2 (SF_U1*SF_U1)
-#define SF_U3 (SF_U2*SF_U1)
-#define SF_U4 (SF_U3*SF_U1)
-
-#if __cplusplus
-#define _SF_(f) (f)
-#else
-#define _SF_(f) ((Sfio_t*)(f))
-#endif
-
-#define __sf_putd(f,v) (_sfputd(_SF_(f),(Sfdouble_t)(v)))
-#define __sf_putl(f,v) (_sfputl(_SF_(f),(Sflong_t)(v)))
-#define __sf_putu(f,v) (_sfputu(_SF_(f),(Sfulong_t)(v)))
-#define __sf_putm(f,v,m) (_sfputm(_SF_(f),(Sfulong_t)(v),(Sfulong_t)(m)))
-
-#define __sf_putc(f,c) (_SF_(f)->_next >= _SF_(f)->_endw ? \
- _sfflsbuf(_SF_(f),(int)((unsigned char)(c))) : \
- (int)(*_SF_(f)->_next++ = (unsigned char)(c)) )
-#define __sf_getc(f) (_SF_(f)->_next >= _SF_(f)->_endr ? _sffilbuf(_SF_(f),0) : \
- (int)(*_SF_(f)->_next++) )
-
-#define __sf_dlen(v) (_sfdlen((Sfdouble_t)(v)) )
-#define __sf_llen(v) (_sfllen((Sflong_t)(v)) )
-#define __sf_ulen(v) ((Sfulong_t)(v) < SF_U1 ? 1 : (Sfulong_t)(v) < SF_U2 ? 2 : \
- (Sfulong_t)(v) < SF_U3 ? 3 : (Sfulong_t)(v) < SF_U4 ? 4 : 5)
-
-#define __sf_fileno(f) (_SF_(f)->_file)
-#define __sf_eof(f) (_SF_(f)->_flags&SF_EOF)
-#define __sf_error(f) (_SF_(f)->_flags&SF_ERROR)
-#define __sf_clrerr(f) (_SF_(f)->_flags &= ~(SF_ERROR|SF_EOF))
-#define __sf_stacked(f) (_SF_(f)->_push != (Sfio_t*)0)
-#define __sf_value(f) (_SF_(f)->_val)
-#define __sf_slen() (_Sfi)
-#define __sf_maxr(n,s) ((s)?((_Sfi=_Sfmaxr),(_Sfmaxr=(n)),_Sfi):_Sfmaxr)
-
-#if defined(__INLINE__) && !_BLD_sfio
-
-__INLINE__ int sfputd(Sfio_t* f, Sfdouble_t v) { return __sf_putd(f,v); }
-__INLINE__ int sfputl(Sfio_t* f, Sflong_t v) { return __sf_putl(f,v); }
-__INLINE__ int sfputu(Sfio_t* f, Sfulong_t v) { return __sf_putu(f,v); }
-__INLINE__ int sfputm(Sfio_t* f, Sfulong_t v, Sfulong_t m)
- { return __sf_putm(f,v,m); }
-
-__INLINE__ int sfputc(Sfio_t* f, int c) { return __sf_putc(f,c); }
-__INLINE__ int sfgetc(Sfio_t* f) { return __sf_getc(f); }
-
-__INLINE__ int sfdlen(Sfdouble_t v) { return __sf_dlen(v); }
-__INLINE__ int sfllen(Sflong_t v) { return __sf_llen(v); }
-__INLINE__ int sfulen(Sfulong_t v) { return __sf_ulen(v); }
-
-__INLINE__ int sffileno(Sfio_t* f) { return __sf_fileno(f); }
-__INLINE__ int sfeof(Sfio_t* f) { return __sf_eof(f); }
-__INLINE__ int sferror(Sfio_t* f) { return __sf_error(f); }
-__INLINE__ int sfclrerr(Sfio_t* f) { return __sf_clrerr(f); }
-__INLINE__ int sfstacked(Sfio_t* f) { return __sf_stacked(f); }
-__INLINE__ ssize_t sfvalue(Sfio_t* f) { return __sf_value(f); }
-__INLINE__ ssize_t sfslen() { return __sf_slen(); }
-__INLINE__ ssize_t sfmaxr(ssize_t n, int s) { return __sf_maxr(n,s); }
-
-#else
-
-#define sfputd(f,v) ( __sf_putd((f),(v)) )
-#define sfputl(f,v) ( __sf_putl((f),(v)) )
-#define sfputu(f,v) ( __sf_putu((f),(v)) )
-#define sfputm(f,v,m) ( __sf_putm((f),(v),(m)) )
-
-#define sfputc(f,c) ( __sf_putc((f),(c)) )
-#define sfgetc(f) ( __sf_getc(f) )
-
-#define sfdlen(v) ( __sf_dlen(v) )
-#define sfllen(v) ( __sf_llen(v) )
-#define sfulen(v) ( __sf_ulen(v) )
-
-#define sffileno(f) ( __sf_fileno(f) )
-#define sfeof(f) ( __sf_eof(f) )
-#define sferror(f) ( __sf_error(f) )
-#define sfclrerr(f) ( __sf_clrerr(f) )
-#define sfstacked(f) ( __sf_stacked(f) )
-#define sfvalue(f) ( __sf_value(f) )
-#define sfslen() ( __sf_slen() )
-#define sfmaxr(n,s) ( __sf_maxr(n,s) )
-
-#endif /*__INLINE__*/
-
-#ifndef _SFSTR_H /* GSF's string manipulation stuff */
-#define _SFSTR_H 1
-
-#define sfstropen() sfnew(0, 0, -1, -1, SF_READ|SF_WRITE|SF_STRING)
-#define sfstrclose(f) sfclose(f)
-
-#define sfstrseek(f,p,m) \
- ( (m) == SEEK_SET ? \
- (((p) < 0 || (p) > (f)->_size) ? (char*)0 : \
- (char*)((f)->_next = (f)->_data+(p)) ) \
- : (m) == SEEK_CUR ? \
- ((f)->_next += (p), \
- (((f)->_next < (f)->_data || (f)->_next > (f)->_data+(f)->_size) ? \
- ((f)->_next -= (p), (char*)0) : (char*)(f)->_next ) ) \
- : (m) == SEEK_END ? \
- ( ((p) > 0 || (f)->_size+(p) < 0) ? (char*)0 : \
- (char*)((f)->_next = (f)->_data+(f)->_size+(p)) ) \
- : (char*)0 \
- )
-
-#define sfstrsize(f) ((f)->_size)
-#define sfstrtell(f) ((f)->_next - (f)->_data)
-#define sfstrpend(f) ((f)->_size - sfstrtell())
-#define sfstrbase(f) ((char*)(f)->_data)
-
-#define sfstruse(f) \
- (sfputc((f),0) < 0 ? (char*)0 : (char*)((f)->_next = (f)->_data) \
- )
-
-#define sfstrrsrv(f,n) \
- (sfreserve((f),(n),SF_WRITE|SF_LOCKR), sfwrite((f),(f)->_next,0), \
- ((f)->_next+(n) <= (f)->_data+(f)->_size ? (char*)(f)->_next : (char*)0) \
- )
-
-#define sfstrbuf(f,b,n,m) \
- (sfsetbuf((f),(b),(n)), ((f)->_flags |= (m) ? SF_MALLOC : 0), \
- ((f)->_data == (unsigned char*)(b) ? 0 : -1) \
- )
-
-#endif /* _SFSTR_H */
-
-#endif /* _SFIO_H */
diff --git a/usr/src/lib/libast/amd64/include/ast/sfio_s.h b/usr/src/lib/libast/amd64/include/ast/sfio_s.h
deleted file mode 100644
index 7f7483cc79..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/sfio_s.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_S_H
-#define _SFIO_S_H 1
-
-/*
- * sfio file structure used by sfio and the stdio source compatibility library
- */
-
-#if !defined(_SFHDR_H) && defined(_SFIO_H) && SFIO_VERSION < 20020214L
-#define _data data
-#define _endb endb
-#define _next next
-#endif
-
-struct _sfio_s
-{ unsigned char* _next; /* next position to read/write from */
- unsigned char* _endw; /* end of write buffer */
- unsigned char* _endr; /* end of read buffer */
- unsigned char* _endb; /* end of buffer */
- struct _sfio_s* _push; /* the stream that was pushed on */
- unsigned short _flags; /* type of stream */
- short _file; /* file descriptor */
- unsigned char* _data; /* base of data buffer */
- ssize_t _size; /* buffer size */
- ssize_t _val; /* values or string lengths */
-#ifdef _SFIO_PRIVATE
- _SFIO_PRIVATE
-#endif
-};
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/sfio_t.h b/usr/src/lib/libast/amd64/include/ast/sfio_t.h
deleted file mode 100644
index 4240316aef..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/sfio_t.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_T_H
-#define _SFIO_T_H 1
-
-/* This header file is for library writers who need to know certain
-** internal info concerning the full Sfio_t structure. Including this
-** file means that you agree to track closely with sfio development
-** in case its internal architecture is changed.
-**
-** Written by Kiem-Phong Vo
-*/
-
-/* the parts of Sfio_t private to sfio functions */
-#define _SFIO_PRIVATE \
- Sfoff_t extent; /* current file size */ \
- Sfoff_t here; /* current physical location */ \
- unsigned char getr; /* the last sfgetr separator */ \
- unsigned char tiny[1];/* for unbuffered read stream */ \
- unsigned short bits; /* private flags */ \
- unsigned int mode; /* current io mode */ \
- struct _sfdisc_s* disc; /* discipline */ \
- struct _sfpool_s* pool; /* the pool containing this */ \
- struct _sfrsrv_s* rsrv; /* reserved buffer */ \
- struct _sfproc_s* proc; /* coprocess id, etc. */ \
- Void_t* mutex; /* mutex for thread-safety */ \
- Void_t* stdio; /* stdio FILE if any */ \
- Sfoff_t lpos; /* last seek position */ \
- size_t iosz; /* preferred size for I/O */ \
- size_t blksz; /* preferred block size */ \
- Void_t* fill[1];/* modest expansion */
-
-#include "sfio.h"
-
-/* mode bit to indicate that the structure hasn't been initialized */
-#define SF_INIT 0000004
-#define SF_DCDOWN 00010000
-
-/* short-hand for common stream types */
-#define SF_RDWR (SF_READ|SF_WRITE)
-#define SF_RDSTR (SF_READ|SF_STRING)
-#define SF_WRSTR (SF_WRITE|SF_STRING)
-#define SF_RDWRSTR (SF_RDWR|SF_STRING)
-
-/* for static initialization of an Sfio_t structure */
-#define SFNEW(data,size,file,type,disc,mutex) \
- { (unsigned char*)(data), /* next */ \
- (unsigned char*)(data), /* endw */ \
- (unsigned char*)(data), /* endr */ \
- (unsigned char*)(data), /* endb */ \
- (Sfio_t*)0, /* push */ \
- (unsigned short)((type)&SF_FLAGS), /* flags */ \
- (short)(file), /* file */ \
- (unsigned char*)(data), /* data */ \
- (ssize_t)(size), /* size */ \
- (ssize_t)(-1), /* val */ \
- (Sfoff_t)0, /* extent */ \
- (Sfoff_t)0, /* here */ \
- 0, /* getr */ \
- {0}, /* tiny */ \
- 0, /* bits */ \
- (unsigned int)(((type)&(SF_RDWR))|SF_INIT), /* mode */ \
- (struct _sfdisc_s*)(disc), /* disc */ \
- (struct _sfpool_s*)0, /* pool */ \
- (struct _sfrsrv_s*)0, /* rsrv */ \
- (struct _sfproc_s*)0, /* proc */ \
- (mutex), /* mutex */ \
- (Void_t*)0, /* stdio */ \
- (Sfoff_t)0, /* lpos */ \
- (size_t)0 /* iosz */ \
- }
-
-/* function to clear an Sfio_t structure */
-#define SFCLEAR(f,mtx) \
- ( (f)->next = (unsigned char*)0, /* next */ \
- (f)->endw = (unsigned char*)0, /* endw */ \
- (f)->endr = (unsigned char*)0, /* endr */ \
- (f)->endb = (unsigned char*)0, /* endb */ \
- (f)->push = (Sfio_t*)0, /* push */ \
- (f)->flags = (unsigned short)0, /* flags */ \
- (f)->file = -1, /* file */ \
- (f)->data = (unsigned char*)0, /* data */ \
- (f)->size = (ssize_t)(-1), /* size */ \
- (f)->val = (ssize_t)(-1), /* val */ \
- (f)->extent = (Sfoff_t)(-1), /* extent */ \
- (f)->here = (Sfoff_t)0, /* here */ \
- (f)->getr = 0, /* getr */ \
- (f)->tiny[0] = 0, /* tiny */ \
- (f)->bits = 0, /* bits */ \
- (f)->mode = 0, /* mode */ \
- (f)->disc = (struct _sfdisc_s*)0, /* disc */ \
- (f)->pool = (struct _sfpool_s*)0, /* pool */ \
- (f)->rsrv = (struct _sfrsrv_s*)0, /* rsrv */ \
- (f)->proc = (struct _sfproc_s*)0, /* proc */ \
- (f)->mutex = (mtx), /* mutex */ \
- (f)->stdio = (Void_t*)0, /* stdio */ \
- (f)->lpos = (Sfoff_t)0, /* lpos */ \
- (f)->iosz = (size_t)0 /* iosz */ \
- )
-
-/* expose next stream inside discipline function; state saved in int f */
-#define SFDCNEXT(sp,f) (((f)=(sp)->bits&SF_DCDOWN),(sp)->bits|=SF_DCDOWN)
-
-/* restore SFDCNEXT() state from int f */
-#define SFDCPREV(sp,f) ((f)?(0):((sp)->bits&=~SF_DCDOWN))
-
-#endif /* _SFIO_T_H */
diff --git a/usr/src/lib/libast/amd64/include/ast/shcmd.h b/usr/src/lib/libast/amd64/include/ast/shcmd.h
deleted file mode 100644
index 2b7a3ce486..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/shcmd.h
+++ /dev/null
@@ -1,104 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * ksh builtin command api
- */
-
-#ifndef _SHCMD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SHCMD_H 1
-
-#ifndef SH_VERSION
-# define Shell_t void
-#endif
-#ifndef NV_DEFAULT
-# define Namval_t void
-#endif
-#ifndef ERROR_NOTIFY
-# define ERROR_NOTIFY 1
-#endif
-
-typedef int (*Shbltin_f) __PROTO__((int, char**, __V_*));
-
-#undef Shbltin_t
-typedef struct Shbltin_s
-{
- Shell_t *shp;
- __V_ *ptr;
- int version;
- int (*shrun) __PROTO__((int, char**));
- int (*shtrap) __PROTO__((const char*, int));
- void (*shexit) __PROTO__((int));
- Namval_t *(*shbltin) __PROTO__((const char*, Shbltin_f, __V_*));
- unsigned char notify;
- unsigned char sigset;
- unsigned char nosfio;
- Namval_t *bnode;
- Namval_t *vnode;
- char *data;
- int flags;
- char *(*shgetenv) __PROTO__((const char*));
- char *(*shsetenv) __PROTO__((const char*));
- int invariant;
-} Shbltin_t;
-
-#if defined(SH_VERSION) || defined(_SH_PRIVATE)
-# undef Shell_t
-# undef Namval_t
-#else
-# define sh_context(c) ((Shbltin_t*)(c))
-# define sh_run(c, ac, av) ((c)?(*sh_context(c)->shrun)(ac,av):-1)
-# define sh_system(c,str) ((c)?(*sh_context(c)->shtrap)(str,0):system(str))
-# define sh_exit(c,n) ((c)?(*sh_context(c)->shexit)(n):exit(n))
-# define sh_checksig(c) ((c) && sh_context(c)->sigset)
-# if defined(SFIO_VERSION) || defined(_AST_H)
-# define LIB_INIT(c)
-# else
-# define LIB_INIT(c) ((c) && (sh_context(c)->nosfio = 1))
-# endif
-# ifndef _CMD_H
-# define cmdinit(ac,av,c,cat,flg) do { if((ac)<=0) return(0); \
- (sh_context(c)->notify = ((flg)&ERROR_NOTIFY)?1:0);} while(0)
-# endif
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int astintercept __PROTO__((Shbltin_t*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/sig.h b/usr/src/lib/libast/amd64/include/ast/sig.h
deleted file mode 100644
index ba9a0d2615..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/sig.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
-#ifndef _def_sig_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_sig_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define sig_info _sig_info_
-
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide kill killpg
-#else
-#define kill ______kill
-#define killpg ______killpg
-#endif
-#include <signal.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide kill killpg
-#else
-#undef kill
-#undef killpg
-#endif
-#ifndef sigmask
-#define sigmask(s) (1<<((s)-1))
-#endif
-typedef void (*Sig_handler_t) __PROTO__((int));
-
-
-#define Handler_t Sig_handler_t
-
-#define SIG_REG_PENDING (-1)
-#define SIG_REG_POP 0
-#define SIG_REG_EXEC 00001
-#define SIG_REG_PROC 00002
-#define SIG_REG_TERM 00004
-#define SIG_REG_ALL 00777
-#define SIG_REG_SET 01000
-
-typedef struct
-{
- char** name;
- char** text;
- int sigmax;
-} Sig_info_t;
-
-extern __MANGLE__ int kill __PROTO__((pid_t, int));
-extern __MANGLE__ int killpg __PROTO__((pid_t, int));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sig_info_t sig_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _lib_sigflag && _npt_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-extern __MANGLE__ int sigcritical __PROTO__((int));
-extern __MANGLE__ int sigunblock __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/stack.h b/usr/src/lib/libast/amd64/include/ast/stack.h
deleted file mode 100644
index 8a7f954797..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/stack.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * homogenous stack routine definitions
- */
-
-#ifndef _STACK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STACK_H
-
-typedef struct stacktable* STACK; /* stack pointer */
-typedef struct stackposition STACKPOS; /* stack position */
-
-struct stackblock /* stack block cell */
-{
- __V_** stack; /* actual stack */
- struct stackblock* prev; /* previous block in list */
- struct stackblock* next; /* next block in list */
-};
-
-struct stackposition /* stack position */
-{
- struct stackblock* block; /* current block pointer */
- int index; /* index within current block */
-};
-
-struct stacktable /* stack information */
-{
- struct stackblock* blocks; /* stack table blocks */
- __V_* error; /* error return value */
- int size; /* size of each block */
- STACKPOS position; /* current stack position */
-};
-
-/*
- * map old names to new
- */
-
-#define mkstack stackalloc
-#define rmstack stackfree
-#define clrstack stackclear
-#define getstack stackget
-#define pushstack stackpush
-#define popstack stackpop
-#define posstack stacktell
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ STACK stackalloc __PROTO__((int, __V_*));
-extern __MANGLE__ void stackfree __PROTO__((STACK));
-extern __MANGLE__ void stackclear __PROTO__((STACK));
-extern __MANGLE__ __V_* stackget __PROTO__((STACK));
-extern __MANGLE__ int stackpush __PROTO__((STACK, __V_*));
-extern __MANGLE__ int stackpop __PROTO__((STACK));
-extern __MANGLE__ void stacktell __PROTO__((STACK, int, STACKPOS*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/stak.h b/usr/src/lib/libast/amd64/include/ast/stak.h
deleted file mode 100644
index 4396bdf02b..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/stak.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * David Korn
- * AT&T Research
- *
- * Interface definitions for a stack-like storage library
- *
- */
-
-#ifndef _STAK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STAK_H
-
-#include <stk.h>
-
-#define Stak_t Sfio_t
-#define staksp stkstd
-#define STAK_SMALL STK_SMALL
-
-#define stakptr(n) stkptr(stkstd,n)
-#define staktell() stktell(stkstd)
-#define stakputc(c) sfputc(stkstd,(c))
-#define stakwrite(b,n) sfwrite(stkstd,(b),(n))
-#define stakputs(s) (sfputr(stkstd,(s),0),--stkstd->_next)
-#define stakseek(n) stkseek(stkstd,n)
-#define stakcreate(n) stkopen(n)
-#define stakinstall(s,f) stkinstall(s,f)
-#define stakdelete(s) stkclose(s)
-#define staklink(s) stklink(s)
-#define stakalloc(n) stkalloc(stkstd,n)
-#define stakcopy(s) stkcopy(stkstd,s)
-#define stakset(c,n) stkset(stkstd,c,n)
-#define stakfreeze(n) stkfreeze(stkstd,n)
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/stk.h b/usr/src/lib/libast/amd64/include/ast/stk.h
deleted file mode 100644
index 7a226b0e98..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/stk.h
+++ /dev/null
@@ -1,92 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * David Korn
- * AT&T Research
- *
- * Interface definitions for a stack-like storage library
- *
- */
-
-#ifndef _STK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STK_H
-
-#include <sfio.h>
-
-#define _Stk_data _Stak_data
-
-#define stkstd (&_Stk_data)
-
-#define Stk_t Sfio_t
-
-#define STK_SMALL 1 /* small stkopen stack */
-#define STK_NULL 2 /* return NULL on overflow */
-
-#define stkptr(sp,n) ((char*)((sp)->_data)+(n))
-#define stktop(sp) ((char*)(sp)->_next)
-#define stktell(sp) ((sp)->_next-(sp)->_data)
-#define stkseek(sp,n) ((n)==0?(char*)((sp)->_next=(sp)->_data):_stkseek(sp,n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sfio_t _Stk_data;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Stk_t* stkopen __PROTO__((int));
-extern __MANGLE__ Stk_t* stkinstall __PROTO__((Stk_t*, char*(*)(int)));
-extern __MANGLE__ int stkclose __PROTO__((Stk_t*));
-extern __MANGLE__ int stklink __PROTO__((Stk_t*));
-extern __MANGLE__ char* stkalloc __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ char* stkcopy __PROTO__((Stk_t*,const char*));
-extern __MANGLE__ char* stkset __PROTO__((Stk_t*, char*, unsigned));
-extern __MANGLE__ char* _stkseek __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ char* stkfreeze __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ int stkon __PROTO__((Stk_t*, char *));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/swap.h b/usr/src/lib/libast/amd64/include/ast/swap.h
deleted file mode 100644
index d214ece1e6..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/swap.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * integral representation conversion support definitions
- * supports sizeof(integral_type)<=sizeof(intmax_t)
- */
-
-#ifndef _SWAP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SWAP_H
-
-#include <ast_common.h>
-
-#define int_swap _ast_intswap
-
-#define SWAP_MAX 8
-
-#define SWAPOP(n) (((n)&int_swap)^(n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ __V_* swapmem __PROTO__((int, const __V_*, __V_*, size_t));
-extern __MANGLE__ intmax_t swapget __PROTO__((int, const __V_*, int));
-extern __MANGLE__ __V_* swapput __PROTO__((int, __V_*, int, intmax_t));
-extern __MANGLE__ int swapop __PROTO__((const __V_*, const __V_*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/tar.h b/usr/src/lib/libast/amd64/include/ast/tar.h
deleted file mode 100644
index 8e8af49bb2..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/tar.h
+++ /dev/null
@@ -1,127 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Standard Archive Format
- * USTAR - Uniform Standard Tape ARchive
- */
-
-#ifndef _TAR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TAR_H
-
-#define TBLOCK 512
-#define NAMSIZ 100
-#define PFXSIZ 155
-
-#define TMODLEN 8
-#define TUIDLEN 8
-#define TGIDLEN 8
-#define TSIZLEN 12
-#define TMTMLEN 12
-#define TCKSLEN 8
-
-#define TMAGIC "ustar" /* ustar and a null */
-#define TMAGLEN 6
-#define TVERSION "00" /* 00 and no null */
-#define TVERSLEN 2
-#define TUNMLEN 32
-#define TGNMLEN 32
-#define TDEVLEN 8
-
-/*
- * values used in typeflag field
- */
-
-#define REGTYPE '0' /* regular file */
-#define AREGTYPE 0 /* alternate REGTYPE */
-#define LNKTYPE '1' /* hard link */
-#define SYMTYPE '2' /* soft link */
-#define CHRTYPE '3' /* character special */
-#define BLKTYPE '4' /* block special */
-#define DIRTYPE '5' /* directory */
-#define FIFOTYPE '6' /* FIFO special */
-#define CONTTYPE '7' /* reserved */
-#define SOKTYPE '8' /* socket */
-#define EXTTYPE 'x' /* extended header */
-#define GLBTYPE 'g' /* global extended header */
-#define LLNKTYPE 'K' /* long link path */
-#define LREGTYPE 'L' /* long file path */
-#define VERTYPE 'V' /* version */
-
-/*
- * bits used in mode field
- */
-
-#define TSUID 04000 /* set uid on exec */
-#define TSGID 02000 /* set gid on exec */
-#define TSVTX 01000 /* sticky bit -- reserved */
-
-/*
- * file permissions
- */
-
-#define TUREAD 00400 /* read by owner */
-#define TUWRITE 00200 /* write by owner */
-#define TUEXEC 00100 /* execute by owner */
-#define TGREAD 00040 /* read by group */
-#define TGWRITE 00020 /* execute by group */
-#define TGEXEC 00010 /* write by group */
-#define TOREAD 00004 /* read by other */
-#define TOWRITE 00002 /* write by other */
-#define TOEXEC 00001 /* execute by other */
-
-struct header
-{
- char name[NAMSIZ];
- char mode[TMODLEN];
- char uid[TUIDLEN];
- char gid[TGIDLEN];
- char size[TSIZLEN];
- char mtime[TMTMLEN];
- char chksum[TCKSLEN];
- char typeflag;
- char linkname[NAMSIZ];
- char magic[TMAGLEN];
- char version[TVERSLEN];
- char uname[TUNMLEN];
- char gname[TGNMLEN];
- char devmajor[TDEVLEN];
- char devminor[TDEVLEN];
- char prefix[PFXSIZ];
-};
-
-union hblock
-{
- char dummy[TBLOCK];
- struct header dbuf;
-};
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/times.h b/usr/src/lib/libast/amd64/include/ast/times.h
deleted file mode 100644
index 1dbd3ee60a..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/times.h
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * -last clock_t,time_t interface definitions plus
- *
- * <ast.h>
- * <time.h>
- * <sys/time.h>
- * <sys/times.h>
- */
-
-#ifndef _TIMES_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TIMES_H
-
-#include <ast.h>
-
-#undef _TIMES_H
-#include <ast_time.h>
-#ifndef _TIMES_H
-#define _TIMES_H
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int touch __PROTO__((const char*, time_t, time_t, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/tm.h b/usr/src/lib/libast/amd64/include/ast/tm.h
deleted file mode 100644
index d8eb357c20..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/tm.h
+++ /dev/null
@@ -1,206 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * time conversion support definitions
- */
-
-#ifndef _TM_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TM_H
-
-#define TM_VERSION 20070319L
-
-#include <ast.h>
-#include <times.h>
-
-#undef daylight
-
-#define tmset(z) tminit(z)
-#define tmisleapyear(y) (!((y)%4)&&(((y)%100)||!((((y)<1900)?((y)+1900):(y))%400)))
-
-#define TM_ADJUST (1<<0) /* local doesn't do leap secs */
-#define TM_LEAP (1<<1) /* do leap seconds */
-#define TM_UTC (1<<2) /* universal coordinated ref */
-
-#define TM_PEDANTIC (1<<3) /* pedantic date parse */
-#define TM_DATESTYLE (1<<4) /* date(1) style mmddHHMMccyy */
-#define TM_SUBSECOND (1<<5) /* <something>%S => ...%S.%P */
-
-#define TM_DST (-60) /* default minutes for DST */
-#define TM_LOCALZONE (25 * 60) /* use local time zone offset */
-#define TM_UTCZONE (26 * 60) /* UTC "time zone" */
-#define TM_MAXLEAP 1 /* max leap secs per leap */
-#define TM_WINDOW 69 /* century windowing guard year */
-
-/*
- * these indices must agree with tm_dform[]
- */
-
-#define TM_MONTH_ABBREV 0
-#define TM_MONTH 12
-#define TM_DAY_ABBREV 24
-#define TM_DAY 31
-#define TM_TIME 38
-#define TM_DATE 39
-#define TM_DEFAULT 40
-#define TM_MERIDIAN 41
-
-#define TM_UT 43
-#define TM_DT 47
-#define TM_SUFFIXES 51
-#define TM_PARTS 55
-#define TM_HOURS 62
-#define TM_DAYS 66
-#define TM_LAST 69
-#define TM_THIS 72
-#define TM_NEXT 75
-#define TM_EXACT 78
-#define TM_NOISE 81
-#define TM_ORDINAL 85
-#define TM_DIGITS 95
-#define TM_CTIME 105
-#define TM_DATE_1 106
-#define TM_INTERNATIONAL 107
-#define TM_RECENT 108
-#define TM_DISTANT 109
-#define TM_MERIDIAN_TIME 110
-#define TM_ERA 111
-#define TM_ERA_DATE 112
-#define TM_ERA_TIME 113
-#define TM_ERA_DEFAULT 114
-#define TM_ERA_YEAR 115
-#define TM_ORDINALS 116
-#define TM_FINAL 126
-#define TM_WORK 129
-
-#define TM_NFORM 132
-
-typedef struct /* leap second info */
-{
- time_t time; /* the leap second event */
- int total; /* inclusive total since epoch */
-} Tm_leap_t;
-
-typedef struct /* time zone info */
-{
- char* type; /* type name */
- char* standard; /* standard time name */
- char* daylight; /* daylight or summertime name */
- short west; /* minutes west of GMT */
- short dst; /* add to tz.west for DST */
-} Tm_zone_t;
-
-typedef struct /* tm library readonly data */
-{
- char** format; /* default TM_* format strings */
- unsigned char* lex; /* format lex type classes */
- char* digit; /* output digits */
- short* days; /* days in month i */
- short* sum; /* days in months before i */
- Tm_leap_t* leap; /* leap second table */
- Tm_zone_t* zone; /* alternate timezone table */
-} Tm_data_t;
-
-typedef struct /* tm library global info */
-{
- char* deformat; /* TM_DEFAULT override */
- int flags; /* flags */
- char** format; /* current format strings */
- Tm_zone_t* date; /* timezone from last tmdate() */
- Tm_zone_t* local; /* local timezone */
- Tm_zone_t* zone; /* current timezone */
-} Tm_info_t;
-
-typedef struct Tm_s
-{
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- uint32_t tm_nsec;
- Tm_zone_t* tm_zone;
-} Tm_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Tm_data_t* _tm_datap_;
-extern __MANGLE__ Tm_info_t* _tm_infop_;
-
-#define tm_data (*_tm_datap_)
-#define tm_info (*_tm_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ time_t tmdate __PROTO__((const char*, char**, time_t*));
-extern __MANGLE__ int tmequiv __PROTO__((Tm_t*));
-extern __MANGLE__ Tm_t* tmfix __PROTO__((Tm_t*));
-extern __MANGLE__ char* tmfmt __PROTO__((char*, size_t, const char*, time_t*));
-extern __MANGLE__ char* tmform __PROTO__((char*, const char*, time_t*));
-extern __MANGLE__ int tmgoff __PROTO__((const char*, char**, int));
-extern __MANGLE__ void tminit __PROTO__((Tm_zone_t*));
-extern __MANGLE__ time_t tmleap __PROTO__((time_t*));
-extern __MANGLE__ int tmlex __PROTO__((const char*, char**, char**, int, char**, int));
-extern __MANGLE__ char** tmlocale __PROTO__((void));
-extern __MANGLE__ Tm_t* tmmake __PROTO__((time_t*));
-extern __MANGLE__ char* tmpoff __PROTO__((char*, size_t, const char*, int, int));
-extern __MANGLE__ time_t tmscan __PROTO__((const char*, char**, const char*, char**, time_t*, long));
-extern __MANGLE__ int tmsleep __PROTO__((time_t, time_t));
-extern __MANGLE__ time_t tmtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_zone_t* tmtype __PROTO__((const char*, char**));
-extern __MANGLE__ int tmweek __PROTO__((Tm_t*, int, int, int));
-extern __MANGLE__ int tmword __PROTO__((const char*, char**, const char*, char**, int));
-extern __MANGLE__ Tm_zone_t* tmzone __PROTO__((const char*, char**, const char*, int*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/tmx.h b/usr/src/lib/libast/amd64/include/ast/tmx.h
deleted file mode 100644
index cc2a9c517d..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/tmx.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
-#ifndef _TMX_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TMX_H 1
-/*
- * AT&T Research
- *
- * high resolution Time_t support
- */
-
-#include <tm.h>
-#include <tv.h>
-
-#define TMX_MAXDATE "2554-07-21+23:34:33.709551614 UTC"
-#define TMX_MAXYEAR 2554
-#define TMX_MAXSEC ((Time_t)18446744073)
-#define TMX_MAXNSEC 709551614
-#define TMX_RESOLUTION 1000000000
-
-typedef uint64_t Time_t;
-typedef uint64_t Tmxsec_t;
-typedef uint32_t Tmxnsec_t;
-
-#define tmxsec(t) ((Tmxsec_t)((t)/1000000000))
-#define tmxnsec(t) ((Tmxnsec_t)((t)%1000000000))
-#define tmxsns(s,n) (((((Time_t)(s))*1000000000))+((Time_t)(n)))
-
-#define TMX_NOTIME ((Time_t)(-1))
-#define TMX_NOW tmxgettime()
-#define TMX_MAXTIME tmxsns(TMX_MAXSEC,TMX_MAXNSEC)
-
-#define tmx2tv(t,v) ((v)->tv_nsec=tmxnsec(t),(v)->tv_sec=tmxsec(t))
-#define tv2tmx(v) tmxsns((v)->tv_sec,(v)->tv_nsec)
-
-#define tmxclock(p) tmxsns(((p)?*(p):time(NiL)),0)
-
-#define tmxgetatime(s) tmxsns((s)->st_atime,ST_ATIME_NSEC_GET(s))
-#define tmxgetctime(s) tmxsns((s)->st_ctime,ST_CTIME_NSEC_GET(s))
-#define tmxgetmtime(s) tmxsns((s)->st_mtime,ST_MTIME_NSEC_GET(s))
-
-#define tmxsetatime(s,t) ((s)->st_atime=tmxsec(t),ST_ATIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Time_t tmxdate __PROTO__((const char*, char**, Time_t));
-extern __MANGLE__ Time_t tmxduration __PROTO__((const char*, char**));
-extern __MANGLE__ char* tmxfmt __PROTO__((char*, size_t, const char*, Time_t));
-extern __MANGLE__ Time_t tmxleap __PROTO__((Time_t));
-extern __MANGLE__ Tm_t* tmxmake __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxscan __PROTO__((const char*, char**, const char*, char**, Time_t, long));
-extern __MANGLE__ int tmxsleep __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_t* tmxtm __PROTO__((Tm_t*, Time_t, Tm_zone_t*));
-
-extern __MANGLE__ Time_t tmxgettime __PROTO__((void));
-extern __MANGLE__ int tmxsettime __PROTO__((Time_t));
-
-extern __MANGLE__ int tmxtouch __PROTO__((const char*, Time_t, Time_t, Time_t, int));
-
-extern __MANGLE__ char* fmttmx __PROTO__((const char*, Time_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/tok.h b/usr/src/lib/libast/amd64/include/ast/tok.h
deleted file mode 100644
index 5e07aa302d..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/tok.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * token stream interface definitions
- */
-
-#ifndef _TOK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TOK_H
-
-#include <ast.h>
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Sfio_t* tokline __PROTO__((const char*, int, int*));
-extern __MANGLE__ int tokscan __PROTO__((char*, char**, const char*, ...));
-extern __MANGLE__ char* tokopen __PROTO__((char*, int));
-extern __MANGLE__ void tokclose __PROTO__((char*));
-extern __MANGLE__ char* tokread __PROTO__((char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/tv.h b/usr/src/lib/libast/amd64/include/ast/tv.h
deleted file mode 100644
index 0f17d679df..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/tv.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
-#ifndef _TV_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TV_H 1
-/*
- * AT&T Research
- *
- * high resolution Tv_t interface definitions
- */
-
-#include <ast.h>
-
-#define TV_NSEC_IGNORE (1000000000L)
-#define TV_TOUCH_RETAIN ((Tv_t*)1)
-
-typedef struct Tv_s
-{
- uint32_t tv_sec;
- uint32_t tv_nsec;
-} Tv_t;
-
-#define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
-#define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
-#define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
-
-#define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
-#define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
-#define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
-
-#define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
-#define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
-#define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
-
-#define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
-#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
-#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int tvgettime __PROTO__((Tv_t*));
-extern __MANGLE__ int tvsettime __PROTO__((const Tv_t*));
-extern __MANGLE__ int tvcmp __PROTO__((const Tv_t*, const Tv_t*));
-extern __MANGLE__ int tvtouch __PROTO__((const char*, const Tv_t*, const Tv_t*, const Tv_t*, int));
-extern __MANGLE__ int tvsleep __PROTO__((const Tv_t*, Tv_t*));
-
-extern __MANGLE__ char* fmttv __PROTO__((const char*, Tv_t*));
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/vdb.h b/usr/src/lib/libast/amd64/include/ast/vdb.h
deleted file mode 100644
index a44d0c6132..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/vdb.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * virtual db file directory entry constants
- */
-
-#ifndef VDB_MAGIC
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-
-#define VDB_MAGIC "vdb"
-
-#define VDB_DIRECTORY "DIRECTORY"
-#define VDB_UNION "UNION"
-#define VDB_DATE "DATE"
-#define VDB_MODE "MODE"
-
-#define VDB_DELIMITER ';'
-#define VDB_IGNORE '_'
-#define VDB_FIXED 10
-#define VDB_LENGTH ((int)sizeof(VDB_DIRECTORY)+2*(VDB_FIXED+1))
-#define VDB_OFFSET ((int)sizeof(VDB_DIRECTORY))
-#define VDB_SIZE (VDB_OFFSET+VDB_FIXED+1)
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/vecargs.h b/usr/src/lib/libast/amd64/include/ast/vecargs.h
deleted file mode 100644
index 900e13d8b0..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/vecargs.h
+++ /dev/null
@@ -1,56 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * vector argument interface definitions
- */
-
-#ifndef _VECARGS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _VECARGS_H
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int vecargs __PROTO__((char**, int*, char***));
-extern __MANGLE__ char** vecfile __PROTO__((const char*));
-extern __MANGLE__ void vecfree __PROTO__((char**, int));
-extern __MANGLE__ char** vecload __PROTO__((char*));
-extern __MANGLE__ char** vecstring __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/vmalloc.h b/usr/src/lib/libast/amd64/include/ast/vmalloc.h
deleted file mode 100644
index f13cc58879..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/vmalloc.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _VMALLOC_H
-#define _VMALLOC_H 1
-
-/* Public header file for the virtual malloc package.
-**
-** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
-*/
-
-#define VMALLOC_VERSION 20100101L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _vmalloc_s Vmalloc_t;
-typedef struct _vmstat_s Vmstat_t;
-typedef struct _vmdisc_s Vmdisc_t;
-typedef struct _vmethod_s Vmethod_t;
-typedef struct _vmdata_s Vmdata_t;
-typedef Void_t* (*Vmemory_f)_ARG_((Vmalloc_t*, Void_t*, size_t, size_t, Vmdisc_t*));
-typedef int (*Vmexcept_f)_ARG_((Vmalloc_t*, int, Void_t*, Vmdisc_t*));
-
-struct _vmstat_s
-{ int n_busy; /* number of busy blocks */
- int n_free; /* number of free blocks */
- size_t s_busy; /* total amount of busy space */
- size_t s_free; /* total amount of free space */
- size_t m_busy; /* largest busy piece */
- size_t m_free; /* largest free piece */
- int n_seg; /* number of segments */
- size_t extent; /* total size of region */
-};
-
-struct _vmdisc_s
-{ Vmemory_f memoryf; /* memory manipulator */
- Vmexcept_f exceptf; /* exception handler */
- size_t round; /* rounding requirement */
-};
-
-struct _vmethod_s
-{ Void_t* (*allocf)_ARG_((Vmalloc_t*,size_t));
- Void_t* (*resizef)_ARG_((Vmalloc_t*,Void_t*,size_t,int));
- int (*freef)_ARG_((Vmalloc_t*,Void_t*));
- long (*addrf)_ARG_((Vmalloc_t*,Void_t*));
- long (*sizef)_ARG_((Vmalloc_t*,Void_t*));
- int (*compactf)_ARG_((Vmalloc_t*));
- Void_t* (*alignf)_ARG_((Vmalloc_t*,size_t,size_t));
- unsigned short meth;
-};
-
-struct _vmalloc_s
-{ Vmethod_t meth; /* method for allocation */
- char* file; /* file name */
- int line; /* line number */
- Void_t* func; /* calling function */
- Vmdisc_t* disc; /* discipline to get space */
- Vmdata_t* data; /* the real region data */
- Vmalloc_t* next; /* linked list of regions */
-#ifdef _VM_PRIVATE_
- _VM_PRIVATE_
-#endif
-};
-
-#undef VM_FLAGS /* solaris sys kernel clash */
-
-#define VM_TRUST 0000001 /* forgo some security checks */
-#define VM_TRACE 0000002 /* generate trace */
-#define VM_DBCHECK 0000004 /* check for boundary overwrite */
-#define VM_DBABORT 0000010 /* abort on any warning */
-#define VM_FLAGS 0000017 /* user-settable flags */
-
-#define VM_MTBEST 0000100 /* Vmbest method */
-#define VM_MTPOOL 0000200 /* Vmpool method */
-#define VM_MTLAST 0000400 /* Vmlast method */
-#define VM_MTDEBUG 0001000 /* Vmdebug method */
-#define VM_MTPROFILE 0002000 /* Vmdebug method */
-#define VM_METHODS 0003700 /* available allocation methods */
-
-#define VM_RSCOPY 0000001 /* copy old contents */
-#define VM_RSMOVE 0000002 /* old contents is moveable */
-#define VM_RSZERO 0000004 /* clear new space */
-
-/* exception types */
-#define VM_OPEN 0 /* region being opened */
-#define VM_CLOSE 1 /* announce being closed */
-#define VM_NOMEM 2 /* can't obtain memory */
-#define VM_BADADDR 3 /* bad addr in vmfree/vmresize */
-#define VM_DISC 4 /* discipline being changed */
-#define VM_ALLOC 5 /* announcement from vmalloc() */
-#define VM_FREE 6 /* announcement from vmfree() */
-#define VM_RESIZE 7 /* announcement from vmresize() */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern extern __EXPORT__
-#endif
-#if !_BLD_vmalloc && defined(__IMPORT__)
-#define extern extern __IMPORT__
-#endif
-
-extern Vmethod_t* Vmbest; /* best allocation */
-extern Vmethod_t* Vmlast; /* last-block allocation */
-extern Vmethod_t* Vmpool; /* pool allocation */
-extern Vmethod_t* Vmdebug; /* allocation with debugging */
-extern Vmethod_t* Vmprofile; /* profiling memory usage */
-
-extern Vmdisc_t* Vmdcheap; /* heap discipline */
-extern Vmdisc_t* Vmdcsbrk; /* sbrk discipline */
-
-extern Vmalloc_t* Vmheap; /* heap region */
-extern Vmalloc_t* Vmregion; /* malloc region */
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Vmalloc_t* vmopen _ARG_(( Vmdisc_t*, Vmethod_t*, int ));
-extern int vmclose _ARG_(( Vmalloc_t* ));
-extern int vmclear _ARG_(( Vmalloc_t* ));
-extern int vmcompact _ARG_(( Vmalloc_t* ));
-
-extern Vmdisc_t* vmdisc _ARG_(( Vmalloc_t*, Vmdisc_t* ));
-
-extern Vmalloc_t* vmmopen _ARG_(( char*, Void_t*, size_t ));
-extern Void_t* vmmset _ARG_((Vmalloc_t*, int, Void_t*, int));
-
-extern Void_t* vmalloc _ARG_(( Vmalloc_t*, size_t ));
-extern Void_t* vmalign _ARG_(( Vmalloc_t*, size_t, size_t ));
-extern Void_t* vmresize _ARG_(( Vmalloc_t*, Void_t*, size_t, int ));
-extern Void_t* vmgetmem _ARG_(( Vmalloc_t*, Void_t*, size_t ));
-extern int vmfree _ARG_(( Vmalloc_t*, Void_t* ));
-
-extern long vmaddr _ARG_(( Vmalloc_t*, Void_t* ));
-extern long vmsize _ARG_(( Vmalloc_t*, Void_t* ));
-
-extern Vmalloc_t* vmregion _ARG_(( Void_t* ));
-extern Void_t* vmsegment _ARG_(( Vmalloc_t*, Void_t* ));
-extern int vmset _ARG_(( Vmalloc_t*, int, int ));
-
-extern Void_t* vmdbwatch _ARG_(( Void_t* ));
-extern int vmdbcheck _ARG_(( Vmalloc_t* ));
-extern int vmdebug _ARG_(( int ));
-
-extern int vmprofile _ARG_(( Vmalloc_t*, int ));
-
-extern int vmtrace _ARG_(( int ));
-extern int vmtrbusy _ARG_((Vmalloc_t*));
-
-extern int vmstat _ARG_((Vmalloc_t*, Vmstat_t*));
-
-extern int vmwalk _ARG_((Vmalloc_t*,
- int(*)(Vmalloc_t*,Void_t*,size_t,Vmdisc_t*,Void_t*),
- Void_t*));
-extern char* vmstrdup _ARG_((Vmalloc_t*, const char*));
-
-#if !defined(_BLD_vmalloc) && !defined(_AST_STD_H) && \
- !defined(__stdlib_h) && !defined(__STDLIB_H) && \
- !defined(_STDLIB_INCLUDED) && !defined(_INC_STDLIB)
-extern Void_t* malloc _ARG_(( size_t ));
-extern Void_t* realloc _ARG_(( Void_t*, size_t ));
-extern void free _ARG_(( Void_t* ));
-extern void cfree _ARG_(( Void_t* ));
-extern Void_t* calloc _ARG_(( size_t, size_t ));
-extern Void_t* memalign _ARG_(( size_t, size_t ));
-extern Void_t* valloc _ARG_(( size_t ));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* to coerce any value to a Vmalloc_t*, make ANSI happy */
-#define _VM_(vm) ((Vmalloc_t*)(vm))
-
-/* enable recording of where a call originates from */
-#ifdef VMFL
-
-#if defined(__FILE__)
-#define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__)
-#else
-#define _VMFILE_(vm) (_VM_(vm)->file = 0)
-#endif
-
-#if defined(__LINE__)
-#define _VMLINE_(vm) (_VM_(vm)->line = __LINE__)
-#else
-#define _VMLINE_(vm) (_VM_(vm)->line = 0)
-#endif
-
-#if defined(__FUNCTION__)
-#define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__)
-#else
-#define _VMFUNC_(vm) (_VM_(vm)->func = 0)
-#endif
-
-#define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm))
-
-#define vmalloc(vm,sz) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
-#define vmresize(vm,d,sz,type) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type)) )
-#define vmfree(vm,d) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d)) )
-#define vmalign(vm,sz,align) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.alignf))((vm),(sz),(align)) )
-
-#undef malloc
-#undef realloc
-#undef calloc
-#undef free
-#undef memalign
-#undef valloc
-
-#if _map_malloc
-
-#define malloc(s) (_VMFL_(Vmregion), _ast_malloc((size_t)(s)) )
-#define realloc(d,s) (_VMFL_(Vmregion), _ast_realloc((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) (_VMFL_(Vmregion), _ast_calloc((size_t)n, (size_t)(s)) )
-#define free(d) (_VMFL_(Vmregion), _ast_free((Void_t*)(d)) )
-#define memalign(a,s) (_VMFL_(Vmregion), _ast_memalign((size_t)(a),(size_t)(s)) )
-#define valloc(s) (_VMFL_(Vmregion), _ast_valloc((size_t)(s) )
-
-#else
-
-#if !_std_malloc
-
-#if __STD_C || defined(__STDPP__) || defined(__GNUC__)
-#define malloc(s) ( _VMFL_(Vmregion), (malloc)((size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), (realloc)((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), (calloc)((size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), (free)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), (memalign)((size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), (valloc)((size_t)(s)) )
-#ifndef strdup
-#define strdup(s) ( _VMFL_(Vmregion), (strdup)((char*)(s)) )
-#endif
-
-#else
-
-#define _VMNM_(a,b,c,d,e,f) a/**/b/**/c/**/d/**/e/**/f
-#define malloc(s) ( _VMFL_(Vmregion), _VMNM_(mallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), _VMNM_(reallo,/,*,*,/,c)\
- ( (Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), _VMNM_(callo,/,*,*,/,c)\
- ( (size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), _VMNM_(fre,/,*,*,/,e)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), _VMNM_(memalig,/,*,*,/,n)\
- ( (size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), _VMNM_(vallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#ifndef strdup
-#define strdup(s) ( _VMFL_(Vmregion), _VMNM_(strdu,/,*,*,/,p)\
- ((char*)(s)) )
-#endif
-
-#endif /*__STD_C || defined(__STDPP__) || defined(__GNUC__)*/
-
-#define cfree(d) free(d)
-
-#endif /* !_std_malloc */
-
-#endif /* _map_malloc */
-
-#endif /*VMFL*/
-
-/* non-debugging/profiling allocation calls */
-#ifndef vmalloc
-#define vmalloc(vm,sz) (*(_VM_(vm)->meth.allocf))((vm),(sz))
-#endif
-
-#ifndef vmresize
-#define vmresize(vm,d,sz,type) (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type))
-#endif
-
-#ifndef vmfree
-#define vmfree(vm,d) (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d))
-#endif
-
-#ifndef vmalign
-#define vmalign(vm,sz,align) (*(_VM_(vm)->meth.alignf))((vm),(sz),(align))
-#endif
-
-#define vmaddr(vm,addr) (*(_VM_(vm)->meth.addrf))((vm),(Void_t*)(addr))
-#define vmsize(vm,addr) (*(_VM_(vm)->meth.sizef))((vm),(Void_t*)(addr))
-#define vmcompact(vm) (*(_VM_(vm)->meth.compactf))((vm))
-#define vmoldof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
- (VM_RSMOVE) )
-#define vmnewof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
- (VM_RSMOVE|VM_RSCOPY|VM_RSZERO) )
-#define vmdata(vm) ((Void_t*)(_VM_(vm)->data))
-
-#endif /* _VMALLOC_H */
diff --git a/usr/src/lib/libast/amd64/include/ast/wait.h b/usr/src/lib/libast/amd64/include/ast/wait.h
deleted file mode 100644
index c4e3b8f2a0..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/wait.h
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * ast POSIX wait/exit support
- */
-
-#ifndef _WAIT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _WAIT_H
-
-#include <ast.h>
-#include <ast_wait.h>
-
-#if _sys_wait
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide wait waitpid
-#else
-#define wait ______wait
-#define waitpid ______waitpid
-#endif
-#include <sys/wait.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide wait waitpid
-#else
-#undef wait
-#undef waitpid
-#endif
-#endif
-
-#ifndef WNOHANG
-#define WNOHANG 1
-#endif
-
-#ifndef WUNTRACED
-#define WUNTRACED 2
-#endif
-
-#if !_ok_wif
-#undef WIFEXITED
-#undef WEXITSTATUS
-#undef WIFSIGNALED
-#undef WTERMSIG
-#undef WIFSTOPPED
-#undef WSTOPSIG
-#undef WTERMCORE
-#endif
-
-#ifndef WIFEXITED
-#define WIFEXITED(x) (!((x)&((1<<(EXIT_BITS-1))-1)))
-#endif
-
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(x) (((x)>>EXIT_BITS)&((1<<EXIT_BITS)-1))
-#endif
-
-#ifndef WIFSIGNALED
-#define WIFSIGNALED(x) (((x)&((1<<(EXIT_BITS-1))-1))!=0)
-#endif
-
-#ifndef WTERMSIG
-#define WTERMSIG(x) ((x)&((1<<(EXIT_BITS-1))-1))
-#endif
-
-#ifndef WIFSTOPPED
-#define WIFSTOPPED(x) (((x)&((1<<EXIT_BITS)-1))==((1<<(EXIT_BITS-1))-1))
-#endif
-
-#ifndef WSTOPSIG
-#define WSTOPSIG(x) WEXITSTATUS(x)
-#endif
-
-#ifndef WTERMCORE
-#define WTERMCORE(x) ((x)&(1<<(EXIT_BITS-1)))
-#endif
-
-extern __MANGLE__ pid_t wait __PROTO__((int*));
-extern __MANGLE__ pid_t waitpid __PROTO__((pid_t, int*, int));
-
-#endif
diff --git a/usr/src/lib/libast/amd64/include/ast/wordexp.h b/usr/src/lib/libast/amd64/include/ast/wordexp.h
deleted file mode 100644
index af3169962b..0000000000
--- a/usr/src/lib/libast/amd64/include/ast/wordexp.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix wordexp interface definitions
- */
-
-#ifndef _WORDEXP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _WORDEXP_H
-
-#include <ast_common.h>
-
-#define WRDE_APPEND 01
-#define WRDE_DOOFFS 02
-#define WRDE_NOCMD 04
-#define WRDE_NOSYS 0100
-#define WRDE_REUSE 010
-#define WRDE_SHOWERR 020
-#define WRDE_UNDEF 040
-
-#define WRDE_BADCHAR 1
-#define WRDE_BADVAL 2
-#define WRDE_CMDSUB 3
-#define WRDE_NOSPACE 4
-#define WRDE_SYNTAX 5
-#define WRDE_NOSHELL 6
-
-typedef struct _wdarg
-{
- size_t we_wordc;
- char **we_wordv;
- size_t we_offs;
-} wordexp_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int wordexp __PROTO__((const char*, wordexp_t*, int));
-extern __MANGLE__ int wordfree __PROTO__((wordexp_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif /* _WORDEXP_H */
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/botch b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/botch
deleted file mode 100644
index ab5db43c79..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/botch
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/eaccess b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/eaccess
deleted file mode 100644
index f9185636df..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/eaccess
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/eaccess by iffe version 2009-12-04 : : */
-#ifndef _def_eaccess_ast
-#define _def_eaccess_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/hack b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/hack
deleted file mode 100644
index ac6889f55d..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/hack
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/hack by iffe version 2009-12-04 : : */
-#ifndef _def_hack_ast
-#define _def_hack_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/isoc99 b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/isoc99
deleted file mode 100644
index 77ddccf315..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/isoc99
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/isoc99 by iffe version 2009-12-04 : : */
-#ifndef _def_isoc99_ast
-#define _def_isoc99_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-/* _ISOC99_SOURCE plays nice */
-#ifndef _ISOC99_SOURCE
-#define _ISOC99_SOURCE 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/omitted b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/omitted
deleted file mode 100644
index fc57c94ce0..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/omitted
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/omitted by iffe version 2009-12-04 : : */
-#ifndef _def_omitted_ast
-#define _def_omitted_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/options b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/options
deleted file mode 100644
index 07c7cc95f7..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/options
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/options by iffe version 2009-12-04 : : */
-#ifndef _def_options_ast
-#define _def_options_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/preroot b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/preroot
deleted file mode 100644
index fcb123549d..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/preroot
+++ /dev/null
@@ -1,6 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/standards b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/standards
deleted file mode 100644
index 100a7e8818..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/standards
+++ /dev/null
@@ -1,10 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/uwin b/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/uwin
deleted file mode 100644
index 4364a133ab..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/FEATURE/uwin
+++ /dev/null
@@ -1,17 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/uwin by iffe version 2009-12-04 : : */
-#ifndef _def_uwin_ast
-#define _def_uwin_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_a64l 1 /* a64l() in default lib(s) */
-#define _lib_crypt 1 /* crypt() in default lib(s) */
-#define _lib_getpass 1 /* getpass() in default lib(s) */
-#define _lib_random 1 /* random() in default lib(s) */
-#define _lib_rcmd 1 /* rcmd() in default lib(s) */
-#define _lib_srand48 1 /* srand48() in default lib(s) */
-#define _lib_logb 1 /* logb() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_scalb 1 /* scalb() in default lib(s) */
-#define _lib__finite 1 /* _finite() in default lib(s) */
-#define _lib__scalb 1 /* _scalb() in default lib(s) */
-#define _dat__iob 1 /* _iob in default lib(s) */
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_botch.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_botch.h
deleted file mode 100644
index ab5db43c79..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_botch.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_common.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_common.h
deleted file mode 100644
index 4c6698427f..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_common.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
-#ifndef _AST_COMMON_H
-#define _AST_COMMON_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_pthread 1 /* #include <pthread.h> ok */
-#define _hdr_stdarg 1 /* #include <stdarg.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdint 1 /* #include <stdint.h> ok */
-#define _hdr_inttypes 1 /* #include <inttypes.h> ok */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_long_double 1 /* long double is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _std_proto 1 /* standard C prototypes ok */
-#define _ptr_void 1 /* standard C void* ok */
-/* disable non-standard linux/gnu inlines */
-#ifdef __GNUC__
-# undef __OPTIMIZE_SIZE__
-# define __OPTIMIZE_SIZE__ 1
-#endif
-
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && __STDC__
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && (__cplusplus || c_plusplus)
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && _std_proto
-# define __STD_C 1
-#endif
-#if !defined(__STD_C)
-# define __STD_C 0
-#endif
-
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-# if __cplusplus || c_plusplus
-# define _BEGIN_EXTERNS_ extern "C" {
-# define _END_EXTERNS_ }
-# else
-# define _BEGIN_EXTERNS_
-# define _END_EXTERNS_
-# endif
-#endif
-
-/* _ARG_ simplifies function prototyping among flavors of C */
-#ifndef _ARG_
-# if __STD_C
-# define _ARG_(x) x
-# else
-# define _ARG_(x) ()
-# endif
-#endif
-
-/* _NIL_ simplifies defining nil pointers to a given type */
-#ifndef _NIL_
-# define _NIL_(x) ((x)0)
-#endif
-
-/* __INLINE__ is the inline keyword */
-#if !defined(__INLINE__) && defined(__cplusplus)
-# define __INLINE__ inline
-#endif
-#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-#endif
-
-/* Void_t is defined so that Void_t* can address any type */
-#ifndef Void_t
-# if __STD_C
-# define Void_t void
-# else
-# define Void_t char
-# endif
-#endif
-
-/* windows variants and veneers */
-#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
-# define _WINIX 1
-#endif
-
-/* dynamic linked library external scope handling */
-#ifdef __DYNAMIC__
-# undef __DYNAMIC__
-# ifndef _DLL
-# define _DLL 1
-# endif
-#endif
-#if _dll_import
-# if _BLD_STATIC && !_BLD_DLL
-# undef _DLL
-# else
-# if !_UWIN && !defined(_DLL)
-# define _DLL 1
-# endif
-# endif
-# if !defined(__EXPORT__) && _BLD_DLL
-# define __EXPORT__ __declspec(dllexport)
-# endif
-# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
-# define __IMPORT__ __declspec(dllimport)
-# endif
-# if _BLD_DLL && _UWIN
-# define __DYNAMIC__(v) (_ast_getdll()->_ast_ ## v)
-# endif
-#endif
-#if !defined(_astimport)
-# if defined(__IMPORT__) && defined(_DLL)
-# define _astimport __IMPORT__
-# else
-# define _astimport extern
-# endif
-#endif
-#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
-# ifdef __STDC__
-# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
-# else
-# define __EXTERN__(T,obj) extern T obj; T* _imp__/**/obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__/**/obj = &obj
-# endif
-#else
-# define __EXTERN__(T,obj) extern T obj
-# define __DEFINE__(T,obj,val) T obj = val
-#endif
-
-#define _ast_LL 1 /* LL numeric suffix supported */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intmax_long 1
-#define _ast_intswap 7
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt16_t long double
-#define _ast_fltmax_t _ast_flt16_t
-#define _typ_int8_t 1 /* int8_t is a type */
-#define _typ_uint8_t 1 /* uint8_t is a type */
-#define _typ_int16_t 1 /* int16_t is a type */
-#define _typ_uint16_t 1 /* uint16_t is a type */
-#define _typ_int32_t 1 /* int32_t is a type */
-#define _typ_uint32_t 1 /* uint32_t is a type */
-#define _typ_int64_t 1 /* int64_t is a type */
-#define _typ_uint64_t 1 /* uint64_t is a type */
-#define _typ_intmax_t 1 /* intmax_t is a type */
-#define _typ_uintmax_t 1 /* uintmax_t is a type */
-
-#ifndef va_listref
-#ifndef va_start
-#if __STD_C
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-#define va_listref(p) (&(p)) /* pass va_list to varargs function */
-#define va_listval(p) (*(p)) /* retrieve va_list from va_arg(ap,va_listarg) */
-#define va_listarg va_list* /* va_arg() va_list type */
-#endif
-#ifndef _AST_STD_H
-# if __STD_C && _hdr_stddef
-# include <stddef.h>
-# endif
-# if _sys_types
-# include <sys/types.h>
-# endif
-# if _hdr_stdint
-# include <stdint.h>
-# else
-# if _hdr_inttypes
-# include <inttypes.h>
-# endif
-# endif
-#endif
-#if !_typ_size_t
-# define _typ_size_t 1
- typedef int size_t;
-#endif
-#if !_typ_ssize_t
-# define _typ_ssize_t 1
- typedef int ssize_t;
-#endif
-#ifndef _AST_STD_H
-# if !_def_map_ast
-# include <ast_map.h>
-# endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_fcntl.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_fcntl.h
deleted file mode 100644
index c6220d53e6..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_fcntl.h
+++ /dev/null
@@ -1,114 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
-#ifndef _def_fcntl_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fcntl_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <ast_fs.h>
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#define O_BINARY 0
-#define O_TEMPORARY 0
-#define O_TEXT 0
-
-#include <ast_fs.h>
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_fstat64
-#define fstat fstat64
-#endif
-#if _lib_lstat64
-#define lstat lstat64
-#endif
-#if _lib_stat64
-#define stat stat64
-#endif
-#if _lib_creat64
-#define creat creat64
-#endif
-#if _lib_mmap64
-#define mmap mmap64
-#endif
-#if _lib_open64
-#undef open
-#define open open64
-#endif
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_float.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_float.h
deleted file mode 100644
index fcf9f4aa09..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_float.h
+++ /dev/null
@@ -1,215 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
-#ifndef _def_float_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_float_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_float 1 /* #include <float.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_math 1 /* #include <math.h> ok */
-#define _hdr_values 1 /* #include <values.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
-#define _lib_frexp 1 /* frexp() in default lib(s) */
-#define _lib_frexpl 1 /* frexpl() in default lib(s) */
-#define _lib_ldexp 1 /* ldexp() in default lib(s) */
-#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
-#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
-#define _lib_copysign 1 /* copysign() in default lib(s) */
-#define _lib_copysignl 1 /* copysignl() in default lib(s) */
-#include <ast_common.h>
-#include <float.h>
-#include <math.h>
-#ifndef FLT_DIG
-#define FLT_DIG 6
-#endif
-#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
-#endif
-#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
-#endif
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
-#endif
-#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
-#endif
-#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
-#endif
-#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
-#endif
-#ifndef DBL_DIG
-#define DBL_DIG 15
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
-#endif
-#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
-#endif
-#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
-#endif
-#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
-#endif
-#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
-#endif
-#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
-#endif
-#ifndef LDBL_DIG
-#define LDBL_DIG 18
-#endif
-#ifndef LDBL_MAX
-#define LDBL_MAX 1.1897314953572317650213E+4932L
-#endif
-#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
-#endif
-#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
-#endif
-#ifndef LDBL_MIN
-#define LDBL_MIN 3.3621031431120935062627E-4932L
-#endif
-#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
-#endif
-#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
-#endif
-
-
-#define USHRT_DIG 4
-#define UINT_DIG 9
-#define ULONG_DIG 19
-#define UINTMAX_DIG ULONG_DIG
-
-#define FLT_ULONG_MAX 18446744073709551615.0F
-#define FLT_ULLONG_MAX FLT_ULONG_MAX
-#define FLT_UINTMAX_MAX FLT_ULONG_MAX
-#define FLT_LONG_MAX 9223372036854775807.0F
-#define FLT_LLONG_MAX FLT_LONG_MAX
-#define FLT_INTMAX_MAX FLT_LONG_MAX
-#define FLT_LONG_MIN (-9223372036854775808.0F)
-#define FLT_LLONG_MIN FLT_LONG_MIN
-#define FLT_INTMAX_MIN FLT_LONG_MIN
-
-#define DBL_ULONG_MAX 18446744073709551615.0
-#define DBL_ULLONG_MAX DBL_ULONG_MAX
-#define DBL_UINTMAX_MAX DBL_ULONG_MAX
-#define DBL_LONG_MAX 9223372036854775807.0
-#define DBL_LLONG_MAX DBL_LONG_MAX
-#define DBL_INTMAX_MAX DBL_LONG_MAX
-#define DBL_LONG_MIN (-9223372036854775808.0)
-#define DBL_LLONG_MIN DBL_LONG_MIN
-#define DBL_INTMAX_MIN DBL_LONG_MIN
-
-#define LDBL_ULONG_MAX 18446744073709551615.0L
-#define LDBL_ULLONG_MAX LDBL_ULONG_MAX
-#define LDBL_UINTMAX_MAX LDBL_ULONG_MAX
-#define LDBL_LONG_MAX 9223372036854775807.0L
-#define LDBL_LLONG_MAX LDBL_LONG_MAX
-#define LDBL_INTMAX_MAX LDBL_LONG_MAX
-#define LDBL_LONG_MIN (-9223372036854775808.0L)
-#define LDBL_LLONG_MIN LDBL_LONG_MIN
-#define LDBL_INTMAX_MIN LDBL_LONG_MIN
-
-#define FLTMAX_UINTMAX_MAX LDBL_UINTMAX_MAX
-#define FLTMAX_INTMAX_MAX LDBL_INTMAX_MAX
-#define FLTMAX_INTMAX_MIN LDBL_INTMAX_MIN
-
-typedef union _ast_dbl_exp_u
-{
- uint32_t e[sizeof(double)/4];
- double f;
-} _ast_dbl_exp_t;
-
-#define _ast_dbl_exp_index 1
-#define _ast_dbl_exp_shift 20
-
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 2
-#define _ast_fltmax_exp_shift 0
-
-#define _ast_flt_unsigned_max_t unsigned long long
-#define _ast_flt_nan_init 0xff,0xff,0xff,0x7f
-#define _ast_flt_inf_init 0x00,0x00,0x80,0x7f
-#define _ast_dbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f
-#define _ast_dbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f
-#define _ast_ldbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x40,0x00,0x00,0x00,0x00,0x00
-#define _ast_ldbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0x40,0x00,0x00,0x00,0x00,0x00
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_iconv.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_iconv.h
deleted file mode 100644
index 720f456be1..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_iconv.h
+++ /dev/null
@@ -1,132 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
-#ifndef _def_iconv_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_iconv_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_iconv 1 /* #include <iconv.h> ok */
-#define _lib_iconv_open 1 /* iconv_open() in default lib(s) */
-#define _lib_iconv_close 1 /* iconv_close() in default lib(s) */
-#define _lib_iconv 1 /* iconv() in default lib(s) */
-#define _nxt_iconv <../include/iconv.h> /* include path for the native <iconv.h> */
-#define _nxt_iconv_str "../include/iconv.h" /* include string for the native <iconv.h> */
-#include <ast_common.h>
-#include <ccode.h>
-#include <../include/iconv.h> /* the native iconv.h */
-
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
-
-#ifndef _ICONV_LIST_PRIVATE_
-#undef iconv_t
-#define iconv_t _ast_iconv_t
-#undef iconv_f
-#define iconv_f _ast_iconv_f
-#undef iconv_list_t
-#define iconv_list_t _ast_iconv_list_t
-#undef iconv_open
-#define iconv_open _ast_iconv_open
-#undef iconv
-#define iconv _ast_iconv
-#undef iconv_close
-#define iconv_close _ast_iconv_close
-#undef iconv_list
-#define iconv_list _ast_iconv_list
-#undef iconv_move
-#define iconv_move _ast_iconv_move
-#undef iconv_name
-#define iconv_name _ast_iconv_name
-#undef iconv_write
-#define iconv_write _ast_iconv_write
-#endif
-
-typedef Ccmap_t _ast_iconv_list_t;
-typedef __V_* _ast_iconv_t;
-typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ _ast_iconv_t _ast_iconv_open __PROTO__((const char*, const char*));
-extern __MANGLE__ size_t _ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
-extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
-extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
-#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
-#else
-#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_lib.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_lib.h
deleted file mode 100644
index b0a14c5fc8..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_lib.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
-#ifndef _def_lib_ast
-#define _def_lib_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _hdr_fmtmsg 1 /* #include <fmtmsg.h> ok */
-#define _hdr_fnmatch 1 /* #include <fnmatch.h> ok */
-#define _hdr_libgen 1 /* #include <libgen.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_locale 1 /* #include <locale.h> ok */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_spawn 1 /* #include <spawn.h> ok */
-#define _hdr_syslog 1 /* #include <syslog.h> ok */
-#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
-#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
-#define _dat__tzname 1 /* _tzname in default lib(s) */
-#define _dat_tzname 1 /* tzname in default lib(s) */
-#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
-#define _lib_atexit 1 /* atexit() in default lib(s) */
-#define _lib_bcopy 1 /* bcopy() in default lib(s) */
-#define _lib_bzero 1 /* bzero() in default lib(s) */
-#define _lib_catclose 1 /* catclose() in default lib(s) */
-#define _lib_catgets 1 /* catgets() in default lib(s) */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_confstr 1 /* confstr() in default lib(s) */
-#define _lib_dup2 1 /* dup2() in default lib(s) */
-#define _lib_execlp 1 /* execlp() in default lib(s) */
-#define _lib_execve 1 /* execve() in default lib(s) */
-#define _lib_execvp 1 /* execvp() in default lib(s) */
-#define _lib_fchmod 1 /* fchmod() in default lib(s) */
-#define _lib_fcntl 1 /* fcntl() in default lib(s) */
-#define _lib_fmtmsg 1 /* fmtmsg() in default lib(s) */
-#define _lib_fnmatch 1 /* fnmatch() in default lib(s) */
-#define _lib_fork 1 /* fork() in default lib(s) */
-#define _lib_fsync 1 /* fsync() in default lib(s) */
-#define _lib_getdents 1 /* getdents() in default lib(s) */
-#define _lib_getdtablesize 1 /* getdtablesize() in default lib(s) */
-#define _lib_getdate 1 /* getdate() in default lib(s) */
-#define _lib_getgroups 1 /* getgroups() in default lib(s) */
-#define _lib_gethostname 1 /* gethostname() in default lib(s) */
-#define _lib_getlogin 1 /* getlogin() in default lib(s) */
-#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_getopt 1 /* getopt() in default lib(s) */
-#define _lib_getsubopt 1 /* getsubopt() in default lib(s) */
-#define _lib_getopt_long 1 /* getopt_long() in default lib(s) */
-#define _lib_getopt_long_only 1 /* getopt_long_only() in default lib(s) */
-#define _lib_glob 1 /* glob() in default lib(s) */
-#define _lib_index 1 /* index() in default lib(s) */
-#define _lib_iswblank 1 /* iswblank() in default lib(s) */
-#define _lib_iswctype 1 /* iswctype() in default lib(s) */
-#define _lib_killpg 1 /* killpg() in default lib(s) */
-#define _lib_link 1 /* link() in default lib(s) */
-#define _lib_localeconv 1 /* localeconv() in default lib(s) */
-#define _lib_madvise 1 /* madvise() in default lib(s) */
-#define _lib_mbtowc 1 /* mbtowc() in default lib(s) */
-#define _lib_mbrtowc 1 /* mbrtowc() in default lib(s) */
-#define _lib_memalign 1 /* memalign() in default lib(s) */
-#define _lib_memchr 1 /* memchr() in default lib(s) */
-#define _lib_memcpy 1 /* memcpy() in default lib(s) */
-#define _lib_memmove 1 /* memmove() in default lib(s) */
-#define _lib_memset 1 /* memset() in default lib(s) */
-#define _lib_mkdir 1 /* mkdir() in default lib(s) */
-#define _lib_mkfifo 1 /* mkfifo() in default lib(s) */
-#define _lib_mktemp 1 /* mktemp() in default lib(s) */
-#define _lib_mktime 1 /* mktime() in default lib(s) */
-#define _lib_mount 1 /* mount() in default lib(s) */
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _lib_pathconf 1 /* pathconf() in default lib(s) */
-#define _lib_readlink 1 /* readlink() in default lib(s) */
-#define _lib_remove 1 /* remove() in default lib(s) */
-#define _lib_rename 1 /* rename() in default lib(s) */
-#define _lib_rewinddir 1 /* rewinddir() in default lib(s) */
-#define _lib_rindex 1 /* rindex() in default lib(s) */
-#define _lib_rmdir 1 /* rmdir() in default lib(s) */
-#define _lib_setlocale 1 /* setlocale() in default lib(s) */
-#define _lib_setpgid 1 /* setpgid() in default lib(s) */
-#define _lib_setpgrp 1 /* setpgrp() in default lib(s) */
-#define _lib_setreuid 1 /* setreuid() in default lib(s) */
-#define _lib_setsid 1 /* setsid() in default lib(s) */
-#define _lib_setuid 1 /* setuid() in default lib(s) */
-#define _lib_sigaction 1 /* sigaction() in default lib(s) */
-#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
-#define _lib_socketpair 1 /* socketpair() in default lib(s) */
-#define _lib_strchr 1 /* strchr() in default lib(s) */
-#define _lib_strcoll 1 /* strcoll() in default lib(s) */
-#define _lib_strdup 1 /* strdup() in default lib(s) */
-#define _lib_strerror 1 /* strerror() in default lib(s) */
-#define _lib_strcasecmp 1 /* strcasecmp() in default lib(s) */
-#define _lib_strncasecmp 1 /* strncasecmp() in default lib(s) */
-#define _lib_strrchr 1 /* strrchr() in default lib(s) */
-#define _lib_strstr 1 /* strstr() in default lib(s) */
-#define _lib_strxfrm 1 /* strxfrm() in default lib(s) */
-#define _lib_strftime 1 /* strftime() in default lib(s) */
-#define _lib_swab 1 /* swab() in default lib(s) */
-#define _lib_symlink 1 /* symlink() in default lib(s) */
-#define _lib_sysconf 1 /* sysconf() in default lib(s) */
-#define _lib_sysinfo 1 /* sysinfo() in default lib(s) */
-#define _lib_syslog 1 /* syslog() in default lib(s) */
-#define _lib_telldir 1 /* telldir() in default lib(s) */
-#define _lib_tmpnam 1 /* tmpnam() in default lib(s) */
-#define _lib_tzset 1 /* tzset() in default lib(s) */
-#define _lib_unlink 1 /* unlink() in default lib(s) */
-#define _lib_utime 1 /* utime() in default lib(s) */
-#define _lib_wctype 1 /* wctype() in default lib(s) */
-#define _lib_ftruncate 1 /* ftruncate() in default lib(s) */
-#define _lib_truncate 1 /* truncate() in default lib(s) */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _lib_strtod 1 /* strtod() in default lib(s) */
-#define _lib_strtold 1 /* strtold() in default lib(s) */
-#define _lib_strtol 1 /* strtol() in default lib(s) */
-#define _lib_strtoll 1 /* strtoll() in default lib(s) */
-#define _lib_strtoul 1 /* strtoul() in default lib(s) */
-#define _lib_strtoull 1 /* strtoull() in default lib(s) */
-#define _hdr_signal 1 /* #include <signal.h> ok */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
-#define _npt_sigflag 1 /* sigflag() needs a prototype */
-#define _mem_d_ino_dirent 1 /* d_ino is a member of struct dirent */
-#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
-#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
-#define _mem_DIR 1 /* DIR is a non-opaque struct */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
-#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
-#define _sys_resource 1 /* #include <sys/resource.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _sys_stream 1 /* #include <sys/stream.h> ok */
-#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_off64_t 1 /* off64_t is a type */
-#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
-#define _tst_errno 1 /* errno can be assigned */
-#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
-#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
-#define _lib_select 1 /* select() has standard 5 arg interface */
-#define _pipe_rw 1 /* full duplex pipes */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _lib_vfork 1 /* vfork exists and it works */
-#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
-#define _hdr_string 1 /* #include <string.h> ok */
-#define _lib_memcmp 1 /* standard memcmp interface that works */
-#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_memccpy 1 /* standard memccpy interface that works */
-#define _lib_utime_now 1 /* utime works with 0 time vector */
-#define _UNIV_DEFAULT "att" /* default universe name */
-#define _std_cleanup 1 /* stuck with standard _cleanup */
-#define _std_strcoll 1 /* standard strcoll works */
-#if !_AST_no_spawnveg
-#define _use_spawnveg 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_map.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_map.h
deleted file mode 100644
index 8653690789..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_map.h
+++ /dev/null
@@ -1,450 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
-#ifndef _def_map_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_map_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-/*
- * prototypes provided for standard interfaces hijacked
- * by ast and mapped to _ast_* but already prototyped
- * unmapped in native headers included by <ast_std.h>
- */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-
-#define _map_libc 1
-#undef basename
-#define basename _ast_basename
-#undef dirname
-#define dirname _ast_dirname
-#undef eaccess
-#define eaccess _ast_eaccess
-#undef execvpe
-#define execvpe _ast_execvpe
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-#undef fnmatch
-#define fnmatch _ast_fnmatch
-#undef fts_children
-#define fts_children _ast_fts_children
-#undef fts_close
-#define fts_close _ast_fts_close
-#undef fts_flags
-#define fts_flags _ast_fts_flags
-#undef fts_notify
-#define fts_notify _ast_fts_notify
-#undef fts_open
-#define fts_open _ast_fts_open
-#undef fts_read
-#define fts_read _ast_fts_read
-#undef fts_set
-#define fts_set _ast_fts_set
-#undef ftw
-#define ftw _ast_ftw
-#undef ftwalk
-#define ftwalk _ast_ftwalk
-#undef ftwflags
-#define ftwflags _ast_ftwflags
-#undef getcwd
-#define getcwd _ast_getcwd
-extern __MANGLE__ char* getcwd __PROTO__((char*, size_t));
-#undef getdate
-#define getdate _ast_getdate
-#undef getopt
-#define getopt _ast_getopt
-#undef getsubopt
-#define getsubopt _ast_getsubopt
-#undef getopt_long
-#define getopt_long _ast_getopt_long
-#undef getopt_long_only
-#define getopt_long_only _ast_getopt_long_only
-#undef optopt
-#define optopt _ast_optopt
-#undef optarg
-#define optarg _ast_optarg
-#undef optind
-#define optind _ast_optind
-#undef opterr
-#define opterr _ast_opterr
-#undef getwd
-#define getwd _ast_getwd
-extern __MANGLE__ char* getwd __PROTO__((char*));
-#undef glob
-#define glob _ast_glob
-#undef globfree
-#define globfree _ast_globfree
-#undef memdup
-#define memdup _ast_memdup
-#undef memfatal
-#define memfatal _ast_memfatal
-#undef memhash
-#define memhash _ast_memhash
-#undef memsum
-#define memsum _ast_memsum
-#undef mkstemp
-#define mkstemp _ast_mkstemp
-extern __MANGLE__ int mkstemp __PROTO__((char*));
-#undef mktemp
-#define mktemp _ast_mktemp
-extern __MANGLE__ char* mktemp __PROTO__((char*));
-#undef mktime
-#define mktime _ast_mktime
-#undef nftw
-#define nftw _ast_nftw
-#undef optctx
-#define optctx _ast_optctx
-#undef optesc
-#define optesc _ast_optesc
-#undef optget
-#define optget _ast_optget
-#undef opthelp
-#define opthelp _ast_opthelp
-#undef optjoin
-#define optjoin _ast_optjoin
-#undef optstr
-#define optstr _ast_optstr
-#undef optusage
-#define optusage _ast_optusage
-#undef pathaccess
-#define pathaccess _ast_pathaccess
-#undef pathbin
-#define pathbin _ast_pathbin
-#undef pathcanon
-#define pathcanon _ast_pathcanon
-#undef pathcat
-#define pathcat _ast_pathcat
-#undef pathcd
-#define pathcd _ast_pathcd
-#undef pathcheck
-#define pathcheck _ast_pathcheck
-#undef pathexists
-#define pathexists _ast_pathexists
-#undef pathfind
-#define pathfind _ast_pathfind
-#undef pathgetlink
-#define pathgetlink _ast_pathgetlink
-#undef pathinclude
-#define pathinclude _ast_pathinclude
-#undef pathkey
-#define pathkey _ast_pathkey
-#undef pathnative
-#define pathnative _ast_pathnative
-#undef pathpath
-#define pathpath _ast_pathpath
-#undef pathposix
-#define pathposix _ast_pathposix
-#undef pathprobe
-#define pathprobe _ast_pathprobe
-#undef pathprog
-#define pathprog _ast_pathprog
-#undef pathrepl
-#define pathrepl _ast_pathrepl
-#undef pathsetlink
-#define pathsetlink _ast_pathsetlink
-#undef pathshell
-#define pathshell _ast_pathshell
-#undef pathstat
-#define pathstat _ast_pathstat
-#undef pathtemp
-#define pathtemp _ast_pathtemp
-#undef pathtmp
-#define pathtmp _ast_pathtmp
-#undef procclose
-#define procclose _ast_procclose
-#undef procfree
-#define procfree _ast_procfree
-#undef procopen
-#define procopen _ast_procopen
-#undef procrun
-#define procrun _ast_procrun
-#undef putenv
-#define putenv _ast_putenv
-#undef re_comp
-#define re_comp _ast_re_comp
-#undef re_exec
-#define re_exec _ast_re_exec
-#undef realpath
-#define realpath _ast_realpath
-extern __MANGLE__ char* realpath __PROTO__((const char*, char*));
-#undef regaddclass
-#define regaddclass _ast_regaddclass
-#undef regalloc
-#define regalloc _ast_regalloc
-#undef regcache
-#define regcache _ast_regcache
-#undef regclass
-#define regclass _ast_regclass
-#undef regcmp
-#define regcmp _ast_regcmp
-#undef regcollate
-#define regcollate _ast_regcollate
-#undef regcomb
-#define regcomb _ast_regcomb
-#undef regcomp
-#define regcomp _ast_regcomp
-#undef regdecomp
-#define regdecomp _ast_regdecomp
-#undef regdup
-#define regdup _ast_regdup
-#undef regerror
-#define regerror _ast_regerror
-#undef regex
-#define regex _ast_regex
-#undef regexec
-#define regexec _ast_regexec
-#undef regfatal
-#define regfatal _ast_regfatal
-#undef regfatalpat
-#define regfatalpat _ast_regfatalpat
-#undef regfree
-#define regfree _ast_regfree
-#undef regncomp
-#define regncomp _ast_regncomp
-#undef regnexec
-#define regnexec _ast_regnexec
-#undef regrecord
-#define regrecord _ast_regrecord
-#undef regrexec
-#define regrexec _ast_regrexec
-#undef regstat
-#define regstat _ast_regstat
-#undef regsub
-#define regsub _ast_regsub
-#undef regsubcomp
-#define regsubcomp _ast_regsubcomp
-#undef regsubexec
-#define regsubexec _ast_regsubexec
-#undef regsubflags
-#define regsubflags _ast_regsubflags
-#undef regsubfree
-#define regsubfree _ast_regsubfree
-#undef remove
-#define remove _ast_remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#undef resolvepath
-#define resolvepath _ast_resolvepath
-extern __MANGLE__ int resolvepath __PROTO__((const char*, char*, size_t));
-#undef setenv
-#define setenv _ast_setenv
-extern __MANGLE__ int setenv __PROTO__((const char*, const char*, int));
-#undef setenviron
-#define setenviron _ast_setenviron
-#undef sigcritical
-#define sigcritical _ast_sigcritical
-#undef signal
-#define signal _ast_signal
-#undef sigunblock
-#define sigunblock _ast_sigunblock
-#undef stracmp
-#define stracmp _ast_stracmp
-#undef strcopy
-#define strcopy _ast_strcopy
-#undef strelapsed
-#define strelapsed _ast_strelapsed
-#undef stresc
-#define stresc _ast_stresc
-#undef streval
-#define streval _ast_streval
-#undef strexpr
-#define strexpr _ast_strexpr
-#undef strftime
-#define strftime _ast_strftime
-#undef strgid
-#define strgid _ast_strgid
-#undef strgrpmatch
-#define strgrpmatch _ast_strgrpmatch
-#undef strhash
-#define strhash _ast_strhash
-#undef strkey
-#define strkey _ast_strkey
-#undef strlcat
-#define strlcat _ast_strlcat
-extern __MANGLE__ size_t strlcat __PROTO__((char*, const char*, size_t));
-#undef strlcpy
-#define strlcpy _ast_strlcpy
-extern __MANGLE__ size_t strlcpy __PROTO__((char*, const char*, size_t));
-#undef strlook
-#define strlook _ast_strlook
-#undef strmatch
-#define strmatch _ast_strmatch
-#undef strmode
-#define strmode _ast_strmode
-#undef strnacmp
-#define strnacmp _ast_strnacmp
-#undef strncopy
-#define strncopy _ast_strncopy
-#undef strntod
-#define strntod _ast_strntod
-#undef strntol
-#define strntol _ast_strntol
-#undef strntold
-#define strntold _ast_strntold
-#undef strntoll
-#define strntoll _ast_strntoll
-#undef strntoul
-#define strntoul _ast_strntoul
-#undef strntoull
-#define strntoull _ast_strntoull
-#undef stropt
-#define stropt _ast_stropt
-#undef strperm
-#define strperm _ast_strperm
-#undef strpsearch
-#define strpsearch _ast_strpsearch
-#undef strptime
-#define strptime _ast_strptime
-#undef strsearch
-#define strsearch _ast_strsearch
-#undef strsort
-#define strsort _ast_strsort
-#undef strsubmatch
-#define strsubmatch _ast_strsubmatch
-#undef strsum
-#define strsum _ast_strsum
-#undef strtape
-#define strtape _ast_strtape
-#undef strtoip4
-#define strtoip4 _ast_strtoip4
-#undef strton
-#define strton _ast_strton
-#undef strtonll
-#define strtonll _ast_strtonll
-#undef struid
-#define struid _ast_struid
-#undef struniq
-#define struniq _ast_struniq
-#undef system
-#define system _ast_system
-extern __MANGLE__ int system __PROTO__((const char*));
-#undef tempnam
-#define tempnam _ast_tempnam
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-#undef tmpnam
-#define tmpnam _ast_tmpnam
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-#undef touch
-#define touch _ast_touch
-#undef wordexp
-#define wordexp _ast_wordexp
-#undef wordfree
-#define wordfree _ast_wordfree
-#undef unsetenv
-#define unsetenv _ast_unsetenv
-
-/* cannot override local malloc */
-#define _map_malloc 1
-#undef calloc
-#define calloc _ast_calloc
-extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
-#undef cfree
-#define cfree _ast_cfree
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-#undef free
-#define free _ast_free
-extern __MANGLE__ void free __PROTO__((__V_*));
-#undef malloc
-#define malloc _ast_malloc
-extern __MANGLE__ __V_* malloc __PROTO__((size_t));
-#undef memalign
-#define memalign _ast_memalign
-extern __MANGLE__ __V_* memalign __PROTO__((size_t, size_t));
-#undef realloc
-#define realloc _ast_realloc
-extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
-#undef strdup
-#define strdup _ast_strdup
-extern __MANGLE__ char* strdup __PROTO__((const char*));
-#undef valloc
-#define valloc _ast_valloc
-extern __MANGLE__ __V_* valloc __PROTO__((size_t));
-#undef strtol
-#define strtol _ast_strtol
-#undef strtoul
-#define strtoul _ast_strtoul
-#undef strtoll
-#define strtoll _ast_strtoll
-#undef strtoull
-#define strtoull _ast_strtoull
-#undef strtod
-#define strtod _ast_strtod
-#undef strtold
-#define strtold _ast_strtold
-extern __MANGLE__ long strtol __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned long strtoul __PROTO__((const char*, char**, int));
-extern __MANGLE__ double strtod __PROTO__((const char*, char**));
-#if !_UWIN
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
-extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_standards.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_standards.h
deleted file mode 100644
index 100a7e8818..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_standards.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_sys.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_sys.h
deleted file mode 100644
index 6d724f0a54..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_sys.h
+++ /dev/null
@@ -1,150 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
-#ifndef _AST_SYS_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_SYS_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#if __mips == 2 && !defined(_NO_LARGEFILE64_SOURCE)
-#define _NO_LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_NO_LARGEFILE64_SOURCE) && _typ_off64_t && _lib_lseek64 && _lib_stat64
-#if !defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#else
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#undef _typ_off64_t
-#undef _typ_struct_dirent64
-#undef _lib_creat64
-#undef _lib_fstat64
-#undef _lib_fstatvfs64
-#undef _lib_ftruncate64
-#undef _lib_lseek64
-#undef _lib_lstat64
-#undef _lib_mmap64
-#undef _lib_open64
-#undef _lib_readdir64
-#undef _lib_stat64
-#undef _lib_statvfs64
-#undef _lib_truncate64
-#endif
-#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
-#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
-#endif
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <locale.h>
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _typ_dev_t 1 /* dev_t is a type */
-#define _typ_nlink_t 1 /* nlink_t is a type */
-#define _typ_gid_t 1 /* gid_t is a type */
-#define _typ_mode_t 1 /* mode_t is a type */
-#define _typ_uid_t 1 /* uid_t is a type */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _typ_wchar_t 1 /* wchar_t is a type */
-#define _typ_pid_t 1 /* pid_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _typ_wint_t 1 /* wint_t is a type */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _typ_socklen_t 1 /* socklen_t is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_ino_t 1 /* ino_t is a type */
-#define _typ_off_t 1 /* off_t is a type */
-#define _typ_ptrdiff_t 1 /* ptrdiff_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#define _typ_div_t 1 /* div_t is a type */
-#define _typ_ldiv_t 1 /* ldiv_t is a type */
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
-extern __MANGLE__ pid_t spawnveg __PROTO__((const char*, char* const[], char* const[], pid_t));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#if !defined(va_start)
-#if defined(__STDARG__)
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/ast_wchar.h b/usr/src/lib/libast/amd64/src/lib/libast/ast_wchar.h
deleted file mode 100644
index 388a042950..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/ast_wchar.h
+++ /dev/null
@@ -1,187 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_wchar_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */
-#define _lib_wctomb 1 /* wctomb() in default lib(s) */
-#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */
-#define _lib_wcslen 1 /* wcslen() in default lib(s) */
-#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */
-#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */
-#define _lib_towlower 1 /* towlower() in default lib(s) */
-#define _lib_towupper 1 /* towupper() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_mbstate_t 1 /* mbstate_t is a type */
-#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */
-#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */
-#ifndef _SFSTDIO_H
-#include <ast_common.h>
-#include <stdio.h>
-#endif
-#if _hdr_wchar && defined(_nxt_wchar)
-#include <../include/wchar.h> /* the native wchar.h */
-#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
-
-#ifndef WEOF
-#define WEOF (-1)
-#endif
-
-#undef fgetwc
-#undef fgetws
-#undef fputwc
-#undef fputws
-#undef getwc
-#undef getwchar
-#undef getws
-#undef putwc
-#undef putwchar
-#undef ungetwc
-
-#define fgetwc _ast_fgetwc
-#define fgetws _ast_fgetws
-#define fputwc _ast_fputwc
-#define fputws _ast_fputws
-#define fwide _ast_fwide
-#define fwprintf _ast_fwprintf
-#define fwscanf _ast_fwscanf
-#define getwc _ast_getwc
-#define getwchar _ast_getwchar
-#define getws _ast_getws
-#define putwc _ast_putwc
-#define putwchar _ast_putwchar
-#define swprintf _ast_swprintf
-#define swscanf _ast_swscanf
-#define ungetwc _ast_ungetwc
-#define vfwprintf _ast_vfwprintf
-#define vfwscanf _ast_vfwscanf
-#define vswprintf _ast_vswprintf
-#define vswscanf _ast_vswscanf
-#define vwprintf _ast_vwprintf
-#define vwscanf _ast_vwscanf
-#define wprintf _ast_wprintf
-#define wscanf _ast_wscanf
-
-#if !_typ_mbstate_t
-#undef _typ_mbstate_t
-#define _typ_mbstate_t 1
-typedef char mbstate_t;
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_mbstowcs
-extern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t));
-#endif
-#if !_lib_wctomb
-extern __MANGLE__ int wctomb __PROTO__((char*, wchar_t));
-#endif
-#if !_lib_wcrtomb
-extern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
-#endif
-#if !_lib_wcslen
-extern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*));
-#endif
-#if !_lib_wcstombs
-extern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t));
-#endif
-
-extern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ wint_t fgetwc __PROTO__((FILE*));
-extern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*));
-extern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*));
-extern __MANGLE__ int fwide __PROTO__((FILE*, int));
-extern __MANGLE__ wint_t getwc __PROTO__((FILE*));
-extern __MANGLE__ wint_t getwchar __PROTO__((void));
-extern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*));
-extern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ wint_t putwchar __PROTO__((wchar_t));
-extern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
-extern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
-extern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*));
-extern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
-extern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
-extern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...));
-extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/lc.h b/usr/src/lib/libast/amd64/src/lib/libast/lc.h
deleted file mode 100644
index 65fdab45ab..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/lc.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated by ./lcgen : : */
-
-
-#ifndef _LC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LC_H 1
-
-#include <ast.h>
-
-#define LC_abbreviated 0x00001
-#define LC_checked 0x00002
-#define LC_debug 0x00004
-#define LC_default 0x00008
-#define LC_defined 0x00010
-#define LC_local 0x00020
-#define LC_primary 0x00040
-#define LC_qualified 0x00080
-#define LC_undefined 0x00100
-#define LC_utf8 0x00200
-#define LC_verbose 0x00400
-#define LC_setlocale 0x10000
-#define LC_setenv 0x20000
-#define LC_user 0x40000
-#define LC_language_attribute_max 2
-#define LC_territory_language_max 4
-
-struct Lc_s;
-
-typedef struct Lc_info_s
-{
- const struct Lc_s* lc;
- unsigned long number;
- __V_* data;
-} Lc_info_t;
-
-typedef struct Lc_attribute_s
-{
- const char* name;
- unsigned long flags;
- unsigned long index;
-} Lc_attribute_t;
-
-typedef struct Lc_charset_s
-{
- const char* code;
- const char* alternates;
- const char* ms;
- unsigned long index;
-} Lc_charset_t;
-
-typedef struct Lc_language_s
-{
- const char* code;
- const char* name;
- const char* alternates;
- const Lc_charset_t* charset;
- unsigned long flags;
- unsigned long index;
- const Lc_attribute_t* attributes[LC_language_attribute_max];
-} Lc_language_t;
-
-typedef struct Lc_territory_s
-{
- const char* code;
- const char* name;
- unsigned long flags;
- unsigned long index;
- const Lc_language_t* languages[LC_territory_language_max];
-#ifdef _LC_TERRITORY_PRIVATE_
- _LC_TERRITORY_PRIVATE_
-#endif
-} Lc_territory_t;
-
-typedef struct Lc_map_s
-{
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_t* attribute;
-} Lc_map_t;
-
-typedef struct Lc_attribute_list_s
-{
- struct Lc_attribute_list_s* next;
- const Lc_attribute_t* attribute;
-} Lc_attribute_list_t;
-
-typedef struct Lc_s
-{
- const char* name;
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_list_t* attributes;
- unsigned long flags;
- unsigned long index;
-#ifdef _LC_PRIVATE_
- _LC_PRIVATE_
-#endif
-} Lc_t;
-
-struct Lc_category_s;
-
-typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
-
-typedef struct Lc_category_s
-{
- const char* name;
- int external;
- int internal;
- Lc_category_set_f setf;
- Lc_t* prev;
- unsigned int flags;
-} Lc_category_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
-extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
-extern __MANGLE__ int lcindex __PROTO__((int, int));
-extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
-extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
-extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/amd64/src/lib/libast/preroot.h b/usr/src/lib/libast/amd64/src/lib/libast/preroot.h
deleted file mode 100644
index fcb123549d..0000000000
--- a/usr/src/lib/libast/amd64/src/lib/libast/preroot.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/common/cdt/dtextract.c b/usr/src/lib/libast/common/cdt/dtextract.c
deleted file mode 100644
index f6ba23ead2..0000000000
--- a/usr/src/lib/libast/common/cdt/dtextract.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Extract objects of a dictionary.
-**
-** Written by Kiem-Phong Vo (5/25/96).
-*/
-
-#if __STD_C
-Dtlink_t* dtextract(reg Dt_t* dt)
-#else
-Dtlink_t* dtextract(dt)
-reg Dt_t* dt;
-#endif
-{
- reg Dtlink_t *list, **s, **ends;
-
- if(dt->data->type&(DT_OSET|DT_OBAG) )
- list = dt->data->here;
- else if(dt->data->type&(DT_SET|DT_BAG))
- { list = dtflatten(dt);
- for(ends = (s = dt->data->htab) + dt->data->ntab; s < ends; ++s)
- *s = NIL(Dtlink_t*);
- }
- else /*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/
- { list = dt->data->head;
- dt->data->head = NIL(Dtlink_t*);
- }
-
- dt->data->type &= ~DT_FLATTEN;
- dt->data->size = 0;
- dt->data->here = NIL(Dtlink_t*);
-
- return list;
-}
diff --git a/usr/src/lib/libast/common/cdt/dtflatten.c b/usr/src/lib/libast/common/cdt/dtflatten.c
deleted file mode 100644
index 68aa5cdc36..0000000000
--- a/usr/src/lib/libast/common/cdt/dtflatten.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Flatten a dictionary into a linked list.
-** This may be used when many traversals are likely.
-**
-** Written by Kiem-Phong Vo (5/25/96).
-*/
-
-#if __STD_C
-Dtlink_t* dtflatten(Dt_t* dt)
-#else
-Dtlink_t* dtflatten(dt)
-Dt_t* dt;
-#endif
-{
- reg Dtlink_t *t, *r, *list, *last, **s, **ends;
-
- /* already flattened */
- if(dt->data->type&DT_FLATTEN )
- return dt->data->here;
-
- list = last = NIL(Dtlink_t*);
- if(dt->data->type&(DT_SET|DT_BAG))
- { for(ends = (s = dt->data->htab) + dt->data->ntab; s < ends; ++s)
- { if((t = *s) )
- { if(last)
- last->right = t;
- else list = last = t;
- while(last->right)
- last = last->right;
- *s = last;
- }
- }
- }
- else if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE) )
- list = dt->data->head;
- else if((r = dt->data->here) ) /*if(dt->data->type&(DT_OSET|DT_OBAG))*/
- { while((t = r->left) )
- RROTATE(r,t);
- for(list = last = r, r = r->right; r; last = r, r = r->right)
- { if((t = r->left) )
- { do RROTATE(r,t);
- while((t = r->left) );
-
- last->right = r;
- }
- }
- }
-
- dt->data->here = list;
- dt->data->type |= DT_FLATTEN;
-
- return list;
-}
diff --git a/usr/src/lib/libast/common/cdt/dthash.c b/usr/src/lib/libast/common/cdt/dthash.c
deleted file mode 100644
index 36797d1a06..0000000000
--- a/usr/src/lib/libast/common/cdt/dthash.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Hash table.
-** dt: dictionary
-** obj: what to look for
-** type: type of search
-**
-** Written by Kiem-Phong Vo (05/25/96)
-*/
-
-/* resize the hash table */
-#if __STD_C
-static void dthtab(Dt_t* dt)
-#else
-static void dthtab(dt)
-Dt_t* dt;
-#endif
-{
- reg Dtlink_t *t, *r, *p, **s, **hs, **is, **olds;
- int n, k;
-
- if(dt->data->minp > 0 && dt->data->ntab > 0) /* fixed table size */
- return;
- dt->data->minp = 0;
-
- n = dt->data->ntab;
- if(dt->disc && dt->disc->eventf &&
- (*dt->disc->eventf)(dt, DT_HASHSIZE, &n, dt->disc) > 0 )
- { if(n < 0) /* fix table size */
- { dt->data->minp = 1;
- if(dt->data->ntab > 0 )
- return;
- }
- else /* set a particular size */
- { for(k = 2; k < n; k *= 2)
- ;
- n = k;
- }
- }
- else n = 0;
-
- /* compute new table size */
- if(n <= 0)
- { if((n = dt->data->ntab) == 0)
- n = HSLOT;
- while(dt->data->size > HLOAD(n))
- n = HRESIZE(n);
- }
- if(n == dt->data->ntab)
- return;
-
- /* allocate new table */
- olds = dt->data->ntab == 0 ? NIL(Dtlink_t**) : dt->data->htab;
- if(!(s = (Dtlink_t**)(*dt->memoryf)(dt,olds,n*sizeof(Dtlink_t*),dt->disc)) )
- return;
- olds = s + dt->data->ntab;
- dt->data->htab = s;
- dt->data->ntab = n;
-
- /* rehash elements */
- for(hs = s+n-1; hs >= olds; --hs)
- *hs = NIL(Dtlink_t*);
- for(hs = s; hs < olds; ++hs)
- { for(p = NIL(Dtlink_t*), t = *hs; t; t = r)
- { r = t->right;
- if((is = s + HINDEX(n,t->hash)) == hs)
- p = t;
- else /* move to a new chain */
- { if(p)
- p->right = r;
- else *hs = r;
- t->right = *is; *is = t;
- }
- }
- }
-}
-
-#if __STD_C
-static Void_t* dthash(Dt_t* dt, reg Void_t* obj, int type)
-#else
-static Void_t* dthash(dt,obj,type)
-Dt_t* dt;
-reg Void_t* obj;
-int type;
-#endif
-{
- reg Dtlink_t *t, *r, *p;
- reg Void_t *k, *key;
- reg uint hsh;
- reg int lk, sz, ky;
- reg Dtcompar_f cmpf;
- reg Dtdisc_t* disc;
- reg Dtlink_t **s, **ends;
-
- UNFLATTEN(dt);
-
- /* initialize discipline data */
- disc = dt->disc; _DTDSC(disc,ky,sz,lk,cmpf);
- dt->type &= ~DT_FOUND;
-
- if(!obj)
- { if(type&(DT_NEXT|DT_PREV))
- goto end_walk;
-
- if(dt->data->size <= 0 || !(type&(DT_CLEAR|DT_FIRST|DT_LAST)) )
- return NIL(Void_t*);
-
- ends = (s = dt->data->htab) + dt->data->ntab;
- if(type&DT_CLEAR)
- { /* clean out all objects */
- for(; s < ends; ++s)
- { t = *s;
- *s = NIL(Dtlink_t*);
- if(!disc->freef && disc->link >= 0)
- continue;
- while(t)
- { r = t->right;
- if(disc->freef)
- (*disc->freef)(dt,_DTOBJ(t,lk),disc);
- if(disc->link < 0)
- (*dt->memoryf)(dt,(Void_t*)t,0,disc);
- t = r;
- }
- }
- dt->data->here = NIL(Dtlink_t*);
- dt->data->size = 0;
- dt->data->loop = 0;
- return NIL(Void_t*);
- }
- else /* computing the first/last object */
- { t = NIL(Dtlink_t*);
- while(s < ends && !t )
- t = (type&DT_LAST) ? *--ends : *s++;
- if(t && (type&DT_LAST))
- for(; t->right; t = t->right)
- ;
-
- dt->data->loop += 1;
- dt->data->here = t;
- return t ? _DTOBJ(t,lk) : NIL(Void_t*);
- }
- }
-
- /* allow apps to delete an object "actually" in the dictionary */
- if(dt->meth->type == DT_BAG && (type&(DT_DELETE|DT_DETACH)) )
- { if(!dtsearch(dt,obj) )
- return NIL(Void_t*);
-
- s = dt->data->htab + HINDEX(dt->data->ntab,dt->data->here->hash);
- r = NIL(Dtlink_t*);
- for(p = NIL(Dtlink_t*), t = *s; t; p = t, t = t->right)
- { if(_DTOBJ(t,lk) == obj) /* delete this specific object */
- goto do_delete;
- if(t == dt->data->here)
- r = p;
- }
-
- /* delete some matching object */
- p = r; t = dt->data->here;
- goto do_delete;
- }
-
- if(type&(DT_MATCH|DT_SEARCH|DT_INSERT|DT_ATTACH) )
- { key = (type&DT_MATCH) ? obj : _DTKEY(obj,ky,sz);
- hsh = _DTHSH(dt,key,disc,sz);
- goto do_search;
- }
- else if(type&(DT_RENEW|DT_VSEARCH) )
- { r = (Dtlink_t*)obj;
- obj = _DTOBJ(r,lk);
- key = _DTKEY(obj,ky,sz);
- hsh = r->hash;
- goto do_search;
- }
- else /*if(type&(DT_DELETE|DT_DETACH|DT_NEXT|DT_PREV))*/
- { if((t = dt->data->here) && _DTOBJ(t,lk) == obj)
- { hsh = t->hash;
- s = dt->data->htab + HINDEX(dt->data->ntab,hsh);
- p = NIL(Dtlink_t*);
- }
- else
- { key = _DTKEY(obj,ky,sz);
- hsh = _DTHSH(dt,key,disc,sz);
- do_search:
- t = dt->data->ntab <= 0 ? NIL(Dtlink_t*) :
- *(s = dt->data->htab + HINDEX(dt->data->ntab,hsh));
- for(p = NIL(Dtlink_t*); t; p = t, t = t->right)
- { if(hsh == t->hash)
- { k = _DTOBJ(t,lk); k = _DTKEY(k,ky,sz);
- if(_DTCMP(dt,key,k,disc,cmpf,sz) == 0)
- break;
- }
- }
- }
- }
-
- if(t) /* found matching object */
- dt->type |= DT_FOUND;
-
- if(type&(DT_MATCH|DT_SEARCH|DT_VSEARCH))
- { if(!t)
- return NIL(Void_t*);
- if(p && (dt->data->type&DT_SET) && dt->data->loop <= 0)
- { /* move-to-front heuristic */
- p->right = t->right;
- t->right = *s;
- *s = t;
- }
- dt->data->here = t;
- return _DTOBJ(t,lk);
- }
- else if(type&(DT_INSERT|DT_ATTACH))
- { if(t && (dt->data->type&DT_SET) )
- { dt->data->here = t;
- return _DTOBJ(t,lk);
- }
-
- if(disc->makef && (type&DT_INSERT) &&
- !(obj = (*disc->makef)(dt,obj,disc)) )
- return NIL(Void_t*);
- if(lk >= 0)
- r = _DTLNK(obj,lk);
- else
- { r = (Dtlink_t*)(*dt->memoryf)
- (dt,NIL(Void_t*),sizeof(Dthold_t),disc);
- if(r)
- ((Dthold_t*)r)->obj = obj;
- else
- { if(disc->makef && disc->freef && (type&DT_INSERT))
- (*disc->freef)(dt,obj,disc);
- return NIL(Void_t*);
- }
- }
- r->hash = hsh;
-
- /* insert object */
- do_insert:
- if((dt->data->size += 1) > HLOAD(dt->data->ntab) && dt->data->loop <= 0 )
- dthtab(dt);
- if(dt->data->ntab == 0)
- { dt->data->size -= 1;
- if(disc->freef && (type&DT_INSERT))
- (*disc->freef)(dt,obj,disc);
- if(disc->link < 0)
- (*disc->memoryf)(dt,(Void_t*)r,0,disc);
- return NIL(Void_t*);
- }
- s = dt->data->htab + HINDEX(dt->data->ntab,hsh);
- if(t)
- { r->right = t->right;
- t->right = r;
- }
- else
- { r->right = *s;
- *s = r;
- }
- dt->data->here = r;
- return obj;
- }
- else if(type&DT_NEXT)
- { if(t && !(p = t->right) )
- { for(ends = dt->data->htab+dt->data->ntab, s += 1; s < ends; ++s)
- if((p = *s) )
- break;
- }
- goto done_adj;
- }
- else if(type&DT_PREV)
- { if(t && !p)
- { if((p = *s) != t)
- { while(p->right != t)
- p = p->right;
- }
- else
- { p = NIL(Dtlink_t*);
- for(s -= 1, ends = dt->data->htab; s >= ends; --s)
- { if((p = *s) )
- { while(p->right)
- p = p->right;
- break;
- }
- }
- }
- }
- done_adj:
- if(!(dt->data->here = p) )
- { end_walk:
- if((dt->data->loop -= 1) < 0)
- dt->data->loop = 0;
- if(dt->data->size > HLOAD(dt->data->ntab) && dt->data->loop <= 0)
- dthtab(dt);
- return NIL(Void_t*);
- }
- else
- { dt->data->type |= DT_WALK;
- return _DTOBJ(p,lk);
- }
- }
- else if(type&DT_RENEW)
- { if(!t || (dt->data->type&DT_BAG) )
- goto do_insert;
- else
- { if(disc->freef)
- (*disc->freef)(dt,obj,disc);
- if(disc->link < 0)
- (*dt->memoryf)(dt,(Void_t*)r,0,disc);
- return t ? _DTOBJ(t,lk) : NIL(Void_t*);
- }
- }
- else /*if(type&(DT_DELETE|DT_DETACH))*/
- { /* take an element out of the dictionary */
- do_delete:
- if(!t)
- return NIL(Void_t*);
- else if(p)
- p->right = t->right;
- else if((p = *s) == t)
- p = *s = t->right;
- else
- { while(p->right != t)
- p = p->right;
- p->right = t->right;
- }
- obj = _DTOBJ(t,lk);
- dt->data->size -= 1;
- dt->data->here = p;
- if(disc->freef && (type&DT_DELETE))
- (*disc->freef)(dt,obj,disc);
- if(disc->link < 0)
- (*dt->memoryf)(dt,(Void_t*)t,0,disc);
- return obj;
- }
-}
-
-static Dtmethod_t _Dtset = { dthash, DT_SET };
-static Dtmethod_t _Dtbag = { dthash, DT_BAG };
-__DEFINE__(Dtmethod_t*,Dtset,&_Dtset);
-__DEFINE__(Dtmethod_t*,Dtbag,&_Dtbag);
-
-#ifndef KPVDEL /* for backward compatibility - remove next time */
-Dtmethod_t _Dthash = { dthash, DT_SET };
-__DEFINE__(Dtmethod_t*,Dthash,&_Dthash);
-#endif
-
-#ifdef NoF
-NoF(dthash)
-#endif
diff --git a/usr/src/lib/libast/common/cdt/dthdr.h b/usr/src/lib/libast/common/cdt/dthdr.h
deleted file mode 100644
index 74d417107c..0000000000
--- a/usr/src/lib/libast/common/cdt/dthdr.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _DTHDR_H
-#define _DTHDR_H 1
-#ifndef _BLD_cdt
-#define _BLD_cdt 1
-#endif
-
-/* Internal definitions for libcdt.
-** Written by Kiem-Phong Vo (5/25/96)
-*/
-
-#if _PACKAGE_ast
-#include <ast.h>
-#endif
-
-#include <cdt.h>
-
-/* short-hand notations */
-#define NIL(t) ((t)0)
-#define reg register
-#define uint unsigned int
-#define left hl._left
-#define hash hl._hash
-#define htab hh._htab
-#define head hh._head
-
-/* this must be disjoint from DT_METHODS */
-#define DT_FLATTEN 010000 /* dictionary already flattened */
-#define DT_WALK 020000 /* hash table being walked */
-
-/* how the Dt_t handle was allocated */
-#define DT_MALLOC 0
-#define DT_MEMORYF 1
-
-/* max search length before splaying */
-#define DT_MINP (sizeof(size_t)*8 - 2)
-
-/* hash start size and load factor */
-#define HSLOT (256)
-#define HRESIZE(n) ((n) << 1)
-#define HLOAD(s) ((s) << 1)
-#define HINDEX(n,h) ((h)&((n)-1))
-
-#define UNFLATTEN(dt) \
- ((dt->data->type&DT_FLATTEN) ? dtrestore(dt,NIL(Dtlink_t*)) : 0)
-
-/* tree rotation/linking functions */
-#define rrotate(x,y) ((x)->left = (y)->right, (y)->right = (x))
-#define lrotate(x,y) ((x)->right = (y)->left, (y)->left = (x))
-#define rlink(r,x) ((r) = (r)->left = (x) )
-#define llink(l,x) ((l) = (l)->right = (x) )
-
-#define RROTATE(x,y) (rrotate(x,y), (x) = (y))
-#define LROTATE(x,y) (lrotate(x,y), (x) = (y))
-
-#if !_PACKAGE_ast
-_BEGIN_EXTERNS_
-extern Void_t* malloc _ARG_((size_t));
-extern Void_t* realloc _ARG_((Void_t*, size_t));
-extern void free _ARG_((Void_t*));
-_END_EXTERNS_
-#endif
-
-#endif /* _DTHDR_H */
diff --git a/usr/src/lib/libast/common/cdt/dtlist.c b/usr/src/lib/libast/common/cdt/dtlist.c
deleted file mode 100644
index 3d2c9eb22b..0000000000
--- a/usr/src/lib/libast/common/cdt/dtlist.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* List, Stack, Queue.
-**
-** Written by Kiem-Phong Vo (05/25/96)
-*/
-
-#if __STD_C
-static Void_t* dtlist(reg Dt_t* dt, reg Void_t* obj, reg int type)
-#else
-static Void_t* dtlist(dt, obj, type)
-reg Dt_t* dt;
-reg Void_t* obj;
-reg int type;
-#endif
-{
- reg int lk, sz, ky;
- reg Dtcompar_f cmpf;
- reg Dtdisc_t* disc;
- reg Dtlink_t *r, *t;
- reg Void_t *key, *k;
-
- UNFLATTEN(dt);
- disc = dt->disc; _DTDSC(disc,ky,sz,lk,cmpf);
- dt->type &= ~DT_FOUND;
-
- if(!obj)
- { if(type&(DT_LAST|DT_FIRST) )
- { if((r = dt->data->head) )
- { if(type&DT_LAST)
- r = r->left;
- dt->data->here = r;
- }
- return r ? _DTOBJ(r,lk) : NIL(Void_t*);
- }
- else if(type&(DT_DELETE|DT_DETACH))
- { if((dt->data->type&DT_LIST) || !(r = dt->data->head))
- return NIL(Void_t*);
- else goto dt_delete;
- }
- else if(type&DT_CLEAR)
- { if(disc->freef || disc->link < 0)
- { for(r = dt->data->head; r; r = t)
- { t = r->right;
- if(disc->freef)
- (*disc->freef)(dt,_DTOBJ(r,lk),disc);
- if(disc->link < 0)
- (*dt->memoryf)(dt,(Void_t*)r,0,disc);
- }
- }
- dt->data->head = dt->data->here = NIL(Dtlink_t*);
- dt->data->size = 0;
- return NIL(Void_t*);
- }
- else return NIL(Void_t*);
- }
-
- if(type&(DT_INSERT|DT_ATTACH))
- { if(disc->makef && (type&DT_INSERT) &&
- !(obj = (*disc->makef)(dt,obj,disc)) )
- return NIL(Void_t*);
- if(lk >= 0)
- r = _DTLNK(obj,lk);
- else
- { r = (Dtlink_t*)(*dt->memoryf)
- (dt,NIL(Void_t*),sizeof(Dthold_t),disc);
- if(r)
- ((Dthold_t*)r)->obj = obj;
- else
- { if(disc->makef && disc->freef && (type&DT_INSERT))
- (*disc->freef)(dt,obj,disc);
- return NIL(Void_t*);
- }
- }
-
- if(dt->data->type&DT_LIST)
- { if((t = dt->data->here) && t != dt->data->head)
- { r->left = t->left;
- t->left->right = r;
- r->right = t;
- t->left = r;
- }
- else goto dt_stack;
- }
- else if(dt->data->type&DT_STACK)
- { dt_stack:
- r->right = t = dt->data->head;
- if(t)
- { r->left = t->left;
- t->left = r;
- }
- else r->left = r;
- dt->data->head = r;
- }
- else /* if(dt->data->type&DT_QUEUE) */
- { if((t = dt->data->head) )
- { t->left->right = r;
- r->left = t->left;
- t->left = r;
- }
- else
- { dt->data->head = r;
- r->left = r;
- }
- r->right = NIL(Dtlink_t*);
- }
-
- if(dt->data->size >= 0)
- dt->data->size += 1;
-
- dt->data->here = r;
- return _DTOBJ(r,lk);
- }
-
- if((type&DT_MATCH) || !(r = dt->data->here) || _DTOBJ(r,lk) != obj)
- { key = (type&DT_MATCH) ? obj : _DTKEY(obj,ky,sz);
- for(r = dt->data->head; r; r = r->right)
- { k = _DTOBJ(r,lk); k = _DTKEY(k,ky,sz);
- if(_DTCMP(dt,key,k,disc,cmpf,sz) == 0)
- break;
- }
- }
-
- if(!r)
- return NIL(Void_t*);
- dt->type |= DT_FOUND;
-
- if(type&(DT_DELETE|DT_DETACH))
- { dt_delete:
- if(r->right)
- r->right->left = r->left;
- if(r == (t = dt->data->head) )
- { dt->data->head = r->right;
- if(dt->data->head)
- dt->data->head->left = t->left;
- }
- else
- { r->left->right = r->right;
- if(r == t->left)
- t->left = r->left;
- }
-
- dt->data->here = r == dt->data->here ? r->right : NIL(Dtlink_t*);
- dt->data->size -= 1;
-
- obj = _DTOBJ(r,lk);
- if(disc->freef && (type&DT_DELETE))
- (*disc->freef)(dt,obj,disc);
- if(disc->link < 0)
- (*dt->memoryf)(dt,(Void_t*)r,0,disc);
- return obj;
- }
- else if(type&DT_NEXT)
- r = r->right;
- else if(type&DT_PREV)
- r = r == dt->data->head ? NIL(Dtlink_t*) : r->left;
-
- dt->data->here = r;
- return r ? _DTOBJ(r,lk) : NIL(Void_t*);
-}
-
-#ifndef KPVDEL /* to be remove next round */
-#define static
-#endif
-static Dtmethod_t _Dtlist = { dtlist, DT_LIST };
-static Dtmethod_t _Dtstack = { dtlist, DT_STACK };
-static Dtmethod_t _Dtqueue = { dtlist, DT_QUEUE };
-
-__DEFINE__(Dtmethod_t*,Dtlist,&_Dtlist);
-__DEFINE__(Dtmethod_t*,Dtstack,&_Dtstack);
-__DEFINE__(Dtmethod_t*,Dtqueue,&_Dtqueue);
-
-#ifdef NoF
-NoF(dtlist)
-#endif
diff --git a/usr/src/lib/libast/common/cdt/dtmethod.c b/usr/src/lib/libast/common/cdt/dtmethod.c
deleted file mode 100644
index 52fb2ef9fd..0000000000
--- a/usr/src/lib/libast/common/cdt/dtmethod.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Change search method.
-**
-** Written by Kiem-Phong Vo (05/25/96)
-*/
-
-#if __STD_C
-Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth)
-#else
-Dtmethod_t* dtmethod(dt, meth)
-Dt_t* dt;
-Dtmethod_t* meth;
-#endif
-{
- reg Dtlink_t *list, *r;
- reg Dtdisc_t* disc = dt->disc;
- reg Dtmethod_t* oldmeth = dt->meth;
-
- if(!meth || meth->type == oldmeth->type)
- return oldmeth;
-
- if(disc->eventf &&
- (*disc->eventf)(dt,DT_METH,(Void_t*)meth,disc) < 0)
- return NIL(Dtmethod_t*);
-
- dt->data->minp = 0;
-
- /* get the list of elements */
- list = dtflatten(dt);
-
- if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE) )
- dt->data->head = NIL(Dtlink_t*);
- else if(dt->data->type&(DT_SET|DT_BAG) )
- { if(dt->data->ntab > 0)
- (*dt->memoryf)(dt,(Void_t*)dt->data->htab,0,disc);
- dt->data->ntab = 0;
- dt->data->htab = NIL(Dtlink_t**);
- }
-
- dt->data->here = NIL(Dtlink_t*);
- dt->data->type = (dt->data->type&~(DT_METHODS|DT_FLATTEN)) | meth->type;
- dt->meth = meth;
- if(dt->searchf == oldmeth->searchf)
- dt->searchf = meth->searchf;
-
- if(meth->type&(DT_LIST|DT_STACK|DT_QUEUE) )
- { if(!(oldmeth->type&(DT_LIST|DT_STACK|DT_QUEUE)) )
- { if((r = list) )
- { reg Dtlink_t* t;
- for(t = r->right; t; r = t, t = t->right )
- t->left = r;
- list->left = r;
- }
- }
- dt->data->head = list;
- }
- else if(meth->type&(DT_OSET|DT_OBAG))
- { dt->data->size = 0;
- while(list)
- { r = list->right;
- (*meth->searchf)(dt,(Void_t*)list,DT_RENEW);
- list = r;
- }
- }
- else if(!((meth->type&DT_BAG) && (oldmeth->type&DT_SET)) )
- { int rehash;
- if((meth->type&(DT_SET|DT_BAG)) && !(oldmeth->type&(DT_SET|DT_BAG)))
- rehash = 1;
- else rehash = 0;
-
- dt->data->size = dt->data->loop = 0;
- while(list)
- { r = list->right;
- if(rehash)
- { reg Void_t* key = _DTOBJ(list,disc->link);
- key = _DTKEY(key,disc->key,disc->size);
- list->hash = _DTHSH(dt,key,disc,disc->size);
- }
- (void)(*meth->searchf)(dt,(Void_t*)list,DT_RENEW);
- list = r;
- }
- }
-
- return oldmeth;
-}
diff --git a/usr/src/lib/libast/common/cdt/dtopen.c b/usr/src/lib/libast/common/cdt/dtopen.c
deleted file mode 100644
index 47a05d77ba..0000000000
--- a/usr/src/lib/libast/common/cdt/dtopen.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-static char* Version = "\n@(#)$Id: cdt (AT&T Research) 2005-04-20 $\0\n";
-
-/* Make a new dictionary
-**
-** Written by Kiem-Phong Vo (5/25/96)
-*/
-
-#if __STD_C
-Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth)
-#else
-Dt_t* dtopen(disc, meth)
-Dtdisc_t* disc;
-Dtmethod_t* meth;
-#endif
-{
- Dt_t* dt = (Dt_t*)Version; /* shut-up unuse warning */
- reg int e;
- Dtdata_t* data;
-
- if(!disc || !meth)
- return NIL(Dt_t*);
-
- /* allocate space for dictionary */
- if(!(dt = (Dt_t*) malloc(sizeof(Dt_t))))
- return NIL(Dt_t*);
-
- /* initialize all absolutely private data */
- dt->searchf = NIL(Dtsearch_f);
- dt->meth = NIL(Dtmethod_t*);
- dt->disc = NIL(Dtdisc_t*);
- dtdisc(dt,disc,0);
- dt->type = DT_MALLOC;
- dt->nview = 0;
- dt->view = dt->walk = NIL(Dt_t*);
- dt->user = NIL(Void_t*);
-
- if(disc->eventf)
- { /* if shared/persistent dictionary, get existing data */
- data = NIL(Dtdata_t*);
- if((e = (*disc->eventf)(dt,DT_OPEN,(Void_t*)(&data),disc)) < 0)
- goto err_open;
- else if(e > 0)
- { if(data)
- { if(data->type&meth->type)
- goto done;
- else goto err_open;
- }
-
- if(!disc->memoryf)
- goto err_open;
-
- free((Void_t*)dt);
- if(!(dt = (*disc->memoryf)(0, 0, sizeof(Dt_t), disc)) )
- return NIL(Dt_t*);
- dt->searchf = NIL(Dtsearch_f);
- dt->meth = NIL(Dtmethod_t*);
- dt->disc = NIL(Dtdisc_t*);
- dtdisc(dt,disc,0);
- dt->type = DT_MEMORYF;
- dt->nview = 0;
- dt->view = dt->walk = NIL(Dt_t*);
- }
- }
-
- /* allocate sharable data */
- if(!(data = (Dtdata_t*)(dt->memoryf)(dt,NIL(Void_t*),sizeof(Dtdata_t),disc)) )
- { err_open:
- free((Void_t*)dt);
- return NIL(Dt_t*);
- }
-
- data->type = meth->type;
- data->here = NIL(Dtlink_t*);
- data->htab = NIL(Dtlink_t**);
- data->ntab = data->size = data->loop = 0;
- data->minp = 0;
-
-done:
- dt->data = data;
- dt->searchf = meth->searchf;
- dt->meth = meth;
-
- if(disc->eventf)
- (*disc->eventf)(dt, DT_ENDOPEN, (Void_t*)dt, disc);
-
- return dt;
-}
diff --git a/usr/src/lib/libast/common/cdt/dtrenew.c b/usr/src/lib/libast/common/cdt/dtrenew.c
deleted file mode 100644
index 9f88b1981f..0000000000
--- a/usr/src/lib/libast/common/cdt/dtrenew.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-
-/* Renew the object at the current finger.
-**
-** Written by Kiem-Phong Vo (5/25/96)
-*/
-
-#if __STD_C
-Void_t* dtrenew(Dt_t* dt, reg Void_t* obj)
-#else
-Void_t* dtrenew(dt, obj)
-Dt_t* dt;
-reg Void_t* obj;
-#endif
-{
- reg Void_t* key;
- reg Dtlink_t *e, *t, **s;
- reg Dtdisc_t* disc = dt->disc;
-
- UNFLATTEN(dt);
-
- if(!(e = dt->data->here) || _DTOBJ(e,disc->link) != obj)
- return NIL(Void_t*);
-
- if(dt->data->type&(DT_STACK|DT_QUEUE|DT_LIST))
- return obj;
- else if(dt->data->type&(DT_OSET|DT_OBAG) )
- { if(!e->right ) /* make left child the new root */
- dt->data->here = e->left;
- else /* make right child the new root */
- { dt->data->here = e->right;
-
- /* merge left subtree to right subtree */
- if(e->left)
- { for(t = e->right; t->left; t = t->left)
- ;
- t->left = e->left;
- }
- }
- }
- else /*if(dt->data->type&(DT_SET|DT_BAG))*/
- { s = dt->data->htab + HINDEX(dt->data->ntab,e->hash);
- if((t = *s) == e)
- *s = e->right;
- else
- { for(; t->right != e; t = t->right)
- ;
- t->right = e->right;
- }
- key = _DTKEY(obj,disc->key,disc->size);
- e->hash = _DTHSH(dt,key,disc,disc->size);
- dt->data->here = NIL(Dtlink_t*);
- }
-
- dt->data->size -= 1;
- return (*dt->meth->searchf)(dt,(Void_t*)e,DT_RENEW) ? obj : NIL(Void_t*);
-}
diff --git a/usr/src/lib/libast/common/cdt/dtrestore.c b/usr/src/lib/libast/common/cdt/dtrestore.c
deleted file mode 100644
index 088c453176..0000000000
--- a/usr/src/lib/libast/common/cdt/dtrestore.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Restore dictionary from given tree or list of elements.
-** There are two cases. If called from within, list is nil.
-** From without, list is not nil and data->size must be 0.
-**
-** Written by Kiem-Phong Vo (5/25/96)
-*/
-
-#if __STD_C
-int dtrestore(reg Dt_t* dt, reg Dtlink_t* list)
-#else
-int dtrestore(dt, list)
-reg Dt_t* dt;
-reg Dtlink_t* list;
-#endif
-{
- reg Dtlink_t *t, **s, **ends;
- reg int type;
- reg Dtsearch_f searchf = dt->meth->searchf;
-
- type = dt->data->type&DT_FLATTEN;
- if(!list) /* restoring a flattened dictionary */
- { if(!type)
- return -1;
- list = dt->data->here;
- }
- else /* restoring an extracted list of elements */
- { if(dt->data->size != 0)
- return -1;
- type = 0;
- }
- dt->data->type &= ~DT_FLATTEN;
-
- if(dt->data->type&(DT_SET|DT_BAG))
- { dt->data->here = NIL(Dtlink_t*);
- if(type) /* restoring a flattened dictionary */
- { for(ends = (s = dt->data->htab) + dt->data->ntab; s < ends; ++s)
- { if((t = *s) )
- { *s = list;
- list = t->right;
- t->right = NIL(Dtlink_t*);
- }
- }
- }
- else /* restoring an extracted list of elements */
- { dt->data->size = 0;
- while(list)
- { t = list->right;
- (*searchf)(dt,(Void_t*)list,DT_RENEW);
- list = t;
- }
- }
- }
- else
- { if(dt->data->type&(DT_OSET|DT_OBAG))
- dt->data->here = list;
- else /*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/
- { dt->data->here = NIL(Dtlink_t*);
- dt->data->head = list;
- }
- if(!type)
- dt->data->size = -1;
- }
-
- return 0;
-}
diff --git a/usr/src/lib/libast/common/cdt/dtsize.c b/usr/src/lib/libast/common/cdt/dtsize.c
deleted file mode 100644
index 791ccb4eff..0000000000
--- a/usr/src/lib/libast/common/cdt/dtsize.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Return the # of objects in the dictionary
-**
-** Written by Kiem-Phong Vo (5/25/96)
-*/
-
-#if __STD_C
-static int treecount(reg Dtlink_t* e)
-#else
-static int treecount(e)
-reg Dtlink_t* e;
-#endif
-{ return e ? treecount(e->left) + treecount(e->right) + 1 : 0;
-}
-
-#if __STD_C
-int dtsize(Dt_t* dt)
-#else
-int dtsize(dt)
-Dt_t* dt;
-#endif
-{
- reg Dtlink_t* t;
- reg int size;
-
- UNFLATTEN(dt);
-
- if(dt->data->size < 0) /* !(dt->data->type&(DT_SET|DT_BAG)) */
- { if(dt->data->type&(DT_OSET|DT_OBAG))
- dt->data->size = treecount(dt->data->here);
- else if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))
- { for(size = 0, t = dt->data->head; t; t = t->right)
- size += 1;
- dt->data->size = size;
- }
- }
-
- return dt->data->size;
-}
diff --git a/usr/src/lib/libast/common/cdt/dtstat.c b/usr/src/lib/libast/common/cdt/dtstat.c
deleted file mode 100644
index 964573f03d..0000000000
--- a/usr/src/lib/libast/common/cdt/dtstat.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Get statistics of a dictionary
-**
-** Written by Kiem-Phong Vo (5/25/96)
-*/
-
-#if __STD_C
-static void dttstat(Dtstat_t* ds, Dtlink_t* root, int depth, int* level)
-#else
-static void dttstat(ds,root,depth,level)
-Dtstat_t* ds;
-Dtlink_t* root;
-int depth;
-int* level;
-#endif
-{
- if(root->left)
- dttstat(ds,root->left,depth+1,level);
- if(root->right)
- dttstat(ds,root->right,depth+1,level);
- if(depth > ds->dt_n)
- ds->dt_n = depth;
- if(level)
- level[depth] += 1;
-}
-
-#if __STD_C
-static void dthstat(reg Dtdata_t* data, Dtstat_t* ds, reg int* count)
-#else
-static void dthstat(data, ds, count)
-reg Dtdata_t* data;
-Dtstat_t* ds;
-reg int* count;
-#endif
-{
- reg Dtlink_t* t;
- reg int n, h;
-
- for(h = data->ntab-1; h >= 0; --h)
- { n = 0;
- for(t = data->htab[h]; t; t = t->right)
- n += 1;
- if(count)
- count[n] += 1;
- else if(n > 0)
- { ds->dt_n += 1;
- if(n > ds->dt_max)
- ds->dt_max = n;
- }
- }
-}
-
-#if __STD_C
-int dtstat(reg Dt_t* dt, Dtstat_t* ds, int all)
-#else
-int dtstat(dt, ds, all)
-reg Dt_t* dt;
-Dtstat_t* ds;
-int all;
-#endif
-{
- reg int i;
- static int *Count, Size;
-
- UNFLATTEN(dt);
-
- ds->dt_n = ds->dt_max = 0;
- ds->dt_count = NIL(int*);
- ds->dt_size = dtsize(dt);
- ds->dt_meth = dt->data->type&DT_METHODS;
-
- if(!all)
- return 0;
-
- if(dt->data->type&(DT_SET|DT_BAG))
- { dthstat(dt->data,ds,NIL(int*));
- if(ds->dt_max+1 > Size)
- { if(Size > 0)
- free(Count);
- if(!(Count = (int*)malloc((ds->dt_max+1)*sizeof(int))) )
- return -1;
- Size = ds->dt_max+1;
- }
- for(i = ds->dt_max; i >= 0; --i)
- Count[i] = 0;
- dthstat(dt->data,ds,Count);
- }
- else if(dt->data->type&(DT_OSET|DT_OBAG))
- { if(dt->data->here)
- { dttstat(ds,dt->data->here,0,NIL(int*));
- if(ds->dt_n+1 > Size)
- { if(Size > 0)
- free(Count);
- if(!(Count = (int*)malloc((ds->dt_n+1)*sizeof(int))) )
- return -1;
- Size = ds->dt_n+1;
- }
-
- for(i = ds->dt_n; i >= 0; --i)
- Count[i] = 0;
- dttstat(ds,dt->data->here,0,Count);
- for(i = ds->dt_n; i >= 0; --i)
- if(Count[i] > ds->dt_max)
- ds->dt_max = Count[i];
- }
- }
- ds->dt_count = Count;
-
- return 0;
-}
diff --git a/usr/src/lib/libast/common/cdt/dttree.c b/usr/src/lib/libast/common/cdt/dttree.c
deleted file mode 100644
index 953904ecff..0000000000
--- a/usr/src/lib/libast/common/cdt/dttree.c
+++ /dev/null
@@ -1,391 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Ordered set/multiset
-** dt: dictionary being searched
-** obj: the object to look for.
-** type: search type.
-**
-** Written by Kiem-Phong Vo (5/25/96)
-*/
-
-#if __STD_C
-static Void_t* dttree(Dt_t* dt, Void_t* obj, int type)
-#else
-static Void_t* dttree(dt,obj,type)
-Dt_t* dt;
-Void_t* obj;
-int type;
-#endif
-{
- Dtlink_t *root, *t;
- int cmp, lk, sz, ky;
- Void_t *o, *k, *key;
- Dtlink_t *l, *r, *me, link;
- int n, minp, turn[DT_MINP];
- Dtcompar_f cmpf;
- Dtdisc_t* disc;
-
- UNFLATTEN(dt);
- disc = dt->disc; _DTDSC(disc,ky,sz,lk,cmpf);
- dt->type &= ~DT_FOUND;
-
- root = dt->data->here;
- if(!obj)
- { if(!root || !(type&(DT_CLEAR|DT_FIRST|DT_LAST)) )
- return NIL(Void_t*);
-
- if(type&DT_CLEAR) /* delete all objects */
- { if(disc->freef || disc->link < 0)
- { do
- { while((t = root->left) )
- RROTATE(root,t);
- t = root->right;
- if(disc->freef)
- (*disc->freef)(dt,_DTOBJ(root,lk),disc);
- if(disc->link < 0)
- (*dt->memoryf)(dt,(Void_t*)root,0,disc);
- } while((root = t) );
- }
-
- dt->data->size = 0;
- dt->data->here = NIL(Dtlink_t*);
- return NIL(Void_t*);
- }
- else /* computing largest/smallest element */
- { if(type&DT_LAST)
- { while((t = root->right) )
- LROTATE(root,t);
- }
- else /* type&DT_FIRST */
- { while((t = root->left) )
- RROTATE(root,t);
- }
-
- dt->data->here = root;
- return _DTOBJ(root,lk);
- }
- }
-
- /* note that link.right is LEFT tree and link.left is RIGHT tree */
- l = r = &link;
-
- /* allow apps to delete an object "actually" in the dictionary */
- if(dt->meth->type == DT_OBAG && (type&(DT_DELETE|DT_DETACH)) )
- { key = _DTKEY(obj,ky,sz);
- for(o = dtsearch(dt,obj); o; o = dtnext(dt,o) )
- { k = _DTKEY(o,ky,sz);
- if(_DTCMP(dt,key,k,disc,cmpf,sz) != 0)
- break;
- if(o == obj)
- { root = dt->data->here;
- l->right = root->left;
- r->left = root->right;
- goto dt_delete;
- }
- }
- }
-
- if(type&(DT_MATCH|DT_SEARCH|DT_INSERT|DT_ATTACH))
- { key = (type&DT_MATCH) ? obj : _DTKEY(obj,ky,sz);
- if(root)
- goto do_search;
- }
- else if(type&DT_RENEW)
- { me = (Dtlink_t*)obj;
- obj = _DTOBJ(me,lk);
- key = _DTKEY(obj,ky,sz);
- if(root)
- goto do_search;
- }
- else if(root && _DTOBJ(root,lk) != obj)
- { key = _DTKEY(obj,ky,sz);
- do_search:
- if(dt->meth->type == DT_OSET &&
- (minp = dt->data->minp) != 0 && (type&(DT_MATCH|DT_SEARCH)) )
- { /* simple search, note that minp should be even */
- for(t = root, n = 0; n < minp; ++n)
- { k = _DTOBJ(t,lk); k = _DTKEY(k,ky,sz);
- if((cmp = _DTCMP(dt,key,k,disc,cmpf,sz)) == 0)
- return _DTOBJ(t,lk);
- else
- { turn[n] = cmp;
- if(!(t = cmp < 0 ? t->left : t->right) )
- return NIL(Void_t*);
- }
- }
-
- /* exceed search length, top-down splay now */
- for(n = 0; n < minp; n += 2)
- { if(turn[n] < 0)
- { t = root->left;
- if(turn[n+1] < 0)
- { rrotate(root,t);
- rlink(r,t);
- root = t->left;
- }
- else
- { llink(l,t);
- rlink(r,root);
- root = t->right;
- }
- }
- else
- { t = root->right;
- if(turn[n+1] > 0)
- { lrotate(root,t);
- llink(l,t);
- root = t->right;
- }
- else
- { rlink(r,t);
- llink(l,root);
- root = t->left;
- }
- }
- }
- }
-
- while(1)
- { k = _DTOBJ(root,lk); k = _DTKEY(k,ky,sz);
- if((cmp = _DTCMP(dt,key,k,disc,cmpf,sz)) == 0)
- break;
- else if(cmp < 0)
- { if((t = root->left) )
- { k = _DTOBJ(t,lk); k = _DTKEY(k,ky,sz);
- if((cmp = _DTCMP(dt,key,k,disc,cmpf,sz)) < 0)
- { rrotate(root,t);
- rlink(r,t);
- if(!(root = t->left) )
- break;
- }
- else if(cmp == 0)
- { rlink(r,root);
- root = t;
- break;
- }
- else /* if(cmp > 0) */
- { llink(l,t);
- rlink(r,root);
- if(!(root = t->right) )
- break;
- }
- }
- else
- { rlink(r,root);
- root = NIL(Dtlink_t*);
- break;
- }
- }
- else /* if(cmp > 0) */
- { if((t = root->right) )
- { k = _DTOBJ(t,lk); k = _DTKEY(k,ky,sz);
- if((cmp = _DTCMP(dt,key,k,disc,cmpf,sz)) > 0)
- { lrotate(root,t);
- llink(l,t);
- if(!(root = t->right) )
- break;
- }
- else if(cmp == 0)
- { llink(l,root);
- root = t;
- break;
- }
- else /* if(cmp < 0) */
- { rlink(r,t);
- llink(l,root);
- if(!(root = t->left) )
- break;
- }
- }
- else
- { llink(l,root);
- root = NIL(Dtlink_t*);
- break;
- }
- }
- }
- }
-
- if(root)
- { /* found it, now isolate it */
- dt->type |= DT_FOUND;
- l->right = root->left;
- r->left = root->right;
-
- if(type&(DT_SEARCH|DT_MATCH))
- { has_root:
- root->left = link.right;
- root->right = link.left;
- if((dt->meth->type&DT_OBAG) && (type&(DT_SEARCH|DT_MATCH)) )
- { key = _DTOBJ(root,lk); key = _DTKEY(key,ky,sz);
- while((t = root->left) )
- { /* find max of left subtree */
- while((r = t->right) )
- LROTATE(t,r);
- root->left = t;
-
- /* now see if it's in the same group */
- k = _DTOBJ(t,lk); k = _DTKEY(k,ky,sz);
- if(_DTCMP(dt,key,k,disc,cmpf,sz) != 0)
- break;
- RROTATE(root,t);
- }
- }
- dt->data->here = root;
- return _DTOBJ(root,lk);
- }
- else if(type&DT_NEXT)
- { root->left = link.right;
- root->right = NIL(Dtlink_t*);
- link.right = root;
- dt_next:
- if((root = link.left) )
- { while((t = root->left) )
- RROTATE(root,t);
- link.left = root->right;
- goto has_root;
- }
- else goto no_root;
- }
- else if(type&DT_PREV)
- { root->right = link.left;
- root->left = NIL(Dtlink_t*);
- link.left = root;
- dt_prev:
- if((root = link.right) )
- { while((t = root->right) )
- LROTATE(root,t);
- link.right = root->left;
- goto has_root;
- }
- else goto no_root;
- }
- else if(type&(DT_DELETE|DT_DETACH))
- { /* taking an object out of the dictionary */
- dt_delete:
- obj = _DTOBJ(root,lk);
- if(disc->freef && (type&DT_DELETE))
- (*disc->freef)(dt,obj,disc);
- if(disc->link < 0)
- (*dt->memoryf)(dt,(Void_t*)root,0,disc);
- if((dt->data->size -= 1) < 0)
- dt->data->size = -1;
- goto no_root;
- }
- else if(type&(DT_INSERT|DT_ATTACH))
- { if(dt->meth->type&DT_OSET)
- goto has_root;
- else
- { root->left = NIL(Dtlink_t*);
- root->right = link.left;
- link.left = root;
- goto dt_insert;
- }
- }
- else if(type&DT_RENEW) /* a duplicate */
- { if(dt->meth->type&DT_OSET)
- { if(disc->freef)
- (*disc->freef)(dt,obj,disc);
- if(disc->link < 0)
- (*dt->memoryf)(dt,(Void_t*)me,0,disc);
- }
- else
- { me->left = NIL(Dtlink_t*);
- me->right = link.left;
- link.left = me;
- dt->data->size += 1;
- }
- goto has_root;
- }
- }
- else
- { /* not found, finish up LEFT and RIGHT trees */
- r->left = NIL(Dtlink_t*);
- l->right = NIL(Dtlink_t*);
-
- if(type&DT_NEXT)
- goto dt_next;
- else if(type&DT_PREV)
- goto dt_prev;
- else if(type&(DT_SEARCH|DT_MATCH))
- { no_root:
- while((t = r->left) )
- r = t;
- r->left = link.right;
- dt->data->here = link.left;
- return (type&DT_DELETE) ? obj : NIL(Void_t*);
- }
- else if(type&(DT_INSERT|DT_ATTACH))
- { dt_insert:
- if(disc->makef && (type&DT_INSERT))
- obj = (*disc->makef)(dt,obj,disc);
- if(obj)
- { if(lk >= 0)
- root = _DTLNK(obj,lk);
- else
- { root = (Dtlink_t*)(*dt->memoryf)
- (dt,NIL(Void_t*),sizeof(Dthold_t),disc);
- if(root)
- ((Dthold_t*)root)->obj = obj;
- else if(disc->makef && disc->freef &&
- (type&DT_INSERT))
- (*disc->freef)(dt,obj,disc);
- }
- }
- if(root)
- { if(dt->data->size >= 0)
- dt->data->size += 1;
- goto has_root;
- }
- else goto no_root;
- }
- else if(type&DT_RENEW)
- { root = me;
- dt->data->size += 1;
- goto has_root;
- }
- else /*if(type&DT_DELETE)*/
- { obj = NIL(Void_t*);
- goto no_root;
- }
- }
-
- return NIL(Void_t*);
-}
-
-/* make this method available */
-static Dtmethod_t _Dtoset = { dttree, DT_OSET };
-static Dtmethod_t _Dtobag = { dttree, DT_OBAG };
-__DEFINE__(Dtmethod_t*,Dtoset,&_Dtoset);
-__DEFINE__(Dtmethod_t*,Dtobag,&_Dtobag);
-
-#ifndef KPVDEL /* backward compatibility - delete next time around */
-Dtmethod_t _Dttree = { dttree, DT_OSET };
-__DEFINE__(Dtmethod_t*,Dtorder,&_Dttree);
-__DEFINE__(Dtmethod_t*,Dttree,&_Dttree);
-#endif
-
-#ifdef NoF
-NoF(dttree)
-#endif
diff --git a/usr/src/lib/libast/common/cdt/dttreeset.c b/usr/src/lib/libast/common/cdt/dttreeset.c
deleted file mode 100644
index 80d2f40945..0000000000
--- a/usr/src/lib/libast/common/cdt/dttreeset.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include "dthdr.h"
-
-/* Set attributes of a tree.
-**
-** Written by Kiem-Phong Vo (09/17/2001)
-*/
-
-#if __STD_C
-static Dtlink_t* treebalance(Dtlink_t* list, int size)
-#else
-static Dtlink_t* treebalance(list, size)
-Dtlink_t* list;
-int size;
-#endif
-{
- int n;
- Dtlink_t *l, *mid;
-
- if(size <= 2)
- return list;
-
- for(l = list, n = size/2 - 1; n > 0; n -= 1)
- l = l->right;
-
- mid = l->right; l->right = NIL(Dtlink_t*);
- mid->left = treebalance(list, (n = size/2) );
- mid->right = treebalance(mid->right, size - (n + 1));
- return mid;
-}
-
-#if __STD_C
-int dttreeset(Dt_t* dt, int minp, int balance)
-#else
-int dttreeset(dt, minp, balance)
-Dt_t* dt;
-int minp;
-int balance;
-#endif
-{
- int size;
-
- if(dt->meth->type != DT_OSET)
- return -1;
-
- size = dtsize(dt);
-
- if(minp < 0)
- { for(minp = 0; minp < DT_MINP; ++minp)
- if((1 << minp) >= size)
- break;
- if(minp <= DT_MINP-4) /* use log(size) + 4 */
- minp += 4;
- }
-
- if((dt->data->minp = minp + (minp%2)) > DT_MINP)
- dt->data->minp = DT_MINP;
-
- if(balance)
- dt->data->here = treebalance(dtflatten(dt), size);
-
- return 0;
-}
diff --git a/usr/src/lib/libast/common/comp/setlocale.c b/usr/src/lib/libast/common/comp/setlocale.c
deleted file mode 100644
index 3d13013da2..0000000000
--- a/usr/src/lib/libast/common/comp/setlocale.c
+++ /dev/null
@@ -1,1184 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#pragma prototyped
-
-/*
- * setlocale() intercept
- * maintains a bitmask of non-default categories
- * and a permanent locale namespace for pointer comparison
- * and persistent private data for locale related functions
- */
-
-#include <ast_standards.h>
-
-#include "lclib.h"
-
-#include <ast_wchar.h>
-#include <ctype.h>
-#include <mc.h>
-#include <namval.h>
-
-#if ( _lib_wcwidth || _lib_wctomb ) && _hdr_wctype
-#include <wctype.h>
-#endif
-
-#if _lib_wcwidth
-#undef wcwidth
-#else
-#define wcwidth 0
-#endif
-
-#if _lib_wctomb
-#undef wctomb
-#else
-#define wctomb 0
-#endif
-
-#ifdef mblen
-#undef mblen
-extern int mblen(const char*, size_t);
-#endif
-
-#undef mbtowc
-#undef setlocale
-#undef strcmp
-#undef strcoll
-#undef strxfrm
-#undef valid
-
-#ifndef AST_LC_CANONICAL
-#define AST_LC_CANONICAL LC_abbreviated
-#endif
-
-#ifndef AST_LC_test
-#define AST_LC_test (1L<<27)
-#endif
-
-#if _UWIN
-
-#include <ast_windows.h>
-
-#undef _lib_setlocale
-#define _lib_setlocale 1
-
-#define setlocale(c,l) native_setlocale(c,l)
-
-extern char* uwin_setlocale(int, const char*);
-
-/*
- * convert locale to native locale name in buf
- */
-
-static char*
-native_locale(const char* locale, char* buf, size_t siz)
-{
- Lc_t* lc;
- const Lc_attribute_list_t* ap;
- int i;
- unsigned long lcid;
- unsigned long lang;
- unsigned long ctry;
- char lbuf[128];
- char cbuf[128];
-
- if (locale && *locale)
- {
- if (!(lc = lcmake(locale)))
- return 0;
- lang = lc->language->index;
- ctry = 0;
- for (ap = lc->attributes; ap; ap = ap->next)
- if (ctry = ap->attribute->index)
- break;
- if (!ctry)
- {
- for (i = 0; i < elementsof(lc->territory->languages); i++)
- if (lc->territory->languages[i] == lc->language)
- {
- ctry = lc->territory->indices[i];
- break;
- }
- if (!ctry)
- {
- if (!lang)
- return 0;
- ctry = SUBLANG_DEFAULT;
- }
- }
- lcid = MAKELCID(MAKELANGID(lang, ctry), SORT_DEFAULT);
- }
- else
- lcid = GetUserDefaultLCID();
- if (GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, lbuf, sizeof(lbuf)) <= 0 ||
- GetLocaleInfo(lcid, LOCALE_SENGCOUNTRY, cbuf, sizeof(cbuf)) <= 0)
- return 0;
- if (lc->charset->ms)
- sfsprintf(buf, siz, "%s_%s.%s", lbuf, cbuf, lc->charset->ms);
- else
- sfsprintf(buf, siz, "%s_%s", lbuf, cbuf);
- return buf;
-}
-
-/*
- * locale!=0 here
- */
-
-static char*
-native_setlocale(int category, const char* locale)
-{
- char* usr;
- char* sys;
- char buf[256];
-
- if (!(usr = native_locale(locale, buf, sizeof(buf))))
- return 0;
-
- /*
- * win32 doesn't have LC_MESSAGES
- */
-
- if (category == LC_MESSAGES)
- return (char*)locale;
- sys = uwin_setlocale(category, usr);
- if (ast.locale.set & AST_LC_debug)
- sfprintf(sfstderr, "locale uwin %17s %-24s %-24s\n", lc_categories[lcindex(category, 0)].name, usr, sys);
- return sys;
-}
-
-#else
-
-#define native_locale(a,b,c) ((char*)0)
-
-#endif
-
-/*
- * LC_COLLATE and LC_CTYPE native support
- */
-
-#if !_lib_mbtowc || MB_LEN_MAX <= 1
-#define mblen 0
-#define mbtowc 0
-#endif
-
-#if !_lib_strcoll
-#define strcoll 0
-#endif
-
-#if !_lib_strxfrm
-#define strxfrm 0
-#endif
-
-/*
- * LC_COLLATE and LC_CTYPE debug support
- *
- * mutibyte debug encoding
- *
- * DL0 [ '0' .. '4' ] c1 ... c4 DR0
- * DL1 [ '0' .. '4' ] c1 ... c4 DR1
- *
- * with these ligatures
- *
- * ch CH sst SST
- *
- * and private collation order
- *
- * wide character display width is the low order 3 bits
- * wctomb() uses DL1...DR1
- */
-
-#define DEBUG_MB_CUR_MAX 7
-
-#if DEBUG_MB_CUR_MAX < MB_LEN_MAX
-#undef DEBUG_MB_CUR_MAX
-#define DEBUG_MB_CUR_MAX MB_LEN_MAX
-#endif
-
-#define DL0 '<'
-#define DL1 0xab /* 8-bit mini << on xterm */
-#define DR0 '>'
-#define DR1 0xbb /* 8-bit mini >> on xterm */
-
-#define DB ((int)sizeof(wchar_t)*8-1)
-#define DC 7 /* wchar_t embedded char bits */
-#define DX (DB/DC) /* wchar_t max embedded chars */
-#define DZ (DB-DX*DC+1) /* wchar_t embedded size bits */
-#define DD 3 /* # mb delimiter chars <n...> */
-
-static unsigned char debug_order[] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31,
- 99, 100, 101, 102, 98, 103, 104, 105,
- 106, 107, 108, 43, 109, 44, 42, 110,
- 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 111, 112, 113, 114, 115, 116,
- 117, 71, 72, 73, 74, 75, 76, 77,
- 78, 79, 80, 81, 82, 83, 84, 85,
- 86, 87, 88, 89, 90, 91, 92, 93,
- 94, 95, 96, 118, 119, 120, 121, 97,
- 122, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 123, 124, 125, 126, 127,
- 128, 129, 130, 131, 132, 133, 134, 135,
- 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151,
- 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 165, 166, 167,
- 168, 169, 170, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199,
- 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215,
- 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255,
-};
-
-static int
-debug_mbtowc(register wchar_t* p, register const char* s, size_t n)
-{
- register const char* q;
- register const char* r;
- register int w;
- register int dr;
- wchar_t c;
-
- if (n < 1)
- return -1;
- if (!s || !*s)
- return 0;
- switch (((unsigned char*)s)[0])
- {
- case DL0:
- dr = DR0;
- break;
- case DL1:
- dr = DR1;
- break;
- default:
- if (p)
- *p = ((unsigned char*)s)[0] & ((1<<DC)-1);
- return 1;
- }
- if (n < 2)
- return -1;
- if ((w = ((unsigned char*)s)[1]) == ((unsigned char*)s)[0])
- {
- if (p)
- *p = w;
- return 2;
- }
- if (w < '0' || w > ('0' + DX))
- return -1;
- if ((w -= '0' - DD) > n)
- return -1;
- r = s + w - 1;
- q = s += 2;
- while (q < r && *q)
- q++;
- if (q != r || *((unsigned char*)q) != dr)
- return -1;
- if (p)
- {
- c = 0;
- while (--q >= s)
- {
- c <<= DC;
- c |= *((unsigned char*)q);
- }
- c <<= DZ;
- c |= w - DD;
- *p = c;
- }
- return w;
-}
-
-static int
-debug_wctomb(char* s, wchar_t c)
-{
- int w;
- int i;
- int k;
-
- w = 0;
- if (c >= 0 && c <= UCHAR_MAX)
- {
- w++;
- if (s)
- *s = c;
- }
- else if ((i = c & ((1<<DZ)-1)) > DX)
- return -1;
- else
- {
- w++;
- if (s)
- *s++ = DL1;
- c >>= DZ;
- w++;
- if (s)
- *s++ = i + '0';
- while (i--)
- {
- w++;
- if (s)
- *s++ = (k = c & ((1<<DC)-1)) ? k : '?';
- c >>= DC;
- }
- w++;
- if (s)
- *s++ = DR1;
- }
- return w;
-}
-
-static int
-debug_mblen(const char* s, size_t n)
-{
- return debug_mbtowc(NiL, s, n);
-}
-
-static int
-debug_wcwidth(wchar_t c)
-{
- if (c >= 0 && c <= UCHAR_MAX)
- return 1;
- if ((c &= ((1<<DZ)-1)) > DX)
- return -1;
- return c + DD;
-}
-
-static size_t
-debug_strxfrm(register char* t, register const char* s, size_t n)
-{
- register const char* q;
- register const char* r;
- register char* e;
- char* o;
- register size_t z;
- register int w;
-
- o = t;
- z = 0;
- if (e = t)
- e += n;
- while (s[0])
- {
- if ((((unsigned char*)s)[0] == DL0 || ((unsigned char*)s)[0] == DL1) && (w = s[1]) >= '0' && w <= ('0' + DC))
- {
- w -= '0';
- q = s + 2;
- r = q + w;
- while (q < r && *q)
- q++;
- if (*((unsigned char*)q) == DR0 || *((unsigned char*)q) == DR1)
- {
- if (t)
- {
- for (q = s + 2; q < r; q++)
- if (t < e)
- *t++ = debug_order[*q];
- while (w++ < DX)
- if (t < e)
- *t++ = 1;
- }
- s = r + 1;
- z += DX;
- continue;
- }
- }
- if ((s[0] == 'c' || s[0] == 'C') && (s[1] == 'h' || s[1] == 'H'))
- {
- if (t)
- {
- if (t < e)
- *t++ = debug_order[s[0]];
- if (t < e)
- *t++ = debug_order[s[1]];
- if (t < e)
- *t++ = 1;
- if (t < e)
- *t++ = 1;
- }
- s += 2;
- z += DX;
- continue;
- }
- if ((s[0] == 's' || s[0] == 'S') && (s[1] == 's' || s[1] == 'S') && (s[2] == 't' || s[2] == 'T'))
- {
- if (t)
- {
- if (t < e)
- *t++ = debug_order[s[0]];
- if (t < e)
- *t++ = debug_order[s[1]];
- if (t < e)
- *t++ = debug_order[s[2]];
- if (t < e)
- *t++ = 1;
- }
- s += 3;
- z += DX;
- continue;
- }
- if (t)
- {
- if (t < e)
- *t++ = debug_order[s[0]];
- if (t < e)
- *t++ = 1;
- if (t < e)
- *t++ = 1;
- if (t < e)
- *t++ = 1;
- }
- s++;
- z += DX;
- }
- if (!t)
- return z;
- if (t < e)
- *t = 0;
- return t - o;
-}
-
-static int
-debug_strcoll(const char* a, const char* b)
-{
- char ab[1024];
- char bb[1024];
-
- debug_strxfrm(ab, a, sizeof(ab) - 1);
- ab[sizeof(ab)-1] = 0;
- debug_strxfrm(bb, b, sizeof(bb) - 1);
- bb[sizeof(bb)-1] = 0;
- return strcmp(ab, bb);
-}
-
-/*
- * default locale
- */
-
-static int
-default_wcwidth(wchar_t w)
-{
- return w >= 0 && w <= 255 && !iscntrl(w) ? 1 : -1;
-}
-
-/*
- * called when LC_COLLATE initialized or changes
- */
-
-static int
-set_collate(Lc_category_t* cp)
-{
- if (locales[cp->internal]->flags & LC_debug)
- {
- ast.collate = debug_strcoll;
- ast.mb_xfrm = debug_strxfrm;
- }
- else if (locales[cp->internal]->flags & LC_default)
- {
- ast.collate = strcmp;
- ast.mb_xfrm = 0;
- }
- else
- {
- ast.collate = strcoll;
- ast.mb_xfrm = strxfrm;
- }
- return 0;
-}
-
-/*
- * workaround the interesting sjis that translates unshifted 7 bit ascii!
- */
-
-#if _hdr_wchar && _typ_mbstate_t && _lib_mbrtowc
-
-#define mb_state_zero ((mbstate_t*)&ast.pad[sizeof(ast.pad)-2*sizeof(mbstate_t)])
-#define mb_state ((mbstate_t*)&ast.pad[sizeof(ast.pad)-sizeof(mbstate_t)])
-
-static int
-sjis_mbtowc(register wchar_t* p, register const char* s, size_t n)
-{
- if (n && p && s && (*s == '\\' || *s == '~') && !memcmp(mb_state, mb_state_zero, sizeof(mbstate_t)))
- {
- *p = *s;
- return 1;
- }
- return mbrtowc(p, s, n, mb_state);
-}
-
-#endif
-
-#define utf8_wctomb wctomb
-
-static const uint32_t utf8mask[] =
-{
- 0x00000000,
- 0x00000000,
- 0xffffff80,
- 0xfffff800,
- 0xffff0000,
- 0xffe00000,
- 0xfc000000,
-};
-
-static const signed char utf8tab[256] =
-{
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6,-1,-1,
-};
-
-static int
-utf8_mbtowc(wchar_t* wp, const char* str, size_t n)
-{
- register unsigned char* sp = (unsigned char*)str;
- register int m;
- register int i;
- register int c;
- register wchar_t w = 0;
-
- if (!sp || !n)
- return 0;
- if ((m = utf8tab[*sp]) > 0)
- {
- if (m > n)
- return -1;
- if (wp)
- {
- if (m == 1)
- {
- *wp = *sp;
- return 1;
- }
- w = *sp & ((1<<(8-m))-1);
- for (i = m - 1; i > 0; i--)
- {
- c = *++sp;
- if ((c&0xc0) != 0x80)
- goto invalid;
- w = (w<<6) | (c&0x3f);
- }
- if (!(utf8mask[m] & w) || w >= 0xd800 && (w <= 0xdfff || w >= 0xfffe && w <= 0xffff))
- goto invalid;
- *wp = w;
- }
- return m;
- }
- if (!*sp)
- return 0;
- invalid:
-#ifdef EILSEQ
- errno = EILSEQ;
-#endif
- ast.mb_sync = (const char*)sp - str;
- return -1;
-}
-
-static int
-utf8_mblen(const char* str, size_t n)
-{
- wchar_t w;
-
- return utf8_mbtowc(&w, str, n);
-}
-
-/*
- * called when LC_CTYPE initialized or changes
- */
-
-static int
-set_ctype(Lc_category_t* cp)
-{
- ast.mb_sync = 0;
- if (locales[cp->internal]->flags & LC_debug)
- {
- ast.mb_cur_max = DEBUG_MB_CUR_MAX;
- ast.mb_len = debug_mblen;
- ast.mb_towc = debug_mbtowc;
- ast.mb_width = debug_wcwidth;
- ast.mb_conv = debug_wctomb;
- }
- else if ((locales[cp->internal]->flags & LC_default) || (ast.mb_cur_max = MB_CUR_MAX) <= 1 || !(ast.mb_len = mblen) || !(ast.mb_towc = mbtowc))
- {
- ast.mb_cur_max = 1;
- ast.mb_len = 0;
- ast.mb_towc = 0;
- ast.mb_width = default_wcwidth;
- ast.mb_conv = 0;
- }
- else if ((locales[cp->internal]->flags & LC_utf8) && !(ast.locale.set & AST_LC_test))
- {
- ast.mb_cur_max = 6;
- ast.mb_len = utf8_mblen;
- ast.mb_towc = utf8_mbtowc;
- if (!(ast.mb_width = wcwidth))
- ast.mb_width = default_wcwidth;
- ast.mb_conv = utf8_wctomb;
- }
- else
- {
- if (!(ast.mb_width = wcwidth))
- ast.mb_width = default_wcwidth;
- ast.mb_conv = wctomb;
-#ifdef mb_state
- {
- /*
- * check for sjis that translates unshifted 7 bit ascii!
- */
-
- char* s;
- char buf[2];
-
- mbinit();
- buf[1] = 0;
- *(s = buf) = '\\';
- if (mbchar(s) != buf[0])
- {
- memcpy(mb_state, mb_state_zero, sizeof(mbstate_t));
- ast.mb_towc = sjis_mbtowc;
- }
- }
-#endif
- }
- if (ast.locale.set & (AST_LC_debug|AST_LC_setlocale))
- sfprintf(sfstderr, "locale info %17s MB_CUR_MAX=%d%s%s%s%s\n"
- , cp->name
- , ast.mb_cur_max
- , ast.mb_len == debug_mblen ? " debug_mblen" : ast.mb_len == mblen ? " mblen" : ""
- , ast.mb_towc == debug_mbtowc ? " debug_mbtowc" : ast.mb_towc == mbtowc ? " mbtowc"
-#ifdef mb_state
- : ast.mb_towc == sjis_mbtowc ? " sjis_mbtowc"
-#endif
- : ""
- , ast.mb_width == debug_wcwidth ? " debug_wcwidth" : ast.mb_width == wcwidth ? " wcwidth" : ast.mb_width == default_wcwidth ? " default_wcwidth" : ""
- , ast.mb_conv == debug_wctomb ? " debug_wctomb" : ast.mb_conv == wctomb ? " wctomb" : ""
- );
- return 0;
-}
-
-/*
- * called when LC_NUMERIC initialized or changes
- */
-
-static int
-set_numeric(Lc_category_t* cp)
-{
- register int category = cp->internal;
- struct lconv* lp;
- Lc_numeric_t* dp;
-
- static Lc_numeric_t default_numeric = { '.', -1 };
-
- if (!LCINFO(category)->data)
- {
- if ((lp = localeconv()) && (dp = newof(0, Lc_numeric_t, 1, 0)))
- {
- dp->decimal = lp->decimal_point && *lp->decimal_point ? *(unsigned char*)lp->decimal_point : '.';
- dp->thousand = lp->thousands_sep && *lp->thousands_sep ? *(unsigned char*)lp->thousands_sep : -1;
- }
- else
- dp = &default_numeric;
- LCINFO(category)->data = (void*)dp;
- if (ast.locale.set & (AST_LC_debug|AST_LC_setlocale))
- sfprintf(sfstderr, "locale info %17s decimal '%c' thousands '%c'\n", lc_categories[category].name, dp->decimal, dp->thousand >= 0 ? dp->thousand : 'X');
- }
- return 0;
-}
-
-/*
- * this table is indexed by AST_LC_[A-Z]*
- */
-
-Lc_category_t lc_categories[] =
-{
-{ "LC_ALL", LC_ALL, AST_LC_ALL, 0 },
-{ "LC_COLLATE", LC_COLLATE, AST_LC_COLLATE, set_collate },
-{ "LC_CTYPE", LC_CTYPE, AST_LC_CTYPE, set_ctype },
-{ "LC_MESSAGES", LC_MESSAGES, AST_LC_MESSAGES, 0 },
-{ "LC_MONETARY", LC_MONETARY, AST_LC_MONETARY, 0 },
-{ "LC_NUMERIC", LC_NUMERIC, AST_LC_NUMERIC, set_numeric },
-{ "LC_TIME", LC_TIME, AST_LC_TIME, 0 },
-{ "LC_IDENTIFICATION",LC_IDENTIFICATION,AST_LC_IDENTIFICATION,0 },
-{ "LC_ADDRESS", LC_ADDRESS, AST_LC_ADDRESS, 0 },
-{ "LC_NAME", LC_NAME, AST_LC_NAME, 0 },
-{ "LC_TELEPHONE", LC_TELEPHONE, AST_LC_TELEPHONE, 0 },
-{ "LC_XLITERATE", LC_XLITERATE, AST_LC_XLITERATE, 0 },
-{ "LC_MEASUREMENT", LC_MEASUREMENT, AST_LC_MEASUREMENT, 0 },
-{ "LC_PAPER", LC_PAPER, AST_LC_PAPER, 0 },
-};
-
-static Lc_t* lang;
-static Lc_t* lc_all;
-
-typedef struct Unamval_s
-{
- char* name;
- unsigned int value;
-} Unamval_t;
-
-static const Unamval_t options[] =
-{
- "debug", AST_LC_debug,
- "find", AST_LC_find,
- "setlocale", AST_LC_setlocale,
- "test", AST_LC_test,
- "translate", AST_LC_translate,
- 0, 0
-};
-
-/*
- * called by stropt() to set options
- */
-
-static int
-setopt(void* a, const void* p, int n, const char* v)
-{
- if (p)
- {
- if (n)
- ast.locale.set |= ((Unamval_t*)p)->value;
- else
- ast.locale.set &= ~((Unamval_t*)p)->value;
- }
- return 0;
-}
-
-#if !_lib_setlocale
-
-#define setlocale(c,l) default_setlocale(c,l)
-
-static char*
-default_setlocale(int category, const char* locale)
-{
- Lc_t* lc;
-
- if (locale)
- {
- if (!(lc = lcmake(locale)) || !(lc->flags & LC_default))
- return 0;
- locales[0]->flags &= ~lc->flags;
- locales[1]->flags &= ~lc->flags;
- return lc->name;
- }
- return (locales[1]->flags & (1<<category)) ? locales[1]->name : locales[0]->name;
-}
-
-#endif
-
-/*
- * set a single AST_LC_* locale category
- * the caller must validate category
- * lc==0 restores the previous state
- */
-
-static char*
-single(int category, Lc_t* lc, unsigned int flags)
-{
- const char* sys;
- int i;
-
- if (flags & (LC_setenv|LC_setlocale))
- {
- if (!(ast.locale.set & AST_LC_internal))
- lc_categories[category].prev = lc;
- if ((flags & LC_setenv) && lc_all && locales[category])
- return (char*)locales[category]->name;
- }
- if (!lc && (!(lc_categories[category].flags & LC_setlocale) || !(lc = lc_categories[category].prev)) && !(lc = lc_all) && !(lc = lc_categories[category].prev) && !(lc = lang))
- lc = lcmake(NiL);
- sys = 0;
- if (locales[category] != lc)
- {
- if (lc_categories[category].external == -lc_categories[category].internal)
- {
- for (i = 1; i < AST_LC_COUNT; i++)
- if (locales[i] == lc)
- {
- sys = (char*)lc->name;
- break;
- }
- }
- else if (lc->flags & (LC_debug|LC_local))
- sys = setlocale(lc_categories[category].external, lcmake(NiL)->name);
- else if (!(sys = setlocale(lc_categories[category].external, lc->name)) &&
- (streq(lc->name, lc->code) || !(sys = setlocale(lc_categories[category].external, lc->code))) &&
- !streq(lc->code, lc->language->code))
- sys = setlocale(lc_categories[category].external, lc->language->code);
- if (!sys)
- {
- /*
- * check for local override
- * currently this means an LC_MESSAGES dir exists
- */
-
- if (!(lc->flags & LC_checked))
- {
- char path[PATH_MAX];
-
- if (mcfind(path, lc->code, NiL, LC_MESSAGES, 0))
- lc->flags |= LC_local;
- lc->flags |= LC_checked;
- }
- if (!(lc->flags & LC_local))
- return 0;
- if (lc_categories[category].external != -lc_categories[category].internal)
- setlocale(lc_categories[category].external, lcmake(NiL)->name);
- }
- locales[category] = lc;
- if (lc_categories[category].setf && (*lc_categories[category].setf)(&lc_categories[category]))
- {
- locales[category] = lc_categories[category].prev;
- return 0;
- }
- if ((lc->flags & LC_default) || category == AST_LC_MESSAGES && lc->name[0] == 'e' && lc->name[1] == 'n' && (lc->name[2] == 0 || lc->name[2] == '_' && lc->name[3] == 'U'))
- ast.locale.set &= ~(1<<category);
- else
- ast.locale.set |= (1<<category);
- }
- else if (lc_categories[category].flags ^ flags)
- {
- lc_categories[category].flags &= ~(LC_setenv|LC_setlocale);
- lc_categories[category].flags |= flags;
- }
- else
- return (char*)lc->name;
- if ((ast.locale.set & (AST_LC_debug|AST_LC_setlocale)) && !(ast.locale.set & AST_LC_internal))
- sfprintf(sfstderr, "locale set %17s %16s %16s %16s %s%s\n", lc_categories[category].name, lc->name, sys, lc_categories[category].prev ? lc_categories[category].prev->name : NiL, (lc_categories[category].flags & LC_setlocale) ? "[setlocale]" : "", (lc_categories[category].flags & LC_setenv) ? "[setenv]" : "");
- return (char*)lc->name;
-}
-
-/*
- * set composite AST_LC_ALL locale categories
- * return <0:composite-error 0:not-composite >0:composite-ok
- */
-
-static int
-composite(register const char* s, int initialize)
-{
- register const char* t;
- register int i;
- register int j;
- register int k;
- int n;
- int m;
- const char* w;
- Lc_t* p;
- int cat[AST_LC_COUNT];
- int stk[AST_LC_COUNT];
- char buf[PATH_MAX / 2];
-
- k = n = 0;
- while (s[0] == 'L' && s[1] == 'C' && s[2] == '_')
- {
- n++;
- j = 0;
- w = s;
- for (i = 1; i < AST_LC_COUNT; i++)
- {
- s = w;
- t = lc_categories[i].name;
- while (*t && *s++ == *t++);
- if (!*t && *s++ == '=')
- {
- cat[j++] = i;
- if (s[0] != 'L' || s[1] != 'C' || s[2] != '_')
- break;
- w = s;
- i = -1;
- }
- }
- for (s = w; *s && *s != '='; s++);
- if (!*s)
- {
- for (i = 0; i < k; i++)
- single(stk[i], NiL, 0);
- return -1;
- }
- w = ++s;
- for (;;)
- {
- if (!*s)
- {
- p = lcmake(w);
- break;
- }
- else if (*s++ == ';')
- {
- if ((m = s - w - 1) >= sizeof(buf))
- m = sizeof(buf) - 1;
- memcpy(buf, w, m);
- buf[m] = 0;
- p = lcmake(buf);
- break;
- }
- }
- for (i = 0; i < j; i++)
- if (!initialize)
- {
- if (!single(cat[i], p, 0))
- {
- for (i = 0; i < k; i++)
- single(stk[i], NiL, 0);
- return -1;
- }
- stk[k++] = cat[i];
- }
- else if (!lc_categories[cat[i]].prev && !(ast.locale.set & AST_LC_internal))
- lc_categories[cat[i]].prev = p;
- }
- while (s[0] == '/' && s[1] && n < (AST_LC_COUNT - 1))
- {
- n++;
- for (w = ++s; *s && *s != '/'; s++);
- if (!*s)
- p = lcmake(w);
- else
- {
- if ((j = s - w - 1) >= sizeof(buf))
- j = sizeof(buf) - 1;
- memcpy(buf, w, j);
- buf[j] = 0;
- p = lcmake(buf);
- }
- if (!initialize)
- {
- if (!single(n, p, 0))
- {
- for (i = 1; i < n; i++)
- single(i, NiL, 0);
- return -1;
- }
- }
- else if (!lc_categories[n].prev && !(ast.locale.set & AST_LC_internal))
- lc_categories[n].prev = p;
- }
- return n;
-}
-
-/*
- * setlocale() intercept
- *
- * locale:
- * 0 query
- * "" initialize from environment (if LC_ALL)
- * "" AST_LC_setenv: value unset (defer to LANG)
- * "*" AST_LC_setenv: value set (defer to LC_ALL)
- * * set (override LC_ALL)
- */
-
-char*
-_ast_setlocale(int category, const char* locale)
-{
- register char* s;
- register int i;
- register int j;
- int k;
- int f;
- Lc_t* p;
- int cat[AST_LC_COUNT];
-
- static Sfio_t* sp;
- static int initialized;
- static const char local[] = "local";
-
- if ((category = lcindex(category, 0)) < 0)
- return 0;
- if (!locale)
- {
- /*
- * return the current state
- */
-
- compose:
- if (category != AST_LC_ALL && category != AST_LC_LANG)
- return (char*)locales[category]->name;
- if (!sp && !(sp = sfstropen()))
- return 0;
- for (i = 1; i < AST_LC_COUNT; i++)
- cat[i] = -1;
- for (i = 1, k = 0; i < AST_LC_COUNT; i++)
- if (cat[i] < 0)
- {
- k++;
- cat[i] = i;
- for (j = i + 1; j < AST_LC_COUNT; j++)
- if (locales[j] == locales[i])
- cat[j] = i;
- }
- if (k == 1)
- return (char*)locales[1]->name;
- for (i = 1; i < AST_LC_COUNT; i++)
- if (cat[i] >= 0 && !(locales[i]->flags & LC_default))
- {
- if (sfstrtell(sp))
- sfprintf(sp, ";");
- for (j = i, k = cat[i]; j < AST_LC_COUNT; j++)
- if (cat[j] == k)
- {
- cat[j] = -1;
- sfprintf(sp, "%s=", lc_categories[j].name);
- }
- sfprintf(sp, "%s", locales[i]->name);
- }
- if (!sfstrtell(sp))
- return (char*)locales[0]->name;
- return sfstruse(sp);
- }
- if (!ast.locale.serial++)
- {
- stropt(getenv("LC_OPTIONS"), options, sizeof(*options), setopt, NiL);
- initialized = 0;
- }
- if ((ast.locale.set & (AST_LC_debug|AST_LC_setlocale)) && !(ast.locale.set & AST_LC_internal))
- sfprintf(sfstderr, "locale user %17s %16s %s%s\n", category == AST_LC_LANG ? "LANG" : lc_categories[category].name, locale && !*locale ? "''" : locale, initialized ? "" : "[initial]", (ast.locale.set & AST_LC_setenv) ? "[setenv]" : "");
- if (ast.locale.set & AST_LC_setenv)
- {
- f = LC_setenv;
- p = *locale ? lcmake(locale) : (Lc_t*)0;
- }
- else if (*locale)
- {
- f = LC_setlocale;
- p = lcmake(locale);
- }
- else if (category == AST_LC_ALL)
- {
- if (!initialized)
- {
- char* u;
- char tmp[256];
-
- /*
- * initialize from the environment
- * precedence determined by X/Open
- */
-
- u = 0;
- if ((s = getenv("LANG")) && *s)
- {
- if (streq(s, local) && (u || (u = native_locale(locale, tmp, sizeof(tmp)))))
- s = u;
- lang = lcmake(s);
- }
- else
- lang = 0;
- if ((s = getenv("LC_ALL")) && *s)
- {
- if (streq(s, local) && (u || (u = native_locale(locale, tmp, sizeof(tmp)))))
- s = u;
- lc_all = lcmake(s);
- }
- else
- lc_all = 0;
- for (i = 1; i < AST_LC_COUNT; i++)
- if (lc_categories[i].flags & LC_setlocale)
- /* explicitly set by setlocale() */;
- else if ((s = getenv(lc_categories[i].name)) && *s)
- {
- if (streq(s, local) && (u || (u = native_locale(locale, tmp, sizeof(tmp)))))
- s = u;
- lc_categories[i].prev = lcmake(s);
- }
- else
- lc_categories[i].prev = 0;
- for (i = 1; i < AST_LC_COUNT; i++)
- if (!single(i, lc_all && !(lc_categories[i].flags & LC_setlocale) ? lc_all : lc_categories[i].prev, 0))
- {
- while (i--)
- single(i, NiL, 0);
- return 0;
- }
- if (ast.locale.set & AST_LC_debug)
- for (i = 1; i < AST_LC_COUNT; i++)
- sfprintf(sfstderr, "locale env %17s %16s %16s %16s\n", lc_categories[i].name, locales[i]->name, "", lc_categories[i].prev ? lc_categories[i].prev->name : (char*)0);
- initialized = 1;
- }
- goto compose;
- }
- else if (category == AST_LC_LANG || !(p = lc_categories[category].prev))
- {
- f = 0;
- p = lcmake("C");
- }
- else
- f = 0;
- if (category == AST_LC_LANG)
- {
- if (lang != p)
- {
- lang = p;
- if (!lc_all)
- for (i = 1; i < AST_LC_COUNT; i++)
- if (!single(i, lc_categories[i].prev, 0))
- {
- while (i--)
- single(i, NiL, 0);
- return 0;
- }
- }
- }
- else if (category != AST_LC_ALL)
- {
- if (f || !lc_all)
- return single(category, p, f);
- if (p && !(ast.locale.set & AST_LC_internal))
- lc_categories[category].prev = p;
- return (char*)locales[category]->name;
- }
- else if (composite(locale, 0) < 0)
- return 0;
- else if (lc_all != p)
- {
- lc_all = p;
- for (i = 1; i < AST_LC_COUNT; i++)
- if (!single(i, lc_all && !(lc_categories[i].flags & LC_setlocale) ? lc_all : lc_categories[i].prev, 0))
- {
- while (i--)
- single(i, NiL, 0);
- return 0;
- }
- }
- goto compose;
-}
diff --git a/usr/src/lib/libast/common/features/isoc99 b/usr/src/lib/libast/common/features/isoc99
deleted file mode 100644
index e85c9f52a7..0000000000
--- a/usr/src/lib/libast/common/features/isoc99
+++ /dev/null
@@ -1,13 +0,0 @@
-if tst -D_ISOC99_SOURCE -lm note{ _ISOC99_SOURCE plays nice }end link{
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <math.h>
- int main() { return signbit(-0.0); }
- }end {
- #ifndef _ISOC99_SOURCE
- #define _ISOC99_SOURCE 1
- #endif
- }
-endif
diff --git a/usr/src/lib/libast/common/include/cdt.h b/usr/src/lib/libast/common/include/cdt.h
deleted file mode 100644
index 1044207b76..0000000000
--- a/usr/src/lib/libast/common/include/cdt.h
+++ /dev/null
@@ -1,311 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _CDT_H
-#define _CDT_H 1
-
-/* Public interface for the dictionary library
-**
-** Written by Kiem-Phong Vo
-*/
-
-#define CDT_VERSION 20050420L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _dtlink_s Dtlink_t;
-typedef struct _dthold_s Dthold_t;
-typedef struct _dtdisc_s Dtdisc_t;
-typedef struct _dtmethod_s Dtmethod_t;
-typedef struct _dtdata_s Dtdata_t;
-typedef struct _dt_s Dt_t;
-typedef struct _dt_s Dict_t; /* for libdict compatibility */
-typedef struct _dtstat_s Dtstat_t;
-typedef Void_t* (*Dtsearch_f)_ARG_((Dt_t*,Void_t*,int));
-typedef Void_t* (*Dtmake_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef void (*Dtfree_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef int (*Dtcompar_f)_ARG_((Dt_t*,Void_t*,Void_t*,Dtdisc_t*));
-typedef unsigned int (*Dthash_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef Void_t* (*Dtmemory_f)_ARG_((Dt_t*,Void_t*,size_t,Dtdisc_t*));
-typedef int (*Dtevent_f)_ARG_((Dt_t*,int,Void_t*,Dtdisc_t*));
-
-struct _dtlink_s
-{ Dtlink_t* right; /* right child */
- union
- { unsigned int _hash; /* hash value */
- Dtlink_t* _left; /* left child */
- } hl;
-};
-
-/* private structure to hold an object */
-struct _dthold_s
-{ Dtlink_t hdr; /* header */
- Void_t* obj; /* user object */
-};
-
-/* method to manipulate dictionary structure */
-struct _dtmethod_s
-{ Dtsearch_f searchf; /* search function */
- int type; /* type of operation */
-};
-
-/* stuff that may be in shared memory */
-struct _dtdata_s
-{ int type; /* type of dictionary */
- Dtlink_t* here; /* finger to last search element */
- union
- { Dtlink_t** _htab; /* hash table */
- Dtlink_t* _head; /* linked list */
- } hh;
- int ntab; /* number of hash slots */
- int size; /* number of objects */
- int loop; /* number of nested loops */
- int minp; /* min path before splay, always even */
- /* for hash dt, > 0: fixed table size */
-};
-
-/* structure to hold methods that manipulate an object */
-struct _dtdisc_s
-{ int key; /* where the key begins in an object */
- int size; /* key size and type */
- int link; /* offset to Dtlink_t field */
- Dtmake_f makef; /* object constructor */
- Dtfree_f freef; /* object destructor */
- Dtcompar_f comparf;/* to compare two objects */
- Dthash_f hashf; /* to compute hash value of an object */
- Dtmemory_f memoryf;/* to allocate/free memory */
- Dtevent_f eventf; /* to process events */
-};
-
-#define DTDISC(dc,ky,sz,lk,mkf,frf,cmpf,hshf,memf,evf) \
- ( (dc)->key = (ky), (dc)->size = (sz), (dc)->link = (lk), \
- (dc)->makef = (mkf), (dc)->freef = (frf), \
- (dc)->comparf = (cmpf), (dc)->hashf = (hshf), \
- (dc)->memoryf = (memf), (dc)->eventf = (evf) )
-
-#ifdef offsetof
-#define DTOFFSET(struct_s, member) offsetof(struct_s, member)
-#else
-#define DTOFFSET(struct_s, member) ((int)(&((struct_s*)0)->member))
-#endif
-
-/* the dictionary structure itself */
-struct _dt_s
-{ Dtsearch_f searchf;/* search function */
- Dtdisc_t* disc; /* method to manipulate objs */
- Dtdata_t* data; /* sharable data */
- Dtmemory_f memoryf;/* function to alloc/free memory */
- Dtmethod_t* meth; /* dictionary method */
- int type; /* type information */
- int nview; /* number of parent view dictionaries */
- Dt_t* view; /* next on viewpath */
- Dt_t* walk; /* dictionary being walked */
- Void_t* user; /* for user's usage */
-};
-
-/* structure to get status of a dictionary */
-struct _dtstat_s
-{ int dt_meth; /* method type */
- int dt_size; /* number of elements */
- int dt_n; /* number of chains or levels */
- int dt_max; /* max size of a chain or a level */
- int* dt_count; /* counts of chains or levels by size */
-};
-
-/* flag set if the last search operation actually found the object */
-#define DT_FOUND 0100000
-
-/* supported storage methods */
-#define DT_SET 0000001 /* set with unique elements */
-#define DT_BAG 0000002 /* multiset */
-#define DT_OSET 0000004 /* ordered set (self-adjusting tree) */
-#define DT_OBAG 0000010 /* ordered multiset */
-#define DT_LIST 0000020 /* linked list */
-#define DT_STACK 0000040 /* stack */
-#define DT_QUEUE 0000100 /* queue */
-#define DT_METHODS 0000177 /* all currently supported methods */
-
-/* asserts to dtdisc() */
-#define DT_SAMECMP 0000001 /* compare methods equivalent */
-#define DT_SAMEHASH 0000002 /* hash methods equivalent */
-
-/* types of search */
-#define DT_INSERT 0000001 /* insert object if not found */
-#define DT_DELETE 0000002 /* delete object if found */
-#define DT_SEARCH 0000004 /* look for an object */
-#define DT_NEXT 0000010 /* look for next element */
-#define DT_PREV 0000020 /* find previous element */
-#define DT_RENEW 0000040 /* renewing an object */
-#define DT_CLEAR 0000100 /* clearing all objects */
-#define DT_FIRST 0000200 /* get first object */
-#define DT_LAST 0000400 /* get last object */
-#define DT_MATCH 0001000 /* find object matching key */
-#define DT_VSEARCH 0002000 /* search using internal representation */
-#define DT_ATTACH 0004000 /* attach an object to the dictionary */
-#define DT_DETACH 0010000 /* detach an object from the dictionary */
-
-/* events */
-#define DT_OPEN 1 /* a dictionary is being opened */
-#define DT_CLOSE 2 /* a dictionary is being closed */
-#define DT_DISC 3 /* discipline is about to be changed */
-#define DT_METH 4 /* method is about to be changed */
-#define DT_ENDOPEN 5 /* dtopen() is done */
-#define DT_ENDCLOSE 6 /* dtclose() is done */
-#define DT_HASHSIZE 7 /* setting hash table size */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-#if !_BLD_cdt && defined(__IMPORT__)
-#define extern __IMPORT__
-#endif
-
-extern Dtmethod_t* Dtset;
-extern Dtmethod_t* Dtbag;
-extern Dtmethod_t* Dtoset;
-extern Dtmethod_t* Dtobag;
-extern Dtmethod_t* Dtlist;
-extern Dtmethod_t* Dtstack;
-extern Dtmethod_t* Dtqueue;
-
-/* compatibility stuff; will go away */
-#ifndef KPVDEL
-extern Dtmethod_t* Dtorder;
-extern Dtmethod_t* Dttree;
-extern Dtmethod_t* Dthash;
-extern Dtmethod_t _Dttree;
-extern Dtmethod_t _Dthash;
-extern Dtmethod_t _Dtlist;
-extern Dtmethod_t _Dtqueue;
-extern Dtmethod_t _Dtstack;
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Dt_t* dtopen _ARG_((Dtdisc_t*, Dtmethod_t*));
-extern int dtclose _ARG_((Dt_t*));
-extern Dt_t* dtview _ARG_((Dt_t*, Dt_t*));
-extern Dtdisc_t* dtdisc _ARG_((Dt_t* dt, Dtdisc_t*, int));
-extern Dtmethod_t* dtmethod _ARG_((Dt_t*, Dtmethod_t*));
-
-extern Dtlink_t* dtflatten _ARG_((Dt_t*));
-extern Dtlink_t* dtextract _ARG_((Dt_t*));
-extern int dtrestore _ARG_((Dt_t*, Dtlink_t*));
-
-extern int dttreeset _ARG_((Dt_t*, int, int));
-
-extern int dtwalk _ARG_((Dt_t*, int(*)(Dt_t*,Void_t*,Void_t*), Void_t*));
-
-extern Void_t* dtrenew _ARG_((Dt_t*, Void_t*));
-
-extern int dtsize _ARG_((Dt_t*));
-extern int dtstat _ARG_((Dt_t*, Dtstat_t*, int));
-extern unsigned int dtstrhash _ARG_((unsigned int, Void_t*, int));
-
-#if !_PACKAGE_ast
-extern int memcmp _ARG_((const Void_t*, const Void_t*, size_t));
-extern int strcmp _ARG_((const char*, const char*));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* internal functions for translating among holder, object and key */
-#define _DT(dt) ((Dt_t*)(dt))
-#define _DTDSC(dc,ky,sz,lk,cmpf) \
- (ky = (dc)->key, sz = (dc)->size, lk = (dc)->link, cmpf = (dc)->comparf)
-#define _DTLNK(o,lk) ((Dtlink_t*)((char*)(o) + lk) )
-#define _DTOBJ(e,lk) ((lk) < 0 ? ((Dthold_t*)(e))->obj : (Void_t*)((char*)(e) - (lk)) )
-#define _DTKEY(o,ky,sz) (Void_t*)((sz) < 0 ? *((char**)((char*)(o)+(ky))) : ((char*)(o)+(ky)))
-
-#define _DTCMP(dt,k1,k2,dc,cmpf,sz) \
- ((cmpf) ? (*cmpf)(dt,k1,k2,dc) : \
- ((sz) <= 0 ? strcmp(k1,k2) : memcmp(k1,k2,sz)) )
-#define _DTHSH(dt,ky,dc,sz) ((dc)->hashf ? (*(dc)->hashf)(dt,ky,dc) : dtstrhash(0,ky,sz) )
-
-/* special search function for tree structure only */
-#define _DTMTCH(dt,key,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = (key); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define _DTSRCH(dt,obj,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = _DTKEY(obj, _ky, _sz); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define DTTREEMATCH(dt,key,action) _DTMTCH(_DT(dt),(Void_t*)(key),action)
-#define DTTREESEARCH(dt,obj,action) _DTSRCH(_DT(dt),(Void_t*)(obj),action)
-
-#define dtvnext(d) (_DT(d)->view)
-#define dtvcount(d) (_DT(d)->nview)
-#define dtvhere(d) (_DT(d)->walk)
-
-#define dtlink(d,e) (((Dtlink_t*)(e))->right)
-#define dtobj(d,e) _DTOBJ((e), _DT(d)->disc->link)
-#define dtfinger(d) (_DT(d)->data->here ? dtobj((d),_DT(d)->data->here):(Void_t*)(0))
-
-#define dtfirst(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_FIRST)
-#define dtnext(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_NEXT)
-#define dtleast(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_NEXT)
-#define dtlast(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_LAST)
-#define dtprev(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_PREV)
-#define dtmost(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_PREV)
-#define dtsearch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH)
-#define dtmatch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_MATCH)
-#define dtinsert(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_INSERT)
-#define dtdelete(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DELETE)
-#define dtattach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_ATTACH)
-#define dtdetach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DETACH)
-#define dtclear(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_CLEAR)
-#define dtfound(d) (_DT(d)->type & DT_FOUND)
-
-#define DT_PRIME 17109811 /* 2#00000001 00000101 00010011 00110011 */
-#define dtcharhash(h,c) (((unsigned int)(h) + (unsigned int)(c)) * DT_PRIME )
-
-#endif /* _CDT_H */
diff --git a/usr/src/lib/libast/common/include/sfio.h b/usr/src/lib/libast/common/include/sfio.h
deleted file mode 100644
index da6ebfd9f2..0000000000
--- a/usr/src/lib/libast/common/include/sfio.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_H
-#define _SFIO_H 1
-
-#define SFIO_VERSION 20080717L
-
-/* Public header file for the sfio library
-**
-** Written by Kiem-Phong Vo
-*/
-
-typedef struct _sfio_s Sfio_t;
-typedef struct _sfdisc_s Sfdisc_t;
-
-#if defined(_AST_STD_H) || defined(_PACKAGE_ast) && defined(_SFIO_PRIVATE)
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif /* _PACKAGE_ast */
-
-/* Sfoff_t should be large enough for largest file address */
-#define Sfoff_t intmax_t
-#define Sflong_t intmax_t
-#define Sfulong_t uintmax_t
-#define Sfdouble_t _ast_fltmax_t
-
-typedef ssize_t (*Sfread_f)_ARG_((Sfio_t*, Void_t*, size_t, Sfdisc_t*));
-typedef ssize_t (*Sfwrite_f)_ARG_((Sfio_t*, const Void_t*, size_t, Sfdisc_t*));
-typedef Sfoff_t (*Sfseek_f)_ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*));
-typedef int (*Sfexcept_f)_ARG_((Sfio_t*, int, Void_t*, Sfdisc_t*));
-typedef int (*Sfwalk_f)_ARG_((Sfio_t*, Void_t*));
-
-/* discipline structure */
-struct _sfdisc_s
-{ Sfread_f readf; /* read function */
- Sfwrite_f writef; /* write function */
- Sfseek_f seekf; /* seek function */
- Sfexcept_f exceptf; /* to handle exceptions */
- Sfdisc_t* disc; /* the continuing discipline */
-};
-
-#include <sfio_s.h>
-
-/* formatting environment */
-typedef struct _sffmt_s Sffmt_t;
-typedef int (*Sffmtext_f)_ARG_((Sfio_t*, Void_t*, Sffmt_t*));
-typedef int (*Sffmtevent_f)_ARG_((Sfio_t*, int, Void_t*, Sffmt_t*));
-struct _sffmt_s
-{ long version;/* version of this structure */
- Sffmtext_f extf; /* function to process arguments */
- Sffmtevent_f eventf; /* process events */
-
- char* form; /* format string to stack */
- va_list args; /* corresponding arg list */
-
- int fmt; /* format character */
- ssize_t size; /* object size */
- int flags; /* formatting flags */
- int width; /* width of field */
- int precis; /* precision required */
- int base; /* conversion base */
-
- char* t_str; /* type string */
- ssize_t n_str; /* length of t_str */
-
- Void_t* mbs; /* multibyte state for format string */
-
- Void_t* none; /* unused for now */
-};
-#define sffmtversion(fe,type) \
- ((type) ? ((fe)->version = SFIO_VERSION) : (fe)->version)
-
-#define SFFMT_SSHORT 000000010 /* 'hh' flag, char */
-#define SFFMT_TFLAG 000000020 /* 't' flag, ptrdiff_t */
-#define SFFMT_ZFLAG 000000040 /* 'z' flag, size_t */
-
-#define SFFMT_LEFT 000000100 /* left-justification */
-#define SFFMT_SIGN 000000200 /* must have a sign */
-#define SFFMT_BLANK 000000400 /* if not signed, prepend a blank */
-#define SFFMT_ZERO 000001000 /* zero-padding on the left */
-#define SFFMT_ALTER 000002000 /* alternate formatting */
-#define SFFMT_THOUSAND 000004000 /* thousand grouping */
-#define SFFMT_SKIP 000010000 /* skip assignment in scanf() */
-#define SFFMT_SHORT 000020000 /* 'h' flag */
-#define SFFMT_LONG 000040000 /* 'l' flag */
-#define SFFMT_LLONG 000100000 /* 'll' flag */
-#define SFFMT_LDOUBLE 000200000 /* 'L' flag */
-#define SFFMT_VALUE 000400000 /* value is returned */
-#define SFFMT_ARGPOS 001000000 /* getting arg for $ patterns */
-#define SFFMT_IFLAG 002000000 /* 'I' flag */
-#define SFFMT_JFLAG 004000000 /* 'j' flag, intmax_t */
-#define SFFMT_CENTER 010000000 /* '=' flag, center justification */
-#define SFFMT_SET 017777770 /* flags settable on calling extf */
-
-/* for sfmutex() call */
-#define SFMTX_LOCK 0 /* up mutex count */
-#define SFMTX_TRYLOCK 1 /* try to up mutex count */
-#define SFMTX_UNLOCK 2 /* down mutex count */
-#define SFMTX_CLRLOCK 3 /* clear mutex count */
-
-/* various constants */
-#ifndef NULL
-#define NULL 0
-#endif
-#ifndef EOF
-#define EOF (-1)
-#endif
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-/* bits for various types of files */
-#define SF_READ 0000001 /* open for reading */
-#define SF_WRITE 0000002 /* open for writing */
-#define SF_STRING 0000004 /* a string stream */
-#define SF_APPENDWR 0000010 /* file is in append mode only */
-#define SF_MALLOC 0000020 /* buffer is malloc-ed */
-#define SF_LINE 0000040 /* line buffering */
-#define SF_SHARE 0000100 /* stream with shared file descriptor */
-#define SF_EOF 0000200 /* eof was detected */
-#define SF_ERROR 0000400 /* an error happened */
-#define SF_STATIC 0001000 /* a stream that cannot be freed */
-#define SF_IOCHECK 0002000 /* call exceptf before doing IO */
-#define SF_PUBLIC 0004000 /* SF_SHARE and follow physical seek */
-#define SF_MTSAFE 0010000 /* need thread safety */
-#define SF_WHOLE 0020000 /* preserve wholeness of sfwrite/sfputr */
-#define SF_IOINTR 0040000 /* return on interrupts */
-#define SF_WCWIDTH 0100000 /* wcwidth display stream */
-
-#define SF_FLAGS 0177177 /* PUBLIC FLAGS PASSABLE TO SFNEW() */
-#define SF_SETS 0177163 /* flags passable to sfset() */
-
-#ifndef _SF_NO_OBSOLETE
-#define SF_BUFCONST 0400000 /* unused flag - for compatibility only */
-#endif
-
-/* for sfgetr/sfreserve to hold a record */
-#define SF_LOCKR 0000010 /* lock record, stop access to stream */
-#define SF_LASTR 0000020 /* get the last incomplete record */
-
-/* exception events: SF_NEW(0), SF_READ(1), SF_WRITE(2) and the below */
-#define SF_SEEK 3 /* seek error */
-#define SF_CLOSING 4 /* when stream is about to be closed */
-#define SF_DPUSH 5 /* when discipline is being pushed */
-#define SF_DPOP 6 /* when discipline is being popped */
-#define SF_DPOLL 7 /* see if stream is ready for I/O */
-#define SF_DBUFFER 8 /* buffer not empty during push or pop */
-#define SF_SYNC 9 /* announcing start/end synchronization */
-#define SF_PURGE 10 /* a sfpurge() call was issued */
-#define SF_FINAL 11 /* closing is done except stream free */
-#define SF_READY 12 /* a polled stream is ready */
-#define SF_LOCKED 13 /* stream is in a locked state */
-#define SF_ATEXIT 14 /* process is exiting */
-#define SF_EVENT 100 /* start of user-defined events */
-
-/* for stack and disciplines */
-#define SF_POPSTACK ((Sfio_t*)0) /* pop the stream stack */
-#define SF_POPDISC ((Sfdisc_t*)0) /* pop the discipline stack */
-
-/* for the notify function and discipline exception */
-#define SF_NEW 0 /* new stream */
-#define SF_SETFD (-1) /* about to set the file descriptor */
-#define SF_MTACCESS (-2) /* starting a multi-threaded stream */
-
-#define SF_BUFSIZE 8192 /* default buffer size */
-#define SF_UNBOUND (-1) /* unbounded buffer size */
-
-/* namespace incursion workarounds -- migrate to the new names */
-#if !_mac_SF_APPEND
-#define SF_APPEND SF_APPENDWR /* BSDI sys/stat.h */
-#endif
-#if !_mac_SF_CLOSE
-#define SF_CLOSE SF_CLOSING /* AIX sys/socket.h */
-#endif
-
-_BEGIN_EXTERNS_
-
-/* standard in/out/err streams */
-
-#if _BLD_sfio && defined(__EXPORT__)
-#define extern extern __EXPORT__
-#endif
-#if !_BLD_sfio && defined(__IMPORT__)
-#define extern extern __IMPORT__
-#endif
-
-extern ssize_t _Sfi;
-extern ssize_t _Sfmaxr;
-
-extern Sfio_t* sfstdin;
-extern Sfio_t* sfstdout;
-extern Sfio_t* sfstderr;
-
-#if _UWIN
-#undef extern
-#endif
-
-extern Sfio_t _Sfstdin;
-extern Sfio_t _Sfstdout;
-extern Sfio_t _Sfstderr;
-
-#undef extern
-
-#if _BLD_sfio && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Sfio_t* sfnew _ARG_((Sfio_t*, Void_t*, size_t, int, int));
-extern Sfio_t* sfopen _ARG_((Sfio_t*, const char*, const char*));
-extern Sfio_t* sfpopen _ARG_((Sfio_t*, const char*, const char*));
-extern Sfio_t* sfstack _ARG_((Sfio_t*, Sfio_t*));
-extern Sfio_t* sfswap _ARG_((Sfio_t*, Sfio_t*));
-extern Sfio_t* sftmp _ARG_((size_t));
-extern int sfwalk _ARG_((Sfwalk_f, Void_t*, int));
-extern int sfpurge _ARG_((Sfio_t*));
-extern int sfpoll _ARG_((Sfio_t**, int, int));
-extern Void_t* sfreserve _ARG_((Sfio_t*, ssize_t, int));
-extern int sfresize _ARG_((Sfio_t*, Sfoff_t));
-extern int sfsync _ARG_((Sfio_t*));
-extern int sfclrlock _ARG_((Sfio_t*));
-extern Void_t* sfsetbuf _ARG_((Sfio_t*, Void_t*, size_t));
-extern Sfdisc_t* sfdisc _ARG_((Sfio_t*,Sfdisc_t*));
-extern int sfraise _ARG_((Sfio_t*, int, Void_t*));
-extern int sfnotify _ARG_((void(*)(Sfio_t*, int, void*)));
-extern int sfset _ARG_((Sfio_t*, int, int));
-extern int sfsetfd _ARG_((Sfio_t*, int));
-extern Sfio_t* sfpool _ARG_((Sfio_t*, Sfio_t*, int));
-extern ssize_t sfread _ARG_((Sfio_t*, Void_t*, size_t));
-extern ssize_t sfwrite _ARG_((Sfio_t*, const Void_t*, size_t));
-extern Sfoff_t sfmove _ARG_((Sfio_t*, Sfio_t*, Sfoff_t, int));
-extern int sfclose _ARG_((Sfio_t*));
-extern Sfoff_t sftell _ARG_((Sfio_t*));
-extern Sfoff_t sfseek _ARG_((Sfio_t*, Sfoff_t, int));
-extern ssize_t sfputr _ARG_((Sfio_t*, const char*, int));
-extern char* sfgetr _ARG_((Sfio_t*, int, int));
-extern ssize_t sfnputc _ARG_((Sfio_t*, int, size_t));
-extern int sfungetc _ARG_((Sfio_t*, int));
-extern int sfprintf _ARG_((Sfio_t*, const char*, ...));
-extern char* sfprints _ARG_((const char*, ...));
-extern ssize_t sfsprintf _ARG_((char*, size_t, const char*, ...));
-extern ssize_t sfvsprintf _ARG_((char*, size_t, const char*, va_list));
-extern int sfvprintf _ARG_((Sfio_t*, const char*, va_list));
-extern int sfscanf _ARG_((Sfio_t*, const char*, ...));
-extern int sfsscanf _ARG_((const char*, const char*, ...));
-extern int sfvsscanf _ARG_((const char*, const char*, va_list));
-extern int sfvscanf _ARG_((Sfio_t*, const char*, va_list));
-
-/* mutex locking for thread-safety */
-extern int sfmutex _ARG_((Sfio_t*, int));
-
-/* io functions with discipline continuation */
-extern ssize_t sfrd _ARG_((Sfio_t*, Void_t*, size_t, Sfdisc_t*));
-extern ssize_t sfwr _ARG_((Sfio_t*, const Void_t*, size_t, Sfdisc_t*));
-extern Sfoff_t sfsk _ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*));
-extern ssize_t sfpkrd _ARG_((int, Void_t*, size_t, int, long, int));
-
-/* portable handling of primitive types */
-extern int sfdlen _ARG_((Sfdouble_t));
-extern int sfllen _ARG_((Sflong_t));
-extern int sfulen _ARG_((Sfulong_t));
-
-extern int sfputd _ARG_((Sfio_t*, Sfdouble_t));
-extern int sfputl _ARG_((Sfio_t*, Sflong_t));
-extern int sfputu _ARG_((Sfio_t*, Sfulong_t));
-extern int sfputm _ARG_((Sfio_t*, Sfulong_t, Sfulong_t));
-extern int sfputc _ARG_((Sfio_t*, int));
-
-extern Sfdouble_t sfgetd _ARG_((Sfio_t*));
-extern Sflong_t sfgetl _ARG_((Sfio_t*));
-extern Sfulong_t sfgetu _ARG_((Sfio_t*));
-extern Sfulong_t sfgetm _ARG_((Sfio_t*, Sfulong_t));
-extern int sfgetc _ARG_((Sfio_t*));
-
-extern int _sfputd _ARG_((Sfio_t*, Sfdouble_t));
-extern int _sfputl _ARG_((Sfio_t*, Sflong_t));
-extern int _sfputu _ARG_((Sfio_t*, Sfulong_t));
-extern int _sfputm _ARG_((Sfio_t*, Sfulong_t, Sfulong_t));
-extern int _sfflsbuf _ARG_((Sfio_t*, int));
-
-extern int _sffilbuf _ARG_((Sfio_t*, int));
-
-extern int _sfdlen _ARG_((Sfdouble_t));
-extern int _sfllen _ARG_((Sflong_t));
-extern int _sfulen _ARG_((Sfulong_t));
-
-/* miscellaneous function analogues of fast in-line functions */
-extern Sfoff_t sfsize _ARG_((Sfio_t*));
-extern int sfclrerr _ARG_((Sfio_t*));
-extern int sfeof _ARG_((Sfio_t*));
-extern int sferror _ARG_((Sfio_t*));
-extern int sffileno _ARG_((Sfio_t*));
-extern int sfstacked _ARG_((Sfio_t*));
-extern ssize_t sfvalue _ARG_((Sfio_t*));
-extern ssize_t sfslen _ARG_((void));
-extern ssize_t sfmaxr _ARG_((ssize_t, int));
-
-#undef extern
-_END_EXTERNS_
-
-/* coding long integers in a portable and compact fashion */
-#define SF_SBITS 6
-#define SF_UBITS 7
-#define SF_BBITS 8
-#define SF_SIGN (1 << SF_SBITS)
-#define SF_MORE (1 << SF_UBITS)
-#define SF_BYTE (1 << SF_BBITS)
-#define SF_U1 SF_MORE
-#define SF_U2 (SF_U1*SF_U1)
-#define SF_U3 (SF_U2*SF_U1)
-#define SF_U4 (SF_U3*SF_U1)
-
-#if __cplusplus
-#define _SF_(f) (f)
-#else
-#define _SF_(f) ((Sfio_t*)(f))
-#endif
-
-#define __sf_putd(f,v) (_sfputd(_SF_(f),(Sfdouble_t)(v)))
-#define __sf_putl(f,v) (_sfputl(_SF_(f),(Sflong_t)(v)))
-#define __sf_putu(f,v) (_sfputu(_SF_(f),(Sfulong_t)(v)))
-#define __sf_putm(f,v,m) (_sfputm(_SF_(f),(Sfulong_t)(v),(Sfulong_t)(m)))
-
-#define __sf_putc(f,c) (_SF_(f)->_next >= _SF_(f)->_endw ? \
- _sfflsbuf(_SF_(f),(int)((unsigned char)(c))) : \
- (int)(*_SF_(f)->_next++ = (unsigned char)(c)) )
-#define __sf_getc(f) (_SF_(f)->_next >= _SF_(f)->_endr ? _sffilbuf(_SF_(f),0) : \
- (int)(*_SF_(f)->_next++) )
-
-#define __sf_dlen(v) (_sfdlen((Sfdouble_t)(v)) )
-#define __sf_llen(v) (_sfllen((Sflong_t)(v)) )
-#define __sf_ulen(v) ((Sfulong_t)(v) < SF_U1 ? 1 : (Sfulong_t)(v) < SF_U2 ? 2 : \
- (Sfulong_t)(v) < SF_U3 ? 3 : (Sfulong_t)(v) < SF_U4 ? 4 : 5)
-
-#define __sf_fileno(f) (_SF_(f)->_file)
-#define __sf_eof(f) (_SF_(f)->_flags&SF_EOF)
-#define __sf_error(f) (_SF_(f)->_flags&SF_ERROR)
-#define __sf_clrerr(f) (_SF_(f)->_flags &= ~(SF_ERROR|SF_EOF))
-#define __sf_stacked(f) (_SF_(f)->_push != (Sfio_t*)0)
-#define __sf_value(f) (_SF_(f)->_val)
-#define __sf_slen() (_Sfi)
-#define __sf_maxr(n,s) ((s)?((_Sfi=_Sfmaxr),(_Sfmaxr=(n)),_Sfi):_Sfmaxr)
-
-#if defined(__INLINE__) && !_BLD_sfio
-
-__INLINE__ int sfputd(Sfio_t* f, Sfdouble_t v) { return __sf_putd(f,v); }
-__INLINE__ int sfputl(Sfio_t* f, Sflong_t v) { return __sf_putl(f,v); }
-__INLINE__ int sfputu(Sfio_t* f, Sfulong_t v) { return __sf_putu(f,v); }
-__INLINE__ int sfputm(Sfio_t* f, Sfulong_t v, Sfulong_t m)
- { return __sf_putm(f,v,m); }
-
-__INLINE__ int sfputc(Sfio_t* f, int c) { return __sf_putc(f,c); }
-__INLINE__ int sfgetc(Sfio_t* f) { return __sf_getc(f); }
-
-__INLINE__ int sfdlen(Sfdouble_t v) { return __sf_dlen(v); }
-__INLINE__ int sfllen(Sflong_t v) { return __sf_llen(v); }
-__INLINE__ int sfulen(Sfulong_t v) { return __sf_ulen(v); }
-
-__INLINE__ int sffileno(Sfio_t* f) { return __sf_fileno(f); }
-__INLINE__ int sfeof(Sfio_t* f) { return __sf_eof(f); }
-__INLINE__ int sferror(Sfio_t* f) { return __sf_error(f); }
-__INLINE__ int sfclrerr(Sfio_t* f) { return __sf_clrerr(f); }
-__INLINE__ int sfstacked(Sfio_t* f) { return __sf_stacked(f); }
-__INLINE__ ssize_t sfvalue(Sfio_t* f) { return __sf_value(f); }
-__INLINE__ ssize_t sfslen() { return __sf_slen(); }
-__INLINE__ ssize_t sfmaxr(ssize_t n, int s) { return __sf_maxr(n,s); }
-
-#else
-
-#define sfputd(f,v) ( __sf_putd((f),(v)) )
-#define sfputl(f,v) ( __sf_putl((f),(v)) )
-#define sfputu(f,v) ( __sf_putu((f),(v)) )
-#define sfputm(f,v,m) ( __sf_putm((f),(v),(m)) )
-
-#define sfputc(f,c) ( __sf_putc((f),(c)) )
-#define sfgetc(f) ( __sf_getc(f) )
-
-#define sfdlen(v) ( __sf_dlen(v) )
-#define sfllen(v) ( __sf_llen(v) )
-#define sfulen(v) ( __sf_ulen(v) )
-
-#define sffileno(f) ( __sf_fileno(f) )
-#define sfeof(f) ( __sf_eof(f) )
-#define sferror(f) ( __sf_error(f) )
-#define sfclrerr(f) ( __sf_clrerr(f) )
-#define sfstacked(f) ( __sf_stacked(f) )
-#define sfvalue(f) ( __sf_value(f) )
-#define sfslen() ( __sf_slen() )
-#define sfmaxr(n,s) ( __sf_maxr(n,s) )
-
-#endif /*__INLINE__*/
-
-#ifndef _SFSTR_H /* GSF's string manipulation stuff */
-#define _SFSTR_H 1
-
-#define sfstropen() sfnew(0, 0, -1, -1, SF_READ|SF_WRITE|SF_STRING)
-#define sfstrclose(f) sfclose(f)
-
-#define sfstrseek(f,p,m) \
- ( (m) == SEEK_SET ? \
- (((p) < 0 || (p) > (f)->_size) ? (char*)0 : \
- (char*)((f)->_next = (f)->_data+(p)) ) \
- : (m) == SEEK_CUR ? \
- ((f)->_next += (p), \
- (((f)->_next < (f)->_data || (f)->_next > (f)->_data+(f)->_size) ? \
- ((f)->_next -= (p), (char*)0) : (char*)(f)->_next ) ) \
- : (m) == SEEK_END ? \
- ( ((p) > 0 || (f)->_size+(p) < 0) ? (char*)0 : \
- (char*)((f)->_next = (f)->_data+(f)->_size+(p)) ) \
- : (char*)0 \
- )
-
-#define sfstrsize(f) ((f)->_size)
-#define sfstrtell(f) ((f)->_next - (f)->_data)
-#define sfstrpend(f) ((f)->_size - sfstrtell())
-#define sfstrbase(f) ((char*)(f)->_data)
-
-#define sfstruse(f) \
- (sfputc((f),0) < 0 ? (char*)0 : (char*)((f)->_next = (f)->_data) \
- )
-
-#define sfstrrsrv(f,n) \
- (sfreserve((f),(n),SF_WRITE|SF_LOCKR), sfwrite((f),(f)->_next,0), \
- ((f)->_next+(n) <= (f)->_data+(f)->_size ? (char*)(f)->_next : (char*)0) \
- )
-
-#define sfstrbuf(f,b,n,m) \
- (sfsetbuf((f),(b),(n)), ((f)->_flags |= (m) ? SF_MALLOC : 0), \
- ((f)->_data == (unsigned char*)(b) ? 0 : -1) \
- )
-
-#endif /* _SFSTR_H */
-
-#endif /* _SFIO_H */
diff --git a/usr/src/lib/libast/common/include/sfio_s.h b/usr/src/lib/libast/common/include/sfio_s.h
deleted file mode 100644
index 7f7483cc79..0000000000
--- a/usr/src/lib/libast/common/include/sfio_s.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_S_H
-#define _SFIO_S_H 1
-
-/*
- * sfio file structure used by sfio and the stdio source compatibility library
- */
-
-#if !defined(_SFHDR_H) && defined(_SFIO_H) && SFIO_VERSION < 20020214L
-#define _data data
-#define _endb endb
-#define _next next
-#endif
-
-struct _sfio_s
-{ unsigned char* _next; /* next position to read/write from */
- unsigned char* _endw; /* end of write buffer */
- unsigned char* _endr; /* end of read buffer */
- unsigned char* _endb; /* end of buffer */
- struct _sfio_s* _push; /* the stream that was pushed on */
- unsigned short _flags; /* type of stream */
- short _file; /* file descriptor */
- unsigned char* _data; /* base of data buffer */
- ssize_t _size; /* buffer size */
- ssize_t _val; /* values or string lengths */
-#ifdef _SFIO_PRIVATE
- _SFIO_PRIVATE
-#endif
-};
-
-#endif
diff --git a/usr/src/lib/libast/common/include/sfio_t.h b/usr/src/lib/libast/common/include/sfio_t.h
deleted file mode 100644
index 4240316aef..0000000000
--- a/usr/src/lib/libast/common/include/sfio_t.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_T_H
-#define _SFIO_T_H 1
-
-/* This header file is for library writers who need to know certain
-** internal info concerning the full Sfio_t structure. Including this
-** file means that you agree to track closely with sfio development
-** in case its internal architecture is changed.
-**
-** Written by Kiem-Phong Vo
-*/
-
-/* the parts of Sfio_t private to sfio functions */
-#define _SFIO_PRIVATE \
- Sfoff_t extent; /* current file size */ \
- Sfoff_t here; /* current physical location */ \
- unsigned char getr; /* the last sfgetr separator */ \
- unsigned char tiny[1];/* for unbuffered read stream */ \
- unsigned short bits; /* private flags */ \
- unsigned int mode; /* current io mode */ \
- struct _sfdisc_s* disc; /* discipline */ \
- struct _sfpool_s* pool; /* the pool containing this */ \
- struct _sfrsrv_s* rsrv; /* reserved buffer */ \
- struct _sfproc_s* proc; /* coprocess id, etc. */ \
- Void_t* mutex; /* mutex for thread-safety */ \
- Void_t* stdio; /* stdio FILE if any */ \
- Sfoff_t lpos; /* last seek position */ \
- size_t iosz; /* preferred size for I/O */ \
- size_t blksz; /* preferred block size */ \
- Void_t* fill[1];/* modest expansion */
-
-#include "sfio.h"
-
-/* mode bit to indicate that the structure hasn't been initialized */
-#define SF_INIT 0000004
-#define SF_DCDOWN 00010000
-
-/* short-hand for common stream types */
-#define SF_RDWR (SF_READ|SF_WRITE)
-#define SF_RDSTR (SF_READ|SF_STRING)
-#define SF_WRSTR (SF_WRITE|SF_STRING)
-#define SF_RDWRSTR (SF_RDWR|SF_STRING)
-
-/* for static initialization of an Sfio_t structure */
-#define SFNEW(data,size,file,type,disc,mutex) \
- { (unsigned char*)(data), /* next */ \
- (unsigned char*)(data), /* endw */ \
- (unsigned char*)(data), /* endr */ \
- (unsigned char*)(data), /* endb */ \
- (Sfio_t*)0, /* push */ \
- (unsigned short)((type)&SF_FLAGS), /* flags */ \
- (short)(file), /* file */ \
- (unsigned char*)(data), /* data */ \
- (ssize_t)(size), /* size */ \
- (ssize_t)(-1), /* val */ \
- (Sfoff_t)0, /* extent */ \
- (Sfoff_t)0, /* here */ \
- 0, /* getr */ \
- {0}, /* tiny */ \
- 0, /* bits */ \
- (unsigned int)(((type)&(SF_RDWR))|SF_INIT), /* mode */ \
- (struct _sfdisc_s*)(disc), /* disc */ \
- (struct _sfpool_s*)0, /* pool */ \
- (struct _sfrsrv_s*)0, /* rsrv */ \
- (struct _sfproc_s*)0, /* proc */ \
- (mutex), /* mutex */ \
- (Void_t*)0, /* stdio */ \
- (Sfoff_t)0, /* lpos */ \
- (size_t)0 /* iosz */ \
- }
-
-/* function to clear an Sfio_t structure */
-#define SFCLEAR(f,mtx) \
- ( (f)->next = (unsigned char*)0, /* next */ \
- (f)->endw = (unsigned char*)0, /* endw */ \
- (f)->endr = (unsigned char*)0, /* endr */ \
- (f)->endb = (unsigned char*)0, /* endb */ \
- (f)->push = (Sfio_t*)0, /* push */ \
- (f)->flags = (unsigned short)0, /* flags */ \
- (f)->file = -1, /* file */ \
- (f)->data = (unsigned char*)0, /* data */ \
- (f)->size = (ssize_t)(-1), /* size */ \
- (f)->val = (ssize_t)(-1), /* val */ \
- (f)->extent = (Sfoff_t)(-1), /* extent */ \
- (f)->here = (Sfoff_t)0, /* here */ \
- (f)->getr = 0, /* getr */ \
- (f)->tiny[0] = 0, /* tiny */ \
- (f)->bits = 0, /* bits */ \
- (f)->mode = 0, /* mode */ \
- (f)->disc = (struct _sfdisc_s*)0, /* disc */ \
- (f)->pool = (struct _sfpool_s*)0, /* pool */ \
- (f)->rsrv = (struct _sfrsrv_s*)0, /* rsrv */ \
- (f)->proc = (struct _sfproc_s*)0, /* proc */ \
- (f)->mutex = (mtx), /* mutex */ \
- (f)->stdio = (Void_t*)0, /* stdio */ \
- (f)->lpos = (Sfoff_t)0, /* lpos */ \
- (f)->iosz = (size_t)0 /* iosz */ \
- )
-
-/* expose next stream inside discipline function; state saved in int f */
-#define SFDCNEXT(sp,f) (((f)=(sp)->bits&SF_DCDOWN),(sp)->bits|=SF_DCDOWN)
-
-/* restore SFDCNEXT() state from int f */
-#define SFDCPREV(sp,f) ((f)?(0):((sp)->bits&=~SF_DCDOWN))
-
-#endif /* _SFIO_T_H */
diff --git a/usr/src/lib/libast/common/include/vmalloc.h b/usr/src/lib/libast/common/include/vmalloc.h
deleted file mode 100644
index f13cc58879..0000000000
--- a/usr/src/lib/libast/common/include/vmalloc.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _VMALLOC_H
-#define _VMALLOC_H 1
-
-/* Public header file for the virtual malloc package.
-**
-** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
-*/
-
-#define VMALLOC_VERSION 20100101L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _vmalloc_s Vmalloc_t;
-typedef struct _vmstat_s Vmstat_t;
-typedef struct _vmdisc_s Vmdisc_t;
-typedef struct _vmethod_s Vmethod_t;
-typedef struct _vmdata_s Vmdata_t;
-typedef Void_t* (*Vmemory_f)_ARG_((Vmalloc_t*, Void_t*, size_t, size_t, Vmdisc_t*));
-typedef int (*Vmexcept_f)_ARG_((Vmalloc_t*, int, Void_t*, Vmdisc_t*));
-
-struct _vmstat_s
-{ int n_busy; /* number of busy blocks */
- int n_free; /* number of free blocks */
- size_t s_busy; /* total amount of busy space */
- size_t s_free; /* total amount of free space */
- size_t m_busy; /* largest busy piece */
- size_t m_free; /* largest free piece */
- int n_seg; /* number of segments */
- size_t extent; /* total size of region */
-};
-
-struct _vmdisc_s
-{ Vmemory_f memoryf; /* memory manipulator */
- Vmexcept_f exceptf; /* exception handler */
- size_t round; /* rounding requirement */
-};
-
-struct _vmethod_s
-{ Void_t* (*allocf)_ARG_((Vmalloc_t*,size_t));
- Void_t* (*resizef)_ARG_((Vmalloc_t*,Void_t*,size_t,int));
- int (*freef)_ARG_((Vmalloc_t*,Void_t*));
- long (*addrf)_ARG_((Vmalloc_t*,Void_t*));
- long (*sizef)_ARG_((Vmalloc_t*,Void_t*));
- int (*compactf)_ARG_((Vmalloc_t*));
- Void_t* (*alignf)_ARG_((Vmalloc_t*,size_t,size_t));
- unsigned short meth;
-};
-
-struct _vmalloc_s
-{ Vmethod_t meth; /* method for allocation */
- char* file; /* file name */
- int line; /* line number */
- Void_t* func; /* calling function */
- Vmdisc_t* disc; /* discipline to get space */
- Vmdata_t* data; /* the real region data */
- Vmalloc_t* next; /* linked list of regions */
-#ifdef _VM_PRIVATE_
- _VM_PRIVATE_
-#endif
-};
-
-#undef VM_FLAGS /* solaris sys kernel clash */
-
-#define VM_TRUST 0000001 /* forgo some security checks */
-#define VM_TRACE 0000002 /* generate trace */
-#define VM_DBCHECK 0000004 /* check for boundary overwrite */
-#define VM_DBABORT 0000010 /* abort on any warning */
-#define VM_FLAGS 0000017 /* user-settable flags */
-
-#define VM_MTBEST 0000100 /* Vmbest method */
-#define VM_MTPOOL 0000200 /* Vmpool method */
-#define VM_MTLAST 0000400 /* Vmlast method */
-#define VM_MTDEBUG 0001000 /* Vmdebug method */
-#define VM_MTPROFILE 0002000 /* Vmdebug method */
-#define VM_METHODS 0003700 /* available allocation methods */
-
-#define VM_RSCOPY 0000001 /* copy old contents */
-#define VM_RSMOVE 0000002 /* old contents is moveable */
-#define VM_RSZERO 0000004 /* clear new space */
-
-/* exception types */
-#define VM_OPEN 0 /* region being opened */
-#define VM_CLOSE 1 /* announce being closed */
-#define VM_NOMEM 2 /* can't obtain memory */
-#define VM_BADADDR 3 /* bad addr in vmfree/vmresize */
-#define VM_DISC 4 /* discipline being changed */
-#define VM_ALLOC 5 /* announcement from vmalloc() */
-#define VM_FREE 6 /* announcement from vmfree() */
-#define VM_RESIZE 7 /* announcement from vmresize() */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern extern __EXPORT__
-#endif
-#if !_BLD_vmalloc && defined(__IMPORT__)
-#define extern extern __IMPORT__
-#endif
-
-extern Vmethod_t* Vmbest; /* best allocation */
-extern Vmethod_t* Vmlast; /* last-block allocation */
-extern Vmethod_t* Vmpool; /* pool allocation */
-extern Vmethod_t* Vmdebug; /* allocation with debugging */
-extern Vmethod_t* Vmprofile; /* profiling memory usage */
-
-extern Vmdisc_t* Vmdcheap; /* heap discipline */
-extern Vmdisc_t* Vmdcsbrk; /* sbrk discipline */
-
-extern Vmalloc_t* Vmheap; /* heap region */
-extern Vmalloc_t* Vmregion; /* malloc region */
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Vmalloc_t* vmopen _ARG_(( Vmdisc_t*, Vmethod_t*, int ));
-extern int vmclose _ARG_(( Vmalloc_t* ));
-extern int vmclear _ARG_(( Vmalloc_t* ));
-extern int vmcompact _ARG_(( Vmalloc_t* ));
-
-extern Vmdisc_t* vmdisc _ARG_(( Vmalloc_t*, Vmdisc_t* ));
-
-extern Vmalloc_t* vmmopen _ARG_(( char*, Void_t*, size_t ));
-extern Void_t* vmmset _ARG_((Vmalloc_t*, int, Void_t*, int));
-
-extern Void_t* vmalloc _ARG_(( Vmalloc_t*, size_t ));
-extern Void_t* vmalign _ARG_(( Vmalloc_t*, size_t, size_t ));
-extern Void_t* vmresize _ARG_(( Vmalloc_t*, Void_t*, size_t, int ));
-extern Void_t* vmgetmem _ARG_(( Vmalloc_t*, Void_t*, size_t ));
-extern int vmfree _ARG_(( Vmalloc_t*, Void_t* ));
-
-extern long vmaddr _ARG_(( Vmalloc_t*, Void_t* ));
-extern long vmsize _ARG_(( Vmalloc_t*, Void_t* ));
-
-extern Vmalloc_t* vmregion _ARG_(( Void_t* ));
-extern Void_t* vmsegment _ARG_(( Vmalloc_t*, Void_t* ));
-extern int vmset _ARG_(( Vmalloc_t*, int, int ));
-
-extern Void_t* vmdbwatch _ARG_(( Void_t* ));
-extern int vmdbcheck _ARG_(( Vmalloc_t* ));
-extern int vmdebug _ARG_(( int ));
-
-extern int vmprofile _ARG_(( Vmalloc_t*, int ));
-
-extern int vmtrace _ARG_(( int ));
-extern int vmtrbusy _ARG_((Vmalloc_t*));
-
-extern int vmstat _ARG_((Vmalloc_t*, Vmstat_t*));
-
-extern int vmwalk _ARG_((Vmalloc_t*,
- int(*)(Vmalloc_t*,Void_t*,size_t,Vmdisc_t*,Void_t*),
- Void_t*));
-extern char* vmstrdup _ARG_((Vmalloc_t*, const char*));
-
-#if !defined(_BLD_vmalloc) && !defined(_AST_STD_H) && \
- !defined(__stdlib_h) && !defined(__STDLIB_H) && \
- !defined(_STDLIB_INCLUDED) && !defined(_INC_STDLIB)
-extern Void_t* malloc _ARG_(( size_t ));
-extern Void_t* realloc _ARG_(( Void_t*, size_t ));
-extern void free _ARG_(( Void_t* ));
-extern void cfree _ARG_(( Void_t* ));
-extern Void_t* calloc _ARG_(( size_t, size_t ));
-extern Void_t* memalign _ARG_(( size_t, size_t ));
-extern Void_t* valloc _ARG_(( size_t ));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* to coerce any value to a Vmalloc_t*, make ANSI happy */
-#define _VM_(vm) ((Vmalloc_t*)(vm))
-
-/* enable recording of where a call originates from */
-#ifdef VMFL
-
-#if defined(__FILE__)
-#define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__)
-#else
-#define _VMFILE_(vm) (_VM_(vm)->file = 0)
-#endif
-
-#if defined(__LINE__)
-#define _VMLINE_(vm) (_VM_(vm)->line = __LINE__)
-#else
-#define _VMLINE_(vm) (_VM_(vm)->line = 0)
-#endif
-
-#if defined(__FUNCTION__)
-#define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__)
-#else
-#define _VMFUNC_(vm) (_VM_(vm)->func = 0)
-#endif
-
-#define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm))
-
-#define vmalloc(vm,sz) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
-#define vmresize(vm,d,sz,type) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type)) )
-#define vmfree(vm,d) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d)) )
-#define vmalign(vm,sz,align) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.alignf))((vm),(sz),(align)) )
-
-#undef malloc
-#undef realloc
-#undef calloc
-#undef free
-#undef memalign
-#undef valloc
-
-#if _map_malloc
-
-#define malloc(s) (_VMFL_(Vmregion), _ast_malloc((size_t)(s)) )
-#define realloc(d,s) (_VMFL_(Vmregion), _ast_realloc((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) (_VMFL_(Vmregion), _ast_calloc((size_t)n, (size_t)(s)) )
-#define free(d) (_VMFL_(Vmregion), _ast_free((Void_t*)(d)) )
-#define memalign(a,s) (_VMFL_(Vmregion), _ast_memalign((size_t)(a),(size_t)(s)) )
-#define valloc(s) (_VMFL_(Vmregion), _ast_valloc((size_t)(s) )
-
-#else
-
-#if !_std_malloc
-
-#if __STD_C || defined(__STDPP__) || defined(__GNUC__)
-#define malloc(s) ( _VMFL_(Vmregion), (malloc)((size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), (realloc)((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), (calloc)((size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), (free)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), (memalign)((size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), (valloc)((size_t)(s)) )
-#ifndef strdup
-#define strdup(s) ( _VMFL_(Vmregion), (strdup)((char*)(s)) )
-#endif
-
-#else
-
-#define _VMNM_(a,b,c,d,e,f) a/**/b/**/c/**/d/**/e/**/f
-#define malloc(s) ( _VMFL_(Vmregion), _VMNM_(mallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), _VMNM_(reallo,/,*,*,/,c)\
- ( (Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), _VMNM_(callo,/,*,*,/,c)\
- ( (size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), _VMNM_(fre,/,*,*,/,e)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), _VMNM_(memalig,/,*,*,/,n)\
- ( (size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), _VMNM_(vallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#ifndef strdup
-#define strdup(s) ( _VMFL_(Vmregion), _VMNM_(strdu,/,*,*,/,p)\
- ((char*)(s)) )
-#endif
-
-#endif /*__STD_C || defined(__STDPP__) || defined(__GNUC__)*/
-
-#define cfree(d) free(d)
-
-#endif /* !_std_malloc */
-
-#endif /* _map_malloc */
-
-#endif /*VMFL*/
-
-/* non-debugging/profiling allocation calls */
-#ifndef vmalloc
-#define vmalloc(vm,sz) (*(_VM_(vm)->meth.allocf))((vm),(sz))
-#endif
-
-#ifndef vmresize
-#define vmresize(vm,d,sz,type) (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type))
-#endif
-
-#ifndef vmfree
-#define vmfree(vm,d) (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d))
-#endif
-
-#ifndef vmalign
-#define vmalign(vm,sz,align) (*(_VM_(vm)->meth.alignf))((vm),(sz),(align))
-#endif
-
-#define vmaddr(vm,addr) (*(_VM_(vm)->meth.addrf))((vm),(Void_t*)(addr))
-#define vmsize(vm,addr) (*(_VM_(vm)->meth.sizef))((vm),(Void_t*)(addr))
-#define vmcompact(vm) (*(_VM_(vm)->meth.compactf))((vm))
-#define vmoldof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
- (VM_RSMOVE) )
-#define vmnewof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
- (VM_RSMOVE|VM_RSCOPY|VM_RSZERO) )
-#define vmdata(vm) ((Void_t*)(_VM_(vm)->data))
-
-#endif /* _VMALLOC_H */
diff --git a/usr/src/lib/libast/common/regex/regcoll.c b/usr/src/lib/libast/common/regex/regcoll.c
deleted file mode 100644
index 240dcc1f4c..0000000000
--- a/usr/src/lib/libast/common/regex/regcoll.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#pragma prototyped
-/*
- * regex collation symbol support
- */
-
-#include "reglib.h"
-
-#include <ccode.h>
-
-#ifndef UCS_BYTE
-#define UCS_BYTE 1
-#endif
-
-#include "ucs_names.h"
-
-typedef struct Ucs_map_s
-{
- Ucs_attr_t attr[3];
- Ucs_code_t code;
- const char* name;
- Dtlink_t link;
- struct Ucs_map_s* next;
-} Ucs_map_t;
-
-#define setattr(a,i) ((a)[(i)>>5]|=(1<<((i)&((1<<5)-1))))
-#define tstattr(a,i) ((a)[(i)>>5]&(1<<((i)&((1<<5)-1))))
-#define clrattr(a,i) ((a)[(i)>>5]&=~(1<<((i)&((1<<5)-1))))
-
-static struct Local_s
-{
- int fatal;
- Dt_t* attrs;
- Dt_t* names;
- Dtdisc_t dtdisc;
-#if CC_NATIVE != CC_ASCII
- unsigned char* a2n;
-#endif
-} local;
-
-/*
- * initialize the writeable tables from the readonly data
- * the tables are big enough to be concerned about text vs. data vs. bss
- * UCS_BYTE==0 100K
- * UCS_BYTE==1 20K
- */
-
-static int
-initialize(void)
-{
- register int i;
- register Ucs_map_t* a;
- register Ucs_map_t* w;
-
- if (local.fatal)
- return -1;
- local.dtdisc.link = offsetof(Ucs_map_t, link);
- local.dtdisc.key = offsetof(Ucs_map_t, name);
- local.dtdisc.size = -1;
- if (!(w = (Ucs_map_t*)malloc(sizeof(Ucs_map_t) * (elementsof(ucs_attrs) + elementsof(ucs_names)))))
- {
- local.fatal = 1;
- return -1;
- }
- if (!(local.attrs = dtopen(&local.dtdisc, Dttree)))
- {
- free(w);
- local.fatal = 1;
- return -1;
- }
- if (!(local.names = dtopen(&local.dtdisc, Dttree)))
- {
- free(w);
- dtclose(local.attrs);
- local.fatal = 1;
- return -1;
- }
- for (i = 0; i < elementsof(ucs_attrs); i++, w++)
- {
- memcpy(w, &ucs_attrs[i], offsetof(Ucs_dat_t, table));
- w->name = ucs_strings[ucs_attrs[i].table] + ucs_attrs[i].index;
- w->next = 0;
- dtinsert(local.attrs, w);
- }
- for (i = 0; i < elementsof(ucs_names); i++, w++)
- {
- memcpy(w, &ucs_names[i], offsetof(Ucs_dat_t, table));
- w->name = ucs_strings[ucs_names[i].table] + ucs_names[i].index;
- w->next = 0;
- if (a = (Ucs_map_t*)dtsearch(local.names, w))
- {
- while (a->next)
- a = a->next;
- a->next = w;
- }
- else
- dtinsert(local.names, w);
- }
-#if CC_NATIVE != CC_ASCII
- local.a2n = ccmap(CC_ASCII, CC_NATIVE);
-#endif
- return 0;
-}
-
-/*
- * return the collating symbol delimited by [c c], where c is either '=' or '.'
- * s points to the first char after the initial [
- * if e!=0 it is set to point to the next char in s on return
- *
- * the collating symbol is converted to multibyte in <buf,size>
- * the return value is:
- * -1 syntax error or buf not large enough
- * >=0 size with 0-terminated mb collation element
- * or ligature value in buf
- */
-
-int
-regcollate(register const char* s, char** e, char* buf, int size)
-{
- register int c;
- register char* u;
- register char* b;
- register char* x;
- register Ucs_map_t* a;
- Ucs_map_t* z;
- const char* t;
- const char* v;
- int n;
- int r;
- int ul;
- int term;
- wchar_t w[2];
- Ucs_attr_t attr[3];
-
- if (size < 2)
- r = -1;
- else if ((term = *s++) != '.' && term != '=')
- {
- s--;
- r = -1;
- }
- else if (*s == term && *(s + 1) == ']')
- r = -1;
- else
- {
- t = s;
- mbchar(s);
- if ((n = (s - t)) == 1)
- {
- if (*s == term && *(s + 1) == ']')
- {
- s += 2;
- r = -1;
- }
- else
- {
- if (!local.attrs && initialize())
- return -1;
- attr[0] = attr[1] = attr[2] = 0;
- ul = 0;
- b = buf;
- x = buf + size - 2;
- r = 1;
- s = t;
- do
- {
- v = s;
- u = b;
- for (;;)
- {
- if (!(c = *s++))
- return -1;
- if (c == term)
- {
- if (!(c = *s++))
- return -1;
- if (c != term)
- {
- if (c != ']')
- return -1;
- r = -1;
- break;
- }
- }
- if (c == ' ' || c == '-' && u > b && *s != ' ' && *s != '-')
- break;
- if (isupper(c))
- c = tolower(c);
- if (u > x)
- break;
- *u++ = c;
- }
- *u = 0;
- if (a = (Ucs_map_t*)dtmatch(local.attrs, b))
- setattr(attr, a->code);
- else
- {
- if (u < x)
- *u++ = ' ';
- if (b == buf)
- {
- if (isupper(*v))
- ul = UCS_UC;
- else if (islower(*v))
- ul = UCS_LC;
- }
- b = u;
- }
- } while (r > 0);
- if (b > buf && *(b - 1) == ' ')
- b--;
- *b = 0;
- attr[0] &= ~((Ucs_attr_t)1);
- if (ul)
- {
- if (tstattr(attr, UCS_UC) || tstattr(attr, UCS_LC))
- ul = 0;
- else
- setattr(attr, ul);
- }
- if (z = (Ucs_map_t*)dtmatch(local.names, buf))
- for(;;)
- {
- for (a = z; a; a = a->next)
- if ((attr[0] & a->attr[0]) == attr[0] && (attr[1] & a->attr[1]) == attr[1] && (attr[2] & a->attr[2]) == attr[2])
- {
-#if 0
- if (a->code <= 0xff)
- {
-#if CC_NATIVE != CC_ASCII
- buf[0] = local.a2n[a->code];
-#else
- buf[0] = a->code;
-#endif
- buf[r = 1] = 0;
- ul = 0;
- break;
- }
-#endif
- w[0] = a->code;
- w[1] = 0;
- if ((r = wcstombs(buf, w, size)) > 0)
- ul = 0;
- break;
- }
- if (!ul)
- break;
- clrattr(attr, ul);
- ul = 0;
- }
- }
- if (r < 0)
- {
- if ((n = s - t - 2) > (size - 1))
- return -1;
- memcpy(buf, t, n);
- buf[n] = 0;
- if (n == 1)
- r = n;
- else
- {
- for (t = buf; isalnum(*t); t++);
- if (!*t)
- r = n;
- }
- }
- }
- else if (*s++ != term || *s++ != ']')
- {
- s--;
- r = -1;
- }
- else if (n > (size - 1))
- r = -1;
- else
- {
- memcpy(buf, t, n);
- buf[r = n] = 0;
- }
- }
- if (e)
- *e = (char*)s;
- return r;
-}
diff --git a/usr/src/lib/libast/common/regex/ucs_names.h b/usr/src/lib/libast/common/regex/ucs_names.h
deleted file mode 100644
index c97e48d916..0000000000
--- a/usr/src/lib/libast/common/regex/ucs_names.h
+++ /dev/null
@@ -1,6426 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated by ucs_names-index.c : : */
-
-/*
- * ucs name and alias tables
- * define UCS_BYTE for 8 bit ascii/latin only
- */
-
-#include <ast_common.h>
-
-#define UCS_UC 1
-#define UCS_LC 2
-
-typedef uint16_t Ucs_code_t;
-typedef uint32_t Ucs_attr_t;
-
-typedef struct Ucs_dat_s
-{
- Ucs_attr_t attr[3];
- Ucs_code_t code;
- Ucs_code_t table;
- Ucs_code_t index;
-} Ucs_dat_t;
-
-static const char ucs_strings_0[] = "\
-letter\0\
-with\0\
-and\0\
-digit\0\
-form\0\
-sign\0\
-capital\0\
-uc\0\
-small\0\
-lc\0\
-above\0\
-acute\0\
-alef\0\
-alpha\0\
-arabic\0\
-below\0\
-bopomofo\0\
-box\0\
-breve\0\
-caron\0\
-cedilla\0\
-circled\0\
-circumflex\0\
-cyrillic\0\
-dasia\0\
-diaeresis\0\
-dot\0\
-double\0\
-down\0\
-drawings\0\
-eta\0\
-final\0\
-full\0\
-grave\0\
-greek\0\
-heavy\0\
-hebrew\0\
-hiragana\0\
-hook\0\
-horizontal\0\
-horn\0\
-initial\0\
-iota\0\
-isolated\0\
-katakana\0\
-latin\0\
-left\0\
-light\0\
-line\0\
-macron\0\
-mark\0\
-medial\0\
-number\0\
-numeral\0\
-omega\0\
-one\0\
-oxia\0\
-parenthesized\0\
-perispomeni\0\
-prosgegrammeni\0\
-psili\0\
-right\0\
-roman\0\
-single\0\
-tilde\0\
-to\0\
-up\0\
-upsilon\0\
-varia\0\
-vertical\0\
-white\0\
-of\0\
-stop\0\
-"
-"black\0\
-fraction\0\
-vulgar\0\
-superscript\0\
-subscript\0\
-square\0\
-ligature\0\
-space\0\
-indic\0\
-ideograph\0\
-ideographic\0\
-equal\0\
-arrow\0\
-than\0\
-suit\0\
-or\0\
-bracket\0\
-ocr\0\
-half\0\
-end\0\
-big\0\
-byelorussian\0\
-inverted\0\
-middle\0\
-ogonek\0\
-ring\0\
-short\0\
-stroke\0\
-tonos\0\
-ukrainian\0\
-upturn\0\
-null\0\
-nul\0\
-nu\0\
-start heading\0\
-soh\0\
-sh\0\
-start text\0\
-stx\0\
-sx\0\
-text\0\
-etx\0\
-ex\0\
-transmission\0\
-eot\0\
-et\0\
-enquiry\0\
-enq\0\
-eq\0\
-acknowledge\0\
-ack\0\
-ak\0\
-bell\0\
-bel\0\
-bl\0\
-alert\0\
-backspace\0\
-bs\0\
-tabulation\0\
-tab\0\
-ht\0\
-feed\0\
-lf\0\
-newline\0\
-vt\0\
-ff\0\
-carriage return\0\
-cr\0\
-shift out\0\
-so\0\
-shift in\0\
-si\0\
-data link escape\0\
-dl\0\
-dle\0\
-"
-"device control\0\
-d1\0\
-dc1\0\
-device control two\0\
-d2\0\
-dc2\0\
-device control three\0\
-d3\0\
-dc3\0\
-device control four\0\
-d4\0\
-dc4\0\
-negative acknowledge\0\
-nak\0\
-nk\0\
-synchronous idle\0\
-sy\0\
-syn\0\
-transmission block\0\
-eb\0\
-etb\0\
-cancel\0\
-can\0\
-cn\0\
-medium\0\
-em\0\
-substitute\0\
-sb\0\
-sub\0\
-escape\0\
-ec\0\
-esc\0\
-file separator\0\
-fs\0\
-is4\0\
-group separator\0\
-gs\0\
-is3\0\
-intro\0\
-record separator\0\
-is2\0\
-rs\0\
-unit separator\0\
-is1\0\
-us\0\
-\0\
-sp\0\
-exclamation\0\
-quotation\0\
-nb\0\
-h-\0\
-dollar\0\
-do\0\
-!s\0\
-percent\0\
-ampersand\0\
-apostrophe\0\
-parenthesis\0\
-asterisk\0\
-plus\0\
-comma\0\
-hyphen minus\0\
-hyphen\0\
-period\0\
-solidus\0\
-slash\0\
-zero\0\
-two\0\
-three\0\
-four\0\
-five\0\
-six\0\
-"
-"seven\0\
-eight\0\
-nine\0\
-colon\0\
-semicolon\0\
-less\0\
-equals\0\
-greater\0\
-question\0\
-commercial at\0\
-at\0\
-oa\0\
-a\0\
-b\0\
-c\0\
-d\0\
-e\0\
-f\0\
-g\0\
-h\0\
-i\0\
-j\0\
-k\0\
-l\0\
-m\0\
-n\0\
-o\0\
-p\0\
-q\0\
-r\0\
-s\0\
-t\0\
-u\0\
-v\0\
-w\0\
-x\0\
-y\0\
-z\0\
-reverse solidus\0\
-backslash\0\
-)>\0\
-accent\0\
-hat\0\
-'>\0\
-low\0\
-underscore\0\
-'!\0\
-curly\0\
-brace\0\
-(!\0\
-bar\0\
-!)\0\
-'?e\0\
-delete\0\
-del\0\
-dt\0\
-padding character\0\
-pa\0\
-pad\0\
-high octet preset\0\
-ho\0\
-hop\0\
-break permitted here\0\
-bh\0\
-bph\0\
-no break here\0\
-nh\0\
-nbh\0\
-index\0\
-in\0\
-ind\0\
-next\0\
-nl\0\
-nel\0\
-start selected area\0\
-sa\0\
-ssa\0\
-selected area\0\
-es\0\
-esa\0\
-character tabulation set\0\
-hs\0\
-"
-"hts\0\
-character tabulation justification\0\
-hj\0\
-htj\0\
-tabulation set\0\
-vs\0\
-vts\0\
-partial forward\0\
-pd\0\
-pld\0\
-partial backward\0\
-pu\0\
-plu\0\
-reverse feed\0\
-ri\0\
-shift two\0\
-s2\0\
-ss2\0\
-shift three\0\
-s3\0\
-ss3\0\
-device control string\0\
-dc\0\
-dcs\0\
-private use\0\
-p1\0\
-pu1\0\
-private use two\0\
-p2\0\
-pu2\0\
-set transmit state\0\
-ts\0\
-sts\0\
-cancel character\0\
-cc\0\
-cch\0\
-message waiting\0\
-mw\0\
-start guarded area\0\
-sg\0\
-spa\0\
-guarded area\0\
-eg\0\
-epa\0\
-start string\0\
-sos\0\
-graphic character introducer\0\
-gc\0\
-sgci\0\
-character introducer\0\
-sc\0\
-sci\0\
-control sequence introducer\0\
-ci\0\
-csi\0\
-string terminator\0\
-st\0\
-operating system command\0\
-oc\0\
-osc\0\
-privacy message\0\
-pm\0\
-application program command\0\
-"
-"ac\0\
-apc\0\
-no break\0\
-ns\0\
-!i\0\
-cent\0\
-ct\0\
-!c\0\
-pound\0\
-l-\0\
-currency\0\
-cu\0\
-xo\0\
-yen\0\
-ye\0\
-y-\0\
-broken bar\0\
-bb\0\
-!b\0\
-section\0\
-se\0\
-':\0\
-copyright\0\
-co\0\
-feminine ordinal indicator\0\
--a\0\
-pointing angle quotation\0\
-<<\0\
-not\0\
-no\0\
-7!\0\
-soft hyphen\0\
---\0\
-registered\0\
-rg\0\
-'m\0\
-degree\0\
-dg\0\
-plus minus\0\
-+-\0\
-2s\0\
-3s\0\
-micro\0\
-my\0\
-pilcrow\0\
-pi\0\
-9i\0\
-.m\0\
-',\0\
-1s\0\
-masculine ordinal indicator\0\
--o\0\
->>\0\
-quarter\0\
-14\0\
-12\0\
-three quarters\0\
-34\0\
-?i\0\
-a!\0\
-a'\0\
-a>\0\
-a?\0\
-a:\0\
-aa\0\
-ae\0\
-c,\0\
-e!\0\
-e'\0\
-e>\0\
-e:\0\
-i!\0\
-i'\0\
-i>\0\
-i:\0\
-eth\0\
-d-\0\
-n?\0\
-o!\0\
-o'\0\
-o>\0\
-o?\0\
-o:\0\
-"
-"multiplication\0\
-*x\0\
-o/\0\
-u!\0\
-u'\0\
-u>\0\
-u:\0\
-y'\0\
-thorn\0\
-th\0\
-sharp s\0\
-ss\0\
-division\0\
--:\0\
-y:\0\
-";
-
-#if !UCS_BYTE
-static const char ucs_strings_1[] = "\
-a-\0\
-a(\0\
-a;\0\
-c'\0\
-c>\0\
-c.\0\
-c<\0\
-d<\0\
-d/\0\
-e-\0\
-e(\0\
-e.\0\
-e;\0\
-e<\0\
-g>\0\
-g(\0\
-g.\0\
-g,\0\
-h>\0\
-h/\0\
-i?\0\
-i-\0\
-i(\0\
-i;\0\
-i.\0\
-dotless i\0\
-ij\0\
-j>\0\
-k,\0\
-kra\0\
-kk\0\
-l'\0\
-l,\0\
-l<\0\
-l.\0\
-l/\0\
-n'\0\
-n,\0\
-n<\0\
-n preceded by apostrophe\0\
-'n\0\
-eng\0\
-ng\0\
-o-\0\
-o(\0\
-o\"\0\
-oe\0\
-r'\0\
-r,\0\
-r<\0\
-s'\0\
-s>\0\
-s,\0\
-s<\0\
-t,\0\
-t<\0\
-t/\0\
-u?\0\
-u-\0\
-u(\0\
-u0\0\
-u\"\0\
-u;\0\
-w>\0\
-y>\0\
-z'\0\
-z.\0\
-z<\0\
-long s\0\
-s1\0\
-b/\0\
-b2\0\
-c2\0\
-f2\0\
-k2\0\
-o9\0\
-oi\0\
-yr\0\
-u9\0\
-z/\0\
-ezh\0\
-ed\0\
-dz\0\
-dz<\0\
-d z\0\
-lj\0\
-lj3\0\
-l j\0\
-nj\0\
-nj3\0\
-n j\0\
-a<\0\
-i<\0\
-o<\0\
-u<\0\
-"
-"u:-\0\
-u:'\0\
-u:<\0\
-u:!\0\
-turned e\0\
-e1\0\
-a1\0\
-a7\0\
-a3\0\
-g/\0\
-g<\0\
-k<\0\
-o;\0\
-o1\0\
-ez\0\
-j<\0\
-dz3\0\
-g'\0\
-aa'\0\
-ae'\0\
-o/'\0\
-a!!\0\
-a)\0\
-e!!\0\
-e)\0\
-i!!\0\
-i)\0\
-o!!\0\
-o)\0\
-r!!\0\
-r)\0\
-u!!\0\
-u)\0\
-r long leg\0\
-r1\0\
-modifier turned comma\0\
-;s\0\
-modifier accent\0\
-1>\0\
-'<\0\
-modifier\0\
-1-\0\
-1!\0\
-'(\0\
-'.\0\
-'0\0\
-';\0\
-1?\0\
-'\"\0\
-combining accent\0\
-\"`\0\
-\"'\0\
-'g\0\
-lower\0\
-,g\0\
-ypogegrammeni\0\
-j3\0\
-?%\0\
-'*\0\
-dialytika\0\
-'%\0\
-a%\0\
-ano teleia\0\
-.*\0\
-epsilon\0\
-e%\0\
-y%\0\
-i%\0\
-omicron\0\
-o%\0\
-u%\0\
-w%\0\
-i3\0\
-a*\0\
-beta\0\
-b*\0\
-gamma\0\
-g*\0\
-delta\0\
-d*\0\
-e*\0\
-zeta\0\
-z*\0\
-y*\0\
-theta\0\
-h*\0\
-i*\0\
-"
-"kappa\0\
-k*\0\
-lamda\0\
-l*\0\
-mu\0\
-m*\0\
-n*\0\
-xi\0\
-c*\0\
-o*\0\
-p*\0\
-rho\0\
-r*\0\
-sigma\0\
-s*\0\
-tau\0\
-t*\0\
-u*\0\
-phi\0\
-f*\0\
-chi\0\
-x*\0\
-psi\0\
-q*\0\
-w*\0\
-j*\0\
-v*\0\
-u3\0\
-*s\0\
-beta symbol\0\
-b3\0\
-stigma\0\
-t3\0\
-digamma\0\
-m3\0\
-koppa\0\
-k3\0\
-sampi\0\
-p3\0\
-io\0\
-dje\0\
-d%\0\
-gje\0\
-g%\0\
-ie\0\
-dze\0\
-ds\0\
-ii\0\
-yi\0\
-je\0\
-j%\0\
-lje\0\
-nje\0\
-tshe\0\
-kje\0\
-kj\0\
-v%\0\
-dzhe\0\
-a=\0\
-be\0\
-b=\0\
-ve\0\
-v=\0\
-ghe\0\
-g=\0\
-de\0\
-d=\0\
-e=\0\
-zhe\0\
-z%\0\
-ze\0\
-z=\0\
-i=\0\
-j=\0\
-ka\0\
-k=\0\
-el\0\
-l=\0\
-m=\0\
-en\0\
-n=\0\
-o=\0\
-pe\0\
-p=\0\
-er\0\
-r=\0\
-s=\0\
-te\0\
-t=\0\
-u=\0\
-ef\0\
-f=\0\
-ha\0\
-h=\0\
-tse\0\
-c=\0\
-"
-"che\0\
-c%\0\
-sha\0\
-s%\0\
-shcha\0\
-hard\0\
-=\"\0\
-yeru\0\
-y=\0\
-soft\0\
-%\"\0\
-yu\0\
-ju\0\
-ya\0\
-ja\0\
-='\0\
-%'\0\
-yat\0\
-y3\0\
-yus\0\
-o3\0\
-fita\0\
-f3\0\
-izhitsa\0\
-v3\0\
-c3\0\
-g3\0\
-a+\0\
-bet\0\
-b+\0\
-gimel\0\
-g+\0\
-dalet\0\
-d+\0\
-he\0\
-h+\0\
-vav\0\
-w+\0\
-zayin\0\
-z+\0\
-het\0\
-x+\0\
-tet\0\
-tj\0\
-yod\0\
-j+\0\
-kaf\0\
-k%\0\
-k+\0\
-lamed\0\
-l+\0\
-mem\0\
-m%\0\
-m+\0\
-nun\0\
-n%\0\
-n+\0\
-samekh\0\
-s+\0\
-ayin\0\
-e+\0\
-p%\0\
-p+\0\
-tsadi\0\
-zj\0\
-qof\0\
-q+\0\
-resh\0\
-r+\0\
-shin\0\
-tav\0\
-t+\0\
-,+\0\
-;+\0\
-?+\0\
-hamza\0\
-h'\0\
-madda\0\
-am\0\
-ah\0\
-waw hamza\0\
-wh\0\
-yeh hamza\0\
-yh\0\
-beh\0\
-teh marbuta\0\
-tm\0\
-teh\0\
-theh\0\
-tk\0\
-jeem\0\
-hah\0\
-"
-"hk\0\
-khah\0\
-dal\0\
-thal\0\
-dk\0\
-reh\0\
-zain\0\
-seen\0\
-sheen\0\
-sn\0\
-sad\0\
-c+\0\
-dad\0\
-dd\0\
-tah\0\
-zah\0\
-zh\0\
-ain\0\
-ghain\0\
-i+\0\
-tatweel\0\
-++\0\
-feh\0\
-f+\0\
-qaf\0\
-lam\0\
-meem\0\
-noon\0\
-heh\0\
-waw\0\
-maksura\0\
-yeh\0\
-y+\0\
-fathatan\0\
-:+\0\
-dammatan\0\
-\"+\0\
-kasratan\0\
-=+\0\
-fatha\0\
-/+\0\
-damma\0\
-'+\0\
-kasra\0\
-1+\0\
-shadda\0\
-3+\0\
-sukun\0\
-0+\0\
-0a\0\
-1a\0\
-2a\0\
-3a\0\
-4a\0\
-5a\0\
-6a\0\
-7a\0\
-8a\0\
-9a\0\
-%a\0\
-as\0\
-peh\0\
-hah hamza\0\
-hh\0\
-tcheh\0\
-tc\0\
-jeh\0\
-veh\0\
-v+\0\
-gaf\0\
-gf\0\
-a-0\0\
-b.\0\
-b-.\0\
-b_\0\
-c,'\0\
-d.\0\
-d-.\0\
-d_\0\
-d,\0\
-d->\0\
-e-!\0\
-e-'\0\
-e->\0\
-e-?\0\
-e,(\0\
-f.\0\
-g-\0\
-h.\0\
-h-.\0\
-h:\0\
-"
-"h,\0\
-h-(\0\
-i-?\0\
-i:'\0\
-k'\0\
-k-.\0\
-k_\0\
-l-.\0\
-l--.\0\
-l_\0\
-l->\0\
-m'\0\
-m.\0\
-m-.\0\
-n.\0\
-n-.\0\
-n_\0\
-n->\0\
-o?'\0\
-o?:\0\
-o-!\0\
-o-'\0\
-p'\0\
-p.\0\
-r.\0\
-r-.\0\
-r--.\0\
-r_\0\
-s.\0\
-s-.\0\
-s'.\0\
-s<.\0\
-s.-.\0\
-t.\0\
-t-.\0\
-t_\0\
-t->\0\
-u--:\0\
-u-?\0\
-u->\0\
-u?'\0\
-u-:\0\
-v?\0\
-v-.\0\
-w!\0\
-w'\0\
-w:\0\
-w.\0\
-w-.\0\
-x.\0\
-x:\0\
-y.\0\
-z>\0\
-z-.\0\
-z_\0\
-a-.\0\
-a2\0\
-a>'\0\
-a>!\0\
-a>2\0\
-a>?\0\
-a>-.\0\
-a('\0\
-a(!\0\
-a(2\0\
-a(?\0\
-a(-.\0\
-e-.\0\
-e2\0\
-e?\0\
-e>'\0\
-e>!\0\
-e>2\0\
-e>?\0\
-e>-.\0\
-i2\0\
-i-.\0\
-o-.\0\
-o2\0\
-o>'\0\
-o>!\0\
-o>2\0\
-o>?\0\
-o>-.\0\
-o9'\0\
-o9!\0\
-o92\0\
-o9?\0\
-o9-.\0\
-u-.\0\
-u2\0\
-u9'\0\
-u9!\0\
-"
-"u92\0\
-u9?\0\
-u9-.\0\
-y!\0\
-y-.\0\
-y2\0\
-y?\0\
-a*,\0\
-a*;\0\
-a*,!\0\
-a*;!\0\
-a*,'\0\
-a*;'\0\
-a*,?\0\
-a*;?\0\
-e*,\0\
-e*;\0\
-e*,!\0\
-e*;!\0\
-e*,'\0\
-e*;'\0\
-y*,\0\
-y*;\0\
-y*,!\0\
-y*;!\0\
-y*,'\0\
-y*;'\0\
-y*,?\0\
-y*;?\0\
-i*,\0\
-i*;\0\
-i*,!\0\
-i*;!\0\
-i*,'\0\
-i*;'\0\
-i*,?\0\
-i*;?\0\
-o*,\0\
-o*;\0\
-o*,!\0\
-o*;!\0\
-o*,'\0\
-o*;'\0\
-u*,\0\
-u*;\0\
-u*,!\0\
-u*;!\0\
-u*,'\0\
-u*;'\0\
-u*,?\0\
-u*;?\0\
-w*,\0\
-w*;\0\
-w*,!\0\
-w*;!\0\
-w*,'\0\
-w*;'\0\
-w*,?\0\
-w*;?\0\
-a*!\0\
-a*'\0\
-e*!\0\
-e*'\0\
-y*!\0\
-y*'\0\
-i*!\0\
-i*'\0\
-o*!\0\
-o*'\0\
-u*!\0\
-u*'\0\
-w*!\0\
-w*'\0\
-a*,j\0\
-a*;j\0\
-a*,!j\0\
-a*;!j\0\
-a*,'j\0\
-a*;'j\0\
-a*,?j\0\
-a*;?j\0\
-y*,j\0\
-y*;j\0\
-y*,!j\0\
-y*;!j\0\
-y*,'j\0\
-"
-"y*;'j\0\
-y*,?j\0\
-y*;?j\0\
-w*,j\0\
-w*;j\0\
-w*,!j\0\
-w*;!j\0\
-w*,'j\0\
-w*;'j\0\
-w*,?j\0\
-w*;?j\0\
-vrachy\0\
-a*(\0\
-a*-\0\
-a*!j\0\
-a*j\0\
-a*'j\0\
-a*?\0\
-a*?j\0\
-koronis\0\
-)*\0\
-,,\0\
-?*\0\
-?:\0\
-y*!j\0\
-y*j\0\
-y*'j\0\
-y*?\0\
-y*?j\0\
-e*!!\0\
-,!\0\
-,'\0\
-?,\0\
-i*(\0\
-i*-\0\
-i*:!\0\
-i*:'\0\
-i*?\0\
-i*:?\0\
-;!\0\
-;'\0\
-?;\0\
-u*(\0\
-u*-\0\
-u*:!\0\
-u*:'\0\
-r*,\0\
-r*;\0\
-u*?\0\
-u*:?\0\
-!:\0\
-:'\0\
-!*\0\
-w*!j\0\
-w*j\0\
-w*'j\0\
-w*?\0\
-w*?j\0\
-/*\0\
-;;\0\
-1n\0\
-1m\0\
-three per em\0\
-3m\0\
-four per em\0\
-4m\0\
-six per em\0\
-6m\0\
-thin\0\
-1t\0\
-hair\0\
-1h\0\
-lr\0\
-rl\0\
-en dash\0\
--n\0\
-em dash\0\
--m\0\
--3\0\
-!2\0\
-=2\0\
-'6\0\
-'9\0\
-low-9 quotation\0\
-.9\0\
-"
-"high reversed-9 quotation\0\
-9'\0\
-\"6\0\
-\"9\0\
-:9\0\
-9\"\0\
-dagger\0\
-/-\0\
-/=\0\
-bullet\0\
-triangular bullet\0\
-3b\0\
-two leader\0\
-..\0\
-ellipsis\0\
-.3\0\
-hyphenation point\0\
-.-\0\
-separator\0\
-linesep\0\
-paragraph separator\0\
-parsep\0\
-per mille\0\
-%0\0\
-prime\0\
-1'\0\
-2'\0\
-triple prime\0\
-3'\0\
-reversed prime\0\
-1\"\0\
-2\"\0\
-reversed triple prime\0\
-3\"\0\
-caret\0\
-ca\0\
-<1\0\
->1\0\
-reference\0\
-:x\0\
-!*2\0\
-overline\0\
-'-\0\
-hyphen bullet\0\
--b\0\
-/f\0\
-0s\0\
-4s\0\
-5s\0\
-6s\0\
-7s\0\
-8s\0\
-9s\0\
-+s\0\
-minus\0\
--s\0\
-=s\0\
-(s\0\
-)s\0\
-french franc\0\
-lira\0\
-peseta\0\
-won\0\
-w=\0\
-euro\0\
-combining harpoon\0\
-\"7\0\
-degree celsius\0\
-care\0\
-degree fahrenheit\0\
-numero\0\
-n0\0\
-sound recording copyright\0\
-po\0\
-"
-"prescription take\0\
-rx\0\
-service\0\
-sm\0\
-trade\0\
-ohm\0\
-om\0\
-angstrom\0\
-ao\0\
-estimated symbol\0\
-est\0\
-third\0\
-13\0\
-two thirds\0\
-23\0\
-fifth\0\
-15\0\
-two fifths\0\
-25\0\
-three fifths\0\
-35\0\
-four fifths\0\
-45\0\
-sixth\0\
-16\0\
-five sixths\0\
-56\0\
-eighth\0\
-18\0\
-three eighths\0\
-38\0\
-five eighths\0\
-58\0\
-seven eighths\0\
-78\0\
-1r\0\
-2r\0\
-3r\0\
-4r\0\
-5r\0\
-6r\0\
-7r\0\
-8r\0\
-9r\0\
-ten\0\
-ar\0\
-eleven\0\
-br\0\
-twelve\0\
-fifty\0\
-50r\0\
-hundred\0\
-100r\0\
-five hundred\0\
-500r\0\
-thousand\0\
-1000r\0\
-thousand c d\0\
-1000rcd\0\
-five thousand\0\
-5000r\0\
-ten thousand\0\
-10000r\0\
-leftwards\0\
-<-\0\
-upwards\0\
--!\0\
-rightwards\0\
-->\0\
-downwards\0\
--v\0\
-<>\0\
-ud\0\
-north west\0\
-<!!\0\
-north east\0\
-"
-"//>\0\
-south east\0\
-!!>\0\
-south west\0\
-<//\0\
-base\0\
-ud-\0\
-rightwards harpoon barb upwards\0\
->v\0\
-<=\0\
-=>\0\
-==\0\
-for all\0\
-fa\0\
-partial differential\0\
-dp\0\
-there exists\0\
-empty set\0\
-/0\0\
-increment\0\
-nabla\0\
-element\0\
-(-\0\
-contains as member\0\
--)\0\
-proof\0\
-fp\0\
-n ary product\0\
-*p\0\
-n ary summation\0\
-+z\0\
--2\0\
-minus plus\0\
--+\0\
-.+\0\
-asterisk operator\0\
-*-\0\
-operator\0\
-ob\0\
-bullet operator\0\
-root\0\
-rt\0\
-proportional\0\
-0(\0\
-infinity\0\
-00\0\
-angle\0\
--l\0\
-parallel\0\
-pp\0\
-logical\0\
-an\0\
-intersection\0\
-(u\0\
-union\0\
-)u\0\
-integral\0\
-di\0\
-contour integral\0\
-therefore\0\
-.:\0\
-because\0\
-:.\0\
-ratio\0\
-:r\0\
-proportion\0\
-::\0\
-?1\0\
-lazy s\0\
-cg\0\
-asymptotically\0\
-"
-"?-\0\
-approximately\0\
-?=\0\
-almost\0\
-?2\0\
-all\0\
-=?\0\
-image approximately\0\
-hi\0\
-!=\0\
-identical\0\
-=3\0\
-=<\0\
->=\0\
-much less\0\
-<*\0\
-much greater\0\
-*>\0\
-not less\0\
-!<\0\
-not greater\0\
-!>\0\
-subset\0\
-(c\0\
-superset\0\
-)c\0\
-(_\0\
-)_\0\
-0.\0\
-02\0\
-tack\0\
--t\0\
-.p\0\
-:3\0\
-house\0\
-eh\0\
-ceiling\0\
-<7\0\
->7\0\
-floor\0\
-7<\0\
-7>\0\
-reversed not\0\
-ni\0\
-arc\0\
-(a\0\
-telephone recorder\0\
-tr\0\
-place interest\0\
-88\0\
-top integral\0\
-iu\0\
-bottom integral\0\
-il\0\
-pointing angle\0\
-</\0\
-/>\0\
-open\0\
-chair\0\
-3h\0\
-fork\0\
-2h\0\
-4h\0\
-branch bank identification\0\
-1j\0\
-amount check\0\
-2j\0\
-dash\0\
-3j\0\
-customer account\0\
-4j\0\
-1-o\0\
-2-o\0\
-3-o\0\
-4-o\0\
-5-o\0\
-6-o\0\
-"
-"7-o\0\
-8-o\0\
-9-o\0\
-10-o\0\
-11-o\0\
-12-o\0\
-thirteen\0\
-13-o\0\
-fourteen\0\
-14-o\0\
-fifteen\0\
-15-o\0\
-sixteen\0\
-16-o\0\
-seventeen\0\
-17-o\0\
-eighteen\0\
-18-o\0\
-nineteen\0\
-19-o\0\
-twenty\0\
-20-o\0\
-(1)\0\
-(2)\0\
-(3)\0\
-(4)\0\
-(5)\0\
-(6)\0\
-(7)\0\
-(8)\0\
-(9)\0\
-(10)\0\
-(11)\0\
-(12)\0\
-(13)\0\
-(14)\0\
-(15)\0\
-(16)\0\
-(17)\0\
-(18)\0\
-(19)\0\
-(20)\0\
-1.\0\
-2.\0\
-3.\0\
-4.\0\
-5.\0\
-6.\0\
-7.\0\
-8.\0\
-9.\0\
-10.\0\
-11.\0\
-12.\0\
-13.\0\
-14.\0\
-15.\0\
-16.\0\
-17.\0\
-18.\0\
-19.\0\
-20.\0\
-(a)\0\
-(b)\0\
-(c)\0\
-(d)\0\
-(e)\0\
-(f)\0\
-(g)\0\
-(h)\0\
-(i)\0\
-(j)\0\
-(k)\0\
-(l)\0\
-(m)\0\
-(n)\0\
-(o)\0\
-(p)\0\
-(q)\0\
-(r)\0\
-(s)\0\
-(t)\0\
-(u)\0\
-(v)\0\
-(w)\0\
-(x)\0\
-(y)\0\
-"
-"(z)\0\
-a o\0\
-b o\0\
-c o\0\
-d o\0\
-e o\0\
-f o\0\
-g o\0\
-h o\0\
-i o\0\
-j o\0\
-k o\0\
-l o\0\
-m o\0\
-n o\0\
-o o\0\
-p o\0\
-q o\0\
-r o\0\
-s o\0\
-t o\0\
-u o\0\
-v o\0\
-w o\0\
-x o\0\
-y o\0\
-z o\0\
-0-o\0\
-_-\0\
-hh-\0\
-_=\0\
-vv\0\
-_!\0\
-vv-\0\
-triple dash\0\
-3-\0\
-3_\0\
-3!\0\
-3/\0\
-quadruple dash\0\
-4-\0\
-4_\0\
-4!\0\
-4/\0\
-dr\0\
-_v>\0\
-dr-\0\
-_v<w\0\
-dl-\0\
-ld-\0\
-ur\0\
-_a>\0\
-ur-\0\
-ul\0\
-_a<\0\
-ul-\0\
-vr\0\
-_!>\0\
-vr-\0\
-udr\0\
-vl\0\
-_!<\0\
-vl-\0\
-udl\0\
-dh\0\
-_v-\0\
-dlr\0\
-dh-\0\
-uh\0\
-_-a\0\
-ulr\0\
-uh-\0\
-vh\0\
-_!-\0\
-vlr\0\
-vh-\0\
-udh\0\
-udlr\0\
-ld\0\
-diagonal upper lower\0\
-fd\0\
-_>/\0\
-bd\0\
-upper block\0\
-tb\0\
-lower block\0\
-lb\0\
-block\0\
-fb\0\
-"
-"rb\0\
-shade\0\
-.s\0\
-medium shade\0\
-:s\0\
-dark shade\0\
-?s\0\
-os\0\
-rounded corners\0\
-ro\0\
-containing\0\
-rr\0\
-fill\0\
-rf\0\
-ry\0\
-orthogonal crosshatch fill\0\
-rh\0\
-upper lower fill\0\
-rz\0\
-rk\0\
-diagonal crosshatch fill\0\
-rectangle\0\
-sr\0\
-pointing triangle\0\
-ut\0\
-pointing pointer\0\
-pr\0\
-tl\0\
-pl\0\
-diamond\0\
-db\0\
-dw\0\
-lozenge\0\
-lz\0\
-circle\0\
-0m\0\
-bullseye\0\
-0o\0\
-0l\0\
-0r\0\
-inverse bullet\0\
-inverse circle\0\
-ic\0\
-lower triangle\0\
-_.>/\0\
-large circle\0\
-star\0\
-*2\0\
-*1\0\
-telephone\0\
-tel\0\
-pointing index\0\
-<h\0\
->h\0\
-smiling face\0\
-0u\0\
-sun rays\0\
-su\0\
-female\0\
-fm\0\
-male\0\
-ml\0\
-spade\0\
-cs\0\
-heart\0\
-ch\0\
-cd\0\
-club\0\
-cs-\0\
-ch-\0\
-cd-\0\
-cc-\0\
-quarter note\0\
-"
-"md\0\
-eighth note\0\
-m8\0\
-_d!\0\
-beamed eighth notes\0\
-m2\0\
-beamed sixteenth notes\0\
-m16\0\
-music flat\0\
-mb\0\
-music natural\0\
-mx\0\
-music sharp\0\
-check\0\
-ok\0\
-ballot x\0\
-xx\0\
-maltese cross\0\
--x\0\
-is\0\
-,_\0\
-._\0\
-ditto\0\
-+\"\0\
-japanese industrial standard symbol\0\
-jis\0\
-iteration\0\
-*_\0\
-closing\0\
-;_\0\
-0_\0\
-<+\0\
->+\0\
-corner\0\
-<'\0\
->'\0\
-<\"\0\
->\"\0\
-lenticular\0\
-(\"\0\
-)\"\0\
-postal\0\
-=t\0\
-geta\0\
-=_\0\
-tortoise shell\0\
-('\0\
-)'\0\
-(i\0\
-)i\0\
-wave dash\0\
--?\0\
-postal face\0\
-=t:)\0\
-a5\0\
-i5\0\
-u5\0\
-e5\0\
-o5\0\
-ga\0\
-ki\0\
-gi\0\
-ku\0\
-gu\0\
-ke\0\
-ge\0\
-ko\0\
-go\0\
-za\0\
-zi\0\
-zu\0\
-zo\0\
-ta\0\
-da\0\
-ti\0\
-tu\0\
-du\0\
-na\0\
-ne\0\
-ba\0\
-bi\0\
-"
-"hu\0\
-bu\0\
-bo\0\
-ma\0\
-mi\0\
-me\0\
-mo\0\
-yo\0\
-ra\0\
-ru\0\
-re\0\
-wa\0\
-wi\0\
-we\0\
-wo\0\
-n5\0\
-vu\0\
-voiced sound\0\
-\"5\0\
-semi voiced sound\0\
-05\0\
-*5\0\
-voiced iteration\0\
-+5\0\
-a6\0\
-i6\0\
-u6\0\
-e6\0\
-o6\0\
-n6\0\
-va\0\
-vi\0\
-vo\0\
-.6\0\
-prolonged sound\0\
--6\0\
-*6\0\
-+6\0\
-b4\0\
-p4\0\
-m4\0\
-f4\0\
-t4\0\
-n4\0\
-l4\0\
-g4\0\
-k4\0\
-h4\0\
-j4\0\
-q4\0\
-x4\0\
-r4\0\
-z4\0\
-c4\0\
-s4\0\
-a4\0\
-o4\0\
-e4\0\
-eh4\0\
-ai\0\
-ei\0\
-au\0\
-ou\0\
-ang\0\
-i4\0\
-u4\0\
-v4\0\
-gn\0\
-hangul cieuc u\0\
-(ju)\0\
-1c\0\
-2c\0\
-3c\0\
-4c\0\
-5c\0\
-6c\0\
-7c\0\
-8c\0\
-9c\0\
-10c\0\
-korean standard symbol\0\
-ksc\0\
-fi\0\
-fl\0\
-ffi\0\
-ffl\0\
-long s t\0\
-3+;\0\
-h'-\0\
-am-\0\
-"
-"am.\0\
-ah-\0\
-ah.\0\
-wh-\0\
-yh,\0\
-a+-\0\
-a+.\0\
-b+-\0\
-b+.\0\
-b+,\0\
-b+;\0\
-tm-\0\
-tm.\0\
-t+-\0\
-t+.\0\
-t+,\0\
-t+;\0\
-tk-\0\
-tk.\0\
-tk,\0\
-tk;\0\
-g+-\0\
-g+.\0\
-g+,\0\
-g+;\0\
-hk-\0\
-hk.\0\
-hk,\0\
-hk;\0\
-x+-\0\
-x+.\0\
-x+,\0\
-x+;\0\
-d+-\0\
-d+.\0\
-dk-\0\
-dk.\0\
-r+-\0\
-r+.\0\
-z+-\0\
-z+.\0\
-s+-\0\
-s+.\0\
-s+,\0\
-s+;\0\
-sn-\0\
-sn.\0\
-sn,\0\
-sn;\0\
-c+-\0\
-c+.\0\
-c+,\0\
-c+;\0\
-dd-\0\
-dd.\0\
-dd,\0\
-dd;\0\
-tj-\0\
-tj.\0\
-tj,\0\
-tj;\0\
-zh-\0\
-zh.\0\
-zh,\0\
-zh;\0\
-e+-\0\
-e+.\0\
-e+,\0\
-e+;\0\
-i+-\0\
-i+.\0\
-i+,\0\
-i+;\0\
-f+-\0\
-f+.\0\
-f+,\0\
-f+;\0\
-q+-\0\
-q+.\0\
-q+,\0\
-q+;\0\
-k+-\0\
-k+.\0\
-k+,\0\
-k+;\0\
-l+-\0\
-l+.\0\
-l+,\0\
-l+;\0\
-m+-\0\
-m+.\0\
-"
-"m+,\0\
-m+;\0\
-n+-\0\
-n+.\0\
-n+,\0\
-n+;\0\
-h+-\0\
-h+.\0\
-h+,\0\
-h+;\0\
-w+-\0\
-w+.\0\
-j+-\0\
-j+.\0\
-y+-\0\
-y+.\0\
-y+,\0\
-y+;\0\
-lam madda\0\
-lm-\0\
-lm.\0\
-lam hamza\0\
-lh-\0\
-lh.\0\
-la-\0\
-la.\0\
-";
-#endif /* UCS_BYTE */
-
-static const char* ucs_strings[] =
-{
- &ucs_strings_0[0],
-#if !UCS_BYTE
- &ucs_strings_1[0],
-#endif /* UCS_BYTE */
-};
-
-static const Ucs_dat_t ucs_attrs[] =
-{
- {{0x00000001,0x00000000,0x00000000},0x0000,0,0},
- {{0x00000001,0x00000000,0x00000000},0x0000,0,7},
- {{0x00000001,0x00000000,0x00000000},0x0000,0,12},
- {{0x00000001,0x00000000,0x00000000},0x0000,0,16},
- {{0x00000001,0x00000000,0x00000000},0x0000,0,22},
- {{0x00000001,0x00000000,0x00000000},0x0000,0,27},
- {{0x00000002,0x00000000,0x00000000},0x0001,0,32},
- {{0x00000002,0x00000000,0x00000000},0x0001,0,40},
- {{0x00000004,0x00000000,0x00000000},0x0002,0,43},
- {{0x00000004,0x00000000,0x00000000},0x0002,0,49},
- {{0x00000008,0x00000000,0x00000000},0x0003,0,52},
- {{0x00000010,0x00000000,0x00000000},0x0004,0,58},
- {{0x00000020,0x00000000,0x00000000},0x0005,0,64},
- {{0x00000040,0x00000000,0x00000000},0x0006,0,69},
- {{0x00000080,0x00000000,0x00000000},0x0007,0,75},
- {{0x00000100,0x00000000,0x00000000},0x0008,0,82},
- {{0x00000200,0x00000000,0x00000000},0x0009,0,88},
- {{0x00000400,0x00000000,0x00000000},0x000a,0,97},
- {{0x00000800,0x00000000,0x00000000},0x000b,0,101},
- {{0x00001000,0x00000000,0x00000000},0x000c,0,107},
- {{0x00002000,0x00000000,0x00000000},0x000d,0,113},
- {{0x00004000,0x00000000,0x00000000},0x000e,0,121},
- {{0x00008000,0x00000000,0x00000000},0x000f,0,129},
- {{0x00010000,0x00000000,0x00000000},0x0010,0,140},
- {{0x00020000,0x00000000,0x00000000},0x0011,0,149},
- {{0x00040000,0x00000000,0x00000000},0x0012,0,155},
- {{0x00080000,0x00000000,0x00000000},0x0013,0,165},
- {{0x00100000,0x00000000,0x00000000},0x0014,0,169},
- {{0x00200000,0x00000000,0x00000000},0x0015,0,176},
- {{0x00400000,0x00000000,0x00000000},0x0016,0,181},
- {{0x00800000,0x00000000,0x00000000},0x0017,0,190},
- {{0x01000000,0x00000000,0x00000000},0x0018,0,194},
- {{0x02000000,0x00000000,0x00000000},0x0019,0,200},
- {{0x04000000,0x00000000,0x00000000},0x001a,0,205},
- {{0x08000000,0x00000000,0x00000000},0x001b,0,211},
- {{0x10000000,0x00000000,0x00000000},0x001c,0,217},
- {{0x20000000,0x00000000,0x00000000},0x001d,0,223},
- {{0x40000000,0x00000000,0x00000000},0x001e,0,230},
- {{0x80000000,0x00000000,0x00000000},0x001f,0,239},
- {{0x00000000,0x00000001,0x00000000},0x0020,0,244},
- {{0x00000000,0x00000002,0x00000000},0x0021,0,255},
- {{0x00000000,0x00000004,0x00000000},0x0022,0,260},
- {{0x00000000,0x00000008,0x00000000},0x0023,0,268},
- {{0x00000000,0x00000010,0x00000000},0x0024,0,273},
- {{0x00000000,0x00000020,0x00000000},0x0025,0,282},
- {{0x00000000,0x00000040,0x00000000},0x0026,0,291},
- {{0x00000000,0x00000080,0x00000000},0x0027,0,297},
- {{0x00000000,0x00000100,0x00000000},0x0028,0,302},
- {{0x00000000,0x00000200,0x00000000},0x0029,0,308},
- {{0x00000000,0x00000400,0x00000000},0x002a,0,313},
- {{0x00000000,0x00000800,0x00000000},0x002b,0,320},
- {{0x00000000,0x00001000,0x00000000},0x002c,0,325},
- {{0x00000000,0x00002000,0x00000000},0x002d,0,332},
- {{0x00000000,0x00004000,0x00000000},0x002e,0,339},
- {{0x00000000,0x00008000,0x00000000},0x002f,0,347},
- {{0x00000000,0x00010000,0x00000000},0x0030,0,353},
- {{0x00000000,0x00020000,0x00000000},0x0031,0,357},
- {{0x00000000,0x00040000,0x00000000},0x0032,0,362},
- {{0x00000000,0x00080000,0x00000000},0x0033,0,376},
- {{0x00000000,0x00100000,0x00000000},0x0034,0,388},
- {{0x00000000,0x00200000,0x00000000},0x0035,0,403},
- {{0x00000000,0x00400000,0x00000000},0x0036,0,409},
- {{0x00000000,0x00800000,0x00000000},0x0037,0,415},
- {{0x00000000,0x01000000,0x00000000},0x0038,0,421},
- {{0x00000000,0x02000000,0x00000000},0x0039,0,428},
- {{0x00000000,0x04000000,0x00000000},0x003a,0,434},
- {{0x00000000,0x08000000,0x00000000},0x003b,0,437},
- {{0x00000000,0x10000000,0x00000000},0x003c,0,440},
- {{0x00000000,0x20000000,0x00000000},0x003d,0,448},
- {{0x00000000,0x40000000,0x00000000},0x003e,0,454},
- {{0x00000000,0x80000000,0x00000000},0x003f,0,463},
- {{0x00000000,0x00000000,0x00000001},0x0040,0,469},
- {{0x00000000,0x00000000,0x00000002},0x0041,0,472},
- {{0x00000000,0x00000000,0x00000004},0x0042,0,477},
- {{0x00000000,0x00000000,0x00000008},0x0043,0,483},
- {{0x00000000,0x00000000,0x00000010},0x0044,0,492},
- {{0x00000000,0x00000000,0x00000020},0x0045,0,499},
- {{0x00000000,0x00000000,0x00000040},0x0046,0,511},
- {{0x00000000,0x00000000,0x00000080},0x0047,0,521},
- {{0x00000000,0x00000000,0x00000100},0x0048,0,528},
- {{0x00000000,0x00000000,0x00000200},0x0049,0,537},
- {{0x00000000,0x00000000,0x00000400},0x004a,0,543},
- {{0x00000000,0x00000000,0x00000800},0x004b,0,549},
- {{0x00000000,0x00000000,0x00000800},0x004b,0,559},
- {{0x00000000,0x00000000,0x00001000},0x004c,0,571},
- {{0x00000000,0x00000000,0x00002000},0x004d,0,577},
- {{0x00000000,0x00000000,0x00004000},0x004e,0,583},
- {{0x00000000,0x00000000,0x00008000},0x004f,0,588},
- {{0x00000000,0x00000000,0x00010000},0x0050,0,593},
- {{0x00000000,0x00000000,0x00020000},0x0051,0,596},
- {{0x00000000,0x00000000,0x00040000},0x0052,0,604},
- {{0x00000000,0x00000000,0x00080000},0x0053,0,608},
- {{0x00000000,0x00000000,0x00100000},0x0054,0,613},
- {{0x00000000,0x00000000,0x00200000},0x0055,0,617},
- {{0x00000000,0x00000000,0x00400000},0x0056,0,621},
- {{0x00000000,0x00000000,0x00800000},0x0057,0,634},
- {{0x00000000,0x00000000,0x01000000},0x0058,0,643},
- {{0x00000000,0x00000000,0x02000000},0x0059,0,650},
- {{0x00000000,0x00000000,0x04000000},0x005a,0,657},
- {{0x00000000,0x00000000,0x08000000},0x005b,0,662},
- {{0x00000000,0x00000000,0x10000000},0x005c,0,668},
- {{0x00000000,0x00000000,0x20000000},0x005d,0,675},
- {{0x00000000,0x00000000,0x40000000},0x005e,0,681},
- {{0x00000000,0x00000000,0x80000000},0x005f,0,691},
-};
-
-static const Ucs_dat_t ucs_names[] =
-{
- {{0x00000000,0x00000000,0x00000200},0x0020,0,1288},
- {{0x00000001,0x00002000,0x00000000},0x0023,0,1288},
- {{0x00080000,0x00000000,0x00000000},0x002e,0,1288},
- {{0x00000001,0x00010000,0x00000000},0x0031,0,1288},
- {{0x00008000,0x00000000,0x00000000},0x005e,0,1288},
- {{0x00000000,0x02000000,0x00000000},0x007e,0,1288},
- {{0x00040000,0x00000000,0x00000000},0x00a8,0,1288},
- {{0x00000000,0x00000400,0x00000000},0x00af,0,1288},
- {{0x00002000,0x00000000,0x00000000},0x00b8,0,1288},
- {{0x02000000,0x00000000,0x00000002},0x002e,0,1288},
- {{0x00000000,0x40000200,0x00000000},0x007c,0,1288},
- {{0x00080000,0x00000000,0x01000000},0x00b7,0,1288},
- {{0x00000000,0x00010000,0x00000020},0x00b9,0,1288},
- {{0x00000000,0x00400000,0x00020080},0x005d,0,1288},
- {{0x00000000,0x00010000,0x00080018},0x00bd,0,1288},
- {{0x00000000,0x00000000,0x00000000},0x007d,0,1678},
- {{0x00000000,0x00000000,0x00000000},0x00a6,0,2550},
- {{0x00000000,0x00000000,0x00000000},0x00a2,0,2499},
- {{0x00000000,0x00000000,0x00000000},0x00a1,0,2488},
- {{0x00000000,0x00000000,0x00000000},0x0024,0,1330},
- {{0x00000000,0x00000000,0x00000000},0x0060,0,1656},
- {{0x00000000,0x00000000,0x00000000},0x00b8,0,2736},
- {{0x00000000,0x00000000,0x00000000},0x00a8,0,2564},
- {{0x00000000,0x00000000,0x00000000},0x005e,0,1638},
- {{0x00000000,0x00000000,0x00000000},0x007e,0,1681},
- {{0x00000000,0x00000000,0x00000000},0x00af,0,2677},
- {{0x00000000,0x00000000,0x00000000},0x007b,0,1671},
- {{0x00000000,0x00000000,0x00000000},0x005d,0,1624},
- {{0x00000000,0x00000000,0x00000000},0x00d7,0,2899},
- {{0x00000000,0x00000000,0x00000000},0x00b1,0,2701},
- {{0x00000000,0x00000000,0x00000000},0x00ad,0,2660},
- {{0x00000000,0x00000000,0x00000000},0x00f7,0,2949},
- {{0x00000000,0x00000000,0x00000000},0x00aa,0,2607},
- {{0x00000000,0x00000000,0x00000000},0x00ba,0,2770},
- {{0x00000000,0x00000000,0x00000000},0x00b7,0,2733},
- {{0x00000000,0x00000000,0x00000000},0x00bd,0,2787},
- {{0x00000000,0x00000000,0x00000000},0x00bc,0,2784},
- {{0x00000000,0x00000000,0x00000000},0x00b9,0,2739},
- {{0x00000000,0x00000000,0x00000000},0x00b2,0,2704},
- {{0x00000000,0x00000000,0x00000000},0x00be,0,2805},
- {{0x00000000,0x00000000,0x00000000},0x00b3,0,2707},
- {{0x00000000,0x00000000,0x00000000},0x00ac,0,2645},
- {{0x00000000,0x00000000,0x00000000},0x00b6,0,2730},
- {{0x00000000,0x00000000,0x00000000},0x00ab,0,2635},
- {{0x00000000,0x00000000,0x00000000},0x00bb,0,2773},
- {{0x00000000,0x00000000,0x00000000},0x00bf,0,2808},
- {{0x00000003,0x00000040,0x00000000},0x0041,0,1546},
- {{0x00000005,0x00000040,0x00000000},0x0061,0,1546},
- {{0x04000003,0x00000040,0x00000000},0x00c0,0,1546},
- {{0x00000013,0x00000040,0x00000000},0x00c1,0,1546},
- {{0x00008003,0x00000040,0x00000000},0x00c2,0,1546},
- {{0x00000003,0x02000040,0x00000000},0x00c3,0,1546},
- {{0x00040003,0x00000040,0x00000000},0x00c4,0,1546},
- {{0x04000005,0x00000040,0x00000000},0x00e0,0,1546},
- {{0x00000015,0x00000040,0x00000000},0x00e1,0,1546},
- {{0x00008005,0x00000040,0x00000000},0x00e2,0,1546},
- {{0x00000005,0x02000040,0x00000000},0x00e3,0,1546},
- {{0x00040005,0x00000040,0x00000000},0x00e4,0,1546},
- {{0x0000000b,0x00000040,0x04000000},0x00c5,0,1546},
- {{0x0000000d,0x00000040,0x04000000},0x00e5,0,1546},
- {{0x00000000,0x00000000,0x00000000},0x00c0,0,2811},
- {{0x00000000,0x00000000,0x00000000},0x00e0,0,2811},
- {{0x00000000,0x00000000,0x00000000},0x00c1,0,2814},
- {{0x00000000,0x00000000,0x00000000},0x00e1,0,2814},
- {{0x00000000,0x00000000,0x00000000},0x00c4,0,2823},
- {{0x00000000,0x00000000,0x00000000},0x00e4,0,2823},
- {{0x00000000,0x00000000,0x00000000},0x00c2,0,2817},
- {{0x00000000,0x00000000,0x00000000},0x00e2,0,2817},
- {{0x00000000,0x00000000,0x00000000},0x00c3,0,2820},
- {{0x00000000,0x00000000,0x00000000},0x00e3,0,2820},
- {{0x00000000,0x00000000,0x00000000},0x00c5,0,2826},
- {{0x00000000,0x00000000,0x00000000},0x00e5,0,2826},
- {{0x00000000,0x00000000,0x00000000},0x009f,0,2469},
- {{0x00008000,0x00000000,0x00000000},0x005e,0,1627},
- {{0x04000000,0x00000000,0x00000000},0x0060,0,1627},
- {{0x00000010,0x00000000,0x00000000},0x00b4,0,1627},
- {{0x00000000,0x00000000,0x00000000},0x0006,0,808},
- {{0x00000000,0x00000000,0x00000000},0x0006,0,796},
- {{0x00000000,0x00000000,0x00000000},0x00c6,0,2829},
- {{0x00000000,0x00000000,0x00000000},0x00e6,0,2829},
- {{0x00000003,0x00000040,0x00000000},0x00c6,0,2829},
- {{0x00000005,0x00000040,0x00000000},0x00e6,0,2829},
- {{0x00000000,0x00000000,0x00000000},0x0006,0,812},
- {{0x00000000,0x00000000,0x00000000},0x0007,0,827},
- {{0x00000000,0x00000000,0x00000000},0x0026,0,1341},
- {{0x00000000,0x00000000,0x00000000},0x009f,0,2472},
- {{0x00000000,0x00000000,0x00000000},0x0027,0,1351},
- {{0x00000000,0x00000000,0x00000000},0x009f,0,2441},
- {{0x00000000,0x00000000,0x00000000},0x002a,0,1374},
- {{0x00000000,0x00000000,0x00000000},0x0040,0,1540},
- {{0x00000003,0x00000040,0x00000000},0x0042,0,1548},
- {{0x00000005,0x00000040,0x00000000},0x0062,0,1548},
- {{0x00000000,0x00000000,0x00000000},0x005c,0,1614},
- {{0x00000000,0x00000000,0x00000000},0x0008,0,833},
- {{0x00000000,0x00000000,0x00000000},0x007c,0,1674},
- {{0x00000000,0x00000000,0x00000000},0x00a6,0,2547},
- {{0x00000000,0x00000000,0x00000000},0x0007,0,820},
- {{0x00000000,0x00000000,0x00000000},0x0007,0,815},
- {{0x00000000,0x00000000,0x00000000},0x0082,0,1770},
- {{0x00000000,0x00000000,0x00000000},0x0007,0,824},
- {{0x00000000,0x00000000,0x00000000},0x0082,0,1773},
- {{0x00000000,0x00000080,0x00000000},0x007b,0,1665},
- {{0x00000000,0x00400000,0x00000000},0x007d,0,1665},
- {{0x00000000,0x00000000,0x00000000},0x0082,0,1749},
- {{0x00000000,0x00000000,0x00000000},0x00a6,0,2536},
- {{0x00000000,0x00000000,0x00000000},0x0008,0,843},
- {{0x00000003,0x00000040,0x00000000},0x0043,0,1550},
- {{0x00000005,0x00000040,0x00000000},0x0063,0,1550},
- {{0x00002003,0x00000040,0x00000000},0x00c7,0,1550},
- {{0x00002005,0x00000040,0x00000000},0x00e7,0,1550},
- {{0x00000000,0x00000000,0x00000000},0x00c7,0,2832},
- {{0x00000000,0x00000000,0x00000000},0x00e7,0,2832},
- {{0x00000000,0x00000000,0x00000000},0x0018,0,1142},
- {{0x00000000,0x00000000,0x00000000},0x0018,0,1135},
- {{0x00000000,0x00000000,0x00000000},0x0094,0,2163},
- {{0x00000000,0x00000000,0x00000000},0x000d,0,886},
- {{0x00000000,0x00000000,0x00000000},0x0094,0,2180},
- {{0x00000000,0x00000000,0x00000000},0x0094,0,2183},
- {{0x00000001,0x00000000,0x00000000},0x00a2,0,2491},
- {{0x00000000,0x01000000,0x00000000},0x009a,0,2306},
- {{0x00000001,0x00000000,0x00000000},0x0089,0,1903},
- {{0x00000000,0x00000000,0x00000000},0x0088,0,1871},
- {{0x00000000,0x00000000,0x00000000},0x009b,0,2362},
- {{0x00000000,0x00000000,0x00000000},0x0018,0,1146},
- {{0x00000000,0x00000000,0x00000000},0x00a9,0,2577},
- {{0x00000000,0x00000000,0x00000000},0x003a,0,1481},
- {{0x00000000,0x00000000,0x00000000},0x002c,0,1388},
- {{0x00000000,0x00000000,0x00000000},0x0040,0,1526},
- {{0x00000000,0x00000000,0x00000000},0x009b,0,2334},
- {{0x00000001,0x00000000,0x00000000},0x00a9,0,2567},
- {{0x00000000,0x00000000,0x00000000},0x000d,0,902},
- {{0x00000000,0x00000000,0x00000000},0x009b,0,2365},
- {{0x00000000,0x00000000,0x00000000},0x00a2,0,2496},
- {{0x00000000,0x00000000,0x00000000},0x00a4,0,2520},
- {{0x00000000,0x00000080,0x00020000},0x007b,0,1659},
- {{0x00000000,0x00400000,0x00020000},0x007d,0,1659},
- {{0x00000001,0x00000000,0x00000000},0x00a4,0,2511},
- {{0x00000003,0x00000040,0x00000000},0x0044,0,1552},
- {{0x00000005,0x00000040,0x00000000},0x0064,0,1552},
- {{0x00000000,0x00000000,0x00000000},0x00d0,0,2863},
- {{0x00000000,0x00000000,0x00000000},0x00f0,0,2863},
- {{0x00000000,0x00000000,0x00000000},0x0011,0,969},
- {{0x00000000,0x00000000,0x00000000},0x0012,0,995},
- {{0x00000000,0x00000000,0x00000000},0x0013,0,1023},
- {{0x00000000,0x00000000,0x00000000},0x0014,0,1050},
- {{0x00000000,0x00000000,0x00000000},0x0010,0,930},
- {{0x00000000,0x00000000,0x00000000},0x0090,0,2088},
- {{0x00000000,0x00000000,0x00000000},0x0011,0,972},
- {{0x00000000,0x00000000,0x00000000},0x0012,0,998},
- {{0x00000000,0x00000000,0x00000000},0x0013,0,1026},
- {{0x00000000,0x00000000,0x00000000},0x0014,0,1053},
- {{0x00000000,0x00000000,0x00000000},0x0090,0,2091},
- {{0x00000001,0x00000000,0x00000000},0x00b0,0,2680},
- {{0x00000000,0x00000000,0x00000000},0x007f,0,1692},
- {{0x00000000,0x00000000,0x00000000},0x007f,0,1685},
- {{0x00000000,0x00010000,0x00000000},0x0011,0,954},
- {{0x00000000,0x00000000,0x00000000},0x0014,0,1030},
- {{0x00000000,0x00000000,0x00000000},0x0090,0,2066},
- {{0x00000000,0x00000000,0x00000000},0x0013,0,1002},
- {{0x00000000,0x00000000,0x00000000},0x0012,0,976},
- {{0x00000000,0x00000000,0x00000000},0x00b0,0,2687},
- {{0x00000001,0x00000000,0x00000000},0x00f7,0,2940},
- {{0x00000000,0x00000000,0x00000000},0x0010,0,947},
- {{0x00000000,0x00000000,0x00000000},0x0010,0,950},
- {{0x00000000,0x00000000,0x00000000},0x0024,0,1327},
- {{0x00000001,0x00000000,0x00000000},0x0024,0,1320},
- {{0x00000000,0x00000000,0x00000000},0x007f,0,1696},
- {{0x00000003,0x00000040,0x00000000},0x0045,0,1554},
- {{0x00000005,0x00000040,0x00000000},0x0065,0,1554},
- {{0x04000003,0x00000040,0x00000000},0x00c8,0,1554},
- {{0x00000013,0x00000040,0x00000000},0x00c9,0,1554},
- {{0x00008003,0x00000040,0x00000000},0x00ca,0,1554},
- {{0x00040003,0x00000040,0x00000000},0x00cb,0,1554},
- {{0x04000005,0x00000040,0x00000000},0x00e8,0,1554},
- {{0x00000015,0x00000040,0x00000000},0x00e9,0,1554},
- {{0x00008005,0x00000040,0x00000000},0x00ea,0,1554},
- {{0x00040005,0x00000040,0x00000000},0x00eb,0,1554},
- {{0x00000000,0x00000000,0x00000000},0x00c8,0,2835},
- {{0x00000000,0x00000000,0x00000000},0x00e8,0,2835},
- {{0x00000000,0x00000000,0x00000000},0x00c9,0,2838},
- {{0x00000000,0x00000000,0x00000000},0x00e9,0,2838},
- {{0x00000000,0x00000000,0x00000000},0x00cb,0,2844},
- {{0x00000000,0x00000000,0x00000000},0x00eb,0,2844},
- {{0x00000000,0x00000000,0x00000000},0x00ca,0,2841},
- {{0x00000000,0x00000000,0x00000000},0x00ea,0,2841},
- {{0x00000000,0x00000000,0x00000000},0x0017,0,1128},
- {{0x00000000,0x00000000,0x00000000},0x001b,0,1184},
- {{0x00000000,0x00000000,0x00000000},0x0097,0,2245},
- {{0x00000001,0x00000000,0x00000000},0x0038,0,1470},
- {{0x00000000,0x00000000,0x00000000},0x0019,0,1156},
- {{0x00000000,0x00000000,0x00000000},0x0005,0,789},
- {{0x00000000,0x00000000,0x00000000},0x0005,0,781},
- {{0x00000000,0x00000000,0x00000000},0x0004,0,774},
- {{0x00000000,0x00000000,0x00000000},0x0097,0,2248},
- {{0x00000000,0x00000000,0x00000000},0x0005,0,793},
- {{0x00000001,0x00000000,0x00000000},0x003d,0,1502},
- {{0x00000000,0x00000000,0x00000000},0x0087,0,1864},
- {{0x00000000,0x00000000,0x00000000},0x0087,0,1867},
- {{0x00000000,0x00000000,0x00000000},0x001b,0,1187},
- {{0x00000000,0x00000000,0x00000000},0x001b,0,1177},
- {{0x00000000,0x00000000,0x00000000},0x0004,0,778},
- {{0x00000000,0x00000000,0x00000000},0x0017,0,1131},
- {{0x00000003,0x00000040,0x00000000},0x00d0,0,2859},
- {{0x00000005,0x00000040,0x00000000},0x00f0,0,2859},
- {{0x00000000,0x00000000,0x00000000},0x0003,0,754},
- {{0x00000000,0x00000000,0x00000000},0x0003,0,758},
- {{0x00000000,0x00000800,0x00000000},0x0021,0,1292},
- {{0x00000000,0x00000800,0x00800000},0x00a1,0,1292},
- {{0x00000003,0x00000040,0x00000000},0x0046,0,1556},
- {{0x00000005,0x00000040,0x00000000},0x0066,0,1556},
- {{0x00000001,0x00000000,0x00000000},0x000c,0,864},
- {{0x00000000,0x00000200,0x00000000},0x000a,0,864},
- {{0x00000000,0x00000000,0x00000000},0x00aa,0,2580},
- {{0x00000000,0x00000000,0x00000000},0x000c,0,883},
- {{0x00000000,0x00000000,0x00000000},0x001c,0,1191},
- {{0x00000001,0x00000000,0x00000000},0x0035,0,1455},
- {{0x00000001,0x00000000,0x00000000},0x0034,0,1450},
- {{0x00000000,0x00000000,0x00000000},0x001c,0,1206},
- {{0x00000003,0x00000040,0x00000000},0x0047,0,1558},
- {{0x00000005,0x00000040,0x00000000},0x0067,0,1558},
- {{0x00000000,0x00000000,0x00000000},0x0099,0,2298},
- {{0x00000000,0x01000000,0x00000000},0x0099,0,2269},
- {{0x00000001,0x00000000,0x00004000},0x003e,0,1509},
- {{0x00000000,0x00000000,0x00000000},0x001d,0,1213},
- {{0x00000000,0x00000000,0x00000000},0x001d,0,1229},
- {{0x00000000,0x00000000,0x00100001},0x0097,0,2232},
- {{0x00000003,0x00000040,0x00000000},0x0048,0,1560},
- {{0x00000005,0x00000040,0x00000000},0x0068,0,1560},
- {{0x00000000,0x00000000,0x00000000},0x0023,0,1317},
- {{0x00000000,0x00000000,0x00000000},0x005e,0,1634},
- {{0x00000000,0x00000000,0x00000000},0x0081,0,1724},
- {{0x00000000,0x00000000,0x00000000},0x0089,0,1938},
- {{0x00000000,0x00000000,0x00000000},0x0081,0,1742},
- {{0x00000000,0x00000000,0x00000000},0x0081,0,1745},
- {{0x00000000,0x00000000,0x00000000},0x0088,0,1896},
- {{0x00000000,0x00000000,0x00000000},0x0009,0,861},
- {{0x00000000,0x00000000,0x00000000},0x0089,0,1941},
- {{0x00000000,0x00000000,0x00000000},0x0088,0,1899},
- {{0x00000000,0x00000000,0x00000000},0x002d,0,1407},
- {{0x00000000,0x00000000,0x00000000},0x002d,0,1394},
- {{0x00000003,0x00000040,0x00000000},0x0049,0,1562},
- {{0x00000005,0x00000040,0x00000000},0x0069,0,1562},
- {{0x04000003,0x00000040,0x00000000},0x00cc,0,1562},
- {{0x00000013,0x00000040,0x00000000},0x00cd,0,1562},
- {{0x00008003,0x00000040,0x00000000},0x00ce,0,1562},
- {{0x00040003,0x00000040,0x00000000},0x00cf,0,1562},
- {{0x04000005,0x00000040,0x00000000},0x00ec,0,1562},
- {{0x00000015,0x00000040,0x00000000},0x00ed,0,1562},
- {{0x00008005,0x00000040,0x00000000},0x00ee,0,1562},
- {{0x00040005,0x00000040,0x00000000},0x00ef,0,1562},
- {{0x00000000,0x00000000,0x00000000},0x00cc,0,2847},
- {{0x00000000,0x00000000,0x00000000},0x00ec,0,2847},
- {{0x00000000,0x00000000,0x00000000},0x00cd,0,2850},
- {{0x00000000,0x00000000,0x00000000},0x00ed,0,2850},
- {{0x00000000,0x00000000,0x00000000},0x00cf,0,2856},
- {{0x00000000,0x00000000,0x00000000},0x00ef,0,2856},
- {{0x00000000,0x00000000,0x00000000},0x00ce,0,2853},
- {{0x00000000,0x00000000,0x00000000},0x00ee,0,2853},
- {{0x00000000,0x00000000,0x00000000},0x0084,0,1804},
- {{0x00000000,0x00000000,0x00000000},0x0084,0,1807},
- {{0x00000000,0x00000000,0x00000000},0x0084,0,1798},
- {{0x00000000,0x00000000,0x00000000},0x001d,0,1236},
- {{0x00000000,0x00000000,0x00000000},0x001f,0,1281},
- {{0x00000000,0x00000000,0x00000000},0x001e,0,1259},
- {{0x00000000,0x00000000,0x00000000},0x001d,0,1232},
- {{0x00000000,0x00000000,0x00000000},0x001c,0,1209},
- {{0x00000003,0x00000040,0x00000000},0x004a,0,1564},
- {{0x00000005,0x00000040,0x00000000},0x006a,0,1564},
- {{0x00000003,0x00000040,0x00000000},0x004b,0,1566},
- {{0x00000005,0x00000040,0x00000000},0x006b,0,1566},
- {{0x00000003,0x00000040,0x00000000},0x004c,0,1568},
- {{0x00000005,0x00000040,0x00000000},0x006c,0,1568},
- {{0x00000000,0x00000000,0x00000000},0x00a3,0,2508},
- {{0x00000001,0x00000000,0x00004000},0x003c,0,1497},
- {{0x00000000,0x00000000,0x00000000},0x000a,0,869},
- {{0x00000000,0x00000200,0x00000000},0x005f,0,1641},
- {{0x00000003,0x00000040,0x00000000},0x004d,0,1570},
- {{0x00000005,0x00000040,0x00000000},0x006d,0,1570},
- {{0x00000000,0x00000000,0x00000000},0x00ba,0,2742},
- {{0x00000000,0x00000000,0x00100001},0x0019,0,1149},
- {{0x00000000,0x00000000,0x00000000},0x0095,0,2187},
- {{0x00000001,0x00000000,0x00000000},0x00b5,0,2710},
- {{0x00000001,0x00000000,0x00000000},0x00d7,0,2884},
- {{0x00000000,0x00000000,0x00000000},0x0095,0,2203},
- {{0x00000000,0x00000000,0x00000000},0x00b5,0,2716},
- {{0x00000003,0x00000040,0x00000000},0x004e,0,1572},
- {{0x00000005,0x00000040,0x00000000},0x006e,0,1572},
- {{0x00000003,0x02000040,0x00000000},0x00d1,0,1572},
- {{0x00000005,0x02000040,0x00000000},0x00f1,0,1572},
- {{0x00000000,0x00000000,0x00000000},0x00d1,0,2866},
- {{0x00000000,0x00000000,0x00000000},0x00f1,0,2866},
- {{0x00000000,0x00000000,0x00000000},0x0015,0,1078},
- {{0x00000000,0x00000000,0x00000000},0x0023,0,1314},
- {{0x00000000,0x00000000,0x00000000},0x0083,0,1794},
- {{0x00000000,0x00000000,0x00000000},0x0015,0,1057},
- {{0x00000000,0x00000000,0x00000000},0x0085,0,1819},
- {{0x00000000,0x00000000,0x00000000},0x000a,0,872},
- {{0x00000000,0x00000200,0x00000000},0x0085,0,1811},
- {{0x00000000,0x00000000,0x00000000},0x0083,0,1791},
- {{0x00000001,0x00000000,0x00000000},0x0039,0,1476},
- {{0x00000000,0x00000000,0x00000000},0x0015,0,1082},
- {{0x00000000,0x00000000,0x00000000},0x0085,0,1816},
- {{0x00000000,0x00000000,0x00000000},0x00ac,0,2642},
- {{0x00000000,0x00000000,0x00000200},0x00a0,0,2476},
- {{0x00000000,0x00000000,0x00000000},0x0083,0,1777},
- {{0x00000001,0x00000000,0x00000000},0x00ac,0,2638},
- {{0x00000000,0x00000000,0x00000000},0x00a0,0,2485},
- {{0x00000000,0x00000000,0x00000000},0x0000,0,707},
- {{0x00000000,0x00000000,0x00000000},0x0000,0,703},
- {{0x00000000,0x00000000,0x00000000},0x0000,0,698},
- {{0x00000003,0x00000040,0x00000000},0x004f,0,1574},
- {{0x00000005,0x00000040,0x00000000},0x006f,0,1574},
- {{0x04000003,0x00000040,0x00000000},0x00d2,0,1574},
- {{0x00000013,0x00000040,0x00000000},0x00d3,0,1574},
- {{0x00008003,0x00000040,0x00000000},0x00d4,0,1574},
- {{0x00000003,0x02000040,0x00000000},0x00d5,0,1574},
- {{0x00040003,0x00000040,0x00000000},0x00d6,0,1574},
- {{0x00000003,0x00000040,0x10000000},0x00d8,0,1574},
- {{0x04000005,0x00000040,0x00000000},0x00f2,0,1574},
- {{0x00000015,0x00000040,0x00000000},0x00f3,0,1574},
- {{0x00008005,0x00000040,0x00000000},0x00f4,0,1574},
- {{0x00000005,0x02000040,0x00000000},0x00f5,0,1574},
- {{0x00040005,0x00000040,0x00000000},0x00f6,0,1574},
- {{0x00000005,0x00000040,0x10000000},0x00f8,0,1574},
- {{0x00000000,0x00000000,0x00000000},0x00d2,0,2869},
- {{0x00000000,0x00000000,0x00000000},0x00f2,0,2869},
- {{0x00000000,0x00000000,0x00000000},0x00d3,0,2872},
- {{0x00000000,0x00000000,0x00000000},0x00f3,0,2872},
- {{0x00000000,0x00000000,0x00000000},0x00d8,0,2902},
- {{0x00000000,0x00000000,0x00000000},0x00f8,0,2902},
- {{0x00000000,0x00000000,0x00000000},0x00d6,0,2881},
- {{0x00000000,0x00000000,0x00000000},0x00f6,0,2881},
- {{0x00000000,0x00000000,0x00000000},0x00d4,0,2875},
- {{0x00000000,0x00000000,0x00000000},0x00f4,0,2875},
- {{0x00000000,0x00000000,0x00000000},0x00d5,0,2878},
- {{0x00000000,0x00000000,0x00000000},0x00f5,0,2878},
- {{0x00000000,0x00000000,0x00000000},0x0040,0,1543},
- {{0x00000000,0x00000000,0x00000000},0x009d,0,2415},
- {{0x00000000,0x00000000,0x00000000},0x009d,0,2390},
- {{0x00000000,0x00000000,0x00000000},0x009d,0,2418},
- {{0x00000003,0x00000040,0x00000000},0x0050,0,1576},
- {{0x00000005,0x00000040,0x00000000},0x0070,0,1576},
- {{0x00000000,0x00000000,0x00000000},0x0091,0,2107},
- {{0x00000000,0x00000000,0x00000000},0x0092,0,2130},
- {{0x00000000,0x00000000,0x00000000},0x0080,0,1717},
- {{0x00000000,0x00000000,0x00000000},0x0080,0,1720},
- {{0x00000000,0x00000000,0x00000000},0x0080,0,1699},
- {{0x00000000,0x00000080,0x00000000},0x0028,0,1362},
- {{0x00000000,0x00400000,0x00000000},0x0029,0,1362},
- {{0x00000000,0x00000200,0x00000000},0x008c,0,1990},
- {{0x00000000,0x00000200,0x00000000},0x008b,0,1967},
- {{0x00000000,0x00000000,0x00000000},0x008b,0,1983},
- {{0x00000000,0x00000000,0x00000000},0x00a3,0,1983},
- {{0x00000001,0x00000000,0x00000000},0x0025,0,1333},
- {{0x00000000,0x00000000,0x00000000},0x002e,0,1414},
- {{0x00000000,0x00000000,0x00000000},0x00b6,0,2727},
- {{0x00000001,0x00000000,0x00000000},0x00b6,0,2719},
- {{0x00000000,0x00000000,0x00000000},0x008b,0,1986},
- {{0x00000000,0x00000000,0x00000000},0x008c,0,2010},
- {{0x00000001,0x00000000,0x00000000},0x002b,0,1383},
- {{0x00000001,0x00000000,0x00000000},0x00b1,0,2690},
- {{0x00000000,0x00000000,0x00000000},0x009e,0,2438},
- {{0x00100000,0x00000880,0x00000000},0x00ab,0,2610},
- {{0x00100000,0x00400800,0x00000000},0x00bb,0,2610},
- {{0x00000001,0x00000000,0x00000000},0x00a3,0,2502},
- {{0x00000000,0x00000000,0x00000000},0x009e,0,2422},
- {{0x00000000,0x00010000,0x00000000},0x0091,0,2095},
- {{0x00000000,0x00000000,0x00000000},0x0092,0,2114},
- {{0x00000000,0x00000000,0x00000000},0x008c,0,2007},
- {{0x00000000,0x00000000,0x00000000},0x0091,0,2110},
- {{0x00000000,0x00000000,0x00000000},0x0092,0,2133},
- {{0x00000003,0x00000040,0x00000000},0x0051,0,1578},
- {{0x00000005,0x00000040,0x00000000},0x0071,0,1578},
- {{0x00000000,0x00010000,0x00000018},0x00bc,0,2776},
- {{0x00000000,0x00000800,0x00000000},0x003f,0,1517},
- {{0x00000000,0x00000800,0x00800000},0x00bf,0,1517},
- {{0x00000000,0x00000800,0x00000000},0x0022,0,1304},
- {{0x00000003,0x00000040,0x00000000},0x0052,0,1580},
- {{0x00000005,0x00000040,0x00000000},0x0072,0,1580},
- {{0x00000000,0x00000000,0x00000000},0x001e,0,1242},
- {{0x00000001,0x00000000,0x00000000},0x00ae,0,2663},
- {{0x00000000,0x00000200,0x00000000},0x008d,0,2014},
- {{0x00000000,0x00000000,0x00000000},0x005c,0,1598},
- {{0x00000000,0x00000000,0x00000000},0x00ae,0,2674},
- {{0x00000000,0x00000000,0x00000000},0x008d,0,2027},
- {{0x00000000,0x00000000,0x00000000},0x001e,0,1263},
- {{0x00000003,0x00000040,0x00000000},0x0053,0,1582},
- {{0x00000005,0x00000040,0x00000000},0x0073,0,1582},
- {{0x00000000,0x00000000,0x00000000},0x008e,0,2040},
- {{0x00000000,0x00000000,0x00000000},0x008f,0,2059},
- {{0x00000000,0x00000000,0x00000000},0x0086,0,1843},
- {{0x00000000,0x00000000,0x00000000},0x001a,0,1170},
- {{0x00000000,0x00000000,0x00000000},0x009a,0,2327},
- {{0x00000000,0x00000000,0x00000000},0x009a,0,2330},
- {{0x00000000,0x00000000,0x00000000},0x00a7,0,2561},
- {{0x00000001,0x00000000,0x00000000},0x00a7,0,2553},
- {{0x00000000,0x00000000,0x00100001},0x0087,0,1850},
- {{0x00000000,0x00000000,0x00000000},0x003b,0,1487},
- {{0x00000000,0x00000000,0x00000000},0x0093,0,2137},
- {{0x00000001,0x00000000,0x00000000},0x0037,0,1464},
- {{0x00000000,0x00000000,0x00000000},0x0096,0,2225},
- {{0x00000000,0x00000000,0x00000000},0x0099,0,2301},
- {{0x00000000,0x00000000,0x00000000},0x0001,0,728},
- {{0x00000005,0x00000040,0x00000000},0x00df,0,2929},
- {{0x00000000,0x00000000,0x00000000},0x000f,0,918},
- {{0x00000000,0x00000000,0x00000000},0x000e,0,905},
- {{0x00000000,0x01000000,0x00000000},0x008f,0,2047},
- {{0x00000000,0x01000000,0x00000000},0x008e,0,2030},
- {{0x00000000,0x00000000,0x00000000},0x000f,0,927},
- {{0x00000001,0x00000000,0x00000000},0x0036,0,1460},
- {{0x00000000,0x00000000,0x00000000},0x002f,0,1429},
- {{0x00000000,0x00000000,0x00000000},0x000e,0,915},
- {{0x00000000,0x00000000,0x00000000},0x00ad,0,2648},
- {{0x00000000,0x00000000,0x00000000},0x0001,0,724},
- {{0x00000000,0x00000000,0x00000000},0x002f,0,1421},
- {{0x00000000,0x00000000,0x00000000},0x0098,0,2265},
- {{0x00000000,0x00000000,0x00000000},0x0020,0,1289},
- {{0x00000000,0x00000000,0x00000000},0x0096,0,2228},
- {{0x00000000,0x00000000,0x00000000},0x00df,0,2937},
- {{0x00000000,0x00000000,0x00000000},0x008e,0,2043},
- {{0x00000000,0x00000000,0x00000000},0x008f,0,2062},
- {{0x00000000,0x00000000,0x00000000},0x0086,0,1846},
- {{0x00000000,0x00000000,0x00000000},0x009c,0,2387},
- {{0x00000000,0x00000000,0x00000001},0x0096,0,2206},
- {{0x00000000,0x00000000,0x00000001},0x0001,0,710},
- {{0x00000000,0x00000000,0x00000001},0x0086,0,1823},
- {{0x00000000,0x00000000,0x00000001},0x0098,0,2252},
- {{0x00000000,0x00000000,0x00000001},0x0002,0,731},
- {{0x00000000,0x00000000,0x00000000},0x009c,0,2369},
- {{0x00000000,0x00000000,0x00000000},0x0093,0,2159},
- {{0x00000000,0x00000000,0x00000000},0x0002,0,742},
- {{0x00000000,0x00000000,0x00000000},0x001a,0,1173},
- {{0x00000000,0x00000000,0x00000000},0x001a,0,1159},
- {{0x00000000,0x00000000,0x00000000},0x0002,0,746},
- {{0x00000000,0x00000000,0x00000000},0x0016,0,1102},
- {{0x00000000,0x00000000,0x00000000},0x0016,0,1105},
- {{0x00000000,0x00000000,0x00000000},0x0016,0,1085},
- {{0x00000003,0x00000040,0x00000000},0x0054,0,1584},
- {{0x00000005,0x00000040,0x00000000},0x0074,0,1584},
- {{0x00000000,0x00000000,0x00000000},0x0009,0,857},
- {{0x00000000,0x00000001,0x00000000},0x0009,0,857},
- {{0x00000000,0x40000000,0x00000000},0x000b,0,857},
- {{0x00000000,0x00000001,0x00000000},0x0009,0,846},
- {{0x00000000,0x40000000,0x00000000},0x000b,0,846},
- {{0x00000000,0x00000200,0x00000000},0x008a,0,1945},
- {{0x00000000,0x00000000,0x00100001},0x0003,0,749},
- {{0x00000000,0x00000000,0x00000000},0x00de,0,2926},
- {{0x00000000,0x00000000,0x00000000},0x00fe,0,2926},
- {{0x00000003,0x00000040,0x00000000},0x00de,0,2920},
- {{0x00000005,0x00000040,0x00000000},0x00fe,0,2920},
- {{0x00000001,0x00000000,0x00000000},0x0033,0,1444},
- {{0x00000000,0x00000000,0x00000020},0x00b3,0,1444},
- {{0x00000000,0x00000000,0x00000018},0x00be,0,2790},
- {{0x00000000,0x00000000,0x00100001},0x0004,0,761},
- {{0x00000000,0x00000000,0x00100001},0x0017,0,1109},
- {{0x00000000,0x00000000,0x00000000},0x0093,0,2156},
- {{0x00000001,0x00000000,0x00000000},0x0032,0,1440},
- {{0x00000000,0x00000000,0x00000020},0x00b2,0,1440},
- {{0x00000003,0x00000040,0x00000000},0x0055,0,1586},
- {{0x00000005,0x00000040,0x00000000},0x0075,0,1586},
- {{0x04000003,0x00000040,0x00000000},0x00d9,0,1586},
- {{0x00000013,0x00000040,0x00000000},0x00da,0,1586},
- {{0x00008003,0x00000040,0x00000000},0x00db,0,1586},
- {{0x00040003,0x00000040,0x00000000},0x00dc,0,1586},
- {{0x04000005,0x00000040,0x00000000},0x00f9,0,1586},
- {{0x00000015,0x00000040,0x00000000},0x00fa,0,1586},
- {{0x00008005,0x00000040,0x00000000},0x00fb,0,1586},
- {{0x00040005,0x00000040,0x00000000},0x00fc,0,1586},
- {{0x00000000,0x00000000,0x00000000},0x00d9,0,2905},
- {{0x00000000,0x00000000,0x00000000},0x00f9,0,2905},
- {{0x00000000,0x00000000,0x00000000},0x00da,0,2908},
- {{0x00000000,0x00000000,0x00000000},0x00fa,0,2908},
- {{0x00000000,0x00000000,0x00000000},0x00dc,0,2914},
- {{0x00000000,0x00000000,0x00000000},0x00fc,0,2914},
- {{0x00000000,0x00000000,0x00000000},0x00db,0,2911},
- {{0x00000000,0x00000000,0x00000000},0x00fb,0,2911},
- {{0x00000000,0x00000000,0x00000000},0x005f,0,1645},
- {{0x00000000,0x00000000,0x00000000},0x001f,0,1266},
- {{0x00000000,0x00000000,0x00000000},0x001f,0,1285},
- {{0x00000003,0x00000040,0x00000000},0x0056,0,1588},
- {{0x00000005,0x00000040,0x00000000},0x0076,0,1588},
- {{0x00000000,0x00000000,0x00000000},0x008a,0,1960},
- {{0x00000000,0x00000000,0x00000000},0x000b,0,880},
- {{0x00000000,0x00000000,0x00000000},0x008a,0,1963},
- {{0x00000003,0x00000040,0x00000000},0x0057,0,1590},
- {{0x00000005,0x00000040,0x00000000},0x0077,0,1590},
- {{0x00000003,0x00000040,0x00000000},0x0058,0,1592},
- {{0x00000005,0x00000040,0x00000000},0x0078,0,1592},
- {{0x00000000,0x00000000,0x00000000},0x00a4,0,2523},
- {{0x00000003,0x00000040,0x00000000},0x0059,0,1594},
- {{0x00000005,0x00000040,0x00000000},0x0079,0,1594},
- {{0x00000013,0x00000040,0x00000000},0x00dd,0,1594},
- {{0x00000015,0x00000040,0x00000000},0x00fd,0,1594},
- {{0x00040005,0x00000040,0x00000000},0x00ff,0,1594},
- {{0x00000000,0x00000000,0x00000000},0x00dd,0,2917},
- {{0x00000000,0x00000000,0x00000000},0x00fd,0,2917},
- {{0x00000000,0x00000000,0x00000000},0x00a5,0,2533},
- {{0x00000000,0x00000000,0x00000000},0x00ff,0,2952},
- {{0x00000000,0x00000000,0x00000000},0x00a5,0,2530},
- {{0x00000001,0x00000000,0x00000000},0x00a5,0,2526},
- {{0x00000003,0x00000040,0x00000000},0x005a,0,1596},
- {{0x00000005,0x00000040,0x00000000},0x007a,0,1596},
- {{0x00000001,0x00000000,0x00000000},0x0030,0,1435},
-#if !UCS_BYTE
- {{0x00001000,0x00000000,0x00000000},0x02c7,0,1288},
- {{0x00000800,0x00000000,0x00000000},0x02d8,0,1288},
- {{0x00000000,0x00000000,0x02000000},0x02db,0,1288},
- {{0x00000000,0x00000000,0x00000001},0x2109,0,1288},
- {{0x00000000,0x00000000,0x00010000},0x2228,0,1288},
- {{0x00000000,0x00000000,0x00010000},0x25ad,0,1288},
- {{0x00080008,0x00000000,0x00000000},0x02d9,0,1288},
- {{0x00000008,0x00000000,0x04000000},0x02da,0,1288},
- {{0x00000004,0x02000000,0x00000000},0x02dc,0,1288},
- {{0x08000001,0x00004000,0x00000000},0x0374,0,1288},
- {{0x08000000,0x00000000,0x20000000},0x0384,0,1288},
- {{0x20000021,0x00000000,0x00000000},0x05d0,0,1288},
- {{0x000000a1,0x00000000,0x00000000},0x0627,0,1288},
- {{0x08000000,0x00100000,0x00000000},0x1fbe,0,1288},
- {{0x08000000,0x00200000,0x00000000},0x1fbf,0,1288},
- {{0x08000000,0x00080000,0x00000000},0x1fc0,0,1288},
- {{0x08000000,0x20000000,0x00000000},0x1fef,0,1288},
- {{0x08000000,0x00020000,0x00000000},0x1ffd,0,1288},
- {{0x08020000,0x00000000,0x00000000},0x1ffe,0,1288},
- {{0x00000000,0x00010000,0x00000040},0x2081,0,1288},
- {{0x80000000,0x00000000,0x00040000},0x2440,0,1288},
- {{0x00004001,0x00010000,0x00000000},0x2460,0,1288},
- {{0x00000001,0x00050000,0x00000000},0x2474,0,1288},
- {{0x00000000,0x00000000,0x00000084},0x25a0,0,1288},
- {{0x00000000,0x80000000,0x00000080},0x25a1,0,1288},
- {{0x00000000,0x00000000,0x00000a00},0x3000,0,1288},
- {{0x40000001,0x04000000,0x00000000},0x3068,0,1288},
- {{0x00000001,0x04000020,0x00000000},0x30c8,0,1288},
- {{0x08000043,0x00000000,0x00000000},0x0391,0,1288},
- {{0x08800003,0x00000000,0x00000000},0x0397,0,1288},
- {{0x08000003,0x00000008,0x00000000},0x0399,0,1288},
- {{0x08000003,0x10000000,0x00000000},0x03a5,0,1288},
- {{0x08000003,0x00008000,0x00000000},0x03a9,0,1288},
- {{0x08000045,0x00000000,0x00000000},0x03b1,0,1288},
- {{0x08800005,0x00000000,0x00000000},0x03b7,0,1288},
- {{0x08000005,0x00000008,0x00000000},0x03b9,0,1288},
- {{0x08000005,0x10000000,0x00000000},0x03c5,0,1288},
- {{0x08000005,0x00008000,0x00000000},0x03c9,0,1288},
- {{0x00000081,0x00010000,0x00000400},0x0661,0,1288},
- {{0x000000a1,0x00000000,0x00000020},0x0670,0,1288},
- {{0x08000001,0x20200000,0x00000000},0x1fcd,0,1288},
- {{0x08000001,0x00220000,0x00000000},0x1fce,0,1288},
- {{0x08000001,0x00280000,0x00000000},0x1fcf,0,1288},
- {{0x08020001,0x20000000,0x00000000},0x1fdd,0,1288},
- {{0x08020001,0x00020000,0x00000000},0x1fde,0,1288},
- {{0x08020001,0x00080000,0x00000000},0x1fdf,0,1288},
- {{0x00100000,0x40000200,0x00000000},0x2016,0,1288},
- {{0x00000000,0x00814000,0x00000000},0x2160,0,1288},
- {{0x00000000,0x00400080,0x00002000},0x2194,0,1288},
- {{0x00200000,0x08000000,0x00002000},0x2195,0,1288},
- {{0x02000001,0x00010000,0x00000002},0x2488,0,1288},
- {{0x00000004,0x00000000,0x00000084},0x25aa,0,1288},
- {{0x02000000,0x00000000,0x00000802},0x3002,0,1288},
- {{0x00080000,0x00000020,0x01000000},0x30fb,0,1288},
- {{0x00000000,0x00050000,0x00000800},0x3220,0,1288},
- {{0x000000a1,0x00000010,0x00000000},0xfe8d,0,1288},
- {{0x010000a1,0x00000000,0x00000000},0xfe8e,0,1288},
- {{0x08000043,0x00000000,0x20000000},0x0386,0,1288},
- {{0x08800003,0x00000000,0x20000000},0x0389,0,1288},
- {{0x08000003,0x00000008,0x20000000},0x038a,0,1288},
- {{0x08000003,0x10000000,0x20000000},0x038e,0,1288},
- {{0x08000003,0x00008000,0x20000000},0x038f,0,1288},
- {{0x08000045,0x00000000,0x20000000},0x03ac,0,1288},
- {{0x08800005,0x00000000,0x20000000},0x03ae,0,1288},
- {{0x08000005,0x00000008,0x20000000},0x03af,0,1288},
- {{0x08000005,0x10000000,0x20000000},0x03cd,0,1288},
- {{0x08000005,0x00008000,0x20000000},0x03ce,0,1288},
- {{0x08000045,0x00200000,0x00000000},0x1f00,0,1288},
- {{0x08020045,0x00000000,0x00000000},0x1f01,0,1288},
- {{0x08000043,0x00200000,0x00000000},0x1f08,0,1288},
- {{0x08020043,0x00000000,0x00000000},0x1f09,0,1288},
- {{0x08800005,0x00200000,0x00000000},0x1f20,0,1288},
- {{0x08820005,0x00000000,0x00000000},0x1f21,0,1288},
- {{0x08800003,0x00200000,0x00000000},0x1f28,0,1288},
- {{0x08820003,0x00000000,0x00000000},0x1f29,0,1288},
- {{0x08000005,0x00200008,0x00000000},0x1f30,0,1288},
- {{0x08020005,0x00000008,0x00000000},0x1f31,0,1288},
- {{0x08000003,0x00200008,0x00000000},0x1f38,0,1288},
- {{0x08020003,0x00000008,0x00000000},0x1f39,0,1288},
- {{0x08000005,0x10200000,0x00000000},0x1f50,0,1288},
- {{0x08020005,0x10000000,0x00000000},0x1f51,0,1288},
- {{0x08020003,0x10000000,0x00000000},0x1f59,0,1288},
- {{0x08000005,0x00208000,0x00000000},0x1f60,0,1288},
- {{0x08020005,0x00008000,0x00000000},0x1f61,0,1288},
- {{0x08000003,0x00208000,0x00000000},0x1f68,0,1288},
- {{0x08020003,0x00008000,0x00000000},0x1f69,0,1288},
- {{0x08000045,0x20000000,0x00000000},0x1f70,0,1288},
- {{0x08000045,0x00020000,0x00000000},0x1f71,0,1288},
- {{0x08800005,0x20000000,0x00000000},0x1f74,0,1288},
- {{0x08800005,0x00020000,0x00000000},0x1f75,0,1288},
- {{0x08000005,0x20000008,0x00000000},0x1f76,0,1288},
- {{0x08000005,0x00020008,0x00000000},0x1f77,0,1288},
- {{0x08000005,0x30000000,0x00000000},0x1f7a,0,1288},
- {{0x08000005,0x10020000,0x00000000},0x1f7b,0,1288},
- {{0x08000005,0x20008000,0x00000000},0x1f7c,0,1288},
- {{0x08000005,0x00028000,0x00000000},0x1f7d,0,1288},
- {{0x08000045,0x00000400,0x00000000},0x1fb1,0,1288},
- {{0x08000045,0x00080000,0x00000000},0x1fb6,0,1288},
- {{0x08000043,0x00000400,0x00000000},0x1fb9,0,1288},
- {{0x08000043,0x20000000,0x00000000},0x1fba,0,1288},
- {{0x08000043,0x00020000,0x00000000},0x1fbb,0,1288},
- {{0x08000043,0x00100000,0x00000000},0x1fbc,0,1288},
- {{0x08800005,0x00080000,0x00000000},0x1fc6,0,1288},
- {{0x08800003,0x20000000,0x00000000},0x1fca,0,1288},
- {{0x08800003,0x00020000,0x00000000},0x1fcb,0,1288},
- {{0x08800003,0x00100000,0x00000000},0x1fcc,0,1288},
- {{0x08000005,0x00000408,0x00000000},0x1fd1,0,1288},
- {{0x08000005,0x00080008,0x00000000},0x1fd6,0,1288},
- {{0x08000003,0x00000408,0x00000000},0x1fd9,0,1288},
- {{0x08000003,0x20000008,0x00000000},0x1fda,0,1288},
- {{0x08000003,0x00020008,0x00000000},0x1fdb,0,1288},
- {{0x08000005,0x10000400,0x00000000},0x1fe1,0,1288},
- {{0x08000005,0x10080000,0x00000000},0x1fe6,0,1288},
- {{0x08000003,0x10000400,0x00000000},0x1fe9,0,1288},
- {{0x08000003,0x30000000,0x00000000},0x1fea,0,1288},
- {{0x08000003,0x10020000,0x00000000},0x1feb,0,1288},
- {{0x08000005,0x00088000,0x00000000},0x1ff6,0,1288},
- {{0x08000003,0x20008000,0x00000000},0x1ffa,0,1288},
- {{0x08000003,0x00028000,0x00000000},0x1ffb,0,1288},
- {{0x08000003,0x00108000,0x00000000},0x1ffc,0,1288},
- {{0x00000000,0x04400880,0x00000000},0x200e,0,1288},
- {{0x00000000,0x04400880,0x00000000},0x200f,0,1288},
- {{0x00000004,0x00814000,0x00000000},0x2170,0,1288},
- {{0x00100000,0x00400080,0x00002000},0x21d4,0,1288},
- {{0x00400400,0x00000101,0x00000000},0x2500,0,1288},
- {{0x10400400,0x00000001,0x00000000},0x2501,0,1288},
- {{0x00400400,0x40000100,0x00000000},0x2502,0,1288},
- {{0x10400400,0x40000000,0x00000000},0x2503,0,1288},
- {{0x00500400,0x00000001,0x00000000},0x2550,0,1288},
- {{0x00500400,0x40000000,0x00000000},0x2551,0,1288},
- {{0x08000045,0x20200000,0x00000000},0x1f02,0,1288},
- {{0x08020045,0x20000000,0x00000000},0x1f03,0,1288},
- {{0x08000045,0x00220000,0x00000000},0x1f04,0,1288},
- {{0x08020045,0x00020000,0x00000000},0x1f05,0,1288},
- {{0x08000045,0x00280000,0x00000000},0x1f06,0,1288},
- {{0x08020045,0x00080000,0x00000000},0x1f07,0,1288},
- {{0x08000043,0x20200000,0x00000000},0x1f0a,0,1288},
- {{0x08020043,0x20000000,0x00000000},0x1f0b,0,1288},
- {{0x08000043,0x00220000,0x00000000},0x1f0c,0,1288},
- {{0x08020043,0x00020000,0x00000000},0x1f0d,0,1288},
- {{0x08000043,0x00280000,0x00000000},0x1f0e,0,1288},
- {{0x08020043,0x00080000,0x00000000},0x1f0f,0,1288},
- {{0x08800005,0x20200000,0x00000000},0x1f22,0,1288},
- {{0x08820005,0x20000000,0x00000000},0x1f23,0,1288},
- {{0x08800005,0x00220000,0x00000000},0x1f24,0,1288},
- {{0x08820005,0x00020000,0x00000000},0x1f25,0,1288},
- {{0x08800005,0x00280000,0x00000000},0x1f26,0,1288},
- {{0x08820005,0x00080000,0x00000000},0x1f27,0,1288},
- {{0x08800003,0x20200000,0x00000000},0x1f2a,0,1288},
- {{0x08820003,0x20000000,0x00000000},0x1f2b,0,1288},
- {{0x08800003,0x00220000,0x00000000},0x1f2c,0,1288},
- {{0x08820003,0x00020000,0x00000000},0x1f2d,0,1288},
- {{0x08800003,0x00280000,0x00000000},0x1f2e,0,1288},
- {{0x08820003,0x00080000,0x00000000},0x1f2f,0,1288},
- {{0x08000005,0x20200008,0x00000000},0x1f32,0,1288},
- {{0x08020005,0x20000008,0x00000000},0x1f33,0,1288},
- {{0x08000005,0x00220008,0x00000000},0x1f34,0,1288},
- {{0x08020005,0x00020008,0x00000000},0x1f35,0,1288},
- {{0x08000005,0x00280008,0x00000000},0x1f36,0,1288},
- {{0x08020005,0x00080008,0x00000000},0x1f37,0,1288},
- {{0x08000003,0x20200008,0x00000000},0x1f3a,0,1288},
- {{0x08020003,0x20000008,0x00000000},0x1f3b,0,1288},
- {{0x08000003,0x00220008,0x00000000},0x1f3c,0,1288},
- {{0x08020003,0x00020008,0x00000000},0x1f3d,0,1288},
- {{0x08000003,0x00280008,0x00000000},0x1f3e,0,1288},
- {{0x08020003,0x00080008,0x00000000},0x1f3f,0,1288},
- {{0x08000005,0x30200000,0x00000000},0x1f52,0,1288},
- {{0x08020005,0x30000000,0x00000000},0x1f53,0,1288},
- {{0x08000005,0x10220000,0x00000000},0x1f54,0,1288},
- {{0x08020005,0x10020000,0x00000000},0x1f55,0,1288},
- {{0x08000005,0x10280000,0x00000000},0x1f56,0,1288},
- {{0x08020005,0x10080000,0x00000000},0x1f57,0,1288},
- {{0x08020003,0x30000000,0x00000000},0x1f5b,0,1288},
- {{0x08020003,0x10020000,0x00000000},0x1f5d,0,1288},
- {{0x08020003,0x10080000,0x00000000},0x1f5f,0,1288},
- {{0x08000005,0x20208000,0x00000000},0x1f62,0,1288},
- {{0x08020005,0x20008000,0x00000000},0x1f63,0,1288},
- {{0x08000005,0x00228000,0x00000000},0x1f64,0,1288},
- {{0x08020005,0x00028000,0x00000000},0x1f65,0,1288},
- {{0x08000005,0x00288000,0x00000000},0x1f66,0,1288},
- {{0x08020005,0x00088000,0x00000000},0x1f67,0,1288},
- {{0x08000003,0x20208000,0x00000000},0x1f6a,0,1288},
- {{0x08020003,0x20008000,0x00000000},0x1f6b,0,1288},
- {{0x08000003,0x00228000,0x00000000},0x1f6c,0,1288},
- {{0x08020003,0x00028000,0x00000000},0x1f6d,0,1288},
- {{0x08000003,0x00288000,0x00000000},0x1f6e,0,1288},
- {{0x08020003,0x00088000,0x00000000},0x1f6f,0,1288},
- {{0x08000043,0x00300000,0x00000000},0x1f88,0,1288},
- {{0x08020043,0x00100000,0x00000000},0x1f89,0,1288},
- {{0x08800003,0x00300000,0x00000000},0x1f98,0,1288},
- {{0x08820003,0x00100000,0x00000000},0x1f99,0,1288},
- {{0x08000003,0x00308000,0x00000000},0x1fa8,0,1288},
- {{0x08020003,0x00108000,0x00000000},0x1fa9,0,1288},
- {{0x00600401,0x00400100,0x00000000},0x250c,0,1288},
- {{0x10600401,0x00400000,0x00000000},0x250f,0,1288},
- {{0x00600401,0x00000180,0x00000000},0x2510,0,1288},
- {{0x10600401,0x00000080,0x00000000},0x2513,0,1288},
- {{0x00400401,0x08400100,0x00000000},0x2514,0,1288},
- {{0x10400401,0x08400000,0x00000000},0x2517,0,1288},
- {{0x00400401,0x08000180,0x00000000},0x2518,0,1288},
- {{0x10400401,0x08000080,0x00000000},0x251b,0,1288},
- {{0x00400401,0x40400100,0x00000000},0x251c,0,1288},
- {{0x10400401,0x40400000,0x00000000},0x2523,0,1288},
- {{0x00400401,0x40000180,0x00000000},0x2524,0,1288},
- {{0x10400401,0x40000080,0x00000000},0x252b,0,1288},
- {{0x00600401,0x00000101,0x00000000},0x252c,0,1288},
- {{0x10600401,0x00000001,0x00000000},0x2533,0,1288},
- {{0x00400401,0x08000101,0x00000000},0x2534,0,1288},
- {{0x10400401,0x08000001,0x00000000},0x253b,0,1288},
- {{0x00400401,0x40000101,0x00000000},0x253c,0,1288},
- {{0x10400401,0x40000001,0x00000000},0x254b,0,1288},
- {{0x00700401,0x00400000,0x00000000},0x2554,0,1288},
- {{0x00700401,0x00000080,0x00000000},0x2557,0,1288},
- {{0x00500401,0x08400000,0x00000000},0x255a,0,1288},
- {{0x00500401,0x08000080,0x00000000},0x255d,0,1288},
- {{0x00500401,0x40400000,0x00000000},0x2560,0,1288},
- {{0x00500401,0x40000080,0x00000000},0x2563,0,1288},
- {{0x00700401,0x00000001,0x00000000},0x2566,0,1288},
- {{0x00500401,0x08000001,0x00000000},0x2569,0,1288},
- {{0x00500401,0x40000001,0x00000000},0x256c,0,1288},
- {{0x08000043,0x20300000,0x00000000},0x1f8a,0,1288},
- {{0x08020043,0x20100000,0x00000000},0x1f8b,0,1288},
- {{0x08000043,0x00320000,0x00000000},0x1f8c,0,1288},
- {{0x08020043,0x00120000,0x00000000},0x1f8d,0,1288},
- {{0x08000043,0x00380000,0x00000000},0x1f8e,0,1288},
- {{0x08020043,0x00180000,0x00000000},0x1f8f,0,1288},
- {{0x08800003,0x20300000,0x00000000},0x1f9a,0,1288},
- {{0x08820003,0x20100000,0x00000000},0x1f9b,0,1288},
- {{0x08800003,0x00320000,0x00000000},0x1f9c,0,1288},
- {{0x08820003,0x00120000,0x00000000},0x1f9d,0,1288},
- {{0x08800003,0x00380000,0x00000000},0x1f9e,0,1288},
- {{0x08820003,0x00180000,0x00000000},0x1f9f,0,1288},
- {{0x08000003,0x20308000,0x00000000},0x1faa,0,1288},
- {{0x08020003,0x20108000,0x00000000},0x1fab,0,1288},
- {{0x08000003,0x00328000,0x00000000},0x1fac,0,1288},
- {{0x08020003,0x00128000,0x00000000},0x1fad,0,1288},
- {{0x08000003,0x00388000,0x00000000},0x1fae,0,1288},
- {{0x08020003,0x00188000,0x00000000},0x1faf,0,1288},
- {{0x10600401,0x00400100,0x00000000},0x250d,0,1288},
- {{0x10600401,0x00400100,0x00000000},0x250e,0,1288},
- {{0x10600401,0x00000180,0x00000000},0x2511,0,1288},
- {{0x10600401,0x00000180,0x00000000},0x2512,0,1288},
- {{0x10400401,0x08400100,0x00000000},0x2515,0,1288},
- {{0x10400401,0x08400100,0x00000000},0x2516,0,1288},
- {{0x10400401,0x08000180,0x00000000},0x2519,0,1288},
- {{0x10400401,0x08000180,0x00000000},0x251a,0,1288},
- {{0x10400401,0x40400100,0x00000000},0x251d,0,1288},
- {{0x10400401,0x40400100,0x00000000},0x2520,0,1288},
- {{0x10400401,0x40000180,0x00000000},0x2525,0,1288},
- {{0x10400401,0x40000180,0x00000000},0x2528,0,1288},
- {{0x10600401,0x00000101,0x00000000},0x252f,0,1288},
- {{0x10600401,0x00000101,0x00000000},0x2530,0,1288},
- {{0x10400401,0x08000101,0x00000000},0x2537,0,1288},
- {{0x10400401,0x08000101,0x00000000},0x2538,0,1288},
- {{0x10400401,0x40000101,0x00000000},0x253f,0,1288},
- {{0x10400401,0x40000101,0x00000000},0x2542,0,1288},
- {{0x00700401,0x01400000,0x00000000},0x2552,0,1288},
- {{0x00700401,0x01400000,0x00000000},0x2553,0,1288},
- {{0x00700401,0x01000080,0x00000000},0x2555,0,1288},
- {{0x00700401,0x01000080,0x00000000},0x2556,0,1288},
- {{0x00500401,0x09400000,0x00000000},0x2558,0,1288},
- {{0x00500401,0x09400000,0x00000000},0x2559,0,1288},
- {{0x00500401,0x09000080,0x00000000},0x255b,0,1288},
- {{0x00500401,0x09000080,0x00000000},0x255c,0,1288},
- {{0x00500401,0x41400000,0x00000000},0x255e,0,1288},
- {{0x00500401,0x41400000,0x00000000},0x255f,0,1288},
- {{0x00500401,0x41000080,0x00000000},0x2561,0,1288},
- {{0x00500401,0x41000080,0x00000000},0x2562,0,1288},
- {{0x00700401,0x01000001,0x00000000},0x2564,0,1288},
- {{0x00700401,0x01000001,0x00000000},0x2565,0,1288},
- {{0x00500401,0x09000001,0x00000000},0x2567,0,1288},
- {{0x00500401,0x09000001,0x00000000},0x2568,0,1288},
- {{0x00500401,0x41000001,0x00000000},0x256a,0,1288},
- {{0x00500401,0x41000001,0x00000000},0x256b,0,1288},
- {{0x10600401,0x08400100,0x00000000},0x251e,0,1288},
- {{0x10600401,0x08400100,0x00000000},0x251f,0,1288},
- {{0x10600401,0x08400100,0x00000000},0x2521,0,1288},
- {{0x10600401,0x08400100,0x00000000},0x2522,0,1288},
- {{0x10600401,0x08000180,0x00000000},0x2526,0,1288},
- {{0x10600401,0x08000180,0x00000000},0x2527,0,1288},
- {{0x10600401,0x08000180,0x00000000},0x2529,0,1288},
- {{0x10600401,0x08000180,0x00000000},0x252a,0,1288},
- {{0x10600401,0x00400180,0x00000000},0x252d,0,1288},
- {{0x10600401,0x00400180,0x00000000},0x252e,0,1288},
- {{0x10600401,0x00400180,0x00000000},0x2531,0,1288},
- {{0x10600401,0x00400180,0x00000000},0x2532,0,1288},
- {{0x10400401,0x08400180,0x00000000},0x2535,0,1288},
- {{0x10400401,0x08400180,0x00000000},0x2536,0,1288},
- {{0x10400401,0x08400180,0x00000000},0x2539,0,1288},
- {{0x10400401,0x08400180,0x00000000},0x253a,0,1288},
- {{0x10400401,0x40400180,0x00000000},0x253d,0,1288},
- {{0x10400401,0x40400180,0x00000000},0x253e,0,1288},
- {{0x10600401,0x08000101,0x00000000},0x2540,0,1288},
- {{0x10600401,0x08000101,0x00000000},0x2541,0,1288},
- {{0x10600401,0x08000101,0x00000000},0x2547,0,1288},
- {{0x10600401,0x08000101,0x00000000},0x2548,0,1288},
- {{0x10400401,0x40400180,0x00000000},0x2549,0,1288},
- {{0x10400401,0x40400180,0x00000000},0x254a,0,1288},
- {{0x10600401,0x08400180,0x00000000},0x2543,0,1288},
- {{0x10600401,0x08400180,0x00000000},0x2544,0,1288},
- {{0x10600401,0x08400180,0x00000000},0x2545,0,1288},
- {{0x10600401,0x08400180,0x00000000},0x2546,0,1288},
- {{0x00000000,0x00000000,0x00000000},0x2198,1,3955},
- {{0x00000000,0x00000000,0x00000000},0x1fef,1,2787},
- {{0x00000000,0x00000000,0x00000000},0x203c,1,3237},
- {{0x00000000,0x00000000,0x00000000},0x2016,1,2917},
- {{0x00000000,0x00000000,0x00000000},0x1fed,1,2781},
- {{0x00000000,0x00000000,0x00000000},0x226e,1,4568},
- {{0x00000000,0x00000000,0x00000000},0x2260,1,4508},
- {{0x00000000,0x00000000,0x00000000},0x226f,1,4583},
- {{0x00000000,0x00000000,0x00000000},0x0301,1,560},
- {{0x00000000,0x00000000,0x00000000},0x064c,1,1587},
- {{0x00000000,0x00000000,0x00000000},0x309b,1,6688},
- {{0x00000000,0x00000000,0x00000000},0x201c,1,2977},
- {{0x00000000,0x00000000,0x00000000},0x20d1,1,3370},
- {{0x00000000,0x00000000,0x00000000},0x201d,1,2980},
- {{0x00000000,0x00000000,0x00000000},0x0300,1,557},
- {{0x00000000,0x00000000,0x00000000},0x042c,1,1100},
- {{0x00000000,0x00000000,0x00000000},0x044c,1,1118},
- {{0x00000000,0x00000000,0x00000000},0x2030,1,3132},
- {{0x00000000,0x00000000,0x00000000},0x066a,1,1678},
- {{0x00000000,0x00000000,0x00000000},0x02dd,1,537},
- {{0x00000000,0x00000000,0x00000000},0x0385,1,608},
- {{0x00000000,0x00000000,0x00000000},0x02d8,1,522},
- {{0x00000000,0x00000000,0x00000000},0x0384,1,595},
- {{0x00000000,0x00000000,0x00000000},0x064f,1,1617},
- {{0x00000000,0x00000000,0x00000000},0x203e,1,3250},
- {{0x00000000,0x00000000,0x00000000},0x02d9,1,525},
- {{0x00000000,0x00000000,0x00000000},0x02da,1,528},
- {{0x00000000,0x00000000,0x00000000},0x2018,1,2923},
- {{0x00000000,0x00000000,0x00000000},0x2019,1,2926},
- {{0x00000000,0x00000000,0x00000000},0x02db,1,531},
- {{0x00000000,0x00000000,0x00000000},0x02c7,1,504},
- {{0x00000000,0x00000000,0x00000000},0x0374,1,563},
- {{0x00000000,0x00000000,0x00000000},0x0149,1,150},
- {{0x00000000,0x00000000,0x00000000},0x3010,1,6462},
- {{0x00000000,0x00000000,0x00000000},0x3014,1,6501},
- {{0x00000000,0x00000000,0x00000000},0x2208,1,4112},
- {{0x00000000,0x00000000,0x00000000},0x2474,1,5047},
- {{0x00000000,0x00000000,0x00000000},0x247d,1,5083},
- {{0x00000000,0x00000000,0x00000000},0x247e,1,5088},
- {{0x00000000,0x00000000,0x00000000},0x247f,1,5093},
- {{0x00000000,0x00000000,0x00000000},0x2480,1,5098},
- {{0x00000000,0x00000000,0x00000000},0x2481,1,5103},
- {{0x00000000,0x00000000,0x00000000},0x2482,1,5108},
- {{0x00000000,0x00000000,0x00000000},0x2483,1,5113},
- {{0x00000000,0x00000000,0x00000000},0x2484,1,5118},
- {{0x00000000,0x00000000,0x00000000},0x2485,1,5123},
- {{0x00000000,0x00000000,0x00000000},0x2486,1,5128},
- {{0x00000000,0x00000000,0x00000000},0x2475,1,5051},
- {{0x00000000,0x00000000,0x00000000},0x2487,1,5133},
- {{0x00000000,0x00000000,0x00000000},0x2476,1,5055},
- {{0x00000000,0x00000000,0x00000000},0x2477,1,5059},
- {{0x00000000,0x00000000,0x00000000},0x2478,1,5063},
- {{0x00000000,0x00000000,0x00000000},0x2479,1,5067},
- {{0x00000000,0x00000000,0x00000000},0x247a,1,5071},
- {{0x00000000,0x00000000,0x00000000},0x247b,1,5075},
- {{0x00000000,0x00000000,0x00000000},0x247c,1,5079},
- {{0x00000000,0x00000000,0x00000000},0x2286,1,4608},
- {{0x00000000,0x00000000,0x00000000},0x2312,1,4689},
- {{0x00000000,0x00000000,0x00000000},0x249c,1,5209},
- {{0x00000000,0x00000000,0x00000000},0x249d,1,5213},
- {{0x00000000,0x00000000,0x00000000},0x2282,1,4593},
- {{0x00000000,0x00000000,0x00000000},0x249e,1,5217},
- {{0x00000000,0x00000000,0x00000000},0x249f,1,5221},
- {{0x00000000,0x00000000,0x00000000},0x24a0,1,5225},
- {{0x00000000,0x00000000,0x00000000},0x24a1,1,5229},
- {{0x00000000,0x00000000,0x00000000},0x24a2,1,5233},
- {{0x00000000,0x00000000,0x00000000},0x24a3,1,5237},
- {{0x00000000,0x00000000,0x00000000},0x3016,1,6507},
- {{0x00000000,0x00000000,0x00000000},0x24a4,1,5241},
- {{0x00000000,0x00000000,0x00000000},0x24a5,1,5245},
- {{0x00000000,0x00000000,0x00000000},0x321c,1,6897},
- {{0x00000000,0x00000000,0x00000000},0x24a6,1,5249},
- {{0x00000000,0x00000000,0x00000000},0x24a7,1,5253},
- {{0x00000000,0x00000000,0x00000000},0x24a8,1,5257},
- {{0x00000000,0x00000000,0x00000000},0x24a9,1,5261},
- {{0x00000000,0x00000000,0x00000000},0x24aa,1,5265},
- {{0x00000000,0x00000000,0x00000000},0x24ab,1,5269},
- {{0x00000000,0x00000000,0x00000000},0x24ac,1,5273},
- {{0x00000000,0x00000000,0x00000000},0x24ad,1,5277},
- {{0x00000000,0x00000000,0x00000000},0x207d,1,3309},
- {{0x00000000,0x00000000,0x00000000},0x208d,1,3309},
- {{0x00000000,0x00000000,0x00000000},0x24ae,1,5281},
- {{0x00000000,0x00000000,0x00000000},0x24af,1,5285},
- {{0x00000000,0x00000000,0x00000000},0x2229,1,4332},
- {{0x00000000,0x00000000,0x00000000},0x24b0,1,5289},
- {{0x00000000,0x00000000,0x00000000},0x24b1,1,5293},
- {{0x00000000,0x00000000,0x00000000},0x24b2,1,5297},
- {{0x00000000,0x00000000,0x00000000},0x24b3,1,5301},
- {{0x00000000,0x00000000,0x00000000},0x24b4,1,5305},
- {{0x00000000,0x00000000,0x00000000},0x24b5,1,5309},
- {{0x00000000,0x00000000,0x00000000},0x3011,1,6465},
- {{0x00000000,0x00000000,0x00000000},0x3015,1,6504},
- {{0x00000000,0x00000000,0x00000000},0x1fbd,1,2661},
- {{0x00000000,0x00000000,0x00000000},0x2287,1,4611},
- {{0x00000000,0x00000000,0x00000000},0x2283,1,4605},
- {{0x00000000,0x00000000,0x00000000},0x3017,1,6510},
- {{0x00000000,0x00000000,0x00000000},0x207e,1,3312},
- {{0x00000000,0x00000000,0x00000000},0x208e,1,3312},
- {{0x00000000,0x00000000,0x00000000},0x222a,1,4341},
- {{0x00000000,0x00000000,0x00000000},0x2217,1,4220},
- {{0x00000000,0x00000000,0x00000000},0x2606,1,6049},
- {{0x00000000,0x00000000,0x00000000},0x2605,1,6046},
- {{0x00000000,0x00000000,0x00000000},0x309d,1,6712},
- {{0x00000000,0x00000000,0x00000000},0x30fd,1,6784},
- {{0x00000000,0x00000000,0x00000000},0x226b,1,4556},
- {{0x00000000,0x00000000,0x00000000},0x3005,1,6409},
- {{0x00000000,0x00000000,0x00000000},0x220f,1,4160},
- {{0x00000000,0x00000000,0x00000000},0x03c2,1,818},
- {{0x00000000,0x00000000,0x00000000},0x3003,1,6356},
- {{0x00000000,0x00000000,0x00000000},0x0640,1,1515},
- {{0x00000000,0x00000000,0x00000000},0x309e,1,6732},
- {{0x00000000,0x00000000,0x00000000},0x30fe,1,6787},
- {{0x00000000,0x00000000,0x00000000},0x207a,1,3294},
- {{0x00000000,0x00000000,0x00000000},0x208a,1,3294},
- {{0x00000000,0x00000000,0x00000000},0x2211,1,4179},
- {{0x00000000,0x00000000,0x00000000},0x1fcd,1,2701},
- {{0x00000000,0x00000000,0x00000000},0x1fce,1,2704},
- {{0x00000000,0x00000000,0x00000000},0x060c,1,1330},
- {{0x00000000,0x00000000,0x00000000},0x1fbf,1,2664},
- {{0x00000000,0x00000000,0x00000000},0x3001,1,6344},
- {{0x00000000,0x00000000,0x00000000},0x0375,1,572},
- {{0x00000000,0x00000000,0x00000000},0x2191,1,3878},
- {{0x00000000,0x00000000,0x00000000},0x220b,1,4134},
- {{0x00000000,0x00000000,0x00000000},0x2213,1,4196},
- {{0x00000000,0x00000000,0x00000000},0x2212,1,4182},
- {{0x00000000,0x00000000,0x00000000},0x2015,1,2914},
- {{0x00000000,0x00000000,0x00000000},0x30fc,1,6781},
- {{0x00000000,0x00000000,0x00000000},0x2192,1,3892},
- {{0x00000000,0x00000000,0x00000000},0x301c,1,6523},
- {{0x00000000,0x00000000,0x00000000},0x2043,1,3267},
- {{0x00000000,0x00000000,0x00000000},0x221f,1,4293},
- {{0x00000000,0x00000000,0x00000000},0x2014,1,2911},
- {{0x00000000,0x00000000,0x00000000},0x2013,1,2900},
- {{0x00000000,0x00000000,0x00000000},0x207b,1,3303},
- {{0x00000000,0x00000000,0x00000000},0x208b,1,3303},
- {{0x00000000,0x00000000,0x00000000},0x22a5,1,4625},
- {{0x00000000,0x00000000,0x00000000},0x2193,1,3905},
- {{0x00000000,0x00000000,0x00000000},0x2220,1,3905},
- {{0x00000000,0x00000000,0x00000000},0x2720,1,6338},
- {{0x00000000,0x00000000,0x00000000},0x0387,1,625},
- {{0x00000000,0x00000000,0x00000000},0x2214,1,4199},
- {{0x00000000,0x00000000,0x00000000},0x2027,1,3074},
- {{0x00000000,0x00000000,0x00000000},0x2025,1,3041},
- {{0x00000000,0x00000000,0x00000000},0x2026,1,3053},
- {{0x00000000,0x00000000,0x00000000},0x30fb,1,6762},
- {{0x00000000,0x00000000,0x00000000},0x201a,1,2945},
- {{0x00000000,0x00000000,0x00000000},0x2234,1,4383},
- {{0x00000000,0x00000000,0x00000000},0x3002,1,6347},
- {{0x00000000,0x00000000,0x00000000},0x22c5,1,4628},
- {{0x00000000,0x00000000,0x00000000},0x2591,1,5704},
- {{0x00000000,0x00000000,0x00000000},0x1ffd,1,2813},
- {{0x00000000,0x00000000,0x00000000},0x064e,1,1608},
- {{0x00000000,0x00000000,0x00000000},0x2020,1,2996},
- {{0x00000000,0x00000000,0x00000000},0x2197,1,3940},
- {{0x00000000,0x00000000,0x00000000},0x2205,1,4085},
- {{0x00000000,0x00000000,0x00000000},0x2021,1,2999},
- {{0x00000000,0x00000000,0x00000000},0x232a,1,4785},
- {{0x00000000,0x00000000,0x00000000},0x2044,1,3270},
- {{0x00000000,0x00000000,0x00000000},0x221d,1,4272},
- {{0x00000000,0x00000000,0x00000000},0x0652,1,1645},
- {{0x00000000,0x00000000,0x00000000},0x24ea,1,5417},
- {{0x00000000,0x00000000,0x00000000},0x2299,1,4614},
- {{0x00000000,0x00000000,0x00000000},0x221e,1,4284},
- {{0x00000000,0x00000000,0x00000000},0x229a,1,4617},
- {{0x00000000,0x00000000,0x00000000},0x309c,1,6709},
- {{0x00000000,0x00000000,0x00000000},0x3007,1,6423},
- {{0x00000000,0x00000000,0x00000000},0x0660,1,1648},
- {{0x00000000,0x00000000,0x00000000},0x25d0,1,5969},
- {{0x00000000,0x00000000,0x00000000},0x25cb,1,5954},
- {{0x00000000,0x00000000,0x00000000},0x25cf,1,5954},
- {{0x00000000,0x00000000,0x00000000},0x25ce,1,5966},
- {{0x00000000,0x00000000,0x00000000},0x25d1,1,5972},
- {{0x00000000,0x00000000,0x00000000},0x2070,1,3273},
- {{0x00000000,0x00000000,0x00000000},0x2080,1,3273},
- {{0x00000000,0x00000000,0x00000000},0x263a,1,6100},
- {{0x00000000,0x00000000,0x00000000},0x263b,1,6100},
- {{0x00000000,0x00000000,0x00000000},0x02cb,1,519},
- {{0x00000000,0x00000000,0x00000000},0x2035,1,3178},
- {{0x00000000,0x00000000,0x00000000},0x2032,1,3141},
- {{0x00000000,0x00000000,0x00000000},0x0650,1,1626},
- {{0x00000000,0x00000000,0x00000000},0x02c9,1,516},
- {{0x00000000,0x00000000,0x00000000},0x2460,1,4887},
- {{0x00000000,0x00000000,0x00000000},0x2488,1,5138},
- {{0x00000000,0x00000000,0x00000000},0x2469,1,4923},
- {{0x00000000,0x00000000,0x00000000},0x2491,1,5165},
- {{0x00000000,0x00000000,0x00000000},0x2182,1,3850},
- {{0x00000000,0x00000000,0x00000000},0x216f,1,3790},
- {{0x00000000,0x00000000,0x00000000},0x217f,1,3790},
- {{0x00000000,0x00000000,0x00000000},0x2180,1,3809},
- {{0x00000000,0x00000000,0x00000000},0x216d,1,3758},
- {{0x00000000,0x00000000,0x00000000},0x217d,1,3758},
- {{0x00000000,0x00000000,0x00000000},0x3229,1,6929},
- {{0x00000000,0x00000000,0x00000000},0x246a,1,4928},
- {{0x00000000,0x00000000,0x00000000},0x2492,1,5169},
- {{0x00000000,0x00000000,0x00000000},0x246b,1,4933},
- {{0x00000000,0x00000000,0x00000000},0x2493,1,5173},
- {{0x00000000,0x00000000,0x00000000},0x2153,1,3534},
- {{0x00000000,0x00000000,0x00000000},0x246c,1,4947},
- {{0x00000000,0x00000000,0x00000000},0x2494,1,5177},
- {{0x00000000,0x00000000,0x00000000},0x246d,1,4961},
- {{0x00000000,0x00000000,0x00000000},0x2495,1,5181},
- {{0x00000000,0x00000000,0x00000000},0x2155,1,3557},
- {{0x00000000,0x00000000,0x00000000},0x246e,1,4974},
- {{0x00000000,0x00000000,0x00000000},0x2496,1,5185},
- {{0x00000000,0x00000000,0x00000000},0x2159,1,3611},
- {{0x00000000,0x00000000,0x00000000},0x246f,1,4987},
- {{0x00000000,0x00000000,0x00000000},0x2497,1,5189},
- {{0x00000000,0x00000000,0x00000000},0x2470,1,5002},
- {{0x00000000,0x00000000,0x00000000},0x2498,1,5193},
- {{0x00000000,0x00000000,0x00000000},0x215b,1,3636},
- {{0x00000000,0x00000000,0x00000000},0x2471,1,5016},
- {{0x00000000,0x00000000,0x00000000},0x2499,1,5197},
- {{0x00000000,0x00000000,0x00000000},0x2472,1,5030},
- {{0x00000000,0x00000000,0x00000000},0x249a,1,5201},
- {{0x00000000,0x00000000,0x00000000},0x02c6,1,501},
- {{0x00000000,0x00000000,0x00000000},0x02dc,1,534},
- {{0x00000000,0x00000000,0x00000000},0x0661,1,1651},
- {{0x00000000,0x00000000,0x00000000},0x3220,1,6902},
- {{0x00000000,0x00000000,0x00000000},0x200a,1,2883},
- {{0x00000000,0x00000000,0x00000000},0x2440,1,2883},
- {{0x00000000,0x00000000,0x00000000},0x2446,1,4840},
- {{0x00000000,0x00000000,0x00000000},0x2003,1,2822},
- {{0x00000000,0x00000000,0x00000000},0x2002,1,2819},
- {{0x00000000,0x00000000,0x00000000},0x2160,1,3689},
- {{0x00000000,0x00000000,0x00000000},0x2170,1,3689},
- {{0x00000000,0x00000000,0x00000000},0x2081,0,2739},
- {{0x00000000,0x00000000,0x00000000},0x2009,1,2875},
- {{0x00000000,0x00000000,0x00000000},0x2036,1,3181},
- {{0x00000000,0x00000000,0x00000000},0x2033,1,3144},
- {{0x00000000,0x00000000,0x00000000},0x2461,1,4891},
- {{0x00000000,0x00000000,0x00000000},0x2489,1,5141},
- {{0x00000000,0x00000000,0x00000000},0x2473,1,5042},
- {{0x00000000,0x00000000,0x00000000},0x249b,1,5205},
- {{0x00000000,0x00000000,0x00000000},0x2154,1,3548},
- {{0x00000000,0x00000000,0x00000000},0x2156,1,3571},
- {{0x00000000,0x00000000,0x00000000},0x0662,1,1654},
- {{0x00000000,0x00000000,0x00000000},0x3221,1,6905},
- {{0x00000000,0x00000000,0x00000000},0x2442,1,4807},
- {{0x00000000,0x00000000,0x00000000},0x2447,1,4856},
- {{0x00000000,0x00000000,0x00000000},0x2161,1,3692},
- {{0x00000000,0x00000000,0x00000000},0x2171,1,3692},
- {{0x00000000,0x00000000,0x00000000},0x2082,0,2704},
- {{0x00000000,0x00000000,0x00000000},0x2506,1,5459},
- {{0x00000000,0x00000000,0x00000000},0x2037,1,3206},
- {{0x00000000,0x00000000,0x00000000},0x2034,1,3160},
- {{0x00000000,0x00000000,0x00000000},0x0651,1,1636},
- {{0x00000000,0x00000000,0x00000000},0xfe7d,1,6983},
- {{0x00000000,0x00000000,0x00000000},0x2504,1,5453},
- {{0x00000000,0x00000000,0x00000000},0x2462,1,4895},
- {{0x00000000,0x00000000,0x00000000},0x248a,1,5144},
- {{0x00000000,0x00000000,0x00000000},0x2507,1,5462},
- {{0x00000000,0x00000000,0x00000000},0x2157,1,3587},
- {{0x00000000,0x00000000,0x00000000},0x215c,1,3653},
- {{0x00000000,0x00000000,0x00000000},0x2505,1,5456},
- {{0x00000000,0x00000000,0x00000000},0x0663,1,1657},
- {{0x00000000,0x00000000,0x00000000},0x2023,1,3027},
- {{0x00000000,0x00000000,0x00000000},0x3222,1,6908},
- {{0x00000000,0x00000000,0x00000000},0x2441,1,4799},
- {{0x00000000,0x00000000,0x00000000},0x2448,1,4864},
- {{0x00000000,0x00000000,0x00000000},0x2004,1,2838},
- {{0x00000000,0x00000000,0x00000000},0x2162,1,3695},
- {{0x00000000,0x00000000,0x00000000},0x2172,1,3695},
- {{0x00000000,0x00000000,0x00000000},0x2083,0,2707},
- {{0x00000000,0x00000000,0x00000000},0x250a,1,5486},
- {{0x00000000,0x00000000,0x00000000},0x2508,1,5480},
- {{0x00000000,0x00000000,0x00000000},0x2463,1,4899},
- {{0x00000000,0x00000000,0x00000000},0x248b,1,5147},
- {{0x00000000,0x00000000,0x00000000},0x250b,1,5489},
- {{0x00000000,0x00000000,0x00000000},0x2158,1,3602},
- {{0x00000000,0x00000000,0x00000000},0x2509,1,5483},
- {{0x00000000,0x00000000,0x00000000},0x0664,1,1660},
- {{0x00000000,0x00000000,0x00000000},0x3223,1,6911},
- {{0x00000000,0x00000000,0x00000000},0x2443,1,4810},
- {{0x00000000,0x00000000,0x00000000},0x2449,1,4884},
- {{0x00000000,0x00000000,0x00000000},0x2005,1,2853},
- {{0x00000000,0x00000000,0x00000000},0x2163,1,3698},
- {{0x00000000,0x00000000,0x00000000},0x2173,1,3698},
- {{0x00000000,0x00000000,0x00000000},0x2074,1,3276},
- {{0x00000000,0x00000000,0x00000000},0x2084,1,3276},
- {{0x00000000,0x00000000,0x00000000},0x2464,1,4903},
- {{0x00000000,0x00000000,0x00000000},0x248c,1,5150},
- {{0x00000000,0x00000000,0x00000000},0x2181,1,3831},
- {{0x00000000,0x00000000,0x00000000},0x216e,1,3776},
- {{0x00000000,0x00000000,0x00000000},0x217e,1,3776},
- {{0x00000000,0x00000000,0x00000000},0x216c,1,3746},
- {{0x00000000,0x00000000,0x00000000},0x217c,1,3746},
- {{0x00000000,0x00000000,0x00000000},0x215a,1,3626},
- {{0x00000000,0x00000000,0x00000000},0x215d,1,3669},
- {{0x00000000,0x00000000,0x00000000},0x0665,1,1663},
- {{0x00000000,0x00000000,0x00000000},0x3224,1,6914},
- {{0x00000000,0x00000000,0x00000000},0x2164,1,3701},
- {{0x00000000,0x00000000,0x00000000},0x2174,1,3701},
- {{0x00000000,0x00000000,0x00000000},0x2075,1,3279},
- {{0x00000000,0x00000000,0x00000000},0x2085,1,3279},
- {{0x00000000,0x00000000,0x00000000},0x2465,1,4907},
- {{0x00000000,0x00000000,0x00000000},0x248d,1,5153},
- {{0x00000000,0x00000000,0x00000000},0x0666,1,1666},
- {{0x00000000,0x00000000,0x00000000},0x3225,1,6917},
- {{0x00000000,0x00000000,0x00000000},0x2006,1,2867},
- {{0x00000000,0x00000000,0x00000000},0x2165,1,3704},
- {{0x00000000,0x00000000,0x00000000},0x2175,1,3704},
- {{0x00000000,0x00000000,0x00000000},0x2076,1,3282},
- {{0x00000000,0x00000000,0x00000000},0x2086,1,3282},
- {{0x00000000,0x00000000,0x00000000},0x2466,1,4911},
- {{0x00000000,0x00000000,0x00000000},0x248e,1,5156},
- {{0x00000000,0x00000000,0x00000000},0x215e,1,3686},
- {{0x00000000,0x00000000,0x00000000},0x230a,1,4663},
- {{0x00000000,0x00000000,0x00000000},0x230b,1,4666},
- {{0x00000000,0x00000000,0x00000000},0x0667,1,1669},
- {{0x00000000,0x00000000,0x00000000},0x3226,1,6920},
- {{0x00000000,0x00000000,0x00000000},0x2166,1,3707},
- {{0x00000000,0x00000000,0x00000000},0x2176,1,3707},
- {{0x00000000,0x00000000,0x00000000},0x2077,1,3285},
- {{0x00000000,0x00000000,0x00000000},0x2087,1,3285},
- {{0x00000000,0x00000000,0x00000000},0x2467,1,4915},
- {{0x00000000,0x00000000,0x00000000},0x248f,1,5159},
- {{0x00000000,0x00000000,0x00000000},0x2318,1,4729},
- {{0x00000000,0x00000000,0x00000000},0x0668,1,1672},
- {{0x00000000,0x00000000,0x00000000},0x3227,1,6923},
- {{0x00000000,0x00000000,0x00000000},0x2167,1,3710},
- {{0x00000000,0x00000000,0x00000000},0x2177,1,3710},
- {{0x00000000,0x00000000,0x00000000},0x2078,1,3288},
- {{0x00000000,0x00000000,0x00000000},0x2088,1,3288},
- {{0x00000000,0x00000000,0x00000000},0x201f,1,2986},
- {{0x00000000,0x00000000,0x00000000},0x201b,1,2974},
- {{0x00000000,0x00000000,0x00000000},0x2468,1,4919},
- {{0x00000000,0x00000000,0x00000000},0x2490,1,5162},
- {{0x00000000,0x00000000,0x00000000},0x0669,1,1675},
- {{0x00000000,0x00000000,0x00000000},0x3228,1,6926},
- {{0x00000000,0x00000000,0x00000000},0x2168,1,3713},
- {{0x00000000,0x00000000,0x00000000},0x2178,1,3713},
- {{0x00000000,0x00000000,0x00000000},0x2079,1,3291},
- {{0x00000000,0x00000000,0x00000000},0x2089,1,3291},
- {{0x00000000,0x00000000,0x00000000},0x1fee,1,2784},
- {{0x00000000,0x00000000,0x00000000},0x064b,1,1575},
- {{0x00000000,0x00000000,0x00000000},0x2235,1,4394},
- {{0x00000000,0x00000000,0x00000000},0x22ee,1,4631},
- {{0x00000000,0x00000000,0x00000000},0x201e,1,2983},
- {{0x00000000,0x00000000,0x00000000},0x2237,1,4417},
- {{0x00000000,0x00000000,0x00000000},0x2236,1,4403},
- {{0x00000000,0x00000000,0x00000000},0x2592,1,5720},
- {{0x00000000,0x00000000,0x00000000},0x203b,1,3234},
- {{0x00000000,0x00000000,0x00000000},0x1fdd,1,2737},
- {{0x00000000,0x00000000,0x00000000},0x1fde,1,2740},
- {{0x00000000,0x00000000,0x00000000},0x061b,1,1333},
- {{0x00000000,0x00000000,0x00000000},0x1ffe,1,2816},
- {{0x00000000,0x00000000,0x00000000},0x3006,1,6420},
- {{0x00000000,0x00000000,0x00000000},0x02bb,1,482},
- {{0x00000000,0x00000000,0x00000000},0x2196,1,3925},
- {{0x00000000,0x00000000,0x00000000},0x300e,1,6445},
- {{0x00000000,0x00000000,0x00000000},0x300c,1,6439},
- {{0x00000000,0x00000000,0x00000000},0x226a,1,4540},
- {{0x00000000,0x00000000,0x00000000},0x300a,1,6426},
- {{0x00000000,0x00000000,0x00000000},0x2190,1,3867},
- {{0x00000000,0x00000000,0x00000000},0x2329,1,4782},
- {{0x00000000,0x00000000,0x00000000},0x2199,1,3970},
- {{0x00000000,0x00000000,0x00000000},0x2039,1,3218},
- {{0x00000000,0x00000000,0x00000000},0x2308,1,4651},
- {{0x00000000,0x00000000,0x00000000},0x21d0,1,4018},
- {{0x00000000,0x00000000,0x00000000},0x2194,1,3908},
- {{0x00000000,0x00000000,0x00000000},0x261c,1,6081},
- {{0x00000000,0x00000000,0x00000000},0x042a,1,1084},
- {{0x00000000,0x00000000,0x00000000},0x044a,1,1115},
- {{0x00000000,0x00000000,0x00000000},0x064d,1,1599},
- {{0x00000000,0x00000000,0x00000000},0x2017,1,2920},
- {{0x00000000,0x00000000,0x00000000},0x2261,1,4521},
- {{0x00000000,0x00000000,0x00000000},0x2264,1,4524},
- {{0x00000000,0x00000000,0x00000000},0x21d4,1,4024},
- {{0x00000000,0x00000000,0x00000000},0x21d2,1,4021},
- {{0x00000000,0x00000000,0x00000000},0x224c,1,4482},
- {{0x00000000,0x00000000,0x00000000},0x3013,1,6483},
- {{0x00000000,0x00000000,0x00000000},0x207c,1,3306},
- {{0x00000000,0x00000000,0x00000000},0x208c,1,3306},
- {{0x00000000,0x00000000,0x00000000},0x3012,1,6475},
- {{0x00000000,0x00000000,0x00000000},0x3020,1,6538},
- {{0x00000000,0x00000000,0x00000000},0x300f,1,6448},
- {{0x00000000,0x00000000,0x00000000},0x300d,1,6442},
- {{0x00000000,0x00000000,0x00000000},0x300b,1,6429},
- {{0x00000000,0x00000000,0x00000000},0x203a,1,3221},
- {{0x00000000,0x00000000,0x00000000},0x2309,1,4654},
- {{0x00000000,0x00000000,0x00000000},0x2265,1,4527},
- {{0x00000000,0x00000000,0x00000000},0x261e,1,6084},
- {{0x00000000,0x00000000,0x00000000},0x21c0,1,4015},
- {{0x00000000,0x00000000,0x00000000},0x037e,1,592},
- {{0x00000000,0x00000000,0x00000000},0x1fc0,1,2667},
- {{0x00000000,0x00000000,0x00000000},0x061f,1,1336},
- {{0x00000000,0x00000000,0x00000000},0x1fcf,1,2707},
- {{0x00000000,0x00000000,0x00000000},0x2243,1,4448},
- {{0x00000000,0x00000000,0x00000000},0x223c,1,4420},
- {{0x00000000,0x00000000,0x00000000},0x2248,1,4475},
- {{0x00000000,0x00000000,0x00000000},0x1fc1,1,2670},
- {{0x00000000,0x00000000,0x00000000},0x1fdf,1,2743},
- {{0x00000000,0x00000000,0x00000000},0x2245,1,4465},
- {{0x00000000,0x00000000,0x00000000},0x2593,1,5734},
- {{0x00000000,0x00000000,0x00000000},0x2502,1,5434},
- {{0x00000000,0x00000000,0x00000000},0x253c,1,5601},
- {{0x00000000,0x00000000,0x00000000},0x2524,1,5556},
- {{0x00000000,0x00000000,0x00000000},0x251c,1,5541},
- {{0x00000000,0x00000000,0x00000000},0x2500,1,5421},
- {{0x00000000,0x00000000,0x00000000},0x2534,1,5586},
- {{0x00000000,0x00000000,0x00000000},0x25e2,1,6023},
- {{0x00000000,0x00000000,0x00000000},0x2501,1,5428},
- {{0x00000000,0x00000000,0x00000000},0x2571,1,5649},
- {{0x00000000,0x00000000,0x00000000},0x2518,1,5530},
- {{0x00000000,0x00000000,0x00000000},0x2514,1,5519},
- {{0x00000000,0x00000000,0x00000000},0x266a,1,6206},
- {{0x00000000,0x00000000,0x00000000},0x252c,1,5571},
- {{0x00000000,0x00000000,0x00000000},0x2510,1,5503},
- {{0x00000000,0x00000000,0x00000000},0x250c,1,5495},
- {{0x40000001,0x00000000,0x00000000},0x3042,0,1546},
- {{0x00000001,0x00000020,0x00000000},0x30a2,0,1546},
- {{0x00000201,0x00000000,0x00000000},0x311a,0,1546},
- {{0x00010003,0x00000000,0x00000000},0x0410,0,1546},
- {{0x00010005,0x00000000,0x00000000},0x0430,0,1546},
- {{0x40000005,0x00000000,0x00000000},0x3041,0,1546},
- {{0x00000005,0x00000020,0x00000000},0x30a1,0,1546},
- {{0x00000003,0x00000440,0x00000000},0x0100,0,1546},
- {{0x00000005,0x00000440,0x00000000},0x0101,0,1546},
- {{0x00000803,0x00000040,0x00000000},0x0102,0,1546},
- {{0x00000805,0x00000040,0x00000000},0x0103,0,1546},
- {{0x00000003,0x00000040,0x02000000},0x0104,0,1546},
- {{0x00000005,0x00000040,0x02000000},0x0105,0,1546},
- {{0x00001003,0x00000040,0x00000000},0x01cd,0,1546},
- {{0x00001005,0x00000040,0x00000000},0x01ce,0,1546},
- {{0x00000005,0x00040040,0x00000000},0x249c,0,1546},
- {{0x00004003,0x00000040,0x00000000},0x24b6,0,1546},
- {{0x00004005,0x00000040,0x00000000},0x24d0,0,1546},
- {{0x00040003,0x00000440,0x00000000},0x01de,0,1546},
- {{0x00040005,0x00000440,0x00000000},0x01df,0,1546},
- {{0x04100003,0x00000040,0x00000000},0x0200,0,1546},
- {{0x04100005,0x00000040,0x00000000},0x0201,0,1546},
- {{0x00000803,0x00000040,0x00800000},0x0202,0,1546},
- {{0x00000805,0x00000040,0x00800000},0x0203,0,1546},
- {{0x00000103,0x00000040,0x04000000},0x1e00,0,1546},
- {{0x00000105,0x00000040,0x04000000},0x1e01,0,1546},
- {{0x00080103,0x00000040,0x00000000},0x1ea0,0,1546},
- {{0x00080105,0x00000040,0x00000000},0x1ea1,0,1546},
- {{0x8000000b,0x00000040,0x00000000},0x1ea2,0,1546},
- {{0x8000000d,0x00000040,0x00000000},0x1ea3,0,1546},
- {{0x00008013,0x00000040,0x00000000},0x1ea4,0,1546},
- {{0x00008015,0x00000040,0x00000000},0x1ea5,0,1546},
- {{0x04008003,0x00000040,0x00000000},0x1ea6,0,1546},
- {{0x04008005,0x00000040,0x00000000},0x1ea7,0,1546},
- {{0x00008003,0x02000040,0x00000000},0x1eaa,0,1546},
- {{0x00008005,0x02000040,0x00000000},0x1eab,0,1546},
- {{0x00000813,0x00000040,0x00000000},0x1eae,0,1546},
- {{0x00000815,0x00000040,0x00000000},0x1eaf,0,1546},
- {{0x04000803,0x00000040,0x00000000},0x1eb0,0,1546},
- {{0x04000805,0x00000040,0x00000000},0x1eb1,0,1546},
- {{0x00000803,0x02000040,0x00000000},0x1eb4,0,1546},
- {{0x00000805,0x02000040,0x00000000},0x1eb5,0,1546},
- {{0x0008000b,0x00000440,0x00000000},0x01e0,0,1546},
- {{0x0008000d,0x00000440,0x00000000},0x01e1,0,1546},
- {{0x0000001b,0x00000040,0x04000000},0x01fa,0,1546},
- {{0x0000001d,0x00000040,0x04000000},0x01fb,0,1546},
- {{0x8000800b,0x00000040,0x00000000},0x1ea8,0,1546},
- {{0x8000800d,0x00000040,0x00000000},0x1ea9,0,1546},
- {{0x00088103,0x00000040,0x00000000},0x1eac,0,1546},
- {{0x00088105,0x00000040,0x00000000},0x1ead,0,1546},
- {{0x8000080b,0x00000040,0x00000000},0x1eb2,0,1546},
- {{0x8000080d,0x00000040,0x00000000},0x1eb3,0,1546},
- {{0x00080903,0x00000040,0x00000000},0x1eb6,0,1546},
- {{0x00080905,0x00000040,0x00000000},0x1eb7,0,1546},
- {{0x00000000,0x00000000,0x00000000},0x24b6,1,5313},
- {{0x00000000,0x00000000,0x00000000},0x24d0,1,5313},
- {{0x00000000,0x00000000,0x00000000},0x0200,1,404},
- {{0x00000000,0x00000000,0x00000000},0x0201,1,404},
- {{0x00000000,0x00000000,0x00000000},0x0386,1,611},
- {{0x00000000,0x00000000,0x00000000},0x03ac,1,611},
- {{0x00000000,0x00000000,0x00000000},0x0102,1,3},
- {{0x00000000,0x00000000,0x00000000},0x0103,1,3},
- {{0x00000000,0x00000000,0x00000000},0x1eb0,1,2030},
- {{0x00000000,0x00000000,0x00000000},0x1eb1,1,2030},
- {{0x00000000,0x00000000,0x00000000},0x1eae,1,2026},
- {{0x00000000,0x00000000,0x00000000},0x1eaf,1,2026},
- {{0x00000000,0x00000000,0x00000000},0x1eb6,1,2042},
- {{0x00000000,0x00000000,0x00000000},0x1eb7,1,2042},
- {{0x00000000,0x00000000,0x00000000},0x1eb2,1,2034},
- {{0x00000000,0x00000000,0x00000000},0x1eb3,1,2034},
- {{0x00000000,0x00000000,0x00000000},0x1eb4,1,2038},
- {{0x00000000,0x00000000,0x00000000},0x1eb5,1,2038},
- {{0x00000000,0x00000000,0x00000000},0x0202,1,408},
- {{0x00000000,0x00000000,0x00000000},0x0203,1,408},
- {{0x00000000,0x00000000,0x00000000},0x0391,1,665},
- {{0x00000000,0x00000000,0x00000000},0x03b1,1,665},
- {{0x00000000,0x00000000,0x00000000},0x1f70,1,2421},
- {{0x00000000,0x00000000,0x00000000},0x1fba,1,2421},
- {{0x00000000,0x00000000,0x00000000},0x1fb2,1,2630},
- {{0x00000000,0x00000000,0x00000000},0x1f71,1,2425},
- {{0x00000000,0x00000000,0x00000000},0x1fbb,1,2425},
- {{0x00000000,0x00000000,0x00000000},0x1fb4,1,2639},
- {{0x00000000,0x00000000,0x00000000},0x1fb0,1,2622},
- {{0x00000000,0x00000000,0x00000000},0x1fb8,1,2622},
- {{0x00000000,0x00000000,0x00000000},0x1f00,1,2175},
- {{0x00000000,0x00000000,0x00000000},0x1f08,1,2175},
- {{0x00000000,0x00000000,0x00000000},0x1f02,1,2183},
- {{0x00000000,0x00000000,0x00000000},0x1f0a,1,2183},
- {{0x00000000,0x00000000,0x00000000},0x1f82,1,2487},
- {{0x00000000,0x00000000,0x00000000},0x1f8a,1,2487},
- {{0x00000000,0x00000000,0x00000000},0x1f04,1,2193},
- {{0x00000000,0x00000000,0x00000000},0x1f0c,1,2193},
- {{0x00000000,0x00000000,0x00000000},0x1f84,1,2499},
- {{0x00000000,0x00000000,0x00000000},0x1f8c,1,2499},
- {{0x00000000,0x00000000,0x00000000},0x1f06,1,2203},
- {{0x00000000,0x00000000,0x00000000},0x1f0e,1,2203},
- {{0x00000000,0x00000000,0x00000000},0x1f86,1,2511},
- {{0x00000000,0x00000000,0x00000000},0x1f8e,1,2511},
- {{0x00000000,0x00000000,0x00000000},0x1f80,1,2477},
- {{0x00000000,0x00000000,0x00000000},0x1f88,1,2477},
- {{0x00000000,0x00000000,0x00000000},0x1fb1,1,2626},
- {{0x00000000,0x00000000,0x00000000},0x1fb9,1,2626},
- {{0x00000000,0x00000000,0x00000000},0x1f01,1,2179},
- {{0x00000000,0x00000000,0x00000000},0x1f09,1,2179},
- {{0x00000000,0x00000000,0x00000000},0x1f03,1,2188},
- {{0x00000000,0x00000000,0x00000000},0x1f0b,1,2188},
- {{0x00000000,0x00000000,0x00000000},0x1f83,1,2493},
- {{0x00000000,0x00000000,0x00000000},0x1f8b,1,2493},
- {{0x00000000,0x00000000,0x00000000},0x1f05,1,2198},
- {{0x00000000,0x00000000,0x00000000},0x1f0d,1,2198},
- {{0x00000000,0x00000000,0x00000000},0x1f85,1,2505},
- {{0x00000000,0x00000000,0x00000000},0x1f8d,1,2505},
- {{0x00000000,0x00000000,0x00000000},0x1f07,1,2208},
- {{0x00000000,0x00000000,0x00000000},0x1f0f,1,2208},
- {{0x00000000,0x00000000,0x00000000},0x1f87,1,2517},
- {{0x00000000,0x00000000,0x00000000},0x1f8f,1,2517},
- {{0x00000000,0x00000000,0x00000000},0x1f81,1,2482},
- {{0x00000000,0x00000000,0x00000000},0x1f89,1,2482},
- {{0x00000000,0x00000000,0x00000000},0x1fb6,1,2644},
- {{0x00000000,0x00000000,0x00000000},0x1fb7,1,2648},
- {{0x00000000,0x00000000,0x00000000},0x1fb3,1,2635},
- {{0x00000000,0x00000000,0x00000000},0x1fbc,1,2635},
- {{0x00000000,0x00000000,0x00000000},0x05d0,1,1160},
- {{0x00000000,0x00000000,0x00000000},0x0627,1,1160},
- {{0x00000000,0x00000000,0x00000000},0xfe8d,1,7015},
- {{0x00000000,0x00000000,0x00000000},0xfe8e,1,7019},
- {{0x00000000,0x00000000,0x00000000},0x0100,1,0},
- {{0x00000000,0x00000000,0x00000000},0x0101,1,0},
- {{0x00000000,0x00000000,0x00000000},0x1ea0,1,1998},
- {{0x00000000,0x00000000,0x00000000},0x1ea1,1,1998},
- {{0x00000000,0x00000000,0x00000000},0x1e00,1,1728},
- {{0x00000000,0x00000000,0x00000000},0x1e01,1,1728},
- {{0x00000000,0x00000000,0x00000000},0x01de,1,355},
- {{0x00000000,0x00000000,0x00000000},0x01df,1,355},
- {{0x00000000,0x00000000,0x00000000},0x1ea2,1,2002},
- {{0x00000000,0x00000000,0x00000000},0x1ea3,1,2002},
- {{0x00000000,0x00000000,0x00000000},0x01e2,1,361},
- {{0x00000000,0x00000000,0x00000000},0x01e3,1,361},
- {{0x00000000,0x00000000,0x00000000},0x311a,1,6841},
- {{0x00000000,0x00000000,0x00000000},0x3041,1,6543},
- {{0x00000000,0x00000000,0x00000000},0x3042,1,6543},
- {{0x00000000,0x00000000,0x00000000},0x30a1,1,6735},
- {{0x00000000,0x00000000,0x00000000},0x30a2,1,6735},
- {{0x00000000,0x00000000,0x00000000},0x01e0,1,358},
- {{0x00000000,0x00000000,0x00000000},0x01e1,1,358},
- {{0x00000000,0x00000000,0x00000000},0x0104,1,6},
- {{0x00000000,0x00000000,0x00000000},0x0105,1,6},
- {{0x00000000,0x00000000,0x00000000},0x01cd,1,315},
- {{0x00000000,0x00000000,0x00000000},0x01ce,1,315},
- {{0x00000000,0x00000000,0x00000000},0x0410,1,942},
- {{0x00000000,0x00000000,0x00000000},0x0430,1,942},
- {{0x00000000,0x00000000,0x00000000},0x1ea6,1,2009},
- {{0x00000000,0x00000000,0x00000000},0x1ea7,1,2009},
- {{0x00000000,0x00000000,0x00000000},0x1ea4,1,2005},
- {{0x00000000,0x00000000,0x00000000},0x1ea5,1,2005},
- {{0x00000000,0x00000000,0x00000000},0x1eac,1,2021},
- {{0x00000000,0x00000000,0x00000000},0x1ead,1,2021},
- {{0x00000000,0x00000000,0x00000000},0x1ea8,1,2013},
- {{0x00000000,0x00000000,0x00000000},0x1ea9,1,2013},
- {{0x00000000,0x00000000,0x00000000},0x1eaa,1,2017},
- {{0x00000000,0x00000000,0x00000000},0x1eab,1,2017},
- {{0x00000000,0x00000000,0x00000000},0x01fa,1,392},
- {{0x00000000,0x00000000,0x00000000},0x01fb,1,392},
- {{0x00100010,0x00000000,0x00000000},0x02dd,0,1627},
- {{0x00000003,0x00000440,0x00000000},0x01e2,0,2829},
- {{0x00000005,0x00000440,0x00000000},0x01e3,0,2829},
- {{0x00000013,0x00000040,0x00000000},0x01fc,0,2829},
- {{0x00000015,0x00000040,0x00000000},0x01fd,0,2829},
- {{0x00000000,0x00000000,0x00000000},0x01fc,1,396},
- {{0x00000000,0x00000000,0x00000000},0x01fd,1,396},
- {{0x00000000,0x00000000,0x00000000},0x0623,1,1357},
- {{0x00000000,0x00000000,0x00000000},0x0625,1,1357},
- {{0x00000000,0x00000000,0x00000000},0xfe83,1,6999},
- {{0x00000000,0x00000000,0x00000000},0xfe84,1,7003},
- {{0x00000000,0x00000000,0x00000000},0xfe88,1,7003},
- {{0x00000201,0x00000000,0x00000000},0x311e,1,6854},
- {{0x00000081,0x00000000,0x00000000},0x0639,1,1494},
- {{0x00000081,0x00000010,0x00000000},0xfec9,1,1494},
- {{0x01000081,0x00000000,0x00000000},0xfeca,1,1494},
- {{0x00000081,0x00000004,0x00000000},0xfecb,1,1494},
- {{0x00000081,0x00001000,0x00000000},0xfecc,1,1494},
- {{0x00000000,0x04000000,0x00001000},0x224c,1,4478},
- {{0x00000000,0x04000000,0x00001000},0x2248,1,4468},
- {{0x00000000,0x00000000,0x00000000},0x0622,1,1354},
- {{0x00000000,0x00000000,0x00000080},0x33c2,1,1354},
- {{0x00000000,0x00000000,0x00000000},0xfe81,1,6991},
- {{0x00000000,0x00000000,0x00000000},0xfe82,1,6995},
- {{0x00000000,0x00000000,0x00040001},0x2447,1,4843},
- {{0x00000000,0x00000000,0x00000000},0x2227,1,4316},
- {{0x00000201,0x00000000,0x00000000},0x3122,1,4316},
- {{0x00000201,0x00000000,0x00000000},0x3124,1,6866},
- {{0x00000000,0x00000000,0x00000000},0x2220,1,4287},
- {{0x00000000,0x00400000,0x00000000},0x221f,1,4287},
- {{0x00100000,0x00000080,0x00020000},0x300a,1,4287},
- {{0x00100000,0x00400000,0x00020000},0x300b,1,4287},
- {{0x00000001,0x00000000,0x00000000},0x212b,1,3495},
- {{0x08000000,0x00000000,0x00000000},0x0387,1,614},
- {{0x00000000,0x00000000,0x00000000},0x212b,1,3504},
- {{0x00000000,0x04000000,0x00001000},0x2245,1,4451},
- {{0x00000000,0x00000000,0x00000000},0x2169,1,3720},
- {{0x00000000,0x00000000,0x00000000},0x2179,1,3720},
- {{0x00000000,0x00000000,0x00000000},0x2312,1,4685},
- {{0x00000000,0x00000000,0x00000000},0x0670,1,1681},
- {{0x00000000,0x00000000,0x00000000},0x2217,1,4202},
- {{0x00000000,0x04000000,0x00001000},0x2243,1,4433},
- {{0x00000201,0x00000000,0x00000000},0x3120,1,6860},
- {{0x20000001,0x00000000,0x00000000},0x05e2,1,1280},
- {{0x00000201,0x00000000,0x00000000},0x3105,0,1548},
- {{0x00000005,0x00000040,0x10000000},0x0180,0,1548},
- {{0x80000003,0x00000040,0x00000000},0x0181,0,1548},
- {{0x00000005,0x00040040,0x00000000},0x249d,0,1548},
- {{0x00004003,0x00000040,0x00000000},0x24b7,0,1548},
- {{0x00004005,0x00000040,0x00000000},0x24d1,0,1548},
- {{0x0008000b,0x00000040,0x00000000},0x1e02,0,1548},
- {{0x0008000d,0x00000040,0x00000000},0x1e03,0,1548},
- {{0x00080103,0x00000040,0x00000000},0x1e04,0,1548},
- {{0x00080105,0x00000040,0x00000000},0x1e05,0,1548},
- {{0x00000103,0x00000240,0x00000000},0x1e06,0,1548},
- {{0x00000105,0x00000240,0x00000000},0x1e07,0,1548},
- {{0x00000000,0x00000000,0x00000000},0x24b7,1,5317},
- {{0x00000000,0x00000000,0x00000000},0x24d1,1,5317},
- {{0x00000000,0x00000000,0x00000000},0x0392,1,673},
- {{0x00000000,0x00000000,0x00000000},0x03b2,1,673},
- {{0x00000000,0x00000000,0x00000000},0x05d1,1,1167},
- {{0x00000000,0x00000000,0x00000000},0x0628,1,1167},
- {{0x00000000,0x00000000,0x00000000},0xfe91,1,7031},
- {{0x00000000,0x00000000,0x00000000},0xfe8f,1,7023},
- {{0x00000000,0x00000000,0x00000000},0xfe90,1,7027},
- {{0x00000000,0x00000000,0x00000000},0xfe92,1,7035},
- {{0x00000000,0x00000000,0x00000000},0x1e04,1,1735},
- {{0x00000000,0x00000000,0x00000000},0x1e05,1,1735},
- {{0x00000000,0x00000000,0x00000000},0x1e02,1,1732},
- {{0x00000000,0x00000000,0x00000000},0x1e03,1,1732},
- {{0x00000000,0x00000000,0x00000000},0x0180,1,245},
- {{0x00000000,0x00000000,0x00000000},0x0181,1,248},
- {{0x00000000,0x00000000,0x00000000},0x03d0,1,833},
- {{0x00000000,0x00000000,0x00000000},0x3105,1,6790},
- {{0x00000000,0x00000000,0x00000000},0x0411,1,948},
- {{0x00000000,0x00000000,0x00000000},0x0431,1,948},
- {{0x00000000,0x00000000,0x00000000},0x1e06,1,1739},
- {{0x00000000,0x00000000,0x00000000},0x1e07,1,1739},
- {{0x40000001,0x00000000,0x00000000},0x3070,1,6618},
- {{0x00000001,0x00000020,0x00000000},0x30d0,1,6618},
- {{0x00000000,0x00000000,0x00000000},0x2717,1,6312},
- {{0x00000000,0x00000001,0x00000000},0x2015,0,1674},
- {{0x00200001,0x08000000,0x00002000},0x21a8,1,3974},
- {{0x00000000,0x00000000,0x00000000},0x2572,1,5653},
- {{0x00000000,0x00000000,0x00000000},0x25e3,1,5653},
- {{0x40000001,0x00000000,0x00000000},0x3079,1,945},
- {{0x00000001,0x00000020,0x00000000},0x30d9,1,945},
- {{0x00010003,0x00000000,0x00000000},0x0411,1,945},
- {{0x00010005,0x00000000,0x00000000},0x0431,1,945},
- {{0x00000000,0x00000000,0x00000000},0x266b,1,6210},
- {{0x00000000,0x00000000,0x00000000},0x266c,1,6233},
- {{0x00000000,0x00000000,0x00000000},0x2235,1,4386},
- {{0x00000081,0x00000000,0x00000000},0x0628,1,1386},
- {{0x00000081,0x00000010,0x00000000},0xfe8f,1,1386},
- {{0x01000081,0x00000000,0x00000000},0xfe90,1,1386},
- {{0x00000081,0x00000004,0x00000000},0xfe91,1,1386},
- {{0x00000081,0x00001000,0x00000000},0xfe92,1,1386},
- {{0x20000001,0x00000000,0x00000000},0x05d1,1,1163},
- {{0x08000003,0x00000000,0x00000000},0x0392,1,668},
- {{0x08000005,0x00000000,0x00000000},0x03b2,1,668},
- {{0x08000000,0x00000000,0x00000000},0x03d0,1,821},
- {{0x40000001,0x00000000,0x00000000},0x3073,1,6621},
- {{0x00000001,0x00000020,0x00000000},0x30d3,1,6621},
- {{0x02000000,0x00000000,0x00000000},0x2588,1,5686},
- {{0x00000000,0x00000080,0x00080000},0x258c,1,5686},
- {{0x00000000,0x00400000,0x00080000},0x2590,1,5686},
- {{0x40000001,0x00000000,0x00000000},0x307c,1,6630},
- {{0x00000001,0x00000020,0x00000000},0x30dc,1,6630},
- {{0x00000000,0x00000000,0x00080000},0x2321,1,4748},
- {{0x00000000,0x00000000,0x00000000},0x216a,1,3730},
- {{0x00000000,0x00000000,0x00000000},0x217a,1,3730},
- {{0x00000000,0x00000000,0x00040000},0x2446,1,4813},
- {{0x40000001,0x00000000,0x00000000},0x3076,1,6627},
- {{0x00000001,0x00000020,0x00000000},0x30d6,1,6627},
- {{0x00000000,0x00000000,0x00000000},0x2022,1,3002},
- {{0x00000000,0x00000000,0x00000000},0x2219,1,4235},
- {{0x00000000,0x00000000,0x00000000},0x25ce,1,5957},
- {{0x00000201,0x00000000,0x00000000},0x3118,0,1550},
- {{0x00000013,0x00000040,0x00000000},0x0106,0,1550},
- {{0x00000015,0x00000040,0x00000000},0x0107,0,1550},
- {{0x00008003,0x00000040,0x00000000},0x0108,0,1550},
- {{0x00008005,0x00000040,0x00000000},0x0109,0,1550},
- {{0x00001003,0x00000040,0x00000000},0x010c,0,1550},
- {{0x00001005,0x00000040,0x00000000},0x010d,0,1550},
- {{0x80000003,0x00000040,0x00000000},0x0187,0,1550},
- {{0x80000005,0x00000040,0x00000000},0x0188,0,1550},
- {{0x00000005,0x00040040,0x00000000},0x249e,0,1550},
- {{0x00004003,0x00000040,0x00000000},0x24b8,0,1550},
- {{0x00004005,0x00000040,0x00000000},0x24d2,0,1550},
- {{0x0008000b,0x00000040,0x00000000},0x010a,0,1550},
- {{0x0008000d,0x00000040,0x00000000},0x010b,0,1550},
- {{0x00002013,0x00000040,0x00000000},0x1e08,0,1550},
- {{0x00002015,0x00000040,0x00000000},0x1e09,0,1550},
- {{0x00000000,0x00000000,0x00000000},0x24b8,1,5321},
- {{0x00000000,0x00000000,0x00000000},0x24d2,1,5321},
- {{0x00000000,0x00000000,0x00000000},0x0427,1,1063},
- {{0x00000000,0x00000000,0x00000000},0x0447,1,1063},
- {{0x00000000,0x00000000,0x00000000},0x0106,1,9},
- {{0x00000000,0x00000000,0x00000000},0x0107,1,9},
- {{0x00000000,0x00000000,0x00000000},0x039e,1,750},
- {{0x00000000,0x00000000,0x00000000},0x03be,1,750},
- {{0x00000000,0x00000000,0x00000000},0x0635,1,1473},
- {{0x00000000,0x00000000,0x00000000},0xfebb,1,7199},
- {{0x00000000,0x00000000,0x00000000},0xfeb9,1,7191},
- {{0x00000000,0x00000000,0x00000000},0xfeba,1,7195},
- {{0x00000000,0x00000000,0x00000000},0xfebc,1,7203},
- {{0x00000000,0x00000000,0x00000000},0x1e08,1,1742},
- {{0x00000000,0x00000000,0x00000000},0x1e09,1,1742},
- {{0x00000000,0x00000000,0x00000000},0x010a,1,15},
- {{0x00000000,0x00000000,0x00000000},0x010b,1,15},
- {{0x00000000,0x00000000,0x00000000},0x0187,1,251},
- {{0x00000000,0x00000000,0x00000000},0x0188,1,251},
- {{0x00000000,0x00000000,0x00000000},0x0480,1,1154},
- {{0x00000000,0x00000000,0x00000000},0x0481,1,1154},
- {{0x00000000,0x00000000,0x00000000},0x3118,1,6835},
- {{0x00000000,0x00000000,0x00000000},0x010c,1,18},
- {{0x00000000,0x00000000,0x00000000},0x010d,1,18},
- {{0x00000000,0x00000000,0x00000000},0x0426,1,1056},
- {{0x00000000,0x00000000,0x00000000},0x0446,1,1056},
- {{0x00000000,0x00000000,0x00000000},0x0108,1,12},
- {{0x00000000,0x00000000,0x00000000},0x0109,1,12},
- {{0x00000000,0x00000000,0x00000000},0x2038,1,3215},
- {{0x00000000,0x00000000,0x00000001},0x2105,1,3388},
- {{0x00000000,0x00000000,0x00000000},0x2038,1,3209},
- {{0x00000000,0x00000000,0x00000000},0x2663,0,2180},
- {{0x00000000,0x00000000,0x00000000},0x2667,1,6171},
- {{0x00000000,0x00000000,0x00000000},0x2662,1,6151},
- {{0x00000000,0x00000000,0x00000000},0x2666,1,6167},
- {{0x00000000,0x00000080,0x00000000},0x2308,1,4643},
- {{0x00000000,0x00400000,0x00000000},0x2309,1,4643},
- {{0x00000000,0x00000000,0x00000000},0x223e,1,4430},
- {{0x00000000,0x00000000,0x00000000},0x2661,1,6148},
- {{0x00000201,0x00000000,0x00000000},0x3114,1,6148},
- {{0x00000000,0x00000000,0x00000000},0x2665,1,6163},
- {{0x00000000,0x00000000,0x00040000},0x2441,1,4793},
- {{0x00010003,0x00000000,0x00000000},0x0427,1,1059},
- {{0x00010005,0x00000000,0x00000000},0x0447,1,1059},
- {{0x00000000,0x00000800,0x00000000},0x2713,1,6303},
- {{0x08000003,0x00000000,0x00000000},0x03a7,1,792},
- {{0x08000005,0x00000000,0x00000000},0x03c7,1,792},
- {{0x00000000,0x00000000,0x00000000},0x25ef,0,2362},
- {{0x00000000,0x80000000,0x00000000},0x25cb,1,5947},
- {{0x00000000,0x00000000,0x00000004},0x25cf,1,5947},
- {{0x00000001,0x00000080,0x00080004},0x25d0,1,5947},
- {{0x00000001,0x00400000,0x00080004},0x25d1,1,5947},
- {{0x00000000,0x00000800,0x00000800},0x3006,1,6412},
- {{0x00000000,0x00000000,0x00008004},0x2663,1,6154},
- {{0x00000000,0x80000000,0x00008000},0x2667,1,6154},
- {{0x00000000,0x00000000,0x00000000},0x2105,0,2577},
- {{0x04000000,0x00000000,0x00000000},0x0300,1,540},
- {{0x00000010,0x00000000,0x00000000},0x0301,1,540},
- {{0x00000008,0x00400000,0x00000000},0x20d1,1,3352},
- {{0x00000080,0x00000000,0x00000000},0x060c,0,1388},
- {{0x00000000,0x00000000,0x00000800},0x3001,0,1388},
- {{0x00000004,0x80000000,0x00000084},0x25a3,1,5759},
- {{0x00000000,0x00000000,0x00000000},0x220b,1,4115},
- {{0x00000000,0x00000000,0x00000000},0x222e,1,4356},
- {{0x00000000,0x00000080,0x00020000},0x300c,1,6432},
- {{0x00000000,0x00400000,0x00020000},0x300d,1,6432},
- {{0x00000000,0x80000080,0x00020000},0x300e,1,6432},
- {{0x00000000,0x80400000,0x00020000},0x300f,1,6432},
- {{0x00000000,0x00000000,0x00000000},0x216b,0,902},
- {{0x00000000,0x00000000,0x00000000},0x217b,0,902},
- {{0x00000000,0x00000000,0x00000000},0x2660,1,6139},
- {{0x00000000,0x00000000,0x00000000},0x2664,1,6159},
- {{0x00000000,0x00002000,0x00040000},0x2449,1,4867},
- {{0x00000201,0x00000000,0x00000000},0x3109,0,1552},
- {{0x00001003,0x00000040,0x00000000},0x010e,0,1552},
- {{0x00001005,0x00000040,0x00000000},0x010f,0,1552},
- {{0x00000003,0x00000040,0x10000000},0x0110,0,1552},
- {{0x00000005,0x00000040,0x10000000},0x0111,0,1552},
- {{0x00002003,0x00000040,0x00000000},0x1e10,0,1552},
- {{0x00002005,0x00000040,0x00000000},0x1e11,0,1552},
- {{0x00000005,0x00040040,0x00000000},0x249f,0,1552},
- {{0x00004003,0x00000040,0x00000000},0x24b9,0,1552},
- {{0x00004005,0x00000040,0x00000000},0x24d3,0,1552},
- {{0x0008000b,0x00000040,0x00000000},0x1e0a,0,1552},
- {{0x0008000d,0x00000040,0x00000000},0x1e0b,0,1552},
- {{0x00080103,0x00000040,0x00000000},0x1e0c,0,1552},
- {{0x00080105,0x00000040,0x00000000},0x1e0d,0,1552},
- {{0x00000103,0x00000240,0x00000000},0x1e0e,0,1552},
- {{0x00000105,0x00000240,0x00000000},0x1e0f,0,1552},
- {{0x00008103,0x00000040,0x00000000},0x1e12,0,1552},
- {{0x00008105,0x00000040,0x00000000},0x1e13,0,1552},
- {{0x00000000,0x00000000,0x00000000},0x24b9,1,5325},
- {{0x00000000,0x00000000,0x00000000},0x24d3,1,5325},
- {{0x00000007,0x00000040,0x00000000},0x01f2,1,289},
- {{0x00001007,0x00000040,0x00000000},0x01c5,1,289},
- {{0x00000000,0x00000000,0x00000000},0x0402,1,882},
- {{0x00000000,0x00000000,0x00000000},0x0452,1,882},
- {{0x00000000,0x00000000,0x00000000},0x0394,1,691},
- {{0x00000000,0x00000000,0x00000000},0x03b4,1,691},
- {{0x00000000,0x00000000,0x00000000},0x05d3,1,1185},
- {{0x00000000,0x00000000,0x00000000},0x062f,1,1185},
- {{0x00000000,0x00000000,0x00000000},0xfea9,1,7127},
- {{0x00000000,0x00000000,0x00000000},0xfeaa,1,7131},
- {{0x00000000,0x00000000,0x00000000},0x1e10,1,1756},
- {{0x00000000,0x00000000,0x00000000},0x1e11,1,1756},
- {{0x00000000,0x00000000,0x00000000},0x1e0c,1,1749},
- {{0x00000000,0x00000000,0x00000000},0x1e0d,1,1749},
- {{0x00000000,0x00000000,0x00000000},0x1e12,1,1759},
- {{0x00000000,0x00000000,0x00000000},0x1e13,1,1759},
- {{0x00000000,0x00000000,0x00000000},0x1e0a,1,1746},
- {{0x00000000,0x00000000,0x00000000},0x1e0b,1,1746},
- {{0x00000000,0x00000000,0x00000000},0x0110,1,24},
- {{0x00000000,0x00000000,0x00000000},0x0111,1,24},
- {{0x00000000,0x00000000,0x00000000},0x3109,0,1050},
- {{0x00000000,0x00000000,0x00000000},0x010e,1,21},
- {{0x00000000,0x00000000,0x00000000},0x010f,1,21},
- {{0x00000000,0x00000000,0x00000000},0x0414,1,967},
- {{0x00000000,0x00000000,0x00000000},0x0434,1,967},
- {{0x00000000,0x00000000,0x00000000},0x1e0e,1,1753},
- {{0x00000000,0x00000000,0x00000000},0x1e0f,1,1753},
- {{0x40000001,0x00000000,0x00000000},0x3060,1,6600},
- {{0x00000001,0x00000020,0x00000000},0x30c0,1,6600},
- {{0x00000081,0x00000000,0x00000000},0x0636,1,1476},
- {{0x00000081,0x00000010,0x00000000},0xfebd,1,1476},
- {{0x01000081,0x00000000,0x00000000},0xfebe,1,1476},
- {{0x00000081,0x00000004,0x00000000},0xfebf,1,1476},
- {{0x00000081,0x00001000,0x00000000},0xfec0,1,1476},
- {{0x00000000,0x00000000,0x00000000},0x2020,1,2989},
- {{0x00100000,0x00000000,0x00000000},0x2021,1,2989},
- {{0x00000081,0x00000000,0x00000000},0x062f,1,1434},
- {{0x00000081,0x00000010,0x00000000},0xfea9,1,1434},
- {{0x01000081,0x00000000,0x00000000},0xfeaa,1,1434},
- {{0x20000001,0x00000000,0x00000000},0x05d3,1,1179},
- {{0x00000080,0x00000000,0x00000000},0x064f,1,1611},
- {{0x00000080,0x00000000,0x00000000},0x064c,1,1578},
- {{0x00000000,0x00000000,0x00000000},0x2593,1,5723},
- {{0x00000000,0x00000000,0x00040000},0x2448,1,4859},
- {{0x00000000,0x00000000,0x00000000},0x25c6,1,5930},
- {{0x00000000,0x00000000,0x00000000},0x0636,1,1480},
- {{0x00000000,0x00000000,0x00000000},0xfebf,1,7215},
- {{0x00000000,0x00000000,0x00000000},0xfebd,1,7207},
- {{0x00000000,0x00000000,0x00000000},0xfebe,1,7211},
- {{0x00000000,0x00000000,0x00000000},0xfec0,1,7219},
- {{0x00000000,0x00000000,0x00000000},0x2206,1,964},
- {{0x40000001,0x00000000,0x00000000},0x3067,1,964},
- {{0x00000001,0x00000020,0x00000000},0x30c7,1,964},
- {{0x00010003,0x00000000,0x00000000},0x0414,1,964},
- {{0x00010005,0x00000000,0x00000000},0x0434,1,964},
- {{0x00000000,0x00000000,0x00000000},0x2103,1,3373},
- {{0x00000000,0x00000000,0x00000000},0x2109,1,3393},
- {{0x08000003,0x00000000,0x00000000},0x0394,1,685},
- {{0x08000005,0x00000000,0x00000000},0x03b4,1,685},
- {{0x00000000,0x00000000,0x00000000},0x252c,1,5568},
- {{0x00000000,0x00000000,0x00000000},0x2564,1,5568},
- {{0x00000000,0x00000000,0x00000000},0x2565,1,5568},
- {{0x00000000,0x00000000,0x00000000},0x2566,1,5568},
- {{0x00000000,0x00000000,0x00000000},0x252f,1,5579},
- {{0x00000000,0x00000000,0x00000000},0x2530,1,5579},
- {{0x00000000,0x00000000,0x00000000},0x2533,1,5579},
- {{0x00000000,0x00000000,0x00000000},0x222c,1,4353},
- {{0x40000001,0x00000000,0x00000000},0x3062,1,4353},
- {{0x00000001,0x00000020,0x00000000},0x30c2,1,4353},
- {{0x00000001,0x00000000,0x00000080},0x25a9,1,5837},
- {{0x00400400,0x04400180,0x00000000},0x2571,1,5625},
- {{0x00400400,0x04400180,0x00000000},0x2572,1,5625},
- {{0x08000000,0x00000000,0x20000000},0x0385,1,598},
- {{0x08000001,0x00080000,0x00000000},0x1fc1,1,598},
- {{0x08000001,0x20000000,0x00000000},0x1fed,1,598},
- {{0x08000001,0x00020000,0x00000000},0x1fee,1,598},
- {{0x08000003,0x00000008,0x00000000},0x03aa,1,598},
- {{0x08000003,0x10000000,0x00000000},0x03ab,1,598},
- {{0x08000005,0x00000008,0x00000000},0x03ca,1,598},
- {{0x08000005,0x10000000,0x00000000},0x03cb,1,598},
- {{0x08000005,0x00000008,0x20000000},0x0390,1,598},
- {{0x08000005,0x10000000,0x20000000},0x03b0,1,598},
- {{0x08000005,0x20000008,0x00000000},0x1fd2,1,598},
- {{0x08000005,0x00020008,0x00000000},0x1fd3,1,598},
- {{0x08000005,0x00080008,0x00000000},0x1fd7,1,598},
- {{0x08000005,0x30000000,0x00000000},0x1fe2,1,598},
- {{0x08000005,0x10020000,0x00000000},0x1fe3,1,598},
- {{0x08000005,0x10080000,0x00000000},0x1fe7,1,598},
- {{0x00000000,0x00000000,0x00000004},0x25c6,1,5922},
- {{0x00000000,0x80000000,0x00000000},0x25c7,1,5922},
- {{0x00000000,0x80000000,0x00008000},0x2662,1,5922},
- {{0x00000000,0x00000000,0x00008004},0x2666,1,5922},
- {{0x08000001,0x00000000,0x00000000},0x03dc,1,846},
- {{0x00000000,0x00000800,0x00000000},0x3003,1,6350},
- {{0x00010003,0x00000000,0x00000000},0x0402,1,878},
- {{0x00010005,0x00000000,0x00000000},0x0452,1,878},
- {{0x00000000,0x00000000,0x00000000},0x0630,1,1443},
- {{0x00000000,0x00000000,0x00000000},0xfeab,1,7135},
- {{0x00000000,0x00000000,0x00000000},0xfeac,1,7139},
- {{0x00000000,0x00000000,0x00000000},0x2510,0,947},
- {{0x00000000,0x00000000,0x00000000},0x2555,0,947},
- {{0x00000000,0x00000000,0x00000000},0x2556,0,947},
- {{0x00000000,0x00000000,0x00000000},0x2511,1,5508},
- {{0x00000000,0x00000000,0x00000000},0x2512,1,5508},
- {{0x00000000,0x00000000,0x00000000},0x252d,1,5575},
- {{0x00000000,0x00000000,0x00000000},0x252e,1,5575},
- {{0x00000000,0x00000000,0x00000000},0x2531,1,5575},
- {{0x00000000,0x00000000,0x00000000},0x2532,1,5575},
- {{0x40000001,0x00000000,0x00000000},0x3069,0,1327},
- {{0x00000001,0x00000020,0x00000000},0x30c9,0,1327},
- {{0x00000005,0x00000040,0x00000000},0x0131,1,75},
- {{0x00000000,0x00000000,0x00002000},0x2193,1,3895},
- {{0x00000000,0x00000000,0x00000000},0x2202,1,4059},
- {{0x00000000,0x00000000,0x00000000},0x250c,1,5492},
- {{0x00000000,0x00000000,0x00000000},0x2552,1,5492},
- {{0x00000000,0x00000000,0x00000000},0x2553,1,5492},
- {{0x00000000,0x00000000,0x00000000},0x2554,1,5492},
- {{0x00000000,0x00000000,0x00000000},0x250d,1,5499},
- {{0x00000000,0x00000000,0x00000000},0x250e,1,5499},
- {{0x00000000,0x00000000,0x00000000},0x250f,1,5499},
- {{0x00000000,0x00000000,0x00000000},0x0405,1,899},
- {{0x00000000,0x00000000,0x00000000},0x0455,1,899},
- {{0x00000000,0x00000000,0x00000000},0x25bc,0,1696},
- {{0x00000000,0x00000000,0x00000000},0x25bd,0,1696},
- {{0x40000001,0x00000000,0x00000000},0x3065,1,6609},
- {{0x00000001,0x00000020,0x00000000},0x30c5,1,6609},
- {{0x00000000,0x00000000,0x00000000},0x25c7,1,5933},
- {{0x00000000,0x00000000,0x00000000},0x040f,1,282},
- {{0x00000000,0x00000000,0x00000000},0x045f,1,282},
- {{0x00000003,0x00000040,0x00000000},0x01f1,1,282},
- {{0x00000005,0x00000040,0x00000000},0x01f3,1,282},
- {{0x00001003,0x00000040,0x00000000},0x01c4,1,282},
- {{0x00001005,0x00000040,0x00000000},0x01c6,1,282},
- {{0x00000000,0x00000000,0x00000000},0x01f1,1,385},
- {{0x00000000,0x00000000,0x00000000},0x01f2,1,385},
- {{0x00000000,0x00000000,0x00000000},0x01f3,1,385},
- {{0x00000000,0x00000000,0x00000000},0x01c4,1,285},
- {{0x00000000,0x00000000,0x00000000},0x01c5,1,285},
- {{0x00000000,0x00000000,0x00000000},0x01c6,1,285},
- {{0x00010003,0x00000000,0x00000000},0x0405,1,895},
- {{0x00010005,0x00000000,0x00000000},0x0455,1,895},
- {{0x00010003,0x00000000,0x00000000},0x040f,1,937},
- {{0x00010005,0x00000000,0x00000000},0x045f,1,937},
- {{0x40000001,0x00000000,0x00000000},0x3048,0,1554},
- {{0x00000001,0x00000020,0x00000000},0x30a8,0,1554},
- {{0x00000201,0x00000000,0x00000000},0x311c,0,1554},
- {{0x00010003,0x00000000,0x00000000},0x042d,0,1554},
- {{0x00010005,0x00000000,0x00000000},0x044d,0,1554},
- {{0x40000005,0x00000000,0x00000000},0x3047,0,1554},
- {{0x00000005,0x00000020,0x00000000},0x30a7,0,1554},
- {{0x00000003,0x00000440,0x00000000},0x0112,0,1554},
- {{0x00000005,0x00000440,0x00000000},0x0113,0,1554},
- {{0x00000803,0x00000040,0x00000000},0x0114,0,1554},
- {{0x00000805,0x00000040,0x00000000},0x0115,0,1554},
- {{0x00000003,0x00000040,0x02000000},0x0118,0,1554},
- {{0x00000005,0x00000040,0x02000000},0x0119,0,1554},
- {{0x00001003,0x00000040,0x00000000},0x011a,0,1554},
- {{0x00001005,0x00000040,0x00000000},0x011b,0,1554},
- {{0x00000003,0x02000040,0x00000000},0x1ebc,0,1554},
- {{0x00000005,0x02000040,0x00000000},0x1ebd,0,1554},
- {{0x00000005,0x00040040,0x00000000},0x24a0,0,1554},
- {{0x00004003,0x00000040,0x00000000},0x24ba,0,1554},
- {{0x00004005,0x00000040,0x00000000},0x24d4,0,1554},
- {{0x0008000b,0x00000040,0x00000000},0x0116,0,1554},
- {{0x0008000d,0x00000040,0x00000000},0x0117,0,1554},
- {{0x04100003,0x00000040,0x00000000},0x0204,0,1554},
- {{0x04100005,0x00000040,0x00000000},0x0205,0,1554},
- {{0x00000803,0x00000040,0x00800000},0x0206,0,1554},
- {{0x00000805,0x00000040,0x00800000},0x0207,0,1554},
- {{0x04000003,0x00000440,0x00000000},0x1e14,0,1554},
- {{0x04000005,0x00000440,0x00000000},0x1e15,0,1554},
- {{0x00000013,0x00000440,0x00000000},0x1e16,0,1554},
- {{0x00000015,0x00000440,0x00000000},0x1e17,0,1554},
- {{0x00008103,0x00000040,0x00000000},0x1e18,0,1554},
- {{0x00008105,0x00000040,0x00000000},0x1e19,0,1554},
- {{0x00000103,0x02000040,0x00000000},0x1e1a,0,1554},
- {{0x00000105,0x02000040,0x00000000},0x1e1b,0,1554},
- {{0x00002803,0x00000040,0x00000000},0x1e1c,0,1554},
- {{0x00002805,0x00000040,0x00000000},0x1e1d,0,1554},
- {{0x00080103,0x00000040,0x00000000},0x1eb8,0,1554},
- {{0x00080105,0x00000040,0x00000000},0x1eb9,0,1554},
- {{0x8000000b,0x00000040,0x00000000},0x1eba,0,1554},
- {{0x8000000d,0x00000040,0x00000000},0x1ebb,0,1554},
- {{0x00008013,0x00000040,0x00000000},0x1ebe,0,1554},
- {{0x00008015,0x00000040,0x00000000},0x1ebf,0,1554},
- {{0x04008003,0x00000040,0x00000000},0x1ec0,0,1554},
- {{0x04008005,0x00000040,0x00000000},0x1ec1,0,1554},
- {{0x00008003,0x02000040,0x00000000},0x1ec4,0,1554},
- {{0x00008005,0x02000040,0x00000000},0x1ec5,0,1554},
- {{0x8000800b,0x00000040,0x00000000},0x1ec2,0,1554},
- {{0x8000800d,0x00000040,0x00000000},0x1ec3,0,1554},
- {{0x00088103,0x00000040,0x00000000},0x1ec6,0,1554},
- {{0x00088105,0x00000040,0x00000000},0x1ec7,0,1554},
- {{0x00000000,0x00000000,0x00000000},0x24ba,1,5329},
- {{0x00000000,0x00000000,0x00000000},0x24d4,1,5329},
- {{0x00000000,0x00000000,0x00000000},0x0204,1,411},
- {{0x00000000,0x00000000,0x00000000},0x0205,1,411},
- {{0x00000000,0x00000000,0x00000000},0x0388,1,636},
- {{0x00000000,0x00000000,0x00000000},0x03ad,1,636},
- {{0x00000000,0x00000000,0x00000000},0x0114,1,30},
- {{0x00000000,0x00000000,0x00000000},0x0115,1,30},
- {{0x00000000,0x00000000,0x00000000},0x0206,1,415},
- {{0x00000000,0x00000000,0x00000000},0x0207,1,415},
- {{0x00000000,0x00000000,0x00000000},0x0395,1,694},
- {{0x00000000,0x00000000,0x00000000},0x03b5,1,694},
- {{0x00000000,0x00000000,0x00000000},0x1f72,1,2429},
- {{0x00000000,0x00000000,0x00000000},0x1fc8,1,2696},
- {{0x00000000,0x00000000,0x00000000},0x1f73,1,2433},
- {{0x00000000,0x00000000,0x00000000},0x1fc9,1,2433},
- {{0x00000000,0x00000000,0x00000000},0x1f10,1,2213},
- {{0x00000000,0x00000000,0x00000000},0x1f18,1,2213},
- {{0x00000000,0x00000000,0x00000000},0x1f12,1,2221},
- {{0x00000000,0x00000000,0x00000000},0x1f1a,1,2221},
- {{0x00000000,0x00000000,0x00000000},0x1f14,1,2231},
- {{0x00000000,0x00000000,0x00000000},0x1f1c,1,2231},
- {{0x00000000,0x00000000,0x00000000},0x1f11,1,2217},
- {{0x00000000,0x00000000,0x00000000},0x1f19,1,2217},
- {{0x00000000,0x00000000,0x00000000},0x1f13,1,2226},
- {{0x00000000,0x00000000,0x00000000},0x1f1b,1,2226},
- {{0x00000000,0x00000000,0x00000000},0x1f15,1,2236},
- {{0x00000000,0x00000000,0x00000000},0x1f1d,1,2236},
- {{0x00000000,0x00000000,0x00000000},0x05e2,1,1285},
- {{0x00000000,0x00000000,0x00000000},0x0639,1,1285},
- {{0x00000000,0x00000000,0x00000000},0xfecb,1,7263},
- {{0x00000000,0x00000000,0x00000000},0xfec9,1,7255},
- {{0x00000000,0x00000000,0x00000000},0xfeca,1,7259},
- {{0x00000000,0x00000000,0x00000000},0xfecc,1,7267},
- {{0x00000000,0x00000000,0x00000000},0x1e1c,1,1779},
- {{0x00000000,0x00000000,0x00000000},0x1e1d,1,1779},
- {{0x00000000,0x00000000,0x00000000},0x0112,1,27},
- {{0x00000000,0x00000000,0x00000000},0x0113,1,27},
- {{0x00000000,0x00000000,0x00000000},0x1e14,1,1763},
- {{0x00000000,0x00000000,0x00000000},0x1e15,1,1763},
- {{0x00000000,0x00000000,0x00000000},0x1e16,1,1767},
- {{0x00000000,0x00000000,0x00000000},0x1e17,1,1767},
- {{0x00000000,0x00000000,0x00000000},0x1eb8,1,2047},
- {{0x00000000,0x00000000,0x00000000},0x1eb9,1,2047},
- {{0x00000000,0x00000000,0x00000000},0x1e18,1,1771},
- {{0x00000000,0x00000000,0x00000000},0x1e19,1,1771},
- {{0x00000000,0x00000000,0x00000000},0x1e1a,1,1775},
- {{0x00000000,0x00000000,0x00000000},0x1e1b,1,1775},
- {{0x00000000,0x00000000,0x00000000},0x0116,1,33},
- {{0x00000000,0x00000000,0x00000000},0x0117,1,33},
- {{0x00000000,0x00000000,0x00000000},0x01dd,1,352},
- {{0x00000000,0x00000000,0x00000000},0x1eba,1,2051},
- {{0x00000000,0x00000000,0x00000000},0x1ebb,1,2051},
- {{0x00000000,0x00000000,0x00000000},0x311c,1,6847},
- {{0x00000000,0x00000000,0x00000000},0x3047,1,6552},
- {{0x00000000,0x00000000,0x00000000},0x3048,1,6552},
- {{0x00000000,0x00000000,0x00000000},0x30a7,1,6744},
- {{0x00000000,0x00000000,0x00000000},0x30a8,1,6744},
- {{0x00000000,0x00000000,0x00000000},0x0118,1,36},
- {{0x00000000,0x00000000,0x00000000},0x0119,1,36},
- {{0x00000000,0x00000000,0x00000000},0x011a,1,39},
- {{0x00000000,0x00000000,0x00000000},0x011b,1,39},
- {{0x00000000,0x00000000,0x00000000},0x0415,1,970},
- {{0x00000000,0x00000000,0x00000000},0x0435,1,970},
- {{0x00000000,0x00000000,0x00000000},0x1ec0,1,2061},
- {{0x00000000,0x00000000,0x00000000},0x1ec1,1,2061},
- {{0x00000000,0x00000000,0x00000000},0x1ebe,1,2057},
- {{0x00000000,0x00000000,0x00000000},0x1ebf,1,2057},
- {{0x00000000,0x00000000,0x00000000},0x1ec6,1,2073},
- {{0x00000000,0x00000000,0x00000000},0x1ec7,1,2073},
- {{0x00000000,0x00000000,0x00000000},0x1ec2,1,2065},
- {{0x00000000,0x00000000,0x00000000},0x1ec3,1,2065},
- {{0x00000000,0x00000000,0x00000000},0x1ec4,1,2069},
- {{0x00000000,0x00000000,0x00000000},0x1ec5,1,2069},
- {{0x00000000,0x00000000,0x00000000},0x1ebc,1,2054},
- {{0x00000000,0x00000000,0x00000000},0x1ebd,1,2054},
- {{0x00000000,0x00000000,0x00000000},0x01b7,1,279},
- {{0x00000000,0x00000000,0x00000000},0x0292,1,279},
- {{0x00010003,0x00000000,0x00000000},0x0424,1,1040},
- {{0x00010005,0x00000000,0x00000000},0x0444,1,1040},
- {{0x00000000,0x00000000,0x00000000},0x2302,1,4640},
- {{0x00000201,0x00000000,0x00000000},0x311d,1,4640},
- {{0x00000000,0x00000000,0x00000000},0x311d,1,6850},
- {{0x00000201,0x00000000,0x00000000},0x311f,1,6857},
- {{0x00000000,0x00000000,0x00000020},0x2078,0,1470},
- {{0x00000000,0x00000000,0x00000040},0x2088,0,1470},
- {{0x00004001,0x00000000,0x00000000},0x2467,0,1470},
- {{0x00000001,0x00040000,0x00000000},0x247b,0,1470},
- {{0x00000081,0x00000000,0x00000400},0x0668,0,1470},
- {{0x00000000,0x00804000,0x00000000},0x2167,0,1470},
- {{0x02000001,0x00000000,0x00000002},0x248f,0,1470},
- {{0x00000000,0x00040000,0x00000800},0x3227,0,1470},
- {{0x00000004,0x00804000,0x00000000},0x2177,0,1470},
- {{0x00004000,0x00002000,0x00000000},0x2471,1,5007},
- {{0x00000000,0x00042000,0x00000000},0x2485,1,5007},
- {{0x02000000,0x00002000,0x00000002},0x2499,1,5007},
- {{0x00000000,0x00010000,0x00000018},0x215b,1,3629},
- {{0x00000000,0x00000000,0x00000000},0x266a,1,6191},
- {{0x00010003,0x00000000,0x00000000},0x041b,1,998},
- {{0x00010005,0x00000000,0x00000000},0x043b,1,998},
- {{0x00000000,0x00000000,0x00000001},0x2208,1,4104},
- {{0x00000000,0x00804000,0x00000000},0x216a,1,3723},
- {{0x00004000,0x00002000,0x00000000},0x246a,1,3723},
- {{0x00000000,0x00042000,0x00000000},0x247e,1,3723},
- {{0x00000004,0x00804000,0x00000000},0x217a,1,3723},
- {{0x02000000,0x00002000,0x00000002},0x2492,1,3723},
- {{0x00000000,0x00000001,0x00000000},0x2026,1,3044},
- {{0x00000000,0x40000000,0x00000000},0x22ee,1,3044},
- {{0x00000000,0x00000000,0x00000200},0x2003,0,1156},
- {{0x00010003,0x00000000,0x00000000},0x041c,0,1156},
- {{0x00010005,0x00000000,0x00000000},0x043c,0,1156},
- {{0x00000000,0x00000000,0x00000000},0x2014,1,2903},
- {{0x00000000,0x00000000,0x00000000},0x2205,1,4075},
- {{0x00000000,0x00000000,0x00000200},0x2002,1,1007},
- {{0x00000201,0x00000000,0x00000000},0x3123,1,1007},
- {{0x00010003,0x00000000,0x00000000},0x041d,1,1007},
- {{0x00010005,0x00000000,0x00000000},0x043d,1,1007},
- {{0x00000000,0x00000000,0x00000000},0x2013,1,2892},
- {{0x00000201,0x00000000,0x00000000},0x3125,1,153},
- {{0x00000003,0x00000040,0x00000000},0x014a,1,153},
- {{0x00000005,0x00000040,0x00000000},0x014b,1,153},
- {{0x08000003,0x00000000,0x00000000},0x0395,1,628},
- {{0x08000005,0x00000000,0x00000000},0x03b5,1,628},
- {{0x08000003,0x00000000,0x20000000},0x0388,1,628},
- {{0x08000005,0x00000000,0x20000000},0x03ad,1,628},
- {{0x08000005,0x00200000,0x00000000},0x1f10,1,628},
- {{0x08020005,0x00000000,0x00000000},0x1f11,1,628},
- {{0x08000003,0x00200000,0x00000000},0x1f18,1,628},
- {{0x08020003,0x00000000,0x00000000},0x1f19,1,628},
- {{0x08000005,0x20000000,0x00000000},0x1f72,1,628},
- {{0x08000005,0x00020000,0x00000000},0x1f73,1,628},
- {{0x08000003,0x20000000,0x00000000},0x1fc8,1,628},
- {{0x08000003,0x00020000,0x00000000},0x1fc9,1,628},
- {{0x08000005,0x20200000,0x00000000},0x1f12,1,628},
- {{0x08020005,0x20000000,0x00000000},0x1f13,1,628},
- {{0x08000005,0x00220000,0x00000000},0x1f14,1,628},
- {{0x08020005,0x00020000,0x00000000},0x1f15,1,628},
- {{0x08000003,0x20200000,0x00000000},0x1f1a,1,628},
- {{0x08020003,0x20000000,0x00000000},0x1f1b,1,628},
- {{0x08000003,0x00220000,0x00000000},0x1f1c,1,628},
- {{0x08020003,0x00020000,0x00000000},0x1f1d,1,628},
- {{0x00000001,0x00000000,0x00000020},0x207c,0,1502},
- {{0x00000001,0x00000000,0x00000040},0x208c,0,1502},
- {{0x00000201,0x00000000,0x00000000},0x3126,1,1022},
- {{0x00010003,0x00000000,0x00000000},0x0420,1,1022},
- {{0x00010005,0x00000000,0x00000000},0x0440,1,1022},
- {{0x00010003,0x00000000,0x00000000},0x0421,0,1864},
- {{0x00010005,0x00000000,0x00000000},0x0441,0,1864},
- {{0x00000000,0x00000000,0x00000000},0x212e,1,3524},
- {{0x00000000,0x00000000,0x00000000},0x212e,1,3507},
- {{0x00000001,0x00000000,0x00000000},0x20ac,1,3347},
- {{0x00100000,0x00000800,0x00000000},0x203c,0,1292},
- {{0x00000000,0x00000000,0x00000000},0x01ee,1,379},
- {{0x00000000,0x00000000,0x00000000},0x01ef,1,379},
- {{0x00000003,0x00000040,0x00000000},0x01b7,1,275},
- {{0x00000005,0x00000040,0x00000000},0x0292,1,275},
- {{0x00001003,0x00000040,0x00000000},0x01ee,1,275},
- {{0x00001005,0x00000040,0x00000000},0x01ef,1,275},
- {{0x00000201,0x00000000,0x00000000},0x3108,0,1556},
- {{0x80000003,0x00000040,0x00000000},0x0191,0,1556},
- {{0x80000005,0x00000040,0x00000000},0x0192,0,1556},
- {{0x00000005,0x00040040,0x00000000},0x24a1,0,1556},
- {{0x00004003,0x00000040,0x00000000},0x24bb,0,1556},
- {{0x00004005,0x00000040,0x00000000},0x24d5,0,1556},
- {{0x0008000b,0x00000040,0x00000000},0x1e1e,0,1556},
- {{0x0008000d,0x00000040,0x00000000},0x1e1f,0,1556},
- {{0x00000000,0x00000000,0x00000000},0x24bb,1,5333},
- {{0x00000000,0x00000000,0x00000000},0x24d5,1,5333},
- {{0x00000000,0x00000000,0x00000000},0x03a6,1,789},
- {{0x00000000,0x00000000,0x00000000},0x03c6,1,789},
- {{0x00000000,0x00000000,0x00000000},0x0641,1,1522},
- {{0x00000000,0x00000000,0x00000000},0xfed3,1,7295},
- {{0x00000000,0x00000000,0x00000000},0xfed1,1,7287},
- {{0x00000000,0x00000000,0x00000000},0xfed2,1,7291},
- {{0x00000000,0x00000000,0x00000000},0xfed4,1,7299},
- {{0x00000000,0x00000000,0x00000000},0x1e1e,1,1783},
- {{0x00000000,0x00000000,0x00000000},0x1e1f,1,1783},
- {{0x00000000,0x00000000,0x00000000},0x0191,1,254},
- {{0x00000000,0x00000000,0x00000000},0x0192,1,254},
- {{0x00000000,0x00000000,0x00000000},0x0472,1,1140},
- {{0x00000000,0x00000000,0x00000000},0x0473,1,1140},
- {{0x00000000,0x00000000,0x00000000},0x3108,1,6799},
- {{0x00000000,0x00000000,0x00000000},0x0424,1,1043},
- {{0x00000000,0x00000000,0x00000000},0x0444,1,1043},
- {{0x00000000,0x00000000,0x00000000},0x2200,1,4035},
- {{0x00000080,0x00000000,0x00000000},0x064e,1,1602},
- {{0x00000080,0x00000000,0x00000000},0x064b,1,1566},
- {{0x00000000,0x00000000,0x00000000},0x2588,1,5692},
- {{0x00000000,0x00000000,0x00000000},0x2571,1,5646},
- {{0x00000000,0x00000000,0x00000000},0x25e2,1,5646},
- {{0x00000081,0x00000000,0x00000000},0x0641,1,1518},
- {{0x00000081,0x00000010,0x00000000},0xfed1,1,1518},
- {{0x01000081,0x00000000,0x00000000},0xfed2,1,1518},
- {{0x00000081,0x00000004,0x00000000},0xfed3,1,1518},
- {{0x00000081,0x00001000,0x00000000},0xfed4,1,1518},
- {{0x00000001,0x00000000,0x00000000},0x2640,1,6115},
- {{0x00000000,0x00000000,0x00000000},0xfb00,0,883},
- {{0x00000004,0x00000040,0x00000100},0xfb00,0,883},
- {{0x00000000,0x00000000,0x00000000},0xfb03,1,6966},
- {{0x00000004,0x00000040,0x00000100},0xfb03,1,6966},
- {{0x00000000,0x00000000,0x00000000},0xfb04,1,6970},
- {{0x00000004,0x00000040,0x00000100},0xfb04,1,6970},
- {{0x00000000,0x00000000,0x00000000},0xfb01,1,6960},
- {{0x00000004,0x00000040,0x00000100},0xfb01,1,6960},
- {{0x00004000,0x00002000,0x00000000},0x246e,1,4966},
- {{0x00000000,0x00042000,0x00000000},0x2482,1,4966},
- {{0x02000000,0x00002000,0x00000002},0x2496,1,4966},
- {{0x00000000,0x00010000,0x00000018},0x2155,1,3551},
- {{0x00000000,0x00804000,0x00000000},0x216c,1,3740},
- {{0x00000004,0x00804000,0x00000000},0x217c,1,3740},
- {{0x00000001,0x00000001,0x00000080},0x25a4,1,5773},
- {{0x00000001,0x40000000,0x00000080},0x25a5,1,5773},
- {{0x00010003,0x00000000,0x00000000},0x0472,1,1135},
- {{0x00010005,0x00000000,0x00000000},0x0473,1,1135},
- {{0x00000000,0x00000000,0x00000020},0x2075,0,1455},
- {{0x00000000,0x00000000,0x00000040},0x2085,0,1455},
- {{0x00004001,0x00000000,0x00000000},0x2464,0,1455},
- {{0x00000001,0x00040000,0x00000000},0x2478,0,1455},
- {{0x00000081,0x00000000,0x00000400},0x0665,0,1455},
- {{0x00000000,0x00804000,0x00000000},0x2164,0,1455},
- {{0x02000001,0x00000000,0x00000002},0x248c,0,1455},
- {{0x00000000,0x00040000,0x00000800},0x3224,0,1455},
- {{0x00000004,0x00804000,0x00000000},0x2174,0,1455},
- {{0x00000000,0x00000000,0x00000018},0x215d,1,3656},
- {{0x00000000,0x00804000,0x00000000},0x216e,1,3763},
- {{0x00000004,0x00804000,0x00000000},0x217e,1,3763},
- {{0x00000000,0x00000000,0x00000018},0x215a,1,3614},
- {{0x00000000,0x00804000,0x00000000},0x2181,1,3817},
- {{0x00000000,0x00000000,0x00000000},0xfb02,1,6963},
- {{0x00000004,0x00000040,0x00000100},0xfb02,1,6963},
- {{0x00000000,0x00000080,0x00000000},0x230a,1,4657},
- {{0x00000000,0x00400000,0x00000000},0x230b,1,4657},
- {{0x00000000,0x00000000,0x00000000},0x2640,1,6122},
- {{0x00000000,0x00000000,0x00000000},0x2200,1,4027},
- {{0x00000000,0x00000000,0x00040000},0x2442,1,4802},
- {{0x00000000,0x00000000,0x00840000},0x2443,1,4802},
- {{0x00000000,0x00000000,0x00000020},0x2074,0,1450},
- {{0x00000000,0x00000000,0x00000040},0x2084,0,1450},
- {{0x00004001,0x00000000,0x00000000},0x2463,0,1450},
- {{0x00000001,0x00040000,0x00000000},0x2477,0,1450},
- {{0x00000081,0x00000000,0x00000400},0x0664,0,1450},
- {{0x00000000,0x00804000,0x00000000},0x2163,0,1450},
- {{0x02000001,0x00000000,0x00000002},0x248b,0,1450},
- {{0x00000000,0x00040000,0x00000800},0x3223,0,1450},
- {{0x00000004,0x00804000,0x00000000},0x2173,0,1450},
- {{0x00000000,0x00000000,0x00000018},0x2158,1,3590},
- {{0x00000000,0x00000000,0x00000200},0x2005,1,2841},
- {{0x00004000,0x00002000,0x00000000},0x246d,1,4952},
- {{0x00000000,0x00042000,0x00000000},0x2481,1,4952},
- {{0x02000000,0x00002000,0x00000002},0x2495,1,4952},
- {{0x00000000,0x00000000,0x00000000},0x220e,1,4143},
- {{0x00000001,0x00000000,0x00000000},0x20a3,1,3315},
- {{0x00000000,0x00000000,0x00000000},0x25a0,0,1206},
- {{0x00000201,0x00000000,0x00000000},0x310d,0,1558},
- {{0x00008003,0x00000040,0x00000000},0x011c,0,1558},
- {{0x00008005,0x00000040,0x00000000},0x011d,0,1558},
- {{0x00000803,0x00000040,0x00000000},0x011e,0,1558},
- {{0x00000805,0x00000040,0x00000000},0x011f,0,1558},
- {{0x00002003,0x00000040,0x00000000},0x0122,0,1558},
- {{0x00002005,0x00000040,0x00000000},0x0123,0,1558},
- {{0x00000003,0x00000040,0x10000000},0x01e4,0,1558},
- {{0x00000005,0x00000040,0x10000000},0x01e5,0,1558},
- {{0x00001003,0x00000040,0x00000000},0x01e6,0,1558},
- {{0x00001005,0x00000040,0x00000000},0x01e7,0,1558},
- {{0x00000013,0x00000040,0x00000000},0x01f4,0,1558},
- {{0x00000015,0x00000040,0x00000000},0x01f5,0,1558},
- {{0x00000003,0x00000440,0x00000000},0x1e20,0,1558},
- {{0x00000005,0x00000440,0x00000000},0x1e21,0,1558},
- {{0x00000005,0x00040040,0x00000000},0x24a2,0,1558},
- {{0x00004003,0x00000040,0x00000000},0x24bc,0,1558},
- {{0x00004005,0x00000040,0x00000000},0x24d6,0,1558},
- {{0x0008000b,0x00000040,0x00000000},0x0120,0,1558},
- {{0x0008000d,0x00000040,0x00000000},0x0121,0,1558},
- {{0x00000000,0x00000000,0x00000000},0x24bc,1,5337},
- {{0x00000000,0x00000000,0x00000000},0x24d6,1,5337},
- {{0x00000000,0x00000000,0x00000000},0x0403,1,889},
- {{0x00000000,0x00000000,0x00000000},0x0453,1,889},
- {{0x00000000,0x00000000,0x00000000},0x01f4,1,389},
- {{0x00000000,0x00000000,0x00000000},0x01f5,1,389},
- {{0x00000000,0x00000000,0x00000000},0x011e,1,45},
- {{0x00000000,0x00000000,0x00000000},0x011f,1,45},
- {{0x00000000,0x00000000,0x00000000},0x0393,1,682},
- {{0x00000000,0x00000000,0x00000000},0x03b3,1,682},
- {{0x00000000,0x00000000,0x00000000},0x05d2,1,1176},
- {{0x00000000,0x00000000,0x00000000},0x062c,1,1176},
- {{0x00000000,0x00000000,0x00000000},0xfe9f,1,7087},
- {{0x00000000,0x00000000,0x00000000},0xfe9d,1,7079},
- {{0x00000000,0x00000000,0x00000000},0xfe9e,1,7083},
- {{0x00000000,0x00000000,0x00000000},0xfea0,1,7091},
- {{0x00000000,0x00000000,0x00000000},0x0122,1,51},
- {{0x00000000,0x00000000,0x00000000},0x0123,1,51},
- {{0x00000000,0x00000000,0x00000000},0x1e20,1,1786},
- {{0x00000000,0x00000000,0x00000000},0x1e21,1,1786},
- {{0x00000000,0x00000000,0x00000000},0x0120,1,48},
- {{0x00000000,0x00000000,0x00000000},0x0121,1,48},
- {{0x00000000,0x00000000,0x00000000},0x01e4,1,364},
- {{0x00000000,0x00000000,0x00000000},0x01e5,1,364},
- {{0x00000000,0x00000000,0x00000000},0x0490,1,1157},
- {{0x00000000,0x00000000,0x00000000},0x0491,1,1157},
- {{0x00000000,0x00000000,0x00000000},0x310d,1,6811},
- {{0x00000000,0x00000000,0x00000000},0x01e6,1,367},
- {{0x00000000,0x00000000,0x00000000},0x01e7,1,367},
- {{0x00000000,0x00000000,0x00000000},0x0413,1,961},
- {{0x00000000,0x00000000,0x00000000},0x0433,1,961},
- {{0x00000000,0x00000000,0x00000000},0x011c,1,42},
- {{0x00000000,0x00000000,0x00000000},0x011d,1,42},
- {{0x40000001,0x00000000,0x00000000},0x304c,1,6558},
- {{0x00000001,0x00000020,0x00000000},0x30ac,1,6558},
- {{0x00000081,0x00000000,0x00000000},0x06af,1,1721},
- {{0x08000003,0x00000000,0x00000000},0x0393,1,676},
- {{0x08000005,0x00000000,0x00000000},0x03b3,1,676},
- {{0x40000001,0x00000000,0x00000000},0x3052,1,6576},
- {{0x00000001,0x00000020,0x00000000},0x30b2,1,6576},
- {{0x00000000,0x00000800,0x00000000},0x3013,1,6478},
- {{0x00000000,0x00000000,0x00000000},0x06af,1,1725},
- {{0x00000081,0x00000000,0x00000000},0x063a,1,1498},
- {{0x00000081,0x00000010,0x00000000},0xfecd,1,1498},
- {{0x01000081,0x00000000,0x00000000},0xfece,1,1498},
- {{0x00000081,0x00000004,0x00000000},0xfecf,1,1498},
- {{0x00000081,0x00001000,0x00000000},0xfed0,1,1498},
- {{0x00010003,0x00000000,0x00000000},0x0413,1,957},
- {{0x00010005,0x00000000,0x00000000},0x0433,1,957},
- {{0x00010003,0x00000000,0x80000000},0x0490,1,957},
- {{0x00010005,0x00000000,0x80000000},0x0491,1,957},
- {{0x40000001,0x00000000,0x00000000},0x304e,1,6564},
- {{0x00000001,0x00000020,0x00000000},0x30ae,1,6564},
- {{0x20000001,0x00000000,0x00000000},0x05d2,1,1170},
- {{0x00010003,0x00000000,0x00000000},0x0403,1,885},
- {{0x00010005,0x00000000,0x00000000},0x0453,1,885},
- {{0x00000201,0x00000000,0x00000000},0x312c,1,6879},
- {{0x40000001,0x00000000,0x00000000},0x3054,1,6582},
- {{0x00000001,0x00000020,0x00000000},0x30b4,1,6582},
- {{0x00000000,0x04000000,0x00015000},0x2265,0,1509},
- {{0x40000001,0x00000000,0x00000000},0x3050,1,6570},
- {{0x00000001,0x00000020,0x00000000},0x30b0,1,6570},
- {{0x00000201,0x00000000,0x00000000},0x310f,0,1560},
- {{0x00008003,0x00000040,0x00000000},0x0124,0,1560},
- {{0x00008005,0x00000040,0x00000000},0x0125,0,1560},
- {{0x00000003,0x00000040,0x10000000},0x0126,0,1560},
- {{0x00000005,0x00000040,0x10000000},0x0127,0,1560},
- {{0x00040003,0x00000040,0x00000000},0x1e26,0,1560},
- {{0x00040005,0x00000040,0x00000000},0x1e27,0,1560},
- {{0x00002003,0x00000040,0x00000000},0x1e28,0,1560},
- {{0x00002005,0x00000040,0x00000000},0x1e29,0,1560},
- {{0x00000005,0x00040040,0x00000000},0x24a3,0,1560},
- {{0x00004003,0x00000040,0x00000000},0x24bd,0,1560},
- {{0x00004005,0x00000040,0x00000000},0x24d7,0,1560},
- {{0x0008000b,0x00000040,0x00000000},0x1e22,0,1560},
- {{0x0008000d,0x00000040,0x00000000},0x1e23,0,1560},
- {{0x00080103,0x00000040,0x00000000},0x1e24,0,1560},
- {{0x00080105,0x00000040,0x00000000},0x1e25,0,1560},
- {{0x00000903,0x00000040,0x00000000},0x1e2a,0,1560},
- {{0x00000905,0x00000040,0x00000000},0x1e2b,0,1560},
- {{0x00000000,0x00000000,0x00000000},0x24bd,1,5341},
- {{0x00000000,0x00000000,0x00000000},0x24d7,1,5341},
- {{0x00000000,0x00000000,0x00000000},0x0621,1,1345},
- {{0x00000000,0x00000000,0x00000000},0xfe80,1,6987},
- {{0x00000000,0x00000000,0x00000000},0x0398,1,714},
- {{0x00000000,0x00000000,0x00000000},0x03b8,1,714},
- {{0x00000000,0x00000000,0x00000000},0x05d4,1,1191},
- {{0x00000000,0x00000000,0x00000000},0x0647,1,1191},
- {{0x00000000,0x00000000,0x00000000},0xfeeb,1,7391},
- {{0x00000000,0x00000000,0x00000000},0xfee9,1,7383},
- {{0x00000000,0x00000000,0x00000000},0xfeea,1,7387},
- {{0x00000000,0x00000000,0x00000000},0xfeec,1,7395},
- {{0x00000000,0x00000000,0x00000000},0x1e28,1,1799},
- {{0x00000000,0x00000000,0x00000000},0x1e29,1,1799},
- {{0x00000000,0x00000000,0x00000000},0x1e2a,1,1802},
- {{0x00000000,0x00000000,0x00000000},0x1e2b,1,1802},
- {{0x00000000,0x00000000,0x00000000},0x1e24,1,1792},
- {{0x00000000,0x00000000,0x00000000},0x1e25,1,1792},
- {{0x00000000,0x00000000,0x00000000},0x1e22,1,1789},
- {{0x00000000,0x00000000,0x00000000},0x1e23,1,1789},
- {{0x00000000,0x00000000,0x00000000},0x0126,1,57},
- {{0x00000000,0x00000000,0x00000000},0x0127,1,57},
- {{0x00000000,0x00000000,0x00000000},0x310f,1,6817},
- {{0x00000000,0x00000000,0x00000000},0x1e26,1,1796},
- {{0x00000000,0x00000000,0x00000000},0x1e27,1,1796},
- {{0x00000000,0x00000000,0x00000000},0x0425,1,1049},
- {{0x00000000,0x00000000,0x00000000},0x0445,1,1049},
- {{0x00000000,0x00000000,0x00000000},0x0124,1,54},
- {{0x00000000,0x00000000,0x00000000},0x0125,1,54},
- {{0x40000001,0x00000000,0x00000000},0x306f,1,1046},
- {{0x00000001,0x00000020,0x00000000},0x30cf,1,1046},
- {{0x00010003,0x00000000,0x00000000},0x0425,1,1046},
- {{0x00010005,0x00000000,0x00000000},0x0445,1,1046},
- {{0x00000081,0x00000000,0x00000000},0x062d,1,1422},
- {{0x00000081,0x00000010,0x00000000},0xfea1,1,1422},
- {{0x01000081,0x00000000,0x00000000},0xfea2,1,1422},
- {{0x00000081,0x00000004,0x00000000},0xfea3,1,1422},
- {{0x00000081,0x00001000,0x00000000},0xfea4,1,1422},
- {{0x00000089,0x00000000,0x00000000},0x0681,1,1688},
- {{0x00000000,0x00000000,0x00000200},0x200a,1,2878},
- {{0x00000081,0x00000000,0x00000000},0x0621,1,1339},
- {{0x00000081,0x00000010,0x00000000},0xfe80,1,1339},
- {{0x000000a9,0x00000000,0x00000000},0x0623,1,1339},
- {{0x000001a1,0x00000000,0x00000000},0x0625,1,1339},
- {{0x000000a9,0x00000010,0x00000000},0xfe83,1,1339},
- {{0x010000a9,0x00000000,0x00000000},0xfe84,1,1339},
- {{0x010001a1,0x00000000,0x00000000},0xfe88,1,1339},
- {{0x00000000,0x00040000,0x00000000},0x321c,1,6882},
- {{0x00010003,0x00000000,0x00000000},0x042a,1,1079},
- {{0x00010005,0x00000000,0x00000000},0x044a,1,1079},
- {{0x20000001,0x00000000,0x00000000},0x05d4,1,1188},
- {{0x40000001,0x00000000,0x00000000},0x3078,1,1188},
- {{0x00000001,0x00000020,0x00000000},0x30d8,1,1188},
- {{0x00000000,0x80000000,0x00008000},0x2661,1,6142},
- {{0x00000000,0x00000000,0x00008004},0x2665,1,6142},
- {{0x00000081,0x00000000,0x00000000},0x0647,1,1543},
- {{0x00000081,0x00000010,0x00000000},0xfee9,1,1543},
- {{0x01000081,0x00000000,0x00000000},0xfeea,1,1543},
- {{0x00000081,0x00000004,0x00000000},0xfeeb,1,1543},
- {{0x00000081,0x00001000,0x00000000},0xfeec,1,1543},
- {{0x20000001,0x00000000,0x00000000},0x05d7,1,1210},
- {{0x00000000,0x00000000,0x00000000},0x0681,1,1698},
- {{0x00000000,0x00000000,0x00000000},0x2500,1,1698},
- {{0x00000000,0x00000000,0x00000000},0x2550,1,1698},
- {{0x00000000,0x00000000,0x00000000},0x2501,1,5424},
- {{0x00000000,0x00000000,0x00000000},0x2253,1,4505},
- {{0x40000001,0x00000000,0x00000000},0x3072,1,4505},
- {{0x00000001,0x00000020,0x00000000},0x30d2,1,4505},
- {{0x00000000,0x01000800,0x00000000},0x201b,1,2948},
- {{0x00100000,0x00000800,0x00000000},0x201f,1,2948},
- {{0x00000000,0x00000000,0x00000000},0x062d,1,1426},
- {{0x00000000,0x00000000,0x00000000},0xfea3,1,7103},
- {{0x00000000,0x00000000,0x00000000},0xfea1,1,7095},
- {{0x00000000,0x00000000,0x00000000},0xfea2,1,7099},
- {{0x00000000,0x00000000,0x00000000},0xfea4,1,7107},
- {{0x40000001,0x00000000,0x00000000},0x307b,0,1742},
- {{0x00000001,0x00000020,0x00000000},0x30db,0,1742},
- {{0x00000000,0x00000000,0x00000000},0x2302,1,4634},
- {{0x40000001,0x00000000,0x00000000},0x3075,1,6624},
- {{0x00000001,0x00000020,0x00000000},0x30d5,1,6624},
- {{0x00000000,0x00814000,0x00000000},0x216d,1,3750},
- {{0x00000004,0x00814000,0x00000000},0x217d,1,3750},
- {{0x00000000,0x00000000,0x00000000},0x2010,0,1407},
- {{0x00000000,0x00000000,0x00000000},0x2043,1,3253},
- {{0x00000000,0x00000000,0x00000000},0x2027,1,3056},
- {{0x40000001,0x00000000,0x00000000},0x3044,0,1562},
- {{0x00000001,0x00000020,0x00000000},0x30a4,0,1562},
- {{0x00000201,0x00000000,0x00000000},0x3127,0,1562},
- {{0x00010003,0x00000000,0x00000000},0x0418,0,1562},
- {{0x00010005,0x00000000,0x00000000},0x0438,0,1562},
- {{0x40000005,0x00000000,0x00000000},0x3043,0,1562},
- {{0x00000005,0x00000020,0x00000000},0x30a3,0,1562},
- {{0x00000003,0x02000040,0x00000000},0x0128,0,1562},
- {{0x00000005,0x02000040,0x00000000},0x0129,0,1562},
- {{0x00000003,0x00000440,0x00000000},0x012a,0,1562},
- {{0x00000005,0x00000440,0x00000000},0x012b,0,1562},
- {{0x00000803,0x00000040,0x00000000},0x012c,0,1562},
- {{0x00000805,0x00000040,0x00000000},0x012d,0,1562},
- {{0x00000003,0x00000040,0x02000000},0x012e,0,1562},
- {{0x00000005,0x00000040,0x02000000},0x012f,0,1562},
- {{0x00001003,0x00000040,0x00000000},0x01cf,0,1562},
- {{0x00001005,0x00000040,0x00000000},0x01d0,0,1562},
- {{0x00010003,0x00000000,0x08000000},0x0419,0,1562},
- {{0x00010005,0x00000000,0x08000000},0x0439,0,1562},
- {{0x00000005,0x00040040,0x00000000},0x24a4,0,1562},
- {{0x00004003,0x00000040,0x00000000},0x24be,0,1562},
- {{0x00004005,0x00000040,0x00000000},0x24d8,0,1562},
- {{0x0008000b,0x00000040,0x00000000},0x0130,0,1562},
- {{0x04100003,0x00000040,0x00000000},0x0208,0,1562},
- {{0x04100005,0x00000040,0x00000000},0x0209,0,1562},
- {{0x00000803,0x00000040,0x00800000},0x020a,0,1562},
- {{0x00000805,0x00000040,0x00800000},0x020b,0,1562},
- {{0x00010003,0x00000000,0x40400000},0x0406,0,1562},
- {{0x00010005,0x00000000,0x40400000},0x0456,0,1562},
- {{0x00000103,0x02000040,0x00000000},0x1e2c,0,1562},
- {{0x00000105,0x02000040,0x00000000},0x1e2d,0,1562},
- {{0x00040013,0x00000040,0x00000000},0x1e2e,0,1562},
- {{0x00040015,0x00000040,0x00000000},0x1e2f,0,1562},
- {{0x8000000b,0x00000040,0x00000000},0x1ec8,0,1562},
- {{0x8000000d,0x00000040,0x00000000},0x1ec9,0,1562},
- {{0x00080103,0x00000040,0x00000000},0x1eca,0,1562},
- {{0x00080105,0x00000040,0x00000000},0x1ecb,0,1562},
- {{0x00000000,0x00000000,0x00000000},0x24be,1,5345},
- {{0x00000000,0x00000000,0x00000000},0x24d8,1,5345},
- {{0x00000000,0x00000000,0x00000000},0x0208,1,418},
- {{0x00000000,0x00000000,0x00000000},0x0209,1,418},
- {{0x00000000,0x00000000,0x00000000},0x038a,1,642},
- {{0x00000000,0x00000000,0x00000000},0x03af,1,642},
- {{0x00000000,0x00000000,0x00000000},0x012c,1,66},
- {{0x00000000,0x00000000,0x00000000},0x012d,1,66},
- {{0x00000000,0x00000000,0x00000000},0x020a,1,422},
- {{0x00000000,0x00000000,0x00000000},0x020b,1,422},
- {{0x00000000,0x00000000,0x00000000},0x0399,1,717},
- {{0x00000000,0x00000000,0x00000000},0x03b9,1,717},
- {{0x00000000,0x00000000,0x00000000},0x1f76,1,2445},
- {{0x00000000,0x00000000,0x00000000},0x1fda,1,2445},
- {{0x00000000,0x00000000,0x00000000},0x1f77,1,2449},
- {{0x00000000,0x00000000,0x00000000},0x1fdb,1,2449},
- {{0x00000000,0x00000000,0x00000000},0x1fd0,1,2710},
- {{0x00000000,0x00000000,0x00000000},0x1fd8,1,2710},
- {{0x00000000,0x00000000,0x00000000},0x1f30,1,2279},
- {{0x00000000,0x00000000,0x00000000},0x1f38,1,2279},
- {{0x00000000,0x00000000,0x00000000},0x1f32,1,2287},
- {{0x00000000,0x00000000,0x00000000},0x1f3a,1,2287},
- {{0x00000000,0x00000000,0x00000000},0x1f34,1,2297},
- {{0x00000000,0x00000000,0x00000000},0x1f3c,1,2297},
- {{0x00000000,0x00000000,0x00000000},0x1f36,1,2307},
- {{0x00000000,0x00000000,0x00000000},0x1f3e,1,2307},
- {{0x00000000,0x00000000,0x00000000},0x1fd1,1,2714},
- {{0x00000000,0x00000000,0x00000000},0x1fd9,1,2714},
- {{0x00000000,0x00000000,0x00000000},0x1fd2,1,2718},
- {{0x00000000,0x00000000,0x00000000},0x1fd3,1,2723},
- {{0x00000000,0x00000000,0x00000000},0x1fd7,1,2732},
- {{0x00000000,0x00000000,0x00000000},0x1f31,1,2283},
- {{0x00000000,0x00000000,0x00000000},0x1f39,1,2283},
- {{0x00000000,0x00000000,0x00000000},0x1f33,1,2292},
- {{0x00000000,0x00000000,0x00000000},0x1f3b,1,2292},
- {{0x00000000,0x00000000,0x00000000},0x1f35,1,2302},
- {{0x00000000,0x00000000,0x00000000},0x1f3d,1,2302},
- {{0x00000000,0x00000000,0x00000000},0x1f37,1,2312},
- {{0x00000000,0x00000000,0x00000000},0x1f3f,1,2312},
- {{0x00000000,0x00000000,0x00000000},0x1fd6,1,2728},
- {{0x00000000,0x00000000,0x00000000},0x063a,1,1504},
- {{0x00000000,0x00000000,0x00000000},0xfecf,1,7279},
- {{0x00000000,0x00000000,0x00000000},0xfecd,1,7271},
- {{0x00000000,0x00000000,0x00000000},0xfece,1,7275},
- {{0x00000000,0x00000000,0x00000000},0xfed0,1,7283},
- {{0x00000000,0x00000000,0x00000000},0x012a,1,63},
- {{0x00000000,0x00000000,0x00000000},0x012b,1,63},
- {{0x00000000,0x00000000,0x00000000},0x1eca,1,2081},
- {{0x00000000,0x00000000,0x00000000},0x1ecb,1,2081},
- {{0x00000000,0x00000000,0x00000000},0x1e2c,1,1806},
- {{0x00000000,0x00000000,0x00000000},0x1e2d,1,1806},
- {{0x00000000,0x00000000,0x00000000},0x0130,1,72},
- {{0x00000000,0x00000000,0x00000000},0x0131,1,72},
- {{0x00000000,0x00000000,0x00000000},0x1ec8,1,2078},
- {{0x00000000,0x00000000,0x00000000},0x1ec9,1,2078},
- {{0x00000000,0x00000000,0x00000000},0x0390,1,662},
- {{0x00000000,0x00000000,0x00000000},0x3127,1,6870},
- {{0x00000000,0x00000000,0x00000000},0x3043,1,6546},
- {{0x00000000,0x00000000,0x00000000},0x3044,1,6546},
- {{0x00000000,0x00000000,0x00000000},0x30a3,1,6738},
- {{0x00000000,0x00000000,0x00000000},0x30a4,1,6738},
- {{0x00000000,0x00000000,0x00000000},0x1e2e,1,1810},
- {{0x00000000,0x00000000,0x00000000},0x1e2f,1,1810},
- {{0x00000000,0x00000000,0x00000000},0x012e,1,69},
- {{0x00000000,0x00000000,0x00000000},0x012f,1,69},
- {{0x00000000,0x00000000,0x00000000},0x01cf,1,318},
- {{0x00000000,0x00000000,0x00000000},0x01d0,1,318},
- {{0x00000000,0x00000000,0x00000000},0x0418,1,986},
- {{0x00000000,0x00000000,0x00000000},0x0438,1,986},
- {{0x00000000,0x00000000,0x00000000},0x0128,1,60},
- {{0x00000000,0x00000000,0x00000000},0x0129,1,60},
- {{0x00000000,0x00000000,0x00000000},0x25d9,1,6005},
- {{0x00000000,0x04000000,0x00000000},0x2261,1,4511},
- {{0x00000000,0x00000000,0x00000000},0x0404,1,892},
- {{0x00000000,0x00000000,0x00000000},0x0454,1,892},
- {{0x00010003,0x00000000,0x00000000},0x0415,1,892},
- {{0x00010005,0x00000000,0x00000000},0x0435,1,892},
- {{0x00010003,0x00000000,0x40000000},0x0404,1,892},
- {{0x00010005,0x00000000,0x40000000},0x0454,1,892},
- {{0x00000000,0x00000000,0x00000000},0x0406,1,902},
- {{0x00000000,0x00000000,0x00000000},0x0456,1,902},
- {{0x00000000,0x00000000,0x00000000},0x0132,1,85},
- {{0x00000000,0x00000000,0x00000000},0x0133,1,85},
- {{0x00000002,0x00000040,0x00000100},0x0132,1,85},
- {{0x00000004,0x00000040,0x00000100},0x0133,1,85},
- {{0x00000000,0x00000000,0x00000000},0x2321,1,4764},
- {{0x00000000,0x04000000,0x00011001},0x2253,1,4485},
- {{0x00000000,0x00000000,0x00000000},0x222b,0,1804},
- {{0x00000000,0x00000000,0x00000000},0x2206,1,4088},
- {{0x00000000,0x00000000,0x00000000},0x221e,1,4275},
- {{0x00000000,0x00000000,0x00000000},0x222b,1,4344},
- {{0x00100000,0x00000000,0x00000000},0x222c,1,4344},
- {{0x00000000,0x00000000,0x00000000},0x2229,1,4319},
- {{0x00000000,0x00000000,0x00000000},0x25d8,1,5975},
- {{0x00000000,0x80000000,0x00000000},0x25d9,1,5990},
- {{0x00000000,0x00000000,0x00000000},0x0401,1,875},
- {{0x00000000,0x00000000,0x00000000},0x0451,1,875},
- {{0x00000000,0x00000000,0x00000000},0x222e,1,875},
- {{0x00010003,0x00000000,0x00000000},0x0401,1,875},
- {{0x00010005,0x00000000,0x00000000},0x0451,1,875},
- {{0x00000000,0x00000000,0x00000000},0x3000,1,6341},
- {{0x00000000,0x00000800,0x00000800},0x3005,1,6399},
- {{0x40000000,0x00000800,0x00000000},0x309d,1,6399},
- {{0x00000000,0x00000820,0x00000000},0x30fd,1,6399},
- {{0x00000000,0x00000000,0x00000000},0x2320,1,4745},
- {{0x00000201,0x00000000,0x00000000},0x3129,1,4745},
- {{0x00010003,0x00000000,0x00000000},0x0474,1,1143},
- {{0x00010005,0x00000000,0x00000000},0x0475,1,1143},
- {{0x00000201,0x00000000,0x00000000},0x3110,0,1564},
- {{0x00008003,0x00000040,0x00000000},0x0134,0,1564},
- {{0x00008005,0x00000040,0x00000000},0x0135,0,1564},
- {{0x00001005,0x00000040,0x00000000},0x01f0,0,1564},
- {{0x00000005,0x00040040,0x00000000},0x24a5,0,1564},
- {{0x00004003,0x00000040,0x00000000},0x24bf,0,1564},
- {{0x00004005,0x00000040,0x00000000},0x24d9,0,1564},
- {{0x00000000,0x00000000,0x00000000},0x24bf,1,5349},
- {{0x00000000,0x00000000,0x00000000},0x24d9,1,5349},
- {{0x00000000,0x00000000,0x00000000},0x0408,1,911},
- {{0x00000000,0x00000000,0x00000000},0x0458,1,911},
- {{0x00000000,0x00000000,0x00000000},0x03aa,1,809},
- {{0x00000000,0x00000000,0x00000000},0x03ca,1,809},
- {{0x00000000,0x00000000,0x00000000},0x05d9,1,1228},
- {{0x00000000,0x00000000,0x00000000},0x0649,1,1228},
- {{0x00000000,0x00000000,0x00000000},0xfeef,1,7407},
- {{0x00000000,0x00000000,0x00000000},0xfef0,1,7411},
- {{0x00000000,0x00000000,0x00000000},0x037a,1,589},
- {{0x00000000,0x00000000,0x00000000},0x1fbe,1,589},
- {{0x00000000,0x00000000,0x00000000},0x3110,1,6820},
- {{0x00000000,0x00000000,0x00000000},0x01f0,1,382},
- {{0x00000000,0x00000000,0x00000000},0x0419,1,989},
- {{0x00000000,0x00000000,0x00000000},0x0439,1,989},
- {{0x00000000,0x00000000,0x00000000},0x0134,1,88},
- {{0x00000000,0x00000000,0x00000000},0x0135,1,88},
- {{0x00000000,0x00000000,0x00000000},0x042f,1,1112},
- {{0x00000000,0x00000000,0x00000000},0x044f,1,1112},
- {{0x00000000,0x00000000,0x00000000},0x3004,1,6359},
- {{0x00000000,0x00000000,0x00000000},0x042d,1,908},
- {{0x00000000,0x00000000,0x00000000},0x044d,1,908},
- {{0x00010003,0x00000000,0x00000000},0x0408,1,908},
- {{0x00010005,0x00000000,0x00000000},0x0458,1,908},
- {{0x00000081,0x00000000,0x00000000},0x062c,1,1417},
- {{0x00000081,0x00000010,0x00000000},0xfe9d,1,1417},
- {{0x01000081,0x00000000,0x00000000},0xfe9e,1,1417},
- {{0x00000081,0x00000004,0x00000000},0xfe9f,1,1417},
- {{0x00000081,0x00001000,0x00000000},0xfea0,1,1417},
- {{0x00000081,0x00000000,0x00000000},0x0698,1,1710},
- {{0x00000000,0x00000000,0x00000000},0x3004,1,6395},
- {{0x00000000,0x00000000,0x00000000},0x042e,1,1106},
- {{0x00000000,0x00000000,0x00000000},0x044e,1,1106},
- {{0x00000201,0x00000000,0x00000000},0x310e,0,1566},
- {{0x00002003,0x00000040,0x00000000},0x0136,0,1566},
- {{0x00002005,0x00000040,0x00000000},0x0137,0,1566},
- {{0x80000003,0x00000040,0x00000000},0x0198,0,1566},
- {{0x80000005,0x00000040,0x00000000},0x0199,0,1566},
- {{0x00001003,0x00000040,0x00000000},0x01e8,0,1566},
- {{0x00001005,0x00000040,0x00000000},0x01e9,0,1566},
- {{0x00000013,0x00000040,0x00000000},0x1e30,0,1566},
- {{0x00000015,0x00000040,0x00000000},0x1e31,0,1566},
- {{0x00000005,0x00040040,0x00000000},0x24a6,0,1566},
- {{0x00004003,0x00000040,0x00000000},0x24c0,0,1566},
- {{0x00004005,0x00000040,0x00000000},0x24da,0,1566},
- {{0x00080103,0x00000040,0x00000000},0x1e32,0,1566},
- {{0x00080105,0x00000040,0x00000000},0x1e33,0,1566},
- {{0x00000103,0x00000240,0x00000000},0x1e34,0,1566},
- {{0x00000105,0x00000240,0x00000000},0x1e35,0,1566},
- {{0x00000000,0x00000000,0x00000000},0x24c0,1,5353},
- {{0x00000000,0x00000000,0x00000000},0x24da,1,5353},
- {{0x00000000,0x00000000,0x00000000},0x05da,1,1235},
- {{0x00000000,0x00000000,0x00000000},0x1e30,1,1814},
- {{0x00000000,0x00000000,0x00000000},0x1e31,1,1814},
- {{0x00000000,0x00000000,0x00000000},0x039a,1,726},
- {{0x00000000,0x00000000,0x00000000},0x03ba,1,726},
- {{0x00000000,0x00000000,0x00000000},0x05db,1,1238},
- {{0x00000000,0x00000000,0x00000000},0x0643,1,1238},
- {{0x00000000,0x00000000,0x00000000},0xfedb,1,7327},
- {{0x00000000,0x00000000,0x00000000},0xfed9,1,7319},
- {{0x00000000,0x00000000,0x00000000},0xfeda,1,7323},
- {{0x00000000,0x00000000,0x00000000},0xfedc,1,7331},
- {{0x00000000,0x00000000,0x00000000},0x0136,1,91},
- {{0x00000000,0x00000000,0x00000000},0x0137,1,91},
- {{0x00000000,0x00000000,0x00000000},0x1e32,1,1817},
- {{0x00000000,0x00000000,0x00000000},0x1e33,1,1817},
- {{0x00000000,0x00000000,0x00000000},0x0198,1,257},
- {{0x00000000,0x00000000,0x00000000},0x0199,1,257},
- {{0x00000000,0x00000000,0x00000000},0x03de,1,863},
- {{0x00000000,0x00000000,0x00000000},0x310e,1,6814},
- {{0x00000000,0x00000000,0x00000000},0x01e8,1,370},
- {{0x00000000,0x00000000,0x00000000},0x01e9,1,370},
- {{0x00000000,0x00000000,0x00000000},0x041a,1,995},
- {{0x00000000,0x00000000,0x00000000},0x043a,1,995},
- {{0x00000000,0x00000000,0x00000000},0x1e34,1,1821},
- {{0x00000000,0x00000000,0x00000000},0x1e35,1,1821},
- {{0x40000001,0x00000000,0x00000000},0x304b,1,992},
- {{0x00000001,0x00000020,0x00000000},0x30ab,1,992},
- {{0x00010003,0x00000000,0x00000000},0x041a,1,992},
- {{0x00010005,0x00000000,0x00000000},0x043a,1,992},
- {{0x00000005,0x00000020,0x00000000},0x30f5,1,992},
- {{0x20000001,0x00000000,0x00000000},0x05db,1,1231},
- {{0x00000081,0x00000000,0x00000000},0x0643,1,1231},
- {{0x21000001,0x00000000,0x00000000},0x05da,1,1231},
- {{0x00000081,0x00000010,0x00000000},0xfed9,1,1231},
- {{0x01000081,0x00000000,0x00000000},0xfeda,1,1231},
- {{0x00000081,0x00000004,0x00000000},0xfedb,1,1231},
- {{0x00000081,0x00001000,0x00000000},0xfedc,1,1231},
- {{0x08000003,0x00000000,0x00000000},0x039a,1,720},
- {{0x08000005,0x00000000,0x00000000},0x03ba,1,720},
- {{0x00000080,0x00000000,0x00000000},0x0650,1,1620},
- {{0x00000080,0x00000000,0x00000000},0x064d,1,1590},
- {{0x40000001,0x00000000,0x00000000},0x3051,1,6573},
- {{0x00000001,0x00000020,0x00000000},0x30b1,1,6573},
- {{0x00000005,0x00000020,0x00000000},0x30f6,1,6573},
- {{0x00000081,0x00000000,0x00000000},0x062e,1,1429},
- {{0x00000081,0x00000010,0x00000000},0xfea5,1,1429},
- {{0x01000081,0x00000000,0x00000000},0xfea6,1,1429},
- {{0x00000081,0x00000004,0x00000000},0xfea7,1,1429},
- {{0x00000081,0x00001000,0x00000000},0xfea8,1,1429},
- {{0x40000001,0x00000000,0x00000000},0x304d,1,6561},
- {{0x00000001,0x00000020,0x00000000},0x30ad,1,6561},
- {{0x00000000,0x00000000,0x00000000},0x040c,1,931},
- {{0x00000000,0x00000000,0x00000000},0x045c,1,931},
- {{0x00010003,0x00000000,0x00000000},0x040c,1,927},
- {{0x00010005,0x00000000,0x00000000},0x045c,1,927},
- {{0x00000000,0x00000000,0x00000000},0x0138,1,98},
- {{0x40000001,0x00000000,0x00000000},0x3053,1,6579},
- {{0x00000001,0x00000020,0x00000000},0x30b3,1,6579},
- {{0x08000001,0x00000000,0x00000000},0x03de,1,857},
- {{0x00010003,0x00000000,0x00000000},0x0480,1,857},
- {{0x00010005,0x00000000,0x00000000},0x0481,1,857},
- {{0x00000000,0x00000000,0x00000000},0x327f,1,6933},
- {{0x08000000,0x00000000,0x00000000},0x1fbd,1,2653},
- {{0x00000005,0x00000040,0x00000000},0x0138,1,94},
- {{0x00000000,0x00000000,0x00000000},0x327f,1,6956},
- {{0x40000001,0x00000000,0x00000000},0x304f,1,6567},
- {{0x00000001,0x00000020,0x00000000},0x30af,1,6567},
- {{0x00000201,0x00000000,0x00000000},0x310c,0,1568},
- {{0x00000013,0x00000040,0x00000000},0x0139,0,1568},
- {{0x00000015,0x00000040,0x00000000},0x013a,0,1568},
- {{0x00002003,0x00000040,0x00000000},0x013b,0,1568},
- {{0x00002005,0x00000040,0x00000000},0x013c,0,1568},
- {{0x00001003,0x00000040,0x00000000},0x013d,0,1568},
- {{0x00001005,0x00000040,0x00000000},0x013e,0,1568},
- {{0x00000003,0x00000040,0x10000000},0x0141,0,1568},
- {{0x00000005,0x00000040,0x10000000},0x0142,0,1568},
- {{0x00000005,0x00040040,0x00000000},0x24a7,0,1568},
- {{0x00004003,0x00000040,0x00000000},0x24c1,0,1568},
- {{0x00004005,0x00000040,0x00000000},0x24db,0,1568},
- {{0x00080003,0x00000040,0x01000000},0x013f,0,1568},
- {{0x00080005,0x00000040,0x01000000},0x0140,0,1568},
- {{0x00080103,0x00000040,0x00000000},0x1e36,0,1568},
- {{0x00080105,0x00000040,0x00000000},0x1e37,0,1568},
- {{0x00000103,0x00000240,0x00000000},0x1e3a,0,1568},
- {{0x00000105,0x00000240,0x00000000},0x1e3b,0,1568},
- {{0x00008103,0x00000040,0x00000000},0x1e3c,0,1568},
- {{0x00008105,0x00000040,0x00000000},0x1e3d,0,1568},
- {{0x00080103,0x00000440,0x00000000},0x1e38,0,1568},
- {{0x00080105,0x00000440,0x00000000},0x1e39,0,1568},
- {{0x00000007,0x00000040,0x00000000},0x01c8,1,300},
- {{0x00000000,0x00000000,0x00000000},0x24c1,1,5357},
- {{0x00000000,0x00000000,0x00000000},0x24db,1,5357},
- {{0x00000000,0x00000000,0x00000000},0x0139,1,101},
- {{0x00000000,0x00000000,0x00000000},0x013a,1,101},
- {{0x00000000,0x00000000,0x00000000},0x039b,1,735},
- {{0x00000000,0x00000000,0x00000000},0x03bb,1,735},
- {{0x00000000,0x00000000,0x00000000},0x05dc,1,1247},
- {{0x00000000,0x00000000,0x00000000},0x0644,1,1247},
- {{0x00000000,0x00000000,0x00000000},0xfedf,1,7343},
- {{0x00000000,0x00000000,0x00000000},0xfedd,1,7335},
- {{0x00000000,0x00000000,0x00000000},0xfede,1,7339},
- {{0x00000000,0x00000000,0x00000000},0xfee0,1,7347},
- {{0x00000000,0x00000000,0x00000000},0x013b,1,104},
- {{0x00000000,0x00000000,0x00000000},0x013c,1,104},
- {{0x00000000,0x00000000,0x00000000},0x1e38,1,1828},
- {{0x00000000,0x00000000,0x00000000},0x1e39,1,1828},
- {{0x00000000,0x00000000,0x00000000},0x1e36,1,1824},
- {{0x00000000,0x00000000,0x00000000},0x1e37,1,1824},
- {{0x00000000,0x00000000,0x00000000},0x1e3c,1,1836},
- {{0x00000000,0x00000000,0x00000000},0x1e3d,1,1836},
- {{0x00000000,0x00000000,0x00000000},0x013f,1,110},
- {{0x00000000,0x00000000,0x00000000},0x0140,1,110},
- {{0x00000000,0x00000000,0x00000000},0x0141,1,113},
- {{0x00000000,0x00000000,0x00000000},0x0142,1,113},
- {{0x00000000,0x00000000,0x00000000},0x310c,1,6808},
- {{0x00000000,0x00000000,0x00000000},0x013d,1,107},
- {{0x00000000,0x00000000,0x00000000},0x013e,1,107},
- {{0x00000000,0x00000000,0x00000000},0x041b,1,1001},
- {{0x00000000,0x00000000,0x00000000},0x043b,1,1001},
- {{0x00000000,0x00000000,0x00000000},0x1e3a,1,1833},
- {{0x00000000,0x00000000,0x00000000},0x1e3b,1,1833},
- {{0x00000000,0x00000000,0x00000000},0xfefb,1,7467},
- {{0x00000000,0x00000000,0x00000000},0xfefc,1,7471},
- {{0x00000081,0x00000000,0x00000000},0x0644,1,1529},
- {{0x00000081,0x00000010,0x00000000},0xfedd,1,1529},
- {{0x01000081,0x00000000,0x00000000},0xfede,1,1529},
- {{0x00000081,0x00000004,0x00000000},0xfedf,1,1529},
- {{0x00000081,0x00001000,0x00000000},0xfee0,1,1529},
- {{0x000000a1,0x00000010,0x00000100},0xfefb,1,1529},
- {{0x010000a1,0x00000000,0x00000100},0xfefc,1,1529},
- {{0x000000a9,0x00000010,0x00000100},0xfef7,1,7449},
- {{0x010000a9,0x00000000,0x00000100},0xfef8,1,7449},
- {{0x000001a1,0x00000010,0x00000100},0xfef9,1,7449},
- {{0x010001a1,0x00000000,0x00000100},0xfefa,1,7449},
- {{0x000000a9,0x00000010,0x00000100},0xfef5,1,7431},
- {{0x010000a9,0x00000000,0x00000100},0xfef6,1,7431},
- {{0x08000003,0x00000000,0x00000000},0x039b,1,729},
- {{0x08000005,0x00000000,0x00000000},0x03bb,1,729},
- {{0x20000001,0x00000000,0x00000000},0x05dc,1,1241},
- {{0x00000000,0x00000000,0x00000000},0x25ef,1,6028},
- {{0x00000000,0x00000000,0x00800000},0x223e,1,4423},
- {{0x00000000,0x00000000,0x00000000},0x2584,1,5683},
- {{0x00000000,0x00000000,0x00000000},0x258c,1,5683},
- {{0x00000000,0x00000000,0x00000000},0x2557,1,5622},
- {{0x00000000,0x00000000,0x00000000},0x2513,1,5512},
- {{0x00000000,0x00000000,0x00002000},0x2190,1,3857},
- {{0x00100000,0x00000000,0x00002000},0x21d0,1,3857},
- {{0x00000000,0x00000080,0x00020004},0x3010,1,6451},
- {{0x00000000,0x00400000,0x00020004},0x3011,1,6451},
- {{0x00000000,0x80000080,0x00020000},0x3016,1,6451},
- {{0x00000000,0x80400000,0x00020000},0x3017,1,6451},
- {{0x00000000,0x04000000,0x00015000},0x2264,0,1497},
- {{0x00000000,0x00000000,0x00000000},0xfef7,1,7459},
- {{0x00000000,0x00000000,0x00000000},0xfef9,1,7459},
- {{0x00000000,0x00000000,0x00000000},0xfef8,1,7463},
- {{0x00000000,0x00000000,0x00000000},0xfefa,1,7463},
- {{0x00000000,0x00000000,0x00000000},0x2028,1,3087},
- {{0x00000001,0x00000000,0x00000000},0x20a4,1,3328},
- {{0x00000000,0x00000000,0x00000000},0x0409,1,293},
- {{0x00000000,0x00000000,0x00000000},0x0459,1,293},
- {{0x00000003,0x00000040,0x00000000},0x01c7,1,293},
- {{0x00000005,0x00000040,0x00000000},0x01c9,1,293},
- {{0x00000000,0x00000000,0x00000000},0x01c7,1,296},
- {{0x00000000,0x00000000,0x00000000},0x01c8,1,296},
- {{0x00000000,0x00000000,0x00000000},0x01c9,1,296},
- {{0x00010003,0x00000000,0x00000000},0x0409,1,914},
- {{0x00010005,0x00000000,0x00000000},0x0459,1,914},
- {{0x00000000,0x00000000,0x00000000},0xfef5,1,7441},
- {{0x00000000,0x00000000,0x00000000},0xfef6,1,7445},
- {{0x00000001,0x00000000,0x00000000},0x2227,1,4308},
- {{0x00000000,0x00000000,0x00010000},0x2228,1,4308},
- {{0x00000005,0x00000040,0x00000000},0x017f,1,235},
- {{0x00000004,0x00000040,0x00000100},0xfb05,1,6974},
- {{0x00100000,0x00000200,0x00000000},0x2017,0,1641},
- {{0x00000000,0x01000800,0x00000000},0x201a,1,2929},
- {{0x00100000,0x00000800,0x00000000},0x201e,1,2929},
- {{0x08000001,0x00004000,0x00000000},0x0375,1,566},
- {{0x00000000,0x00000000,0x00080000},0x2584,1,5671},
- {{0x00000000,0x00400000,0x00000004},0x25e2,1,6008},
- {{0x00000000,0x00000080,0x00000004},0x25e3,1,6008},
- {{0x00000000,0x00000000,0x00000000},0x25ca,1,5936},
- {{0x00000000,0x00000000,0x00000000},0x200e,1,2886},
- {{0x00000000,0x00000000,0x00000000},0x25ca,1,5944},
- {{0x00000201,0x00000000,0x00000000},0x3107,0,1570},
- {{0x00000013,0x00000040,0x00000000},0x1e3e,0,1570},
- {{0x00000015,0x00000040,0x00000000},0x1e3f,0,1570},
- {{0x00000005,0x00040040,0x00000000},0x24a8,0,1570},
- {{0x00004003,0x00000040,0x00000000},0x24c2,0,1570},
- {{0x00004005,0x00000040,0x00000000},0x24dc,0,1570},
- {{0x0008000b,0x00000040,0x00000000},0x1e40,0,1570},
- {{0x0008000d,0x00000040,0x00000000},0x1e41,0,1570},
- {{0x00080103,0x00000040,0x00000000},0x1e42,0,1570},
- {{0x00080105,0x00000040,0x00000000},0x1e43,0,1570},
- {{0x00000000,0x00000000,0x00000000},0x24c2,1,5361},
- {{0x00000000,0x00000000,0x00000000},0x24dc,1,5361},
- {{0x00000000,0x00000000,0x00000000},0x05dd,1,1254},
- {{0x00000000,0x00000000,0x00000000},0x1e3e,1,1840},
- {{0x00000000,0x00000000,0x00000000},0x1e3f,1,1840},
- {{0x00000000,0x00000000,0x00000000},0x039c,1,741},
- {{0x00000000,0x00000000,0x00000000},0x03bc,1,741},
- {{0x00000000,0x00000000,0x00000000},0x05de,1,1257},
- {{0x00000000,0x00000000,0x00000000},0x0645,1,1257},
- {{0x00000000,0x00000000,0x00000000},0xfee3,1,7359},
- {{0x00000000,0x00000000,0x00000000},0xfee1,1,7351},
- {{0x00000000,0x00000000,0x00000000},0xfee2,1,7355},
- {{0x00000000,0x00000000,0x00000000},0xfee4,1,7363},
- {{0x00000000,0x00000000,0x00000000},0x1e42,1,1846},
- {{0x00000000,0x00000000,0x00000000},0x1e43,1,1846},
- {{0x00000000,0x00000000,0x00000000},0x1e40,1,1843},
- {{0x00000000,0x00000000,0x00000000},0x1e41,1,1843},
- {{0x00000000,0x00000000,0x00000000},0x266c,1,6256},
- {{0x00000000,0x00000000,0x00000000},0x266b,1,6230},
- {{0x00000000,0x00000000,0x00000000},0x03dc,1,854},
- {{0x00000000,0x00000000,0x00000000},0x3107,1,6796},
- {{0x00000000,0x00000000,0x00000000},0x266a,1,6203},
- {{0x00000000,0x00000000,0x00000000},0x041c,1,1004},
- {{0x00000000,0x00000000,0x00000000},0x043c,1,1004},
- {{0x40000001,0x00000000,0x00000000},0x307e,1,6633},
- {{0x00000001,0x00000020,0x00000000},0x30de,1,6633},
- {{0x000000a9,0x00000000,0x00000000},0x0622,1,1348},
- {{0x000000a9,0x00000010,0x00000000},0xfe81,1,1348},
- {{0x010000a9,0x00000000,0x00000000},0xfe82,1,1348},
- {{0x000000a1,0x00000000,0x00000000},0x0649,1,1551},
- {{0x000000a1,0x00000010,0x00000000},0xfeef,1,1551},
- {{0x010000a1,0x00000000,0x00000000},0xfef0,1,1551},
- {{0x00000001,0x00000000,0x00000000},0x2642,1,6125},
- {{0x00000000,0x00000000,0x00000000},0x2720,1,6324},
- {{0x00000000,0x00000000,0x00000000},0x266d,1,6271},
- {{0x00000000,0x00000000,0x00000000},0x2669,1,6188},
- {{0x40000001,0x00000000,0x00000000},0x3081,1,6639},
- {{0x00000001,0x00000020,0x00000000},0x30e1,1,6639},
- {{0x00000000,0x00000000,0x00000000},0x2592,1,5707},
- {{0x00000081,0x00000000,0x00000000},0x0645,1,1533},
- {{0x00000081,0x00000010,0x00000000},0xfee1,1,1533},
- {{0x01000081,0x00000000,0x00000000},0xfee2,1,1533},
- {{0x00000081,0x00000004,0x00000000},0xfee3,1,1533},
- {{0x00000081,0x00001000,0x00000000},0xfee4,1,1533},
- {{0x20000001,0x00000000,0x00000000},0x05de,1,1250},
- {{0x21000001,0x00000000,0x00000000},0x05dd,1,1250},
- {{0x40000001,0x00000000,0x00000000},0x307f,1,6636},
- {{0x00000001,0x00000020,0x00000000},0x30df,1,6636},
- {{0x00000001,0x00000000,0x00000000},0x2212,1,3297},
- {{0x00000000,0x00000000,0x00000020},0x207b,1,3297},
- {{0x00000000,0x00000000,0x00000040},0x208b,1,3297},
- {{0x00000001,0x00000000,0x00010000},0x2213,1,4185},
- {{0x00000000,0x00000000,0x00000000},0x2642,1,6130},
- {{0x40000001,0x00000000,0x00000000},0x3082,1,6642},
- {{0x00000001,0x00000020,0x00000000},0x30e2,1,6642},
- {{0x00000001,0x00000400,0x00000000},0x02c9,1,507},
- {{0x00008001,0x00000000,0x00000000},0x02c6,1,485},
- {{0x04000001,0x00000000,0x00000000},0x02cb,1,485},
- {{0x00000001,0x00000000,0x00000000},0x02bb,1,460},
- {{0x40000001,0x00000000,0x00000000},0x3080,1,738},
- {{0x00000001,0x00000020,0x00000000},0x30e0,1,738},
- {{0x08000003,0x00000000,0x00000000},0x039c,1,738},
- {{0x08000005,0x00000000,0x00000000},0x03bc,1,738},
- {{0x00000000,0x00000000,0x00004000},0x226b,1,4543},
- {{0x00000000,0x00000000,0x00004000},0x226a,1,4530},
- {{0x00000001,0x00000000,0x00000000},0x266d,1,6260},
- {{0x00000001,0x00000000,0x00000000},0x266e,1,6274},
- {{0x00000001,0x00000000,0x00000000},0x266f,1,6291},
- {{0x00000000,0x00000000,0x00000000},0x266e,1,6288},
- {{0x00000000,0x00000000,0x00000000},0x266f,1,6288},
- {{0x40000001,0x00000000,0x00000000},0x3093,0,1572},
- {{0x00000001,0x00000020,0x00000000},0x30f3,0,1572},
- {{0x00000201,0x00000000,0x00000000},0x310b,0,1572},
- {{0x00000013,0x00000040,0x00000000},0x0143,0,1572},
- {{0x00000015,0x00000040,0x00000000},0x0144,0,1572},
- {{0x00002003,0x00000040,0x00000000},0x0145,0,1572},
- {{0x00002005,0x00000040,0x00000000},0x0146,0,1572},
- {{0x00001003,0x00000040,0x00000000},0x0147,0,1572},
- {{0x00001005,0x00000040,0x00000000},0x0148,0,1572},
- {{0x00000005,0x00000040,0x00000020},0x207f,0,1572},
- {{0x00000005,0x00040040,0x00000000},0x24a9,0,1572},
- {{0x00004003,0x00000040,0x00000000},0x24c3,0,1572},
- {{0x00004005,0x00000040,0x00000000},0x24dd,0,1572},
- {{0x0008000b,0x00000040,0x00000000},0x1e44,0,1572},
- {{0x0008000d,0x00000040,0x00000000},0x1e45,0,1572},
- {{0x00080103,0x00000040,0x00000000},0x1e46,0,1572},
- {{0x00080105,0x00000040,0x00000000},0x1e47,0,1572},
- {{0x00000103,0x00000240,0x00000000},0x1e48,0,1572},
- {{0x00000105,0x00000240,0x00000000},0x1e49,0,1572},
- {{0x00008103,0x00000040,0x00000000},0x1e4a,0,1572},
- {{0x00008105,0x00000040,0x00000000},0x1e4b,0,1572},
- {{0x00000000,0x00000000,0x00000000},0x220f,1,4146},
- {{0x00000000,0x00000000,0x00000000},0x2211,1,4163},
- {{0x00000007,0x00000040,0x00000000},0x01cb,1,311},
- {{0x00000000,0x00000000,0x00000000},0x24c3,1,5365},
- {{0x00000000,0x00000000,0x00000000},0x24dd,1,5365},
- {{0x00000005,0x00000040,0x00000000},0x0149,1,125},
- {{0x00000000,0x00000000,0x00000000},0x05df,1,1264},
- {{0x00000000,0x00000000,0x00000000},0x0143,1,116},
- {{0x00000000,0x00000000,0x00000000},0x0144,1,116},
- {{0x00000000,0x00000000,0x00000000},0x039d,1,744},
- {{0x00000000,0x00000000,0x00000000},0x03bd,1,744},
- {{0x00000000,0x00000000,0x00000000},0x05e0,1,1267},
- {{0x00000000,0x00000000,0x00000000},0x0646,1,1267},
- {{0x00000000,0x00000000,0x00000000},0xfee7,1,7375},
- {{0x00000000,0x00000000,0x00000000},0xfee5,1,7367},
- {{0x00000000,0x00000000,0x00000000},0xfee6,1,7371},
- {{0x00000000,0x00000000,0x00000000},0xfee8,1,7379},
- {{0x00000000,0x00000000,0x00000000},0x0145,1,119},
- {{0x00000000,0x00000000,0x00000000},0x0146,1,119},
- {{0x00000000,0x00000000,0x00000000},0x1e46,1,1853},
- {{0x00000000,0x00000000,0x00000000},0x1e47,1,1853},
- {{0x00000000,0x00000000,0x00000000},0x1e4a,1,1860},
- {{0x00000000,0x00000000,0x00000000},0x1e4b,1,1860},
- {{0x00000000,0x00000000,0x00000000},0x1e44,1,1850},
- {{0x00000000,0x00000000,0x00000000},0x1e45,1,1850},
- {{0x00000000,0x00000000,0x00000000},0x2116,1,3418},
- {{0x00000000,0x00000000,0x00000000},0x310b,1,6805},
- {{0x00000000,0x00000000,0x00000000},0x3093,1,6669},
- {{0x00000000,0x00000000,0x00000000},0x30f3,1,6750},
- {{0x00000000,0x00000000,0x00000000},0x0147,1,122},
- {{0x00000000,0x00000000,0x00000000},0x0148,1,122},
- {{0x00000000,0x00000000,0x00000000},0x041d,1,1010},
- {{0x00000000,0x00000000,0x00000000},0x043d,1,1010},
- {{0x00000000,0x00000000,0x00000000},0x1e48,1,1857},
- {{0x00000000,0x00000000,0x00000000},0x1e49,1,1857},
- {{0x40000001,0x00000000,0x00000000},0x306a,1,6612},
- {{0x00000001,0x00000020,0x00000000},0x30ca,1,6612},
- {{0x00000000,0x00000000,0x00000000},0x2207,1,4098},
- {{0x00000000,0x00000000,0x00000000},0x2207,0,1314},
- {{0x40000001,0x00000000,0x00000000},0x306d,1,6615},
- {{0x00000001,0x00000020,0x00000000},0x30cd,1,6615},
- {{0x00000000,0x00000000,0x00000000},0x014a,1,157},
- {{0x00000000,0x00000000,0x00000000},0x014b,1,157},
- {{0x00000201,0x00000000,0x00000000},0x312b,1,157},
- {{0x00000000,0x00000000,0x00000000},0x2310,1,4682},
- {{0x40000001,0x00000000,0x00000000},0x306b,1,4682},
- {{0x00000001,0x00000020,0x00000000},0x30cb,1,4682},
- {{0x00000000,0x00000000,0x00000020},0x2079,0,1476},
- {{0x00000000,0x00000000,0x00000040},0x2089,0,1476},
- {{0x00004001,0x00000000,0x00000000},0x2468,0,1476},
- {{0x00000001,0x00040000,0x00000000},0x247c,0,1476},
- {{0x00000081,0x00000000,0x00000400},0x0669,0,1476},
- {{0x00000000,0x00804000,0x00000000},0x2168,0,1476},
- {{0x02000001,0x00000000,0x00000002},0x2490,0,1476},
- {{0x00000000,0x00040000,0x00000800},0x3228,0,1476},
- {{0x00000004,0x00804000,0x00000000},0x2178,0,1476},
- {{0x00004000,0x00002000,0x00000000},0x2472,1,5021},
- {{0x00000000,0x00042000,0x00000000},0x2486,1,5021},
- {{0x02000000,0x00002000,0x00000002},0x249a,1,5021},
- {{0x00000000,0x00000000,0x00000000},0x040a,1,304},
- {{0x00000000,0x00000000,0x00000000},0x045a,1,304},
- {{0x00000003,0x00000040,0x00000000},0x01ca,1,304},
- {{0x00000005,0x00000040,0x00000000},0x01cc,1,304},
- {{0x00000000,0x00000000,0x00000000},0x01ca,1,307},
- {{0x00000000,0x00000000,0x00000000},0x01cb,1,307},
- {{0x00000000,0x00000000,0x00000000},0x01cc,1,307},
- {{0x00010003,0x00000000,0x00000000},0x040a,1,918},
- {{0x00010005,0x00000000,0x00000000},0x045a,1,918},
- {{0x40000001,0x00000000,0x00000000},0x306e,0,2642},
- {{0x00000001,0x00000020,0x00000000},0x30ce,0,2642},
- {{0x00000081,0x00000000,0x00000000},0x0646,1,1538},
- {{0x00000081,0x00000010,0x00000000},0xfee5,1,1538},
- {{0x01000081,0x00000000,0x00000000},0xfee6,1,1538},
- {{0x00000081,0x00000004,0x00000000},0xfee7,1,1538},
- {{0x00000081,0x00001000,0x00000000},0xfee8,1,1538},
- {{0x00000000,0x00000000,0x00002000},0x2197,1,3929},
- {{0x00000000,0x00000000,0x00002000},0x2196,1,3914},
- {{0x00000000,0x04000000,0x00001000},0x2260,0,2638},
- {{0x00000000,0x00000000,0x00004000},0x226f,1,4571},
- {{0x00000000,0x00000000,0x00004000},0x226e,1,4559},
- {{0x00000000,0x00000000,0x00000000},0x207f,0,2485},
- {{0x40000001,0x00000000,0x00000000},0x306c,0,707},
- {{0x00000001,0x00000020,0x00000000},0x30cc,0,707},
- {{0x08000003,0x00000000,0x00000000},0x039d,0,707},
- {{0x08000005,0x00000000,0x00000000},0x03bd,0,707},
- {{0x00000001,0x00000000,0x00000000},0x2116,1,3411},
- {{0x20000001,0x00000000,0x00000000},0x05e0,1,1260},
- {{0x21000001,0x00000000,0x00000000},0x05df,1,1260},
- {{0x40000001,0x00000000,0x00000000},0x304a,0,1574},
- {{0x00000001,0x00000020,0x00000000},0x30aa,0,1574},
- {{0x00000201,0x00000000,0x00000000},0x311b,0,1574},
- {{0x00010003,0x00000000,0x00000000},0x041e,0,1574},
- {{0x00010005,0x00000000,0x00000000},0x043e,0,1574},
- {{0x40000005,0x00000000,0x00000000},0x3049,0,1574},
- {{0x00000005,0x00000020,0x00000000},0x30a9,0,1574},
- {{0x00000003,0x00000440,0x00000000},0x014c,0,1574},
- {{0x00000005,0x00000440,0x00000000},0x014d,0,1574},
- {{0x00000803,0x00000040,0x00000000},0x014e,0,1574},
- {{0x00000805,0x00000040,0x00000000},0x014f,0,1574},
- {{0x00000003,0x00000042,0x00000000},0x01a0,0,1574},
- {{0x00000005,0x00000042,0x00000000},0x01a1,0,1574},
- {{0x00001003,0x00000040,0x00000000},0x01d1,0,1574},
- {{0x00001005,0x00000040,0x00000000},0x01d2,0,1574},
- {{0x00000003,0x00000040,0x02000000},0x01ea,0,1574},
- {{0x00000005,0x00000040,0x02000000},0x01eb,0,1574},
- {{0x00000005,0x00040040,0x00000000},0x24aa,0,1574},
- {{0x00004003,0x00000040,0x00000000},0x24c4,0,1574},
- {{0x00004005,0x00000040,0x00000000},0x24de,0,1574},
- {{0x00100013,0x00000040,0x00000000},0x0150,0,1574},
- {{0x00100015,0x00000040,0x00000000},0x0151,0,1574},
- {{0x00000003,0x00000440,0x02000000},0x01ec,0,1574},
- {{0x00000005,0x00000440,0x02000000},0x01ed,0,1574},
- {{0x00000013,0x00000040,0x10000000},0x01fe,0,1574},
- {{0x00000015,0x00000040,0x10000000},0x01ff,0,1574},
- {{0x04100003,0x00000040,0x00000000},0x020c,0,1574},
- {{0x04100005,0x00000040,0x00000000},0x020d,0,1574},
- {{0x00000803,0x00000040,0x00800000},0x020e,0,1574},
- {{0x00000805,0x00000040,0x00800000},0x020f,0,1574},
- {{0x00000013,0x02000040,0x00000000},0x1e4c,0,1574},
- {{0x00000015,0x02000040,0x00000000},0x1e4d,0,1574},
- {{0x00040003,0x02000040,0x00000000},0x1e4e,0,1574},
- {{0x00040005,0x02000040,0x00000000},0x1e4f,0,1574},
- {{0x04000003,0x00000440,0x00000000},0x1e50,0,1574},
- {{0x04000005,0x00000440,0x00000000},0x1e51,0,1574},
- {{0x00000013,0x00000440,0x00000000},0x1e52,0,1574},
- {{0x00000015,0x00000440,0x00000000},0x1e53,0,1574},
- {{0x00080103,0x00000040,0x00000000},0x1ecc,0,1574},
- {{0x00080105,0x00000040,0x00000000},0x1ecd,0,1574},
- {{0x8000000b,0x00000040,0x00000000},0x1ece,0,1574},
- {{0x8000000d,0x00000040,0x00000000},0x1ecf,0,1574},
- {{0x00008013,0x00000040,0x00000000},0x1ed0,0,1574},
- {{0x00008015,0x00000040,0x00000000},0x1ed1,0,1574},
- {{0x04008003,0x00000040,0x00000000},0x1ed2,0,1574},
- {{0x04008005,0x00000040,0x00000000},0x1ed3,0,1574},
- {{0x00008003,0x02000040,0x00000000},0x1ed6,0,1574},
- {{0x00008005,0x02000040,0x00000000},0x1ed7,0,1574},
- {{0x00000013,0x00000042,0x00000000},0x1eda,0,1574},
- {{0x00000015,0x00000042,0x00000000},0x1edb,0,1574},
- {{0x04000003,0x00000042,0x00000000},0x1edc,0,1574},
- {{0x04000005,0x00000042,0x00000000},0x1edd,0,1574},
- {{0x00000003,0x02000042,0x00000000},0x1ee0,0,1574},
- {{0x00000005,0x02000042,0x00000000},0x1ee1,0,1574},
- {{0x8000800b,0x00000040,0x00000000},0x1ed4,0,1574},
- {{0x8000800d,0x00000040,0x00000000},0x1ed5,0,1574},
- {{0x00088103,0x00000040,0x00000000},0x1ed8,0,1574},
- {{0x00088105,0x00000040,0x00000000},0x1ed9,0,1574},
- {{0x8000000b,0x00000042,0x00000000},0x1ede,0,1574},
- {{0x8000000d,0x00000042,0x00000000},0x1edf,0,1574},
- {{0x00080103,0x00000042,0x00000000},0x1ee2,0,1574},
- {{0x00080105,0x00000042,0x00000000},0x1ee3,0,1574},
- {{0x00000000,0x00000000,0x00000000},0x24c4,1,5369},
- {{0x00000000,0x00000000,0x00000000},0x24de,1,5369},
- {{0x00000000,0x00000000,0x00000000},0x020c,1,425},
- {{0x00000000,0x00000000,0x00000000},0x020d,1,425},
- {{0x00000000,0x00000000,0x00000000},0x0150,1,166},
- {{0x00000000,0x00000000,0x00000000},0x0151,1,166},
- {{0x00000000,0x00000000,0x00000000},0x038c,1,653},
- {{0x00000000,0x00000000,0x00000000},0x03cc,1,653},
- {{0x00000000,0x00000000,0x00000000},0x014e,1,163},
- {{0x00000000,0x00000000,0x00000000},0x014f,1,163},
- {{0x00000000,0x00000000,0x00000000},0x020e,1,429},
- {{0x00000000,0x00000000,0x00000000},0x020f,1,429},
- {{0x00000000,0x00000000,0x00000000},0x039f,1,753},
- {{0x00000000,0x00000000,0x00000000},0x03bf,1,753},
- {{0x00000000,0x00000000,0x00000000},0x1f78,1,2453},
- {{0x00000000,0x00000000,0x00000000},0x1ff8,1,2453},
- {{0x00000000,0x00000000,0x00000000},0x1f79,1,2457},
- {{0x00000000,0x00000000,0x00000000},0x1ff9,1,2457},
- {{0x00000000,0x00000000,0x00000000},0x1f40,1,2317},
- {{0x00000000,0x00000000,0x00000000},0x1f48,1,2317},
- {{0x00000000,0x00000000,0x00000000},0x1f42,1,2325},
- {{0x00000000,0x00000000,0x00000000},0x1f4a,1,2325},
- {{0x00000000,0x00000000,0x00000000},0x1f44,1,2335},
- {{0x00000000,0x00000000,0x00000000},0x1f4c,1,2335},
- {{0x00000000,0x00000000,0x00000000},0x1f41,1,2321},
- {{0x00000000,0x00000000,0x00000000},0x1f49,1,2321},
- {{0x00000000,0x00000000,0x00000000},0x1f43,1,2330},
- {{0x00000000,0x00000000,0x00000000},0x1f4b,1,2330},
- {{0x00000000,0x00000000,0x00000000},0x1f45,1,2340},
- {{0x00000000,0x00000000,0x00000000},0x1f4d,1,2340},
- {{0x00000000,0x00000000,0x00000000},0x014c,1,160},
- {{0x00000000,0x00000000,0x00000000},0x014d,1,160},
- {{0x00000000,0x00000000,0x00000000},0x1e50,1,1872},
- {{0x00000000,0x00000000,0x00000000},0x1e51,1,1872},
- {{0x00000000,0x00000000,0x00000000},0x1e52,1,1876},
- {{0x00000000,0x00000000,0x00000000},0x1e53,1,1876},
- {{0x00000000,0x00000000,0x00000000},0x1ecc,1,2085},
- {{0x00000000,0x00000000,0x00000000},0x1ecd,1,2085},
- {{0x00000000,0x00000000,0x00000000},0x01fe,1,400},
- {{0x00000000,0x00000000,0x00000000},0x01ff,1,400},
- {{0x00000000,0x00000000,0x00000000},0x01ec,1,376},
- {{0x00000000,0x00000000,0x00000000},0x01ed,1,376},
- {{0x00000000,0x00000000,0x00000000},0x1ece,1,2089},
- {{0x00000000,0x00000000,0x00000000},0x1ecf,1,2089},
- {{0x00000000,0x00000000,0x00000000},0x046a,1,1132},
- {{0x00000000,0x00000000,0x00000000},0x046b,1,1132},
- {{0x00000000,0x00000000,0x00000000},0x311b,1,6844},
- {{0x00000000,0x00000000,0x00000000},0x3049,1,6555},
- {{0x00000000,0x00000000,0x00000000},0x304a,1,6555},
- {{0x00000000,0x00000000,0x00000000},0x30a9,1,6747},
- {{0x00000000,0x00000000,0x00000000},0x30aa,1,6747},
- {{0x00000000,0x00000000,0x00000000},0x01a0,1,260},
- {{0x00000000,0x00000000,0x00000000},0x01a1,1,260},
- {{0x00000000,0x00000000,0x00000000},0x1edc,1,2117},
- {{0x00000000,0x00000000,0x00000000},0x1edd,1,2117},
- {{0x00000000,0x00000000,0x00000000},0x1eda,1,2113},
- {{0x00000000,0x00000000,0x00000000},0x1edb,1,2113},
- {{0x00000000,0x00000000,0x00000000},0x1ee2,1,2129},
- {{0x00000000,0x00000000,0x00000000},0x1ee3,1,2129},
- {{0x00000000,0x00000000,0x00000000},0x1ede,1,2121},
- {{0x00000000,0x00000000,0x00000000},0x1edf,1,2121},
- {{0x00000000,0x00000000,0x00000000},0x1ee0,1,2125},
- {{0x00000000,0x00000000,0x00000000},0x1ee1,1,2125},
- {{0x00000000,0x00000000,0x00000000},0x01ea,1,373},
- {{0x00000000,0x00000000,0x00000000},0x01eb,1,373},
- {{0x00000000,0x00000000,0x00000000},0x01d1,1,321},
- {{0x00000000,0x00000000,0x00000000},0x01d2,1,321},
- {{0x00000000,0x00000000,0x00000000},0x041e,1,1013},
- {{0x00000000,0x00000000,0x00000000},0x043e,1,1013},
- {{0x00000000,0x00000000,0x00000000},0x1ed2,1,2096},
- {{0x00000000,0x00000000,0x00000000},0x1ed3,1,2096},
- {{0x00000000,0x00000000,0x00000000},0x1ed0,1,2092},
- {{0x00000000,0x00000000,0x00000000},0x1ed1,1,2092},
- {{0x00000000,0x00000000,0x00000000},0x1ed8,1,2108},
- {{0x00000000,0x00000000,0x00000000},0x1ed9,1,2108},
- {{0x00000000,0x00000000,0x00000000},0x1ed4,1,2100},
- {{0x00000000,0x00000000,0x00000000},0x1ed5,1,2100},
- {{0x00000000,0x00000000,0x00000000},0x1ed6,1,2104},
- {{0x00000000,0x00000000,0x00000000},0x1ed7,1,2104},
- {{0x00000000,0x00000000,0x00000000},0x1e4c,1,1864},
- {{0x00000000,0x00000000,0x00000000},0x1e4d,1,1864},
- {{0x00000000,0x00000000,0x00000000},0x1e4e,1,1868},
- {{0x00000000,0x00000000,0x00000000},0x1e4f,1,1868},
- {{0x00000000,0x00000000,0x00000000},0x2218,1,4232},
- {{0x00000000,0x00000000,0x00000000},0x2103,0,2415},
- {{0x00000000,0x00000000,0x00000000},0x0152,1,169},
- {{0x00000000,0x00000000,0x00000000},0x0153,1,169},
- {{0x00000002,0x00000040,0x00000100},0x0152,1,169},
- {{0x00000004,0x00000040,0x00000100},0x0153,1,169},
- {{0x00000001,0x00000000,0x00000000},0x2126,1,3488},
- {{0x00000000,0x00000000,0x00000000},0x01a2,1,263},
- {{0x00000000,0x00000000,0x00000000},0x01a3,1,263},
- {{0x00000003,0x00000040,0x00000000},0x01a2,1,263},
- {{0x00000005,0x00000040,0x00000000},0x01a3,1,263},
- {{0x00000000,0x00000000,0x00000000},0x2713,1,6309},
- {{0x00000000,0x00000000,0x00000000},0x2126,1,3492},
- {{0x08000003,0x00000000,0x00000000},0x039f,1,645},
- {{0x08000005,0x00000000,0x00000000},0x03bf,1,645},
- {{0x08000003,0x00000000,0x20000000},0x038c,1,645},
- {{0x08000005,0x00000000,0x20000000},0x03cc,1,645},
- {{0x08000005,0x00200000,0x00000000},0x1f40,1,645},
- {{0x08020005,0x00000000,0x00000000},0x1f41,1,645},
- {{0x08000003,0x00200000,0x00000000},0x1f48,1,645},
- {{0x08020003,0x00000000,0x00000000},0x1f49,1,645},
- {{0x08000005,0x20000000,0x00000000},0x1f78,1,645},
- {{0x08000005,0x00020000,0x00000000},0x1f79,1,645},
- {{0x08000003,0x20000000,0x00000000},0x1ff8,1,645},
- {{0x08000003,0x00020000,0x00000000},0x1ff9,1,645},
- {{0x08000005,0x20200000,0x00000000},0x1f42,1,645},
- {{0x08020005,0x20000000,0x00000000},0x1f43,1,645},
- {{0x08000005,0x00220000,0x00000000},0x1f44,1,645},
- {{0x08020005,0x00020000,0x00000000},0x1f45,1,645},
- {{0x08000003,0x20200000,0x00000000},0x1f4a,1,645},
- {{0x08020003,0x20000000,0x00000000},0x1f4b,1,645},
- {{0x08000003,0x00220000,0x00000000},0x1f4c,1,645},
- {{0x08020003,0x00020000,0x00000000},0x1f4d,1,645},
- {{0x00000400,0x00000000,0x00000000},0x2423,1,4788},
- {{0x00000000,0x00000000,0x04000000},0x2218,1,4223},
- {{0x00000000,0x02000000,0x00000000},0x223c,1,4223},
- {{0x00080000,0x00000000,0x00000000},0x22c5,1,4223},
- {{0x00084000,0x00000000,0x00000000},0x2299,1,4223},
- {{0x00004000,0x00000000,0x04000000},0x229a,1,4223},
- {{0x00000001,0x00000000,0x00000080},0x25a6,1,5784},
- {{0x00000000,0x00000000,0x00000000},0x25a1,1,5737},
- {{0x00000201,0x00000000,0x00000000},0x3121,1,6863},
- {{0x00000000,0x00000000,0x00000000},0x203e,1,3241},
- {{0x00000201,0x00000000,0x00000000},0x3106,0,1576},
- {{0x00000013,0x00000040,0x00000000},0x1e54,0,1576},
- {{0x00000015,0x00000040,0x00000000},0x1e55,0,1576},
- {{0x00000005,0x00040040,0x00000000},0x24ab,0,1576},
- {{0x00004003,0x00000040,0x00000000},0x24c5,0,1576},
- {{0x00004005,0x00000040,0x00000000},0x24df,0,1576},
- {{0x0008000b,0x00000040,0x00000000},0x1e56,0,1576},
- {{0x0008000d,0x00000040,0x00000000},0x1e57,0,1576},
- {{0x00000000,0x00000000,0x00000000},0x24c5,1,5373},
- {{0x00000000,0x00000000,0x00000000},0x24df,1,5373},
- {{0x00000000,0x00000000,0x00000000},0x05e3,1,1288},
- {{0x00000000,0x00000000,0x00000000},0x1e54,1,1880},
- {{0x00000000,0x00000000,0x00000000},0x1e55,1,1880},
- {{0x00000000,0x00000000,0x00000000},0x03a0,1,756},
- {{0x00000000,0x00000000,0x00000000},0x03c0,1,756},
- {{0x00000000,0x00000000,0x00000000},0x05e4,1,1291},
- {{0x00000000,0x00000000,0x00000000},0x067e,1,1291},
- {{0x00000000,0x00000000,0x00000000},0x1e56,1,1883},
- {{0x00000000,0x00000000,0x00000000},0x1e57,1,1883},
- {{0x00000000,0x00000000,0x00000000},0x03e0,1,872},
- {{0x00000000,0x00000000,0x00000000},0x3106,1,6793},
- {{0x00000000,0x00000000,0x00000000},0x041f,1,1019},
- {{0x00000000,0x00000000,0x00000000},0x043f,1,1019},
- {{0x40000001,0x00000000,0x00000000},0x3071,0,1717},
- {{0x00000001,0x00000020,0x00000000},0x30d1,0,1717},
- {{0x00000000,0x00000000,0x00000000},0x2029,1,3095},
- {{0x00000000,0x04000000,0x00000000},0x2225,1,4296},
- {{0x00000000,0x00000080,0x00000020},0x207d,0,1362},
- {{0x00000000,0x00400000,0x00000020},0x207e,0,1362},
- {{0x00000000,0x00000080,0x00000040},0x208d,0,1362},
- {{0x00000000,0x00400000,0x00000040},0x208e,0,1362},
- {{0x00000000,0x00000000,0x00000000},0x2029,1,3115},
- {{0x00000000,0x00000000,0x00000000},0x2202,1,4038},
- {{0x20000001,0x00000000,0x00000000},0x05e4,1,1016},
- {{0x40000001,0x00000000,0x00000000},0x307a,1,1016},
- {{0x00000001,0x00000020,0x00000000},0x30da,1,1016},
- {{0x00010003,0x00000000,0x00000000},0x041f,1,1016},
- {{0x00010005,0x00000000,0x00000000},0x043f,1,1016},
- {{0x21000001,0x00000000,0x00000000},0x05e3,1,1016},
- {{0x00000081,0x00000000,0x00000000},0x067e,1,1684},
- {{0x00000001,0x00000000,0x00000000},0x2030,1,3122},
- {{0x00000081,0x00000000,0x00000000},0x066a,0,1333},
- {{0x00000001,0x00000000,0x00000000},0x20a7,1,3333},
- {{0x08000003,0x00000000,0x00000000},0x03a6,1,785},
- {{0x08000005,0x00000000,0x00000000},0x03c6,1,785},
- {{0x40000001,0x00000000,0x00000000},0x3074,0,2727},
- {{0x00000001,0x00000020,0x00000000},0x30d4,0,2727},
- {{0x08000003,0x00000000,0x00000000},0x03a0,0,2727},
- {{0x08000005,0x00000000,0x00000000},0x03c0,0,2727},
- {{0x00000000,0x00000000,0x00000000},0x25c4,1,5919},
- {{0x00000001,0x00000000,0x00000001},0x2318,1,4714},
- {{0x00000001,0x00000000,0x00000020},0x207a,0,1383},
- {{0x00000001,0x00000000,0x00000040},0x208a,0,1383},
- {{0x00080000,0x00000000,0x00000000},0x2214,0,1383},
- {{0x00000000,0x00000000,0x00000080},0x33d8,0,2438},
- {{0x00000000,0x00000000,0x00000000},0x2117,1,3447},
- {{0x40000001,0x00000000,0x00000000},0x307d,1,3447},
- {{0x00000001,0x00000020,0x00000000},0x30dd,1,3447},
- {{0x00000000,0x00000080,0x00020000},0x2329,1,4767},
- {{0x00000000,0x00400000,0x00020000},0x232a,1,4767},
- {{0x00000000,0x01000880,0x00000000},0x2039,0,2610},
- {{0x00000000,0x01400800,0x00000000},0x203a,0,2610},
- {{0x00000000,0x80000080,0x00000000},0x261c,1,6066},
- {{0x00000000,0x80400000,0x00000000},0x261e,1,6066},
- {{0x00000000,0x00400000,0x00000004},0x25ba,1,5896},
- {{0x00000000,0x00000080,0x00000004},0x25c4,1,5896},
- {{0x00000000,0x08000000,0x00000004},0x25b2,1,5875},
- {{0x00000000,0x88000000,0x00000000},0x25b3,1,5875},
- {{0x00000000,0x80400000,0x00000000},0x25b7,1,5875},
- {{0x00200000,0x00000000,0x00000004},0x25bc,1,5875},
- {{0x00200000,0x80000000,0x00000000},0x25bd,1,5875},
- {{0x00000000,0x80000080,0x00000000},0x25c1,1,5875},
- {{0x00000000,0x00000800,0x00000000},0x3012,1,6468},
- {{0x00000000,0x00000800,0x00000000},0x3020,1,6526},
- {{0x00000000,0x00000000,0x00000000},0x2225,1,4305},
- {{0x00000000,0x00000000,0x00000000},0x25ba,1,5913},
- {{0x00000000,0x00000000,0x00000000},0x211e,1,3450},
- {{0x00000000,0x00000000,0x00000000},0x2032,1,3135},
- {{0x00100000,0x00000000,0x00000000},0x2033,1,3135},
- {{0x40000000,0x00000820,0x00000000},0x30fc,1,6765},
- {{0x00000000,0x00000000,0x00100001},0x220e,1,4137},
- {{0x00000000,0x00000000,0x00000000},0x2237,1,4406},
- {{0x00000000,0x04000000,0x00000000},0x221d,1,4259},
- {{0x08000003,0x00000000,0x00000000},0x03a8,1,799},
- {{0x08000005,0x00000000,0x00000000},0x03c8,1,799},
- {{0x40000001,0x00000000,0x00000000},0x3077,0,2007},
- {{0x00000001,0x00000020,0x00000000},0x30d7,0,2007},
- {{0x00000201,0x00000000,0x00000000},0x3111,0,1578},
- {{0x00000005,0x00040040,0x00000000},0x24ac,0,1578},
- {{0x00004003,0x00000040,0x00000000},0x24c6,0,1578},
- {{0x00004005,0x00000040,0x00000000},0x24e0,0,1578},
- {{0x00000000,0x00000000,0x00000000},0x24c6,1,5377},
- {{0x00000000,0x00000000,0x00000000},0x24e0,1,5377},
- {{0x00000000,0x00000000,0x00000000},0x03a8,1,803},
- {{0x00000000,0x00000000,0x00000000},0x03c8,1,803},
- {{0x00000000,0x00000000,0x00000000},0x05e7,1,1307},
- {{0x00000000,0x00000000,0x00000000},0x0642,1,1307},
- {{0x00000000,0x00000000,0x00000000},0xfed7,1,7311},
- {{0x00000000,0x00000000,0x00000000},0xfed5,1,7303},
- {{0x00000000,0x00000000,0x00000000},0xfed6,1,7307},
- {{0x00000000,0x00000000,0x00000000},0xfed8,1,7315},
- {{0x00000000,0x00000000,0x00000000},0x3111,1,6823},
- {{0x00000081,0x00000000,0x00000000},0x0642,1,1525},
- {{0x00000081,0x00000010,0x00000000},0xfed5,1,1525},
- {{0x01000081,0x00000000,0x00000000},0xfed6,1,1525},
- {{0x00000081,0x00000004,0x00000000},0xfed7,1,1525},
- {{0x00000081,0x00001000,0x00000000},0xfed8,1,1525},
- {{0x20000001,0x00000000,0x00000000},0x05e7,1,1303},
- {{0x00400400,0x00000101,0x00000000},0x2508,1,5465},
- {{0x10400400,0x00000001,0x00000000},0x2509,1,5465},
- {{0x00400400,0x40000100,0x00000000},0x250a,1,5465},
- {{0x10400400,0x40000000,0x00000000},0x250b,1,5465},
- {{0x00000000,0x00000000,0x00000000},0x2669,1,6175},
- {{0x08000000,0x00000800,0x00000000},0x037e,0,1517},
- {{0x00000080,0x00000800,0x00000000},0x061f,0,1517},
- {{0x00000000,0x01000880,0x00000000},0x2018,0,1304},
- {{0x00000000,0x01400800,0x00000000},0x2019,0,1304},
- {{0x00100000,0x00000880,0x00000000},0x201c,0,1304},
- {{0x00100000,0x00400800,0x00000000},0x201d,0,1304},
- {{0x00000201,0x00000000,0x00000000},0x3116,0,1580},
- {{0x00000013,0x00000040,0x00000000},0x0154,0,1580},
- {{0x00000015,0x00000040,0x00000000},0x0155,0,1580},
- {{0x00002003,0x00000040,0x00000000},0x0156,0,1580},
- {{0x00002005,0x00000040,0x00000000},0x0157,0,1580},
- {{0x00001003,0x00000040,0x00000000},0x0158,0,1580},
- {{0x00001005,0x00000040,0x00000000},0x0159,0,1580},
- {{0x00000005,0x00040040,0x00000000},0x24ad,0,1580},
- {{0x00004003,0x00000040,0x00000000},0x24c7,0,1580},
- {{0x00004005,0x00000040,0x00000000},0x24e1,0,1580},
- {{0x04100003,0x00000040,0x00000000},0x0210,0,1580},
- {{0x04100005,0x00000040,0x00000000},0x0211,0,1580},
- {{0x00000803,0x00000040,0x00800000},0x0212,0,1580},
- {{0x00000805,0x00000040,0x00800000},0x0213,0,1580},
- {{0x0008000b,0x00000040,0x00000000},0x1e58,0,1580},
- {{0x0008000d,0x00000040,0x00000000},0x1e59,0,1580},
- {{0x00080103,0x00000040,0x00000000},0x1e5a,0,1580},
- {{0x00080105,0x00000040,0x00000000},0x1e5b,0,1580},
- {{0x00000103,0x00000240,0x00000000},0x1e5e,0,1580},
- {{0x00000105,0x00000240,0x00000000},0x1e5f,0,1580},
- {{0x00080103,0x00000440,0x00000000},0x1e5c,0,1580},
- {{0x00080105,0x00000440,0x00000000},0x1e5d,0,1580},
- {{0x00000005,0x00000040,0x00000000},0x027c,1,446},
- {{0x00000000,0x00000000,0x00000000},0x24c7,1,5381},
- {{0x00000000,0x00000000,0x00000000},0x24e1,1,5381},
- {{0x00000000,0x00000000,0x00000000},0x0210,1,432},
- {{0x00000000,0x00000000,0x00000000},0x0211,1,432},
- {{0x00000000,0x00000000,0x00000000},0x0154,1,172},
- {{0x00000000,0x00000000,0x00000000},0x0155,1,172},
- {{0x00000000,0x00000000,0x00000000},0x0212,1,436},
- {{0x00000000,0x00000000,0x00000000},0x0213,1,436},
- {{0x00000000,0x00000000,0x00000000},0x03a1,1,763},
- {{0x00000000,0x00000000,0x00000000},0x03c1,1,763},
- {{0x00000000,0x00000000,0x00000000},0x1fe4,1,2764},
- {{0x00000000,0x00000000,0x00000000},0x1fe5,1,2768},
- {{0x00000000,0x00000000,0x00000000},0x1fec,1,2768},
- {{0x00000000,0x00000000,0x00000000},0x05e8,1,1315},
- {{0x00000000,0x00000000,0x00000000},0x0631,1,1315},
- {{0x00000000,0x00000000,0x00000000},0xfead,1,7143},
- {{0x00000000,0x00000000,0x00000000},0xfeae,1,7147},
- {{0x00000000,0x00000000,0x00000000},0x0156,1,175},
- {{0x00000000,0x00000000,0x00000000},0x0157,1,175},
- {{0x00000000,0x00000000,0x00000000},0x1e5c,1,1893},
- {{0x00000000,0x00000000,0x00000000},0x1e5d,1,1893},
- {{0x00000000,0x00000000,0x00000000},0x1e5a,1,1889},
- {{0x00000000,0x00000000,0x00000000},0x1e5b,1,1889},
- {{0x00000000,0x00000000,0x00000000},0x1e58,1,1886},
- {{0x00000000,0x00000000,0x00000000},0x1e59,1,1886},
- {{0x00000000,0x00000000,0x00000000},0x027c,1,457},
- {{0x00000000,0x00000000,0x00000000},0x3116,1,6829},
- {{0x00000000,0x00000000,0x00000000},0x0158,1,178},
- {{0x00000000,0x00000000,0x00000000},0x0159,1,178},
- {{0x00000000,0x00000000,0x00000000},0x0420,1,1025},
- {{0x00000000,0x00000000,0x00000000},0x0440,1,1025},
- {{0x00000000,0x00000000,0x00000000},0x1e5e,1,1898},
- {{0x00000000,0x00000000,0x00000000},0x1e5f,1,1898},
- {{0x40000001,0x00000000,0x00000000},0x3089,1,6648},
- {{0x00000001,0x00000020,0x00000000},0x30e9,1,6648},
- {{0x00000000,0x00000000,0x00000000},0x2236,1,4397},
- {{0x00000000,0x00000000,0x00000000},0x2590,1,5695},
- {{0x40000001,0x00000000,0x00000000},0x308c,1,6654},
- {{0x00000001,0x00000020,0x00000000},0x30ec,1,6654},
- {{0x00000000,0x00000000,0x00000004},0x25ac,1,5862},
- {{0x00000000,0x80000000,0x00000000},0x25ad,1,5862},
- {{0x00000000,0x00000800,0x00000000},0x203b,1,3224},
- {{0x00000081,0x00000000,0x00000000},0x0631,1,1446},
- {{0x00000081,0x00000010,0x00000000},0xfead,1,1446},
- {{0x01000081,0x00000000,0x00000000},0xfeae,1,1446},
- {{0x20000001,0x00000000,0x00000000},0x05e8,1,1310},
- {{0x00000001,0x00000000,0x00000000},0x2310,1,4669},
- {{0x00000000,0x00000000,0x00000000},0x2035,1,3163},
- {{0x00100000,0x00000000,0x00000000},0x2036,1,3163},
- {{0x00000000,0x00000000,0x00000000},0x2037,1,3184},
- {{0x00000000,0x00000000,0x00000000},0x25a4,1,5778},
- {{0x00000000,0x00000000,0x00000000},0x25a6,1,5811},
- {{0x08000003,0x00000000,0x00000000},0x03a1,1,759},
- {{0x08000005,0x00000000,0x00000000},0x03c1,1,759},
- {{0x08000005,0x00200000,0x00000000},0x1fe4,1,759},
- {{0x08020005,0x00000000,0x00000000},0x1fe5,1,759},
- {{0x08020003,0x00000000,0x00000000},0x1fec,1,759},
- {{0x40000001,0x00000000,0x00000000},0x308a,0,2027},
- {{0x00000001,0x00000020,0x00000000},0x30ea,0,2027},
- {{0x00000000,0x00000000,0x00002000},0x2192,1,3881},
- {{0x00100000,0x00000000,0x00002000},0x21d2,1,3881},
- {{0x00000001,0x00000000,0x00000000},0x21c0,1,3983},
- {{0x00000000,0x00000000,0x00000000},0x25a8,1,5834},
- {{0x00000000,0x00000000,0x00000000},0x200f,1,2889},
- {{0x00000000,0x00000000,0x00000000},0x25a2,1,5756},
- {{0x40000001,0x00000000,0x00000000},0x308d,1,5756},
- {{0x00000001,0x00000020,0x00000000},0x30ed,1,5756},
- {{0x00000000,0x00000000,0x00000080},0x221a,1,4251},
- {{0x00000001,0x80000000,0x00000080},0x25a2,1,5740},
- {{0x00000000,0x00000000,0x00000000},0x25a3,1,5770},
- {{0x00000000,0x00000000,0x00000000},0x221a,1,4256},
- {{0x40000001,0x00000000,0x00000000},0x308b,1,6651},
- {{0x00000001,0x00000020,0x00000000},0x30eb,1,6651},
- {{0x00000000,0x00000000,0x00000000},0x211e,1,3468},
- {{0x00000000,0x00000000,0x00000000},0x25a9,1,3468},
- {{0x00000000,0x00000000,0x00000000},0x25a5,1,5781},
- {{0x00000000,0x00000000,0x00000000},0x25a7,1,5831},
- {{0x00000201,0x00000000,0x00000000},0x3119,0,1582},
- {{0x00000013,0x00000040,0x00000000},0x015a,0,1582},
- {{0x00000015,0x00000040,0x00000000},0x015b,0,1582},
- {{0x00008003,0x00000040,0x00000000},0x015c,0,1582},
- {{0x00008005,0x00000040,0x00000000},0x015d,0,1582},
- {{0x00002003,0x00000040,0x00000000},0x015e,0,1582},
- {{0x00002005,0x00000040,0x00000000},0x015f,0,1582},
- {{0x00001003,0x00000040,0x00000000},0x0160,0,1582},
- {{0x00001005,0x00000040,0x00000000},0x0161,0,1582},
- {{0x00000005,0x00040040,0x00000000},0x24ae,0,1582},
- {{0x00004003,0x00000040,0x00000000},0x24c8,0,1582},
- {{0x00004005,0x00000040,0x00000000},0x24e2,0,1582},
- {{0x0008000b,0x00000040,0x00000000},0x1e60,0,1582},
- {{0x0008000d,0x00000040,0x00000000},0x1e61,0,1582},
- {{0x00080103,0x00000040,0x00000000},0x1e62,0,1582},
- {{0x00080105,0x00000040,0x00000000},0x1e63,0,1582},
- {{0x0008001b,0x00000040,0x00000000},0x1e64,0,1582},
- {{0x0008001d,0x00000040,0x00000000},0x1e65,0,1582},
- {{0x0008100b,0x00000040,0x00000000},0x1e66,0,1582},
- {{0x0008100d,0x00000040,0x00000000},0x1e67,0,1582},
- {{0x0008010b,0x00000040,0x00000000},0x1e68,0,1582},
- {{0x0008010d,0x00000040,0x00000000},0x1e69,0,1582},
- {{0x00000000,0x00000000,0x00000000},0x24c8,1,5385},
- {{0x00000000,0x00000000,0x00000000},0x24e2,1,5385},
- {{0x00000000,0x00000000,0x00000000},0x0428,1,1070},
- {{0x00000000,0x00000000,0x00000000},0x0448,1,1070},
- {{0x00000000,0x00000000,0x00000000},0x015a,1,181},
- {{0x00000000,0x00000000,0x00000000},0x015b,1,181},
- {{0x00000000,0x00000000,0x00000000},0x1e64,1,1908},
- {{0x00000000,0x00000000,0x00000000},0x1e65,1,1908},
- {{0x00000000,0x00000000,0x00000000},0x03a3,1,772},
- {{0x00000000,0x00000000,0x00000000},0x03c3,1,772},
- {{0x00000000,0x00000000,0x00000000},0x05e1,1,1277},
- {{0x00000000,0x00000000,0x00000000},0x0633,1,1277},
- {{0x00000000,0x00000000,0x00000000},0xfeb3,1,7167},
- {{0x00000000,0x00000000,0x00000000},0xfeb1,1,7159},
- {{0x00000000,0x00000000,0x00000000},0xfeb2,1,7163},
- {{0x00000000,0x00000000,0x00000000},0xfeb4,1,7171},
- {{0x00000000,0x00000000,0x00000000},0x015e,1,187},
- {{0x00000000,0x00000000,0x00000000},0x015f,1,187},
- {{0x00000000,0x00000000,0x00000000},0x1e62,1,1904},
- {{0x00000000,0x00000000,0x00000000},0x1e63,1,1904},
- {{0x00000000,0x00000000,0x00000000},0x1e60,1,1901},
- {{0x00000000,0x00000000,0x00000000},0x1e61,1,1901},
- {{0x00000000,0x00000000,0x00000000},0x1e68,1,1916},
- {{0x00000000,0x00000000,0x00000000},0x1e69,1,1916},
- {{0x00000000,0x00000000,0x00000000},0x017f,1,242},
- {{0x00000000,0x00000000,0x00000000},0x3119,1,6838},
- {{0x00000000,0x00000000,0x00000000},0x0160,1,190},
- {{0x00000000,0x00000000,0x00000000},0x0161,1,190},
- {{0x00000000,0x00000000,0x00000000},0x1e66,1,1912},
- {{0x00000000,0x00000000,0x00000000},0x1e67,1,1912},
- {{0x00000000,0x00000000,0x00000000},0x0421,1,1028},
- {{0x00000000,0x00000000,0x00000000},0x0441,1,1028},
- {{0x00000000,0x00000000,0x00000000},0x015c,1,184},
- {{0x00000000,0x00000000,0x00000000},0x015d,1,184},
- {{0x40000001,0x00000000,0x00000000},0x3055,0,1843},
- {{0x00000001,0x00000020,0x00000000},0x30b5,0,1843},
- {{0x00000081,0x00000000,0x00000000},0x0635,1,1469},
- {{0x00000081,0x00000010,0x00000000},0xfeb9,1,1469},
- {{0x01000081,0x00000000,0x00000000},0xfeba,1,1469},
- {{0x00000081,0x00000004,0x00000000},0xfebb,1,1469},
- {{0x00000081,0x00001000,0x00000000},0xfebc,1,1469},
- {{0x20000001,0x00000000,0x00000000},0x05e1,1,1270},
- {{0x08000001,0x00000000,0x00000000},0x03e0,1,866},
- {{0x00000000,0x00000000,0x00000000},0x2022,0,1170},
- {{0x00000000,0x00000000,0x00000000},0x2219,0,1170},
- {{0x00000000,0x00000000,0x00000000},0x25aa,0,1170},
- {{0x00000000,0x00000000,0x00000000},0x0429,0,2327},
- {{0x00000000,0x00000000,0x00000000},0x0449,0,2327},
- {{0x40000001,0x00000000,0x00000000},0x305b,0,2561},
- {{0x00000001,0x00000020,0x00000000},0x30bb,0,2561},
- {{0x00000081,0x00000000,0x00000000},0x0633,1,1455},
- {{0x00000081,0x00000010,0x00000000},0xfeb1,1,1455},
- {{0x01000081,0x00000000,0x00000000},0xfeb2,1,1455},
- {{0x00000081,0x00000004,0x00000000},0xfeb3,1,1455},
- {{0x00000081,0x00001000,0x00000000},0xfeb4,1,1455},
- {{0x40000000,0x00000820,0x00000000},0x309c,1,6691},
- {{0x00000080,0x00000000,0x00000000},0x061b,0,1487},
- {{0x00000000,0x00000200,0x00000000},0x2028,1,3077},
- {{0x00000000,0x00000800,0x00000000},0x2120,1,3471},
- {{0x00000000,0x00000000,0x00000020},0x2077,0,1464},
- {{0x00000000,0x00000000,0x00000040},0x2087,0,1464},
- {{0x00004001,0x00000000,0x00000000},0x2466,0,1464},
- {{0x00000001,0x00040000,0x00000000},0x247a,0,1464},
- {{0x00000081,0x00000000,0x00000400},0x0667,0,1464},
- {{0x00000000,0x00804000,0x00000000},0x2166,0,1464},
- {{0x02000001,0x00000000,0x00000002},0x248e,0,1464},
- {{0x00000000,0x00040000,0x00000800},0x3226,0,1464},
- {{0x00000004,0x00804000,0x00000000},0x2176,0,1464},
- {{0x00000000,0x00000000,0x00000018},0x215e,1,3672},
- {{0x00004000,0x00002000,0x00000000},0x2470,1,4992},
- {{0x00000000,0x00042000,0x00000000},0x2484,1,4992},
- {{0x02000000,0x00002000,0x00000002},0x2498,1,4992},
- {{0x00000000,0x00000000,0x00000000},0x05e9,0,728},
- {{0x00000201,0x00000000,0x00000000},0x3115,0,728},
- {{0x00010003,0x00000000,0x00000000},0x0428,1,1066},
- {{0x00010005,0x00000000,0x00000000},0x0448,1,1066},
- {{0x00000080,0x00000000,0x00000000},0x0651,1,1629},
- {{0x00000081,0x00001000,0x00000000},0xfe7d,1,1629},
- {{0x00000000,0x00000100,0x00000000},0x2591,1,5698},
- {{0x00010003,0x00000000,0x00000000},0x0429,1,1073},
- {{0x00010005,0x00000000,0x00000000},0x0449,1,1073},
- {{0x00000081,0x00000000,0x00000000},0x0634,1,1460},
- {{0x00000081,0x00000010,0x00000000},0xfeb5,1,1460},
- {{0x01000081,0x00000000,0x00000000},0xfeb6,1,1460},
- {{0x00000081,0x00000004,0x00000000},0xfeb7,1,1460},
- {{0x00000081,0x00001000,0x00000000},0xfeb8,1,1460},
- {{0x20000001,0x00000000,0x00000000},0x05e9,1,1318},
- {{0x40000001,0x00000000,0x00000000},0x3057,0,927},
- {{0x00000001,0x00000020,0x00000000},0x30b7,0,927},
- {{0x08000003,0x00000000,0x00000000},0x03a3,1,766},
- {{0x08000005,0x00000000,0x00000000},0x03c3,1,766},
- {{0x09000005,0x00000000,0x00000000},0x03c2,1,766},
- {{0x00000000,0x00000000,0x00000020},0x2076,0,1460},
- {{0x00000000,0x00000000,0x00000040},0x2086,0,1460},
- {{0x00004001,0x00000000,0x00000000},0x2465,0,1460},
- {{0x00000001,0x00040000,0x00000000},0x2479,0,1460},
- {{0x00000081,0x00000000,0x00000400},0x0666,0,1460},
- {{0x00000000,0x00804000,0x00000000},0x2165,0,1460},
- {{0x02000001,0x00000000,0x00000002},0x248d,0,1460},
- {{0x00000000,0x00040000,0x00000800},0x3225,0,1460},
- {{0x00000004,0x00804000,0x00000000},0x2175,0,1460},
- {{0x00000000,0x00000000,0x00000200},0x2006,1,2856},
- {{0x00004000,0x00002000,0x00000000},0x246f,1,4979},
- {{0x00000000,0x00042000,0x00000000},0x2483,1,4979},
- {{0x02000000,0x00002000,0x00000002},0x2497,1,4979},
- {{0x00000000,0x00010000,0x00000018},0x2159,1,3605},
- {{0x00000000,0x00000000,0x00000008},0x2044,0,1429},
- {{0x00000000,0x00000000,0x00000000},0x2120,1,3479},
- {{0x00000000,0x80000000,0x00000000},0x263a,1,6087},
- {{0x00000000,0x00000000,0x00000004},0x263b,1,6087},
- {{0x00000000,0x00000000,0x00000000},0x0634,1,1466},
- {{0x00000000,0x00000000,0x00000000},0x25d8,1,1466},
- {{0x00000000,0x00000000,0x00000000},0xfeb7,1,7183},
- {{0x00000000,0x00000000,0x00000000},0xfeb5,1,7175},
- {{0x00000000,0x00000000,0x00000000},0xfeb6,1,7179},
- {{0x00000000,0x00000000,0x00000000},0xfeb8,1,7187},
- {{0x40000001,0x00000000,0x00000000},0x305d,0,915},
- {{0x00000001,0x00000020,0x00000000},0x30bd,0,915},
- {{0x00010003,0x00000000,0x00000000},0x042c,1,1095},
- {{0x00010005,0x00000000,0x00000000},0x044c,1,1095},
- {{0x00000000,0x00000000,0x00000000},0x2117,1,3421},
- {{0x00000000,0x00000000,0x00002000},0x2198,1,3944},
- {{0x00000000,0x00000000,0x00002000},0x2199,1,3959},
- {{0x00000000,0x00000000,0x00008004},0x2660,1,6133},
- {{0x00000000,0x80000000,0x00008000},0x2664,1,6133},
- {{0x00000000,0x00000000,0x00000000},0x25ac,1,5872},
- {{0x00000000,0x00000000,0x00000000},0xfb05,0,2387},
- {{0x00000000,0x00000000,0x00000000},0xfb06,0,2387},
- {{0x00000004,0x00000040,0x00000100},0xfb06,0,2387},
- {{0x00000000,0x00000000,0x00000004},0x2605,1,6041},
- {{0x00000000,0x80000000,0x00000000},0x2606,1,6041},
- {{0x08000001,0x00000000,0x00000000},0x03da,1,836},
- {{0x00000000,0x00000000,0x00000000},0x263c,1,6112},
- {{0x40000001,0x00000000,0x00000000},0x3059,1,6112},
- {{0x00000001,0x00000020,0x00000000},0x30b9,1,6112},
- {{0x00000000,0x00000000,0x00000001},0x2282,1,4586},
- {{0x00000000,0x04000000,0x00011001},0x2286,1,4586},
- {{0x00000080,0x00000000,0x00000000},0x0652,1,1639},
- {{0x00000001,0x80000000,0x00000000},0x263c,1,6103},
- {{0x00000000,0x00000000,0x00000001},0x2283,1,4596},
- {{0x00000000,0x04000000,0x00011001},0x2287,1,4596},
- {{0x00000201,0x00000000,0x00000000},0x310a,0,1584},
- {{0x00002003,0x00000040,0x00000000},0x0162,0,1584},
- {{0x00002005,0x00000040,0x00000000},0x0163,0,1584},
- {{0x00001003,0x00000040,0x00000000},0x0164,0,1584},
- {{0x00001005,0x00000040,0x00000000},0x0165,0,1584},
- {{0x00000003,0x00000040,0x10000000},0x0166,0,1584},
- {{0x00000005,0x00000040,0x10000000},0x0167,0,1584},
- {{0x00000005,0x00040040,0x00000000},0x24af,0,1584},
- {{0x00004003,0x00000040,0x00000000},0x24c9,0,1584},
- {{0x00004005,0x00000040,0x00000000},0x24e3,0,1584},
- {{0x0008000b,0x00000040,0x00000000},0x1e6a,0,1584},
- {{0x0008000d,0x00000040,0x00000000},0x1e6b,0,1584},
- {{0x00080103,0x00000040,0x00000000},0x1e6c,0,1584},
- {{0x00080105,0x00000040,0x00000000},0x1e6d,0,1584},
- {{0x00000103,0x00000240,0x00000000},0x1e6e,0,1584},
- {{0x00000105,0x00000240,0x00000000},0x1e6f,0,1584},
- {{0x00008103,0x00000040,0x00000000},0x1e70,0,1584},
- {{0x00008105,0x00000040,0x00000000},0x1e71,0,1584},
- {{0x00000000,0x00000000,0x00000000},0x24c9,1,5389},
- {{0x00000000,0x00000000,0x00000000},0x24e3,1,5389},
- {{0x00000000,0x00000000,0x00000000},0x03a4,1,779},
- {{0x00000000,0x00000000,0x00000000},0x03c4,1,779},
- {{0x00000000,0x00000000,0x00000000},0x05ea,1,1327},
- {{0x00000000,0x00000000,0x00000000},0x062a,1,1327},
- {{0x00000000,0x00000000,0x00000000},0xfe97,1,7055},
- {{0x00000000,0x00000000,0x00000000},0xfe95,1,7047},
- {{0x00000000,0x00000000,0x00000000},0xfe96,1,7051},
- {{0x00000000,0x00000000,0x00000000},0xfe98,1,7059},
- {{0x00000000,0x00000000,0x00000000},0x0162,1,193},
- {{0x00000000,0x00000000,0x00000000},0x0163,1,193},
- {{0x00000000,0x00000000,0x00000000},0x1e6c,1,1924},
- {{0x00000000,0x00000000,0x00000000},0x1e6d,1,1924},
- {{0x00000000,0x00000000,0x00000000},0x1e70,1,1931},
- {{0x00000000,0x00000000,0x00000000},0x1e71,1,1931},
- {{0x00000000,0x00000000,0x00000000},0x1e6a,1,1921},
- {{0x00000000,0x00000000,0x00000000},0x1e6b,1,1921},
- {{0x00000000,0x00000000,0x00000000},0x0166,1,199},
- {{0x00000000,0x00000000,0x00000000},0x0167,1,199},
- {{0x00000000,0x00000000,0x00000000},0x03da,1,843},
- {{0x00000000,0x00000000,0x00000000},0x310a,1,6802},
- {{0x00000000,0x00000000,0x00000000},0x0164,1,196},
- {{0x00000000,0x00000000,0x00000000},0x0165,1,196},
- {{0x00000000,0x00000000,0x00000000},0x0422,1,1034},
- {{0x00000000,0x00000000,0x00000000},0x0442,1,1034},
- {{0x00000000,0x00000000,0x00000000},0x1e6e,1,1928},
- {{0x00000000,0x00000000,0x00000000},0x1e6f,1,1928},
- {{0x40000001,0x00000000,0x00000000},0x305f,1,6597},
- {{0x00000001,0x00000020,0x00000000},0x30bf,1,6597},
- {{0x00000000,0x08000000,0x00000000},0x22a5,1,4620},
- {{0x00000081,0x00000000,0x00000000},0x0637,1,1483},
- {{0x00000081,0x00000010,0x00000000},0xfec1,1,1483},
- {{0x01000081,0x00000000,0x00000000},0xfec2,1,1483},
- {{0x00000081,0x00000004,0x00000000},0xfec3,1,1483},
- {{0x00000081,0x00001000,0x00000000},0xfec4,1,1483},
- {{0x00000080,0x00000000,0x00000000},0x0640,1,1507},
- {{0x08000003,0x00000000,0x00000000},0x03a4,1,775},
- {{0x08000005,0x00000000,0x00000000},0x03c4,1,775},
- {{0x20000001,0x00000000,0x00000000},0x05ea,1,1323},
- {{0x00000000,0x00000000,0x00000000},0x2580,1,5668},
- {{0x00000000,0x00000000,0x00000000},0x0686,1,1707},
- {{0x00000081,0x00000000,0x00000000},0x0686,1,1701},
- {{0x00000000,0x00000000,0x00000000},0x2203,1,1031},
- {{0x40000001,0x00000000,0x00000000},0x3066,1,1031},
- {{0x00000001,0x00000020,0x00000000},0x30c6,1,1031},
- {{0x00010003,0x00000000,0x00000000},0x0422,1,1031},
- {{0x00010005,0x00000000,0x00000000},0x0442,1,1031},
- {{0x00000081,0x00000000,0x00000000},0x062a,1,1405},
- {{0x00000081,0x00000010,0x00000000},0xfe95,1,1405},
- {{0x01000081,0x00000000,0x00000000},0xfe96,1,1405},
- {{0x00000081,0x00000004,0x00000000},0xfe97,1,1405},
- {{0x00000081,0x00001000,0x00000000},0xfe98,1,1405},
- {{0x00000081,0x00000000,0x00000000},0x0629,1,1390},
- {{0x00000081,0x00000010,0x00000000},0xfe93,1,1390},
- {{0x01000081,0x00000000,0x00000000},0xfe94,1,1390},
- {{0x00000000,0x00000000,0x00000000},0x260e,1,6062},
- {{0x00000000,0x00000000,0x00000000},0x260f,1,6062},
- {{0x00000000,0x00000000,0x00000004},0x260e,1,6052},
- {{0x00000000,0x80000000,0x00000000},0x260f,1,6052},
- {{0x00000000,0x00000000,0x00000000},0x2315,1,4692},
- {{0x00000000,0x00804000,0x00000000},0x2169,1,3716},
- {{0x00004000,0x00002000,0x00000000},0x2469,1,3716},
- {{0x00000000,0x00042000,0x00000000},0x247d,1,3716},
- {{0x00000000,0x00040000,0x00000800},0x3229,1,3716},
- {{0x00000004,0x00804000,0x00000000},0x2179,1,3716},
- {{0x02000000,0x00002000,0x00000002},0x2491,1,3716},
- {{0x00000000,0x00804000,0x00000000},0x2182,1,3837},
- {{0x20000001,0x00000000,0x00000000},0x05d8,1,1217},
- {{0x00000081,0x00000000,0x00000000},0x0630,1,1438},
- {{0x00000081,0x00000010,0x00000000},0xfeab,1,1438},
- {{0x01000081,0x00000000,0x00000000},0xfeac,1,1438},
- {{0x00000081,0x00000000,0x00000000},0x062b,1,1409},
- {{0x00000081,0x00000010,0x00000000},0xfe99,1,1409},
- {{0x01000081,0x00000000,0x00000000},0xfe9a,1,1409},
- {{0x00000081,0x00000004,0x00000000},0xfe9b,1,1409},
- {{0x00000081,0x00001000,0x00000000},0xfe9c,1,1409},
- {{0x00000000,0x00000000,0x00000000},0x2203,1,4062},
- {{0x00000000,0x00000000,0x00000000},0x2234,1,4373},
- {{0x08000003,0x00000000,0x00000000},0x0398,1,708},
- {{0x08000005,0x00000000,0x00000000},0x03b8,1,708},
- {{0x00000000,0x00000000,0x00000200},0x2009,1,2870},
- {{0x00000000,0x00010000,0x00000018},0x2153,1,3528},
- {{0x00004000,0x00002000,0x00000000},0x246c,1,4938},
- {{0x00000000,0x00042000,0x00000000},0x2480,1,4938},
- {{0x02000000,0x00002000,0x00000002},0x2494,1,4938},
- {{0x00000000,0x00814000,0x00000000},0x216f,1,3781},
- {{0x00000004,0x00814000,0x00000000},0x217f,1,3781},
- {{0x00000000,0x00814000,0x00000000},0x2180,1,3796},
- {{0x00000000,0x00000000,0x00000040},0x2083,0,1444},
- {{0x00004001,0x00000000,0x00000000},0x2462,0,1444},
- {{0x00000001,0x00040000,0x00000000},0x2476,0,1444},
- {{0x00000081,0x00000000,0x00000400},0x0663,0,1444},
- {{0x00000000,0x00804000,0x00000000},0x2162,0,1444},
- {{0x02000001,0x00000000,0x00000002},0x248a,0,1444},
- {{0x00000000,0x00040000,0x00000800},0x3222,0,1444},
- {{0x00000004,0x00804000,0x00000000},0x2172,0,1444},
- {{0x00000000,0x00000000,0x00000018},0x215c,1,3639},
- {{0x00000000,0x00000000,0x00000018},0x2157,1,3574},
- {{0x00000000,0x00000000,0x00000200},0x2004,1,2825},
- {{0x40000001,0x00000000,0x00000000},0x3061,1,6603},
- {{0x00000001,0x00000020,0x00000000},0x30c1,1,6603},
- {{0x00000000,0x00000000,0x00000000},0x05d8,1,1221},
- {{0x00000000,0x00000000,0x00000000},0x0637,1,1221},
- {{0x00000000,0x00000000,0x00000000},0xfec3,1,7231},
- {{0x00000000,0x00000000,0x00000000},0xfec1,1,7223},
- {{0x00000000,0x00000000,0x00000000},0xfec2,1,7227},
- {{0x00000000,0x00000000,0x00000000},0xfec4,1,7235},
- {{0x00000000,0x00000000,0x00000000},0x062b,1,1414},
- {{0x00000000,0x00000000,0x00000000},0xfe9b,1,7071},
- {{0x00000000,0x00000000,0x00000000},0xfe99,1,7063},
- {{0x00000000,0x00000000,0x00000000},0xfe9a,1,7067},
- {{0x00000000,0x00000000,0x00000000},0xfe9c,1,7075},
- {{0x00000000,0x00000000,0x00000000},0x25c1,1,5916},
- {{0x00000000,0x00000000,0x00000000},0x0629,1,1402},
- {{0x00000000,0x00000000,0x00000000},0x2122,1,1402},
- {{0x00000000,0x00000000,0x00000000},0xfe93,1,7039},
- {{0x00000000,0x00000000,0x00000000},0xfe94,1,7043},
- {{0x00000000,0x00000000,0x00080000},0x2320,1,4732},
- {{0x00000000,0x00000080,0x00020000},0x3014,1,6486},
- {{0x00000000,0x00400000,0x00020000},0x3015,1,6486},
- {{0x00000000,0x00000000,0x00000000},0x2315,1,4711},
- {{0x00000000,0x00000000,0x00000000},0x25b7,1,4711},
- {{0x00000001,0x00000800,0x00000000},0x2122,1,3482},
- {{0x00000000,0x00000000,0x00000000},0x2023,1,3009},
- {{0x00400400,0x00000101,0x00000000},0x2504,1,5441},
- {{0x10400400,0x00000001,0x00000000},0x2505,1,5441},
- {{0x00400400,0x40000100,0x00000000},0x2506,1,5441},
- {{0x10400400,0x40000000,0x00000000},0x2507,1,5441},
- {{0x00000000,0x00000000,0x00000000},0x2034,1,3147},
- {{0x00000000,0x00000000,0x00000000},0x040b,0,2156},
- {{0x00000000,0x00000000,0x00000000},0x045b,0,2156},
- {{0x20000001,0x00000000,0x00000000},0x05e6,1,1294},
- {{0x21000001,0x00000000,0x00000000},0x05e5,1,1294},
- {{0x00010003,0x00000000,0x00000000},0x0426,1,1052},
- {{0x00010005,0x00000000,0x00000000},0x0446,1,1052},
- {{0x00010003,0x00000000,0x00000000},0x040b,1,922},
- {{0x00010005,0x00000000,0x00000000},0x045b,1,922},
- {{0x40000001,0x00000000,0x00000000},0x3064,1,6606},
- {{0x00000001,0x00000020,0x00000000},0x30c4,1,6606},
- {{0x40000005,0x00000000,0x00000000},0x3063,1,6606},
- {{0x00000005,0x00000020,0x00000000},0x30c3,1,6606},
- {{0x00000005,0x00000040,0x00000000},0x01dd,1,343},
- {{0x00000000,0x00804000,0x00000000},0x216b,1,3733},
- {{0x00004000,0x00002000,0x00000000},0x246b,1,3733},
- {{0x00000000,0x00042000,0x00000000},0x247f,1,3733},
- {{0x00000004,0x00804000,0x00000000},0x217b,1,3733},
- {{0x02000000,0x00002000,0x00000002},0x2493,1,3733},
- {{0x00004000,0x00002000,0x00000000},0x2473,1,5035},
- {{0x00000000,0x00042000,0x00000000},0x2487,1,5035},
- {{0x02000000,0x00002000,0x00000002},0x249b,1,5035},
- {{0x00000000,0x00000000,0x00000040},0x2082,0,1440},
- {{0x00004001,0x00000000,0x00000000},0x2461,0,1440},
- {{0x00000001,0x00040000,0x00000000},0x2475,0,1440},
- {{0x00000081,0x00000000,0x00000400},0x0662,0,1440},
- {{0x00000000,0x00804000,0x00000000},0x2161,0,1440},
- {{0x02000001,0x00000000,0x00000002},0x2489,0,1440},
- {{0x00000000,0x00040000,0x00000800},0x3221,0,1440},
- {{0x00000004,0x00804000,0x00000000},0x2171,0,1440},
- {{0x00000000,0x00000000,0x00000018},0x2156,1,3560},
- {{0x00080000,0x00000000,0x00000000},0x2025,1,3030},
- {{0x00000000,0x00000000,0x00000018},0x2154,1,3537},
- {{0x40000001,0x00000000,0x00000000},0x3046,0,1586},
- {{0x00000001,0x00000020,0x00000000},0x30a6,0,1586},
- {{0x00000201,0x00000000,0x00000000},0x3128,0,1586},
- {{0x00010003,0x00000000,0x00000000},0x0423,0,1586},
- {{0x00010005,0x00000000,0x00000000},0x0443,0,1586},
- {{0x40000005,0x00000000,0x00000000},0x3045,0,1586},
- {{0x00000005,0x00000020,0x00000000},0x30a5,0,1586},
- {{0x00000003,0x02000040,0x00000000},0x0168,0,1586},
- {{0x00000005,0x02000040,0x00000000},0x0169,0,1586},
- {{0x00000003,0x00000440,0x00000000},0x016a,0,1586},
- {{0x00000005,0x00000440,0x00000000},0x016b,0,1586},
- {{0x00000803,0x00000040,0x00000000},0x016c,0,1586},
- {{0x00000805,0x00000040,0x00000000},0x016d,0,1586},
- {{0x00000003,0x00000040,0x02000000},0x0172,0,1586},
- {{0x00000005,0x00000040,0x02000000},0x0173,0,1586},
- {{0x00000003,0x00000042,0x00000000},0x01af,0,1586},
- {{0x00000005,0x00000042,0x00000000},0x01b0,0,1586},
- {{0x00001003,0x00000040,0x00000000},0x01d3,0,1586},
- {{0x00001005,0x00000040,0x00000000},0x01d4,0,1586},
- {{0x00010003,0x00000000,0x08000000},0x040e,0,1586},
- {{0x00010005,0x00000000,0x08000000},0x045e,0,1586},
- {{0x00000005,0x00040040,0x00000000},0x24b0,0,1586},
- {{0x00004003,0x00000040,0x00000000},0x24ca,0,1586},
- {{0x00004005,0x00000040,0x00000000},0x24e4,0,1586},
- {{0x0000000b,0x00000040,0x04000000},0x016e,0,1586},
- {{0x0000000d,0x00000040,0x04000000},0x016f,0,1586},
- {{0x00100013,0x00000040,0x00000000},0x0170,0,1586},
- {{0x00100015,0x00000040,0x00000000},0x0171,0,1586},
- {{0x00040003,0x00000440,0x00000000},0x01d5,0,1586},
- {{0x00040005,0x00000440,0x00000000},0x01d6,0,1586},
- {{0x00040013,0x00000040,0x00000000},0x01d7,0,1586},
- {{0x00040015,0x00000040,0x00000000},0x01d8,0,1586},
- {{0x00041003,0x00000040,0x00000000},0x01d9,0,1586},
- {{0x00041005,0x00000040,0x00000000},0x01da,0,1586},
- {{0x04040003,0x00000040,0x00000000},0x01db,0,1586},
- {{0x04040005,0x00000040,0x00000000},0x01dc,0,1586},
- {{0x04100003,0x00000040,0x00000000},0x0214,0,1586},
- {{0x04100005,0x00000040,0x00000000},0x0215,0,1586},
- {{0x00000803,0x00000040,0x00800000},0x0216,0,1586},
- {{0x00000805,0x00000040,0x00800000},0x0217,0,1586},
- {{0x00040103,0x00000040,0x00000000},0x1e72,0,1586},
- {{0x00040105,0x00000040,0x00000000},0x1e73,0,1586},
- {{0x00000103,0x02000040,0x00000000},0x1e74,0,1586},
- {{0x00000105,0x02000040,0x00000000},0x1e75,0,1586},
- {{0x00008103,0x00000040,0x00000000},0x1e76,0,1586},
- {{0x00008105,0x00000040,0x00000000},0x1e77,0,1586},
- {{0x00000013,0x02000040,0x00000000},0x1e78,0,1586},
- {{0x00000015,0x02000040,0x00000000},0x1e79,0,1586},
- {{0x00040003,0x00000440,0x00000000},0x1e7a,0,1586},
- {{0x00040005,0x00000440,0x00000000},0x1e7b,0,1586},
- {{0x00080103,0x00000040,0x00000000},0x1ee4,0,1586},
- {{0x00080105,0x00000040,0x00000000},0x1ee5,0,1586},
- {{0x8000000b,0x00000040,0x00000000},0x1ee6,0,1586},
- {{0x8000000d,0x00000040,0x00000000},0x1ee7,0,1586},
- {{0x00000013,0x00000042,0x00000000},0x1ee8,0,1586},
- {{0x00000015,0x00000042,0x00000000},0x1ee9,0,1586},
- {{0x04000003,0x00000042,0x00000000},0x1eea,0,1586},
- {{0x04000005,0x00000042,0x00000000},0x1eeb,0,1586},
- {{0x00000003,0x02000042,0x00000000},0x1eee,0,1586},
- {{0x00000005,0x02000042,0x00000000},0x1eef,0,1586},
- {{0x8000000b,0x00000042,0x00000000},0x1eec,0,1586},
- {{0x8000000d,0x00000042,0x00000000},0x1eed,0,1586},
- {{0x00080103,0x00000042,0x00000000},0x1ef0,0,1586},
- {{0x00080105,0x00000042,0x00000000},0x1ef1,0,1586},
- {{0x00000000,0x00000000,0x00000000},0x24ca,1,5393},
- {{0x00000000,0x00000000,0x00000000},0x24e4,1,5393},
- {{0x00000000,0x00000000,0x00000000},0x0214,1,439},
- {{0x00000000,0x00000000,0x00000000},0x0215,1,439},
- {{0x00000000,0x00000000,0x00000000},0x0170,1,214},
- {{0x00000000,0x00000000,0x00000000},0x0171,1,214},
- {{0x00000000,0x00000000,0x00000000},0x038e,1,656},
- {{0x00000000,0x00000000,0x00000000},0x03cd,1,656},
- {{0x00000000,0x00000000,0x00000000},0x016c,1,208},
- {{0x00000000,0x00000000,0x00000000},0x016d,1,208},
- {{0x00000000,0x00000000,0x00000000},0x0216,1,443},
- {{0x00000000,0x00000000,0x00000000},0x0217,1,443},
- {{0x00000000,0x00000000,0x00000000},0x03a5,1,782},
- {{0x00000000,0x00000000,0x00000000},0x03c5,1,782},
- {{0x00000000,0x00000000,0x00000000},0x1f7a,1,2461},
- {{0x00000000,0x00000000,0x00000000},0x1fea,1,2461},
- {{0x00000000,0x00000000,0x00000000},0x1f7b,1,2465},
- {{0x00000000,0x00000000,0x00000000},0x1feb,1,2465},
- {{0x00000000,0x00000000,0x00000000},0x1fe0,1,2746},
- {{0x00000000,0x00000000,0x00000000},0x1fe8,1,2746},
- {{0x00000000,0x00000000,0x00000000},0x1f50,1,2345},
- {{0x00000000,0x00000000,0x00000000},0x1f52,1,2353},
- {{0x00000000,0x00000000,0x00000000},0x1f54,1,2363},
- {{0x00000000,0x00000000,0x00000000},0x1f56,1,2373},
- {{0x00000000,0x00000000,0x00000000},0x1fe1,1,2750},
- {{0x00000000,0x00000000,0x00000000},0x1fe9,1,2750},
- {{0x00000000,0x00000000,0x00000000},0x1fe2,1,2754},
- {{0x00000000,0x00000000,0x00000000},0x1fe3,1,2759},
- {{0x00000000,0x00000000,0x00000000},0x1fe7,1,2776},
- {{0x00000000,0x00000000,0x00000000},0x1f51,1,2349},
- {{0x00000000,0x00000000,0x00000000},0x1f59,1,2349},
- {{0x00000000,0x00000000,0x00000000},0x1f53,1,2358},
- {{0x00000000,0x00000000,0x00000000},0x1f5b,1,2358},
- {{0x00000000,0x00000000,0x00000000},0x1f55,1,2368},
- {{0x00000000,0x00000000,0x00000000},0x1f5d,1,2368},
- {{0x00000000,0x00000000,0x00000000},0x1f57,1,2378},
- {{0x00000000,0x00000000,0x00000000},0x1f5f,1,2378},
- {{0x00000000,0x00000000,0x00000000},0x1fe6,1,2772},
- {{0x00000000,0x00000000,0x00000000},0x016a,1,205},
- {{0x00000000,0x00000000,0x00000000},0x016b,1,205},
- {{0x00000000,0x00000000,0x00000000},0x1e72,1,1935},
- {{0x00000000,0x00000000,0x00000000},0x1e73,1,1935},
- {{0x00000000,0x00000000,0x00000000},0x1ee4,1,2134},
- {{0x00000000,0x00000000,0x00000000},0x1ee5,1,2134},
- {{0x00000000,0x00000000,0x00000000},0x1e7a,1,1952},
- {{0x00000000,0x00000000,0x00000000},0x1e7b,1,1952},
- {{0x00000000,0x00000000,0x00000000},0x1e76,1,1944},
- {{0x00000000,0x00000000,0x00000000},0x1e77,1,1944},
- {{0x00000000,0x00000000,0x00000000},0x1e74,1,1940},
- {{0x00000000,0x00000000,0x00000000},0x1e75,1,1940},
- {{0x00000000,0x00000000,0x00000000},0x016e,1,211},
- {{0x00000000,0x00000000,0x00000000},0x016f,1,211},
- {{0x00000000,0x00000000,0x00000000},0x1ee6,1,2138},
- {{0x00000000,0x00000000,0x00000000},0x1ee7,1,2138},
- {{0x00000000,0x00000000,0x00000000},0x03b0,1,815},
- {{0x00000000,0x00000000,0x00000000},0x3128,1,6873},
- {{0x00000000,0x00000000,0x00000000},0x3045,1,6549},
- {{0x00000000,0x00000000,0x00000000},0x3046,1,6549},
- {{0x00000000,0x00000000,0x00000000},0x30a5,1,6741},
- {{0x00000000,0x00000000,0x00000000},0x30a6,1,6741},
- {{0x00000000,0x00000000,0x00000000},0x01af,1,269},
- {{0x00000000,0x00000000,0x00000000},0x01b0,1,269},
- {{0x00000000,0x00000000,0x00000000},0x1eea,1,2145},
- {{0x00000000,0x00000000,0x00000000},0x1eeb,1,2145},
- {{0x00000000,0x00000000,0x00000000},0x1ee8,1,2141},
- {{0x00000000,0x00000000,0x00000000},0x1ee9,1,2141},
- {{0x00000000,0x00000000,0x00000000},0x1ef0,1,2157},
- {{0x00000000,0x00000000,0x00000000},0x1ef1,1,2157},
- {{0x00000000,0x00000000,0x00000000},0x1eec,1,2149},
- {{0x00000000,0x00000000,0x00000000},0x1eed,1,2149},
- {{0x00000000,0x00000000,0x00000000},0x1eee,1,2153},
- {{0x00000000,0x00000000,0x00000000},0x1eef,1,2153},
- {{0x00000000,0x00000000,0x00000000},0x01db,1,339},
- {{0x00000000,0x00000000,0x00000000},0x01dc,1,339},
- {{0x00000000,0x00000000,0x00000000},0x01d7,1,331},
- {{0x00000000,0x00000000,0x00000000},0x01d8,1,331},
- {{0x00000000,0x00000000,0x00000000},0x01d5,1,327},
- {{0x00000000,0x00000000,0x00000000},0x01d6,1,327},
- {{0x00000000,0x00000000,0x00000000},0x01d9,1,335},
- {{0x00000000,0x00000000,0x00000000},0x01da,1,335},
- {{0x00000000,0x00000000,0x00000000},0x0172,1,217},
- {{0x00000000,0x00000000,0x00000000},0x0173,1,217},
- {{0x00000000,0x00000000,0x00000000},0x01d3,1,324},
- {{0x00000000,0x00000000,0x00000000},0x01d4,1,324},
- {{0x00000000,0x00000000,0x00000000},0x0423,1,1037},
- {{0x00000000,0x00000000,0x00000000},0x0443,1,1037},
- {{0x00000000,0x00000000,0x00000000},0x0168,1,202},
- {{0x00000000,0x00000000,0x00000000},0x0169,1,202},
- {{0x00000000,0x00000000,0x00000000},0x1e78,1,1948},
- {{0x00000000,0x00000000,0x00000000},0x1e79,1,1948},
- {{0x00000000,0x00000000,0x00000000},0x2195,1,3911},
- {{0x00000000,0x00000000,0x00000000},0x21a8,1,3979},
- {{0x00000000,0x00000000,0x00000000},0x2540,1,5613},
- {{0x00000000,0x00000000,0x00000000},0x2541,1,5613},
- {{0x00000000,0x00000000,0x00000000},0x2547,1,5613},
- {{0x00000000,0x00000000,0x00000000},0x2548,1,5613},
- {{0x00000000,0x00000000,0x00000000},0x2526,1,5564},
- {{0x00000000,0x00000000,0x00000000},0x2527,1,5564},
- {{0x00000000,0x00000000,0x00000000},0x2529,1,5564},
- {{0x00000000,0x00000000,0x00000000},0x252a,1,5564},
- {{0x00000000,0x00000000,0x00000000},0x2543,1,5617},
- {{0x00000000,0x00000000,0x00000000},0x2544,1,5617},
- {{0x00000000,0x00000000,0x00000000},0x2545,1,5617},
- {{0x00000000,0x00000000,0x00000000},0x2546,1,5617},
- {{0x00000000,0x00000000,0x00000000},0x251e,1,5549},
- {{0x00000000,0x00000000,0x00000000},0x251f,1,5549},
- {{0x00000000,0x00000000,0x00000000},0x2521,1,5549},
- {{0x00000000,0x00000000,0x00000000},0x2522,1,5549},
- {{0x00000000,0x00000000,0x00000000},0x2534,1,5583},
- {{0x00000000,0x00000000,0x00000000},0x2567,1,5583},
- {{0x00000000,0x00000000,0x00000000},0x2568,1,5583},
- {{0x00000000,0x00000000,0x00000000},0x2569,1,5583},
- {{0x00000000,0x00000000,0x00000000},0x2537,1,5594},
- {{0x00000000,0x00000000,0x00000000},0x2538,1,5594},
- {{0x00000000,0x00000000,0x00000000},0x253b,1,5594},
- {{0x00000000,0x00000000,0x00000000},0x2518,1,5527},
- {{0x00000000,0x00000000,0x00000000},0x255b,1,5527},
- {{0x00000000,0x00000000,0x00000000},0x255c,1,5527},
- {{0x00000000,0x00000000,0x00000000},0x255d,1,5527},
- {{0x00000000,0x00000000,0x00000000},0x2519,1,5534},
- {{0x00000000,0x00000000,0x00000000},0x251a,1,5534},
- {{0x00000000,0x00000000,0x00000000},0x251b,1,5534},
- {{0x00000000,0x00000000,0x00000000},0x2535,1,5590},
- {{0x00000000,0x00000000,0x00000000},0x2536,1,5590},
- {{0x00000000,0x00000000,0x00000000},0x2539,1,5590},
- {{0x00000000,0x00000000,0x00000000},0x253a,1,5590},
- {{0x00000000,0x00000000,0x00000000},0x222a,1,4335},
- {{0x00000000,0x00000000,0x00080000},0x2580,1,5656},
- {{0x00000001,0x04400080,0x00000080},0x25a7,1,5814},
- {{0x00000001,0x04400080,0x00000080},0x25a8,1,5814},
- {{0x00000000,0x00000000,0x00002000},0x2191,1,3870},
- {{0x00000000,0x00000000,0x00000000},0x2514,1,5516},
- {{0x00000000,0x00000000,0x00000000},0x2558,1,5516},
- {{0x00000000,0x00000000,0x00000000},0x2559,1,5516},
- {{0x00000000,0x00000000,0x00000000},0x255a,1,5516},
- {{0x00000000,0x00000000,0x00000000},0x2515,1,5523},
- {{0x00000000,0x00000000,0x00000000},0x2516,1,5523},
- {{0x00000000,0x00000000,0x00000000},0x2517,1,5523},
- {{0x00000000,0x00000000,0x00000000},0x25b2,1,5893},
- {{0x00000000,0x00000000,0x00000000},0x25b3,1,5893},
- {{0x00000201,0x00000000,0x00000000},0x312a,0,1588},
- {{0x00000003,0x02000040,0x00000000},0x1e7c,0,1588},
- {{0x00000005,0x02000040,0x00000000},0x1e7d,0,1588},
- {{0x00000005,0x00040040,0x00000000},0x24b1,0,1588},
- {{0x00004003,0x00000040,0x00000000},0x24cb,0,1588},
- {{0x00004005,0x00000040,0x00000000},0x24e5,0,1588},
- {{0x00080103,0x00000040,0x00000000},0x1e7e,0,1588},
- {{0x00080105,0x00000040,0x00000000},0x1e7f,0,1588},
- {{0x00000000,0x00000000,0x00000000},0x24cb,1,5397},
- {{0x00000000,0x00000000,0x00000000},0x24e5,1,5397},
- {{0x00000000,0x00000000,0x00000000},0x040e,1,934},
- {{0x00000000,0x00000000,0x00000000},0x045e,1,934},
- {{0x00000000,0x00000000,0x00000000},0x03ab,1,812},
- {{0x00000000,0x00000000,0x00000000},0x03cb,1,812},
- {{0x00000000,0x00000000,0x00000000},0x06a4,1,1718},
- {{0x00000000,0x00000000,0x00000000},0x1e7e,1,1959},
- {{0x00000000,0x00000000,0x00000000},0x1e7f,1,1959},
- {{0x00000000,0x00000000,0x00000000},0x0474,1,1151},
- {{0x00000000,0x00000000,0x00000000},0x0475,1,1151},
- {{0x00000000,0x00000000,0x00000000},0x312a,1,6876},
- {{0x00000000,0x00000000,0x00000000},0x0412,1,954},
- {{0x00000000,0x00000000,0x00000000},0x0432,1,954},
- {{0x00000000,0x00000000,0x00000000},0x1e7c,1,1956},
- {{0x00000000,0x00000000,0x00000000},0x1e7d,1,1956},
- {{0x00000001,0x00000020,0x00000000},0x30f7,1,6753},
- {{0x20000001,0x00000000,0x00000000},0x05d5,1,1194},
- {{0x00000001,0x00000020,0x00000000},0x30f9,1,951},
- {{0x00010003,0x00000000,0x00000000},0x0412,1,951},
- {{0x00010005,0x00000000,0x00000000},0x0432,1,951},
- {{0x00000081,0x00000000,0x00000000},0x06a4,1,1714},
- {{0x00000000,0x00000000,0x00000000},0x253c,1,5598},
- {{0x00000000,0x00000000,0x00000000},0x256a,1,5598},
- {{0x00000000,0x00000000,0x00000000},0x256b,1,5598},
- {{0x00000000,0x00000000,0x00000000},0x256c,1,5598},
- {{0x00000000,0x00000000,0x00000000},0x253f,1,5609},
- {{0x00000000,0x00000000,0x00000000},0x2542,1,5609},
- {{0x00000000,0x00000000,0x00000000},0x254b,1,5609},
- {{0x00000001,0x00000020,0x00000000},0x30f8,1,6756},
- {{0x00000000,0x00000000,0x00000000},0x2524,1,5553},
- {{0x00000000,0x00000000,0x00000000},0x2561,1,5553},
- {{0x00000000,0x00000000,0x00000000},0x2562,1,5553},
- {{0x00000000,0x00000000,0x00000000},0x2563,1,5553},
- {{0x00000000,0x00000000,0x00000000},0x2525,1,5560},
- {{0x00000000,0x00000000,0x00000000},0x2528,1,5560},
- {{0x00000000,0x00000000,0x00000000},0x252b,1,5560},
- {{0x00000000,0x00000000,0x00000000},0x253d,1,5605},
- {{0x00000000,0x00000000,0x00000000},0x253e,1,5605},
- {{0x00000000,0x00000000,0x00000000},0x2549,1,5605},
- {{0x00000000,0x00000000,0x00000000},0x254a,1,5605},
- {{0x00000001,0x00000020,0x00000000},0x30fa,1,6759},
- {{0x40000000,0x00000800,0x00000000},0x309e,1,6715},
- {{0x00000000,0x00000820,0x00000000},0x30fe,1,6715},
- {{0x40000000,0x00000820,0x00000000},0x309b,1,6675},
- {{0x00000000,0x00000000,0x00000000},0x251c,1,5538},
- {{0x00000000,0x00000000,0x00000000},0x255e,1,5538},
- {{0x00000000,0x00000000,0x00000000},0x255f,1,5538},
- {{0x00000000,0x00000000,0x00000000},0x2560,1,5538},
- {{0x00000000,0x00000000,0x00000000},0x251d,1,5545},
- {{0x00000000,0x00000000,0x00000000},0x2520,1,5545},
- {{0x00000000,0x00000000,0x00000000},0x2523,1,5545},
- {{0x08000045,0x00000000,0x00000000},0x1fb0,1,2615},
- {{0x08000043,0x00000000,0x00000000},0x1fb8,1,2615},
- {{0x08000005,0x00000008,0x00000000},0x1fd0,1,2615},
- {{0x08000003,0x00000008,0x00000000},0x1fd8,1,2615},
- {{0x08000005,0x10000000,0x00000000},0x1fe0,1,2615},
- {{0x08000003,0x10000000,0x00000000},0x1fe8,1,2615},
- {{0x00000000,0x00000000,0x00000000},0x2423,0,1960},
- {{0x40000001,0x00000000,0x00000000},0x3094,1,6672},
- {{0x00000001,0x00000020,0x00000000},0x30f4,1,6672},
- {{0x00000000,0x00000000,0x00000000},0x2502,1,5431},
- {{0x00000000,0x00000000,0x00000000},0x2551,1,5431},
- {{0x00000000,0x00000000,0x00000000},0x2503,1,5437},
- {{0x00008003,0x00000040,0x00000000},0x0174,0,1590},
- {{0x00008005,0x00000040,0x00000000},0x0175,0,1590},
- {{0x04000003,0x00000040,0x00000000},0x1e80,0,1590},
- {{0x04000005,0x00000040,0x00000000},0x1e81,0,1590},
- {{0x00000013,0x00000040,0x00000000},0x1e82,0,1590},
- {{0x00000015,0x00000040,0x00000000},0x1e83,0,1590},
- {{0x00040003,0x00000040,0x00000000},0x1e84,0,1590},
- {{0x00040005,0x00000040,0x00000000},0x1e85,0,1590},
- {{0x00000005,0x00040040,0x00000000},0x24b2,0,1590},
- {{0x00004003,0x00000040,0x00000000},0x24cc,0,1590},
- {{0x00004005,0x00000040,0x00000000},0x24e6,0,1590},
- {{0x0008000b,0x00000040,0x00000000},0x1e86,0,1590},
- {{0x0008000d,0x00000040,0x00000000},0x1e87,0,1590},
- {{0x00080103,0x00000040,0x00000000},0x1e88,0,1590},
- {{0x00080105,0x00000040,0x00000000},0x1e89,0,1590},
- {{0x00000000,0x00000000,0x00000000},0x24cc,1,5401},
- {{0x00000000,0x00000000,0x00000000},0x24e6,1,5401},
- {{0x00000000,0x00000000,0x00000000},0x1e80,1,1963},
- {{0x00000000,0x00000000,0x00000000},0x1e81,1,1963},
- {{0x00000000,0x00000000,0x00000000},0x038f,1,659},
- {{0x00000000,0x00000000,0x00000000},0x03ce,1,659},
- {{0x00000000,0x00000000,0x00000000},0x1e82,1,1966},
- {{0x00000000,0x00000000,0x00000000},0x1e83,1,1966},
- {{0x00000000,0x00000000,0x00000000},0x03a9,1,806},
- {{0x00000000,0x00000000,0x00000000},0x03c9,1,806},
- {{0x00000000,0x00000000,0x00000000},0x1f7c,1,2469},
- {{0x00000000,0x00000000,0x00000000},0x1ffa,1,2469},
- {{0x00000000,0x00000000,0x00000000},0x1ff2,1,2790},
- {{0x00000000,0x00000000,0x00000000},0x1f7d,1,2473},
- {{0x00000000,0x00000000,0x00000000},0x1ffb,1,2473},
- {{0x00000000,0x00000000,0x00000000},0x1ff4,1,2799},
- {{0x00000000,0x00000000,0x00000000},0x1f60,1,2383},
- {{0x00000000,0x00000000,0x00000000},0x1f68,1,2383},
- {{0x00000000,0x00000000,0x00000000},0x1f62,1,2391},
- {{0x00000000,0x00000000,0x00000000},0x1f6a,1,2391},
- {{0x00000000,0x00000000,0x00000000},0x1fa2,1,2579},
- {{0x00000000,0x00000000,0x00000000},0x1faa,1,2579},
- {{0x00000000,0x00000000,0x00000000},0x1f64,1,2401},
- {{0x00000000,0x00000000,0x00000000},0x1f6c,1,2401},
- {{0x00000000,0x00000000,0x00000000},0x1fa4,1,2591},
- {{0x00000000,0x00000000,0x00000000},0x1fac,1,2591},
- {{0x00000000,0x00000000,0x00000000},0x1f66,1,2411},
- {{0x00000000,0x00000000,0x00000000},0x1f6e,1,2411},
- {{0x00000000,0x00000000,0x00000000},0x1fa6,1,2603},
- {{0x00000000,0x00000000,0x00000000},0x1fae,1,2603},
- {{0x00000000,0x00000000,0x00000000},0x1fa0,1,2569},
- {{0x00000000,0x00000000,0x00000000},0x1fa8,1,2569},
- {{0x00000000,0x00000000,0x00000000},0x1f61,1,2387},
- {{0x00000000,0x00000000,0x00000000},0x1f69,1,2387},
- {{0x00000000,0x00000000,0x00000000},0x1f63,1,2396},
- {{0x00000000,0x00000000,0x00000000},0x1f6b,1,2396},
- {{0x00000000,0x00000000,0x00000000},0x1fa3,1,2585},
- {{0x00000000,0x00000000,0x00000000},0x1fab,1,2585},
- {{0x00000000,0x00000000,0x00000000},0x1f65,1,2406},
- {{0x00000000,0x00000000,0x00000000},0x1f6d,1,2406},
- {{0x00000000,0x00000000,0x00000000},0x1fa5,1,2597},
- {{0x00000000,0x00000000,0x00000000},0x1fad,1,2597},
- {{0x00000000,0x00000000,0x00000000},0x1f67,1,2416},
- {{0x00000000,0x00000000,0x00000000},0x1f6f,1,2416},
- {{0x00000000,0x00000000,0x00000000},0x1fa7,1,2609},
- {{0x00000000,0x00000000,0x00000000},0x1faf,1,2609},
- {{0x00000000,0x00000000,0x00000000},0x1fa1,1,2574},
- {{0x00000000,0x00000000,0x00000000},0x1fa9,1,2574},
- {{0x00000000,0x00000000,0x00000000},0x1ff6,1,2804},
- {{0x00000000,0x00000000,0x00000000},0x1ff7,1,2808},
- {{0x00000000,0x00000000,0x00000000},0x1ff3,1,2795},
- {{0x00000000,0x00000000,0x00000000},0x1ffc,1,2795},
- {{0x00000000,0x00000000,0x00000000},0x05d5,1,1198},
- {{0x00000000,0x00000000,0x00000000},0x0648,1,1198},
- {{0x00000000,0x00000000,0x00000000},0xfeed,1,7399},
- {{0x00000000,0x00000000,0x00000000},0xfeee,1,7403},
- {{0x00000000,0x00000000,0x00000000},0x1e88,1,1975},
- {{0x00000000,0x00000000,0x00000000},0x1e89,1,1975},
- {{0x00000000,0x00000000,0x00000000},0x1e86,1,1972},
- {{0x00000000,0x00000000,0x00000000},0x1e87,1,1972},
- {{0x00000000,0x00000000,0x00000000},0x1e84,1,1969},
- {{0x00000000,0x00000000,0x00000000},0x1e85,1,1969},
- {{0x00000000,0x00000000,0x00000000},0x20a9,1,3344},
- {{0x00000000,0x00000000,0x00000000},0x0174,1,220},
- {{0x00000000,0x00000000,0x00000000},0x0175,1,220},
- {{0x40000001,0x00000000,0x00000000},0x308f,1,6657},
- {{0x00000001,0x00000020,0x00000000},0x30ef,1,6657},
- {{0x40000005,0x00000000,0x00000000},0x308e,1,6657},
- {{0x00000005,0x00000020,0x00000000},0x30ee,1,6657},
- {{0x00000000,0x00000000,0x00000000},0x301c,1,6513},
- {{0x00000081,0x00000000,0x00000000},0x0648,1,1547},
- {{0x00000081,0x00000010,0x00000000},0xfeed,1,1547},
- {{0x01000081,0x00000000,0x00000000},0xfeee,1,1547},
- {{0x00000089,0x00000000,0x00000000},0x0624,1,1360},
- {{0x00000089,0x00000010,0x00000000},0xfe85,1,1360},
- {{0x40000001,0x00000000,0x00000000},0x3091,1,6663},
- {{0x00000001,0x00000020,0x00000000},0x30f1,1,6663},
- {{0x00000000,0x00000000,0x00000000},0x0624,1,1370},
- {{0x00000000,0x00000000,0x00000000},0xfe85,1,7007},
- {{0x40000001,0x00000000,0x00000000},0x3090,1,6660},
- {{0x00000001,0x00000020,0x00000000},0x30f0,1,6660},
- {{0x40000001,0x00000000,0x00000000},0x3092,1,6666},
- {{0x00000001,0x00000020,0x00000000},0x30f2,1,6666},
- {{0x00000001,0x00000000,0x00000000},0x20a9,1,3340},
- {{0x00000201,0x00000000,0x00000000},0x3112,0,1592},
- {{0x00040003,0x00000040,0x00000000},0x1e8c,0,1592},
- {{0x00040005,0x00000040,0x00000000},0x1e8d,0,1592},
- {{0x00000005,0x00040040,0x00000000},0x24b3,0,1592},
- {{0x00004003,0x00000040,0x00000000},0x24cd,0,1592},
- {{0x00004005,0x00000040,0x00000000},0x24e7,0,1592},
- {{0x0008000b,0x00000040,0x00000000},0x1e8a,0,1592},
- {{0x0008000d,0x00000040,0x00000000},0x1e8b,0,1592},
- {{0x00000000,0x00000000,0x00000000},0x24cd,1,5405},
- {{0x00000000,0x00000000,0x00000000},0x24e7,1,5405},
- {{0x00000000,0x00000000,0x00000000},0x03a7,1,796},
- {{0x00000000,0x00000000,0x00000000},0x03c7,1,796},
- {{0x00000000,0x00000000,0x00000000},0x05d7,1,1214},
- {{0x00000000,0x00000000,0x00000000},0x062e,1,1214},
- {{0x00000000,0x00000000,0x00000000},0xfea7,1,7119},
- {{0x00000000,0x00000000,0x00000000},0xfea5,1,7111},
- {{0x00000000,0x00000000,0x00000000},0xfea6,1,7115},
- {{0x00000000,0x00000000,0x00000000},0xfea8,1,7123},
- {{0x00000000,0x00000000,0x00000000},0x1e8a,1,1979},
- {{0x00000000,0x00000000,0x00000000},0x1e8b,1,1979},
- {{0x00000000,0x00000000,0x00000000},0x3112,1,6826},
- {{0x00000000,0x00000000,0x00000000},0x1e8c,1,1982},
- {{0x00000000,0x00000000,0x00000000},0x1e8d,1,1982},
- {{0x08000003,0x00000000,0x00000000},0x039e,1,747},
- {{0x08000005,0x00000000,0x00000000},0x03be,1,747},
- {{0x00000000,0x00000000,0x00000000},0x2717,1,6321},
- {{0x00008003,0x00000040,0x00000000},0x0176,0,1594},
- {{0x00008005,0x00000040,0x00000000},0x0177,0,1594},
- {{0x00040003,0x00000040,0x00000000},0x0178,0,1594},
- {{0x04000003,0x00000040,0x00000000},0x1ef2,0,1594},
- {{0x04000005,0x00000040,0x00000000},0x1ef3,0,1594},
- {{0x00000003,0x02000040,0x00000000},0x1ef8,0,1594},
- {{0x00000005,0x02000040,0x00000000},0x1ef9,0,1594},
- {{0x00000005,0x00040040,0x00000000},0x24b4,0,1594},
- {{0x00004003,0x00000040,0x00000000},0x24ce,0,1594},
- {{0x00004005,0x00000040,0x00000000},0x24e8,0,1594},
- {{0x0008000b,0x00000040,0x00000000},0x1e8e,0,1594},
- {{0x0008000d,0x00000040,0x00000000},0x1e8f,0,1594},
- {{0x00080103,0x00000040,0x00000000},0x1ef4,0,1594},
- {{0x00080105,0x00000040,0x00000000},0x1ef5,0,1594},
- {{0x8000000b,0x00000040,0x00000000},0x1ef6,0,1594},
- {{0x8000000d,0x00000040,0x00000000},0x1ef7,0,1594},
- {{0x00000000,0x00000000,0x00000000},0x24ce,1,5409},
- {{0x00000000,0x00000000,0x00000000},0x24e8,1,5409},
- {{0x00000000,0x00000000,0x00000000},0x1ef2,1,2162},
- {{0x00000000,0x00000000,0x00000000},0x1ef3,1,2162},
- {{0x00000000,0x00000000,0x00000000},0x0389,1,639},
- {{0x00000000,0x00000000,0x00000000},0x03ae,1,639},
- {{0x00000000,0x00000000,0x00000000},0x0397,1,705},
- {{0x00000000,0x00000000,0x00000000},0x03b7,1,705},
- {{0x00000000,0x00000000,0x00000000},0x1f74,1,2437},
- {{0x00000000,0x00000000,0x00000000},0x1fca,1,2437},
- {{0x00000000,0x00000000,0x00000000},0x1fc2,1,2673},
- {{0x00000000,0x00000000,0x00000000},0x1f75,1,2441},
- {{0x00000000,0x00000000,0x00000000},0x1fcb,1,2441},
- {{0x00000000,0x00000000,0x00000000},0x1fc4,1,2682},
- {{0x00000000,0x00000000,0x00000000},0x1f20,1,2241},
- {{0x00000000,0x00000000,0x00000000},0x1f28,1,2241},
- {{0x00000000,0x00000000,0x00000000},0x1f22,1,2249},
- {{0x00000000,0x00000000,0x00000000},0x1f2a,1,2249},
- {{0x00000000,0x00000000,0x00000000},0x1f92,1,2533},
- {{0x00000000,0x00000000,0x00000000},0x1f9a,1,2533},
- {{0x00000000,0x00000000,0x00000000},0x1f24,1,2259},
- {{0x00000000,0x00000000,0x00000000},0x1f2c,1,2259},
- {{0x00000000,0x00000000,0x00000000},0x1f94,1,2545},
- {{0x00000000,0x00000000,0x00000000},0x1f9c,1,2545},
- {{0x00000000,0x00000000,0x00000000},0x1f26,1,2269},
- {{0x00000000,0x00000000,0x00000000},0x1f2e,1,2269},
- {{0x00000000,0x00000000,0x00000000},0x1f96,1,2557},
- {{0x00000000,0x00000000,0x00000000},0x1f9e,1,2557},
- {{0x00000000,0x00000000,0x00000000},0x1f90,1,2523},
- {{0x00000000,0x00000000,0x00000000},0x1f98,1,2523},
- {{0x00000000,0x00000000,0x00000000},0x1f21,1,2245},
- {{0x00000000,0x00000000,0x00000000},0x1f29,1,2245},
- {{0x00000000,0x00000000,0x00000000},0x1f23,1,2254},
- {{0x00000000,0x00000000,0x00000000},0x1f2b,1,2254},
- {{0x00000000,0x00000000,0x00000000},0x1f93,1,2539},
- {{0x00000000,0x00000000,0x00000000},0x1f9b,1,2539},
- {{0x00000000,0x00000000,0x00000000},0x1f25,1,2264},
- {{0x00000000,0x00000000,0x00000000},0x1f2d,1,2264},
- {{0x00000000,0x00000000,0x00000000},0x1f95,1,2551},
- {{0x00000000,0x00000000,0x00000000},0x1f9d,1,2551},
- {{0x00000000,0x00000000,0x00000000},0x1f27,1,2274},
- {{0x00000000,0x00000000,0x00000000},0x1f2f,1,2274},
- {{0x00000000,0x00000000,0x00000000},0x1f97,1,2563},
- {{0x00000000,0x00000000,0x00000000},0x1f9f,1,2563},
- {{0x00000000,0x00000000,0x00000000},0x1f91,1,2528},
- {{0x00000000,0x00000000,0x00000000},0x1f99,1,2528},
- {{0x00000000,0x00000000,0x00000000},0x1fc6,1,2687},
- {{0x00000000,0x00000000,0x00000000},0x1fc7,1,2691},
- {{0x00000000,0x00000000,0x00000000},0x1fc3,1,2678},
- {{0x00000000,0x00000000,0x00000000},0x1fcc,1,2678},
- {{0x00000000,0x00000000,0x00000000},0x064a,1,1563},
- {{0x00000000,0x00000000,0x00000000},0xfef3,1,7423},
- {{0x00000000,0x00000000,0x00000000},0xfef1,1,7415},
- {{0x00000000,0x00000000,0x00000000},0xfef2,1,7419},
- {{0x00000000,0x00000000,0x00000000},0xfef4,1,7427},
- {{0x00000000,0x00000000,0x00000000},0x1ef4,1,2165},
- {{0x00000000,0x00000000,0x00000000},0x1ef5,1,2165},
- {{0x00000000,0x00000000,0x00000000},0x1e8e,1,1985},
- {{0x00000000,0x00000000,0x00000000},0x1e8f,1,1985},
- {{0x00000000,0x00000000,0x00000000},0x1ef6,1,2169},
- {{0x00000000,0x00000000,0x00000000},0x1ef7,1,2169},
- {{0x00000000,0x00000000,0x00000000},0x0462,1,1125},
- {{0x00000000,0x00000000,0x00000000},0x0463,1,1125},
- {{0x00000000,0x00000000,0x00000000},0x0178,0,2952},
- {{0x00000000,0x00000000,0x00000000},0x042b,1,1092},
- {{0x00000000,0x00000000,0x00000000},0x044b,1,1092},
- {{0x00000000,0x00000000,0x00000000},0x0176,1,223},
- {{0x00000000,0x00000000,0x00000000},0x0177,1,223},
- {{0x00000000,0x00000000,0x00000000},0x1ef8,1,2172},
- {{0x00000000,0x00000000,0x00000000},0x1ef9,1,2172},
- {{0x40000001,0x00000000,0x00000000},0x3084,1,1109},
- {{0x00000001,0x00000020,0x00000000},0x30e4,1,1109},
- {{0x00010003,0x00000000,0x00000000},0x042f,1,1109},
- {{0x00010005,0x00000000,0x00000000},0x044f,1,1109},
- {{0x40000005,0x00000000,0x00000000},0x3083,1,1109},
- {{0x00000005,0x00000020,0x00000000},0x30e3,1,1109},
- {{0x00010003,0x00000000,0x00000000},0x0462,1,1121},
- {{0x00010005,0x00000000,0x00000000},0x0463,1,1121},
- {{0x00000081,0x00000000,0x00000000},0x064a,1,1559},
- {{0x00000081,0x00000010,0x00000000},0xfef1,1,1559},
- {{0x01000081,0x00000000,0x00000000},0xfef2,1,1559},
- {{0x00000081,0x00000004,0x00000000},0xfef3,1,1559},
- {{0x00000081,0x00001000,0x00000000},0xfef4,1,1559},
- {{0x00000089,0x00000000,0x00000000},0x0626,1,1373},
- {{0x00000089,0x00000004,0x00000000},0xfe8b,1,1373},
- {{0x00010003,0x00000000,0x00000000},0x042b,1,1087},
- {{0x00010005,0x00000000,0x00000000},0x044b,1,1087},
- {{0x00000000,0x00000000,0x00000000},0x0626,1,1383},
- {{0x00000000,0x00000000,0x00000000},0xfe8b,1,7011},
- {{0x00000000,0x00000000,0x00000000},0x0407,1,905},
- {{0x00000000,0x00000000,0x00000000},0x0457,1,905},
- {{0x00010003,0x00000000,0x00000000},0x0407,1,905},
- {{0x00010005,0x00000000,0x00000000},0x0457,1,905},
- {{0x40000001,0x00000000,0x00000000},0x3088,1,6645},
- {{0x00000001,0x00000020,0x00000000},0x30e8,1,6645},
- {{0x40000005,0x00000000,0x00000000},0x3087,1,6645},
- {{0x00000005,0x00000020,0x00000000},0x30e7,1,6645},
- {{0x20000001,0x00000000,0x00000000},0x05d9,1,1224},
- {{0x08000000,0x00000000,0x00000000},0x037a,1,575},
- {{0x08000045,0x00000000,0x00000000},0x1fb3,1,575},
- {{0x08800005,0x00000000,0x00000000},0x1fc3,1,575},
- {{0x08000005,0x00008000,0x00000000},0x1ff3,1,575},
- {{0x08000045,0x00200000,0x00000000},0x1f80,1,575},
- {{0x08020045,0x00000000,0x00000000},0x1f81,1,575},
- {{0x08800005,0x00200000,0x00000000},0x1f90,1,575},
- {{0x08820005,0x00000000,0x00000000},0x1f91,1,575},
- {{0x08000005,0x00208000,0x00000000},0x1fa0,1,575},
- {{0x08020005,0x00008000,0x00000000},0x1fa1,1,575},
- {{0x08000045,0x20000000,0x00000000},0x1fb2,1,575},
- {{0x08000045,0x00020000,0x00000000},0x1fb4,1,575},
- {{0x08000045,0x00080000,0x00000000},0x1fb7,1,575},
- {{0x08800005,0x20000000,0x00000000},0x1fc2,1,575},
- {{0x08800005,0x00020000,0x00000000},0x1fc4,1,575},
- {{0x08800005,0x00080000,0x00000000},0x1fc7,1,575},
- {{0x08000005,0x20008000,0x00000000},0x1ff2,1,575},
- {{0x08000005,0x00028000,0x00000000},0x1ff4,1,575},
- {{0x08000005,0x00088000,0x00000000},0x1ff7,1,575},
- {{0x08000045,0x20200000,0x00000000},0x1f82,1,575},
- {{0x08020045,0x20000000,0x00000000},0x1f83,1,575},
- {{0x08000045,0x00220000,0x00000000},0x1f84,1,575},
- {{0x08020045,0x00020000,0x00000000},0x1f85,1,575},
- {{0x08000045,0x00280000,0x00000000},0x1f86,1,575},
- {{0x08020045,0x00080000,0x00000000},0x1f87,1,575},
- {{0x08800005,0x20200000,0x00000000},0x1f92,1,575},
- {{0x08820005,0x20000000,0x00000000},0x1f93,1,575},
- {{0x08800005,0x00220000,0x00000000},0x1f94,1,575},
- {{0x08820005,0x00020000,0x00000000},0x1f95,1,575},
- {{0x08800005,0x00280000,0x00000000},0x1f96,1,575},
- {{0x08820005,0x00080000,0x00000000},0x1f97,1,575},
- {{0x08000005,0x20208000,0x00000000},0x1fa2,1,575},
- {{0x08020005,0x20008000,0x00000000},0x1fa3,1,575},
- {{0x08000005,0x00228000,0x00000000},0x1fa4,1,575},
- {{0x08020005,0x00028000,0x00000000},0x1fa5,1,575},
- {{0x08000005,0x00288000,0x00000000},0x1fa6,1,575},
- {{0x08020005,0x00088000,0x00000000},0x1fa7,1,575},
- {{0x00000000,0x00000000,0x00000000},0x01a6,1,266},
- {{0x00000001,0x00000040,0x00000000},0x01a6,1,266},
- {{0x40000001,0x00000000,0x00000000},0x3086,1,1103},
- {{0x00000001,0x00000020,0x00000000},0x30e6,1,1103},
- {{0x00010003,0x00000000,0x00000000},0x042e,1,1103},
- {{0x00010005,0x00000000,0x00000000},0x044e,1,1103},
- {{0x40000005,0x00000000,0x00000000},0x3085,1,1103},
- {{0x00000005,0x00000020,0x00000000},0x30e5,1,1103},
- {{0x00010003,0x00000000,0x00200000},0x046a,1,1128},
- {{0x00010005,0x00000000,0x00200000},0x046b,1,1128},
- {{0x00000201,0x00000000,0x00000000},0x3117,0,1596},
- {{0x00000013,0x00000040,0x00000000},0x0179,0,1596},
- {{0x00000015,0x00000040,0x00000000},0x017a,0,1596},
- {{0x00001003,0x00000040,0x00000000},0x017d,0,1596},
- {{0x00001005,0x00000040,0x00000000},0x017e,0,1596},
- {{0x00000003,0x00000040,0x10000000},0x01b5,0,1596},
- {{0x00000005,0x00000040,0x10000000},0x01b6,0,1596},
- {{0x00008003,0x00000040,0x00000000},0x1e90,0,1596},
- {{0x00008005,0x00000040,0x00000000},0x1e91,0,1596},
- {{0x00000005,0x00040040,0x00000000},0x24b5,0,1596},
- {{0x00004003,0x00000040,0x00000000},0x24cf,0,1596},
- {{0x00004005,0x00000040,0x00000000},0x24e9,0,1596},
- {{0x0008000b,0x00000040,0x00000000},0x017b,0,1596},
- {{0x0008000d,0x00000040,0x00000000},0x017c,0,1596},
- {{0x00080103,0x00000040,0x00000000},0x1e92,0,1596},
- {{0x00080105,0x00000040,0x00000000},0x1e93,0,1596},
- {{0x00000103,0x00000240,0x00000000},0x1e94,0,1596},
- {{0x00000105,0x00000240,0x00000000},0x1e95,0,1596},
- {{0x00000000,0x00000000,0x00000000},0x24cf,1,5413},
- {{0x00000000,0x00000000,0x00000000},0x24e9,1,5413},
- {{0x00000000,0x00000000,0x00000000},0x0416,1,977},
- {{0x00000000,0x00000000,0x00000000},0x0436,1,977},
- {{0x00000000,0x00000000,0x00000000},0x0179,1,226},
- {{0x00000000,0x00000000,0x00000000},0x017a,1,226},
- {{0x00000000,0x00000000,0x00000000},0x0396,1,702},
- {{0x00000000,0x00000000,0x00000000},0x03b6,1,702},
- {{0x00000000,0x00000000,0x00000000},0x05d6,1,1207},
- {{0x00000000,0x00000000,0x00000000},0x0632,1,1207},
- {{0x00000000,0x00000000,0x00000000},0xfeaf,1,7151},
- {{0x00000000,0x00000000,0x00000000},0xfeb0,1,7155},
- {{0x00000000,0x00000000,0x00000000},0x1e92,1,1991},
- {{0x00000000,0x00000000,0x00000000},0x1e93,1,1991},
- {{0x00000000,0x00000000,0x00000000},0x017b,1,229},
- {{0x00000000,0x00000000,0x00000000},0x017c,1,229},
- {{0x00000000,0x00000000,0x00000000},0x01b5,1,272},
- {{0x00000000,0x00000000,0x00000000},0x01b6,1,272},
- {{0x00000000,0x00000000,0x00000000},0x3117,1,6832},
- {{0x00000000,0x00000000,0x00000000},0x017d,1,232},
- {{0x00000000,0x00000000,0x00000000},0x017e,1,232},
- {{0x00000000,0x00000000,0x00000000},0x0417,1,983},
- {{0x00000000,0x00000000,0x00000000},0x0437,1,983},
- {{0x00000000,0x00000000,0x00000000},0x1e90,1,1988},
- {{0x00000000,0x00000000,0x00000000},0x1e91,1,1988},
- {{0x00000000,0x00000000,0x00000000},0x1e94,1,1995},
- {{0x00000000,0x00000000,0x00000000},0x1e95,1,1995},
- {{0x40000001,0x00000000,0x00000000},0x3056,1,6585},
- {{0x00000001,0x00000020,0x00000000},0x30b6,1,6585},
- {{0x00000081,0x00000000,0x00000000},0x0638,1,1487},
- {{0x00000081,0x00000010,0x00000000},0xfec5,1,1487},
- {{0x01000081,0x00000000,0x00000000},0xfec6,1,1487},
- {{0x00000081,0x00000004,0x00000000},0xfec7,1,1487},
- {{0x00000081,0x00001000,0x00000000},0xfec8,1,1487},
- {{0x00000081,0x00000000,0x00000000},0x0632,1,1450},
- {{0x00000081,0x00000010,0x00000000},0xfeaf,1,1450},
- {{0x01000081,0x00000000,0x00000000},0xfeb0,1,1450},
- {{0x20000001,0x00000000,0x00000000},0x05d6,1,1201},
- {{0x40000001,0x00000000,0x00000000},0x305c,1,980},
- {{0x00000001,0x00000020,0x00000000},0x30bc,1,980},
- {{0x00010003,0x00000000,0x00000000},0x0417,1,980},
- {{0x00010005,0x00000000,0x00000000},0x0437,1,980},
- {{0x00000000,0x00000000,0x00000020},0x2070,0,1435},
- {{0x00000000,0x00000000,0x00000040},0x2080,0,1435},
- {{0x00004001,0x00000000,0x00000000},0x24ea,0,1435},
- {{0x00000081,0x00000000,0x00000400},0x0660,0,1435},
- {{0x00000000,0x00002000,0x00000800},0x3007,0,1435},
- {{0x08000003,0x00000000,0x00000000},0x0396,1,697},
- {{0x08000005,0x00000000,0x00000000},0x03b6,1,697},
- {{0x00000000,0x00000000,0x00000000},0x0638,1,1491},
- {{0x00000201,0x00000000,0x00000000},0x3113,1,1491},
- {{0x00000000,0x00000000,0x00000000},0xfec7,1,7247},
- {{0x00000000,0x00000000,0x00000000},0xfec5,1,7239},
- {{0x00000000,0x00000000,0x00000000},0xfec6,1,7243},
- {{0x00000000,0x00000000,0x00000000},0xfec8,1,7251},
- {{0x00010003,0x00000000,0x00000000},0x0416,1,973},
- {{0x00010005,0x00000000,0x00000000},0x0436,1,973},
- {{0x40000001,0x00000000,0x00000000},0x3058,1,6588},
- {{0x00000001,0x00000020,0x00000000},0x30b8,1,6588},
- {{0x00000000,0x00000000,0x00000000},0x05e5,1,1300},
- {{0x00000000,0x00000000,0x00000000},0x05e6,1,1300},
- {{0x00000000,0x00000000,0x00000000},0x0698,1,1300},
- {{0x40000001,0x00000000,0x00000000},0x305e,1,6594},
- {{0x00000001,0x00000020,0x00000000},0x30be,1,6594},
- {{0x40000001,0x00000000,0x00000000},0x305a,1,6591},
- {{0x00000001,0x00000020,0x00000000},0x30ba,1,6591},
-#endif /* UCS_BYTE */
-};
diff --git a/usr/src/lib/libast/common/std/bytesex.h b/usr/src/lib/libast/common/std/bytesex.h
deleted file mode 100644
index 1f78d13287..0000000000
--- a/usr/src/lib/libast/common/std/bytesex.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * linux/gnu compatibility
- */
-
-#ifndef _BYTESEX_H
-#define _BYTESEX_H
-
-#include <ast_common.h>
-
-#undef __BYTE_ORDER
-
-#if ( _ast_intswap & 3 ) == 3
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#else
-#if ( _ast_intswap & 3 ) == 1
-#define __BYTE_ORDER __PDP_ENDIAN
-#else
-#define __BYTE_ORDER __BIG_ENDIAN
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/common/std/endian.h b/usr/src/lib/libast/common/std/endian.h
deleted file mode 100644
index 1c992dd490..0000000000
--- a/usr/src/lib/libast/common/std/endian.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * linux/gnu compatibility
- */
-
-#ifndef _ENDIAN_H
-#define _ENDIAN_H
-
-#include <bytesex.h>
-
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
-#define __PDP_ENDIAN 3412
-
-#if defined (__USE_BSD) && !defined(__STRICT_ANSI__)
-
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN __LITTLE_ENDIAN
-#endif
-
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN __BIG_ENDIAN
-#endif
-
-#ifndef PDP_ENDIAN
-#define PDP_ENDIAN __PDP_ENDIAN
-#endif
-
-#undef BYTE_ORDER
-#define BYTE_ORDER __BYTE_ORDER
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/common/string/chresc.c b/usr/src/lib/libast/common/string/chresc.c
deleted file mode 100644
index edb8f1a218..0000000000
--- a/usr/src/lib/libast/common/string/chresc.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#pragma prototyped
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * return the next character in the string s
- * \ character constants are converted
- * p is updated to point to the next character in s
- */
-
-#include <ast.h>
-#include <ctype.h>
-
-#include <ccode.h>
-#if !_PACKAGE_astsa
-#include <regex.h>
-#endif
-
-int
-chresc(register const char* s, char** p)
-{
- register const char* q;
- register int c;
- const char* e;
-#if !_PACKAGE_astsa
- int n;
- char buf[64];
-#endif
-
- switch (c = mbchar(s))
- {
- case 0:
- s--;
- break;
- case '\\':
- switch (c = *s++)
- {
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- c -= '0';
- q = s + 2;
- while (s < q)
- switch (*s)
- {
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- c = (c << 3) + *s++ - '0';
- break;
- default:
- q = s;
- break;
- }
- break;
- case 'a':
- c = CC_bel;
- break;
- case 'b':
- c = '\b';
- break;
- case 'c':
- control:
- if (c = *s)
- {
- s++;
- if (islower(c))
- c = toupper(c);
- }
- c = ccmapc(c, CC_NATIVE, CC_ASCII);
- c ^= 0x40;
- c = ccmapc(c, CC_ASCII, CC_NATIVE);
- break;
- case 'C':
- if (*s == '-' && *(s + 1))
- {
- s++;
- goto control;
- }
-#if !_PACKAGE_astsa
- if (*s == '[' && (n = regcollate(s + 1, (char**)&e, buf, sizeof(buf))) >= 0)
- {
- if (n == 1)
- c = buf[0];
- s = e;
- }
-#endif
- break;
- case 'e':
- case 'E':
- c = CC_esc;
- break;
- case 'f':
- c = '\f';
- break;
- case 'M':
- if (*s == '-')
- {
- s++;
- c = CC_esc;
- }
- break;
- case 'n':
- c = '\n';
- break;
- case 'r':
- c = '\r';
- break;
- case 't':
- c = '\t';
- break;
- case 'v':
- c = CC_vt;
- break;
- case 'u':
- case 'U':
- case 'x':
- c = 0;
- q = c == 'u' ? (s + 4) : c == 'U' ? (s + 8) : (char*)0;
- e = s;
- while (!e || !q || s < q)
- {
- switch (*s)
- {
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- c = (c << 4) + *s++ - 'a' + 10;
- continue;
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- c = (c << 4) + *s++ - 'A' + 10;
- continue;
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- c = (c << 4) + *s++ - '0';
- continue;
- case '{':
- case '[':
- if (s != e)
- break;
- e = 0;
- s++;
- continue;
- case '}':
- case ']':
- if (!e)
- s++;
- break;
- default:
- break;
- }
- break;
- }
- break;
- case 0:
- s--;
- break;
- }
- break;
- }
- if (p)
- *p = (char*)s;
- return c;
-}
diff --git a/usr/src/lib/libast/common/vmalloc/vmmopen.c b/usr/src/lib/libast/common/vmalloc/vmmopen.c
deleted file mode 100644
index 1f1653da23..0000000000
--- a/usr/src/lib/libast/common/vmalloc/vmmopen.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#if defined(_UWIN) && defined(_BLD_ast)
-
-void _STUB_vmmopen(){}
-
-#else
-
-#include "vmhdr.h"
-
-#if _sys_stat
-#include <sys/stat.h>
-#endif
-#include <fcntl.h>
-
-#ifdef S_IRUSR
-#define CREAT_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)
-#else
-#define CREAT_MODE 0644
-#endif
-
-#if _lib_mmap
-#include <sys/mman.h>
-#else
-#define mmap(a,b,c,d,e,f) MAP_FAILED
-#define munmap(a,b) MAP_FAILED
-#endif
-
-/* Create a region to allocate based on mmap()
-**
-** Written by Kiem-Phong Vo (kpv@research.att.com)
-*/
-
-#ifndef MAP_FAILED
-#define MAP_FAILED (void*)(-1)
-#endif
-
-#define MM_MAGIC (('V'<<24) | ('M'<<16) | ('A'<<8) | ('P'))
-#define MM_ROUND (64*1024)
-#define MM_START ROUND(sizeof(Mmvm_t),ALIGN)
-
-typedef struct _user_s
-{ struct _user_s* next; /* link list */
- int key; /* identifying key */
- Void_t* data; /* data to be returned */
-} User_t;
-
-typedef struct _mmvm_s
-{
- Vmulong_t magic; /* magic bytes */
- Void_t* base; /* base of the map */
- size_t size; /* current size */
- size_t busy; /* amount in use */
- size_t round; /* amount to round to */
- User_t* user; /* some user data */
-} Mmvm_t;
-
-typedef struct _mmvmdisc_s
-{
- Vmdisc_t disc; /* Vmalloc discipline */
- int fd; /* file descriptor */
- Mmvm_t* mm; /* mmap data */
-} Mmvmdisc_t;
-
-#if __STD_C
-static int mmvminit(char* file, Void_t* addr, size_t round, Mmvm_t* mm)
-#else
-static int mmvminit(file, addr, round, mm)
-char* file; /* file to map data from */
-Void_t* addr; /* desired starting address */
-size_t round; /* amount to round requests */
-Mmvm_t* mm; /* to return some mapped info */
-#endif
-{
- int fd;
- off_t size;
- Void_t *base;
- Mmvm_t *hdr;
-
- base = NIL(Void_t*);
- if((fd = open(file, O_RDWR, CREAT_MODE)) >= 0)
- { if((size = lseek(fd, (off_t)0, 2)) < 0)
- goto done;
- else if(size == 0)
- goto new_f;
-
- /* read the header */
- if(lseek(fd, (off_t)0, 0) != (off_t)0)
- goto done;
- if(read(fd, mm, sizeof(Mmvm_t)) != sizeof(Mmvm_t))
- goto done;
- if(mm->magic != MM_MAGIC || !mm->base ||
- (off_t)mm->size != size || mm->busy > mm->size )
- goto done;
- base = (Void_t*)mmap(mm->base, mm->size, PROT_READ|PROT_WRITE,
- MAP_FIXED|MAP_SHARED, fd, (off_t)0 );
- if(base == (Void_t*)MAP_FAILED)
- base = NIL(Void_t*);
- }
- else
- { if((fd = open(file, O_RDWR|O_CREAT, CREAT_MODE)) < 0)
- goto done;
-
- new_f: /* create an initial set of data */
- size = round;
- if(lseek(fd, size-1, 0) != (size-1) || write(fd, "", 1) != 1 )
- goto done;
-
- base = (Void_t*)mmap(addr, (size_t)size, PROT_READ|PROT_WRITE,
- (addr ? MAP_FIXED : 0)|MAP_SHARED, fd, (off_t)0 );
- if(base == (Void_t*)MAP_FAILED)
- base = NIL(Void_t*);
- if(!base)
- goto done;
-
- /* write magic number */
- hdr = (Mmvm_t*)base;
- hdr->magic = MM_MAGIC;
- hdr->base = base;
- hdr->size = size;
- hdr->busy = MM_START;
- hdr->round = round;
- hdr->user = NIL(User_t*);
- memcpy(mm, hdr, sizeof(Mmvm_t));
- }
-
-done:
- if(!base)
- { if(fd >= 0)
- close(fd);
- fd = -1;
- }
-
- return fd;
-}
-
-
-#if __STD_C
-static Void_t* mmvmmemory(Vmalloc_t* vm, Void_t* caddr,
- size_t csize, size_t nsize, Vmdisc_t* disc)
-#else
-static Void_t* mmvmmemory(vm, caddr, csize, nsize, disc)
-Vmalloc_t* vm;
-Void_t* caddr;
-size_t csize;
-size_t nsize;
-Vmdisc_t* disc;
-#endif
-{
- Mmvmdisc_t *mmdc = (Mmvmdisc_t*)disc;
-
- if(mmdc->fd < 0 || !mmdc->mm)
- return NIL(Void_t*);
-
-#define MMADDR(b) ((Void_t*)(((Vmuchar_t*)b) + MM_START) )
- if(caddr && caddr != MMADDR(mmdc->mm->base) )
- return NIL(Void_t*);
- if(nsize < csize)
- return NIL(Void_t*);
-
- if(nsize > mmdc->mm->size-MM_START)
- { /* base and size of new map */
- caddr = mmdc->mm->base;
- csize = MM_START + nsize +
- ((nsize % disc->round) < (disc->round/2) ? disc->round/2 : 0);
- csize = ROUND(csize, disc->round);
-
- /* make room for new space */
- if(lseek(mmdc->fd, (off_t)(csize-1), 0) != (off_t)(csize-1) ||
- write(mmdc->fd, "", 1) != 1 )
- return NIL(Void_t*);
-
- /* remap the space */
- (void)munmap(caddr, mmdc->mm->size);
- caddr = (Void_t*)mmap(caddr, csize, PROT_READ|PROT_WRITE,
- MAP_FIXED|MAP_SHARED, mmdc->fd, (off_t)0 );
- if(caddr == (Void_t*)MAP_FAILED)
- caddr = NIL(Void_t*);
- if(caddr)
- mmdc->mm->size = csize;
- else /* bad problem */
- { close(mmdc->fd);
- mmdc->fd = -1;
- mmdc->mm = NIL(Mmvm_t*);
- return NIL(Void_t*);
- }
- }
-
- mmdc->mm->busy = nsize+MM_START;
- return (Void_t*)(((Vmuchar_t*)mmdc->mm->base) + MM_START);
-}
-
-
-#if __STD_C
-static int mmvmexcept(Vmalloc_t* vm, int type, Void_t* data, Vmdisc_t* disc)
-#else
-static int mmvmexcept(vm, type, data, disc)
-Vmalloc_t* vm;
-int type;
-Void_t* data;
-Vmdisc_t* disc;
-#endif
-{
- Mmvmdisc_t *mmdc = (Mmvmdisc_t*)disc;
- Vmuchar_t *base;
-
- if(type == VM_OPEN)
- { if(mmdc->mm->busy > MM_START)
- { base = ((Vmuchar_t*)mmdc->mm->base) + MM_START;
- *((Void_t**)data) = (Void_t*)base;
- return 1;
- }
- else return 0;
- }
- else if(type == VM_CLOSE)
- { (void)munmap(mmdc->mm->base, mmdc->mm->size);
- (void)close(mmdc->fd);
- vmfree(Vmheap, mmdc);
- return 1; /* freeing of mapped data is already done */
- }
- else return 0;
-}
-
-
-#if __STD_C
-Vmalloc_t* vmmopen(char* file, Void_t* base, size_t round)
-#else
-Vmalloc_t* vmmopen(file, base, round)
-char* file; /* file mapping data from */
-Void_t* base; /* desired starting address */
-size_t round; /* amount to round requests */
-#endif
-{
- Vmalloc_t *vm;
- Mmvmdisc_t *mmdc;
- Mmvm_t mm;
- int fd;
-
- if(!file)
- return NIL(Vmalloc_t*);
-
- /* set the amount to round up to on each memory request */
- GETPAGESIZE(_Vmpagesize);
- if(round < MM_ROUND)
- round = MM_ROUND;
- round = ROUND(round, _Vmpagesize);
-
- if((fd = mmvminit(file, base, round, &mm)) < 0)
- return NIL(Vmalloc_t*);
-
- if(!(mmdc = (Mmvmdisc_t*)vmalloc(Vmheap, sizeof(Mmvmdisc_t))) )
- { close(fd);
- return NIL(Vmalloc_t*);
- }
-
- mmdc->disc.memoryf = mmvmmemory;
- mmdc->disc.exceptf = mmvmexcept;
- mmdc->disc.round = mm.round;
- mmdc->fd = fd;
- mmdc->mm = (Mmvm_t*)mm.base;
-
- if(!(vm = vmopen(&mmdc->disc, Vmbest, VM_TRUST)) )
- { mmvmexcept(NIL(Vmalloc_t*), VM_CLOSE, NIL(Void_t*), &mmdc->disc);
- return NIL(Vmalloc_t*);
- }
-
- return vm;
-}
-
-
-#if __STD_C
-Void_t* vmmset(Vmalloc_t* vm, int key, Void_t* data, int set)
-#else
-Void_t* vmmset(vm, data, key, set)
-Vmalloc_t* vm; /* a region based on vmmmopen */
-int key; /* key of data to be set */
-Void_t* data; /* data to be set */
-int set; /* 1 for setting, 0 for getting */
-#endif
-{
- User_t *u;
- Mmvm_t *mmvm = ((Mmvmdisc_t*)vm->disc)->mm;
-
- for(u = mmvm->user; u; u = u->next)
- if(u->key == key)
- break;
- if(!set)
- return u ? u->data : NIL(Void_t*);
- else if(u)
- { Void_t* old = u->data;
- u->data = data;
- return old;
- }
- else if(!(u = (User_t*)vmalloc(vm, sizeof(User_t))) )
- return NIL(Void_t*);
- else
- { u->data = data;
- u->key = key;
- u->next = mmvm->user;
- mmvm->user = u;
- return data;
- }
-}
-
-#endif
diff --git a/usr/src/lib/libast/common/vmalloc/vmopen.c b/usr/src/lib/libast/common/vmalloc/vmopen.c
deleted file mode 100644
index d0ce57987d..0000000000
--- a/usr/src/lib/libast/common/vmalloc/vmopen.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#if defined(_UWIN) && defined(_BLD_ast)
-
-void _STUB_vmopen(){}
-
-#else
-
-#include "vmhdr.h"
-
-/* Opening a new region of allocation.
-** Note that because of possible exotic memory types,
-** all region data must be stored within the space given
-** by the discipline.
-**
-** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
-*/
-
-typedef struct _vminit_
-{
- Vmdata_t vd; /* space for the region itself */
- Seg_t seg; /* space for segment */
- Block_t block; /* space for a block */
- Head_t head; /* space for the fake header */
- char a[3*ALIGN]; /* extra to fuss with alignment */
-} Vminit_t;
-
-#if __STD_C
-Vmalloc_t* vmopen(Vmdisc_t* disc, Vmethod_t* meth, int mode)
-#else
-Vmalloc_t* vmopen(disc, meth, mode)
-Vmdisc_t* disc; /* discipline to get segments */
-Vmethod_t* meth; /* method to manage space */
-int mode; /* type of region */
-#endif
-{
- reg Vmalloc_t* vm;
- reg Vmdata_t* vd;
- reg size_t s, a, incr;
- reg Block_t* b;
- reg Seg_t* seg;
- Vmuchar_t* addr;
- reg Vmemory_f memoryf;
- reg int e;
-
- if(!meth || !disc || !(memoryf = disc->memoryf) )
- return NIL(Vmalloc_t*);
-
- GETPAGESIZE(_Vmpagesize);
-
- /* note that Vmalloc_t space must be local to process since that's
- where the meth&disc function addresses are going to be stored */
- if(!(vm = (Vmalloc_t*)vmalloc(Vmheap,sizeof(Vmalloc_t))) )
- return NIL(Vmalloc_t*);
- vm->meth = *meth;
- vm->disc = disc;
- vm->file = NIL(char*);
- vm->line = 0;
-
- if(disc->exceptf)
- { addr = NIL(Vmuchar_t*);
- if((e = (*disc->exceptf)(vm,VM_OPEN,(Void_t*)(&addr),disc)) != 0)
- { if(e < 0 || !addr)
- goto open_error;
-
- /* align this address */
- if((a = (size_t)(VLONG(addr)%ALIGN)) != 0)
- addr += ALIGN-a;
-
- /* see if it's a valid region */
- vd = (Vmdata_t*)addr;
- if((vd->mode&meth->meth) != 0)
- { vm->data = vd;
- goto done;
- }
- else
- { open_error:
- vmfree(Vmheap,vm);
- return NIL(Vmalloc_t*);
- }
- }
- }
-
- /* make sure vd->incr is properly rounded */
- incr = disc->round <= 0 ? _Vmpagesize : disc->round;
- incr = MULTIPLE(incr,ALIGN);
-
- /* get space for region data */
- s = ROUND(sizeof(Vminit_t),incr);
- if(!(addr = (Vmuchar_t*)(*memoryf)(vm,NIL(Void_t*),0,s,disc)) )
- { vmfree(Vmheap,vm);
- return NIL(Vmalloc_t*);
- }
-
- /* make sure that addr is aligned */
- if((a = (size_t)(VLONG(addr)%ALIGN)) != 0)
- addr += ALIGN-a;
-
- /* initialize region */
- vd = (Vmdata_t*)addr;
- vd->mode = (mode&VM_FLAGS) | meth->meth;
- vd->incr = incr;
- vd->pool = 0;
- vd->free = vd->wild = NIL(Block_t*);
-
- if(vd->mode&(VM_TRACE|VM_MTDEBUG))
- vd->mode &= ~VM_TRUST;
-
- if(vd->mode&(VM_MTBEST|VM_MTDEBUG|VM_MTPROFILE))
- { vd->root = NIL(Block_t*);
- for(e = S_TINY-1; e >= 0; --e)
- TINY(vd)[e] = NIL(Block_t*);
- for(e = S_CACHE; e >= 0; --e)
- CACHE(vd)[e] = NIL(Block_t*);
- incr = sizeof(Vmdata_t);
- }
- else incr = OFFSET(Vmdata_t,root);
-
- vd->seg = (Seg_t*)(addr + ROUND(incr,ALIGN));
- /**/ ASSERT(VLONG(vd->seg)%ALIGN == 0);
-
- seg = vd->seg;
- seg->next = NIL(Seg_t*);
- seg->vmdt = vd;
- seg->addr = (Void_t*)(addr - (a ? ALIGN-a : 0));
- seg->extent = s;
- seg->baddr = addr + s - (a ? ALIGN : 0);
- seg->size = s; /* this size is larger than usual so that the segment
- will not be freed until the region is closed. */
- seg->free = NIL(Block_t*);
-
- /* make a data block out of the remainder */
- b = SEGBLOCK(seg);
- SEG(b) = seg;
- SIZE(b) = seg->baddr - (Vmuchar_t*)b - 2*sizeof(Head_t);
- *SELF(b) = b;
- /**/ ASSERT(SIZE(b)%ALIGN == 0);
- /**/ ASSERT(VLONG(b)%ALIGN == 0);
-
- /* make a fake header for next block in case of noncontiguous segments */
- SEG(NEXT(b)) = seg;
- SIZE(NEXT(b)) = BUSY|PFREE;
-
- if(vd->mode&(VM_MTLAST|VM_MTPOOL))
- seg->free = b;
- else vd->wild = b;
-
- vm->data = vd;
-
-done: /* add to the linked list of regions */
- vm->next = Vmheap->next;
- Vmheap->next = vm;
-
- return vm;
-}
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/align.h b/usr/src/lib/libast/i386/include/ast/align.h
deleted file mode 100644
index ec5ed75a77..0000000000
--- a/usr/src/lib/libast/i386/include/ast/align.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
-#ifndef _def_align_ast
-#define _def_align_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
-
-#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
-#define ALIGN_POINTER(x) ((char*)(x))
-#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
-
-#define ALIGN_BOUND ALIGN_BOUND2
-#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
-
-#define ALIGN_BIT1 0x1
-#define ALIGN_BOUND1 ALIGN_BOUND2
-#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
-#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffe)
-#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
-#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
-
-#define ALIGN_BIT2 0x2
-#define ALIGN_BOUND2 4
-#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+3)
-#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffc)
-#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffd)
-#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
-#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast.h b/usr/src/lib/libast/i386/include/ast/ast.h
deleted file mode 100644
index 5c0d5dcd30..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast.h
+++ /dev/null
@@ -1,388 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Advanced Software Technology Library
- * AT&T Research
- *
- * std + posix + ast
- */
-
-#ifndef _AST_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_H
-
-#include <ast_version.h>
-
-#ifndef _AST_STD_H
-#include <ast_std.h>
-#endif
-
-#ifndef _SFIO_H
-#include <sfio.h>
-#endif
-
-#ifndef ast
-#define ast _ast_info
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 1024
-#endif
-
-/*
- * workaround botched headers that assume <stdio.h>
- */
-
-#ifndef FILE
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-#define FILE struct _sfio_s
-#ifndef __FILE_typedef
-#define __FILE_typedef 1
-#endif
-#ifndef _FILEDEFED
-#define _FILEDEFED 1
-#endif
-#endif
-
-/*
- * exit() support -- this matches shell exit codes
- */
-
-#define EXIT_BITS 8 /* # exit status bits */
-
-#define EXIT_USAGE 2 /* usage exit code */
-#define EXIT_QUIT ((1<<(EXIT_BITS))-1) /* parent should quit */
-#define EXIT_NOTFOUND ((1<<(EXIT_BITS-1))-1) /* command not found */
-#define EXIT_NOEXEC ((1<<(EXIT_BITS-1))-2) /* other exec error */
-
-#define EXIT_CODE(x) ((x)&((1<<EXIT_BITS)-1))
-#define EXIT_CORE(x) (EXIT_CODE(x)|(1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))
-#define EXIT_TERM(x) (EXIT_CODE(x)|(1<<EXIT_BITS))
-
-/*
- * NOTE: for compatibility the following work for EXIT_BITS={7,8}
- */
-
-#define EXIT_STATUS(x) (((x)&((1<<(EXIT_BITS-2))-1))?(x):EXIT_CODE((x)>>EXIT_BITS))
-
-#define EXITED_CORE(x) (((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))==((1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))||((x)&((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))==((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))
-#define EXITED_TERM(x) ((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))
-
-/*
- * astconflist() flags
- */
-
-#define ASTCONF_parse 0x0001
-#define ASTCONF_write 0x0002
-#define ASTCONF_read 0x0004
-#define ASTCONF_lower 0x0008
-#define ASTCONF_base 0x0010
-#define ASTCONF_defined 0x0020
-#define ASTCONF_quote 0x0040
-#define ASTCONF_table 0x0080
-#define ASTCONF_matchcall 0x0100
-#define ASTCONF_matchname 0x0200
-#define ASTCONF_matchstandard 0x0400
-#define ASTCONF_error 0x0800
-#define ASTCONF_system 0x1000
-#define ASTCONF_AST 0x2000
-
-/*
- * pathcanon() flags
- */
-
-#define PATH_PHYSICAL 01
-#define PATH_DOTDOT 02
-#define PATH_EXISTS 04
-#define PATH_VERIFIED(n) (((n)&01777)<<5)
-
-/*
- * pathaccess() flags
- */
-
-#define PATH_READ 004
-#define PATH_WRITE 002
-#define PATH_EXECUTE 001
-#define PATH_REGULAR 010
-#define PATH_ABSOLUTE 020
-
-/*
- * touch() flags
- */
-
-#define PATH_TOUCH_CREATE 01
-#define PATH_TOUCH_VERBATIM 02
-
-/*
- * pathcheck() info
- */
-
-typedef struct
-{
- unsigned long date;
- char* feature;
- char* host;
- char* user;
-} Pathcheck_t;
-
-/*
- * strgrpmatch() flags
- */
-
-#define STR_MAXIMAL 01 /* maximal match */
-#define STR_LEFT 02 /* implicit left anchor */
-#define STR_RIGHT 04 /* implicit right anchor */
-#define STR_ICASE 010 /* ignore case */
-#define STR_GROUP 020 /* (|&) inside [@|&](...) only */
-
-/*
- * fmtquote() flags
- */
-
-#define FMT_ALWAYS 0x01 /* always quote */
-#define FMT_ESCAPED 0x02 /* already escaped */
-#define FMT_SHELL 0x04 /* escape $ ` too */
-#define FMT_WIDE 0x08 /* don't escape 8 bit chars */
-#define FMT_PARAM 0x10 /* disable FMT_SHELL ${$( quote */
-
-/*
- * multibyte macros
- */
-
-#define mbmax() (ast.mb_cur_max)
-#define mberr() (ast.tmp_int<0)
-
-#define mbcoll() (ast.mb_xfrm!=0)
-#define mbwide() (mbmax()>1)
-
-#define mbchar(p) (mbwide()?((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),mbmax()))>0?((p+=ast.tmp_int),ast.tmp_wchar):(p+=ast.mb_sync+1,ast.tmp_int)):(*(unsigned char*)(p++)))
-#define mbinit() (mbwide()?(*ast.mb_towc)((wchar_t*)0,(char*)0,mbmax()):0)
-#define mbsize(p) (mbwide()?(*ast.mb_len)((char*)(p),mbmax()):((p),1))
-#define mbconv(s,w) (ast.mb_conv?(*ast.mb_conv)(s,w):((*(s)=(w)),1))
-#define mbwidth(w) (ast.mb_width&&((ast.tmp_int=(*ast.mb_width)(w))>=0||(w)>UCHAR_MAX)?ast.tmp_int:1)
-#define mbxfrm(t,f,n) (mbcoll()?(*ast.mb_xfrm)((char*)(t),(char*)(f),n):0)
-
-/*
- * common macros
- */
-
-#define elementsof(x) (sizeof(x)/sizeof(x[0]))
-#define integralof(x) (((char*)(x))-((char*)0))
-#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
-#define oldof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)malloc(sizeof(t)*(n)+(x)))
-#define pointerof(x) ((__V_*)((char*)0+(x)))
-#define roundof(x,y) (((x)+(y)-1)&~((y)-1))
-#define ssizeof(x) ((int)sizeof(x))
-
-#define streq(a,b) (*(a)==*(b)&&!strcmp(a,b))
-#define strneq(a,b,n) (*(a)==*(b)&&!strncmp(a,b,n))
-#define strsignal(s) fmtsignal(s)
-
-#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
-#define NiL 0
-#define NoP(x) (void)(x)
-#else
-#define NiL ((char*)0)
-#define NoP(x) (&x,1)
-#endif
-
-#if !defined(NoF)
-#if defined(__STDC__) || defined(__STDPP__)
-#define NoF(x) void _DATA_ ## x () {}
-#else
-#define NoF(x) void _DATA_/**/x () {}
-#endif
-#if !defined(_DATA_)
-#define _DATA_
-#endif
-#endif
-
-#if !defined(NoN)
-#if defined(__STDC__) || defined(__STDPP__)
-#define NoN(x) void _STUB_ ## x () {}
-#else
-#define NoN(x) void _STUB_/**/x () {}
-#endif
-#if !defined(_STUB_)
-#define _STUB_
-#endif
-#endif
-
-#define NOT_USED(x) NoP(x)
-
-typedef int (*Error_f) __PROTO__((__V_*, __V_*, int, ...));
-
-typedef int (*Ast_confdisc_f) __PROTO__((const char*, const char*, const char*));
-typedef int (*Strcmp_context_f) __PROTO__((const char*, const char*, __V_*));
-typedef int (*Strcmp_f) __PROTO__((const char*, const char*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* astgetconf __PROTO__((const char*, const char*, const char*, int, Error_f));
-extern __MANGLE__ char* astconf __PROTO__((const char*, const char*, const char*));
-extern __MANGLE__ Ast_confdisc_f astconfdisc __PROTO__((Ast_confdisc_f));
-extern __MANGLE__ void astconflist __PROTO__((Sfio_t*, const char*, int, const char*));
-extern __MANGLE__ off_t astcopy __PROTO__((int, int, off_t));
-extern __MANGLE__ int astlicense __PROTO__((char*, int, char*, char*, int, int, int));
-extern __MANGLE__ int astquery __PROTO__((int, const char*, ...));
-extern __MANGLE__ void astwinsize __PROTO__((int, int*, int*));
-
-extern __MANGLE__ ssize_t base64encode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
-extern __MANGLE__ ssize_t base64decode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
-extern __MANGLE__ int chresc __PROTO__((const char*, char**));
-extern __MANGLE__ int chrtoi __PROTO__((const char*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ char* fmtbase __PROTO__((long, int, int));
-extern __MANGLE__ char* fmtbasell __PROTO__((intmax_t, int, int));
-#define fmtbase(a,b,c) fmtbasell((intmax_t)(a),b,c) /* until 2003-09-01 */
-extern __MANGLE__ char* fmtbuf __PROTO__((size_t));
-extern __MANGLE__ char* fmtclock __PROTO__((Sfulong_t));
-extern __MANGLE__ char* fmtelapsed __PROTO__((unsigned long, int));
-extern __MANGLE__ char* fmterror __PROTO__((int));
-extern __MANGLE__ char* fmtesc __PROTO__((const char*));
-extern __MANGLE__ char* fmtesq __PROTO__((const char*, const char*));
-extern __MANGLE__ char* fmtident __PROTO__((const char*));
-extern __MANGLE__ char* fmtip4 __PROTO__((uint32_t, int));
-extern __MANGLE__ char* fmtfmt __PROTO__((const char*));
-extern __MANGLE__ char* fmtgid __PROTO__((int));
-extern __MANGLE__ char* fmtmatch __PROTO__((const char*));
-extern __MANGLE__ char* fmtmode __PROTO__((int, int));
-extern __MANGLE__ char* fmtnesq __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ char* fmtnum __PROTO__((unsigned long, int));
-extern __MANGLE__ char* fmtperm __PROTO__((int));
-extern __MANGLE__ char* fmtquote __PROTO__((const char*, const char*, const char*, size_t, int));
-extern __MANGLE__ char* fmtre __PROTO__((const char*));
-extern __MANGLE__ char* fmtscale __PROTO__((Sfulong_t, int));
-extern __MANGLE__ char* fmtsignal __PROTO__((int));
-extern __MANGLE__ char* fmttime __PROTO__((const char*, time_t));
-extern __MANGLE__ char* fmtuid __PROTO__((int));
-extern __MANGLE__ char* fmtversion __PROTO__((unsigned long));
-extern __MANGLE__ __V_* memdup __PROTO__((const __V_*, size_t));
-extern __MANGLE__ void memfatal __PROTO__((void));
-extern __MANGLE__ unsigned int memhash __PROTO__((const __V_*, int));
-extern __MANGLE__ unsigned long memsum __PROTO__((const __V_*, int, unsigned long));
-extern __MANGLE__ char* pathaccess __PROTO__((char*, const char*, const char*, const char*, int));
-extern __MANGLE__ char* pathbin __PROTO__((void));
-extern __MANGLE__ char* pathcanon __PROTO__((char*, int));
-extern __MANGLE__ char* pathcat __PROTO__((char*, const char*, int, const char*, const char*));
-extern __MANGLE__ int pathcd __PROTO__((const char*, const char*));
-extern __MANGLE__ int pathcheck __PROTO__((const char*, const char*, Pathcheck_t*));
-extern __MANGLE__ int pathexists __PROTO__((char*, int));
-extern __MANGLE__ char* pathfind __PROTO__((const char*, const char*, const char*, char*, size_t));
-extern __MANGLE__ int pathgetlink __PROTO__((const char*, char*, int));
-extern __MANGLE__ int pathinclude __PROTO__((const char*));
-extern __MANGLE__ char* pathkey __PROTO__((char*, char*, const char*, const char*, const char*));
-extern __MANGLE__ size_t pathnative __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathpath __PROTO__((char*, const char*, const char*, int));
-extern __MANGLE__ size_t pathposix __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathprobe __PROTO__((char*, char*, const char*, const char*, const char*, int));
-extern __MANGLE__ size_t pathprog __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathrepl __PROTO__((char*, const char*, const char*));
-extern __MANGLE__ int pathsetlink __PROTO__((const char*, const char*));
-extern __MANGLE__ char* pathshell __PROTO__((void));
-extern __MANGLE__ char* pathtemp __PROTO__((char*, size_t, const char*, const char*, int*));
-extern __MANGLE__ char* pathtmp __PROTO__((char*, const char*, const char*, int*));
-extern __MANGLE__ char* setenviron __PROTO__((const char*));
-extern __MANGLE__ int stracmp __PROTO__((const char*, const char*));
-extern __MANGLE__ char* strcopy __PROTO__((char*, const char*));
-extern __MANGLE__ unsigned long strelapsed __PROTO__((const char*, char**, int));
-extern __MANGLE__ int stresc __PROTO__((char*));
-extern __MANGLE__ long streval __PROTO__((const char*, char**, long(*)(const char*, char**)));
-extern __MANGLE__ long strexpr __PROTO__((const char*, char**, long(*)(const char*, char**, __V_*), __V_*));
-extern __MANGLE__ int strgid __PROTO__((const char*));
-extern __MANGLE__ int strgrpmatch __PROTO__((const char*, const char*, int*, int, int));
-extern __MANGLE__ unsigned int strhash __PROTO__((const char*));
-extern __MANGLE__ __V_* strlook __PROTO__((const __V_*, size_t, const char*));
-extern __MANGLE__ int strmatch __PROTO__((const char*, const char*));
-extern __MANGLE__ int strmode __PROTO__((const char*));
-extern __MANGLE__ int strnacmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ char* strncopy __PROTO__((char*, const char*, size_t));
-extern __MANGLE__ int strnpcmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ double strntod __PROTO__((const char*, size_t, char**));
-extern __MANGLE__ _ast_fltmax_t strntold __PROTO__((const char*, size_t, char**));
-extern __MANGLE__ long strntol __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ intmax_t strntoll __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ long strnton __PROTO__((const char*, size_t, char**, char*, int));
-extern __MANGLE__ unsigned long strntoul __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ intmax_t strntonll __PROTO__((const char*, size_t, char**, char*, int));
-extern __MANGLE__ uintmax_t strntoull __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ int strnvcmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ int stropt __PROTO__((const char*, const __V_*, int, int(*)(__V_*, const __V_*, int, const char*), __V_*));
-extern __MANGLE__ int strpcmp __PROTO__((const char*, const char*));
-extern __MANGLE__ int strperm __PROTO__((const char*, char**, int));
-extern __MANGLE__ __V_* strpsearch __PROTO__((const __V_*, size_t, size_t, const char*, char**));
-extern __MANGLE__ __V_* strsearch __PROTO__((const __V_*, size_t, size_t, Strcmp_f, const char*, __V_*));
-extern __MANGLE__ void strsort __PROTO__((char**, int, int(*)(const char*, const char*)));
-extern __MANGLE__ char* strsubmatch __PROTO__((const char*, const char*, int));
-extern __MANGLE__ unsigned long strsum __PROTO__((const char*, unsigned long));
-extern __MANGLE__ char* strtape __PROTO__((const char*, char**));
-extern __MANGLE__ int strtoip4 __PROTO__((const char*, char**, uint32_t*, unsigned char*));
-extern __MANGLE__ long strton __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ intmax_t strtonll __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ int struid __PROTO__((const char*));
-extern __MANGLE__ int struniq __PROTO__((char**, int));
-extern __MANGLE__ int strvcmp __PROTO__((const char*, const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/*
- * C library global data symbols not prototyped by <unistd.h>
- */
-
-#if !defined(environ) && defined(__DYNAMIC__)
-#define environ __DYNAMIC__(environ)
-#else
-extern __MANGLE__ char** environ;
-#endif
-
-/*
- * really handy malloc()/free() (__FILE__,__LINE__,__FUNCTION__) tracing
- * make with VMDEBUG==1 or debug=1 or CCFLAGS=$(CC.DEBUG)
- * VMDEBUG==0 disables
- * at runtime export VMDEBUG or VMTRACE per vmalloc.3
- * to list originating call locations
- */
-
-#if !_std_malloc && !defined(VMFL) && !defined(_VMHDR_H) && \
- (!defined(VMDEBUG) || VMDEBUG) && (VMDEBUG || _BLD_DEBUG)
-
-#define VMFL 1
-#include <vmalloc.h>
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_botch.h b/usr/src/lib/libast/i386/include/ast/ast_botch.h
deleted file mode 100644
index 78b2b31a5a..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_botch.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_ccode.h b/usr/src/lib/libast/i386/include/ast/ast_ccode.h
deleted file mode 100644
index 1f82f1c28a..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_ccode.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
-#ifndef _def_ccode_ast
-#define _def_ccode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define CC_ASCII 1 /* ISO-8859-1 */
-#define CC_EBCDIC_E 2 /* Xopen dd(1) EBCDIC */
-#define CC_EBCDIC_I 3 /* Xopen dd(1) IBM */
-#define CC_EBCDIC_O 4 /* IBM-1047 mvs OpenEdition */
-#define CC_EBCDIC_S 5 /* Siemens posix-bc */
-#define CC_EBCDIC_H 6 /* IBM-37 AS/400 */
-#define CC_EBCDIC_M 7 /* IBM mvs cobol */
-#define CC_EBCDIC_U 8 /* microfocus cobol */
-
-#define CC_MAPS 8 /* number of code maps */
-
-#define CC_EBCDIC CC_EBCDIC_E
-#define CC_EBCDIC1 CC_EBCDIC_E
-#define CC_EBCDIC2 CC_EBCDIC_I
-#define CC_EBCDIC3 CC_EBCDIC_O
-
-#define CC_NATIVE CC_ASCII /* native character code */
-#define CC_ALIEN CC_EBCDIC /* alien character code */
-
-#define CC_bel 0007 /* bel character */
-#define CC_esc 0033 /* esc character */
-#define CC_sub 0032 /* sub character */
-#define CC_vt 0013 /* vt character */
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_common.h b/usr/src/lib/libast/i386/include/ast/ast_common.h
deleted file mode 100644
index aa16d54d99..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_common.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
-#ifndef _AST_COMMON_H
-#define _AST_COMMON_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_pthread 1 /* #include <pthread.h> ok */
-#define _hdr_stdarg 1 /* #include <stdarg.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdint 1 /* #include <stdint.h> ok */
-#define _hdr_inttypes 1 /* #include <inttypes.h> ok */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_long_double 1 /* long double is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _std_proto 1 /* standard C prototypes ok */
-#define _ptr_void 1 /* standard C void* ok */
-/* disable non-standard linux/gnu inlines */
-#ifdef __GNUC__
-# undef __OPTIMIZE_SIZE__
-# define __OPTIMIZE_SIZE__ 1
-#endif
-
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && __STDC__
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && (__cplusplus || c_plusplus)
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && _std_proto
-# define __STD_C 1
-#endif
-#if !defined(__STD_C)
-# define __STD_C 0
-#endif
-
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-# if __cplusplus || c_plusplus
-# define _BEGIN_EXTERNS_ extern "C" {
-# define _END_EXTERNS_ }
-# else
-# define _BEGIN_EXTERNS_
-# define _END_EXTERNS_
-# endif
-#endif
-
-/* _ARG_ simplifies function prototyping among flavors of C */
-#ifndef _ARG_
-# if __STD_C
-# define _ARG_(x) x
-# else
-# define _ARG_(x) ()
-# endif
-#endif
-
-/* _NIL_ simplifies defining nil pointers to a given type */
-#ifndef _NIL_
-# define _NIL_(x) ((x)0)
-#endif
-
-/* __INLINE__ is the inline keyword */
-#if !defined(__INLINE__) && defined(__cplusplus)
-# define __INLINE__ inline
-#endif
-#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-#endif
-
-/* Void_t is defined so that Void_t* can address any type */
-#ifndef Void_t
-# if __STD_C
-# define Void_t void
-# else
-# define Void_t char
-# endif
-#endif
-
-/* windows variants and veneers */
-#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
-# define _WINIX 1
-#endif
-
-/* dynamic linked library external scope handling */
-#ifdef __DYNAMIC__
-# undef __DYNAMIC__
-# ifndef _DLL
-# define _DLL 1
-# endif
-#endif
-#if _dll_import
-# if _BLD_STATIC && !_BLD_DLL
-# undef _DLL
-# else
-# if !_UWIN && !defined(_DLL)
-# define _DLL 1
-# endif
-# endif
-# if !defined(__EXPORT__) && _BLD_DLL
-# define __EXPORT__ __declspec(dllexport)
-# endif
-# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
-# define __IMPORT__ __declspec(dllimport)
-# endif
-# if _BLD_DLL && _UWIN
-# define __DYNAMIC__(v) (_ast_getdll()->_ast_ ## v)
-# endif
-#endif
-#if !defined(_astimport)
-# if defined(__IMPORT__) && defined(_DLL)
-# define _astimport __IMPORT__
-# else
-# define _astimport extern
-# endif
-#endif
-#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
-# ifdef __STDC__
-# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
-# else
-# define __EXTERN__(T,obj) extern T obj; T* _imp__/**/obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__/**/obj = &obj
-# endif
-#else
-# define __EXTERN__(T,obj) extern T obj
-# define __DEFINE__(T,obj,val) T obj = val
-#endif
-
-#define _ast_LL 1 /* LL numeric suffix supported */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intswap 7
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt12_t long double
-#define _ast_fltmax_t _ast_flt12_t
-#define _typ_int8_t 1 /* int8_t is a type */
-#define _typ_uint8_t 1 /* uint8_t is a type */
-#define _typ_int16_t 1 /* int16_t is a type */
-#define _typ_uint16_t 1 /* uint16_t is a type */
-#define _typ_int32_t 1 /* int32_t is a type */
-#define _typ_uint32_t 1 /* uint32_t is a type */
-#define _typ_int64_t 1 /* int64_t is a type */
-#define _typ_uint64_t 1 /* uint64_t is a type */
-#define _typ_intmax_t 1 /* intmax_t is a type */
-#define _typ_uintmax_t 1 /* uintmax_t is a type */
-
-#ifndef va_listref
-#ifndef va_start
-#if __STD_C
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-#define va_listref(p) (p) /* pass va_list to varargs function */
-#define va_listval(p) (p) /* retrieve va_list from va_arg(ap,va_listarg) */
-#define va_listarg va_list /* va_arg() va_list type */
-#endif
-#ifndef _AST_STD_H
-# if __STD_C && _hdr_stddef
-# include <stddef.h>
-# endif
-# if _sys_types
-# include <sys/types.h>
-# endif
-# if _hdr_stdint
-# include <stdint.h>
-# else
-# if _hdr_inttypes
-# include <inttypes.h>
-# endif
-# endif
-#endif
-#if !_typ_size_t
-# define _typ_size_t 1
- typedef int size_t;
-#endif
-#if !_typ_ssize_t
-# define _typ_ssize_t 1
- typedef int ssize_t;
-#endif
-#ifndef _AST_STD_H
-# if !_def_map_ast
-# include <ast_map.h>
-# endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_dir.h b/usr/src/lib/libast/i386/include/ast/ast_dir.h
deleted file mode 100644
index c873ed3253..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_dir.h
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * AT&T Research
- *
- * common dirent maintenance interface
- */
-
-#ifndef _AST_DIR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_DIR_H
-
-#include <ast_lib.h>
-
-#if _mem_d_fileno_dirent || _mem_d_ino_dirent
-#if !_mem_d_fileno_dirent
-#undef _mem_d_fileno_dirent
-#define _mem_d_fileno_dirent 1
-#define d_fileno d_ino
-#endif
-#endif
-
-#if _BLD_ast
-#include "dirlib.h"
-#else
-#include <dirent.h>
-#endif
-
-#if _mem_d_fileno_dirent
-#define D_FILENO(d) ((d)->d_fileno)
-#endif
-
-#if _mem_d_namlen_dirent
-#define D_NAMLEN(d) ((d)->d_namlen)
-#else
-#define D_NAMLEN(d) (strlen((d)->d_name))
-#endif
-
-#if _mem_d_reclen_dirent
-#define D_RECLEN(d) ((d)->d_reclen)
-#else
-#define D_RECLEN(d) D_RECSIZ(d,D_NAMLEN(d))
-#endif
-
-#define D_RECSIZ(d,n) (sizeof(*(d))-sizeof((d)->d_name)+((n)+sizeof(char*))&~(sizeof(char*)-1))
-
-/*
- * NOTE: 2003-03-27 mac osx bug symlink==DT_REG bug discovered;
- * the kernel *and* all directories must be fixed, so d_type
- * is summarily disabled until we see that happen
- */
-
-#if _mem_d_type_dirent && defined(DT_UNKNOWN) && defined(DT_REG) && defined(DT_DIR) && defined(DT_LNK) && ! ( __APPLE__ || __MACH__ )
-#define D_TYPE(d) ((d)->d_type)
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_dirent.h b/usr/src/lib/libast/i386/include/ast/ast_dirent.h
deleted file mode 100644
index a1a3db0aca..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_dirent.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
-#ifndef _def_dirent_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dirent_ast 1
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _nxt_dirent <../include/dirent.h> /* include path for the native <dirent.h> */
-#define _nxt_dirent_str "../include/dirent.h" /* include string for the native <dirent.h> */
-/*
- * <dirent.h> for [fl]stat64 and off64_t
- */
-
-#ifndef _AST_STD_H
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#else
-
-#ifndef _DIR64_H
-#define _DIR64_H
-
-#include <ast_std.h>
-
-#if _typ_off64_t
-#undef off_t
-#endif
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#if _typ_off64_t
-#define off_t off64_t
-#endif
-
-#if _lib_readdir64 && _typ_struct_dirent64
-#ifndef dirent
-#define dirent dirent64
-#endif
-#ifndef readdir
-#define readdir readdir64
-#endif
-#endif
-
-#endif
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_fcntl.h b/usr/src/lib/libast/i386/include/ast/ast_fcntl.h
deleted file mode 100644
index aca708d860..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_fcntl.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
-#ifndef _def_fcntl_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fcntl_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <ast_fs.h>
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#define O_BINARY 0
-#define O_TEMPORARY 0
-#define O_TEXT 0
-
-#include <ast_fs.h>
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_fstat64
-#define fstat fstat64
-#endif
-#if _lib_lstat64
-#define lstat lstat64
-#endif
-#if _lib_stat64
-#define stat stat64
-#endif
-#if _lib_creat64
-#define creat creat64
-#endif
-#if _lib_mmap64
-#define mmap mmap64
-#endif
-#if _lib_open64
-#undef open
-#define open open64
-#endif
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_float.h b/usr/src/lib/libast/i386/include/ast/ast_float.h
deleted file mode 100644
index c6eaf9b7e6..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_float.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
-#ifndef _def_float_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_float_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_float 1 /* #include <float.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_math 1 /* #include <math.h> ok */
-#define _hdr_values 1 /* #include <values.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
-#define _lib_frexp 1 /* frexp() in default lib(s) */
-#define _lib_frexpl 1 /* frexpl() in default lib(s) */
-#define _lib_ldexp 1 /* ldexp() in default lib(s) */
-#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
-#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
-#define _lib_copysign 1 /* copysign() in default lib(s) */
-#define _lib_copysignl 1 /* copysignl() in default lib(s) */
-#include <ast_common.h>
-#include <float.h>
-#include <math.h>
-#ifndef FLT_DIG
-#define FLT_DIG 6
-#endif
-#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
-#endif
-#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
-#endif
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
-#endif
-#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
-#endif
-#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
-#endif
-#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
-#endif
-#ifndef DBL_DIG
-#define DBL_DIG 15
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
-#endif
-#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
-#endif
-#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
-#endif
-#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
-#endif
-#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
-#endif
-#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
-#endif
-#ifndef LDBL_DIG
-#define LDBL_DIG 18
-#endif
-#ifndef LDBL_MAX
-#define LDBL_MAX 1.1897314953572317650213E+4932L
-#endif
-#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
-#endif
-#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
-#endif
-#ifndef LDBL_MIN
-#define LDBL_MIN 3.3621031431120935062627E-4932L
-#endif
-#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
-#endif
-#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
-#endif
-
-
-#define USHRT_DIG 4
-#define UINT_DIG 9
-#define ULONG_DIG 9
-#define ULLONG_DIG 19
-#define UINTMAX_DIG ULLONG_DIG
-
-#define FLT_ULONG_MAX 4294967295.0F
-#define FLT_ULLONG_MAX 18446744073709551615.0F
-#define FLT_UINTMAX_MAX FLT_ULLONG_MAX
-#define FLT_LONG_MAX 2147483647.0F
-#define FLT_LLONG_MAX 9223372036854775807.0F
-#define FLT_INTMAX_MAX FLT_LLONG_MAX
-#define FLT_LONG_MIN (-2147483648.0F)
-#define FLT_LLONG_MIN (-9223372036854775808.0F)
-#define FLT_INTMAX_MIN FLT_LLONG_MIN
-
-#define DBL_ULONG_MAX 4294967295.0
-#define DBL_ULLONG_MAX 18446744073709551615.0
-#define DBL_UINTMAX_MAX DBL_ULLONG_MAX
-#define DBL_LONG_MAX 2147483647.0
-#define DBL_LLONG_MAX 9223372036854775807.0
-#define DBL_INTMAX_MAX DBL_LLONG_MAX
-#define DBL_LONG_MIN (-2147483648.0)
-#define DBL_LLONG_MIN (-9223372036854775808.0)
-#define DBL_INTMAX_MIN DBL_LLONG_MIN
-
-#define LDBL_ULONG_MAX 4294967295.0L
-#define LDBL_ULLONG_MAX 18446744073709551615.0L
-#define LDBL_UINTMAX_MAX LDBL_ULLONG_MAX
-#define LDBL_LONG_MAX 2147483647.0L
-#define LDBL_LLONG_MAX 9223372036854775807.0L
-#define LDBL_INTMAX_MAX LDBL_LLONG_MAX
-#define LDBL_LONG_MIN (-2147483648.0L)
-#define LDBL_LLONG_MIN (-9223372036854775808.0L)
-#define LDBL_INTMAX_MIN LDBL_LLONG_MIN
-
-#define FLTMAX_UINTMAX_MAX LDBL_UINTMAX_MAX
-#define FLTMAX_INTMAX_MAX LDBL_INTMAX_MAX
-#define FLTMAX_INTMAX_MIN LDBL_INTMAX_MIN
-
-typedef union _ast_dbl_exp_u
-{
- uint32_t e[sizeof(double)/4];
- double f;
-} _ast_dbl_exp_t;
-
-#define _ast_dbl_exp_index 1
-#define _ast_dbl_exp_shift 20
-
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 2
-#define _ast_fltmax_exp_shift 0
-
-#define _ast_flt_unsigned_max_t unsigned long long
-#define _ast_flt_nan_init 0xff,0xff,0xff,0x7f
-#define _ast_flt_inf_init 0x00,0x00,0x80,0x7f
-#define _ast_dbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f
-#define _ast_dbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f
-#define _ast_ldbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf0,0x7f
-#define _ast_ldbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0xf0,0x7f
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_fs.h b/usr/src/lib/libast/i386/include/ast/ast_fs.h
deleted file mode 100644
index a9855675c1..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_fs.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
-#ifndef _def_fs_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fs_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _lib__fxstat 1 /* _fxstat() in default lib(s) */
-#define _lib__lxstat 1 /* _lxstat() in default lib(s) */
-#define _lib__xmknod 1 /* _xmknod() in default lib(s) */
-#define _lib__xstat 1 /* _xstat() in default lib(s) */
-#define _lib_lstat 1 /* lstat() in default lib(s) */
-#define _lib_mknod 1 /* mknod() in default lib(s) */
-#define _lib_sync 1 /* sync() in default lib(s) */
-#include <sys/stat.h>
-#include <sys/mkdev.h>
-#define FS_default "ufs"
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
-#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
-#define _sys_mount 1 /* #include <sys/mount.h> ok */
-#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
-#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
-#define _sys_vfs 1 /* #include <sys/vfs.h> ok */
-#define _mem_st_blocks_stat 1 /* st_blocks is a member of struct stat */
-#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
-#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
-#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
-#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
-#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
-#define _lib_getmntent 1 /* getmntent() in default lib(s) */
-#define _lib_statfs 1 /* statfs() in default lib(s) */
-#define _lib_statvfs 1 /* statvfs() in default lib(s) */
-#define _lib_statfs4 1 /* compile{\ passed */
-#if _sys_statvfs
-#include <sys/statvfs.h>
-#if !_mem_statvfs_f_basetype
-#if _ary_f_reserved7
-#define f_basetype f_reserved7
-#endif
-#endif
-#else
-#define _mem_f_basetype_statvfs 1
-#define _mem_f_frsize_statvfs 1
-struct statvfs
-{
-unsigned long f_bsize; /* fundamental file system block size */
-unsigned long f_frsize; /* fragment size */
-unsigned long f_blocks; /* total # of blocks of f_frsize on fs */
-unsigned long f_bfree; /* total # of free blocks of f_frsize */
-unsigned long f_bavail; /* # of free blocks avail to non-superuser */
-unsigned long f_files; /* total # of file nodes (inodes) */
-unsigned long f_ffree; /* total # of free file nodes */
-unsigned long f_favail; /* # of free nodes avail to non-superuser */
-unsigned long f_fsid; /* file system id (dev for now) */
-char f_basetype[16]; /* target fs type name, null-terminated */
-unsigned long f_flag; /* bit-mask of flags */
-unsigned long f_namemax; /* maximum file name length */
-char f_fstr[32]; /* filesystem-specific string */
-unsigned long f_filler[16]; /* reserved for future expansion */
-};
-extern __MANGLE__ int fstatvfs __PROTO__((int, struct statvfs*));
-extern __MANGLE__ int statvfs __PROTO__((const char*, struct statvfs*));
-#endif
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_statvfs64 && !defined(statvfs)
-#define statvfs statvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int statvfs64 __PROTO__((const char*, struct statvfs64*));
-#endif
-#endif
-#if _lib_fstatvfs64 && !defined(fstatvfs)
-#define fstatvfs fstatvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int fstatvfs64 __PROTO__((int, struct statvfs64*));
-#endif
-#endif
-
-#define _str_st_fstype 1 /* stat.st_fstype is a string */
-#define _ary_st_pad4 1 /* stat.st_pad4 is an array */
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_getopt.h b/usr/src/lib/libast/i386/include/ast/ast_getopt.h
deleted file mode 100644
index c86d826a72..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_getopt.h
+++ /dev/null
@@ -1,25 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#ifdef _AST_STD_I
-#undef _AST_GETOPT_H
-#define _AST_GETOPT_H -1
-#endif
-#ifndef _AST_GETOPT_H
-#define _AST_GETOPT_H 1
-
-extern __MANGLE__ int opterr;
-extern __MANGLE__ int optind;
-extern __MANGLE__ int optopt;
-extern __MANGLE__ char* optarg;
-
-extern __MANGLE__ int getopt __PROTO__((int, char* const*, const char*));
-extern __MANGLE__ int getsubopt __PROTO__((char**, char* const*, char**));
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_iconv.h b/usr/src/lib/libast/i386/include/ast/ast_iconv.h
deleted file mode 100644
index f17ec0140a..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_iconv.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
-#ifndef _def_iconv_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_iconv_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_iconv 1 /* #include <iconv.h> ok */
-#define _lib_iconv_open 1 /* iconv_open() in default lib(s) */
-#define _lib_iconv_close 1 /* iconv_close() in default lib(s) */
-#define _lib_iconv 1 /* iconv() in default lib(s) */
-#define _nxt_iconv <../include/iconv.h> /* include path for the native <iconv.h> */
-#define _nxt_iconv_str "../include/iconv.h" /* include string for the native <iconv.h> */
-#include <ast_common.h>
-#include <ccode.h>
-#include <../include/iconv.h> /* the native iconv.h */
-
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
-
-#ifndef _ICONV_LIST_PRIVATE_
-#undef iconv_t
-#define iconv_t _ast_iconv_t
-#undef iconv_f
-#define iconv_f _ast_iconv_f
-#undef iconv_list_t
-#define iconv_list_t _ast_iconv_list_t
-#undef iconv_open
-#define iconv_open _ast_iconv_open
-#undef iconv
-#define iconv _ast_iconv
-#undef iconv_close
-#define iconv_close _ast_iconv_close
-#undef iconv_list
-#define iconv_list _ast_iconv_list
-#undef iconv_move
-#define iconv_move _ast_iconv_move
-#undef iconv_name
-#define iconv_name _ast_iconv_name
-#undef iconv_write
-#define iconv_write _ast_iconv_write
-#endif
-
-typedef Ccmap_t _ast_iconv_list_t;
-typedef __V_* _ast_iconv_t;
-typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ _ast_iconv_t _ast_iconv_open __PROTO__((const char*, const char*));
-extern __MANGLE__ size_t _ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
-extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
-extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
-#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
-#else
-#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_lib.h b/usr/src/lib/libast/i386/include/ast/ast_lib.h
deleted file mode 100644
index c05dcf1693..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_lib.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
-#ifndef _def_lib_ast
-#define _def_lib_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _hdr_fmtmsg 1 /* #include <fmtmsg.h> ok */
-#define _hdr_fnmatch 1 /* #include <fnmatch.h> ok */
-#define _hdr_libgen 1 /* #include <libgen.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_locale 1 /* #include <locale.h> ok */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_spawn 1 /* #include <spawn.h> ok */
-#define _hdr_syslog 1 /* #include <syslog.h> ok */
-#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
-#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
-#define _dat__tzname 1 /* _tzname in default lib(s) */
-#define _dat_tzname 1 /* tzname in default lib(s) */
-#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
-#define _lib_atexit 1 /* atexit() in default lib(s) */
-#define _lib_bcopy 1 /* bcopy() in default lib(s) */
-#define _lib_bzero 1 /* bzero() in default lib(s) */
-#define _lib_catclose 1 /* catclose() in default lib(s) */
-#define _lib_catgets 1 /* catgets() in default lib(s) */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_confstr 1 /* confstr() in default lib(s) */
-#define _lib_dup2 1 /* dup2() in default lib(s) */
-#define _lib_execlp 1 /* execlp() in default lib(s) */
-#define _lib_execve 1 /* execve() in default lib(s) */
-#define _lib_execvp 1 /* execvp() in default lib(s) */
-#define _lib_fchmod 1 /* fchmod() in default lib(s) */
-#define _lib_fcntl 1 /* fcntl() in default lib(s) */
-#define _lib_fmtmsg 1 /* fmtmsg() in default lib(s) */
-#define _lib_fnmatch 1 /* fnmatch() in default lib(s) */
-#define _lib_fork 1 /* fork() in default lib(s) */
-#define _lib_fsync 1 /* fsync() in default lib(s) */
-#define _lib_getdents 1 /* getdents() in default lib(s) */
-#define _lib_getdtablesize 1 /* getdtablesize() in default lib(s) */
-#define _lib_getdate 1 /* getdate() in default lib(s) */
-#define _lib_getgroups 1 /* getgroups() in default lib(s) */
-#define _lib_gethostname 1 /* gethostname() in default lib(s) */
-#define _lib_getlogin 1 /* getlogin() in default lib(s) */
-#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_getopt 1 /* getopt() in default lib(s) */
-#define _lib_getsubopt 1 /* getsubopt() in default lib(s) */
-#define _lib_getopt_long 1 /* getopt_long() in default lib(s) */
-#define _lib_getopt_long_only 1 /* getopt_long_only() in default lib(s) */
-#define _lib_glob 1 /* glob() in default lib(s) */
-#define _lib_index 1 /* index() in default lib(s) */
-#define _lib_iswblank 1 /* iswblank() in default lib(s) */
-#define _lib_iswctype 1 /* iswctype() in default lib(s) */
-#define _lib_killpg 1 /* killpg() in default lib(s) */
-#define _lib_link 1 /* link() in default lib(s) */
-#define _lib_localeconv 1 /* localeconv() in default lib(s) */
-#define _lib_madvise 1 /* madvise() in default lib(s) */
-#define _lib_mbtowc 1 /* mbtowc() in default lib(s) */
-#define _lib_mbrtowc 1 /* mbrtowc() in default lib(s) */
-#define _lib_memalign 1 /* memalign() in default lib(s) */
-#define _lib_memchr 1 /* memchr() in default lib(s) */
-#define _lib_memcpy 1 /* memcpy() in default lib(s) */
-#define _lib_memmove 1 /* memmove() in default lib(s) */
-#define _lib_memset 1 /* memset() in default lib(s) */
-#define _lib_mkdir 1 /* mkdir() in default lib(s) */
-#define _lib_mkfifo 1 /* mkfifo() in default lib(s) */
-#define _lib_mktemp 1 /* mktemp() in default lib(s) */
-#define _lib_mktime 1 /* mktime() in default lib(s) */
-#define _lib_mount 1 /* mount() in default lib(s) */
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _lib_pathconf 1 /* pathconf() in default lib(s) */
-#define _lib_readlink 1 /* readlink() in default lib(s) */
-#define _lib_remove 1 /* remove() in default lib(s) */
-#define _lib_rename 1 /* rename() in default lib(s) */
-#define _lib_rewinddir 1 /* rewinddir() in default lib(s) */
-#define _lib_rindex 1 /* rindex() in default lib(s) */
-#define _lib_rmdir 1 /* rmdir() in default lib(s) */
-#define _lib_setlocale 1 /* setlocale() in default lib(s) */
-#define _lib_setpgid 1 /* setpgid() in default lib(s) */
-#define _lib_setpgrp 1 /* setpgrp() in default lib(s) */
-#define _lib_setreuid 1 /* setreuid() in default lib(s) */
-#define _lib_setsid 1 /* setsid() in default lib(s) */
-#define _lib_setuid 1 /* setuid() in default lib(s) */
-#define _lib_sigaction 1 /* sigaction() in default lib(s) */
-#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
-#define _lib_socketpair 1 /* socketpair() in default lib(s) */
-#define _lib_strchr 1 /* strchr() in default lib(s) */
-#define _lib_strcoll 1 /* strcoll() in default lib(s) */
-#define _lib_strdup 1 /* strdup() in default lib(s) */
-#define _lib_strerror 1 /* strerror() in default lib(s) */
-#define _lib_strcasecmp 1 /* strcasecmp() in default lib(s) */
-#define _lib_strncasecmp 1 /* strncasecmp() in default lib(s) */
-#define _lib_strrchr 1 /* strrchr() in default lib(s) */
-#define _lib_strstr 1 /* strstr() in default lib(s) */
-#define _lib_strxfrm 1 /* strxfrm() in default lib(s) */
-#define _lib_strftime 1 /* strftime() in default lib(s) */
-#define _lib_swab 1 /* swab() in default lib(s) */
-#define _lib_symlink 1 /* symlink() in default lib(s) */
-#define _lib_sysconf 1 /* sysconf() in default lib(s) */
-#define _lib_sysinfo 1 /* sysinfo() in default lib(s) */
-#define _lib_syslog 1 /* syslog() in default lib(s) */
-#define _lib_telldir 1 /* telldir() in default lib(s) */
-#define _lib_tmpnam 1 /* tmpnam() in default lib(s) */
-#define _lib_tzset 1 /* tzset() in default lib(s) */
-#define _lib_unlink 1 /* unlink() in default lib(s) */
-#define _lib_utime 1 /* utime() in default lib(s) */
-#define _lib_wctype 1 /* wctype() in default lib(s) */
-#define _lib_ftruncate 1 /* ftruncate() in default lib(s) */
-#define _lib_truncate 1 /* truncate() in default lib(s) */
-#define _lib_creat64 1 /* creat64() in default lib(s) */
-#define _lib_fstat64 1 /* fstat64() in default lib(s) */
-#define _lib_fstatvfs64 1 /* fstatvfs64() in default lib(s) */
-#define _lib_ftruncate64 1 /* ftruncate64() in default lib(s) */
-#define _lib_lseek64 1 /* lseek64() in default lib(s) */
-#define _lib_lstat64 1 /* lstat64() in default lib(s) */
-#define _lib_open64 1 /* open64() in default lib(s) */
-#define _lib_readdir64 1 /* readdir64() in default lib(s) */
-#define _lib_stat64 1 /* stat64() in default lib(s) */
-#define _lib_statvfs64 1 /* statvfs64() in default lib(s) */
-#define _lib_truncate64 1 /* truncate64() in default lib(s) */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _lib_strtod 1 /* strtod() in default lib(s) */
-#define _lib_strtold 1 /* strtold() in default lib(s) */
-#define _lib_strtol 1 /* strtol() in default lib(s) */
-#define _lib_strtoll 1 /* strtoll() in default lib(s) */
-#define _lib_strtoul 1 /* strtoul() in default lib(s) */
-#define _lib_strtoull 1 /* strtoull() in default lib(s) */
-#define _hdr_signal 1 /* #include <signal.h> ok */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
-#define _npt_sigflag 1 /* sigflag() needs a prototype */
-#define _mem_d_ino_dirent 1 /* d_ino is a member of struct dirent */
-#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
-#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
-#define _mem_DIR 1 /* DIR is a non-opaque struct */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
-#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
-#define _sys_resource 1 /* #include <sys/resource.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _sys_stream 1 /* #include <sys/stream.h> ok */
-#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_off64_t 1 /* off64_t is a type */
-#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
-#define _tst_errno 1 /* errno can be assigned */
-#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
-#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
-#define _lib_select 1 /* select() has standard 5 arg interface */
-#define _pipe_rw 1 /* full duplex pipes */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _lib_vfork 1 /* vfork exists and it works */
-#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
-#define _hdr_string 1 /* #include <string.h> ok */
-#define _lib_memcmp 1 /* standard memcmp interface that works */
-#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_memccpy 1 /* standard memccpy interface that works */
-#define _lib_utime_now 1 /* utime works with 0 time vector */
-#define _UNIV_DEFAULT "att" /* default universe name */
-#define _std_cleanup 1 /* stuck with standard _cleanup */
-#define _std_strcoll 1 /* standard strcoll works */
-#if !_AST_no_spawnveg
-#define _use_spawnveg 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_limits.h b/usr/src/lib/libast/i386/include/ast/ast_limits.h
deleted file mode 100644
index c7e6db0e98..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_limits.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
-#ifndef _def_limits_ast
-#define _def_limits_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#ifndef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-#ifndef CHAR_MIN
-#define CHAR_MIN -128
-#endif
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1000000
-#endif
-#ifndef INT_MIN
-#define INT_MIN -2147483648
-#endif
-#ifndef LLONG_MAX
-#define LLONG_MAX 9223372036854775807
-#endif
-#ifndef LLONG_MIN
-#define LLONG_MIN -9223372036854775808
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN -2147483648
-#endif
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 5
-#endif
-#ifndef OPEN_MAX_CEIL
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-#define OPEN_MAX_CEIL OPEN_MAX
-#endif
-#ifndef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 4096
-#endif
-#ifndef PTRDIFF_MAX
-#define PTRDIFF_MAX 2147483647
-#endif
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN -2147483648
-#endif
-#ifndef SCHAR_MAX
-#define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-#define SCHAR_MIN -128
-#endif
-#ifndef SHRT_MIN
-#define SHRT_MIN -32768
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX 2147483647
-#endif
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN -2147483648
-#endif
-#ifndef SIZE_MAX
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295
-#endif
-#define SIZE_MAX UINT_MAX
-#endif
-#ifndef SSIZE_MAX
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-#define SSIZE_MAX INT_MAX
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#ifndef ULLONG_MAX
-#define ULLONG_MAX 18446744073709551615
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX 4294967295
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX 65535
-#endif
-#ifndef WCHAR_MAX
-#define WCHAR_MAX 2147483647
-#endif
-#ifndef WCHAR_MIN
-#define WCHAR_MIN -2147483648
-#endif
-#ifndef WINT_MAX
-#define WINT_MAX 2147483647
-#endif
-#ifndef WINT_MIN
-#define WINT_MIN -2147483648
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_map.h b/usr/src/lib/libast/i386/include/ast/ast_map.h
deleted file mode 100644
index 3c3056c636..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_map.h
+++ /dev/null
@@ -1,471 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
-#ifndef _def_map_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_map_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-/*
- * prototypes provided for standard interfaces hijacked
- * by ast and mapped to _ast_* but already prototyped
- * unmapped in native headers included by <ast_std.h>
- */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-
-#define _map_libc 1
-#undef basename
-#define basename _ast_basename
-#undef dirname
-#define dirname _ast_dirname
-#undef eaccess
-#define eaccess _ast_eaccess
-#undef execvpe
-#define execvpe _ast_execvpe
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-#undef fnmatch
-#define fnmatch _ast_fnmatch
-#undef fts_children
-#define fts_children _ast_fts_children
-#undef fts_close
-#define fts_close _ast_fts_close
-#undef fts_flags
-#define fts_flags _ast_fts_flags
-#undef fts_notify
-#define fts_notify _ast_fts_notify
-#undef fts_open
-#define fts_open _ast_fts_open
-#undef fts_read
-#define fts_read _ast_fts_read
-#undef fts_set
-#define fts_set _ast_fts_set
-#undef ftw
-#define ftw _ast_ftw
-#undef ftwalk
-#define ftwalk _ast_ftwalk
-#undef ftwflags
-#define ftwflags _ast_ftwflags
-#undef getcwd
-#define getcwd _ast_getcwd
-extern __MANGLE__ char* getcwd __PROTO__((char*, size_t));
-#undef getdate
-#define getdate _ast_getdate
-#undef getopt
-#define getopt _ast_getopt
-#undef getsubopt
-#define getsubopt _ast_getsubopt
-#undef getopt_long
-#define getopt_long _ast_getopt_long
-#undef getopt_long_only
-#define getopt_long_only _ast_getopt_long_only
-#undef optopt
-#define optopt _ast_optopt
-#undef optarg
-#define optarg _ast_optarg
-#undef optind
-#define optind _ast_optind
-#undef opterr
-#define opterr _ast_opterr
-#undef getwd
-#define getwd _ast_getwd
-extern __MANGLE__ char* getwd __PROTO__((char*));
-#undef glob
-#define glob _ast_glob
-#undef globfree
-#define globfree _ast_globfree
-#undef memdup
-#define memdup _ast_memdup
-#undef memfatal
-#define memfatal _ast_memfatal
-#undef memhash
-#define memhash _ast_memhash
-#undef memsum
-#define memsum _ast_memsum
-#undef mkstemp
-#define mkstemp _ast_mkstemp
-extern __MANGLE__ int mkstemp __PROTO__((char*));
-#undef mktemp
-#define mktemp _ast_mktemp
-extern __MANGLE__ char* mktemp __PROTO__((char*));
-#undef mktime
-#define mktime _ast_mktime
-#undef nftw
-#define nftw _ast_nftw
-#undef optctx
-#define optctx _ast_optctx
-#undef optesc
-#define optesc _ast_optesc
-#undef optget
-#define optget _ast_optget
-#undef opthelp
-#define opthelp _ast_opthelp
-#undef optjoin
-#define optjoin _ast_optjoin
-#undef optstr
-#define optstr _ast_optstr
-#undef optusage
-#define optusage _ast_optusage
-#undef pathaccess
-#define pathaccess _ast_pathaccess
-#undef pathbin
-#define pathbin _ast_pathbin
-#undef pathcanon
-#define pathcanon _ast_pathcanon
-#undef pathcat
-#define pathcat _ast_pathcat
-#undef pathcd
-#define pathcd _ast_pathcd
-#undef pathcheck
-#define pathcheck _ast_pathcheck
-#undef pathexists
-#define pathexists _ast_pathexists
-#undef pathfind
-#define pathfind _ast_pathfind
-#undef pathgetlink
-#define pathgetlink _ast_pathgetlink
-#undef pathinclude
-#define pathinclude _ast_pathinclude
-#undef pathkey
-#define pathkey _ast_pathkey
-#undef pathnative
-#define pathnative _ast_pathnative
-#undef pathpath
-#define pathpath _ast_pathpath
-#undef pathposix
-#define pathposix _ast_pathposix
-#undef pathprobe
-#define pathprobe _ast_pathprobe
-#undef pathprog
-#define pathprog _ast_pathprog
-#undef pathrepl
-#define pathrepl _ast_pathrepl
-#undef pathsetlink
-#define pathsetlink _ast_pathsetlink
-#undef pathshell
-#define pathshell _ast_pathshell
-#undef pathstat
-#define pathstat _ast_pathstat
-#undef pathtemp
-#define pathtemp _ast_pathtemp
-#undef pathtmp
-#define pathtmp _ast_pathtmp
-#undef procclose
-#define procclose _ast_procclose
-#undef procfree
-#define procfree _ast_procfree
-#undef procopen
-#define procopen _ast_procopen
-#undef procrun
-#define procrun _ast_procrun
-#undef putenv
-#define putenv _ast_putenv
-#undef re_comp
-#define re_comp _ast_re_comp
-#undef re_exec
-#define re_exec _ast_re_exec
-#undef realpath
-#define realpath _ast_realpath
-extern __MANGLE__ char* realpath __PROTO__((const char*, char*));
-#undef regaddclass
-#define regaddclass _ast_regaddclass
-#undef regalloc
-#define regalloc _ast_regalloc
-#undef regcache
-#define regcache _ast_regcache
-#undef regclass
-#define regclass _ast_regclass
-#undef regcmp
-#define regcmp _ast_regcmp
-#undef regcollate
-#define regcollate _ast_regcollate
-#undef regcomb
-#define regcomb _ast_regcomb
-#undef regcomp
-#define regcomp _ast_regcomp
-#undef regdecomp
-#define regdecomp _ast_regdecomp
-#undef regdup
-#define regdup _ast_regdup
-#undef regerror
-#define regerror _ast_regerror
-#undef regex
-#define regex _ast_regex
-#undef regexec
-#define regexec _ast_regexec
-#undef regfatal
-#define regfatal _ast_regfatal
-#undef regfatalpat
-#define regfatalpat _ast_regfatalpat
-#undef regfree
-#define regfree _ast_regfree
-#undef regncomp
-#define regncomp _ast_regncomp
-#undef regnexec
-#define regnexec _ast_regnexec
-#undef regrecord
-#define regrecord _ast_regrecord
-#undef regrexec
-#define regrexec _ast_regrexec
-#undef regstat
-#define regstat _ast_regstat
-#undef regsub
-#define regsub _ast_regsub
-#undef regsubcomp
-#define regsubcomp _ast_regsubcomp
-#undef regsubexec
-#define regsubexec _ast_regsubexec
-#undef regsubflags
-#define regsubflags _ast_regsubflags
-#undef regsubfree
-#define regsubfree _ast_regsubfree
-#undef remove
-#define remove _ast_remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#undef resolvepath
-#define resolvepath _ast_resolvepath
-extern __MANGLE__ int resolvepath __PROTO__((const char*, char*, size_t));
-#undef setenv
-#define setenv _ast_setenv
-extern __MANGLE__ int setenv __PROTO__((const char*, const char*, int));
-#undef setenviron
-#define setenviron _ast_setenviron
-#undef sigcritical
-#define sigcritical _ast_sigcritical
-#undef signal
-#define signal _ast_signal
-#undef sigunblock
-#define sigunblock _ast_sigunblock
-#undef stracmp
-#define stracmp _ast_stracmp
-#undef strcopy
-#define strcopy _ast_strcopy
-#undef strelapsed
-#define strelapsed _ast_strelapsed
-#undef stresc
-#define stresc _ast_stresc
-#undef streval
-#define streval _ast_streval
-#undef strexpr
-#define strexpr _ast_strexpr
-#undef strftime
-#define strftime _ast_strftime
-#undef strgid
-#define strgid _ast_strgid
-#undef strgrpmatch
-#define strgrpmatch _ast_strgrpmatch
-#undef strhash
-#define strhash _ast_strhash
-#undef strkey
-#define strkey _ast_strkey
-#undef strlcat
-#define strlcat _ast_strlcat
-extern __MANGLE__ size_t strlcat __PROTO__((char*, const char*, size_t));
-#undef strlcpy
-#define strlcpy _ast_strlcpy
-extern __MANGLE__ size_t strlcpy __PROTO__((char*, const char*, size_t));
-#undef strlook
-#define strlook _ast_strlook
-#undef strmatch
-#define strmatch _ast_strmatch
-#undef strmode
-#define strmode _ast_strmode
-#undef strnacmp
-#define strnacmp _ast_strnacmp
-#undef strncopy
-#define strncopy _ast_strncopy
-#undef strntod
-#define strntod _ast_strntod
-#undef strntol
-#define strntol _ast_strntol
-#undef strntold
-#define strntold _ast_strntold
-#undef strntoll
-#define strntoll _ast_strntoll
-#undef strntoul
-#define strntoul _ast_strntoul
-#undef strntoull
-#define strntoull _ast_strntoull
-#undef stropt
-#define stropt _ast_stropt
-#undef strperm
-#define strperm _ast_strperm
-#undef strpsearch
-#define strpsearch _ast_strpsearch
-#undef strptime
-#define strptime _ast_strptime
-#undef strsearch
-#define strsearch _ast_strsearch
-#undef strsort
-#define strsort _ast_strsort
-#undef strsubmatch
-#define strsubmatch _ast_strsubmatch
-#undef strsum
-#define strsum _ast_strsum
-#undef strtape
-#define strtape _ast_strtape
-#undef strtoip4
-#define strtoip4 _ast_strtoip4
-#undef strton
-#define strton _ast_strton
-#undef strtonll
-#define strtonll _ast_strtonll
-#undef struid
-#define struid _ast_struid
-#undef struniq
-#define struniq _ast_struniq
-#undef system
-#define system _ast_system
-extern __MANGLE__ int system __PROTO__((const char*));
-#undef tempnam
-#define tempnam _ast_tempnam
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-#undef tmpnam
-#define tmpnam _ast_tmpnam
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-#undef touch
-#define touch _ast_touch
-#undef wordexp
-#define wordexp _ast_wordexp
-#undef wordfree
-#define wordfree _ast_wordfree
-#undef unsetenv
-#define unsetenv _ast_unsetenv
-
-/* cannot override local malloc */
-#define _map_malloc 1
-#undef calloc
-#define calloc _ast_calloc
-extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
-#undef cfree
-#define cfree _ast_cfree
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-#undef free
-#define free _ast_free
-extern __MANGLE__ void free __PROTO__((__V_*));
-#undef malloc
-#define malloc _ast_malloc
-extern __MANGLE__ __V_* malloc __PROTO__((size_t));
-#undef memalign
-#define memalign _ast_memalign
-extern __MANGLE__ __V_* memalign __PROTO__((size_t, size_t));
-#undef realloc
-#define realloc _ast_realloc
-extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
-#undef strdup
-#define strdup _ast_strdup
-extern __MANGLE__ char* strdup __PROTO__((const char*));
-#undef valloc
-#define valloc _ast_valloc
-extern __MANGLE__ __V_* valloc __PROTO__((size_t));
-#undef strtol
-#define strtol _ast_strtol
-#undef strtoul
-#define strtoul _ast_strtoul
-#undef strtoll
-#define strtoll _ast_strtoll
-#undef strtoull
-#define strtoull _ast_strtoull
-#undef strtod
-#define strtod _ast_strtod
-#undef strtold
-#define strtold _ast_strtold
-extern __MANGLE__ long strtol __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned long strtoul __PROTO__((const char*, char**, int));
-extern __MANGLE__ double strtod __PROTO__((const char*, char**));
-#if !_UWIN
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
-extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_mmap.h b/usr/src/lib/libast/i386/include/ast/ast_mmap.h
deleted file mode 100644
index 9a8b69d2de..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_mmap.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
-#ifndef _def_mmap_ast
-#define _def_mmap_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_mmap 1 /* standard mmap interface that works */
-#define _lib_mmap64 1 /* mmap64 interface and implementation work */
-#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
-#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
-
-/* some systems get it wrong but escape concise detection */
-#ifndef _NO_MMAP
-#if __CYGWIN__
-#define _NO_MMAP 1
-#endif
-#endif
-
-#if _NO_MMAP
-#undef _lib_mmap
-#undef _lib_mmap64
-#undef _mmap_anon
-#undef _mmap_devzero
-#undef _mmap_worthy
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_namval.h b/usr/src/lib/libast/i386/include/ast/ast_namval.h
deleted file mode 100644
index fefe46a0c7..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_namval.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_ndbm.h b/usr/src/lib/libast/i386/include/ast/ast_ndbm.h
deleted file mode 100644
index bdb7770692..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_ndbm.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
-#ifndef _def_ndbm_ast
-#define _def_ndbm_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_ndbm 1 /* #include <ndbm.h> ok */
-#include <ndbm.h>
-#define _use_ndbm 1
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_nl_types.h b/usr/src/lib/libast/i386/include/ast/ast_nl_types.h
deleted file mode 100644
index d3eadf94ef..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_nl_types.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
-#ifndef _def_nl_types_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_nl_types_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_nl_langinfo 1 /* nl_langinfo() in default lib(s) */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_langinfo 1 /* #include <langinfo.h> ok */
-#define _nxt_nl_types <../include/nl_types.h> /* include path for the native <nl_types.h> */
-#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native <nl_types.h> */
-#include <limits.h>
-#include <../include/nl_types.h> /* the native nl_types.h */
-
-#undef NL_SETMAX
-#define NL_SETMAX 1023
-#undef NL_MSGMAX
-#define NL_MSGMAX 32767
-#undef nl_catd
-#define nl_catd _ast_nl_catd
-#undef catopen
-#define catopen _ast_catopen
-#undef catgets
-#define catgets _ast_catgets
-#undef catclose
-#define catclose _ast_catclose
-
-typedef __V_* nl_catd;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ nl_catd catopen __PROTO__((const char*, int));
-extern __MANGLE__ char* catgets __PROTO__((nl_catd, int, int, const char*));
-extern __MANGLE__ int catclose __PROTO__((nl_catd));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_param.h b/usr/src/lib/libast/i386/include/ast/ast_param.h
deleted file mode 100644
index 3e4296bdf7..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_param.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
-#ifndef _def_param_ast
-#define _def_param_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#include <sys/param.h>
-#ifndef S_IFDIR
-#include <sys/stat.h>
-#endif
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_standards.h b/usr/src/lib/libast/i386/include/ast/ast_standards.h
deleted file mode 100644
index e8a8b9bc50..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_standards.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_std.h b/usr/src/lib/libast/i386/include/ast/ast_std.h
deleted file mode 100644
index f98d1861b9..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_std.h
+++ /dev/null
@@ -1,374 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Advanced Software Technology Library
- * AT&T Research
- *
- * a union of standard headers that works
- * with local extensions enabled
- * and local omission compensation
- */
-
-#ifndef _AST_STD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_STD_H 1
-#define _AST_STD_I 1
-
-#include <ast_common.h>
-
-#if _BLD_ast
-#define _BLD_cdt 1
-#define _BLD_sfio 1
-#if !_UWIN
-#define _BLD_vmalloc 1
-#endif
-#endif
-
-#ifdef _SFSTDIO_H
-#define _SKIP_SFSTDIO_H
-#else
-#define _SFSTDIO_H
-#ifndef FILE
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-#define FILE struct _sfio_s
-#ifndef __FILE_typedef
-#define __FILE_typedef 1
-#endif
-#ifndef _FILEDEFED
-#define _FILEDEFED 1
-#endif
-#endif
-#endif
-
-#include <ast_lib.h>
-#include <ast_sys.h>
-#include <ast_getopt.h> /* <stdlib.h> does this */
-#include <ast_fcntl.h>
-#include <ast_limits.h>
-#include <ast_botch.h>
-
-#ifdef _SKIP_SFSTDIO_H
-#undef _SKIP_SFSTDIO_H
-#else
-#undef _SFSTDIO_H
-#undef FILE
-#endif
-
-/* locale stuff */
-
-#if !_hdr_locale
-
-struct lconv
-{
- char* decimal_point;
- char* thousands_sep;
- char* grouping;
- char* int_curr_symbol;
- char* currency_symbol;
- char* mon_decimal_point;
- char* mon_thousands_sep;
- char* mon_grouping;
- char* positive_sign;
- char* negative_sign;
- char int_frac_digits;
- char frac_digits;
- char p_cs_precedes;
- char p_sep_by_space;
- char n_cs_precedes;
- char n_sep_by_space;
- char p_sign_posn;
- char n_sign_posn;
-};
-
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_UWIN /* for ast54 compatibility */
-
-#undef getenv
-#define getenv _ast_getenv
-
-#undef setenviron
-#define setenviron _ast_setenviron
-
-extern __MANGLE__ char* getenv __PROTO__((const char*));
-
-#endif
-
-#undef localeconv
-#define localeconv _ast_localeconv
-
-#undef setlocale
-#define setlocale _ast_setlocale
-
-#undef strerror
-#define strerror _ast_strerror
-
-extern __MANGLE__ struct lconv* localeconv __PROTO__((void));
-extern __MANGLE__ char* setenviron __PROTO__((const char*));
-extern __MANGLE__ char* setlocale __PROTO__((int, const char*));
-extern __MANGLE__ char* strerror __PROTO__((int));
-
-#define AST_MESSAGE_SET 3 /* see <mc.h> mcindex() */
-
-/*
- * maintain this order when adding categories
- */
-
-#define AST_LC_ALL 0
-#define AST_LC_COLLATE 1
-#define AST_LC_CTYPE 2
-#define AST_LC_MESSAGES 3
-#define AST_LC_MONETARY 4
-#define AST_LC_NUMERIC 5
-#define AST_LC_TIME 6
-#define AST_LC_IDENTIFICATION 7
-#define AST_LC_ADDRESS 8
-#define AST_LC_NAME 9
-#define AST_LC_TELEPHONE 10
-#define AST_LC_XLITERATE 11
-#define AST_LC_MEASUREMENT 12
-#define AST_LC_PAPER 13
-#define AST_LC_COUNT 14
-#define AST_LC_LANG 255
-
-#define AST_LC_internal 1
-#define AST_LC_setenv (1L<<27)
-#define AST_LC_find (1L<<28)
-#define AST_LC_debug (1L<<29)
-#define AST_LC_setlocale (1L<<30)
-#define AST_LC_translate (1L<<31)
-
-#ifndef LC_ALL
-#define LC_ALL (-AST_LC_ALL)
-#endif
-#ifndef LC_COLLATE
-#define LC_COLLATE (-AST_LC_COLLATE)
-#endif
-#ifndef LC_CTYPE
-#define LC_CTYPE (-AST_LC_CTYPE)
-#endif
-#ifndef LC_MESSAGES
-#define LC_MESSAGES (-AST_LC_MESSAGES)
-#endif
-#ifndef LC_MONETARY
-#define LC_MONETARY (-AST_LC_MONETARY)
-#endif
-#ifndef LC_NUMERIC
-#define LC_NUMERIC (-AST_LC_NUMERIC)
-#endif
-#ifndef LC_TIME
-#define LC_TIME (-AST_LC_TIME)
-#endif
-#ifndef LC_ADDRESS
-#define LC_ADDRESS (-AST_LC_ADDRESS)
-#endif
-#ifndef LC_IDENTIFICATION
-#define LC_IDENTIFICATION (-AST_LC_IDENTIFICATION)
-#endif
-#ifndef LC_NAME
-#define LC_NAME (-AST_LC_NAME)
-#endif
-#ifndef LC_TELEPHONE
-#define LC_TELEPHONE (-AST_LC_TELEPHONE)
-#endif
-#ifndef LC_XLITERATE
-#define LC_XLITERATE (-AST_LC_XLITERATE)
-#endif
-#ifndef LC_MEASUREMENT
-#define LC_MEASUREMENT (-AST_LC_MEASUREMENT)
-#endif
-#ifndef LC_PAPER
-#define LC_PAPER (-AST_LC_PAPER)
-#endif
-#ifndef LC_LANG
-#define LC_LANG (-AST_LC_LANG)
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#undef strcoll
-#if _std_strcoll
-#define strcoll _ast_info.collate
-#else
-#define strcoll strcmp
-#endif
-
-typedef struct
-{
-
- char* id;
-
- struct
- {
- uint32_t serial;
- uint32_t set;
- } locale;
-
- long tmp_long;
- size_t tmp_size;
- short tmp_short;
- char tmp_char;
- wchar_t tmp_wchar;
-
- int (*collate) __PROTO__((const char*, const char*));
-
- int tmp_int;
- __V_* tmp_pointer;
-
- int mb_cur_max;
- int (*mb_len) __PROTO__((const char*, size_t));
- int (*mb_towc) __PROTO__((wchar_t*, const char*, size_t));
- size_t (*mb_xfrm) __PROTO__((char*, const char*, size_t));
- int (*mb_width) __PROTO__((wchar_t));
- int (*mb_conv) __PROTO__((char*, wchar_t));
-
- uint32_t env_serial;
- uint32_t mb_sync;
- uint32_t version;
-
- char pad[936];
-
-} _Ast_info_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ _Ast_info_t _ast_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/* largefile hackery -- ast uses the large versions by default */
-
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if !defined(ftruncate) && _lib_ftruncate64
-#define ftruncate ftruncate64
-extern __MANGLE__ int ftruncate64 __PROTO__((int, off64_t));
-#endif
-#if !defined(lseek) && _lib_lseek64
-#define lseek lseek64
-extern __MANGLE__ off64_t lseek64 __PROTO__((int, off64_t, int));
-#endif
-#if !defined(truncate) && _lib_truncate64
-#define truncate truncate64
-extern __MANGLE__ int truncate64 __PROTO__((const char*, off64_t));
-#endif
-
-/* direct macro access for bsd crossover */
-
-#if !defined(__cplusplus)
-
-#if !defined(memcpy) && !defined(_lib_memcpy) && defined(_lib_bcopy)
-#define memcpy(t,f,n) (bcopy(f,t,n),(t))
-#endif
-
-#if !defined(memzero) && !defined(_lib_memzero)
-#if defined(_lib_memset) || !defined(_lib_bzero)
-#define memzero(b,n) memset(b,0,n)
-#else
-#define memzero(b,n) (bzero(b,n),(b))
-#endif
-#endif
-
-#endif
-
-#if !defined(remove)
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-
-#if !defined(rename)
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-
-#if !defined(strchr) && !defined(_lib_strchr) && defined(_lib_index)
-#define strchr(s,c) index(s,c)
-#endif
-
-#if !defined(strrchr) && !defined(_lib_strrchr) && defined(_lib_rindex)
-#define strrchr(s,c) rindex(s,c)
-#endif
-
-/* and now introducing prototypes botched by the standard(s) */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#undef getpgrp
-#define getpgrp() _ast_getpgrp()
-extern __MANGLE__ int _ast_getpgrp __PROTO__((void));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/*
- * and finally, standard interfaces hijacked by ast
- * _AST_STD_I delays headers that require <ast_map.h>
- */
-
-#include <ast_map.h>
-
-#undef _AST_STD_I
-
-#if _AST_GETOPT_H < 0
-#undef _AST_GETOPT_H
-#include <ast_getopt.h>
-#endif
-
-#if _GETOPT_H < 0
-#undef _GETOPT_H
-#include <getopt.h>
-#endif
-
-#if _REGEX_H < 0
-#undef _REGEX_H
-#include <regex.h>
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_stdio.h b/usr/src/lib/libast/i386/include/ast/ast_stdio.h
deleted file mode 100644
index 26b817d52e..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_stdio.h
+++ /dev/null
@@ -1,608 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
-#ifndef _SFSTDIO_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFSTDIO_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define __FILE_typedef 1
-#define _FILE_DEFINED 1
-#define _FILE_defined 1
-#define _FILEDEFED 1
-
-#ifndef __FILE_TAG
-#define __FILE_TAG _sfio_s
-#endif
-
-#undef FILE
-#undef _FILE
-#undef fpos_t
-#undef fpos64_t
-
-typedef struct _sfio_s _sfio_FILE;
-
-#define FILE _sfio_FILE
-#define _FILE FILE
-
-#if !defined(__FILE) && !__CYGWIN__
-#undef __FILE
-#define __FILE FILE
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define BUFSIZ SF_BUFSIZE
-
-#else
-
-#ifndef BUFSIZ
-#define BUFSIZ 8192
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#include <ast_std.h>
-
-#include <sfio_s.h>
-
-#if __cplusplus
-#define _sf_(f) (f)
-#else
-#define _sf_(f) ((struct _sfio_s*)(f))
-#endif
-
-#define _SF_EOF 0000200
-#define _SF_ERROR 0000400
-
-#endif
-
-#ifdef _NO_LARGEFILE64_SOURCE
-#undef _LARGEFILE64_SOURCE
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#undef off_t
-#endif
-
-#define fpos_t _ast_fpos_t
-#if _typ_int64_t
-#define fpos64_t _ast_fpos_t
-#endif
-
-typedef struct _ast_fpos_s
-{
- intmax_t _sf_offset;
- unsigned char _sf_state[64 - sizeof(intmax_t)];
-} _ast_fpos_t;
-
-#define _base _data
-#define _ptr _next
-#define _IOFBF 0
-#define _IONBF 1
-#define _IOLBF 2
-
-#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
-
-#undef FILE
-#define FILE FILE
-typedef struct _sfio_s FILE;
-
-#undef strerror
-extern __MANGLE__ char* strerror(int) __THROW;
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-extern __MANGLE__ void flockfile __PROTO__((FILE*));
-extern __MANGLE__ int ftrylockfile __PROTO__((FILE*));
-extern __MANGLE__ void funlockfile __PROTO__((FILE*));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 1024
-#endif
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 60
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-
-#define _doprnt _ast_doprnt
-#define _doscan _ast_doscan
-#define asprintf _ast_asprintf
-#define clearerr _ast_clearerr
-#define fclose _ast_fclose
-#define fdopen _ast_fdopen
-#define fflush _ast_fflush
-#define fgetc _ast_fgetc
-#define fgetpos _ast_fgetpos
-#define fgetpos64 _ast_fgetpos64
-#define fgets _ast_fgets
-#define fopen _ast_fopen
-#define fprintf _ast_fprintf
-#define fpurge _ast_fpurge
-#define fputs _ast_fputs
-#define fread _ast_fread
-#define freopen _ast_freopen
-#define fscanf _ast_fscanf
-#define fseek _ast_fseek
-#define fseek64 _ast_fseek64
-#define fseeko _ast_fseeko
-#define fseeko64 _ast_fseeko64
-#define fsetpos _ast_fsetpos
-#define fsetpos64 _ast_fsetpos64
-#define ftell _ast_ftell
-#define ftell64 _ast_ftell64
-#define ftello _ast_ftello
-#define ftello64 _ast_ftello64
-#define fwrite _ast_fwrite
-#define gets _ast_gets
-#define getw _ast_getw
-#define pclose _ast_pclose
-#define popen _ast_popen
-#define printf _ast_printf
-#define puts _ast_puts
-#define putw _ast_putw
-#define rewind _ast_rewind
-#define scanf _ast_scanf
-#define setbuf _ast_setbuf
-#undef setbuffer
-#define setbuffer _ast_setbuffer
-#define setlinebuf _ast_setlinebuf
-#define setvbuf _ast_setvbuf
-#define snprintf _ast_snprintf
-#define sprintf _ast_sprintf
-#define sscanf _ast_sscanf
-#define tmpfile _ast_tmpfile
-#define ungetc _ast_ungetc
-#define vasprintf _ast_vasprintf
-#define vfprintf _ast_vfprintf
-#define vfscanf _ast_vfscanf
-#define vprintf _ast_vprintf
-#define vscanf _ast_vscanf
-#define vsnprintf _ast_vsnprintf
-#define vsprintf _ast_vsprintf
-#define vsscanf _ast_vsscanf
-#define fcloseall _ast_fcloseall
-#define _filbuf _ast__filbuf
-#define fmemopen _ast_fmemopen
-#define __getdelim _ast___getdelim
-#define getdelim _ast_getdelim
-#define getline _ast_getline
-#define clearerr_unlocked _ast_clearerr_unlocked
-#define feof_unlocked _ast_feof_unlocked
-#define ferror_unlocked _ast_ferror_unlocked
-#define fflush_unlocked _ast_fflush_unlocked
-#define fgetc_unlocked _ast_fgetc_unlocked
-#define fgets_unlocked _ast_fgets_unlocked
-#define fileno_unlocked _ast_fileno_unlocked
-#define fputc_unlocked _ast_fputc_unlocked
-#define fputs_unlocked _ast_fputs_unlocked
-#define fread_unlocked _ast_fread_unlocked
-#define fwrite_unlocked _ast_fwrite_unlocked
-#define getc_unlocked _ast_getc_unlocked
-#define getchar_unlocked _ast_getchar_unlocked
-#define putc_unlocked _ast_putc_unlocked
-#define putchar_unlocked _ast_putchar_unlocked
-#define flockfile _ast_flockfile
-#define ftrylockfile _ast_ftrylockfile
-#define funlockfile _ast_funlockfile
-
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:initial
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
-#endif
-#ifndef L_ctermid
-#define L_ctermid 9
-#endif
-#ifndef L_tmpnam
-#define L_tmpnam 25
-#endif
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#if defined(__cplusplus) && defined(__THROW)
-extern __MANGLE__ char* ctermid(char*) __THROW;
-#else
-extern __MANGLE__ char* ctermid __PROTO__((char*));
-#endif
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-extern __MANGLE__ void perror __PROTO__((const char*));
-#ifndef _AST_STD_H
-#ifndef remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-#ifndef rename
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#ifdef _LARGEFILE64_SOURCE
-
-#undef fpos_t
-#undef off_t
-#undef fgetpos
-#undef fsetpos
-#undef fseek
-#undef fseeko
-#undef ftell
-#undef ftello
-
-#define fpos_t fpos64_t
-#if _typ_off64_t
-#define off_t off64_t
-#else
-#define off_t int64_t
-#endif
-
-#define fgetpos fgetpos64
-#define fsetpos fsetpos64
-#define fseek fseek64
-#define fseeko fseeko64
-#define ftell ftell64
-#define ftello ftello64
-
-#endif
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_DLL && _DLL_INDIRECT_DATA
-
-#define stdin ((FILE*)_ast_dll->_ast_stdin)
-#define stdout ((FILE*)_ast_dll->_ast_stdout)
-#define stderr ((FILE*)_ast_dll->_ast_stderr)
-
-#else
-
-#define stdin (&_Sfstdin)
-#define stdout (&_Sfstdout)
-#define stderr (&_Sfstderr)
-
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define feof(f) sfeof(f)
-#define ferror(f) sferror(f)
-#define fileno(f) sffileno(f)
-#define fputc(c,f) sfputc(f,c)
-#define getc(f) sfgetc(f)
-#define getchar() sfgetc(sfstdin)
-#define putc(c,f) sfputc(f,c)
-#define putchar(c) sfputc(sfstdout,c)
-
-#else
-
-#if !_UWIN
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-#endif
-
-extern __MANGLE__ FILE _Sfstdin;
-extern __MANGLE__ FILE _Sfstdout;
-extern __MANGLE__ FILE _Sfstderr;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define feof(f) (_sf_(f)->_flags&_SF_EOF)
-#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
-#define fileno(f) (_sf_(f)->_file)
-#define fputc(c,f) (_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
-#define getc(f) (_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
-#define getchar() getc(stdin)
-#define putc(c,f) fputc(c,f)
-#define putchar(c) fputc(c,stdout)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _sffilbuf __PROTO__((FILE*, int));
-extern __MANGLE__ int _sfflsbuf __PROTO__((FILE*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_sys.h b/usr/src/lib/libast/i386/include/ast/ast_sys.h
deleted file mode 100644
index 5f92fe45d5..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_sys.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
-#ifndef _AST_SYS_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_SYS_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#if __mips == 2 && !defined(_NO_LARGEFILE64_SOURCE)
-#define _NO_LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_NO_LARGEFILE64_SOURCE) && _typ_off64_t && _lib_lseek64 && _lib_stat64
-#if !defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#else
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#undef _typ_off64_t
-#undef _typ_struct_dirent64
-#undef _lib_creat64
-#undef _lib_fstat64
-#undef _lib_fstatvfs64
-#undef _lib_ftruncate64
-#undef _lib_lseek64
-#undef _lib_lstat64
-#undef _lib_mmap64
-#undef _lib_open64
-#undef _lib_readdir64
-#undef _lib_stat64
-#undef _lib_statvfs64
-#undef _lib_truncate64
-#endif
-#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
-#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
-#endif
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <locale.h>
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _typ_dev_t 1 /* dev_t is a type */
-#define _typ_nlink_t 1 /* nlink_t is a type */
-#define _typ_gid_t 1 /* gid_t is a type */
-#define _typ_mode_t 1 /* mode_t is a type */
-#define _typ_uid_t 1 /* uid_t is a type */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _typ_wchar_t 1 /* wchar_t is a type */
-#define _typ_pid_t 1 /* pid_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _typ_wint_t 1 /* wint_t is a type */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _typ_socklen_t 1 /* socklen_t is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_ino_t 1 /* ino_t is a type */
-#define _typ_off_t 1 /* off_t is a type */
-#define _typ_ptrdiff_t 1 /* ptrdiff_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#define _typ_div_t 1 /* div_t is a type */
-#define _typ_ldiv_t 1 /* ldiv_t is a type */
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
-extern __MANGLE__ pid_t spawnveg __PROTO__((const char*, char* const[], char* const[], pid_t));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#if !defined(va_start)
-#if defined(__STDARG__)
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_time.h b/usr/src/lib/libast/i386/include/ast/ast_time.h
deleted file mode 100644
index dd3f95e537..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_time.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
-#ifndef _def_time_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_time_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */
-#define _lib_usleep 1 /* usleep() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#include <sys/time.h>
-
-#include <sys/times.h>
-
-#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
-#define CLOCKS_PER_SEC CLK_TCK
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_tty.h b/usr/src/lib/libast/i386/include/ast/ast_tty.h
deleted file mode 100644
index f3433c6fec..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_tty.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
-#ifndef _def_tty_ast
-#define _def_tty_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_termios 1 /* #include <termios.h> ok */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
-
-#ifdef _hdr_termios
-# if _mac__POSIX_VDISABLE
-# undef _POSIX_VDISABLE
-# endif
-# include <termios.h>
-#else
-# if defined(_sys_termios) && defined(_lib_tcgetattr)
-# include <sys/termios.h>
-# define _hdr_termios 1
-# else
-# undef _sys_termios
-# endif /* _sys_termios */
-#endif /* _hdr_termios */
-
-#ifdef _hdr_termios
-# undef _hdr_sgtty
-# undef tcgetattr
-# undef tcsetattr
-# undef tcgetpgrp
-# undef tcsetpgrp
-# undef cfgetospeed
-# ifndef TCSANOW
-# define TCSANOW TCSETS
-# define TCSADRAIN TCSETSW
-# define TCSAFLUSH TCSETSF
-# endif /* TCSANOW */
- /* The following corrects bugs in some implementations */
-# if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
-# define TCSAFLUSH TCSADFLUSH
-# endif /* TCSADFLUSH */
-# ifndef _lib_tcgetattr
-# undef tcgetattr
-# define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
-# undef tcsetattr
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# undef cfgetospeed
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# endif /* _lib_tcgetattr */
-# undef TIOCGETC
-#else
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# ifdef _hdr_termio
-# include <termio.h>
-# else
-# ifdef _sys_termio
-# include <sys/termio.h>
-# define _hdr_termio 1
-# endif /* _sys_termio */
-# endif /* _hdr_termio */
-# ifdef _hdr_termio
-# define termios termio
-# undef TIOCGETC
-# define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-
-# ifdef _sys_bsdtty
-# include <sys/bsdtty.h>
-# endif /* _sys_bsdtty */
-# else
-# ifdef _hdr_sgtty
-# include <sgtty.h>
-# ifndef LPENDIN
-# ifdef _sys_nttyio
-# include <sys/nttyio.h>
-# endif /* _sys_nttyio */
-# endif /* LPENDIN */
-# define termios sgttyb
-# ifdef TIOCSETN
-# undef TCSETAW
-# endif /* TIOCSETN */
-# ifdef TIOCGETP
-# define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# else
-# define tcgetattr(fd,tty) gtty(fd, tty)
-# define tcsetattr(fd,action,tty) stty(fd, tty)
-# endif /* TIOCGETP */
-# else
-# ifdef _sys_ttyio
-# include <sys/ttyio.h>
-# endif
-# endif /* _hdr_sgtty */
-# endif /* hdr_termio */
-
-# ifndef TCSANOW
-# ifdef TCSETAW
-# define TCSANOW TCSETA
-# define TCSAFLUSH TCSETAF
-# else
-# ifdef TIOCSETN
-# define TCSANOW TIOCSETN
-# define TCSADRAIN TIOCSETN
-# define TCSAFLUSH TIOCSETP
-# endif /* TIOCSETN */
-# endif /* TCSETAW */
-# endif /* TCSANOW */
-#endif /* _hdr_termios */
-
-/* set ECHOCTL if driver can echo control charaters as ^c */
-#ifdef LCTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LCTLECH
-# endif /* !ECHOCTL */
-#endif /* LCTLECH */
-#ifdef LNEW_CTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LNEW_CTLECH
-# endif /* !ECHOCTL */
-#endif /* LNEW_CTLECH */
-#ifdef LNEW_PENDIN
-# ifndef PENDIN
-# define PENDIN LNEW_PENDIN
-# endif /* !PENDIN */
-#endif /* LNEW_PENDIN */
-
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_version.h b/usr/src/lib/libast/i386/include/ast/ast_version.h
deleted file mode 100644
index b3ba546e3a..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_version.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#define _AST_VERSION 20100102L
diff --git a/usr/src/lib/libast/i386/include/ast/ast_vfork.h b/usr/src/lib/libast/i386/include/ast/ast_vfork.h
deleted file mode 100644
index ad29d2b7cf..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_vfork.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
-#ifndef _def_vfork_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_vfork_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_wait.h b/usr/src/lib/libast/i386/include/ast/ast_wait.h
deleted file mode 100644
index f73ccf11b7..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_wait.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
-#ifndef _def_wait_ast
-#define _def_wait_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_wait 1 /* wait() in default lib(s) */
-#define _lib_wait3 1 /* wait3() in default lib(s) */
-#define _lib_wait4 1 /* wait4() in default lib(s) */
-#define _lib_waitpid 1 /* waitpid() in default lib(s) */
-#define _sys_wait 1 /* #include <sys/wait.h> ok */
-#define _ok_wif 1 /* posix wait macros ok */
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_wchar.h b/usr/src/lib/libast/i386/include/ast/ast_wchar.h
deleted file mode 100644
index baa224dfea..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_wchar.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_wchar_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */
-#define _lib_wctomb 1 /* wctomb() in default lib(s) */
-#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */
-#define _lib_wcslen 1 /* wcslen() in default lib(s) */
-#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */
-#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */
-#define _lib_towlower 1 /* towlower() in default lib(s) */
-#define _lib_towupper 1 /* towupper() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_mbstate_t 1 /* mbstate_t is a type */
-#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */
-#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */
-#ifndef _SFSTDIO_H
-#include <ast_common.h>
-#include <stdio.h>
-#endif
-#if _hdr_wchar && defined(_nxt_wchar)
-#include <../include/wchar.h> /* the native wchar.h */
-#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
-
-#ifndef WEOF
-#define WEOF (-1)
-#endif
-
-#undef fgetwc
-#undef fgetws
-#undef fputwc
-#undef fputws
-#undef getwc
-#undef getwchar
-#undef getws
-#undef putwc
-#undef putwchar
-#undef ungetwc
-
-#define fgetwc _ast_fgetwc
-#define fgetws _ast_fgetws
-#define fputwc _ast_fputwc
-#define fputws _ast_fputws
-#define fwide _ast_fwide
-#define fwprintf _ast_fwprintf
-#define fwscanf _ast_fwscanf
-#define getwc _ast_getwc
-#define getwchar _ast_getwchar
-#define getws _ast_getws
-#define putwc _ast_putwc
-#define putwchar _ast_putwchar
-#define swprintf _ast_swprintf
-#define swscanf _ast_swscanf
-#define ungetwc _ast_ungetwc
-#define vfwprintf _ast_vfwprintf
-#define vfwscanf _ast_vfwscanf
-#define vswprintf _ast_vswprintf
-#define vswscanf _ast_vswscanf
-#define vwprintf _ast_vwprintf
-#define vwscanf _ast_vwscanf
-#define wprintf _ast_wprintf
-#define wscanf _ast_wscanf
-
-#if !_typ_mbstate_t
-#undef _typ_mbstate_t
-#define _typ_mbstate_t 1
-typedef char mbstate_t;
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_mbstowcs
-extern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t));
-#endif
-#if !_lib_wctomb
-extern __MANGLE__ int wctomb __PROTO__((char*, wchar_t));
-#endif
-#if !_lib_wcrtomb
-extern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
-#endif
-#if !_lib_wcslen
-extern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*));
-#endif
-#if !_lib_wcstombs
-extern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t));
-#endif
-
-extern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ wint_t fgetwc __PROTO__((FILE*));
-extern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*));
-extern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*));
-extern __MANGLE__ int fwide __PROTO__((FILE*, int));
-extern __MANGLE__ wint_t getwc __PROTO__((FILE*));
-extern __MANGLE__ wint_t getwchar __PROTO__((void));
-extern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*));
-extern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ wint_t putwchar __PROTO__((wchar_t));
-extern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
-extern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
-extern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*));
-extern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
-extern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
-extern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...));
-extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ast_windows.h b/usr/src/lib/libast/i386/include/ast/ast_windows.h
deleted file mode 100644
index 65590c17b4..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ast_windows.h
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * AT&T Research
- *
- * ast <windows.h> wrapper
- * for libast only
- * include after ast headers
- */
-
-#ifndef _AST_WINDOWS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_WINDOWS_H 1
-
-#undef SF_ERROR /* clash in <oaidl.h> */
-
-#include <windows.h>
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ccode.h b/usr/src/lib/libast/i386/include/ast/ccode.h
deleted file mode 100644
index ae50c63b16..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ccode.h
+++ /dev/null
@@ -1,101 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * character code map interface
- *
- * NOTE: used for mapping between 8-bit character encodings
- * ISO character sets are handled by sfio
- */
-
-#ifndef _CHARCODE_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _CHARCODE_H 1
-
-#include <ast_common.h>
-#include <ast_ccode.h>
-
-typedef struct Ccmap_s
-{
- const char* name; /* code set name */
- const char* match; /* strmatch() pattern */
- const char* desc; /* code set description */
- const char* canon; /* canonical name format */
- const char* index; /* default index */
- int ccode; /* <ccode.h> code index */
- __V_* data; /* map specific data */
-} Ccmap_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ unsigned char* _ccmap __PROTO__((int, int));
-extern __MANGLE__ __V_* _ccmapcpy __PROTO__((unsigned char*, __V_*, const __V_*, size_t));
-extern __MANGLE__ __V_* _ccmapstr __PROTO__((unsigned char*, __V_*, size_t));
-
-extern __MANGLE__ int ccmapid __PROTO__((const char*));
-extern __MANGLE__ char* ccmapname __PROTO__((int));
-extern __MANGLE__ __V_* ccnative __PROTO__((__V_*, const __V_*, size_t));
-extern __MANGLE__ Ccmap_t* ccmaplist __PROTO__((Ccmap_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define CCOP(i,o) ((i)==(o)?0:(((o)<<8)|(i)))
-#define CCIN(x) ((x)&0xFF)
-#define CCOUT(x) (((x)>>8)&0xFF)
-#define CCCONVERT(x) ((x)&0xFF00)
-
-#define CCCVT(x) CCMAP(x,0)
-#define CCMAP(i,o) ((i)==(o)?(unsigned char*)0:_ccmap(i,o))
-#define CCMAPCHR(m,c) ((m)?(m)[c]:(c))
-#define CCMAPCPY(m,t,f,n) ((m)?_ccmapcpy(m,t,f,n):memcpy(t,f,n))
-#define CCMAPSTR(m,s,n) ((m)?_ccmapstr(m,s,n):(__V_*)(s))
-
-#define ccmap(i,o) CCMAP(i,o)
-#define ccmapchr(m,c) CCMAPCHR(m,c)
-#define ccmapcpy(m,t,f,n) CCMAPCPY(m,t,f,n)
-#define ccmapstr(m,s,n) CCMAPSTR(m,s,n)
-
-#define CCMAPC(c,i,o) ((i)==(o)?(c):CCMAP(i,o)[c])
-#define CCMAPM(t,f,n,i,o) ((i)==(o)?memcpy(t,f,n):_ccmapcpy(CCMAP(i,o),t,f,n))
-#define CCMAPS(s,n,i,o) ((i)==(o)?(__V_*)(s):_ccmapstr(CCMAP(i,o),s,n))
-
-#define ccmapc(c,i,o) CCMAPC(c,i,o)
-#define ccmapm(t,f,n,i,o) CCMAPM(t,f,n,i,o)
-#define ccmaps(s,n,i,o) CCMAPS(s,n,i,o)
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/cdt.h b/usr/src/lib/libast/i386/include/ast/cdt.h
deleted file mode 100644
index 1044207b76..0000000000
--- a/usr/src/lib/libast/i386/include/ast/cdt.h
+++ /dev/null
@@ -1,311 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _CDT_H
-#define _CDT_H 1
-
-/* Public interface for the dictionary library
-**
-** Written by Kiem-Phong Vo
-*/
-
-#define CDT_VERSION 20050420L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _dtlink_s Dtlink_t;
-typedef struct _dthold_s Dthold_t;
-typedef struct _dtdisc_s Dtdisc_t;
-typedef struct _dtmethod_s Dtmethod_t;
-typedef struct _dtdata_s Dtdata_t;
-typedef struct _dt_s Dt_t;
-typedef struct _dt_s Dict_t; /* for libdict compatibility */
-typedef struct _dtstat_s Dtstat_t;
-typedef Void_t* (*Dtsearch_f)_ARG_((Dt_t*,Void_t*,int));
-typedef Void_t* (*Dtmake_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef void (*Dtfree_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef int (*Dtcompar_f)_ARG_((Dt_t*,Void_t*,Void_t*,Dtdisc_t*));
-typedef unsigned int (*Dthash_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef Void_t* (*Dtmemory_f)_ARG_((Dt_t*,Void_t*,size_t,Dtdisc_t*));
-typedef int (*Dtevent_f)_ARG_((Dt_t*,int,Void_t*,Dtdisc_t*));
-
-struct _dtlink_s
-{ Dtlink_t* right; /* right child */
- union
- { unsigned int _hash; /* hash value */
- Dtlink_t* _left; /* left child */
- } hl;
-};
-
-/* private structure to hold an object */
-struct _dthold_s
-{ Dtlink_t hdr; /* header */
- Void_t* obj; /* user object */
-};
-
-/* method to manipulate dictionary structure */
-struct _dtmethod_s
-{ Dtsearch_f searchf; /* search function */
- int type; /* type of operation */
-};
-
-/* stuff that may be in shared memory */
-struct _dtdata_s
-{ int type; /* type of dictionary */
- Dtlink_t* here; /* finger to last search element */
- union
- { Dtlink_t** _htab; /* hash table */
- Dtlink_t* _head; /* linked list */
- } hh;
- int ntab; /* number of hash slots */
- int size; /* number of objects */
- int loop; /* number of nested loops */
- int minp; /* min path before splay, always even */
- /* for hash dt, > 0: fixed table size */
-};
-
-/* structure to hold methods that manipulate an object */
-struct _dtdisc_s
-{ int key; /* where the key begins in an object */
- int size; /* key size and type */
- int link; /* offset to Dtlink_t field */
- Dtmake_f makef; /* object constructor */
- Dtfree_f freef; /* object destructor */
- Dtcompar_f comparf;/* to compare two objects */
- Dthash_f hashf; /* to compute hash value of an object */
- Dtmemory_f memoryf;/* to allocate/free memory */
- Dtevent_f eventf; /* to process events */
-};
-
-#define DTDISC(dc,ky,sz,lk,mkf,frf,cmpf,hshf,memf,evf) \
- ( (dc)->key = (ky), (dc)->size = (sz), (dc)->link = (lk), \
- (dc)->makef = (mkf), (dc)->freef = (frf), \
- (dc)->comparf = (cmpf), (dc)->hashf = (hshf), \
- (dc)->memoryf = (memf), (dc)->eventf = (evf) )
-
-#ifdef offsetof
-#define DTOFFSET(struct_s, member) offsetof(struct_s, member)
-#else
-#define DTOFFSET(struct_s, member) ((int)(&((struct_s*)0)->member))
-#endif
-
-/* the dictionary structure itself */
-struct _dt_s
-{ Dtsearch_f searchf;/* search function */
- Dtdisc_t* disc; /* method to manipulate objs */
- Dtdata_t* data; /* sharable data */
- Dtmemory_f memoryf;/* function to alloc/free memory */
- Dtmethod_t* meth; /* dictionary method */
- int type; /* type information */
- int nview; /* number of parent view dictionaries */
- Dt_t* view; /* next on viewpath */
- Dt_t* walk; /* dictionary being walked */
- Void_t* user; /* for user's usage */
-};
-
-/* structure to get status of a dictionary */
-struct _dtstat_s
-{ int dt_meth; /* method type */
- int dt_size; /* number of elements */
- int dt_n; /* number of chains or levels */
- int dt_max; /* max size of a chain or a level */
- int* dt_count; /* counts of chains or levels by size */
-};
-
-/* flag set if the last search operation actually found the object */
-#define DT_FOUND 0100000
-
-/* supported storage methods */
-#define DT_SET 0000001 /* set with unique elements */
-#define DT_BAG 0000002 /* multiset */
-#define DT_OSET 0000004 /* ordered set (self-adjusting tree) */
-#define DT_OBAG 0000010 /* ordered multiset */
-#define DT_LIST 0000020 /* linked list */
-#define DT_STACK 0000040 /* stack */
-#define DT_QUEUE 0000100 /* queue */
-#define DT_METHODS 0000177 /* all currently supported methods */
-
-/* asserts to dtdisc() */
-#define DT_SAMECMP 0000001 /* compare methods equivalent */
-#define DT_SAMEHASH 0000002 /* hash methods equivalent */
-
-/* types of search */
-#define DT_INSERT 0000001 /* insert object if not found */
-#define DT_DELETE 0000002 /* delete object if found */
-#define DT_SEARCH 0000004 /* look for an object */
-#define DT_NEXT 0000010 /* look for next element */
-#define DT_PREV 0000020 /* find previous element */
-#define DT_RENEW 0000040 /* renewing an object */
-#define DT_CLEAR 0000100 /* clearing all objects */
-#define DT_FIRST 0000200 /* get first object */
-#define DT_LAST 0000400 /* get last object */
-#define DT_MATCH 0001000 /* find object matching key */
-#define DT_VSEARCH 0002000 /* search using internal representation */
-#define DT_ATTACH 0004000 /* attach an object to the dictionary */
-#define DT_DETACH 0010000 /* detach an object from the dictionary */
-
-/* events */
-#define DT_OPEN 1 /* a dictionary is being opened */
-#define DT_CLOSE 2 /* a dictionary is being closed */
-#define DT_DISC 3 /* discipline is about to be changed */
-#define DT_METH 4 /* method is about to be changed */
-#define DT_ENDOPEN 5 /* dtopen() is done */
-#define DT_ENDCLOSE 6 /* dtclose() is done */
-#define DT_HASHSIZE 7 /* setting hash table size */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-#if !_BLD_cdt && defined(__IMPORT__)
-#define extern __IMPORT__
-#endif
-
-extern Dtmethod_t* Dtset;
-extern Dtmethod_t* Dtbag;
-extern Dtmethod_t* Dtoset;
-extern Dtmethod_t* Dtobag;
-extern Dtmethod_t* Dtlist;
-extern Dtmethod_t* Dtstack;
-extern Dtmethod_t* Dtqueue;
-
-/* compatibility stuff; will go away */
-#ifndef KPVDEL
-extern Dtmethod_t* Dtorder;
-extern Dtmethod_t* Dttree;
-extern Dtmethod_t* Dthash;
-extern Dtmethod_t _Dttree;
-extern Dtmethod_t _Dthash;
-extern Dtmethod_t _Dtlist;
-extern Dtmethod_t _Dtqueue;
-extern Dtmethod_t _Dtstack;
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Dt_t* dtopen _ARG_((Dtdisc_t*, Dtmethod_t*));
-extern int dtclose _ARG_((Dt_t*));
-extern Dt_t* dtview _ARG_((Dt_t*, Dt_t*));
-extern Dtdisc_t* dtdisc _ARG_((Dt_t* dt, Dtdisc_t*, int));
-extern Dtmethod_t* dtmethod _ARG_((Dt_t*, Dtmethod_t*));
-
-extern Dtlink_t* dtflatten _ARG_((Dt_t*));
-extern Dtlink_t* dtextract _ARG_((Dt_t*));
-extern int dtrestore _ARG_((Dt_t*, Dtlink_t*));
-
-extern int dttreeset _ARG_((Dt_t*, int, int));
-
-extern int dtwalk _ARG_((Dt_t*, int(*)(Dt_t*,Void_t*,Void_t*), Void_t*));
-
-extern Void_t* dtrenew _ARG_((Dt_t*, Void_t*));
-
-extern int dtsize _ARG_((Dt_t*));
-extern int dtstat _ARG_((Dt_t*, Dtstat_t*, int));
-extern unsigned int dtstrhash _ARG_((unsigned int, Void_t*, int));
-
-#if !_PACKAGE_ast
-extern int memcmp _ARG_((const Void_t*, const Void_t*, size_t));
-extern int strcmp _ARG_((const char*, const char*));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* internal functions for translating among holder, object and key */
-#define _DT(dt) ((Dt_t*)(dt))
-#define _DTDSC(dc,ky,sz,lk,cmpf) \
- (ky = (dc)->key, sz = (dc)->size, lk = (dc)->link, cmpf = (dc)->comparf)
-#define _DTLNK(o,lk) ((Dtlink_t*)((char*)(o) + lk) )
-#define _DTOBJ(e,lk) ((lk) < 0 ? ((Dthold_t*)(e))->obj : (Void_t*)((char*)(e) - (lk)) )
-#define _DTKEY(o,ky,sz) (Void_t*)((sz) < 0 ? *((char**)((char*)(o)+(ky))) : ((char*)(o)+(ky)))
-
-#define _DTCMP(dt,k1,k2,dc,cmpf,sz) \
- ((cmpf) ? (*cmpf)(dt,k1,k2,dc) : \
- ((sz) <= 0 ? strcmp(k1,k2) : memcmp(k1,k2,sz)) )
-#define _DTHSH(dt,ky,dc,sz) ((dc)->hashf ? (*(dc)->hashf)(dt,ky,dc) : dtstrhash(0,ky,sz) )
-
-/* special search function for tree structure only */
-#define _DTMTCH(dt,key,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = (key); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define _DTSRCH(dt,obj,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = _DTKEY(obj, _ky, _sz); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define DTTREEMATCH(dt,key,action) _DTMTCH(_DT(dt),(Void_t*)(key),action)
-#define DTTREESEARCH(dt,obj,action) _DTSRCH(_DT(dt),(Void_t*)(obj),action)
-
-#define dtvnext(d) (_DT(d)->view)
-#define dtvcount(d) (_DT(d)->nview)
-#define dtvhere(d) (_DT(d)->walk)
-
-#define dtlink(d,e) (((Dtlink_t*)(e))->right)
-#define dtobj(d,e) _DTOBJ((e), _DT(d)->disc->link)
-#define dtfinger(d) (_DT(d)->data->here ? dtobj((d),_DT(d)->data->here):(Void_t*)(0))
-
-#define dtfirst(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_FIRST)
-#define dtnext(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_NEXT)
-#define dtleast(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_NEXT)
-#define dtlast(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_LAST)
-#define dtprev(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_PREV)
-#define dtmost(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_PREV)
-#define dtsearch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH)
-#define dtmatch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_MATCH)
-#define dtinsert(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_INSERT)
-#define dtdelete(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DELETE)
-#define dtattach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_ATTACH)
-#define dtdetach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DETACH)
-#define dtclear(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_CLEAR)
-#define dtfound(d) (_DT(d)->type & DT_FOUND)
-
-#define DT_PRIME 17109811 /* 2#00000001 00000101 00010011 00110011 */
-#define dtcharhash(h,c) (((unsigned int)(h) + (unsigned int)(c)) * DT_PRIME )
-
-#endif /* _CDT_H */
diff --git a/usr/src/lib/libast/i386/include/ast/debug.h b/usr/src/lib/libast/i386/include/ast/debug.h
deleted file mode 100644
index 6dfee2254a..0000000000
--- a/usr/src/lib/libast/i386/include/ast/debug.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * common ast debug definitions
- * include after the ast headers
- */
-
-#ifndef _DEBUG_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _DEBUG_H
-
-#include <ast.h>
-#include <error.h>
-
-#if !defined(DEBUG) && _BLD_DEBUG
-#define DEBUG _BLD_DEBUG
-#endif
-
-#if DEBUG || _BLD_DEBUG
-
-#define debug(x) x
-#define message(x) do if (error_info.trace < 0) { error x; } while (0)
-#define messagef(x) do if (error_info.trace < 0) { errorf x; } while (0)
-
-#define DEBUG_BEGTIME() debug_elapsed(1)
-#define DEBUG_GETTIME() debug_elapsed(0)
-#define DEBUG_ASSERT(p) ((p) ? 0 : (debug_fatal(__FILE__, __LINE__),0))
-#define DEBUG_COUNT(n) ((n) += 1)
-#define DEBUG_TALLY(c,n,v) ((c) ? ((n) += (v)) : (n))
-#define DEBUG_INCREASE(n) ((n) += 1)
-#define DEBUG_DECREASE(n) ((n) -= 1)
-#define DEBUG_DECLARE(t,v) t v
-#define DEBUG_SET(n,v) ((n) = (v))
-#define DEBUG_PRINT(fd,s,v) do {char _b[1024];write(fd,_b,sfsprintf(_b,sizeof(_b),s,v));} while(0)
-#define DEBUG_WRITE(fd,d,n) write((fd),(d),(n))
-#define DEBUG_TEMP(temp) (temp) /* debugging stuff that should be removed */
-#define DEBUG_BREAK break
-#define DEBUG_CONTINUE continue
-#define DEBUG_GOTO(label) do { debug_fatal(__FILE__, __LINE__); goto label; } while(0)
-#define DEBUG_RETURN(x) do { debug_fatal(__FILE__, __LINE__); return(x); } while(0)
-
-#else
-
-#define debug(x)
-#define message(x)
-#define messagef(x)
-
-#define DEBUG_BEGTIME()
-#define DEBUG_GETTIME()
-#define DEBUG_ASSERT(p)
-#define DEBUG_COUNT(n)
-#define DEBUG_TALLY(c,n,v)
-#define DEBUG_INCREASE(n)
-#define DEBUG_DECREASE(n)
-#define DEBUG_DECLARE(t,v)
-#define DEBUG_SET(n,v)
-#define DEBUG_PRINT(fd,s,v)
-#define DEBUG_WRITE(fd,d,n)
-#define DEBUG_TEMP(x)
-#define DEBUG_BREAK break
-#define DEBUG_CONTINUE continue
-#define DEBUG_GOTO(label) goto label
-#define DEBUG_RETURN(x) return(x)
-
-#endif
-
-#ifndef BREAK
-#define BREAK DEBUG_BREAK
-#endif
-#ifndef CONTINUE
-#define CONTINUE DEBUG_CONTINUE
-#endif
-#ifndef GOTO
-#define GOTO(label) DEBUG_GOTO(label)
-#endif
-#ifndef RETURN
-#define RETURN(x) DEBUG_RETURN(x)
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ double debug_elapsed __PROTO__((int));
-extern __MANGLE__ void debug_fatal __PROTO__((const char*, int));
-extern __MANGLE__ void systrace __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/dirent.h b/usr/src/lib/libast/i386/include/ast/dirent.h
deleted file mode 100644
index 05e76cadae..0000000000
--- a/usr/src/lib/libast/i386/include/ast/dirent.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_dirent.h>
diff --git a/usr/src/lib/libast/i386/include/ast/dt.h b/usr/src/lib/libast/i386/include/ast/dt.h
deleted file mode 100644
index b6b356aee7..0000000000
--- a/usr/src/lib/libast/i386/include/ast/dt.h
+++ /dev/null
@@ -1,49 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-#ifndef _DT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _DT_H 1
-
-#include <cdt.h>
-#include <vmalloc.h>
-
-#if _BLD_cdt && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Dt_t* dtnew __PROTO__((Vmalloc_t*, Dtdisc_t*, Dtmethod_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/endian.h b/usr/src/lib/libast/i386/include/ast/endian.h
deleted file mode 100644
index 1c992dd490..0000000000
--- a/usr/src/lib/libast/i386/include/ast/endian.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * linux/gnu compatibility
- */
-
-#ifndef _ENDIAN_H
-#define _ENDIAN_H
-
-#include <bytesex.h>
-
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
-#define __PDP_ENDIAN 3412
-
-#if defined (__USE_BSD) && !defined(__STRICT_ANSI__)
-
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN __LITTLE_ENDIAN
-#endif
-
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN __BIG_ENDIAN
-#endif
-
-#ifndef PDP_ENDIAN
-#define PDP_ENDIAN __PDP_ENDIAN
-#endif
-
-#undef BYTE_ORDER
-#define BYTE_ORDER __BYTE_ORDER
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/error.h b/usr/src/lib/libast/i386/include/ast/error.h
deleted file mode 100644
index c0e21dadd7..0000000000
--- a/usr/src/lib/libast/i386/include/ast/error.h
+++ /dev/null
@@ -1,196 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * option, error and message formatter external definitions
- */
-
-#ifndef _ERROR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _ERROR_H
-
-#include <ast.h>
-#include <option.h>
-#include <errno.h>
-
-#define ERROR_VERSION 20070319L
-
-#if !defined(errno) && defined(__DYNAMIC__)
-#define errno __DYNAMIC__(errno)
-#endif
-
-#define ERROR_debug(n) (-(n))
-#define ERROR_exit(n) ((n)+ERROR_ERROR)
-#define ERROR_system(n) (((n)+ERROR_ERROR)|ERROR_SYSTEM)
-#define ERROR_usage(n) ((((n)?2:0)+ERROR_ERROR)|ERROR_USAGE)
-#define ERROR_warn(n) (ERROR_WARNING)
-
-#ifndef ERROR_catalog
-#define ERROR_catalog(t) t
-#endif
-#ifndef ERROR_dictionary
-#define ERROR_dictionary(t) t
-#endif
-
-#ifndef ERROR_translate
-#define ERROR_translating() (error_info.translate&&(ast.locale.set&(1<<AST_LC_MESSAGES)))
-#define ERROR_translate(l,i,d,m) (ERROR_translating()?errorx((const char*)(l),(const char*)(i),(const char*)(d),(const char*)(m)):(char*)(m))
-#endif
-
-#define ERROR_INFO 0 /* info message -- no err_id */
-#define ERROR_WARNING 1 /* warning message */
-#define ERROR_ERROR 2 /* error message -- no err_exit */
-#define ERROR_FATAL 3 /* error message with err_exit */
-#define ERROR_NOEXEC EXIT_NOEXEC /* shell convention */
-#define ERROR_NOENT EXIT_NOTFOUND /* shell convention */
-#define ERROR_PANIC ERROR_LEVEL /* panic message with err_exit */
-
-#define ERROR_LEVEL 0x00ff /* level portion of status */
-#define ERROR_SYSTEM 0x0100 /* report system errno message */
-#define ERROR_OUTPUT 0x0200 /* next arg is error fd */
-#define ERROR_SOURCE 0x0400 /* next 2 args are FILE,LINE */
-#define ERROR_USAGE 0x0800 /* usage message */
-#define ERROR_PROMPT 0x1000 /* omit trailing newline */
-#define ERROR_NOID 0x2000 /* omit err_id */
-#define ERROR_LIBRARY 0x4000 /* library routine error */
-
-#define ERROR_INTERACTIVE 0x0001 /* context is interactive */
-#define ERROR_SILENT 0x0002 /* context is silent */
-#define ERROR_NOTIFY 0x0004 /* main(-sig,0,ctx) on signal */
-
-#define ERROR_FREE 0x0010 /* free context on pop */
-#define ERROR_POP 0x0020 /* pop context */
-#define ERROR_PUSH 0x0040 /* push context */
-#define ERROR_SET 0x0080 /* set context */
-
-/*
- * errorpush()/errorpop() are obsolete -- use errorctx() instead
- */
-
-#ifndef ERROR_CONTEXT_T
-#define ERROR_CONTEXT_T Error_info_t
-#endif
-
-#define ERROR_CONTEXT_BASE ((Error_context_t*)&error_info.context)
-
-#define errorpush(p,f) (*(p)= *ERROR_CONTEXT_BASE,*ERROR_CONTEXT_BASE=error_info.empty,error_info.context=(Error_context_t*)(p),error_info.flags=(f))
-#define errorpop(p) (*ERROR_CONTEXT_BASE= *(p))
-
-typedef struct Error_info_s Error_info_t;
-typedef struct Error_context_s Error_context_t;
-
-#define ERROR_CONTEXT \
- ERROR_CONTEXT_T* context; /* prev context stack element */ \
- int errors; /* >= ERROR_ERROR count */ \
- int flags; /* context flags */ \
- int line; /* input|output line number */ \
- int warnings; /* ERROR_WARNING count */ \
- char* file; /* input|output file name */ \
- char* id; /* command id */
-
-struct Error_context_s /* context stack element */
-{
- ERROR_CONTEXT
-};
-
-struct Error_info_s /* error state */
-{
- int fd; /* write(2) fd */
-
- void (*exit) __PROTO__((int)); /* error exit */
- ssize_t (*write) __PROTO__((int, const __V_*, size_t)); /* error output */
-
- /* the rest are implicitly initialized */
-
- int clear; /* default clear ERROR_* flags */
- int core; /* level>=core -> core dump */
- int indent; /* debug trace indent level */
- int init; /* initialized */
- int last_errno; /* last reported errno */
- int mask; /* multi level debug trace mask */
- int set; /* default set ERROR_* flags */
- int trace; /* debug trace level */
-
- char* version; /* ERROR_SOURCE command version */
-
- int (*auxilliary) __PROTO__((Sfio_t*, int, int)); /* aux info to append */
-
- ERROR_CONTEXT /* top of context stack */
-
- Error_context_t empty; /* empty context stack element */
-
- unsigned long time; /* debug time trace */
-
- char* (*translate) __PROTO__((const char*, const char*, const char*, const char*)); /* format translator */
-
- const char* catalog; /* message catalog */
-};
-
-#ifndef errno
-extern __MANGLE__ int errno; /* system call error status */
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Error_info_t* _error_infop_;
-
-#define error_info (*_error_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ void error __PROTO__((int, ...));
-extern __MANGLE__ int errormsg __PROTO__((const char*, int, ...));
-extern __MANGLE__ int errorf __PROTO__((__V_*, __V_*, int, ...));
-extern __MANGLE__ void errorv __PROTO__((const char*, int, va_list));
-#ifndef errorx
-extern __MANGLE__ char* errorx __PROTO__((const char*, const char*, const char*, const char*));
-#endif
-extern __MANGLE__ Error_info_t* errorctx __PROTO__((Error_info_t*, int, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/find.h b/usr/src/lib/libast/i386/include/ast/find.h
deleted file mode 100644
index 374858aced..0000000000
--- a/usr/src/lib/libast/i386/include/ast/find.h
+++ /dev/null
@@ -1,97 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * fast find interface definitions
- */
-
-#ifndef _FIND_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FIND_H
-
-#define FIND_VERSION 19980301L
-
-#ifndef FIND_CODES
-#define FIND_CODES "lib/find/codes"
-#endif
-
-#define FIND_CODES_ENV "FINDCODES"
-
-#define FIND_GENERATE (1<<0) /* generate new codes */
-#define FIND_ICASE (1<<1) /* ignore case in match */
-#define FIND_GNU (1<<2) /* generate gnu format codes */
-#define FIND_OLD (1<<3) /* generate old format codes */
-#define FIND_TYPE (1<<4) /* generate type with codes */
-#define FIND_VERIFY (1<<5) /* verify the dir hierarchy */
-
-#define FIND_USER (1L<<16) /* first user flag bit */
-
-struct Find_s;
-struct Finddisc_s;
-
-typedef int (*Findverify_f) __PROTO__((struct Find_s*, const char*, size_t, struct Finddisc_s*));
-
-typedef struct Finddisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* FIND_* flags */
- Error_f errorf; /* error function */
- Findverify_f verifyf; /* dir verify function */
- char** dirs; /* dir prefixes to search */
-} Finddisc_t;
-
-typedef struct Find_s
-{
- const char* id; /* library id string */
- unsigned long stamp; /* codes time stamp */
-
-#ifdef _FIND_PRIVATE_
- _FIND_PRIVATE_
-#endif
-
-} Find_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Find_t* findopen __PROTO__((const char*, const char*, const char*, Finddisc_t*));
-extern __MANGLE__ char* findread __PROTO__((Find_t*));
-extern __MANGLE__ int findwrite __PROTO__((Find_t*, const char*, size_t, const char*));
-extern __MANGLE__ int findclose __PROTO__((Find_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/fnmatch.h b/usr/src/lib/libast/i386/include/ast/fnmatch.h
deleted file mode 100644
index 764009c3b7..0000000000
--- a/usr/src/lib/libast/i386/include/ast/fnmatch.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix fnmatch interface definitions
- */
-
-#ifndef _FNMATCH_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FNMATCH_H
-
-#include <ast_common.h>
-
-/* fnmatch flags */
-
-#define FNM_NOESCAPE 0x0001 /* \ is literal */
-#define FNM_PATHNAME 0x0002 /* explicit match for / */
-#define FNM_PERIOD 0x0004 /* explicit match for leading . */
-#define FNM_NOSYS 0x0010 /* not implemented */
-
-/* nonstandard fnmatch() flags */
-
-#define FNM_AUGMENTED 0x0008 /* enable ! & ( | ) */
-#define FNM_ICASE 0x0020 /* ignore case in match */
-#define FNM_LEADING_DIR 0x0040 /* match up to implicit / */
-
-#define FNM_CASEFOLD FNM_ICASE /* gnu compatibility */
-#define FNM_FILE_NAME FNM_PATHNAME /* gnu compatibility */
-
-/* fnmatch error codes -- other non-zero values from <regex.h> */
-
-#define FNM_NOMATCH 1 /* == REG_NOMATCH */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int fnmatch __PROTO__((const char*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/fnv.h b/usr/src/lib/libast/i386/include/ast/fnv.h
deleted file mode 100644
index 2312a20118..0000000000
--- a/usr/src/lib/libast/i386/include/ast/fnv.h
+++ /dev/null
@@ -1,81 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * Landon Kurt Knoll
- * Phong Vo
- *
- * FNV-1 linear congruent checksum/hash/PRNG
- * see http://www.isthe.com/chongo/tech/comp/fnv/
- */
-
-#ifndef _FNV_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FNV_H
-
-#include <ast_common.h>
-
-#define FNV_INIT 0x811c9dc5L
-#define FNV_MULT 0x01000193L
-
-#define FNVINIT(h) (h = FNV_INIT)
-#define FNVPART(h,c) (h = (h) * FNV_MULT ^ (c))
-#define FNVSUM(h,s,n) do { \
- register size_t _i_ = 0; \
- while (_i_ < n) \
- FNVPART(h, ((unsigned char*)s)[_i_++]); \
- } while (0)
-
-#if _typ_int64_t
-
-#ifdef _ast_LL
-
-#define FNV_INIT64 0xcbf29ce484222325LL
-#define FNV_MULT64 0x00000100000001b3LL
-
-#else
-
-#define FNV_INIT64 ((int64_t)0xcbf29ce484222325)
-#define FNV_MULT64 ((int64_t)0x00000100000001b3)
-
-#endif
-
-#define FNVINIT64(h) (h = FNV_INIT64)
-#define FNVPART64(h,c) (h = (h) * FNV_MULT64 ^ (c))
-#define FNVSUM64(h,s,n) do { \
- register int _i_ = 0; \
- while (_i_ < n) \
- FNVPART64(h, ((unsigned char*)s)[_i_++]); \
- } while (0)
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/fs3d.h b/usr/src/lib/libast/i386/include/ast/fs3d.h
deleted file mode 100644
index bae8dde927..0000000000
--- a/usr/src/lib/libast/i386/include/ast/fs3d.h
+++ /dev/null
@@ -1,123 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * 3d fs interface definitions
- */
-
-#ifndef _FS3D_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FS3D_H
-
-#include <ast_fs.h>
-
-#if _int_st_spare1
-#define iview(p) ((p)->st_spare1)
-#define IVIEW(p,v) ((p)->st_spare1=(v))
-#else
-#if _ary_st_spare4
-#define iview(p) ((p)->st_spare4[0])
-#define IVIEW(p,v) ((p)->st_spare4[0]=(v))
-#else
-#if _ary_st_pad4
-#define iview(p) ((p)->st_pad4[0])
-#define IVIEW(p,v) ((p)->st_pad4[0]=(v))
-#else
-#if _mem_st_rdev_stat
-#define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev)
-#define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0)
-#else
-#define iview(p) 0
-#define IVIEW(p,v)
-#endif
-#endif
-#endif
-#endif
-
-/*
- * special options
- */
-
-#define FS3D_init "/#option/init"
-#define FS3D_on "/#option/3d"
-#define FS3D_off "/#option/2d"
-
-/*
- * fs3d(3) ops
- */
-
-#define FS3D_OP(o,a) (((a)<<3)|(o))
-
-#define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */
-#define FS3D_OFF FS3D_OP_OFF
-#define FS3D_ON FS3D_OP_ON
-#define FS3D_TEST FS3D_OP_TEST
-#define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n)
-
-#define FS3D_op(x) ((x)&07)
-#define FS3D_arg(x) (((x)>>3)&07777)
-
-#define FS3D_OP_OFF 0
-#define FS3D_OP_ON 1
-#define FS3D_OP_TEST 2
-#define FS3D_OP_LIMIT 3
-#define FS3D_OP_INIT 7
-
-/*
- * mount(2) ops
- */
-
-#define FS3D_ALL (FS3D_VIEW|FS3D_VERSION)
-#define FS3D_VIEW 002
-#define FS3D_VERSION 004
-#define FS3D_GET 010
-#define FS3D_SIZE(n) ((n)<<4)
-#define FS3D_SIZEOF(n) ((n)>>4)
-
-#if !_BLD_3d
-#define mount(s,t,f,d) fs3d_mount(s,t,f,d)
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int fs3d __PROTO__((int));
-extern __MANGLE__ int fs3d_mount __PROTO__((const char*, char*, int, __V_*));
-extern __MANGLE__ char* pathnext __PROTO__((char*, char*, long*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/fts.h b/usr/src/lib/libast/i386/include/ast/fts.h
deleted file mode 100644
index 1bf72a114d..0000000000
--- a/usr/src/lib/libast/i386/include/ast/fts.h
+++ /dev/null
@@ -1,173 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * David Korn
- * Phong Vo
- * AT&T Research
- *
- * fts interface definitions
- */
-
-#ifndef _FTS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTS_H
-
-#include <ast_std.h>
-#include <ast_fs.h>
-#include <ast_mode.h>
-
-/*
- * fts_open flags
- */
-
-#define FTS_LOGICAL 0 /* logical traversal, follow symlinks */
-#define FTS_META (1<<0) /* follow top dir symlinks even if phys */
-#define FTS_NOCHDIR (1<<1) /* don't chdir */
-#define FTS_NOPOSTORDER (1<<2) /* no postorder visits */
-#define FTS_NOPREORDER (1<<3) /* no preorder visits */
-#define FTS_NOSEEDOTDIR (1<<11) /* never retain leading . dir */
-#define FTS_NOSTAT (1<<4) /* don't stat children */
-#define FTS_ONEPATH (1<<5) /* pathnames arg is one const char* */
-#define FTS_PHYSICAL (1<<6) /* physical traversal, don't follow */
-#define FTS_SEEDOT (1<<7) /* return . and .. */
-#define FTS_SEEDOTDIR (1<<10) /* always retain leading . dir */
-#define FTS_TOP (1<<8) /* don't traverse subdirectories */
-#define FTS_XDEV (1<<9) /* don't cross mount points */
-
-#define FTS_USER (1<<12) /* first user flag bit */
-
-#define FTS_COMFOLLOW FTS_META
-
-/*
- * fts_info flags
- */
-
-#define FTS_DEFAULT 0 /* ok, someone must have wanted this */
-
-#define FTS_NS (1<<0) /* stat failed */
-#define FTS_F (1<<1) /* file - not directory or symbolic link*/
-#define FTS_SL (1<<2) /* symbolic link */
-#define FTS_D (1<<3) /* directory - pre-order visit */
-
-#define FTS_C (1<<4) /* causes cycle */
-#define FTS_ERR (1<<5) /* some other error */
-#define FTS_DD (1<<6) /* . or .. */
-#define FTS_NR (1<<7) /* cannot read */
-#define FTS_NX (1<<8) /* cannot search */
-#define FTS_OK (1<<9) /* no info but otherwise ok */
-#define FTS_P (1<<10) /* post-order visit */
-
-#define FTS_DC (FTS_D|FTS_C) /* dir - would cause cycle */
-#define FTS_DNR (FTS_D|FTS_NR) /* dir - no read permission */
-#define FTS_DNX (FTS_D|FTS_NX) /* dir - no search permission */
-#define FTS_DOT (FTS_D|FTS_DD) /* . or .. */
-#define FTS_DP (FTS_D|FTS_P) /* dir - post-order visit */
-#define FTS_NSOK (FTS_NS|FTS_OK) /* no stat (because you asked) */
-#define FTS_SLNONE (FTS_SL|FTS_NS) /* symlink - to nowhere */
-
-/*
- * fts_set flags
- */
-
-#define FTS_AGAIN FTS_TOP /* process entry again */
-#define FTS_FOLLOW FTS_META /* follow FTS_SL symlink */
-#define FTS_SKIP FTS_NOSTAT /* skip FTS_D directory */
-#define FTS_STAT FTS_PHYSICAL /* stat() done by user */
-
-typedef struct Fts FTS;
-typedef struct Ftsent FTSENT;
-
-struct Ftsent
-{
- char* fts_accpath; /* path relative to . */
- char* fts_name; /* file name */
- char* fts_path; /* path relative to top dir */
- FTSENT* fts_cycle; /* offender if cycle */
- FTSENT* fts_link; /* next child */
- FTSENT* fts_parent; /* parent directory */
- struct stat* fts_statp; /* stat info */
-#ifdef _FTSENT_LOCAL_PRIVATE_
- _FTSENT_LOCAL_PRIVATE_
-#else
- __V_* fts_pointer; /* local pointer value */
-#endif
- long fts_number; /* local numeric value */
- int fts_errno; /* errno for this entry */
- unsigned short fts_info; /* info flags */
-
- unsigned short _fts_namelen; /* old fts_namelen */
- unsigned short _fts_pathlen; /* old fts_pathlen */
- short _fts_level; /* old fts_level */
-
- short _fts_status; /* <ftwalk.h> compatibility */
- struct stat _fts_statb; /* <ftwalk.h> compatibility */
-
- FTS* fts; /* fts_open() handle */
- size_t fts_namelen; /* strlen(fts_name) */
- size_t fts_pathlen; /* strlen(fts_path) */
- ssize_t fts_level; /* file tree depth, 0 at top */
-
-#ifdef _FTSENT_PRIVATE_
- _FTSENT_PRIVATE_
-#endif
-
-};
-
-struct Fts
-{
- int fts_errno; /* last errno */
- __V_* fts_handle; /* user defined handle */
-
-#ifdef _FTS_PRIVATE_
- _FTS_PRIVATE_
-#endif
-
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ FTSENT* fts_children __PROTO__((FTS*, int));
-extern __MANGLE__ int fts_close __PROTO__((FTS*));
-extern __MANGLE__ int fts_flags __PROTO__((void));
-extern __MANGLE__ int fts_local __PROTO__((FTSENT*));
-extern __MANGLE__ int fts_notify __PROTO__((int(*)(FTS*, FTSENT*, __V_*), __V_*));
-extern __MANGLE__ FTS* fts_open __PROTO__((char* const*, int, int(*)(FTSENT* const*, FTSENT* const*)));
-extern __MANGLE__ FTSENT* fts_read __PROTO__((FTS*));
-extern __MANGLE__ int fts_set __PROTO__((FTS*, FTSENT*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ftw.h b/usr/src/lib/libast/i386/include/ast/ftw.h
deleted file mode 100644
index 68feb09bb3..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ftw.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * ftw,nftw over ftwalk
- */
-
-#ifndef _FTW_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTW_H
-
-#define FTW FTWALK
-#include <ftwalk.h>
-#undef FTW
-
-#define FTW_SLN (FTW_SL|FTW_NR)
-
-#define FTW_PHYS (FTW_PHYSICAL)
-#define FTW_CHDIR (FTW_DOT)
-#define FTW_DEPTH (FTW_POST)
-#define FTW_OPEN (0)
-
-struct FTW
-{
- int quit;
- int base;
- int level;
-};
-
-#define FTW_SKD FTW_SKIP
-#define FTW_PRUNE FTW_SKIP
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int ftw __PROTO__((const char*, int(*)(const char*, const struct stat*, int), int));
-extern __MANGLE__ int nftw __PROTO__((const char*, int(*)(const char*, const struct stat*, int, struct FTW*), int, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ftwalk.h b/usr/src/lib/libast/i386/include/ast/ftwalk.h
deleted file mode 100644
index 673b1c2824..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ftwalk.h
+++ /dev/null
@@ -1,135 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Phong Vo
- * Glenn Fowler
- * AT&T Research
- *
- * ast ftwalk interface definitions
- * ftwalk was the initial improvement on ftw and nftw
- * which formed the basis for the POSIX fts proposal
- *
- * NOTE: this file is in cahoots with the fts implementation
- */
-
-#ifndef _FTWALK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTWALK_H
-
-#define fts_info info
-#define fts_level level
-#define fts_link link
-#define fts_name name
-#define fts_namelen namelen
-#define fts_parent parent
-#define fts_path path
-#define fts_pathlen pathlen
-#define _fts_status status
-#define _fts_statb statb
-
-#define FTSENT Ftw_t /* <fts.h> internal */
-#define Ftsent FTW /* <fts.h> internal */
-
-#define _FTSENT_LOCAL_PRIVATE_ /* <fts.h> internal */ \
- union \
- { \
- long number; /* local numeric value */ \
- __V_* pointer; /* local pointer value */ \
- } local;
-
-#include <fts.h>
-
-/*
- * ftwalk() argument flags
- */
-
-#define FTW_CANON FTS_CANON
-#define FTW_CHILDREN (FTS_USER<<0)
-#define FTW_DELAY FTS_NOSTAT
-#define FTW_DOT FTS_NOCHDIR
-#define FTW_META FTS_META
-#define FTW_MOUNT FTS_XDEV
-#define FTW_MULTIPLE FTS_ONEPATH
-#define FTW_NOSEEDOTDIR FTS_NOSEEDOTDIR
-#define FTW_PHYSICAL FTS_PHYSICAL
-#define FTW_POST (FTS_USER<<1)
-#define FTW_SEEDOTDIR FTS_SEEDOTDIR
-#define FTW_TOP FTS_TOP
-#define FTW_TWICE (FTS_USER<<2)
-#define FTW_USER (FTS_USER<<3)
-
-/*
- * Ftw_t.info type bits
- */
-
-#define FTW_C FTS_C
-#define FTW_D FTS_D
-#define FTW_DC FTS_DC
-#define FTW_DNR FTS_DNR
-#define FTW_DNX FTS_DNX
-#define FTW_DP FTS_DP
-#define FTW_F FTS_F
-#define FTW_NR FTS_NR
-#define FTW_NS FTS_NS
-#define FTW_NSOK FTS_NSOK
-#define FTW_NX FTS_NX
-#define FTW_P FTS_P
-#define FTW_SL FTS_SL
-
-/*
- * Ftw_t.status entry values
- */
-
-#define FTW_NAME FTS_DOT /* access by Ftw_t.name */
-#define FTW_PATH FTS_NOCHDIR /* access by Ftw_t.path */
-
-/*
- * Ftw_t.status return values
- */
-
-#define FTW_AGAIN FTS_AGAIN
-#define FTW_FOLLOW FTS_FOLLOW
-#define FTW_NOPOST FTS_NOPOSTORDER
-#define FTW_SKIP FTS_SKIP
-#define FTW_STAT FTS_STAT
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int ftwalk __PROTO__((const char*, int(*)(Ftw_t*), int, int(*)(Ftw_t*, Ftw_t*)));
-extern __MANGLE__ int ftwflags __PROTO__((void));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/getopt.h b/usr/src/lib/libast/i386/include/ast/getopt.h
deleted file mode 100644
index c0679a7e53..0000000000
--- a/usr/src/lib/libast/i386/include/ast/getopt.h
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * gnu getopt interface
- */
-
-#ifndef _GETOPT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#ifdef _AST_STD_I
-#define _GETOPT_H -1
-#else
-#define _GETOPT_H 1
-
-#include <ast_getopt.h>
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-struct option
-{
- const char* name;
- int has_arg;
- int* flag;
- int val;
-};
-
-extern __MANGLE__ int getopt_long __PROTO__((int, char* const*, const char*, const struct option*, int*));
-extern __MANGLE__ int getopt_long_only __PROTO__((int, char* const*, const char*, const struct option*, int*));
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/glob.h b/usr/src/lib/libast/i386/include/ast/glob.h
deleted file mode 100644
index e2708229c7..0000000000
--- a/usr/src/lib/libast/i386/include/ast/glob.h
+++ /dev/null
@@ -1,155 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix glob interface definitions with gnu extensions
- */
-
-#ifndef _GLOB_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _GLOB_H
-
-#define GLOB_VERSION 20060717L
-
-#include <stdlib.h>
-
-struct dirent;
-struct stat;
-
-struct _glob_;
-struct _globlist_;
-
-typedef struct _glob_ glob_t;
-typedef struct _globlist_ globlist_t;
-
-struct _globlist_
-{
- globlist_t* gl_next;
- char* gl_begin;
- unsigned char gl_flags;
- char gl_path[1];
-};
-
-struct _glob_
-{
- size_t gl_pathc;
- char** gl_pathv;
- size_t gl_offs;
- globlist_t* gl_list;
- int gl_flags;
-
- /* GLOB_DISC data -- memset(&gl,0,sizeof(gl)) before using! */
-
- const char* gl_fignore;
- const char* gl_suffix;
- unsigned char* gl_intr;
-
- int gl_delim;
-
- __V_* gl_handle;
- __V_* (*gl_diropen) __PROTO__((glob_t*, const char*));
- char* (*gl_dirnext) __PROTO__((glob_t*, __V_*));
- void (*gl_dirclose) __PROTO__((glob_t*, __V_*));
- int (*gl_type) __PROTO__((glob_t*, const char*, int));
- int (*gl_attr) __PROTO__((glob_t*, const char*, int));
-
- /* gnu extensions -- but how do you synthesize dirent and stat? */
-
- __V_* (*gl_opendir) __PROTO__((const char*));
- struct dirent* (*gl_readdir) __PROTO__((__V_*));
- void (*gl_closedir) __PROTO__((__V_*));
- int (*gl_stat) __PROTO__((const char*, struct stat*));
- int (*gl_lstat) __PROTO__((const char*, struct stat*));
-
- /* ast additions */
-
- char* (*gl_nextdir) __PROTO__((glob_t*, char*));
- unsigned long gl_status;
- unsigned long gl_version;
- unsigned short gl_extra;
-
-#ifdef _GLOB_PRIVATE_
- _GLOB_PRIVATE_
-#else
- char* gl_pad[23];
-#endif
-
-};
-
-/* standard interface */
-#define GLOB_APPEND 0x0001 /* append to previous */
-#define GLOB_DOOFFS 0x0002 /* gl_offs defines argv offset */
-#define GLOB_ERR 0x0004 /* abort on error */
-#define GLOB_MARK 0x0008 /* append / to directories */
-#define GLOB_NOCHECK 0x0010 /* nomatch is original pattern */
-#define GLOB_NOESCAPE 0x0020 /* don't treat \ specially */
-#define GLOB_NOSORT 0x0040 /* don't sort the list */
-
-/* extended interface */
-#define GLOB_STARSTAR 0x0080 /* enable [/]**[/] expansion */
-#define GLOB_BRACE 0x0100 /* enable {...} expansion */
-#define GLOB_ICASE 0x0200 /* ignore case on match */
-#define GLOB_COMPLETE 0x0400 /* shell file completeion */
-#define GLOB_AUGMENTED 0x0800 /* augmented shell patterns */
-#define GLOB_STACK 0x1000 /* allocate on current stack */
-#define GLOB_LIST 0x2000 /* just create gl_list */
-#define GLOB_ALTDIRFUNC 0x4000 /* gnu discipline functions */
-#define GLOB_DISC 0x8000 /* discipline initialized */
-
-/* gl_status */
-#define GLOB_NOTDIR 0x0001 /* last gl_dirnext() not a dir */
-
-/* gl_type return */
-#define GLOB_NOTFOUND 0 /* does not exist */
-#define GLOB_DEV 1 /* exists but not DIR EXE REG */
-#define GLOB_DIR 2 /* directory */
-#define GLOB_EXE 3 /* executable regular file */
-#define GLOB_REG 4 /* regular file */
-
-/* error return values */
-#define GLOB_ABORTED 1
-#define GLOB_NOMATCH 2
-#define GLOB_NOSPACE 3
-#define GLOB_INTR 4
-#define GLOB_APPERR 5
-#define GLOB_NOSYS 6
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int glob __PROTO__((const char*, int, int(*)(const char*,int), glob_t*));
-extern __MANGLE__ void globfree __PROTO__((glob_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif /* _GLOB_H */
diff --git a/usr/src/lib/libast/i386/include/ast/hash.h b/usr/src/lib/libast/i386/include/ast/hash.h
deleted file mode 100644
index 0023ea06f5..0000000000
--- a/usr/src/lib/libast/i386/include/ast/hash.h
+++ /dev/null
@@ -1,213 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * hash table library interface definitions
- *
- * NOTE: new code should use the more general <cdt.h>
- */
-
-#ifndef _HASH_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASH_H
-
-#define HASH_ALLOCATE (1L<<0) /* allocate new key names */
-#define HASH_FIXED (1L<<1) /* fixed table size */
-#define HASH_HASHED (1L<<6) /* key names already hashed */
-#define HASH_RESIZE (1L<<2) /* table has been resized */
-#define HASH_SCANNING (1L<<3) /* currently scanning scope */
-#define HASH_SCOPE (1L<<4) /* push scope / create in bot */
-#define HASH_STATIC (1L<<5) /* static table allocation */
-
-#define HASH_CREATE (1L<<8) /* create bucket if not found */
-#define HASH_DELETE (1L<<9) /* delete bucket if found */
-#define HASH_LOOKUP 0 /* default op */
-#define HASH_RENAME (1L<<7) /* rename bucket if found */
-
-#define HASH_BUCKET (1L<<11) /* name is installed bucket */
-#define HASH_INSTALL (1L<<12) /* install allocated bucket */
-#define HASH_NOSCOPE (1L<<13) /* top scope only */
-#define HASH_OPAQUE (1L<<14) /* opaque bucket */
-#define HASH_VALUE (1L<<15) /* value bucket field used */
-
-#define HASH_SIZE(n) (((long)(n))<<16) /* fixed bucket size */
-#define HASH_SIZEOF(f) ((((long)(f))>>16)&0xffff) /* extract size */
-
-#define HASH_DELETED ((unsigned long)1<<(8*sizeof(int)-1)) /* deleted placeholder */
-#define HASH_KEEP (1L<<(8*sizeof(int)-2)) /* no free on bucket */
-#define HASH_HIDDEN (1L<<(8*sizeof(int)-3)) /* hidden by scope */
-#define HASH_HIDES (1L<<(8*sizeof(int)-4)) /* hides lower scope */
-#define HASH_OPAQUED (1L<<(8*sizeof(int)-5)) /* opaqued placeholder */
-#define HASH_FREENAME (1L<<(8*sizeof(int)-6)) /* free bucket name */
-
-#define HASH_RESET (HASH_RESIZE|HASH_SCOPE|HASH_STATIC|HASH_VALUE)
-#define HASH_INTERNAL (HASH_BUCKET|HASH_RESIZE|HASH_SCANNING|HASH_STATIC)
-#define HASH_FLAGS (HASH_DELETED|HASH_FREENAME|HASH_HIDDEN|HASH_HIDES|HASH_KEEP|HASH_OPAQUED)
-
-#define HASH_alloc 1
-#define HASH_clear 2
-#define HASH_compare 3
-#define HASH_free 4
-#define HASH_hash 5
-#define HASH_meanchain 6
-#define HASH_name 7
-#define HASH_namesize 8
-#define HASH_set 9
-#define HASH_size 10
-#define HASH_table 11
-#define HASH_va_list 12
-
-#define HASH_bucketsize 13
-
-#define HASH_region 14
-
-#include <hashpart.h>
-
-#define hashclear(t,f) ((t)->flags &= ~((f) & ~HASH_INTERNAL))
-#define hashcover(b) (((b)->hash&HASH_HIDES)?(Hash_bucket_t*)((b)->name):(Hash_bucket_t*)0)
-#define hashdel(t,n) hashlook(t, (char*)(n), HASH_DELETE, (char*)0)
-#define hashget(t,n) hashlook(t, (char*)(n), HASH_LOOKUP|HASH_VALUE, (char*)0)
-#define hashgetbucket(s) ((Hash_bucket_t*)((s)-((sizeof(Hash_bucket_t)+sizeof(char*)-1)/sizeof(char*))*sizeof(char*)))
-#define hashkeep(b) ((b)->hash|=HASH_KEEP)
-#define hashname(b) ((((b)->hash&HASH_HIDES)?((Hash_bucket_t*)((b)->name)):(b))->name)
-#define hashput(t,n,v) hashlook(t, (char*)(n), HASH_CREATE|HASH_VALUE, (char*)(v))
-#define hashref(t,n) hashlook(t, (char*)(n), HASH_LOOKUP|HASH_INTERNAL|HASH_VALUE, (char*)0)
-#define hashscope(t) ((t)->scope)
-#define hashset(t,f) ((t)->flags |= ((f) & ~HASH_INTERNAL))
-
-/*
- * DEPRECATED renames for compatibility
- */
-
-#define Hashbin_t Hash_bucket_t
-#define HASHBUCKET Hash_bucket_t
-#define Hashhdr_t Hash_header_t
-#define HASHHEADER Hash_header_t
-#define Hashpos_t Hash_position_t
-#define HASHPOSITION Hash_position_t
-#define Hashtab_t Hash_table_t
-#define HASHTABLE Hash_table_t
-
-#define vhashalloc hashvalloc
-#define hashvalloc(t,a) hashalloc(t,HASH_va_list,a,0)
-
-/*
- * the #define's avoid union tags
- */
-
-typedef struct Hash_bucket Hash_bucket_t;
-typedef struct Hash_root Hash_root_t;
-typedef struct Hash_table Hash_table_t;
-
-#define HASH_HEADER /* common bucket header */ \
- Hash_bucket_t* next; /* next in collision chain */ \
- unsigned int hash; /* hash flags and value */ \
- char* name /* key name */
-
-#define HASH_DEFAULT /* HASH_VALUE bucket elements */ \
- char* value /* key value */
-
-typedef struct /* bucket header */
-{
- HASH_HEADER;
-} Hash_header_t;
-
-struct Hash_bucket /* prototype bucket */
-{
- HASH_HEADER;
- HASH_DEFAULT;
-};
-
-typedef struct /* hash scan bucket position */
-{
- Hash_bucket_t* bucket; /* bucket */
-#ifdef _HASH_POSITION_PRIVATE_
- _HASH_POSITION_PRIVATE_
-#endif
-} Hash_position_t;
-
-typedef struct /* last lookup cache */
-{
- Hash_table_t* table; /* last lookup table */
- Hash_bucket_t* bucket; /* last lookup bucket */
-#ifdef _HASH_LAST_PRIVATE_
- _HASH_LAST_PRIVATE_
-#endif
-} Hash_last_t;
-
-struct Hash_root /* root hash table information */
-{
- int accesses; /* number of accesses */
- int collisions; /* number of collisions */
- int flags; /* flags: see HASH_[A-Z]* */
- Hash_last_t last; /* last lookup cache */
- __V_* context; /* user defined context */
-#ifdef _HASH_ROOT_PRIVATE_
- _HASH_ROOT_PRIVATE_
-#endif
-};
-
-struct Hash_table /* hash table information */
-{
- Hash_root_t* root; /* root hash table information */
- int size; /* table size */
- int buckets; /* active bucket count */
- char* name; /* table name */
- Hash_table_t* scope; /* scope covered table */
- short flags; /* flags: see HASH_[A-Z]* */
-#ifdef _HASH_TABLE_PRIVATE_
- _HASH_TABLE_PRIVATE_
-#endif
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Hash_table_t* hashalloc __PROTO__((Hash_table_t*, ...));
-extern __MANGLE__ void hashdone __PROTO__((Hash_position_t*));
-extern __MANGLE__ void hashdump __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ Hash_table_t* hashfree __PROTO__((Hash_table_t*));
-extern __MANGLE__ Hash_bucket_t* hashlast __PROTO__((Hash_table_t*));
-extern __MANGLE__ char* hashlook __PROTO__((Hash_table_t*, const char*, long, const char*));
-extern __MANGLE__ Hash_bucket_t* hashnext __PROTO__((Hash_position_t*));
-extern __MANGLE__ Hash_position_t* hashscan __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ void hashsize __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ Hash_table_t* hashview __PROTO__((Hash_table_t*, Hash_table_t*));
-extern __MANGLE__ int hashwalk __PROTO__((Hash_table_t*, int, int (*)(const char*, char*, __V_*), __V_*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/hashkey.h b/usr/src/lib/libast/i386/include/ast/hashkey.h
deleted file mode 100644
index 84be9113a1..0000000000
--- a/usr/src/lib/libast/i386/include/ast/hashkey.h
+++ /dev/null
@@ -1,73 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * 1-6 char lower-case keyword -> long hash
- * digit args passed as HASHKEYN('2')
- */
-
-#ifndef _HASHKEY_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASHKEY_H
-
-#define HASHKEYMAX 6
-#define HASHKEYBIT 5
-#define HASHKEYOFF ('a'-1)
-#define HASHKEYPART(h,c) (((h)<<HASHKEYBIT)+HASHKEY1(c))
-
-#define HASHKEYN(n) ((n)-'0'+'z'+1)
-
-#define HASHKEY1(c1) ((c1)-HASHKEYOFF)
-#define HASHKEY2(c1,c2) HASHKEYPART(HASHKEY1(c1),c2)
-#define HASHKEY3(c1,c2,c3) HASHKEYPART(HASHKEY2(c1,c2),c3)
-#define HASHKEY4(c1,c2,c3,c4) HASHKEYPART(HASHKEY3(c1,c2,c3),c4)
-#define HASHKEY5(c1,c2,c3,c4,c5) HASHKEYPART(HASHKEY4(c1,c2,c3,c4),c5)
-#define HASHKEY6(c1,c2,c3,c4,c5,c6) HASHKEYPART(HASHKEY5(c1,c2,c3,c4,c5),c6)
-
-#define HASHNKEY1(n,c1) HASHKEY2((n)+HASHKEYOFF,c1)
-#define HASHNKEY2(n,c2,c1) HASHKEY3((n)+HASHKEYOFF,c2,c1)
-#define HASHNKEY3(n,c3,c2,c1) HASHKEY4((n)+HASHKEYOFF,c3,c2,c1)
-#define HASHNKEY4(n,c4,c3,c2,c1) HASHKEY5((n)+'a',c4,c3,c2,c1)
-#define HASHNKEY5(n,c5,c4,c3,c2,c1) HASHKEY6((n)+'a',c5,c4,c3,c2,c1)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ long strkey __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/hashpart.h b/usr/src/lib/libast/i386/include/ast/hashpart.h
deleted file mode 100644
index 5d33aac61d..0000000000
--- a/usr/src/lib/libast/i386/include/ast/hashpart.h
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * K. P. Vo
- * G. S. Fowler
- * AT&T Research
- *
- * ``the best'' combined linear congruent checksum/hash/PRNG
- */
-
-#ifndef _HASHPART_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASHPART_H
-
-#define HASH_ADD(h) (0x9c39c33dL)
-
-#if __sparc__ || __sparc || sparc
-
-#define HASH_A(h,n) ((((h) << 2) - (h)) << (n))
-#define HASH_B(h,n) ((((h) << 4) - (h)) << (n))
-#define HASH_C(h,n) ((HASH_A(h,7) + HASH_B(h,0)) << (n))
-#define HASH_MPY(h) (HASH_C(h,22)+HASH_C(h,10)+HASH_A(h,6)+HASH_A(h,3)+(h))
-
-#else
-
-#define HASH_MPY(h) ((h)*0x63c63cd9L)
-
-#endif
-
-#define HASHPART(h,c) (h = HASH_MPY(h) + HASH_ADD(h) + (c))
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/iconv.h b/usr/src/lib/libast/i386/include/ast/iconv.h
deleted file mode 100644
index e65540c075..0000000000
--- a/usr/src/lib/libast/i386/include/ast/iconv.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_iconv.h>
diff --git a/usr/src/lib/libast/i386/include/ast/ip6.h b/usr/src/lib/libast/i386/include/ast/ip6.h
deleted file mode 100644
index 2712064a7e..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ip6.h
+++ /dev/null
@@ -1,28 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#if !_IP6_H
-#define _IP6_H 1
-
-#define IP6ADDR 16
-#define IP6BITS IP6ADDR
-#define IP6PREFIX (IP6ADDR+1)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* fmtip6 __PROTO__((unsigned char*, int));
-extern __MANGLE__ int strtoip6 __PROTO__((const char*, char**, unsigned char*, unsigned char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/lc.h b/usr/src/lib/libast/i386/include/ast/lc.h
deleted file mode 100644
index 65fdab45ab..0000000000
--- a/usr/src/lib/libast/i386/include/ast/lc.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated by ./lcgen : : */
-
-
-#ifndef _LC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LC_H 1
-
-#include <ast.h>
-
-#define LC_abbreviated 0x00001
-#define LC_checked 0x00002
-#define LC_debug 0x00004
-#define LC_default 0x00008
-#define LC_defined 0x00010
-#define LC_local 0x00020
-#define LC_primary 0x00040
-#define LC_qualified 0x00080
-#define LC_undefined 0x00100
-#define LC_utf8 0x00200
-#define LC_verbose 0x00400
-#define LC_setlocale 0x10000
-#define LC_setenv 0x20000
-#define LC_user 0x40000
-#define LC_language_attribute_max 2
-#define LC_territory_language_max 4
-
-struct Lc_s;
-
-typedef struct Lc_info_s
-{
- const struct Lc_s* lc;
- unsigned long number;
- __V_* data;
-} Lc_info_t;
-
-typedef struct Lc_attribute_s
-{
- const char* name;
- unsigned long flags;
- unsigned long index;
-} Lc_attribute_t;
-
-typedef struct Lc_charset_s
-{
- const char* code;
- const char* alternates;
- const char* ms;
- unsigned long index;
-} Lc_charset_t;
-
-typedef struct Lc_language_s
-{
- const char* code;
- const char* name;
- const char* alternates;
- const Lc_charset_t* charset;
- unsigned long flags;
- unsigned long index;
- const Lc_attribute_t* attributes[LC_language_attribute_max];
-} Lc_language_t;
-
-typedef struct Lc_territory_s
-{
- const char* code;
- const char* name;
- unsigned long flags;
- unsigned long index;
- const Lc_language_t* languages[LC_territory_language_max];
-#ifdef _LC_TERRITORY_PRIVATE_
- _LC_TERRITORY_PRIVATE_
-#endif
-} Lc_territory_t;
-
-typedef struct Lc_map_s
-{
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_t* attribute;
-} Lc_map_t;
-
-typedef struct Lc_attribute_list_s
-{
- struct Lc_attribute_list_s* next;
- const Lc_attribute_t* attribute;
-} Lc_attribute_list_t;
-
-typedef struct Lc_s
-{
- const char* name;
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_list_t* attributes;
- unsigned long flags;
- unsigned long index;
-#ifdef _LC_PRIVATE_
- _LC_PRIVATE_
-#endif
-} Lc_t;
-
-struct Lc_category_s;
-
-typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
-
-typedef struct Lc_category_s
-{
- const char* name;
- int external;
- int internal;
- Lc_category_set_f setf;
- Lc_t* prev;
- unsigned int flags;
-} Lc_category_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
-extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
-extern __MANGLE__ int lcindex __PROTO__((int, int));
-extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
-extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
-extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/ls.h b/usr/src/lib/libast/i386/include/ast/ls.h
deleted file mode 100644
index a8a5fcb0e0..0000000000
--- a/usr/src/lib/libast/i386/include/ast/ls.h
+++ /dev/null
@@ -1,99 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * ls formatter interface definitions
- */
-
-#ifndef _LS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LS_H
-
-#include <ast_std.h>
-#include <ast_fs.h>
-#include <ast_mode.h>
-
-/*
- * some systems (could it beee AIX) pollute the std name space
- */
-
-#undef fileid
-#define fileid fileID
-
-#define LS_BLOCKSIZE 512
-
-#define iblocks(p) _iblocks(p)
-
-#if _mem_st_rdev_stat
-#define idevice(p) ((p)->st_rdev)
-#define IDEVICE(p,v) ((p)->st_rdev=(v))
-#else
-#define idevice(p) 0
-#define IDEVICE(p,v)
-#endif
-
-#define LS_ATIME (1<<0) /* list st_atime */
-#define LS_BLOCKS (1<<1) /* list blocks used by file */
-#define LS_CTIME (1<<2) /* list st_ctime */
-#define LS_EXTERNAL (1<<3) /* st_mode is modex canonical */
-#define LS_INUMBER (1<<4) /* list st_ino */
-#define LS_LONG (1<<5) /* long listing */
-#define LS_MARK (1<<6) /* append file name marks */
-#define LS_NOGROUP (1<<7) /* omit group name for LS_LONG */
-#define LS_NOUSER (1<<8) /* omit user name for LS_LONG */
-#define LS_NUMBER (1<<9) /* number instead of name */
-
-#define LS_USER (1<<10) /* first user flag bit */
-
-#define LS_W_BLOCKS 6 /* LS_BLOCKS field width */
-#define LS_W_INUMBER 9 /* LS_INUMBER field width */
-#define LS_W_LONG 57 /* LS_LONG width (w/o names) */
-#define LS_W_LINK 4 /* link text width (w/o names) */
-#define LS_W_MARK 1 /* LS_MARK field width */
-#define LS_W_NAME 9 /* group|user name field width */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ off_t _iblocks __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtdev __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtfs __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtls __PROTO__((char*, const char*, struct stat*, const char*, const char*, int));
-extern __MANGLE__ int pathstat __PROTO__((const char*, struct stat*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/magic.h b/usr/src/lib/libast/i386/include/ast/magic.h
deleted file mode 100644
index 8683016e80..0000000000
--- a/usr/src/lib/libast/i386/include/ast/magic.h
+++ /dev/null
@@ -1,96 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * magic interface definitions
- */
-
-#ifndef _MAGIC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MAGIC_H
-
-#include <sfio.h>
-#include <ls.h>
-
-#define MAGIC_VERSION 19961031L
-
-#ifndef MAGIC_FILE
-#define MAGIC_FILE "lib/file/magic"
-#endif
-
-#ifndef MAGIC_DIR
-#define MAGIC_DIR "lib/file"
-#endif
-
-#define MAGIC_FILE_ENV "MAGICFILE"
-
-#define MAGIC_MIME (1<<0) /* magictype returns MIME type */
-#define MAGIC_VERBOSE (1<<1) /* verbose magic file errors */
-
-#define MAGIC_USER (1L<<16) /* first user flag bit */
-
-struct Magic_s;
-struct Magicdisc_s;
-
-typedef struct Magicdisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* MAGIC_* flags */
- Error_f errorf; /* error function */
-} Magicdisc_t;
-
-typedef struct Magic_s
-{
- const char* id; /* library id string */
-
-#ifdef _MAGIC_PRIVATE_
- _MAGIC_PRIVATE_
-#endif
-
-} Magic_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Magic_t* magicopen __PROTO__((Magicdisc_t*));
-extern __MANGLE__ int magicload __PROTO__((Magic_t*, const char*, unsigned long));
-extern __MANGLE__ int magiclist __PROTO__((Magic_t*, Sfio_t*));
-extern __MANGLE__ char* magictype __PROTO__((Magic_t*, Sfio_t*, const char*, struct stat*));
-extern __MANGLE__ int magicclose __PROTO__((Magic_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/magicid.h b/usr/src/lib/libast/i386/include/ast/magicid.h
deleted file mode 100644
index 1dca0c1e42..0000000000
--- a/usr/src/lib/libast/i386/include/ast/magicid.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * generic binary magic id definitions
- */
-
-#ifndef _MAGICID_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MAGICID_H 1
-
-#include <ast_common.h>
-
-#define MAGICID 0x00010203
-
-typedef uint32_t Magicid_data_t;
-
-typedef struct Magicid_s
-{
- Magicid_data_t magic; /* magic number */
- char name[8]; /* generic data/application name*/
- char type[12]; /* specific data type */
- Magicid_data_t version; /* YYYYMMDD or 0xWWXXYYZZ */
- Magicid_data_t size;
-} Magicid_t;
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/mc.h b/usr/src/lib/libast/i386/include/ast/mc.h
deleted file mode 100644
index b84df7239e..0000000000
--- a/usr/src/lib/libast/i386/include/ast/mc.h
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * machine independent binary message catalog interface
- *
- * file layout
- * all numbers are sfputu() format
- *
- * 4 char magic (^M^S^G0)
- * <method locale YYYY-MM-DD>\0
- * (<optional strings>\0)*
- * \0
- * string table size
- * #msgs total
- * #max set number
- * #set-id 1
- * #msgs in set 1
- * ...
- * #set-id #sets
- * #msgs in set #sets
- * end of sets (0)
- * msg(1,1) size
- * ...
- * msg(#sets,#msgs) size
- * string table
- */
-
-#ifndef _MC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MC_H
-
-#include <ast.h>
-
-#define MC_MAGIC "\015\023\007\000"
-#define MC_MAGIC_SIZE 4
-
-#define MC_SET_MAX 1023
-#define MC_NUM_MAX 32767
-
-#define MC_NLS (1<<10)
-
-#define MC_MESSAGE_SET(s) mcindex(s,NiL,NiL,NiL)
-
-typedef struct
-{
- char** msg;
- int num;
- int gen;
-} Mcset_t;
-
-typedef struct
-{
- Mcset_t* set;
- int num;
- int gen;
- char* translation;
-#ifdef _MC_PRIVATE_
- _MC_PRIVATE_
-#endif
-} Mc_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* mcfind __PROTO__((char*, const char*, const char*, int, int));
-extern __MANGLE__ Mc_t* mcopen __PROTO__((Sfio_t*));
-extern __MANGLE__ char* mcget __PROTO__((Mc_t*, int, int, const char*));
-extern __MANGLE__ int mcput __PROTO__((Mc_t*, int, int, const char*));
-extern __MANGLE__ int mcdump __PROTO__((Mc_t*, Sfio_t*));
-extern __MANGLE__ int mcindex __PROTO__((const char*, char**, int*, int*));
-extern __MANGLE__ int mcclose __PROTO__((Mc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/mime.h b/usr/src/lib/libast/i386/include/ast/mime.h
deleted file mode 100644
index 5943b58eaa..0000000000
--- a/usr/src/lib/libast/i386/include/ast/mime.h
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * mime/mailcap interface
- */
-
-#ifndef _MIMETYPE_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MIMETYPE_H 1
-
-#include <sfio.h>
-#include <ls.h>
-
-#define MIME_VERSION 19970717L
-
-#ifndef MIME_FILES
-#define MIME_FILES "~/.mailcap:/usr/local/etc/mailcap:/usr/etc/mailcap:/etc/mailcap:/etc/mail/mailcap:/usr/public/lib/mailcap"
-#endif
-
-#define MIME_FILES_ENV "MAILCAP"
-
-#define MIME_LIST (1<<0) /* mimeload arg is : list */
-#define MIME_NOMAGIC (1<<1) /* no magic for mimetype() */
-#define MIME_PIPE (1<<2) /* mimeview() io is piped */
-#define MIME_REPLACE (1<<3) /* replace existing definition */
-
-#define MIME_USER (1L<<16) /* first user flag bit */
-
-struct Mime_s;
-typedef struct Mime_s Mime_t;
-
-struct Mimedisc_s;
-typedef struct Mimedisc_s Mimedisc_t;
-
-typedef int (*Mimevalue_f) __PROTO__((Mime_t*, __V_*, char*, size_t, Mimedisc_t*));
-
-struct Mimedisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* MIME_* flags */
- Error_f errorf; /* error function */
- Mimevalue_f valuef; /* value extraction function */
-};
-
-struct Mime_s
-{
- const char* id; /* library id string */
-
-#ifdef _MIME_PRIVATE_
- _MIME_PRIVATE_
-#endif
-
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Mime_t* mimeopen __PROTO__((Mimedisc_t*));
-extern __MANGLE__ int mimeload __PROTO__((Mime_t*, const char*, unsigned long));
-extern __MANGLE__ int mimelist __PROTO__((Mime_t*, Sfio_t*, const char*));
-extern __MANGLE__ int mimeclose __PROTO__((Mime_t*));
-extern __MANGLE__ int mimeset __PROTO__((Mime_t*, char*, unsigned long));
-extern __MANGLE__ char* mimetype __PROTO__((Mime_t*, Sfio_t*, const char*, struct stat*));
-extern __MANGLE__ char* mimeview __PROTO__((Mime_t*, const char*, const char*, const char*, const char*));
-extern __MANGLE__ int mimehead __PROTO__((Mime_t*, __V_*, size_t, size_t, char*));
-extern __MANGLE__ int mimecmp __PROTO__((const char*, const char*, char**));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/mnt.h b/usr/src/lib/libast/i386/include/ast/mnt.h
deleted file mode 100644
index 8bf8c12814..0000000000
--- a/usr/src/lib/libast/i386/include/ast/mnt.h
+++ /dev/null
@@ -1,69 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * mounted filesystem scan interface
- */
-
-#ifndef _MNT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MNT_H 1
-
-#undef MNT_REMOTE /* aix clash */
-#define MNT_REMOTE (1<<0) /* remote mount */
-
-typedef struct
-{
- char* fs; /* filesystem name */
- char* dir; /* mounted dir */
- char* type; /* filesystem type */
- char* options; /* options */
- int freq; /* backup frequency */
- int npass; /* number of parallel passes */
- int flags; /* MNT_* flags */
-} Mnt_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ __V_* mntopen __PROTO__((const char*, const char*));
-extern __MANGLE__ Mnt_t* mntread __PROTO__((__V_*));
-extern __MANGLE__ int mntwrite __PROTO__((__V_*, const Mnt_t*));
-extern __MANGLE__ int mntclose __PROTO__((__V_*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/modecanon.h b/usr/src/lib/libast/i386/include/ast/modecanon.h
deleted file mode 100644
index 3fa425af8f..0000000000
--- a/usr/src/lib/libast/i386/include/ast/modecanon.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * canonical mode_t representation
- */
-
-#ifndef _MODECANON_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MODECANON_H
-
-#define X_ITYPE(m) ((m)&X_IFMT)
-
-#define X_IFMT 0170000
-#define X_IFWHT 0160000
-#define X_IFDOOR 0150000
-#define X_IFSOCK 0140000
-#define X_IFLNK 0120000
-#define X_IFCTG 0110000
-#define X_IFREG 0100000
-#define X_IFBLK 0060000
-#define X_IFDIR 0040000
-#define X_IFCHR 0020000
-#define X_IFIFO 0010000
-
-#define X_IPERM 0007777
-#define X_ISUID 0004000
-#define X_ISGID 0002000
-#define X_ISVTX 0001000
-#define X_IRUSR 0000400
-#define X_IWUSR 0000200
-#define X_IXUSR 0000100
-#define X_IRGRP 0000040
-#define X_IWGRP 0000020
-#define X_IXGRP 0000010
-#define X_IROTH 0000004
-#define X_IWOTH 0000002
-#define X_IXOTH 0000001
-
-#define X_IRWXU (X_IRUSR|X_IWUSR|X_IXUSR)
-#define X_IRWXG (X_IRGRP|X_IWGRP|X_IXGRP)
-#define X_IRWXO (X_IROTH|X_IWOTH|X_IXOTH)
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/namval.h b/usr/src/lib/libast/i386/include/ast/namval.h
deleted file mode 100644
index fefe46a0c7..0000000000
--- a/usr/src/lib/libast/i386/include/ast/namval.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/nl_types.h b/usr/src/lib/libast/i386/include/ast/nl_types.h
deleted file mode 100644
index 581cc13a81..0000000000
--- a/usr/src/lib/libast/i386/include/ast/nl_types.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_nl_types.h>
diff --git a/usr/src/lib/libast/i386/include/ast/preroot.h b/usr/src/lib/libast/i386/include/ast/preroot.h
deleted file mode 100644
index c46fdcbbc8..0000000000
--- a/usr/src/lib/libast/i386/include/ast/preroot.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/proc.h b/usr/src/lib/libast/i386/include/ast/proc.h
deleted file mode 100644
index 4161e1a385..0000000000
--- a/usr/src/lib/libast/i386/include/ast/proc.h
+++ /dev/null
@@ -1,115 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * process library interface
- */
-
-#ifndef _PROC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _PROC_H
-
-#include <ast.h>
-
-#define PROC_ARGMOD (1<<0) /* argv[-1],argv[0] can be modified */
-#define PROC_BACKGROUND (1<<1) /* shell background (&) setup */
-#define PROC_CHECK (1<<17) /* check that command exists */
-#define PROC_CLEANUP (1<<2) /* close parent redirect fds on error */
-#define PROC_DAEMON (1<<3) /* daemon setup */
-#define PROC_ENVCLEAR (1<<4) /* clear environment */
-#define PROC_FOREGROUND (1<<14) /* system(3) setup */
-#define PROC_GID (1<<5) /* setgid(getgid()) */
-#define PROC_IGNORE (1<<6) /* ignore parent pipe errors */
-#define PROC_IGNOREPATH (1<<16) /* procrun() intercept to ignore path */
-#define PROC_OVERLAY (1<<7) /* overlay current process if possible */
-#define PROC_PARANOID (1<<8) /* restrict everything */
-#define PROC_PRIVELEGED (1<<9) /* setuid(0), setgid(getegid()) */
-#define PROC_READ (1<<10) /* proc pipe fd 1 returned */
-#define PROC_SESSION (1<<11) /* session leader */
-#define PROC_UID (1<<12) /* setuid(getuid()) */
-#define PROC_WRITE (1<<13) /* proc pipe fd 0 returned */
-#define PROC_ZOMBIE (1<<15) /* proc may leave a zombie behind */
-
-#define PROC_ARG_BIT 14 /* bits per op arg */
-#define PROC_OP_BIT 4 /* bits per op */
-
-#define PROC_ARG_NULL ((1<<PROC_ARG_BIT)-1)
-
-#define PROC_fd_dup 0x4
-#define PROC_FD_CHILD 0x1
-#define PROC_FD_PARENT 0x2
-
-#define PROC_sig_dfl 0x8
-#define PROC_sig_ign 0x9
-
-#define PROC_sys_pgrp 0xa
-#define PROC_sys_umask 0xb
-
-#define PROC_op1(o,a) (((o)<<(2*PROC_ARG_BIT))|((a)&((PROC_ARG_NULL<<PROC_ARG_BIT)|PROC_ARG_NULL)))
-#define PROC_op2(o,a,b) (((o)<<(2*PROC_ARG_BIT))|(((b)&PROC_ARG_NULL)<<PROC_ARG_BIT)|((a)&PROC_ARG_NULL))
-
-#define PROC_FD_CLOSE(p,f) PROC_op2(PROC_fd_dup|(f),p,PROC_ARG_NULL)
-#define PROC_FD_DUP(p,c,f) PROC_op2(PROC_fd_dup|(f),p,c)
-#define PROC_SIG_DFL(s) PROC_op1(PROC_sig_dfl,s,0)
-#define PROC_SIG_IGN(s) PROC_op1(PROC_sig_ign,s,0)
-#define PROC_SYS_PGRP(g) PROC_op1(PROC_sys_pgrp,g)
-#define PROC_SYS_UMASK(m) PROC_op1(PROC_sys_umask,m,0)
-
-#define PROC_OP(x) (((x)>>(2*PROC_ARG_BIT))&((1<<PROC_OP_BIT)-1))
-#define PROC_ARG(x,n) ((n)?(((x)>>(((n)-1)*PROC_ARG_BIT))&PROC_ARG_NULL):(((x)&~((1<<(2*PROC_ARG_BIT))-1))==~((1<<(2*PROC_ARG_BIT))-1))?(-1):((x)&~((1<<(2*PROC_ARG_BIT))-1)))
-
-typedef struct
-{
- pid_t pid; /* process id */
- pid_t pgrp; /* process group id */
- int rfd; /* read fd if applicable */
- int wfd; /* write fd if applicable */
-
-#ifdef _PROC_PRIVATE_
-_PROC_PRIVATE_
-#endif
-
-} Proc_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int procclose __PROTO__((Proc_t*));
-extern __MANGLE__ int procfree __PROTO__((Proc_t*));
-extern __MANGLE__ Proc_t* procopen __PROTO__((const char*, char**, char**, long*, int));
-extern __MANGLE__ int procrun __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/prototyped.h b/usr/src/lib/libast/i386/include/ast/prototyped.h
deleted file mode 100644
index 113fb94d24..0000000000
--- a/usr/src/lib/libast/i386/include/ast/prototyped.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/re_comp.h b/usr/src/lib/libast/i386/include/ast/re_comp.h
deleted file mode 100644
index ec1d512e40..0000000000
--- a/usr/src/lib/libast/i386/include/ast/re_comp.h
+++ /dev/null
@@ -1,52 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * re_comp interface definitions
- *
- * OBSOLETE: use <regex.h>
- */
-
-#ifndef _RE_COMP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _RE_COMP_H
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* re_comp __PROTO__((const char*));
-extern __MANGLE__ int re_exec __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/recfmt.h b/usr/src/lib/libast/i386/include/ast/recfmt.h
deleted file mode 100644
index fcd56de020..0000000000
--- a/usr/src/lib/libast/i386/include/ast/recfmt.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * record format interface
- */
-
-#ifndef _RECFMT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _RECFMT_H 1
-
-#include <ast.h>
-
-typedef uint32_t Recfmt_t;
-
-#define REC_delimited 0
-#define REC_fixed 1
-#define REC_variable 2
-#define REC_method 14
-#define REC_none 15
-
-#define REC_M_path 0
-#define REC_M_data 1
-
-#define RECTYPE(f) (((f)>>28)&((1<<4)-1))
-
-#define REC_D_TYPE(d) ((REC_delimited<<28)|((d)&((1<<8)-1)))
-#define REC_D_DELIMITER(f) ((f)&((1<<8)-1))
-
-#define REC_F_TYPE(s) ((REC_fixed<<28)|((s)&((1<<28)-1)))
-#define REC_F_SIZE(f) ((f)&((1<<28)-1))
-
-#define REC_U_TYPE(t,a) (((t)<<28)|((a)&((1<<28)-1)))
-#define REC_U_ATTRIBUTES(f) ((f)&~((1<<28)-1))
-
-#define REC_V_TYPE(h,o,z,l,i) ((REC_variable<<28)|((h)<<23)|((o)<<19)|(((z)-1)<<18)|((l)<<17)|((i)<<16))
-#define REC_V_RECORD(f,s) (((f)&(((1<<16)-1)<<16))|(s))
-#define REC_V_HEADER(f) (((f)>>23)&((1<<5)-1))
-#define REC_V_OFFSET(f) (((f)>>19)&((1<<4)-1))
-#define REC_V_LENGTH(f) ((((f)>>18)&1)+1)
-#define REC_V_LITTLE(f) (((f)>>17)&1)
-#define REC_V_INCLUSIVE(f) (((f)>>16)&1)
-#define REC_V_SIZE(f) ((f)&((1<<16)-1))
-#define REC_V_ATTRIBUTES(f) ((f)&~((1<<16)-1))
-
-#define REC_M_TYPE(i) ((REC_method<<28)|(i))
-#define REC_M_INDEX(f) ((f)&((1<<28)-1))
-
-#define REC_N_TYPE() 0xffffffff
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* fmtrec __PROTO__((Recfmt_t, int));
-extern __MANGLE__ Recfmt_t recfmt __PROTO__((const __V_*, size_t, off_t));
-extern __MANGLE__ Recfmt_t recstr __PROTO__((const char*, char**));
-extern __MANGLE__ ssize_t reclen __PROTO__((Recfmt_t, const __V_*, size_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/regex.h b/usr/src/lib/libast/i386/include/ast/regex.h
deleted file mode 100644
index 9b7299c814..0000000000
--- a/usr/src/lib/libast/i386/include/ast/regex.h
+++ /dev/null
@@ -1,230 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#ifdef _AST_STD_I
-#define _REGEX_H -1
-#define regex_t int
-#define regmatch_t int
-#endif
-#ifndef _REGEX_H
-#define _REGEX_H 1
-#undef regex_t
-#undef regmatch_t
-
-#include <ast_common.h>
-
-#define REG_VERSION 20030916L
-
-/* regcomp flags */
-
-#define REG_AUGMENTED 0x00000001 /* enable ! & < > */
-#define REG_EXTENDED 0x00000002 /* enable ( | ) */
-#define REG_ICASE 0x00000004 /* ignore case in match */
-#define REG_NEWLINE 0x00000008 /* ^/$ match embedded \n */
-#define REG_NOSUB 0x00000010 /* don't report subexp matches */
-#define REG_SHELL 0x00000020 /* shell pattern syntax */
-
-/* nonstandard regcomp flags */
-
-#define REG_LEFT 0x00000100 /* implicit ^... */
-#define REG_LITERAL 0x00000200 /* no operators */
-#define REG_MINIMAL 0x00000400 /* minimal match */
-#define REG_NULL 0x00000800 /* allow null patterns */
-#define REG_RIGHT 0x00001000 /* implicit ...$ */
-#define REG_LENIENT 0x00002000 /* look the other way */
-#define REG_ESCAPE 0x00004000 /* \ escapes delimiter in [...] */
-#define REG_FIRST 0x00008000 /* first match found will do */
-#define REG_MULTIPLE 0x00010000 /* multiple \n sep patterns */
-#define REG_DISCIPLINE 0x00020000 /* regex_t.re_disc is valid */
-#define REG_SPAN 0x00040000 /* . matches \n */
-#define REG_COMMENT 0x00080000 /* ignore pattern space & #...\n*/
-#define REG_MULTIREF 0x00100000 /* multiple digit backrefs */
-#define REG_MUSTDELIM 0x08000000 /* all delimiters required */
-#define REG_DELIMITED 0x10000000 /* pattern[0] is delimiter */
-#define REG_CLASS_ESCAPE 0x80000000 /* \ escapes in [...] */
-
-#define REG_SHELL_DOT 0x00200000 /* explicit leading . match */
-#define REG_SHELL_ESCAPED 0x00400000 /* \ not special */
-#define REG_SHELL_GROUP 0x20000000 /* (|&) inside [@|&](...) only */
-#define REG_SHELL_PATH 0x00800000 /* explicit / match */
-
-#define REG_REGEXP 0x40000000 /* <regexp.h> compatibility */
-
-/* regexec flags */
-
-#define REG_NOTBOL 0x00000040 /* ^ is not a special char */
-#define REG_NOTEOL 0x00000080 /* $ is not a special char */
-
-/* nonstandard regexec flags */
-
-#define REG_INVERT 0x01000000 /* invert regrexec match sense */
-#define REG_STARTEND 0x02000000 /* subject==match[0].rm_{so,eo} */
-#define REG_ADVANCE 0x04000000 /* advance match[0].rm_{so,eo} */
-
-/* regalloc flags */
-
-#define REG_NOFREE 0x00000001 /* don't free */
-
-/* regsub flags */
-
-#define REG_SUB_ALL 0x00000001 /* substitute all occurrences */
-#define REG_SUB_LOWER 0x00000002 /* substitute to lower case */
-#define REG_SUB_UPPER 0x00000004 /* substitute to upper case */
-#define REG_SUB_PRINT 0x00000010 /* internal no-op */
-#define REG_SUB_NUMBER 0x00000020 /* internal no-op */
-#define REG_SUB_STOP 0x00000040 /* internal no-op */
-#define REG_SUB_WRITE 0x00000080 /* internal no-op */
-#define REG_SUB_LAST 0x00000100 /* last substitution option */
-#define REG_SUB_FULL 0x00000200 /* fully delimited */
-#define REG_SUB_USER 0x00001000 /* first user flag bit */
-
-/* regex error codes */
-
-#define REG_ENOSYS (-1) /* not supported */
-#define REG_NOMATCH 1 /* regexec didn't match */
-#define REG_BADPAT 2 /* invalid regular expression */
-#define REG_ECOLLATE 3 /* invalid collation element */
-#define REG_ECTYPE 4 /* invalid character class */
-#define REG_EESCAPE 5 /* trailing \ in pattern */
-#define REG_ESUBREG 6 /* invalid \digit backreference */
-#define REG_EBRACK 7 /* [...] imbalance */
-#define REG_EPAREN 8 /* \(...\) or (...) imbalance */
-#define REG_EBRACE 9 /* \{...\} or {...} imbalance */
-#define REG_BADBR 10 /* invalid {...} digits */
-#define REG_ERANGE 11 /* invalid [...] range endpoint */
-#define REG_ESPACE 12 /* out of space */
-#define REG_BADRPT 13 /* unary op not preceded by re */
-#define REG_ENULL 14 /* empty subexpr in pattern */
-#define REG_ECOUNT 15 /* re component count overflow */
-#define REG_BADESC 16 /* invalid \char escape */
-#define REG_VERSIONID 17 /* version id (pseudo error) */
-#define REG_EFLAGS 18 /* flags conflict */
-#define REG_EDELIM 19 /* invalid or omitted delimiter */
-#define REG_PANIC 20 /* unrecoverable internal error */
-
-struct regex_s; typedef struct regex_s regex_t;
-struct regdisc_s; typedef struct regdisc_s regdisc_t;
-
-typedef int (*regclass_t) __PROTO__((int));
-typedef uint32_t regflags_t;
-typedef int regoff_t;
-typedef int (*regerror_t) __PROTO__((const regex_t*, regdisc_t*, int, ...));
-typedef __V_* (*regcomp_t) __PROTO__((const regex_t*, const char*, size_t, regdisc_t*));
-typedef int (*regexec_t) __PROTO__((const regex_t*, __V_*, const char*, size_t, const char*, size_t, char**, regdisc_t*));
-typedef __V_* (*regresize_t) __PROTO__((__V_*, __V_*, size_t));
-typedef int (*regrecord_t) __PROTO__((__V_*, const char*, size_t));
-
-typedef struct regmatch_s
-{
- regoff_t rm_so; /* offset of start */
- regoff_t rm_eo; /* offset of end */
-} regmatch_t;
-
-typedef struct regsub_s
-{
- regflags_t re_flags; /* regsubcomp() flags */
- char* re_buf; /* regsubexec() output buffer */
- size_t re_len; /* re_buf length */
- int re_min; /* regsubcomp() min matches */
-#ifdef _REG_SUB_PRIVATE_
- _REG_SUB_PRIVATE_
-#endif
-} regsub_t;
-
-struct regdisc_s
-{
- unsigned long re_version; /* discipline version */
- regflags_t re_flags; /* discipline flags */
- regerror_t re_errorf; /* error function */
- int re_errorlevel; /* errorf level */
- regresize_t re_resizef; /* alloc/free function */
- __V_* re_resizehandle;/* resizef handle */
- regcomp_t re_compf; /* (?{...}) compile function */
- regexec_t re_execf; /* (?{...}) execute function */
- unsigned char* re_map; /* external to native ccode map */
-};
-
-typedef struct regstat_s
-{
- regflags_t re_flags; /* REG_LEFT|REG_RIGHT */
- ssize_t re_min; /* min anchored match length */
- ssize_t re_max; /* max anchored match length */
- ssize_t re_record; /* regrexec() match length */
-} regstat_t;
-
-struct regex_s
-{
- size_t re_nsub; /* number of subexpressions */
- struct reglib_s*re_info; /* library private info */
- size_t re_npat; /* number of pattern chars used */
- regdisc_t* re_disc; /* REG_DISCIPLINE discipline */
- regsub_t* re_sub; /* regsubcomp() data */
-};
-
-#define reginit(disc) (memset(disc,0,sizeof(*(disc))),(disc)->re_version=REG_VERSION)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int regcomp __PROTO__((regex_t*, const char*, regflags_t));
-extern __MANGLE__ size_t regerror __PROTO__((int, const regex_t*, char*, size_t));
-extern __MANGLE__ int regexec __PROTO__((const regex_t*, const char*, size_t, regmatch_t*, regflags_t));
-extern __MANGLE__ void regfree __PROTO__((regex_t*));
-
-/* nonstandard hooks */
-
-#define _REG_cache 1 /* have regcache() */
-#define _REG_class 1 /* have regclass() */
-#define _REG_collate 1 /* have regcollate(), regclass() */
-#define _REG_comb 1 /* have regcomb() */
-#define _REG_decomp 1 /* have regdecomp() */
-#define _REG_dup 1 /* have regdup() */
-#define _REG_fatal 1 /* have regfatal(), regfatalpat() */
-#define _REG_ncomp 1 /* have regncomp() */
-#define _REG_nexec 1 /* have regnexec() */
-#define _REG_rexec 1 /* have regrexec(), regrecord() */
-#define _REG_stat 1 /* have regstat() */
-#define _REG_subcomp 1 /* have regsubcomp(), regsubexec() */
-
-extern __MANGLE__ regclass_t regclass __PROTO__((const char*, char**));
-extern __MANGLE__ int regaddclass __PROTO__((const char*, regclass_t));
-extern __MANGLE__ int regcollate __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ int regcomb __PROTO__((regex_t*, regex_t*));
-extern __MANGLE__ size_t regdecomp __PROTO__((regex_t*, regflags_t, char*, size_t));
-extern __MANGLE__ int regdup __PROTO__((regex_t*, regex_t*));
-extern __MANGLE__ int regncomp __PROTO__((regex_t*, const char*, size_t, regflags_t));
-extern __MANGLE__ int regnexec __PROTO__((const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t));
-extern __MANGLE__ void regfatal __PROTO__((regex_t*, int, int));
-extern __MANGLE__ void regfatalpat __PROTO__((regex_t*, int, int, const char*));
-extern __MANGLE__ int regrecord __PROTO__((const regex_t*));
-extern __MANGLE__ int regrexec __PROTO__((const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t, int, __V_*, regrecord_t));
-extern __MANGLE__ regstat_t* regstat __PROTO__((const regex_t*));
-
-extern __MANGLE__ regex_t* regcache __PROTO__((const char*, regflags_t, int*));
-
-extern __MANGLE__ int regsubcomp __PROTO__((regex_t*, const char*, const regflags_t*, int, regflags_t));
-extern __MANGLE__ int regsubexec __PROTO__((const regex_t*, const char*, size_t, regmatch_t*));
-extern __MANGLE__ int regsubflags __PROTO__((regex_t*, const char*, char**, int, const regflags_t*, int*, regflags_t*));
-extern __MANGLE__ void regsubfree __PROTO__((regex_t*));
-
-/* obsolete hooks */
-
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-
-extern __MANGLE__ void regalloc __PROTO__((__V_*, regresize_t, regflags_t));
-extern __MANGLE__ int regsub __PROTO__((const regex_t*, struct _sfio_s*, const char*, const char*, size_t, regmatch_t*, regflags_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/regexp.h b/usr/src/lib/libast/i386/include/ast/regexp.h
deleted file mode 100644
index ea2df629b5..0000000000
--- a/usr/src/lib/libast/i386/include/ast/regexp.h
+++ /dev/null
@@ -1,139 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * regexp interface and partial implementation
- * what a novel approach
- * don't do it again
- *
- * OBSOLETE: use <regex.h>
- */
-
-#ifndef _REGEXP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _REGEXP_H
-
-#define NBRA 9
-
-typedef struct
-{
- char* re_braslist[NBRA];
- char* re_braelist[NBRA];
- char* re_loc1;
- char* re_loc2;
- char* re_locs;
- int re_circf;
- int re_nbra;
- int re_nodelim;
- int re_sed;
-} regexp_t;
-
-#define braslist _re_info.re_braslist
-#define braelist _re_info.re_braelist
-#define circf _re_info.re_circf
-#define loc1 _re_info.re_loc1
-#define loc2 _re_info.re_loc2
-#define locs _re_info.re_locs
-#define nbra _re_info.re_nbra
-#define nodelim _re_info.re_nodelim
-#define sed _re_info.re_sed
-
-#define advance(a,b) _re_exec(&_re_info,a,b,1)
-#define compile(a,b,c,d) _re_read(&_re_info,a,b,c,d)
-#define step(a,b) _re_exec(&_re_info,a,b,0)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _re_comp __PROTO__((regexp_t*, const char*, char*, unsigned int));
-extern __MANGLE__ int _re_exec __PROTO__((regexp_t*, const char*, const char*, int));
-extern __MANGLE__ char* _re_putc __PROTO__((int));
-extern __MANGLE__ char* _re_read __PROTO__((regexp_t*, const char*, char*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#ifndef _REGEXP_DECLARE
-
-regexp_t _re_info;
-
-char*
-_re_read __PARAM__((register regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof), (re, instring, ep, endbuf, seof)) __OTORP__(register regexp_t* re; const char* instring; char* ep; const char* endbuf; int seof;){
- register int c;
-
- static const char* prev;
-
-#ifdef INIT
- INIT;
-#endif
-
- re->re_nodelim = 0;
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- {
- if (c != seof)
- {
- UNGETC(c);
- re->re_nodelim = 1;
- }
- if (!re->re_sed && !prev)
- { ERROR(41); }
- RETURN((char*)endbuf);
- }
- UNGETC(c);
- prev = 0;
- for (;;)
- {
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- {
- if (re->re_sed)
- { ERROR(36); }
- UNGETC(c);
- re->re_nodelim = 1;
- break;
- }
- if (c == '\\')
- {
- _re_putc(c);
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- { ERROR(36); }
- }
- _re_putc(c);
- }
- if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
- { ERROR(c); }
- prev = endbuf;
- RETURN((char*)prev);
-}
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/sfdisc.h b/usr/src/lib/libast/i386/include/ast/sfdisc.h
deleted file mode 100644
index bc6e00b335..0000000000
--- a/usr/src/lib/libast/i386/include/ast/sfdisc.h
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * sfio discipline interface definitions
- */
-
-#ifndef _SFDISC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFDISC_H
-
-#include <ast.h>
-
-#define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#define SFSK_DISCARD SFDCEVENT('S','K',1)
-
-/*
- * %(...) printf support
- */
-
-typedef int (*Sf_key_lookup_t) __PROTO__((__V_*, Sffmt_t*, const char*, char**, Sflong_t*));
-typedef char* (*Sf_key_convert_t) __PROTO__((__V_*, Sffmt_t*, const char*, char*, Sflong_t));
-
-extern __MANGLE__ int sfkeyprintf __PROTO__((Sfio_t*, __V_*, const char*, Sf_key_lookup_t, Sf_key_convert_t));
-#define sfkeyprintf sfkeyprintf_20000308 /* Sffmt_t* callback args */
-extern __MANGLE__ int sfkeyprintf __PROTO__((Sfio_t*, __V_*, const char*, Sf_key_lookup_t, Sf_key_convert_t));
-
-/*
- * pure sfio read and/or write disciplines
- */
-
-extern __MANGLE__ int sfdcdio __PROTO__((Sfio_t*, size_t));
-extern __MANGLE__ int sfdcdos __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdcfilter __PROTO__((Sfio_t*, const char*));
-extern __MANGLE__ int sfdcmore __PROTO__((Sfio_t*, const char*, int, int));
-extern __MANGLE__ int sfdcprefix __PROTO__((Sfio_t*, const char*));
-extern __MANGLE__ int sfdcseekable __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdcslow __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdctee __PROTO__((Sfio_t*, Sfio_t*));
-extern __MANGLE__ int sfdcunion __PROTO__((Sfio_t*, Sfio_t**, int));
-
-extern __MANGLE__ Sfio_t* sfdcsubstream __PROTO__((Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/shcmd.h b/usr/src/lib/libast/i386/include/ast/shcmd.h
deleted file mode 100644
index 2b7a3ce486..0000000000
--- a/usr/src/lib/libast/i386/include/ast/shcmd.h
+++ /dev/null
@@ -1,104 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * ksh builtin command api
- */
-
-#ifndef _SHCMD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SHCMD_H 1
-
-#ifndef SH_VERSION
-# define Shell_t void
-#endif
-#ifndef NV_DEFAULT
-# define Namval_t void
-#endif
-#ifndef ERROR_NOTIFY
-# define ERROR_NOTIFY 1
-#endif
-
-typedef int (*Shbltin_f) __PROTO__((int, char**, __V_*));
-
-#undef Shbltin_t
-typedef struct Shbltin_s
-{
- Shell_t *shp;
- __V_ *ptr;
- int version;
- int (*shrun) __PROTO__((int, char**));
- int (*shtrap) __PROTO__((const char*, int));
- void (*shexit) __PROTO__((int));
- Namval_t *(*shbltin) __PROTO__((const char*, Shbltin_f, __V_*));
- unsigned char notify;
- unsigned char sigset;
- unsigned char nosfio;
- Namval_t *bnode;
- Namval_t *vnode;
- char *data;
- int flags;
- char *(*shgetenv) __PROTO__((const char*));
- char *(*shsetenv) __PROTO__((const char*));
- int invariant;
-} Shbltin_t;
-
-#if defined(SH_VERSION) || defined(_SH_PRIVATE)
-# undef Shell_t
-# undef Namval_t
-#else
-# define sh_context(c) ((Shbltin_t*)(c))
-# define sh_run(c, ac, av) ((c)?(*sh_context(c)->shrun)(ac,av):-1)
-# define sh_system(c,str) ((c)?(*sh_context(c)->shtrap)(str,0):system(str))
-# define sh_exit(c,n) ((c)?(*sh_context(c)->shexit)(n):exit(n))
-# define sh_checksig(c) ((c) && sh_context(c)->sigset)
-# if defined(SFIO_VERSION) || defined(_AST_H)
-# define LIB_INIT(c)
-# else
-# define LIB_INIT(c) ((c) && (sh_context(c)->nosfio = 1))
-# endif
-# ifndef _CMD_H
-# define cmdinit(ac,av,c,cat,flg) do { if((ac)<=0) return(0); \
- (sh_context(c)->notify = ((flg)&ERROR_NOTIFY)?1:0);} while(0)
-# endif
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int astintercept __PROTO__((Shbltin_t*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/sig.h b/usr/src/lib/libast/i386/include/ast/sig.h
deleted file mode 100644
index 6bb667b2bf..0000000000
--- a/usr/src/lib/libast/i386/include/ast/sig.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
-#ifndef _def_sig_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_sig_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define sig_info _sig_info_
-
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide kill killpg
-#else
-#define kill ______kill
-#define killpg ______killpg
-#endif
-#include <signal.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide kill killpg
-#else
-#undef kill
-#undef killpg
-#endif
-#ifndef sigmask
-#define sigmask(s) (1<<((s)-1))
-#endif
-typedef void (*Sig_handler_t) __PROTO__((int));
-
-
-#define Handler_t Sig_handler_t
-
-#define SIG_REG_PENDING (-1)
-#define SIG_REG_POP 0
-#define SIG_REG_EXEC 00001
-#define SIG_REG_PROC 00002
-#define SIG_REG_TERM 00004
-#define SIG_REG_ALL 00777
-#define SIG_REG_SET 01000
-
-typedef struct
-{
- char** name;
- char** text;
- int sigmax;
-} Sig_info_t;
-
-extern __MANGLE__ int kill __PROTO__((pid_t, int));
-extern __MANGLE__ int killpg __PROTO__((pid_t, int));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sig_info_t sig_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _lib_sigflag && _npt_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-extern __MANGLE__ int sigcritical __PROTO__((int));
-extern __MANGLE__ int sigunblock __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/stack.h b/usr/src/lib/libast/i386/include/ast/stack.h
deleted file mode 100644
index 8a7f954797..0000000000
--- a/usr/src/lib/libast/i386/include/ast/stack.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * homogenous stack routine definitions
- */
-
-#ifndef _STACK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STACK_H
-
-typedef struct stacktable* STACK; /* stack pointer */
-typedef struct stackposition STACKPOS; /* stack position */
-
-struct stackblock /* stack block cell */
-{
- __V_** stack; /* actual stack */
- struct stackblock* prev; /* previous block in list */
- struct stackblock* next; /* next block in list */
-};
-
-struct stackposition /* stack position */
-{
- struct stackblock* block; /* current block pointer */
- int index; /* index within current block */
-};
-
-struct stacktable /* stack information */
-{
- struct stackblock* blocks; /* stack table blocks */
- __V_* error; /* error return value */
- int size; /* size of each block */
- STACKPOS position; /* current stack position */
-};
-
-/*
- * map old names to new
- */
-
-#define mkstack stackalloc
-#define rmstack stackfree
-#define clrstack stackclear
-#define getstack stackget
-#define pushstack stackpush
-#define popstack stackpop
-#define posstack stacktell
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ STACK stackalloc __PROTO__((int, __V_*));
-extern __MANGLE__ void stackfree __PROTO__((STACK));
-extern __MANGLE__ void stackclear __PROTO__((STACK));
-extern __MANGLE__ __V_* stackget __PROTO__((STACK));
-extern __MANGLE__ int stackpush __PROTO__((STACK, __V_*));
-extern __MANGLE__ int stackpop __PROTO__((STACK));
-extern __MANGLE__ void stacktell __PROTO__((STACK, int, STACKPOS*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/stak.h b/usr/src/lib/libast/i386/include/ast/stak.h
deleted file mode 100644
index 4396bdf02b..0000000000
--- a/usr/src/lib/libast/i386/include/ast/stak.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * David Korn
- * AT&T Research
- *
- * Interface definitions for a stack-like storage library
- *
- */
-
-#ifndef _STAK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STAK_H
-
-#include <stk.h>
-
-#define Stak_t Sfio_t
-#define staksp stkstd
-#define STAK_SMALL STK_SMALL
-
-#define stakptr(n) stkptr(stkstd,n)
-#define staktell() stktell(stkstd)
-#define stakputc(c) sfputc(stkstd,(c))
-#define stakwrite(b,n) sfwrite(stkstd,(b),(n))
-#define stakputs(s) (sfputr(stkstd,(s),0),--stkstd->_next)
-#define stakseek(n) stkseek(stkstd,n)
-#define stakcreate(n) stkopen(n)
-#define stakinstall(s,f) stkinstall(s,f)
-#define stakdelete(s) stkclose(s)
-#define staklink(s) stklink(s)
-#define stakalloc(n) stkalloc(stkstd,n)
-#define stakcopy(s) stkcopy(stkstd,s)
-#define stakset(c,n) stkset(stkstd,c,n)
-#define stakfreeze(n) stkfreeze(stkstd,n)
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/stdio.h b/usr/src/lib/libast/i386/include/ast/stdio.h
deleted file mode 100644
index 0d9876a250..0000000000
--- a/usr/src/lib/libast/i386/include/ast/stdio.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_stdio.h>
diff --git a/usr/src/lib/libast/i386/include/ast/stk.h b/usr/src/lib/libast/i386/include/ast/stk.h
deleted file mode 100644
index 7a226b0e98..0000000000
--- a/usr/src/lib/libast/i386/include/ast/stk.h
+++ /dev/null
@@ -1,92 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * David Korn
- * AT&T Research
- *
- * Interface definitions for a stack-like storage library
- *
- */
-
-#ifndef _STK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STK_H
-
-#include <sfio.h>
-
-#define _Stk_data _Stak_data
-
-#define stkstd (&_Stk_data)
-
-#define Stk_t Sfio_t
-
-#define STK_SMALL 1 /* small stkopen stack */
-#define STK_NULL 2 /* return NULL on overflow */
-
-#define stkptr(sp,n) ((char*)((sp)->_data)+(n))
-#define stktop(sp) ((char*)(sp)->_next)
-#define stktell(sp) ((sp)->_next-(sp)->_data)
-#define stkseek(sp,n) ((n)==0?(char*)((sp)->_next=(sp)->_data):_stkseek(sp,n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sfio_t _Stk_data;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Stk_t* stkopen __PROTO__((int));
-extern __MANGLE__ Stk_t* stkinstall __PROTO__((Stk_t*, char*(*)(int)));
-extern __MANGLE__ int stkclose __PROTO__((Stk_t*));
-extern __MANGLE__ int stklink __PROTO__((Stk_t*));
-extern __MANGLE__ char* stkalloc __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ char* stkcopy __PROTO__((Stk_t*,const char*));
-extern __MANGLE__ char* stkset __PROTO__((Stk_t*, char*, unsigned));
-extern __MANGLE__ char* _stkseek __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ char* stkfreeze __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ int stkon __PROTO__((Stk_t*, char *));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/swap.h b/usr/src/lib/libast/i386/include/ast/swap.h
deleted file mode 100644
index d214ece1e6..0000000000
--- a/usr/src/lib/libast/i386/include/ast/swap.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * integral representation conversion support definitions
- * supports sizeof(integral_type)<=sizeof(intmax_t)
- */
-
-#ifndef _SWAP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SWAP_H
-
-#include <ast_common.h>
-
-#define int_swap _ast_intswap
-
-#define SWAP_MAX 8
-
-#define SWAPOP(n) (((n)&int_swap)^(n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ __V_* swapmem __PROTO__((int, const __V_*, __V_*, size_t));
-extern __MANGLE__ intmax_t swapget __PROTO__((int, const __V_*, int));
-extern __MANGLE__ __V_* swapput __PROTO__((int, __V_*, int, intmax_t));
-extern __MANGLE__ int swapop __PROTO__((const __V_*, const __V_*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/tar.h b/usr/src/lib/libast/i386/include/ast/tar.h
deleted file mode 100644
index 8e8af49bb2..0000000000
--- a/usr/src/lib/libast/i386/include/ast/tar.h
+++ /dev/null
@@ -1,127 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Standard Archive Format
- * USTAR - Uniform Standard Tape ARchive
- */
-
-#ifndef _TAR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TAR_H
-
-#define TBLOCK 512
-#define NAMSIZ 100
-#define PFXSIZ 155
-
-#define TMODLEN 8
-#define TUIDLEN 8
-#define TGIDLEN 8
-#define TSIZLEN 12
-#define TMTMLEN 12
-#define TCKSLEN 8
-
-#define TMAGIC "ustar" /* ustar and a null */
-#define TMAGLEN 6
-#define TVERSION "00" /* 00 and no null */
-#define TVERSLEN 2
-#define TUNMLEN 32
-#define TGNMLEN 32
-#define TDEVLEN 8
-
-/*
- * values used in typeflag field
- */
-
-#define REGTYPE '0' /* regular file */
-#define AREGTYPE 0 /* alternate REGTYPE */
-#define LNKTYPE '1' /* hard link */
-#define SYMTYPE '2' /* soft link */
-#define CHRTYPE '3' /* character special */
-#define BLKTYPE '4' /* block special */
-#define DIRTYPE '5' /* directory */
-#define FIFOTYPE '6' /* FIFO special */
-#define CONTTYPE '7' /* reserved */
-#define SOKTYPE '8' /* socket */
-#define EXTTYPE 'x' /* extended header */
-#define GLBTYPE 'g' /* global extended header */
-#define LLNKTYPE 'K' /* long link path */
-#define LREGTYPE 'L' /* long file path */
-#define VERTYPE 'V' /* version */
-
-/*
- * bits used in mode field
- */
-
-#define TSUID 04000 /* set uid on exec */
-#define TSGID 02000 /* set gid on exec */
-#define TSVTX 01000 /* sticky bit -- reserved */
-
-/*
- * file permissions
- */
-
-#define TUREAD 00400 /* read by owner */
-#define TUWRITE 00200 /* write by owner */
-#define TUEXEC 00100 /* execute by owner */
-#define TGREAD 00040 /* read by group */
-#define TGWRITE 00020 /* execute by group */
-#define TGEXEC 00010 /* write by group */
-#define TOREAD 00004 /* read by other */
-#define TOWRITE 00002 /* write by other */
-#define TOEXEC 00001 /* execute by other */
-
-struct header
-{
- char name[NAMSIZ];
- char mode[TMODLEN];
- char uid[TUIDLEN];
- char gid[TGIDLEN];
- char size[TSIZLEN];
- char mtime[TMTMLEN];
- char chksum[TCKSLEN];
- char typeflag;
- char linkname[NAMSIZ];
- char magic[TMAGLEN];
- char version[TVERSLEN];
- char uname[TUNMLEN];
- char gname[TGNMLEN];
- char devmajor[TDEVLEN];
- char devminor[TDEVLEN];
- char prefix[PFXSIZ];
-};
-
-union hblock
-{
- char dummy[TBLOCK];
- struct header dbuf;
-};
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/times.h b/usr/src/lib/libast/i386/include/ast/times.h
deleted file mode 100644
index 1dbd3ee60a..0000000000
--- a/usr/src/lib/libast/i386/include/ast/times.h
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * -last clock_t,time_t interface definitions plus
- *
- * <ast.h>
- * <time.h>
- * <sys/time.h>
- * <sys/times.h>
- */
-
-#ifndef _TIMES_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TIMES_H
-
-#include <ast.h>
-
-#undef _TIMES_H
-#include <ast_time.h>
-#ifndef _TIMES_H
-#define _TIMES_H
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int touch __PROTO__((const char*, time_t, time_t, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/tm.h b/usr/src/lib/libast/i386/include/ast/tm.h
deleted file mode 100644
index d8eb357c20..0000000000
--- a/usr/src/lib/libast/i386/include/ast/tm.h
+++ /dev/null
@@ -1,206 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * time conversion support definitions
- */
-
-#ifndef _TM_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TM_H
-
-#define TM_VERSION 20070319L
-
-#include <ast.h>
-#include <times.h>
-
-#undef daylight
-
-#define tmset(z) tminit(z)
-#define tmisleapyear(y) (!((y)%4)&&(((y)%100)||!((((y)<1900)?((y)+1900):(y))%400)))
-
-#define TM_ADJUST (1<<0) /* local doesn't do leap secs */
-#define TM_LEAP (1<<1) /* do leap seconds */
-#define TM_UTC (1<<2) /* universal coordinated ref */
-
-#define TM_PEDANTIC (1<<3) /* pedantic date parse */
-#define TM_DATESTYLE (1<<4) /* date(1) style mmddHHMMccyy */
-#define TM_SUBSECOND (1<<5) /* <something>%S => ...%S.%P */
-
-#define TM_DST (-60) /* default minutes for DST */
-#define TM_LOCALZONE (25 * 60) /* use local time zone offset */
-#define TM_UTCZONE (26 * 60) /* UTC "time zone" */
-#define TM_MAXLEAP 1 /* max leap secs per leap */
-#define TM_WINDOW 69 /* century windowing guard year */
-
-/*
- * these indices must agree with tm_dform[]
- */
-
-#define TM_MONTH_ABBREV 0
-#define TM_MONTH 12
-#define TM_DAY_ABBREV 24
-#define TM_DAY 31
-#define TM_TIME 38
-#define TM_DATE 39
-#define TM_DEFAULT 40
-#define TM_MERIDIAN 41
-
-#define TM_UT 43
-#define TM_DT 47
-#define TM_SUFFIXES 51
-#define TM_PARTS 55
-#define TM_HOURS 62
-#define TM_DAYS 66
-#define TM_LAST 69
-#define TM_THIS 72
-#define TM_NEXT 75
-#define TM_EXACT 78
-#define TM_NOISE 81
-#define TM_ORDINAL 85
-#define TM_DIGITS 95
-#define TM_CTIME 105
-#define TM_DATE_1 106
-#define TM_INTERNATIONAL 107
-#define TM_RECENT 108
-#define TM_DISTANT 109
-#define TM_MERIDIAN_TIME 110
-#define TM_ERA 111
-#define TM_ERA_DATE 112
-#define TM_ERA_TIME 113
-#define TM_ERA_DEFAULT 114
-#define TM_ERA_YEAR 115
-#define TM_ORDINALS 116
-#define TM_FINAL 126
-#define TM_WORK 129
-
-#define TM_NFORM 132
-
-typedef struct /* leap second info */
-{
- time_t time; /* the leap second event */
- int total; /* inclusive total since epoch */
-} Tm_leap_t;
-
-typedef struct /* time zone info */
-{
- char* type; /* type name */
- char* standard; /* standard time name */
- char* daylight; /* daylight or summertime name */
- short west; /* minutes west of GMT */
- short dst; /* add to tz.west for DST */
-} Tm_zone_t;
-
-typedef struct /* tm library readonly data */
-{
- char** format; /* default TM_* format strings */
- unsigned char* lex; /* format lex type classes */
- char* digit; /* output digits */
- short* days; /* days in month i */
- short* sum; /* days in months before i */
- Tm_leap_t* leap; /* leap second table */
- Tm_zone_t* zone; /* alternate timezone table */
-} Tm_data_t;
-
-typedef struct /* tm library global info */
-{
- char* deformat; /* TM_DEFAULT override */
- int flags; /* flags */
- char** format; /* current format strings */
- Tm_zone_t* date; /* timezone from last tmdate() */
- Tm_zone_t* local; /* local timezone */
- Tm_zone_t* zone; /* current timezone */
-} Tm_info_t;
-
-typedef struct Tm_s
-{
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- uint32_t tm_nsec;
- Tm_zone_t* tm_zone;
-} Tm_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Tm_data_t* _tm_datap_;
-extern __MANGLE__ Tm_info_t* _tm_infop_;
-
-#define tm_data (*_tm_datap_)
-#define tm_info (*_tm_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ time_t tmdate __PROTO__((const char*, char**, time_t*));
-extern __MANGLE__ int tmequiv __PROTO__((Tm_t*));
-extern __MANGLE__ Tm_t* tmfix __PROTO__((Tm_t*));
-extern __MANGLE__ char* tmfmt __PROTO__((char*, size_t, const char*, time_t*));
-extern __MANGLE__ char* tmform __PROTO__((char*, const char*, time_t*));
-extern __MANGLE__ int tmgoff __PROTO__((const char*, char**, int));
-extern __MANGLE__ void tminit __PROTO__((Tm_zone_t*));
-extern __MANGLE__ time_t tmleap __PROTO__((time_t*));
-extern __MANGLE__ int tmlex __PROTO__((const char*, char**, char**, int, char**, int));
-extern __MANGLE__ char** tmlocale __PROTO__((void));
-extern __MANGLE__ Tm_t* tmmake __PROTO__((time_t*));
-extern __MANGLE__ char* tmpoff __PROTO__((char*, size_t, const char*, int, int));
-extern __MANGLE__ time_t tmscan __PROTO__((const char*, char**, const char*, char**, time_t*, long));
-extern __MANGLE__ int tmsleep __PROTO__((time_t, time_t));
-extern __MANGLE__ time_t tmtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_zone_t* tmtype __PROTO__((const char*, char**));
-extern __MANGLE__ int tmweek __PROTO__((Tm_t*, int, int, int));
-extern __MANGLE__ int tmword __PROTO__((const char*, char**, const char*, char**, int));
-extern __MANGLE__ Tm_zone_t* tmzone __PROTO__((const char*, char**, const char*, int*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/tmx.h b/usr/src/lib/libast/i386/include/ast/tmx.h
deleted file mode 100644
index 1839aaaa58..0000000000
--- a/usr/src/lib/libast/i386/include/ast/tmx.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
-#ifndef _TMX_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TMX_H 1
-/*
- * AT&T Research
- *
- * high resolution Time_t support
- */
-
-#include <tm.h>
-#include <tv.h>
-
-#define TMX_MAXDATE "2554-07-21+23:34:33.709551614 UTC"
-#define TMX_MAXYEAR 2554
-#define TMX_MAXSEC ((Time_t)18446744073)
-#define TMX_MAXNSEC 709551614
-#define TMX_RESOLUTION 1000000000
-
-typedef uint64_t Time_t;
-typedef uint64_t Tmxsec_t;
-typedef uint32_t Tmxnsec_t;
-
-#define tmxsec(t) ((Tmxsec_t)((t)/1000000000))
-#define tmxnsec(t) ((Tmxnsec_t)((t)%1000000000))
-#define tmxsns(s,n) (((((Time_t)(s))*1000000000))+((Time_t)(n)))
-
-#define TMX_NOTIME ((Time_t)(-1))
-#define TMX_NOW tmxgettime()
-#define TMX_MAXTIME tmxsns(TMX_MAXSEC,TMX_MAXNSEC)
-
-#define tmx2tv(t,v) ((v)->tv_nsec=tmxnsec(t),(v)->tv_sec=tmxsec(t))
-#define tv2tmx(v) tmxsns((v)->tv_sec,(v)->tv_nsec)
-
-#define tmxclock(p) tmxsns(((p)?*(p):time(NiL)),0)
-
-#define tmxgetatime(s) tmxsns((s)->st_atime,ST_ATIME_NSEC_GET(s))
-#define tmxgetctime(s) tmxsns((s)->st_ctime,ST_CTIME_NSEC_GET(s))
-#define tmxgetmtime(s) tmxsns((s)->st_mtime,ST_MTIME_NSEC_GET(s))
-
-#define tmxsetatime(s,t) ((s)->st_atime=tmxsec(t),ST_ATIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Time_t tmxdate __PROTO__((const char*, char**, Time_t));
-extern __MANGLE__ Time_t tmxduration __PROTO__((const char*, char**));
-extern __MANGLE__ char* tmxfmt __PROTO__((char*, size_t, const char*, Time_t));
-extern __MANGLE__ Time_t tmxleap __PROTO__((Time_t));
-extern __MANGLE__ Tm_t* tmxmake __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxscan __PROTO__((const char*, char**, const char*, char**, Time_t, long));
-extern __MANGLE__ int tmxsleep __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_t* tmxtm __PROTO__((Tm_t*, Time_t, Tm_zone_t*));
-
-extern __MANGLE__ Time_t tmxgettime __PROTO__((void));
-extern __MANGLE__ int tmxsettime __PROTO__((Time_t));
-
-extern __MANGLE__ int tmxtouch __PROTO__((const char*, Time_t, Time_t, Time_t, int));
-
-extern __MANGLE__ char* fmttmx __PROTO__((const char*, Time_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/tok.h b/usr/src/lib/libast/i386/include/ast/tok.h
deleted file mode 100644
index 5e07aa302d..0000000000
--- a/usr/src/lib/libast/i386/include/ast/tok.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * token stream interface definitions
- */
-
-#ifndef _TOK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TOK_H
-
-#include <ast.h>
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Sfio_t* tokline __PROTO__((const char*, int, int*));
-extern __MANGLE__ int tokscan __PROTO__((char*, char**, const char*, ...));
-extern __MANGLE__ char* tokopen __PROTO__((char*, int));
-extern __MANGLE__ void tokclose __PROTO__((char*));
-extern __MANGLE__ char* tokread __PROTO__((char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/tv.h b/usr/src/lib/libast/i386/include/ast/tv.h
deleted file mode 100644
index 5496075cb0..0000000000
--- a/usr/src/lib/libast/i386/include/ast/tv.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
-#ifndef _TV_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TV_H 1
-/*
- * AT&T Research
- *
- * high resolution Tv_t interface definitions
- */
-
-#include <ast.h>
-
-#define TV_NSEC_IGNORE (1000000000L)
-#define TV_TOUCH_RETAIN ((Tv_t*)1)
-
-typedef struct Tv_s
-{
- uint32_t tv_sec;
- uint32_t tv_nsec;
-} Tv_t;
-
-#define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
-#define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
-#define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
-
-#define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
-#define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
-#define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
-
-#define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
-#define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
-#define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
-
-#define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
-#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
-#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int tvgettime __PROTO__((Tv_t*));
-extern __MANGLE__ int tvsettime __PROTO__((const Tv_t*));
-extern __MANGLE__ int tvcmp __PROTO__((const Tv_t*, const Tv_t*));
-extern __MANGLE__ int tvtouch __PROTO__((const char*, const Tv_t*, const Tv_t*, const Tv_t*, int));
-extern __MANGLE__ int tvsleep __PROTO__((const Tv_t*, Tv_t*));
-
-extern __MANGLE__ char* fmttv __PROTO__((const char*, Tv_t*));
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/usage.h b/usr/src/lib/libast/i386/include/ast/usage.h
deleted file mode 100644
index 19d2b0fc14..0000000000
--- a/usr/src/lib/libast/i386/include/ast/usage.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * error catalog and usage defaults
- */
-
-#ifndef _USAGE_H
-#define _USAGE_H
-
-#ifndef ERROR_CATALOG
-#define ERROR_CATALOG 0
-#endif
-
-#ifndef USAGE_LICENSE
-#define USAGE_LICENSE "[-license?THIS IS AN UNLICENSED COPY]"
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/vdb.h b/usr/src/lib/libast/i386/include/ast/vdb.h
deleted file mode 100644
index a44d0c6132..0000000000
--- a/usr/src/lib/libast/i386/include/ast/vdb.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * virtual db file directory entry constants
- */
-
-#ifndef VDB_MAGIC
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-
-#define VDB_MAGIC "vdb"
-
-#define VDB_DIRECTORY "DIRECTORY"
-#define VDB_UNION "UNION"
-#define VDB_DATE "DATE"
-#define VDB_MODE "MODE"
-
-#define VDB_DELIMITER ';'
-#define VDB_IGNORE '_'
-#define VDB_FIXED 10
-#define VDB_LENGTH ((int)sizeof(VDB_DIRECTORY)+2*(VDB_FIXED+1))
-#define VDB_OFFSET ((int)sizeof(VDB_DIRECTORY))
-#define VDB_SIZE (VDB_OFFSET+VDB_FIXED+1)
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/vecargs.h b/usr/src/lib/libast/i386/include/ast/vecargs.h
deleted file mode 100644
index 900e13d8b0..0000000000
--- a/usr/src/lib/libast/i386/include/ast/vecargs.h
+++ /dev/null
@@ -1,56 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * vector argument interface definitions
- */
-
-#ifndef _VECARGS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _VECARGS_H
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int vecargs __PROTO__((char**, int*, char***));
-extern __MANGLE__ char** vecfile __PROTO__((const char*));
-extern __MANGLE__ void vecfree __PROTO__((char**, int));
-extern __MANGLE__ char** vecload __PROTO__((char*));
-extern __MANGLE__ char** vecstring __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/wait.h b/usr/src/lib/libast/i386/include/ast/wait.h
deleted file mode 100644
index c4e3b8f2a0..0000000000
--- a/usr/src/lib/libast/i386/include/ast/wait.h
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * ast POSIX wait/exit support
- */
-
-#ifndef _WAIT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _WAIT_H
-
-#include <ast.h>
-#include <ast_wait.h>
-
-#if _sys_wait
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide wait waitpid
-#else
-#define wait ______wait
-#define waitpid ______waitpid
-#endif
-#include <sys/wait.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide wait waitpid
-#else
-#undef wait
-#undef waitpid
-#endif
-#endif
-
-#ifndef WNOHANG
-#define WNOHANG 1
-#endif
-
-#ifndef WUNTRACED
-#define WUNTRACED 2
-#endif
-
-#if !_ok_wif
-#undef WIFEXITED
-#undef WEXITSTATUS
-#undef WIFSIGNALED
-#undef WTERMSIG
-#undef WIFSTOPPED
-#undef WSTOPSIG
-#undef WTERMCORE
-#endif
-
-#ifndef WIFEXITED
-#define WIFEXITED(x) (!((x)&((1<<(EXIT_BITS-1))-1)))
-#endif
-
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(x) (((x)>>EXIT_BITS)&((1<<EXIT_BITS)-1))
-#endif
-
-#ifndef WIFSIGNALED
-#define WIFSIGNALED(x) (((x)&((1<<(EXIT_BITS-1))-1))!=0)
-#endif
-
-#ifndef WTERMSIG
-#define WTERMSIG(x) ((x)&((1<<(EXIT_BITS-1))-1))
-#endif
-
-#ifndef WIFSTOPPED
-#define WIFSTOPPED(x) (((x)&((1<<EXIT_BITS)-1))==((1<<(EXIT_BITS-1))-1))
-#endif
-
-#ifndef WSTOPSIG
-#define WSTOPSIG(x) WEXITSTATUS(x)
-#endif
-
-#ifndef WTERMCORE
-#define WTERMCORE(x) ((x)&(1<<(EXIT_BITS-1)))
-#endif
-
-extern __MANGLE__ pid_t wait __PROTO__((int*));
-extern __MANGLE__ pid_t waitpid __PROTO__((pid_t, int*, int));
-
-#endif
diff --git a/usr/src/lib/libast/i386/include/ast/wchar.h b/usr/src/lib/libast/i386/include/ast/wchar.h
deleted file mode 100644
index 43c5ef1e98..0000000000
--- a/usr/src/lib/libast/i386/include/ast/wchar.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_wchar.h>
diff --git a/usr/src/lib/libast/i386/include/ast/wordexp.h b/usr/src/lib/libast/i386/include/ast/wordexp.h
deleted file mode 100644
index af3169962b..0000000000
--- a/usr/src/lib/libast/i386/include/ast/wordexp.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix wordexp interface definitions
- */
-
-#ifndef _WORDEXP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _WORDEXP_H
-
-#include <ast_common.h>
-
-#define WRDE_APPEND 01
-#define WRDE_DOOFFS 02
-#define WRDE_NOCMD 04
-#define WRDE_NOSYS 0100
-#define WRDE_REUSE 010
-#define WRDE_SHOWERR 020
-#define WRDE_UNDEF 040
-
-#define WRDE_BADCHAR 1
-#define WRDE_BADVAL 2
-#define WRDE_CMDSUB 3
-#define WRDE_NOSPACE 4
-#define WRDE_SYNTAX 5
-#define WRDE_NOSHELL 6
-
-typedef struct _wdarg
-{
- size_t we_wordc;
- char **we_wordv;
- size_t we_offs;
-} wordexp_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int wordexp __PROTO__((const char*, wordexp_t*, int));
-extern __MANGLE__ int wordfree __PROTO__((wordexp_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif /* _WORDEXP_H */
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/botch b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/botch
deleted file mode 100644
index 74b8267f7a..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/botch
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/eaccess b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/eaccess
deleted file mode 100644
index eabeb5c607..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/eaccess
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/eaccess by iffe version 2009-12-04 : : */
-#ifndef _def_eaccess_ast
-#define _def_eaccess_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/hack b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/hack
deleted file mode 100644
index 0b16242eaf..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/hack
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/hack by iffe version 2009-12-04 : : */
-#ifndef _def_hack_ast
-#define _def_hack_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/isoc99 b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/isoc99
deleted file mode 100644
index 2a1f5f510a..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/isoc99
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/isoc99 by iffe version 2009-12-04 : : */
-#ifndef _def_isoc99_ast
-#define _def_isoc99_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-/* _ISOC99_SOURCE plays nice */
-#ifndef _ISOC99_SOURCE
-#define _ISOC99_SOURCE 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/omitted b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/omitted
deleted file mode 100644
index 7ba887d617..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/omitted
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/omitted by iffe version 2009-12-04 : : */
-#ifndef _def_omitted_ast
-#define _def_omitted_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/options b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/options
deleted file mode 100644
index 0d274e1f80..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/options
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/options by iffe version 2009-12-04 : : */
-#ifndef _def_options_ast
-#define _def_options_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/preroot b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/preroot
deleted file mode 100644
index aa448b50fb..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/preroot
+++ /dev/null
@@ -1,6 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/standards b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/standards
deleted file mode 100644
index c231e269ee..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/standards
+++ /dev/null
@@ -1,10 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/uwin b/usr/src/lib/libast/i386/src/lib/libast/FEATURE/uwin
deleted file mode 100644
index 521f137e48..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/FEATURE/uwin
+++ /dev/null
@@ -1,17 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/uwin by iffe version 2009-12-04 : : */
-#ifndef _def_uwin_ast
-#define _def_uwin_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_a64l 1 /* a64l() in default lib(s) */
-#define _lib_crypt 1 /* crypt() in default lib(s) */
-#define _lib_getpass 1 /* getpass() in default lib(s) */
-#define _lib_random 1 /* random() in default lib(s) */
-#define _lib_rcmd 1 /* rcmd() in default lib(s) */
-#define _lib_srand48 1 /* srand48() in default lib(s) */
-#define _lib_logb 1 /* logb() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_scalb 1 /* scalb() in default lib(s) */
-#define _lib__finite 1 /* _finite() in default lib(s) */
-#define _lib__scalb 1 /* _scalb() in default lib(s) */
-#define _dat__iob 1 /* _iob in default lib(s) */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/align.h b/usr/src/lib/libast/i386/src/lib/libast/align.h
deleted file mode 100644
index fe2bdd2795..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/align.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
-#ifndef _def_align_ast
-#define _def_align_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
-
-#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
-#define ALIGN_POINTER(x) ((char*)(x))
-#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
-
-#define ALIGN_BOUND ALIGN_BOUND2
-#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
-
-#define ALIGN_BIT1 0x1
-#define ALIGN_BOUND1 ALIGN_BOUND2
-#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
-#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffe)
-#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
-#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
-
-#define ALIGN_BIT2 0x2
-#define ALIGN_BOUND2 4
-#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+3)
-#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffc)
-#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffd)
-#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
-#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_botch.h b/usr/src/lib/libast/i386/src/lib/libast/ast_botch.h
deleted file mode 100644
index 74b8267f7a..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_botch.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_common.h b/usr/src/lib/libast/i386/src/lib/libast/ast_common.h
deleted file mode 100644
index ac7149ee1a..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_common.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
-#ifndef _AST_COMMON_H
-#define _AST_COMMON_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_pthread 1 /* #include <pthread.h> ok */
-#define _hdr_stdarg 1 /* #include <stdarg.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdint 1 /* #include <stdint.h> ok */
-#define _hdr_inttypes 1 /* #include <inttypes.h> ok */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_long_double 1 /* long double is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _std_proto 1 /* standard C prototypes ok */
-#define _ptr_void 1 /* standard C void* ok */
-/* disable non-standard linux/gnu inlines */
-#ifdef __GNUC__
-# undef __OPTIMIZE_SIZE__
-# define __OPTIMIZE_SIZE__ 1
-#endif
-
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && __STDC__
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && (__cplusplus || c_plusplus)
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && _std_proto
-# define __STD_C 1
-#endif
-#if !defined(__STD_C)
-# define __STD_C 0
-#endif
-
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-# if __cplusplus || c_plusplus
-# define _BEGIN_EXTERNS_ extern "C" {
-# define _END_EXTERNS_ }
-# else
-# define _BEGIN_EXTERNS_
-# define _END_EXTERNS_
-# endif
-#endif
-
-/* _ARG_ simplifies function prototyping among flavors of C */
-#ifndef _ARG_
-# if __STD_C
-# define _ARG_(x) x
-# else
-# define _ARG_(x) ()
-# endif
-#endif
-
-/* _NIL_ simplifies defining nil pointers to a given type */
-#ifndef _NIL_
-# define _NIL_(x) ((x)0)
-#endif
-
-/* __INLINE__ is the inline keyword */
-#if !defined(__INLINE__) && defined(__cplusplus)
-# define __INLINE__ inline
-#endif
-#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-#endif
-
-/* Void_t is defined so that Void_t* can address any type */
-#ifndef Void_t
-# if __STD_C
-# define Void_t void
-# else
-# define Void_t char
-# endif
-#endif
-
-/* windows variants and veneers */
-#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
-# define _WINIX 1
-#endif
-
-/* dynamic linked library external scope handling */
-#ifdef __DYNAMIC__
-# undef __DYNAMIC__
-# ifndef _DLL
-# define _DLL 1
-# endif
-#endif
-#if _dll_import
-# if _BLD_STATIC && !_BLD_DLL
-# undef _DLL
-# else
-# if !_UWIN && !defined(_DLL)
-# define _DLL 1
-# endif
-# endif
-# if !defined(__EXPORT__) && _BLD_DLL
-# define __EXPORT__ __declspec(dllexport)
-# endif
-# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
-# define __IMPORT__ __declspec(dllimport)
-# endif
-# if _BLD_DLL && _UWIN
-# define __DYNAMIC__(v) (_ast_getdll()->_ast_ ## v)
-# endif
-#endif
-#if !defined(_astimport)
-# if defined(__IMPORT__) && defined(_DLL)
-# define _astimport __IMPORT__
-# else
-# define _astimport extern
-# endif
-#endif
-#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
-# ifdef __STDC__
-# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
-# else
-# define __EXTERN__(T,obj) extern T obj; T* _imp__/**/obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__/**/obj = &obj
-# endif
-#else
-# define __EXTERN__(T,obj) extern T obj
-# define __DEFINE__(T,obj,val) T obj = val
-#endif
-
-#define _ast_LL 1 /* LL numeric suffix supported */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intswap 7
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt12_t long double
-#define _ast_fltmax_t _ast_flt12_t
-#define _typ_int8_t 1 /* int8_t is a type */
-#define _typ_uint8_t 1 /* uint8_t is a type */
-#define _typ_int16_t 1 /* int16_t is a type */
-#define _typ_uint16_t 1 /* uint16_t is a type */
-#define _typ_int32_t 1 /* int32_t is a type */
-#define _typ_uint32_t 1 /* uint32_t is a type */
-#define _typ_int64_t 1 /* int64_t is a type */
-#define _typ_uint64_t 1 /* uint64_t is a type */
-#define _typ_intmax_t 1 /* intmax_t is a type */
-#define _typ_uintmax_t 1 /* uintmax_t is a type */
-
-#ifndef va_listref
-#ifndef va_start
-#if __STD_C
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-#define va_listref(p) (p) /* pass va_list to varargs function */
-#define va_listval(p) (p) /* retrieve va_list from va_arg(ap,va_listarg) */
-#define va_listarg va_list /* va_arg() va_list type */
-#endif
-#ifndef _AST_STD_H
-# if __STD_C && _hdr_stddef
-# include <stddef.h>
-# endif
-# if _sys_types
-# include <sys/types.h>
-# endif
-# if _hdr_stdint
-# include <stdint.h>
-# else
-# if _hdr_inttypes
-# include <inttypes.h>
-# endif
-# endif
-#endif
-#if !_typ_size_t
-# define _typ_size_t 1
- typedef int size_t;
-#endif
-#if !_typ_ssize_t
-# define _typ_ssize_t 1
- typedef int ssize_t;
-#endif
-#ifndef _AST_STD_H
-# if !_def_map_ast
-# include <ast_map.h>
-# endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_fcntl.h b/usr/src/lib/libast/i386/src/lib/libast/ast_fcntl.h
deleted file mode 100644
index a69d3aaeb6..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_fcntl.h
+++ /dev/null
@@ -1,114 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
-#ifndef _def_fcntl_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fcntl_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <ast_fs.h>
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#define O_BINARY 0
-#define O_TEMPORARY 0
-#define O_TEXT 0
-
-#include <ast_fs.h>
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_fstat64
-#define fstat fstat64
-#endif
-#if _lib_lstat64
-#define lstat lstat64
-#endif
-#if _lib_stat64
-#define stat stat64
-#endif
-#if _lib_creat64
-#define creat creat64
-#endif
-#if _lib_mmap64
-#define mmap mmap64
-#endif
-#if _lib_open64
-#undef open
-#define open open64
-#endif
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_float.h b/usr/src/lib/libast/i386/src/lib/libast/ast_float.h
deleted file mode 100644
index 16c8246ded..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_float.h
+++ /dev/null
@@ -1,216 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
-#ifndef _def_float_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_float_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_float 1 /* #include <float.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_math 1 /* #include <math.h> ok */
-#define _hdr_values 1 /* #include <values.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
-#define _lib_frexp 1 /* frexp() in default lib(s) */
-#define _lib_frexpl 1 /* frexpl() in default lib(s) */
-#define _lib_ldexp 1 /* ldexp() in default lib(s) */
-#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
-#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
-#define _lib_copysign 1 /* copysign() in default lib(s) */
-#define _lib_copysignl 1 /* copysignl() in default lib(s) */
-#include <ast_common.h>
-#include <float.h>
-#include <math.h>
-#ifndef FLT_DIG
-#define FLT_DIG 6
-#endif
-#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
-#endif
-#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
-#endif
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
-#endif
-#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
-#endif
-#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
-#endif
-#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
-#endif
-#ifndef DBL_DIG
-#define DBL_DIG 15
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
-#endif
-#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
-#endif
-#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
-#endif
-#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
-#endif
-#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
-#endif
-#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
-#endif
-#ifndef LDBL_DIG
-#define LDBL_DIG 18
-#endif
-#ifndef LDBL_MAX
-#define LDBL_MAX 1.1897314953572317650213E+4932L
-#endif
-#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
-#endif
-#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
-#endif
-#ifndef LDBL_MIN
-#define LDBL_MIN 3.3621031431120935062627E-4932L
-#endif
-#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
-#endif
-#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
-#endif
-
-
-#define USHRT_DIG 4
-#define UINT_DIG 9
-#define ULONG_DIG 9
-#define ULLONG_DIG 19
-#define UINTMAX_DIG ULLONG_DIG
-
-#define FLT_ULONG_MAX 4294967295.0F
-#define FLT_ULLONG_MAX 18446744073709551615.0F
-#define FLT_UINTMAX_MAX FLT_ULLONG_MAX
-#define FLT_LONG_MAX 2147483647.0F
-#define FLT_LLONG_MAX 9223372036854775807.0F
-#define FLT_INTMAX_MAX FLT_LLONG_MAX
-#define FLT_LONG_MIN (-2147483648.0F)
-#define FLT_LLONG_MIN (-9223372036854775808.0F)
-#define FLT_INTMAX_MIN FLT_LLONG_MIN
-
-#define DBL_ULONG_MAX 4294967295.0
-#define DBL_ULLONG_MAX 18446744073709551615.0
-#define DBL_UINTMAX_MAX DBL_ULLONG_MAX
-#define DBL_LONG_MAX 2147483647.0
-#define DBL_LLONG_MAX 9223372036854775807.0
-#define DBL_INTMAX_MAX DBL_LLONG_MAX
-#define DBL_LONG_MIN (-2147483648.0)
-#define DBL_LLONG_MIN (-9223372036854775808.0)
-#define DBL_INTMAX_MIN DBL_LLONG_MIN
-
-#define LDBL_ULONG_MAX 4294967295.0L
-#define LDBL_ULLONG_MAX 18446744073709551615.0L
-#define LDBL_UINTMAX_MAX LDBL_ULLONG_MAX
-#define LDBL_LONG_MAX 2147483647.0L
-#define LDBL_LLONG_MAX 9223372036854775807.0L
-#define LDBL_INTMAX_MAX LDBL_LLONG_MAX
-#define LDBL_LONG_MIN (-2147483648.0L)
-#define LDBL_LLONG_MIN (-9223372036854775808.0L)
-#define LDBL_INTMAX_MIN LDBL_LLONG_MIN
-
-#define FLTMAX_UINTMAX_MAX LDBL_UINTMAX_MAX
-#define FLTMAX_INTMAX_MAX LDBL_INTMAX_MAX
-#define FLTMAX_INTMAX_MIN LDBL_INTMAX_MIN
-
-typedef union _ast_dbl_exp_u
-{
- uint32_t e[sizeof(double)/4];
- double f;
-} _ast_dbl_exp_t;
-
-#define _ast_dbl_exp_index 1
-#define _ast_dbl_exp_shift 20
-
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 2
-#define _ast_fltmax_exp_shift 0
-
-#define _ast_flt_unsigned_max_t unsigned long long
-#define _ast_flt_nan_init 0xff,0xff,0xff,0x7f
-#define _ast_flt_inf_init 0x00,0x00,0x80,0x7f
-#define _ast_dbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f
-#define _ast_dbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x7f
-#define _ast_ldbl_nan_init 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf0,0x7f
-#define _ast_ldbl_inf_init 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x7f,0xf0,0x7f
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_fs.h b/usr/src/lib/libast/i386/src/lib/libast/ast_fs.h
deleted file mode 100644
index 5aad327b05..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_fs.h
+++ /dev/null
@@ -1,147 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
-#ifndef _def_fs_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fs_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _lib__fxstat 1 /* _fxstat() in default lib(s) */
-#define _lib__lxstat 1 /* _lxstat() in default lib(s) */
-#define _lib__xmknod 1 /* _xmknod() in default lib(s) */
-#define _lib__xstat 1 /* _xstat() in default lib(s) */
-#define _lib_lstat 1 /* lstat() in default lib(s) */
-#define _lib_mknod 1 /* mknod() in default lib(s) */
-#define _lib_sync 1 /* sync() in default lib(s) */
-#include <sys/stat.h>
-#include <sys/mkdev.h>
-#define FS_default "ufs"
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
-#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
-#define _sys_mount 1 /* #include <sys/mount.h> ok */
-#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
-#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
-#define _sys_vfs 1 /* #include <sys/vfs.h> ok */
-#define _mem_st_blocks_stat 1 /* st_blocks is a member of struct stat */
-#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
-#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
-#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
-#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
-#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
-#define _lib_getmntent 1 /* getmntent() in default lib(s) */
-#define _lib_statfs 1 /* statfs() in default lib(s) */
-#define _lib_statvfs 1 /* statvfs() in default lib(s) */
-#define _lib_statfs4 1 /* compile{\ passed */
-#if _sys_statvfs
-#include <sys/statvfs.h>
-#if !_mem_statvfs_f_basetype
-#if _ary_f_reserved7
-#define f_basetype f_reserved7
-#endif
-#endif
-#else
-#define _mem_f_basetype_statvfs 1
-#define _mem_f_frsize_statvfs 1
-struct statvfs
-{
-unsigned long f_bsize; /* fundamental file system block size */
-unsigned long f_frsize; /* fragment size */
-unsigned long f_blocks; /* total # of blocks of f_frsize on fs */
-unsigned long f_bfree; /* total # of free blocks of f_frsize */
-unsigned long f_bavail; /* # of free blocks avail to non-superuser */
-unsigned long f_files; /* total # of file nodes (inodes) */
-unsigned long f_ffree; /* total # of free file nodes */
-unsigned long f_favail; /* # of free nodes avail to non-superuser */
-unsigned long f_fsid; /* file system id (dev for now) */
-char f_basetype[16]; /* target fs type name, null-terminated */
-unsigned long f_flag; /* bit-mask of flags */
-unsigned long f_namemax; /* maximum file name length */
-char f_fstr[32]; /* filesystem-specific string */
-unsigned long f_filler[16]; /* reserved for future expansion */
-};
-extern __MANGLE__ int fstatvfs __PROTO__((int, struct statvfs*));
-extern __MANGLE__ int statvfs __PROTO__((const char*, struct statvfs*));
-#endif
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_statvfs64 && !defined(statvfs)
-#define statvfs statvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int statvfs64 __PROTO__((const char*, struct statvfs64*));
-#endif
-#endif
-#if _lib_fstatvfs64 && !defined(fstatvfs)
-#define fstatvfs fstatvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int fstatvfs64 __PROTO__((int, struct statvfs64*));
-#endif
-#endif
-
-#define _str_st_fstype 1 /* stat.st_fstype is a string */
-#define _ary_st_pad4 1 /* stat.st_pad4 is an array */
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_iconv.h b/usr/src/lib/libast/i386/src/lib/libast/ast_iconv.h
deleted file mode 100644
index d1d76b26c2..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_iconv.h
+++ /dev/null
@@ -1,132 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
-#ifndef _def_iconv_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_iconv_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_iconv 1 /* #include <iconv.h> ok */
-#define _lib_iconv_open 1 /* iconv_open() in default lib(s) */
-#define _lib_iconv_close 1 /* iconv_close() in default lib(s) */
-#define _lib_iconv 1 /* iconv() in default lib(s) */
-#define _nxt_iconv <../include/iconv.h> /* include path for the native <iconv.h> */
-#define _nxt_iconv_str "../include/iconv.h" /* include string for the native <iconv.h> */
-#include <ast_common.h>
-#include <ccode.h>
-#include <../include/iconv.h> /* the native iconv.h */
-
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
-
-#ifndef _ICONV_LIST_PRIVATE_
-#undef iconv_t
-#define iconv_t _ast_iconv_t
-#undef iconv_f
-#define iconv_f _ast_iconv_f
-#undef iconv_list_t
-#define iconv_list_t _ast_iconv_list_t
-#undef iconv_open
-#define iconv_open _ast_iconv_open
-#undef iconv
-#define iconv _ast_iconv
-#undef iconv_close
-#define iconv_close _ast_iconv_close
-#undef iconv_list
-#define iconv_list _ast_iconv_list
-#undef iconv_move
-#define iconv_move _ast_iconv_move
-#undef iconv_name
-#define iconv_name _ast_iconv_name
-#undef iconv_write
-#define iconv_write _ast_iconv_write
-#endif
-
-typedef Ccmap_t _ast_iconv_list_t;
-typedef __V_* _ast_iconv_t;
-typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ _ast_iconv_t _ast_iconv_open __PROTO__((const char*, const char*));
-extern __MANGLE__ size_t _ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
-extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
-extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
-#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
-#else
-#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_lib.h b/usr/src/lib/libast/i386/src/lib/libast/ast_lib.h
deleted file mode 100644
index b0e8a8d8cf..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_lib.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
-#ifndef _def_lib_ast
-#define _def_lib_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _hdr_fmtmsg 1 /* #include <fmtmsg.h> ok */
-#define _hdr_fnmatch 1 /* #include <fnmatch.h> ok */
-#define _hdr_libgen 1 /* #include <libgen.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_locale 1 /* #include <locale.h> ok */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_spawn 1 /* #include <spawn.h> ok */
-#define _hdr_syslog 1 /* #include <syslog.h> ok */
-#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
-#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
-#define _dat__tzname 1 /* _tzname in default lib(s) */
-#define _dat_tzname 1 /* tzname in default lib(s) */
-#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
-#define _lib_atexit 1 /* atexit() in default lib(s) */
-#define _lib_bcopy 1 /* bcopy() in default lib(s) */
-#define _lib_bzero 1 /* bzero() in default lib(s) */
-#define _lib_catclose 1 /* catclose() in default lib(s) */
-#define _lib_catgets 1 /* catgets() in default lib(s) */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_confstr 1 /* confstr() in default lib(s) */
-#define _lib_dup2 1 /* dup2() in default lib(s) */
-#define _lib_execlp 1 /* execlp() in default lib(s) */
-#define _lib_execve 1 /* execve() in default lib(s) */
-#define _lib_execvp 1 /* execvp() in default lib(s) */
-#define _lib_fchmod 1 /* fchmod() in default lib(s) */
-#define _lib_fcntl 1 /* fcntl() in default lib(s) */
-#define _lib_fmtmsg 1 /* fmtmsg() in default lib(s) */
-#define _lib_fnmatch 1 /* fnmatch() in default lib(s) */
-#define _lib_fork 1 /* fork() in default lib(s) */
-#define _lib_fsync 1 /* fsync() in default lib(s) */
-#define _lib_getdents 1 /* getdents() in default lib(s) */
-#define _lib_getdtablesize 1 /* getdtablesize() in default lib(s) */
-#define _lib_getdate 1 /* getdate() in default lib(s) */
-#define _lib_getgroups 1 /* getgroups() in default lib(s) */
-#define _lib_gethostname 1 /* gethostname() in default lib(s) */
-#define _lib_getlogin 1 /* getlogin() in default lib(s) */
-#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_getopt 1 /* getopt() in default lib(s) */
-#define _lib_getsubopt 1 /* getsubopt() in default lib(s) */
-#define _lib_getopt_long 1 /* getopt_long() in default lib(s) */
-#define _lib_getopt_long_only 1 /* getopt_long_only() in default lib(s) */
-#define _lib_glob 1 /* glob() in default lib(s) */
-#define _lib_index 1 /* index() in default lib(s) */
-#define _lib_iswblank 1 /* iswblank() in default lib(s) */
-#define _lib_iswctype 1 /* iswctype() in default lib(s) */
-#define _lib_killpg 1 /* killpg() in default lib(s) */
-#define _lib_link 1 /* link() in default lib(s) */
-#define _lib_localeconv 1 /* localeconv() in default lib(s) */
-#define _lib_madvise 1 /* madvise() in default lib(s) */
-#define _lib_mbtowc 1 /* mbtowc() in default lib(s) */
-#define _lib_mbrtowc 1 /* mbrtowc() in default lib(s) */
-#define _lib_memalign 1 /* memalign() in default lib(s) */
-#define _lib_memchr 1 /* memchr() in default lib(s) */
-#define _lib_memcpy 1 /* memcpy() in default lib(s) */
-#define _lib_memmove 1 /* memmove() in default lib(s) */
-#define _lib_memset 1 /* memset() in default lib(s) */
-#define _lib_mkdir 1 /* mkdir() in default lib(s) */
-#define _lib_mkfifo 1 /* mkfifo() in default lib(s) */
-#define _lib_mktemp 1 /* mktemp() in default lib(s) */
-#define _lib_mktime 1 /* mktime() in default lib(s) */
-#define _lib_mount 1 /* mount() in default lib(s) */
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _lib_pathconf 1 /* pathconf() in default lib(s) */
-#define _lib_readlink 1 /* readlink() in default lib(s) */
-#define _lib_remove 1 /* remove() in default lib(s) */
-#define _lib_rename 1 /* rename() in default lib(s) */
-#define _lib_rewinddir 1 /* rewinddir() in default lib(s) */
-#define _lib_rindex 1 /* rindex() in default lib(s) */
-#define _lib_rmdir 1 /* rmdir() in default lib(s) */
-#define _lib_setlocale 1 /* setlocale() in default lib(s) */
-#define _lib_setpgid 1 /* setpgid() in default lib(s) */
-#define _lib_setpgrp 1 /* setpgrp() in default lib(s) */
-#define _lib_setreuid 1 /* setreuid() in default lib(s) */
-#define _lib_setsid 1 /* setsid() in default lib(s) */
-#define _lib_setuid 1 /* setuid() in default lib(s) */
-#define _lib_sigaction 1 /* sigaction() in default lib(s) */
-#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
-#define _lib_socketpair 1 /* socketpair() in default lib(s) */
-#define _lib_strchr 1 /* strchr() in default lib(s) */
-#define _lib_strcoll 1 /* strcoll() in default lib(s) */
-#define _lib_strdup 1 /* strdup() in default lib(s) */
-#define _lib_strerror 1 /* strerror() in default lib(s) */
-#define _lib_strcasecmp 1 /* strcasecmp() in default lib(s) */
-#define _lib_strncasecmp 1 /* strncasecmp() in default lib(s) */
-#define _lib_strrchr 1 /* strrchr() in default lib(s) */
-#define _lib_strstr 1 /* strstr() in default lib(s) */
-#define _lib_strxfrm 1 /* strxfrm() in default lib(s) */
-#define _lib_strftime 1 /* strftime() in default lib(s) */
-#define _lib_swab 1 /* swab() in default lib(s) */
-#define _lib_symlink 1 /* symlink() in default lib(s) */
-#define _lib_sysconf 1 /* sysconf() in default lib(s) */
-#define _lib_sysinfo 1 /* sysinfo() in default lib(s) */
-#define _lib_syslog 1 /* syslog() in default lib(s) */
-#define _lib_telldir 1 /* telldir() in default lib(s) */
-#define _lib_tmpnam 1 /* tmpnam() in default lib(s) */
-#define _lib_tzset 1 /* tzset() in default lib(s) */
-#define _lib_unlink 1 /* unlink() in default lib(s) */
-#define _lib_utime 1 /* utime() in default lib(s) */
-#define _lib_wctype 1 /* wctype() in default lib(s) */
-#define _lib_ftruncate 1 /* ftruncate() in default lib(s) */
-#define _lib_truncate 1 /* truncate() in default lib(s) */
-#define _lib_creat64 1 /* creat64() in default lib(s) */
-#define _lib_fstat64 1 /* fstat64() in default lib(s) */
-#define _lib_fstatvfs64 1 /* fstatvfs64() in default lib(s) */
-#define _lib_ftruncate64 1 /* ftruncate64() in default lib(s) */
-#define _lib_lseek64 1 /* lseek64() in default lib(s) */
-#define _lib_lstat64 1 /* lstat64() in default lib(s) */
-#define _lib_open64 1 /* open64() in default lib(s) */
-#define _lib_readdir64 1 /* readdir64() in default lib(s) */
-#define _lib_stat64 1 /* stat64() in default lib(s) */
-#define _lib_statvfs64 1 /* statvfs64() in default lib(s) */
-#define _lib_truncate64 1 /* truncate64() in default lib(s) */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _lib_strtod 1 /* strtod() in default lib(s) */
-#define _lib_strtold 1 /* strtold() in default lib(s) */
-#define _lib_strtol 1 /* strtol() in default lib(s) */
-#define _lib_strtoll 1 /* strtoll() in default lib(s) */
-#define _lib_strtoul 1 /* strtoul() in default lib(s) */
-#define _lib_strtoull 1 /* strtoull() in default lib(s) */
-#define _hdr_signal 1 /* #include <signal.h> ok */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
-#define _npt_sigflag 1 /* sigflag() needs a prototype */
-#define _mem_d_ino_dirent 1 /* d_ino is a member of struct dirent */
-#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
-#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
-#define _mem_DIR 1 /* DIR is a non-opaque struct */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
-#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
-#define _sys_resource 1 /* #include <sys/resource.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _sys_stream 1 /* #include <sys/stream.h> ok */
-#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_off64_t 1 /* off64_t is a type */
-#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
-#define _tst_errno 1 /* errno can be assigned */
-#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
-#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
-#define _lib_select 1 /* select() has standard 5 arg interface */
-#define _pipe_rw 1 /* full duplex pipes */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _lib_vfork 1 /* vfork exists and it works */
-#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
-#define _hdr_string 1 /* #include <string.h> ok */
-#define _lib_memcmp 1 /* standard memcmp interface that works */
-#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_memccpy 1 /* standard memccpy interface that works */
-#define _lib_utime_now 1 /* utime works with 0 time vector */
-#define _UNIV_DEFAULT "att" /* default universe name */
-#define _std_cleanup 1 /* stuck with standard _cleanup */
-#define _std_strcoll 1 /* standard strcoll works */
-#if !_AST_no_spawnveg
-#define _use_spawnveg 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_map.h b/usr/src/lib/libast/i386/src/lib/libast/ast_map.h
deleted file mode 100644
index a4ba960bec..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_map.h
+++ /dev/null
@@ -1,450 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
-#ifndef _def_map_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_map_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-/*
- * prototypes provided for standard interfaces hijacked
- * by ast and mapped to _ast_* but already prototyped
- * unmapped in native headers included by <ast_std.h>
- */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-
-#define _map_libc 1
-#undef basename
-#define basename _ast_basename
-#undef dirname
-#define dirname _ast_dirname
-#undef eaccess
-#define eaccess _ast_eaccess
-#undef execvpe
-#define execvpe _ast_execvpe
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-#undef fnmatch
-#define fnmatch _ast_fnmatch
-#undef fts_children
-#define fts_children _ast_fts_children
-#undef fts_close
-#define fts_close _ast_fts_close
-#undef fts_flags
-#define fts_flags _ast_fts_flags
-#undef fts_notify
-#define fts_notify _ast_fts_notify
-#undef fts_open
-#define fts_open _ast_fts_open
-#undef fts_read
-#define fts_read _ast_fts_read
-#undef fts_set
-#define fts_set _ast_fts_set
-#undef ftw
-#define ftw _ast_ftw
-#undef ftwalk
-#define ftwalk _ast_ftwalk
-#undef ftwflags
-#define ftwflags _ast_ftwflags
-#undef getcwd
-#define getcwd _ast_getcwd
-extern __MANGLE__ char* getcwd __PROTO__((char*, size_t));
-#undef getdate
-#define getdate _ast_getdate
-#undef getopt
-#define getopt _ast_getopt
-#undef getsubopt
-#define getsubopt _ast_getsubopt
-#undef getopt_long
-#define getopt_long _ast_getopt_long
-#undef getopt_long_only
-#define getopt_long_only _ast_getopt_long_only
-#undef optopt
-#define optopt _ast_optopt
-#undef optarg
-#define optarg _ast_optarg
-#undef optind
-#define optind _ast_optind
-#undef opterr
-#define opterr _ast_opterr
-#undef getwd
-#define getwd _ast_getwd
-extern __MANGLE__ char* getwd __PROTO__((char*));
-#undef glob
-#define glob _ast_glob
-#undef globfree
-#define globfree _ast_globfree
-#undef memdup
-#define memdup _ast_memdup
-#undef memfatal
-#define memfatal _ast_memfatal
-#undef memhash
-#define memhash _ast_memhash
-#undef memsum
-#define memsum _ast_memsum
-#undef mkstemp
-#define mkstemp _ast_mkstemp
-extern __MANGLE__ int mkstemp __PROTO__((char*));
-#undef mktemp
-#define mktemp _ast_mktemp
-extern __MANGLE__ char* mktemp __PROTO__((char*));
-#undef mktime
-#define mktime _ast_mktime
-#undef nftw
-#define nftw _ast_nftw
-#undef optctx
-#define optctx _ast_optctx
-#undef optesc
-#define optesc _ast_optesc
-#undef optget
-#define optget _ast_optget
-#undef opthelp
-#define opthelp _ast_opthelp
-#undef optjoin
-#define optjoin _ast_optjoin
-#undef optstr
-#define optstr _ast_optstr
-#undef optusage
-#define optusage _ast_optusage
-#undef pathaccess
-#define pathaccess _ast_pathaccess
-#undef pathbin
-#define pathbin _ast_pathbin
-#undef pathcanon
-#define pathcanon _ast_pathcanon
-#undef pathcat
-#define pathcat _ast_pathcat
-#undef pathcd
-#define pathcd _ast_pathcd
-#undef pathcheck
-#define pathcheck _ast_pathcheck
-#undef pathexists
-#define pathexists _ast_pathexists
-#undef pathfind
-#define pathfind _ast_pathfind
-#undef pathgetlink
-#define pathgetlink _ast_pathgetlink
-#undef pathinclude
-#define pathinclude _ast_pathinclude
-#undef pathkey
-#define pathkey _ast_pathkey
-#undef pathnative
-#define pathnative _ast_pathnative
-#undef pathpath
-#define pathpath _ast_pathpath
-#undef pathposix
-#define pathposix _ast_pathposix
-#undef pathprobe
-#define pathprobe _ast_pathprobe
-#undef pathprog
-#define pathprog _ast_pathprog
-#undef pathrepl
-#define pathrepl _ast_pathrepl
-#undef pathsetlink
-#define pathsetlink _ast_pathsetlink
-#undef pathshell
-#define pathshell _ast_pathshell
-#undef pathstat
-#define pathstat _ast_pathstat
-#undef pathtemp
-#define pathtemp _ast_pathtemp
-#undef pathtmp
-#define pathtmp _ast_pathtmp
-#undef procclose
-#define procclose _ast_procclose
-#undef procfree
-#define procfree _ast_procfree
-#undef procopen
-#define procopen _ast_procopen
-#undef procrun
-#define procrun _ast_procrun
-#undef putenv
-#define putenv _ast_putenv
-#undef re_comp
-#define re_comp _ast_re_comp
-#undef re_exec
-#define re_exec _ast_re_exec
-#undef realpath
-#define realpath _ast_realpath
-extern __MANGLE__ char* realpath __PROTO__((const char*, char*));
-#undef regaddclass
-#define regaddclass _ast_regaddclass
-#undef regalloc
-#define regalloc _ast_regalloc
-#undef regcache
-#define regcache _ast_regcache
-#undef regclass
-#define regclass _ast_regclass
-#undef regcmp
-#define regcmp _ast_regcmp
-#undef regcollate
-#define regcollate _ast_regcollate
-#undef regcomb
-#define regcomb _ast_regcomb
-#undef regcomp
-#define regcomp _ast_regcomp
-#undef regdecomp
-#define regdecomp _ast_regdecomp
-#undef regdup
-#define regdup _ast_regdup
-#undef regerror
-#define regerror _ast_regerror
-#undef regex
-#define regex _ast_regex
-#undef regexec
-#define regexec _ast_regexec
-#undef regfatal
-#define regfatal _ast_regfatal
-#undef regfatalpat
-#define regfatalpat _ast_regfatalpat
-#undef regfree
-#define regfree _ast_regfree
-#undef regncomp
-#define regncomp _ast_regncomp
-#undef regnexec
-#define regnexec _ast_regnexec
-#undef regrecord
-#define regrecord _ast_regrecord
-#undef regrexec
-#define regrexec _ast_regrexec
-#undef regstat
-#define regstat _ast_regstat
-#undef regsub
-#define regsub _ast_regsub
-#undef regsubcomp
-#define regsubcomp _ast_regsubcomp
-#undef regsubexec
-#define regsubexec _ast_regsubexec
-#undef regsubflags
-#define regsubflags _ast_regsubflags
-#undef regsubfree
-#define regsubfree _ast_regsubfree
-#undef remove
-#define remove _ast_remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#undef resolvepath
-#define resolvepath _ast_resolvepath
-extern __MANGLE__ int resolvepath __PROTO__((const char*, char*, size_t));
-#undef setenv
-#define setenv _ast_setenv
-extern __MANGLE__ int setenv __PROTO__((const char*, const char*, int));
-#undef setenviron
-#define setenviron _ast_setenviron
-#undef sigcritical
-#define sigcritical _ast_sigcritical
-#undef signal
-#define signal _ast_signal
-#undef sigunblock
-#define sigunblock _ast_sigunblock
-#undef stracmp
-#define stracmp _ast_stracmp
-#undef strcopy
-#define strcopy _ast_strcopy
-#undef strelapsed
-#define strelapsed _ast_strelapsed
-#undef stresc
-#define stresc _ast_stresc
-#undef streval
-#define streval _ast_streval
-#undef strexpr
-#define strexpr _ast_strexpr
-#undef strftime
-#define strftime _ast_strftime
-#undef strgid
-#define strgid _ast_strgid
-#undef strgrpmatch
-#define strgrpmatch _ast_strgrpmatch
-#undef strhash
-#define strhash _ast_strhash
-#undef strkey
-#define strkey _ast_strkey
-#undef strlcat
-#define strlcat _ast_strlcat
-extern __MANGLE__ size_t strlcat __PROTO__((char*, const char*, size_t));
-#undef strlcpy
-#define strlcpy _ast_strlcpy
-extern __MANGLE__ size_t strlcpy __PROTO__((char*, const char*, size_t));
-#undef strlook
-#define strlook _ast_strlook
-#undef strmatch
-#define strmatch _ast_strmatch
-#undef strmode
-#define strmode _ast_strmode
-#undef strnacmp
-#define strnacmp _ast_strnacmp
-#undef strncopy
-#define strncopy _ast_strncopy
-#undef strntod
-#define strntod _ast_strntod
-#undef strntol
-#define strntol _ast_strntol
-#undef strntold
-#define strntold _ast_strntold
-#undef strntoll
-#define strntoll _ast_strntoll
-#undef strntoul
-#define strntoul _ast_strntoul
-#undef strntoull
-#define strntoull _ast_strntoull
-#undef stropt
-#define stropt _ast_stropt
-#undef strperm
-#define strperm _ast_strperm
-#undef strpsearch
-#define strpsearch _ast_strpsearch
-#undef strptime
-#define strptime _ast_strptime
-#undef strsearch
-#define strsearch _ast_strsearch
-#undef strsort
-#define strsort _ast_strsort
-#undef strsubmatch
-#define strsubmatch _ast_strsubmatch
-#undef strsum
-#define strsum _ast_strsum
-#undef strtape
-#define strtape _ast_strtape
-#undef strtoip4
-#define strtoip4 _ast_strtoip4
-#undef strton
-#define strton _ast_strton
-#undef strtonll
-#define strtonll _ast_strtonll
-#undef struid
-#define struid _ast_struid
-#undef struniq
-#define struniq _ast_struniq
-#undef system
-#define system _ast_system
-extern __MANGLE__ int system __PROTO__((const char*));
-#undef tempnam
-#define tempnam _ast_tempnam
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-#undef tmpnam
-#define tmpnam _ast_tmpnam
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-#undef touch
-#define touch _ast_touch
-#undef wordexp
-#define wordexp _ast_wordexp
-#undef wordfree
-#define wordfree _ast_wordfree
-#undef unsetenv
-#define unsetenv _ast_unsetenv
-
-/* cannot override local malloc */
-#define _map_malloc 1
-#undef calloc
-#define calloc _ast_calloc
-extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
-#undef cfree
-#define cfree _ast_cfree
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-#undef free
-#define free _ast_free
-extern __MANGLE__ void free __PROTO__((__V_*));
-#undef malloc
-#define malloc _ast_malloc
-extern __MANGLE__ __V_* malloc __PROTO__((size_t));
-#undef memalign
-#define memalign _ast_memalign
-extern __MANGLE__ __V_* memalign __PROTO__((size_t, size_t));
-#undef realloc
-#define realloc _ast_realloc
-extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
-#undef strdup
-#define strdup _ast_strdup
-extern __MANGLE__ char* strdup __PROTO__((const char*));
-#undef valloc
-#define valloc _ast_valloc
-extern __MANGLE__ __V_* valloc __PROTO__((size_t));
-#undef strtol
-#define strtol _ast_strtol
-#undef strtoul
-#define strtoul _ast_strtoul
-#undef strtoll
-#define strtoll _ast_strtoll
-#undef strtoull
-#define strtoull _ast_strtoull
-#undef strtod
-#define strtod _ast_strtod
-#undef strtold
-#define strtold _ast_strtold
-extern __MANGLE__ long strtol __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned long strtoul __PROTO__((const char*, char**, int));
-extern __MANGLE__ double strtod __PROTO__((const char*, char**));
-#if !_UWIN
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
-extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_standards.h b/usr/src/lib/libast/i386/src/lib/libast/ast_standards.h
deleted file mode 100644
index c231e269ee..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_standards.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_stdio.h b/usr/src/lib/libast/i386/src/lib/libast/ast_stdio.h
deleted file mode 100644
index a7530763bd..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_stdio.h
+++ /dev/null
@@ -1,587 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
-#ifndef _SFSTDIO_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFSTDIO_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define __FILE_typedef 1
-#define _FILE_DEFINED 1
-#define _FILE_defined 1
-#define _FILEDEFED 1
-
-#ifndef __FILE_TAG
-#define __FILE_TAG _sfio_s
-#endif
-
-#undef FILE
-#undef _FILE
-#undef fpos_t
-#undef fpos64_t
-
-typedef struct _sfio_s _sfio_FILE;
-
-#define FILE _sfio_FILE
-#define _FILE FILE
-
-#if !defined(__FILE) && !__CYGWIN__
-#undef __FILE
-#define __FILE FILE
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define BUFSIZ SF_BUFSIZE
-
-#else
-
-#ifndef BUFSIZ
-#define BUFSIZ 8192
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#include <ast_std.h>
-
-#include <sfio_s.h>
-
-#if __cplusplus
-#define _sf_(f) (f)
-#else
-#define _sf_(f) ((struct _sfio_s*)(f))
-#endif
-
-#define _SF_EOF 0000200
-#define _SF_ERROR 0000400
-
-#endif
-
-#ifdef _NO_LARGEFILE64_SOURCE
-#undef _LARGEFILE64_SOURCE
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#undef off_t
-#endif
-
-#define fpos_t _ast_fpos_t
-#if _typ_int64_t
-#define fpos64_t _ast_fpos_t
-#endif
-
-typedef struct _ast_fpos_s
-{
- intmax_t _sf_offset;
- unsigned char _sf_state[64 - sizeof(intmax_t)];
-} _ast_fpos_t;
-
-#define _base _data
-#define _ptr _next
-#define _IOFBF 0
-#define _IONBF 1
-#define _IOLBF 2
-
-#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
-
-#undef FILE
-#define FILE FILE
-typedef struct _sfio_s FILE;
-
-#undef strerror
-extern __MANGLE__ char* strerror(int) __THROW;
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-extern __MANGLE__ void flockfile __PROTO__((FILE*));
-extern __MANGLE__ int ftrylockfile __PROTO__((FILE*));
-extern __MANGLE__ void funlockfile __PROTO__((FILE*));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 1024
-#endif
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 60
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-
-#define _doprnt _ast_doprnt
-#define _doscan _ast_doscan
-#define asprintf _ast_asprintf
-#define clearerr _ast_clearerr
-#define fclose _ast_fclose
-#define fdopen _ast_fdopen
-#define fflush _ast_fflush
-#define fgetc _ast_fgetc
-#define fgetpos _ast_fgetpos
-#define fgetpos64 _ast_fgetpos64
-#define fgets _ast_fgets
-#define fopen _ast_fopen
-#define fprintf _ast_fprintf
-#define fpurge _ast_fpurge
-#define fputs _ast_fputs
-#define fread _ast_fread
-#define freopen _ast_freopen
-#define fscanf _ast_fscanf
-#define fseek _ast_fseek
-#define fseek64 _ast_fseek64
-#define fseeko _ast_fseeko
-#define fseeko64 _ast_fseeko64
-#define fsetpos _ast_fsetpos
-#define fsetpos64 _ast_fsetpos64
-#define ftell _ast_ftell
-#define ftell64 _ast_ftell64
-#define ftello _ast_ftello
-#define ftello64 _ast_ftello64
-#define fwrite _ast_fwrite
-#define gets _ast_gets
-#define getw _ast_getw
-#define pclose _ast_pclose
-#define popen _ast_popen
-#define printf _ast_printf
-#define puts _ast_puts
-#define putw _ast_putw
-#define rewind _ast_rewind
-#define scanf _ast_scanf
-#define setbuf _ast_setbuf
-#undef setbuffer
-#define setbuffer _ast_setbuffer
-#define setlinebuf _ast_setlinebuf
-#define setvbuf _ast_setvbuf
-#define snprintf _ast_snprintf
-#define sprintf _ast_sprintf
-#define sscanf _ast_sscanf
-#define tmpfile _ast_tmpfile
-#define ungetc _ast_ungetc
-#define vasprintf _ast_vasprintf
-#define vfprintf _ast_vfprintf
-#define vfscanf _ast_vfscanf
-#define vprintf _ast_vprintf
-#define vscanf _ast_vscanf
-#define vsnprintf _ast_vsnprintf
-#define vsprintf _ast_vsprintf
-#define vsscanf _ast_vsscanf
-#define fcloseall _ast_fcloseall
-#define _filbuf _ast__filbuf
-#define fmemopen _ast_fmemopen
-#define __getdelim _ast___getdelim
-#define getdelim _ast_getdelim
-#define getline _ast_getline
-#define clearerr_unlocked _ast_clearerr_unlocked
-#define feof_unlocked _ast_feof_unlocked
-#define ferror_unlocked _ast_ferror_unlocked
-#define fflush_unlocked _ast_fflush_unlocked
-#define fgetc_unlocked _ast_fgetc_unlocked
-#define fgets_unlocked _ast_fgets_unlocked
-#define fileno_unlocked _ast_fileno_unlocked
-#define fputc_unlocked _ast_fputc_unlocked
-#define fputs_unlocked _ast_fputs_unlocked
-#define fread_unlocked _ast_fread_unlocked
-#define fwrite_unlocked _ast_fwrite_unlocked
-#define getc_unlocked _ast_getc_unlocked
-#define getchar_unlocked _ast_getchar_unlocked
-#define putc_unlocked _ast_putc_unlocked
-#define putchar_unlocked _ast_putchar_unlocked
-#define flockfile _ast_flockfile
-#define ftrylockfile _ast_ftrylockfile
-#define funlockfile _ast_funlockfile
-
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:initial
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
-#endif
-#ifndef L_ctermid
-#define L_ctermid 9
-#endif
-#ifndef L_tmpnam
-#define L_tmpnam 25
-#endif
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#if defined(__cplusplus) && defined(__THROW)
-extern __MANGLE__ char* ctermid(char*) __THROW;
-#else
-extern __MANGLE__ char* ctermid __PROTO__((char*));
-#endif
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-extern __MANGLE__ void perror __PROTO__((const char*));
-#ifndef _AST_STD_H
-#ifndef remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-#ifndef rename
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#ifdef _LARGEFILE64_SOURCE
-
-#undef fpos_t
-#undef off_t
-#undef fgetpos
-#undef fsetpos
-#undef fseek
-#undef fseeko
-#undef ftell
-#undef ftello
-
-#define fpos_t fpos64_t
-#if _typ_off64_t
-#define off_t off64_t
-#else
-#define off_t int64_t
-#endif
-
-#define fgetpos fgetpos64
-#define fsetpos fsetpos64
-#define fseek fseek64
-#define fseeko fseeko64
-#define ftell ftell64
-#define ftello ftello64
-
-#endif
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_DLL && _DLL_INDIRECT_DATA
-
-#define stdin ((FILE*)_ast_dll->_ast_stdin)
-#define stdout ((FILE*)_ast_dll->_ast_stdout)
-#define stderr ((FILE*)_ast_dll->_ast_stderr)
-
-#else
-
-#define stdin (&_Sfstdin)
-#define stdout (&_Sfstdout)
-#define stderr (&_Sfstderr)
-
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define feof(f) sfeof(f)
-#define ferror(f) sferror(f)
-#define fileno(f) sffileno(f)
-#define fputc(c,f) sfputc(f,c)
-#define getc(f) sfgetc(f)
-#define getchar() sfgetc(sfstdin)
-#define putc(c,f) sfputc(f,c)
-#define putchar(c) sfputc(sfstdout,c)
-
-#else
-
-#if !_UWIN
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-#endif
-
-extern __MANGLE__ FILE _Sfstdin;
-extern __MANGLE__ FILE _Sfstdout;
-extern __MANGLE__ FILE _Sfstderr;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define feof(f) (_sf_(f)->_flags&_SF_EOF)
-#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
-#define fileno(f) (_sf_(f)->_file)
-#define fputc(c,f) (_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
-#define getc(f) (_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
-#define getchar() getc(stdin)
-#define putc(c,f) fputc(c,f)
-#define putchar(c) fputc(c,stdout)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _sffilbuf __PROTO__((FILE*, int));
-extern __MANGLE__ int _sfflsbuf __PROTO__((FILE*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_sys.h b/usr/src/lib/libast/i386/src/lib/libast/ast_sys.h
deleted file mode 100644
index 79554b0821..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_sys.h
+++ /dev/null
@@ -1,150 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
-#ifndef _AST_SYS_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_SYS_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#if __mips == 2 && !defined(_NO_LARGEFILE64_SOURCE)
-#define _NO_LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_NO_LARGEFILE64_SOURCE) && _typ_off64_t && _lib_lseek64 && _lib_stat64
-#if !defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#else
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#undef _typ_off64_t
-#undef _typ_struct_dirent64
-#undef _lib_creat64
-#undef _lib_fstat64
-#undef _lib_fstatvfs64
-#undef _lib_ftruncate64
-#undef _lib_lseek64
-#undef _lib_lstat64
-#undef _lib_mmap64
-#undef _lib_open64
-#undef _lib_readdir64
-#undef _lib_stat64
-#undef _lib_statvfs64
-#undef _lib_truncate64
-#endif
-#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
-#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
-#endif
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <locale.h>
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _typ_dev_t 1 /* dev_t is a type */
-#define _typ_nlink_t 1 /* nlink_t is a type */
-#define _typ_gid_t 1 /* gid_t is a type */
-#define _typ_mode_t 1 /* mode_t is a type */
-#define _typ_uid_t 1 /* uid_t is a type */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _typ_wchar_t 1 /* wchar_t is a type */
-#define _typ_pid_t 1 /* pid_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _typ_wint_t 1 /* wint_t is a type */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _typ_socklen_t 1 /* socklen_t is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_ino_t 1 /* ino_t is a type */
-#define _typ_off_t 1 /* off_t is a type */
-#define _typ_ptrdiff_t 1 /* ptrdiff_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#define _typ_div_t 1 /* div_t is a type */
-#define _typ_ldiv_t 1 /* ldiv_t is a type */
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
-extern __MANGLE__ pid_t spawnveg __PROTO__((const char*, char* const[], char* const[], pid_t));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#if !defined(va_start)
-#if defined(__STDARG__)
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/ast_wchar.h b/usr/src/lib/libast/i386/src/lib/libast/ast_wchar.h
deleted file mode 100644
index 83865979fc..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/ast_wchar.h
+++ /dev/null
@@ -1,187 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_wchar_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */
-#define _lib_wctomb 1 /* wctomb() in default lib(s) */
-#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */
-#define _lib_wcslen 1 /* wcslen() in default lib(s) */
-#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */
-#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */
-#define _lib_towlower 1 /* towlower() in default lib(s) */
-#define _lib_towupper 1 /* towupper() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_mbstate_t 1 /* mbstate_t is a type */
-#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */
-#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */
-#ifndef _SFSTDIO_H
-#include <ast_common.h>
-#include <stdio.h>
-#endif
-#if _hdr_wchar && defined(_nxt_wchar)
-#include <../include/wchar.h> /* the native wchar.h */
-#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
-
-#ifndef WEOF
-#define WEOF (-1)
-#endif
-
-#undef fgetwc
-#undef fgetws
-#undef fputwc
-#undef fputws
-#undef getwc
-#undef getwchar
-#undef getws
-#undef putwc
-#undef putwchar
-#undef ungetwc
-
-#define fgetwc _ast_fgetwc
-#define fgetws _ast_fgetws
-#define fputwc _ast_fputwc
-#define fputws _ast_fputws
-#define fwide _ast_fwide
-#define fwprintf _ast_fwprintf
-#define fwscanf _ast_fwscanf
-#define getwc _ast_getwc
-#define getwchar _ast_getwchar
-#define getws _ast_getws
-#define putwc _ast_putwc
-#define putwchar _ast_putwchar
-#define swprintf _ast_swprintf
-#define swscanf _ast_swscanf
-#define ungetwc _ast_ungetwc
-#define vfwprintf _ast_vfwprintf
-#define vfwscanf _ast_vfwscanf
-#define vswprintf _ast_vswprintf
-#define vswscanf _ast_vswscanf
-#define vwprintf _ast_vwprintf
-#define vwscanf _ast_vwscanf
-#define wprintf _ast_wprintf
-#define wscanf _ast_wscanf
-
-#if !_typ_mbstate_t
-#undef _typ_mbstate_t
-#define _typ_mbstate_t 1
-typedef char mbstate_t;
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_mbstowcs
-extern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t));
-#endif
-#if !_lib_wctomb
-extern __MANGLE__ int wctomb __PROTO__((char*, wchar_t));
-#endif
-#if !_lib_wcrtomb
-extern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
-#endif
-#if !_lib_wcslen
-extern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*));
-#endif
-#if !_lib_wcstombs
-extern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t));
-#endif
-
-extern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ wint_t fgetwc __PROTO__((FILE*));
-extern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*));
-extern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*));
-extern __MANGLE__ int fwide __PROTO__((FILE*, int));
-extern __MANGLE__ wint_t getwc __PROTO__((FILE*));
-extern __MANGLE__ wint_t getwchar __PROTO__((void));
-extern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*));
-extern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ wint_t putwchar __PROTO__((wchar_t));
-extern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
-extern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
-extern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*));
-extern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
-extern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
-extern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...));
-extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/lc.h b/usr/src/lib/libast/i386/src/lib/libast/lc.h
deleted file mode 100644
index 65fdab45ab..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/lc.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated by ./lcgen : : */
-
-
-#ifndef _LC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LC_H 1
-
-#include <ast.h>
-
-#define LC_abbreviated 0x00001
-#define LC_checked 0x00002
-#define LC_debug 0x00004
-#define LC_default 0x00008
-#define LC_defined 0x00010
-#define LC_local 0x00020
-#define LC_primary 0x00040
-#define LC_qualified 0x00080
-#define LC_undefined 0x00100
-#define LC_utf8 0x00200
-#define LC_verbose 0x00400
-#define LC_setlocale 0x10000
-#define LC_setenv 0x20000
-#define LC_user 0x40000
-#define LC_language_attribute_max 2
-#define LC_territory_language_max 4
-
-struct Lc_s;
-
-typedef struct Lc_info_s
-{
- const struct Lc_s* lc;
- unsigned long number;
- __V_* data;
-} Lc_info_t;
-
-typedef struct Lc_attribute_s
-{
- const char* name;
- unsigned long flags;
- unsigned long index;
-} Lc_attribute_t;
-
-typedef struct Lc_charset_s
-{
- const char* code;
- const char* alternates;
- const char* ms;
- unsigned long index;
-} Lc_charset_t;
-
-typedef struct Lc_language_s
-{
- const char* code;
- const char* name;
- const char* alternates;
- const Lc_charset_t* charset;
- unsigned long flags;
- unsigned long index;
- const Lc_attribute_t* attributes[LC_language_attribute_max];
-} Lc_language_t;
-
-typedef struct Lc_territory_s
-{
- const char* code;
- const char* name;
- unsigned long flags;
- unsigned long index;
- const Lc_language_t* languages[LC_territory_language_max];
-#ifdef _LC_TERRITORY_PRIVATE_
- _LC_TERRITORY_PRIVATE_
-#endif
-} Lc_territory_t;
-
-typedef struct Lc_map_s
-{
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_t* attribute;
-} Lc_map_t;
-
-typedef struct Lc_attribute_list_s
-{
- struct Lc_attribute_list_s* next;
- const Lc_attribute_t* attribute;
-} Lc_attribute_list_t;
-
-typedef struct Lc_s
-{
- const char* name;
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_list_t* attributes;
- unsigned long flags;
- unsigned long index;
-#ifdef _LC_PRIVATE_
- _LC_PRIVATE_
-#endif
-} Lc_t;
-
-struct Lc_category_s;
-
-typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
-
-typedef struct Lc_category_s
-{
- const char* name;
- int external;
- int internal;
- Lc_category_set_f setf;
- Lc_t* prev;
- unsigned int flags;
-} Lc_category_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
-extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
-extern __MANGLE__ int lcindex __PROTO__((int, int));
-extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
-extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
-extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/i386/src/lib/libast/preroot.h b/usr/src/lib/libast/i386/src/lib/libast/preroot.h
deleted file mode 100644
index aa448b50fb..0000000000
--- a/usr/src/lib/libast/i386/src/lib/libast/preroot.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/align.h b/usr/src/lib/libast/sparc/include/ast/align.h
deleted file mode 100644
index a28e9b7ae3..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/align.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
-#ifndef _def_align_ast
-#define _def_align_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
-
-#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
-#define ALIGN_POINTER(x) ((char*)(x))
-#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
-
-#define ALIGN_BOUND ALIGN_BOUND2
-#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
-
-#define ALIGN_BIT1 0x1
-#define ALIGN_BOUND1 ALIGN_BOUND2
-#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
-#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffe)
-#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
-#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
-
-#define ALIGN_BIT2 0x2
-#define ALIGN_BOUND2 8
-#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+7)
-#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffff8)
-#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffd)
-#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
-#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast.h b/usr/src/lib/libast/sparc/include/ast/ast.h
deleted file mode 100644
index 5c0d5dcd30..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast.h
+++ /dev/null
@@ -1,388 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Advanced Software Technology Library
- * AT&T Research
- *
- * std + posix + ast
- */
-
-#ifndef _AST_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_H
-
-#include <ast_version.h>
-
-#ifndef _AST_STD_H
-#include <ast_std.h>
-#endif
-
-#ifndef _SFIO_H
-#include <sfio.h>
-#endif
-
-#ifndef ast
-#define ast _ast_info
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 1024
-#endif
-
-/*
- * workaround botched headers that assume <stdio.h>
- */
-
-#ifndef FILE
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-#define FILE struct _sfio_s
-#ifndef __FILE_typedef
-#define __FILE_typedef 1
-#endif
-#ifndef _FILEDEFED
-#define _FILEDEFED 1
-#endif
-#endif
-
-/*
- * exit() support -- this matches shell exit codes
- */
-
-#define EXIT_BITS 8 /* # exit status bits */
-
-#define EXIT_USAGE 2 /* usage exit code */
-#define EXIT_QUIT ((1<<(EXIT_BITS))-1) /* parent should quit */
-#define EXIT_NOTFOUND ((1<<(EXIT_BITS-1))-1) /* command not found */
-#define EXIT_NOEXEC ((1<<(EXIT_BITS-1))-2) /* other exec error */
-
-#define EXIT_CODE(x) ((x)&((1<<EXIT_BITS)-1))
-#define EXIT_CORE(x) (EXIT_CODE(x)|(1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))
-#define EXIT_TERM(x) (EXIT_CODE(x)|(1<<EXIT_BITS))
-
-/*
- * NOTE: for compatibility the following work for EXIT_BITS={7,8}
- */
-
-#define EXIT_STATUS(x) (((x)&((1<<(EXIT_BITS-2))-1))?(x):EXIT_CODE((x)>>EXIT_BITS))
-
-#define EXITED_CORE(x) (((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))==((1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))||((x)&((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))==((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))
-#define EXITED_TERM(x) ((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))
-
-/*
- * astconflist() flags
- */
-
-#define ASTCONF_parse 0x0001
-#define ASTCONF_write 0x0002
-#define ASTCONF_read 0x0004
-#define ASTCONF_lower 0x0008
-#define ASTCONF_base 0x0010
-#define ASTCONF_defined 0x0020
-#define ASTCONF_quote 0x0040
-#define ASTCONF_table 0x0080
-#define ASTCONF_matchcall 0x0100
-#define ASTCONF_matchname 0x0200
-#define ASTCONF_matchstandard 0x0400
-#define ASTCONF_error 0x0800
-#define ASTCONF_system 0x1000
-#define ASTCONF_AST 0x2000
-
-/*
- * pathcanon() flags
- */
-
-#define PATH_PHYSICAL 01
-#define PATH_DOTDOT 02
-#define PATH_EXISTS 04
-#define PATH_VERIFIED(n) (((n)&01777)<<5)
-
-/*
- * pathaccess() flags
- */
-
-#define PATH_READ 004
-#define PATH_WRITE 002
-#define PATH_EXECUTE 001
-#define PATH_REGULAR 010
-#define PATH_ABSOLUTE 020
-
-/*
- * touch() flags
- */
-
-#define PATH_TOUCH_CREATE 01
-#define PATH_TOUCH_VERBATIM 02
-
-/*
- * pathcheck() info
- */
-
-typedef struct
-{
- unsigned long date;
- char* feature;
- char* host;
- char* user;
-} Pathcheck_t;
-
-/*
- * strgrpmatch() flags
- */
-
-#define STR_MAXIMAL 01 /* maximal match */
-#define STR_LEFT 02 /* implicit left anchor */
-#define STR_RIGHT 04 /* implicit right anchor */
-#define STR_ICASE 010 /* ignore case */
-#define STR_GROUP 020 /* (|&) inside [@|&](...) only */
-
-/*
- * fmtquote() flags
- */
-
-#define FMT_ALWAYS 0x01 /* always quote */
-#define FMT_ESCAPED 0x02 /* already escaped */
-#define FMT_SHELL 0x04 /* escape $ ` too */
-#define FMT_WIDE 0x08 /* don't escape 8 bit chars */
-#define FMT_PARAM 0x10 /* disable FMT_SHELL ${$( quote */
-
-/*
- * multibyte macros
- */
-
-#define mbmax() (ast.mb_cur_max)
-#define mberr() (ast.tmp_int<0)
-
-#define mbcoll() (ast.mb_xfrm!=0)
-#define mbwide() (mbmax()>1)
-
-#define mbchar(p) (mbwide()?((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),mbmax()))>0?((p+=ast.tmp_int),ast.tmp_wchar):(p+=ast.mb_sync+1,ast.tmp_int)):(*(unsigned char*)(p++)))
-#define mbinit() (mbwide()?(*ast.mb_towc)((wchar_t*)0,(char*)0,mbmax()):0)
-#define mbsize(p) (mbwide()?(*ast.mb_len)((char*)(p),mbmax()):((p),1))
-#define mbconv(s,w) (ast.mb_conv?(*ast.mb_conv)(s,w):((*(s)=(w)),1))
-#define mbwidth(w) (ast.mb_width&&((ast.tmp_int=(*ast.mb_width)(w))>=0||(w)>UCHAR_MAX)?ast.tmp_int:1)
-#define mbxfrm(t,f,n) (mbcoll()?(*ast.mb_xfrm)((char*)(t),(char*)(f),n):0)
-
-/*
- * common macros
- */
-
-#define elementsof(x) (sizeof(x)/sizeof(x[0]))
-#define integralof(x) (((char*)(x))-((char*)0))
-#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
-#define oldof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)malloc(sizeof(t)*(n)+(x)))
-#define pointerof(x) ((__V_*)((char*)0+(x)))
-#define roundof(x,y) (((x)+(y)-1)&~((y)-1))
-#define ssizeof(x) ((int)sizeof(x))
-
-#define streq(a,b) (*(a)==*(b)&&!strcmp(a,b))
-#define strneq(a,b,n) (*(a)==*(b)&&!strncmp(a,b,n))
-#define strsignal(s) fmtsignal(s)
-
-#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
-#define NiL 0
-#define NoP(x) (void)(x)
-#else
-#define NiL ((char*)0)
-#define NoP(x) (&x,1)
-#endif
-
-#if !defined(NoF)
-#if defined(__STDC__) || defined(__STDPP__)
-#define NoF(x) void _DATA_ ## x () {}
-#else
-#define NoF(x) void _DATA_/**/x () {}
-#endif
-#if !defined(_DATA_)
-#define _DATA_
-#endif
-#endif
-
-#if !defined(NoN)
-#if defined(__STDC__) || defined(__STDPP__)
-#define NoN(x) void _STUB_ ## x () {}
-#else
-#define NoN(x) void _STUB_/**/x () {}
-#endif
-#if !defined(_STUB_)
-#define _STUB_
-#endif
-#endif
-
-#define NOT_USED(x) NoP(x)
-
-typedef int (*Error_f) __PROTO__((__V_*, __V_*, int, ...));
-
-typedef int (*Ast_confdisc_f) __PROTO__((const char*, const char*, const char*));
-typedef int (*Strcmp_context_f) __PROTO__((const char*, const char*, __V_*));
-typedef int (*Strcmp_f) __PROTO__((const char*, const char*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* astgetconf __PROTO__((const char*, const char*, const char*, int, Error_f));
-extern __MANGLE__ char* astconf __PROTO__((const char*, const char*, const char*));
-extern __MANGLE__ Ast_confdisc_f astconfdisc __PROTO__((Ast_confdisc_f));
-extern __MANGLE__ void astconflist __PROTO__((Sfio_t*, const char*, int, const char*));
-extern __MANGLE__ off_t astcopy __PROTO__((int, int, off_t));
-extern __MANGLE__ int astlicense __PROTO__((char*, int, char*, char*, int, int, int));
-extern __MANGLE__ int astquery __PROTO__((int, const char*, ...));
-extern __MANGLE__ void astwinsize __PROTO__((int, int*, int*));
-
-extern __MANGLE__ ssize_t base64encode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
-extern __MANGLE__ ssize_t base64decode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
-extern __MANGLE__ int chresc __PROTO__((const char*, char**));
-extern __MANGLE__ int chrtoi __PROTO__((const char*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ char* fmtbase __PROTO__((long, int, int));
-extern __MANGLE__ char* fmtbasell __PROTO__((intmax_t, int, int));
-#define fmtbase(a,b,c) fmtbasell((intmax_t)(a),b,c) /* until 2003-09-01 */
-extern __MANGLE__ char* fmtbuf __PROTO__((size_t));
-extern __MANGLE__ char* fmtclock __PROTO__((Sfulong_t));
-extern __MANGLE__ char* fmtelapsed __PROTO__((unsigned long, int));
-extern __MANGLE__ char* fmterror __PROTO__((int));
-extern __MANGLE__ char* fmtesc __PROTO__((const char*));
-extern __MANGLE__ char* fmtesq __PROTO__((const char*, const char*));
-extern __MANGLE__ char* fmtident __PROTO__((const char*));
-extern __MANGLE__ char* fmtip4 __PROTO__((uint32_t, int));
-extern __MANGLE__ char* fmtfmt __PROTO__((const char*));
-extern __MANGLE__ char* fmtgid __PROTO__((int));
-extern __MANGLE__ char* fmtmatch __PROTO__((const char*));
-extern __MANGLE__ char* fmtmode __PROTO__((int, int));
-extern __MANGLE__ char* fmtnesq __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ char* fmtnum __PROTO__((unsigned long, int));
-extern __MANGLE__ char* fmtperm __PROTO__((int));
-extern __MANGLE__ char* fmtquote __PROTO__((const char*, const char*, const char*, size_t, int));
-extern __MANGLE__ char* fmtre __PROTO__((const char*));
-extern __MANGLE__ char* fmtscale __PROTO__((Sfulong_t, int));
-extern __MANGLE__ char* fmtsignal __PROTO__((int));
-extern __MANGLE__ char* fmttime __PROTO__((const char*, time_t));
-extern __MANGLE__ char* fmtuid __PROTO__((int));
-extern __MANGLE__ char* fmtversion __PROTO__((unsigned long));
-extern __MANGLE__ __V_* memdup __PROTO__((const __V_*, size_t));
-extern __MANGLE__ void memfatal __PROTO__((void));
-extern __MANGLE__ unsigned int memhash __PROTO__((const __V_*, int));
-extern __MANGLE__ unsigned long memsum __PROTO__((const __V_*, int, unsigned long));
-extern __MANGLE__ char* pathaccess __PROTO__((char*, const char*, const char*, const char*, int));
-extern __MANGLE__ char* pathbin __PROTO__((void));
-extern __MANGLE__ char* pathcanon __PROTO__((char*, int));
-extern __MANGLE__ char* pathcat __PROTO__((char*, const char*, int, const char*, const char*));
-extern __MANGLE__ int pathcd __PROTO__((const char*, const char*));
-extern __MANGLE__ int pathcheck __PROTO__((const char*, const char*, Pathcheck_t*));
-extern __MANGLE__ int pathexists __PROTO__((char*, int));
-extern __MANGLE__ char* pathfind __PROTO__((const char*, const char*, const char*, char*, size_t));
-extern __MANGLE__ int pathgetlink __PROTO__((const char*, char*, int));
-extern __MANGLE__ int pathinclude __PROTO__((const char*));
-extern __MANGLE__ char* pathkey __PROTO__((char*, char*, const char*, const char*, const char*));
-extern __MANGLE__ size_t pathnative __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathpath __PROTO__((char*, const char*, const char*, int));
-extern __MANGLE__ size_t pathposix __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathprobe __PROTO__((char*, char*, const char*, const char*, const char*, int));
-extern __MANGLE__ size_t pathprog __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathrepl __PROTO__((char*, const char*, const char*));
-extern __MANGLE__ int pathsetlink __PROTO__((const char*, const char*));
-extern __MANGLE__ char* pathshell __PROTO__((void));
-extern __MANGLE__ char* pathtemp __PROTO__((char*, size_t, const char*, const char*, int*));
-extern __MANGLE__ char* pathtmp __PROTO__((char*, const char*, const char*, int*));
-extern __MANGLE__ char* setenviron __PROTO__((const char*));
-extern __MANGLE__ int stracmp __PROTO__((const char*, const char*));
-extern __MANGLE__ char* strcopy __PROTO__((char*, const char*));
-extern __MANGLE__ unsigned long strelapsed __PROTO__((const char*, char**, int));
-extern __MANGLE__ int stresc __PROTO__((char*));
-extern __MANGLE__ long streval __PROTO__((const char*, char**, long(*)(const char*, char**)));
-extern __MANGLE__ long strexpr __PROTO__((const char*, char**, long(*)(const char*, char**, __V_*), __V_*));
-extern __MANGLE__ int strgid __PROTO__((const char*));
-extern __MANGLE__ int strgrpmatch __PROTO__((const char*, const char*, int*, int, int));
-extern __MANGLE__ unsigned int strhash __PROTO__((const char*));
-extern __MANGLE__ __V_* strlook __PROTO__((const __V_*, size_t, const char*));
-extern __MANGLE__ int strmatch __PROTO__((const char*, const char*));
-extern __MANGLE__ int strmode __PROTO__((const char*));
-extern __MANGLE__ int strnacmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ char* strncopy __PROTO__((char*, const char*, size_t));
-extern __MANGLE__ int strnpcmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ double strntod __PROTO__((const char*, size_t, char**));
-extern __MANGLE__ _ast_fltmax_t strntold __PROTO__((const char*, size_t, char**));
-extern __MANGLE__ long strntol __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ intmax_t strntoll __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ long strnton __PROTO__((const char*, size_t, char**, char*, int));
-extern __MANGLE__ unsigned long strntoul __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ intmax_t strntonll __PROTO__((const char*, size_t, char**, char*, int));
-extern __MANGLE__ uintmax_t strntoull __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ int strnvcmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ int stropt __PROTO__((const char*, const __V_*, int, int(*)(__V_*, const __V_*, int, const char*), __V_*));
-extern __MANGLE__ int strpcmp __PROTO__((const char*, const char*));
-extern __MANGLE__ int strperm __PROTO__((const char*, char**, int));
-extern __MANGLE__ __V_* strpsearch __PROTO__((const __V_*, size_t, size_t, const char*, char**));
-extern __MANGLE__ __V_* strsearch __PROTO__((const __V_*, size_t, size_t, Strcmp_f, const char*, __V_*));
-extern __MANGLE__ void strsort __PROTO__((char**, int, int(*)(const char*, const char*)));
-extern __MANGLE__ char* strsubmatch __PROTO__((const char*, const char*, int));
-extern __MANGLE__ unsigned long strsum __PROTO__((const char*, unsigned long));
-extern __MANGLE__ char* strtape __PROTO__((const char*, char**));
-extern __MANGLE__ int strtoip4 __PROTO__((const char*, char**, uint32_t*, unsigned char*));
-extern __MANGLE__ long strton __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ intmax_t strtonll __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ int struid __PROTO__((const char*));
-extern __MANGLE__ int struniq __PROTO__((char**, int));
-extern __MANGLE__ int strvcmp __PROTO__((const char*, const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/*
- * C library global data symbols not prototyped by <unistd.h>
- */
-
-#if !defined(environ) && defined(__DYNAMIC__)
-#define environ __DYNAMIC__(environ)
-#else
-extern __MANGLE__ char** environ;
-#endif
-
-/*
- * really handy malloc()/free() (__FILE__,__LINE__,__FUNCTION__) tracing
- * make with VMDEBUG==1 or debug=1 or CCFLAGS=$(CC.DEBUG)
- * VMDEBUG==0 disables
- * at runtime export VMDEBUG or VMTRACE per vmalloc.3
- * to list originating call locations
- */
-
-#if !_std_malloc && !defined(VMFL) && !defined(_VMHDR_H) && \
- (!defined(VMDEBUG) || VMDEBUG) && (VMDEBUG || _BLD_DEBUG)
-
-#define VMFL 1
-#include <vmalloc.h>
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_botch.h b/usr/src/lib/libast/sparc/include/ast/ast_botch.h
deleted file mode 100644
index 1fd7e259fa..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_botch.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_ccode.h b/usr/src/lib/libast/sparc/include/ast/ast_ccode.h
deleted file mode 100644
index e9b0989f40..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_ccode.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
-#ifndef _def_ccode_ast
-#define _def_ccode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define CC_ASCII 1 /* ISO-8859-1 */
-#define CC_EBCDIC_E 2 /* Xopen dd(1) EBCDIC */
-#define CC_EBCDIC_I 3 /* Xopen dd(1) IBM */
-#define CC_EBCDIC_O 4 /* IBM-1047 mvs OpenEdition */
-#define CC_EBCDIC_S 5 /* Siemens posix-bc */
-#define CC_EBCDIC_H 6 /* IBM-37 AS/400 */
-#define CC_EBCDIC_M 7 /* IBM mvs cobol */
-#define CC_EBCDIC_U 8 /* microfocus cobol */
-
-#define CC_MAPS 8 /* number of code maps */
-
-#define CC_EBCDIC CC_EBCDIC_E
-#define CC_EBCDIC1 CC_EBCDIC_E
-#define CC_EBCDIC2 CC_EBCDIC_I
-#define CC_EBCDIC3 CC_EBCDIC_O
-
-#define CC_NATIVE CC_ASCII /* native character code */
-#define CC_ALIEN CC_EBCDIC /* alien character code */
-
-#define CC_bel 0007 /* bel character */
-#define CC_esc 0033 /* esc character */
-#define CC_sub 0032 /* sub character */
-#define CC_vt 0013 /* vt character */
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_common.h b/usr/src/lib/libast/sparc/include/ast/ast_common.h
deleted file mode 100644
index 053f63fd0e..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_common.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
-#ifndef _AST_COMMON_H
-#define _AST_COMMON_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_pthread 1 /* #include <pthread.h> ok */
-#define _hdr_stdarg 1 /* #include <stdarg.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdint 1 /* #include <stdint.h> ok */
-#define _hdr_inttypes 1 /* #include <inttypes.h> ok */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_long_double 1 /* long double is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _std_proto 1 /* standard C prototypes ok */
-#define _ptr_void 1 /* standard C void* ok */
-/* disable non-standard linux/gnu inlines */
-#ifdef __GNUC__
-# undef __OPTIMIZE_SIZE__
-# define __OPTIMIZE_SIZE__ 1
-#endif
-
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && __STDC__
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && (__cplusplus || c_plusplus)
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && _std_proto
-# define __STD_C 1
-#endif
-#if !defined(__STD_C)
-# define __STD_C 0
-#endif
-
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-# if __cplusplus || c_plusplus
-# define _BEGIN_EXTERNS_ extern "C" {
-# define _END_EXTERNS_ }
-# else
-# define _BEGIN_EXTERNS_
-# define _END_EXTERNS_
-# endif
-#endif
-
-/* _ARG_ simplifies function prototyping among flavors of C */
-#ifndef _ARG_
-# if __STD_C
-# define _ARG_(x) x
-# else
-# define _ARG_(x) ()
-# endif
-#endif
-
-/* _NIL_ simplifies defining nil pointers to a given type */
-#ifndef _NIL_
-# define _NIL_(x) ((x)0)
-#endif
-
-/* __INLINE__ is the inline keyword */
-#if !defined(__INLINE__) && defined(__cplusplus)
-# define __INLINE__ inline
-#endif
-#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-#endif
-
-/* Void_t is defined so that Void_t* can address any type */
-#ifndef Void_t
-# if __STD_C
-# define Void_t void
-# else
-# define Void_t char
-# endif
-#endif
-
-/* windows variants and veneers */
-#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
-# define _WINIX 1
-#endif
-
-/* dynamic linked library external scope handling */
-#ifdef __DYNAMIC__
-# undef __DYNAMIC__
-# ifndef _DLL
-# define _DLL 1
-# endif
-#endif
-#if _dll_import
-# if _BLD_STATIC && !_BLD_DLL
-# undef _DLL
-# else
-# if !_UWIN && !defined(_DLL)
-# define _DLL 1
-# endif
-# endif
-# if !defined(__EXPORT__) && _BLD_DLL
-# define __EXPORT__ __declspec(dllexport)
-# endif
-# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
-# define __IMPORT__ __declspec(dllimport)
-# endif
-# if _BLD_DLL && _UWIN
-# define __DYNAMIC__(v) (_ast_getdll()->_ast_ ## v)
-# endif
-#endif
-#if !defined(_astimport)
-# if defined(__IMPORT__) && defined(_DLL)
-# define _astimport __IMPORT__
-# else
-# define _astimport extern
-# endif
-#endif
-#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
-# ifdef __STDC__
-# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
-# else
-# define __EXTERN__(T,obj) extern T obj; T* _imp__/**/obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__/**/obj = &obj
-# endif
-#else
-# define __EXTERN__(T,obj) extern T obj
-# define __DEFINE__(T,obj,val) T obj = val
-#endif
-
-#define _ast_LL 1 /* LL numeric suffix supported */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intswap 0
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt16_t long double
-#define _ast_fltmax_t _ast_flt16_t
-#define _typ_int8_t 1 /* int8_t is a type */
-#define _typ_uint8_t 1 /* uint8_t is a type */
-#define _typ_int16_t 1 /* int16_t is a type */
-#define _typ_uint16_t 1 /* uint16_t is a type */
-#define _typ_int32_t 1 /* int32_t is a type */
-#define _typ_uint32_t 1 /* uint32_t is a type */
-#define _typ_int64_t 1 /* int64_t is a type */
-#define _typ_uint64_t 1 /* uint64_t is a type */
-#define _typ_intmax_t 1 /* intmax_t is a type */
-#define _typ_uintmax_t 1 /* uintmax_t is a type */
-
-#ifndef va_listref
-#ifndef va_start
-#if __STD_C
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-#define va_listref(p) (p) /* pass va_list to varargs function */
-#define va_listval(p) (p) /* retrieve va_list from va_arg(ap,va_listarg) */
-#define va_listarg va_list /* va_arg() va_list type */
-#endif
-#ifndef _AST_STD_H
-# if __STD_C && _hdr_stddef
-# include <stddef.h>
-# endif
-# if _sys_types
-# include <sys/types.h>
-# endif
-# if _hdr_stdint
-# include <stdint.h>
-# else
-# if _hdr_inttypes
-# include <inttypes.h>
-# endif
-# endif
-#endif
-#if !_typ_size_t
-# define _typ_size_t 1
- typedef int size_t;
-#endif
-#if !_typ_ssize_t
-# define _typ_ssize_t 1
- typedef int ssize_t;
-#endif
-#ifndef _AST_STD_H
-# if !_def_map_ast
-# include <ast_map.h>
-# endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_dir.h b/usr/src/lib/libast/sparc/include/ast/ast_dir.h
deleted file mode 100644
index c873ed3253..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_dir.h
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * AT&T Research
- *
- * common dirent maintenance interface
- */
-
-#ifndef _AST_DIR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_DIR_H
-
-#include <ast_lib.h>
-
-#if _mem_d_fileno_dirent || _mem_d_ino_dirent
-#if !_mem_d_fileno_dirent
-#undef _mem_d_fileno_dirent
-#define _mem_d_fileno_dirent 1
-#define d_fileno d_ino
-#endif
-#endif
-
-#if _BLD_ast
-#include "dirlib.h"
-#else
-#include <dirent.h>
-#endif
-
-#if _mem_d_fileno_dirent
-#define D_FILENO(d) ((d)->d_fileno)
-#endif
-
-#if _mem_d_namlen_dirent
-#define D_NAMLEN(d) ((d)->d_namlen)
-#else
-#define D_NAMLEN(d) (strlen((d)->d_name))
-#endif
-
-#if _mem_d_reclen_dirent
-#define D_RECLEN(d) ((d)->d_reclen)
-#else
-#define D_RECLEN(d) D_RECSIZ(d,D_NAMLEN(d))
-#endif
-
-#define D_RECSIZ(d,n) (sizeof(*(d))-sizeof((d)->d_name)+((n)+sizeof(char*))&~(sizeof(char*)-1))
-
-/*
- * NOTE: 2003-03-27 mac osx bug symlink==DT_REG bug discovered;
- * the kernel *and* all directories must be fixed, so d_type
- * is summarily disabled until we see that happen
- */
-
-#if _mem_d_type_dirent && defined(DT_UNKNOWN) && defined(DT_REG) && defined(DT_DIR) && defined(DT_LNK) && ! ( __APPLE__ || __MACH__ )
-#define D_TYPE(d) ((d)->d_type)
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_dirent.h b/usr/src/lib/libast/sparc/include/ast/ast_dirent.h
deleted file mode 100644
index cf636547bc..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_dirent.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
-#ifndef _def_dirent_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dirent_ast 1
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _nxt_dirent <../include/dirent.h> /* include path for the native <dirent.h> */
-#define _nxt_dirent_str "../include/dirent.h" /* include string for the native <dirent.h> */
-/*
- * <dirent.h> for [fl]stat64 and off64_t
- */
-
-#ifndef _AST_STD_H
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#else
-
-#ifndef _DIR64_H
-#define _DIR64_H
-
-#include <ast_std.h>
-
-#if _typ_off64_t
-#undef off_t
-#endif
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#if _typ_off64_t
-#define off_t off64_t
-#endif
-
-#if _lib_readdir64 && _typ_struct_dirent64
-#ifndef dirent
-#define dirent dirent64
-#endif
-#ifndef readdir
-#define readdir readdir64
-#endif
-#endif
-
-#endif
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_fcntl.h b/usr/src/lib/libast/sparc/include/ast/ast_fcntl.h
deleted file mode 100644
index 89054d693d..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_fcntl.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
-#ifndef _def_fcntl_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fcntl_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <ast_fs.h>
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#define O_BINARY 0
-#define O_TEMPORARY 0
-#define O_TEXT 0
-
-#include <ast_fs.h>
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_fstat64
-#define fstat fstat64
-#endif
-#if _lib_lstat64
-#define lstat lstat64
-#endif
-#if _lib_stat64
-#define stat stat64
-#endif
-#if _lib_creat64
-#define creat creat64
-#endif
-#if _lib_mmap64
-#define mmap mmap64
-#endif
-#if _lib_open64
-#undef open
-#define open open64
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_float.h b/usr/src/lib/libast/sparc/include/ast/ast_float.h
deleted file mode 100644
index 9daf7507af..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_float.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
-#ifndef _def_float_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_float_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_float 1 /* #include <float.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_math 1 /* #include <math.h> ok */
-#define _hdr_values 1 /* #include <values.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
-#define _lib_frexp 1 /* frexp() in default lib(s) */
-#define _lib_frexpl 1 /* frexpl() in default lib(s) */
-#define _lib_ldexp 1 /* ldexp() in default lib(s) */
-#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
-#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
-#define _lib_copysign 1 /* copysign() in default lib(s) */
-#define _lib_copysignl 1 /* copysignl() in default lib(s) */
-#include <ast_common.h>
-#include <float.h>
-#include <math.h>
-#ifndef FLT_DIG
-#define FLT_DIG 6
-#endif
-#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
-#endif
-#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
-#endif
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
-#endif
-#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
-#endif
-#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
-#endif
-#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
-#endif
-#ifndef DBL_DIG
-#define DBL_DIG 15
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
-#endif
-#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
-#endif
-#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
-#endif
-#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
-#endif
-#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
-#endif
-#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
-#endif
-#ifndef LDBL_DIG
-#define LDBL_DIG 33
-#endif
-#ifndef LDBL_MAX
-#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
-#endif
-#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
-#endif
-#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
-#endif
-#ifndef LDBL_MIN
-#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
-#endif
-#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
-#endif
-#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
-#endif
-
-
-#define USHRT_DIG 4
-#define UINT_DIG 9
-#define ULONG_DIG 9
-#define ULLONG_DIG 19
-#define UINTMAX_DIG ULLONG_DIG
-
-#define FLT_ULONG_MAX 4294967295.0F
-#define FLT_ULLONG_MAX 18446744073709551615.0F
-#define FLT_UINTMAX_MAX FLT_ULLONG_MAX
-#define FLT_LONG_MAX 2147483647.0F
-#define FLT_LLONG_MAX 9223372036854775807.0F
-#define FLT_INTMAX_MAX FLT_LLONG_MAX
-#define FLT_LONG_MIN (-2147483648.0F)
-#define FLT_LLONG_MIN (-9223372036854775808.0F)
-#define FLT_INTMAX_MIN FLT_LLONG_MIN
-
-#define DBL_ULONG_MAX 4294967295.0
-#define DBL_ULLONG_MAX 18446744073709551615.0
-#define DBL_UINTMAX_MAX DBL_ULLONG_MAX
-#define DBL_LONG_MAX 2147483647.0
-#define DBL_LLONG_MAX 9223372036854775807.0
-#define DBL_INTMAX_MAX DBL_LLONG_MAX
-#define DBL_LONG_MIN (-2147483648.0)
-#define DBL_LLONG_MIN (-9223372036854775808.0)
-#define DBL_INTMAX_MIN DBL_LLONG_MIN
-
-#define LDBL_ULONG_MAX 4294967295.0L
-#define LDBL_ULLONG_MAX 18446744073709551615.0L
-#define LDBL_UINTMAX_MAX LDBL_ULLONG_MAX
-#define LDBL_LONG_MAX 2147483647.0L
-#define LDBL_LLONG_MAX 9223372036854775807.0L
-#define LDBL_INTMAX_MAX LDBL_LLONG_MAX
-#define LDBL_LONG_MIN (-2147483648.0L)
-#define LDBL_LLONG_MIN (-9223372036854775808.0L)
-#define LDBL_INTMAX_MIN LDBL_LLONG_MIN
-
-#define FLTMAX_UINTMAX_MAX LDBL_UINTMAX_MAX
-#define FLTMAX_INTMAX_MAX LDBL_INTMAX_MAX
-#define FLTMAX_INTMAX_MIN LDBL_INTMAX_MIN
-
-typedef union _ast_dbl_exp_u
-{
- uint32_t e[sizeof(double)/4];
- double f;
-} _ast_dbl_exp_t;
-
-#define _ast_dbl_exp_index 0
-#define _ast_dbl_exp_shift 20
-
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 0
-#define _ast_fltmax_exp_shift 16
-
-#define _ast_flt_unsigned_max_t unsigned long long
-#define _ast_flt_nan_init 0x7f,0xff,0xff,0xff
-#define _ast_flt_inf_init 0x7f,0x80,0x00,0x00
-#define _ast_dbl_nan_init 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff
-#define _ast_dbl_inf_init 0x7f,0xf0,0x00,0x00,0x00,0x00,0x00,0x00
-#define _ast_ldbl_nan_init 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
-#define _ast_ldbl_inf_init 0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_fs.h b/usr/src/lib/libast/sparc/include/ast/ast_fs.h
deleted file mode 100644
index 9aff8a5b64..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_fs.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
-#ifndef _def_fs_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fs_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _lib_lstat 1 /* lstat() in default lib(s) */
-#define _lib_mknod 1 /* mknod() in default lib(s) */
-#define _lib_sync 1 /* sync() in default lib(s) */
-#include <sys/stat.h>
-#include <sys/mkdev.h>
-#define FS_default "ufs"
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
-#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
-#define _sys_mount 1 /* #include <sys/mount.h> ok */
-#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
-#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
-#define _sys_vfs 1 /* #include <sys/vfs.h> ok */
-#define _mem_st_blocks_stat 1 /* st_blocks is a member of struct stat */
-#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
-#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
-#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
-#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
-#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
-#define _lib_getmntent 1 /* getmntent() in default lib(s) */
-#define _lib_statfs 1 /* statfs() in default lib(s) */
-#define _lib_statvfs 1 /* statvfs() in default lib(s) */
-#define _lib_statfs4 1 /* compile{\ passed */
-#if _sys_statvfs
-#include <sys/statvfs.h>
-#if !_mem_statvfs_f_basetype
-#if _ary_f_reserved7
-#define f_basetype f_reserved7
-#endif
-#endif
-#else
-#define _mem_f_basetype_statvfs 1
-#define _mem_f_frsize_statvfs 1
-struct statvfs
-{
-unsigned long f_bsize; /* fundamental file system block size */
-unsigned long f_frsize; /* fragment size */
-unsigned long f_blocks; /* total # of blocks of f_frsize on fs */
-unsigned long f_bfree; /* total # of free blocks of f_frsize */
-unsigned long f_bavail; /* # of free blocks avail to non-superuser */
-unsigned long f_files; /* total # of file nodes (inodes) */
-unsigned long f_ffree; /* total # of free file nodes */
-unsigned long f_favail; /* # of free nodes avail to non-superuser */
-unsigned long f_fsid; /* file system id (dev for now) */
-char f_basetype[16]; /* target fs type name, null-terminated */
-unsigned long f_flag; /* bit-mask of flags */
-unsigned long f_namemax; /* maximum file name length */
-char f_fstr[32]; /* filesystem-specific string */
-unsigned long f_filler[16]; /* reserved for future expansion */
-};
-extern __MANGLE__ int fstatvfs __PROTO__((int, struct statvfs*));
-extern __MANGLE__ int statvfs __PROTO__((const char*, struct statvfs*));
-#endif
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_statvfs64 && !defined(statvfs)
-#define statvfs statvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int statvfs64 __PROTO__((const char*, struct statvfs64*));
-#endif
-#endif
-#if _lib_fstatvfs64 && !defined(fstatvfs)
-#define fstatvfs fstatvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int fstatvfs64 __PROTO__((int, struct statvfs64*));
-#endif
-#endif
-
-#define _str_st_fstype 1 /* stat.st_fstype is a string */
-#define _ary_st_pad4 1 /* stat.st_pad4 is an array */
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_getopt.h b/usr/src/lib/libast/sparc/include/ast/ast_getopt.h
deleted file mode 100644
index c86d826a72..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_getopt.h
+++ /dev/null
@@ -1,25 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#ifdef _AST_STD_I
-#undef _AST_GETOPT_H
-#define _AST_GETOPT_H -1
-#endif
-#ifndef _AST_GETOPT_H
-#define _AST_GETOPT_H 1
-
-extern __MANGLE__ int opterr;
-extern __MANGLE__ int optind;
-extern __MANGLE__ int optopt;
-extern __MANGLE__ char* optarg;
-
-extern __MANGLE__ int getopt __PROTO__((int, char* const*, const char*));
-extern __MANGLE__ int getsubopt __PROTO__((char**, char* const*, char**));
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_iconv.h b/usr/src/lib/libast/sparc/include/ast/ast_iconv.h
deleted file mode 100644
index 96c4aa39d6..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_iconv.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
-#ifndef _def_iconv_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_iconv_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_iconv 1 /* #include <iconv.h> ok */
-#define _lib_iconv_open 1 /* iconv_open() in default lib(s) */
-#define _lib_iconv_close 1 /* iconv_close() in default lib(s) */
-#define _lib_iconv 1 /* iconv() in default lib(s) */
-#define _nxt_iconv <../include/iconv.h> /* include path for the native <iconv.h> */
-#define _nxt_iconv_str "../include/iconv.h" /* include string for the native <iconv.h> */
-#include <ast_common.h>
-#include <ccode.h>
-#include <../include/iconv.h> /* the native iconv.h */
-
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
-
-#ifndef _ICONV_LIST_PRIVATE_
-#undef iconv_t
-#define iconv_t _ast_iconv_t
-#undef iconv_f
-#define iconv_f _ast_iconv_f
-#undef iconv_list_t
-#define iconv_list_t _ast_iconv_list_t
-#undef iconv_open
-#define iconv_open _ast_iconv_open
-#undef iconv
-#define iconv _ast_iconv
-#undef iconv_close
-#define iconv_close _ast_iconv_close
-#undef iconv_list
-#define iconv_list _ast_iconv_list
-#undef iconv_move
-#define iconv_move _ast_iconv_move
-#undef iconv_name
-#define iconv_name _ast_iconv_name
-#undef iconv_write
-#define iconv_write _ast_iconv_write
-#endif
-
-typedef Ccmap_t _ast_iconv_list_t;
-typedef __V_* _ast_iconv_t;
-typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ _ast_iconv_t _ast_iconv_open __PROTO__((const char*, const char*));
-extern __MANGLE__ size_t _ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
-extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
-extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
-#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
-#else
-#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_lib.h b/usr/src/lib/libast/sparc/include/ast/ast_lib.h
deleted file mode 100644
index 46518ebc9d..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_lib.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
-#ifndef _def_lib_ast
-#define _def_lib_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _hdr_fmtmsg 1 /* #include <fmtmsg.h> ok */
-#define _hdr_fnmatch 1 /* #include <fnmatch.h> ok */
-#define _hdr_libgen 1 /* #include <libgen.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_locale 1 /* #include <locale.h> ok */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_spawn 1 /* #include <spawn.h> ok */
-#define _hdr_syslog 1 /* #include <syslog.h> ok */
-#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
-#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
-#define _dat__tzname 1 /* _tzname in default lib(s) */
-#define _dat_tzname 1 /* tzname in default lib(s) */
-#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
-#define _lib_atexit 1 /* atexit() in default lib(s) */
-#define _lib_bcopy 1 /* bcopy() in default lib(s) */
-#define _lib_bzero 1 /* bzero() in default lib(s) */
-#define _lib_catclose 1 /* catclose() in default lib(s) */
-#define _lib_catgets 1 /* catgets() in default lib(s) */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_confstr 1 /* confstr() in default lib(s) */
-#define _lib_dup2 1 /* dup2() in default lib(s) */
-#define _lib_execlp 1 /* execlp() in default lib(s) */
-#define _lib_execve 1 /* execve() in default lib(s) */
-#define _lib_execvp 1 /* execvp() in default lib(s) */
-#define _lib_fchmod 1 /* fchmod() in default lib(s) */
-#define _lib_fcntl 1 /* fcntl() in default lib(s) */
-#define _lib_fmtmsg 1 /* fmtmsg() in default lib(s) */
-#define _lib_fnmatch 1 /* fnmatch() in default lib(s) */
-#define _lib_fork 1 /* fork() in default lib(s) */
-#define _lib_fsync 1 /* fsync() in default lib(s) */
-#define _lib_getdents 1 /* getdents() in default lib(s) */
-#define _lib_getdtablesize 1 /* getdtablesize() in default lib(s) */
-#define _lib_getdate 1 /* getdate() in default lib(s) */
-#define _lib_getgroups 1 /* getgroups() in default lib(s) */
-#define _lib_gethostname 1 /* gethostname() in default lib(s) */
-#define _lib_getlogin 1 /* getlogin() in default lib(s) */
-#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_getopt 1 /* getopt() in default lib(s) */
-#define _lib_getsubopt 1 /* getsubopt() in default lib(s) */
-#define _lib_getopt_long 1 /* getopt_long() in default lib(s) */
-#define _lib_getopt_long_only 1 /* getopt_long_only() in default lib(s) */
-#define _lib_glob 1 /* glob() in default lib(s) */
-#define _lib_index 1 /* index() in default lib(s) */
-#define _lib_iswblank 1 /* iswblank() in default lib(s) */
-#define _lib_iswctype 1 /* iswctype() in default lib(s) */
-#define _lib_killpg 1 /* killpg() in default lib(s) */
-#define _lib_link 1 /* link() in default lib(s) */
-#define _lib_localeconv 1 /* localeconv() in default lib(s) */
-#define _lib_madvise 1 /* madvise() in default lib(s) */
-#define _lib_mbtowc 1 /* mbtowc() in default lib(s) */
-#define _lib_mbrtowc 1 /* mbrtowc() in default lib(s) */
-#define _lib_memalign 1 /* memalign() in default lib(s) */
-#define _lib_memchr 1 /* memchr() in default lib(s) */
-#define _lib_memcpy 1 /* memcpy() in default lib(s) */
-#define _lib_memmove 1 /* memmove() in default lib(s) */
-#define _lib_memset 1 /* memset() in default lib(s) */
-#define _lib_mkdir 1 /* mkdir() in default lib(s) */
-#define _lib_mkfifo 1 /* mkfifo() in default lib(s) */
-#define _lib_mktemp 1 /* mktemp() in default lib(s) */
-#define _lib_mktime 1 /* mktime() in default lib(s) */
-#define _lib_mount 1 /* mount() in default lib(s) */
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _lib_pathconf 1 /* pathconf() in default lib(s) */
-#define _lib_readlink 1 /* readlink() in default lib(s) */
-#define _lib_remove 1 /* remove() in default lib(s) */
-#define _lib_rename 1 /* rename() in default lib(s) */
-#define _lib_rewinddir 1 /* rewinddir() in default lib(s) */
-#define _lib_rindex 1 /* rindex() in default lib(s) */
-#define _lib_rmdir 1 /* rmdir() in default lib(s) */
-#define _lib_setlocale 1 /* setlocale() in default lib(s) */
-#define _lib_setpgid 1 /* setpgid() in default lib(s) */
-#define _lib_setpgrp 1 /* setpgrp() in default lib(s) */
-#define _lib_setreuid 1 /* setreuid() in default lib(s) */
-#define _lib_setsid 1 /* setsid() in default lib(s) */
-#define _lib_setuid 1 /* setuid() in default lib(s) */
-#define _lib_sigaction 1 /* sigaction() in default lib(s) */
-#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
-#define _lib_socketpair 1 /* socketpair() in default lib(s) */
-#define _lib_strchr 1 /* strchr() in default lib(s) */
-#define _lib_strcoll 1 /* strcoll() in default lib(s) */
-#define _lib_strdup 1 /* strdup() in default lib(s) */
-#define _lib_strerror 1 /* strerror() in default lib(s) */
-#define _lib_strcasecmp 1 /* strcasecmp() in default lib(s) */
-#define _lib_strncasecmp 1 /* strncasecmp() in default lib(s) */
-#define _lib_strrchr 1 /* strrchr() in default lib(s) */
-#define _lib_strstr 1 /* strstr() in default lib(s) */
-#define _lib_strxfrm 1 /* strxfrm() in default lib(s) */
-#define _lib_strftime 1 /* strftime() in default lib(s) */
-#define _lib_swab 1 /* swab() in default lib(s) */
-#define _lib_symlink 1 /* symlink() in default lib(s) */
-#define _lib_sysconf 1 /* sysconf() in default lib(s) */
-#define _lib_sysinfo 1 /* sysinfo() in default lib(s) */
-#define _lib_syslog 1 /* syslog() in default lib(s) */
-#define _lib_telldir 1 /* telldir() in default lib(s) */
-#define _lib_tmpnam 1 /* tmpnam() in default lib(s) */
-#define _lib_tzset 1 /* tzset() in default lib(s) */
-#define _lib_unlink 1 /* unlink() in default lib(s) */
-#define _lib_utime 1 /* utime() in default lib(s) */
-#define _lib_wctype 1 /* wctype() in default lib(s) */
-#define _lib_ftruncate 1 /* ftruncate() in default lib(s) */
-#define _lib_truncate 1 /* truncate() in default lib(s) */
-#define _lib_creat64 1 /* creat64() in default lib(s) */
-#define _lib_fstat64 1 /* fstat64() in default lib(s) */
-#define _lib_fstatvfs64 1 /* fstatvfs64() in default lib(s) */
-#define _lib_ftruncate64 1 /* ftruncate64() in default lib(s) */
-#define _lib_lseek64 1 /* lseek64() in default lib(s) */
-#define _lib_lstat64 1 /* lstat64() in default lib(s) */
-#define _lib_open64 1 /* open64() in default lib(s) */
-#define _lib_readdir64 1 /* readdir64() in default lib(s) */
-#define _lib_stat64 1 /* stat64() in default lib(s) */
-#define _lib_statvfs64 1 /* statvfs64() in default lib(s) */
-#define _lib_truncate64 1 /* truncate64() in default lib(s) */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _lib_strtod 1 /* strtod() in default lib(s) */
-#define _lib_strtold 1 /* strtold() in default lib(s) */
-#define _lib_strtol 1 /* strtol() in default lib(s) */
-#define _lib_strtoll 1 /* strtoll() in default lib(s) */
-#define _lib_strtoul 1 /* strtoul() in default lib(s) */
-#define _lib_strtoull 1 /* strtoull() in default lib(s) */
-#define _hdr_signal 1 /* #include <signal.h> ok */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
-#define _npt_sigflag 1 /* sigflag() needs a prototype */
-#define _mem_d_ino_dirent 1 /* d_ino is a member of struct dirent */
-#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
-#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
-#define _mem_DIR 1 /* DIR is a non-opaque struct */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
-#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
-#define _sys_resource 1 /* #include <sys/resource.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _sys_stream 1 /* #include <sys/stream.h> ok */
-#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_off64_t 1 /* off64_t is a type */
-#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
-#define _tst_errno 1 /* errno can be assigned */
-#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
-#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
-#define _lib_select 1 /* select() has standard 5 arg interface */
-#define _pipe_rw 1 /* full duplex pipes */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _lib_vfork 1 /* vfork exists and it works */
-#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
-#define _hdr_string 1 /* #include <string.h> ok */
-#define _lib_memcmp 1 /* standard memcmp interface that works */
-#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_memccpy 1 /* standard memccpy interface that works */
-#define _lib_utime_now 1 /* utime works with 0 time vector */
-#define _UNIV_DEFAULT "att" /* default universe name */
-#define _std_cleanup 1 /* stuck with standard _cleanup */
-#define _std_strcoll 1 /* standard strcoll works */
-#if !_AST_no_spawnveg
-#define _use_spawnveg 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_limits.h b/usr/src/lib/libast/sparc/include/ast/ast_limits.h
deleted file mode 100644
index d6ad199375..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_limits.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
-#ifndef _def_limits_ast
-#define _def_limits_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#ifndef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-#ifndef CHAR_MIN
-#define CHAR_MIN -128
-#endif
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1000000
-#endif
-#ifndef INT_MIN
-#define INT_MIN -2147483648
-#endif
-#ifndef LLONG_MAX
-#define LLONG_MAX 9223372036854775807
-#endif
-#ifndef LLONG_MIN
-#define LLONG_MIN -9223372036854775808
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN -2147483648
-#endif
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 5
-#endif
-#ifndef OPEN_MAX_CEIL
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-#define OPEN_MAX_CEIL OPEN_MAX
-#endif
-#ifndef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 4096
-#endif
-#ifndef PTRDIFF_MAX
-#define PTRDIFF_MAX 2147483647
-#endif
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN -2147483648
-#endif
-#ifndef SCHAR_MAX
-#define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-#define SCHAR_MIN -128
-#endif
-#ifndef SHRT_MIN
-#define SHRT_MIN -32768
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX 2147483647
-#endif
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN -2147483648
-#endif
-#ifndef SIZE_MAX
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295
-#endif
-#define SIZE_MAX UINT_MAX
-#endif
-#ifndef SSIZE_MAX
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-#define SSIZE_MAX INT_MAX
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#ifndef ULLONG_MAX
-#define ULLONG_MAX 18446744073709551615
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX 4294967295
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX 65535
-#endif
-#ifndef WCHAR_MAX
-#define WCHAR_MAX 2147483647
-#endif
-#ifndef WCHAR_MIN
-#define WCHAR_MIN -2147483648
-#endif
-#ifndef WINT_MAX
-#define WINT_MAX 2147483647
-#endif
-#ifndef WINT_MIN
-#define WINT_MIN -2147483648
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_map.h b/usr/src/lib/libast/sparc/include/ast/ast_map.h
deleted file mode 100644
index 07c119c7a0..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_map.h
+++ /dev/null
@@ -1,471 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
-#ifndef _def_map_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_map_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-/*
- * prototypes provided for standard interfaces hijacked
- * by ast and mapped to _ast_* but already prototyped
- * unmapped in native headers included by <ast_std.h>
- */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-
-#define _map_libc 1
-#undef basename
-#define basename _ast_basename
-#undef dirname
-#define dirname _ast_dirname
-#undef eaccess
-#define eaccess _ast_eaccess
-#undef execvpe
-#define execvpe _ast_execvpe
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-#undef fnmatch
-#define fnmatch _ast_fnmatch
-#undef fts_children
-#define fts_children _ast_fts_children
-#undef fts_close
-#define fts_close _ast_fts_close
-#undef fts_flags
-#define fts_flags _ast_fts_flags
-#undef fts_notify
-#define fts_notify _ast_fts_notify
-#undef fts_open
-#define fts_open _ast_fts_open
-#undef fts_read
-#define fts_read _ast_fts_read
-#undef fts_set
-#define fts_set _ast_fts_set
-#undef ftw
-#define ftw _ast_ftw
-#undef ftwalk
-#define ftwalk _ast_ftwalk
-#undef ftwflags
-#define ftwflags _ast_ftwflags
-#undef getcwd
-#define getcwd _ast_getcwd
-extern __MANGLE__ char* getcwd __PROTO__((char*, size_t));
-#undef getdate
-#define getdate _ast_getdate
-#undef getopt
-#define getopt _ast_getopt
-#undef getsubopt
-#define getsubopt _ast_getsubopt
-#undef getopt_long
-#define getopt_long _ast_getopt_long
-#undef getopt_long_only
-#define getopt_long_only _ast_getopt_long_only
-#undef optopt
-#define optopt _ast_optopt
-#undef optarg
-#define optarg _ast_optarg
-#undef optind
-#define optind _ast_optind
-#undef opterr
-#define opterr _ast_opterr
-#undef getwd
-#define getwd _ast_getwd
-extern __MANGLE__ char* getwd __PROTO__((char*));
-#undef glob
-#define glob _ast_glob
-#undef globfree
-#define globfree _ast_globfree
-#undef memdup
-#define memdup _ast_memdup
-#undef memfatal
-#define memfatal _ast_memfatal
-#undef memhash
-#define memhash _ast_memhash
-#undef memsum
-#define memsum _ast_memsum
-#undef mkstemp
-#define mkstemp _ast_mkstemp
-extern __MANGLE__ int mkstemp __PROTO__((char*));
-#undef mktemp
-#define mktemp _ast_mktemp
-extern __MANGLE__ char* mktemp __PROTO__((char*));
-#undef mktime
-#define mktime _ast_mktime
-#undef nftw
-#define nftw _ast_nftw
-#undef optctx
-#define optctx _ast_optctx
-#undef optesc
-#define optesc _ast_optesc
-#undef optget
-#define optget _ast_optget
-#undef opthelp
-#define opthelp _ast_opthelp
-#undef optjoin
-#define optjoin _ast_optjoin
-#undef optstr
-#define optstr _ast_optstr
-#undef optusage
-#define optusage _ast_optusage
-#undef pathaccess
-#define pathaccess _ast_pathaccess
-#undef pathbin
-#define pathbin _ast_pathbin
-#undef pathcanon
-#define pathcanon _ast_pathcanon
-#undef pathcat
-#define pathcat _ast_pathcat
-#undef pathcd
-#define pathcd _ast_pathcd
-#undef pathcheck
-#define pathcheck _ast_pathcheck
-#undef pathexists
-#define pathexists _ast_pathexists
-#undef pathfind
-#define pathfind _ast_pathfind
-#undef pathgetlink
-#define pathgetlink _ast_pathgetlink
-#undef pathinclude
-#define pathinclude _ast_pathinclude
-#undef pathkey
-#define pathkey _ast_pathkey
-#undef pathnative
-#define pathnative _ast_pathnative
-#undef pathpath
-#define pathpath _ast_pathpath
-#undef pathposix
-#define pathposix _ast_pathposix
-#undef pathprobe
-#define pathprobe _ast_pathprobe
-#undef pathprog
-#define pathprog _ast_pathprog
-#undef pathrepl
-#define pathrepl _ast_pathrepl
-#undef pathsetlink
-#define pathsetlink _ast_pathsetlink
-#undef pathshell
-#define pathshell _ast_pathshell
-#undef pathstat
-#define pathstat _ast_pathstat
-#undef pathtemp
-#define pathtemp _ast_pathtemp
-#undef pathtmp
-#define pathtmp _ast_pathtmp
-#undef procclose
-#define procclose _ast_procclose
-#undef procfree
-#define procfree _ast_procfree
-#undef procopen
-#define procopen _ast_procopen
-#undef procrun
-#define procrun _ast_procrun
-#undef putenv
-#define putenv _ast_putenv
-#undef re_comp
-#define re_comp _ast_re_comp
-#undef re_exec
-#define re_exec _ast_re_exec
-#undef realpath
-#define realpath _ast_realpath
-extern __MANGLE__ char* realpath __PROTO__((const char*, char*));
-#undef regaddclass
-#define regaddclass _ast_regaddclass
-#undef regalloc
-#define regalloc _ast_regalloc
-#undef regcache
-#define regcache _ast_regcache
-#undef regclass
-#define regclass _ast_regclass
-#undef regcmp
-#define regcmp _ast_regcmp
-#undef regcollate
-#define regcollate _ast_regcollate
-#undef regcomb
-#define regcomb _ast_regcomb
-#undef regcomp
-#define regcomp _ast_regcomp
-#undef regdecomp
-#define regdecomp _ast_regdecomp
-#undef regdup
-#define regdup _ast_regdup
-#undef regerror
-#define regerror _ast_regerror
-#undef regex
-#define regex _ast_regex
-#undef regexec
-#define regexec _ast_regexec
-#undef regfatal
-#define regfatal _ast_regfatal
-#undef regfatalpat
-#define regfatalpat _ast_regfatalpat
-#undef regfree
-#define regfree _ast_regfree
-#undef regncomp
-#define regncomp _ast_regncomp
-#undef regnexec
-#define regnexec _ast_regnexec
-#undef regrecord
-#define regrecord _ast_regrecord
-#undef regrexec
-#define regrexec _ast_regrexec
-#undef regstat
-#define regstat _ast_regstat
-#undef regsub
-#define regsub _ast_regsub
-#undef regsubcomp
-#define regsubcomp _ast_regsubcomp
-#undef regsubexec
-#define regsubexec _ast_regsubexec
-#undef regsubflags
-#define regsubflags _ast_regsubflags
-#undef regsubfree
-#define regsubfree _ast_regsubfree
-#undef remove
-#define remove _ast_remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#undef resolvepath
-#define resolvepath _ast_resolvepath
-extern __MANGLE__ int resolvepath __PROTO__((const char*, char*, size_t));
-#undef setenv
-#define setenv _ast_setenv
-extern __MANGLE__ int setenv __PROTO__((const char*, const char*, int));
-#undef setenviron
-#define setenviron _ast_setenviron
-#undef sigcritical
-#define sigcritical _ast_sigcritical
-#undef signal
-#define signal _ast_signal
-#undef sigunblock
-#define sigunblock _ast_sigunblock
-#undef stracmp
-#define stracmp _ast_stracmp
-#undef strcopy
-#define strcopy _ast_strcopy
-#undef strelapsed
-#define strelapsed _ast_strelapsed
-#undef stresc
-#define stresc _ast_stresc
-#undef streval
-#define streval _ast_streval
-#undef strexpr
-#define strexpr _ast_strexpr
-#undef strftime
-#define strftime _ast_strftime
-#undef strgid
-#define strgid _ast_strgid
-#undef strgrpmatch
-#define strgrpmatch _ast_strgrpmatch
-#undef strhash
-#define strhash _ast_strhash
-#undef strkey
-#define strkey _ast_strkey
-#undef strlcat
-#define strlcat _ast_strlcat
-extern __MANGLE__ size_t strlcat __PROTO__((char*, const char*, size_t));
-#undef strlcpy
-#define strlcpy _ast_strlcpy
-extern __MANGLE__ size_t strlcpy __PROTO__((char*, const char*, size_t));
-#undef strlook
-#define strlook _ast_strlook
-#undef strmatch
-#define strmatch _ast_strmatch
-#undef strmode
-#define strmode _ast_strmode
-#undef strnacmp
-#define strnacmp _ast_strnacmp
-#undef strncopy
-#define strncopy _ast_strncopy
-#undef strntod
-#define strntod _ast_strntod
-#undef strntol
-#define strntol _ast_strntol
-#undef strntold
-#define strntold _ast_strntold
-#undef strntoll
-#define strntoll _ast_strntoll
-#undef strntoul
-#define strntoul _ast_strntoul
-#undef strntoull
-#define strntoull _ast_strntoull
-#undef stropt
-#define stropt _ast_stropt
-#undef strperm
-#define strperm _ast_strperm
-#undef strpsearch
-#define strpsearch _ast_strpsearch
-#undef strptime
-#define strptime _ast_strptime
-#undef strsearch
-#define strsearch _ast_strsearch
-#undef strsort
-#define strsort _ast_strsort
-#undef strsubmatch
-#define strsubmatch _ast_strsubmatch
-#undef strsum
-#define strsum _ast_strsum
-#undef strtape
-#define strtape _ast_strtape
-#undef strtoip4
-#define strtoip4 _ast_strtoip4
-#undef strton
-#define strton _ast_strton
-#undef strtonll
-#define strtonll _ast_strtonll
-#undef struid
-#define struid _ast_struid
-#undef struniq
-#define struniq _ast_struniq
-#undef system
-#define system _ast_system
-extern __MANGLE__ int system __PROTO__((const char*));
-#undef tempnam
-#define tempnam _ast_tempnam
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-#undef tmpnam
-#define tmpnam _ast_tmpnam
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-#undef touch
-#define touch _ast_touch
-#undef wordexp
-#define wordexp _ast_wordexp
-#undef wordfree
-#define wordfree _ast_wordfree
-#undef unsetenv
-#define unsetenv _ast_unsetenv
-
-/* cannot override local malloc */
-#define _map_malloc 1
-#undef calloc
-#define calloc _ast_calloc
-extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
-#undef cfree
-#define cfree _ast_cfree
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-#undef free
-#define free _ast_free
-extern __MANGLE__ void free __PROTO__((__V_*));
-#undef malloc
-#define malloc _ast_malloc
-extern __MANGLE__ __V_* malloc __PROTO__((size_t));
-#undef memalign
-#define memalign _ast_memalign
-extern __MANGLE__ __V_* memalign __PROTO__((size_t, size_t));
-#undef realloc
-#define realloc _ast_realloc
-extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
-#undef strdup
-#define strdup _ast_strdup
-extern __MANGLE__ char* strdup __PROTO__((const char*));
-#undef valloc
-#define valloc _ast_valloc
-extern __MANGLE__ __V_* valloc __PROTO__((size_t));
-#undef strtol
-#define strtol _ast_strtol
-#undef strtoul
-#define strtoul _ast_strtoul
-#undef strtoll
-#define strtoll _ast_strtoll
-#undef strtoull
-#define strtoull _ast_strtoull
-#undef strtod
-#define strtod _ast_strtod
-#undef strtold
-#define strtold _ast_strtold
-extern __MANGLE__ long strtol __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned long strtoul __PROTO__((const char*, char**, int));
-extern __MANGLE__ double strtod __PROTO__((const char*, char**));
-#if !_UWIN
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
-extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_mmap.h b/usr/src/lib/libast/sparc/include/ast/ast_mmap.h
deleted file mode 100644
index 175445348e..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_mmap.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
-#ifndef _def_mmap_ast
-#define _def_mmap_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_mmap 1 /* standard mmap interface that works */
-#define _lib_mmap64 1 /* mmap64 interface and implementation work */
-#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
-#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
-
-/* some systems get it wrong but escape concise detection */
-#ifndef _NO_MMAP
-#if __CYGWIN__
-#define _NO_MMAP 1
-#endif
-#endif
-
-#if _NO_MMAP
-#undef _lib_mmap
-#undef _lib_mmap64
-#undef _mmap_anon
-#undef _mmap_devzero
-#undef _mmap_worthy
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_mode.h b/usr/src/lib/libast/sparc/include/ast/ast_mode.h
deleted file mode 100644
index b4c78825fa..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_mode.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
-#ifndef _def_mode_ast
-#define _def_mode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define S_ITYPE(m) ((m)&S_IFMT)
-
-#define S_IPERM (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-
-#define _S_IDPERM 1
-#define _S_IDTYPE 1
-
-#define BUFFERSIZE 8192
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_namval.h b/usr/src/lib/libast/sparc/include/ast/ast_namval.h
deleted file mode 100644
index fefe46a0c7..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_namval.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_ndbm.h b/usr/src/lib/libast/sparc/include/ast/ast_ndbm.h
deleted file mode 100644
index d303afa8d4..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_ndbm.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
-#ifndef _def_ndbm_ast
-#define _def_ndbm_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_ndbm 1 /* #include <ndbm.h> ok */
-#include <ndbm.h>
-#define _use_ndbm 1
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_nl_types.h b/usr/src/lib/libast/sparc/include/ast/ast_nl_types.h
deleted file mode 100644
index 28f69c7212..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_nl_types.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
-#ifndef _def_nl_types_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_nl_types_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_nl_langinfo 1 /* nl_langinfo() in default lib(s) */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_langinfo 1 /* #include <langinfo.h> ok */
-#define _nxt_nl_types <../include/nl_types.h> /* include path for the native <nl_types.h> */
-#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native <nl_types.h> */
-#include <limits.h>
-#include <../include/nl_types.h> /* the native nl_types.h */
-
-#undef NL_SETMAX
-#define NL_SETMAX 1023
-#undef NL_MSGMAX
-#define NL_MSGMAX 32767
-#undef nl_catd
-#define nl_catd _ast_nl_catd
-#undef catopen
-#define catopen _ast_catopen
-#undef catgets
-#define catgets _ast_catgets
-#undef catclose
-#define catclose _ast_catclose
-
-typedef __V_* nl_catd;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ nl_catd catopen __PROTO__((const char*, int));
-extern __MANGLE__ char* catgets __PROTO__((nl_catd, int, int, const char*));
-extern __MANGLE__ int catclose __PROTO__((nl_catd));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_param.h b/usr/src/lib/libast/sparc/include/ast/ast_param.h
deleted file mode 100644
index b09325b155..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_param.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
-#ifndef _def_param_ast
-#define _def_param_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#include <sys/param.h>
-#ifndef S_IFDIR
-#include <sys/stat.h>
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_standards.h b/usr/src/lib/libast/sparc/include/ast/ast_standards.h
deleted file mode 100644
index 2be04b2a12..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_standards.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_std.h b/usr/src/lib/libast/sparc/include/ast/ast_std.h
deleted file mode 100644
index f98d1861b9..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_std.h
+++ /dev/null
@@ -1,374 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Advanced Software Technology Library
- * AT&T Research
- *
- * a union of standard headers that works
- * with local extensions enabled
- * and local omission compensation
- */
-
-#ifndef _AST_STD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_STD_H 1
-#define _AST_STD_I 1
-
-#include <ast_common.h>
-
-#if _BLD_ast
-#define _BLD_cdt 1
-#define _BLD_sfio 1
-#if !_UWIN
-#define _BLD_vmalloc 1
-#endif
-#endif
-
-#ifdef _SFSTDIO_H
-#define _SKIP_SFSTDIO_H
-#else
-#define _SFSTDIO_H
-#ifndef FILE
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-#define FILE struct _sfio_s
-#ifndef __FILE_typedef
-#define __FILE_typedef 1
-#endif
-#ifndef _FILEDEFED
-#define _FILEDEFED 1
-#endif
-#endif
-#endif
-
-#include <ast_lib.h>
-#include <ast_sys.h>
-#include <ast_getopt.h> /* <stdlib.h> does this */
-#include <ast_fcntl.h>
-#include <ast_limits.h>
-#include <ast_botch.h>
-
-#ifdef _SKIP_SFSTDIO_H
-#undef _SKIP_SFSTDIO_H
-#else
-#undef _SFSTDIO_H
-#undef FILE
-#endif
-
-/* locale stuff */
-
-#if !_hdr_locale
-
-struct lconv
-{
- char* decimal_point;
- char* thousands_sep;
- char* grouping;
- char* int_curr_symbol;
- char* currency_symbol;
- char* mon_decimal_point;
- char* mon_thousands_sep;
- char* mon_grouping;
- char* positive_sign;
- char* negative_sign;
- char int_frac_digits;
- char frac_digits;
- char p_cs_precedes;
- char p_sep_by_space;
- char n_cs_precedes;
- char n_sep_by_space;
- char p_sign_posn;
- char n_sign_posn;
-};
-
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_UWIN /* for ast54 compatibility */
-
-#undef getenv
-#define getenv _ast_getenv
-
-#undef setenviron
-#define setenviron _ast_setenviron
-
-extern __MANGLE__ char* getenv __PROTO__((const char*));
-
-#endif
-
-#undef localeconv
-#define localeconv _ast_localeconv
-
-#undef setlocale
-#define setlocale _ast_setlocale
-
-#undef strerror
-#define strerror _ast_strerror
-
-extern __MANGLE__ struct lconv* localeconv __PROTO__((void));
-extern __MANGLE__ char* setenviron __PROTO__((const char*));
-extern __MANGLE__ char* setlocale __PROTO__((int, const char*));
-extern __MANGLE__ char* strerror __PROTO__((int));
-
-#define AST_MESSAGE_SET 3 /* see <mc.h> mcindex() */
-
-/*
- * maintain this order when adding categories
- */
-
-#define AST_LC_ALL 0
-#define AST_LC_COLLATE 1
-#define AST_LC_CTYPE 2
-#define AST_LC_MESSAGES 3
-#define AST_LC_MONETARY 4
-#define AST_LC_NUMERIC 5
-#define AST_LC_TIME 6
-#define AST_LC_IDENTIFICATION 7
-#define AST_LC_ADDRESS 8
-#define AST_LC_NAME 9
-#define AST_LC_TELEPHONE 10
-#define AST_LC_XLITERATE 11
-#define AST_LC_MEASUREMENT 12
-#define AST_LC_PAPER 13
-#define AST_LC_COUNT 14
-#define AST_LC_LANG 255
-
-#define AST_LC_internal 1
-#define AST_LC_setenv (1L<<27)
-#define AST_LC_find (1L<<28)
-#define AST_LC_debug (1L<<29)
-#define AST_LC_setlocale (1L<<30)
-#define AST_LC_translate (1L<<31)
-
-#ifndef LC_ALL
-#define LC_ALL (-AST_LC_ALL)
-#endif
-#ifndef LC_COLLATE
-#define LC_COLLATE (-AST_LC_COLLATE)
-#endif
-#ifndef LC_CTYPE
-#define LC_CTYPE (-AST_LC_CTYPE)
-#endif
-#ifndef LC_MESSAGES
-#define LC_MESSAGES (-AST_LC_MESSAGES)
-#endif
-#ifndef LC_MONETARY
-#define LC_MONETARY (-AST_LC_MONETARY)
-#endif
-#ifndef LC_NUMERIC
-#define LC_NUMERIC (-AST_LC_NUMERIC)
-#endif
-#ifndef LC_TIME
-#define LC_TIME (-AST_LC_TIME)
-#endif
-#ifndef LC_ADDRESS
-#define LC_ADDRESS (-AST_LC_ADDRESS)
-#endif
-#ifndef LC_IDENTIFICATION
-#define LC_IDENTIFICATION (-AST_LC_IDENTIFICATION)
-#endif
-#ifndef LC_NAME
-#define LC_NAME (-AST_LC_NAME)
-#endif
-#ifndef LC_TELEPHONE
-#define LC_TELEPHONE (-AST_LC_TELEPHONE)
-#endif
-#ifndef LC_XLITERATE
-#define LC_XLITERATE (-AST_LC_XLITERATE)
-#endif
-#ifndef LC_MEASUREMENT
-#define LC_MEASUREMENT (-AST_LC_MEASUREMENT)
-#endif
-#ifndef LC_PAPER
-#define LC_PAPER (-AST_LC_PAPER)
-#endif
-#ifndef LC_LANG
-#define LC_LANG (-AST_LC_LANG)
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#undef strcoll
-#if _std_strcoll
-#define strcoll _ast_info.collate
-#else
-#define strcoll strcmp
-#endif
-
-typedef struct
-{
-
- char* id;
-
- struct
- {
- uint32_t serial;
- uint32_t set;
- } locale;
-
- long tmp_long;
- size_t tmp_size;
- short tmp_short;
- char tmp_char;
- wchar_t tmp_wchar;
-
- int (*collate) __PROTO__((const char*, const char*));
-
- int tmp_int;
- __V_* tmp_pointer;
-
- int mb_cur_max;
- int (*mb_len) __PROTO__((const char*, size_t));
- int (*mb_towc) __PROTO__((wchar_t*, const char*, size_t));
- size_t (*mb_xfrm) __PROTO__((char*, const char*, size_t));
- int (*mb_width) __PROTO__((wchar_t));
- int (*mb_conv) __PROTO__((char*, wchar_t));
-
- uint32_t env_serial;
- uint32_t mb_sync;
- uint32_t version;
-
- char pad[936];
-
-} _Ast_info_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ _Ast_info_t _ast_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/* largefile hackery -- ast uses the large versions by default */
-
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if !defined(ftruncate) && _lib_ftruncate64
-#define ftruncate ftruncate64
-extern __MANGLE__ int ftruncate64 __PROTO__((int, off64_t));
-#endif
-#if !defined(lseek) && _lib_lseek64
-#define lseek lseek64
-extern __MANGLE__ off64_t lseek64 __PROTO__((int, off64_t, int));
-#endif
-#if !defined(truncate) && _lib_truncate64
-#define truncate truncate64
-extern __MANGLE__ int truncate64 __PROTO__((const char*, off64_t));
-#endif
-
-/* direct macro access for bsd crossover */
-
-#if !defined(__cplusplus)
-
-#if !defined(memcpy) && !defined(_lib_memcpy) && defined(_lib_bcopy)
-#define memcpy(t,f,n) (bcopy(f,t,n),(t))
-#endif
-
-#if !defined(memzero) && !defined(_lib_memzero)
-#if defined(_lib_memset) || !defined(_lib_bzero)
-#define memzero(b,n) memset(b,0,n)
-#else
-#define memzero(b,n) (bzero(b,n),(b))
-#endif
-#endif
-
-#endif
-
-#if !defined(remove)
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-
-#if !defined(rename)
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-
-#if !defined(strchr) && !defined(_lib_strchr) && defined(_lib_index)
-#define strchr(s,c) index(s,c)
-#endif
-
-#if !defined(strrchr) && !defined(_lib_strrchr) && defined(_lib_rindex)
-#define strrchr(s,c) rindex(s,c)
-#endif
-
-/* and now introducing prototypes botched by the standard(s) */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#undef getpgrp
-#define getpgrp() _ast_getpgrp()
-extern __MANGLE__ int _ast_getpgrp __PROTO__((void));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/*
- * and finally, standard interfaces hijacked by ast
- * _AST_STD_I delays headers that require <ast_map.h>
- */
-
-#include <ast_map.h>
-
-#undef _AST_STD_I
-
-#if _AST_GETOPT_H < 0
-#undef _AST_GETOPT_H
-#include <ast_getopt.h>
-#endif
-
-#if _GETOPT_H < 0
-#undef _GETOPT_H
-#include <getopt.h>
-#endif
-
-#if _REGEX_H < 0
-#undef _REGEX_H
-#include <regex.h>
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_stdio.h b/usr/src/lib/libast/sparc/include/ast/ast_stdio.h
deleted file mode 100644
index 3d39d1a8a3..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_stdio.h
+++ /dev/null
@@ -1,608 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
-#ifndef _SFSTDIO_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFSTDIO_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define __FILE_typedef 1
-#define _FILE_DEFINED 1
-#define _FILE_defined 1
-#define _FILEDEFED 1
-
-#ifndef __FILE_TAG
-#define __FILE_TAG _sfio_s
-#endif
-
-#undef FILE
-#undef _FILE
-#undef fpos_t
-#undef fpos64_t
-
-typedef struct _sfio_s _sfio_FILE;
-
-#define FILE _sfio_FILE
-#define _FILE FILE
-
-#if !defined(__FILE) && !__CYGWIN__
-#undef __FILE
-#define __FILE FILE
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define BUFSIZ SF_BUFSIZE
-
-#else
-
-#ifndef BUFSIZ
-#define BUFSIZ 8192
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#include <ast_std.h>
-
-#include <sfio_s.h>
-
-#if __cplusplus
-#define _sf_(f) (f)
-#else
-#define _sf_(f) ((struct _sfio_s*)(f))
-#endif
-
-#define _SF_EOF 0000200
-#define _SF_ERROR 0000400
-
-#endif
-
-#ifdef _NO_LARGEFILE64_SOURCE
-#undef _LARGEFILE64_SOURCE
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#undef off_t
-#endif
-
-#define fpos_t _ast_fpos_t
-#if _typ_int64_t
-#define fpos64_t _ast_fpos_t
-#endif
-
-typedef struct _ast_fpos_s
-{
- intmax_t _sf_offset;
- unsigned char _sf_state[64 - sizeof(intmax_t)];
-} _ast_fpos_t;
-
-#define _base _data
-#define _ptr _next
-#define _IOFBF 0
-#define _IONBF 1
-#define _IOLBF 2
-
-#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
-
-#undef FILE
-#define FILE FILE
-typedef struct _sfio_s FILE;
-
-#undef strerror
-extern __MANGLE__ char* strerror(int) __THROW;
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-extern __MANGLE__ void flockfile __PROTO__((FILE*));
-extern __MANGLE__ int ftrylockfile __PROTO__((FILE*));
-extern __MANGLE__ void funlockfile __PROTO__((FILE*));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 1024
-#endif
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 20
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-
-#define _doprnt _ast_doprnt
-#define _doscan _ast_doscan
-#define asprintf _ast_asprintf
-#define clearerr _ast_clearerr
-#define fclose _ast_fclose
-#define fdopen _ast_fdopen
-#define fflush _ast_fflush
-#define fgetc _ast_fgetc
-#define fgetpos _ast_fgetpos
-#define fgetpos64 _ast_fgetpos64
-#define fgets _ast_fgets
-#define fopen _ast_fopen
-#define fprintf _ast_fprintf
-#define fpurge _ast_fpurge
-#define fputs _ast_fputs
-#define fread _ast_fread
-#define freopen _ast_freopen
-#define fscanf _ast_fscanf
-#define fseek _ast_fseek
-#define fseek64 _ast_fseek64
-#define fseeko _ast_fseeko
-#define fseeko64 _ast_fseeko64
-#define fsetpos _ast_fsetpos
-#define fsetpos64 _ast_fsetpos64
-#define ftell _ast_ftell
-#define ftell64 _ast_ftell64
-#define ftello _ast_ftello
-#define ftello64 _ast_ftello64
-#define fwrite _ast_fwrite
-#define gets _ast_gets
-#define getw _ast_getw
-#define pclose _ast_pclose
-#define popen _ast_popen
-#define printf _ast_printf
-#define puts _ast_puts
-#define putw _ast_putw
-#define rewind _ast_rewind
-#define scanf _ast_scanf
-#define setbuf _ast_setbuf
-#undef setbuffer
-#define setbuffer _ast_setbuffer
-#define setlinebuf _ast_setlinebuf
-#define setvbuf _ast_setvbuf
-#define snprintf _ast_snprintf
-#define sprintf _ast_sprintf
-#define sscanf _ast_sscanf
-#define tmpfile _ast_tmpfile
-#define ungetc _ast_ungetc
-#define vasprintf _ast_vasprintf
-#define vfprintf _ast_vfprintf
-#define vfscanf _ast_vfscanf
-#define vprintf _ast_vprintf
-#define vscanf _ast_vscanf
-#define vsnprintf _ast_vsnprintf
-#define vsprintf _ast_vsprintf
-#define vsscanf _ast_vsscanf
-#define fcloseall _ast_fcloseall
-#define _filbuf _ast__filbuf
-#define fmemopen _ast_fmemopen
-#define __getdelim _ast___getdelim
-#define getdelim _ast_getdelim
-#define getline _ast_getline
-#define clearerr_unlocked _ast_clearerr_unlocked
-#define feof_unlocked _ast_feof_unlocked
-#define ferror_unlocked _ast_ferror_unlocked
-#define fflush_unlocked _ast_fflush_unlocked
-#define fgetc_unlocked _ast_fgetc_unlocked
-#define fgets_unlocked _ast_fgets_unlocked
-#define fileno_unlocked _ast_fileno_unlocked
-#define fputc_unlocked _ast_fputc_unlocked
-#define fputs_unlocked _ast_fputs_unlocked
-#define fread_unlocked _ast_fread_unlocked
-#define fwrite_unlocked _ast_fwrite_unlocked
-#define getc_unlocked _ast_getc_unlocked
-#define getchar_unlocked _ast_getchar_unlocked
-#define putc_unlocked _ast_putc_unlocked
-#define putchar_unlocked _ast_putchar_unlocked
-#define flockfile _ast_flockfile
-#define ftrylockfile _ast_ftrylockfile
-#define funlockfile _ast_funlockfile
-
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:initial
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
-#endif
-#ifndef L_ctermid
-#define L_ctermid 9
-#endif
-#ifndef L_tmpnam
-#define L_tmpnam 25
-#endif
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#if defined(__cplusplus) && defined(__THROW)
-extern __MANGLE__ char* ctermid(char*) __THROW;
-#else
-extern __MANGLE__ char* ctermid __PROTO__((char*));
-#endif
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-extern __MANGLE__ void perror __PROTO__((const char*));
-#ifndef _AST_STD_H
-#ifndef remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-#ifndef rename
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#ifdef _LARGEFILE64_SOURCE
-
-#undef fpos_t
-#undef off_t
-#undef fgetpos
-#undef fsetpos
-#undef fseek
-#undef fseeko
-#undef ftell
-#undef ftello
-
-#define fpos_t fpos64_t
-#if _typ_off64_t
-#define off_t off64_t
-#else
-#define off_t int64_t
-#endif
-
-#define fgetpos fgetpos64
-#define fsetpos fsetpos64
-#define fseek fseek64
-#define fseeko fseeko64
-#define ftell ftell64
-#define ftello ftello64
-
-#endif
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_DLL && _DLL_INDIRECT_DATA
-
-#define stdin ((FILE*)_ast_dll->_ast_stdin)
-#define stdout ((FILE*)_ast_dll->_ast_stdout)
-#define stderr ((FILE*)_ast_dll->_ast_stderr)
-
-#else
-
-#define stdin (&_Sfstdin)
-#define stdout (&_Sfstdout)
-#define stderr (&_Sfstderr)
-
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define feof(f) sfeof(f)
-#define ferror(f) sferror(f)
-#define fileno(f) sffileno(f)
-#define fputc(c,f) sfputc(f,c)
-#define getc(f) sfgetc(f)
-#define getchar() sfgetc(sfstdin)
-#define putc(c,f) sfputc(f,c)
-#define putchar(c) sfputc(sfstdout,c)
-
-#else
-
-#if !_UWIN
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-#endif
-
-extern __MANGLE__ FILE _Sfstdin;
-extern __MANGLE__ FILE _Sfstdout;
-extern __MANGLE__ FILE _Sfstderr;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define feof(f) (_sf_(f)->_flags&_SF_EOF)
-#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
-#define fileno(f) (_sf_(f)->_file)
-#define fputc(c,f) (_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
-#define getc(f) (_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
-#define getchar() getc(stdin)
-#define putc(c,f) fputc(c,f)
-#define putchar(c) fputc(c,stdout)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _sffilbuf __PROTO__((FILE*, int));
-extern __MANGLE__ int _sfflsbuf __PROTO__((FILE*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_sys.h b/usr/src/lib/libast/sparc/include/ast/ast_sys.h
deleted file mode 100644
index 6c70a3a9a9..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_sys.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
-#ifndef _AST_SYS_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_SYS_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#if __mips == 2 && !defined(_NO_LARGEFILE64_SOURCE)
-#define _NO_LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_NO_LARGEFILE64_SOURCE) && _typ_off64_t && _lib_lseek64 && _lib_stat64
-#if !defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#else
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#undef _typ_off64_t
-#undef _typ_struct_dirent64
-#undef _lib_creat64
-#undef _lib_fstat64
-#undef _lib_fstatvfs64
-#undef _lib_ftruncate64
-#undef _lib_lseek64
-#undef _lib_lstat64
-#undef _lib_mmap64
-#undef _lib_open64
-#undef _lib_readdir64
-#undef _lib_stat64
-#undef _lib_statvfs64
-#undef _lib_truncate64
-#endif
-#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
-#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
-#endif
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <locale.h>
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _typ_dev_t 1 /* dev_t is a type */
-#define _typ_nlink_t 1 /* nlink_t is a type */
-#define _typ_gid_t 1 /* gid_t is a type */
-#define _typ_mode_t 1 /* mode_t is a type */
-#define _typ_uid_t 1 /* uid_t is a type */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _typ_wchar_t 1 /* wchar_t is a type */
-#define _typ_pid_t 1 /* pid_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _typ_wint_t 1 /* wint_t is a type */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _typ_socklen_t 1 /* socklen_t is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_ino_t 1 /* ino_t is a type */
-#define _typ_off_t 1 /* off_t is a type */
-#define _typ_ptrdiff_t 1 /* ptrdiff_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#define _typ_div_t 1 /* div_t is a type */
-#define _typ_ldiv_t 1 /* ldiv_t is a type */
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
-extern __MANGLE__ pid_t spawnveg __PROTO__((const char*, char* const[], char* const[], pid_t));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#if !defined(va_start)
-#if defined(__STDARG__)
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_time.h b/usr/src/lib/libast/sparc/include/ast/ast_time.h
deleted file mode 100644
index ece6f26e66..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_time.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
-#ifndef _def_time_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_time_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */
-#define _lib_usleep 1 /* usleep() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#include <sys/time.h>
-
-#include <sys/times.h>
-
-#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
-#define CLOCKS_PER_SEC CLK_TCK
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_tty.h b/usr/src/lib/libast/sparc/include/ast/ast_tty.h
deleted file mode 100644
index f174dab6e7..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_tty.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
-#ifndef _def_tty_ast
-#define _def_tty_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_termios 1 /* #include <termios.h> ok */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
-
-#ifdef _hdr_termios
-# if _mac__POSIX_VDISABLE
-# undef _POSIX_VDISABLE
-# endif
-# include <termios.h>
-#else
-# if defined(_sys_termios) && defined(_lib_tcgetattr)
-# include <sys/termios.h>
-# define _hdr_termios 1
-# else
-# undef _sys_termios
-# endif /* _sys_termios */
-#endif /* _hdr_termios */
-
-#ifdef _hdr_termios
-# undef _hdr_sgtty
-# undef tcgetattr
-# undef tcsetattr
-# undef tcgetpgrp
-# undef tcsetpgrp
-# undef cfgetospeed
-# ifndef TCSANOW
-# define TCSANOW TCSETS
-# define TCSADRAIN TCSETSW
-# define TCSAFLUSH TCSETSF
-# endif /* TCSANOW */
- /* The following corrects bugs in some implementations */
-# if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
-# define TCSAFLUSH TCSADFLUSH
-# endif /* TCSADFLUSH */
-# ifndef _lib_tcgetattr
-# undef tcgetattr
-# define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
-# undef tcsetattr
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# undef cfgetospeed
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# endif /* _lib_tcgetattr */
-# undef TIOCGETC
-#else
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# ifdef _hdr_termio
-# include <termio.h>
-# else
-# ifdef _sys_termio
-# include <sys/termio.h>
-# define _hdr_termio 1
-# endif /* _sys_termio */
-# endif /* _hdr_termio */
-# ifdef _hdr_termio
-# define termios termio
-# undef TIOCGETC
-# define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-
-# ifdef _sys_bsdtty
-# include <sys/bsdtty.h>
-# endif /* _sys_bsdtty */
-# else
-# ifdef _hdr_sgtty
-# include <sgtty.h>
-# ifndef LPENDIN
-# ifdef _sys_nttyio
-# include <sys/nttyio.h>
-# endif /* _sys_nttyio */
-# endif /* LPENDIN */
-# define termios sgttyb
-# ifdef TIOCSETN
-# undef TCSETAW
-# endif /* TIOCSETN */
-# ifdef TIOCGETP
-# define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# else
-# define tcgetattr(fd,tty) gtty(fd, tty)
-# define tcsetattr(fd,action,tty) stty(fd, tty)
-# endif /* TIOCGETP */
-# else
-# ifdef _sys_ttyio
-# include <sys/ttyio.h>
-# endif
-# endif /* _hdr_sgtty */
-# endif /* hdr_termio */
-
-# ifndef TCSANOW
-# ifdef TCSETAW
-# define TCSANOW TCSETA
-# define TCSAFLUSH TCSETAF
-# else
-# ifdef TIOCSETN
-# define TCSANOW TIOCSETN
-# define TCSADRAIN TIOCSETN
-# define TCSAFLUSH TIOCSETP
-# endif /* TIOCSETN */
-# endif /* TCSETAW */
-# endif /* TCSANOW */
-#endif /* _hdr_termios */
-
-/* set ECHOCTL if driver can echo control charaters as ^c */
-#ifdef LCTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LCTLECH
-# endif /* !ECHOCTL */
-#endif /* LCTLECH */
-#ifdef LNEW_CTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LNEW_CTLECH
-# endif /* !ECHOCTL */
-#endif /* LNEW_CTLECH */
-#ifdef LNEW_PENDIN
-# ifndef PENDIN
-# define PENDIN LNEW_PENDIN
-# endif /* !PENDIN */
-#endif /* LNEW_PENDIN */
-
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_version.h b/usr/src/lib/libast/sparc/include/ast/ast_version.h
deleted file mode 100644
index b3ba546e3a..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_version.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#define _AST_VERSION 20100102L
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_vfork.h b/usr/src/lib/libast/sparc/include/ast/ast_vfork.h
deleted file mode 100644
index 1585b13cc9..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_vfork.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
-#ifndef _def_vfork_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_vfork_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_wait.h b/usr/src/lib/libast/sparc/include/ast/ast_wait.h
deleted file mode 100644
index c02a19ccee..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_wait.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
-#ifndef _def_wait_ast
-#define _def_wait_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_wait 1 /* wait() in default lib(s) */
-#define _lib_wait3 1 /* wait3() in default lib(s) */
-#define _lib_wait4 1 /* wait4() in default lib(s) */
-#define _lib_waitpid 1 /* waitpid() in default lib(s) */
-#define _sys_wait 1 /* #include <sys/wait.h> ok */
-#define _ok_wif 1 /* posix wait macros ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_wchar.h b/usr/src/lib/libast/sparc/include/ast/ast_wchar.h
deleted file mode 100644
index 0d7e2ee77d..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_wchar.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_wchar_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */
-#define _lib_wctomb 1 /* wctomb() in default lib(s) */
-#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */
-#define _lib_wcslen 1 /* wcslen() in default lib(s) */
-#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */
-#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */
-#define _lib_towlower 1 /* towlower() in default lib(s) */
-#define _lib_towupper 1 /* towupper() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_mbstate_t 1 /* mbstate_t is a type */
-#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */
-#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */
-#ifndef _SFSTDIO_H
-#include <ast_common.h>
-#include <stdio.h>
-#endif
-#if _hdr_wchar && defined(_nxt_wchar)
-#include <../include/wchar.h> /* the native wchar.h */
-#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
-
-#ifndef WEOF
-#define WEOF (-1)
-#endif
-
-#undef fgetwc
-#undef fgetws
-#undef fputwc
-#undef fputws
-#undef getwc
-#undef getwchar
-#undef getws
-#undef putwc
-#undef putwchar
-#undef ungetwc
-
-#define fgetwc _ast_fgetwc
-#define fgetws _ast_fgetws
-#define fputwc _ast_fputwc
-#define fputws _ast_fputws
-#define fwide _ast_fwide
-#define fwprintf _ast_fwprintf
-#define fwscanf _ast_fwscanf
-#define getwc _ast_getwc
-#define getwchar _ast_getwchar
-#define getws _ast_getws
-#define putwc _ast_putwc
-#define putwchar _ast_putwchar
-#define swprintf _ast_swprintf
-#define swscanf _ast_swscanf
-#define ungetwc _ast_ungetwc
-#define vfwprintf _ast_vfwprintf
-#define vfwscanf _ast_vfwscanf
-#define vswprintf _ast_vswprintf
-#define vswscanf _ast_vswscanf
-#define vwprintf _ast_vwprintf
-#define vwscanf _ast_vwscanf
-#define wprintf _ast_wprintf
-#define wscanf _ast_wscanf
-
-#if !_typ_mbstate_t
-#undef _typ_mbstate_t
-#define _typ_mbstate_t 1
-typedef char mbstate_t;
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_mbstowcs
-extern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t));
-#endif
-#if !_lib_wctomb
-extern __MANGLE__ int wctomb __PROTO__((char*, wchar_t));
-#endif
-#if !_lib_wcrtomb
-extern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
-#endif
-#if !_lib_wcslen
-extern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*));
-#endif
-#if !_lib_wcstombs
-extern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t));
-#endif
-
-extern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ wint_t fgetwc __PROTO__((FILE*));
-extern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*));
-extern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*));
-extern __MANGLE__ int fwide __PROTO__((FILE*, int));
-extern __MANGLE__ wint_t getwc __PROTO__((FILE*));
-extern __MANGLE__ wint_t getwchar __PROTO__((void));
-extern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*));
-extern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ wint_t putwchar __PROTO__((wchar_t));
-extern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
-extern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
-extern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*));
-extern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
-extern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
-extern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...));
-extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ast_windows.h b/usr/src/lib/libast/sparc/include/ast/ast_windows.h
deleted file mode 100644
index 65590c17b4..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ast_windows.h
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * AT&T Research
- *
- * ast <windows.h> wrapper
- * for libast only
- * include after ast headers
- */
-
-#ifndef _AST_WINDOWS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_WINDOWS_H 1
-
-#undef SF_ERROR /* clash in <oaidl.h> */
-
-#include <windows.h>
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ccode.h b/usr/src/lib/libast/sparc/include/ast/ccode.h
deleted file mode 100644
index ae50c63b16..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ccode.h
+++ /dev/null
@@ -1,101 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * character code map interface
- *
- * NOTE: used for mapping between 8-bit character encodings
- * ISO character sets are handled by sfio
- */
-
-#ifndef _CHARCODE_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _CHARCODE_H 1
-
-#include <ast_common.h>
-#include <ast_ccode.h>
-
-typedef struct Ccmap_s
-{
- const char* name; /* code set name */
- const char* match; /* strmatch() pattern */
- const char* desc; /* code set description */
- const char* canon; /* canonical name format */
- const char* index; /* default index */
- int ccode; /* <ccode.h> code index */
- __V_* data; /* map specific data */
-} Ccmap_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ unsigned char* _ccmap __PROTO__((int, int));
-extern __MANGLE__ __V_* _ccmapcpy __PROTO__((unsigned char*, __V_*, const __V_*, size_t));
-extern __MANGLE__ __V_* _ccmapstr __PROTO__((unsigned char*, __V_*, size_t));
-
-extern __MANGLE__ int ccmapid __PROTO__((const char*));
-extern __MANGLE__ char* ccmapname __PROTO__((int));
-extern __MANGLE__ __V_* ccnative __PROTO__((__V_*, const __V_*, size_t));
-extern __MANGLE__ Ccmap_t* ccmaplist __PROTO__((Ccmap_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define CCOP(i,o) ((i)==(o)?0:(((o)<<8)|(i)))
-#define CCIN(x) ((x)&0xFF)
-#define CCOUT(x) (((x)>>8)&0xFF)
-#define CCCONVERT(x) ((x)&0xFF00)
-
-#define CCCVT(x) CCMAP(x,0)
-#define CCMAP(i,o) ((i)==(o)?(unsigned char*)0:_ccmap(i,o))
-#define CCMAPCHR(m,c) ((m)?(m)[c]:(c))
-#define CCMAPCPY(m,t,f,n) ((m)?_ccmapcpy(m,t,f,n):memcpy(t,f,n))
-#define CCMAPSTR(m,s,n) ((m)?_ccmapstr(m,s,n):(__V_*)(s))
-
-#define ccmap(i,o) CCMAP(i,o)
-#define ccmapchr(m,c) CCMAPCHR(m,c)
-#define ccmapcpy(m,t,f,n) CCMAPCPY(m,t,f,n)
-#define ccmapstr(m,s,n) CCMAPSTR(m,s,n)
-
-#define CCMAPC(c,i,o) ((i)==(o)?(c):CCMAP(i,o)[c])
-#define CCMAPM(t,f,n,i,o) ((i)==(o)?memcpy(t,f,n):_ccmapcpy(CCMAP(i,o),t,f,n))
-#define CCMAPS(s,n,i,o) ((i)==(o)?(__V_*)(s):_ccmapstr(CCMAP(i,o),s,n))
-
-#define ccmapc(c,i,o) CCMAPC(c,i,o)
-#define ccmapm(t,f,n,i,o) CCMAPM(t,f,n,i,o)
-#define ccmaps(s,n,i,o) CCMAPS(s,n,i,o)
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/cdt.h b/usr/src/lib/libast/sparc/include/ast/cdt.h
deleted file mode 100644
index 1044207b76..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/cdt.h
+++ /dev/null
@@ -1,311 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _CDT_H
-#define _CDT_H 1
-
-/* Public interface for the dictionary library
-**
-** Written by Kiem-Phong Vo
-*/
-
-#define CDT_VERSION 20050420L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _dtlink_s Dtlink_t;
-typedef struct _dthold_s Dthold_t;
-typedef struct _dtdisc_s Dtdisc_t;
-typedef struct _dtmethod_s Dtmethod_t;
-typedef struct _dtdata_s Dtdata_t;
-typedef struct _dt_s Dt_t;
-typedef struct _dt_s Dict_t; /* for libdict compatibility */
-typedef struct _dtstat_s Dtstat_t;
-typedef Void_t* (*Dtsearch_f)_ARG_((Dt_t*,Void_t*,int));
-typedef Void_t* (*Dtmake_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef void (*Dtfree_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef int (*Dtcompar_f)_ARG_((Dt_t*,Void_t*,Void_t*,Dtdisc_t*));
-typedef unsigned int (*Dthash_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef Void_t* (*Dtmemory_f)_ARG_((Dt_t*,Void_t*,size_t,Dtdisc_t*));
-typedef int (*Dtevent_f)_ARG_((Dt_t*,int,Void_t*,Dtdisc_t*));
-
-struct _dtlink_s
-{ Dtlink_t* right; /* right child */
- union
- { unsigned int _hash; /* hash value */
- Dtlink_t* _left; /* left child */
- } hl;
-};
-
-/* private structure to hold an object */
-struct _dthold_s
-{ Dtlink_t hdr; /* header */
- Void_t* obj; /* user object */
-};
-
-/* method to manipulate dictionary structure */
-struct _dtmethod_s
-{ Dtsearch_f searchf; /* search function */
- int type; /* type of operation */
-};
-
-/* stuff that may be in shared memory */
-struct _dtdata_s
-{ int type; /* type of dictionary */
- Dtlink_t* here; /* finger to last search element */
- union
- { Dtlink_t** _htab; /* hash table */
- Dtlink_t* _head; /* linked list */
- } hh;
- int ntab; /* number of hash slots */
- int size; /* number of objects */
- int loop; /* number of nested loops */
- int minp; /* min path before splay, always even */
- /* for hash dt, > 0: fixed table size */
-};
-
-/* structure to hold methods that manipulate an object */
-struct _dtdisc_s
-{ int key; /* where the key begins in an object */
- int size; /* key size and type */
- int link; /* offset to Dtlink_t field */
- Dtmake_f makef; /* object constructor */
- Dtfree_f freef; /* object destructor */
- Dtcompar_f comparf;/* to compare two objects */
- Dthash_f hashf; /* to compute hash value of an object */
- Dtmemory_f memoryf;/* to allocate/free memory */
- Dtevent_f eventf; /* to process events */
-};
-
-#define DTDISC(dc,ky,sz,lk,mkf,frf,cmpf,hshf,memf,evf) \
- ( (dc)->key = (ky), (dc)->size = (sz), (dc)->link = (lk), \
- (dc)->makef = (mkf), (dc)->freef = (frf), \
- (dc)->comparf = (cmpf), (dc)->hashf = (hshf), \
- (dc)->memoryf = (memf), (dc)->eventf = (evf) )
-
-#ifdef offsetof
-#define DTOFFSET(struct_s, member) offsetof(struct_s, member)
-#else
-#define DTOFFSET(struct_s, member) ((int)(&((struct_s*)0)->member))
-#endif
-
-/* the dictionary structure itself */
-struct _dt_s
-{ Dtsearch_f searchf;/* search function */
- Dtdisc_t* disc; /* method to manipulate objs */
- Dtdata_t* data; /* sharable data */
- Dtmemory_f memoryf;/* function to alloc/free memory */
- Dtmethod_t* meth; /* dictionary method */
- int type; /* type information */
- int nview; /* number of parent view dictionaries */
- Dt_t* view; /* next on viewpath */
- Dt_t* walk; /* dictionary being walked */
- Void_t* user; /* for user's usage */
-};
-
-/* structure to get status of a dictionary */
-struct _dtstat_s
-{ int dt_meth; /* method type */
- int dt_size; /* number of elements */
- int dt_n; /* number of chains or levels */
- int dt_max; /* max size of a chain or a level */
- int* dt_count; /* counts of chains or levels by size */
-};
-
-/* flag set if the last search operation actually found the object */
-#define DT_FOUND 0100000
-
-/* supported storage methods */
-#define DT_SET 0000001 /* set with unique elements */
-#define DT_BAG 0000002 /* multiset */
-#define DT_OSET 0000004 /* ordered set (self-adjusting tree) */
-#define DT_OBAG 0000010 /* ordered multiset */
-#define DT_LIST 0000020 /* linked list */
-#define DT_STACK 0000040 /* stack */
-#define DT_QUEUE 0000100 /* queue */
-#define DT_METHODS 0000177 /* all currently supported methods */
-
-/* asserts to dtdisc() */
-#define DT_SAMECMP 0000001 /* compare methods equivalent */
-#define DT_SAMEHASH 0000002 /* hash methods equivalent */
-
-/* types of search */
-#define DT_INSERT 0000001 /* insert object if not found */
-#define DT_DELETE 0000002 /* delete object if found */
-#define DT_SEARCH 0000004 /* look for an object */
-#define DT_NEXT 0000010 /* look for next element */
-#define DT_PREV 0000020 /* find previous element */
-#define DT_RENEW 0000040 /* renewing an object */
-#define DT_CLEAR 0000100 /* clearing all objects */
-#define DT_FIRST 0000200 /* get first object */
-#define DT_LAST 0000400 /* get last object */
-#define DT_MATCH 0001000 /* find object matching key */
-#define DT_VSEARCH 0002000 /* search using internal representation */
-#define DT_ATTACH 0004000 /* attach an object to the dictionary */
-#define DT_DETACH 0010000 /* detach an object from the dictionary */
-
-/* events */
-#define DT_OPEN 1 /* a dictionary is being opened */
-#define DT_CLOSE 2 /* a dictionary is being closed */
-#define DT_DISC 3 /* discipline is about to be changed */
-#define DT_METH 4 /* method is about to be changed */
-#define DT_ENDOPEN 5 /* dtopen() is done */
-#define DT_ENDCLOSE 6 /* dtclose() is done */
-#define DT_HASHSIZE 7 /* setting hash table size */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-#if !_BLD_cdt && defined(__IMPORT__)
-#define extern __IMPORT__
-#endif
-
-extern Dtmethod_t* Dtset;
-extern Dtmethod_t* Dtbag;
-extern Dtmethod_t* Dtoset;
-extern Dtmethod_t* Dtobag;
-extern Dtmethod_t* Dtlist;
-extern Dtmethod_t* Dtstack;
-extern Dtmethod_t* Dtqueue;
-
-/* compatibility stuff; will go away */
-#ifndef KPVDEL
-extern Dtmethod_t* Dtorder;
-extern Dtmethod_t* Dttree;
-extern Dtmethod_t* Dthash;
-extern Dtmethod_t _Dttree;
-extern Dtmethod_t _Dthash;
-extern Dtmethod_t _Dtlist;
-extern Dtmethod_t _Dtqueue;
-extern Dtmethod_t _Dtstack;
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Dt_t* dtopen _ARG_((Dtdisc_t*, Dtmethod_t*));
-extern int dtclose _ARG_((Dt_t*));
-extern Dt_t* dtview _ARG_((Dt_t*, Dt_t*));
-extern Dtdisc_t* dtdisc _ARG_((Dt_t* dt, Dtdisc_t*, int));
-extern Dtmethod_t* dtmethod _ARG_((Dt_t*, Dtmethod_t*));
-
-extern Dtlink_t* dtflatten _ARG_((Dt_t*));
-extern Dtlink_t* dtextract _ARG_((Dt_t*));
-extern int dtrestore _ARG_((Dt_t*, Dtlink_t*));
-
-extern int dttreeset _ARG_((Dt_t*, int, int));
-
-extern int dtwalk _ARG_((Dt_t*, int(*)(Dt_t*,Void_t*,Void_t*), Void_t*));
-
-extern Void_t* dtrenew _ARG_((Dt_t*, Void_t*));
-
-extern int dtsize _ARG_((Dt_t*));
-extern int dtstat _ARG_((Dt_t*, Dtstat_t*, int));
-extern unsigned int dtstrhash _ARG_((unsigned int, Void_t*, int));
-
-#if !_PACKAGE_ast
-extern int memcmp _ARG_((const Void_t*, const Void_t*, size_t));
-extern int strcmp _ARG_((const char*, const char*));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* internal functions for translating among holder, object and key */
-#define _DT(dt) ((Dt_t*)(dt))
-#define _DTDSC(dc,ky,sz,lk,cmpf) \
- (ky = (dc)->key, sz = (dc)->size, lk = (dc)->link, cmpf = (dc)->comparf)
-#define _DTLNK(o,lk) ((Dtlink_t*)((char*)(o) + lk) )
-#define _DTOBJ(e,lk) ((lk) < 0 ? ((Dthold_t*)(e))->obj : (Void_t*)((char*)(e) - (lk)) )
-#define _DTKEY(o,ky,sz) (Void_t*)((sz) < 0 ? *((char**)((char*)(o)+(ky))) : ((char*)(o)+(ky)))
-
-#define _DTCMP(dt,k1,k2,dc,cmpf,sz) \
- ((cmpf) ? (*cmpf)(dt,k1,k2,dc) : \
- ((sz) <= 0 ? strcmp(k1,k2) : memcmp(k1,k2,sz)) )
-#define _DTHSH(dt,ky,dc,sz) ((dc)->hashf ? (*(dc)->hashf)(dt,ky,dc) : dtstrhash(0,ky,sz) )
-
-/* special search function for tree structure only */
-#define _DTMTCH(dt,key,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = (key); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define _DTSRCH(dt,obj,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = _DTKEY(obj, _ky, _sz); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define DTTREEMATCH(dt,key,action) _DTMTCH(_DT(dt),(Void_t*)(key),action)
-#define DTTREESEARCH(dt,obj,action) _DTSRCH(_DT(dt),(Void_t*)(obj),action)
-
-#define dtvnext(d) (_DT(d)->view)
-#define dtvcount(d) (_DT(d)->nview)
-#define dtvhere(d) (_DT(d)->walk)
-
-#define dtlink(d,e) (((Dtlink_t*)(e))->right)
-#define dtobj(d,e) _DTOBJ((e), _DT(d)->disc->link)
-#define dtfinger(d) (_DT(d)->data->here ? dtobj((d),_DT(d)->data->here):(Void_t*)(0))
-
-#define dtfirst(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_FIRST)
-#define dtnext(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_NEXT)
-#define dtleast(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_NEXT)
-#define dtlast(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_LAST)
-#define dtprev(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_PREV)
-#define dtmost(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_PREV)
-#define dtsearch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH)
-#define dtmatch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_MATCH)
-#define dtinsert(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_INSERT)
-#define dtdelete(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DELETE)
-#define dtattach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_ATTACH)
-#define dtdetach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DETACH)
-#define dtclear(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_CLEAR)
-#define dtfound(d) (_DT(d)->type & DT_FOUND)
-
-#define DT_PRIME 17109811 /* 2#00000001 00000101 00010011 00110011 */
-#define dtcharhash(h,c) (((unsigned int)(h) + (unsigned int)(c)) * DT_PRIME )
-
-#endif /* _CDT_H */
diff --git a/usr/src/lib/libast/sparc/include/ast/debug.h b/usr/src/lib/libast/sparc/include/ast/debug.h
deleted file mode 100644
index 6dfee2254a..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/debug.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * common ast debug definitions
- * include after the ast headers
- */
-
-#ifndef _DEBUG_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _DEBUG_H
-
-#include <ast.h>
-#include <error.h>
-
-#if !defined(DEBUG) && _BLD_DEBUG
-#define DEBUG _BLD_DEBUG
-#endif
-
-#if DEBUG || _BLD_DEBUG
-
-#define debug(x) x
-#define message(x) do if (error_info.trace < 0) { error x; } while (0)
-#define messagef(x) do if (error_info.trace < 0) { errorf x; } while (0)
-
-#define DEBUG_BEGTIME() debug_elapsed(1)
-#define DEBUG_GETTIME() debug_elapsed(0)
-#define DEBUG_ASSERT(p) ((p) ? 0 : (debug_fatal(__FILE__, __LINE__),0))
-#define DEBUG_COUNT(n) ((n) += 1)
-#define DEBUG_TALLY(c,n,v) ((c) ? ((n) += (v)) : (n))
-#define DEBUG_INCREASE(n) ((n) += 1)
-#define DEBUG_DECREASE(n) ((n) -= 1)
-#define DEBUG_DECLARE(t,v) t v
-#define DEBUG_SET(n,v) ((n) = (v))
-#define DEBUG_PRINT(fd,s,v) do {char _b[1024];write(fd,_b,sfsprintf(_b,sizeof(_b),s,v));} while(0)
-#define DEBUG_WRITE(fd,d,n) write((fd),(d),(n))
-#define DEBUG_TEMP(temp) (temp) /* debugging stuff that should be removed */
-#define DEBUG_BREAK break
-#define DEBUG_CONTINUE continue
-#define DEBUG_GOTO(label) do { debug_fatal(__FILE__, __LINE__); goto label; } while(0)
-#define DEBUG_RETURN(x) do { debug_fatal(__FILE__, __LINE__); return(x); } while(0)
-
-#else
-
-#define debug(x)
-#define message(x)
-#define messagef(x)
-
-#define DEBUG_BEGTIME()
-#define DEBUG_GETTIME()
-#define DEBUG_ASSERT(p)
-#define DEBUG_COUNT(n)
-#define DEBUG_TALLY(c,n,v)
-#define DEBUG_INCREASE(n)
-#define DEBUG_DECREASE(n)
-#define DEBUG_DECLARE(t,v)
-#define DEBUG_SET(n,v)
-#define DEBUG_PRINT(fd,s,v)
-#define DEBUG_WRITE(fd,d,n)
-#define DEBUG_TEMP(x)
-#define DEBUG_BREAK break
-#define DEBUG_CONTINUE continue
-#define DEBUG_GOTO(label) goto label
-#define DEBUG_RETURN(x) return(x)
-
-#endif
-
-#ifndef BREAK
-#define BREAK DEBUG_BREAK
-#endif
-#ifndef CONTINUE
-#define CONTINUE DEBUG_CONTINUE
-#endif
-#ifndef GOTO
-#define GOTO(label) DEBUG_GOTO(label)
-#endif
-#ifndef RETURN
-#define RETURN(x) DEBUG_RETURN(x)
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ double debug_elapsed __PROTO__((int));
-extern __MANGLE__ void debug_fatal __PROTO__((const char*, int));
-extern __MANGLE__ void systrace __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/dirent.h b/usr/src/lib/libast/sparc/include/ast/dirent.h
deleted file mode 100644
index 05e76cadae..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/dirent.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_dirent.h>
diff --git a/usr/src/lib/libast/sparc/include/ast/dt.h b/usr/src/lib/libast/sparc/include/ast/dt.h
deleted file mode 100644
index b6b356aee7..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/dt.h
+++ /dev/null
@@ -1,49 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-#ifndef _DT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _DT_H 1
-
-#include <cdt.h>
-#include <vmalloc.h>
-
-#if _BLD_cdt && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Dt_t* dtnew __PROTO__((Vmalloc_t*, Dtdisc_t*, Dtmethod_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/endian.h b/usr/src/lib/libast/sparc/include/ast/endian.h
deleted file mode 100644
index 1c992dd490..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/endian.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * linux/gnu compatibility
- */
-
-#ifndef _ENDIAN_H
-#define _ENDIAN_H
-
-#include <bytesex.h>
-
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
-#define __PDP_ENDIAN 3412
-
-#if defined (__USE_BSD) && !defined(__STRICT_ANSI__)
-
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN __LITTLE_ENDIAN
-#endif
-
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN __BIG_ENDIAN
-#endif
-
-#ifndef PDP_ENDIAN
-#define PDP_ENDIAN __PDP_ENDIAN
-#endif
-
-#undef BYTE_ORDER
-#define BYTE_ORDER __BYTE_ORDER
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/error.h b/usr/src/lib/libast/sparc/include/ast/error.h
deleted file mode 100644
index c0e21dadd7..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/error.h
+++ /dev/null
@@ -1,196 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * option, error and message formatter external definitions
- */
-
-#ifndef _ERROR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _ERROR_H
-
-#include <ast.h>
-#include <option.h>
-#include <errno.h>
-
-#define ERROR_VERSION 20070319L
-
-#if !defined(errno) && defined(__DYNAMIC__)
-#define errno __DYNAMIC__(errno)
-#endif
-
-#define ERROR_debug(n) (-(n))
-#define ERROR_exit(n) ((n)+ERROR_ERROR)
-#define ERROR_system(n) (((n)+ERROR_ERROR)|ERROR_SYSTEM)
-#define ERROR_usage(n) ((((n)?2:0)+ERROR_ERROR)|ERROR_USAGE)
-#define ERROR_warn(n) (ERROR_WARNING)
-
-#ifndef ERROR_catalog
-#define ERROR_catalog(t) t
-#endif
-#ifndef ERROR_dictionary
-#define ERROR_dictionary(t) t
-#endif
-
-#ifndef ERROR_translate
-#define ERROR_translating() (error_info.translate&&(ast.locale.set&(1<<AST_LC_MESSAGES)))
-#define ERROR_translate(l,i,d,m) (ERROR_translating()?errorx((const char*)(l),(const char*)(i),(const char*)(d),(const char*)(m)):(char*)(m))
-#endif
-
-#define ERROR_INFO 0 /* info message -- no err_id */
-#define ERROR_WARNING 1 /* warning message */
-#define ERROR_ERROR 2 /* error message -- no err_exit */
-#define ERROR_FATAL 3 /* error message with err_exit */
-#define ERROR_NOEXEC EXIT_NOEXEC /* shell convention */
-#define ERROR_NOENT EXIT_NOTFOUND /* shell convention */
-#define ERROR_PANIC ERROR_LEVEL /* panic message with err_exit */
-
-#define ERROR_LEVEL 0x00ff /* level portion of status */
-#define ERROR_SYSTEM 0x0100 /* report system errno message */
-#define ERROR_OUTPUT 0x0200 /* next arg is error fd */
-#define ERROR_SOURCE 0x0400 /* next 2 args are FILE,LINE */
-#define ERROR_USAGE 0x0800 /* usage message */
-#define ERROR_PROMPT 0x1000 /* omit trailing newline */
-#define ERROR_NOID 0x2000 /* omit err_id */
-#define ERROR_LIBRARY 0x4000 /* library routine error */
-
-#define ERROR_INTERACTIVE 0x0001 /* context is interactive */
-#define ERROR_SILENT 0x0002 /* context is silent */
-#define ERROR_NOTIFY 0x0004 /* main(-sig,0,ctx) on signal */
-
-#define ERROR_FREE 0x0010 /* free context on pop */
-#define ERROR_POP 0x0020 /* pop context */
-#define ERROR_PUSH 0x0040 /* push context */
-#define ERROR_SET 0x0080 /* set context */
-
-/*
- * errorpush()/errorpop() are obsolete -- use errorctx() instead
- */
-
-#ifndef ERROR_CONTEXT_T
-#define ERROR_CONTEXT_T Error_info_t
-#endif
-
-#define ERROR_CONTEXT_BASE ((Error_context_t*)&error_info.context)
-
-#define errorpush(p,f) (*(p)= *ERROR_CONTEXT_BASE,*ERROR_CONTEXT_BASE=error_info.empty,error_info.context=(Error_context_t*)(p),error_info.flags=(f))
-#define errorpop(p) (*ERROR_CONTEXT_BASE= *(p))
-
-typedef struct Error_info_s Error_info_t;
-typedef struct Error_context_s Error_context_t;
-
-#define ERROR_CONTEXT \
- ERROR_CONTEXT_T* context; /* prev context stack element */ \
- int errors; /* >= ERROR_ERROR count */ \
- int flags; /* context flags */ \
- int line; /* input|output line number */ \
- int warnings; /* ERROR_WARNING count */ \
- char* file; /* input|output file name */ \
- char* id; /* command id */
-
-struct Error_context_s /* context stack element */
-{
- ERROR_CONTEXT
-};
-
-struct Error_info_s /* error state */
-{
- int fd; /* write(2) fd */
-
- void (*exit) __PROTO__((int)); /* error exit */
- ssize_t (*write) __PROTO__((int, const __V_*, size_t)); /* error output */
-
- /* the rest are implicitly initialized */
-
- int clear; /* default clear ERROR_* flags */
- int core; /* level>=core -> core dump */
- int indent; /* debug trace indent level */
- int init; /* initialized */
- int last_errno; /* last reported errno */
- int mask; /* multi level debug trace mask */
- int set; /* default set ERROR_* flags */
- int trace; /* debug trace level */
-
- char* version; /* ERROR_SOURCE command version */
-
- int (*auxilliary) __PROTO__((Sfio_t*, int, int)); /* aux info to append */
-
- ERROR_CONTEXT /* top of context stack */
-
- Error_context_t empty; /* empty context stack element */
-
- unsigned long time; /* debug time trace */
-
- char* (*translate) __PROTO__((const char*, const char*, const char*, const char*)); /* format translator */
-
- const char* catalog; /* message catalog */
-};
-
-#ifndef errno
-extern __MANGLE__ int errno; /* system call error status */
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Error_info_t* _error_infop_;
-
-#define error_info (*_error_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ void error __PROTO__((int, ...));
-extern __MANGLE__ int errormsg __PROTO__((const char*, int, ...));
-extern __MANGLE__ int errorf __PROTO__((__V_*, __V_*, int, ...));
-extern __MANGLE__ void errorv __PROTO__((const char*, int, va_list));
-#ifndef errorx
-extern __MANGLE__ char* errorx __PROTO__((const char*, const char*, const char*, const char*));
-#endif
-extern __MANGLE__ Error_info_t* errorctx __PROTO__((Error_info_t*, int, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/find.h b/usr/src/lib/libast/sparc/include/ast/find.h
deleted file mode 100644
index 374858aced..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/find.h
+++ /dev/null
@@ -1,97 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * fast find interface definitions
- */
-
-#ifndef _FIND_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FIND_H
-
-#define FIND_VERSION 19980301L
-
-#ifndef FIND_CODES
-#define FIND_CODES "lib/find/codes"
-#endif
-
-#define FIND_CODES_ENV "FINDCODES"
-
-#define FIND_GENERATE (1<<0) /* generate new codes */
-#define FIND_ICASE (1<<1) /* ignore case in match */
-#define FIND_GNU (1<<2) /* generate gnu format codes */
-#define FIND_OLD (1<<3) /* generate old format codes */
-#define FIND_TYPE (1<<4) /* generate type with codes */
-#define FIND_VERIFY (1<<5) /* verify the dir hierarchy */
-
-#define FIND_USER (1L<<16) /* first user flag bit */
-
-struct Find_s;
-struct Finddisc_s;
-
-typedef int (*Findverify_f) __PROTO__((struct Find_s*, const char*, size_t, struct Finddisc_s*));
-
-typedef struct Finddisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* FIND_* flags */
- Error_f errorf; /* error function */
- Findverify_f verifyf; /* dir verify function */
- char** dirs; /* dir prefixes to search */
-} Finddisc_t;
-
-typedef struct Find_s
-{
- const char* id; /* library id string */
- unsigned long stamp; /* codes time stamp */
-
-#ifdef _FIND_PRIVATE_
- _FIND_PRIVATE_
-#endif
-
-} Find_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Find_t* findopen __PROTO__((const char*, const char*, const char*, Finddisc_t*));
-extern __MANGLE__ char* findread __PROTO__((Find_t*));
-extern __MANGLE__ int findwrite __PROTO__((Find_t*, const char*, size_t, const char*));
-extern __MANGLE__ int findclose __PROTO__((Find_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/fnmatch.h b/usr/src/lib/libast/sparc/include/ast/fnmatch.h
deleted file mode 100644
index 764009c3b7..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/fnmatch.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix fnmatch interface definitions
- */
-
-#ifndef _FNMATCH_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FNMATCH_H
-
-#include <ast_common.h>
-
-/* fnmatch flags */
-
-#define FNM_NOESCAPE 0x0001 /* \ is literal */
-#define FNM_PATHNAME 0x0002 /* explicit match for / */
-#define FNM_PERIOD 0x0004 /* explicit match for leading . */
-#define FNM_NOSYS 0x0010 /* not implemented */
-
-/* nonstandard fnmatch() flags */
-
-#define FNM_AUGMENTED 0x0008 /* enable ! & ( | ) */
-#define FNM_ICASE 0x0020 /* ignore case in match */
-#define FNM_LEADING_DIR 0x0040 /* match up to implicit / */
-
-#define FNM_CASEFOLD FNM_ICASE /* gnu compatibility */
-#define FNM_FILE_NAME FNM_PATHNAME /* gnu compatibility */
-
-/* fnmatch error codes -- other non-zero values from <regex.h> */
-
-#define FNM_NOMATCH 1 /* == REG_NOMATCH */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int fnmatch __PROTO__((const char*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/fnv.h b/usr/src/lib/libast/sparc/include/ast/fnv.h
deleted file mode 100644
index 2312a20118..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/fnv.h
+++ /dev/null
@@ -1,81 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * Landon Kurt Knoll
- * Phong Vo
- *
- * FNV-1 linear congruent checksum/hash/PRNG
- * see http://www.isthe.com/chongo/tech/comp/fnv/
- */
-
-#ifndef _FNV_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FNV_H
-
-#include <ast_common.h>
-
-#define FNV_INIT 0x811c9dc5L
-#define FNV_MULT 0x01000193L
-
-#define FNVINIT(h) (h = FNV_INIT)
-#define FNVPART(h,c) (h = (h) * FNV_MULT ^ (c))
-#define FNVSUM(h,s,n) do { \
- register size_t _i_ = 0; \
- while (_i_ < n) \
- FNVPART(h, ((unsigned char*)s)[_i_++]); \
- } while (0)
-
-#if _typ_int64_t
-
-#ifdef _ast_LL
-
-#define FNV_INIT64 0xcbf29ce484222325LL
-#define FNV_MULT64 0x00000100000001b3LL
-
-#else
-
-#define FNV_INIT64 ((int64_t)0xcbf29ce484222325)
-#define FNV_MULT64 ((int64_t)0x00000100000001b3)
-
-#endif
-
-#define FNVINIT64(h) (h = FNV_INIT64)
-#define FNVPART64(h,c) (h = (h) * FNV_MULT64 ^ (c))
-#define FNVSUM64(h,s,n) do { \
- register int _i_ = 0; \
- while (_i_ < n) \
- FNVPART64(h, ((unsigned char*)s)[_i_++]); \
- } while (0)
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/fs3d.h b/usr/src/lib/libast/sparc/include/ast/fs3d.h
deleted file mode 100644
index bae8dde927..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/fs3d.h
+++ /dev/null
@@ -1,123 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * 3d fs interface definitions
- */
-
-#ifndef _FS3D_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FS3D_H
-
-#include <ast_fs.h>
-
-#if _int_st_spare1
-#define iview(p) ((p)->st_spare1)
-#define IVIEW(p,v) ((p)->st_spare1=(v))
-#else
-#if _ary_st_spare4
-#define iview(p) ((p)->st_spare4[0])
-#define IVIEW(p,v) ((p)->st_spare4[0]=(v))
-#else
-#if _ary_st_pad4
-#define iview(p) ((p)->st_pad4[0])
-#define IVIEW(p,v) ((p)->st_pad4[0]=(v))
-#else
-#if _mem_st_rdev_stat
-#define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev)
-#define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0)
-#else
-#define iview(p) 0
-#define IVIEW(p,v)
-#endif
-#endif
-#endif
-#endif
-
-/*
- * special options
- */
-
-#define FS3D_init "/#option/init"
-#define FS3D_on "/#option/3d"
-#define FS3D_off "/#option/2d"
-
-/*
- * fs3d(3) ops
- */
-
-#define FS3D_OP(o,a) (((a)<<3)|(o))
-
-#define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */
-#define FS3D_OFF FS3D_OP_OFF
-#define FS3D_ON FS3D_OP_ON
-#define FS3D_TEST FS3D_OP_TEST
-#define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n)
-
-#define FS3D_op(x) ((x)&07)
-#define FS3D_arg(x) (((x)>>3)&07777)
-
-#define FS3D_OP_OFF 0
-#define FS3D_OP_ON 1
-#define FS3D_OP_TEST 2
-#define FS3D_OP_LIMIT 3
-#define FS3D_OP_INIT 7
-
-/*
- * mount(2) ops
- */
-
-#define FS3D_ALL (FS3D_VIEW|FS3D_VERSION)
-#define FS3D_VIEW 002
-#define FS3D_VERSION 004
-#define FS3D_GET 010
-#define FS3D_SIZE(n) ((n)<<4)
-#define FS3D_SIZEOF(n) ((n)>>4)
-
-#if !_BLD_3d
-#define mount(s,t,f,d) fs3d_mount(s,t,f,d)
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int fs3d __PROTO__((int));
-extern __MANGLE__ int fs3d_mount __PROTO__((const char*, char*, int, __V_*));
-extern __MANGLE__ char* pathnext __PROTO__((char*, char*, long*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/fts.h b/usr/src/lib/libast/sparc/include/ast/fts.h
deleted file mode 100644
index 1bf72a114d..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/fts.h
+++ /dev/null
@@ -1,173 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * David Korn
- * Phong Vo
- * AT&T Research
- *
- * fts interface definitions
- */
-
-#ifndef _FTS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTS_H
-
-#include <ast_std.h>
-#include <ast_fs.h>
-#include <ast_mode.h>
-
-/*
- * fts_open flags
- */
-
-#define FTS_LOGICAL 0 /* logical traversal, follow symlinks */
-#define FTS_META (1<<0) /* follow top dir symlinks even if phys */
-#define FTS_NOCHDIR (1<<1) /* don't chdir */
-#define FTS_NOPOSTORDER (1<<2) /* no postorder visits */
-#define FTS_NOPREORDER (1<<3) /* no preorder visits */
-#define FTS_NOSEEDOTDIR (1<<11) /* never retain leading . dir */
-#define FTS_NOSTAT (1<<4) /* don't stat children */
-#define FTS_ONEPATH (1<<5) /* pathnames arg is one const char* */
-#define FTS_PHYSICAL (1<<6) /* physical traversal, don't follow */
-#define FTS_SEEDOT (1<<7) /* return . and .. */
-#define FTS_SEEDOTDIR (1<<10) /* always retain leading . dir */
-#define FTS_TOP (1<<8) /* don't traverse subdirectories */
-#define FTS_XDEV (1<<9) /* don't cross mount points */
-
-#define FTS_USER (1<<12) /* first user flag bit */
-
-#define FTS_COMFOLLOW FTS_META
-
-/*
- * fts_info flags
- */
-
-#define FTS_DEFAULT 0 /* ok, someone must have wanted this */
-
-#define FTS_NS (1<<0) /* stat failed */
-#define FTS_F (1<<1) /* file - not directory or symbolic link*/
-#define FTS_SL (1<<2) /* symbolic link */
-#define FTS_D (1<<3) /* directory - pre-order visit */
-
-#define FTS_C (1<<4) /* causes cycle */
-#define FTS_ERR (1<<5) /* some other error */
-#define FTS_DD (1<<6) /* . or .. */
-#define FTS_NR (1<<7) /* cannot read */
-#define FTS_NX (1<<8) /* cannot search */
-#define FTS_OK (1<<9) /* no info but otherwise ok */
-#define FTS_P (1<<10) /* post-order visit */
-
-#define FTS_DC (FTS_D|FTS_C) /* dir - would cause cycle */
-#define FTS_DNR (FTS_D|FTS_NR) /* dir - no read permission */
-#define FTS_DNX (FTS_D|FTS_NX) /* dir - no search permission */
-#define FTS_DOT (FTS_D|FTS_DD) /* . or .. */
-#define FTS_DP (FTS_D|FTS_P) /* dir - post-order visit */
-#define FTS_NSOK (FTS_NS|FTS_OK) /* no stat (because you asked) */
-#define FTS_SLNONE (FTS_SL|FTS_NS) /* symlink - to nowhere */
-
-/*
- * fts_set flags
- */
-
-#define FTS_AGAIN FTS_TOP /* process entry again */
-#define FTS_FOLLOW FTS_META /* follow FTS_SL symlink */
-#define FTS_SKIP FTS_NOSTAT /* skip FTS_D directory */
-#define FTS_STAT FTS_PHYSICAL /* stat() done by user */
-
-typedef struct Fts FTS;
-typedef struct Ftsent FTSENT;
-
-struct Ftsent
-{
- char* fts_accpath; /* path relative to . */
- char* fts_name; /* file name */
- char* fts_path; /* path relative to top dir */
- FTSENT* fts_cycle; /* offender if cycle */
- FTSENT* fts_link; /* next child */
- FTSENT* fts_parent; /* parent directory */
- struct stat* fts_statp; /* stat info */
-#ifdef _FTSENT_LOCAL_PRIVATE_
- _FTSENT_LOCAL_PRIVATE_
-#else
- __V_* fts_pointer; /* local pointer value */
-#endif
- long fts_number; /* local numeric value */
- int fts_errno; /* errno for this entry */
- unsigned short fts_info; /* info flags */
-
- unsigned short _fts_namelen; /* old fts_namelen */
- unsigned short _fts_pathlen; /* old fts_pathlen */
- short _fts_level; /* old fts_level */
-
- short _fts_status; /* <ftwalk.h> compatibility */
- struct stat _fts_statb; /* <ftwalk.h> compatibility */
-
- FTS* fts; /* fts_open() handle */
- size_t fts_namelen; /* strlen(fts_name) */
- size_t fts_pathlen; /* strlen(fts_path) */
- ssize_t fts_level; /* file tree depth, 0 at top */
-
-#ifdef _FTSENT_PRIVATE_
- _FTSENT_PRIVATE_
-#endif
-
-};
-
-struct Fts
-{
- int fts_errno; /* last errno */
- __V_* fts_handle; /* user defined handle */
-
-#ifdef _FTS_PRIVATE_
- _FTS_PRIVATE_
-#endif
-
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ FTSENT* fts_children __PROTO__((FTS*, int));
-extern __MANGLE__ int fts_close __PROTO__((FTS*));
-extern __MANGLE__ int fts_flags __PROTO__((void));
-extern __MANGLE__ int fts_local __PROTO__((FTSENT*));
-extern __MANGLE__ int fts_notify __PROTO__((int(*)(FTS*, FTSENT*, __V_*), __V_*));
-extern __MANGLE__ FTS* fts_open __PROTO__((char* const*, int, int(*)(FTSENT* const*, FTSENT* const*)));
-extern __MANGLE__ FTSENT* fts_read __PROTO__((FTS*));
-extern __MANGLE__ int fts_set __PROTO__((FTS*, FTSENT*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ftw.h b/usr/src/lib/libast/sparc/include/ast/ftw.h
deleted file mode 100644
index 68feb09bb3..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ftw.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * ftw,nftw over ftwalk
- */
-
-#ifndef _FTW_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTW_H
-
-#define FTW FTWALK
-#include <ftwalk.h>
-#undef FTW
-
-#define FTW_SLN (FTW_SL|FTW_NR)
-
-#define FTW_PHYS (FTW_PHYSICAL)
-#define FTW_CHDIR (FTW_DOT)
-#define FTW_DEPTH (FTW_POST)
-#define FTW_OPEN (0)
-
-struct FTW
-{
- int quit;
- int base;
- int level;
-};
-
-#define FTW_SKD FTW_SKIP
-#define FTW_PRUNE FTW_SKIP
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int ftw __PROTO__((const char*, int(*)(const char*, const struct stat*, int), int));
-extern __MANGLE__ int nftw __PROTO__((const char*, int(*)(const char*, const struct stat*, int, struct FTW*), int, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ftwalk.h b/usr/src/lib/libast/sparc/include/ast/ftwalk.h
deleted file mode 100644
index 673b1c2824..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ftwalk.h
+++ /dev/null
@@ -1,135 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Phong Vo
- * Glenn Fowler
- * AT&T Research
- *
- * ast ftwalk interface definitions
- * ftwalk was the initial improvement on ftw and nftw
- * which formed the basis for the POSIX fts proposal
- *
- * NOTE: this file is in cahoots with the fts implementation
- */
-
-#ifndef _FTWALK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTWALK_H
-
-#define fts_info info
-#define fts_level level
-#define fts_link link
-#define fts_name name
-#define fts_namelen namelen
-#define fts_parent parent
-#define fts_path path
-#define fts_pathlen pathlen
-#define _fts_status status
-#define _fts_statb statb
-
-#define FTSENT Ftw_t /* <fts.h> internal */
-#define Ftsent FTW /* <fts.h> internal */
-
-#define _FTSENT_LOCAL_PRIVATE_ /* <fts.h> internal */ \
- union \
- { \
- long number; /* local numeric value */ \
- __V_* pointer; /* local pointer value */ \
- } local;
-
-#include <fts.h>
-
-/*
- * ftwalk() argument flags
- */
-
-#define FTW_CANON FTS_CANON
-#define FTW_CHILDREN (FTS_USER<<0)
-#define FTW_DELAY FTS_NOSTAT
-#define FTW_DOT FTS_NOCHDIR
-#define FTW_META FTS_META
-#define FTW_MOUNT FTS_XDEV
-#define FTW_MULTIPLE FTS_ONEPATH
-#define FTW_NOSEEDOTDIR FTS_NOSEEDOTDIR
-#define FTW_PHYSICAL FTS_PHYSICAL
-#define FTW_POST (FTS_USER<<1)
-#define FTW_SEEDOTDIR FTS_SEEDOTDIR
-#define FTW_TOP FTS_TOP
-#define FTW_TWICE (FTS_USER<<2)
-#define FTW_USER (FTS_USER<<3)
-
-/*
- * Ftw_t.info type bits
- */
-
-#define FTW_C FTS_C
-#define FTW_D FTS_D
-#define FTW_DC FTS_DC
-#define FTW_DNR FTS_DNR
-#define FTW_DNX FTS_DNX
-#define FTW_DP FTS_DP
-#define FTW_F FTS_F
-#define FTW_NR FTS_NR
-#define FTW_NS FTS_NS
-#define FTW_NSOK FTS_NSOK
-#define FTW_NX FTS_NX
-#define FTW_P FTS_P
-#define FTW_SL FTS_SL
-
-/*
- * Ftw_t.status entry values
- */
-
-#define FTW_NAME FTS_DOT /* access by Ftw_t.name */
-#define FTW_PATH FTS_NOCHDIR /* access by Ftw_t.path */
-
-/*
- * Ftw_t.status return values
- */
-
-#define FTW_AGAIN FTS_AGAIN
-#define FTW_FOLLOW FTS_FOLLOW
-#define FTW_NOPOST FTS_NOPOSTORDER
-#define FTW_SKIP FTS_SKIP
-#define FTW_STAT FTS_STAT
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int ftwalk __PROTO__((const char*, int(*)(Ftw_t*), int, int(*)(Ftw_t*, Ftw_t*)));
-extern __MANGLE__ int ftwflags __PROTO__((void));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/getopt.h b/usr/src/lib/libast/sparc/include/ast/getopt.h
deleted file mode 100644
index c0679a7e53..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/getopt.h
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * gnu getopt interface
- */
-
-#ifndef _GETOPT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#ifdef _AST_STD_I
-#define _GETOPT_H -1
-#else
-#define _GETOPT_H 1
-
-#include <ast_getopt.h>
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-struct option
-{
- const char* name;
- int has_arg;
- int* flag;
- int val;
-};
-
-extern __MANGLE__ int getopt_long __PROTO__((int, char* const*, const char*, const struct option*, int*));
-extern __MANGLE__ int getopt_long_only __PROTO__((int, char* const*, const char*, const struct option*, int*));
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/glob.h b/usr/src/lib/libast/sparc/include/ast/glob.h
deleted file mode 100644
index e2708229c7..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/glob.h
+++ /dev/null
@@ -1,155 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix glob interface definitions with gnu extensions
- */
-
-#ifndef _GLOB_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _GLOB_H
-
-#define GLOB_VERSION 20060717L
-
-#include <stdlib.h>
-
-struct dirent;
-struct stat;
-
-struct _glob_;
-struct _globlist_;
-
-typedef struct _glob_ glob_t;
-typedef struct _globlist_ globlist_t;
-
-struct _globlist_
-{
- globlist_t* gl_next;
- char* gl_begin;
- unsigned char gl_flags;
- char gl_path[1];
-};
-
-struct _glob_
-{
- size_t gl_pathc;
- char** gl_pathv;
- size_t gl_offs;
- globlist_t* gl_list;
- int gl_flags;
-
- /* GLOB_DISC data -- memset(&gl,0,sizeof(gl)) before using! */
-
- const char* gl_fignore;
- const char* gl_suffix;
- unsigned char* gl_intr;
-
- int gl_delim;
-
- __V_* gl_handle;
- __V_* (*gl_diropen) __PROTO__((glob_t*, const char*));
- char* (*gl_dirnext) __PROTO__((glob_t*, __V_*));
- void (*gl_dirclose) __PROTO__((glob_t*, __V_*));
- int (*gl_type) __PROTO__((glob_t*, const char*, int));
- int (*gl_attr) __PROTO__((glob_t*, const char*, int));
-
- /* gnu extensions -- but how do you synthesize dirent and stat? */
-
- __V_* (*gl_opendir) __PROTO__((const char*));
- struct dirent* (*gl_readdir) __PROTO__((__V_*));
- void (*gl_closedir) __PROTO__((__V_*));
- int (*gl_stat) __PROTO__((const char*, struct stat*));
- int (*gl_lstat) __PROTO__((const char*, struct stat*));
-
- /* ast additions */
-
- char* (*gl_nextdir) __PROTO__((glob_t*, char*));
- unsigned long gl_status;
- unsigned long gl_version;
- unsigned short gl_extra;
-
-#ifdef _GLOB_PRIVATE_
- _GLOB_PRIVATE_
-#else
- char* gl_pad[23];
-#endif
-
-};
-
-/* standard interface */
-#define GLOB_APPEND 0x0001 /* append to previous */
-#define GLOB_DOOFFS 0x0002 /* gl_offs defines argv offset */
-#define GLOB_ERR 0x0004 /* abort on error */
-#define GLOB_MARK 0x0008 /* append / to directories */
-#define GLOB_NOCHECK 0x0010 /* nomatch is original pattern */
-#define GLOB_NOESCAPE 0x0020 /* don't treat \ specially */
-#define GLOB_NOSORT 0x0040 /* don't sort the list */
-
-/* extended interface */
-#define GLOB_STARSTAR 0x0080 /* enable [/]**[/] expansion */
-#define GLOB_BRACE 0x0100 /* enable {...} expansion */
-#define GLOB_ICASE 0x0200 /* ignore case on match */
-#define GLOB_COMPLETE 0x0400 /* shell file completeion */
-#define GLOB_AUGMENTED 0x0800 /* augmented shell patterns */
-#define GLOB_STACK 0x1000 /* allocate on current stack */
-#define GLOB_LIST 0x2000 /* just create gl_list */
-#define GLOB_ALTDIRFUNC 0x4000 /* gnu discipline functions */
-#define GLOB_DISC 0x8000 /* discipline initialized */
-
-/* gl_status */
-#define GLOB_NOTDIR 0x0001 /* last gl_dirnext() not a dir */
-
-/* gl_type return */
-#define GLOB_NOTFOUND 0 /* does not exist */
-#define GLOB_DEV 1 /* exists but not DIR EXE REG */
-#define GLOB_DIR 2 /* directory */
-#define GLOB_EXE 3 /* executable regular file */
-#define GLOB_REG 4 /* regular file */
-
-/* error return values */
-#define GLOB_ABORTED 1
-#define GLOB_NOMATCH 2
-#define GLOB_NOSPACE 3
-#define GLOB_INTR 4
-#define GLOB_APPERR 5
-#define GLOB_NOSYS 6
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int glob __PROTO__((const char*, int, int(*)(const char*,int), glob_t*));
-extern __MANGLE__ void globfree __PROTO__((glob_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif /* _GLOB_H */
diff --git a/usr/src/lib/libast/sparc/include/ast/hash.h b/usr/src/lib/libast/sparc/include/ast/hash.h
deleted file mode 100644
index 0023ea06f5..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/hash.h
+++ /dev/null
@@ -1,213 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * hash table library interface definitions
- *
- * NOTE: new code should use the more general <cdt.h>
- */
-
-#ifndef _HASH_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASH_H
-
-#define HASH_ALLOCATE (1L<<0) /* allocate new key names */
-#define HASH_FIXED (1L<<1) /* fixed table size */
-#define HASH_HASHED (1L<<6) /* key names already hashed */
-#define HASH_RESIZE (1L<<2) /* table has been resized */
-#define HASH_SCANNING (1L<<3) /* currently scanning scope */
-#define HASH_SCOPE (1L<<4) /* push scope / create in bot */
-#define HASH_STATIC (1L<<5) /* static table allocation */
-
-#define HASH_CREATE (1L<<8) /* create bucket if not found */
-#define HASH_DELETE (1L<<9) /* delete bucket if found */
-#define HASH_LOOKUP 0 /* default op */
-#define HASH_RENAME (1L<<7) /* rename bucket if found */
-
-#define HASH_BUCKET (1L<<11) /* name is installed bucket */
-#define HASH_INSTALL (1L<<12) /* install allocated bucket */
-#define HASH_NOSCOPE (1L<<13) /* top scope only */
-#define HASH_OPAQUE (1L<<14) /* opaque bucket */
-#define HASH_VALUE (1L<<15) /* value bucket field used */
-
-#define HASH_SIZE(n) (((long)(n))<<16) /* fixed bucket size */
-#define HASH_SIZEOF(f) ((((long)(f))>>16)&0xffff) /* extract size */
-
-#define HASH_DELETED ((unsigned long)1<<(8*sizeof(int)-1)) /* deleted placeholder */
-#define HASH_KEEP (1L<<(8*sizeof(int)-2)) /* no free on bucket */
-#define HASH_HIDDEN (1L<<(8*sizeof(int)-3)) /* hidden by scope */
-#define HASH_HIDES (1L<<(8*sizeof(int)-4)) /* hides lower scope */
-#define HASH_OPAQUED (1L<<(8*sizeof(int)-5)) /* opaqued placeholder */
-#define HASH_FREENAME (1L<<(8*sizeof(int)-6)) /* free bucket name */
-
-#define HASH_RESET (HASH_RESIZE|HASH_SCOPE|HASH_STATIC|HASH_VALUE)
-#define HASH_INTERNAL (HASH_BUCKET|HASH_RESIZE|HASH_SCANNING|HASH_STATIC)
-#define HASH_FLAGS (HASH_DELETED|HASH_FREENAME|HASH_HIDDEN|HASH_HIDES|HASH_KEEP|HASH_OPAQUED)
-
-#define HASH_alloc 1
-#define HASH_clear 2
-#define HASH_compare 3
-#define HASH_free 4
-#define HASH_hash 5
-#define HASH_meanchain 6
-#define HASH_name 7
-#define HASH_namesize 8
-#define HASH_set 9
-#define HASH_size 10
-#define HASH_table 11
-#define HASH_va_list 12
-
-#define HASH_bucketsize 13
-
-#define HASH_region 14
-
-#include <hashpart.h>
-
-#define hashclear(t,f) ((t)->flags &= ~((f) & ~HASH_INTERNAL))
-#define hashcover(b) (((b)->hash&HASH_HIDES)?(Hash_bucket_t*)((b)->name):(Hash_bucket_t*)0)
-#define hashdel(t,n) hashlook(t, (char*)(n), HASH_DELETE, (char*)0)
-#define hashget(t,n) hashlook(t, (char*)(n), HASH_LOOKUP|HASH_VALUE, (char*)0)
-#define hashgetbucket(s) ((Hash_bucket_t*)((s)-((sizeof(Hash_bucket_t)+sizeof(char*)-1)/sizeof(char*))*sizeof(char*)))
-#define hashkeep(b) ((b)->hash|=HASH_KEEP)
-#define hashname(b) ((((b)->hash&HASH_HIDES)?((Hash_bucket_t*)((b)->name)):(b))->name)
-#define hashput(t,n,v) hashlook(t, (char*)(n), HASH_CREATE|HASH_VALUE, (char*)(v))
-#define hashref(t,n) hashlook(t, (char*)(n), HASH_LOOKUP|HASH_INTERNAL|HASH_VALUE, (char*)0)
-#define hashscope(t) ((t)->scope)
-#define hashset(t,f) ((t)->flags |= ((f) & ~HASH_INTERNAL))
-
-/*
- * DEPRECATED renames for compatibility
- */
-
-#define Hashbin_t Hash_bucket_t
-#define HASHBUCKET Hash_bucket_t
-#define Hashhdr_t Hash_header_t
-#define HASHHEADER Hash_header_t
-#define Hashpos_t Hash_position_t
-#define HASHPOSITION Hash_position_t
-#define Hashtab_t Hash_table_t
-#define HASHTABLE Hash_table_t
-
-#define vhashalloc hashvalloc
-#define hashvalloc(t,a) hashalloc(t,HASH_va_list,a,0)
-
-/*
- * the #define's avoid union tags
- */
-
-typedef struct Hash_bucket Hash_bucket_t;
-typedef struct Hash_root Hash_root_t;
-typedef struct Hash_table Hash_table_t;
-
-#define HASH_HEADER /* common bucket header */ \
- Hash_bucket_t* next; /* next in collision chain */ \
- unsigned int hash; /* hash flags and value */ \
- char* name /* key name */
-
-#define HASH_DEFAULT /* HASH_VALUE bucket elements */ \
- char* value /* key value */
-
-typedef struct /* bucket header */
-{
- HASH_HEADER;
-} Hash_header_t;
-
-struct Hash_bucket /* prototype bucket */
-{
- HASH_HEADER;
- HASH_DEFAULT;
-};
-
-typedef struct /* hash scan bucket position */
-{
- Hash_bucket_t* bucket; /* bucket */
-#ifdef _HASH_POSITION_PRIVATE_
- _HASH_POSITION_PRIVATE_
-#endif
-} Hash_position_t;
-
-typedef struct /* last lookup cache */
-{
- Hash_table_t* table; /* last lookup table */
- Hash_bucket_t* bucket; /* last lookup bucket */
-#ifdef _HASH_LAST_PRIVATE_
- _HASH_LAST_PRIVATE_
-#endif
-} Hash_last_t;
-
-struct Hash_root /* root hash table information */
-{
- int accesses; /* number of accesses */
- int collisions; /* number of collisions */
- int flags; /* flags: see HASH_[A-Z]* */
- Hash_last_t last; /* last lookup cache */
- __V_* context; /* user defined context */
-#ifdef _HASH_ROOT_PRIVATE_
- _HASH_ROOT_PRIVATE_
-#endif
-};
-
-struct Hash_table /* hash table information */
-{
- Hash_root_t* root; /* root hash table information */
- int size; /* table size */
- int buckets; /* active bucket count */
- char* name; /* table name */
- Hash_table_t* scope; /* scope covered table */
- short flags; /* flags: see HASH_[A-Z]* */
-#ifdef _HASH_TABLE_PRIVATE_
- _HASH_TABLE_PRIVATE_
-#endif
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Hash_table_t* hashalloc __PROTO__((Hash_table_t*, ...));
-extern __MANGLE__ void hashdone __PROTO__((Hash_position_t*));
-extern __MANGLE__ void hashdump __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ Hash_table_t* hashfree __PROTO__((Hash_table_t*));
-extern __MANGLE__ Hash_bucket_t* hashlast __PROTO__((Hash_table_t*));
-extern __MANGLE__ char* hashlook __PROTO__((Hash_table_t*, const char*, long, const char*));
-extern __MANGLE__ Hash_bucket_t* hashnext __PROTO__((Hash_position_t*));
-extern __MANGLE__ Hash_position_t* hashscan __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ void hashsize __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ Hash_table_t* hashview __PROTO__((Hash_table_t*, Hash_table_t*));
-extern __MANGLE__ int hashwalk __PROTO__((Hash_table_t*, int, int (*)(const char*, char*, __V_*), __V_*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/hashkey.h b/usr/src/lib/libast/sparc/include/ast/hashkey.h
deleted file mode 100644
index 84be9113a1..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/hashkey.h
+++ /dev/null
@@ -1,73 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * 1-6 char lower-case keyword -> long hash
- * digit args passed as HASHKEYN('2')
- */
-
-#ifndef _HASHKEY_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASHKEY_H
-
-#define HASHKEYMAX 6
-#define HASHKEYBIT 5
-#define HASHKEYOFF ('a'-1)
-#define HASHKEYPART(h,c) (((h)<<HASHKEYBIT)+HASHKEY1(c))
-
-#define HASHKEYN(n) ((n)-'0'+'z'+1)
-
-#define HASHKEY1(c1) ((c1)-HASHKEYOFF)
-#define HASHKEY2(c1,c2) HASHKEYPART(HASHKEY1(c1),c2)
-#define HASHKEY3(c1,c2,c3) HASHKEYPART(HASHKEY2(c1,c2),c3)
-#define HASHKEY4(c1,c2,c3,c4) HASHKEYPART(HASHKEY3(c1,c2,c3),c4)
-#define HASHKEY5(c1,c2,c3,c4,c5) HASHKEYPART(HASHKEY4(c1,c2,c3,c4),c5)
-#define HASHKEY6(c1,c2,c3,c4,c5,c6) HASHKEYPART(HASHKEY5(c1,c2,c3,c4,c5),c6)
-
-#define HASHNKEY1(n,c1) HASHKEY2((n)+HASHKEYOFF,c1)
-#define HASHNKEY2(n,c2,c1) HASHKEY3((n)+HASHKEYOFF,c2,c1)
-#define HASHNKEY3(n,c3,c2,c1) HASHKEY4((n)+HASHKEYOFF,c3,c2,c1)
-#define HASHNKEY4(n,c4,c3,c2,c1) HASHKEY5((n)+'a',c4,c3,c2,c1)
-#define HASHNKEY5(n,c5,c4,c3,c2,c1) HASHKEY6((n)+'a',c5,c4,c3,c2,c1)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ long strkey __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/hashpart.h b/usr/src/lib/libast/sparc/include/ast/hashpart.h
deleted file mode 100644
index 5d33aac61d..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/hashpart.h
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * K. P. Vo
- * G. S. Fowler
- * AT&T Research
- *
- * ``the best'' combined linear congruent checksum/hash/PRNG
- */
-
-#ifndef _HASHPART_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASHPART_H
-
-#define HASH_ADD(h) (0x9c39c33dL)
-
-#if __sparc__ || __sparc || sparc
-
-#define HASH_A(h,n) ((((h) << 2) - (h)) << (n))
-#define HASH_B(h,n) ((((h) << 4) - (h)) << (n))
-#define HASH_C(h,n) ((HASH_A(h,7) + HASH_B(h,0)) << (n))
-#define HASH_MPY(h) (HASH_C(h,22)+HASH_C(h,10)+HASH_A(h,6)+HASH_A(h,3)+(h))
-
-#else
-
-#define HASH_MPY(h) ((h)*0x63c63cd9L)
-
-#endif
-
-#define HASHPART(h,c) (h = HASH_MPY(h) + HASH_ADD(h) + (c))
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/iconv.h b/usr/src/lib/libast/sparc/include/ast/iconv.h
deleted file mode 100644
index e65540c075..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/iconv.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_iconv.h>
diff --git a/usr/src/lib/libast/sparc/include/ast/ip6.h b/usr/src/lib/libast/sparc/include/ast/ip6.h
deleted file mode 100644
index 2712064a7e..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ip6.h
+++ /dev/null
@@ -1,28 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#if !_IP6_H
-#define _IP6_H 1
-
-#define IP6ADDR 16
-#define IP6BITS IP6ADDR
-#define IP6PREFIX (IP6ADDR+1)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* fmtip6 __PROTO__((unsigned char*, int));
-extern __MANGLE__ int strtoip6 __PROTO__((const char*, char**, unsigned char*, unsigned char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/lc.h b/usr/src/lib/libast/sparc/include/ast/lc.h
deleted file mode 100644
index 65fdab45ab..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/lc.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated by ./lcgen : : */
-
-
-#ifndef _LC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LC_H 1
-
-#include <ast.h>
-
-#define LC_abbreviated 0x00001
-#define LC_checked 0x00002
-#define LC_debug 0x00004
-#define LC_default 0x00008
-#define LC_defined 0x00010
-#define LC_local 0x00020
-#define LC_primary 0x00040
-#define LC_qualified 0x00080
-#define LC_undefined 0x00100
-#define LC_utf8 0x00200
-#define LC_verbose 0x00400
-#define LC_setlocale 0x10000
-#define LC_setenv 0x20000
-#define LC_user 0x40000
-#define LC_language_attribute_max 2
-#define LC_territory_language_max 4
-
-struct Lc_s;
-
-typedef struct Lc_info_s
-{
- const struct Lc_s* lc;
- unsigned long number;
- __V_* data;
-} Lc_info_t;
-
-typedef struct Lc_attribute_s
-{
- const char* name;
- unsigned long flags;
- unsigned long index;
-} Lc_attribute_t;
-
-typedef struct Lc_charset_s
-{
- const char* code;
- const char* alternates;
- const char* ms;
- unsigned long index;
-} Lc_charset_t;
-
-typedef struct Lc_language_s
-{
- const char* code;
- const char* name;
- const char* alternates;
- const Lc_charset_t* charset;
- unsigned long flags;
- unsigned long index;
- const Lc_attribute_t* attributes[LC_language_attribute_max];
-} Lc_language_t;
-
-typedef struct Lc_territory_s
-{
- const char* code;
- const char* name;
- unsigned long flags;
- unsigned long index;
- const Lc_language_t* languages[LC_territory_language_max];
-#ifdef _LC_TERRITORY_PRIVATE_
- _LC_TERRITORY_PRIVATE_
-#endif
-} Lc_territory_t;
-
-typedef struct Lc_map_s
-{
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_t* attribute;
-} Lc_map_t;
-
-typedef struct Lc_attribute_list_s
-{
- struct Lc_attribute_list_s* next;
- const Lc_attribute_t* attribute;
-} Lc_attribute_list_t;
-
-typedef struct Lc_s
-{
- const char* name;
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_list_t* attributes;
- unsigned long flags;
- unsigned long index;
-#ifdef _LC_PRIVATE_
- _LC_PRIVATE_
-#endif
-} Lc_t;
-
-struct Lc_category_s;
-
-typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
-
-typedef struct Lc_category_s
-{
- const char* name;
- int external;
- int internal;
- Lc_category_set_f setf;
- Lc_t* prev;
- unsigned int flags;
-} Lc_category_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
-extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
-extern __MANGLE__ int lcindex __PROTO__((int, int));
-extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
-extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
-extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/ls.h b/usr/src/lib/libast/sparc/include/ast/ls.h
deleted file mode 100644
index a8a5fcb0e0..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/ls.h
+++ /dev/null
@@ -1,99 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * ls formatter interface definitions
- */
-
-#ifndef _LS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LS_H
-
-#include <ast_std.h>
-#include <ast_fs.h>
-#include <ast_mode.h>
-
-/*
- * some systems (could it beee AIX) pollute the std name space
- */
-
-#undef fileid
-#define fileid fileID
-
-#define LS_BLOCKSIZE 512
-
-#define iblocks(p) _iblocks(p)
-
-#if _mem_st_rdev_stat
-#define idevice(p) ((p)->st_rdev)
-#define IDEVICE(p,v) ((p)->st_rdev=(v))
-#else
-#define idevice(p) 0
-#define IDEVICE(p,v)
-#endif
-
-#define LS_ATIME (1<<0) /* list st_atime */
-#define LS_BLOCKS (1<<1) /* list blocks used by file */
-#define LS_CTIME (1<<2) /* list st_ctime */
-#define LS_EXTERNAL (1<<3) /* st_mode is modex canonical */
-#define LS_INUMBER (1<<4) /* list st_ino */
-#define LS_LONG (1<<5) /* long listing */
-#define LS_MARK (1<<6) /* append file name marks */
-#define LS_NOGROUP (1<<7) /* omit group name for LS_LONG */
-#define LS_NOUSER (1<<8) /* omit user name for LS_LONG */
-#define LS_NUMBER (1<<9) /* number instead of name */
-
-#define LS_USER (1<<10) /* first user flag bit */
-
-#define LS_W_BLOCKS 6 /* LS_BLOCKS field width */
-#define LS_W_INUMBER 9 /* LS_INUMBER field width */
-#define LS_W_LONG 57 /* LS_LONG width (w/o names) */
-#define LS_W_LINK 4 /* link text width (w/o names) */
-#define LS_W_MARK 1 /* LS_MARK field width */
-#define LS_W_NAME 9 /* group|user name field width */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ off_t _iblocks __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtdev __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtfs __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtls __PROTO__((char*, const char*, struct stat*, const char*, const char*, int));
-extern __MANGLE__ int pathstat __PROTO__((const char*, struct stat*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/magic.h b/usr/src/lib/libast/sparc/include/ast/magic.h
deleted file mode 100644
index 8683016e80..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/magic.h
+++ /dev/null
@@ -1,96 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * magic interface definitions
- */
-
-#ifndef _MAGIC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MAGIC_H
-
-#include <sfio.h>
-#include <ls.h>
-
-#define MAGIC_VERSION 19961031L
-
-#ifndef MAGIC_FILE
-#define MAGIC_FILE "lib/file/magic"
-#endif
-
-#ifndef MAGIC_DIR
-#define MAGIC_DIR "lib/file"
-#endif
-
-#define MAGIC_FILE_ENV "MAGICFILE"
-
-#define MAGIC_MIME (1<<0) /* magictype returns MIME type */
-#define MAGIC_VERBOSE (1<<1) /* verbose magic file errors */
-
-#define MAGIC_USER (1L<<16) /* first user flag bit */
-
-struct Magic_s;
-struct Magicdisc_s;
-
-typedef struct Magicdisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* MAGIC_* flags */
- Error_f errorf; /* error function */
-} Magicdisc_t;
-
-typedef struct Magic_s
-{
- const char* id; /* library id string */
-
-#ifdef _MAGIC_PRIVATE_
- _MAGIC_PRIVATE_
-#endif
-
-} Magic_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Magic_t* magicopen __PROTO__((Magicdisc_t*));
-extern __MANGLE__ int magicload __PROTO__((Magic_t*, const char*, unsigned long));
-extern __MANGLE__ int magiclist __PROTO__((Magic_t*, Sfio_t*));
-extern __MANGLE__ char* magictype __PROTO__((Magic_t*, Sfio_t*, const char*, struct stat*));
-extern __MANGLE__ int magicclose __PROTO__((Magic_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/magicid.h b/usr/src/lib/libast/sparc/include/ast/magicid.h
deleted file mode 100644
index 1dca0c1e42..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/magicid.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * generic binary magic id definitions
- */
-
-#ifndef _MAGICID_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MAGICID_H 1
-
-#include <ast_common.h>
-
-#define MAGICID 0x00010203
-
-typedef uint32_t Magicid_data_t;
-
-typedef struct Magicid_s
-{
- Magicid_data_t magic; /* magic number */
- char name[8]; /* generic data/application name*/
- char type[12]; /* specific data type */
- Magicid_data_t version; /* YYYYMMDD or 0xWWXXYYZZ */
- Magicid_data_t size;
-} Magicid_t;
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/mc.h b/usr/src/lib/libast/sparc/include/ast/mc.h
deleted file mode 100644
index b84df7239e..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/mc.h
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * machine independent binary message catalog interface
- *
- * file layout
- * all numbers are sfputu() format
- *
- * 4 char magic (^M^S^G0)
- * <method locale YYYY-MM-DD>\0
- * (<optional strings>\0)*
- * \0
- * string table size
- * #msgs total
- * #max set number
- * #set-id 1
- * #msgs in set 1
- * ...
- * #set-id #sets
- * #msgs in set #sets
- * end of sets (0)
- * msg(1,1) size
- * ...
- * msg(#sets,#msgs) size
- * string table
- */
-
-#ifndef _MC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MC_H
-
-#include <ast.h>
-
-#define MC_MAGIC "\015\023\007\000"
-#define MC_MAGIC_SIZE 4
-
-#define MC_SET_MAX 1023
-#define MC_NUM_MAX 32767
-
-#define MC_NLS (1<<10)
-
-#define MC_MESSAGE_SET(s) mcindex(s,NiL,NiL,NiL)
-
-typedef struct
-{
- char** msg;
- int num;
- int gen;
-} Mcset_t;
-
-typedef struct
-{
- Mcset_t* set;
- int num;
- int gen;
- char* translation;
-#ifdef _MC_PRIVATE_
- _MC_PRIVATE_
-#endif
-} Mc_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* mcfind __PROTO__((char*, const char*, const char*, int, int));
-extern __MANGLE__ Mc_t* mcopen __PROTO__((Sfio_t*));
-extern __MANGLE__ char* mcget __PROTO__((Mc_t*, int, int, const char*));
-extern __MANGLE__ int mcput __PROTO__((Mc_t*, int, int, const char*));
-extern __MANGLE__ int mcdump __PROTO__((Mc_t*, Sfio_t*));
-extern __MANGLE__ int mcindex __PROTO__((const char*, char**, int*, int*));
-extern __MANGLE__ int mcclose __PROTO__((Mc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/mime.h b/usr/src/lib/libast/sparc/include/ast/mime.h
deleted file mode 100644
index 5943b58eaa..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/mime.h
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * mime/mailcap interface
- */
-
-#ifndef _MIMETYPE_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MIMETYPE_H 1
-
-#include <sfio.h>
-#include <ls.h>
-
-#define MIME_VERSION 19970717L
-
-#ifndef MIME_FILES
-#define MIME_FILES "~/.mailcap:/usr/local/etc/mailcap:/usr/etc/mailcap:/etc/mailcap:/etc/mail/mailcap:/usr/public/lib/mailcap"
-#endif
-
-#define MIME_FILES_ENV "MAILCAP"
-
-#define MIME_LIST (1<<0) /* mimeload arg is : list */
-#define MIME_NOMAGIC (1<<1) /* no magic for mimetype() */
-#define MIME_PIPE (1<<2) /* mimeview() io is piped */
-#define MIME_REPLACE (1<<3) /* replace existing definition */
-
-#define MIME_USER (1L<<16) /* first user flag bit */
-
-struct Mime_s;
-typedef struct Mime_s Mime_t;
-
-struct Mimedisc_s;
-typedef struct Mimedisc_s Mimedisc_t;
-
-typedef int (*Mimevalue_f) __PROTO__((Mime_t*, __V_*, char*, size_t, Mimedisc_t*));
-
-struct Mimedisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* MIME_* flags */
- Error_f errorf; /* error function */
- Mimevalue_f valuef; /* value extraction function */
-};
-
-struct Mime_s
-{
- const char* id; /* library id string */
-
-#ifdef _MIME_PRIVATE_
- _MIME_PRIVATE_
-#endif
-
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Mime_t* mimeopen __PROTO__((Mimedisc_t*));
-extern __MANGLE__ int mimeload __PROTO__((Mime_t*, const char*, unsigned long));
-extern __MANGLE__ int mimelist __PROTO__((Mime_t*, Sfio_t*, const char*));
-extern __MANGLE__ int mimeclose __PROTO__((Mime_t*));
-extern __MANGLE__ int mimeset __PROTO__((Mime_t*, char*, unsigned long));
-extern __MANGLE__ char* mimetype __PROTO__((Mime_t*, Sfio_t*, const char*, struct stat*));
-extern __MANGLE__ char* mimeview __PROTO__((Mime_t*, const char*, const char*, const char*, const char*));
-extern __MANGLE__ int mimehead __PROTO__((Mime_t*, __V_*, size_t, size_t, char*));
-extern __MANGLE__ int mimecmp __PROTO__((const char*, const char*, char**));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/mnt.h b/usr/src/lib/libast/sparc/include/ast/mnt.h
deleted file mode 100644
index 8bf8c12814..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/mnt.h
+++ /dev/null
@@ -1,69 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * mounted filesystem scan interface
- */
-
-#ifndef _MNT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MNT_H 1
-
-#undef MNT_REMOTE /* aix clash */
-#define MNT_REMOTE (1<<0) /* remote mount */
-
-typedef struct
-{
- char* fs; /* filesystem name */
- char* dir; /* mounted dir */
- char* type; /* filesystem type */
- char* options; /* options */
- int freq; /* backup frequency */
- int npass; /* number of parallel passes */
- int flags; /* MNT_* flags */
-} Mnt_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ __V_* mntopen __PROTO__((const char*, const char*));
-extern __MANGLE__ Mnt_t* mntread __PROTO__((__V_*));
-extern __MANGLE__ int mntwrite __PROTO__((__V_*, const Mnt_t*));
-extern __MANGLE__ int mntclose __PROTO__((__V_*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/modecanon.h b/usr/src/lib/libast/sparc/include/ast/modecanon.h
deleted file mode 100644
index 3fa425af8f..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/modecanon.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * canonical mode_t representation
- */
-
-#ifndef _MODECANON_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MODECANON_H
-
-#define X_ITYPE(m) ((m)&X_IFMT)
-
-#define X_IFMT 0170000
-#define X_IFWHT 0160000
-#define X_IFDOOR 0150000
-#define X_IFSOCK 0140000
-#define X_IFLNK 0120000
-#define X_IFCTG 0110000
-#define X_IFREG 0100000
-#define X_IFBLK 0060000
-#define X_IFDIR 0040000
-#define X_IFCHR 0020000
-#define X_IFIFO 0010000
-
-#define X_IPERM 0007777
-#define X_ISUID 0004000
-#define X_ISGID 0002000
-#define X_ISVTX 0001000
-#define X_IRUSR 0000400
-#define X_IWUSR 0000200
-#define X_IXUSR 0000100
-#define X_IRGRP 0000040
-#define X_IWGRP 0000020
-#define X_IXGRP 0000010
-#define X_IROTH 0000004
-#define X_IWOTH 0000002
-#define X_IXOTH 0000001
-
-#define X_IRWXU (X_IRUSR|X_IWUSR|X_IXUSR)
-#define X_IRWXG (X_IRGRP|X_IWGRP|X_IXGRP)
-#define X_IRWXO (X_IROTH|X_IWOTH|X_IXOTH)
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/modex.h b/usr/src/lib/libast/sparc/include/ast/modex.h
deleted file mode 100644
index 4b73e19ffe..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/modex.h
+++ /dev/null
@@ -1,62 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * external mode_t representation support
- */
-
-#ifndef _MODEX_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MODEX_H
-
-#include <ast_fs.h>
-#include <modecanon.h>
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int modei __PROTO__((int));
-extern __MANGLE__ int modex __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _S_IDPERM
-#define modei(m) ((m)&X_IPERM)
-#if _S_IDTYPE
-#define modex(m) (m)
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/namval.h b/usr/src/lib/libast/sparc/include/ast/namval.h
deleted file mode 100644
index fefe46a0c7..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/namval.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/nl_types.h b/usr/src/lib/libast/sparc/include/ast/nl_types.h
deleted file mode 100644
index 581cc13a81..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/nl_types.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_nl_types.h>
diff --git a/usr/src/lib/libast/sparc/include/ast/option.h b/usr/src/lib/libast/sparc/include/ast/option.h
deleted file mode 100644
index 5439707f8e..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/option.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * command line option parse interface
- */
-
-#ifndef _OPTION_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _OPTION_H
-
-#include <ast.h>
-
-#define OPT_VERSION 20070319L
-
-#define OPT_USER (1L<<16) /* first user flag bit */
-
-struct Opt_s;
-struct Optdisc_s;
-
-typedef int (*Optinfo_f) __PROTO__((struct Opt_s*, Sfio_t*, const char*, struct Optdisc_s*));
-
-typedef struct Optdisc_s
-{
- unsigned long version; /* OPT_VERSION */
- unsigned long flags; /* OPT_* flags */
- char* catalog; /* error catalog id */
- Optinfo_f infof; /* runtime info function */
-} Optdisc_t;
-
-/* NOTE: Opt_t member order fixed by a previous binary release */
-
-#ifndef _OPT_PRIVATE_
-#define _OPT_PRIVATE_ \
- char pad[3*sizeof(__V_*)];
-#endif
-
-typedef struct Opt_s
-{
- int again; /* see optjoin() */
- char* arg; /* {:,#} string argument */
- char** argv; /* most recent argv */
- int index; /* argv index */
- char* msg; /* error/usage message buffer */
- long num; /* OBSOLETE -- use number */
- int offset; /* char offset in argv[index] */
- char option[8]; /* current flag {-,+} + option */
- char name[64]; /* current long name or flag */
- Optdisc_t* disc; /* user discipline */
- intmax_t number; /* # numeric argument */
- unsigned char assignment; /* option arg assigment op */
- unsigned char pads[sizeof(__V_*)-1];
- _OPT_PRIVATE_
-} Opt_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Opt_t* _opt_infop_;
-
-#define opt_info (*_opt_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define optinit(d,f) (memset(d,0,sizeof(*(d))),(d)->version=OPT_VERSION,(d)->infof=(f),opt_info.disc=(d))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int optget __PROTO__((char**, const char*));
-extern __MANGLE__ int optjoin __PROTO__((char**, ...));
-extern __MANGLE__ char* opthelp __PROTO__((const char*, const char*));
-extern __MANGLE__ char* optusage __PROTO__((const char*));
-extern __MANGLE__ int optstr __PROTO__((const char*, const char*));
-extern __MANGLE__ int optesc __PROTO__((Sfio_t*, const char*, int));
-extern __MANGLE__ Opt_t* optctx __PROTO__((Opt_t*, Opt_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/preroot.h b/usr/src/lib/libast/sparc/include/ast/preroot.h
deleted file mode 100644
index 309ee416bd..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/preroot.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/proc.h b/usr/src/lib/libast/sparc/include/ast/proc.h
deleted file mode 100644
index 4161e1a385..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/proc.h
+++ /dev/null
@@ -1,115 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * process library interface
- */
-
-#ifndef _PROC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _PROC_H
-
-#include <ast.h>
-
-#define PROC_ARGMOD (1<<0) /* argv[-1],argv[0] can be modified */
-#define PROC_BACKGROUND (1<<1) /* shell background (&) setup */
-#define PROC_CHECK (1<<17) /* check that command exists */
-#define PROC_CLEANUP (1<<2) /* close parent redirect fds on error */
-#define PROC_DAEMON (1<<3) /* daemon setup */
-#define PROC_ENVCLEAR (1<<4) /* clear environment */
-#define PROC_FOREGROUND (1<<14) /* system(3) setup */
-#define PROC_GID (1<<5) /* setgid(getgid()) */
-#define PROC_IGNORE (1<<6) /* ignore parent pipe errors */
-#define PROC_IGNOREPATH (1<<16) /* procrun() intercept to ignore path */
-#define PROC_OVERLAY (1<<7) /* overlay current process if possible */
-#define PROC_PARANOID (1<<8) /* restrict everything */
-#define PROC_PRIVELEGED (1<<9) /* setuid(0), setgid(getegid()) */
-#define PROC_READ (1<<10) /* proc pipe fd 1 returned */
-#define PROC_SESSION (1<<11) /* session leader */
-#define PROC_UID (1<<12) /* setuid(getuid()) */
-#define PROC_WRITE (1<<13) /* proc pipe fd 0 returned */
-#define PROC_ZOMBIE (1<<15) /* proc may leave a zombie behind */
-
-#define PROC_ARG_BIT 14 /* bits per op arg */
-#define PROC_OP_BIT 4 /* bits per op */
-
-#define PROC_ARG_NULL ((1<<PROC_ARG_BIT)-1)
-
-#define PROC_fd_dup 0x4
-#define PROC_FD_CHILD 0x1
-#define PROC_FD_PARENT 0x2
-
-#define PROC_sig_dfl 0x8
-#define PROC_sig_ign 0x9
-
-#define PROC_sys_pgrp 0xa
-#define PROC_sys_umask 0xb
-
-#define PROC_op1(o,a) (((o)<<(2*PROC_ARG_BIT))|((a)&((PROC_ARG_NULL<<PROC_ARG_BIT)|PROC_ARG_NULL)))
-#define PROC_op2(o,a,b) (((o)<<(2*PROC_ARG_BIT))|(((b)&PROC_ARG_NULL)<<PROC_ARG_BIT)|((a)&PROC_ARG_NULL))
-
-#define PROC_FD_CLOSE(p,f) PROC_op2(PROC_fd_dup|(f),p,PROC_ARG_NULL)
-#define PROC_FD_DUP(p,c,f) PROC_op2(PROC_fd_dup|(f),p,c)
-#define PROC_SIG_DFL(s) PROC_op1(PROC_sig_dfl,s,0)
-#define PROC_SIG_IGN(s) PROC_op1(PROC_sig_ign,s,0)
-#define PROC_SYS_PGRP(g) PROC_op1(PROC_sys_pgrp,g)
-#define PROC_SYS_UMASK(m) PROC_op1(PROC_sys_umask,m,0)
-
-#define PROC_OP(x) (((x)>>(2*PROC_ARG_BIT))&((1<<PROC_OP_BIT)-1))
-#define PROC_ARG(x,n) ((n)?(((x)>>(((n)-1)*PROC_ARG_BIT))&PROC_ARG_NULL):(((x)&~((1<<(2*PROC_ARG_BIT))-1))==~((1<<(2*PROC_ARG_BIT))-1))?(-1):((x)&~((1<<(2*PROC_ARG_BIT))-1)))
-
-typedef struct
-{
- pid_t pid; /* process id */
- pid_t pgrp; /* process group id */
- int rfd; /* read fd if applicable */
- int wfd; /* write fd if applicable */
-
-#ifdef _PROC_PRIVATE_
-_PROC_PRIVATE_
-#endif
-
-} Proc_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int procclose __PROTO__((Proc_t*));
-extern __MANGLE__ int procfree __PROTO__((Proc_t*));
-extern __MANGLE__ Proc_t* procopen __PROTO__((const char*, char**, char**, long*, int));
-extern __MANGLE__ int procrun __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/prototyped.h b/usr/src/lib/libast/sparc/include/ast/prototyped.h
deleted file mode 100644
index 113fb94d24..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/prototyped.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/re_comp.h b/usr/src/lib/libast/sparc/include/ast/re_comp.h
deleted file mode 100644
index ec1d512e40..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/re_comp.h
+++ /dev/null
@@ -1,52 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * re_comp interface definitions
- *
- * OBSOLETE: use <regex.h>
- */
-
-#ifndef _RE_COMP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _RE_COMP_H
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* re_comp __PROTO__((const char*));
-extern __MANGLE__ int re_exec __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/recfmt.h b/usr/src/lib/libast/sparc/include/ast/recfmt.h
deleted file mode 100644
index fcd56de020..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/recfmt.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * record format interface
- */
-
-#ifndef _RECFMT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _RECFMT_H 1
-
-#include <ast.h>
-
-typedef uint32_t Recfmt_t;
-
-#define REC_delimited 0
-#define REC_fixed 1
-#define REC_variable 2
-#define REC_method 14
-#define REC_none 15
-
-#define REC_M_path 0
-#define REC_M_data 1
-
-#define RECTYPE(f) (((f)>>28)&((1<<4)-1))
-
-#define REC_D_TYPE(d) ((REC_delimited<<28)|((d)&((1<<8)-1)))
-#define REC_D_DELIMITER(f) ((f)&((1<<8)-1))
-
-#define REC_F_TYPE(s) ((REC_fixed<<28)|((s)&((1<<28)-1)))
-#define REC_F_SIZE(f) ((f)&((1<<28)-1))
-
-#define REC_U_TYPE(t,a) (((t)<<28)|((a)&((1<<28)-1)))
-#define REC_U_ATTRIBUTES(f) ((f)&~((1<<28)-1))
-
-#define REC_V_TYPE(h,o,z,l,i) ((REC_variable<<28)|((h)<<23)|((o)<<19)|(((z)-1)<<18)|((l)<<17)|((i)<<16))
-#define REC_V_RECORD(f,s) (((f)&(((1<<16)-1)<<16))|(s))
-#define REC_V_HEADER(f) (((f)>>23)&((1<<5)-1))
-#define REC_V_OFFSET(f) (((f)>>19)&((1<<4)-1))
-#define REC_V_LENGTH(f) ((((f)>>18)&1)+1)
-#define REC_V_LITTLE(f) (((f)>>17)&1)
-#define REC_V_INCLUSIVE(f) (((f)>>16)&1)
-#define REC_V_SIZE(f) ((f)&((1<<16)-1))
-#define REC_V_ATTRIBUTES(f) ((f)&~((1<<16)-1))
-
-#define REC_M_TYPE(i) ((REC_method<<28)|(i))
-#define REC_M_INDEX(f) ((f)&((1<<28)-1))
-
-#define REC_N_TYPE() 0xffffffff
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* fmtrec __PROTO__((Recfmt_t, int));
-extern __MANGLE__ Recfmt_t recfmt __PROTO__((const __V_*, size_t, off_t));
-extern __MANGLE__ Recfmt_t recstr __PROTO__((const char*, char**));
-extern __MANGLE__ ssize_t reclen __PROTO__((Recfmt_t, const __V_*, size_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/regex.h b/usr/src/lib/libast/sparc/include/ast/regex.h
deleted file mode 100644
index 9b7299c814..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/regex.h
+++ /dev/null
@@ -1,230 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#ifdef _AST_STD_I
-#define _REGEX_H -1
-#define regex_t int
-#define regmatch_t int
-#endif
-#ifndef _REGEX_H
-#define _REGEX_H 1
-#undef regex_t
-#undef regmatch_t
-
-#include <ast_common.h>
-
-#define REG_VERSION 20030916L
-
-/* regcomp flags */
-
-#define REG_AUGMENTED 0x00000001 /* enable ! & < > */
-#define REG_EXTENDED 0x00000002 /* enable ( | ) */
-#define REG_ICASE 0x00000004 /* ignore case in match */
-#define REG_NEWLINE 0x00000008 /* ^/$ match embedded \n */
-#define REG_NOSUB 0x00000010 /* don't report subexp matches */
-#define REG_SHELL 0x00000020 /* shell pattern syntax */
-
-/* nonstandard regcomp flags */
-
-#define REG_LEFT 0x00000100 /* implicit ^... */
-#define REG_LITERAL 0x00000200 /* no operators */
-#define REG_MINIMAL 0x00000400 /* minimal match */
-#define REG_NULL 0x00000800 /* allow null patterns */
-#define REG_RIGHT 0x00001000 /* implicit ...$ */
-#define REG_LENIENT 0x00002000 /* look the other way */
-#define REG_ESCAPE 0x00004000 /* \ escapes delimiter in [...] */
-#define REG_FIRST 0x00008000 /* first match found will do */
-#define REG_MULTIPLE 0x00010000 /* multiple \n sep patterns */
-#define REG_DISCIPLINE 0x00020000 /* regex_t.re_disc is valid */
-#define REG_SPAN 0x00040000 /* . matches \n */
-#define REG_COMMENT 0x00080000 /* ignore pattern space & #...\n*/
-#define REG_MULTIREF 0x00100000 /* multiple digit backrefs */
-#define REG_MUSTDELIM 0x08000000 /* all delimiters required */
-#define REG_DELIMITED 0x10000000 /* pattern[0] is delimiter */
-#define REG_CLASS_ESCAPE 0x80000000 /* \ escapes in [...] */
-
-#define REG_SHELL_DOT 0x00200000 /* explicit leading . match */
-#define REG_SHELL_ESCAPED 0x00400000 /* \ not special */
-#define REG_SHELL_GROUP 0x20000000 /* (|&) inside [@|&](...) only */
-#define REG_SHELL_PATH 0x00800000 /* explicit / match */
-
-#define REG_REGEXP 0x40000000 /* <regexp.h> compatibility */
-
-/* regexec flags */
-
-#define REG_NOTBOL 0x00000040 /* ^ is not a special char */
-#define REG_NOTEOL 0x00000080 /* $ is not a special char */
-
-/* nonstandard regexec flags */
-
-#define REG_INVERT 0x01000000 /* invert regrexec match sense */
-#define REG_STARTEND 0x02000000 /* subject==match[0].rm_{so,eo} */
-#define REG_ADVANCE 0x04000000 /* advance match[0].rm_{so,eo} */
-
-/* regalloc flags */
-
-#define REG_NOFREE 0x00000001 /* don't free */
-
-/* regsub flags */
-
-#define REG_SUB_ALL 0x00000001 /* substitute all occurrences */
-#define REG_SUB_LOWER 0x00000002 /* substitute to lower case */
-#define REG_SUB_UPPER 0x00000004 /* substitute to upper case */
-#define REG_SUB_PRINT 0x00000010 /* internal no-op */
-#define REG_SUB_NUMBER 0x00000020 /* internal no-op */
-#define REG_SUB_STOP 0x00000040 /* internal no-op */
-#define REG_SUB_WRITE 0x00000080 /* internal no-op */
-#define REG_SUB_LAST 0x00000100 /* last substitution option */
-#define REG_SUB_FULL 0x00000200 /* fully delimited */
-#define REG_SUB_USER 0x00001000 /* first user flag bit */
-
-/* regex error codes */
-
-#define REG_ENOSYS (-1) /* not supported */
-#define REG_NOMATCH 1 /* regexec didn't match */
-#define REG_BADPAT 2 /* invalid regular expression */
-#define REG_ECOLLATE 3 /* invalid collation element */
-#define REG_ECTYPE 4 /* invalid character class */
-#define REG_EESCAPE 5 /* trailing \ in pattern */
-#define REG_ESUBREG 6 /* invalid \digit backreference */
-#define REG_EBRACK 7 /* [...] imbalance */
-#define REG_EPAREN 8 /* \(...\) or (...) imbalance */
-#define REG_EBRACE 9 /* \{...\} or {...} imbalance */
-#define REG_BADBR 10 /* invalid {...} digits */
-#define REG_ERANGE 11 /* invalid [...] range endpoint */
-#define REG_ESPACE 12 /* out of space */
-#define REG_BADRPT 13 /* unary op not preceded by re */
-#define REG_ENULL 14 /* empty subexpr in pattern */
-#define REG_ECOUNT 15 /* re component count overflow */
-#define REG_BADESC 16 /* invalid \char escape */
-#define REG_VERSIONID 17 /* version id (pseudo error) */
-#define REG_EFLAGS 18 /* flags conflict */
-#define REG_EDELIM 19 /* invalid or omitted delimiter */
-#define REG_PANIC 20 /* unrecoverable internal error */
-
-struct regex_s; typedef struct regex_s regex_t;
-struct regdisc_s; typedef struct regdisc_s regdisc_t;
-
-typedef int (*regclass_t) __PROTO__((int));
-typedef uint32_t regflags_t;
-typedef int regoff_t;
-typedef int (*regerror_t) __PROTO__((const regex_t*, regdisc_t*, int, ...));
-typedef __V_* (*regcomp_t) __PROTO__((const regex_t*, const char*, size_t, regdisc_t*));
-typedef int (*regexec_t) __PROTO__((const regex_t*, __V_*, const char*, size_t, const char*, size_t, char**, regdisc_t*));
-typedef __V_* (*regresize_t) __PROTO__((__V_*, __V_*, size_t));
-typedef int (*regrecord_t) __PROTO__((__V_*, const char*, size_t));
-
-typedef struct regmatch_s
-{
- regoff_t rm_so; /* offset of start */
- regoff_t rm_eo; /* offset of end */
-} regmatch_t;
-
-typedef struct regsub_s
-{
- regflags_t re_flags; /* regsubcomp() flags */
- char* re_buf; /* regsubexec() output buffer */
- size_t re_len; /* re_buf length */
- int re_min; /* regsubcomp() min matches */
-#ifdef _REG_SUB_PRIVATE_
- _REG_SUB_PRIVATE_
-#endif
-} regsub_t;
-
-struct regdisc_s
-{
- unsigned long re_version; /* discipline version */
- regflags_t re_flags; /* discipline flags */
- regerror_t re_errorf; /* error function */
- int re_errorlevel; /* errorf level */
- regresize_t re_resizef; /* alloc/free function */
- __V_* re_resizehandle;/* resizef handle */
- regcomp_t re_compf; /* (?{...}) compile function */
- regexec_t re_execf; /* (?{...}) execute function */
- unsigned char* re_map; /* external to native ccode map */
-};
-
-typedef struct regstat_s
-{
- regflags_t re_flags; /* REG_LEFT|REG_RIGHT */
- ssize_t re_min; /* min anchored match length */
- ssize_t re_max; /* max anchored match length */
- ssize_t re_record; /* regrexec() match length */
-} regstat_t;
-
-struct regex_s
-{
- size_t re_nsub; /* number of subexpressions */
- struct reglib_s*re_info; /* library private info */
- size_t re_npat; /* number of pattern chars used */
- regdisc_t* re_disc; /* REG_DISCIPLINE discipline */
- regsub_t* re_sub; /* regsubcomp() data */
-};
-
-#define reginit(disc) (memset(disc,0,sizeof(*(disc))),(disc)->re_version=REG_VERSION)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int regcomp __PROTO__((regex_t*, const char*, regflags_t));
-extern __MANGLE__ size_t regerror __PROTO__((int, const regex_t*, char*, size_t));
-extern __MANGLE__ int regexec __PROTO__((const regex_t*, const char*, size_t, regmatch_t*, regflags_t));
-extern __MANGLE__ void regfree __PROTO__((regex_t*));
-
-/* nonstandard hooks */
-
-#define _REG_cache 1 /* have regcache() */
-#define _REG_class 1 /* have regclass() */
-#define _REG_collate 1 /* have regcollate(), regclass() */
-#define _REG_comb 1 /* have regcomb() */
-#define _REG_decomp 1 /* have regdecomp() */
-#define _REG_dup 1 /* have regdup() */
-#define _REG_fatal 1 /* have regfatal(), regfatalpat() */
-#define _REG_ncomp 1 /* have regncomp() */
-#define _REG_nexec 1 /* have regnexec() */
-#define _REG_rexec 1 /* have regrexec(), regrecord() */
-#define _REG_stat 1 /* have regstat() */
-#define _REG_subcomp 1 /* have regsubcomp(), regsubexec() */
-
-extern __MANGLE__ regclass_t regclass __PROTO__((const char*, char**));
-extern __MANGLE__ int regaddclass __PROTO__((const char*, regclass_t));
-extern __MANGLE__ int regcollate __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ int regcomb __PROTO__((regex_t*, regex_t*));
-extern __MANGLE__ size_t regdecomp __PROTO__((regex_t*, regflags_t, char*, size_t));
-extern __MANGLE__ int regdup __PROTO__((regex_t*, regex_t*));
-extern __MANGLE__ int regncomp __PROTO__((regex_t*, const char*, size_t, regflags_t));
-extern __MANGLE__ int regnexec __PROTO__((const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t));
-extern __MANGLE__ void regfatal __PROTO__((regex_t*, int, int));
-extern __MANGLE__ void regfatalpat __PROTO__((regex_t*, int, int, const char*));
-extern __MANGLE__ int regrecord __PROTO__((const regex_t*));
-extern __MANGLE__ int regrexec __PROTO__((const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t, int, __V_*, regrecord_t));
-extern __MANGLE__ regstat_t* regstat __PROTO__((const regex_t*));
-
-extern __MANGLE__ regex_t* regcache __PROTO__((const char*, regflags_t, int*));
-
-extern __MANGLE__ int regsubcomp __PROTO__((regex_t*, const char*, const regflags_t*, int, regflags_t));
-extern __MANGLE__ int regsubexec __PROTO__((const regex_t*, const char*, size_t, regmatch_t*));
-extern __MANGLE__ int regsubflags __PROTO__((regex_t*, const char*, char**, int, const regflags_t*, int*, regflags_t*));
-extern __MANGLE__ void regsubfree __PROTO__((regex_t*));
-
-/* obsolete hooks */
-
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-
-extern __MANGLE__ void regalloc __PROTO__((__V_*, regresize_t, regflags_t));
-extern __MANGLE__ int regsub __PROTO__((const regex_t*, struct _sfio_s*, const char*, const char*, size_t, regmatch_t*, regflags_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/regexp.h b/usr/src/lib/libast/sparc/include/ast/regexp.h
deleted file mode 100644
index ea2df629b5..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/regexp.h
+++ /dev/null
@@ -1,139 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * regexp interface and partial implementation
- * what a novel approach
- * don't do it again
- *
- * OBSOLETE: use <regex.h>
- */
-
-#ifndef _REGEXP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _REGEXP_H
-
-#define NBRA 9
-
-typedef struct
-{
- char* re_braslist[NBRA];
- char* re_braelist[NBRA];
- char* re_loc1;
- char* re_loc2;
- char* re_locs;
- int re_circf;
- int re_nbra;
- int re_nodelim;
- int re_sed;
-} regexp_t;
-
-#define braslist _re_info.re_braslist
-#define braelist _re_info.re_braelist
-#define circf _re_info.re_circf
-#define loc1 _re_info.re_loc1
-#define loc2 _re_info.re_loc2
-#define locs _re_info.re_locs
-#define nbra _re_info.re_nbra
-#define nodelim _re_info.re_nodelim
-#define sed _re_info.re_sed
-
-#define advance(a,b) _re_exec(&_re_info,a,b,1)
-#define compile(a,b,c,d) _re_read(&_re_info,a,b,c,d)
-#define step(a,b) _re_exec(&_re_info,a,b,0)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _re_comp __PROTO__((regexp_t*, const char*, char*, unsigned int));
-extern __MANGLE__ int _re_exec __PROTO__((regexp_t*, const char*, const char*, int));
-extern __MANGLE__ char* _re_putc __PROTO__((int));
-extern __MANGLE__ char* _re_read __PROTO__((regexp_t*, const char*, char*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#ifndef _REGEXP_DECLARE
-
-regexp_t _re_info;
-
-char*
-_re_read __PARAM__((register regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof), (re, instring, ep, endbuf, seof)) __OTORP__(register regexp_t* re; const char* instring; char* ep; const char* endbuf; int seof;){
- register int c;
-
- static const char* prev;
-
-#ifdef INIT
- INIT;
-#endif
-
- re->re_nodelim = 0;
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- {
- if (c != seof)
- {
- UNGETC(c);
- re->re_nodelim = 1;
- }
- if (!re->re_sed && !prev)
- { ERROR(41); }
- RETURN((char*)endbuf);
- }
- UNGETC(c);
- prev = 0;
- for (;;)
- {
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- {
- if (re->re_sed)
- { ERROR(36); }
- UNGETC(c);
- re->re_nodelim = 1;
- break;
- }
- if (c == '\\')
- {
- _re_putc(c);
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- { ERROR(36); }
- }
- _re_putc(c);
- }
- if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
- { ERROR(c); }
- prev = endbuf;
- RETURN((char*)prev);
-}
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/sfdisc.h b/usr/src/lib/libast/sparc/include/ast/sfdisc.h
deleted file mode 100644
index bc6e00b335..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/sfdisc.h
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * sfio discipline interface definitions
- */
-
-#ifndef _SFDISC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFDISC_H
-
-#include <ast.h>
-
-#define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#define SFSK_DISCARD SFDCEVENT('S','K',1)
-
-/*
- * %(...) printf support
- */
-
-typedef int (*Sf_key_lookup_t) __PROTO__((__V_*, Sffmt_t*, const char*, char**, Sflong_t*));
-typedef char* (*Sf_key_convert_t) __PROTO__((__V_*, Sffmt_t*, const char*, char*, Sflong_t));
-
-extern __MANGLE__ int sfkeyprintf __PROTO__((Sfio_t*, __V_*, const char*, Sf_key_lookup_t, Sf_key_convert_t));
-#define sfkeyprintf sfkeyprintf_20000308 /* Sffmt_t* callback args */
-extern __MANGLE__ int sfkeyprintf __PROTO__((Sfio_t*, __V_*, const char*, Sf_key_lookup_t, Sf_key_convert_t));
-
-/*
- * pure sfio read and/or write disciplines
- */
-
-extern __MANGLE__ int sfdcdio __PROTO__((Sfio_t*, size_t));
-extern __MANGLE__ int sfdcdos __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdcfilter __PROTO__((Sfio_t*, const char*));
-extern __MANGLE__ int sfdcmore __PROTO__((Sfio_t*, const char*, int, int));
-extern __MANGLE__ int sfdcprefix __PROTO__((Sfio_t*, const char*));
-extern __MANGLE__ int sfdcseekable __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdcslow __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdctee __PROTO__((Sfio_t*, Sfio_t*));
-extern __MANGLE__ int sfdcunion __PROTO__((Sfio_t*, Sfio_t**, int));
-
-extern __MANGLE__ Sfio_t* sfdcsubstream __PROTO__((Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/sfio.h b/usr/src/lib/libast/sparc/include/ast/sfio.h
deleted file mode 100644
index da6ebfd9f2..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/sfio.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_H
-#define _SFIO_H 1
-
-#define SFIO_VERSION 20080717L
-
-/* Public header file for the sfio library
-**
-** Written by Kiem-Phong Vo
-*/
-
-typedef struct _sfio_s Sfio_t;
-typedef struct _sfdisc_s Sfdisc_t;
-
-#if defined(_AST_STD_H) || defined(_PACKAGE_ast) && defined(_SFIO_PRIVATE)
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif /* _PACKAGE_ast */
-
-/* Sfoff_t should be large enough for largest file address */
-#define Sfoff_t intmax_t
-#define Sflong_t intmax_t
-#define Sfulong_t uintmax_t
-#define Sfdouble_t _ast_fltmax_t
-
-typedef ssize_t (*Sfread_f)_ARG_((Sfio_t*, Void_t*, size_t, Sfdisc_t*));
-typedef ssize_t (*Sfwrite_f)_ARG_((Sfio_t*, const Void_t*, size_t, Sfdisc_t*));
-typedef Sfoff_t (*Sfseek_f)_ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*));
-typedef int (*Sfexcept_f)_ARG_((Sfio_t*, int, Void_t*, Sfdisc_t*));
-typedef int (*Sfwalk_f)_ARG_((Sfio_t*, Void_t*));
-
-/* discipline structure */
-struct _sfdisc_s
-{ Sfread_f readf; /* read function */
- Sfwrite_f writef; /* write function */
- Sfseek_f seekf; /* seek function */
- Sfexcept_f exceptf; /* to handle exceptions */
- Sfdisc_t* disc; /* the continuing discipline */
-};
-
-#include <sfio_s.h>
-
-/* formatting environment */
-typedef struct _sffmt_s Sffmt_t;
-typedef int (*Sffmtext_f)_ARG_((Sfio_t*, Void_t*, Sffmt_t*));
-typedef int (*Sffmtevent_f)_ARG_((Sfio_t*, int, Void_t*, Sffmt_t*));
-struct _sffmt_s
-{ long version;/* version of this structure */
- Sffmtext_f extf; /* function to process arguments */
- Sffmtevent_f eventf; /* process events */
-
- char* form; /* format string to stack */
- va_list args; /* corresponding arg list */
-
- int fmt; /* format character */
- ssize_t size; /* object size */
- int flags; /* formatting flags */
- int width; /* width of field */
- int precis; /* precision required */
- int base; /* conversion base */
-
- char* t_str; /* type string */
- ssize_t n_str; /* length of t_str */
-
- Void_t* mbs; /* multibyte state for format string */
-
- Void_t* none; /* unused for now */
-};
-#define sffmtversion(fe,type) \
- ((type) ? ((fe)->version = SFIO_VERSION) : (fe)->version)
-
-#define SFFMT_SSHORT 000000010 /* 'hh' flag, char */
-#define SFFMT_TFLAG 000000020 /* 't' flag, ptrdiff_t */
-#define SFFMT_ZFLAG 000000040 /* 'z' flag, size_t */
-
-#define SFFMT_LEFT 000000100 /* left-justification */
-#define SFFMT_SIGN 000000200 /* must have a sign */
-#define SFFMT_BLANK 000000400 /* if not signed, prepend a blank */
-#define SFFMT_ZERO 000001000 /* zero-padding on the left */
-#define SFFMT_ALTER 000002000 /* alternate formatting */
-#define SFFMT_THOUSAND 000004000 /* thousand grouping */
-#define SFFMT_SKIP 000010000 /* skip assignment in scanf() */
-#define SFFMT_SHORT 000020000 /* 'h' flag */
-#define SFFMT_LONG 000040000 /* 'l' flag */
-#define SFFMT_LLONG 000100000 /* 'll' flag */
-#define SFFMT_LDOUBLE 000200000 /* 'L' flag */
-#define SFFMT_VALUE 000400000 /* value is returned */
-#define SFFMT_ARGPOS 001000000 /* getting arg for $ patterns */
-#define SFFMT_IFLAG 002000000 /* 'I' flag */
-#define SFFMT_JFLAG 004000000 /* 'j' flag, intmax_t */
-#define SFFMT_CENTER 010000000 /* '=' flag, center justification */
-#define SFFMT_SET 017777770 /* flags settable on calling extf */
-
-/* for sfmutex() call */
-#define SFMTX_LOCK 0 /* up mutex count */
-#define SFMTX_TRYLOCK 1 /* try to up mutex count */
-#define SFMTX_UNLOCK 2 /* down mutex count */
-#define SFMTX_CLRLOCK 3 /* clear mutex count */
-
-/* various constants */
-#ifndef NULL
-#define NULL 0
-#endif
-#ifndef EOF
-#define EOF (-1)
-#endif
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-/* bits for various types of files */
-#define SF_READ 0000001 /* open for reading */
-#define SF_WRITE 0000002 /* open for writing */
-#define SF_STRING 0000004 /* a string stream */
-#define SF_APPENDWR 0000010 /* file is in append mode only */
-#define SF_MALLOC 0000020 /* buffer is malloc-ed */
-#define SF_LINE 0000040 /* line buffering */
-#define SF_SHARE 0000100 /* stream with shared file descriptor */
-#define SF_EOF 0000200 /* eof was detected */
-#define SF_ERROR 0000400 /* an error happened */
-#define SF_STATIC 0001000 /* a stream that cannot be freed */
-#define SF_IOCHECK 0002000 /* call exceptf before doing IO */
-#define SF_PUBLIC 0004000 /* SF_SHARE and follow physical seek */
-#define SF_MTSAFE 0010000 /* need thread safety */
-#define SF_WHOLE 0020000 /* preserve wholeness of sfwrite/sfputr */
-#define SF_IOINTR 0040000 /* return on interrupts */
-#define SF_WCWIDTH 0100000 /* wcwidth display stream */
-
-#define SF_FLAGS 0177177 /* PUBLIC FLAGS PASSABLE TO SFNEW() */
-#define SF_SETS 0177163 /* flags passable to sfset() */
-
-#ifndef _SF_NO_OBSOLETE
-#define SF_BUFCONST 0400000 /* unused flag - for compatibility only */
-#endif
-
-/* for sfgetr/sfreserve to hold a record */
-#define SF_LOCKR 0000010 /* lock record, stop access to stream */
-#define SF_LASTR 0000020 /* get the last incomplete record */
-
-/* exception events: SF_NEW(0), SF_READ(1), SF_WRITE(2) and the below */
-#define SF_SEEK 3 /* seek error */
-#define SF_CLOSING 4 /* when stream is about to be closed */
-#define SF_DPUSH 5 /* when discipline is being pushed */
-#define SF_DPOP 6 /* when discipline is being popped */
-#define SF_DPOLL 7 /* see if stream is ready for I/O */
-#define SF_DBUFFER 8 /* buffer not empty during push or pop */
-#define SF_SYNC 9 /* announcing start/end synchronization */
-#define SF_PURGE 10 /* a sfpurge() call was issued */
-#define SF_FINAL 11 /* closing is done except stream free */
-#define SF_READY 12 /* a polled stream is ready */
-#define SF_LOCKED 13 /* stream is in a locked state */
-#define SF_ATEXIT 14 /* process is exiting */
-#define SF_EVENT 100 /* start of user-defined events */
-
-/* for stack and disciplines */
-#define SF_POPSTACK ((Sfio_t*)0) /* pop the stream stack */
-#define SF_POPDISC ((Sfdisc_t*)0) /* pop the discipline stack */
-
-/* for the notify function and discipline exception */
-#define SF_NEW 0 /* new stream */
-#define SF_SETFD (-1) /* about to set the file descriptor */
-#define SF_MTACCESS (-2) /* starting a multi-threaded stream */
-
-#define SF_BUFSIZE 8192 /* default buffer size */
-#define SF_UNBOUND (-1) /* unbounded buffer size */
-
-/* namespace incursion workarounds -- migrate to the new names */
-#if !_mac_SF_APPEND
-#define SF_APPEND SF_APPENDWR /* BSDI sys/stat.h */
-#endif
-#if !_mac_SF_CLOSE
-#define SF_CLOSE SF_CLOSING /* AIX sys/socket.h */
-#endif
-
-_BEGIN_EXTERNS_
-
-/* standard in/out/err streams */
-
-#if _BLD_sfio && defined(__EXPORT__)
-#define extern extern __EXPORT__
-#endif
-#if !_BLD_sfio && defined(__IMPORT__)
-#define extern extern __IMPORT__
-#endif
-
-extern ssize_t _Sfi;
-extern ssize_t _Sfmaxr;
-
-extern Sfio_t* sfstdin;
-extern Sfio_t* sfstdout;
-extern Sfio_t* sfstderr;
-
-#if _UWIN
-#undef extern
-#endif
-
-extern Sfio_t _Sfstdin;
-extern Sfio_t _Sfstdout;
-extern Sfio_t _Sfstderr;
-
-#undef extern
-
-#if _BLD_sfio && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Sfio_t* sfnew _ARG_((Sfio_t*, Void_t*, size_t, int, int));
-extern Sfio_t* sfopen _ARG_((Sfio_t*, const char*, const char*));
-extern Sfio_t* sfpopen _ARG_((Sfio_t*, const char*, const char*));
-extern Sfio_t* sfstack _ARG_((Sfio_t*, Sfio_t*));
-extern Sfio_t* sfswap _ARG_((Sfio_t*, Sfio_t*));
-extern Sfio_t* sftmp _ARG_((size_t));
-extern int sfwalk _ARG_((Sfwalk_f, Void_t*, int));
-extern int sfpurge _ARG_((Sfio_t*));
-extern int sfpoll _ARG_((Sfio_t**, int, int));
-extern Void_t* sfreserve _ARG_((Sfio_t*, ssize_t, int));
-extern int sfresize _ARG_((Sfio_t*, Sfoff_t));
-extern int sfsync _ARG_((Sfio_t*));
-extern int sfclrlock _ARG_((Sfio_t*));
-extern Void_t* sfsetbuf _ARG_((Sfio_t*, Void_t*, size_t));
-extern Sfdisc_t* sfdisc _ARG_((Sfio_t*,Sfdisc_t*));
-extern int sfraise _ARG_((Sfio_t*, int, Void_t*));
-extern int sfnotify _ARG_((void(*)(Sfio_t*, int, void*)));
-extern int sfset _ARG_((Sfio_t*, int, int));
-extern int sfsetfd _ARG_((Sfio_t*, int));
-extern Sfio_t* sfpool _ARG_((Sfio_t*, Sfio_t*, int));
-extern ssize_t sfread _ARG_((Sfio_t*, Void_t*, size_t));
-extern ssize_t sfwrite _ARG_((Sfio_t*, const Void_t*, size_t));
-extern Sfoff_t sfmove _ARG_((Sfio_t*, Sfio_t*, Sfoff_t, int));
-extern int sfclose _ARG_((Sfio_t*));
-extern Sfoff_t sftell _ARG_((Sfio_t*));
-extern Sfoff_t sfseek _ARG_((Sfio_t*, Sfoff_t, int));
-extern ssize_t sfputr _ARG_((Sfio_t*, const char*, int));
-extern char* sfgetr _ARG_((Sfio_t*, int, int));
-extern ssize_t sfnputc _ARG_((Sfio_t*, int, size_t));
-extern int sfungetc _ARG_((Sfio_t*, int));
-extern int sfprintf _ARG_((Sfio_t*, const char*, ...));
-extern char* sfprints _ARG_((const char*, ...));
-extern ssize_t sfsprintf _ARG_((char*, size_t, const char*, ...));
-extern ssize_t sfvsprintf _ARG_((char*, size_t, const char*, va_list));
-extern int sfvprintf _ARG_((Sfio_t*, const char*, va_list));
-extern int sfscanf _ARG_((Sfio_t*, const char*, ...));
-extern int sfsscanf _ARG_((const char*, const char*, ...));
-extern int sfvsscanf _ARG_((const char*, const char*, va_list));
-extern int sfvscanf _ARG_((Sfio_t*, const char*, va_list));
-
-/* mutex locking for thread-safety */
-extern int sfmutex _ARG_((Sfio_t*, int));
-
-/* io functions with discipline continuation */
-extern ssize_t sfrd _ARG_((Sfio_t*, Void_t*, size_t, Sfdisc_t*));
-extern ssize_t sfwr _ARG_((Sfio_t*, const Void_t*, size_t, Sfdisc_t*));
-extern Sfoff_t sfsk _ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*));
-extern ssize_t sfpkrd _ARG_((int, Void_t*, size_t, int, long, int));
-
-/* portable handling of primitive types */
-extern int sfdlen _ARG_((Sfdouble_t));
-extern int sfllen _ARG_((Sflong_t));
-extern int sfulen _ARG_((Sfulong_t));
-
-extern int sfputd _ARG_((Sfio_t*, Sfdouble_t));
-extern int sfputl _ARG_((Sfio_t*, Sflong_t));
-extern int sfputu _ARG_((Sfio_t*, Sfulong_t));
-extern int sfputm _ARG_((Sfio_t*, Sfulong_t, Sfulong_t));
-extern int sfputc _ARG_((Sfio_t*, int));
-
-extern Sfdouble_t sfgetd _ARG_((Sfio_t*));
-extern Sflong_t sfgetl _ARG_((Sfio_t*));
-extern Sfulong_t sfgetu _ARG_((Sfio_t*));
-extern Sfulong_t sfgetm _ARG_((Sfio_t*, Sfulong_t));
-extern int sfgetc _ARG_((Sfio_t*));
-
-extern int _sfputd _ARG_((Sfio_t*, Sfdouble_t));
-extern int _sfputl _ARG_((Sfio_t*, Sflong_t));
-extern int _sfputu _ARG_((Sfio_t*, Sfulong_t));
-extern int _sfputm _ARG_((Sfio_t*, Sfulong_t, Sfulong_t));
-extern int _sfflsbuf _ARG_((Sfio_t*, int));
-
-extern int _sffilbuf _ARG_((Sfio_t*, int));
-
-extern int _sfdlen _ARG_((Sfdouble_t));
-extern int _sfllen _ARG_((Sflong_t));
-extern int _sfulen _ARG_((Sfulong_t));
-
-/* miscellaneous function analogues of fast in-line functions */
-extern Sfoff_t sfsize _ARG_((Sfio_t*));
-extern int sfclrerr _ARG_((Sfio_t*));
-extern int sfeof _ARG_((Sfio_t*));
-extern int sferror _ARG_((Sfio_t*));
-extern int sffileno _ARG_((Sfio_t*));
-extern int sfstacked _ARG_((Sfio_t*));
-extern ssize_t sfvalue _ARG_((Sfio_t*));
-extern ssize_t sfslen _ARG_((void));
-extern ssize_t sfmaxr _ARG_((ssize_t, int));
-
-#undef extern
-_END_EXTERNS_
-
-/* coding long integers in a portable and compact fashion */
-#define SF_SBITS 6
-#define SF_UBITS 7
-#define SF_BBITS 8
-#define SF_SIGN (1 << SF_SBITS)
-#define SF_MORE (1 << SF_UBITS)
-#define SF_BYTE (1 << SF_BBITS)
-#define SF_U1 SF_MORE
-#define SF_U2 (SF_U1*SF_U1)
-#define SF_U3 (SF_U2*SF_U1)
-#define SF_U4 (SF_U3*SF_U1)
-
-#if __cplusplus
-#define _SF_(f) (f)
-#else
-#define _SF_(f) ((Sfio_t*)(f))
-#endif
-
-#define __sf_putd(f,v) (_sfputd(_SF_(f),(Sfdouble_t)(v)))
-#define __sf_putl(f,v) (_sfputl(_SF_(f),(Sflong_t)(v)))
-#define __sf_putu(f,v) (_sfputu(_SF_(f),(Sfulong_t)(v)))
-#define __sf_putm(f,v,m) (_sfputm(_SF_(f),(Sfulong_t)(v),(Sfulong_t)(m)))
-
-#define __sf_putc(f,c) (_SF_(f)->_next >= _SF_(f)->_endw ? \
- _sfflsbuf(_SF_(f),(int)((unsigned char)(c))) : \
- (int)(*_SF_(f)->_next++ = (unsigned char)(c)) )
-#define __sf_getc(f) (_SF_(f)->_next >= _SF_(f)->_endr ? _sffilbuf(_SF_(f),0) : \
- (int)(*_SF_(f)->_next++) )
-
-#define __sf_dlen(v) (_sfdlen((Sfdouble_t)(v)) )
-#define __sf_llen(v) (_sfllen((Sflong_t)(v)) )
-#define __sf_ulen(v) ((Sfulong_t)(v) < SF_U1 ? 1 : (Sfulong_t)(v) < SF_U2 ? 2 : \
- (Sfulong_t)(v) < SF_U3 ? 3 : (Sfulong_t)(v) < SF_U4 ? 4 : 5)
-
-#define __sf_fileno(f) (_SF_(f)->_file)
-#define __sf_eof(f) (_SF_(f)->_flags&SF_EOF)
-#define __sf_error(f) (_SF_(f)->_flags&SF_ERROR)
-#define __sf_clrerr(f) (_SF_(f)->_flags &= ~(SF_ERROR|SF_EOF))
-#define __sf_stacked(f) (_SF_(f)->_push != (Sfio_t*)0)
-#define __sf_value(f) (_SF_(f)->_val)
-#define __sf_slen() (_Sfi)
-#define __sf_maxr(n,s) ((s)?((_Sfi=_Sfmaxr),(_Sfmaxr=(n)),_Sfi):_Sfmaxr)
-
-#if defined(__INLINE__) && !_BLD_sfio
-
-__INLINE__ int sfputd(Sfio_t* f, Sfdouble_t v) { return __sf_putd(f,v); }
-__INLINE__ int sfputl(Sfio_t* f, Sflong_t v) { return __sf_putl(f,v); }
-__INLINE__ int sfputu(Sfio_t* f, Sfulong_t v) { return __sf_putu(f,v); }
-__INLINE__ int sfputm(Sfio_t* f, Sfulong_t v, Sfulong_t m)
- { return __sf_putm(f,v,m); }
-
-__INLINE__ int sfputc(Sfio_t* f, int c) { return __sf_putc(f,c); }
-__INLINE__ int sfgetc(Sfio_t* f) { return __sf_getc(f); }
-
-__INLINE__ int sfdlen(Sfdouble_t v) { return __sf_dlen(v); }
-__INLINE__ int sfllen(Sflong_t v) { return __sf_llen(v); }
-__INLINE__ int sfulen(Sfulong_t v) { return __sf_ulen(v); }
-
-__INLINE__ int sffileno(Sfio_t* f) { return __sf_fileno(f); }
-__INLINE__ int sfeof(Sfio_t* f) { return __sf_eof(f); }
-__INLINE__ int sferror(Sfio_t* f) { return __sf_error(f); }
-__INLINE__ int sfclrerr(Sfio_t* f) { return __sf_clrerr(f); }
-__INLINE__ int sfstacked(Sfio_t* f) { return __sf_stacked(f); }
-__INLINE__ ssize_t sfvalue(Sfio_t* f) { return __sf_value(f); }
-__INLINE__ ssize_t sfslen() { return __sf_slen(); }
-__INLINE__ ssize_t sfmaxr(ssize_t n, int s) { return __sf_maxr(n,s); }
-
-#else
-
-#define sfputd(f,v) ( __sf_putd((f),(v)) )
-#define sfputl(f,v) ( __sf_putl((f),(v)) )
-#define sfputu(f,v) ( __sf_putu((f),(v)) )
-#define sfputm(f,v,m) ( __sf_putm((f),(v),(m)) )
-
-#define sfputc(f,c) ( __sf_putc((f),(c)) )
-#define sfgetc(f) ( __sf_getc(f) )
-
-#define sfdlen(v) ( __sf_dlen(v) )
-#define sfllen(v) ( __sf_llen(v) )
-#define sfulen(v) ( __sf_ulen(v) )
-
-#define sffileno(f) ( __sf_fileno(f) )
-#define sfeof(f) ( __sf_eof(f) )
-#define sferror(f) ( __sf_error(f) )
-#define sfclrerr(f) ( __sf_clrerr(f) )
-#define sfstacked(f) ( __sf_stacked(f) )
-#define sfvalue(f) ( __sf_value(f) )
-#define sfslen() ( __sf_slen() )
-#define sfmaxr(n,s) ( __sf_maxr(n,s) )
-
-#endif /*__INLINE__*/
-
-#ifndef _SFSTR_H /* GSF's string manipulation stuff */
-#define _SFSTR_H 1
-
-#define sfstropen() sfnew(0, 0, -1, -1, SF_READ|SF_WRITE|SF_STRING)
-#define sfstrclose(f) sfclose(f)
-
-#define sfstrseek(f,p,m) \
- ( (m) == SEEK_SET ? \
- (((p) < 0 || (p) > (f)->_size) ? (char*)0 : \
- (char*)((f)->_next = (f)->_data+(p)) ) \
- : (m) == SEEK_CUR ? \
- ((f)->_next += (p), \
- (((f)->_next < (f)->_data || (f)->_next > (f)->_data+(f)->_size) ? \
- ((f)->_next -= (p), (char*)0) : (char*)(f)->_next ) ) \
- : (m) == SEEK_END ? \
- ( ((p) > 0 || (f)->_size+(p) < 0) ? (char*)0 : \
- (char*)((f)->_next = (f)->_data+(f)->_size+(p)) ) \
- : (char*)0 \
- )
-
-#define sfstrsize(f) ((f)->_size)
-#define sfstrtell(f) ((f)->_next - (f)->_data)
-#define sfstrpend(f) ((f)->_size - sfstrtell())
-#define sfstrbase(f) ((char*)(f)->_data)
-
-#define sfstruse(f) \
- (sfputc((f),0) < 0 ? (char*)0 : (char*)((f)->_next = (f)->_data) \
- )
-
-#define sfstrrsrv(f,n) \
- (sfreserve((f),(n),SF_WRITE|SF_LOCKR), sfwrite((f),(f)->_next,0), \
- ((f)->_next+(n) <= (f)->_data+(f)->_size ? (char*)(f)->_next : (char*)0) \
- )
-
-#define sfstrbuf(f,b,n,m) \
- (sfsetbuf((f),(b),(n)), ((f)->_flags |= (m) ? SF_MALLOC : 0), \
- ((f)->_data == (unsigned char*)(b) ? 0 : -1) \
- )
-
-#endif /* _SFSTR_H */
-
-#endif /* _SFIO_H */
diff --git a/usr/src/lib/libast/sparc/include/ast/sfio_s.h b/usr/src/lib/libast/sparc/include/ast/sfio_s.h
deleted file mode 100644
index 7f7483cc79..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/sfio_s.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_S_H
-#define _SFIO_S_H 1
-
-/*
- * sfio file structure used by sfio and the stdio source compatibility library
- */
-
-#if !defined(_SFHDR_H) && defined(_SFIO_H) && SFIO_VERSION < 20020214L
-#define _data data
-#define _endb endb
-#define _next next
-#endif
-
-struct _sfio_s
-{ unsigned char* _next; /* next position to read/write from */
- unsigned char* _endw; /* end of write buffer */
- unsigned char* _endr; /* end of read buffer */
- unsigned char* _endb; /* end of buffer */
- struct _sfio_s* _push; /* the stream that was pushed on */
- unsigned short _flags; /* type of stream */
- short _file; /* file descriptor */
- unsigned char* _data; /* base of data buffer */
- ssize_t _size; /* buffer size */
- ssize_t _val; /* values or string lengths */
-#ifdef _SFIO_PRIVATE
- _SFIO_PRIVATE
-#endif
-};
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/sfio_t.h b/usr/src/lib/libast/sparc/include/ast/sfio_t.h
deleted file mode 100644
index 4240316aef..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/sfio_t.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_T_H
-#define _SFIO_T_H 1
-
-/* This header file is for library writers who need to know certain
-** internal info concerning the full Sfio_t structure. Including this
-** file means that you agree to track closely with sfio development
-** in case its internal architecture is changed.
-**
-** Written by Kiem-Phong Vo
-*/
-
-/* the parts of Sfio_t private to sfio functions */
-#define _SFIO_PRIVATE \
- Sfoff_t extent; /* current file size */ \
- Sfoff_t here; /* current physical location */ \
- unsigned char getr; /* the last sfgetr separator */ \
- unsigned char tiny[1];/* for unbuffered read stream */ \
- unsigned short bits; /* private flags */ \
- unsigned int mode; /* current io mode */ \
- struct _sfdisc_s* disc; /* discipline */ \
- struct _sfpool_s* pool; /* the pool containing this */ \
- struct _sfrsrv_s* rsrv; /* reserved buffer */ \
- struct _sfproc_s* proc; /* coprocess id, etc. */ \
- Void_t* mutex; /* mutex for thread-safety */ \
- Void_t* stdio; /* stdio FILE if any */ \
- Sfoff_t lpos; /* last seek position */ \
- size_t iosz; /* preferred size for I/O */ \
- size_t blksz; /* preferred block size */ \
- Void_t* fill[1];/* modest expansion */
-
-#include "sfio.h"
-
-/* mode bit to indicate that the structure hasn't been initialized */
-#define SF_INIT 0000004
-#define SF_DCDOWN 00010000
-
-/* short-hand for common stream types */
-#define SF_RDWR (SF_READ|SF_WRITE)
-#define SF_RDSTR (SF_READ|SF_STRING)
-#define SF_WRSTR (SF_WRITE|SF_STRING)
-#define SF_RDWRSTR (SF_RDWR|SF_STRING)
-
-/* for static initialization of an Sfio_t structure */
-#define SFNEW(data,size,file,type,disc,mutex) \
- { (unsigned char*)(data), /* next */ \
- (unsigned char*)(data), /* endw */ \
- (unsigned char*)(data), /* endr */ \
- (unsigned char*)(data), /* endb */ \
- (Sfio_t*)0, /* push */ \
- (unsigned short)((type)&SF_FLAGS), /* flags */ \
- (short)(file), /* file */ \
- (unsigned char*)(data), /* data */ \
- (ssize_t)(size), /* size */ \
- (ssize_t)(-1), /* val */ \
- (Sfoff_t)0, /* extent */ \
- (Sfoff_t)0, /* here */ \
- 0, /* getr */ \
- {0}, /* tiny */ \
- 0, /* bits */ \
- (unsigned int)(((type)&(SF_RDWR))|SF_INIT), /* mode */ \
- (struct _sfdisc_s*)(disc), /* disc */ \
- (struct _sfpool_s*)0, /* pool */ \
- (struct _sfrsrv_s*)0, /* rsrv */ \
- (struct _sfproc_s*)0, /* proc */ \
- (mutex), /* mutex */ \
- (Void_t*)0, /* stdio */ \
- (Sfoff_t)0, /* lpos */ \
- (size_t)0 /* iosz */ \
- }
-
-/* function to clear an Sfio_t structure */
-#define SFCLEAR(f,mtx) \
- ( (f)->next = (unsigned char*)0, /* next */ \
- (f)->endw = (unsigned char*)0, /* endw */ \
- (f)->endr = (unsigned char*)0, /* endr */ \
- (f)->endb = (unsigned char*)0, /* endb */ \
- (f)->push = (Sfio_t*)0, /* push */ \
- (f)->flags = (unsigned short)0, /* flags */ \
- (f)->file = -1, /* file */ \
- (f)->data = (unsigned char*)0, /* data */ \
- (f)->size = (ssize_t)(-1), /* size */ \
- (f)->val = (ssize_t)(-1), /* val */ \
- (f)->extent = (Sfoff_t)(-1), /* extent */ \
- (f)->here = (Sfoff_t)0, /* here */ \
- (f)->getr = 0, /* getr */ \
- (f)->tiny[0] = 0, /* tiny */ \
- (f)->bits = 0, /* bits */ \
- (f)->mode = 0, /* mode */ \
- (f)->disc = (struct _sfdisc_s*)0, /* disc */ \
- (f)->pool = (struct _sfpool_s*)0, /* pool */ \
- (f)->rsrv = (struct _sfrsrv_s*)0, /* rsrv */ \
- (f)->proc = (struct _sfproc_s*)0, /* proc */ \
- (f)->mutex = (mtx), /* mutex */ \
- (f)->stdio = (Void_t*)0, /* stdio */ \
- (f)->lpos = (Sfoff_t)0, /* lpos */ \
- (f)->iosz = (size_t)0 /* iosz */ \
- )
-
-/* expose next stream inside discipline function; state saved in int f */
-#define SFDCNEXT(sp,f) (((f)=(sp)->bits&SF_DCDOWN),(sp)->bits|=SF_DCDOWN)
-
-/* restore SFDCNEXT() state from int f */
-#define SFDCPREV(sp,f) ((f)?(0):((sp)->bits&=~SF_DCDOWN))
-
-#endif /* _SFIO_T_H */
diff --git a/usr/src/lib/libast/sparc/include/ast/shcmd.h b/usr/src/lib/libast/sparc/include/ast/shcmd.h
deleted file mode 100644
index 2b7a3ce486..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/shcmd.h
+++ /dev/null
@@ -1,104 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * ksh builtin command api
- */
-
-#ifndef _SHCMD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SHCMD_H 1
-
-#ifndef SH_VERSION
-# define Shell_t void
-#endif
-#ifndef NV_DEFAULT
-# define Namval_t void
-#endif
-#ifndef ERROR_NOTIFY
-# define ERROR_NOTIFY 1
-#endif
-
-typedef int (*Shbltin_f) __PROTO__((int, char**, __V_*));
-
-#undef Shbltin_t
-typedef struct Shbltin_s
-{
- Shell_t *shp;
- __V_ *ptr;
- int version;
- int (*shrun) __PROTO__((int, char**));
- int (*shtrap) __PROTO__((const char*, int));
- void (*shexit) __PROTO__((int));
- Namval_t *(*shbltin) __PROTO__((const char*, Shbltin_f, __V_*));
- unsigned char notify;
- unsigned char sigset;
- unsigned char nosfio;
- Namval_t *bnode;
- Namval_t *vnode;
- char *data;
- int flags;
- char *(*shgetenv) __PROTO__((const char*));
- char *(*shsetenv) __PROTO__((const char*));
- int invariant;
-} Shbltin_t;
-
-#if defined(SH_VERSION) || defined(_SH_PRIVATE)
-# undef Shell_t
-# undef Namval_t
-#else
-# define sh_context(c) ((Shbltin_t*)(c))
-# define sh_run(c, ac, av) ((c)?(*sh_context(c)->shrun)(ac,av):-1)
-# define sh_system(c,str) ((c)?(*sh_context(c)->shtrap)(str,0):system(str))
-# define sh_exit(c,n) ((c)?(*sh_context(c)->shexit)(n):exit(n))
-# define sh_checksig(c) ((c) && sh_context(c)->sigset)
-# if defined(SFIO_VERSION) || defined(_AST_H)
-# define LIB_INIT(c)
-# else
-# define LIB_INIT(c) ((c) && (sh_context(c)->nosfio = 1))
-# endif
-# ifndef _CMD_H
-# define cmdinit(ac,av,c,cat,flg) do { if((ac)<=0) return(0); \
- (sh_context(c)->notify = ((flg)&ERROR_NOTIFY)?1:0);} while(0)
-# endif
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int astintercept __PROTO__((Shbltin_t*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/sig.h b/usr/src/lib/libast/sparc/include/ast/sig.h
deleted file mode 100644
index 31d2be6dfc..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/sig.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
-#ifndef _def_sig_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_sig_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define sig_info _sig_info_
-
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide kill killpg
-#else
-#define kill ______kill
-#define killpg ______killpg
-#endif
-#include <signal.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide kill killpg
-#else
-#undef kill
-#undef killpg
-#endif
-#ifndef sigmask
-#define sigmask(s) (1<<((s)-1))
-#endif
-typedef void (*Sig_handler_t) __PROTO__((int));
-
-
-#define Handler_t Sig_handler_t
-
-#define SIG_REG_PENDING (-1)
-#define SIG_REG_POP 0
-#define SIG_REG_EXEC 00001
-#define SIG_REG_PROC 00002
-#define SIG_REG_TERM 00004
-#define SIG_REG_ALL 00777
-#define SIG_REG_SET 01000
-
-typedef struct
-{
- char** name;
- char** text;
- int sigmax;
-} Sig_info_t;
-
-extern __MANGLE__ int kill __PROTO__((pid_t, int));
-extern __MANGLE__ int killpg __PROTO__((pid_t, int));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sig_info_t sig_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _lib_sigflag && _npt_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-extern __MANGLE__ int sigcritical __PROTO__((int));
-extern __MANGLE__ int sigunblock __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/stack.h b/usr/src/lib/libast/sparc/include/ast/stack.h
deleted file mode 100644
index 8a7f954797..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/stack.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * homogenous stack routine definitions
- */
-
-#ifndef _STACK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STACK_H
-
-typedef struct stacktable* STACK; /* stack pointer */
-typedef struct stackposition STACKPOS; /* stack position */
-
-struct stackblock /* stack block cell */
-{
- __V_** stack; /* actual stack */
- struct stackblock* prev; /* previous block in list */
- struct stackblock* next; /* next block in list */
-};
-
-struct stackposition /* stack position */
-{
- struct stackblock* block; /* current block pointer */
- int index; /* index within current block */
-};
-
-struct stacktable /* stack information */
-{
- struct stackblock* blocks; /* stack table blocks */
- __V_* error; /* error return value */
- int size; /* size of each block */
- STACKPOS position; /* current stack position */
-};
-
-/*
- * map old names to new
- */
-
-#define mkstack stackalloc
-#define rmstack stackfree
-#define clrstack stackclear
-#define getstack stackget
-#define pushstack stackpush
-#define popstack stackpop
-#define posstack stacktell
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ STACK stackalloc __PROTO__((int, __V_*));
-extern __MANGLE__ void stackfree __PROTO__((STACK));
-extern __MANGLE__ void stackclear __PROTO__((STACK));
-extern __MANGLE__ __V_* stackget __PROTO__((STACK));
-extern __MANGLE__ int stackpush __PROTO__((STACK, __V_*));
-extern __MANGLE__ int stackpop __PROTO__((STACK));
-extern __MANGLE__ void stacktell __PROTO__((STACK, int, STACKPOS*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/stak.h b/usr/src/lib/libast/sparc/include/ast/stak.h
deleted file mode 100644
index 4396bdf02b..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/stak.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * David Korn
- * AT&T Research
- *
- * Interface definitions for a stack-like storage library
- *
- */
-
-#ifndef _STAK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STAK_H
-
-#include <stk.h>
-
-#define Stak_t Sfio_t
-#define staksp stkstd
-#define STAK_SMALL STK_SMALL
-
-#define stakptr(n) stkptr(stkstd,n)
-#define staktell() stktell(stkstd)
-#define stakputc(c) sfputc(stkstd,(c))
-#define stakwrite(b,n) sfwrite(stkstd,(b),(n))
-#define stakputs(s) (sfputr(stkstd,(s),0),--stkstd->_next)
-#define stakseek(n) stkseek(stkstd,n)
-#define stakcreate(n) stkopen(n)
-#define stakinstall(s,f) stkinstall(s,f)
-#define stakdelete(s) stkclose(s)
-#define staklink(s) stklink(s)
-#define stakalloc(n) stkalloc(stkstd,n)
-#define stakcopy(s) stkcopy(stkstd,s)
-#define stakset(c,n) stkset(stkstd,c,n)
-#define stakfreeze(n) stkfreeze(stkstd,n)
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/stdio.h b/usr/src/lib/libast/sparc/include/ast/stdio.h
deleted file mode 100644
index 0d9876a250..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/stdio.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_stdio.h>
diff --git a/usr/src/lib/libast/sparc/include/ast/stk.h b/usr/src/lib/libast/sparc/include/ast/stk.h
deleted file mode 100644
index 7a226b0e98..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/stk.h
+++ /dev/null
@@ -1,92 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * David Korn
- * AT&T Research
- *
- * Interface definitions for a stack-like storage library
- *
- */
-
-#ifndef _STK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STK_H
-
-#include <sfio.h>
-
-#define _Stk_data _Stak_data
-
-#define stkstd (&_Stk_data)
-
-#define Stk_t Sfio_t
-
-#define STK_SMALL 1 /* small stkopen stack */
-#define STK_NULL 2 /* return NULL on overflow */
-
-#define stkptr(sp,n) ((char*)((sp)->_data)+(n))
-#define stktop(sp) ((char*)(sp)->_next)
-#define stktell(sp) ((sp)->_next-(sp)->_data)
-#define stkseek(sp,n) ((n)==0?(char*)((sp)->_next=(sp)->_data):_stkseek(sp,n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sfio_t _Stk_data;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Stk_t* stkopen __PROTO__((int));
-extern __MANGLE__ Stk_t* stkinstall __PROTO__((Stk_t*, char*(*)(int)));
-extern __MANGLE__ int stkclose __PROTO__((Stk_t*));
-extern __MANGLE__ int stklink __PROTO__((Stk_t*));
-extern __MANGLE__ char* stkalloc __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ char* stkcopy __PROTO__((Stk_t*,const char*));
-extern __MANGLE__ char* stkset __PROTO__((Stk_t*, char*, unsigned));
-extern __MANGLE__ char* _stkseek __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ char* stkfreeze __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ int stkon __PROTO__((Stk_t*, char *));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/swap.h b/usr/src/lib/libast/sparc/include/ast/swap.h
deleted file mode 100644
index d214ece1e6..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/swap.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * integral representation conversion support definitions
- * supports sizeof(integral_type)<=sizeof(intmax_t)
- */
-
-#ifndef _SWAP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SWAP_H
-
-#include <ast_common.h>
-
-#define int_swap _ast_intswap
-
-#define SWAP_MAX 8
-
-#define SWAPOP(n) (((n)&int_swap)^(n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ __V_* swapmem __PROTO__((int, const __V_*, __V_*, size_t));
-extern __MANGLE__ intmax_t swapget __PROTO__((int, const __V_*, int));
-extern __MANGLE__ __V_* swapput __PROTO__((int, __V_*, int, intmax_t));
-extern __MANGLE__ int swapop __PROTO__((const __V_*, const __V_*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/tar.h b/usr/src/lib/libast/sparc/include/ast/tar.h
deleted file mode 100644
index 8e8af49bb2..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/tar.h
+++ /dev/null
@@ -1,127 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Standard Archive Format
- * USTAR - Uniform Standard Tape ARchive
- */
-
-#ifndef _TAR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TAR_H
-
-#define TBLOCK 512
-#define NAMSIZ 100
-#define PFXSIZ 155
-
-#define TMODLEN 8
-#define TUIDLEN 8
-#define TGIDLEN 8
-#define TSIZLEN 12
-#define TMTMLEN 12
-#define TCKSLEN 8
-
-#define TMAGIC "ustar" /* ustar and a null */
-#define TMAGLEN 6
-#define TVERSION "00" /* 00 and no null */
-#define TVERSLEN 2
-#define TUNMLEN 32
-#define TGNMLEN 32
-#define TDEVLEN 8
-
-/*
- * values used in typeflag field
- */
-
-#define REGTYPE '0' /* regular file */
-#define AREGTYPE 0 /* alternate REGTYPE */
-#define LNKTYPE '1' /* hard link */
-#define SYMTYPE '2' /* soft link */
-#define CHRTYPE '3' /* character special */
-#define BLKTYPE '4' /* block special */
-#define DIRTYPE '5' /* directory */
-#define FIFOTYPE '6' /* FIFO special */
-#define CONTTYPE '7' /* reserved */
-#define SOKTYPE '8' /* socket */
-#define EXTTYPE 'x' /* extended header */
-#define GLBTYPE 'g' /* global extended header */
-#define LLNKTYPE 'K' /* long link path */
-#define LREGTYPE 'L' /* long file path */
-#define VERTYPE 'V' /* version */
-
-/*
- * bits used in mode field
- */
-
-#define TSUID 04000 /* set uid on exec */
-#define TSGID 02000 /* set gid on exec */
-#define TSVTX 01000 /* sticky bit -- reserved */
-
-/*
- * file permissions
- */
-
-#define TUREAD 00400 /* read by owner */
-#define TUWRITE 00200 /* write by owner */
-#define TUEXEC 00100 /* execute by owner */
-#define TGREAD 00040 /* read by group */
-#define TGWRITE 00020 /* execute by group */
-#define TGEXEC 00010 /* write by group */
-#define TOREAD 00004 /* read by other */
-#define TOWRITE 00002 /* write by other */
-#define TOEXEC 00001 /* execute by other */
-
-struct header
-{
- char name[NAMSIZ];
- char mode[TMODLEN];
- char uid[TUIDLEN];
- char gid[TGIDLEN];
- char size[TSIZLEN];
- char mtime[TMTMLEN];
- char chksum[TCKSLEN];
- char typeflag;
- char linkname[NAMSIZ];
- char magic[TMAGLEN];
- char version[TVERSLEN];
- char uname[TUNMLEN];
- char gname[TGNMLEN];
- char devmajor[TDEVLEN];
- char devminor[TDEVLEN];
- char prefix[PFXSIZ];
-};
-
-union hblock
-{
- char dummy[TBLOCK];
- struct header dbuf;
-};
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/times.h b/usr/src/lib/libast/sparc/include/ast/times.h
deleted file mode 100644
index 1dbd3ee60a..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/times.h
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * -last clock_t,time_t interface definitions plus
- *
- * <ast.h>
- * <time.h>
- * <sys/time.h>
- * <sys/times.h>
- */
-
-#ifndef _TIMES_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TIMES_H
-
-#include <ast.h>
-
-#undef _TIMES_H
-#include <ast_time.h>
-#ifndef _TIMES_H
-#define _TIMES_H
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int touch __PROTO__((const char*, time_t, time_t, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/tm.h b/usr/src/lib/libast/sparc/include/ast/tm.h
deleted file mode 100644
index d8eb357c20..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/tm.h
+++ /dev/null
@@ -1,206 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * time conversion support definitions
- */
-
-#ifndef _TM_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TM_H
-
-#define TM_VERSION 20070319L
-
-#include <ast.h>
-#include <times.h>
-
-#undef daylight
-
-#define tmset(z) tminit(z)
-#define tmisleapyear(y) (!((y)%4)&&(((y)%100)||!((((y)<1900)?((y)+1900):(y))%400)))
-
-#define TM_ADJUST (1<<0) /* local doesn't do leap secs */
-#define TM_LEAP (1<<1) /* do leap seconds */
-#define TM_UTC (1<<2) /* universal coordinated ref */
-
-#define TM_PEDANTIC (1<<3) /* pedantic date parse */
-#define TM_DATESTYLE (1<<4) /* date(1) style mmddHHMMccyy */
-#define TM_SUBSECOND (1<<5) /* <something>%S => ...%S.%P */
-
-#define TM_DST (-60) /* default minutes for DST */
-#define TM_LOCALZONE (25 * 60) /* use local time zone offset */
-#define TM_UTCZONE (26 * 60) /* UTC "time zone" */
-#define TM_MAXLEAP 1 /* max leap secs per leap */
-#define TM_WINDOW 69 /* century windowing guard year */
-
-/*
- * these indices must agree with tm_dform[]
- */
-
-#define TM_MONTH_ABBREV 0
-#define TM_MONTH 12
-#define TM_DAY_ABBREV 24
-#define TM_DAY 31
-#define TM_TIME 38
-#define TM_DATE 39
-#define TM_DEFAULT 40
-#define TM_MERIDIAN 41
-
-#define TM_UT 43
-#define TM_DT 47
-#define TM_SUFFIXES 51
-#define TM_PARTS 55
-#define TM_HOURS 62
-#define TM_DAYS 66
-#define TM_LAST 69
-#define TM_THIS 72
-#define TM_NEXT 75
-#define TM_EXACT 78
-#define TM_NOISE 81
-#define TM_ORDINAL 85
-#define TM_DIGITS 95
-#define TM_CTIME 105
-#define TM_DATE_1 106
-#define TM_INTERNATIONAL 107
-#define TM_RECENT 108
-#define TM_DISTANT 109
-#define TM_MERIDIAN_TIME 110
-#define TM_ERA 111
-#define TM_ERA_DATE 112
-#define TM_ERA_TIME 113
-#define TM_ERA_DEFAULT 114
-#define TM_ERA_YEAR 115
-#define TM_ORDINALS 116
-#define TM_FINAL 126
-#define TM_WORK 129
-
-#define TM_NFORM 132
-
-typedef struct /* leap second info */
-{
- time_t time; /* the leap second event */
- int total; /* inclusive total since epoch */
-} Tm_leap_t;
-
-typedef struct /* time zone info */
-{
- char* type; /* type name */
- char* standard; /* standard time name */
- char* daylight; /* daylight or summertime name */
- short west; /* minutes west of GMT */
- short dst; /* add to tz.west for DST */
-} Tm_zone_t;
-
-typedef struct /* tm library readonly data */
-{
- char** format; /* default TM_* format strings */
- unsigned char* lex; /* format lex type classes */
- char* digit; /* output digits */
- short* days; /* days in month i */
- short* sum; /* days in months before i */
- Tm_leap_t* leap; /* leap second table */
- Tm_zone_t* zone; /* alternate timezone table */
-} Tm_data_t;
-
-typedef struct /* tm library global info */
-{
- char* deformat; /* TM_DEFAULT override */
- int flags; /* flags */
- char** format; /* current format strings */
- Tm_zone_t* date; /* timezone from last tmdate() */
- Tm_zone_t* local; /* local timezone */
- Tm_zone_t* zone; /* current timezone */
-} Tm_info_t;
-
-typedef struct Tm_s
-{
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- uint32_t tm_nsec;
- Tm_zone_t* tm_zone;
-} Tm_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Tm_data_t* _tm_datap_;
-extern __MANGLE__ Tm_info_t* _tm_infop_;
-
-#define tm_data (*_tm_datap_)
-#define tm_info (*_tm_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ time_t tmdate __PROTO__((const char*, char**, time_t*));
-extern __MANGLE__ int tmequiv __PROTO__((Tm_t*));
-extern __MANGLE__ Tm_t* tmfix __PROTO__((Tm_t*));
-extern __MANGLE__ char* tmfmt __PROTO__((char*, size_t, const char*, time_t*));
-extern __MANGLE__ char* tmform __PROTO__((char*, const char*, time_t*));
-extern __MANGLE__ int tmgoff __PROTO__((const char*, char**, int));
-extern __MANGLE__ void tminit __PROTO__((Tm_zone_t*));
-extern __MANGLE__ time_t tmleap __PROTO__((time_t*));
-extern __MANGLE__ int tmlex __PROTO__((const char*, char**, char**, int, char**, int));
-extern __MANGLE__ char** tmlocale __PROTO__((void));
-extern __MANGLE__ Tm_t* tmmake __PROTO__((time_t*));
-extern __MANGLE__ char* tmpoff __PROTO__((char*, size_t, const char*, int, int));
-extern __MANGLE__ time_t tmscan __PROTO__((const char*, char**, const char*, char**, time_t*, long));
-extern __MANGLE__ int tmsleep __PROTO__((time_t, time_t));
-extern __MANGLE__ time_t tmtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_zone_t* tmtype __PROTO__((const char*, char**));
-extern __MANGLE__ int tmweek __PROTO__((Tm_t*, int, int, int));
-extern __MANGLE__ int tmword __PROTO__((const char*, char**, const char*, char**, int));
-extern __MANGLE__ Tm_zone_t* tmzone __PROTO__((const char*, char**, const char*, int*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/tmx.h b/usr/src/lib/libast/sparc/include/ast/tmx.h
deleted file mode 100644
index 9287945351..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/tmx.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
-#ifndef _TMX_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TMX_H 1
-/*
- * AT&T Research
- *
- * high resolution Time_t support
- */
-
-#include <tm.h>
-#include <tv.h>
-
-#define TMX_MAXDATE "2554-07-21+23:34:33.709551614 UTC"
-#define TMX_MAXYEAR 2554
-#define TMX_MAXSEC ((Time_t)18446744073)
-#define TMX_MAXNSEC 709551614
-#define TMX_RESOLUTION 1000000000
-
-typedef uint64_t Time_t;
-typedef uint64_t Tmxsec_t;
-typedef uint32_t Tmxnsec_t;
-
-#define tmxsec(t) ((Tmxsec_t)((t)/1000000000))
-#define tmxnsec(t) ((Tmxnsec_t)((t)%1000000000))
-#define tmxsns(s,n) (((((Time_t)(s))*1000000000))+((Time_t)(n)))
-
-#define TMX_NOTIME ((Time_t)(-1))
-#define TMX_NOW tmxgettime()
-#define TMX_MAXTIME tmxsns(TMX_MAXSEC,TMX_MAXNSEC)
-
-#define tmx2tv(t,v) ((v)->tv_nsec=tmxnsec(t),(v)->tv_sec=tmxsec(t))
-#define tv2tmx(v) tmxsns((v)->tv_sec,(v)->tv_nsec)
-
-#define tmxclock(p) tmxsns(((p)?*(p):time(NiL)),0)
-
-#define tmxgetatime(s) tmxsns((s)->st_atime,ST_ATIME_NSEC_GET(s))
-#define tmxgetctime(s) tmxsns((s)->st_ctime,ST_CTIME_NSEC_GET(s))
-#define tmxgetmtime(s) tmxsns((s)->st_mtime,ST_MTIME_NSEC_GET(s))
-
-#define tmxsetatime(s,t) ((s)->st_atime=tmxsec(t),ST_ATIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Time_t tmxdate __PROTO__((const char*, char**, Time_t));
-extern __MANGLE__ Time_t tmxduration __PROTO__((const char*, char**));
-extern __MANGLE__ char* tmxfmt __PROTO__((char*, size_t, const char*, Time_t));
-extern __MANGLE__ Time_t tmxleap __PROTO__((Time_t));
-extern __MANGLE__ Tm_t* tmxmake __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxscan __PROTO__((const char*, char**, const char*, char**, Time_t, long));
-extern __MANGLE__ int tmxsleep __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_t* tmxtm __PROTO__((Tm_t*, Time_t, Tm_zone_t*));
-
-extern __MANGLE__ Time_t tmxgettime __PROTO__((void));
-extern __MANGLE__ int tmxsettime __PROTO__((Time_t));
-
-extern __MANGLE__ int tmxtouch __PROTO__((const char*, Time_t, Time_t, Time_t, int));
-
-extern __MANGLE__ char* fmttmx __PROTO__((const char*, Time_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/tok.h b/usr/src/lib/libast/sparc/include/ast/tok.h
deleted file mode 100644
index 5e07aa302d..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/tok.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * token stream interface definitions
- */
-
-#ifndef _TOK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TOK_H
-
-#include <ast.h>
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Sfio_t* tokline __PROTO__((const char*, int, int*));
-extern __MANGLE__ int tokscan __PROTO__((char*, char**, const char*, ...));
-extern __MANGLE__ char* tokopen __PROTO__((char*, int));
-extern __MANGLE__ void tokclose __PROTO__((char*));
-extern __MANGLE__ char* tokread __PROTO__((char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/tv.h b/usr/src/lib/libast/sparc/include/ast/tv.h
deleted file mode 100644
index 6ed915f2b1..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/tv.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
-#ifndef _TV_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TV_H 1
-/*
- * AT&T Research
- *
- * high resolution Tv_t interface definitions
- */
-
-#include <ast.h>
-
-#define TV_NSEC_IGNORE (1000000000L)
-#define TV_TOUCH_RETAIN ((Tv_t*)1)
-
-typedef struct Tv_s
-{
- uint32_t tv_sec;
- uint32_t tv_nsec;
-} Tv_t;
-
-#define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
-#define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
-#define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
-
-#define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
-#define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
-#define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
-
-#define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
-#define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
-#define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
-
-#define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
-#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
-#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int tvgettime __PROTO__((Tv_t*));
-extern __MANGLE__ int tvsettime __PROTO__((const Tv_t*));
-extern __MANGLE__ int tvcmp __PROTO__((const Tv_t*, const Tv_t*));
-extern __MANGLE__ int tvtouch __PROTO__((const char*, const Tv_t*, const Tv_t*, const Tv_t*, int));
-extern __MANGLE__ int tvsleep __PROTO__((const Tv_t*, Tv_t*));
-
-extern __MANGLE__ char* fmttv __PROTO__((const char*, Tv_t*));
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/usage.h b/usr/src/lib/libast/sparc/include/ast/usage.h
deleted file mode 100644
index 19d2b0fc14..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/usage.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * error catalog and usage defaults
- */
-
-#ifndef _USAGE_H
-#define _USAGE_H
-
-#ifndef ERROR_CATALOG
-#define ERROR_CATALOG 0
-#endif
-
-#ifndef USAGE_LICENSE
-#define USAGE_LICENSE "[-license?THIS IS AN UNLICENSED COPY]"
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/vdb.h b/usr/src/lib/libast/sparc/include/ast/vdb.h
deleted file mode 100644
index a44d0c6132..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/vdb.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * virtual db file directory entry constants
- */
-
-#ifndef VDB_MAGIC
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-
-#define VDB_MAGIC "vdb"
-
-#define VDB_DIRECTORY "DIRECTORY"
-#define VDB_UNION "UNION"
-#define VDB_DATE "DATE"
-#define VDB_MODE "MODE"
-
-#define VDB_DELIMITER ';'
-#define VDB_IGNORE '_'
-#define VDB_FIXED 10
-#define VDB_LENGTH ((int)sizeof(VDB_DIRECTORY)+2*(VDB_FIXED+1))
-#define VDB_OFFSET ((int)sizeof(VDB_DIRECTORY))
-#define VDB_SIZE (VDB_OFFSET+VDB_FIXED+1)
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/vecargs.h b/usr/src/lib/libast/sparc/include/ast/vecargs.h
deleted file mode 100644
index 900e13d8b0..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/vecargs.h
+++ /dev/null
@@ -1,56 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * vector argument interface definitions
- */
-
-#ifndef _VECARGS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _VECARGS_H
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int vecargs __PROTO__((char**, int*, char***));
-extern __MANGLE__ char** vecfile __PROTO__((const char*));
-extern __MANGLE__ void vecfree __PROTO__((char**, int));
-extern __MANGLE__ char** vecload __PROTO__((char*));
-extern __MANGLE__ char** vecstring __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/vmalloc.h b/usr/src/lib/libast/sparc/include/ast/vmalloc.h
deleted file mode 100644
index f13cc58879..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/vmalloc.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _VMALLOC_H
-#define _VMALLOC_H 1
-
-/* Public header file for the virtual malloc package.
-**
-** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
-*/
-
-#define VMALLOC_VERSION 20100101L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _vmalloc_s Vmalloc_t;
-typedef struct _vmstat_s Vmstat_t;
-typedef struct _vmdisc_s Vmdisc_t;
-typedef struct _vmethod_s Vmethod_t;
-typedef struct _vmdata_s Vmdata_t;
-typedef Void_t* (*Vmemory_f)_ARG_((Vmalloc_t*, Void_t*, size_t, size_t, Vmdisc_t*));
-typedef int (*Vmexcept_f)_ARG_((Vmalloc_t*, int, Void_t*, Vmdisc_t*));
-
-struct _vmstat_s
-{ int n_busy; /* number of busy blocks */
- int n_free; /* number of free blocks */
- size_t s_busy; /* total amount of busy space */
- size_t s_free; /* total amount of free space */
- size_t m_busy; /* largest busy piece */
- size_t m_free; /* largest free piece */
- int n_seg; /* number of segments */
- size_t extent; /* total size of region */
-};
-
-struct _vmdisc_s
-{ Vmemory_f memoryf; /* memory manipulator */
- Vmexcept_f exceptf; /* exception handler */
- size_t round; /* rounding requirement */
-};
-
-struct _vmethod_s
-{ Void_t* (*allocf)_ARG_((Vmalloc_t*,size_t));
- Void_t* (*resizef)_ARG_((Vmalloc_t*,Void_t*,size_t,int));
- int (*freef)_ARG_((Vmalloc_t*,Void_t*));
- long (*addrf)_ARG_((Vmalloc_t*,Void_t*));
- long (*sizef)_ARG_((Vmalloc_t*,Void_t*));
- int (*compactf)_ARG_((Vmalloc_t*));
- Void_t* (*alignf)_ARG_((Vmalloc_t*,size_t,size_t));
- unsigned short meth;
-};
-
-struct _vmalloc_s
-{ Vmethod_t meth; /* method for allocation */
- char* file; /* file name */
- int line; /* line number */
- Void_t* func; /* calling function */
- Vmdisc_t* disc; /* discipline to get space */
- Vmdata_t* data; /* the real region data */
- Vmalloc_t* next; /* linked list of regions */
-#ifdef _VM_PRIVATE_
- _VM_PRIVATE_
-#endif
-};
-
-#undef VM_FLAGS /* solaris sys kernel clash */
-
-#define VM_TRUST 0000001 /* forgo some security checks */
-#define VM_TRACE 0000002 /* generate trace */
-#define VM_DBCHECK 0000004 /* check for boundary overwrite */
-#define VM_DBABORT 0000010 /* abort on any warning */
-#define VM_FLAGS 0000017 /* user-settable flags */
-
-#define VM_MTBEST 0000100 /* Vmbest method */
-#define VM_MTPOOL 0000200 /* Vmpool method */
-#define VM_MTLAST 0000400 /* Vmlast method */
-#define VM_MTDEBUG 0001000 /* Vmdebug method */
-#define VM_MTPROFILE 0002000 /* Vmdebug method */
-#define VM_METHODS 0003700 /* available allocation methods */
-
-#define VM_RSCOPY 0000001 /* copy old contents */
-#define VM_RSMOVE 0000002 /* old contents is moveable */
-#define VM_RSZERO 0000004 /* clear new space */
-
-/* exception types */
-#define VM_OPEN 0 /* region being opened */
-#define VM_CLOSE 1 /* announce being closed */
-#define VM_NOMEM 2 /* can't obtain memory */
-#define VM_BADADDR 3 /* bad addr in vmfree/vmresize */
-#define VM_DISC 4 /* discipline being changed */
-#define VM_ALLOC 5 /* announcement from vmalloc() */
-#define VM_FREE 6 /* announcement from vmfree() */
-#define VM_RESIZE 7 /* announcement from vmresize() */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern extern __EXPORT__
-#endif
-#if !_BLD_vmalloc && defined(__IMPORT__)
-#define extern extern __IMPORT__
-#endif
-
-extern Vmethod_t* Vmbest; /* best allocation */
-extern Vmethod_t* Vmlast; /* last-block allocation */
-extern Vmethod_t* Vmpool; /* pool allocation */
-extern Vmethod_t* Vmdebug; /* allocation with debugging */
-extern Vmethod_t* Vmprofile; /* profiling memory usage */
-
-extern Vmdisc_t* Vmdcheap; /* heap discipline */
-extern Vmdisc_t* Vmdcsbrk; /* sbrk discipline */
-
-extern Vmalloc_t* Vmheap; /* heap region */
-extern Vmalloc_t* Vmregion; /* malloc region */
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Vmalloc_t* vmopen _ARG_(( Vmdisc_t*, Vmethod_t*, int ));
-extern int vmclose _ARG_(( Vmalloc_t* ));
-extern int vmclear _ARG_(( Vmalloc_t* ));
-extern int vmcompact _ARG_(( Vmalloc_t* ));
-
-extern Vmdisc_t* vmdisc _ARG_(( Vmalloc_t*, Vmdisc_t* ));
-
-extern Vmalloc_t* vmmopen _ARG_(( char*, Void_t*, size_t ));
-extern Void_t* vmmset _ARG_((Vmalloc_t*, int, Void_t*, int));
-
-extern Void_t* vmalloc _ARG_(( Vmalloc_t*, size_t ));
-extern Void_t* vmalign _ARG_(( Vmalloc_t*, size_t, size_t ));
-extern Void_t* vmresize _ARG_(( Vmalloc_t*, Void_t*, size_t, int ));
-extern Void_t* vmgetmem _ARG_(( Vmalloc_t*, Void_t*, size_t ));
-extern int vmfree _ARG_(( Vmalloc_t*, Void_t* ));
-
-extern long vmaddr _ARG_(( Vmalloc_t*, Void_t* ));
-extern long vmsize _ARG_(( Vmalloc_t*, Void_t* ));
-
-extern Vmalloc_t* vmregion _ARG_(( Void_t* ));
-extern Void_t* vmsegment _ARG_(( Vmalloc_t*, Void_t* ));
-extern int vmset _ARG_(( Vmalloc_t*, int, int ));
-
-extern Void_t* vmdbwatch _ARG_(( Void_t* ));
-extern int vmdbcheck _ARG_(( Vmalloc_t* ));
-extern int vmdebug _ARG_(( int ));
-
-extern int vmprofile _ARG_(( Vmalloc_t*, int ));
-
-extern int vmtrace _ARG_(( int ));
-extern int vmtrbusy _ARG_((Vmalloc_t*));
-
-extern int vmstat _ARG_((Vmalloc_t*, Vmstat_t*));
-
-extern int vmwalk _ARG_((Vmalloc_t*,
- int(*)(Vmalloc_t*,Void_t*,size_t,Vmdisc_t*,Void_t*),
- Void_t*));
-extern char* vmstrdup _ARG_((Vmalloc_t*, const char*));
-
-#if !defined(_BLD_vmalloc) && !defined(_AST_STD_H) && \
- !defined(__stdlib_h) && !defined(__STDLIB_H) && \
- !defined(_STDLIB_INCLUDED) && !defined(_INC_STDLIB)
-extern Void_t* malloc _ARG_(( size_t ));
-extern Void_t* realloc _ARG_(( Void_t*, size_t ));
-extern void free _ARG_(( Void_t* ));
-extern void cfree _ARG_(( Void_t* ));
-extern Void_t* calloc _ARG_(( size_t, size_t ));
-extern Void_t* memalign _ARG_(( size_t, size_t ));
-extern Void_t* valloc _ARG_(( size_t ));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* to coerce any value to a Vmalloc_t*, make ANSI happy */
-#define _VM_(vm) ((Vmalloc_t*)(vm))
-
-/* enable recording of where a call originates from */
-#ifdef VMFL
-
-#if defined(__FILE__)
-#define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__)
-#else
-#define _VMFILE_(vm) (_VM_(vm)->file = 0)
-#endif
-
-#if defined(__LINE__)
-#define _VMLINE_(vm) (_VM_(vm)->line = __LINE__)
-#else
-#define _VMLINE_(vm) (_VM_(vm)->line = 0)
-#endif
-
-#if defined(__FUNCTION__)
-#define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__)
-#else
-#define _VMFUNC_(vm) (_VM_(vm)->func = 0)
-#endif
-
-#define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm))
-
-#define vmalloc(vm,sz) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
-#define vmresize(vm,d,sz,type) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type)) )
-#define vmfree(vm,d) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d)) )
-#define vmalign(vm,sz,align) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.alignf))((vm),(sz),(align)) )
-
-#undef malloc
-#undef realloc
-#undef calloc
-#undef free
-#undef memalign
-#undef valloc
-
-#if _map_malloc
-
-#define malloc(s) (_VMFL_(Vmregion), _ast_malloc((size_t)(s)) )
-#define realloc(d,s) (_VMFL_(Vmregion), _ast_realloc((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) (_VMFL_(Vmregion), _ast_calloc((size_t)n, (size_t)(s)) )
-#define free(d) (_VMFL_(Vmregion), _ast_free((Void_t*)(d)) )
-#define memalign(a,s) (_VMFL_(Vmregion), _ast_memalign((size_t)(a),(size_t)(s)) )
-#define valloc(s) (_VMFL_(Vmregion), _ast_valloc((size_t)(s) )
-
-#else
-
-#if !_std_malloc
-
-#if __STD_C || defined(__STDPP__) || defined(__GNUC__)
-#define malloc(s) ( _VMFL_(Vmregion), (malloc)((size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), (realloc)((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), (calloc)((size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), (free)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), (memalign)((size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), (valloc)((size_t)(s)) )
-#ifndef strdup
-#define strdup(s) ( _VMFL_(Vmregion), (strdup)((char*)(s)) )
-#endif
-
-#else
-
-#define _VMNM_(a,b,c,d,e,f) a/**/b/**/c/**/d/**/e/**/f
-#define malloc(s) ( _VMFL_(Vmregion), _VMNM_(mallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), _VMNM_(reallo,/,*,*,/,c)\
- ( (Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), _VMNM_(callo,/,*,*,/,c)\
- ( (size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), _VMNM_(fre,/,*,*,/,e)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), _VMNM_(memalig,/,*,*,/,n)\
- ( (size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), _VMNM_(vallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#ifndef strdup
-#define strdup(s) ( _VMFL_(Vmregion), _VMNM_(strdu,/,*,*,/,p)\
- ((char*)(s)) )
-#endif
-
-#endif /*__STD_C || defined(__STDPP__) || defined(__GNUC__)*/
-
-#define cfree(d) free(d)
-
-#endif /* !_std_malloc */
-
-#endif /* _map_malloc */
-
-#endif /*VMFL*/
-
-/* non-debugging/profiling allocation calls */
-#ifndef vmalloc
-#define vmalloc(vm,sz) (*(_VM_(vm)->meth.allocf))((vm),(sz))
-#endif
-
-#ifndef vmresize
-#define vmresize(vm,d,sz,type) (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type))
-#endif
-
-#ifndef vmfree
-#define vmfree(vm,d) (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d))
-#endif
-
-#ifndef vmalign
-#define vmalign(vm,sz,align) (*(_VM_(vm)->meth.alignf))((vm),(sz),(align))
-#endif
-
-#define vmaddr(vm,addr) (*(_VM_(vm)->meth.addrf))((vm),(Void_t*)(addr))
-#define vmsize(vm,addr) (*(_VM_(vm)->meth.sizef))((vm),(Void_t*)(addr))
-#define vmcompact(vm) (*(_VM_(vm)->meth.compactf))((vm))
-#define vmoldof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
- (VM_RSMOVE) )
-#define vmnewof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
- (VM_RSMOVE|VM_RSCOPY|VM_RSZERO) )
-#define vmdata(vm) ((Void_t*)(_VM_(vm)->data))
-
-#endif /* _VMALLOC_H */
diff --git a/usr/src/lib/libast/sparc/include/ast/wait.h b/usr/src/lib/libast/sparc/include/ast/wait.h
deleted file mode 100644
index c4e3b8f2a0..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/wait.h
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * ast POSIX wait/exit support
- */
-
-#ifndef _WAIT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _WAIT_H
-
-#include <ast.h>
-#include <ast_wait.h>
-
-#if _sys_wait
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide wait waitpid
-#else
-#define wait ______wait
-#define waitpid ______waitpid
-#endif
-#include <sys/wait.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide wait waitpid
-#else
-#undef wait
-#undef waitpid
-#endif
-#endif
-
-#ifndef WNOHANG
-#define WNOHANG 1
-#endif
-
-#ifndef WUNTRACED
-#define WUNTRACED 2
-#endif
-
-#if !_ok_wif
-#undef WIFEXITED
-#undef WEXITSTATUS
-#undef WIFSIGNALED
-#undef WTERMSIG
-#undef WIFSTOPPED
-#undef WSTOPSIG
-#undef WTERMCORE
-#endif
-
-#ifndef WIFEXITED
-#define WIFEXITED(x) (!((x)&((1<<(EXIT_BITS-1))-1)))
-#endif
-
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(x) (((x)>>EXIT_BITS)&((1<<EXIT_BITS)-1))
-#endif
-
-#ifndef WIFSIGNALED
-#define WIFSIGNALED(x) (((x)&((1<<(EXIT_BITS-1))-1))!=0)
-#endif
-
-#ifndef WTERMSIG
-#define WTERMSIG(x) ((x)&((1<<(EXIT_BITS-1))-1))
-#endif
-
-#ifndef WIFSTOPPED
-#define WIFSTOPPED(x) (((x)&((1<<EXIT_BITS)-1))==((1<<(EXIT_BITS-1))-1))
-#endif
-
-#ifndef WSTOPSIG
-#define WSTOPSIG(x) WEXITSTATUS(x)
-#endif
-
-#ifndef WTERMCORE
-#define WTERMCORE(x) ((x)&(1<<(EXIT_BITS-1)))
-#endif
-
-extern __MANGLE__ pid_t wait __PROTO__((int*));
-extern __MANGLE__ pid_t waitpid __PROTO__((pid_t, int*, int));
-
-#endif
diff --git a/usr/src/lib/libast/sparc/include/ast/wchar.h b/usr/src/lib/libast/sparc/include/ast/wchar.h
deleted file mode 100644
index 43c5ef1e98..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/wchar.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_wchar.h>
diff --git a/usr/src/lib/libast/sparc/include/ast/wordexp.h b/usr/src/lib/libast/sparc/include/ast/wordexp.h
deleted file mode 100644
index af3169962b..0000000000
--- a/usr/src/lib/libast/sparc/include/ast/wordexp.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix wordexp interface definitions
- */
-
-#ifndef _WORDEXP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _WORDEXP_H
-
-#include <ast_common.h>
-
-#define WRDE_APPEND 01
-#define WRDE_DOOFFS 02
-#define WRDE_NOCMD 04
-#define WRDE_NOSYS 0100
-#define WRDE_REUSE 010
-#define WRDE_SHOWERR 020
-#define WRDE_UNDEF 040
-
-#define WRDE_BADCHAR 1
-#define WRDE_BADVAL 2
-#define WRDE_CMDSUB 3
-#define WRDE_NOSPACE 4
-#define WRDE_SYNTAX 5
-#define WRDE_NOSHELL 6
-
-typedef struct _wdarg
-{
- size_t we_wordc;
- char **we_wordv;
- size_t we_offs;
-} wordexp_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int wordexp __PROTO__((const char*, wordexp_t*, int));
-extern __MANGLE__ int wordfree __PROTO__((wordexp_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif /* _WORDEXP_H */
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/botch b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/botch
deleted file mode 100644
index 866d12a961..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/botch
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ccode b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ccode
deleted file mode 100644
index aedd14fe86..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ccode
+++ /dev/null
@@ -1,29 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
-#ifndef _def_ccode_ast
-#define _def_ccode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define CC_ASCII 1 /* ISO-8859-1 */
-#define CC_EBCDIC_E 2 /* Xopen dd(1) EBCDIC */
-#define CC_EBCDIC_I 3 /* Xopen dd(1) IBM */
-#define CC_EBCDIC_O 4 /* IBM-1047 mvs OpenEdition */
-#define CC_EBCDIC_S 5 /* Siemens posix-bc */
-#define CC_EBCDIC_H 6 /* IBM-37 AS/400 */
-#define CC_EBCDIC_M 7 /* IBM mvs cobol */
-#define CC_EBCDIC_U 8 /* microfocus cobol */
-
-#define CC_MAPS 8 /* number of code maps */
-
-#define CC_EBCDIC CC_EBCDIC_E
-#define CC_EBCDIC1 CC_EBCDIC_E
-#define CC_EBCDIC2 CC_EBCDIC_I
-#define CC_EBCDIC3 CC_EBCDIC_O
-
-#define CC_NATIVE CC_ASCII /* native character code */
-#define CC_ALIEN CC_EBCDIC /* alien character code */
-
-#define CC_bel 0007 /* bel character */
-#define CC_esc 0033 /* esc character */
-#define CC_sub 0032 /* sub character */
-#define CC_vt 0013 /* vt character */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/dirent b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/dirent
deleted file mode 100644
index f0d8b7dfb0..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/dirent
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
-#ifndef _def_dirent_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dirent_ast 1
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _nxt_dirent <../include/dirent.h> /* include path for the native <dirent.h> */
-#define _nxt_dirent_str "../include/dirent.h" /* include string for the native <dirent.h> */
-/*
- * <dirent.h> for [fl]stat64 and off64_t
- */
-
-#ifndef _AST_STD_H
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#else
-
-#ifndef _DIR64_H
-#define _DIR64_H
-
-#include <ast_std.h>
-
-#if _typ_off64_t
-#undef off_t
-#endif
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#if _typ_off64_t
-#define off_t off64_t
-#endif
-
-#if _lib_readdir64 && _typ_struct_dirent64
-#ifndef dirent
-#define dirent dirent64
-#endif
-#ifndef readdir
-#define readdir readdir64
-#endif
-#endif
-
-#endif
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/eaccess b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/eaccess
deleted file mode 100644
index 3dae8546af..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/eaccess
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/eaccess by iffe version 2009-12-04 : : */
-#ifndef _def_eaccess_ast
-#define _def_eaccess_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/hack b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/hack
deleted file mode 100644
index 8a76a23871..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/hack
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/hack by iffe version 2009-12-04 : : */
-#ifndef _def_hack_ast
-#define _def_hack_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/isoc99 b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/isoc99
deleted file mode 100644
index 56b53d6232..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/isoc99
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/isoc99 by iffe version 2009-12-04 : : */
-#ifndef _def_isoc99_ast
-#define _def_isoc99_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-/* _ISOC99_SOURCE plays nice */
-#ifndef _ISOC99_SOURCE
-#define _ISOC99_SOURCE 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/limits b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/limits
deleted file mode 100644
index c0f88cd5f3..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/limits
+++ /dev/null
@@ -1,107 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
-#ifndef _def_limits_ast
-#define _def_limits_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#ifndef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-#ifndef CHAR_MIN
-#define CHAR_MIN -128
-#endif
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1000000
-#endif
-#ifndef INT_MIN
-#define INT_MIN -2147483648
-#endif
-#ifndef LLONG_MAX
-#define LLONG_MAX 9223372036854775807
-#endif
-#ifndef LLONG_MIN
-#define LLONG_MIN -9223372036854775808
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN -2147483648
-#endif
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 5
-#endif
-#ifndef OPEN_MAX_CEIL
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-#define OPEN_MAX_CEIL OPEN_MAX
-#endif
-#ifndef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 4096
-#endif
-#ifndef PTRDIFF_MAX
-#define PTRDIFF_MAX 2147483647
-#endif
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN -2147483648
-#endif
-#ifndef SCHAR_MAX
-#define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-#define SCHAR_MIN -128
-#endif
-#ifndef SHRT_MIN
-#define SHRT_MIN -32768
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX 2147483647
-#endif
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN -2147483648
-#endif
-#ifndef SIZE_MAX
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295
-#endif
-#define SIZE_MAX UINT_MAX
-#endif
-#ifndef SSIZE_MAX
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-#define SSIZE_MAX INT_MAX
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#ifndef ULLONG_MAX
-#define ULLONG_MAX 18446744073709551615
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX 4294967295
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX 65535
-#endif
-#ifndef WCHAR_MAX
-#define WCHAR_MAX 2147483647
-#endif
-#ifndef WCHAR_MIN
-#define WCHAR_MIN -2147483648
-#endif
-#ifndef WINT_MAX
-#define WINT_MAX 2147483647
-#endif
-#ifndef WINT_MIN
-#define WINT_MIN -2147483648
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mmap b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mmap
deleted file mode 100644
index d74f1a3d13..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mmap
+++ /dev/null
@@ -1,27 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
-#ifndef _def_mmap_ast
-#define _def_mmap_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_mmap 1 /* standard mmap interface that works */
-#define _lib_mmap64 1 /* mmap64 interface and implementation work */
-#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
-#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
-
-/* some systems get it wrong but escape concise detection */
-#ifndef _NO_MMAP
-#if __CYGWIN__
-#define _NO_MMAP 1
-#endif
-#endif
-
-#if _NO_MMAP
-#undef _lib_mmap
-#undef _lib_mmap64
-#undef _mmap_anon
-#undef _mmap_devzero
-#undef _mmap_worthy
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mode b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mode
deleted file mode 100644
index 0037c2c82f..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mode
+++ /dev/null
@@ -1,14 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
-#ifndef _def_mode_ast
-#define _def_mode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define S_ITYPE(m) ((m)&S_IFMT)
-
-#define S_IPERM (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-
-#define _S_IDPERM 1
-#define _S_IDTYPE 1
-
-#define BUFFERSIZE 8192
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ndbm b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ndbm
deleted file mode 100644
index cfbe9ab040..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/ndbm
+++ /dev/null
@@ -1,9 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
-#ifndef _def_ndbm_ast
-#define _def_ndbm_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_ndbm 1 /* #include <ndbm.h> ok */
-#include <ndbm.h>
-#define _use_ndbm 1
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/nl_types b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/nl_types
deleted file mode 100644
index 8e51cb12d2..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/nl_types
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
-#ifndef _def_nl_types_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_nl_types_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_nl_langinfo 1 /* nl_langinfo() in default lib(s) */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_langinfo 1 /* #include <langinfo.h> ok */
-#define _nxt_nl_types <../include/nl_types.h> /* include path for the native <nl_types.h> */
-#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native <nl_types.h> */
-#include <limits.h>
-#include <../include/nl_types.h> /* the native nl_types.h */
-
-#undef NL_SETMAX
-#define NL_SETMAX 1023
-#undef NL_MSGMAX
-#define NL_MSGMAX 32767
-#undef nl_catd
-#define nl_catd _ast_nl_catd
-#undef catopen
-#define catopen _ast_catopen
-#undef catgets
-#define catgets _ast_catgets
-#undef catclose
-#define catclose _ast_catclose
-
-typedef __V_* nl_catd;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ nl_catd catopen __PROTO__((const char*, int));
-extern __MANGLE__ char* catgets __PROTO__((nl_catd, int, int, const char*));
-extern __MANGLE__ int catclose __PROTO__((nl_catd));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/omitted b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/omitted
deleted file mode 100644
index ba1ba1aaaa..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/omitted
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/omitted by iffe version 2009-12-04 : : */
-#ifndef _def_omitted_ast
-#define _def_omitted_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/options b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/options
deleted file mode 100644
index 0255d138a6..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/options
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/options by iffe version 2009-12-04 : : */
-#ifndef _def_options_ast
-#define _def_options_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/param b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/param
deleted file mode 100644
index 868aaf6b44..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/param
+++ /dev/null
@@ -1,9 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
-#ifndef _def_param_ast
-#define _def_param_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#include <sys/param.h>
-#ifndef S_IFDIR
-#include <sys/stat.h>
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/preroot b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/preroot
deleted file mode 100644
index 001d3c0fd2..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/preroot
+++ /dev/null
@@ -1,6 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sig b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sig
deleted file mode 100644
index 07c291565c..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/sig
+++ /dev/null
@@ -1,138 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
-#ifndef _def_sig_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_sig_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define sig_info _sig_info_
-
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide kill killpg
-#else
-#define kill ______kill
-#define killpg ______killpg
-#endif
-#include <signal.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide kill killpg
-#else
-#undef kill
-#undef killpg
-#endif
-#ifndef sigmask
-#define sigmask(s) (1<<((s)-1))
-#endif
-typedef void (*Sig_handler_t) __PROTO__((int));
-
-
-#define Handler_t Sig_handler_t
-
-#define SIG_REG_PENDING (-1)
-#define SIG_REG_POP 0
-#define SIG_REG_EXEC 00001
-#define SIG_REG_PROC 00002
-#define SIG_REG_TERM 00004
-#define SIG_REG_ALL 00777
-#define SIG_REG_SET 01000
-
-typedef struct
-{
- char** name;
- char** text;
- int sigmax;
-} Sig_info_t;
-
-extern __MANGLE__ int kill __PROTO__((pid_t, int));
-extern __MANGLE__ int killpg __PROTO__((pid_t, int));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sig_info_t sig_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _lib_sigflag && _npt_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-extern __MANGLE__ int sigcritical __PROTO__((int));
-extern __MANGLE__ int sigunblock __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/standards b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/standards
deleted file mode 100644
index 4121a87ab4..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/standards
+++ /dev/null
@@ -1,10 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/time b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/time
deleted file mode 100644
index 4bcafd05c0..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/time
+++ /dev/null
@@ -1,83 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
-#ifndef _def_time_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_time_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */
-#define _lib_usleep 1 /* usleep() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#include <sys/time.h>
-
-#include <sys/times.h>
-
-#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
-#define CLOCKS_PER_SEC CLK_TCK
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmx b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmx
deleted file mode 100644
index a3e19d83fb..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tmx
+++ /dev/null
@@ -1,130 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
-#ifndef _TMX_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TMX_H 1
-/*
- * AT&T Research
- *
- * high resolution Time_t support
- */
-
-#include <tm.h>
-#include <tv.h>
-
-#define TMX_MAXDATE "2554-07-21+23:34:33.709551614 UTC"
-#define TMX_MAXYEAR 2554
-#define TMX_MAXSEC ((Time_t)18446744073)
-#define TMX_MAXNSEC 709551614
-#define TMX_RESOLUTION 1000000000
-
-typedef uint64_t Time_t;
-typedef uint64_t Tmxsec_t;
-typedef uint32_t Tmxnsec_t;
-
-#define tmxsec(t) ((Tmxsec_t)((t)/1000000000))
-#define tmxnsec(t) ((Tmxnsec_t)((t)%1000000000))
-#define tmxsns(s,n) (((((Time_t)(s))*1000000000))+((Time_t)(n)))
-
-#define TMX_NOTIME ((Time_t)(-1))
-#define TMX_NOW tmxgettime()
-#define TMX_MAXTIME tmxsns(TMX_MAXSEC,TMX_MAXNSEC)
-
-#define tmx2tv(t,v) ((v)->tv_nsec=tmxnsec(t),(v)->tv_sec=tmxsec(t))
-#define tv2tmx(v) tmxsns((v)->tv_sec,(v)->tv_nsec)
-
-#define tmxclock(p) tmxsns(((p)?*(p):time(NiL)),0)
-
-#define tmxgetatime(s) tmxsns((s)->st_atime,ST_ATIME_NSEC_GET(s))
-#define tmxgetctime(s) tmxsns((s)->st_ctime,ST_CTIME_NSEC_GET(s))
-#define tmxgetmtime(s) tmxsns((s)->st_mtime,ST_MTIME_NSEC_GET(s))
-
-#define tmxsetatime(s,t) ((s)->st_atime=tmxsec(t),ST_ATIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Time_t tmxdate __PROTO__((const char*, char**, Time_t));
-extern __MANGLE__ Time_t tmxduration __PROTO__((const char*, char**));
-extern __MANGLE__ char* tmxfmt __PROTO__((char*, size_t, const char*, Time_t));
-extern __MANGLE__ Time_t tmxleap __PROTO__((Time_t));
-extern __MANGLE__ Tm_t* tmxmake __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxscan __PROTO__((const char*, char**, const char*, char**, Time_t, long));
-extern __MANGLE__ int tmxsleep __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_t* tmxtm __PROTO__((Tm_t*, Time_t, Tm_zone_t*));
-
-extern __MANGLE__ Time_t tmxgettime __PROTO__((void));
-extern __MANGLE__ int tmxsettime __PROTO__((Time_t));
-
-extern __MANGLE__ int tmxtouch __PROTO__((const char*, Time_t, Time_t, Time_t, int));
-
-extern __MANGLE__ char* fmttmx __PROTO__((const char*, Time_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tty b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tty
deleted file mode 100644
index d67cc25293..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tty
+++ /dev/null
@@ -1,134 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
-#ifndef _def_tty_ast
-#define _def_tty_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_termios 1 /* #include <termios.h> ok */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
-
-#ifdef _hdr_termios
-# if _mac__POSIX_VDISABLE
-# undef _POSIX_VDISABLE
-# endif
-# include <termios.h>
-#else
-# if defined(_sys_termios) && defined(_lib_tcgetattr)
-# include <sys/termios.h>
-# define _hdr_termios 1
-# else
-# undef _sys_termios
-# endif /* _sys_termios */
-#endif /* _hdr_termios */
-
-#ifdef _hdr_termios
-# undef _hdr_sgtty
-# undef tcgetattr
-# undef tcsetattr
-# undef tcgetpgrp
-# undef tcsetpgrp
-# undef cfgetospeed
-# ifndef TCSANOW
-# define TCSANOW TCSETS
-# define TCSADRAIN TCSETSW
-# define TCSAFLUSH TCSETSF
-# endif /* TCSANOW */
- /* The following corrects bugs in some implementations */
-# if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
-# define TCSAFLUSH TCSADFLUSH
-# endif /* TCSADFLUSH */
-# ifndef _lib_tcgetattr
-# undef tcgetattr
-# define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
-# undef tcsetattr
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# undef cfgetospeed
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# endif /* _lib_tcgetattr */
-# undef TIOCGETC
-#else
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# ifdef _hdr_termio
-# include <termio.h>
-# else
-# ifdef _sys_termio
-# include <sys/termio.h>
-# define _hdr_termio 1
-# endif /* _sys_termio */
-# endif /* _hdr_termio */
-# ifdef _hdr_termio
-# define termios termio
-# undef TIOCGETC
-# define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-
-# ifdef _sys_bsdtty
-# include <sys/bsdtty.h>
-# endif /* _sys_bsdtty */
-# else
-# ifdef _hdr_sgtty
-# include <sgtty.h>
-# ifndef LPENDIN
-# ifdef _sys_nttyio
-# include <sys/nttyio.h>
-# endif /* _sys_nttyio */
-# endif /* LPENDIN */
-# define termios sgttyb
-# ifdef TIOCSETN
-# undef TCSETAW
-# endif /* TIOCSETN */
-# ifdef TIOCGETP
-# define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# else
-# define tcgetattr(fd,tty) gtty(fd, tty)
-# define tcsetattr(fd,action,tty) stty(fd, tty)
-# endif /* TIOCGETP */
-# else
-# ifdef _sys_ttyio
-# include <sys/ttyio.h>
-# endif
-# endif /* _hdr_sgtty */
-# endif /* hdr_termio */
-
-# ifndef TCSANOW
-# ifdef TCSETAW
-# define TCSANOW TCSETA
-# define TCSAFLUSH TCSETAF
-# else
-# ifdef TIOCSETN
-# define TCSANOW TIOCSETN
-# define TCSADRAIN TIOCSETN
-# define TCSAFLUSH TIOCSETP
-# endif /* TIOCSETN */
-# endif /* TCSETAW */
-# endif /* TCSANOW */
-#endif /* _hdr_termios */
-
-/* set ECHOCTL if driver can echo control charaters as ^c */
-#ifdef LCTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LCTLECH
-# endif /* !ECHOCTL */
-#endif /* LCTLECH */
-#ifdef LNEW_CTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LNEW_CTLECH
-# endif /* !ECHOCTL */
-#endif /* LNEW_CTLECH */
-#ifdef LNEW_PENDIN
-# ifndef PENDIN
-# define PENDIN LNEW_PENDIN
-# endif /* !PENDIN */
-#endif /* LNEW_PENDIN */
-
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tv b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tv
deleted file mode 100644
index 9e59290657..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/tv
+++ /dev/null
@@ -1,111 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
-#ifndef _TV_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TV_H 1
-/*
- * AT&T Research
- *
- * high resolution Tv_t interface definitions
- */
-
-#include <ast.h>
-
-#define TV_NSEC_IGNORE (1000000000L)
-#define TV_TOUCH_RETAIN ((Tv_t*)1)
-
-typedef struct Tv_s
-{
- uint32_t tv_sec;
- uint32_t tv_nsec;
-} Tv_t;
-
-#define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
-#define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
-#define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
-
-#define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
-#define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
-#define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
-
-#define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
-#define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
-#define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
-
-#define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
-#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
-#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int tvgettime __PROTO__((Tv_t*));
-extern __MANGLE__ int tvsettime __PROTO__((const Tv_t*));
-extern __MANGLE__ int tvcmp __PROTO__((const Tv_t*, const Tv_t*));
-extern __MANGLE__ int tvtouch __PROTO__((const char*, const Tv_t*, const Tv_t*, const Tv_t*, int));
-extern __MANGLE__ int tvsleep __PROTO__((const Tv_t*, Tv_t*));
-
-extern __MANGLE__ char* fmttv __PROTO__((const char*, Tv_t*));
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/uwin b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/uwin
deleted file mode 100644
index 1ca4ebb903..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/uwin
+++ /dev/null
@@ -1,17 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/uwin by iffe version 2009-12-04 : : */
-#ifndef _def_uwin_ast
-#define _def_uwin_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_a64l 1 /* a64l() in default lib(s) */
-#define _lib_crypt 1 /* crypt() in default lib(s) */
-#define _lib_getpass 1 /* getpass() in default lib(s) */
-#define _lib_random 1 /* random() in default lib(s) */
-#define _lib_rcmd 1 /* rcmd() in default lib(s) */
-#define _lib_srand48 1 /* srand48() in default lib(s) */
-#define _lib_logb 1 /* logb() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_scalb 1 /* scalb() in default lib(s) */
-#define _lib__finite 1 /* _finite() in default lib(s) */
-#define _lib__scalb 1 /* _scalb() in default lib(s) */
-#define _dat__iob 1 /* _iob in default lib(s) */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vfork b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vfork
deleted file mode 100644
index ea9446da11..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/vfork
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
-#ifndef _def_vfork_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_vfork_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wait b/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wait
deleted file mode 100644
index cd24b64d92..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/FEATURE/wait
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
-#ifndef _def_wait_ast
-#define _def_wait_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_wait 1 /* wait() in default lib(s) */
-#define _lib_wait3 1 /* wait3() in default lib(s) */
-#define _lib_wait4 1 /* wait4() in default lib(s) */
-#define _lib_waitpid 1 /* waitpid() in default lib(s) */
-#define _sys_wait 1 /* #include <sys/wait.h> ok */
-#define _ok_wif 1 /* posix wait macros ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/align.h b/usr/src/lib/libast/sparc/src/lib/libast/align.h
deleted file mode 100644
index 36b279e5aa..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/align.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
-#ifndef _def_align_ast
-#define _def_align_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
-
-#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
-#define ALIGN_POINTER(x) ((char*)(x))
-#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
-
-#define ALIGN_BOUND ALIGN_BOUND2
-#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
-
-#define ALIGN_BIT1 0x1
-#define ALIGN_BOUND1 ALIGN_BOUND2
-#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
-#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffe)
-#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
-#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
-
-#define ALIGN_BIT2 0x2
-#define ALIGN_BOUND2 8
-#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+7)
-#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffff8)
-#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffd)
-#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
-#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_botch.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_botch.h
deleted file mode 100644
index 866d12a961..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_botch.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_ccode.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_ccode.h
deleted file mode 100644
index aedd14fe86..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_ccode.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
-#ifndef _def_ccode_ast
-#define _def_ccode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define CC_ASCII 1 /* ISO-8859-1 */
-#define CC_EBCDIC_E 2 /* Xopen dd(1) EBCDIC */
-#define CC_EBCDIC_I 3 /* Xopen dd(1) IBM */
-#define CC_EBCDIC_O 4 /* IBM-1047 mvs OpenEdition */
-#define CC_EBCDIC_S 5 /* Siemens posix-bc */
-#define CC_EBCDIC_H 6 /* IBM-37 AS/400 */
-#define CC_EBCDIC_M 7 /* IBM mvs cobol */
-#define CC_EBCDIC_U 8 /* microfocus cobol */
-
-#define CC_MAPS 8 /* number of code maps */
-
-#define CC_EBCDIC CC_EBCDIC_E
-#define CC_EBCDIC1 CC_EBCDIC_E
-#define CC_EBCDIC2 CC_EBCDIC_I
-#define CC_EBCDIC3 CC_EBCDIC_O
-
-#define CC_NATIVE CC_ASCII /* native character code */
-#define CC_ALIEN CC_EBCDIC /* alien character code */
-
-#define CC_bel 0007 /* bel character */
-#define CC_esc 0033 /* esc character */
-#define CC_sub 0032 /* sub character */
-#define CC_vt 0013 /* vt character */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_common.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_common.h
deleted file mode 100644
index b5fab1088b..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_common.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
-#ifndef _AST_COMMON_H
-#define _AST_COMMON_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_pthread 1 /* #include <pthread.h> ok */
-#define _hdr_stdarg 1 /* #include <stdarg.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdint 1 /* #include <stdint.h> ok */
-#define _hdr_inttypes 1 /* #include <inttypes.h> ok */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_long_double 1 /* long double is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _std_proto 1 /* standard C prototypes ok */
-#define _ptr_void 1 /* standard C void* ok */
-/* disable non-standard linux/gnu inlines */
-#ifdef __GNUC__
-# undef __OPTIMIZE_SIZE__
-# define __OPTIMIZE_SIZE__ 1
-#endif
-
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && __STDC__
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && (__cplusplus || c_plusplus)
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && _std_proto
-# define __STD_C 1
-#endif
-#if !defined(__STD_C)
-# define __STD_C 0
-#endif
-
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-# if __cplusplus || c_plusplus
-# define _BEGIN_EXTERNS_ extern "C" {
-# define _END_EXTERNS_ }
-# else
-# define _BEGIN_EXTERNS_
-# define _END_EXTERNS_
-# endif
-#endif
-
-/* _ARG_ simplifies function prototyping among flavors of C */
-#ifndef _ARG_
-# if __STD_C
-# define _ARG_(x) x
-# else
-# define _ARG_(x) ()
-# endif
-#endif
-
-/* _NIL_ simplifies defining nil pointers to a given type */
-#ifndef _NIL_
-# define _NIL_(x) ((x)0)
-#endif
-
-/* __INLINE__ is the inline keyword */
-#if !defined(__INLINE__) && defined(__cplusplus)
-# define __INLINE__ inline
-#endif
-#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-#endif
-
-/* Void_t is defined so that Void_t* can address any type */
-#ifndef Void_t
-# if __STD_C
-# define Void_t void
-# else
-# define Void_t char
-# endif
-#endif
-
-/* windows variants and veneers */
-#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
-# define _WINIX 1
-#endif
-
-/* dynamic linked library external scope handling */
-#ifdef __DYNAMIC__
-# undef __DYNAMIC__
-# ifndef _DLL
-# define _DLL 1
-# endif
-#endif
-#if _dll_import
-# if _BLD_STATIC && !_BLD_DLL
-# undef _DLL
-# else
-# if !_UWIN && !defined(_DLL)
-# define _DLL 1
-# endif
-# endif
-# if !defined(__EXPORT__) && _BLD_DLL
-# define __EXPORT__ __declspec(dllexport)
-# endif
-# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
-# define __IMPORT__ __declspec(dllimport)
-# endif
-# if _BLD_DLL && _UWIN
-# define __DYNAMIC__(v) (_ast_getdll()->_ast_ ## v)
-# endif
-#endif
-#if !defined(_astimport)
-# if defined(__IMPORT__) && defined(_DLL)
-# define _astimport __IMPORT__
-# else
-# define _astimport extern
-# endif
-#endif
-#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
-# ifdef __STDC__
-# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
-# else
-# define __EXTERN__(T,obj) extern T obj; T* _imp__/**/obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__/**/obj = &obj
-# endif
-#else
-# define __EXTERN__(T,obj) extern T obj
-# define __DEFINE__(T,obj,val) T obj = val
-#endif
-
-#define _ast_LL 1 /* LL numeric suffix supported */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intswap 0
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt16_t long double
-#define _ast_fltmax_t _ast_flt16_t
-#define _typ_int8_t 1 /* int8_t is a type */
-#define _typ_uint8_t 1 /* uint8_t is a type */
-#define _typ_int16_t 1 /* int16_t is a type */
-#define _typ_uint16_t 1 /* uint16_t is a type */
-#define _typ_int32_t 1 /* int32_t is a type */
-#define _typ_uint32_t 1 /* uint32_t is a type */
-#define _typ_int64_t 1 /* int64_t is a type */
-#define _typ_uint64_t 1 /* uint64_t is a type */
-#define _typ_intmax_t 1 /* intmax_t is a type */
-#define _typ_uintmax_t 1 /* uintmax_t is a type */
-
-#ifndef va_listref
-#ifndef va_start
-#if __STD_C
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-#define va_listref(p) (p) /* pass va_list to varargs function */
-#define va_listval(p) (p) /* retrieve va_list from va_arg(ap,va_listarg) */
-#define va_listarg va_list /* va_arg() va_list type */
-#endif
-#ifndef _AST_STD_H
-# if __STD_C && _hdr_stddef
-# include <stddef.h>
-# endif
-# if _sys_types
-# include <sys/types.h>
-# endif
-# if _hdr_stdint
-# include <stdint.h>
-# else
-# if _hdr_inttypes
-# include <inttypes.h>
-# endif
-# endif
-#endif
-#if !_typ_size_t
-# define _typ_size_t 1
- typedef int size_t;
-#endif
-#if !_typ_ssize_t
-# define _typ_ssize_t 1
- typedef int ssize_t;
-#endif
-#ifndef _AST_STD_H
-# if !_def_map_ast
-# include <ast_map.h>
-# endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_dirent.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_dirent.h
deleted file mode 100644
index f0d8b7dfb0..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_dirent.h
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
-#ifndef _def_dirent_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dirent_ast 1
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _nxt_dirent <../include/dirent.h> /* include path for the native <dirent.h> */
-#define _nxt_dirent_str "../include/dirent.h" /* include string for the native <dirent.h> */
-/*
- * <dirent.h> for [fl]stat64 and off64_t
- */
-
-#ifndef _AST_STD_H
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#else
-
-#ifndef _DIR64_H
-#define _DIR64_H
-
-#include <ast_std.h>
-
-#if _typ_off64_t
-#undef off_t
-#endif
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#if _typ_off64_t
-#define off_t off64_t
-#endif
-
-#if _lib_readdir64 && _typ_struct_dirent64
-#ifndef dirent
-#define dirent dirent64
-#endif
-#ifndef readdir
-#define readdir readdir64
-#endif
-#endif
-
-#endif
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_fcntl.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_fcntl.h
deleted file mode 100644
index ed6d4d0237..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_fcntl.h
+++ /dev/null
@@ -1,114 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
-#ifndef _def_fcntl_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fcntl_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <ast_fs.h>
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#define O_BINARY 0
-#define O_TEMPORARY 0
-#define O_TEXT 0
-
-#include <ast_fs.h>
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_fstat64
-#define fstat fstat64
-#endif
-#if _lib_lstat64
-#define lstat lstat64
-#endif
-#if _lib_stat64
-#define stat stat64
-#endif
-#if _lib_creat64
-#define creat creat64
-#endif
-#if _lib_mmap64
-#define mmap mmap64
-#endif
-#if _lib_open64
-#undef open
-#define open open64
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_float.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_float.h
deleted file mode 100644
index 9500cc2eaf..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_float.h
+++ /dev/null
@@ -1,216 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
-#ifndef _def_float_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_float_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_float 1 /* #include <float.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_math 1 /* #include <math.h> ok */
-#define _hdr_values 1 /* #include <values.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
-#define _lib_frexp 1 /* frexp() in default lib(s) */
-#define _lib_frexpl 1 /* frexpl() in default lib(s) */
-#define _lib_ldexp 1 /* ldexp() in default lib(s) */
-#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
-#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
-#define _lib_copysign 1 /* copysign() in default lib(s) */
-#define _lib_copysignl 1 /* copysignl() in default lib(s) */
-#include <ast_common.h>
-#include <float.h>
-#include <math.h>
-#ifndef FLT_DIG
-#define FLT_DIG 6
-#endif
-#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
-#endif
-#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
-#endif
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
-#endif
-#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
-#endif
-#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
-#endif
-#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
-#endif
-#ifndef DBL_DIG
-#define DBL_DIG 15
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
-#endif
-#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
-#endif
-#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
-#endif
-#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
-#endif
-#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
-#endif
-#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
-#endif
-#ifndef LDBL_DIG
-#define LDBL_DIG 33
-#endif
-#ifndef LDBL_MAX
-#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
-#endif
-#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
-#endif
-#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
-#endif
-#ifndef LDBL_MIN
-#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
-#endif
-#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
-#endif
-#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
-#endif
-
-
-#define USHRT_DIG 4
-#define UINT_DIG 9
-#define ULONG_DIG 9
-#define ULLONG_DIG 19
-#define UINTMAX_DIG ULLONG_DIG
-
-#define FLT_ULONG_MAX 4294967295.0F
-#define FLT_ULLONG_MAX 18446744073709551615.0F
-#define FLT_UINTMAX_MAX FLT_ULLONG_MAX
-#define FLT_LONG_MAX 2147483647.0F
-#define FLT_LLONG_MAX 9223372036854775807.0F
-#define FLT_INTMAX_MAX FLT_LLONG_MAX
-#define FLT_LONG_MIN (-2147483648.0F)
-#define FLT_LLONG_MIN (-9223372036854775808.0F)
-#define FLT_INTMAX_MIN FLT_LLONG_MIN
-
-#define DBL_ULONG_MAX 4294967295.0
-#define DBL_ULLONG_MAX 18446744073709551615.0
-#define DBL_UINTMAX_MAX DBL_ULLONG_MAX
-#define DBL_LONG_MAX 2147483647.0
-#define DBL_LLONG_MAX 9223372036854775807.0
-#define DBL_INTMAX_MAX DBL_LLONG_MAX
-#define DBL_LONG_MIN (-2147483648.0)
-#define DBL_LLONG_MIN (-9223372036854775808.0)
-#define DBL_INTMAX_MIN DBL_LLONG_MIN
-
-#define LDBL_ULONG_MAX 4294967295.0L
-#define LDBL_ULLONG_MAX 18446744073709551615.0L
-#define LDBL_UINTMAX_MAX LDBL_ULLONG_MAX
-#define LDBL_LONG_MAX 2147483647.0L
-#define LDBL_LLONG_MAX 9223372036854775807.0L
-#define LDBL_INTMAX_MAX LDBL_LLONG_MAX
-#define LDBL_LONG_MIN (-2147483648.0L)
-#define LDBL_LLONG_MIN (-9223372036854775808.0L)
-#define LDBL_INTMAX_MIN LDBL_LLONG_MIN
-
-#define FLTMAX_UINTMAX_MAX LDBL_UINTMAX_MAX
-#define FLTMAX_INTMAX_MAX LDBL_INTMAX_MAX
-#define FLTMAX_INTMAX_MIN LDBL_INTMAX_MIN
-
-typedef union _ast_dbl_exp_u
-{
- uint32_t e[sizeof(double)/4];
- double f;
-} _ast_dbl_exp_t;
-
-#define _ast_dbl_exp_index 0
-#define _ast_dbl_exp_shift 20
-
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 0
-#define _ast_fltmax_exp_shift 16
-
-#define _ast_flt_unsigned_max_t unsigned long long
-#define _ast_flt_nan_init 0x7f,0xff,0xff,0xff
-#define _ast_flt_inf_init 0x7f,0x80,0x00,0x00
-#define _ast_dbl_nan_init 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff
-#define _ast_dbl_inf_init 0x7f,0xf0,0x00,0x00,0x00,0x00,0x00,0x00
-#define _ast_ldbl_nan_init 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
-#define _ast_ldbl_inf_init 0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_fs.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_fs.h
deleted file mode 100644
index 31611c188e..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_fs.h
+++ /dev/null
@@ -1,143 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
-#ifndef _def_fs_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fs_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _lib_lstat 1 /* lstat() in default lib(s) */
-#define _lib_mknod 1 /* mknod() in default lib(s) */
-#define _lib_sync 1 /* sync() in default lib(s) */
-#include <sys/stat.h>
-#include <sys/mkdev.h>
-#define FS_default "ufs"
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
-#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
-#define _sys_mount 1 /* #include <sys/mount.h> ok */
-#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
-#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
-#define _sys_vfs 1 /* #include <sys/vfs.h> ok */
-#define _mem_st_blocks_stat 1 /* st_blocks is a member of struct stat */
-#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
-#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
-#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
-#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
-#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
-#define _lib_getmntent 1 /* getmntent() in default lib(s) */
-#define _lib_statfs 1 /* statfs() in default lib(s) */
-#define _lib_statvfs 1 /* statvfs() in default lib(s) */
-#define _lib_statfs4 1 /* compile{\ passed */
-#if _sys_statvfs
-#include <sys/statvfs.h>
-#if !_mem_statvfs_f_basetype
-#if _ary_f_reserved7
-#define f_basetype f_reserved7
-#endif
-#endif
-#else
-#define _mem_f_basetype_statvfs 1
-#define _mem_f_frsize_statvfs 1
-struct statvfs
-{
-unsigned long f_bsize; /* fundamental file system block size */
-unsigned long f_frsize; /* fragment size */
-unsigned long f_blocks; /* total # of blocks of f_frsize on fs */
-unsigned long f_bfree; /* total # of free blocks of f_frsize */
-unsigned long f_bavail; /* # of free blocks avail to non-superuser */
-unsigned long f_files; /* total # of file nodes (inodes) */
-unsigned long f_ffree; /* total # of free file nodes */
-unsigned long f_favail; /* # of free nodes avail to non-superuser */
-unsigned long f_fsid; /* file system id (dev for now) */
-char f_basetype[16]; /* target fs type name, null-terminated */
-unsigned long f_flag; /* bit-mask of flags */
-unsigned long f_namemax; /* maximum file name length */
-char f_fstr[32]; /* filesystem-specific string */
-unsigned long f_filler[16]; /* reserved for future expansion */
-};
-extern __MANGLE__ int fstatvfs __PROTO__((int, struct statvfs*));
-extern __MANGLE__ int statvfs __PROTO__((const char*, struct statvfs*));
-#endif
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_statvfs64 && !defined(statvfs)
-#define statvfs statvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int statvfs64 __PROTO__((const char*, struct statvfs64*));
-#endif
-#endif
-#if _lib_fstatvfs64 && !defined(fstatvfs)
-#define fstatvfs fstatvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int fstatvfs64 __PROTO__((int, struct statvfs64*));
-#endif
-#endif
-
-#define _str_st_fstype 1 /* stat.st_fstype is a string */
-#define _ary_st_pad4 1 /* stat.st_pad4 is an array */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_iconv.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_iconv.h
deleted file mode 100644
index 29a13b5a0d..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_iconv.h
+++ /dev/null
@@ -1,132 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
-#ifndef _def_iconv_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_iconv_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_iconv 1 /* #include <iconv.h> ok */
-#define _lib_iconv_open 1 /* iconv_open() in default lib(s) */
-#define _lib_iconv_close 1 /* iconv_close() in default lib(s) */
-#define _lib_iconv 1 /* iconv() in default lib(s) */
-#define _nxt_iconv <../include/iconv.h> /* include path for the native <iconv.h> */
-#define _nxt_iconv_str "../include/iconv.h" /* include string for the native <iconv.h> */
-#include <ast_common.h>
-#include <ccode.h>
-#include <../include/iconv.h> /* the native iconv.h */
-
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
-
-#ifndef _ICONV_LIST_PRIVATE_
-#undef iconv_t
-#define iconv_t _ast_iconv_t
-#undef iconv_f
-#define iconv_f _ast_iconv_f
-#undef iconv_list_t
-#define iconv_list_t _ast_iconv_list_t
-#undef iconv_open
-#define iconv_open _ast_iconv_open
-#undef iconv
-#define iconv _ast_iconv
-#undef iconv_close
-#define iconv_close _ast_iconv_close
-#undef iconv_list
-#define iconv_list _ast_iconv_list
-#undef iconv_move
-#define iconv_move _ast_iconv_move
-#undef iconv_name
-#define iconv_name _ast_iconv_name
-#undef iconv_write
-#define iconv_write _ast_iconv_write
-#endif
-
-typedef Ccmap_t _ast_iconv_list_t;
-typedef __V_* _ast_iconv_t;
-typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ _ast_iconv_t _ast_iconv_open __PROTO__((const char*, const char*));
-extern __MANGLE__ size_t _ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
-extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
-extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
-#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
-#else
-#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_lib.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_lib.h
deleted file mode 100644
index 83be163f9f..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_lib.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
-#ifndef _def_lib_ast
-#define _def_lib_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _hdr_fmtmsg 1 /* #include <fmtmsg.h> ok */
-#define _hdr_fnmatch 1 /* #include <fnmatch.h> ok */
-#define _hdr_libgen 1 /* #include <libgen.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_locale 1 /* #include <locale.h> ok */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_spawn 1 /* #include <spawn.h> ok */
-#define _hdr_syslog 1 /* #include <syslog.h> ok */
-#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
-#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
-#define _dat__tzname 1 /* _tzname in default lib(s) */
-#define _dat_tzname 1 /* tzname in default lib(s) */
-#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
-#define _lib_atexit 1 /* atexit() in default lib(s) */
-#define _lib_bcopy 1 /* bcopy() in default lib(s) */
-#define _lib_bzero 1 /* bzero() in default lib(s) */
-#define _lib_catclose 1 /* catclose() in default lib(s) */
-#define _lib_catgets 1 /* catgets() in default lib(s) */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_confstr 1 /* confstr() in default lib(s) */
-#define _lib_dup2 1 /* dup2() in default lib(s) */
-#define _lib_execlp 1 /* execlp() in default lib(s) */
-#define _lib_execve 1 /* execve() in default lib(s) */
-#define _lib_execvp 1 /* execvp() in default lib(s) */
-#define _lib_fchmod 1 /* fchmod() in default lib(s) */
-#define _lib_fcntl 1 /* fcntl() in default lib(s) */
-#define _lib_fmtmsg 1 /* fmtmsg() in default lib(s) */
-#define _lib_fnmatch 1 /* fnmatch() in default lib(s) */
-#define _lib_fork 1 /* fork() in default lib(s) */
-#define _lib_fsync 1 /* fsync() in default lib(s) */
-#define _lib_getdents 1 /* getdents() in default lib(s) */
-#define _lib_getdtablesize 1 /* getdtablesize() in default lib(s) */
-#define _lib_getdate 1 /* getdate() in default lib(s) */
-#define _lib_getgroups 1 /* getgroups() in default lib(s) */
-#define _lib_gethostname 1 /* gethostname() in default lib(s) */
-#define _lib_getlogin 1 /* getlogin() in default lib(s) */
-#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_getopt 1 /* getopt() in default lib(s) */
-#define _lib_getsubopt 1 /* getsubopt() in default lib(s) */
-#define _lib_getopt_long 1 /* getopt_long() in default lib(s) */
-#define _lib_getopt_long_only 1 /* getopt_long_only() in default lib(s) */
-#define _lib_glob 1 /* glob() in default lib(s) */
-#define _lib_index 1 /* index() in default lib(s) */
-#define _lib_iswblank 1 /* iswblank() in default lib(s) */
-#define _lib_iswctype 1 /* iswctype() in default lib(s) */
-#define _lib_killpg 1 /* killpg() in default lib(s) */
-#define _lib_link 1 /* link() in default lib(s) */
-#define _lib_localeconv 1 /* localeconv() in default lib(s) */
-#define _lib_madvise 1 /* madvise() in default lib(s) */
-#define _lib_mbtowc 1 /* mbtowc() in default lib(s) */
-#define _lib_mbrtowc 1 /* mbrtowc() in default lib(s) */
-#define _lib_memalign 1 /* memalign() in default lib(s) */
-#define _lib_memchr 1 /* memchr() in default lib(s) */
-#define _lib_memcpy 1 /* memcpy() in default lib(s) */
-#define _lib_memmove 1 /* memmove() in default lib(s) */
-#define _lib_memset 1 /* memset() in default lib(s) */
-#define _lib_mkdir 1 /* mkdir() in default lib(s) */
-#define _lib_mkfifo 1 /* mkfifo() in default lib(s) */
-#define _lib_mktemp 1 /* mktemp() in default lib(s) */
-#define _lib_mktime 1 /* mktime() in default lib(s) */
-#define _lib_mount 1 /* mount() in default lib(s) */
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _lib_pathconf 1 /* pathconf() in default lib(s) */
-#define _lib_readlink 1 /* readlink() in default lib(s) */
-#define _lib_remove 1 /* remove() in default lib(s) */
-#define _lib_rename 1 /* rename() in default lib(s) */
-#define _lib_rewinddir 1 /* rewinddir() in default lib(s) */
-#define _lib_rindex 1 /* rindex() in default lib(s) */
-#define _lib_rmdir 1 /* rmdir() in default lib(s) */
-#define _lib_setlocale 1 /* setlocale() in default lib(s) */
-#define _lib_setpgid 1 /* setpgid() in default lib(s) */
-#define _lib_setpgrp 1 /* setpgrp() in default lib(s) */
-#define _lib_setreuid 1 /* setreuid() in default lib(s) */
-#define _lib_setsid 1 /* setsid() in default lib(s) */
-#define _lib_setuid 1 /* setuid() in default lib(s) */
-#define _lib_sigaction 1 /* sigaction() in default lib(s) */
-#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
-#define _lib_socketpair 1 /* socketpair() in default lib(s) */
-#define _lib_strchr 1 /* strchr() in default lib(s) */
-#define _lib_strcoll 1 /* strcoll() in default lib(s) */
-#define _lib_strdup 1 /* strdup() in default lib(s) */
-#define _lib_strerror 1 /* strerror() in default lib(s) */
-#define _lib_strcasecmp 1 /* strcasecmp() in default lib(s) */
-#define _lib_strncasecmp 1 /* strncasecmp() in default lib(s) */
-#define _lib_strrchr 1 /* strrchr() in default lib(s) */
-#define _lib_strstr 1 /* strstr() in default lib(s) */
-#define _lib_strxfrm 1 /* strxfrm() in default lib(s) */
-#define _lib_strftime 1 /* strftime() in default lib(s) */
-#define _lib_swab 1 /* swab() in default lib(s) */
-#define _lib_symlink 1 /* symlink() in default lib(s) */
-#define _lib_sysconf 1 /* sysconf() in default lib(s) */
-#define _lib_sysinfo 1 /* sysinfo() in default lib(s) */
-#define _lib_syslog 1 /* syslog() in default lib(s) */
-#define _lib_telldir 1 /* telldir() in default lib(s) */
-#define _lib_tmpnam 1 /* tmpnam() in default lib(s) */
-#define _lib_tzset 1 /* tzset() in default lib(s) */
-#define _lib_unlink 1 /* unlink() in default lib(s) */
-#define _lib_utime 1 /* utime() in default lib(s) */
-#define _lib_wctype 1 /* wctype() in default lib(s) */
-#define _lib_ftruncate 1 /* ftruncate() in default lib(s) */
-#define _lib_truncate 1 /* truncate() in default lib(s) */
-#define _lib_creat64 1 /* creat64() in default lib(s) */
-#define _lib_fstat64 1 /* fstat64() in default lib(s) */
-#define _lib_fstatvfs64 1 /* fstatvfs64() in default lib(s) */
-#define _lib_ftruncate64 1 /* ftruncate64() in default lib(s) */
-#define _lib_lseek64 1 /* lseek64() in default lib(s) */
-#define _lib_lstat64 1 /* lstat64() in default lib(s) */
-#define _lib_open64 1 /* open64() in default lib(s) */
-#define _lib_readdir64 1 /* readdir64() in default lib(s) */
-#define _lib_stat64 1 /* stat64() in default lib(s) */
-#define _lib_statvfs64 1 /* statvfs64() in default lib(s) */
-#define _lib_truncate64 1 /* truncate64() in default lib(s) */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _lib_strtod 1 /* strtod() in default lib(s) */
-#define _lib_strtold 1 /* strtold() in default lib(s) */
-#define _lib_strtol 1 /* strtol() in default lib(s) */
-#define _lib_strtoll 1 /* strtoll() in default lib(s) */
-#define _lib_strtoul 1 /* strtoul() in default lib(s) */
-#define _lib_strtoull 1 /* strtoull() in default lib(s) */
-#define _hdr_signal 1 /* #include <signal.h> ok */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
-#define _npt_sigflag 1 /* sigflag() needs a prototype */
-#define _mem_d_ino_dirent 1 /* d_ino is a member of struct dirent */
-#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
-#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
-#define _mem_DIR 1 /* DIR is a non-opaque struct */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
-#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
-#define _sys_resource 1 /* #include <sys/resource.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _sys_stream 1 /* #include <sys/stream.h> ok */
-#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_off64_t 1 /* off64_t is a type */
-#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
-#define _tst_errno 1 /* errno can be assigned */
-#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
-#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
-#define _lib_select 1 /* select() has standard 5 arg interface */
-#define _pipe_rw 1 /* full duplex pipes */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _lib_vfork 1 /* vfork exists and it works */
-#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
-#define _hdr_string 1 /* #include <string.h> ok */
-#define _lib_memcmp 1 /* standard memcmp interface that works */
-#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_memccpy 1 /* standard memccpy interface that works */
-#define _lib_utime_now 1 /* utime works with 0 time vector */
-#define _UNIV_DEFAULT "att" /* default universe name */
-#define _std_cleanup 1 /* stuck with standard _cleanup */
-#define _std_strcoll 1 /* standard strcoll works */
-#if !_AST_no_spawnveg
-#define _use_spawnveg 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_limits.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_limits.h
deleted file mode 100644
index c0f88cd5f3..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_limits.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
-#ifndef _def_limits_ast
-#define _def_limits_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#ifndef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-#ifndef CHAR_MIN
-#define CHAR_MIN -128
-#endif
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1000000
-#endif
-#ifndef INT_MIN
-#define INT_MIN -2147483648
-#endif
-#ifndef LLONG_MAX
-#define LLONG_MAX 9223372036854775807
-#endif
-#ifndef LLONG_MIN
-#define LLONG_MIN -9223372036854775808
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN -2147483648
-#endif
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 5
-#endif
-#ifndef OPEN_MAX_CEIL
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-#define OPEN_MAX_CEIL OPEN_MAX
-#endif
-#ifndef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 4096
-#endif
-#ifndef PTRDIFF_MAX
-#define PTRDIFF_MAX 2147483647
-#endif
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN -2147483648
-#endif
-#ifndef SCHAR_MAX
-#define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-#define SCHAR_MIN -128
-#endif
-#ifndef SHRT_MIN
-#define SHRT_MIN -32768
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX 2147483647
-#endif
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN -2147483648
-#endif
-#ifndef SIZE_MAX
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295
-#endif
-#define SIZE_MAX UINT_MAX
-#endif
-#ifndef SSIZE_MAX
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-#define SSIZE_MAX INT_MAX
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#ifndef ULLONG_MAX
-#define ULLONG_MAX 18446744073709551615
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX 4294967295
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX 65535
-#endif
-#ifndef WCHAR_MAX
-#define WCHAR_MAX 2147483647
-#endif
-#ifndef WCHAR_MIN
-#define WCHAR_MIN -2147483648
-#endif
-#ifndef WINT_MAX
-#define WINT_MAX 2147483647
-#endif
-#ifndef WINT_MIN
-#define WINT_MIN -2147483648
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_map.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_map.h
deleted file mode 100644
index 101b9a4a6f..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_map.h
+++ /dev/null
@@ -1,450 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
-#ifndef _def_map_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_map_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-/*
- * prototypes provided for standard interfaces hijacked
- * by ast and mapped to _ast_* but already prototyped
- * unmapped in native headers included by <ast_std.h>
- */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-
-#define _map_libc 1
-#undef basename
-#define basename _ast_basename
-#undef dirname
-#define dirname _ast_dirname
-#undef eaccess
-#define eaccess _ast_eaccess
-#undef execvpe
-#define execvpe _ast_execvpe
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-#undef fnmatch
-#define fnmatch _ast_fnmatch
-#undef fts_children
-#define fts_children _ast_fts_children
-#undef fts_close
-#define fts_close _ast_fts_close
-#undef fts_flags
-#define fts_flags _ast_fts_flags
-#undef fts_notify
-#define fts_notify _ast_fts_notify
-#undef fts_open
-#define fts_open _ast_fts_open
-#undef fts_read
-#define fts_read _ast_fts_read
-#undef fts_set
-#define fts_set _ast_fts_set
-#undef ftw
-#define ftw _ast_ftw
-#undef ftwalk
-#define ftwalk _ast_ftwalk
-#undef ftwflags
-#define ftwflags _ast_ftwflags
-#undef getcwd
-#define getcwd _ast_getcwd
-extern __MANGLE__ char* getcwd __PROTO__((char*, size_t));
-#undef getdate
-#define getdate _ast_getdate
-#undef getopt
-#define getopt _ast_getopt
-#undef getsubopt
-#define getsubopt _ast_getsubopt
-#undef getopt_long
-#define getopt_long _ast_getopt_long
-#undef getopt_long_only
-#define getopt_long_only _ast_getopt_long_only
-#undef optopt
-#define optopt _ast_optopt
-#undef optarg
-#define optarg _ast_optarg
-#undef optind
-#define optind _ast_optind
-#undef opterr
-#define opterr _ast_opterr
-#undef getwd
-#define getwd _ast_getwd
-extern __MANGLE__ char* getwd __PROTO__((char*));
-#undef glob
-#define glob _ast_glob
-#undef globfree
-#define globfree _ast_globfree
-#undef memdup
-#define memdup _ast_memdup
-#undef memfatal
-#define memfatal _ast_memfatal
-#undef memhash
-#define memhash _ast_memhash
-#undef memsum
-#define memsum _ast_memsum
-#undef mkstemp
-#define mkstemp _ast_mkstemp
-extern __MANGLE__ int mkstemp __PROTO__((char*));
-#undef mktemp
-#define mktemp _ast_mktemp
-extern __MANGLE__ char* mktemp __PROTO__((char*));
-#undef mktime
-#define mktime _ast_mktime
-#undef nftw
-#define nftw _ast_nftw
-#undef optctx
-#define optctx _ast_optctx
-#undef optesc
-#define optesc _ast_optesc
-#undef optget
-#define optget _ast_optget
-#undef opthelp
-#define opthelp _ast_opthelp
-#undef optjoin
-#define optjoin _ast_optjoin
-#undef optstr
-#define optstr _ast_optstr
-#undef optusage
-#define optusage _ast_optusage
-#undef pathaccess
-#define pathaccess _ast_pathaccess
-#undef pathbin
-#define pathbin _ast_pathbin
-#undef pathcanon
-#define pathcanon _ast_pathcanon
-#undef pathcat
-#define pathcat _ast_pathcat
-#undef pathcd
-#define pathcd _ast_pathcd
-#undef pathcheck
-#define pathcheck _ast_pathcheck
-#undef pathexists
-#define pathexists _ast_pathexists
-#undef pathfind
-#define pathfind _ast_pathfind
-#undef pathgetlink
-#define pathgetlink _ast_pathgetlink
-#undef pathinclude
-#define pathinclude _ast_pathinclude
-#undef pathkey
-#define pathkey _ast_pathkey
-#undef pathnative
-#define pathnative _ast_pathnative
-#undef pathpath
-#define pathpath _ast_pathpath
-#undef pathposix
-#define pathposix _ast_pathposix
-#undef pathprobe
-#define pathprobe _ast_pathprobe
-#undef pathprog
-#define pathprog _ast_pathprog
-#undef pathrepl
-#define pathrepl _ast_pathrepl
-#undef pathsetlink
-#define pathsetlink _ast_pathsetlink
-#undef pathshell
-#define pathshell _ast_pathshell
-#undef pathstat
-#define pathstat _ast_pathstat
-#undef pathtemp
-#define pathtemp _ast_pathtemp
-#undef pathtmp
-#define pathtmp _ast_pathtmp
-#undef procclose
-#define procclose _ast_procclose
-#undef procfree
-#define procfree _ast_procfree
-#undef procopen
-#define procopen _ast_procopen
-#undef procrun
-#define procrun _ast_procrun
-#undef putenv
-#define putenv _ast_putenv
-#undef re_comp
-#define re_comp _ast_re_comp
-#undef re_exec
-#define re_exec _ast_re_exec
-#undef realpath
-#define realpath _ast_realpath
-extern __MANGLE__ char* realpath __PROTO__((const char*, char*));
-#undef regaddclass
-#define regaddclass _ast_regaddclass
-#undef regalloc
-#define regalloc _ast_regalloc
-#undef regcache
-#define regcache _ast_regcache
-#undef regclass
-#define regclass _ast_regclass
-#undef regcmp
-#define regcmp _ast_regcmp
-#undef regcollate
-#define regcollate _ast_regcollate
-#undef regcomb
-#define regcomb _ast_regcomb
-#undef regcomp
-#define regcomp _ast_regcomp
-#undef regdecomp
-#define regdecomp _ast_regdecomp
-#undef regdup
-#define regdup _ast_regdup
-#undef regerror
-#define regerror _ast_regerror
-#undef regex
-#define regex _ast_regex
-#undef regexec
-#define regexec _ast_regexec
-#undef regfatal
-#define regfatal _ast_regfatal
-#undef regfatalpat
-#define regfatalpat _ast_regfatalpat
-#undef regfree
-#define regfree _ast_regfree
-#undef regncomp
-#define regncomp _ast_regncomp
-#undef regnexec
-#define regnexec _ast_regnexec
-#undef regrecord
-#define regrecord _ast_regrecord
-#undef regrexec
-#define regrexec _ast_regrexec
-#undef regstat
-#define regstat _ast_regstat
-#undef regsub
-#define regsub _ast_regsub
-#undef regsubcomp
-#define regsubcomp _ast_regsubcomp
-#undef regsubexec
-#define regsubexec _ast_regsubexec
-#undef regsubflags
-#define regsubflags _ast_regsubflags
-#undef regsubfree
-#define regsubfree _ast_regsubfree
-#undef remove
-#define remove _ast_remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#undef resolvepath
-#define resolvepath _ast_resolvepath
-extern __MANGLE__ int resolvepath __PROTO__((const char*, char*, size_t));
-#undef setenv
-#define setenv _ast_setenv
-extern __MANGLE__ int setenv __PROTO__((const char*, const char*, int));
-#undef setenviron
-#define setenviron _ast_setenviron
-#undef sigcritical
-#define sigcritical _ast_sigcritical
-#undef signal
-#define signal _ast_signal
-#undef sigunblock
-#define sigunblock _ast_sigunblock
-#undef stracmp
-#define stracmp _ast_stracmp
-#undef strcopy
-#define strcopy _ast_strcopy
-#undef strelapsed
-#define strelapsed _ast_strelapsed
-#undef stresc
-#define stresc _ast_stresc
-#undef streval
-#define streval _ast_streval
-#undef strexpr
-#define strexpr _ast_strexpr
-#undef strftime
-#define strftime _ast_strftime
-#undef strgid
-#define strgid _ast_strgid
-#undef strgrpmatch
-#define strgrpmatch _ast_strgrpmatch
-#undef strhash
-#define strhash _ast_strhash
-#undef strkey
-#define strkey _ast_strkey
-#undef strlcat
-#define strlcat _ast_strlcat
-extern __MANGLE__ size_t strlcat __PROTO__((char*, const char*, size_t));
-#undef strlcpy
-#define strlcpy _ast_strlcpy
-extern __MANGLE__ size_t strlcpy __PROTO__((char*, const char*, size_t));
-#undef strlook
-#define strlook _ast_strlook
-#undef strmatch
-#define strmatch _ast_strmatch
-#undef strmode
-#define strmode _ast_strmode
-#undef strnacmp
-#define strnacmp _ast_strnacmp
-#undef strncopy
-#define strncopy _ast_strncopy
-#undef strntod
-#define strntod _ast_strntod
-#undef strntol
-#define strntol _ast_strntol
-#undef strntold
-#define strntold _ast_strntold
-#undef strntoll
-#define strntoll _ast_strntoll
-#undef strntoul
-#define strntoul _ast_strntoul
-#undef strntoull
-#define strntoull _ast_strntoull
-#undef stropt
-#define stropt _ast_stropt
-#undef strperm
-#define strperm _ast_strperm
-#undef strpsearch
-#define strpsearch _ast_strpsearch
-#undef strptime
-#define strptime _ast_strptime
-#undef strsearch
-#define strsearch _ast_strsearch
-#undef strsort
-#define strsort _ast_strsort
-#undef strsubmatch
-#define strsubmatch _ast_strsubmatch
-#undef strsum
-#define strsum _ast_strsum
-#undef strtape
-#define strtape _ast_strtape
-#undef strtoip4
-#define strtoip4 _ast_strtoip4
-#undef strton
-#define strton _ast_strton
-#undef strtonll
-#define strtonll _ast_strtonll
-#undef struid
-#define struid _ast_struid
-#undef struniq
-#define struniq _ast_struniq
-#undef system
-#define system _ast_system
-extern __MANGLE__ int system __PROTO__((const char*));
-#undef tempnam
-#define tempnam _ast_tempnam
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-#undef tmpnam
-#define tmpnam _ast_tmpnam
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-#undef touch
-#define touch _ast_touch
-#undef wordexp
-#define wordexp _ast_wordexp
-#undef wordfree
-#define wordfree _ast_wordfree
-#undef unsetenv
-#define unsetenv _ast_unsetenv
-
-/* cannot override local malloc */
-#define _map_malloc 1
-#undef calloc
-#define calloc _ast_calloc
-extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
-#undef cfree
-#define cfree _ast_cfree
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-#undef free
-#define free _ast_free
-extern __MANGLE__ void free __PROTO__((__V_*));
-#undef malloc
-#define malloc _ast_malloc
-extern __MANGLE__ __V_* malloc __PROTO__((size_t));
-#undef memalign
-#define memalign _ast_memalign
-extern __MANGLE__ __V_* memalign __PROTO__((size_t, size_t));
-#undef realloc
-#define realloc _ast_realloc
-extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
-#undef strdup
-#define strdup _ast_strdup
-extern __MANGLE__ char* strdup __PROTO__((const char*));
-#undef valloc
-#define valloc _ast_valloc
-extern __MANGLE__ __V_* valloc __PROTO__((size_t));
-#undef strtol
-#define strtol _ast_strtol
-#undef strtoul
-#define strtoul _ast_strtoul
-#undef strtoll
-#define strtoll _ast_strtoll
-#undef strtoull
-#define strtoull _ast_strtoull
-#undef strtod
-#define strtod _ast_strtod
-#undef strtold
-#define strtold _ast_strtold
-extern __MANGLE__ long strtol __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned long strtoul __PROTO__((const char*, char**, int));
-extern __MANGLE__ double strtod __PROTO__((const char*, char**));
-#if !_UWIN
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
-extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h
deleted file mode 100644
index d74f1a3d13..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
-#ifndef _def_mmap_ast
-#define _def_mmap_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_mmap 1 /* standard mmap interface that works */
-#define _lib_mmap64 1 /* mmap64 interface and implementation work */
-#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
-#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
-
-/* some systems get it wrong but escape concise detection */
-#ifndef _NO_MMAP
-#if __CYGWIN__
-#define _NO_MMAP 1
-#endif
-#endif
-
-#if _NO_MMAP
-#undef _lib_mmap
-#undef _lib_mmap64
-#undef _mmap_anon
-#undef _mmap_devzero
-#undef _mmap_worthy
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_mode.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_mode.h
deleted file mode 100644
index 0037c2c82f..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_mode.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
-#ifndef _def_mode_ast
-#define _def_mode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define S_ITYPE(m) ((m)&S_IFMT)
-
-#define S_IPERM (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-
-#define _S_IDPERM 1
-#define _S_IDTYPE 1
-
-#define BUFFERSIZE 8192
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_ndbm.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_ndbm.h
deleted file mode 100644
index cfbe9ab040..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_ndbm.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
-#ifndef _def_ndbm_ast
-#define _def_ndbm_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_ndbm 1 /* #include <ndbm.h> ok */
-#include <ndbm.h>
-#define _use_ndbm 1
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_nl_types.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_nl_types.h
deleted file mode 100644
index 8e51cb12d2..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_nl_types.h
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
-#ifndef _def_nl_types_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_nl_types_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_nl_langinfo 1 /* nl_langinfo() in default lib(s) */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_langinfo 1 /* #include <langinfo.h> ok */
-#define _nxt_nl_types <../include/nl_types.h> /* include path for the native <nl_types.h> */
-#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native <nl_types.h> */
-#include <limits.h>
-#include <../include/nl_types.h> /* the native nl_types.h */
-
-#undef NL_SETMAX
-#define NL_SETMAX 1023
-#undef NL_MSGMAX
-#define NL_MSGMAX 32767
-#undef nl_catd
-#define nl_catd _ast_nl_catd
-#undef catopen
-#define catopen _ast_catopen
-#undef catgets
-#define catgets _ast_catgets
-#undef catclose
-#define catclose _ast_catclose
-
-typedef __V_* nl_catd;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ nl_catd catopen __PROTO__((const char*, int));
-extern __MANGLE__ char* catgets __PROTO__((nl_catd, int, int, const char*));
-extern __MANGLE__ int catclose __PROTO__((nl_catd));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_param.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_param.h
deleted file mode 100644
index 868aaf6b44..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_param.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
-#ifndef _def_param_ast
-#define _def_param_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#include <sys/param.h>
-#ifndef S_IFDIR
-#include <sys/stat.h>
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_standards.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_standards.h
deleted file mode 100644
index 4121a87ab4..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_standards.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_stdio.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_stdio.h
deleted file mode 100644
index c1c31497f3..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_stdio.h
+++ /dev/null
@@ -1,587 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
-#ifndef _SFSTDIO_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFSTDIO_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define __FILE_typedef 1
-#define _FILE_DEFINED 1
-#define _FILE_defined 1
-#define _FILEDEFED 1
-
-#ifndef __FILE_TAG
-#define __FILE_TAG _sfio_s
-#endif
-
-#undef FILE
-#undef _FILE
-#undef fpos_t
-#undef fpos64_t
-
-typedef struct _sfio_s _sfio_FILE;
-
-#define FILE _sfio_FILE
-#define _FILE FILE
-
-#if !defined(__FILE) && !__CYGWIN__
-#undef __FILE
-#define __FILE FILE
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define BUFSIZ SF_BUFSIZE
-
-#else
-
-#ifndef BUFSIZ
-#define BUFSIZ 8192
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#include <ast_std.h>
-
-#include <sfio_s.h>
-
-#if __cplusplus
-#define _sf_(f) (f)
-#else
-#define _sf_(f) ((struct _sfio_s*)(f))
-#endif
-
-#define _SF_EOF 0000200
-#define _SF_ERROR 0000400
-
-#endif
-
-#ifdef _NO_LARGEFILE64_SOURCE
-#undef _LARGEFILE64_SOURCE
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#undef off_t
-#endif
-
-#define fpos_t _ast_fpos_t
-#if _typ_int64_t
-#define fpos64_t _ast_fpos_t
-#endif
-
-typedef struct _ast_fpos_s
-{
- intmax_t _sf_offset;
- unsigned char _sf_state[64 - sizeof(intmax_t)];
-} _ast_fpos_t;
-
-#define _base _data
-#define _ptr _next
-#define _IOFBF 0
-#define _IONBF 1
-#define _IOLBF 2
-
-#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
-
-#undef FILE
-#define FILE FILE
-typedef struct _sfio_s FILE;
-
-#undef strerror
-extern __MANGLE__ char* strerror(int) __THROW;
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-extern __MANGLE__ void flockfile __PROTO__((FILE*));
-extern __MANGLE__ int ftrylockfile __PROTO__((FILE*));
-extern __MANGLE__ void funlockfile __PROTO__((FILE*));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 1024
-#endif
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 20
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-
-#define _doprnt _ast_doprnt
-#define _doscan _ast_doscan
-#define asprintf _ast_asprintf
-#define clearerr _ast_clearerr
-#define fclose _ast_fclose
-#define fdopen _ast_fdopen
-#define fflush _ast_fflush
-#define fgetc _ast_fgetc
-#define fgetpos _ast_fgetpos
-#define fgetpos64 _ast_fgetpos64
-#define fgets _ast_fgets
-#define fopen _ast_fopen
-#define fprintf _ast_fprintf
-#define fpurge _ast_fpurge
-#define fputs _ast_fputs
-#define fread _ast_fread
-#define freopen _ast_freopen
-#define fscanf _ast_fscanf
-#define fseek _ast_fseek
-#define fseek64 _ast_fseek64
-#define fseeko _ast_fseeko
-#define fseeko64 _ast_fseeko64
-#define fsetpos _ast_fsetpos
-#define fsetpos64 _ast_fsetpos64
-#define ftell _ast_ftell
-#define ftell64 _ast_ftell64
-#define ftello _ast_ftello
-#define ftello64 _ast_ftello64
-#define fwrite _ast_fwrite
-#define gets _ast_gets
-#define getw _ast_getw
-#define pclose _ast_pclose
-#define popen _ast_popen
-#define printf _ast_printf
-#define puts _ast_puts
-#define putw _ast_putw
-#define rewind _ast_rewind
-#define scanf _ast_scanf
-#define setbuf _ast_setbuf
-#undef setbuffer
-#define setbuffer _ast_setbuffer
-#define setlinebuf _ast_setlinebuf
-#define setvbuf _ast_setvbuf
-#define snprintf _ast_snprintf
-#define sprintf _ast_sprintf
-#define sscanf _ast_sscanf
-#define tmpfile _ast_tmpfile
-#define ungetc _ast_ungetc
-#define vasprintf _ast_vasprintf
-#define vfprintf _ast_vfprintf
-#define vfscanf _ast_vfscanf
-#define vprintf _ast_vprintf
-#define vscanf _ast_vscanf
-#define vsnprintf _ast_vsnprintf
-#define vsprintf _ast_vsprintf
-#define vsscanf _ast_vsscanf
-#define fcloseall _ast_fcloseall
-#define _filbuf _ast__filbuf
-#define fmemopen _ast_fmemopen
-#define __getdelim _ast___getdelim
-#define getdelim _ast_getdelim
-#define getline _ast_getline
-#define clearerr_unlocked _ast_clearerr_unlocked
-#define feof_unlocked _ast_feof_unlocked
-#define ferror_unlocked _ast_ferror_unlocked
-#define fflush_unlocked _ast_fflush_unlocked
-#define fgetc_unlocked _ast_fgetc_unlocked
-#define fgets_unlocked _ast_fgets_unlocked
-#define fileno_unlocked _ast_fileno_unlocked
-#define fputc_unlocked _ast_fputc_unlocked
-#define fputs_unlocked _ast_fputs_unlocked
-#define fread_unlocked _ast_fread_unlocked
-#define fwrite_unlocked _ast_fwrite_unlocked
-#define getc_unlocked _ast_getc_unlocked
-#define getchar_unlocked _ast_getchar_unlocked
-#define putc_unlocked _ast_putc_unlocked
-#define putchar_unlocked _ast_putchar_unlocked
-#define flockfile _ast_flockfile
-#define ftrylockfile _ast_ftrylockfile
-#define funlockfile _ast_funlockfile
-
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:initial
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
-#endif
-#ifndef L_ctermid
-#define L_ctermid 9
-#endif
-#ifndef L_tmpnam
-#define L_tmpnam 25
-#endif
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#if defined(__cplusplus) && defined(__THROW)
-extern __MANGLE__ char* ctermid(char*) __THROW;
-#else
-extern __MANGLE__ char* ctermid __PROTO__((char*));
-#endif
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-extern __MANGLE__ void perror __PROTO__((const char*));
-#ifndef _AST_STD_H
-#ifndef remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-#ifndef rename
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#ifdef _LARGEFILE64_SOURCE
-
-#undef fpos_t
-#undef off_t
-#undef fgetpos
-#undef fsetpos
-#undef fseek
-#undef fseeko
-#undef ftell
-#undef ftello
-
-#define fpos_t fpos64_t
-#if _typ_off64_t
-#define off_t off64_t
-#else
-#define off_t int64_t
-#endif
-
-#define fgetpos fgetpos64
-#define fsetpos fsetpos64
-#define fseek fseek64
-#define fseeko fseeko64
-#define ftell ftell64
-#define ftello ftello64
-
-#endif
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_DLL && _DLL_INDIRECT_DATA
-
-#define stdin ((FILE*)_ast_dll->_ast_stdin)
-#define stdout ((FILE*)_ast_dll->_ast_stdout)
-#define stderr ((FILE*)_ast_dll->_ast_stderr)
-
-#else
-
-#define stdin (&_Sfstdin)
-#define stdout (&_Sfstdout)
-#define stderr (&_Sfstderr)
-
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define feof(f) sfeof(f)
-#define ferror(f) sferror(f)
-#define fileno(f) sffileno(f)
-#define fputc(c,f) sfputc(f,c)
-#define getc(f) sfgetc(f)
-#define getchar() sfgetc(sfstdin)
-#define putc(c,f) sfputc(f,c)
-#define putchar(c) sfputc(sfstdout,c)
-
-#else
-
-#if !_UWIN
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-#endif
-
-extern __MANGLE__ FILE _Sfstdin;
-extern __MANGLE__ FILE _Sfstdout;
-extern __MANGLE__ FILE _Sfstderr;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define feof(f) (_sf_(f)->_flags&_SF_EOF)
-#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
-#define fileno(f) (_sf_(f)->_file)
-#define fputc(c,f) (_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
-#define getc(f) (_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
-#define getchar() getc(stdin)
-#define putc(c,f) fputc(c,f)
-#define putchar(c) fputc(c,stdout)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _sffilbuf __PROTO__((FILE*, int));
-extern __MANGLE__ int _sfflsbuf __PROTO__((FILE*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_sys.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_sys.h
deleted file mode 100644
index 9f2a84fb13..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_sys.h
+++ /dev/null
@@ -1,150 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
-#ifndef _AST_SYS_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_SYS_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#if __mips == 2 && !defined(_NO_LARGEFILE64_SOURCE)
-#define _NO_LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_NO_LARGEFILE64_SOURCE) && _typ_off64_t && _lib_lseek64 && _lib_stat64
-#if !defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#else
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#undef _typ_off64_t
-#undef _typ_struct_dirent64
-#undef _lib_creat64
-#undef _lib_fstat64
-#undef _lib_fstatvfs64
-#undef _lib_ftruncate64
-#undef _lib_lseek64
-#undef _lib_lstat64
-#undef _lib_mmap64
-#undef _lib_open64
-#undef _lib_readdir64
-#undef _lib_stat64
-#undef _lib_statvfs64
-#undef _lib_truncate64
-#endif
-#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
-#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
-#endif
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <locale.h>
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _typ_dev_t 1 /* dev_t is a type */
-#define _typ_nlink_t 1 /* nlink_t is a type */
-#define _typ_gid_t 1 /* gid_t is a type */
-#define _typ_mode_t 1 /* mode_t is a type */
-#define _typ_uid_t 1 /* uid_t is a type */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _typ_wchar_t 1 /* wchar_t is a type */
-#define _typ_pid_t 1 /* pid_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _typ_wint_t 1 /* wint_t is a type */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _typ_socklen_t 1 /* socklen_t is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_ino_t 1 /* ino_t is a type */
-#define _typ_off_t 1 /* off_t is a type */
-#define _typ_ptrdiff_t 1 /* ptrdiff_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#define _typ_div_t 1 /* div_t is a type */
-#define _typ_ldiv_t 1 /* ldiv_t is a type */
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
-extern __MANGLE__ pid_t spawnveg __PROTO__((const char*, char* const[], char* const[], pid_t));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#if !defined(va_start)
-#if defined(__STDARG__)
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_time.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_time.h
deleted file mode 100644
index 4bcafd05c0..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_time.h
+++ /dev/null
@@ -1,83 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
-#ifndef _def_time_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_time_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */
-#define _lib_usleep 1 /* usleep() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#include <sys/time.h>
-
-#include <sys/times.h>
-
-#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
-#define CLOCKS_PER_SEC CLK_TCK
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_tty.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_tty.h
deleted file mode 100644
index d67cc25293..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_tty.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
-#ifndef _def_tty_ast
-#define _def_tty_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_termios 1 /* #include <termios.h> ok */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
-
-#ifdef _hdr_termios
-# if _mac__POSIX_VDISABLE
-# undef _POSIX_VDISABLE
-# endif
-# include <termios.h>
-#else
-# if defined(_sys_termios) && defined(_lib_tcgetattr)
-# include <sys/termios.h>
-# define _hdr_termios 1
-# else
-# undef _sys_termios
-# endif /* _sys_termios */
-#endif /* _hdr_termios */
-
-#ifdef _hdr_termios
-# undef _hdr_sgtty
-# undef tcgetattr
-# undef tcsetattr
-# undef tcgetpgrp
-# undef tcsetpgrp
-# undef cfgetospeed
-# ifndef TCSANOW
-# define TCSANOW TCSETS
-# define TCSADRAIN TCSETSW
-# define TCSAFLUSH TCSETSF
-# endif /* TCSANOW */
- /* The following corrects bugs in some implementations */
-# if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
-# define TCSAFLUSH TCSADFLUSH
-# endif /* TCSADFLUSH */
-# ifndef _lib_tcgetattr
-# undef tcgetattr
-# define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
-# undef tcsetattr
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# undef cfgetospeed
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# endif /* _lib_tcgetattr */
-# undef TIOCGETC
-#else
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# ifdef _hdr_termio
-# include <termio.h>
-# else
-# ifdef _sys_termio
-# include <sys/termio.h>
-# define _hdr_termio 1
-# endif /* _sys_termio */
-# endif /* _hdr_termio */
-# ifdef _hdr_termio
-# define termios termio
-# undef TIOCGETC
-# define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-
-# ifdef _sys_bsdtty
-# include <sys/bsdtty.h>
-# endif /* _sys_bsdtty */
-# else
-# ifdef _hdr_sgtty
-# include <sgtty.h>
-# ifndef LPENDIN
-# ifdef _sys_nttyio
-# include <sys/nttyio.h>
-# endif /* _sys_nttyio */
-# endif /* LPENDIN */
-# define termios sgttyb
-# ifdef TIOCSETN
-# undef TCSETAW
-# endif /* TIOCSETN */
-# ifdef TIOCGETP
-# define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# else
-# define tcgetattr(fd,tty) gtty(fd, tty)
-# define tcsetattr(fd,action,tty) stty(fd, tty)
-# endif /* TIOCGETP */
-# else
-# ifdef _sys_ttyio
-# include <sys/ttyio.h>
-# endif
-# endif /* _hdr_sgtty */
-# endif /* hdr_termio */
-
-# ifndef TCSANOW
-# ifdef TCSETAW
-# define TCSANOW TCSETA
-# define TCSAFLUSH TCSETAF
-# else
-# ifdef TIOCSETN
-# define TCSANOW TIOCSETN
-# define TCSADRAIN TIOCSETN
-# define TCSAFLUSH TIOCSETP
-# endif /* TIOCSETN */
-# endif /* TCSETAW */
-# endif /* TCSANOW */
-#endif /* _hdr_termios */
-
-/* set ECHOCTL if driver can echo control charaters as ^c */
-#ifdef LCTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LCTLECH
-# endif /* !ECHOCTL */
-#endif /* LCTLECH */
-#ifdef LNEW_CTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LNEW_CTLECH
-# endif /* !ECHOCTL */
-#endif /* LNEW_CTLECH */
-#ifdef LNEW_PENDIN
-# ifndef PENDIN
-# define PENDIN LNEW_PENDIN
-# endif /* !PENDIN */
-#endif /* LNEW_PENDIN */
-
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_vfork.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_vfork.h
deleted file mode 100644
index ea9446da11..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_vfork.h
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
-#ifndef _def_vfork_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_vfork_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_wait.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_wait.h
deleted file mode 100644
index cd24b64d92..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_wait.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
-#ifndef _def_wait_ast
-#define _def_wait_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_wait 1 /* wait() in default lib(s) */
-#define _lib_wait3 1 /* wait3() in default lib(s) */
-#define _lib_wait4 1 /* wait4() in default lib(s) */
-#define _lib_waitpid 1 /* waitpid() in default lib(s) */
-#define _sys_wait 1 /* #include <sys/wait.h> ok */
-#define _ok_wif 1 /* posix wait macros ok */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/ast_wchar.h b/usr/src/lib/libast/sparc/src/lib/libast/ast_wchar.h
deleted file mode 100644
index 17177484e4..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/ast_wchar.h
+++ /dev/null
@@ -1,187 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_wchar_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */
-#define _lib_wctomb 1 /* wctomb() in default lib(s) */
-#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */
-#define _lib_wcslen 1 /* wcslen() in default lib(s) */
-#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */
-#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */
-#define _lib_towlower 1 /* towlower() in default lib(s) */
-#define _lib_towupper 1 /* towupper() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_mbstate_t 1 /* mbstate_t is a type */
-#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */
-#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */
-#ifndef _SFSTDIO_H
-#include <ast_common.h>
-#include <stdio.h>
-#endif
-#if _hdr_wchar && defined(_nxt_wchar)
-#include <../include/wchar.h> /* the native wchar.h */
-#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
-
-#ifndef WEOF
-#define WEOF (-1)
-#endif
-
-#undef fgetwc
-#undef fgetws
-#undef fputwc
-#undef fputws
-#undef getwc
-#undef getwchar
-#undef getws
-#undef putwc
-#undef putwchar
-#undef ungetwc
-
-#define fgetwc _ast_fgetwc
-#define fgetws _ast_fgetws
-#define fputwc _ast_fputwc
-#define fputws _ast_fputws
-#define fwide _ast_fwide
-#define fwprintf _ast_fwprintf
-#define fwscanf _ast_fwscanf
-#define getwc _ast_getwc
-#define getwchar _ast_getwchar
-#define getws _ast_getws
-#define putwc _ast_putwc
-#define putwchar _ast_putwchar
-#define swprintf _ast_swprintf
-#define swscanf _ast_swscanf
-#define ungetwc _ast_ungetwc
-#define vfwprintf _ast_vfwprintf
-#define vfwscanf _ast_vfwscanf
-#define vswprintf _ast_vswprintf
-#define vswscanf _ast_vswscanf
-#define vwprintf _ast_vwprintf
-#define vwscanf _ast_vwscanf
-#define wprintf _ast_wprintf
-#define wscanf _ast_wscanf
-
-#if !_typ_mbstate_t
-#undef _typ_mbstate_t
-#define _typ_mbstate_t 1
-typedef char mbstate_t;
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_mbstowcs
-extern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t));
-#endif
-#if !_lib_wctomb
-extern __MANGLE__ int wctomb __PROTO__((char*, wchar_t));
-#endif
-#if !_lib_wcrtomb
-extern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
-#endif
-#if !_lib_wcslen
-extern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*));
-#endif
-#if !_lib_wcstombs
-extern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t));
-#endif
-
-extern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ wint_t fgetwc __PROTO__((FILE*));
-extern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*));
-extern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*));
-extern __MANGLE__ int fwide __PROTO__((FILE*, int));
-extern __MANGLE__ wint_t getwc __PROTO__((FILE*));
-extern __MANGLE__ wint_t getwchar __PROTO__((void));
-extern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*));
-extern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ wint_t putwchar __PROTO__((wchar_t));
-extern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
-extern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
-extern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*));
-extern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
-extern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
-extern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...));
-extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/lc.h b/usr/src/lib/libast/sparc/src/lib/libast/lc.h
deleted file mode 100644
index 65fdab45ab..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/lc.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated by ./lcgen : : */
-
-
-#ifndef _LC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LC_H 1
-
-#include <ast.h>
-
-#define LC_abbreviated 0x00001
-#define LC_checked 0x00002
-#define LC_debug 0x00004
-#define LC_default 0x00008
-#define LC_defined 0x00010
-#define LC_local 0x00020
-#define LC_primary 0x00040
-#define LC_qualified 0x00080
-#define LC_undefined 0x00100
-#define LC_utf8 0x00200
-#define LC_verbose 0x00400
-#define LC_setlocale 0x10000
-#define LC_setenv 0x20000
-#define LC_user 0x40000
-#define LC_language_attribute_max 2
-#define LC_territory_language_max 4
-
-struct Lc_s;
-
-typedef struct Lc_info_s
-{
- const struct Lc_s* lc;
- unsigned long number;
- __V_* data;
-} Lc_info_t;
-
-typedef struct Lc_attribute_s
-{
- const char* name;
- unsigned long flags;
- unsigned long index;
-} Lc_attribute_t;
-
-typedef struct Lc_charset_s
-{
- const char* code;
- const char* alternates;
- const char* ms;
- unsigned long index;
-} Lc_charset_t;
-
-typedef struct Lc_language_s
-{
- const char* code;
- const char* name;
- const char* alternates;
- const Lc_charset_t* charset;
- unsigned long flags;
- unsigned long index;
- const Lc_attribute_t* attributes[LC_language_attribute_max];
-} Lc_language_t;
-
-typedef struct Lc_territory_s
-{
- const char* code;
- const char* name;
- unsigned long flags;
- unsigned long index;
- const Lc_language_t* languages[LC_territory_language_max];
-#ifdef _LC_TERRITORY_PRIVATE_
- _LC_TERRITORY_PRIVATE_
-#endif
-} Lc_territory_t;
-
-typedef struct Lc_map_s
-{
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_t* attribute;
-} Lc_map_t;
-
-typedef struct Lc_attribute_list_s
-{
- struct Lc_attribute_list_s* next;
- const Lc_attribute_t* attribute;
-} Lc_attribute_list_t;
-
-typedef struct Lc_s
-{
- const char* name;
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_list_t* attributes;
- unsigned long flags;
- unsigned long index;
-#ifdef _LC_PRIVATE_
- _LC_PRIVATE_
-#endif
-} Lc_t;
-
-struct Lc_category_s;
-
-typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
-
-typedef struct Lc_category_s
-{
- const char* name;
- int external;
- int internal;
- Lc_category_set_f setf;
- Lc_t* prev;
- unsigned int flags;
-} Lc_category_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
-extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
-extern __MANGLE__ int lcindex __PROTO__((int, int));
-extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
-extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
-extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/preroot.h b/usr/src/lib/libast/sparc/src/lib/libast/preroot.h
deleted file mode 100644
index 001d3c0fd2..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/preroot.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/sig.h b/usr/src/lib/libast/sparc/src/lib/libast/sig.h
deleted file mode 100644
index 07c291565c..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/sig.h
+++ /dev/null
@@ -1,138 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
-#ifndef _def_sig_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_sig_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define sig_info _sig_info_
-
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide kill killpg
-#else
-#define kill ______kill
-#define killpg ______killpg
-#endif
-#include <signal.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide kill killpg
-#else
-#undef kill
-#undef killpg
-#endif
-#ifndef sigmask
-#define sigmask(s) (1<<((s)-1))
-#endif
-typedef void (*Sig_handler_t) __PROTO__((int));
-
-
-#define Handler_t Sig_handler_t
-
-#define SIG_REG_PENDING (-1)
-#define SIG_REG_POP 0
-#define SIG_REG_EXEC 00001
-#define SIG_REG_PROC 00002
-#define SIG_REG_TERM 00004
-#define SIG_REG_ALL 00777
-#define SIG_REG_SET 01000
-
-typedef struct
-{
- char** name;
- char** text;
- int sigmax;
-} Sig_info_t;
-
-extern __MANGLE__ int kill __PROTO__((pid_t, int));
-extern __MANGLE__ int killpg __PROTO__((pid_t, int));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sig_info_t sig_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _lib_sigflag && _npt_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-extern __MANGLE__ int sigcritical __PROTO__((int));
-extern __MANGLE__ int sigunblock __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/tmx.h b/usr/src/lib/libast/sparc/src/lib/libast/tmx.h
deleted file mode 100644
index a3e19d83fb..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/tmx.h
+++ /dev/null
@@ -1,130 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
-#ifndef _TMX_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TMX_H 1
-/*
- * AT&T Research
- *
- * high resolution Time_t support
- */
-
-#include <tm.h>
-#include <tv.h>
-
-#define TMX_MAXDATE "2554-07-21+23:34:33.709551614 UTC"
-#define TMX_MAXYEAR 2554
-#define TMX_MAXSEC ((Time_t)18446744073)
-#define TMX_MAXNSEC 709551614
-#define TMX_RESOLUTION 1000000000
-
-typedef uint64_t Time_t;
-typedef uint64_t Tmxsec_t;
-typedef uint32_t Tmxnsec_t;
-
-#define tmxsec(t) ((Tmxsec_t)((t)/1000000000))
-#define tmxnsec(t) ((Tmxnsec_t)((t)%1000000000))
-#define tmxsns(s,n) (((((Time_t)(s))*1000000000))+((Time_t)(n)))
-
-#define TMX_NOTIME ((Time_t)(-1))
-#define TMX_NOW tmxgettime()
-#define TMX_MAXTIME tmxsns(TMX_MAXSEC,TMX_MAXNSEC)
-
-#define tmx2tv(t,v) ((v)->tv_nsec=tmxnsec(t),(v)->tv_sec=tmxsec(t))
-#define tv2tmx(v) tmxsns((v)->tv_sec,(v)->tv_nsec)
-
-#define tmxclock(p) tmxsns(((p)?*(p):time(NiL)),0)
-
-#define tmxgetatime(s) tmxsns((s)->st_atime,ST_ATIME_NSEC_GET(s))
-#define tmxgetctime(s) tmxsns((s)->st_ctime,ST_CTIME_NSEC_GET(s))
-#define tmxgetmtime(s) tmxsns((s)->st_mtime,ST_MTIME_NSEC_GET(s))
-
-#define tmxsetatime(s,t) ((s)->st_atime=tmxsec(t),ST_ATIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Time_t tmxdate __PROTO__((const char*, char**, Time_t));
-extern __MANGLE__ Time_t tmxduration __PROTO__((const char*, char**));
-extern __MANGLE__ char* tmxfmt __PROTO__((char*, size_t, const char*, Time_t));
-extern __MANGLE__ Time_t tmxleap __PROTO__((Time_t));
-extern __MANGLE__ Tm_t* tmxmake __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxscan __PROTO__((const char*, char**, const char*, char**, Time_t, long));
-extern __MANGLE__ int tmxsleep __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_t* tmxtm __PROTO__((Tm_t*, Time_t, Tm_zone_t*));
-
-extern __MANGLE__ Time_t tmxgettime __PROTO__((void));
-extern __MANGLE__ int tmxsettime __PROTO__((Time_t));
-
-extern __MANGLE__ int tmxtouch __PROTO__((const char*, Time_t, Time_t, Time_t, int));
-
-extern __MANGLE__ char* fmttmx __PROTO__((const char*, Time_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparc/src/lib/libast/tv.h b/usr/src/lib/libast/sparc/src/lib/libast/tv.h
deleted file mode 100644
index 9e59290657..0000000000
--- a/usr/src/lib/libast/sparc/src/lib/libast/tv.h
+++ /dev/null
@@ -1,111 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
-#ifndef _TV_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TV_H 1
-/*
- * AT&T Research
- *
- * high resolution Tv_t interface definitions
- */
-
-#include <ast.h>
-
-#define TV_NSEC_IGNORE (1000000000L)
-#define TV_TOUCH_RETAIN ((Tv_t*)1)
-
-typedef struct Tv_s
-{
- uint32_t tv_sec;
- uint32_t tv_nsec;
-} Tv_t;
-
-#define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
-#define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
-#define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
-
-#define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
-#define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
-#define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
-
-#define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
-#define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
-#define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
-
-#define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
-#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
-#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int tvgettime __PROTO__((Tv_t*));
-extern __MANGLE__ int tvsettime __PROTO__((const Tv_t*));
-extern __MANGLE__ int tvcmp __PROTO__((const Tv_t*, const Tv_t*));
-extern __MANGLE__ int tvtouch __PROTO__((const char*, const Tv_t*, const Tv_t*, const Tv_t*, int));
-extern __MANGLE__ int tvsleep __PROTO__((const Tv_t*, Tv_t*));
-
-extern __MANGLE__ char* fmttv __PROTO__((const char*, Tv_t*));
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/align.h b/usr/src/lib/libast/sparcv9/include/ast/align.h
deleted file mode 100644
index 34ebf9bcfb..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/align.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
-#ifndef _def_align_ast
-#define _def_align_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
-
-#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
-#define ALIGN_POINTER(x) ((char*)(x))
-#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
-
-#define ALIGN_BOUND ALIGN_BOUND2
-#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
-
-#define ALIGN_BIT1 0x1
-#define ALIGN_BOUND1 ALIGN_BOUND2
-#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
-#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffe)
-#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
-#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
-
-#define ALIGN_BIT2 0x2
-#define ALIGN_BOUND2 16
-#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+15)
-#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffff0)
-#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffd)
-#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
-#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast.h b/usr/src/lib/libast/sparcv9/include/ast/ast.h
deleted file mode 100644
index 5c0d5dcd30..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast.h
+++ /dev/null
@@ -1,388 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Advanced Software Technology Library
- * AT&T Research
- *
- * std + posix + ast
- */
-
-#ifndef _AST_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_H
-
-#include <ast_version.h>
-
-#ifndef _AST_STD_H
-#include <ast_std.h>
-#endif
-
-#ifndef _SFIO_H
-#include <sfio.h>
-#endif
-
-#ifndef ast
-#define ast _ast_info
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 1024
-#endif
-
-/*
- * workaround botched headers that assume <stdio.h>
- */
-
-#ifndef FILE
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-#define FILE struct _sfio_s
-#ifndef __FILE_typedef
-#define __FILE_typedef 1
-#endif
-#ifndef _FILEDEFED
-#define _FILEDEFED 1
-#endif
-#endif
-
-/*
- * exit() support -- this matches shell exit codes
- */
-
-#define EXIT_BITS 8 /* # exit status bits */
-
-#define EXIT_USAGE 2 /* usage exit code */
-#define EXIT_QUIT ((1<<(EXIT_BITS))-1) /* parent should quit */
-#define EXIT_NOTFOUND ((1<<(EXIT_BITS-1))-1) /* command not found */
-#define EXIT_NOEXEC ((1<<(EXIT_BITS-1))-2) /* other exec error */
-
-#define EXIT_CODE(x) ((x)&((1<<EXIT_BITS)-1))
-#define EXIT_CORE(x) (EXIT_CODE(x)|(1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))
-#define EXIT_TERM(x) (EXIT_CODE(x)|(1<<EXIT_BITS))
-
-/*
- * NOTE: for compatibility the following work for EXIT_BITS={7,8}
- */
-
-#define EXIT_STATUS(x) (((x)&((1<<(EXIT_BITS-2))-1))?(x):EXIT_CODE((x)>>EXIT_BITS))
-
-#define EXITED_CORE(x) (((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))==((1<<EXIT_BITS)|(1<<(EXIT_BITS-1)))||((x)&((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))==((1<<(EXIT_BITS-1))|(1<<(EXIT_BITS-2))))
-#define EXITED_TERM(x) ((x)&((1<<EXIT_BITS)|(1<<(EXIT_BITS-1))))
-
-/*
- * astconflist() flags
- */
-
-#define ASTCONF_parse 0x0001
-#define ASTCONF_write 0x0002
-#define ASTCONF_read 0x0004
-#define ASTCONF_lower 0x0008
-#define ASTCONF_base 0x0010
-#define ASTCONF_defined 0x0020
-#define ASTCONF_quote 0x0040
-#define ASTCONF_table 0x0080
-#define ASTCONF_matchcall 0x0100
-#define ASTCONF_matchname 0x0200
-#define ASTCONF_matchstandard 0x0400
-#define ASTCONF_error 0x0800
-#define ASTCONF_system 0x1000
-#define ASTCONF_AST 0x2000
-
-/*
- * pathcanon() flags
- */
-
-#define PATH_PHYSICAL 01
-#define PATH_DOTDOT 02
-#define PATH_EXISTS 04
-#define PATH_VERIFIED(n) (((n)&01777)<<5)
-
-/*
- * pathaccess() flags
- */
-
-#define PATH_READ 004
-#define PATH_WRITE 002
-#define PATH_EXECUTE 001
-#define PATH_REGULAR 010
-#define PATH_ABSOLUTE 020
-
-/*
- * touch() flags
- */
-
-#define PATH_TOUCH_CREATE 01
-#define PATH_TOUCH_VERBATIM 02
-
-/*
- * pathcheck() info
- */
-
-typedef struct
-{
- unsigned long date;
- char* feature;
- char* host;
- char* user;
-} Pathcheck_t;
-
-/*
- * strgrpmatch() flags
- */
-
-#define STR_MAXIMAL 01 /* maximal match */
-#define STR_LEFT 02 /* implicit left anchor */
-#define STR_RIGHT 04 /* implicit right anchor */
-#define STR_ICASE 010 /* ignore case */
-#define STR_GROUP 020 /* (|&) inside [@|&](...) only */
-
-/*
- * fmtquote() flags
- */
-
-#define FMT_ALWAYS 0x01 /* always quote */
-#define FMT_ESCAPED 0x02 /* already escaped */
-#define FMT_SHELL 0x04 /* escape $ ` too */
-#define FMT_WIDE 0x08 /* don't escape 8 bit chars */
-#define FMT_PARAM 0x10 /* disable FMT_SHELL ${$( quote */
-
-/*
- * multibyte macros
- */
-
-#define mbmax() (ast.mb_cur_max)
-#define mberr() (ast.tmp_int<0)
-
-#define mbcoll() (ast.mb_xfrm!=0)
-#define mbwide() (mbmax()>1)
-
-#define mbchar(p) (mbwide()?((ast.tmp_int=(*ast.mb_towc)(&ast.tmp_wchar,(char*)(p),mbmax()))>0?((p+=ast.tmp_int),ast.tmp_wchar):(p+=ast.mb_sync+1,ast.tmp_int)):(*(unsigned char*)(p++)))
-#define mbinit() (mbwide()?(*ast.mb_towc)((wchar_t*)0,(char*)0,mbmax()):0)
-#define mbsize(p) (mbwide()?(*ast.mb_len)((char*)(p),mbmax()):((p),1))
-#define mbconv(s,w) (ast.mb_conv?(*ast.mb_conv)(s,w):((*(s)=(w)),1))
-#define mbwidth(w) (ast.mb_width&&((ast.tmp_int=(*ast.mb_width)(w))>=0||(w)>UCHAR_MAX)?ast.tmp_int:1)
-#define mbxfrm(t,f,n) (mbcoll()?(*ast.mb_xfrm)((char*)(t),(char*)(f),n):0)
-
-/*
- * common macros
- */
-
-#define elementsof(x) (sizeof(x)/sizeof(x[0]))
-#define integralof(x) (((char*)(x))-((char*)0))
-#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x)))
-#define oldof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)malloc(sizeof(t)*(n)+(x)))
-#define pointerof(x) ((__V_*)((char*)0+(x)))
-#define roundof(x,y) (((x)+(y)-1)&~((y)-1))
-#define ssizeof(x) ((int)sizeof(x))
-
-#define streq(a,b) (*(a)==*(b)&&!strcmp(a,b))
-#define strneq(a,b,n) (*(a)==*(b)&&!strncmp(a,b,n))
-#define strsignal(s) fmtsignal(s)
-
-#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
-#define NiL 0
-#define NoP(x) (void)(x)
-#else
-#define NiL ((char*)0)
-#define NoP(x) (&x,1)
-#endif
-
-#if !defined(NoF)
-#if defined(__STDC__) || defined(__STDPP__)
-#define NoF(x) void _DATA_ ## x () {}
-#else
-#define NoF(x) void _DATA_/**/x () {}
-#endif
-#if !defined(_DATA_)
-#define _DATA_
-#endif
-#endif
-
-#if !defined(NoN)
-#if defined(__STDC__) || defined(__STDPP__)
-#define NoN(x) void _STUB_ ## x () {}
-#else
-#define NoN(x) void _STUB_/**/x () {}
-#endif
-#if !defined(_STUB_)
-#define _STUB_
-#endif
-#endif
-
-#define NOT_USED(x) NoP(x)
-
-typedef int (*Error_f) __PROTO__((__V_*, __V_*, int, ...));
-
-typedef int (*Ast_confdisc_f) __PROTO__((const char*, const char*, const char*));
-typedef int (*Strcmp_context_f) __PROTO__((const char*, const char*, __V_*));
-typedef int (*Strcmp_f) __PROTO__((const char*, const char*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* astgetconf __PROTO__((const char*, const char*, const char*, int, Error_f));
-extern __MANGLE__ char* astconf __PROTO__((const char*, const char*, const char*));
-extern __MANGLE__ Ast_confdisc_f astconfdisc __PROTO__((Ast_confdisc_f));
-extern __MANGLE__ void astconflist __PROTO__((Sfio_t*, const char*, int, const char*));
-extern __MANGLE__ off_t astcopy __PROTO__((int, int, off_t));
-extern __MANGLE__ int astlicense __PROTO__((char*, int, char*, char*, int, int, int));
-extern __MANGLE__ int astquery __PROTO__((int, const char*, ...));
-extern __MANGLE__ void astwinsize __PROTO__((int, int*, int*));
-
-extern __MANGLE__ ssize_t base64encode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
-extern __MANGLE__ ssize_t base64decode __PROTO__((const __V_*, size_t, __V_**, __V_*, size_t, __V_**));
-extern __MANGLE__ int chresc __PROTO__((const char*, char**));
-extern __MANGLE__ int chrtoi __PROTO__((const char*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ char* fmtbase __PROTO__((long, int, int));
-extern __MANGLE__ char* fmtbasell __PROTO__((intmax_t, int, int));
-#define fmtbase(a,b,c) fmtbasell((intmax_t)(a),b,c) /* until 2003-09-01 */
-extern __MANGLE__ char* fmtbuf __PROTO__((size_t));
-extern __MANGLE__ char* fmtclock __PROTO__((Sfulong_t));
-extern __MANGLE__ char* fmtelapsed __PROTO__((unsigned long, int));
-extern __MANGLE__ char* fmterror __PROTO__((int));
-extern __MANGLE__ char* fmtesc __PROTO__((const char*));
-extern __MANGLE__ char* fmtesq __PROTO__((const char*, const char*));
-extern __MANGLE__ char* fmtident __PROTO__((const char*));
-extern __MANGLE__ char* fmtip4 __PROTO__((uint32_t, int));
-extern __MANGLE__ char* fmtfmt __PROTO__((const char*));
-extern __MANGLE__ char* fmtgid __PROTO__((int));
-extern __MANGLE__ char* fmtmatch __PROTO__((const char*));
-extern __MANGLE__ char* fmtmode __PROTO__((int, int));
-extern __MANGLE__ char* fmtnesq __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ char* fmtnum __PROTO__((unsigned long, int));
-extern __MANGLE__ char* fmtperm __PROTO__((int));
-extern __MANGLE__ char* fmtquote __PROTO__((const char*, const char*, const char*, size_t, int));
-extern __MANGLE__ char* fmtre __PROTO__((const char*));
-extern __MANGLE__ char* fmtscale __PROTO__((Sfulong_t, int));
-extern __MANGLE__ char* fmtsignal __PROTO__((int));
-extern __MANGLE__ char* fmttime __PROTO__((const char*, time_t));
-extern __MANGLE__ char* fmtuid __PROTO__((int));
-extern __MANGLE__ char* fmtversion __PROTO__((unsigned long));
-extern __MANGLE__ __V_* memdup __PROTO__((const __V_*, size_t));
-extern __MANGLE__ void memfatal __PROTO__((void));
-extern __MANGLE__ unsigned int memhash __PROTO__((const __V_*, int));
-extern __MANGLE__ unsigned long memsum __PROTO__((const __V_*, int, unsigned long));
-extern __MANGLE__ char* pathaccess __PROTO__((char*, const char*, const char*, const char*, int));
-extern __MANGLE__ char* pathbin __PROTO__((void));
-extern __MANGLE__ char* pathcanon __PROTO__((char*, int));
-extern __MANGLE__ char* pathcat __PROTO__((char*, const char*, int, const char*, const char*));
-extern __MANGLE__ int pathcd __PROTO__((const char*, const char*));
-extern __MANGLE__ int pathcheck __PROTO__((const char*, const char*, Pathcheck_t*));
-extern __MANGLE__ int pathexists __PROTO__((char*, int));
-extern __MANGLE__ char* pathfind __PROTO__((const char*, const char*, const char*, char*, size_t));
-extern __MANGLE__ int pathgetlink __PROTO__((const char*, char*, int));
-extern __MANGLE__ int pathinclude __PROTO__((const char*));
-extern __MANGLE__ char* pathkey __PROTO__((char*, char*, const char*, const char*, const char*));
-extern __MANGLE__ size_t pathnative __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathpath __PROTO__((char*, const char*, const char*, int));
-extern __MANGLE__ size_t pathposix __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathprobe __PROTO__((char*, char*, const char*, const char*, const char*, int));
-extern __MANGLE__ size_t pathprog __PROTO__((const char*, char*, size_t));
-extern __MANGLE__ char* pathrepl __PROTO__((char*, const char*, const char*));
-extern __MANGLE__ int pathsetlink __PROTO__((const char*, const char*));
-extern __MANGLE__ char* pathshell __PROTO__((void));
-extern __MANGLE__ char* pathtemp __PROTO__((char*, size_t, const char*, const char*, int*));
-extern __MANGLE__ char* pathtmp __PROTO__((char*, const char*, const char*, int*));
-extern __MANGLE__ char* setenviron __PROTO__((const char*));
-extern __MANGLE__ int stracmp __PROTO__((const char*, const char*));
-extern __MANGLE__ char* strcopy __PROTO__((char*, const char*));
-extern __MANGLE__ unsigned long strelapsed __PROTO__((const char*, char**, int));
-extern __MANGLE__ int stresc __PROTO__((char*));
-extern __MANGLE__ long streval __PROTO__((const char*, char**, long(*)(const char*, char**)));
-extern __MANGLE__ long strexpr __PROTO__((const char*, char**, long(*)(const char*, char**, __V_*), __V_*));
-extern __MANGLE__ int strgid __PROTO__((const char*));
-extern __MANGLE__ int strgrpmatch __PROTO__((const char*, const char*, int*, int, int));
-extern __MANGLE__ unsigned int strhash __PROTO__((const char*));
-extern __MANGLE__ __V_* strlook __PROTO__((const __V_*, size_t, const char*));
-extern __MANGLE__ int strmatch __PROTO__((const char*, const char*));
-extern __MANGLE__ int strmode __PROTO__((const char*));
-extern __MANGLE__ int strnacmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ char* strncopy __PROTO__((char*, const char*, size_t));
-extern __MANGLE__ int strnpcmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ double strntod __PROTO__((const char*, size_t, char**));
-extern __MANGLE__ _ast_fltmax_t strntold __PROTO__((const char*, size_t, char**));
-extern __MANGLE__ long strntol __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ intmax_t strntoll __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ long strnton __PROTO__((const char*, size_t, char**, char*, int));
-extern __MANGLE__ unsigned long strntoul __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ intmax_t strntonll __PROTO__((const char*, size_t, char**, char*, int));
-extern __MANGLE__ uintmax_t strntoull __PROTO__((const char*, size_t, char**, int));
-extern __MANGLE__ int strnvcmp __PROTO__((const char*, const char*, size_t));
-extern __MANGLE__ int stropt __PROTO__((const char*, const __V_*, int, int(*)(__V_*, const __V_*, int, const char*), __V_*));
-extern __MANGLE__ int strpcmp __PROTO__((const char*, const char*));
-extern __MANGLE__ int strperm __PROTO__((const char*, char**, int));
-extern __MANGLE__ __V_* strpsearch __PROTO__((const __V_*, size_t, size_t, const char*, char**));
-extern __MANGLE__ __V_* strsearch __PROTO__((const __V_*, size_t, size_t, Strcmp_f, const char*, __V_*));
-extern __MANGLE__ void strsort __PROTO__((char**, int, int(*)(const char*, const char*)));
-extern __MANGLE__ char* strsubmatch __PROTO__((const char*, const char*, int));
-extern __MANGLE__ unsigned long strsum __PROTO__((const char*, unsigned long));
-extern __MANGLE__ char* strtape __PROTO__((const char*, char**));
-extern __MANGLE__ int strtoip4 __PROTO__((const char*, char**, uint32_t*, unsigned char*));
-extern __MANGLE__ long strton __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ intmax_t strtonll __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ int struid __PROTO__((const char*));
-extern __MANGLE__ int struniq __PROTO__((char**, int));
-extern __MANGLE__ int strvcmp __PROTO__((const char*, const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/*
- * C library global data symbols not prototyped by <unistd.h>
- */
-
-#if !defined(environ) && defined(__DYNAMIC__)
-#define environ __DYNAMIC__(environ)
-#else
-extern __MANGLE__ char** environ;
-#endif
-
-/*
- * really handy malloc()/free() (__FILE__,__LINE__,__FUNCTION__) tracing
- * make with VMDEBUG==1 or debug=1 or CCFLAGS=$(CC.DEBUG)
- * VMDEBUG==0 disables
- * at runtime export VMDEBUG or VMTRACE per vmalloc.3
- * to list originating call locations
- */
-
-#if !_std_malloc && !defined(VMFL) && !defined(_VMHDR_H) && \
- (!defined(VMDEBUG) || VMDEBUG) && (VMDEBUG || _BLD_DEBUG)
-
-#define VMFL 1
-#include <vmalloc.h>
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_botch.h b/usr/src/lib/libast/sparcv9/include/ast/ast_botch.h
deleted file mode 100644
index aeeb0c2d77..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_botch.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_ccode.h b/usr/src/lib/libast/sparcv9/include/ast/ast_ccode.h
deleted file mode 100644
index 6b6de1f2a8..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_ccode.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
-#ifndef _def_ccode_ast
-#define _def_ccode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define CC_ASCII 1 /* ISO-8859-1 */
-#define CC_EBCDIC_E 2 /* Xopen dd(1) EBCDIC */
-#define CC_EBCDIC_I 3 /* Xopen dd(1) IBM */
-#define CC_EBCDIC_O 4 /* IBM-1047 mvs OpenEdition */
-#define CC_EBCDIC_S 5 /* Siemens posix-bc */
-#define CC_EBCDIC_H 6 /* IBM-37 AS/400 */
-#define CC_EBCDIC_M 7 /* IBM mvs cobol */
-#define CC_EBCDIC_U 8 /* microfocus cobol */
-
-#define CC_MAPS 8 /* number of code maps */
-
-#define CC_EBCDIC CC_EBCDIC_E
-#define CC_EBCDIC1 CC_EBCDIC_E
-#define CC_EBCDIC2 CC_EBCDIC_I
-#define CC_EBCDIC3 CC_EBCDIC_O
-
-#define CC_NATIVE CC_ASCII /* native character code */
-#define CC_ALIEN CC_EBCDIC /* alien character code */
-
-#define CC_bel 0007 /* bel character */
-#define CC_esc 0033 /* esc character */
-#define CC_sub 0032 /* sub character */
-#define CC_vt 0013 /* vt character */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_common.h b/usr/src/lib/libast/sparcv9/include/ast/ast_common.h
deleted file mode 100644
index a893ef8068..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_common.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
-#ifndef _AST_COMMON_H
-#define _AST_COMMON_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_pthread 1 /* #include <pthread.h> ok */
-#define _hdr_stdarg 1 /* #include <stdarg.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdint 1 /* #include <stdint.h> ok */
-#define _hdr_inttypes 1 /* #include <inttypes.h> ok */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_long_double 1 /* long double is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _std_proto 1 /* standard C prototypes ok */
-#define _ptr_void 1 /* standard C void* ok */
-/* disable non-standard linux/gnu inlines */
-#ifdef __GNUC__
-# undef __OPTIMIZE_SIZE__
-# define __OPTIMIZE_SIZE__ 1
-#endif
-
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && __STDC__
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && (__cplusplus || c_plusplus)
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && _std_proto
-# define __STD_C 1
-#endif
-#if !defined(__STD_C)
-# define __STD_C 0
-#endif
-
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-# if __cplusplus || c_plusplus
-# define _BEGIN_EXTERNS_ extern "C" {
-# define _END_EXTERNS_ }
-# else
-# define _BEGIN_EXTERNS_
-# define _END_EXTERNS_
-# endif
-#endif
-
-/* _ARG_ simplifies function prototyping among flavors of C */
-#ifndef _ARG_
-# if __STD_C
-# define _ARG_(x) x
-# else
-# define _ARG_(x) ()
-# endif
-#endif
-
-/* _NIL_ simplifies defining nil pointers to a given type */
-#ifndef _NIL_
-# define _NIL_(x) ((x)0)
-#endif
-
-/* __INLINE__ is the inline keyword */
-#if !defined(__INLINE__) && defined(__cplusplus)
-# define __INLINE__ inline
-#endif
-#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-#endif
-
-/* Void_t is defined so that Void_t* can address any type */
-#ifndef Void_t
-# if __STD_C
-# define Void_t void
-# else
-# define Void_t char
-# endif
-#endif
-
-/* windows variants and veneers */
-#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
-# define _WINIX 1
-#endif
-
-/* dynamic linked library external scope handling */
-#ifdef __DYNAMIC__
-# undef __DYNAMIC__
-# ifndef _DLL
-# define _DLL 1
-# endif
-#endif
-#if _dll_import
-# if _BLD_STATIC && !_BLD_DLL
-# undef _DLL
-# else
-# if !_UWIN && !defined(_DLL)
-# define _DLL 1
-# endif
-# endif
-# if !defined(__EXPORT__) && _BLD_DLL
-# define __EXPORT__ __declspec(dllexport)
-# endif
-# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
-# define __IMPORT__ __declspec(dllimport)
-# endif
-# if _BLD_DLL && _UWIN
-# define __DYNAMIC__(v) (_ast_getdll()->_ast_ ## v)
-# endif
-#endif
-#if !defined(_astimport)
-# if defined(__IMPORT__) && defined(_DLL)
-# define _astimport __IMPORT__
-# else
-# define _astimport extern
-# endif
-#endif
-#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
-# ifdef __STDC__
-# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
-# else
-# define __EXTERN__(T,obj) extern T obj; T* _imp__/**/obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__/**/obj = &obj
-# endif
-#else
-# define __EXTERN__(T,obj) extern T obj
-# define __DEFINE__(T,obj,val) T obj = val
-#endif
-
-#define _ast_LL 1 /* LL numeric suffix supported */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intmax_long 1
-#define _ast_intswap 0
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt16_t long double
-#define _ast_fltmax_t _ast_flt16_t
-#define _typ_int8_t 1 /* int8_t is a type */
-#define _typ_uint8_t 1 /* uint8_t is a type */
-#define _typ_int16_t 1 /* int16_t is a type */
-#define _typ_uint16_t 1 /* uint16_t is a type */
-#define _typ_int32_t 1 /* int32_t is a type */
-#define _typ_uint32_t 1 /* uint32_t is a type */
-#define _typ_int64_t 1 /* int64_t is a type */
-#define _typ_uint64_t 1 /* uint64_t is a type */
-#define _typ_intmax_t 1 /* intmax_t is a type */
-#define _typ_uintmax_t 1 /* uintmax_t is a type */
-
-#ifndef va_listref
-#ifndef va_start
-#if __STD_C
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-#define va_listref(p) (p) /* pass va_list to varargs function */
-#define va_listval(p) (p) /* retrieve va_list from va_arg(ap,va_listarg) */
-#define va_listarg va_list /* va_arg() va_list type */
-#endif
-#ifndef _AST_STD_H
-# if __STD_C && _hdr_stddef
-# include <stddef.h>
-# endif
-# if _sys_types
-# include <sys/types.h>
-# endif
-# if _hdr_stdint
-# include <stdint.h>
-# else
-# if _hdr_inttypes
-# include <inttypes.h>
-# endif
-# endif
-#endif
-#if !_typ_size_t
-# define _typ_size_t 1
- typedef int size_t;
-#endif
-#if !_typ_ssize_t
-# define _typ_ssize_t 1
- typedef int ssize_t;
-#endif
-#ifndef _AST_STD_H
-# if !_def_map_ast
-# include <ast_map.h>
-# endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_dir.h b/usr/src/lib/libast/sparcv9/include/ast/ast_dir.h
deleted file mode 100644
index c873ed3253..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_dir.h
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * AT&T Research
- *
- * common dirent maintenance interface
- */
-
-#ifndef _AST_DIR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_DIR_H
-
-#include <ast_lib.h>
-
-#if _mem_d_fileno_dirent || _mem_d_ino_dirent
-#if !_mem_d_fileno_dirent
-#undef _mem_d_fileno_dirent
-#define _mem_d_fileno_dirent 1
-#define d_fileno d_ino
-#endif
-#endif
-
-#if _BLD_ast
-#include "dirlib.h"
-#else
-#include <dirent.h>
-#endif
-
-#if _mem_d_fileno_dirent
-#define D_FILENO(d) ((d)->d_fileno)
-#endif
-
-#if _mem_d_namlen_dirent
-#define D_NAMLEN(d) ((d)->d_namlen)
-#else
-#define D_NAMLEN(d) (strlen((d)->d_name))
-#endif
-
-#if _mem_d_reclen_dirent
-#define D_RECLEN(d) ((d)->d_reclen)
-#else
-#define D_RECLEN(d) D_RECSIZ(d,D_NAMLEN(d))
-#endif
-
-#define D_RECSIZ(d,n) (sizeof(*(d))-sizeof((d)->d_name)+((n)+sizeof(char*))&~(sizeof(char*)-1))
-
-/*
- * NOTE: 2003-03-27 mac osx bug symlink==DT_REG bug discovered;
- * the kernel *and* all directories must be fixed, so d_type
- * is summarily disabled until we see that happen
- */
-
-#if _mem_d_type_dirent && defined(DT_UNKNOWN) && defined(DT_REG) && defined(DT_DIR) && defined(DT_LNK) && ! ( __APPLE__ || __MACH__ )
-#define D_TYPE(d) ((d)->d_type)
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_dirent.h b/usr/src/lib/libast/sparcv9/include/ast/ast_dirent.h
deleted file mode 100644
index d0b47e0129..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_dirent.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
-#ifndef _def_dirent_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dirent_ast 1
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _nxt_dirent <../include/dirent.h> /* include path for the native <dirent.h> */
-#define _nxt_dirent_str "../include/dirent.h" /* include string for the native <dirent.h> */
-/*
- * <dirent.h> for systems with ok <dirent.h>
- */
-
-#ifndef _DIRENT_H
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#ifndef _DIRENT_H
-#define _DIRENT_H
-#endif
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_fcntl.h b/usr/src/lib/libast/sparcv9/include/ast/ast_fcntl.h
deleted file mode 100644
index 85d1adce75..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_fcntl.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
-#ifndef _def_fcntl_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fcntl_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <ast_fs.h>
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#define O_BINARY 0
-#define O_TEMPORARY 0
-#define O_TEXT 0
-
-#include <ast_fs.h>
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_fstat64
-#define fstat fstat64
-#endif
-#if _lib_lstat64
-#define lstat lstat64
-#endif
-#if _lib_stat64
-#define stat stat64
-#endif
-#if _lib_creat64
-#define creat creat64
-#endif
-#if _lib_mmap64
-#define mmap mmap64
-#endif
-#if _lib_open64
-#undef open
-#define open open64
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_float.h b/usr/src/lib/libast/sparcv9/include/ast/ast_float.h
deleted file mode 100644
index 5848cc91af..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_float.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
-#ifndef _def_float_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_float_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_float 1 /* #include <float.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_math 1 /* #include <math.h> ok */
-#define _hdr_values 1 /* #include <values.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
-#define _lib_frexp 1 /* frexp() in default lib(s) */
-#define _lib_frexpl 1 /* frexpl() in default lib(s) */
-#define _lib_ldexp 1 /* ldexp() in default lib(s) */
-#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
-#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
-#define _lib_copysign 1 /* copysign() in default lib(s) */
-#define _lib_copysignl 1 /* copysignl() in default lib(s) */
-#include <ast_common.h>
-#include <float.h>
-#include <math.h>
-#ifndef FLT_DIG
-#define FLT_DIG 6
-#endif
-#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
-#endif
-#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
-#endif
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
-#endif
-#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
-#endif
-#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
-#endif
-#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
-#endif
-#ifndef DBL_DIG
-#define DBL_DIG 15
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
-#endif
-#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
-#endif
-#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
-#endif
-#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
-#endif
-#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
-#endif
-#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
-#endif
-#ifndef LDBL_DIG
-#define LDBL_DIG 33
-#endif
-#ifndef LDBL_MAX
-#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
-#endif
-#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
-#endif
-#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
-#endif
-#ifndef LDBL_MIN
-#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
-#endif
-#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
-#endif
-#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
-#endif
-
-
-#define USHRT_DIG 4
-#define UINT_DIG 9
-#define ULONG_DIG 19
-#define UINTMAX_DIG ULONG_DIG
-
-#define FLT_ULONG_MAX 18446744073709551615.0F
-#define FLT_ULLONG_MAX FLT_ULONG_MAX
-#define FLT_UINTMAX_MAX FLT_ULONG_MAX
-#define FLT_LONG_MAX 9223372036854775807.0F
-#define FLT_LLONG_MAX FLT_LONG_MAX
-#define FLT_INTMAX_MAX FLT_LONG_MAX
-#define FLT_LONG_MIN (-9223372036854775808.0F)
-#define FLT_LLONG_MIN FLT_LONG_MIN
-#define FLT_INTMAX_MIN FLT_LONG_MIN
-
-#define DBL_ULONG_MAX 18446744073709551615.0
-#define DBL_ULLONG_MAX DBL_ULONG_MAX
-#define DBL_UINTMAX_MAX DBL_ULONG_MAX
-#define DBL_LONG_MAX 9223372036854775807.0
-#define DBL_LLONG_MAX DBL_LONG_MAX
-#define DBL_INTMAX_MAX DBL_LONG_MAX
-#define DBL_LONG_MIN (-9223372036854775808.0)
-#define DBL_LLONG_MIN DBL_LONG_MIN
-#define DBL_INTMAX_MIN DBL_LONG_MIN
-
-#define LDBL_ULONG_MAX 18446744073709551615.0L
-#define LDBL_ULLONG_MAX LDBL_ULONG_MAX
-#define LDBL_UINTMAX_MAX LDBL_ULONG_MAX
-#define LDBL_LONG_MAX 9223372036854775807.0L
-#define LDBL_LLONG_MAX LDBL_LONG_MAX
-#define LDBL_INTMAX_MAX LDBL_LONG_MAX
-#define LDBL_LONG_MIN (-9223372036854775808.0L)
-#define LDBL_LLONG_MIN LDBL_LONG_MIN
-#define LDBL_INTMAX_MIN LDBL_LONG_MIN
-
-#define FLTMAX_UINTMAX_MAX LDBL_UINTMAX_MAX
-#define FLTMAX_INTMAX_MAX LDBL_INTMAX_MAX
-#define FLTMAX_INTMAX_MIN LDBL_INTMAX_MIN
-
-typedef union _ast_dbl_exp_u
-{
- uint32_t e[sizeof(double)/4];
- double f;
-} _ast_dbl_exp_t;
-
-#define _ast_dbl_exp_index 0
-#define _ast_dbl_exp_shift 20
-
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 0
-#define _ast_fltmax_exp_shift 16
-
-#define _ast_flt_unsigned_max_t unsigned long long
-#define _ast_flt_nan_init 0x7f,0xff,0xff,0xff
-#define _ast_flt_inf_init 0x7f,0x80,0x00,0x00
-#define _ast_dbl_nan_init 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff
-#define _ast_dbl_inf_init 0x7f,0xf0,0x00,0x00,0x00,0x00,0x00,0x00
-#define _ast_ldbl_nan_init 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
-#define _ast_ldbl_inf_init 0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_fs.h b/usr/src/lib/libast/sparcv9/include/ast/ast_fs.h
deleted file mode 100644
index 00de1af89a..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_fs.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
-#ifndef _def_fs_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fs_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _lib_lstat 1 /* lstat() in default lib(s) */
-#define _lib_mknod 1 /* mknod() in default lib(s) */
-#define _lib_sync 1 /* sync() in default lib(s) */
-#include <sys/stat.h>
-#include <sys/mkdev.h>
-#define FS_default "ufs"
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
-#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
-#define _sys_mount 1 /* #include <sys/mount.h> ok */
-#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
-#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
-#define _sys_vfs 1 /* #include <sys/vfs.h> ok */
-#define _mem_st_blocks_stat 1 /* st_blocks is a member of struct stat */
-#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
-#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
-#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
-#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
-#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
-#define _lib_getmntent 1 /* getmntent() in default lib(s) */
-#define _lib_statfs 1 /* statfs() in default lib(s) */
-#define _lib_statvfs 1 /* statvfs() in default lib(s) */
-#define _lib_statfs4 1 /* compile{\ passed */
-#if _sys_statvfs
-#include <sys/statvfs.h>
-#if !_mem_statvfs_f_basetype
-#if _ary_f_reserved7
-#define f_basetype f_reserved7
-#endif
-#endif
-#else
-#define _mem_f_basetype_statvfs 1
-#define _mem_f_frsize_statvfs 1
-struct statvfs
-{
-unsigned long f_bsize; /* fundamental file system block size */
-unsigned long f_frsize; /* fragment size */
-unsigned long f_blocks; /* total # of blocks of f_frsize on fs */
-unsigned long f_bfree; /* total # of free blocks of f_frsize */
-unsigned long f_bavail; /* # of free blocks avail to non-superuser */
-unsigned long f_files; /* total # of file nodes (inodes) */
-unsigned long f_ffree; /* total # of free file nodes */
-unsigned long f_favail; /* # of free nodes avail to non-superuser */
-unsigned long f_fsid; /* file system id (dev for now) */
-char f_basetype[16]; /* target fs type name, null-terminated */
-unsigned long f_flag; /* bit-mask of flags */
-unsigned long f_namemax; /* maximum file name length */
-char f_fstr[32]; /* filesystem-specific string */
-unsigned long f_filler[16]; /* reserved for future expansion */
-};
-extern __MANGLE__ int fstatvfs __PROTO__((int, struct statvfs*));
-extern __MANGLE__ int statvfs __PROTO__((const char*, struct statvfs*));
-#endif
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_statvfs64 && !defined(statvfs)
-#define statvfs statvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int statvfs64 __PROTO__((const char*, struct statvfs64*));
-#endif
-#endif
-#if _lib_fstatvfs64 && !defined(fstatvfs)
-#define fstatvfs fstatvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int fstatvfs64 __PROTO__((int, struct statvfs64*));
-#endif
-#endif
-
-#define _str_st_fstype 1 /* stat.st_fstype is a string */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_getopt.h b/usr/src/lib/libast/sparcv9/include/ast/ast_getopt.h
deleted file mode 100644
index c86d826a72..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_getopt.h
+++ /dev/null
@@ -1,25 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#ifdef _AST_STD_I
-#undef _AST_GETOPT_H
-#define _AST_GETOPT_H -1
-#endif
-#ifndef _AST_GETOPT_H
-#define _AST_GETOPT_H 1
-
-extern __MANGLE__ int opterr;
-extern __MANGLE__ int optind;
-extern __MANGLE__ int optopt;
-extern __MANGLE__ char* optarg;
-
-extern __MANGLE__ int getopt __PROTO__((int, char* const*, const char*));
-extern __MANGLE__ int getsubopt __PROTO__((char**, char* const*, char**));
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_iconv.h b/usr/src/lib/libast/sparcv9/include/ast/ast_iconv.h
deleted file mode 100644
index ad8c67afd4..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_iconv.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
-#ifndef _def_iconv_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_iconv_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_iconv 1 /* #include <iconv.h> ok */
-#define _lib_iconv_open 1 /* iconv_open() in default lib(s) */
-#define _lib_iconv_close 1 /* iconv_close() in default lib(s) */
-#define _lib_iconv 1 /* iconv() in default lib(s) */
-#define _nxt_iconv <../include/iconv.h> /* include path for the native <iconv.h> */
-#define _nxt_iconv_str "../include/iconv.h" /* include string for the native <iconv.h> */
-#include <ast_common.h>
-#include <ccode.h>
-#include <../include/iconv.h> /* the native iconv.h */
-
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
-
-#ifndef _ICONV_LIST_PRIVATE_
-#undef iconv_t
-#define iconv_t _ast_iconv_t
-#undef iconv_f
-#define iconv_f _ast_iconv_f
-#undef iconv_list_t
-#define iconv_list_t _ast_iconv_list_t
-#undef iconv_open
-#define iconv_open _ast_iconv_open
-#undef iconv
-#define iconv _ast_iconv
-#undef iconv_close
-#define iconv_close _ast_iconv_close
-#undef iconv_list
-#define iconv_list _ast_iconv_list
-#undef iconv_move
-#define iconv_move _ast_iconv_move
-#undef iconv_name
-#define iconv_name _ast_iconv_name
-#undef iconv_write
-#define iconv_write _ast_iconv_write
-#endif
-
-typedef Ccmap_t _ast_iconv_list_t;
-typedef __V_* _ast_iconv_t;
-typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ _ast_iconv_t _ast_iconv_open __PROTO__((const char*, const char*));
-extern __MANGLE__ size_t _ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
-extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
-extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
-#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
-#else
-#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_lib.h b/usr/src/lib/libast/sparcv9/include/ast/ast_lib.h
deleted file mode 100644
index fa59597ffc..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_lib.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
-#ifndef _def_lib_ast
-#define _def_lib_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _hdr_fmtmsg 1 /* #include <fmtmsg.h> ok */
-#define _hdr_fnmatch 1 /* #include <fnmatch.h> ok */
-#define _hdr_libgen 1 /* #include <libgen.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_locale 1 /* #include <locale.h> ok */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_spawn 1 /* #include <spawn.h> ok */
-#define _hdr_syslog 1 /* #include <syslog.h> ok */
-#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
-#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
-#define _dat__tzname 1 /* _tzname in default lib(s) */
-#define _dat_tzname 1 /* tzname in default lib(s) */
-#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
-#define _lib_atexit 1 /* atexit() in default lib(s) */
-#define _lib_bcopy 1 /* bcopy() in default lib(s) */
-#define _lib_bzero 1 /* bzero() in default lib(s) */
-#define _lib_catclose 1 /* catclose() in default lib(s) */
-#define _lib_catgets 1 /* catgets() in default lib(s) */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_confstr 1 /* confstr() in default lib(s) */
-#define _lib_dup2 1 /* dup2() in default lib(s) */
-#define _lib_execlp 1 /* execlp() in default lib(s) */
-#define _lib_execve 1 /* execve() in default lib(s) */
-#define _lib_execvp 1 /* execvp() in default lib(s) */
-#define _lib_fchmod 1 /* fchmod() in default lib(s) */
-#define _lib_fcntl 1 /* fcntl() in default lib(s) */
-#define _lib_fmtmsg 1 /* fmtmsg() in default lib(s) */
-#define _lib_fnmatch 1 /* fnmatch() in default lib(s) */
-#define _lib_fork 1 /* fork() in default lib(s) */
-#define _lib_fsync 1 /* fsync() in default lib(s) */
-#define _lib_getdents 1 /* getdents() in default lib(s) */
-#define _lib_getdtablesize 1 /* getdtablesize() in default lib(s) */
-#define _lib_getdate 1 /* getdate() in default lib(s) */
-#define _lib_getgroups 1 /* getgroups() in default lib(s) */
-#define _lib_gethostname 1 /* gethostname() in default lib(s) */
-#define _lib_getlogin 1 /* getlogin() in default lib(s) */
-#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_getopt 1 /* getopt() in default lib(s) */
-#define _lib_getsubopt 1 /* getsubopt() in default lib(s) */
-#define _lib_getopt_long 1 /* getopt_long() in default lib(s) */
-#define _lib_getopt_long_only 1 /* getopt_long_only() in default lib(s) */
-#define _lib_glob 1 /* glob() in default lib(s) */
-#define _lib_index 1 /* index() in default lib(s) */
-#define _lib_iswblank 1 /* iswblank() in default lib(s) */
-#define _lib_iswctype 1 /* iswctype() in default lib(s) */
-#define _lib_killpg 1 /* killpg() in default lib(s) */
-#define _lib_link 1 /* link() in default lib(s) */
-#define _lib_localeconv 1 /* localeconv() in default lib(s) */
-#define _lib_madvise 1 /* madvise() in default lib(s) */
-#define _lib_mbtowc 1 /* mbtowc() in default lib(s) */
-#define _lib_mbrtowc 1 /* mbrtowc() in default lib(s) */
-#define _lib_memalign 1 /* memalign() in default lib(s) */
-#define _lib_memchr 1 /* memchr() in default lib(s) */
-#define _lib_memcpy 1 /* memcpy() in default lib(s) */
-#define _lib_memmove 1 /* memmove() in default lib(s) */
-#define _lib_memset 1 /* memset() in default lib(s) */
-#define _lib_mkdir 1 /* mkdir() in default lib(s) */
-#define _lib_mkfifo 1 /* mkfifo() in default lib(s) */
-#define _lib_mktemp 1 /* mktemp() in default lib(s) */
-#define _lib_mktime 1 /* mktime() in default lib(s) */
-#define _lib_mount 1 /* mount() in default lib(s) */
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _lib_pathconf 1 /* pathconf() in default lib(s) */
-#define _lib_readlink 1 /* readlink() in default lib(s) */
-#define _lib_remove 1 /* remove() in default lib(s) */
-#define _lib_rename 1 /* rename() in default lib(s) */
-#define _lib_rewinddir 1 /* rewinddir() in default lib(s) */
-#define _lib_rindex 1 /* rindex() in default lib(s) */
-#define _lib_rmdir 1 /* rmdir() in default lib(s) */
-#define _lib_setlocale 1 /* setlocale() in default lib(s) */
-#define _lib_setpgid 1 /* setpgid() in default lib(s) */
-#define _lib_setpgrp 1 /* setpgrp() in default lib(s) */
-#define _lib_setreuid 1 /* setreuid() in default lib(s) */
-#define _lib_setsid 1 /* setsid() in default lib(s) */
-#define _lib_setuid 1 /* setuid() in default lib(s) */
-#define _lib_sigaction 1 /* sigaction() in default lib(s) */
-#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
-#define _lib_socketpair 1 /* socketpair() in default lib(s) */
-#define _lib_strchr 1 /* strchr() in default lib(s) */
-#define _lib_strcoll 1 /* strcoll() in default lib(s) */
-#define _lib_strdup 1 /* strdup() in default lib(s) */
-#define _lib_strerror 1 /* strerror() in default lib(s) */
-#define _lib_strcasecmp 1 /* strcasecmp() in default lib(s) */
-#define _lib_strncasecmp 1 /* strncasecmp() in default lib(s) */
-#define _lib_strrchr 1 /* strrchr() in default lib(s) */
-#define _lib_strstr 1 /* strstr() in default lib(s) */
-#define _lib_strxfrm 1 /* strxfrm() in default lib(s) */
-#define _lib_strftime 1 /* strftime() in default lib(s) */
-#define _lib_swab 1 /* swab() in default lib(s) */
-#define _lib_symlink 1 /* symlink() in default lib(s) */
-#define _lib_sysconf 1 /* sysconf() in default lib(s) */
-#define _lib_sysinfo 1 /* sysinfo() in default lib(s) */
-#define _lib_syslog 1 /* syslog() in default lib(s) */
-#define _lib_telldir 1 /* telldir() in default lib(s) */
-#define _lib_tmpnam 1 /* tmpnam() in default lib(s) */
-#define _lib_tzset 1 /* tzset() in default lib(s) */
-#define _lib_unlink 1 /* unlink() in default lib(s) */
-#define _lib_utime 1 /* utime() in default lib(s) */
-#define _lib_wctype 1 /* wctype() in default lib(s) */
-#define _lib_ftruncate 1 /* ftruncate() in default lib(s) */
-#define _lib_truncate 1 /* truncate() in default lib(s) */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _lib_strtod 1 /* strtod() in default lib(s) */
-#define _lib_strtold 1 /* strtold() in default lib(s) */
-#define _lib_strtol 1 /* strtol() in default lib(s) */
-#define _lib_strtoll 1 /* strtoll() in default lib(s) */
-#define _lib_strtoul 1 /* strtoul() in default lib(s) */
-#define _lib_strtoull 1 /* strtoull() in default lib(s) */
-#define _hdr_signal 1 /* #include <signal.h> ok */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
-#define _npt_sigflag 1 /* sigflag() needs a prototype */
-#define _mem_d_ino_dirent 1 /* d_ino is a member of struct dirent */
-#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
-#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
-#define _mem_DIR 1 /* DIR is a non-opaque struct */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
-#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
-#define _sys_resource 1 /* #include <sys/resource.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _sys_stream 1 /* #include <sys/stream.h> ok */
-#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_off64_t 1 /* off64_t is a type */
-#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
-#define _tst_errno 1 /* errno can be assigned */
-#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
-#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
-#define _lib_select 1 /* select() has standard 5 arg interface */
-#define _pipe_rw 1 /* full duplex pipes */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _lib_vfork 1 /* vfork exists and it works */
-#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
-#define _hdr_string 1 /* #include <string.h> ok */
-#define _lib_memcmp 1 /* standard memcmp interface that works */
-#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_memccpy 1 /* standard memccpy interface that works */
-#define _lib_utime_now 1 /* utime works with 0 time vector */
-#define _UNIV_DEFAULT "att" /* default universe name */
-#define _std_cleanup 1 /* stuck with standard _cleanup */
-#define _std_strcoll 1 /* standard strcoll works */
-#if !_AST_no_spawnveg
-#define _use_spawnveg 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_limits.h b/usr/src/lib/libast/sparcv9/include/ast/ast_limits.h
deleted file mode 100644
index 38ebc94588..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_limits.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
-#ifndef _def_limits_ast
-#define _def_limits_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#ifndef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-#ifndef CHAR_MIN
-#define CHAR_MIN -128
-#endif
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1000000
-#endif
-#ifndef INT_MIN
-#define INT_MIN -2147483648
-#endif
-#ifndef LLONG_MAX
-#define LLONG_MAX 9223372036854775807
-#endif
-#ifndef LLONG_MIN
-#define LLONG_MIN -9223372036854775808
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN -2147483648
-#endif
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 5
-#endif
-#ifndef OPEN_MAX_CEIL
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-#define OPEN_MAX_CEIL OPEN_MAX
-#endif
-#ifndef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 4096
-#endif
-#ifndef PTRDIFF_MAX
-#define PTRDIFF_MAX 9223372036854775807
-#endif
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN -9223372036854775808
-#endif
-#ifndef SCHAR_MAX
-#define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-#define SCHAR_MIN -128
-#endif
-#ifndef SHRT_MIN
-#define SHRT_MIN -32768
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX 2147483647
-#endif
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN -2147483648
-#endif
-#ifndef SIZE_MAX
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295
-#endif
-#define SIZE_MAX UINT_MAX
-#endif
-#ifndef SSIZE_MAX
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-#define SSIZE_MAX INT_MAX
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#ifndef ULLONG_MAX
-#define ULLONG_MAX 18446744073709551615
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX 4294967295
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX 65535
-#endif
-#ifndef WCHAR_MAX
-#define WCHAR_MAX 2147483647
-#endif
-#ifndef WCHAR_MIN
-#define WCHAR_MIN -2147483648
-#endif
-#ifndef WINT_MAX
-#define WINT_MAX 2147483647
-#endif
-#ifndef WINT_MIN
-#define WINT_MIN -2147483648
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_map.h b/usr/src/lib/libast/sparcv9/include/ast/ast_map.h
deleted file mode 100644
index 098eec109f..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_map.h
+++ /dev/null
@@ -1,471 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
-#ifndef _def_map_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_map_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-/*
- * prototypes provided for standard interfaces hijacked
- * by ast and mapped to _ast_* but already prototyped
- * unmapped in native headers included by <ast_std.h>
- */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-
-#define _map_libc 1
-#undef basename
-#define basename _ast_basename
-#undef dirname
-#define dirname _ast_dirname
-#undef eaccess
-#define eaccess _ast_eaccess
-#undef execvpe
-#define execvpe _ast_execvpe
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-#undef fnmatch
-#define fnmatch _ast_fnmatch
-#undef fts_children
-#define fts_children _ast_fts_children
-#undef fts_close
-#define fts_close _ast_fts_close
-#undef fts_flags
-#define fts_flags _ast_fts_flags
-#undef fts_notify
-#define fts_notify _ast_fts_notify
-#undef fts_open
-#define fts_open _ast_fts_open
-#undef fts_read
-#define fts_read _ast_fts_read
-#undef fts_set
-#define fts_set _ast_fts_set
-#undef ftw
-#define ftw _ast_ftw
-#undef ftwalk
-#define ftwalk _ast_ftwalk
-#undef ftwflags
-#define ftwflags _ast_ftwflags
-#undef getcwd
-#define getcwd _ast_getcwd
-extern __MANGLE__ char* getcwd __PROTO__((char*, size_t));
-#undef getdate
-#define getdate _ast_getdate
-#undef getopt
-#define getopt _ast_getopt
-#undef getsubopt
-#define getsubopt _ast_getsubopt
-#undef getopt_long
-#define getopt_long _ast_getopt_long
-#undef getopt_long_only
-#define getopt_long_only _ast_getopt_long_only
-#undef optopt
-#define optopt _ast_optopt
-#undef optarg
-#define optarg _ast_optarg
-#undef optind
-#define optind _ast_optind
-#undef opterr
-#define opterr _ast_opterr
-#undef getwd
-#define getwd _ast_getwd
-extern __MANGLE__ char* getwd __PROTO__((char*));
-#undef glob
-#define glob _ast_glob
-#undef globfree
-#define globfree _ast_globfree
-#undef memdup
-#define memdup _ast_memdup
-#undef memfatal
-#define memfatal _ast_memfatal
-#undef memhash
-#define memhash _ast_memhash
-#undef memsum
-#define memsum _ast_memsum
-#undef mkstemp
-#define mkstemp _ast_mkstemp
-extern __MANGLE__ int mkstemp __PROTO__((char*));
-#undef mktemp
-#define mktemp _ast_mktemp
-extern __MANGLE__ char* mktemp __PROTO__((char*));
-#undef mktime
-#define mktime _ast_mktime
-#undef nftw
-#define nftw _ast_nftw
-#undef optctx
-#define optctx _ast_optctx
-#undef optesc
-#define optesc _ast_optesc
-#undef optget
-#define optget _ast_optget
-#undef opthelp
-#define opthelp _ast_opthelp
-#undef optjoin
-#define optjoin _ast_optjoin
-#undef optstr
-#define optstr _ast_optstr
-#undef optusage
-#define optusage _ast_optusage
-#undef pathaccess
-#define pathaccess _ast_pathaccess
-#undef pathbin
-#define pathbin _ast_pathbin
-#undef pathcanon
-#define pathcanon _ast_pathcanon
-#undef pathcat
-#define pathcat _ast_pathcat
-#undef pathcd
-#define pathcd _ast_pathcd
-#undef pathcheck
-#define pathcheck _ast_pathcheck
-#undef pathexists
-#define pathexists _ast_pathexists
-#undef pathfind
-#define pathfind _ast_pathfind
-#undef pathgetlink
-#define pathgetlink _ast_pathgetlink
-#undef pathinclude
-#define pathinclude _ast_pathinclude
-#undef pathkey
-#define pathkey _ast_pathkey
-#undef pathnative
-#define pathnative _ast_pathnative
-#undef pathpath
-#define pathpath _ast_pathpath
-#undef pathposix
-#define pathposix _ast_pathposix
-#undef pathprobe
-#define pathprobe _ast_pathprobe
-#undef pathprog
-#define pathprog _ast_pathprog
-#undef pathrepl
-#define pathrepl _ast_pathrepl
-#undef pathsetlink
-#define pathsetlink _ast_pathsetlink
-#undef pathshell
-#define pathshell _ast_pathshell
-#undef pathstat
-#define pathstat _ast_pathstat
-#undef pathtemp
-#define pathtemp _ast_pathtemp
-#undef pathtmp
-#define pathtmp _ast_pathtmp
-#undef procclose
-#define procclose _ast_procclose
-#undef procfree
-#define procfree _ast_procfree
-#undef procopen
-#define procopen _ast_procopen
-#undef procrun
-#define procrun _ast_procrun
-#undef putenv
-#define putenv _ast_putenv
-#undef re_comp
-#define re_comp _ast_re_comp
-#undef re_exec
-#define re_exec _ast_re_exec
-#undef realpath
-#define realpath _ast_realpath
-extern __MANGLE__ char* realpath __PROTO__((const char*, char*));
-#undef regaddclass
-#define regaddclass _ast_regaddclass
-#undef regalloc
-#define regalloc _ast_regalloc
-#undef regcache
-#define regcache _ast_regcache
-#undef regclass
-#define regclass _ast_regclass
-#undef regcmp
-#define regcmp _ast_regcmp
-#undef regcollate
-#define regcollate _ast_regcollate
-#undef regcomb
-#define regcomb _ast_regcomb
-#undef regcomp
-#define regcomp _ast_regcomp
-#undef regdecomp
-#define regdecomp _ast_regdecomp
-#undef regdup
-#define regdup _ast_regdup
-#undef regerror
-#define regerror _ast_regerror
-#undef regex
-#define regex _ast_regex
-#undef regexec
-#define regexec _ast_regexec
-#undef regfatal
-#define regfatal _ast_regfatal
-#undef regfatalpat
-#define regfatalpat _ast_regfatalpat
-#undef regfree
-#define regfree _ast_regfree
-#undef regncomp
-#define regncomp _ast_regncomp
-#undef regnexec
-#define regnexec _ast_regnexec
-#undef regrecord
-#define regrecord _ast_regrecord
-#undef regrexec
-#define regrexec _ast_regrexec
-#undef regstat
-#define regstat _ast_regstat
-#undef regsub
-#define regsub _ast_regsub
-#undef regsubcomp
-#define regsubcomp _ast_regsubcomp
-#undef regsubexec
-#define regsubexec _ast_regsubexec
-#undef regsubflags
-#define regsubflags _ast_regsubflags
-#undef regsubfree
-#define regsubfree _ast_regsubfree
-#undef remove
-#define remove _ast_remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#undef resolvepath
-#define resolvepath _ast_resolvepath
-extern __MANGLE__ int resolvepath __PROTO__((const char*, char*, size_t));
-#undef setenv
-#define setenv _ast_setenv
-extern __MANGLE__ int setenv __PROTO__((const char*, const char*, int));
-#undef setenviron
-#define setenviron _ast_setenviron
-#undef sigcritical
-#define sigcritical _ast_sigcritical
-#undef signal
-#define signal _ast_signal
-#undef sigunblock
-#define sigunblock _ast_sigunblock
-#undef stracmp
-#define stracmp _ast_stracmp
-#undef strcopy
-#define strcopy _ast_strcopy
-#undef strelapsed
-#define strelapsed _ast_strelapsed
-#undef stresc
-#define stresc _ast_stresc
-#undef streval
-#define streval _ast_streval
-#undef strexpr
-#define strexpr _ast_strexpr
-#undef strftime
-#define strftime _ast_strftime
-#undef strgid
-#define strgid _ast_strgid
-#undef strgrpmatch
-#define strgrpmatch _ast_strgrpmatch
-#undef strhash
-#define strhash _ast_strhash
-#undef strkey
-#define strkey _ast_strkey
-#undef strlcat
-#define strlcat _ast_strlcat
-extern __MANGLE__ size_t strlcat __PROTO__((char*, const char*, size_t));
-#undef strlcpy
-#define strlcpy _ast_strlcpy
-extern __MANGLE__ size_t strlcpy __PROTO__((char*, const char*, size_t));
-#undef strlook
-#define strlook _ast_strlook
-#undef strmatch
-#define strmatch _ast_strmatch
-#undef strmode
-#define strmode _ast_strmode
-#undef strnacmp
-#define strnacmp _ast_strnacmp
-#undef strncopy
-#define strncopy _ast_strncopy
-#undef strntod
-#define strntod _ast_strntod
-#undef strntol
-#define strntol _ast_strntol
-#undef strntold
-#define strntold _ast_strntold
-#undef strntoll
-#define strntoll _ast_strntoll
-#undef strntoul
-#define strntoul _ast_strntoul
-#undef strntoull
-#define strntoull _ast_strntoull
-#undef stropt
-#define stropt _ast_stropt
-#undef strperm
-#define strperm _ast_strperm
-#undef strpsearch
-#define strpsearch _ast_strpsearch
-#undef strptime
-#define strptime _ast_strptime
-#undef strsearch
-#define strsearch _ast_strsearch
-#undef strsort
-#define strsort _ast_strsort
-#undef strsubmatch
-#define strsubmatch _ast_strsubmatch
-#undef strsum
-#define strsum _ast_strsum
-#undef strtape
-#define strtape _ast_strtape
-#undef strtoip4
-#define strtoip4 _ast_strtoip4
-#undef strton
-#define strton _ast_strton
-#undef strtonll
-#define strtonll _ast_strtonll
-#undef struid
-#define struid _ast_struid
-#undef struniq
-#define struniq _ast_struniq
-#undef system
-#define system _ast_system
-extern __MANGLE__ int system __PROTO__((const char*));
-#undef tempnam
-#define tempnam _ast_tempnam
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-#undef tmpnam
-#define tmpnam _ast_tmpnam
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-#undef touch
-#define touch _ast_touch
-#undef wordexp
-#define wordexp _ast_wordexp
-#undef wordfree
-#define wordfree _ast_wordfree
-#undef unsetenv
-#define unsetenv _ast_unsetenv
-
-/* cannot override local malloc */
-#define _map_malloc 1
-#undef calloc
-#define calloc _ast_calloc
-extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
-#undef cfree
-#define cfree _ast_cfree
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-#undef free
-#define free _ast_free
-extern __MANGLE__ void free __PROTO__((__V_*));
-#undef malloc
-#define malloc _ast_malloc
-extern __MANGLE__ __V_* malloc __PROTO__((size_t));
-#undef memalign
-#define memalign _ast_memalign
-extern __MANGLE__ __V_* memalign __PROTO__((size_t, size_t));
-#undef realloc
-#define realloc _ast_realloc
-extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
-#undef strdup
-#define strdup _ast_strdup
-extern __MANGLE__ char* strdup __PROTO__((const char*));
-#undef valloc
-#define valloc _ast_valloc
-extern __MANGLE__ __V_* valloc __PROTO__((size_t));
-#undef strtol
-#define strtol _ast_strtol
-#undef strtoul
-#define strtoul _ast_strtoul
-#undef strtoll
-#define strtoll _ast_strtoll
-#undef strtoull
-#define strtoull _ast_strtoull
-#undef strtod
-#define strtod _ast_strtod
-#undef strtold
-#define strtold _ast_strtold
-extern __MANGLE__ long strtol __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned long strtoul __PROTO__((const char*, char**, int));
-extern __MANGLE__ double strtod __PROTO__((const char*, char**));
-#if !_UWIN
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
-extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h b/usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h
deleted file mode 100644
index f40fe38bf5..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
-#ifndef _def_mmap_ast
-#define _def_mmap_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_mmap 1 /* standard mmap interface that works */
-#define _lib_mmap64 1 /* mmap64 interface and implementation work */
-#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
-#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
-
-/* some systems get it wrong but escape concise detection */
-#ifndef _NO_MMAP
-#if __CYGWIN__
-#define _NO_MMAP 1
-#endif
-#endif
-
-#if _NO_MMAP
-#undef _lib_mmap
-#undef _lib_mmap64
-#undef _mmap_anon
-#undef _mmap_devzero
-#undef _mmap_worthy
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_mode.h b/usr/src/lib/libast/sparcv9/include/ast/ast_mode.h
deleted file mode 100644
index 3bf4ae7b5d..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_mode.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
-#ifndef _def_mode_ast
-#define _def_mode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define S_ITYPE(m) ((m)&S_IFMT)
-
-#define S_IPERM (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-
-#define _S_IDPERM 1
-#define _S_IDTYPE 1
-
-#define BUFFERSIZE 8192
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_namval.h b/usr/src/lib/libast/sparcv9/include/ast/ast_namval.h
deleted file mode 100644
index fefe46a0c7..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_namval.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_ndbm.h b/usr/src/lib/libast/sparcv9/include/ast/ast_ndbm.h
deleted file mode 100644
index 1c9cedb019..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_ndbm.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
-#ifndef _def_ndbm_ast
-#define _def_ndbm_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_ndbm 1 /* #include <ndbm.h> ok */
-#include <ndbm.h>
-#define _use_ndbm 1
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_nl_types.h b/usr/src/lib/libast/sparcv9/include/ast/ast_nl_types.h
deleted file mode 100644
index 9ae905cbca..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_nl_types.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
-#ifndef _def_nl_types_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_nl_types_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_nl_langinfo 1 /* nl_langinfo() in default lib(s) */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_langinfo 1 /* #include <langinfo.h> ok */
-#define _nxt_nl_types <../include/nl_types.h> /* include path for the native <nl_types.h> */
-#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native <nl_types.h> */
-#include <limits.h>
-#include <../include/nl_types.h> /* the native nl_types.h */
-
-#undef NL_SETMAX
-#define NL_SETMAX 1023
-#undef NL_MSGMAX
-#define NL_MSGMAX 32767
-#undef nl_catd
-#define nl_catd _ast_nl_catd
-#undef catopen
-#define catopen _ast_catopen
-#undef catgets
-#define catgets _ast_catgets
-#undef catclose
-#define catclose _ast_catclose
-
-typedef __V_* nl_catd;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ nl_catd catopen __PROTO__((const char*, int));
-extern __MANGLE__ char* catgets __PROTO__((nl_catd, int, int, const char*));
-extern __MANGLE__ int catclose __PROTO__((nl_catd));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_param.h b/usr/src/lib/libast/sparcv9/include/ast/ast_param.h
deleted file mode 100644
index b45bd19a06..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_param.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
-#ifndef _def_param_ast
-#define _def_param_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#include <sys/param.h>
-#ifndef S_IFDIR
-#include <sys/stat.h>
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_standards.h b/usr/src/lib/libast/sparcv9/include/ast/ast_standards.h
deleted file mode 100644
index e4ba7cee74..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_standards.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_std.h b/usr/src/lib/libast/sparcv9/include/ast/ast_std.h
deleted file mode 100644
index f98d1861b9..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_std.h
+++ /dev/null
@@ -1,374 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Advanced Software Technology Library
- * AT&T Research
- *
- * a union of standard headers that works
- * with local extensions enabled
- * and local omission compensation
- */
-
-#ifndef _AST_STD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_STD_H 1
-#define _AST_STD_I 1
-
-#include <ast_common.h>
-
-#if _BLD_ast
-#define _BLD_cdt 1
-#define _BLD_sfio 1
-#if !_UWIN
-#define _BLD_vmalloc 1
-#endif
-#endif
-
-#ifdef _SFSTDIO_H
-#define _SKIP_SFSTDIO_H
-#else
-#define _SFSTDIO_H
-#ifndef FILE
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-#define FILE struct _sfio_s
-#ifndef __FILE_typedef
-#define __FILE_typedef 1
-#endif
-#ifndef _FILEDEFED
-#define _FILEDEFED 1
-#endif
-#endif
-#endif
-
-#include <ast_lib.h>
-#include <ast_sys.h>
-#include <ast_getopt.h> /* <stdlib.h> does this */
-#include <ast_fcntl.h>
-#include <ast_limits.h>
-#include <ast_botch.h>
-
-#ifdef _SKIP_SFSTDIO_H
-#undef _SKIP_SFSTDIO_H
-#else
-#undef _SFSTDIO_H
-#undef FILE
-#endif
-
-/* locale stuff */
-
-#if !_hdr_locale
-
-struct lconv
-{
- char* decimal_point;
- char* thousands_sep;
- char* grouping;
- char* int_curr_symbol;
- char* currency_symbol;
- char* mon_decimal_point;
- char* mon_thousands_sep;
- char* mon_grouping;
- char* positive_sign;
- char* negative_sign;
- char int_frac_digits;
- char frac_digits;
- char p_cs_precedes;
- char p_sep_by_space;
- char n_cs_precedes;
- char n_sep_by_space;
- char p_sign_posn;
- char n_sign_posn;
-};
-
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_UWIN /* for ast54 compatibility */
-
-#undef getenv
-#define getenv _ast_getenv
-
-#undef setenviron
-#define setenviron _ast_setenviron
-
-extern __MANGLE__ char* getenv __PROTO__((const char*));
-
-#endif
-
-#undef localeconv
-#define localeconv _ast_localeconv
-
-#undef setlocale
-#define setlocale _ast_setlocale
-
-#undef strerror
-#define strerror _ast_strerror
-
-extern __MANGLE__ struct lconv* localeconv __PROTO__((void));
-extern __MANGLE__ char* setenviron __PROTO__((const char*));
-extern __MANGLE__ char* setlocale __PROTO__((int, const char*));
-extern __MANGLE__ char* strerror __PROTO__((int));
-
-#define AST_MESSAGE_SET 3 /* see <mc.h> mcindex() */
-
-/*
- * maintain this order when adding categories
- */
-
-#define AST_LC_ALL 0
-#define AST_LC_COLLATE 1
-#define AST_LC_CTYPE 2
-#define AST_LC_MESSAGES 3
-#define AST_LC_MONETARY 4
-#define AST_LC_NUMERIC 5
-#define AST_LC_TIME 6
-#define AST_LC_IDENTIFICATION 7
-#define AST_LC_ADDRESS 8
-#define AST_LC_NAME 9
-#define AST_LC_TELEPHONE 10
-#define AST_LC_XLITERATE 11
-#define AST_LC_MEASUREMENT 12
-#define AST_LC_PAPER 13
-#define AST_LC_COUNT 14
-#define AST_LC_LANG 255
-
-#define AST_LC_internal 1
-#define AST_LC_setenv (1L<<27)
-#define AST_LC_find (1L<<28)
-#define AST_LC_debug (1L<<29)
-#define AST_LC_setlocale (1L<<30)
-#define AST_LC_translate (1L<<31)
-
-#ifndef LC_ALL
-#define LC_ALL (-AST_LC_ALL)
-#endif
-#ifndef LC_COLLATE
-#define LC_COLLATE (-AST_LC_COLLATE)
-#endif
-#ifndef LC_CTYPE
-#define LC_CTYPE (-AST_LC_CTYPE)
-#endif
-#ifndef LC_MESSAGES
-#define LC_MESSAGES (-AST_LC_MESSAGES)
-#endif
-#ifndef LC_MONETARY
-#define LC_MONETARY (-AST_LC_MONETARY)
-#endif
-#ifndef LC_NUMERIC
-#define LC_NUMERIC (-AST_LC_NUMERIC)
-#endif
-#ifndef LC_TIME
-#define LC_TIME (-AST_LC_TIME)
-#endif
-#ifndef LC_ADDRESS
-#define LC_ADDRESS (-AST_LC_ADDRESS)
-#endif
-#ifndef LC_IDENTIFICATION
-#define LC_IDENTIFICATION (-AST_LC_IDENTIFICATION)
-#endif
-#ifndef LC_NAME
-#define LC_NAME (-AST_LC_NAME)
-#endif
-#ifndef LC_TELEPHONE
-#define LC_TELEPHONE (-AST_LC_TELEPHONE)
-#endif
-#ifndef LC_XLITERATE
-#define LC_XLITERATE (-AST_LC_XLITERATE)
-#endif
-#ifndef LC_MEASUREMENT
-#define LC_MEASUREMENT (-AST_LC_MEASUREMENT)
-#endif
-#ifndef LC_PAPER
-#define LC_PAPER (-AST_LC_PAPER)
-#endif
-#ifndef LC_LANG
-#define LC_LANG (-AST_LC_LANG)
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#undef strcoll
-#if _std_strcoll
-#define strcoll _ast_info.collate
-#else
-#define strcoll strcmp
-#endif
-
-typedef struct
-{
-
- char* id;
-
- struct
- {
- uint32_t serial;
- uint32_t set;
- } locale;
-
- long tmp_long;
- size_t tmp_size;
- short tmp_short;
- char tmp_char;
- wchar_t tmp_wchar;
-
- int (*collate) __PROTO__((const char*, const char*));
-
- int tmp_int;
- __V_* tmp_pointer;
-
- int mb_cur_max;
- int (*mb_len) __PROTO__((const char*, size_t));
- int (*mb_towc) __PROTO__((wchar_t*, const char*, size_t));
- size_t (*mb_xfrm) __PROTO__((char*, const char*, size_t));
- int (*mb_width) __PROTO__((wchar_t));
- int (*mb_conv) __PROTO__((char*, wchar_t));
-
- uint32_t env_serial;
- uint32_t mb_sync;
- uint32_t version;
-
- char pad[936];
-
-} _Ast_info_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ _Ast_info_t _ast_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/* largefile hackery -- ast uses the large versions by default */
-
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if !defined(ftruncate) && _lib_ftruncate64
-#define ftruncate ftruncate64
-extern __MANGLE__ int ftruncate64 __PROTO__((int, off64_t));
-#endif
-#if !defined(lseek) && _lib_lseek64
-#define lseek lseek64
-extern __MANGLE__ off64_t lseek64 __PROTO__((int, off64_t, int));
-#endif
-#if !defined(truncate) && _lib_truncate64
-#define truncate truncate64
-extern __MANGLE__ int truncate64 __PROTO__((const char*, off64_t));
-#endif
-
-/* direct macro access for bsd crossover */
-
-#if !defined(__cplusplus)
-
-#if !defined(memcpy) && !defined(_lib_memcpy) && defined(_lib_bcopy)
-#define memcpy(t,f,n) (bcopy(f,t,n),(t))
-#endif
-
-#if !defined(memzero) && !defined(_lib_memzero)
-#if defined(_lib_memset) || !defined(_lib_bzero)
-#define memzero(b,n) memset(b,0,n)
-#else
-#define memzero(b,n) (bzero(b,n),(b))
-#endif
-#endif
-
-#endif
-
-#if !defined(remove)
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-
-#if !defined(rename)
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-
-#if !defined(strchr) && !defined(_lib_strchr) && defined(_lib_index)
-#define strchr(s,c) index(s,c)
-#endif
-
-#if !defined(strrchr) && !defined(_lib_strrchr) && defined(_lib_rindex)
-#define strrchr(s,c) rindex(s,c)
-#endif
-
-/* and now introducing prototypes botched by the standard(s) */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#undef getpgrp
-#define getpgrp() _ast_getpgrp()
-extern __MANGLE__ int _ast_getpgrp __PROTO__((void));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-/*
- * and finally, standard interfaces hijacked by ast
- * _AST_STD_I delays headers that require <ast_map.h>
- */
-
-#include <ast_map.h>
-
-#undef _AST_STD_I
-
-#if _AST_GETOPT_H < 0
-#undef _AST_GETOPT_H
-#include <ast_getopt.h>
-#endif
-
-#if _GETOPT_H < 0
-#undef _GETOPT_H
-#include <getopt.h>
-#endif
-
-#if _REGEX_H < 0
-#undef _REGEX_H
-#include <regex.h>
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_stdio.h b/usr/src/lib/libast/sparcv9/include/ast/ast_stdio.h
deleted file mode 100644
index 452b524320..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_stdio.h
+++ /dev/null
@@ -1,608 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
-#ifndef _SFSTDIO_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFSTDIO_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define __FILE_typedef 1
-#define _FILE_DEFINED 1
-#define _FILE_defined 1
-#define _FILEDEFED 1
-
-#ifndef __FILE_TAG
-#define __FILE_TAG _sfio_s
-#endif
-
-#undef FILE
-#undef _FILE
-#undef fpos_t
-#undef fpos64_t
-
-typedef struct _sfio_s _sfio_FILE;
-
-#define FILE _sfio_FILE
-#define _FILE FILE
-
-#if !defined(__FILE) && !__CYGWIN__
-#undef __FILE
-#define __FILE FILE
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define BUFSIZ SF_BUFSIZE
-
-#else
-
-#ifndef BUFSIZ
-#define BUFSIZ 8192
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#include <ast_std.h>
-
-#include <sfio_s.h>
-
-#if __cplusplus
-#define _sf_(f) (f)
-#else
-#define _sf_(f) ((struct _sfio_s*)(f))
-#endif
-
-#define _SF_EOF 0000200
-#define _SF_ERROR 0000400
-
-#endif
-
-#ifdef _NO_LARGEFILE64_SOURCE
-#undef _LARGEFILE64_SOURCE
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#undef off_t
-#endif
-
-#define fpos_t _ast_fpos_t
-#if _typ_int64_t
-#define fpos64_t _ast_fpos_t
-#endif
-
-typedef struct _ast_fpos_s
-{
- intmax_t _sf_offset;
- unsigned char _sf_state[64 - sizeof(intmax_t)];
-} _ast_fpos_t;
-
-#define _base _data
-#define _ptr _next
-#define _IOFBF 0
-#define _IONBF 1
-#define _IOLBF 2
-
-#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
-
-#undef FILE
-#define FILE FILE
-typedef struct _sfio_s FILE;
-
-#undef strerror
-extern __MANGLE__ char* strerror(int) __THROW;
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-extern __MANGLE__ void flockfile __PROTO__((FILE*));
-extern __MANGLE__ int ftrylockfile __PROTO__((FILE*));
-extern __MANGLE__ void funlockfile __PROTO__((FILE*));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 1024
-#endif
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 20
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-
-#define _doprnt _ast_doprnt
-#define _doscan _ast_doscan
-#define asprintf _ast_asprintf
-#define clearerr _ast_clearerr
-#define fclose _ast_fclose
-#define fdopen _ast_fdopen
-#define fflush _ast_fflush
-#define fgetc _ast_fgetc
-#define fgetpos _ast_fgetpos
-#define fgetpos64 _ast_fgetpos64
-#define fgets _ast_fgets
-#define fopen _ast_fopen
-#define fprintf _ast_fprintf
-#define fpurge _ast_fpurge
-#define fputs _ast_fputs
-#define fread _ast_fread
-#define freopen _ast_freopen
-#define fscanf _ast_fscanf
-#define fseek _ast_fseek
-#define fseek64 _ast_fseek64
-#define fseeko _ast_fseeko
-#define fseeko64 _ast_fseeko64
-#define fsetpos _ast_fsetpos
-#define fsetpos64 _ast_fsetpos64
-#define ftell _ast_ftell
-#define ftell64 _ast_ftell64
-#define ftello _ast_ftello
-#define ftello64 _ast_ftello64
-#define fwrite _ast_fwrite
-#define gets _ast_gets
-#define getw _ast_getw
-#define pclose _ast_pclose
-#define popen _ast_popen
-#define printf _ast_printf
-#define puts _ast_puts
-#define putw _ast_putw
-#define rewind _ast_rewind
-#define scanf _ast_scanf
-#define setbuf _ast_setbuf
-#undef setbuffer
-#define setbuffer _ast_setbuffer
-#define setlinebuf _ast_setlinebuf
-#define setvbuf _ast_setvbuf
-#define snprintf _ast_snprintf
-#define sprintf _ast_sprintf
-#define sscanf _ast_sscanf
-#define tmpfile _ast_tmpfile
-#define ungetc _ast_ungetc
-#define vasprintf _ast_vasprintf
-#define vfprintf _ast_vfprintf
-#define vfscanf _ast_vfscanf
-#define vprintf _ast_vprintf
-#define vscanf _ast_vscanf
-#define vsnprintf _ast_vsnprintf
-#define vsprintf _ast_vsprintf
-#define vsscanf _ast_vsscanf
-#define fcloseall _ast_fcloseall
-#define _filbuf _ast__filbuf
-#define fmemopen _ast_fmemopen
-#define __getdelim _ast___getdelim
-#define getdelim _ast_getdelim
-#define getline _ast_getline
-#define clearerr_unlocked _ast_clearerr_unlocked
-#define feof_unlocked _ast_feof_unlocked
-#define ferror_unlocked _ast_ferror_unlocked
-#define fflush_unlocked _ast_fflush_unlocked
-#define fgetc_unlocked _ast_fgetc_unlocked
-#define fgets_unlocked _ast_fgets_unlocked
-#define fileno_unlocked _ast_fileno_unlocked
-#define fputc_unlocked _ast_fputc_unlocked
-#define fputs_unlocked _ast_fputs_unlocked
-#define fread_unlocked _ast_fread_unlocked
-#define fwrite_unlocked _ast_fwrite_unlocked
-#define getc_unlocked _ast_getc_unlocked
-#define getchar_unlocked _ast_getchar_unlocked
-#define putc_unlocked _ast_putc_unlocked
-#define putchar_unlocked _ast_putchar_unlocked
-#define flockfile _ast_flockfile
-#define ftrylockfile _ast_ftrylockfile
-#define funlockfile _ast_funlockfile
-
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:initial
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
-#endif
-#ifndef L_ctermid
-#define L_ctermid 9
-#endif
-#ifndef L_tmpnam
-#define L_tmpnam 25
-#endif
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#if defined(__cplusplus) && defined(__THROW)
-extern __MANGLE__ char* ctermid(char*) __THROW;
-#else
-extern __MANGLE__ char* ctermid __PROTO__((char*));
-#endif
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-extern __MANGLE__ void perror __PROTO__((const char*));
-#ifndef _AST_STD_H
-#ifndef remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-#ifndef rename
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#ifdef _LARGEFILE64_SOURCE
-
-#undef fpos_t
-#undef off_t
-#undef fgetpos
-#undef fsetpos
-#undef fseek
-#undef fseeko
-#undef ftell
-#undef ftello
-
-#define fpos_t fpos64_t
-#if _typ_off64_t
-#define off_t off64_t
-#else
-#define off_t int64_t
-#endif
-
-#define fgetpos fgetpos64
-#define fsetpos fsetpos64
-#define fseek fseek64
-#define fseeko fseeko64
-#define ftell ftell64
-#define ftello ftello64
-
-#endif
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_DLL && _DLL_INDIRECT_DATA
-
-#define stdin ((FILE*)_ast_dll->_ast_stdin)
-#define stdout ((FILE*)_ast_dll->_ast_stdout)
-#define stderr ((FILE*)_ast_dll->_ast_stderr)
-
-#else
-
-#define stdin (&_Sfstdin)
-#define stdout (&_Sfstdout)
-#define stderr (&_Sfstderr)
-
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define feof(f) sfeof(f)
-#define ferror(f) sferror(f)
-#define fileno(f) sffileno(f)
-#define fputc(c,f) sfputc(f,c)
-#define getc(f) sfgetc(f)
-#define getchar() sfgetc(sfstdin)
-#define putc(c,f) sfputc(f,c)
-#define putchar(c) sfputc(sfstdout,c)
-
-#else
-
-#if !_UWIN
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-#endif
-
-extern __MANGLE__ FILE _Sfstdin;
-extern __MANGLE__ FILE _Sfstdout;
-extern __MANGLE__ FILE _Sfstderr;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define feof(f) (_sf_(f)->_flags&_SF_EOF)
-#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
-#define fileno(f) (_sf_(f)->_file)
-#define fputc(c,f) (_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
-#define getc(f) (_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
-#define getchar() getc(stdin)
-#define putc(c,f) fputc(c,f)
-#define putchar(c) fputc(c,stdout)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _sffilbuf __PROTO__((FILE*, int));
-extern __MANGLE__ int _sfflsbuf __PROTO__((FILE*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_sys.h b/usr/src/lib/libast/sparcv9/include/ast/ast_sys.h
deleted file mode 100644
index 48325698c8..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_sys.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
-#ifndef _AST_SYS_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_SYS_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#if __mips == 2 && !defined(_NO_LARGEFILE64_SOURCE)
-#define _NO_LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_NO_LARGEFILE64_SOURCE) && _typ_off64_t && _lib_lseek64 && _lib_stat64
-#if !defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#else
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#undef _typ_off64_t
-#undef _typ_struct_dirent64
-#undef _lib_creat64
-#undef _lib_fstat64
-#undef _lib_fstatvfs64
-#undef _lib_ftruncate64
-#undef _lib_lseek64
-#undef _lib_lstat64
-#undef _lib_mmap64
-#undef _lib_open64
-#undef _lib_readdir64
-#undef _lib_stat64
-#undef _lib_statvfs64
-#undef _lib_truncate64
-#endif
-#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
-#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
-#endif
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <locale.h>
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _typ_dev_t 1 /* dev_t is a type */
-#define _typ_nlink_t 1 /* nlink_t is a type */
-#define _typ_gid_t 1 /* gid_t is a type */
-#define _typ_mode_t 1 /* mode_t is a type */
-#define _typ_uid_t 1 /* uid_t is a type */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _typ_wchar_t 1 /* wchar_t is a type */
-#define _typ_pid_t 1 /* pid_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _typ_wint_t 1 /* wint_t is a type */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _typ_socklen_t 1 /* socklen_t is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_ino_t 1 /* ino_t is a type */
-#define _typ_off_t 1 /* off_t is a type */
-#define _typ_ptrdiff_t 1 /* ptrdiff_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#define _typ_div_t 1 /* div_t is a type */
-#define _typ_ldiv_t 1 /* ldiv_t is a type */
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
-extern __MANGLE__ pid_t spawnveg __PROTO__((const char*, char* const[], char* const[], pid_t));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#if !defined(va_start)
-#if defined(__STDARG__)
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_time.h b/usr/src/lib/libast/sparcv9/include/ast/ast_time.h
deleted file mode 100644
index b28079deb7..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_time.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
-#ifndef _def_time_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_time_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */
-#define _lib_usleep 1 /* usleep() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#include <sys/time.h>
-
-#include <sys/times.h>
-
-#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
-#define CLOCKS_PER_SEC CLK_TCK
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_tty.h b/usr/src/lib/libast/sparcv9/include/ast/ast_tty.h
deleted file mode 100644
index 4570336b1d..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_tty.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
-#ifndef _def_tty_ast
-#define _def_tty_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_termios 1 /* #include <termios.h> ok */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
-
-#ifdef _hdr_termios
-# if _mac__POSIX_VDISABLE
-# undef _POSIX_VDISABLE
-# endif
-# include <termios.h>
-#else
-# if defined(_sys_termios) && defined(_lib_tcgetattr)
-# include <sys/termios.h>
-# define _hdr_termios 1
-# else
-# undef _sys_termios
-# endif /* _sys_termios */
-#endif /* _hdr_termios */
-
-#ifdef _hdr_termios
-# undef _hdr_sgtty
-# undef tcgetattr
-# undef tcsetattr
-# undef tcgetpgrp
-# undef tcsetpgrp
-# undef cfgetospeed
-# ifndef TCSANOW
-# define TCSANOW TCSETS
-# define TCSADRAIN TCSETSW
-# define TCSAFLUSH TCSETSF
-# endif /* TCSANOW */
- /* The following corrects bugs in some implementations */
-# if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
-# define TCSAFLUSH TCSADFLUSH
-# endif /* TCSADFLUSH */
-# ifndef _lib_tcgetattr
-# undef tcgetattr
-# define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
-# undef tcsetattr
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# undef cfgetospeed
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# endif /* _lib_tcgetattr */
-# undef TIOCGETC
-#else
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# ifdef _hdr_termio
-# include <termio.h>
-# else
-# ifdef _sys_termio
-# include <sys/termio.h>
-# define _hdr_termio 1
-# endif /* _sys_termio */
-# endif /* _hdr_termio */
-# ifdef _hdr_termio
-# define termios termio
-# undef TIOCGETC
-# define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-
-# ifdef _sys_bsdtty
-# include <sys/bsdtty.h>
-# endif /* _sys_bsdtty */
-# else
-# ifdef _hdr_sgtty
-# include <sgtty.h>
-# ifndef LPENDIN
-# ifdef _sys_nttyio
-# include <sys/nttyio.h>
-# endif /* _sys_nttyio */
-# endif /* LPENDIN */
-# define termios sgttyb
-# ifdef TIOCSETN
-# undef TCSETAW
-# endif /* TIOCSETN */
-# ifdef TIOCGETP
-# define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# else
-# define tcgetattr(fd,tty) gtty(fd, tty)
-# define tcsetattr(fd,action,tty) stty(fd, tty)
-# endif /* TIOCGETP */
-# else
-# ifdef _sys_ttyio
-# include <sys/ttyio.h>
-# endif
-# endif /* _hdr_sgtty */
-# endif /* hdr_termio */
-
-# ifndef TCSANOW
-# ifdef TCSETAW
-# define TCSANOW TCSETA
-# define TCSAFLUSH TCSETAF
-# else
-# ifdef TIOCSETN
-# define TCSANOW TIOCSETN
-# define TCSADRAIN TIOCSETN
-# define TCSAFLUSH TIOCSETP
-# endif /* TIOCSETN */
-# endif /* TCSETAW */
-# endif /* TCSANOW */
-#endif /* _hdr_termios */
-
-/* set ECHOCTL if driver can echo control charaters as ^c */
-#ifdef LCTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LCTLECH
-# endif /* !ECHOCTL */
-#endif /* LCTLECH */
-#ifdef LNEW_CTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LNEW_CTLECH
-# endif /* !ECHOCTL */
-#endif /* LNEW_CTLECH */
-#ifdef LNEW_PENDIN
-# ifndef PENDIN
-# define PENDIN LNEW_PENDIN
-# endif /* !PENDIN */
-#endif /* LNEW_PENDIN */
-
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_version.h b/usr/src/lib/libast/sparcv9/include/ast/ast_version.h
deleted file mode 100644
index b3ba546e3a..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_version.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#define _AST_VERSION 20100102L
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_vfork.h b/usr/src/lib/libast/sparcv9/include/ast/ast_vfork.h
deleted file mode 100644
index 2701ef429b..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_vfork.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
-#ifndef _def_vfork_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_vfork_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_wait.h b/usr/src/lib/libast/sparcv9/include/ast/ast_wait.h
deleted file mode 100644
index 792608c906..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_wait.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
-#ifndef _def_wait_ast
-#define _def_wait_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_wait 1 /* wait() in default lib(s) */
-#define _lib_wait3 1 /* wait3() in default lib(s) */
-#define _lib_wait4 1 /* wait4() in default lib(s) */
-#define _lib_waitpid 1 /* waitpid() in default lib(s) */
-#define _sys_wait 1 /* #include <sys/wait.h> ok */
-#define _ok_wif 1 /* posix wait macros ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_wchar.h b/usr/src/lib/libast/sparcv9/include/ast/ast_wchar.h
deleted file mode 100644
index bdbcdc16da..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_wchar.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_wchar_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */
-#define _lib_wctomb 1 /* wctomb() in default lib(s) */
-#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */
-#define _lib_wcslen 1 /* wcslen() in default lib(s) */
-#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */
-#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */
-#define _lib_towlower 1 /* towlower() in default lib(s) */
-#define _lib_towupper 1 /* towupper() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_mbstate_t 1 /* mbstate_t is a type */
-#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */
-#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */
-#ifndef _SFSTDIO_H
-#include <ast_common.h>
-#include <stdio.h>
-#endif
-#if _hdr_wchar && defined(_nxt_wchar)
-#include <../include/wchar.h> /* the native wchar.h */
-#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
-
-#ifndef WEOF
-#define WEOF (-1)
-#endif
-
-#undef fgetwc
-#undef fgetws
-#undef fputwc
-#undef fputws
-#undef getwc
-#undef getwchar
-#undef getws
-#undef putwc
-#undef putwchar
-#undef ungetwc
-
-#define fgetwc _ast_fgetwc
-#define fgetws _ast_fgetws
-#define fputwc _ast_fputwc
-#define fputws _ast_fputws
-#define fwide _ast_fwide
-#define fwprintf _ast_fwprintf
-#define fwscanf _ast_fwscanf
-#define getwc _ast_getwc
-#define getwchar _ast_getwchar
-#define getws _ast_getws
-#define putwc _ast_putwc
-#define putwchar _ast_putwchar
-#define swprintf _ast_swprintf
-#define swscanf _ast_swscanf
-#define ungetwc _ast_ungetwc
-#define vfwprintf _ast_vfwprintf
-#define vfwscanf _ast_vfwscanf
-#define vswprintf _ast_vswprintf
-#define vswscanf _ast_vswscanf
-#define vwprintf _ast_vwprintf
-#define vwscanf _ast_vwscanf
-#define wprintf _ast_wprintf
-#define wscanf _ast_wscanf
-
-#if !_typ_mbstate_t
-#undef _typ_mbstate_t
-#define _typ_mbstate_t 1
-typedef char mbstate_t;
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_mbstowcs
-extern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t));
-#endif
-#if !_lib_wctomb
-extern __MANGLE__ int wctomb __PROTO__((char*, wchar_t));
-#endif
-#if !_lib_wcrtomb
-extern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
-#endif
-#if !_lib_wcslen
-extern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*));
-#endif
-#if !_lib_wcstombs
-extern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t));
-#endif
-
-extern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ wint_t fgetwc __PROTO__((FILE*));
-extern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*));
-extern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*));
-extern __MANGLE__ int fwide __PROTO__((FILE*, int));
-extern __MANGLE__ wint_t getwc __PROTO__((FILE*));
-extern __MANGLE__ wint_t getwchar __PROTO__((void));
-extern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*));
-extern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ wint_t putwchar __PROTO__((wchar_t));
-extern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
-extern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
-extern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*));
-extern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
-extern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
-extern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...));
-extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ast_windows.h b/usr/src/lib/libast/sparcv9/include/ast/ast_windows.h
deleted file mode 100644
index 65590c17b4..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ast_windows.h
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * AT&T Research
- *
- * ast <windows.h> wrapper
- * for libast only
- * include after ast headers
- */
-
-#ifndef _AST_WINDOWS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_WINDOWS_H 1
-
-#undef SF_ERROR /* clash in <oaidl.h> */
-
-#include <windows.h>
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/bytesex.h b/usr/src/lib/libast/sparcv9/include/ast/bytesex.h
deleted file mode 100644
index 1f78d13287..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/bytesex.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * linux/gnu compatibility
- */
-
-#ifndef _BYTESEX_H
-#define _BYTESEX_H
-
-#include <ast_common.h>
-
-#undef __BYTE_ORDER
-
-#if ( _ast_intswap & 3 ) == 3
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#else
-#if ( _ast_intswap & 3 ) == 1
-#define __BYTE_ORDER __PDP_ENDIAN
-#else
-#define __BYTE_ORDER __BIG_ENDIAN
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ccode.h b/usr/src/lib/libast/sparcv9/include/ast/ccode.h
deleted file mode 100644
index ae50c63b16..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ccode.h
+++ /dev/null
@@ -1,101 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * character code map interface
- *
- * NOTE: used for mapping between 8-bit character encodings
- * ISO character sets are handled by sfio
- */
-
-#ifndef _CHARCODE_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _CHARCODE_H 1
-
-#include <ast_common.h>
-#include <ast_ccode.h>
-
-typedef struct Ccmap_s
-{
- const char* name; /* code set name */
- const char* match; /* strmatch() pattern */
- const char* desc; /* code set description */
- const char* canon; /* canonical name format */
- const char* index; /* default index */
- int ccode; /* <ccode.h> code index */
- __V_* data; /* map specific data */
-} Ccmap_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ unsigned char* _ccmap __PROTO__((int, int));
-extern __MANGLE__ __V_* _ccmapcpy __PROTO__((unsigned char*, __V_*, const __V_*, size_t));
-extern __MANGLE__ __V_* _ccmapstr __PROTO__((unsigned char*, __V_*, size_t));
-
-extern __MANGLE__ int ccmapid __PROTO__((const char*));
-extern __MANGLE__ char* ccmapname __PROTO__((int));
-extern __MANGLE__ __V_* ccnative __PROTO__((__V_*, const __V_*, size_t));
-extern __MANGLE__ Ccmap_t* ccmaplist __PROTO__((Ccmap_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define CCOP(i,o) ((i)==(o)?0:(((o)<<8)|(i)))
-#define CCIN(x) ((x)&0xFF)
-#define CCOUT(x) (((x)>>8)&0xFF)
-#define CCCONVERT(x) ((x)&0xFF00)
-
-#define CCCVT(x) CCMAP(x,0)
-#define CCMAP(i,o) ((i)==(o)?(unsigned char*)0:_ccmap(i,o))
-#define CCMAPCHR(m,c) ((m)?(m)[c]:(c))
-#define CCMAPCPY(m,t,f,n) ((m)?_ccmapcpy(m,t,f,n):memcpy(t,f,n))
-#define CCMAPSTR(m,s,n) ((m)?_ccmapstr(m,s,n):(__V_*)(s))
-
-#define ccmap(i,o) CCMAP(i,o)
-#define ccmapchr(m,c) CCMAPCHR(m,c)
-#define ccmapcpy(m,t,f,n) CCMAPCPY(m,t,f,n)
-#define ccmapstr(m,s,n) CCMAPSTR(m,s,n)
-
-#define CCMAPC(c,i,o) ((i)==(o)?(c):CCMAP(i,o)[c])
-#define CCMAPM(t,f,n,i,o) ((i)==(o)?memcpy(t,f,n):_ccmapcpy(CCMAP(i,o),t,f,n))
-#define CCMAPS(s,n,i,o) ((i)==(o)?(__V_*)(s):_ccmapstr(CCMAP(i,o),s,n))
-
-#define ccmapc(c,i,o) CCMAPC(c,i,o)
-#define ccmapm(t,f,n,i,o) CCMAPM(t,f,n,i,o)
-#define ccmaps(s,n,i,o) CCMAPS(s,n,i,o)
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/cdt.h b/usr/src/lib/libast/sparcv9/include/ast/cdt.h
deleted file mode 100644
index 1044207b76..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/cdt.h
+++ /dev/null
@@ -1,311 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _CDT_H
-#define _CDT_H 1
-
-/* Public interface for the dictionary library
-**
-** Written by Kiem-Phong Vo
-*/
-
-#define CDT_VERSION 20050420L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _dtlink_s Dtlink_t;
-typedef struct _dthold_s Dthold_t;
-typedef struct _dtdisc_s Dtdisc_t;
-typedef struct _dtmethod_s Dtmethod_t;
-typedef struct _dtdata_s Dtdata_t;
-typedef struct _dt_s Dt_t;
-typedef struct _dt_s Dict_t; /* for libdict compatibility */
-typedef struct _dtstat_s Dtstat_t;
-typedef Void_t* (*Dtsearch_f)_ARG_((Dt_t*,Void_t*,int));
-typedef Void_t* (*Dtmake_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef void (*Dtfree_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef int (*Dtcompar_f)_ARG_((Dt_t*,Void_t*,Void_t*,Dtdisc_t*));
-typedef unsigned int (*Dthash_f)_ARG_((Dt_t*,Void_t*,Dtdisc_t*));
-typedef Void_t* (*Dtmemory_f)_ARG_((Dt_t*,Void_t*,size_t,Dtdisc_t*));
-typedef int (*Dtevent_f)_ARG_((Dt_t*,int,Void_t*,Dtdisc_t*));
-
-struct _dtlink_s
-{ Dtlink_t* right; /* right child */
- union
- { unsigned int _hash; /* hash value */
- Dtlink_t* _left; /* left child */
- } hl;
-};
-
-/* private structure to hold an object */
-struct _dthold_s
-{ Dtlink_t hdr; /* header */
- Void_t* obj; /* user object */
-};
-
-/* method to manipulate dictionary structure */
-struct _dtmethod_s
-{ Dtsearch_f searchf; /* search function */
- int type; /* type of operation */
-};
-
-/* stuff that may be in shared memory */
-struct _dtdata_s
-{ int type; /* type of dictionary */
- Dtlink_t* here; /* finger to last search element */
- union
- { Dtlink_t** _htab; /* hash table */
- Dtlink_t* _head; /* linked list */
- } hh;
- int ntab; /* number of hash slots */
- int size; /* number of objects */
- int loop; /* number of nested loops */
- int minp; /* min path before splay, always even */
- /* for hash dt, > 0: fixed table size */
-};
-
-/* structure to hold methods that manipulate an object */
-struct _dtdisc_s
-{ int key; /* where the key begins in an object */
- int size; /* key size and type */
- int link; /* offset to Dtlink_t field */
- Dtmake_f makef; /* object constructor */
- Dtfree_f freef; /* object destructor */
- Dtcompar_f comparf;/* to compare two objects */
- Dthash_f hashf; /* to compute hash value of an object */
- Dtmemory_f memoryf;/* to allocate/free memory */
- Dtevent_f eventf; /* to process events */
-};
-
-#define DTDISC(dc,ky,sz,lk,mkf,frf,cmpf,hshf,memf,evf) \
- ( (dc)->key = (ky), (dc)->size = (sz), (dc)->link = (lk), \
- (dc)->makef = (mkf), (dc)->freef = (frf), \
- (dc)->comparf = (cmpf), (dc)->hashf = (hshf), \
- (dc)->memoryf = (memf), (dc)->eventf = (evf) )
-
-#ifdef offsetof
-#define DTOFFSET(struct_s, member) offsetof(struct_s, member)
-#else
-#define DTOFFSET(struct_s, member) ((int)(&((struct_s*)0)->member))
-#endif
-
-/* the dictionary structure itself */
-struct _dt_s
-{ Dtsearch_f searchf;/* search function */
- Dtdisc_t* disc; /* method to manipulate objs */
- Dtdata_t* data; /* sharable data */
- Dtmemory_f memoryf;/* function to alloc/free memory */
- Dtmethod_t* meth; /* dictionary method */
- int type; /* type information */
- int nview; /* number of parent view dictionaries */
- Dt_t* view; /* next on viewpath */
- Dt_t* walk; /* dictionary being walked */
- Void_t* user; /* for user's usage */
-};
-
-/* structure to get status of a dictionary */
-struct _dtstat_s
-{ int dt_meth; /* method type */
- int dt_size; /* number of elements */
- int dt_n; /* number of chains or levels */
- int dt_max; /* max size of a chain or a level */
- int* dt_count; /* counts of chains or levels by size */
-};
-
-/* flag set if the last search operation actually found the object */
-#define DT_FOUND 0100000
-
-/* supported storage methods */
-#define DT_SET 0000001 /* set with unique elements */
-#define DT_BAG 0000002 /* multiset */
-#define DT_OSET 0000004 /* ordered set (self-adjusting tree) */
-#define DT_OBAG 0000010 /* ordered multiset */
-#define DT_LIST 0000020 /* linked list */
-#define DT_STACK 0000040 /* stack */
-#define DT_QUEUE 0000100 /* queue */
-#define DT_METHODS 0000177 /* all currently supported methods */
-
-/* asserts to dtdisc() */
-#define DT_SAMECMP 0000001 /* compare methods equivalent */
-#define DT_SAMEHASH 0000002 /* hash methods equivalent */
-
-/* types of search */
-#define DT_INSERT 0000001 /* insert object if not found */
-#define DT_DELETE 0000002 /* delete object if found */
-#define DT_SEARCH 0000004 /* look for an object */
-#define DT_NEXT 0000010 /* look for next element */
-#define DT_PREV 0000020 /* find previous element */
-#define DT_RENEW 0000040 /* renewing an object */
-#define DT_CLEAR 0000100 /* clearing all objects */
-#define DT_FIRST 0000200 /* get first object */
-#define DT_LAST 0000400 /* get last object */
-#define DT_MATCH 0001000 /* find object matching key */
-#define DT_VSEARCH 0002000 /* search using internal representation */
-#define DT_ATTACH 0004000 /* attach an object to the dictionary */
-#define DT_DETACH 0010000 /* detach an object from the dictionary */
-
-/* events */
-#define DT_OPEN 1 /* a dictionary is being opened */
-#define DT_CLOSE 2 /* a dictionary is being closed */
-#define DT_DISC 3 /* discipline is about to be changed */
-#define DT_METH 4 /* method is about to be changed */
-#define DT_ENDOPEN 5 /* dtopen() is done */
-#define DT_ENDCLOSE 6 /* dtclose() is done */
-#define DT_HASHSIZE 7 /* setting hash table size */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-#if !_BLD_cdt && defined(__IMPORT__)
-#define extern __IMPORT__
-#endif
-
-extern Dtmethod_t* Dtset;
-extern Dtmethod_t* Dtbag;
-extern Dtmethod_t* Dtoset;
-extern Dtmethod_t* Dtobag;
-extern Dtmethod_t* Dtlist;
-extern Dtmethod_t* Dtstack;
-extern Dtmethod_t* Dtqueue;
-
-/* compatibility stuff; will go away */
-#ifndef KPVDEL
-extern Dtmethod_t* Dtorder;
-extern Dtmethod_t* Dttree;
-extern Dtmethod_t* Dthash;
-extern Dtmethod_t _Dttree;
-extern Dtmethod_t _Dthash;
-extern Dtmethod_t _Dtlist;
-extern Dtmethod_t _Dtqueue;
-extern Dtmethod_t _Dtstack;
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_cdt && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Dt_t* dtopen _ARG_((Dtdisc_t*, Dtmethod_t*));
-extern int dtclose _ARG_((Dt_t*));
-extern Dt_t* dtview _ARG_((Dt_t*, Dt_t*));
-extern Dtdisc_t* dtdisc _ARG_((Dt_t* dt, Dtdisc_t*, int));
-extern Dtmethod_t* dtmethod _ARG_((Dt_t*, Dtmethod_t*));
-
-extern Dtlink_t* dtflatten _ARG_((Dt_t*));
-extern Dtlink_t* dtextract _ARG_((Dt_t*));
-extern int dtrestore _ARG_((Dt_t*, Dtlink_t*));
-
-extern int dttreeset _ARG_((Dt_t*, int, int));
-
-extern int dtwalk _ARG_((Dt_t*, int(*)(Dt_t*,Void_t*,Void_t*), Void_t*));
-
-extern Void_t* dtrenew _ARG_((Dt_t*, Void_t*));
-
-extern int dtsize _ARG_((Dt_t*));
-extern int dtstat _ARG_((Dt_t*, Dtstat_t*, int));
-extern unsigned int dtstrhash _ARG_((unsigned int, Void_t*, int));
-
-#if !_PACKAGE_ast
-extern int memcmp _ARG_((const Void_t*, const Void_t*, size_t));
-extern int strcmp _ARG_((const char*, const char*));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* internal functions for translating among holder, object and key */
-#define _DT(dt) ((Dt_t*)(dt))
-#define _DTDSC(dc,ky,sz,lk,cmpf) \
- (ky = (dc)->key, sz = (dc)->size, lk = (dc)->link, cmpf = (dc)->comparf)
-#define _DTLNK(o,lk) ((Dtlink_t*)((char*)(o) + lk) )
-#define _DTOBJ(e,lk) ((lk) < 0 ? ((Dthold_t*)(e))->obj : (Void_t*)((char*)(e) - (lk)) )
-#define _DTKEY(o,ky,sz) (Void_t*)((sz) < 0 ? *((char**)((char*)(o)+(ky))) : ((char*)(o)+(ky)))
-
-#define _DTCMP(dt,k1,k2,dc,cmpf,sz) \
- ((cmpf) ? (*cmpf)(dt,k1,k2,dc) : \
- ((sz) <= 0 ? strcmp(k1,k2) : memcmp(k1,k2,sz)) )
-#define _DTHSH(dt,ky,dc,sz) ((dc)->hashf ? (*(dc)->hashf)(dt,ky,dc) : dtstrhash(0,ky,sz) )
-
-/* special search function for tree structure only */
-#define _DTMTCH(dt,key,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = (key); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define _DTSRCH(dt,obj,action) \
- do { Dtlink_t* _e; Void_t *_o, *_k, *_key; Dtdisc_t* _dc; \
- int _ky, _sz, _lk, _cmp; Dtcompar_f _cmpf; \
- _dc = (dt)->disc; _DTDSC(_dc, _ky, _sz, _lk, _cmpf); \
- _key = _DTKEY(obj, _ky, _sz); \
- for(_e = (dt)->data->here; _e; _e = _cmp < 0 ? _e->hl._left : _e->right) \
- { _o = _DTOBJ(_e, _lk); _k = _DTKEY(_o, _ky, _sz); \
- if((_cmp = _DTCMP((dt), _key, _k, _dc, _cmpf, _sz)) == 0) \
- break; \
- } \
- action (_e ? _o : (Void_t*)0); \
- } while(0)
-
-#define DTTREEMATCH(dt,key,action) _DTMTCH(_DT(dt),(Void_t*)(key),action)
-#define DTTREESEARCH(dt,obj,action) _DTSRCH(_DT(dt),(Void_t*)(obj),action)
-
-#define dtvnext(d) (_DT(d)->view)
-#define dtvcount(d) (_DT(d)->nview)
-#define dtvhere(d) (_DT(d)->walk)
-
-#define dtlink(d,e) (((Dtlink_t*)(e))->right)
-#define dtobj(d,e) _DTOBJ((e), _DT(d)->disc->link)
-#define dtfinger(d) (_DT(d)->data->here ? dtobj((d),_DT(d)->data->here):(Void_t*)(0))
-
-#define dtfirst(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_FIRST)
-#define dtnext(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_NEXT)
-#define dtleast(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_NEXT)
-#define dtlast(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_LAST)
-#define dtprev(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_PREV)
-#define dtmost(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH|DT_PREV)
-#define dtsearch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_SEARCH)
-#define dtmatch(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_MATCH)
-#define dtinsert(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_INSERT)
-#define dtdelete(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DELETE)
-#define dtattach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_ATTACH)
-#define dtdetach(d,o) (*(_DT(d)->searchf))((d),(Void_t*)(o),DT_DETACH)
-#define dtclear(d) (*(_DT(d)->searchf))((d),(Void_t*)(0),DT_CLEAR)
-#define dtfound(d) (_DT(d)->type & DT_FOUND)
-
-#define DT_PRIME 17109811 /* 2#00000001 00000101 00010011 00110011 */
-#define dtcharhash(h,c) (((unsigned int)(h) + (unsigned int)(c)) * DT_PRIME )
-
-#endif /* _CDT_H */
diff --git a/usr/src/lib/libast/sparcv9/include/ast/debug.h b/usr/src/lib/libast/sparcv9/include/ast/debug.h
deleted file mode 100644
index 6dfee2254a..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/debug.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * common ast debug definitions
- * include after the ast headers
- */
-
-#ifndef _DEBUG_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _DEBUG_H
-
-#include <ast.h>
-#include <error.h>
-
-#if !defined(DEBUG) && _BLD_DEBUG
-#define DEBUG _BLD_DEBUG
-#endif
-
-#if DEBUG || _BLD_DEBUG
-
-#define debug(x) x
-#define message(x) do if (error_info.trace < 0) { error x; } while (0)
-#define messagef(x) do if (error_info.trace < 0) { errorf x; } while (0)
-
-#define DEBUG_BEGTIME() debug_elapsed(1)
-#define DEBUG_GETTIME() debug_elapsed(0)
-#define DEBUG_ASSERT(p) ((p) ? 0 : (debug_fatal(__FILE__, __LINE__),0))
-#define DEBUG_COUNT(n) ((n) += 1)
-#define DEBUG_TALLY(c,n,v) ((c) ? ((n) += (v)) : (n))
-#define DEBUG_INCREASE(n) ((n) += 1)
-#define DEBUG_DECREASE(n) ((n) -= 1)
-#define DEBUG_DECLARE(t,v) t v
-#define DEBUG_SET(n,v) ((n) = (v))
-#define DEBUG_PRINT(fd,s,v) do {char _b[1024];write(fd,_b,sfsprintf(_b,sizeof(_b),s,v));} while(0)
-#define DEBUG_WRITE(fd,d,n) write((fd),(d),(n))
-#define DEBUG_TEMP(temp) (temp) /* debugging stuff that should be removed */
-#define DEBUG_BREAK break
-#define DEBUG_CONTINUE continue
-#define DEBUG_GOTO(label) do { debug_fatal(__FILE__, __LINE__); goto label; } while(0)
-#define DEBUG_RETURN(x) do { debug_fatal(__FILE__, __LINE__); return(x); } while(0)
-
-#else
-
-#define debug(x)
-#define message(x)
-#define messagef(x)
-
-#define DEBUG_BEGTIME()
-#define DEBUG_GETTIME()
-#define DEBUG_ASSERT(p)
-#define DEBUG_COUNT(n)
-#define DEBUG_TALLY(c,n,v)
-#define DEBUG_INCREASE(n)
-#define DEBUG_DECREASE(n)
-#define DEBUG_DECLARE(t,v)
-#define DEBUG_SET(n,v)
-#define DEBUG_PRINT(fd,s,v)
-#define DEBUG_WRITE(fd,d,n)
-#define DEBUG_TEMP(x)
-#define DEBUG_BREAK break
-#define DEBUG_CONTINUE continue
-#define DEBUG_GOTO(label) goto label
-#define DEBUG_RETURN(x) return(x)
-
-#endif
-
-#ifndef BREAK
-#define BREAK DEBUG_BREAK
-#endif
-#ifndef CONTINUE
-#define CONTINUE DEBUG_CONTINUE
-#endif
-#ifndef GOTO
-#define GOTO(label) DEBUG_GOTO(label)
-#endif
-#ifndef RETURN
-#define RETURN(x) DEBUG_RETURN(x)
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ double debug_elapsed __PROTO__((int));
-extern __MANGLE__ void debug_fatal __PROTO__((const char*, int));
-extern __MANGLE__ void systrace __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/dirent.h b/usr/src/lib/libast/sparcv9/include/ast/dirent.h
deleted file mode 100644
index 05e76cadae..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/dirent.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_dirent.h>
diff --git a/usr/src/lib/libast/sparcv9/include/ast/dt.h b/usr/src/lib/libast/sparcv9/include/ast/dt.h
deleted file mode 100644
index b6b356aee7..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/dt.h
+++ /dev/null
@@ -1,49 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-#ifndef _DT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _DT_H 1
-
-#include <cdt.h>
-#include <vmalloc.h>
-
-#if _BLD_cdt && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Dt_t* dtnew __PROTO__((Vmalloc_t*, Dtdisc_t*, Dtmethod_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/endian.h b/usr/src/lib/libast/sparcv9/include/ast/endian.h
deleted file mode 100644
index 1c992dd490..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/endian.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * linux/gnu compatibility
- */
-
-#ifndef _ENDIAN_H
-#define _ENDIAN_H
-
-#include <bytesex.h>
-
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
-#define __PDP_ENDIAN 3412
-
-#if defined (__USE_BSD) && !defined(__STRICT_ANSI__)
-
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN __LITTLE_ENDIAN
-#endif
-
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN __BIG_ENDIAN
-#endif
-
-#ifndef PDP_ENDIAN
-#define PDP_ENDIAN __PDP_ENDIAN
-#endif
-
-#undef BYTE_ORDER
-#define BYTE_ORDER __BYTE_ORDER
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/error.h b/usr/src/lib/libast/sparcv9/include/ast/error.h
deleted file mode 100644
index c0e21dadd7..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/error.h
+++ /dev/null
@@ -1,196 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * option, error and message formatter external definitions
- */
-
-#ifndef _ERROR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _ERROR_H
-
-#include <ast.h>
-#include <option.h>
-#include <errno.h>
-
-#define ERROR_VERSION 20070319L
-
-#if !defined(errno) && defined(__DYNAMIC__)
-#define errno __DYNAMIC__(errno)
-#endif
-
-#define ERROR_debug(n) (-(n))
-#define ERROR_exit(n) ((n)+ERROR_ERROR)
-#define ERROR_system(n) (((n)+ERROR_ERROR)|ERROR_SYSTEM)
-#define ERROR_usage(n) ((((n)?2:0)+ERROR_ERROR)|ERROR_USAGE)
-#define ERROR_warn(n) (ERROR_WARNING)
-
-#ifndef ERROR_catalog
-#define ERROR_catalog(t) t
-#endif
-#ifndef ERROR_dictionary
-#define ERROR_dictionary(t) t
-#endif
-
-#ifndef ERROR_translate
-#define ERROR_translating() (error_info.translate&&(ast.locale.set&(1<<AST_LC_MESSAGES)))
-#define ERROR_translate(l,i,d,m) (ERROR_translating()?errorx((const char*)(l),(const char*)(i),(const char*)(d),(const char*)(m)):(char*)(m))
-#endif
-
-#define ERROR_INFO 0 /* info message -- no err_id */
-#define ERROR_WARNING 1 /* warning message */
-#define ERROR_ERROR 2 /* error message -- no err_exit */
-#define ERROR_FATAL 3 /* error message with err_exit */
-#define ERROR_NOEXEC EXIT_NOEXEC /* shell convention */
-#define ERROR_NOENT EXIT_NOTFOUND /* shell convention */
-#define ERROR_PANIC ERROR_LEVEL /* panic message with err_exit */
-
-#define ERROR_LEVEL 0x00ff /* level portion of status */
-#define ERROR_SYSTEM 0x0100 /* report system errno message */
-#define ERROR_OUTPUT 0x0200 /* next arg is error fd */
-#define ERROR_SOURCE 0x0400 /* next 2 args are FILE,LINE */
-#define ERROR_USAGE 0x0800 /* usage message */
-#define ERROR_PROMPT 0x1000 /* omit trailing newline */
-#define ERROR_NOID 0x2000 /* omit err_id */
-#define ERROR_LIBRARY 0x4000 /* library routine error */
-
-#define ERROR_INTERACTIVE 0x0001 /* context is interactive */
-#define ERROR_SILENT 0x0002 /* context is silent */
-#define ERROR_NOTIFY 0x0004 /* main(-sig,0,ctx) on signal */
-
-#define ERROR_FREE 0x0010 /* free context on pop */
-#define ERROR_POP 0x0020 /* pop context */
-#define ERROR_PUSH 0x0040 /* push context */
-#define ERROR_SET 0x0080 /* set context */
-
-/*
- * errorpush()/errorpop() are obsolete -- use errorctx() instead
- */
-
-#ifndef ERROR_CONTEXT_T
-#define ERROR_CONTEXT_T Error_info_t
-#endif
-
-#define ERROR_CONTEXT_BASE ((Error_context_t*)&error_info.context)
-
-#define errorpush(p,f) (*(p)= *ERROR_CONTEXT_BASE,*ERROR_CONTEXT_BASE=error_info.empty,error_info.context=(Error_context_t*)(p),error_info.flags=(f))
-#define errorpop(p) (*ERROR_CONTEXT_BASE= *(p))
-
-typedef struct Error_info_s Error_info_t;
-typedef struct Error_context_s Error_context_t;
-
-#define ERROR_CONTEXT \
- ERROR_CONTEXT_T* context; /* prev context stack element */ \
- int errors; /* >= ERROR_ERROR count */ \
- int flags; /* context flags */ \
- int line; /* input|output line number */ \
- int warnings; /* ERROR_WARNING count */ \
- char* file; /* input|output file name */ \
- char* id; /* command id */
-
-struct Error_context_s /* context stack element */
-{
- ERROR_CONTEXT
-};
-
-struct Error_info_s /* error state */
-{
- int fd; /* write(2) fd */
-
- void (*exit) __PROTO__((int)); /* error exit */
- ssize_t (*write) __PROTO__((int, const __V_*, size_t)); /* error output */
-
- /* the rest are implicitly initialized */
-
- int clear; /* default clear ERROR_* flags */
- int core; /* level>=core -> core dump */
- int indent; /* debug trace indent level */
- int init; /* initialized */
- int last_errno; /* last reported errno */
- int mask; /* multi level debug trace mask */
- int set; /* default set ERROR_* flags */
- int trace; /* debug trace level */
-
- char* version; /* ERROR_SOURCE command version */
-
- int (*auxilliary) __PROTO__((Sfio_t*, int, int)); /* aux info to append */
-
- ERROR_CONTEXT /* top of context stack */
-
- Error_context_t empty; /* empty context stack element */
-
- unsigned long time; /* debug time trace */
-
- char* (*translate) __PROTO__((const char*, const char*, const char*, const char*)); /* format translator */
-
- const char* catalog; /* message catalog */
-};
-
-#ifndef errno
-extern __MANGLE__ int errno; /* system call error status */
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Error_info_t* _error_infop_;
-
-#define error_info (*_error_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ void error __PROTO__((int, ...));
-extern __MANGLE__ int errormsg __PROTO__((const char*, int, ...));
-extern __MANGLE__ int errorf __PROTO__((__V_*, __V_*, int, ...));
-extern __MANGLE__ void errorv __PROTO__((const char*, int, va_list));
-#ifndef errorx
-extern __MANGLE__ char* errorx __PROTO__((const char*, const char*, const char*, const char*));
-#endif
-extern __MANGLE__ Error_info_t* errorctx __PROTO__((Error_info_t*, int, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/find.h b/usr/src/lib/libast/sparcv9/include/ast/find.h
deleted file mode 100644
index 374858aced..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/find.h
+++ /dev/null
@@ -1,97 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * fast find interface definitions
- */
-
-#ifndef _FIND_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FIND_H
-
-#define FIND_VERSION 19980301L
-
-#ifndef FIND_CODES
-#define FIND_CODES "lib/find/codes"
-#endif
-
-#define FIND_CODES_ENV "FINDCODES"
-
-#define FIND_GENERATE (1<<0) /* generate new codes */
-#define FIND_ICASE (1<<1) /* ignore case in match */
-#define FIND_GNU (1<<2) /* generate gnu format codes */
-#define FIND_OLD (1<<3) /* generate old format codes */
-#define FIND_TYPE (1<<4) /* generate type with codes */
-#define FIND_VERIFY (1<<5) /* verify the dir hierarchy */
-
-#define FIND_USER (1L<<16) /* first user flag bit */
-
-struct Find_s;
-struct Finddisc_s;
-
-typedef int (*Findverify_f) __PROTO__((struct Find_s*, const char*, size_t, struct Finddisc_s*));
-
-typedef struct Finddisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* FIND_* flags */
- Error_f errorf; /* error function */
- Findverify_f verifyf; /* dir verify function */
- char** dirs; /* dir prefixes to search */
-} Finddisc_t;
-
-typedef struct Find_s
-{
- const char* id; /* library id string */
- unsigned long stamp; /* codes time stamp */
-
-#ifdef _FIND_PRIVATE_
- _FIND_PRIVATE_
-#endif
-
-} Find_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Find_t* findopen __PROTO__((const char*, const char*, const char*, Finddisc_t*));
-extern __MANGLE__ char* findread __PROTO__((Find_t*));
-extern __MANGLE__ int findwrite __PROTO__((Find_t*, const char*, size_t, const char*));
-extern __MANGLE__ int findclose __PROTO__((Find_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/fnmatch.h b/usr/src/lib/libast/sparcv9/include/ast/fnmatch.h
deleted file mode 100644
index 764009c3b7..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/fnmatch.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix fnmatch interface definitions
- */
-
-#ifndef _FNMATCH_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FNMATCH_H
-
-#include <ast_common.h>
-
-/* fnmatch flags */
-
-#define FNM_NOESCAPE 0x0001 /* \ is literal */
-#define FNM_PATHNAME 0x0002 /* explicit match for / */
-#define FNM_PERIOD 0x0004 /* explicit match for leading . */
-#define FNM_NOSYS 0x0010 /* not implemented */
-
-/* nonstandard fnmatch() flags */
-
-#define FNM_AUGMENTED 0x0008 /* enable ! & ( | ) */
-#define FNM_ICASE 0x0020 /* ignore case in match */
-#define FNM_LEADING_DIR 0x0040 /* match up to implicit / */
-
-#define FNM_CASEFOLD FNM_ICASE /* gnu compatibility */
-#define FNM_FILE_NAME FNM_PATHNAME /* gnu compatibility */
-
-/* fnmatch error codes -- other non-zero values from <regex.h> */
-
-#define FNM_NOMATCH 1 /* == REG_NOMATCH */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int fnmatch __PROTO__((const char*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/fnv.h b/usr/src/lib/libast/sparcv9/include/ast/fnv.h
deleted file mode 100644
index 2312a20118..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/fnv.h
+++ /dev/null
@@ -1,81 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * Landon Kurt Knoll
- * Phong Vo
- *
- * FNV-1 linear congruent checksum/hash/PRNG
- * see http://www.isthe.com/chongo/tech/comp/fnv/
- */
-
-#ifndef _FNV_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FNV_H
-
-#include <ast_common.h>
-
-#define FNV_INIT 0x811c9dc5L
-#define FNV_MULT 0x01000193L
-
-#define FNVINIT(h) (h = FNV_INIT)
-#define FNVPART(h,c) (h = (h) * FNV_MULT ^ (c))
-#define FNVSUM(h,s,n) do { \
- register size_t _i_ = 0; \
- while (_i_ < n) \
- FNVPART(h, ((unsigned char*)s)[_i_++]); \
- } while (0)
-
-#if _typ_int64_t
-
-#ifdef _ast_LL
-
-#define FNV_INIT64 0xcbf29ce484222325LL
-#define FNV_MULT64 0x00000100000001b3LL
-
-#else
-
-#define FNV_INIT64 ((int64_t)0xcbf29ce484222325)
-#define FNV_MULT64 ((int64_t)0x00000100000001b3)
-
-#endif
-
-#define FNVINIT64(h) (h = FNV_INIT64)
-#define FNVPART64(h,c) (h = (h) * FNV_MULT64 ^ (c))
-#define FNVSUM64(h,s,n) do { \
- register int _i_ = 0; \
- while (_i_ < n) \
- FNVPART64(h, ((unsigned char*)s)[_i_++]); \
- } while (0)
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/fs3d.h b/usr/src/lib/libast/sparcv9/include/ast/fs3d.h
deleted file mode 100644
index bae8dde927..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/fs3d.h
+++ /dev/null
@@ -1,123 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * 3d fs interface definitions
- */
-
-#ifndef _FS3D_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FS3D_H
-
-#include <ast_fs.h>
-
-#if _int_st_spare1
-#define iview(p) ((p)->st_spare1)
-#define IVIEW(p,v) ((p)->st_spare1=(v))
-#else
-#if _ary_st_spare4
-#define iview(p) ((p)->st_spare4[0])
-#define IVIEW(p,v) ((p)->st_spare4[0]=(v))
-#else
-#if _ary_st_pad4
-#define iview(p) ((p)->st_pad4[0])
-#define IVIEW(p,v) ((p)->st_pad4[0]=(v))
-#else
-#if _mem_st_rdev_stat
-#define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev)
-#define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0)
-#else
-#define iview(p) 0
-#define IVIEW(p,v)
-#endif
-#endif
-#endif
-#endif
-
-/*
- * special options
- */
-
-#define FS3D_init "/#option/init"
-#define FS3D_on "/#option/3d"
-#define FS3D_off "/#option/2d"
-
-/*
- * fs3d(3) ops
- */
-
-#define FS3D_OP(o,a) (((a)<<3)|(o))
-
-#define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */
-#define FS3D_OFF FS3D_OP_OFF
-#define FS3D_ON FS3D_OP_ON
-#define FS3D_TEST FS3D_OP_TEST
-#define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n)
-
-#define FS3D_op(x) ((x)&07)
-#define FS3D_arg(x) (((x)>>3)&07777)
-
-#define FS3D_OP_OFF 0
-#define FS3D_OP_ON 1
-#define FS3D_OP_TEST 2
-#define FS3D_OP_LIMIT 3
-#define FS3D_OP_INIT 7
-
-/*
- * mount(2) ops
- */
-
-#define FS3D_ALL (FS3D_VIEW|FS3D_VERSION)
-#define FS3D_VIEW 002
-#define FS3D_VERSION 004
-#define FS3D_GET 010
-#define FS3D_SIZE(n) ((n)<<4)
-#define FS3D_SIZEOF(n) ((n)>>4)
-
-#if !_BLD_3d
-#define mount(s,t,f,d) fs3d_mount(s,t,f,d)
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int fs3d __PROTO__((int));
-extern __MANGLE__ int fs3d_mount __PROTO__((const char*, char*, int, __V_*));
-extern __MANGLE__ char* pathnext __PROTO__((char*, char*, long*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/fts.h b/usr/src/lib/libast/sparcv9/include/ast/fts.h
deleted file mode 100644
index 1bf72a114d..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/fts.h
+++ /dev/null
@@ -1,173 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * David Korn
- * Phong Vo
- * AT&T Research
- *
- * fts interface definitions
- */
-
-#ifndef _FTS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTS_H
-
-#include <ast_std.h>
-#include <ast_fs.h>
-#include <ast_mode.h>
-
-/*
- * fts_open flags
- */
-
-#define FTS_LOGICAL 0 /* logical traversal, follow symlinks */
-#define FTS_META (1<<0) /* follow top dir symlinks even if phys */
-#define FTS_NOCHDIR (1<<1) /* don't chdir */
-#define FTS_NOPOSTORDER (1<<2) /* no postorder visits */
-#define FTS_NOPREORDER (1<<3) /* no preorder visits */
-#define FTS_NOSEEDOTDIR (1<<11) /* never retain leading . dir */
-#define FTS_NOSTAT (1<<4) /* don't stat children */
-#define FTS_ONEPATH (1<<5) /* pathnames arg is one const char* */
-#define FTS_PHYSICAL (1<<6) /* physical traversal, don't follow */
-#define FTS_SEEDOT (1<<7) /* return . and .. */
-#define FTS_SEEDOTDIR (1<<10) /* always retain leading . dir */
-#define FTS_TOP (1<<8) /* don't traverse subdirectories */
-#define FTS_XDEV (1<<9) /* don't cross mount points */
-
-#define FTS_USER (1<<12) /* first user flag bit */
-
-#define FTS_COMFOLLOW FTS_META
-
-/*
- * fts_info flags
- */
-
-#define FTS_DEFAULT 0 /* ok, someone must have wanted this */
-
-#define FTS_NS (1<<0) /* stat failed */
-#define FTS_F (1<<1) /* file - not directory or symbolic link*/
-#define FTS_SL (1<<2) /* symbolic link */
-#define FTS_D (1<<3) /* directory - pre-order visit */
-
-#define FTS_C (1<<4) /* causes cycle */
-#define FTS_ERR (1<<5) /* some other error */
-#define FTS_DD (1<<6) /* . or .. */
-#define FTS_NR (1<<7) /* cannot read */
-#define FTS_NX (1<<8) /* cannot search */
-#define FTS_OK (1<<9) /* no info but otherwise ok */
-#define FTS_P (1<<10) /* post-order visit */
-
-#define FTS_DC (FTS_D|FTS_C) /* dir - would cause cycle */
-#define FTS_DNR (FTS_D|FTS_NR) /* dir - no read permission */
-#define FTS_DNX (FTS_D|FTS_NX) /* dir - no search permission */
-#define FTS_DOT (FTS_D|FTS_DD) /* . or .. */
-#define FTS_DP (FTS_D|FTS_P) /* dir - post-order visit */
-#define FTS_NSOK (FTS_NS|FTS_OK) /* no stat (because you asked) */
-#define FTS_SLNONE (FTS_SL|FTS_NS) /* symlink - to nowhere */
-
-/*
- * fts_set flags
- */
-
-#define FTS_AGAIN FTS_TOP /* process entry again */
-#define FTS_FOLLOW FTS_META /* follow FTS_SL symlink */
-#define FTS_SKIP FTS_NOSTAT /* skip FTS_D directory */
-#define FTS_STAT FTS_PHYSICAL /* stat() done by user */
-
-typedef struct Fts FTS;
-typedef struct Ftsent FTSENT;
-
-struct Ftsent
-{
- char* fts_accpath; /* path relative to . */
- char* fts_name; /* file name */
- char* fts_path; /* path relative to top dir */
- FTSENT* fts_cycle; /* offender if cycle */
- FTSENT* fts_link; /* next child */
- FTSENT* fts_parent; /* parent directory */
- struct stat* fts_statp; /* stat info */
-#ifdef _FTSENT_LOCAL_PRIVATE_
- _FTSENT_LOCAL_PRIVATE_
-#else
- __V_* fts_pointer; /* local pointer value */
-#endif
- long fts_number; /* local numeric value */
- int fts_errno; /* errno for this entry */
- unsigned short fts_info; /* info flags */
-
- unsigned short _fts_namelen; /* old fts_namelen */
- unsigned short _fts_pathlen; /* old fts_pathlen */
- short _fts_level; /* old fts_level */
-
- short _fts_status; /* <ftwalk.h> compatibility */
- struct stat _fts_statb; /* <ftwalk.h> compatibility */
-
- FTS* fts; /* fts_open() handle */
- size_t fts_namelen; /* strlen(fts_name) */
- size_t fts_pathlen; /* strlen(fts_path) */
- ssize_t fts_level; /* file tree depth, 0 at top */
-
-#ifdef _FTSENT_PRIVATE_
- _FTSENT_PRIVATE_
-#endif
-
-};
-
-struct Fts
-{
- int fts_errno; /* last errno */
- __V_* fts_handle; /* user defined handle */
-
-#ifdef _FTS_PRIVATE_
- _FTS_PRIVATE_
-#endif
-
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ FTSENT* fts_children __PROTO__((FTS*, int));
-extern __MANGLE__ int fts_close __PROTO__((FTS*));
-extern __MANGLE__ int fts_flags __PROTO__((void));
-extern __MANGLE__ int fts_local __PROTO__((FTSENT*));
-extern __MANGLE__ int fts_notify __PROTO__((int(*)(FTS*, FTSENT*, __V_*), __V_*));
-extern __MANGLE__ FTS* fts_open __PROTO__((char* const*, int, int(*)(FTSENT* const*, FTSENT* const*)));
-extern __MANGLE__ FTSENT* fts_read __PROTO__((FTS*));
-extern __MANGLE__ int fts_set __PROTO__((FTS*, FTSENT*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ftw.h b/usr/src/lib/libast/sparcv9/include/ast/ftw.h
deleted file mode 100644
index 68feb09bb3..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ftw.h
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * ftw,nftw over ftwalk
- */
-
-#ifndef _FTW_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTW_H
-
-#define FTW FTWALK
-#include <ftwalk.h>
-#undef FTW
-
-#define FTW_SLN (FTW_SL|FTW_NR)
-
-#define FTW_PHYS (FTW_PHYSICAL)
-#define FTW_CHDIR (FTW_DOT)
-#define FTW_DEPTH (FTW_POST)
-#define FTW_OPEN (0)
-
-struct FTW
-{
- int quit;
- int base;
- int level;
-};
-
-#define FTW_SKD FTW_SKIP
-#define FTW_PRUNE FTW_SKIP
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int ftw __PROTO__((const char*, int(*)(const char*, const struct stat*, int), int));
-extern __MANGLE__ int nftw __PROTO__((const char*, int(*)(const char*, const struct stat*, int, struct FTW*), int, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ftwalk.h b/usr/src/lib/libast/sparcv9/include/ast/ftwalk.h
deleted file mode 100644
index 673b1c2824..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ftwalk.h
+++ /dev/null
@@ -1,135 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Phong Vo
- * Glenn Fowler
- * AT&T Research
- *
- * ast ftwalk interface definitions
- * ftwalk was the initial improvement on ftw and nftw
- * which formed the basis for the POSIX fts proposal
- *
- * NOTE: this file is in cahoots with the fts implementation
- */
-
-#ifndef _FTWALK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _FTWALK_H
-
-#define fts_info info
-#define fts_level level
-#define fts_link link
-#define fts_name name
-#define fts_namelen namelen
-#define fts_parent parent
-#define fts_path path
-#define fts_pathlen pathlen
-#define _fts_status status
-#define _fts_statb statb
-
-#define FTSENT Ftw_t /* <fts.h> internal */
-#define Ftsent FTW /* <fts.h> internal */
-
-#define _FTSENT_LOCAL_PRIVATE_ /* <fts.h> internal */ \
- union \
- { \
- long number; /* local numeric value */ \
- __V_* pointer; /* local pointer value */ \
- } local;
-
-#include <fts.h>
-
-/*
- * ftwalk() argument flags
- */
-
-#define FTW_CANON FTS_CANON
-#define FTW_CHILDREN (FTS_USER<<0)
-#define FTW_DELAY FTS_NOSTAT
-#define FTW_DOT FTS_NOCHDIR
-#define FTW_META FTS_META
-#define FTW_MOUNT FTS_XDEV
-#define FTW_MULTIPLE FTS_ONEPATH
-#define FTW_NOSEEDOTDIR FTS_NOSEEDOTDIR
-#define FTW_PHYSICAL FTS_PHYSICAL
-#define FTW_POST (FTS_USER<<1)
-#define FTW_SEEDOTDIR FTS_SEEDOTDIR
-#define FTW_TOP FTS_TOP
-#define FTW_TWICE (FTS_USER<<2)
-#define FTW_USER (FTS_USER<<3)
-
-/*
- * Ftw_t.info type bits
- */
-
-#define FTW_C FTS_C
-#define FTW_D FTS_D
-#define FTW_DC FTS_DC
-#define FTW_DNR FTS_DNR
-#define FTW_DNX FTS_DNX
-#define FTW_DP FTS_DP
-#define FTW_F FTS_F
-#define FTW_NR FTS_NR
-#define FTW_NS FTS_NS
-#define FTW_NSOK FTS_NSOK
-#define FTW_NX FTS_NX
-#define FTW_P FTS_P
-#define FTW_SL FTS_SL
-
-/*
- * Ftw_t.status entry values
- */
-
-#define FTW_NAME FTS_DOT /* access by Ftw_t.name */
-#define FTW_PATH FTS_NOCHDIR /* access by Ftw_t.path */
-
-/*
- * Ftw_t.status return values
- */
-
-#define FTW_AGAIN FTS_AGAIN
-#define FTW_FOLLOW FTS_FOLLOW
-#define FTW_NOPOST FTS_NOPOSTORDER
-#define FTW_SKIP FTS_SKIP
-#define FTW_STAT FTS_STAT
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int ftwalk __PROTO__((const char*, int(*)(Ftw_t*), int, int(*)(Ftw_t*, Ftw_t*)));
-extern __MANGLE__ int ftwflags __PROTO__((void));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/getopt.h b/usr/src/lib/libast/sparcv9/include/ast/getopt.h
deleted file mode 100644
index c0679a7e53..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/getopt.h
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * gnu getopt interface
- */
-
-#ifndef _GETOPT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#ifdef _AST_STD_I
-#define _GETOPT_H -1
-#else
-#define _GETOPT_H 1
-
-#include <ast_getopt.h>
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-struct option
-{
- const char* name;
- int has_arg;
- int* flag;
- int val;
-};
-
-extern __MANGLE__ int getopt_long __PROTO__((int, char* const*, const char*, const struct option*, int*));
-extern __MANGLE__ int getopt_long_only __PROTO__((int, char* const*, const char*, const struct option*, int*));
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/glob.h b/usr/src/lib/libast/sparcv9/include/ast/glob.h
deleted file mode 100644
index e2708229c7..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/glob.h
+++ /dev/null
@@ -1,155 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix glob interface definitions with gnu extensions
- */
-
-#ifndef _GLOB_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _GLOB_H
-
-#define GLOB_VERSION 20060717L
-
-#include <stdlib.h>
-
-struct dirent;
-struct stat;
-
-struct _glob_;
-struct _globlist_;
-
-typedef struct _glob_ glob_t;
-typedef struct _globlist_ globlist_t;
-
-struct _globlist_
-{
- globlist_t* gl_next;
- char* gl_begin;
- unsigned char gl_flags;
- char gl_path[1];
-};
-
-struct _glob_
-{
- size_t gl_pathc;
- char** gl_pathv;
- size_t gl_offs;
- globlist_t* gl_list;
- int gl_flags;
-
- /* GLOB_DISC data -- memset(&gl,0,sizeof(gl)) before using! */
-
- const char* gl_fignore;
- const char* gl_suffix;
- unsigned char* gl_intr;
-
- int gl_delim;
-
- __V_* gl_handle;
- __V_* (*gl_diropen) __PROTO__((glob_t*, const char*));
- char* (*gl_dirnext) __PROTO__((glob_t*, __V_*));
- void (*gl_dirclose) __PROTO__((glob_t*, __V_*));
- int (*gl_type) __PROTO__((glob_t*, const char*, int));
- int (*gl_attr) __PROTO__((glob_t*, const char*, int));
-
- /* gnu extensions -- but how do you synthesize dirent and stat? */
-
- __V_* (*gl_opendir) __PROTO__((const char*));
- struct dirent* (*gl_readdir) __PROTO__((__V_*));
- void (*gl_closedir) __PROTO__((__V_*));
- int (*gl_stat) __PROTO__((const char*, struct stat*));
- int (*gl_lstat) __PROTO__((const char*, struct stat*));
-
- /* ast additions */
-
- char* (*gl_nextdir) __PROTO__((glob_t*, char*));
- unsigned long gl_status;
- unsigned long gl_version;
- unsigned short gl_extra;
-
-#ifdef _GLOB_PRIVATE_
- _GLOB_PRIVATE_
-#else
- char* gl_pad[23];
-#endif
-
-};
-
-/* standard interface */
-#define GLOB_APPEND 0x0001 /* append to previous */
-#define GLOB_DOOFFS 0x0002 /* gl_offs defines argv offset */
-#define GLOB_ERR 0x0004 /* abort on error */
-#define GLOB_MARK 0x0008 /* append / to directories */
-#define GLOB_NOCHECK 0x0010 /* nomatch is original pattern */
-#define GLOB_NOESCAPE 0x0020 /* don't treat \ specially */
-#define GLOB_NOSORT 0x0040 /* don't sort the list */
-
-/* extended interface */
-#define GLOB_STARSTAR 0x0080 /* enable [/]**[/] expansion */
-#define GLOB_BRACE 0x0100 /* enable {...} expansion */
-#define GLOB_ICASE 0x0200 /* ignore case on match */
-#define GLOB_COMPLETE 0x0400 /* shell file completeion */
-#define GLOB_AUGMENTED 0x0800 /* augmented shell patterns */
-#define GLOB_STACK 0x1000 /* allocate on current stack */
-#define GLOB_LIST 0x2000 /* just create gl_list */
-#define GLOB_ALTDIRFUNC 0x4000 /* gnu discipline functions */
-#define GLOB_DISC 0x8000 /* discipline initialized */
-
-/* gl_status */
-#define GLOB_NOTDIR 0x0001 /* last gl_dirnext() not a dir */
-
-/* gl_type return */
-#define GLOB_NOTFOUND 0 /* does not exist */
-#define GLOB_DEV 1 /* exists but not DIR EXE REG */
-#define GLOB_DIR 2 /* directory */
-#define GLOB_EXE 3 /* executable regular file */
-#define GLOB_REG 4 /* regular file */
-
-/* error return values */
-#define GLOB_ABORTED 1
-#define GLOB_NOMATCH 2
-#define GLOB_NOSPACE 3
-#define GLOB_INTR 4
-#define GLOB_APPERR 5
-#define GLOB_NOSYS 6
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int glob __PROTO__((const char*, int, int(*)(const char*,int), glob_t*));
-extern __MANGLE__ void globfree __PROTO__((glob_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif /* _GLOB_H */
diff --git a/usr/src/lib/libast/sparcv9/include/ast/hash.h b/usr/src/lib/libast/sparcv9/include/ast/hash.h
deleted file mode 100644
index 0023ea06f5..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/hash.h
+++ /dev/null
@@ -1,213 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * hash table library interface definitions
- *
- * NOTE: new code should use the more general <cdt.h>
- */
-
-#ifndef _HASH_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASH_H
-
-#define HASH_ALLOCATE (1L<<0) /* allocate new key names */
-#define HASH_FIXED (1L<<1) /* fixed table size */
-#define HASH_HASHED (1L<<6) /* key names already hashed */
-#define HASH_RESIZE (1L<<2) /* table has been resized */
-#define HASH_SCANNING (1L<<3) /* currently scanning scope */
-#define HASH_SCOPE (1L<<4) /* push scope / create in bot */
-#define HASH_STATIC (1L<<5) /* static table allocation */
-
-#define HASH_CREATE (1L<<8) /* create bucket if not found */
-#define HASH_DELETE (1L<<9) /* delete bucket if found */
-#define HASH_LOOKUP 0 /* default op */
-#define HASH_RENAME (1L<<7) /* rename bucket if found */
-
-#define HASH_BUCKET (1L<<11) /* name is installed bucket */
-#define HASH_INSTALL (1L<<12) /* install allocated bucket */
-#define HASH_NOSCOPE (1L<<13) /* top scope only */
-#define HASH_OPAQUE (1L<<14) /* opaque bucket */
-#define HASH_VALUE (1L<<15) /* value bucket field used */
-
-#define HASH_SIZE(n) (((long)(n))<<16) /* fixed bucket size */
-#define HASH_SIZEOF(f) ((((long)(f))>>16)&0xffff) /* extract size */
-
-#define HASH_DELETED ((unsigned long)1<<(8*sizeof(int)-1)) /* deleted placeholder */
-#define HASH_KEEP (1L<<(8*sizeof(int)-2)) /* no free on bucket */
-#define HASH_HIDDEN (1L<<(8*sizeof(int)-3)) /* hidden by scope */
-#define HASH_HIDES (1L<<(8*sizeof(int)-4)) /* hides lower scope */
-#define HASH_OPAQUED (1L<<(8*sizeof(int)-5)) /* opaqued placeholder */
-#define HASH_FREENAME (1L<<(8*sizeof(int)-6)) /* free bucket name */
-
-#define HASH_RESET (HASH_RESIZE|HASH_SCOPE|HASH_STATIC|HASH_VALUE)
-#define HASH_INTERNAL (HASH_BUCKET|HASH_RESIZE|HASH_SCANNING|HASH_STATIC)
-#define HASH_FLAGS (HASH_DELETED|HASH_FREENAME|HASH_HIDDEN|HASH_HIDES|HASH_KEEP|HASH_OPAQUED)
-
-#define HASH_alloc 1
-#define HASH_clear 2
-#define HASH_compare 3
-#define HASH_free 4
-#define HASH_hash 5
-#define HASH_meanchain 6
-#define HASH_name 7
-#define HASH_namesize 8
-#define HASH_set 9
-#define HASH_size 10
-#define HASH_table 11
-#define HASH_va_list 12
-
-#define HASH_bucketsize 13
-
-#define HASH_region 14
-
-#include <hashpart.h>
-
-#define hashclear(t,f) ((t)->flags &= ~((f) & ~HASH_INTERNAL))
-#define hashcover(b) (((b)->hash&HASH_HIDES)?(Hash_bucket_t*)((b)->name):(Hash_bucket_t*)0)
-#define hashdel(t,n) hashlook(t, (char*)(n), HASH_DELETE, (char*)0)
-#define hashget(t,n) hashlook(t, (char*)(n), HASH_LOOKUP|HASH_VALUE, (char*)0)
-#define hashgetbucket(s) ((Hash_bucket_t*)((s)-((sizeof(Hash_bucket_t)+sizeof(char*)-1)/sizeof(char*))*sizeof(char*)))
-#define hashkeep(b) ((b)->hash|=HASH_KEEP)
-#define hashname(b) ((((b)->hash&HASH_HIDES)?((Hash_bucket_t*)((b)->name)):(b))->name)
-#define hashput(t,n,v) hashlook(t, (char*)(n), HASH_CREATE|HASH_VALUE, (char*)(v))
-#define hashref(t,n) hashlook(t, (char*)(n), HASH_LOOKUP|HASH_INTERNAL|HASH_VALUE, (char*)0)
-#define hashscope(t) ((t)->scope)
-#define hashset(t,f) ((t)->flags |= ((f) & ~HASH_INTERNAL))
-
-/*
- * DEPRECATED renames for compatibility
- */
-
-#define Hashbin_t Hash_bucket_t
-#define HASHBUCKET Hash_bucket_t
-#define Hashhdr_t Hash_header_t
-#define HASHHEADER Hash_header_t
-#define Hashpos_t Hash_position_t
-#define HASHPOSITION Hash_position_t
-#define Hashtab_t Hash_table_t
-#define HASHTABLE Hash_table_t
-
-#define vhashalloc hashvalloc
-#define hashvalloc(t,a) hashalloc(t,HASH_va_list,a,0)
-
-/*
- * the #define's avoid union tags
- */
-
-typedef struct Hash_bucket Hash_bucket_t;
-typedef struct Hash_root Hash_root_t;
-typedef struct Hash_table Hash_table_t;
-
-#define HASH_HEADER /* common bucket header */ \
- Hash_bucket_t* next; /* next in collision chain */ \
- unsigned int hash; /* hash flags and value */ \
- char* name /* key name */
-
-#define HASH_DEFAULT /* HASH_VALUE bucket elements */ \
- char* value /* key value */
-
-typedef struct /* bucket header */
-{
- HASH_HEADER;
-} Hash_header_t;
-
-struct Hash_bucket /* prototype bucket */
-{
- HASH_HEADER;
- HASH_DEFAULT;
-};
-
-typedef struct /* hash scan bucket position */
-{
- Hash_bucket_t* bucket; /* bucket */
-#ifdef _HASH_POSITION_PRIVATE_
- _HASH_POSITION_PRIVATE_
-#endif
-} Hash_position_t;
-
-typedef struct /* last lookup cache */
-{
- Hash_table_t* table; /* last lookup table */
- Hash_bucket_t* bucket; /* last lookup bucket */
-#ifdef _HASH_LAST_PRIVATE_
- _HASH_LAST_PRIVATE_
-#endif
-} Hash_last_t;
-
-struct Hash_root /* root hash table information */
-{
- int accesses; /* number of accesses */
- int collisions; /* number of collisions */
- int flags; /* flags: see HASH_[A-Z]* */
- Hash_last_t last; /* last lookup cache */
- __V_* context; /* user defined context */
-#ifdef _HASH_ROOT_PRIVATE_
- _HASH_ROOT_PRIVATE_
-#endif
-};
-
-struct Hash_table /* hash table information */
-{
- Hash_root_t* root; /* root hash table information */
- int size; /* table size */
- int buckets; /* active bucket count */
- char* name; /* table name */
- Hash_table_t* scope; /* scope covered table */
- short flags; /* flags: see HASH_[A-Z]* */
-#ifdef _HASH_TABLE_PRIVATE_
- _HASH_TABLE_PRIVATE_
-#endif
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Hash_table_t* hashalloc __PROTO__((Hash_table_t*, ...));
-extern __MANGLE__ void hashdone __PROTO__((Hash_position_t*));
-extern __MANGLE__ void hashdump __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ Hash_table_t* hashfree __PROTO__((Hash_table_t*));
-extern __MANGLE__ Hash_bucket_t* hashlast __PROTO__((Hash_table_t*));
-extern __MANGLE__ char* hashlook __PROTO__((Hash_table_t*, const char*, long, const char*));
-extern __MANGLE__ Hash_bucket_t* hashnext __PROTO__((Hash_position_t*));
-extern __MANGLE__ Hash_position_t* hashscan __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ void hashsize __PROTO__((Hash_table_t*, int));
-extern __MANGLE__ Hash_table_t* hashview __PROTO__((Hash_table_t*, Hash_table_t*));
-extern __MANGLE__ int hashwalk __PROTO__((Hash_table_t*, int, int (*)(const char*, char*, __V_*), __V_*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/hashkey.h b/usr/src/lib/libast/sparcv9/include/ast/hashkey.h
deleted file mode 100644
index 84be9113a1..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/hashkey.h
+++ /dev/null
@@ -1,73 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * 1-6 char lower-case keyword -> long hash
- * digit args passed as HASHKEYN('2')
- */
-
-#ifndef _HASHKEY_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASHKEY_H
-
-#define HASHKEYMAX 6
-#define HASHKEYBIT 5
-#define HASHKEYOFF ('a'-1)
-#define HASHKEYPART(h,c) (((h)<<HASHKEYBIT)+HASHKEY1(c))
-
-#define HASHKEYN(n) ((n)-'0'+'z'+1)
-
-#define HASHKEY1(c1) ((c1)-HASHKEYOFF)
-#define HASHKEY2(c1,c2) HASHKEYPART(HASHKEY1(c1),c2)
-#define HASHKEY3(c1,c2,c3) HASHKEYPART(HASHKEY2(c1,c2),c3)
-#define HASHKEY4(c1,c2,c3,c4) HASHKEYPART(HASHKEY3(c1,c2,c3),c4)
-#define HASHKEY5(c1,c2,c3,c4,c5) HASHKEYPART(HASHKEY4(c1,c2,c3,c4),c5)
-#define HASHKEY6(c1,c2,c3,c4,c5,c6) HASHKEYPART(HASHKEY5(c1,c2,c3,c4,c5),c6)
-
-#define HASHNKEY1(n,c1) HASHKEY2((n)+HASHKEYOFF,c1)
-#define HASHNKEY2(n,c2,c1) HASHKEY3((n)+HASHKEYOFF,c2,c1)
-#define HASHNKEY3(n,c3,c2,c1) HASHKEY4((n)+HASHKEYOFF,c3,c2,c1)
-#define HASHNKEY4(n,c4,c3,c2,c1) HASHKEY5((n)+'a',c4,c3,c2,c1)
-#define HASHNKEY5(n,c5,c4,c3,c2,c1) HASHKEY6((n)+'a',c5,c4,c3,c2,c1)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ long strkey __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/hashpart.h b/usr/src/lib/libast/sparcv9/include/ast/hashpart.h
deleted file mode 100644
index 5d33aac61d..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/hashpart.h
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * K. P. Vo
- * G. S. Fowler
- * AT&T Research
- *
- * ``the best'' combined linear congruent checksum/hash/PRNG
- */
-
-#ifndef _HASHPART_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _HASHPART_H
-
-#define HASH_ADD(h) (0x9c39c33dL)
-
-#if __sparc__ || __sparc || sparc
-
-#define HASH_A(h,n) ((((h) << 2) - (h)) << (n))
-#define HASH_B(h,n) ((((h) << 4) - (h)) << (n))
-#define HASH_C(h,n) ((HASH_A(h,7) + HASH_B(h,0)) << (n))
-#define HASH_MPY(h) (HASH_C(h,22)+HASH_C(h,10)+HASH_A(h,6)+HASH_A(h,3)+(h))
-
-#else
-
-#define HASH_MPY(h) ((h)*0x63c63cd9L)
-
-#endif
-
-#define HASHPART(h,c) (h = HASH_MPY(h) + HASH_ADD(h) + (c))
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/iconv.h b/usr/src/lib/libast/sparcv9/include/ast/iconv.h
deleted file mode 100644
index e65540c075..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/iconv.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_iconv.h>
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ip6.h b/usr/src/lib/libast/sparcv9/include/ast/ip6.h
deleted file mode 100644
index 2712064a7e..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ip6.h
+++ /dev/null
@@ -1,28 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#if !_IP6_H
-#define _IP6_H 1
-
-#define IP6ADDR 16
-#define IP6BITS IP6ADDR
-#define IP6PREFIX (IP6ADDR+1)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* fmtip6 __PROTO__((unsigned char*, int));
-extern __MANGLE__ int strtoip6 __PROTO__((const char*, char**, unsigned char*, unsigned char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/lc.h b/usr/src/lib/libast/sparcv9/include/ast/lc.h
deleted file mode 100644
index 65fdab45ab..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/lc.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated by ./lcgen : : */
-
-
-#ifndef _LC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LC_H 1
-
-#include <ast.h>
-
-#define LC_abbreviated 0x00001
-#define LC_checked 0x00002
-#define LC_debug 0x00004
-#define LC_default 0x00008
-#define LC_defined 0x00010
-#define LC_local 0x00020
-#define LC_primary 0x00040
-#define LC_qualified 0x00080
-#define LC_undefined 0x00100
-#define LC_utf8 0x00200
-#define LC_verbose 0x00400
-#define LC_setlocale 0x10000
-#define LC_setenv 0x20000
-#define LC_user 0x40000
-#define LC_language_attribute_max 2
-#define LC_territory_language_max 4
-
-struct Lc_s;
-
-typedef struct Lc_info_s
-{
- const struct Lc_s* lc;
- unsigned long number;
- __V_* data;
-} Lc_info_t;
-
-typedef struct Lc_attribute_s
-{
- const char* name;
- unsigned long flags;
- unsigned long index;
-} Lc_attribute_t;
-
-typedef struct Lc_charset_s
-{
- const char* code;
- const char* alternates;
- const char* ms;
- unsigned long index;
-} Lc_charset_t;
-
-typedef struct Lc_language_s
-{
- const char* code;
- const char* name;
- const char* alternates;
- const Lc_charset_t* charset;
- unsigned long flags;
- unsigned long index;
- const Lc_attribute_t* attributes[LC_language_attribute_max];
-} Lc_language_t;
-
-typedef struct Lc_territory_s
-{
- const char* code;
- const char* name;
- unsigned long flags;
- unsigned long index;
- const Lc_language_t* languages[LC_territory_language_max];
-#ifdef _LC_TERRITORY_PRIVATE_
- _LC_TERRITORY_PRIVATE_
-#endif
-} Lc_territory_t;
-
-typedef struct Lc_map_s
-{
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_t* attribute;
-} Lc_map_t;
-
-typedef struct Lc_attribute_list_s
-{
- struct Lc_attribute_list_s* next;
- const Lc_attribute_t* attribute;
-} Lc_attribute_list_t;
-
-typedef struct Lc_s
-{
- const char* name;
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_list_t* attributes;
- unsigned long flags;
- unsigned long index;
-#ifdef _LC_PRIVATE_
- _LC_PRIVATE_
-#endif
-} Lc_t;
-
-struct Lc_category_s;
-
-typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
-
-typedef struct Lc_category_s
-{
- const char* name;
- int external;
- int internal;
- Lc_category_set_f setf;
- Lc_t* prev;
- unsigned int flags;
-} Lc_category_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
-extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
-extern __MANGLE__ int lcindex __PROTO__((int, int));
-extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
-extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
-extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/ls.h b/usr/src/lib/libast/sparcv9/include/ast/ls.h
deleted file mode 100644
index a8a5fcb0e0..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/ls.h
+++ /dev/null
@@ -1,99 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * ls formatter interface definitions
- */
-
-#ifndef _LS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LS_H
-
-#include <ast_std.h>
-#include <ast_fs.h>
-#include <ast_mode.h>
-
-/*
- * some systems (could it beee AIX) pollute the std name space
- */
-
-#undef fileid
-#define fileid fileID
-
-#define LS_BLOCKSIZE 512
-
-#define iblocks(p) _iblocks(p)
-
-#if _mem_st_rdev_stat
-#define idevice(p) ((p)->st_rdev)
-#define IDEVICE(p,v) ((p)->st_rdev=(v))
-#else
-#define idevice(p) 0
-#define IDEVICE(p,v)
-#endif
-
-#define LS_ATIME (1<<0) /* list st_atime */
-#define LS_BLOCKS (1<<1) /* list blocks used by file */
-#define LS_CTIME (1<<2) /* list st_ctime */
-#define LS_EXTERNAL (1<<3) /* st_mode is modex canonical */
-#define LS_INUMBER (1<<4) /* list st_ino */
-#define LS_LONG (1<<5) /* long listing */
-#define LS_MARK (1<<6) /* append file name marks */
-#define LS_NOGROUP (1<<7) /* omit group name for LS_LONG */
-#define LS_NOUSER (1<<8) /* omit user name for LS_LONG */
-#define LS_NUMBER (1<<9) /* number instead of name */
-
-#define LS_USER (1<<10) /* first user flag bit */
-
-#define LS_W_BLOCKS 6 /* LS_BLOCKS field width */
-#define LS_W_INUMBER 9 /* LS_INUMBER field width */
-#define LS_W_LONG 57 /* LS_LONG width (w/o names) */
-#define LS_W_LINK 4 /* link text width (w/o names) */
-#define LS_W_MARK 1 /* LS_MARK field width */
-#define LS_W_NAME 9 /* group|user name field width */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ off_t _iblocks __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtdev __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtfs __PROTO__((struct stat*));
-extern __MANGLE__ char* fmtls __PROTO__((char*, const char*, struct stat*, const char*, const char*, int));
-extern __MANGLE__ int pathstat __PROTO__((const char*, struct stat*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/magic.h b/usr/src/lib/libast/sparcv9/include/ast/magic.h
deleted file mode 100644
index 8683016e80..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/magic.h
+++ /dev/null
@@ -1,96 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * magic interface definitions
- */
-
-#ifndef _MAGIC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MAGIC_H
-
-#include <sfio.h>
-#include <ls.h>
-
-#define MAGIC_VERSION 19961031L
-
-#ifndef MAGIC_FILE
-#define MAGIC_FILE "lib/file/magic"
-#endif
-
-#ifndef MAGIC_DIR
-#define MAGIC_DIR "lib/file"
-#endif
-
-#define MAGIC_FILE_ENV "MAGICFILE"
-
-#define MAGIC_MIME (1<<0) /* magictype returns MIME type */
-#define MAGIC_VERBOSE (1<<1) /* verbose magic file errors */
-
-#define MAGIC_USER (1L<<16) /* first user flag bit */
-
-struct Magic_s;
-struct Magicdisc_s;
-
-typedef struct Magicdisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* MAGIC_* flags */
- Error_f errorf; /* error function */
-} Magicdisc_t;
-
-typedef struct Magic_s
-{
- const char* id; /* library id string */
-
-#ifdef _MAGIC_PRIVATE_
- _MAGIC_PRIVATE_
-#endif
-
-} Magic_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Magic_t* magicopen __PROTO__((Magicdisc_t*));
-extern __MANGLE__ int magicload __PROTO__((Magic_t*, const char*, unsigned long));
-extern __MANGLE__ int magiclist __PROTO__((Magic_t*, Sfio_t*));
-extern __MANGLE__ char* magictype __PROTO__((Magic_t*, Sfio_t*, const char*, struct stat*));
-extern __MANGLE__ int magicclose __PROTO__((Magic_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/magicid.h b/usr/src/lib/libast/sparcv9/include/ast/magicid.h
deleted file mode 100644
index 1dca0c1e42..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/magicid.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * generic binary magic id definitions
- */
-
-#ifndef _MAGICID_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MAGICID_H 1
-
-#include <ast_common.h>
-
-#define MAGICID 0x00010203
-
-typedef uint32_t Magicid_data_t;
-
-typedef struct Magicid_s
-{
- Magicid_data_t magic; /* magic number */
- char name[8]; /* generic data/application name*/
- char type[12]; /* specific data type */
- Magicid_data_t version; /* YYYYMMDD or 0xWWXXYYZZ */
- Magicid_data_t size;
-} Magicid_t;
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/mc.h b/usr/src/lib/libast/sparcv9/include/ast/mc.h
deleted file mode 100644
index b84df7239e..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/mc.h
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * machine independent binary message catalog interface
- *
- * file layout
- * all numbers are sfputu() format
- *
- * 4 char magic (^M^S^G0)
- * <method locale YYYY-MM-DD>\0
- * (<optional strings>\0)*
- * \0
- * string table size
- * #msgs total
- * #max set number
- * #set-id 1
- * #msgs in set 1
- * ...
- * #set-id #sets
- * #msgs in set #sets
- * end of sets (0)
- * msg(1,1) size
- * ...
- * msg(#sets,#msgs) size
- * string table
- */
-
-#ifndef _MC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MC_H
-
-#include <ast.h>
-
-#define MC_MAGIC "\015\023\007\000"
-#define MC_MAGIC_SIZE 4
-
-#define MC_SET_MAX 1023
-#define MC_NUM_MAX 32767
-
-#define MC_NLS (1<<10)
-
-#define MC_MESSAGE_SET(s) mcindex(s,NiL,NiL,NiL)
-
-typedef struct
-{
- char** msg;
- int num;
- int gen;
-} Mcset_t;
-
-typedef struct
-{
- Mcset_t* set;
- int num;
- int gen;
- char* translation;
-#ifdef _MC_PRIVATE_
- _MC_PRIVATE_
-#endif
-} Mc_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* mcfind __PROTO__((char*, const char*, const char*, int, int));
-extern __MANGLE__ Mc_t* mcopen __PROTO__((Sfio_t*));
-extern __MANGLE__ char* mcget __PROTO__((Mc_t*, int, int, const char*));
-extern __MANGLE__ int mcput __PROTO__((Mc_t*, int, int, const char*));
-extern __MANGLE__ int mcdump __PROTO__((Mc_t*, Sfio_t*));
-extern __MANGLE__ int mcindex __PROTO__((const char*, char**, int*, int*));
-extern __MANGLE__ int mcclose __PROTO__((Mc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/mime.h b/usr/src/lib/libast/sparcv9/include/ast/mime.h
deleted file mode 100644
index 5943b58eaa..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/mime.h
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * mime/mailcap interface
- */
-
-#ifndef _MIMETYPE_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MIMETYPE_H 1
-
-#include <sfio.h>
-#include <ls.h>
-
-#define MIME_VERSION 19970717L
-
-#ifndef MIME_FILES
-#define MIME_FILES "~/.mailcap:/usr/local/etc/mailcap:/usr/etc/mailcap:/etc/mailcap:/etc/mail/mailcap:/usr/public/lib/mailcap"
-#endif
-
-#define MIME_FILES_ENV "MAILCAP"
-
-#define MIME_LIST (1<<0) /* mimeload arg is : list */
-#define MIME_NOMAGIC (1<<1) /* no magic for mimetype() */
-#define MIME_PIPE (1<<2) /* mimeview() io is piped */
-#define MIME_REPLACE (1<<3) /* replace existing definition */
-
-#define MIME_USER (1L<<16) /* first user flag bit */
-
-struct Mime_s;
-typedef struct Mime_s Mime_t;
-
-struct Mimedisc_s;
-typedef struct Mimedisc_s Mimedisc_t;
-
-typedef int (*Mimevalue_f) __PROTO__((Mime_t*, __V_*, char*, size_t, Mimedisc_t*));
-
-struct Mimedisc_s
-{
- unsigned long version; /* interface version */
- unsigned long flags; /* MIME_* flags */
- Error_f errorf; /* error function */
- Mimevalue_f valuef; /* value extraction function */
-};
-
-struct Mime_s
-{
- const char* id; /* library id string */
-
-#ifdef _MIME_PRIVATE_
- _MIME_PRIVATE_
-#endif
-
-};
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Mime_t* mimeopen __PROTO__((Mimedisc_t*));
-extern __MANGLE__ int mimeload __PROTO__((Mime_t*, const char*, unsigned long));
-extern __MANGLE__ int mimelist __PROTO__((Mime_t*, Sfio_t*, const char*));
-extern __MANGLE__ int mimeclose __PROTO__((Mime_t*));
-extern __MANGLE__ int mimeset __PROTO__((Mime_t*, char*, unsigned long));
-extern __MANGLE__ char* mimetype __PROTO__((Mime_t*, Sfio_t*, const char*, struct stat*));
-extern __MANGLE__ char* mimeview __PROTO__((Mime_t*, const char*, const char*, const char*, const char*));
-extern __MANGLE__ int mimehead __PROTO__((Mime_t*, __V_*, size_t, size_t, char*));
-extern __MANGLE__ int mimecmp __PROTO__((const char*, const char*, char**));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/mnt.h b/usr/src/lib/libast/sparcv9/include/ast/mnt.h
deleted file mode 100644
index 8bf8c12814..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/mnt.h
+++ /dev/null
@@ -1,69 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * mounted filesystem scan interface
- */
-
-#ifndef _MNT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MNT_H 1
-
-#undef MNT_REMOTE /* aix clash */
-#define MNT_REMOTE (1<<0) /* remote mount */
-
-typedef struct
-{
- char* fs; /* filesystem name */
- char* dir; /* mounted dir */
- char* type; /* filesystem type */
- char* options; /* options */
- int freq; /* backup frequency */
- int npass; /* number of parallel passes */
- int flags; /* MNT_* flags */
-} Mnt_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ __V_* mntopen __PROTO__((const char*, const char*));
-extern __MANGLE__ Mnt_t* mntread __PROTO__((__V_*));
-extern __MANGLE__ int mntwrite __PROTO__((__V_*, const Mnt_t*));
-extern __MANGLE__ int mntclose __PROTO__((__V_*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/modecanon.h b/usr/src/lib/libast/sparcv9/include/ast/modecanon.h
deleted file mode 100644
index 3fa425af8f..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/modecanon.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * canonical mode_t representation
- */
-
-#ifndef _MODECANON_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MODECANON_H
-
-#define X_ITYPE(m) ((m)&X_IFMT)
-
-#define X_IFMT 0170000
-#define X_IFWHT 0160000
-#define X_IFDOOR 0150000
-#define X_IFSOCK 0140000
-#define X_IFLNK 0120000
-#define X_IFCTG 0110000
-#define X_IFREG 0100000
-#define X_IFBLK 0060000
-#define X_IFDIR 0040000
-#define X_IFCHR 0020000
-#define X_IFIFO 0010000
-
-#define X_IPERM 0007777
-#define X_ISUID 0004000
-#define X_ISGID 0002000
-#define X_ISVTX 0001000
-#define X_IRUSR 0000400
-#define X_IWUSR 0000200
-#define X_IXUSR 0000100
-#define X_IRGRP 0000040
-#define X_IWGRP 0000020
-#define X_IXGRP 0000010
-#define X_IROTH 0000004
-#define X_IWOTH 0000002
-#define X_IXOTH 0000001
-
-#define X_IRWXU (X_IRUSR|X_IWUSR|X_IXUSR)
-#define X_IRWXG (X_IRGRP|X_IWGRP|X_IXGRP)
-#define X_IRWXO (X_IROTH|X_IWOTH|X_IXOTH)
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/modex.h b/usr/src/lib/libast/sparcv9/include/ast/modex.h
deleted file mode 100644
index 4b73e19ffe..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/modex.h
+++ /dev/null
@@ -1,62 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * external mode_t representation support
- */
-
-#ifndef _MODEX_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _MODEX_H
-
-#include <ast_fs.h>
-#include <modecanon.h>
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int modei __PROTO__((int));
-extern __MANGLE__ int modex __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _S_IDPERM
-#define modei(m) ((m)&X_IPERM)
-#if _S_IDTYPE
-#define modex(m) (m)
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/namval.h b/usr/src/lib/libast/sparcv9/include/ast/namval.h
deleted file mode 100644
index fefe46a0c7..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/namval.h
+++ /dev/null
@@ -1,51 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/nl_types.h b/usr/src/lib/libast/sparcv9/include/ast/nl_types.h
deleted file mode 100644
index 581cc13a81..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/nl_types.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_nl_types.h>
diff --git a/usr/src/lib/libast/sparcv9/include/ast/option.h b/usr/src/lib/libast/sparcv9/include/ast/option.h
deleted file mode 100644
index 5439707f8e..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/option.h
+++ /dev/null
@@ -1,120 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * command line option parse interface
- */
-
-#ifndef _OPTION_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _OPTION_H
-
-#include <ast.h>
-
-#define OPT_VERSION 20070319L
-
-#define OPT_USER (1L<<16) /* first user flag bit */
-
-struct Opt_s;
-struct Optdisc_s;
-
-typedef int (*Optinfo_f) __PROTO__((struct Opt_s*, Sfio_t*, const char*, struct Optdisc_s*));
-
-typedef struct Optdisc_s
-{
- unsigned long version; /* OPT_VERSION */
- unsigned long flags; /* OPT_* flags */
- char* catalog; /* error catalog id */
- Optinfo_f infof; /* runtime info function */
-} Optdisc_t;
-
-/* NOTE: Opt_t member order fixed by a previous binary release */
-
-#ifndef _OPT_PRIVATE_
-#define _OPT_PRIVATE_ \
- char pad[3*sizeof(__V_*)];
-#endif
-
-typedef struct Opt_s
-{
- int again; /* see optjoin() */
- char* arg; /* {:,#} string argument */
- char** argv; /* most recent argv */
- int index; /* argv index */
- char* msg; /* error/usage message buffer */
- long num; /* OBSOLETE -- use number */
- int offset; /* char offset in argv[index] */
- char option[8]; /* current flag {-,+} + option */
- char name[64]; /* current long name or flag */
- Optdisc_t* disc; /* user discipline */
- intmax_t number; /* # numeric argument */
- unsigned char assignment; /* option arg assigment op */
- unsigned char pads[sizeof(__V_*)-1];
- _OPT_PRIVATE_
-} Opt_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Opt_t* _opt_infop_;
-
-#define opt_info (*_opt_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define optinit(d,f) (memset(d,0,sizeof(*(d))),(d)->version=OPT_VERSION,(d)->infof=(f),opt_info.disc=(d))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int optget __PROTO__((char**, const char*));
-extern __MANGLE__ int optjoin __PROTO__((char**, ...));
-extern __MANGLE__ char* opthelp __PROTO__((const char*, const char*));
-extern __MANGLE__ char* optusage __PROTO__((const char*));
-extern __MANGLE__ int optstr __PROTO__((const char*, const char*));
-extern __MANGLE__ int optesc __PROTO__((Sfio_t*, const char*, int));
-extern __MANGLE__ Opt_t* optctx __PROTO__((Opt_t*, Opt_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/preroot.h b/usr/src/lib/libast/sparcv9/include/ast/preroot.h
deleted file mode 100644
index a2c891c032..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/preroot.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/proc.h b/usr/src/lib/libast/sparcv9/include/ast/proc.h
deleted file mode 100644
index 4161e1a385..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/proc.h
+++ /dev/null
@@ -1,115 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * process library interface
- */
-
-#ifndef _PROC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _PROC_H
-
-#include <ast.h>
-
-#define PROC_ARGMOD (1<<0) /* argv[-1],argv[0] can be modified */
-#define PROC_BACKGROUND (1<<1) /* shell background (&) setup */
-#define PROC_CHECK (1<<17) /* check that command exists */
-#define PROC_CLEANUP (1<<2) /* close parent redirect fds on error */
-#define PROC_DAEMON (1<<3) /* daemon setup */
-#define PROC_ENVCLEAR (1<<4) /* clear environment */
-#define PROC_FOREGROUND (1<<14) /* system(3) setup */
-#define PROC_GID (1<<5) /* setgid(getgid()) */
-#define PROC_IGNORE (1<<6) /* ignore parent pipe errors */
-#define PROC_IGNOREPATH (1<<16) /* procrun() intercept to ignore path */
-#define PROC_OVERLAY (1<<7) /* overlay current process if possible */
-#define PROC_PARANOID (1<<8) /* restrict everything */
-#define PROC_PRIVELEGED (1<<9) /* setuid(0), setgid(getegid()) */
-#define PROC_READ (1<<10) /* proc pipe fd 1 returned */
-#define PROC_SESSION (1<<11) /* session leader */
-#define PROC_UID (1<<12) /* setuid(getuid()) */
-#define PROC_WRITE (1<<13) /* proc pipe fd 0 returned */
-#define PROC_ZOMBIE (1<<15) /* proc may leave a zombie behind */
-
-#define PROC_ARG_BIT 14 /* bits per op arg */
-#define PROC_OP_BIT 4 /* bits per op */
-
-#define PROC_ARG_NULL ((1<<PROC_ARG_BIT)-1)
-
-#define PROC_fd_dup 0x4
-#define PROC_FD_CHILD 0x1
-#define PROC_FD_PARENT 0x2
-
-#define PROC_sig_dfl 0x8
-#define PROC_sig_ign 0x9
-
-#define PROC_sys_pgrp 0xa
-#define PROC_sys_umask 0xb
-
-#define PROC_op1(o,a) (((o)<<(2*PROC_ARG_BIT))|((a)&((PROC_ARG_NULL<<PROC_ARG_BIT)|PROC_ARG_NULL)))
-#define PROC_op2(o,a,b) (((o)<<(2*PROC_ARG_BIT))|(((b)&PROC_ARG_NULL)<<PROC_ARG_BIT)|((a)&PROC_ARG_NULL))
-
-#define PROC_FD_CLOSE(p,f) PROC_op2(PROC_fd_dup|(f),p,PROC_ARG_NULL)
-#define PROC_FD_DUP(p,c,f) PROC_op2(PROC_fd_dup|(f),p,c)
-#define PROC_SIG_DFL(s) PROC_op1(PROC_sig_dfl,s,0)
-#define PROC_SIG_IGN(s) PROC_op1(PROC_sig_ign,s,0)
-#define PROC_SYS_PGRP(g) PROC_op1(PROC_sys_pgrp,g)
-#define PROC_SYS_UMASK(m) PROC_op1(PROC_sys_umask,m,0)
-
-#define PROC_OP(x) (((x)>>(2*PROC_ARG_BIT))&((1<<PROC_OP_BIT)-1))
-#define PROC_ARG(x,n) ((n)?(((x)>>(((n)-1)*PROC_ARG_BIT))&PROC_ARG_NULL):(((x)&~((1<<(2*PROC_ARG_BIT))-1))==~((1<<(2*PROC_ARG_BIT))-1))?(-1):((x)&~((1<<(2*PROC_ARG_BIT))-1)))
-
-typedef struct
-{
- pid_t pid; /* process id */
- pid_t pgrp; /* process group id */
- int rfd; /* read fd if applicable */
- int wfd; /* write fd if applicable */
-
-#ifdef _PROC_PRIVATE_
-_PROC_PRIVATE_
-#endif
-
-} Proc_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int procclose __PROTO__((Proc_t*));
-extern __MANGLE__ int procfree __PROTO__((Proc_t*));
-extern __MANGLE__ Proc_t* procopen __PROTO__((const char*, char**, char**, long*, int));
-extern __MANGLE__ int procrun __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/prototyped.h b/usr/src/lib/libast/sparcv9/include/ast/prototyped.h
deleted file mode 100644
index 113fb94d24..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/prototyped.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/re_comp.h b/usr/src/lib/libast/sparcv9/include/ast/re_comp.h
deleted file mode 100644
index ec1d512e40..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/re_comp.h
+++ /dev/null
@@ -1,52 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * re_comp interface definitions
- *
- * OBSOLETE: use <regex.h>
- */
-
-#ifndef _RE_COMP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _RE_COMP_H
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* re_comp __PROTO__((const char*));
-extern __MANGLE__ int re_exec __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/recfmt.h b/usr/src/lib/libast/sparcv9/include/ast/recfmt.h
deleted file mode 100644
index fcd56de020..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/recfmt.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * record format interface
- */
-
-#ifndef _RECFMT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _RECFMT_H 1
-
-#include <ast.h>
-
-typedef uint32_t Recfmt_t;
-
-#define REC_delimited 0
-#define REC_fixed 1
-#define REC_variable 2
-#define REC_method 14
-#define REC_none 15
-
-#define REC_M_path 0
-#define REC_M_data 1
-
-#define RECTYPE(f) (((f)>>28)&((1<<4)-1))
-
-#define REC_D_TYPE(d) ((REC_delimited<<28)|((d)&((1<<8)-1)))
-#define REC_D_DELIMITER(f) ((f)&((1<<8)-1))
-
-#define REC_F_TYPE(s) ((REC_fixed<<28)|((s)&((1<<28)-1)))
-#define REC_F_SIZE(f) ((f)&((1<<28)-1))
-
-#define REC_U_TYPE(t,a) (((t)<<28)|((a)&((1<<28)-1)))
-#define REC_U_ATTRIBUTES(f) ((f)&~((1<<28)-1))
-
-#define REC_V_TYPE(h,o,z,l,i) ((REC_variable<<28)|((h)<<23)|((o)<<19)|(((z)-1)<<18)|((l)<<17)|((i)<<16))
-#define REC_V_RECORD(f,s) (((f)&(((1<<16)-1)<<16))|(s))
-#define REC_V_HEADER(f) (((f)>>23)&((1<<5)-1))
-#define REC_V_OFFSET(f) (((f)>>19)&((1<<4)-1))
-#define REC_V_LENGTH(f) ((((f)>>18)&1)+1)
-#define REC_V_LITTLE(f) (((f)>>17)&1)
-#define REC_V_INCLUSIVE(f) (((f)>>16)&1)
-#define REC_V_SIZE(f) ((f)&((1<<16)-1))
-#define REC_V_ATTRIBUTES(f) ((f)&~((1<<16)-1))
-
-#define REC_M_TYPE(i) ((REC_method<<28)|(i))
-#define REC_M_INDEX(f) ((f)&((1<<28)-1))
-
-#define REC_N_TYPE() 0xffffffff
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ char* fmtrec __PROTO__((Recfmt_t, int));
-extern __MANGLE__ Recfmt_t recfmt __PROTO__((const __V_*, size_t, off_t));
-extern __MANGLE__ Recfmt_t recstr __PROTO__((const char*, char**));
-extern __MANGLE__ ssize_t reclen __PROTO__((Recfmt_t, const __V_*, size_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/regex.h b/usr/src/lib/libast/sparcv9/include/ast/regex.h
deleted file mode 100644
index 9b7299c814..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/regex.h
+++ /dev/null
@@ -1,230 +0,0 @@
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-#ifdef _AST_STD_I
-#define _REGEX_H -1
-#define regex_t int
-#define regmatch_t int
-#endif
-#ifndef _REGEX_H
-#define _REGEX_H 1
-#undef regex_t
-#undef regmatch_t
-
-#include <ast_common.h>
-
-#define REG_VERSION 20030916L
-
-/* regcomp flags */
-
-#define REG_AUGMENTED 0x00000001 /* enable ! & < > */
-#define REG_EXTENDED 0x00000002 /* enable ( | ) */
-#define REG_ICASE 0x00000004 /* ignore case in match */
-#define REG_NEWLINE 0x00000008 /* ^/$ match embedded \n */
-#define REG_NOSUB 0x00000010 /* don't report subexp matches */
-#define REG_SHELL 0x00000020 /* shell pattern syntax */
-
-/* nonstandard regcomp flags */
-
-#define REG_LEFT 0x00000100 /* implicit ^... */
-#define REG_LITERAL 0x00000200 /* no operators */
-#define REG_MINIMAL 0x00000400 /* minimal match */
-#define REG_NULL 0x00000800 /* allow null patterns */
-#define REG_RIGHT 0x00001000 /* implicit ...$ */
-#define REG_LENIENT 0x00002000 /* look the other way */
-#define REG_ESCAPE 0x00004000 /* \ escapes delimiter in [...] */
-#define REG_FIRST 0x00008000 /* first match found will do */
-#define REG_MULTIPLE 0x00010000 /* multiple \n sep patterns */
-#define REG_DISCIPLINE 0x00020000 /* regex_t.re_disc is valid */
-#define REG_SPAN 0x00040000 /* . matches \n */
-#define REG_COMMENT 0x00080000 /* ignore pattern space & #...\n*/
-#define REG_MULTIREF 0x00100000 /* multiple digit backrefs */
-#define REG_MUSTDELIM 0x08000000 /* all delimiters required */
-#define REG_DELIMITED 0x10000000 /* pattern[0] is delimiter */
-#define REG_CLASS_ESCAPE 0x80000000 /* \ escapes in [...] */
-
-#define REG_SHELL_DOT 0x00200000 /* explicit leading . match */
-#define REG_SHELL_ESCAPED 0x00400000 /* \ not special */
-#define REG_SHELL_GROUP 0x20000000 /* (|&) inside [@|&](...) only */
-#define REG_SHELL_PATH 0x00800000 /* explicit / match */
-
-#define REG_REGEXP 0x40000000 /* <regexp.h> compatibility */
-
-/* regexec flags */
-
-#define REG_NOTBOL 0x00000040 /* ^ is not a special char */
-#define REG_NOTEOL 0x00000080 /* $ is not a special char */
-
-/* nonstandard regexec flags */
-
-#define REG_INVERT 0x01000000 /* invert regrexec match sense */
-#define REG_STARTEND 0x02000000 /* subject==match[0].rm_{so,eo} */
-#define REG_ADVANCE 0x04000000 /* advance match[0].rm_{so,eo} */
-
-/* regalloc flags */
-
-#define REG_NOFREE 0x00000001 /* don't free */
-
-/* regsub flags */
-
-#define REG_SUB_ALL 0x00000001 /* substitute all occurrences */
-#define REG_SUB_LOWER 0x00000002 /* substitute to lower case */
-#define REG_SUB_UPPER 0x00000004 /* substitute to upper case */
-#define REG_SUB_PRINT 0x00000010 /* internal no-op */
-#define REG_SUB_NUMBER 0x00000020 /* internal no-op */
-#define REG_SUB_STOP 0x00000040 /* internal no-op */
-#define REG_SUB_WRITE 0x00000080 /* internal no-op */
-#define REG_SUB_LAST 0x00000100 /* last substitution option */
-#define REG_SUB_FULL 0x00000200 /* fully delimited */
-#define REG_SUB_USER 0x00001000 /* first user flag bit */
-
-/* regex error codes */
-
-#define REG_ENOSYS (-1) /* not supported */
-#define REG_NOMATCH 1 /* regexec didn't match */
-#define REG_BADPAT 2 /* invalid regular expression */
-#define REG_ECOLLATE 3 /* invalid collation element */
-#define REG_ECTYPE 4 /* invalid character class */
-#define REG_EESCAPE 5 /* trailing \ in pattern */
-#define REG_ESUBREG 6 /* invalid \digit backreference */
-#define REG_EBRACK 7 /* [...] imbalance */
-#define REG_EPAREN 8 /* \(...\) or (...) imbalance */
-#define REG_EBRACE 9 /* \{...\} or {...} imbalance */
-#define REG_BADBR 10 /* invalid {...} digits */
-#define REG_ERANGE 11 /* invalid [...] range endpoint */
-#define REG_ESPACE 12 /* out of space */
-#define REG_BADRPT 13 /* unary op not preceded by re */
-#define REG_ENULL 14 /* empty subexpr in pattern */
-#define REG_ECOUNT 15 /* re component count overflow */
-#define REG_BADESC 16 /* invalid \char escape */
-#define REG_VERSIONID 17 /* version id (pseudo error) */
-#define REG_EFLAGS 18 /* flags conflict */
-#define REG_EDELIM 19 /* invalid or omitted delimiter */
-#define REG_PANIC 20 /* unrecoverable internal error */
-
-struct regex_s; typedef struct regex_s regex_t;
-struct regdisc_s; typedef struct regdisc_s regdisc_t;
-
-typedef int (*regclass_t) __PROTO__((int));
-typedef uint32_t regflags_t;
-typedef int regoff_t;
-typedef int (*regerror_t) __PROTO__((const regex_t*, regdisc_t*, int, ...));
-typedef __V_* (*regcomp_t) __PROTO__((const regex_t*, const char*, size_t, regdisc_t*));
-typedef int (*regexec_t) __PROTO__((const regex_t*, __V_*, const char*, size_t, const char*, size_t, char**, regdisc_t*));
-typedef __V_* (*regresize_t) __PROTO__((__V_*, __V_*, size_t));
-typedef int (*regrecord_t) __PROTO__((__V_*, const char*, size_t));
-
-typedef struct regmatch_s
-{
- regoff_t rm_so; /* offset of start */
- regoff_t rm_eo; /* offset of end */
-} regmatch_t;
-
-typedef struct regsub_s
-{
- regflags_t re_flags; /* regsubcomp() flags */
- char* re_buf; /* regsubexec() output buffer */
- size_t re_len; /* re_buf length */
- int re_min; /* regsubcomp() min matches */
-#ifdef _REG_SUB_PRIVATE_
- _REG_SUB_PRIVATE_
-#endif
-} regsub_t;
-
-struct regdisc_s
-{
- unsigned long re_version; /* discipline version */
- regflags_t re_flags; /* discipline flags */
- regerror_t re_errorf; /* error function */
- int re_errorlevel; /* errorf level */
- regresize_t re_resizef; /* alloc/free function */
- __V_* re_resizehandle;/* resizef handle */
- regcomp_t re_compf; /* (?{...}) compile function */
- regexec_t re_execf; /* (?{...}) execute function */
- unsigned char* re_map; /* external to native ccode map */
-};
-
-typedef struct regstat_s
-{
- regflags_t re_flags; /* REG_LEFT|REG_RIGHT */
- ssize_t re_min; /* min anchored match length */
- ssize_t re_max; /* max anchored match length */
- ssize_t re_record; /* regrexec() match length */
-} regstat_t;
-
-struct regex_s
-{
- size_t re_nsub; /* number of subexpressions */
- struct reglib_s*re_info; /* library private info */
- size_t re_npat; /* number of pattern chars used */
- regdisc_t* re_disc; /* REG_DISCIPLINE discipline */
- regsub_t* re_sub; /* regsubcomp() data */
-};
-
-#define reginit(disc) (memset(disc,0,sizeof(*(disc))),(disc)->re_version=REG_VERSION)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int regcomp __PROTO__((regex_t*, const char*, regflags_t));
-extern __MANGLE__ size_t regerror __PROTO__((int, const regex_t*, char*, size_t));
-extern __MANGLE__ int regexec __PROTO__((const regex_t*, const char*, size_t, regmatch_t*, regflags_t));
-extern __MANGLE__ void regfree __PROTO__((regex_t*));
-
-/* nonstandard hooks */
-
-#define _REG_cache 1 /* have regcache() */
-#define _REG_class 1 /* have regclass() */
-#define _REG_collate 1 /* have regcollate(), regclass() */
-#define _REG_comb 1 /* have regcomb() */
-#define _REG_decomp 1 /* have regdecomp() */
-#define _REG_dup 1 /* have regdup() */
-#define _REG_fatal 1 /* have regfatal(), regfatalpat() */
-#define _REG_ncomp 1 /* have regncomp() */
-#define _REG_nexec 1 /* have regnexec() */
-#define _REG_rexec 1 /* have regrexec(), regrecord() */
-#define _REG_stat 1 /* have regstat() */
-#define _REG_subcomp 1 /* have regsubcomp(), regsubexec() */
-
-extern __MANGLE__ regclass_t regclass __PROTO__((const char*, char**));
-extern __MANGLE__ int regaddclass __PROTO__((const char*, regclass_t));
-extern __MANGLE__ int regcollate __PROTO__((const char*, char**, char*, int));
-extern __MANGLE__ int regcomb __PROTO__((regex_t*, regex_t*));
-extern __MANGLE__ size_t regdecomp __PROTO__((regex_t*, regflags_t, char*, size_t));
-extern __MANGLE__ int regdup __PROTO__((regex_t*, regex_t*));
-extern __MANGLE__ int regncomp __PROTO__((regex_t*, const char*, size_t, regflags_t));
-extern __MANGLE__ int regnexec __PROTO__((const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t));
-extern __MANGLE__ void regfatal __PROTO__((regex_t*, int, int));
-extern __MANGLE__ void regfatalpat __PROTO__((regex_t*, int, int, const char*));
-extern __MANGLE__ int regrecord __PROTO__((const regex_t*));
-extern __MANGLE__ int regrexec __PROTO__((const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t, int, __V_*, regrecord_t));
-extern __MANGLE__ regstat_t* regstat __PROTO__((const regex_t*));
-
-extern __MANGLE__ regex_t* regcache __PROTO__((const char*, regflags_t, int*));
-
-extern __MANGLE__ int regsubcomp __PROTO__((regex_t*, const char*, const regflags_t*, int, regflags_t));
-extern __MANGLE__ int regsubexec __PROTO__((const regex_t*, const char*, size_t, regmatch_t*));
-extern __MANGLE__ int regsubflags __PROTO__((regex_t*, const char*, char**, int, const regflags_t*, int*, regflags_t*));
-extern __MANGLE__ void regsubfree __PROTO__((regex_t*));
-
-/* obsolete hooks */
-
-#ifndef _SFIO_H
-struct _sfio_s;
-#endif
-
-extern __MANGLE__ void regalloc __PROTO__((__V_*, regresize_t, regflags_t));
-extern __MANGLE__ int regsub __PROTO__((const regex_t*, struct _sfio_s*, const char*, const char*, size_t, regmatch_t*, regflags_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/regexp.h b/usr/src/lib/libast/sparcv9/include/ast/regexp.h
deleted file mode 100644
index ea2df629b5..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/regexp.h
+++ /dev/null
@@ -1,139 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * regexp interface and partial implementation
- * what a novel approach
- * don't do it again
- *
- * OBSOLETE: use <regex.h>
- */
-
-#ifndef _REGEXP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _REGEXP_H
-
-#define NBRA 9
-
-typedef struct
-{
- char* re_braslist[NBRA];
- char* re_braelist[NBRA];
- char* re_loc1;
- char* re_loc2;
- char* re_locs;
- int re_circf;
- int re_nbra;
- int re_nodelim;
- int re_sed;
-} regexp_t;
-
-#define braslist _re_info.re_braslist
-#define braelist _re_info.re_braelist
-#define circf _re_info.re_circf
-#define loc1 _re_info.re_loc1
-#define loc2 _re_info.re_loc2
-#define locs _re_info.re_locs
-#define nbra _re_info.re_nbra
-#define nodelim _re_info.re_nodelim
-#define sed _re_info.re_sed
-
-#define advance(a,b) _re_exec(&_re_info,a,b,1)
-#define compile(a,b,c,d) _re_read(&_re_info,a,b,c,d)
-#define step(a,b) _re_exec(&_re_info,a,b,0)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _re_comp __PROTO__((regexp_t*, const char*, char*, unsigned int));
-extern __MANGLE__ int _re_exec __PROTO__((regexp_t*, const char*, const char*, int));
-extern __MANGLE__ char* _re_putc __PROTO__((int));
-extern __MANGLE__ char* _re_read __PROTO__((regexp_t*, const char*, char*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#ifndef _REGEXP_DECLARE
-
-regexp_t _re_info;
-
-char*
-_re_read __PARAM__((register regexp_t* re, const char* instring, char* ep, const char* endbuf, int seof), (re, instring, ep, endbuf, seof)) __OTORP__(register regexp_t* re; const char* instring; char* ep; const char* endbuf; int seof;){
- register int c;
-
- static const char* prev;
-
-#ifdef INIT
- INIT;
-#endif
-
- re->re_nodelim = 0;
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- {
- if (c != seof)
- {
- UNGETC(c);
- re->re_nodelim = 1;
- }
- if (!re->re_sed && !prev)
- { ERROR(41); }
- RETURN((char*)endbuf);
- }
- UNGETC(c);
- prev = 0;
- for (;;)
- {
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- {
- if (re->re_sed)
- { ERROR(36); }
- UNGETC(c);
- re->re_nodelim = 1;
- break;
- }
- if (c == '\\')
- {
- _re_putc(c);
- if ((c = GETC()) == seof || c == '\n' || c == -1 || c == 0)
- { ERROR(36); }
- }
- _re_putc(c);
- }
- if (c = _re_comp(re, _re_putc(0), ep, (char*)endbuf - ep))
- { ERROR(c); }
- prev = endbuf;
- RETURN((char*)prev);
-}
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/sfdisc.h b/usr/src/lib/libast/sparcv9/include/ast/sfdisc.h
deleted file mode 100644
index bc6e00b335..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/sfdisc.h
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * sfio discipline interface definitions
- */
-
-#ifndef _SFDISC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFDISC_H
-
-#include <ast.h>
-
-#define SFDCEVENT(a,b,n) ((((a)-'A'+1)<<11)^(((b)-'A'+1)<<6)^(n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#define SFSK_DISCARD SFDCEVENT('S','K',1)
-
-/*
- * %(...) printf support
- */
-
-typedef int (*Sf_key_lookup_t) __PROTO__((__V_*, Sffmt_t*, const char*, char**, Sflong_t*));
-typedef char* (*Sf_key_convert_t) __PROTO__((__V_*, Sffmt_t*, const char*, char*, Sflong_t));
-
-extern __MANGLE__ int sfkeyprintf __PROTO__((Sfio_t*, __V_*, const char*, Sf_key_lookup_t, Sf_key_convert_t));
-#define sfkeyprintf sfkeyprintf_20000308 /* Sffmt_t* callback args */
-extern __MANGLE__ int sfkeyprintf __PROTO__((Sfio_t*, __V_*, const char*, Sf_key_lookup_t, Sf_key_convert_t));
-
-/*
- * pure sfio read and/or write disciplines
- */
-
-extern __MANGLE__ int sfdcdio __PROTO__((Sfio_t*, size_t));
-extern __MANGLE__ int sfdcdos __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdcfilter __PROTO__((Sfio_t*, const char*));
-extern __MANGLE__ int sfdcmore __PROTO__((Sfio_t*, const char*, int, int));
-extern __MANGLE__ int sfdcprefix __PROTO__((Sfio_t*, const char*));
-extern __MANGLE__ int sfdcseekable __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdcslow __PROTO__((Sfio_t*));
-extern __MANGLE__ int sfdctee __PROTO__((Sfio_t*, Sfio_t*));
-extern __MANGLE__ int sfdcunion __PROTO__((Sfio_t*, Sfio_t**, int));
-
-extern __MANGLE__ Sfio_t* sfdcsubstream __PROTO__((Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/sfio.h b/usr/src/lib/libast/sparcv9/include/ast/sfio.h
deleted file mode 100644
index da6ebfd9f2..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/sfio.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_H
-#define _SFIO_H 1
-
-#define SFIO_VERSION 20080717L
-
-/* Public header file for the sfio library
-**
-** Written by Kiem-Phong Vo
-*/
-
-typedef struct _sfio_s Sfio_t;
-typedef struct _sfdisc_s Sfdisc_t;
-
-#if defined(_AST_STD_H) || defined(_PACKAGE_ast) && defined(_SFIO_PRIVATE)
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif /* _PACKAGE_ast */
-
-/* Sfoff_t should be large enough for largest file address */
-#define Sfoff_t intmax_t
-#define Sflong_t intmax_t
-#define Sfulong_t uintmax_t
-#define Sfdouble_t _ast_fltmax_t
-
-typedef ssize_t (*Sfread_f)_ARG_((Sfio_t*, Void_t*, size_t, Sfdisc_t*));
-typedef ssize_t (*Sfwrite_f)_ARG_((Sfio_t*, const Void_t*, size_t, Sfdisc_t*));
-typedef Sfoff_t (*Sfseek_f)_ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*));
-typedef int (*Sfexcept_f)_ARG_((Sfio_t*, int, Void_t*, Sfdisc_t*));
-typedef int (*Sfwalk_f)_ARG_((Sfio_t*, Void_t*));
-
-/* discipline structure */
-struct _sfdisc_s
-{ Sfread_f readf; /* read function */
- Sfwrite_f writef; /* write function */
- Sfseek_f seekf; /* seek function */
- Sfexcept_f exceptf; /* to handle exceptions */
- Sfdisc_t* disc; /* the continuing discipline */
-};
-
-#include <sfio_s.h>
-
-/* formatting environment */
-typedef struct _sffmt_s Sffmt_t;
-typedef int (*Sffmtext_f)_ARG_((Sfio_t*, Void_t*, Sffmt_t*));
-typedef int (*Sffmtevent_f)_ARG_((Sfio_t*, int, Void_t*, Sffmt_t*));
-struct _sffmt_s
-{ long version;/* version of this structure */
- Sffmtext_f extf; /* function to process arguments */
- Sffmtevent_f eventf; /* process events */
-
- char* form; /* format string to stack */
- va_list args; /* corresponding arg list */
-
- int fmt; /* format character */
- ssize_t size; /* object size */
- int flags; /* formatting flags */
- int width; /* width of field */
- int precis; /* precision required */
- int base; /* conversion base */
-
- char* t_str; /* type string */
- ssize_t n_str; /* length of t_str */
-
- Void_t* mbs; /* multibyte state for format string */
-
- Void_t* none; /* unused for now */
-};
-#define sffmtversion(fe,type) \
- ((type) ? ((fe)->version = SFIO_VERSION) : (fe)->version)
-
-#define SFFMT_SSHORT 000000010 /* 'hh' flag, char */
-#define SFFMT_TFLAG 000000020 /* 't' flag, ptrdiff_t */
-#define SFFMT_ZFLAG 000000040 /* 'z' flag, size_t */
-
-#define SFFMT_LEFT 000000100 /* left-justification */
-#define SFFMT_SIGN 000000200 /* must have a sign */
-#define SFFMT_BLANK 000000400 /* if not signed, prepend a blank */
-#define SFFMT_ZERO 000001000 /* zero-padding on the left */
-#define SFFMT_ALTER 000002000 /* alternate formatting */
-#define SFFMT_THOUSAND 000004000 /* thousand grouping */
-#define SFFMT_SKIP 000010000 /* skip assignment in scanf() */
-#define SFFMT_SHORT 000020000 /* 'h' flag */
-#define SFFMT_LONG 000040000 /* 'l' flag */
-#define SFFMT_LLONG 000100000 /* 'll' flag */
-#define SFFMT_LDOUBLE 000200000 /* 'L' flag */
-#define SFFMT_VALUE 000400000 /* value is returned */
-#define SFFMT_ARGPOS 001000000 /* getting arg for $ patterns */
-#define SFFMT_IFLAG 002000000 /* 'I' flag */
-#define SFFMT_JFLAG 004000000 /* 'j' flag, intmax_t */
-#define SFFMT_CENTER 010000000 /* '=' flag, center justification */
-#define SFFMT_SET 017777770 /* flags settable on calling extf */
-
-/* for sfmutex() call */
-#define SFMTX_LOCK 0 /* up mutex count */
-#define SFMTX_TRYLOCK 1 /* try to up mutex count */
-#define SFMTX_UNLOCK 2 /* down mutex count */
-#define SFMTX_CLRLOCK 3 /* clear mutex count */
-
-/* various constants */
-#ifndef NULL
-#define NULL 0
-#endif
-#ifndef EOF
-#define EOF (-1)
-#endif
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-/* bits for various types of files */
-#define SF_READ 0000001 /* open for reading */
-#define SF_WRITE 0000002 /* open for writing */
-#define SF_STRING 0000004 /* a string stream */
-#define SF_APPENDWR 0000010 /* file is in append mode only */
-#define SF_MALLOC 0000020 /* buffer is malloc-ed */
-#define SF_LINE 0000040 /* line buffering */
-#define SF_SHARE 0000100 /* stream with shared file descriptor */
-#define SF_EOF 0000200 /* eof was detected */
-#define SF_ERROR 0000400 /* an error happened */
-#define SF_STATIC 0001000 /* a stream that cannot be freed */
-#define SF_IOCHECK 0002000 /* call exceptf before doing IO */
-#define SF_PUBLIC 0004000 /* SF_SHARE and follow physical seek */
-#define SF_MTSAFE 0010000 /* need thread safety */
-#define SF_WHOLE 0020000 /* preserve wholeness of sfwrite/sfputr */
-#define SF_IOINTR 0040000 /* return on interrupts */
-#define SF_WCWIDTH 0100000 /* wcwidth display stream */
-
-#define SF_FLAGS 0177177 /* PUBLIC FLAGS PASSABLE TO SFNEW() */
-#define SF_SETS 0177163 /* flags passable to sfset() */
-
-#ifndef _SF_NO_OBSOLETE
-#define SF_BUFCONST 0400000 /* unused flag - for compatibility only */
-#endif
-
-/* for sfgetr/sfreserve to hold a record */
-#define SF_LOCKR 0000010 /* lock record, stop access to stream */
-#define SF_LASTR 0000020 /* get the last incomplete record */
-
-/* exception events: SF_NEW(0), SF_READ(1), SF_WRITE(2) and the below */
-#define SF_SEEK 3 /* seek error */
-#define SF_CLOSING 4 /* when stream is about to be closed */
-#define SF_DPUSH 5 /* when discipline is being pushed */
-#define SF_DPOP 6 /* when discipline is being popped */
-#define SF_DPOLL 7 /* see if stream is ready for I/O */
-#define SF_DBUFFER 8 /* buffer not empty during push or pop */
-#define SF_SYNC 9 /* announcing start/end synchronization */
-#define SF_PURGE 10 /* a sfpurge() call was issued */
-#define SF_FINAL 11 /* closing is done except stream free */
-#define SF_READY 12 /* a polled stream is ready */
-#define SF_LOCKED 13 /* stream is in a locked state */
-#define SF_ATEXIT 14 /* process is exiting */
-#define SF_EVENT 100 /* start of user-defined events */
-
-/* for stack and disciplines */
-#define SF_POPSTACK ((Sfio_t*)0) /* pop the stream stack */
-#define SF_POPDISC ((Sfdisc_t*)0) /* pop the discipline stack */
-
-/* for the notify function and discipline exception */
-#define SF_NEW 0 /* new stream */
-#define SF_SETFD (-1) /* about to set the file descriptor */
-#define SF_MTACCESS (-2) /* starting a multi-threaded stream */
-
-#define SF_BUFSIZE 8192 /* default buffer size */
-#define SF_UNBOUND (-1) /* unbounded buffer size */
-
-/* namespace incursion workarounds -- migrate to the new names */
-#if !_mac_SF_APPEND
-#define SF_APPEND SF_APPENDWR /* BSDI sys/stat.h */
-#endif
-#if !_mac_SF_CLOSE
-#define SF_CLOSE SF_CLOSING /* AIX sys/socket.h */
-#endif
-
-_BEGIN_EXTERNS_
-
-/* standard in/out/err streams */
-
-#if _BLD_sfio && defined(__EXPORT__)
-#define extern extern __EXPORT__
-#endif
-#if !_BLD_sfio && defined(__IMPORT__)
-#define extern extern __IMPORT__
-#endif
-
-extern ssize_t _Sfi;
-extern ssize_t _Sfmaxr;
-
-extern Sfio_t* sfstdin;
-extern Sfio_t* sfstdout;
-extern Sfio_t* sfstderr;
-
-#if _UWIN
-#undef extern
-#endif
-
-extern Sfio_t _Sfstdin;
-extern Sfio_t _Sfstdout;
-extern Sfio_t _Sfstderr;
-
-#undef extern
-
-#if _BLD_sfio && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Sfio_t* sfnew _ARG_((Sfio_t*, Void_t*, size_t, int, int));
-extern Sfio_t* sfopen _ARG_((Sfio_t*, const char*, const char*));
-extern Sfio_t* sfpopen _ARG_((Sfio_t*, const char*, const char*));
-extern Sfio_t* sfstack _ARG_((Sfio_t*, Sfio_t*));
-extern Sfio_t* sfswap _ARG_((Sfio_t*, Sfio_t*));
-extern Sfio_t* sftmp _ARG_((size_t));
-extern int sfwalk _ARG_((Sfwalk_f, Void_t*, int));
-extern int sfpurge _ARG_((Sfio_t*));
-extern int sfpoll _ARG_((Sfio_t**, int, int));
-extern Void_t* sfreserve _ARG_((Sfio_t*, ssize_t, int));
-extern int sfresize _ARG_((Sfio_t*, Sfoff_t));
-extern int sfsync _ARG_((Sfio_t*));
-extern int sfclrlock _ARG_((Sfio_t*));
-extern Void_t* sfsetbuf _ARG_((Sfio_t*, Void_t*, size_t));
-extern Sfdisc_t* sfdisc _ARG_((Sfio_t*,Sfdisc_t*));
-extern int sfraise _ARG_((Sfio_t*, int, Void_t*));
-extern int sfnotify _ARG_((void(*)(Sfio_t*, int, void*)));
-extern int sfset _ARG_((Sfio_t*, int, int));
-extern int sfsetfd _ARG_((Sfio_t*, int));
-extern Sfio_t* sfpool _ARG_((Sfio_t*, Sfio_t*, int));
-extern ssize_t sfread _ARG_((Sfio_t*, Void_t*, size_t));
-extern ssize_t sfwrite _ARG_((Sfio_t*, const Void_t*, size_t));
-extern Sfoff_t sfmove _ARG_((Sfio_t*, Sfio_t*, Sfoff_t, int));
-extern int sfclose _ARG_((Sfio_t*));
-extern Sfoff_t sftell _ARG_((Sfio_t*));
-extern Sfoff_t sfseek _ARG_((Sfio_t*, Sfoff_t, int));
-extern ssize_t sfputr _ARG_((Sfio_t*, const char*, int));
-extern char* sfgetr _ARG_((Sfio_t*, int, int));
-extern ssize_t sfnputc _ARG_((Sfio_t*, int, size_t));
-extern int sfungetc _ARG_((Sfio_t*, int));
-extern int sfprintf _ARG_((Sfio_t*, const char*, ...));
-extern char* sfprints _ARG_((const char*, ...));
-extern ssize_t sfsprintf _ARG_((char*, size_t, const char*, ...));
-extern ssize_t sfvsprintf _ARG_((char*, size_t, const char*, va_list));
-extern int sfvprintf _ARG_((Sfio_t*, const char*, va_list));
-extern int sfscanf _ARG_((Sfio_t*, const char*, ...));
-extern int sfsscanf _ARG_((const char*, const char*, ...));
-extern int sfvsscanf _ARG_((const char*, const char*, va_list));
-extern int sfvscanf _ARG_((Sfio_t*, const char*, va_list));
-
-/* mutex locking for thread-safety */
-extern int sfmutex _ARG_((Sfio_t*, int));
-
-/* io functions with discipline continuation */
-extern ssize_t sfrd _ARG_((Sfio_t*, Void_t*, size_t, Sfdisc_t*));
-extern ssize_t sfwr _ARG_((Sfio_t*, const Void_t*, size_t, Sfdisc_t*));
-extern Sfoff_t sfsk _ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*));
-extern ssize_t sfpkrd _ARG_((int, Void_t*, size_t, int, long, int));
-
-/* portable handling of primitive types */
-extern int sfdlen _ARG_((Sfdouble_t));
-extern int sfllen _ARG_((Sflong_t));
-extern int sfulen _ARG_((Sfulong_t));
-
-extern int sfputd _ARG_((Sfio_t*, Sfdouble_t));
-extern int sfputl _ARG_((Sfio_t*, Sflong_t));
-extern int sfputu _ARG_((Sfio_t*, Sfulong_t));
-extern int sfputm _ARG_((Sfio_t*, Sfulong_t, Sfulong_t));
-extern int sfputc _ARG_((Sfio_t*, int));
-
-extern Sfdouble_t sfgetd _ARG_((Sfio_t*));
-extern Sflong_t sfgetl _ARG_((Sfio_t*));
-extern Sfulong_t sfgetu _ARG_((Sfio_t*));
-extern Sfulong_t sfgetm _ARG_((Sfio_t*, Sfulong_t));
-extern int sfgetc _ARG_((Sfio_t*));
-
-extern int _sfputd _ARG_((Sfio_t*, Sfdouble_t));
-extern int _sfputl _ARG_((Sfio_t*, Sflong_t));
-extern int _sfputu _ARG_((Sfio_t*, Sfulong_t));
-extern int _sfputm _ARG_((Sfio_t*, Sfulong_t, Sfulong_t));
-extern int _sfflsbuf _ARG_((Sfio_t*, int));
-
-extern int _sffilbuf _ARG_((Sfio_t*, int));
-
-extern int _sfdlen _ARG_((Sfdouble_t));
-extern int _sfllen _ARG_((Sflong_t));
-extern int _sfulen _ARG_((Sfulong_t));
-
-/* miscellaneous function analogues of fast in-line functions */
-extern Sfoff_t sfsize _ARG_((Sfio_t*));
-extern int sfclrerr _ARG_((Sfio_t*));
-extern int sfeof _ARG_((Sfio_t*));
-extern int sferror _ARG_((Sfio_t*));
-extern int sffileno _ARG_((Sfio_t*));
-extern int sfstacked _ARG_((Sfio_t*));
-extern ssize_t sfvalue _ARG_((Sfio_t*));
-extern ssize_t sfslen _ARG_((void));
-extern ssize_t sfmaxr _ARG_((ssize_t, int));
-
-#undef extern
-_END_EXTERNS_
-
-/* coding long integers in a portable and compact fashion */
-#define SF_SBITS 6
-#define SF_UBITS 7
-#define SF_BBITS 8
-#define SF_SIGN (1 << SF_SBITS)
-#define SF_MORE (1 << SF_UBITS)
-#define SF_BYTE (1 << SF_BBITS)
-#define SF_U1 SF_MORE
-#define SF_U2 (SF_U1*SF_U1)
-#define SF_U3 (SF_U2*SF_U1)
-#define SF_U4 (SF_U3*SF_U1)
-
-#if __cplusplus
-#define _SF_(f) (f)
-#else
-#define _SF_(f) ((Sfio_t*)(f))
-#endif
-
-#define __sf_putd(f,v) (_sfputd(_SF_(f),(Sfdouble_t)(v)))
-#define __sf_putl(f,v) (_sfputl(_SF_(f),(Sflong_t)(v)))
-#define __sf_putu(f,v) (_sfputu(_SF_(f),(Sfulong_t)(v)))
-#define __sf_putm(f,v,m) (_sfputm(_SF_(f),(Sfulong_t)(v),(Sfulong_t)(m)))
-
-#define __sf_putc(f,c) (_SF_(f)->_next >= _SF_(f)->_endw ? \
- _sfflsbuf(_SF_(f),(int)((unsigned char)(c))) : \
- (int)(*_SF_(f)->_next++ = (unsigned char)(c)) )
-#define __sf_getc(f) (_SF_(f)->_next >= _SF_(f)->_endr ? _sffilbuf(_SF_(f),0) : \
- (int)(*_SF_(f)->_next++) )
-
-#define __sf_dlen(v) (_sfdlen((Sfdouble_t)(v)) )
-#define __sf_llen(v) (_sfllen((Sflong_t)(v)) )
-#define __sf_ulen(v) ((Sfulong_t)(v) < SF_U1 ? 1 : (Sfulong_t)(v) < SF_U2 ? 2 : \
- (Sfulong_t)(v) < SF_U3 ? 3 : (Sfulong_t)(v) < SF_U4 ? 4 : 5)
-
-#define __sf_fileno(f) (_SF_(f)->_file)
-#define __sf_eof(f) (_SF_(f)->_flags&SF_EOF)
-#define __sf_error(f) (_SF_(f)->_flags&SF_ERROR)
-#define __sf_clrerr(f) (_SF_(f)->_flags &= ~(SF_ERROR|SF_EOF))
-#define __sf_stacked(f) (_SF_(f)->_push != (Sfio_t*)0)
-#define __sf_value(f) (_SF_(f)->_val)
-#define __sf_slen() (_Sfi)
-#define __sf_maxr(n,s) ((s)?((_Sfi=_Sfmaxr),(_Sfmaxr=(n)),_Sfi):_Sfmaxr)
-
-#if defined(__INLINE__) && !_BLD_sfio
-
-__INLINE__ int sfputd(Sfio_t* f, Sfdouble_t v) { return __sf_putd(f,v); }
-__INLINE__ int sfputl(Sfio_t* f, Sflong_t v) { return __sf_putl(f,v); }
-__INLINE__ int sfputu(Sfio_t* f, Sfulong_t v) { return __sf_putu(f,v); }
-__INLINE__ int sfputm(Sfio_t* f, Sfulong_t v, Sfulong_t m)
- { return __sf_putm(f,v,m); }
-
-__INLINE__ int sfputc(Sfio_t* f, int c) { return __sf_putc(f,c); }
-__INLINE__ int sfgetc(Sfio_t* f) { return __sf_getc(f); }
-
-__INLINE__ int sfdlen(Sfdouble_t v) { return __sf_dlen(v); }
-__INLINE__ int sfllen(Sflong_t v) { return __sf_llen(v); }
-__INLINE__ int sfulen(Sfulong_t v) { return __sf_ulen(v); }
-
-__INLINE__ int sffileno(Sfio_t* f) { return __sf_fileno(f); }
-__INLINE__ int sfeof(Sfio_t* f) { return __sf_eof(f); }
-__INLINE__ int sferror(Sfio_t* f) { return __sf_error(f); }
-__INLINE__ int sfclrerr(Sfio_t* f) { return __sf_clrerr(f); }
-__INLINE__ int sfstacked(Sfio_t* f) { return __sf_stacked(f); }
-__INLINE__ ssize_t sfvalue(Sfio_t* f) { return __sf_value(f); }
-__INLINE__ ssize_t sfslen() { return __sf_slen(); }
-__INLINE__ ssize_t sfmaxr(ssize_t n, int s) { return __sf_maxr(n,s); }
-
-#else
-
-#define sfputd(f,v) ( __sf_putd((f),(v)) )
-#define sfputl(f,v) ( __sf_putl((f),(v)) )
-#define sfputu(f,v) ( __sf_putu((f),(v)) )
-#define sfputm(f,v,m) ( __sf_putm((f),(v),(m)) )
-
-#define sfputc(f,c) ( __sf_putc((f),(c)) )
-#define sfgetc(f) ( __sf_getc(f) )
-
-#define sfdlen(v) ( __sf_dlen(v) )
-#define sfllen(v) ( __sf_llen(v) )
-#define sfulen(v) ( __sf_ulen(v) )
-
-#define sffileno(f) ( __sf_fileno(f) )
-#define sfeof(f) ( __sf_eof(f) )
-#define sferror(f) ( __sf_error(f) )
-#define sfclrerr(f) ( __sf_clrerr(f) )
-#define sfstacked(f) ( __sf_stacked(f) )
-#define sfvalue(f) ( __sf_value(f) )
-#define sfslen() ( __sf_slen() )
-#define sfmaxr(n,s) ( __sf_maxr(n,s) )
-
-#endif /*__INLINE__*/
-
-#ifndef _SFSTR_H /* GSF's string manipulation stuff */
-#define _SFSTR_H 1
-
-#define sfstropen() sfnew(0, 0, -1, -1, SF_READ|SF_WRITE|SF_STRING)
-#define sfstrclose(f) sfclose(f)
-
-#define sfstrseek(f,p,m) \
- ( (m) == SEEK_SET ? \
- (((p) < 0 || (p) > (f)->_size) ? (char*)0 : \
- (char*)((f)->_next = (f)->_data+(p)) ) \
- : (m) == SEEK_CUR ? \
- ((f)->_next += (p), \
- (((f)->_next < (f)->_data || (f)->_next > (f)->_data+(f)->_size) ? \
- ((f)->_next -= (p), (char*)0) : (char*)(f)->_next ) ) \
- : (m) == SEEK_END ? \
- ( ((p) > 0 || (f)->_size+(p) < 0) ? (char*)0 : \
- (char*)((f)->_next = (f)->_data+(f)->_size+(p)) ) \
- : (char*)0 \
- )
-
-#define sfstrsize(f) ((f)->_size)
-#define sfstrtell(f) ((f)->_next - (f)->_data)
-#define sfstrpend(f) ((f)->_size - sfstrtell())
-#define sfstrbase(f) ((char*)(f)->_data)
-
-#define sfstruse(f) \
- (sfputc((f),0) < 0 ? (char*)0 : (char*)((f)->_next = (f)->_data) \
- )
-
-#define sfstrrsrv(f,n) \
- (sfreserve((f),(n),SF_WRITE|SF_LOCKR), sfwrite((f),(f)->_next,0), \
- ((f)->_next+(n) <= (f)->_data+(f)->_size ? (char*)(f)->_next : (char*)0) \
- )
-
-#define sfstrbuf(f,b,n,m) \
- (sfsetbuf((f),(b),(n)), ((f)->_flags |= (m) ? SF_MALLOC : 0), \
- ((f)->_data == (unsigned char*)(b) ? 0 : -1) \
- )
-
-#endif /* _SFSTR_H */
-
-#endif /* _SFIO_H */
diff --git a/usr/src/lib/libast/sparcv9/include/ast/sfio_s.h b/usr/src/lib/libast/sparcv9/include/ast/sfio_s.h
deleted file mode 100644
index 7f7483cc79..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/sfio_s.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_S_H
-#define _SFIO_S_H 1
-
-/*
- * sfio file structure used by sfio and the stdio source compatibility library
- */
-
-#if !defined(_SFHDR_H) && defined(_SFIO_H) && SFIO_VERSION < 20020214L
-#define _data data
-#define _endb endb
-#define _next next
-#endif
-
-struct _sfio_s
-{ unsigned char* _next; /* next position to read/write from */
- unsigned char* _endw; /* end of write buffer */
- unsigned char* _endr; /* end of read buffer */
- unsigned char* _endb; /* end of buffer */
- struct _sfio_s* _push; /* the stream that was pushed on */
- unsigned short _flags; /* type of stream */
- short _file; /* file descriptor */
- unsigned char* _data; /* base of data buffer */
- ssize_t _size; /* buffer size */
- ssize_t _val; /* values or string lengths */
-#ifdef _SFIO_PRIVATE
- _SFIO_PRIVATE
-#endif
-};
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/sfio_t.h b/usr/src/lib/libast/sparcv9/include/ast/sfio_t.h
deleted file mode 100644
index 4240316aef..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/sfio_t.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _SFIO_T_H
-#define _SFIO_T_H 1
-
-/* This header file is for library writers who need to know certain
-** internal info concerning the full Sfio_t structure. Including this
-** file means that you agree to track closely with sfio development
-** in case its internal architecture is changed.
-**
-** Written by Kiem-Phong Vo
-*/
-
-/* the parts of Sfio_t private to sfio functions */
-#define _SFIO_PRIVATE \
- Sfoff_t extent; /* current file size */ \
- Sfoff_t here; /* current physical location */ \
- unsigned char getr; /* the last sfgetr separator */ \
- unsigned char tiny[1];/* for unbuffered read stream */ \
- unsigned short bits; /* private flags */ \
- unsigned int mode; /* current io mode */ \
- struct _sfdisc_s* disc; /* discipline */ \
- struct _sfpool_s* pool; /* the pool containing this */ \
- struct _sfrsrv_s* rsrv; /* reserved buffer */ \
- struct _sfproc_s* proc; /* coprocess id, etc. */ \
- Void_t* mutex; /* mutex for thread-safety */ \
- Void_t* stdio; /* stdio FILE if any */ \
- Sfoff_t lpos; /* last seek position */ \
- size_t iosz; /* preferred size for I/O */ \
- size_t blksz; /* preferred block size */ \
- Void_t* fill[1];/* modest expansion */
-
-#include "sfio.h"
-
-/* mode bit to indicate that the structure hasn't been initialized */
-#define SF_INIT 0000004
-#define SF_DCDOWN 00010000
-
-/* short-hand for common stream types */
-#define SF_RDWR (SF_READ|SF_WRITE)
-#define SF_RDSTR (SF_READ|SF_STRING)
-#define SF_WRSTR (SF_WRITE|SF_STRING)
-#define SF_RDWRSTR (SF_RDWR|SF_STRING)
-
-/* for static initialization of an Sfio_t structure */
-#define SFNEW(data,size,file,type,disc,mutex) \
- { (unsigned char*)(data), /* next */ \
- (unsigned char*)(data), /* endw */ \
- (unsigned char*)(data), /* endr */ \
- (unsigned char*)(data), /* endb */ \
- (Sfio_t*)0, /* push */ \
- (unsigned short)((type)&SF_FLAGS), /* flags */ \
- (short)(file), /* file */ \
- (unsigned char*)(data), /* data */ \
- (ssize_t)(size), /* size */ \
- (ssize_t)(-1), /* val */ \
- (Sfoff_t)0, /* extent */ \
- (Sfoff_t)0, /* here */ \
- 0, /* getr */ \
- {0}, /* tiny */ \
- 0, /* bits */ \
- (unsigned int)(((type)&(SF_RDWR))|SF_INIT), /* mode */ \
- (struct _sfdisc_s*)(disc), /* disc */ \
- (struct _sfpool_s*)0, /* pool */ \
- (struct _sfrsrv_s*)0, /* rsrv */ \
- (struct _sfproc_s*)0, /* proc */ \
- (mutex), /* mutex */ \
- (Void_t*)0, /* stdio */ \
- (Sfoff_t)0, /* lpos */ \
- (size_t)0 /* iosz */ \
- }
-
-/* function to clear an Sfio_t structure */
-#define SFCLEAR(f,mtx) \
- ( (f)->next = (unsigned char*)0, /* next */ \
- (f)->endw = (unsigned char*)0, /* endw */ \
- (f)->endr = (unsigned char*)0, /* endr */ \
- (f)->endb = (unsigned char*)0, /* endb */ \
- (f)->push = (Sfio_t*)0, /* push */ \
- (f)->flags = (unsigned short)0, /* flags */ \
- (f)->file = -1, /* file */ \
- (f)->data = (unsigned char*)0, /* data */ \
- (f)->size = (ssize_t)(-1), /* size */ \
- (f)->val = (ssize_t)(-1), /* val */ \
- (f)->extent = (Sfoff_t)(-1), /* extent */ \
- (f)->here = (Sfoff_t)0, /* here */ \
- (f)->getr = 0, /* getr */ \
- (f)->tiny[0] = 0, /* tiny */ \
- (f)->bits = 0, /* bits */ \
- (f)->mode = 0, /* mode */ \
- (f)->disc = (struct _sfdisc_s*)0, /* disc */ \
- (f)->pool = (struct _sfpool_s*)0, /* pool */ \
- (f)->rsrv = (struct _sfrsrv_s*)0, /* rsrv */ \
- (f)->proc = (struct _sfproc_s*)0, /* proc */ \
- (f)->mutex = (mtx), /* mutex */ \
- (f)->stdio = (Void_t*)0, /* stdio */ \
- (f)->lpos = (Sfoff_t)0, /* lpos */ \
- (f)->iosz = (size_t)0 /* iosz */ \
- )
-
-/* expose next stream inside discipline function; state saved in int f */
-#define SFDCNEXT(sp,f) (((f)=(sp)->bits&SF_DCDOWN),(sp)->bits|=SF_DCDOWN)
-
-/* restore SFDCNEXT() state from int f */
-#define SFDCPREV(sp,f) ((f)?(0):((sp)->bits&=~SF_DCDOWN))
-
-#endif /* _SFIO_T_H */
diff --git a/usr/src/lib/libast/sparcv9/include/ast/shcmd.h b/usr/src/lib/libast/sparcv9/include/ast/shcmd.h
deleted file mode 100644
index 2b7a3ce486..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/shcmd.h
+++ /dev/null
@@ -1,104 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * ksh builtin command api
- */
-
-#ifndef _SHCMD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SHCMD_H 1
-
-#ifndef SH_VERSION
-# define Shell_t void
-#endif
-#ifndef NV_DEFAULT
-# define Namval_t void
-#endif
-#ifndef ERROR_NOTIFY
-# define ERROR_NOTIFY 1
-#endif
-
-typedef int (*Shbltin_f) __PROTO__((int, char**, __V_*));
-
-#undef Shbltin_t
-typedef struct Shbltin_s
-{
- Shell_t *shp;
- __V_ *ptr;
- int version;
- int (*shrun) __PROTO__((int, char**));
- int (*shtrap) __PROTO__((const char*, int));
- void (*shexit) __PROTO__((int));
- Namval_t *(*shbltin) __PROTO__((const char*, Shbltin_f, __V_*));
- unsigned char notify;
- unsigned char sigset;
- unsigned char nosfio;
- Namval_t *bnode;
- Namval_t *vnode;
- char *data;
- int flags;
- char *(*shgetenv) __PROTO__((const char*));
- char *(*shsetenv) __PROTO__((const char*));
- int invariant;
-} Shbltin_t;
-
-#if defined(SH_VERSION) || defined(_SH_PRIVATE)
-# undef Shell_t
-# undef Namval_t
-#else
-# define sh_context(c) ((Shbltin_t*)(c))
-# define sh_run(c, ac, av) ((c)?(*sh_context(c)->shrun)(ac,av):-1)
-# define sh_system(c,str) ((c)?(*sh_context(c)->shtrap)(str,0):system(str))
-# define sh_exit(c,n) ((c)?(*sh_context(c)->shexit)(n):exit(n))
-# define sh_checksig(c) ((c) && sh_context(c)->sigset)
-# if defined(SFIO_VERSION) || defined(_AST_H)
-# define LIB_INIT(c)
-# else
-# define LIB_INIT(c) ((c) && (sh_context(c)->nosfio = 1))
-# endif
-# ifndef _CMD_H
-# define cmdinit(ac,av,c,cat,flg) do { if((ac)<=0) return(0); \
- (sh_context(c)->notify = ((flg)&ERROR_NOTIFY)?1:0);} while(0)
-# endif
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int astintercept __PROTO__((Shbltin_t*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/sig.h b/usr/src/lib/libast/sparcv9/include/ast/sig.h
deleted file mode 100644
index b30258a436..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/sig.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
-#ifndef _def_sig_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_sig_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define sig_info _sig_info_
-
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide kill killpg
-#else
-#define kill ______kill
-#define killpg ______killpg
-#endif
-#include <signal.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide kill killpg
-#else
-#undef kill
-#undef killpg
-#endif
-#ifndef sigmask
-#define sigmask(s) (1<<((s)-1))
-#endif
-typedef void (*Sig_handler_t) __PROTO__((int));
-
-
-#define Handler_t Sig_handler_t
-
-#define SIG_REG_PENDING (-1)
-#define SIG_REG_POP 0
-#define SIG_REG_EXEC 00001
-#define SIG_REG_PROC 00002
-#define SIG_REG_TERM 00004
-#define SIG_REG_ALL 00777
-#define SIG_REG_SET 01000
-
-typedef struct
-{
- char** name;
- char** text;
- int sigmax;
-} Sig_info_t;
-
-extern __MANGLE__ int kill __PROTO__((pid_t, int));
-extern __MANGLE__ int killpg __PROTO__((pid_t, int));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sig_info_t sig_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _lib_sigflag && _npt_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-extern __MANGLE__ int sigcritical __PROTO__((int));
-extern __MANGLE__ int sigunblock __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/stack.h b/usr/src/lib/libast/sparcv9/include/ast/stack.h
deleted file mode 100644
index 8a7f954797..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/stack.h
+++ /dev/null
@@ -1,94 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * homogenous stack routine definitions
- */
-
-#ifndef _STACK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STACK_H
-
-typedef struct stacktable* STACK; /* stack pointer */
-typedef struct stackposition STACKPOS; /* stack position */
-
-struct stackblock /* stack block cell */
-{
- __V_** stack; /* actual stack */
- struct stackblock* prev; /* previous block in list */
- struct stackblock* next; /* next block in list */
-};
-
-struct stackposition /* stack position */
-{
- struct stackblock* block; /* current block pointer */
- int index; /* index within current block */
-};
-
-struct stacktable /* stack information */
-{
- struct stackblock* blocks; /* stack table blocks */
- __V_* error; /* error return value */
- int size; /* size of each block */
- STACKPOS position; /* current stack position */
-};
-
-/*
- * map old names to new
- */
-
-#define mkstack stackalloc
-#define rmstack stackfree
-#define clrstack stackclear
-#define getstack stackget
-#define pushstack stackpush
-#define popstack stackpop
-#define posstack stacktell
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ STACK stackalloc __PROTO__((int, __V_*));
-extern __MANGLE__ void stackfree __PROTO__((STACK));
-extern __MANGLE__ void stackclear __PROTO__((STACK));
-extern __MANGLE__ __V_* stackget __PROTO__((STACK));
-extern __MANGLE__ int stackpush __PROTO__((STACK, __V_*));
-extern __MANGLE__ int stackpop __PROTO__((STACK));
-extern __MANGLE__ void stacktell __PROTO__((STACK, int, STACKPOS*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/stak.h b/usr/src/lib/libast/sparcv9/include/ast/stak.h
deleted file mode 100644
index 4396bdf02b..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/stak.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * David Korn
- * AT&T Research
- *
- * Interface definitions for a stack-like storage library
- *
- */
-
-#ifndef _STAK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STAK_H
-
-#include <stk.h>
-
-#define Stak_t Sfio_t
-#define staksp stkstd
-#define STAK_SMALL STK_SMALL
-
-#define stakptr(n) stkptr(stkstd,n)
-#define staktell() stktell(stkstd)
-#define stakputc(c) sfputc(stkstd,(c))
-#define stakwrite(b,n) sfwrite(stkstd,(b),(n))
-#define stakputs(s) (sfputr(stkstd,(s),0),--stkstd->_next)
-#define stakseek(n) stkseek(stkstd,n)
-#define stakcreate(n) stkopen(n)
-#define stakinstall(s,f) stkinstall(s,f)
-#define stakdelete(s) stkclose(s)
-#define staklink(s) stklink(s)
-#define stakalloc(n) stkalloc(stkstd,n)
-#define stakcopy(s) stkcopy(stkstd,s)
-#define stakset(c,n) stkset(stkstd,c,n)
-#define stakfreeze(n) stkfreeze(stkstd,n)
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/stdio.h b/usr/src/lib/libast/sparcv9/include/ast/stdio.h
deleted file mode 100644
index 0d9876a250..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/stdio.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_stdio.h>
diff --git a/usr/src/lib/libast/sparcv9/include/ast/stk.h b/usr/src/lib/libast/sparcv9/include/ast/stk.h
deleted file mode 100644
index 7a226b0e98..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/stk.h
+++ /dev/null
@@ -1,92 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * David Korn
- * AT&T Research
- *
- * Interface definitions for a stack-like storage library
- *
- */
-
-#ifndef _STK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _STK_H
-
-#include <sfio.h>
-
-#define _Stk_data _Stak_data
-
-#define stkstd (&_Stk_data)
-
-#define Stk_t Sfio_t
-
-#define STK_SMALL 1 /* small stkopen stack */
-#define STK_NULL 2 /* return NULL on overflow */
-
-#define stkptr(sp,n) ((char*)((sp)->_data)+(n))
-#define stktop(sp) ((char*)(sp)->_next)
-#define stktell(sp) ((sp)->_next-(sp)->_data)
-#define stkseek(sp,n) ((n)==0?(char*)((sp)->_next=(sp)->_data):_stkseek(sp,n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sfio_t _Stk_data;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Stk_t* stkopen __PROTO__((int));
-extern __MANGLE__ Stk_t* stkinstall __PROTO__((Stk_t*, char*(*)(int)));
-extern __MANGLE__ int stkclose __PROTO__((Stk_t*));
-extern __MANGLE__ int stklink __PROTO__((Stk_t*));
-extern __MANGLE__ char* stkalloc __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ char* stkcopy __PROTO__((Stk_t*,const char*));
-extern __MANGLE__ char* stkset __PROTO__((Stk_t*, char*, unsigned));
-extern __MANGLE__ char* _stkseek __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ char* stkfreeze __PROTO__((Stk_t*, unsigned));
-extern __MANGLE__ int stkon __PROTO__((Stk_t*, char *));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/swap.h b/usr/src/lib/libast/sparcv9/include/ast/swap.h
deleted file mode 100644
index d214ece1e6..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/swap.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * integral representation conversion support definitions
- * supports sizeof(integral_type)<=sizeof(intmax_t)
- */
-
-#ifndef _SWAP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SWAP_H
-
-#include <ast_common.h>
-
-#define int_swap _ast_intswap
-
-#define SWAP_MAX 8
-
-#define SWAPOP(n) (((n)&int_swap)^(n))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ __V_* swapmem __PROTO__((int, const __V_*, __V_*, size_t));
-extern __MANGLE__ intmax_t swapget __PROTO__((int, const __V_*, int));
-extern __MANGLE__ __V_* swapput __PROTO__((int, __V_*, int, intmax_t));
-extern __MANGLE__ int swapop __PROTO__((const __V_*, const __V_*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/tar.h b/usr/src/lib/libast/sparcv9/include/ast/tar.h
deleted file mode 100644
index 8e8af49bb2..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/tar.h
+++ /dev/null
@@ -1,127 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Standard Archive Format
- * USTAR - Uniform Standard Tape ARchive
- */
-
-#ifndef _TAR_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TAR_H
-
-#define TBLOCK 512
-#define NAMSIZ 100
-#define PFXSIZ 155
-
-#define TMODLEN 8
-#define TUIDLEN 8
-#define TGIDLEN 8
-#define TSIZLEN 12
-#define TMTMLEN 12
-#define TCKSLEN 8
-
-#define TMAGIC "ustar" /* ustar and a null */
-#define TMAGLEN 6
-#define TVERSION "00" /* 00 and no null */
-#define TVERSLEN 2
-#define TUNMLEN 32
-#define TGNMLEN 32
-#define TDEVLEN 8
-
-/*
- * values used in typeflag field
- */
-
-#define REGTYPE '0' /* regular file */
-#define AREGTYPE 0 /* alternate REGTYPE */
-#define LNKTYPE '1' /* hard link */
-#define SYMTYPE '2' /* soft link */
-#define CHRTYPE '3' /* character special */
-#define BLKTYPE '4' /* block special */
-#define DIRTYPE '5' /* directory */
-#define FIFOTYPE '6' /* FIFO special */
-#define CONTTYPE '7' /* reserved */
-#define SOKTYPE '8' /* socket */
-#define EXTTYPE 'x' /* extended header */
-#define GLBTYPE 'g' /* global extended header */
-#define LLNKTYPE 'K' /* long link path */
-#define LREGTYPE 'L' /* long file path */
-#define VERTYPE 'V' /* version */
-
-/*
- * bits used in mode field
- */
-
-#define TSUID 04000 /* set uid on exec */
-#define TSGID 02000 /* set gid on exec */
-#define TSVTX 01000 /* sticky bit -- reserved */
-
-/*
- * file permissions
- */
-
-#define TUREAD 00400 /* read by owner */
-#define TUWRITE 00200 /* write by owner */
-#define TUEXEC 00100 /* execute by owner */
-#define TGREAD 00040 /* read by group */
-#define TGWRITE 00020 /* execute by group */
-#define TGEXEC 00010 /* write by group */
-#define TOREAD 00004 /* read by other */
-#define TOWRITE 00002 /* write by other */
-#define TOEXEC 00001 /* execute by other */
-
-struct header
-{
- char name[NAMSIZ];
- char mode[TMODLEN];
- char uid[TUIDLEN];
- char gid[TGIDLEN];
- char size[TSIZLEN];
- char mtime[TMTMLEN];
- char chksum[TCKSLEN];
- char typeflag;
- char linkname[NAMSIZ];
- char magic[TMAGLEN];
- char version[TVERSLEN];
- char uname[TUNMLEN];
- char gname[TGNMLEN];
- char devmajor[TDEVLEN];
- char devminor[TDEVLEN];
- char prefix[PFXSIZ];
-};
-
-union hblock
-{
- char dummy[TBLOCK];
- struct header dbuf;
-};
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/times.h b/usr/src/lib/libast/sparcv9/include/ast/times.h
deleted file mode 100644
index 1dbd3ee60a..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/times.h
+++ /dev/null
@@ -1,65 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * -last clock_t,time_t interface definitions plus
- *
- * <ast.h>
- * <time.h>
- * <sys/time.h>
- * <sys/times.h>
- */
-
-#ifndef _TIMES_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TIMES_H
-
-#include <ast.h>
-
-#undef _TIMES_H
-#include <ast_time.h>
-#ifndef _TIMES_H
-#define _TIMES_H
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int touch __PROTO__((const char*, time_t, time_t, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/tm.h b/usr/src/lib/libast/sparcv9/include/ast/tm.h
deleted file mode 100644
index d8eb357c20..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/tm.h
+++ /dev/null
@@ -1,206 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * time conversion support definitions
- */
-
-#ifndef _TM_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TM_H
-
-#define TM_VERSION 20070319L
-
-#include <ast.h>
-#include <times.h>
-
-#undef daylight
-
-#define tmset(z) tminit(z)
-#define tmisleapyear(y) (!((y)%4)&&(((y)%100)||!((((y)<1900)?((y)+1900):(y))%400)))
-
-#define TM_ADJUST (1<<0) /* local doesn't do leap secs */
-#define TM_LEAP (1<<1) /* do leap seconds */
-#define TM_UTC (1<<2) /* universal coordinated ref */
-
-#define TM_PEDANTIC (1<<3) /* pedantic date parse */
-#define TM_DATESTYLE (1<<4) /* date(1) style mmddHHMMccyy */
-#define TM_SUBSECOND (1<<5) /* <something>%S => ...%S.%P */
-
-#define TM_DST (-60) /* default minutes for DST */
-#define TM_LOCALZONE (25 * 60) /* use local time zone offset */
-#define TM_UTCZONE (26 * 60) /* UTC "time zone" */
-#define TM_MAXLEAP 1 /* max leap secs per leap */
-#define TM_WINDOW 69 /* century windowing guard year */
-
-/*
- * these indices must agree with tm_dform[]
- */
-
-#define TM_MONTH_ABBREV 0
-#define TM_MONTH 12
-#define TM_DAY_ABBREV 24
-#define TM_DAY 31
-#define TM_TIME 38
-#define TM_DATE 39
-#define TM_DEFAULT 40
-#define TM_MERIDIAN 41
-
-#define TM_UT 43
-#define TM_DT 47
-#define TM_SUFFIXES 51
-#define TM_PARTS 55
-#define TM_HOURS 62
-#define TM_DAYS 66
-#define TM_LAST 69
-#define TM_THIS 72
-#define TM_NEXT 75
-#define TM_EXACT 78
-#define TM_NOISE 81
-#define TM_ORDINAL 85
-#define TM_DIGITS 95
-#define TM_CTIME 105
-#define TM_DATE_1 106
-#define TM_INTERNATIONAL 107
-#define TM_RECENT 108
-#define TM_DISTANT 109
-#define TM_MERIDIAN_TIME 110
-#define TM_ERA 111
-#define TM_ERA_DATE 112
-#define TM_ERA_TIME 113
-#define TM_ERA_DEFAULT 114
-#define TM_ERA_YEAR 115
-#define TM_ORDINALS 116
-#define TM_FINAL 126
-#define TM_WORK 129
-
-#define TM_NFORM 132
-
-typedef struct /* leap second info */
-{
- time_t time; /* the leap second event */
- int total; /* inclusive total since epoch */
-} Tm_leap_t;
-
-typedef struct /* time zone info */
-{
- char* type; /* type name */
- char* standard; /* standard time name */
- char* daylight; /* daylight or summertime name */
- short west; /* minutes west of GMT */
- short dst; /* add to tz.west for DST */
-} Tm_zone_t;
-
-typedef struct /* tm library readonly data */
-{
- char** format; /* default TM_* format strings */
- unsigned char* lex; /* format lex type classes */
- char* digit; /* output digits */
- short* days; /* days in month i */
- short* sum; /* days in months before i */
- Tm_leap_t* leap; /* leap second table */
- Tm_zone_t* zone; /* alternate timezone table */
-} Tm_data_t;
-
-typedef struct /* tm library global info */
-{
- char* deformat; /* TM_DEFAULT override */
- int flags; /* flags */
- char** format; /* current format strings */
- Tm_zone_t* date; /* timezone from last tmdate() */
- Tm_zone_t* local; /* local timezone */
- Tm_zone_t* zone; /* current timezone */
-} Tm_info_t;
-
-typedef struct Tm_s
-{
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- uint32_t tm_nsec;
- Tm_zone_t* tm_zone;
-} Tm_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Tm_data_t* _tm_datap_;
-extern __MANGLE__ Tm_info_t* _tm_infop_;
-
-#define tm_data (*_tm_datap_)
-#define tm_info (*_tm_infop_)
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ time_t tmdate __PROTO__((const char*, char**, time_t*));
-extern __MANGLE__ int tmequiv __PROTO__((Tm_t*));
-extern __MANGLE__ Tm_t* tmfix __PROTO__((Tm_t*));
-extern __MANGLE__ char* tmfmt __PROTO__((char*, size_t, const char*, time_t*));
-extern __MANGLE__ char* tmform __PROTO__((char*, const char*, time_t*));
-extern __MANGLE__ int tmgoff __PROTO__((const char*, char**, int));
-extern __MANGLE__ void tminit __PROTO__((Tm_zone_t*));
-extern __MANGLE__ time_t tmleap __PROTO__((time_t*));
-extern __MANGLE__ int tmlex __PROTO__((const char*, char**, char**, int, char**, int));
-extern __MANGLE__ char** tmlocale __PROTO__((void));
-extern __MANGLE__ Tm_t* tmmake __PROTO__((time_t*));
-extern __MANGLE__ char* tmpoff __PROTO__((char*, size_t, const char*, int, int));
-extern __MANGLE__ time_t tmscan __PROTO__((const char*, char**, const char*, char**, time_t*, long));
-extern __MANGLE__ int tmsleep __PROTO__((time_t, time_t));
-extern __MANGLE__ time_t tmtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_zone_t* tmtype __PROTO__((const char*, char**));
-extern __MANGLE__ int tmweek __PROTO__((Tm_t*, int, int, int));
-extern __MANGLE__ int tmword __PROTO__((const char*, char**, const char*, char**, int));
-extern __MANGLE__ Tm_zone_t* tmzone __PROTO__((const char*, char**, const char*, int*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/tmx.h b/usr/src/lib/libast/sparcv9/include/ast/tmx.h
deleted file mode 100644
index 755298323e..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/tmx.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
-#ifndef _TMX_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TMX_H 1
-/*
- * AT&T Research
- *
- * high resolution Time_t support
- */
-
-#include <tm.h>
-#include <tv.h>
-
-#define TMX_MAXDATE "2554-07-21+23:34:33.709551614 UTC"
-#define TMX_MAXYEAR 2554
-#define TMX_MAXSEC ((Time_t)18446744073)
-#define TMX_MAXNSEC 709551614
-#define TMX_RESOLUTION 1000000000
-
-typedef uint64_t Time_t;
-typedef uint64_t Tmxsec_t;
-typedef uint32_t Tmxnsec_t;
-
-#define tmxsec(t) ((Tmxsec_t)((t)/1000000000))
-#define tmxnsec(t) ((Tmxnsec_t)((t)%1000000000))
-#define tmxsns(s,n) (((((Time_t)(s))*1000000000))+((Time_t)(n)))
-
-#define TMX_NOTIME ((Time_t)(-1))
-#define TMX_NOW tmxgettime()
-#define TMX_MAXTIME tmxsns(TMX_MAXSEC,TMX_MAXNSEC)
-
-#define tmx2tv(t,v) ((v)->tv_nsec=tmxnsec(t),(v)->tv_sec=tmxsec(t))
-#define tv2tmx(v) tmxsns((v)->tv_sec,(v)->tv_nsec)
-
-#define tmxclock(p) tmxsns(((p)?*(p):time(NiL)),0)
-
-#define tmxgetatime(s) tmxsns((s)->st_atime,ST_ATIME_NSEC_GET(s))
-#define tmxgetctime(s) tmxsns((s)->st_ctime,ST_CTIME_NSEC_GET(s))
-#define tmxgetmtime(s) tmxsns((s)->st_mtime,ST_MTIME_NSEC_GET(s))
-
-#define tmxsetatime(s,t) ((s)->st_atime=tmxsec(t),ST_ATIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Time_t tmxdate __PROTO__((const char*, char**, Time_t));
-extern __MANGLE__ Time_t tmxduration __PROTO__((const char*, char**));
-extern __MANGLE__ char* tmxfmt __PROTO__((char*, size_t, const char*, Time_t));
-extern __MANGLE__ Time_t tmxleap __PROTO__((Time_t));
-extern __MANGLE__ Tm_t* tmxmake __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxscan __PROTO__((const char*, char**, const char*, char**, Time_t, long));
-extern __MANGLE__ int tmxsleep __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_t* tmxtm __PROTO__((Tm_t*, Time_t, Tm_zone_t*));
-
-extern __MANGLE__ Time_t tmxgettime __PROTO__((void));
-extern __MANGLE__ int tmxsettime __PROTO__((Time_t));
-
-extern __MANGLE__ int tmxtouch __PROTO__((const char*, Time_t, Time_t, Time_t, int));
-
-extern __MANGLE__ char* fmttmx __PROTO__((const char*, Time_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/tok.h b/usr/src/lib/libast/sparcv9/include/ast/tok.h
deleted file mode 100644
index 5e07aa302d..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/tok.h
+++ /dev/null
@@ -1,58 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * token stream interface definitions
- */
-
-#ifndef _TOK_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TOK_H
-
-#include <ast.h>
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Sfio_t* tokline __PROTO__((const char*, int, int*));
-extern __MANGLE__ int tokscan __PROTO__((char*, char**, const char*, ...));
-extern __MANGLE__ char* tokopen __PROTO__((char*, int));
-extern __MANGLE__ void tokclose __PROTO__((char*));
-extern __MANGLE__ char* tokread __PROTO__((char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/tv.h b/usr/src/lib/libast/sparcv9/include/ast/tv.h
deleted file mode 100644
index f1b00031c9..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/tv.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
-#ifndef _TV_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TV_H 1
-/*
- * AT&T Research
- *
- * high resolution Tv_t interface definitions
- */
-
-#include <ast.h>
-
-#define TV_NSEC_IGNORE (1000000000L)
-#define TV_TOUCH_RETAIN ((Tv_t*)1)
-
-typedef struct Tv_s
-{
- uint32_t tv_sec;
- uint32_t tv_nsec;
-} Tv_t;
-
-#define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
-#define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
-#define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
-
-#define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
-#define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
-#define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
-
-#define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
-#define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
-#define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
-
-#define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
-#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
-#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int tvgettime __PROTO__((Tv_t*));
-extern __MANGLE__ int tvsettime __PROTO__((const Tv_t*));
-extern __MANGLE__ int tvcmp __PROTO__((const Tv_t*, const Tv_t*));
-extern __MANGLE__ int tvtouch __PROTO__((const char*, const Tv_t*, const Tv_t*, const Tv_t*, int));
-extern __MANGLE__ int tvsleep __PROTO__((const Tv_t*, Tv_t*));
-
-extern __MANGLE__ char* fmttv __PROTO__((const char*, Tv_t*));
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/usage.h b/usr/src/lib/libast/sparcv9/include/ast/usage.h
deleted file mode 100644
index 19d2b0fc14..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/usage.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-/*
- * error catalog and usage defaults
- */
-
-#ifndef _USAGE_H
-#define _USAGE_H
-
-#ifndef ERROR_CATALOG
-#define ERROR_CATALOG 0
-#endif
-
-#ifndef USAGE_LICENSE
-#define USAGE_LICENSE "[-license?THIS IS AN UNLICENSED COPY]"
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/vdb.h b/usr/src/lib/libast/sparcv9/include/ast/vdb.h
deleted file mode 100644
index a44d0c6132..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/vdb.h
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * virtual db file directory entry constants
- */
-
-#ifndef VDB_MAGIC
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-
-#define VDB_MAGIC "vdb"
-
-#define VDB_DIRECTORY "DIRECTORY"
-#define VDB_UNION "UNION"
-#define VDB_DATE "DATE"
-#define VDB_MODE "MODE"
-
-#define VDB_DELIMITER ';'
-#define VDB_IGNORE '_'
-#define VDB_FIXED 10
-#define VDB_LENGTH ((int)sizeof(VDB_DIRECTORY)+2*(VDB_FIXED+1))
-#define VDB_OFFSET ((int)sizeof(VDB_DIRECTORY))
-#define VDB_SIZE (VDB_OFFSET+VDB_FIXED+1)
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/vecargs.h b/usr/src/lib/libast/sparcv9/include/ast/vecargs.h
deleted file mode 100644
index 900e13d8b0..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/vecargs.h
+++ /dev/null
@@ -1,56 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * vector argument interface definitions
- */
-
-#ifndef _VECARGS_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _VECARGS_H
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int vecargs __PROTO__((char**, int*, char***));
-extern __MANGLE__ char** vecfile __PROTO__((const char*));
-extern __MANGLE__ void vecfree __PROTO__((char**, int));
-extern __MANGLE__ char** vecload __PROTO__((char*));
-extern __MANGLE__ char** vecstring __PROTO__((const char*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/vmalloc.h b/usr/src/lib/libast/sparcv9/include/ast/vmalloc.h
deleted file mode 100644
index f13cc58879..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/vmalloc.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#ifndef _VMALLOC_H
-#define _VMALLOC_H 1
-
-/* Public header file for the virtual malloc package.
-**
-** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94.
-*/
-
-#define VMALLOC_VERSION 20100101L
-
-#if _PACKAGE_ast
-#include <ast_std.h>
-#else
-#include <ast_common.h>
-#endif
-
-typedef struct _vmalloc_s Vmalloc_t;
-typedef struct _vmstat_s Vmstat_t;
-typedef struct _vmdisc_s Vmdisc_t;
-typedef struct _vmethod_s Vmethod_t;
-typedef struct _vmdata_s Vmdata_t;
-typedef Void_t* (*Vmemory_f)_ARG_((Vmalloc_t*, Void_t*, size_t, size_t, Vmdisc_t*));
-typedef int (*Vmexcept_f)_ARG_((Vmalloc_t*, int, Void_t*, Vmdisc_t*));
-
-struct _vmstat_s
-{ int n_busy; /* number of busy blocks */
- int n_free; /* number of free blocks */
- size_t s_busy; /* total amount of busy space */
- size_t s_free; /* total amount of free space */
- size_t m_busy; /* largest busy piece */
- size_t m_free; /* largest free piece */
- int n_seg; /* number of segments */
- size_t extent; /* total size of region */
-};
-
-struct _vmdisc_s
-{ Vmemory_f memoryf; /* memory manipulator */
- Vmexcept_f exceptf; /* exception handler */
- size_t round; /* rounding requirement */
-};
-
-struct _vmethod_s
-{ Void_t* (*allocf)_ARG_((Vmalloc_t*,size_t));
- Void_t* (*resizef)_ARG_((Vmalloc_t*,Void_t*,size_t,int));
- int (*freef)_ARG_((Vmalloc_t*,Void_t*));
- long (*addrf)_ARG_((Vmalloc_t*,Void_t*));
- long (*sizef)_ARG_((Vmalloc_t*,Void_t*));
- int (*compactf)_ARG_((Vmalloc_t*));
- Void_t* (*alignf)_ARG_((Vmalloc_t*,size_t,size_t));
- unsigned short meth;
-};
-
-struct _vmalloc_s
-{ Vmethod_t meth; /* method for allocation */
- char* file; /* file name */
- int line; /* line number */
- Void_t* func; /* calling function */
- Vmdisc_t* disc; /* discipline to get space */
- Vmdata_t* data; /* the real region data */
- Vmalloc_t* next; /* linked list of regions */
-#ifdef _VM_PRIVATE_
- _VM_PRIVATE_
-#endif
-};
-
-#undef VM_FLAGS /* solaris sys kernel clash */
-
-#define VM_TRUST 0000001 /* forgo some security checks */
-#define VM_TRACE 0000002 /* generate trace */
-#define VM_DBCHECK 0000004 /* check for boundary overwrite */
-#define VM_DBABORT 0000010 /* abort on any warning */
-#define VM_FLAGS 0000017 /* user-settable flags */
-
-#define VM_MTBEST 0000100 /* Vmbest method */
-#define VM_MTPOOL 0000200 /* Vmpool method */
-#define VM_MTLAST 0000400 /* Vmlast method */
-#define VM_MTDEBUG 0001000 /* Vmdebug method */
-#define VM_MTPROFILE 0002000 /* Vmdebug method */
-#define VM_METHODS 0003700 /* available allocation methods */
-
-#define VM_RSCOPY 0000001 /* copy old contents */
-#define VM_RSMOVE 0000002 /* old contents is moveable */
-#define VM_RSZERO 0000004 /* clear new space */
-
-/* exception types */
-#define VM_OPEN 0 /* region being opened */
-#define VM_CLOSE 1 /* announce being closed */
-#define VM_NOMEM 2 /* can't obtain memory */
-#define VM_BADADDR 3 /* bad addr in vmfree/vmresize */
-#define VM_DISC 4 /* discipline being changed */
-#define VM_ALLOC 5 /* announcement from vmalloc() */
-#define VM_FREE 6 /* announcement from vmfree() */
-#define VM_RESIZE 7 /* announcement from vmresize() */
-
-_BEGIN_EXTERNS_ /* public data */
-#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern extern __EXPORT__
-#endif
-#if !_BLD_vmalloc && defined(__IMPORT__)
-#define extern extern __IMPORT__
-#endif
-
-extern Vmethod_t* Vmbest; /* best allocation */
-extern Vmethod_t* Vmlast; /* last-block allocation */
-extern Vmethod_t* Vmpool; /* pool allocation */
-extern Vmethod_t* Vmdebug; /* allocation with debugging */
-extern Vmethod_t* Vmprofile; /* profiling memory usage */
-
-extern Vmdisc_t* Vmdcheap; /* heap discipline */
-extern Vmdisc_t* Vmdcsbrk; /* sbrk discipline */
-
-extern Vmalloc_t* Vmheap; /* heap region */
-extern Vmalloc_t* Vmregion; /* malloc region */
-
-#undef extern
-_END_EXTERNS_
-
-_BEGIN_EXTERNS_ /* public functions */
-#if _BLD_vmalloc && defined(__EXPORT__)
-#define extern __EXPORT__
-#endif
-
-extern Vmalloc_t* vmopen _ARG_(( Vmdisc_t*, Vmethod_t*, int ));
-extern int vmclose _ARG_(( Vmalloc_t* ));
-extern int vmclear _ARG_(( Vmalloc_t* ));
-extern int vmcompact _ARG_(( Vmalloc_t* ));
-
-extern Vmdisc_t* vmdisc _ARG_(( Vmalloc_t*, Vmdisc_t* ));
-
-extern Vmalloc_t* vmmopen _ARG_(( char*, Void_t*, size_t ));
-extern Void_t* vmmset _ARG_((Vmalloc_t*, int, Void_t*, int));
-
-extern Void_t* vmalloc _ARG_(( Vmalloc_t*, size_t ));
-extern Void_t* vmalign _ARG_(( Vmalloc_t*, size_t, size_t ));
-extern Void_t* vmresize _ARG_(( Vmalloc_t*, Void_t*, size_t, int ));
-extern Void_t* vmgetmem _ARG_(( Vmalloc_t*, Void_t*, size_t ));
-extern int vmfree _ARG_(( Vmalloc_t*, Void_t* ));
-
-extern long vmaddr _ARG_(( Vmalloc_t*, Void_t* ));
-extern long vmsize _ARG_(( Vmalloc_t*, Void_t* ));
-
-extern Vmalloc_t* vmregion _ARG_(( Void_t* ));
-extern Void_t* vmsegment _ARG_(( Vmalloc_t*, Void_t* ));
-extern int vmset _ARG_(( Vmalloc_t*, int, int ));
-
-extern Void_t* vmdbwatch _ARG_(( Void_t* ));
-extern int vmdbcheck _ARG_(( Vmalloc_t* ));
-extern int vmdebug _ARG_(( int ));
-
-extern int vmprofile _ARG_(( Vmalloc_t*, int ));
-
-extern int vmtrace _ARG_(( int ));
-extern int vmtrbusy _ARG_((Vmalloc_t*));
-
-extern int vmstat _ARG_((Vmalloc_t*, Vmstat_t*));
-
-extern int vmwalk _ARG_((Vmalloc_t*,
- int(*)(Vmalloc_t*,Void_t*,size_t,Vmdisc_t*,Void_t*),
- Void_t*));
-extern char* vmstrdup _ARG_((Vmalloc_t*, const char*));
-
-#if !defined(_BLD_vmalloc) && !defined(_AST_STD_H) && \
- !defined(__stdlib_h) && !defined(__STDLIB_H) && \
- !defined(_STDLIB_INCLUDED) && !defined(_INC_STDLIB)
-extern Void_t* malloc _ARG_(( size_t ));
-extern Void_t* realloc _ARG_(( Void_t*, size_t ));
-extern void free _ARG_(( Void_t* ));
-extern void cfree _ARG_(( Void_t* ));
-extern Void_t* calloc _ARG_(( size_t, size_t ));
-extern Void_t* memalign _ARG_(( size_t, size_t ));
-extern Void_t* valloc _ARG_(( size_t ));
-#endif
-
-#undef extern
-_END_EXTERNS_
-
-/* to coerce any value to a Vmalloc_t*, make ANSI happy */
-#define _VM_(vm) ((Vmalloc_t*)(vm))
-
-/* enable recording of where a call originates from */
-#ifdef VMFL
-
-#if defined(__FILE__)
-#define _VMFILE_(vm) (_VM_(vm)->file = (char*)__FILE__)
-#else
-#define _VMFILE_(vm) (_VM_(vm)->file = 0)
-#endif
-
-#if defined(__LINE__)
-#define _VMLINE_(vm) (_VM_(vm)->line = __LINE__)
-#else
-#define _VMLINE_(vm) (_VM_(vm)->line = 0)
-#endif
-
-#if defined(__FUNCTION__)
-#define _VMFUNC_(vm) (_VM_(vm)->func = (Void_t*)__FUNCTION__)
-#else
-#define _VMFUNC_(vm) (_VM_(vm)->func = 0)
-#endif
-
-#define _VMFL_(vm) (_VMFILE_(vm), _VMLINE_(vm), _VMFUNC_(vm))
-
-#define vmalloc(vm,sz) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.allocf))((vm),(sz)) )
-#define vmresize(vm,d,sz,type) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type)) )
-#define vmfree(vm,d) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d)) )
-#define vmalign(vm,sz,align) (_VMFL_(vm), \
- (*(_VM_(vm)->meth.alignf))((vm),(sz),(align)) )
-
-#undef malloc
-#undef realloc
-#undef calloc
-#undef free
-#undef memalign
-#undef valloc
-
-#if _map_malloc
-
-#define malloc(s) (_VMFL_(Vmregion), _ast_malloc((size_t)(s)) )
-#define realloc(d,s) (_VMFL_(Vmregion), _ast_realloc((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) (_VMFL_(Vmregion), _ast_calloc((size_t)n, (size_t)(s)) )
-#define free(d) (_VMFL_(Vmregion), _ast_free((Void_t*)(d)) )
-#define memalign(a,s) (_VMFL_(Vmregion), _ast_memalign((size_t)(a),(size_t)(s)) )
-#define valloc(s) (_VMFL_(Vmregion), _ast_valloc((size_t)(s) )
-
-#else
-
-#if !_std_malloc
-
-#if __STD_C || defined(__STDPP__) || defined(__GNUC__)
-#define malloc(s) ( _VMFL_(Vmregion), (malloc)((size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), (realloc)((Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), (calloc)((size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), (free)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), (memalign)((size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), (valloc)((size_t)(s)) )
-#ifndef strdup
-#define strdup(s) ( _VMFL_(Vmregion), (strdup)((char*)(s)) )
-#endif
-
-#else
-
-#define _VMNM_(a,b,c,d,e,f) a/**/b/**/c/**/d/**/e/**/f
-#define malloc(s) ( _VMFL_(Vmregion), _VMNM_(mallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#define realloc(d,s) ( _VMFL_(Vmregion), _VMNM_(reallo,/,*,*,/,c)\
- ( (Void_t*)(d),(size_t)(s)) )
-#define calloc(n,s) ( _VMFL_(Vmregion), _VMNM_(callo,/,*,*,/,c)\
- ( (size_t)n, (size_t)(s)) )
-#define free(d) ( _VMFL_(Vmregion), _VMNM_(fre,/,*,*,/,e)((Void_t*)(d)) )
-#define memalign(a,s) ( _VMFL_(Vmregion), _VMNM_(memalig,/,*,*,/,n)\
- ( (size_t)(a),(size_t)(s)) )
-#define valloc(s) ( _VMFL_(Vmregion), _VMNM_(vallo,/,*,*,/,c)\
- ( (size_t)(s)) )
-#ifndef strdup
-#define strdup(s) ( _VMFL_(Vmregion), _VMNM_(strdu,/,*,*,/,p)\
- ((char*)(s)) )
-#endif
-
-#endif /*__STD_C || defined(__STDPP__) || defined(__GNUC__)*/
-
-#define cfree(d) free(d)
-
-#endif /* !_std_malloc */
-
-#endif /* _map_malloc */
-
-#endif /*VMFL*/
-
-/* non-debugging/profiling allocation calls */
-#ifndef vmalloc
-#define vmalloc(vm,sz) (*(_VM_(vm)->meth.allocf))((vm),(sz))
-#endif
-
-#ifndef vmresize
-#define vmresize(vm,d,sz,type) (*(_VM_(vm)->meth.resizef))\
- ((vm),(Void_t*)(d),(sz),(type))
-#endif
-
-#ifndef vmfree
-#define vmfree(vm,d) (*(_VM_(vm)->meth.freef))((vm),(Void_t*)(d))
-#endif
-
-#ifndef vmalign
-#define vmalign(vm,sz,align) (*(_VM_(vm)->meth.alignf))((vm),(sz),(align))
-#endif
-
-#define vmaddr(vm,addr) (*(_VM_(vm)->meth.addrf))((vm),(Void_t*)(addr))
-#define vmsize(vm,addr) (*(_VM_(vm)->meth.sizef))((vm),(Void_t*)(addr))
-#define vmcompact(vm) (*(_VM_(vm)->meth.compactf))((vm))
-#define vmoldof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
- (VM_RSMOVE) )
-#define vmnewof(v,p,t,n,x) (t*)vmresize((v), (p), sizeof(t)*(n)+(x), \
- (VM_RSMOVE|VM_RSCOPY|VM_RSZERO) )
-#define vmdata(vm) ((Void_t*)(_VM_(vm)->data))
-
-#endif /* _VMALLOC_H */
diff --git a/usr/src/lib/libast/sparcv9/include/ast/wait.h b/usr/src/lib/libast/sparcv9/include/ast/wait.h
deleted file mode 100644
index c4e3b8f2a0..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/wait.h
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * ast POSIX wait/exit support
- */
-
-#ifndef _WAIT_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _WAIT_H
-
-#include <ast.h>
-#include <ast_wait.h>
-
-#if _sys_wait
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide wait waitpid
-#else
-#define wait ______wait
-#define waitpid ______waitpid
-#endif
-#include <sys/wait.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide wait waitpid
-#else
-#undef wait
-#undef waitpid
-#endif
-#endif
-
-#ifndef WNOHANG
-#define WNOHANG 1
-#endif
-
-#ifndef WUNTRACED
-#define WUNTRACED 2
-#endif
-
-#if !_ok_wif
-#undef WIFEXITED
-#undef WEXITSTATUS
-#undef WIFSIGNALED
-#undef WTERMSIG
-#undef WIFSTOPPED
-#undef WSTOPSIG
-#undef WTERMCORE
-#endif
-
-#ifndef WIFEXITED
-#define WIFEXITED(x) (!((x)&((1<<(EXIT_BITS-1))-1)))
-#endif
-
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(x) (((x)>>EXIT_BITS)&((1<<EXIT_BITS)-1))
-#endif
-
-#ifndef WIFSIGNALED
-#define WIFSIGNALED(x) (((x)&((1<<(EXIT_BITS-1))-1))!=0)
-#endif
-
-#ifndef WTERMSIG
-#define WTERMSIG(x) ((x)&((1<<(EXIT_BITS-1))-1))
-#endif
-
-#ifndef WIFSTOPPED
-#define WIFSTOPPED(x) (((x)&((1<<EXIT_BITS)-1))==((1<<(EXIT_BITS-1))-1))
-#endif
-
-#ifndef WSTOPSIG
-#define WSTOPSIG(x) WEXITSTATUS(x)
-#endif
-
-#ifndef WTERMCORE
-#define WTERMCORE(x) ((x)&(1<<(EXIT_BITS-1)))
-#endif
-
-extern __MANGLE__ pid_t wait __PROTO__((int*));
-extern __MANGLE__ pid_t waitpid __PROTO__((pid_t, int*, int));
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/include/ast/wchar.h b/usr/src/lib/libast/sparcv9/include/ast/wchar.h
deleted file mode 100644
index 43c5ef1e98..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/wchar.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#include <ast_wchar.h>
diff --git a/usr/src/lib/libast/sparcv9/include/ast/wordexp.h b/usr/src/lib/libast/sparcv9/include/ast/wordexp.h
deleted file mode 100644
index af3169962b..0000000000
--- a/usr/src/lib/libast/sparcv9/include/ast/wordexp.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * posix wordexp interface definitions
- */
-
-#ifndef _WORDEXP_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _WORDEXP_H
-
-#include <ast_common.h>
-
-#define WRDE_APPEND 01
-#define WRDE_DOOFFS 02
-#define WRDE_NOCMD 04
-#define WRDE_NOSYS 0100
-#define WRDE_REUSE 010
-#define WRDE_SHOWERR 020
-#define WRDE_UNDEF 040
-
-#define WRDE_BADCHAR 1
-#define WRDE_BADVAL 2
-#define WRDE_CMDSUB 3
-#define WRDE_NOSPACE 4
-#define WRDE_SYNTAX 5
-#define WRDE_NOSHELL 6
-
-typedef struct _wdarg
-{
- size_t we_wordc;
- char **we_wordv;
- size_t we_offs;
-} wordexp_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int wordexp __PROTO__((const char*, wordexp_t*, int));
-extern __MANGLE__ int wordfree __PROTO__((wordexp_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif /* _WORDEXP_H */
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/align b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/align
deleted file mode 100644
index 022d7943cb..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/align
+++ /dev/null
@@ -1,33 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
-#ifndef _def_align_ast
-#define _def_align_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
-
-#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
-#define ALIGN_POINTER(x) ((char*)(x))
-#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
-
-#define ALIGN_BOUND ALIGN_BOUND2
-#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
-
-#define ALIGN_BIT1 0x1
-#define ALIGN_BOUND1 ALIGN_BOUND2
-#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
-#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffe)
-#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
-#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
-
-#define ALIGN_BIT2 0x2
-#define ALIGN_BOUND2 16
-#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+15)
-#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffff0)
-#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffd)
-#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
-#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/botch b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/botch
deleted file mode 100644
index c6c447fb42..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/botch
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ccode b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ccode
deleted file mode 100644
index 4c543d740c..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ccode
+++ /dev/null
@@ -1,29 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
-#ifndef _def_ccode_ast
-#define _def_ccode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define CC_ASCII 1 /* ISO-8859-1 */
-#define CC_EBCDIC_E 2 /* Xopen dd(1) EBCDIC */
-#define CC_EBCDIC_I 3 /* Xopen dd(1) IBM */
-#define CC_EBCDIC_O 4 /* IBM-1047 mvs OpenEdition */
-#define CC_EBCDIC_S 5 /* Siemens posix-bc */
-#define CC_EBCDIC_H 6 /* IBM-37 AS/400 */
-#define CC_EBCDIC_M 7 /* IBM mvs cobol */
-#define CC_EBCDIC_U 8 /* microfocus cobol */
-
-#define CC_MAPS 8 /* number of code maps */
-
-#define CC_EBCDIC CC_EBCDIC_E
-#define CC_EBCDIC1 CC_EBCDIC_E
-#define CC_EBCDIC2 CC_EBCDIC_I
-#define CC_EBCDIC3 CC_EBCDIC_O
-
-#define CC_NATIVE CC_ASCII /* native character code */
-#define CC_ALIEN CC_EBCDIC /* alien character code */
-
-#define CC_bel 0007 /* bel character */
-#define CC_esc 0033 /* esc character */
-#define CC_sub 0032 /* sub character */
-#define CC_vt 0013 /* vt character */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/dirent b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/dirent
deleted file mode 100644
index baeb288ede..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/dirent
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
-#ifndef _def_dirent_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dirent_ast 1
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _nxt_dirent <../include/dirent.h> /* include path for the native <dirent.h> */
-#define _nxt_dirent_str "../include/dirent.h" /* include string for the native <dirent.h> */
-/*
- * <dirent.h> for systems with ok <dirent.h>
- */
-
-#ifndef _DIRENT_H
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#ifndef _DIRENT_H
-#define _DIRENT_H
-#endif
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/eaccess b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/eaccess
deleted file mode 100644
index 1b790fec3b..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/eaccess
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/eaccess by iffe version 2009-12-04 : : */
-#ifndef _def_eaccess_ast
-#define _def_eaccess_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fs b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fs
deleted file mode 100644
index f542635fd0..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/fs
+++ /dev/null
@@ -1,142 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
-#ifndef _def_fs_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fs_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _lib_lstat 1 /* lstat() in default lib(s) */
-#define _lib_mknod 1 /* mknod() in default lib(s) */
-#define _lib_sync 1 /* sync() in default lib(s) */
-#include <sys/stat.h>
-#include <sys/mkdev.h>
-#define FS_default "ufs"
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
-#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
-#define _sys_mount 1 /* #include <sys/mount.h> ok */
-#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
-#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
-#define _sys_vfs 1 /* #include <sys/vfs.h> ok */
-#define _mem_st_blocks_stat 1 /* st_blocks is a member of struct stat */
-#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
-#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
-#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
-#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
-#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
-#define _lib_getmntent 1 /* getmntent() in default lib(s) */
-#define _lib_statfs 1 /* statfs() in default lib(s) */
-#define _lib_statvfs 1 /* statvfs() in default lib(s) */
-#define _lib_statfs4 1 /* compile{\ passed */
-#if _sys_statvfs
-#include <sys/statvfs.h>
-#if !_mem_statvfs_f_basetype
-#if _ary_f_reserved7
-#define f_basetype f_reserved7
-#endif
-#endif
-#else
-#define _mem_f_basetype_statvfs 1
-#define _mem_f_frsize_statvfs 1
-struct statvfs
-{
-unsigned long f_bsize; /* fundamental file system block size */
-unsigned long f_frsize; /* fragment size */
-unsigned long f_blocks; /* total # of blocks of f_frsize on fs */
-unsigned long f_bfree; /* total # of free blocks of f_frsize */
-unsigned long f_bavail; /* # of free blocks avail to non-superuser */
-unsigned long f_files; /* total # of file nodes (inodes) */
-unsigned long f_ffree; /* total # of free file nodes */
-unsigned long f_favail; /* # of free nodes avail to non-superuser */
-unsigned long f_fsid; /* file system id (dev for now) */
-char f_basetype[16]; /* target fs type name, null-terminated */
-unsigned long f_flag; /* bit-mask of flags */
-unsigned long f_namemax; /* maximum file name length */
-char f_fstr[32]; /* filesystem-specific string */
-unsigned long f_filler[16]; /* reserved for future expansion */
-};
-extern __MANGLE__ int fstatvfs __PROTO__((int, struct statvfs*));
-extern __MANGLE__ int statvfs __PROTO__((const char*, struct statvfs*));
-#endif
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_statvfs64 && !defined(statvfs)
-#define statvfs statvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int statvfs64 __PROTO__((const char*, struct statvfs64*));
-#endif
-#endif
-#if _lib_fstatvfs64 && !defined(fstatvfs)
-#define fstatvfs fstatvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int fstatvfs64 __PROTO__((int, struct statvfs64*));
-#endif
-#endif
-
-#define _str_st_fstype 1 /* stat.st_fstype is a string */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/hack b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/hack
deleted file mode 100644
index 2a991f88c9..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/hack
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/hack by iffe version 2009-12-04 : : */
-#ifndef _def_hack_ast
-#define _def_hack_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/isoc99 b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/isoc99
deleted file mode 100644
index 7cef3af637..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/isoc99
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/isoc99 by iffe version 2009-12-04 : : */
-#ifndef _def_isoc99_ast
-#define _def_isoc99_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-/* _ISOC99_SOURCE plays nice */
-#ifndef _ISOC99_SOURCE
-#define _ISOC99_SOURCE 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/limits b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/limits
deleted file mode 100644
index 019d408faf..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/limits
+++ /dev/null
@@ -1,107 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
-#ifndef _def_limits_ast
-#define _def_limits_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#ifndef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-#ifndef CHAR_MIN
-#define CHAR_MIN -128
-#endif
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1000000
-#endif
-#ifndef INT_MIN
-#define INT_MIN -2147483648
-#endif
-#ifndef LLONG_MAX
-#define LLONG_MAX 9223372036854775807
-#endif
-#ifndef LLONG_MIN
-#define LLONG_MIN -9223372036854775808
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN -2147483648
-#endif
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 5
-#endif
-#ifndef OPEN_MAX_CEIL
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-#define OPEN_MAX_CEIL OPEN_MAX
-#endif
-#ifndef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 4096
-#endif
-#ifndef PTRDIFF_MAX
-#define PTRDIFF_MAX 9223372036854775807
-#endif
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN -9223372036854775808
-#endif
-#ifndef SCHAR_MAX
-#define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-#define SCHAR_MIN -128
-#endif
-#ifndef SHRT_MIN
-#define SHRT_MIN -32768
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX 2147483647
-#endif
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN -2147483648
-#endif
-#ifndef SIZE_MAX
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295
-#endif
-#define SIZE_MAX UINT_MAX
-#endif
-#ifndef SSIZE_MAX
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-#define SSIZE_MAX INT_MAX
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#ifndef ULLONG_MAX
-#define ULLONG_MAX 18446744073709551615
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX 4294967295
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX 65535
-#endif
-#ifndef WCHAR_MAX
-#define WCHAR_MAX 2147483647
-#endif
-#ifndef WCHAR_MIN
-#define WCHAR_MIN -2147483648
-#endif
-#ifndef WINT_MAX
-#define WINT_MAX 2147483647
-#endif
-#ifndef WINT_MIN
-#define WINT_MIN -2147483648
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mmap b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mmap
deleted file mode 100644
index ce7159ef18..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mmap
+++ /dev/null
@@ -1,27 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
-#ifndef _def_mmap_ast
-#define _def_mmap_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_mmap 1 /* standard mmap interface that works */
-#define _lib_mmap64 1 /* mmap64 interface and implementation work */
-#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
-#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
-
-/* some systems get it wrong but escape concise detection */
-#ifndef _NO_MMAP
-#if __CYGWIN__
-#define _NO_MMAP 1
-#endif
-#endif
-
-#if _NO_MMAP
-#undef _lib_mmap
-#undef _lib_mmap64
-#undef _mmap_anon
-#undef _mmap_devzero
-#undef _mmap_worthy
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mode b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mode
deleted file mode 100644
index a346a1a7f1..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mode
+++ /dev/null
@@ -1,14 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
-#ifndef _def_mode_ast
-#define _def_mode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define S_ITYPE(m) ((m)&S_IFMT)
-
-#define S_IPERM (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-
-#define _S_IDPERM 1
-#define _S_IDTYPE 1
-
-#define BUFFERSIZE 8192
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ndbm b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ndbm
deleted file mode 100644
index 3ede439064..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/ndbm
+++ /dev/null
@@ -1,9 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
-#ifndef _def_ndbm_ast
-#define _def_ndbm_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_ndbm 1 /* #include <ndbm.h> ok */
-#include <ndbm.h>
-#define _use_ndbm 1
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/nl_types b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/nl_types
deleted file mode 100644
index dc0d5feffe..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/nl_types
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
-#ifndef _def_nl_types_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_nl_types_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_nl_langinfo 1 /* nl_langinfo() in default lib(s) */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_langinfo 1 /* #include <langinfo.h> ok */
-#define _nxt_nl_types <../include/nl_types.h> /* include path for the native <nl_types.h> */
-#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native <nl_types.h> */
-#include <limits.h>
-#include <../include/nl_types.h> /* the native nl_types.h */
-
-#undef NL_SETMAX
-#define NL_SETMAX 1023
-#undef NL_MSGMAX
-#define NL_MSGMAX 32767
-#undef nl_catd
-#define nl_catd _ast_nl_catd
-#undef catopen
-#define catopen _ast_catopen
-#undef catgets
-#define catgets _ast_catgets
-#undef catclose
-#define catclose _ast_catclose
-
-typedef __V_* nl_catd;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ nl_catd catopen __PROTO__((const char*, int));
-extern __MANGLE__ char* catgets __PROTO__((nl_catd, int, int, const char*));
-extern __MANGLE__ int catclose __PROTO__((nl_catd));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/omitted b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/omitted
deleted file mode 100644
index 0b719f8d46..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/omitted
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/omitted by iffe version 2009-12-04 : : */
-#ifndef _def_omitted_ast
-#define _def_omitted_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/options b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/options
deleted file mode 100644
index 952c743b1e..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/options
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/options by iffe version 2009-12-04 : : */
-#ifndef _def_options_ast
-#define _def_options_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/param b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/param
deleted file mode 100644
index 5327a11660..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/param
+++ /dev/null
@@ -1,9 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
-#ifndef _def_param_ast
-#define _def_param_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#include <sys/param.h>
-#ifndef S_IFDIR
-#include <sys/stat.h>
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/preroot b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/preroot
deleted file mode 100644
index 8c75c546dc..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/preroot
+++ /dev/null
@@ -1,6 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sig b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sig
deleted file mode 100644
index a4cb97abc1..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/sig
+++ /dev/null
@@ -1,138 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
-#ifndef _def_sig_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_sig_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define sig_info _sig_info_
-
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide kill killpg
-#else
-#define kill ______kill
-#define killpg ______killpg
-#endif
-#include <signal.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide kill killpg
-#else
-#undef kill
-#undef killpg
-#endif
-#ifndef sigmask
-#define sigmask(s) (1<<((s)-1))
-#endif
-typedef void (*Sig_handler_t) __PROTO__((int));
-
-
-#define Handler_t Sig_handler_t
-
-#define SIG_REG_PENDING (-1)
-#define SIG_REG_POP 0
-#define SIG_REG_EXEC 00001
-#define SIG_REG_PROC 00002
-#define SIG_REG_TERM 00004
-#define SIG_REG_ALL 00777
-#define SIG_REG_SET 01000
-
-typedef struct
-{
- char** name;
- char** text;
- int sigmax;
-} Sig_info_t;
-
-extern __MANGLE__ int kill __PROTO__((pid_t, int));
-extern __MANGLE__ int killpg __PROTO__((pid_t, int));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sig_info_t sig_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _lib_sigflag && _npt_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-extern __MANGLE__ int sigcritical __PROTO__((int));
-extern __MANGLE__ int sigunblock __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/standards b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/standards
deleted file mode 100644
index 7d804a5e06..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/standards
+++ /dev/null
@@ -1,10 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/stdio b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/stdio
deleted file mode 100644
index 1da15a034f..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/stdio
+++ /dev/null
@@ -1,587 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
-#ifndef _SFSTDIO_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFSTDIO_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define __FILE_typedef 1
-#define _FILE_DEFINED 1
-#define _FILE_defined 1
-#define _FILEDEFED 1
-
-#ifndef __FILE_TAG
-#define __FILE_TAG _sfio_s
-#endif
-
-#undef FILE
-#undef _FILE
-#undef fpos_t
-#undef fpos64_t
-
-typedef struct _sfio_s _sfio_FILE;
-
-#define FILE _sfio_FILE
-#define _FILE FILE
-
-#if !defined(__FILE) && !__CYGWIN__
-#undef __FILE
-#define __FILE FILE
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define BUFSIZ SF_BUFSIZE
-
-#else
-
-#ifndef BUFSIZ
-#define BUFSIZ 8192
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#include <ast_std.h>
-
-#include <sfio_s.h>
-
-#if __cplusplus
-#define _sf_(f) (f)
-#else
-#define _sf_(f) ((struct _sfio_s*)(f))
-#endif
-
-#define _SF_EOF 0000200
-#define _SF_ERROR 0000400
-
-#endif
-
-#ifdef _NO_LARGEFILE64_SOURCE
-#undef _LARGEFILE64_SOURCE
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#undef off_t
-#endif
-
-#define fpos_t _ast_fpos_t
-#if _typ_int64_t
-#define fpos64_t _ast_fpos_t
-#endif
-
-typedef struct _ast_fpos_s
-{
- intmax_t _sf_offset;
- unsigned char _sf_state[64 - sizeof(intmax_t)];
-} _ast_fpos_t;
-
-#define _base _data
-#define _ptr _next
-#define _IOFBF 0
-#define _IONBF 1
-#define _IOLBF 2
-
-#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
-
-#undef FILE
-#define FILE FILE
-typedef struct _sfio_s FILE;
-
-#undef strerror
-extern __MANGLE__ char* strerror(int) __THROW;
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-extern __MANGLE__ void flockfile __PROTO__((FILE*));
-extern __MANGLE__ int ftrylockfile __PROTO__((FILE*));
-extern __MANGLE__ void funlockfile __PROTO__((FILE*));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 1024
-#endif
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 20
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-
-#define _doprnt _ast_doprnt
-#define _doscan _ast_doscan
-#define asprintf _ast_asprintf
-#define clearerr _ast_clearerr
-#define fclose _ast_fclose
-#define fdopen _ast_fdopen
-#define fflush _ast_fflush
-#define fgetc _ast_fgetc
-#define fgetpos _ast_fgetpos
-#define fgetpos64 _ast_fgetpos64
-#define fgets _ast_fgets
-#define fopen _ast_fopen
-#define fprintf _ast_fprintf
-#define fpurge _ast_fpurge
-#define fputs _ast_fputs
-#define fread _ast_fread
-#define freopen _ast_freopen
-#define fscanf _ast_fscanf
-#define fseek _ast_fseek
-#define fseek64 _ast_fseek64
-#define fseeko _ast_fseeko
-#define fseeko64 _ast_fseeko64
-#define fsetpos _ast_fsetpos
-#define fsetpos64 _ast_fsetpos64
-#define ftell _ast_ftell
-#define ftell64 _ast_ftell64
-#define ftello _ast_ftello
-#define ftello64 _ast_ftello64
-#define fwrite _ast_fwrite
-#define gets _ast_gets
-#define getw _ast_getw
-#define pclose _ast_pclose
-#define popen _ast_popen
-#define printf _ast_printf
-#define puts _ast_puts
-#define putw _ast_putw
-#define rewind _ast_rewind
-#define scanf _ast_scanf
-#define setbuf _ast_setbuf
-#undef setbuffer
-#define setbuffer _ast_setbuffer
-#define setlinebuf _ast_setlinebuf
-#define setvbuf _ast_setvbuf
-#define snprintf _ast_snprintf
-#define sprintf _ast_sprintf
-#define sscanf _ast_sscanf
-#define tmpfile _ast_tmpfile
-#define ungetc _ast_ungetc
-#define vasprintf _ast_vasprintf
-#define vfprintf _ast_vfprintf
-#define vfscanf _ast_vfscanf
-#define vprintf _ast_vprintf
-#define vscanf _ast_vscanf
-#define vsnprintf _ast_vsnprintf
-#define vsprintf _ast_vsprintf
-#define vsscanf _ast_vsscanf
-#define fcloseall _ast_fcloseall
-#define _filbuf _ast__filbuf
-#define fmemopen _ast_fmemopen
-#define __getdelim _ast___getdelim
-#define getdelim _ast_getdelim
-#define getline _ast_getline
-#define clearerr_unlocked _ast_clearerr_unlocked
-#define feof_unlocked _ast_feof_unlocked
-#define ferror_unlocked _ast_ferror_unlocked
-#define fflush_unlocked _ast_fflush_unlocked
-#define fgetc_unlocked _ast_fgetc_unlocked
-#define fgets_unlocked _ast_fgets_unlocked
-#define fileno_unlocked _ast_fileno_unlocked
-#define fputc_unlocked _ast_fputc_unlocked
-#define fputs_unlocked _ast_fputs_unlocked
-#define fread_unlocked _ast_fread_unlocked
-#define fwrite_unlocked _ast_fwrite_unlocked
-#define getc_unlocked _ast_getc_unlocked
-#define getchar_unlocked _ast_getchar_unlocked
-#define putc_unlocked _ast_putc_unlocked
-#define putchar_unlocked _ast_putchar_unlocked
-#define flockfile _ast_flockfile
-#define ftrylockfile _ast_ftrylockfile
-#define funlockfile _ast_funlockfile
-
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:initial
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
-#endif
-#ifndef L_ctermid
-#define L_ctermid 9
-#endif
-#ifndef L_tmpnam
-#define L_tmpnam 25
-#endif
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#if defined(__cplusplus) && defined(__THROW)
-extern __MANGLE__ char* ctermid(char*) __THROW;
-#else
-extern __MANGLE__ char* ctermid __PROTO__((char*));
-#endif
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-extern __MANGLE__ void perror __PROTO__((const char*));
-#ifndef _AST_STD_H
-#ifndef remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-#ifndef rename
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#ifdef _LARGEFILE64_SOURCE
-
-#undef fpos_t
-#undef off_t
-#undef fgetpos
-#undef fsetpos
-#undef fseek
-#undef fseeko
-#undef ftell
-#undef ftello
-
-#define fpos_t fpos64_t
-#if _typ_off64_t
-#define off_t off64_t
-#else
-#define off_t int64_t
-#endif
-
-#define fgetpos fgetpos64
-#define fsetpos fsetpos64
-#define fseek fseek64
-#define fseeko fseeko64
-#define ftell ftell64
-#define ftello ftello64
-
-#endif
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_DLL && _DLL_INDIRECT_DATA
-
-#define stdin ((FILE*)_ast_dll->_ast_stdin)
-#define stdout ((FILE*)_ast_dll->_ast_stdout)
-#define stderr ((FILE*)_ast_dll->_ast_stderr)
-
-#else
-
-#define stdin (&_Sfstdin)
-#define stdout (&_Sfstdout)
-#define stderr (&_Sfstderr)
-
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define feof(f) sfeof(f)
-#define ferror(f) sferror(f)
-#define fileno(f) sffileno(f)
-#define fputc(c,f) sfputc(f,c)
-#define getc(f) sfgetc(f)
-#define getchar() sfgetc(sfstdin)
-#define putc(c,f) sfputc(f,c)
-#define putchar(c) sfputc(sfstdout,c)
-
-#else
-
-#if !_UWIN
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-#endif
-
-extern __MANGLE__ FILE _Sfstdin;
-extern __MANGLE__ FILE _Sfstdout;
-extern __MANGLE__ FILE _Sfstderr;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define feof(f) (_sf_(f)->_flags&_SF_EOF)
-#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
-#define fileno(f) (_sf_(f)->_file)
-#define fputc(c,f) (_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
-#define getc(f) (_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
-#define getchar() getc(stdin)
-#define putc(c,f) fputc(c,f)
-#define putchar(c) fputc(c,stdout)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _sffilbuf __PROTO__((FILE*, int));
-extern __MANGLE__ int _sfflsbuf __PROTO__((FILE*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/time b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/time
deleted file mode 100644
index 30bbbdca34..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/time
+++ /dev/null
@@ -1,83 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
-#ifndef _def_time_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_time_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */
-#define _lib_usleep 1 /* usleep() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#include <sys/time.h>
-
-#include <sys/times.h>
-
-#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
-#define CLOCKS_PER_SEC CLK_TCK
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmx b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmx
deleted file mode 100644
index c650c4af02..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tmx
+++ /dev/null
@@ -1,130 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
-#ifndef _TMX_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TMX_H 1
-/*
- * AT&T Research
- *
- * high resolution Time_t support
- */
-
-#include <tm.h>
-#include <tv.h>
-
-#define TMX_MAXDATE "2554-07-21+23:34:33.709551614 UTC"
-#define TMX_MAXYEAR 2554
-#define TMX_MAXSEC ((Time_t)18446744073)
-#define TMX_MAXNSEC 709551614
-#define TMX_RESOLUTION 1000000000
-
-typedef uint64_t Time_t;
-typedef uint64_t Tmxsec_t;
-typedef uint32_t Tmxnsec_t;
-
-#define tmxsec(t) ((Tmxsec_t)((t)/1000000000))
-#define tmxnsec(t) ((Tmxnsec_t)((t)%1000000000))
-#define tmxsns(s,n) (((((Time_t)(s))*1000000000))+((Time_t)(n)))
-
-#define TMX_NOTIME ((Time_t)(-1))
-#define TMX_NOW tmxgettime()
-#define TMX_MAXTIME tmxsns(TMX_MAXSEC,TMX_MAXNSEC)
-
-#define tmx2tv(t,v) ((v)->tv_nsec=tmxnsec(t),(v)->tv_sec=tmxsec(t))
-#define tv2tmx(v) tmxsns((v)->tv_sec,(v)->tv_nsec)
-
-#define tmxclock(p) tmxsns(((p)?*(p):time(NiL)),0)
-
-#define tmxgetatime(s) tmxsns((s)->st_atime,ST_ATIME_NSEC_GET(s))
-#define tmxgetctime(s) tmxsns((s)->st_ctime,ST_CTIME_NSEC_GET(s))
-#define tmxgetmtime(s) tmxsns((s)->st_mtime,ST_MTIME_NSEC_GET(s))
-
-#define tmxsetatime(s,t) ((s)->st_atime=tmxsec(t),ST_ATIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Time_t tmxdate __PROTO__((const char*, char**, Time_t));
-extern __MANGLE__ Time_t tmxduration __PROTO__((const char*, char**));
-extern __MANGLE__ char* tmxfmt __PROTO__((char*, size_t, const char*, Time_t));
-extern __MANGLE__ Time_t tmxleap __PROTO__((Time_t));
-extern __MANGLE__ Tm_t* tmxmake __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxscan __PROTO__((const char*, char**, const char*, char**, Time_t, long));
-extern __MANGLE__ int tmxsleep __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_t* tmxtm __PROTO__((Tm_t*, Time_t, Tm_zone_t*));
-
-extern __MANGLE__ Time_t tmxgettime __PROTO__((void));
-extern __MANGLE__ int tmxsettime __PROTO__((Time_t));
-
-extern __MANGLE__ int tmxtouch __PROTO__((const char*, Time_t, Time_t, Time_t, int));
-
-extern __MANGLE__ char* fmttmx __PROTO__((const char*, Time_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tty b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tty
deleted file mode 100644
index 98cac27e57..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tty
+++ /dev/null
@@ -1,134 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
-#ifndef _def_tty_ast
-#define _def_tty_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_termios 1 /* #include <termios.h> ok */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
-
-#ifdef _hdr_termios
-# if _mac__POSIX_VDISABLE
-# undef _POSIX_VDISABLE
-# endif
-# include <termios.h>
-#else
-# if defined(_sys_termios) && defined(_lib_tcgetattr)
-# include <sys/termios.h>
-# define _hdr_termios 1
-# else
-# undef _sys_termios
-# endif /* _sys_termios */
-#endif /* _hdr_termios */
-
-#ifdef _hdr_termios
-# undef _hdr_sgtty
-# undef tcgetattr
-# undef tcsetattr
-# undef tcgetpgrp
-# undef tcsetpgrp
-# undef cfgetospeed
-# ifndef TCSANOW
-# define TCSANOW TCSETS
-# define TCSADRAIN TCSETSW
-# define TCSAFLUSH TCSETSF
-# endif /* TCSANOW */
- /* The following corrects bugs in some implementations */
-# if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
-# define TCSAFLUSH TCSADFLUSH
-# endif /* TCSADFLUSH */
-# ifndef _lib_tcgetattr
-# undef tcgetattr
-# define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
-# undef tcsetattr
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# undef cfgetospeed
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# endif /* _lib_tcgetattr */
-# undef TIOCGETC
-#else
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# ifdef _hdr_termio
-# include <termio.h>
-# else
-# ifdef _sys_termio
-# include <sys/termio.h>
-# define _hdr_termio 1
-# endif /* _sys_termio */
-# endif /* _hdr_termio */
-# ifdef _hdr_termio
-# define termios termio
-# undef TIOCGETC
-# define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-
-# ifdef _sys_bsdtty
-# include <sys/bsdtty.h>
-# endif /* _sys_bsdtty */
-# else
-# ifdef _hdr_sgtty
-# include <sgtty.h>
-# ifndef LPENDIN
-# ifdef _sys_nttyio
-# include <sys/nttyio.h>
-# endif /* _sys_nttyio */
-# endif /* LPENDIN */
-# define termios sgttyb
-# ifdef TIOCSETN
-# undef TCSETAW
-# endif /* TIOCSETN */
-# ifdef TIOCGETP
-# define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# else
-# define tcgetattr(fd,tty) gtty(fd, tty)
-# define tcsetattr(fd,action,tty) stty(fd, tty)
-# endif /* TIOCGETP */
-# else
-# ifdef _sys_ttyio
-# include <sys/ttyio.h>
-# endif
-# endif /* _hdr_sgtty */
-# endif /* hdr_termio */
-
-# ifndef TCSANOW
-# ifdef TCSETAW
-# define TCSANOW TCSETA
-# define TCSAFLUSH TCSETAF
-# else
-# ifdef TIOCSETN
-# define TCSANOW TIOCSETN
-# define TCSADRAIN TIOCSETN
-# define TCSAFLUSH TIOCSETP
-# endif /* TIOCSETN */
-# endif /* TCSETAW */
-# endif /* TCSANOW */
-#endif /* _hdr_termios */
-
-/* set ECHOCTL if driver can echo control charaters as ^c */
-#ifdef LCTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LCTLECH
-# endif /* !ECHOCTL */
-#endif /* LCTLECH */
-#ifdef LNEW_CTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LNEW_CTLECH
-# endif /* !ECHOCTL */
-#endif /* LNEW_CTLECH */
-#ifdef LNEW_PENDIN
-# ifndef PENDIN
-# define PENDIN LNEW_PENDIN
-# endif /* !PENDIN */
-#endif /* LNEW_PENDIN */
-
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tv b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tv
deleted file mode 100644
index e3959a1378..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/tv
+++ /dev/null
@@ -1,111 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
-#ifndef _TV_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TV_H 1
-/*
- * AT&T Research
- *
- * high resolution Tv_t interface definitions
- */
-
-#include <ast.h>
-
-#define TV_NSEC_IGNORE (1000000000L)
-#define TV_TOUCH_RETAIN ((Tv_t*)1)
-
-typedef struct Tv_s
-{
- uint32_t tv_sec;
- uint32_t tv_nsec;
-} Tv_t;
-
-#define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
-#define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
-#define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
-
-#define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
-#define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
-#define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
-
-#define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
-#define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
-#define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
-
-#define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
-#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
-#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int tvgettime __PROTO__((Tv_t*));
-extern __MANGLE__ int tvsettime __PROTO__((const Tv_t*));
-extern __MANGLE__ int tvcmp __PROTO__((const Tv_t*, const Tv_t*));
-extern __MANGLE__ int tvtouch __PROTO__((const char*, const Tv_t*, const Tv_t*, const Tv_t*, int));
-extern __MANGLE__ int tvsleep __PROTO__((const Tv_t*, Tv_t*));
-
-extern __MANGLE__ char* fmttv __PROTO__((const char*, Tv_t*));
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/uwin b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/uwin
deleted file mode 100644
index e87d2d4513..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/uwin
+++ /dev/null
@@ -1,17 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/uwin by iffe version 2009-12-04 : : */
-#ifndef _def_uwin_ast
-#define _def_uwin_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_a64l 1 /* a64l() in default lib(s) */
-#define _lib_crypt 1 /* crypt() in default lib(s) */
-#define _lib_getpass 1 /* getpass() in default lib(s) */
-#define _lib_random 1 /* random() in default lib(s) */
-#define _lib_rcmd 1 /* rcmd() in default lib(s) */
-#define _lib_srand48 1 /* srand48() in default lib(s) */
-#define _lib_logb 1 /* logb() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_scalb 1 /* scalb() in default lib(s) */
-#define _lib__finite 1 /* _finite() in default lib(s) */
-#define _lib__scalb 1 /* _scalb() in default lib(s) */
-#define _dat__iob 1 /* _iob in default lib(s) */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vfork b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vfork
deleted file mode 100644
index f375c530f4..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/vfork
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
-#ifndef _def_vfork_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_vfork_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wait b/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wait
deleted file mode 100644
index 9b9cae33cc..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/wait
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
-#ifndef _def_wait_ast
-#define _def_wait_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_wait 1 /* wait() in default lib(s) */
-#define _lib_wait3 1 /* wait3() in default lib(s) */
-#define _lib_wait4 1 /* wait4() in default lib(s) */
-#define _lib_waitpid 1 /* waitpid() in default lib(s) */
-#define _sys_wait 1 /* #include <sys/wait.h> ok */
-#define _ok_wif 1 /* posix wait macros ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/align.h b/usr/src/lib/libast/sparcv9/src/lib/libast/align.h
deleted file mode 100644
index 022d7943cb..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/align.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
-#ifndef _def_align_ast
-#define _def_align_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-typedef unsigned long ALIGN_INTEGRAL;
-
-#define ALIGN_CHUNK 8192
-#define ALIGN_INTEGRAL long
-#define ALIGN_INTEGER(x) ((ALIGN_INTEGRAL)(x))
-#define ALIGN_POINTER(x) ((char*)(x))
-#define ALIGN_ROUND(x,y) ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
-
-#define ALIGN_BOUND ALIGN_BOUND2
-#define ALIGN_ALIGN(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC(x) ALIGN_TRUNC2(x)
-
-#define ALIGN_BIT1 0x1
-#define ALIGN_BOUND1 ALIGN_BOUND2
-#define ALIGN_ALIGN1(x) ALIGN_ALIGN2(x)
-#define ALIGN_TRUNC1(x) ALIGN_TRUNC2(x)
-#define ALIGN_CLRBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffe)
-#define ALIGN_SETBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
-#define ALIGN_TSTBIT1(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
-
-#define ALIGN_BIT2 0x2
-#define ALIGN_BOUND2 16
-#define ALIGN_ALIGN2(x) ALIGN_TRUNC2((x)+15)
-#define ALIGN_TRUNC2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffff0)
-#define ALIGN_CLRBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffd)
-#define ALIGN_SETBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
-#define ALIGN_TSTBIT2(x) ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_botch.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_botch.h
deleted file mode 100644
index c6c447fb42..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_botch.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/botch.c by iffe version 2009-12-04 : : */
-#ifndef _def_botch_ast
-#define _def_botch_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_ccode.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_ccode.h
deleted file mode 100644
index 4c543d740c..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_ccode.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/ccode by iffe version 2009-12-04 : : */
-#ifndef _def_ccode_ast
-#define _def_ccode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define CC_ASCII 1 /* ISO-8859-1 */
-#define CC_EBCDIC_E 2 /* Xopen dd(1) EBCDIC */
-#define CC_EBCDIC_I 3 /* Xopen dd(1) IBM */
-#define CC_EBCDIC_O 4 /* IBM-1047 mvs OpenEdition */
-#define CC_EBCDIC_S 5 /* Siemens posix-bc */
-#define CC_EBCDIC_H 6 /* IBM-37 AS/400 */
-#define CC_EBCDIC_M 7 /* IBM mvs cobol */
-#define CC_EBCDIC_U 8 /* microfocus cobol */
-
-#define CC_MAPS 8 /* number of code maps */
-
-#define CC_EBCDIC CC_EBCDIC_E
-#define CC_EBCDIC1 CC_EBCDIC_E
-#define CC_EBCDIC2 CC_EBCDIC_I
-#define CC_EBCDIC3 CC_EBCDIC_O
-
-#define CC_NATIVE CC_ASCII /* native character code */
-#define CC_ALIEN CC_EBCDIC /* alien character code */
-
-#define CC_bel 0007 /* bel character */
-#define CC_esc 0033 /* esc character */
-#define CC_sub 0032 /* sub character */
-#define CC_vt 0013 /* vt character */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_common.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_common.h
deleted file mode 100644
index aed49fe106..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_common.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/common by iffe version 2009-12-04 : : */
-#ifndef _AST_COMMON_H
-#define _AST_COMMON_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_pthread 1 /* #include <pthread.h> ok */
-#define _hdr_stdarg 1 /* #include <stdarg.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdint 1 /* #include <stdint.h> ok */
-#define _hdr_inttypes 1 /* #include <inttypes.h> ok */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_long_double 1 /* long double is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _std_proto 1 /* standard C prototypes ok */
-#define _ptr_void 1 /* standard C void* ok */
-/* disable non-standard linux/gnu inlines */
-#ifdef __GNUC__
-# undef __OPTIMIZE_SIZE__
-# define __OPTIMIZE_SIZE__ 1
-#endif
-
-/* __STD_C indicates that the language is ANSI-C or C++ */
-#if !defined(__STD_C) && __STDC__
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && (__cplusplus || c_plusplus)
-# define __STD_C 1
-#endif
-#if !defined(__STD_C) && _std_proto
-# define __STD_C 1
-#endif
-#if !defined(__STD_C)
-# define __STD_C 0
-#endif
-
-/* extern symbols must be protected against C++ name mangling */
-#ifndef _BEGIN_EXTERNS_
-# if __cplusplus || c_plusplus
-# define _BEGIN_EXTERNS_ extern "C" {
-# define _END_EXTERNS_ }
-# else
-# define _BEGIN_EXTERNS_
-# define _END_EXTERNS_
-# endif
-#endif
-
-/* _ARG_ simplifies function prototyping among flavors of C */
-#ifndef _ARG_
-# if __STD_C
-# define _ARG_(x) x
-# else
-# define _ARG_(x) ()
-# endif
-#endif
-
-/* _NIL_ simplifies defining nil pointers to a given type */
-#ifndef _NIL_
-# define _NIL_(x) ((x)0)
-#endif
-
-/* __INLINE__ is the inline keyword */
-#if !defined(__INLINE__) && defined(__cplusplus)
-# define __INLINE__ inline
-#endif
-#if !defined(__INLINE__) && defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-#endif
-
-/* Void_t is defined so that Void_t* can address any type */
-#ifndef Void_t
-# if __STD_C
-# define Void_t void
-# else
-# define Void_t char
-# endif
-#endif
-
-/* windows variants and veneers */
-#if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
-# define _WINIX 1
-#endif
-
-/* dynamic linked library external scope handling */
-#ifdef __DYNAMIC__
-# undef __DYNAMIC__
-# ifndef _DLL
-# define _DLL 1
-# endif
-#endif
-#if _dll_import
-# if _BLD_STATIC && !_BLD_DLL
-# undef _DLL
-# else
-# if !_UWIN && !defined(_DLL)
-# define _DLL 1
-# endif
-# endif
-# if !defined(__EXPORT__) && _BLD_DLL
-# define __EXPORT__ __declspec(dllexport)
-# endif
-# if !defined(__IMPORT__) && ( _BLD_DLL || defined(_DLL) )
-# define __IMPORT__ __declspec(dllimport)
-# endif
-# if _BLD_DLL && _UWIN
-# define __DYNAMIC__(v) (_ast_getdll()->_ast_ ## v)
-# endif
-#endif
-#if !defined(_astimport)
-# if defined(__IMPORT__) && defined(_DLL)
-# define _astimport __IMPORT__
-# else
-# define _astimport extern
-# endif
-#endif
-#if _dll_import && ( !_BLD_DLL || _WINIX && !_UWIN )
-# ifdef __STDC__
-# define __EXTERN__(T,obj) extern T obj; T* _imp__ ## obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__ ## obj = &obj
-# else
-# define __EXTERN__(T,obj) extern T obj; T* _imp__/**/obj = &obj
-# define __DEFINE__(T,obj,val) T obj = val; T* _imp__/**/obj = &obj
-# endif
-#else
-# define __EXTERN__(T,obj) extern T obj
-# define __DEFINE__(T,obj,val) T obj = val
-#endif
-
-#define _ast_LL 1 /* LL numeric suffix supported */
-#define _ast_int1_t char
-#define _ast_int2_t short
-#define _ast_int4_t int
-#define _ast_int8_t long
-#define _ast_intmax_t _ast_int8_t
-#define _ast_intmax_long 1
-#define _ast_intswap 0
-
-#define _ast_flt4_t float
-#define _ast_flt8_t double
-#define _ast_flt16_t long double
-#define _ast_fltmax_t _ast_flt16_t
-#define _typ_int8_t 1 /* int8_t is a type */
-#define _typ_uint8_t 1 /* uint8_t is a type */
-#define _typ_int16_t 1 /* int16_t is a type */
-#define _typ_uint16_t 1 /* uint16_t is a type */
-#define _typ_int32_t 1 /* int32_t is a type */
-#define _typ_uint32_t 1 /* uint32_t is a type */
-#define _typ_int64_t 1 /* int64_t is a type */
-#define _typ_uint64_t 1 /* uint64_t is a type */
-#define _typ_intmax_t 1 /* intmax_t is a type */
-#define _typ_uintmax_t 1 /* uintmax_t is a type */
-
-#ifndef va_listref
-#ifndef va_start
-#if __STD_C
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-#define va_listref(p) (p) /* pass va_list to varargs function */
-#define va_listval(p) (p) /* retrieve va_list from va_arg(ap,va_listarg) */
-#define va_listarg va_list /* va_arg() va_list type */
-#endif
-#ifndef _AST_STD_H
-# if __STD_C && _hdr_stddef
-# include <stddef.h>
-# endif
-# if _sys_types
-# include <sys/types.h>
-# endif
-# if _hdr_stdint
-# include <stdint.h>
-# else
-# if _hdr_inttypes
-# include <inttypes.h>
-# endif
-# endif
-#endif
-#if !_typ_size_t
-# define _typ_size_t 1
- typedef int size_t;
-#endif
-#if !_typ_ssize_t
-# define _typ_ssize_t 1
- typedef int ssize_t;
-#endif
-#ifndef _AST_STD_H
-# if !_def_map_ast
-# include <ast_map.h>
-# endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_dirent.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_dirent.h
deleted file mode 100644
index baeb288ede..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_dirent.h
+++ /dev/null
@@ -1,82 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/dirent by iffe version 2009-12-04 : : */
-
-#ifndef _def_dirent_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dirent_ast 1
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _nxt_dirent <../include/dirent.h> /* include path for the native <dirent.h> */
-#define _nxt_dirent_str "../include/dirent.h" /* include string for the native <dirent.h> */
-/*
- * <dirent.h> for systems with ok <dirent.h>
- */
-
-#ifndef _DIRENT_H
-
-#include <../include/dirent.h> /* the native <dirent.h> */
-
-#ifndef _DIRENT_H
-#define _DIRENT_H
-#endif
-
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_fcntl.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_fcntl.h
deleted file mode 100644
index f6c4f0abe4..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_fcntl.h
+++ /dev/null
@@ -1,114 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/fcntl.c by iffe version 2009-12-04 : : */
-#ifndef _def_fcntl_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fcntl_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <ast_fs.h>
-
-#if _typ_off64_t
-#undef off_t
-#ifdef __STDC__
-#define off_t off_t
-#endif
-#endif
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#define O_BINARY 0
-#define O_TEMPORARY 0
-#define O_TEXT 0
-
-#include <ast_fs.h>
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_fstat64
-#define fstat fstat64
-#endif
-#if _lib_lstat64
-#define lstat lstat64
-#endif
-#if _lib_stat64
-#define stat stat64
-#endif
-#if _lib_creat64
-#define creat creat64
-#endif
-#if _lib_mmap64
-#define mmap mmap64
-#endif
-#if _lib_open64
-#undef open
-#define open open64
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_float.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_float.h
deleted file mode 100644
index a2ff3da6fe..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_float.h
+++ /dev/null
@@ -1,215 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/float by iffe version 2009-12-04 : : */
-
-#ifndef _def_float_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_float_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_float 1 /* #include <float.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_math 1 /* #include <math.h> ok */
-#define _hdr_values 1 /* #include <values.h> ok */
-#define _LIB_m 1 /* -lm is a library */
-#define _lib_fpclassify 1 /* fpclassify() in default lib(s) */
-#define _lib_frexp 1 /* frexp() in default lib(s) */
-#define _lib_frexpl 1 /* frexpl() in default lib(s) */
-#define _lib_ldexp 1 /* ldexp() in default lib(s) */
-#define _lib_ldexpl 1 /* ldexpl() in default lib(s) */
-#define _lib_finite 1 /* finite() in default lib(s) */
-#define _lib_isinf 1 /* isinf() in default lib(s) */
-#define _lib_isnan 1 /* isnan() in default lib(s) */
-#define _lib_isnanl 1 /* isnanl() in default lib(s) */
-#define _lib_signbit 1 /* signbit() in default lib(s) */
-#define _lib_copysign 1 /* copysign() in default lib(s) */
-#define _lib_copysignl 1 /* copysignl() in default lib(s) */
-#include <ast_common.h>
-#include <float.h>
-#include <math.h>
-#ifndef FLT_DIG
-#define FLT_DIG 6
-#endif
-#ifndef FLT_MAX
-#define FLT_MAX 3.4028234663852885981170E+38F
-#endif
-#ifndef FLT_MAX_10_EXP
-#define FLT_MAX_10_EXP ( + 38 )
-#endif
-#ifndef FLT_MAX_EXP
-#define FLT_MAX_EXP ( + 128 )
-#endif
-#ifndef FLT_MIN
-#define FLT_MIN 1.1754943508222875079688E-38F
-#endif
-#ifndef FLT_MIN_10_EXP
-#define FLT_MIN_10_EXP ( - 37 )
-#endif
-#ifndef FLT_MIN_EXP
-#define FLT_MIN_EXP ( - 125 )
-#endif
-#ifndef DBL_DIG
-#define DBL_DIG 15
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623157081452E+308
-#endif
-#ifndef DBL_MAX_10_EXP
-#define DBL_MAX_10_EXP ( + 308 )
-#endif
-#ifndef DBL_MAX_EXP
-#define DBL_MAX_EXP ( + 1024 )
-#endif
-#ifndef DBL_MIN
-#define DBL_MIN 2.2250738585072013830903E-308
-#endif
-#ifndef DBL_MIN_10_EXP
-#define DBL_MIN_10_EXP ( - 307 )
-#endif
-#ifndef DBL_MIN_EXP
-#define DBL_MIN_EXP ( - 1021 )
-#endif
-#ifndef LDBL_DIG
-#define LDBL_DIG 33
-#endif
-#ifndef LDBL_MAX
-#define LDBL_MAX 1.189731495357231765085759326628007016E+4932L
-#endif
-#ifndef LDBL_MAX_10_EXP
-#define LDBL_MAX_10_EXP ( + 4932 )
-#endif
-#ifndef LDBL_MAX_EXP
-#define LDBL_MAX_EXP ( + 16384 )
-#endif
-#ifndef LDBL_MIN
-#define LDBL_MIN 3.362103143112093506262677817321752603E-4932L
-#endif
-#ifndef LDBL_MIN_10_EXP
-#define LDBL_MIN_10_EXP ( - 4931 )
-#endif
-#ifndef LDBL_MIN_EXP
-#define LDBL_MIN_EXP ( - 16381 )
-#endif
-
-
-#define USHRT_DIG 4
-#define UINT_DIG 9
-#define ULONG_DIG 19
-#define UINTMAX_DIG ULONG_DIG
-
-#define FLT_ULONG_MAX 18446744073709551615.0F
-#define FLT_ULLONG_MAX FLT_ULONG_MAX
-#define FLT_UINTMAX_MAX FLT_ULONG_MAX
-#define FLT_LONG_MAX 9223372036854775807.0F
-#define FLT_LLONG_MAX FLT_LONG_MAX
-#define FLT_INTMAX_MAX FLT_LONG_MAX
-#define FLT_LONG_MIN (-9223372036854775808.0F)
-#define FLT_LLONG_MIN FLT_LONG_MIN
-#define FLT_INTMAX_MIN FLT_LONG_MIN
-
-#define DBL_ULONG_MAX 18446744073709551615.0
-#define DBL_ULLONG_MAX DBL_ULONG_MAX
-#define DBL_UINTMAX_MAX DBL_ULONG_MAX
-#define DBL_LONG_MAX 9223372036854775807.0
-#define DBL_LLONG_MAX DBL_LONG_MAX
-#define DBL_INTMAX_MAX DBL_LONG_MAX
-#define DBL_LONG_MIN (-9223372036854775808.0)
-#define DBL_LLONG_MIN DBL_LONG_MIN
-#define DBL_INTMAX_MIN DBL_LONG_MIN
-
-#define LDBL_ULONG_MAX 18446744073709551615.0L
-#define LDBL_ULLONG_MAX LDBL_ULONG_MAX
-#define LDBL_UINTMAX_MAX LDBL_ULONG_MAX
-#define LDBL_LONG_MAX 9223372036854775807.0L
-#define LDBL_LLONG_MAX LDBL_LONG_MAX
-#define LDBL_INTMAX_MAX LDBL_LONG_MAX
-#define LDBL_LONG_MIN (-9223372036854775808.0L)
-#define LDBL_LLONG_MIN LDBL_LONG_MIN
-#define LDBL_INTMAX_MIN LDBL_LONG_MIN
-
-#define FLTMAX_UINTMAX_MAX LDBL_UINTMAX_MAX
-#define FLTMAX_INTMAX_MAX LDBL_INTMAX_MAX
-#define FLTMAX_INTMAX_MIN LDBL_INTMAX_MIN
-
-typedef union _ast_dbl_exp_u
-{
- uint32_t e[sizeof(double)/4];
- double f;
-} _ast_dbl_exp_t;
-
-#define _ast_dbl_exp_index 0
-#define _ast_dbl_exp_shift 20
-
-typedef union _fltmax_exp_u
-{
- uint32_t e[sizeof(_ast_fltmax_t)/4];
- _ast_fltmax_t f;
-} _ast_fltmax_exp_t;
-
-#define _ast_fltmax_exp_index 0
-#define _ast_fltmax_exp_shift 16
-
-#define _ast_flt_unsigned_max_t unsigned long long
-#define _ast_flt_nan_init 0x7f,0xff,0xff,0xff
-#define _ast_flt_inf_init 0x7f,0x80,0x00,0x00
-#define _ast_dbl_nan_init 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff
-#define _ast_dbl_inf_init 0x7f,0xf0,0x00,0x00,0x00,0x00,0x00,0x00
-#define _ast_ldbl_nan_init 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
-#define _ast_ldbl_inf_init 0x7f,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_fs.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_fs.h
deleted file mode 100644
index f542635fd0..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_fs.h
+++ /dev/null
@@ -1,142 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/fs by iffe version 2009-12-04 : : */
-
-#ifndef _def_fs_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_fs_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _lib_lstat 1 /* lstat() in default lib(s) */
-#define _lib_mknod 1 /* mknod() in default lib(s) */
-#define _lib_sync 1 /* sync() in default lib(s) */
-#include <sys/stat.h>
-#include <sys/mkdev.h>
-#define FS_default "ufs"
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _sys_mntent 1 /* #include <sys/mntent.h> ok */
-#define _sys_mnttab 1 /* #include <sys/mnttab.h> ok */
-#define _sys_mount 1 /* #include <sys/mount.h> ok */
-#define _sys_statfs 1 /* #include <sys/statfs.h> ok */
-#define _sys_statvfs 1 /* #include <sys/statvfs.h> ok */
-#define _sys_vfs 1 /* #include <sys/vfs.h> ok */
-#define _mem_st_blocks_stat 1 /* st_blocks is a member of struct stat */
-#define _mem_st_blksize_stat 1 /* st_blksize is a member of struct stat */
-#define _mem_st_rdev_stat 1 /* st_rdev is a member of struct stat */
-#define _mem_f_files_statfs 1 /* f_files is a member of struct statfs */
-#define _sys_param 1 /* #include <sys/param.h> ok */
-#define _mem_f_basetype_statvfs 1 /* f_basetype is a member of struct statvfs */
-#define _mem_f_frsize_statvfs 1 /* f_frsize is a member of struct statvfs */
-#define _lib_getmntent 1 /* getmntent() in default lib(s) */
-#define _lib_statfs 1 /* statfs() in default lib(s) */
-#define _lib_statvfs 1 /* statvfs() in default lib(s) */
-#define _lib_statfs4 1 /* compile{\ passed */
-#if _sys_statvfs
-#include <sys/statvfs.h>
-#if !_mem_statvfs_f_basetype
-#if _ary_f_reserved7
-#define f_basetype f_reserved7
-#endif
-#endif
-#else
-#define _mem_f_basetype_statvfs 1
-#define _mem_f_frsize_statvfs 1
-struct statvfs
-{
-unsigned long f_bsize; /* fundamental file system block size */
-unsigned long f_frsize; /* fragment size */
-unsigned long f_blocks; /* total # of blocks of f_frsize on fs */
-unsigned long f_bfree; /* total # of free blocks of f_frsize */
-unsigned long f_bavail; /* # of free blocks avail to non-superuser */
-unsigned long f_files; /* total # of file nodes (inodes) */
-unsigned long f_ffree; /* total # of free file nodes */
-unsigned long f_favail; /* # of free nodes avail to non-superuser */
-unsigned long f_fsid; /* file system id (dev for now) */
-char f_basetype[16]; /* target fs type name, null-terminated */
-unsigned long f_flag; /* bit-mask of flags */
-unsigned long f_namemax; /* maximum file name length */
-char f_fstr[32]; /* filesystem-specific string */
-unsigned long f_filler[16]; /* reserved for future expansion */
-};
-extern __MANGLE__ int fstatvfs __PROTO__((int, struct statvfs*));
-extern __MANGLE__ int statvfs __PROTO__((const char*, struct statvfs*));
-#endif
-#if _typ_off64_t
-#undef off_t
-#define off_t off64_t
-#endif
-#if _lib_statvfs64 && !defined(statvfs)
-#define statvfs statvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int statvfs64 __PROTO__((const char*, struct statvfs64*));
-#endif
-#endif
-#if _lib_fstatvfs64 && !defined(fstatvfs)
-#define fstatvfs fstatvfs64
-#if !defined(__USE_LARGEFILE64)
-extern __MANGLE__ int fstatvfs64 __PROTO__((int, struct statvfs64*));
-#endif
-#endif
-
-#define _str_st_fstype 1 /* stat.st_fstype is a string */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_iconv.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_iconv.h
deleted file mode 100644
index 81f5332030..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_iconv.h
+++ /dev/null
@@ -1,132 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/iconv by iffe version 2009-12-04 : : */
-
-#ifndef _def_iconv_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_iconv_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_iconv 1 /* #include <iconv.h> ok */
-#define _lib_iconv_open 1 /* iconv_open() in default lib(s) */
-#define _lib_iconv_close 1 /* iconv_close() in default lib(s) */
-#define _lib_iconv 1 /* iconv() in default lib(s) */
-#define _nxt_iconv <../include/iconv.h> /* include path for the native <iconv.h> */
-#define _nxt_iconv_str "../include/iconv.h" /* include string for the native <iconv.h> */
-#include <ast_common.h>
-#include <ccode.h>
-#include <../include/iconv.h> /* the native iconv.h */
-
-#define CC_ICONV (-1)
-#define CC_UCS (-2)
-#define CC_SCU (-3)
-#define CC_UTF (-4)
-#define CC_UME (-5)
-
-#ifndef _ICONV_LIST_PRIVATE_
-#undef iconv_t
-#define iconv_t _ast_iconv_t
-#undef iconv_f
-#define iconv_f _ast_iconv_f
-#undef iconv_list_t
-#define iconv_list_t _ast_iconv_list_t
-#undef iconv_open
-#define iconv_open _ast_iconv_open
-#undef iconv
-#define iconv _ast_iconv
-#undef iconv_close
-#define iconv_close _ast_iconv_close
-#undef iconv_list
-#define iconv_list _ast_iconv_list
-#undef iconv_move
-#define iconv_move _ast_iconv_move
-#undef iconv_name
-#define iconv_name _ast_iconv_name
-#undef iconv_write
-#define iconv_write _ast_iconv_write
-#endif
-
-typedef Ccmap_t _ast_iconv_list_t;
-typedef __V_* _ast_iconv_t;
-typedef size_t (*_ast_iconv_f) __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ _ast_iconv_t _ast_iconv_open __PROTO__((const char*, const char*));
-extern __MANGLE__ size_t _ast_iconv __PROTO__((_ast_iconv_t, char**, size_t*, char**, size_t*));
-extern __MANGLE__ int _ast_iconv_close __PROTO__((_ast_iconv_t));
-extern __MANGLE__ _ast_iconv_list_t* _ast_iconv_list __PROTO__((_ast_iconv_list_t*));
-extern __MANGLE__ int _ast_iconv_name __PROTO__((const char*, char*, size_t));
-#if _SFIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, Sfio_t*, Sfio_t*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, Sfio_t*, char**, size_t*, size_t*));
-#else
-#if _SFSTDIO_H
-extern __MANGLE__ ssize_t _ast_iconv_move __PROTO__((_ast_iconv_t, FILE*, FILE*, size_t, size_t*));
-extern __MANGLE__ ssize_t _ast_iconv_write __PROTO__((_ast_iconv_t, FILE*, char**, size_t*, size_t*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_lib.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_lib.h
deleted file mode 100644
index 0b290d868b..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_lib.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/lib by iffe version 2009-12-04 : : */
-#ifndef _def_lib_ast
-#define _def_lib_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_dirent 1 /* #include <dirent.h> ok */
-#define _hdr_fmtmsg 1 /* #include <fmtmsg.h> ok */
-#define _hdr_fnmatch 1 /* #include <fnmatch.h> ok */
-#define _hdr_libgen 1 /* #include <libgen.h> ok */
-#define _hdr_limits 1 /* #include <limits.h> ok */
-#define _hdr_locale 1 /* #include <locale.h> ok */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_spawn 1 /* #include <spawn.h> ok */
-#define _hdr_syslog 1 /* #include <syslog.h> ok */
-#define _hdr_utime 1 /* #include <utime.h> ok */
-#define _hdr_wctype 1 /* #include <wctype.h> ok */
-#define _hdr_wchar 1 /* <wchar.h> and isw*() really work */
-#define _dat__tzname 1 /* _tzname in default lib(s) */
-#define _dat_tzname 1 /* tzname in default lib(s) */
-#define _lib__cleanup 1 /* _cleanup() in default lib(s) */
-#define _lib_atexit 1 /* atexit() in default lib(s) */
-#define _lib_bcopy 1 /* bcopy() in default lib(s) */
-#define _lib_bzero 1 /* bzero() in default lib(s) */
-#define _lib_catclose 1 /* catclose() in default lib(s) */
-#define _lib_catgets 1 /* catgets() in default lib(s) */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_confstr 1 /* confstr() in default lib(s) */
-#define _lib_dup2 1 /* dup2() in default lib(s) */
-#define _lib_execlp 1 /* execlp() in default lib(s) */
-#define _lib_execve 1 /* execve() in default lib(s) */
-#define _lib_execvp 1 /* execvp() in default lib(s) */
-#define _lib_fchmod 1 /* fchmod() in default lib(s) */
-#define _lib_fcntl 1 /* fcntl() in default lib(s) */
-#define _lib_fmtmsg 1 /* fmtmsg() in default lib(s) */
-#define _lib_fnmatch 1 /* fnmatch() in default lib(s) */
-#define _lib_fork 1 /* fork() in default lib(s) */
-#define _lib_fsync 1 /* fsync() in default lib(s) */
-#define _lib_getdents 1 /* getdents() in default lib(s) */
-#define _lib_getdtablesize 1 /* getdtablesize() in default lib(s) */
-#define _lib_getdate 1 /* getdate() in default lib(s) */
-#define _lib_getgroups 1 /* getgroups() in default lib(s) */
-#define _lib_gethostname 1 /* gethostname() in default lib(s) */
-#define _lib_getlogin 1 /* getlogin() in default lib(s) */
-#define _lib_getpagesize 1 /* getpagesize() in default lib(s) */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_getopt 1 /* getopt() in default lib(s) */
-#define _lib_getsubopt 1 /* getsubopt() in default lib(s) */
-#define _lib_getopt_long 1 /* getopt_long() in default lib(s) */
-#define _lib_getopt_long_only 1 /* getopt_long_only() in default lib(s) */
-#define _lib_glob 1 /* glob() in default lib(s) */
-#define _lib_index 1 /* index() in default lib(s) */
-#define _lib_iswblank 1 /* iswblank() in default lib(s) */
-#define _lib_iswctype 1 /* iswctype() in default lib(s) */
-#define _lib_killpg 1 /* killpg() in default lib(s) */
-#define _lib_link 1 /* link() in default lib(s) */
-#define _lib_localeconv 1 /* localeconv() in default lib(s) */
-#define _lib_madvise 1 /* madvise() in default lib(s) */
-#define _lib_mbtowc 1 /* mbtowc() in default lib(s) */
-#define _lib_mbrtowc 1 /* mbrtowc() in default lib(s) */
-#define _lib_memalign 1 /* memalign() in default lib(s) */
-#define _lib_memchr 1 /* memchr() in default lib(s) */
-#define _lib_memcpy 1 /* memcpy() in default lib(s) */
-#define _lib_memmove 1 /* memmove() in default lib(s) */
-#define _lib_memset 1 /* memset() in default lib(s) */
-#define _lib_mkdir 1 /* mkdir() in default lib(s) */
-#define _lib_mkfifo 1 /* mkfifo() in default lib(s) */
-#define _lib_mktemp 1 /* mktemp() in default lib(s) */
-#define _lib_mktime 1 /* mktime() in default lib(s) */
-#define _lib_mount 1 /* mount() in default lib(s) */
-#define _lib_opendir 1 /* opendir() in default lib(s) */
-#define _lib_pathconf 1 /* pathconf() in default lib(s) */
-#define _lib_readlink 1 /* readlink() in default lib(s) */
-#define _lib_remove 1 /* remove() in default lib(s) */
-#define _lib_rename 1 /* rename() in default lib(s) */
-#define _lib_rewinddir 1 /* rewinddir() in default lib(s) */
-#define _lib_rindex 1 /* rindex() in default lib(s) */
-#define _lib_rmdir 1 /* rmdir() in default lib(s) */
-#define _lib_setlocale 1 /* setlocale() in default lib(s) */
-#define _lib_setpgid 1 /* setpgid() in default lib(s) */
-#define _lib_setpgrp 1 /* setpgrp() in default lib(s) */
-#define _lib_setreuid 1 /* setreuid() in default lib(s) */
-#define _lib_setsid 1 /* setsid() in default lib(s) */
-#define _lib_setuid 1 /* setuid() in default lib(s) */
-#define _lib_sigaction 1 /* sigaction() in default lib(s) */
-#define _lib_sigprocmask 1 /* sigprocmask() in default lib(s) */
-#define _lib_socketpair 1 /* socketpair() in default lib(s) */
-#define _lib_strchr 1 /* strchr() in default lib(s) */
-#define _lib_strcoll 1 /* strcoll() in default lib(s) */
-#define _lib_strdup 1 /* strdup() in default lib(s) */
-#define _lib_strerror 1 /* strerror() in default lib(s) */
-#define _lib_strcasecmp 1 /* strcasecmp() in default lib(s) */
-#define _lib_strncasecmp 1 /* strncasecmp() in default lib(s) */
-#define _lib_strrchr 1 /* strrchr() in default lib(s) */
-#define _lib_strstr 1 /* strstr() in default lib(s) */
-#define _lib_strxfrm 1 /* strxfrm() in default lib(s) */
-#define _lib_strftime 1 /* strftime() in default lib(s) */
-#define _lib_swab 1 /* swab() in default lib(s) */
-#define _lib_symlink 1 /* symlink() in default lib(s) */
-#define _lib_sysconf 1 /* sysconf() in default lib(s) */
-#define _lib_sysinfo 1 /* sysinfo() in default lib(s) */
-#define _lib_syslog 1 /* syslog() in default lib(s) */
-#define _lib_telldir 1 /* telldir() in default lib(s) */
-#define _lib_tmpnam 1 /* tmpnam() in default lib(s) */
-#define _lib_tzset 1 /* tzset() in default lib(s) */
-#define _lib_unlink 1 /* unlink() in default lib(s) */
-#define _lib_utime 1 /* utime() in default lib(s) */
-#define _lib_wctype 1 /* wctype() in default lib(s) */
-#define _lib_ftruncate 1 /* ftruncate() in default lib(s) */
-#define _lib_truncate 1 /* truncate() in default lib(s) */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _lib_strtod 1 /* strtod() in default lib(s) */
-#define _lib_strtold 1 /* strtold() in default lib(s) */
-#define _lib_strtol 1 /* strtol() in default lib(s) */
-#define _lib_strtoll 1 /* strtoll() in default lib(s) */
-#define _lib_strtoul 1 /* strtoul() in default lib(s) */
-#define _lib_strtoull 1 /* strtoull() in default lib(s) */
-#define _hdr_signal 1 /* #include <signal.h> ok */
-#define _lib_sigflag 1 /* sigflag() in default lib(s) */
-#define _npt_sigflag 1 /* sigflag() needs a prototype */
-#define _mem_d_ino_dirent 1 /* d_ino is a member of struct dirent */
-#define _mem_d_off_dirent 1 /* d_off is a member of struct dirent */
-#define _mem_d_reclen_dirent 1 /* d_reclen is a member of struct dirent */
-#define _mem_DIR 1 /* DIR is a non-opaque struct */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _sys_jioctl 1 /* #include <sys/jioctl.h> ok */
-#define _sys_localedef 1 /* #include <sys/localedef.h> ok */
-#define _sys_resource 1 /* #include <sys/resource.h> ok */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _sys_stream 1 /* #include <sys/stream.h> ok */
-#define _sys_systeminfo 1 /* #include <sys/systeminfo.h> ok */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_off64_t 1 /* off64_t is a type */
-#define _typ_struct_dirent64 1 /* struct dirent64 is a type */
-#define _tst_errno 1 /* errno can be assigned */
-#define _lib_poll_fd_1 1 /* fd is first arg to poll() */
-#define _lib_poll 1 /* _lib_poll_fd_1||_lib_poll_fd_2 is true */
-#define _lib_select 1 /* select() has standard 5 arg interface */
-#define _pipe_rw 1 /* full duplex pipes */
-#define _hdr_unistd 1 /* #include <unistd.h> ok */
-#define _lib_vfork 1 /* vfork exists and it works */
-#define _real_vfork 1 /* vfork child shares data with parent */
-#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
-#define _stream_peek 1 /* ioctl(I_PEEK) works */
-#define _socket_peek 1 /* recv(MSG_PEEK) works */
-#define _hdr_string 1 /* #include <string.h> ok */
-#define _lib_memcmp 1 /* standard memcmp interface that works */
-#define _hdr_fcntl 1 /* #include <fcntl.h> ok */
-#define _sys_stat 1 /* #include <sys/stat.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_memccpy 1 /* standard memccpy interface that works */
-#define _lib_utime_now 1 /* utime works with 0 time vector */
-#define _UNIV_DEFAULT "att" /* default universe name */
-#define _std_cleanup 1 /* stuck with standard _cleanup */
-#define _std_strcoll 1 /* standard strcoll works */
-#if !_AST_no_spawnveg
-#define _use_spawnveg 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_limits.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_limits.h
deleted file mode 100644
index 019d408faf..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_limits.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/limits.c by iffe version 2009-12-04 : : */
-#ifndef _def_limits_ast
-#define _def_limits_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-#ifndef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-#ifndef CHAR_MIN
-#define CHAR_MIN -128
-#endif
-#ifndef CLOCKS_PER_SEC
-#define CLOCKS_PER_SEC 1000000
-#endif
-#ifndef INT_MIN
-#define INT_MIN -2147483648
-#endif
-#ifndef LLONG_MAX
-#define LLONG_MAX 9223372036854775807
-#endif
-#ifndef LLONG_MIN
-#define LLONG_MIN -9223372036854775808
-#endif
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#ifndef LONG_MIN
-#define LONG_MIN -2147483648
-#endif
-#ifndef MB_LEN_MAX
-#define MB_LEN_MAX 5
-#endif
-#ifndef OPEN_MAX_CEIL
-#ifndef OPEN_MAX
-#define OPEN_MAX 256
-#endif
-#define OPEN_MAX_CEIL OPEN_MAX
-#endif
-#ifndef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 4096
-#endif
-#ifndef PTRDIFF_MAX
-#define PTRDIFF_MAX 9223372036854775807
-#endif
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN -9223372036854775808
-#endif
-#ifndef SCHAR_MAX
-#define SCHAR_MAX 127
-#endif
-#ifndef SCHAR_MIN
-#define SCHAR_MIN -128
-#endif
-#ifndef SHRT_MIN
-#define SHRT_MIN -32768
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX 2147483647
-#endif
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN -2147483648
-#endif
-#ifndef SIZE_MAX
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295
-#endif
-#define SIZE_MAX UINT_MAX
-#endif
-#ifndef SSIZE_MAX
-#ifndef INT_MAX
-#define INT_MAX 2147483647
-#endif
-#define SSIZE_MAX INT_MAX
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#ifndef ULLONG_MAX
-#define ULLONG_MAX 18446744073709551615
-#endif
-#ifndef ULONG_MAX
-#define ULONG_MAX 4294967295
-#endif
-#ifndef USHRT_MAX
-#define USHRT_MAX 65535
-#endif
-#ifndef WCHAR_MAX
-#define WCHAR_MAX 2147483647
-#endif
-#ifndef WCHAR_MIN
-#define WCHAR_MIN -2147483648
-#endif
-#ifndef WINT_MAX
-#define WINT_MAX 2147483647
-#endif
-#ifndef WINT_MIN
-#define WINT_MIN -2147483648
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_map.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_map.h
deleted file mode 100644
index 17de2eb4c1..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_map.h
+++ /dev/null
@@ -1,450 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/map.c by iffe version 2009-12-04 : : */
-#ifndef _def_map_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_map_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-
-/*
- * prototypes provided for standard interfaces hijacked
- * by ast and mapped to _ast_* but already prototyped
- * unmapped in native headers included by <ast_std.h>
- */
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-
-#define _map_libc 1
-#undef basename
-#define basename _ast_basename
-#undef dirname
-#define dirname _ast_dirname
-#undef eaccess
-#define eaccess _ast_eaccess
-#undef execvpe
-#define execvpe _ast_execvpe
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-#undef fnmatch
-#define fnmatch _ast_fnmatch
-#undef fts_children
-#define fts_children _ast_fts_children
-#undef fts_close
-#define fts_close _ast_fts_close
-#undef fts_flags
-#define fts_flags _ast_fts_flags
-#undef fts_notify
-#define fts_notify _ast_fts_notify
-#undef fts_open
-#define fts_open _ast_fts_open
-#undef fts_read
-#define fts_read _ast_fts_read
-#undef fts_set
-#define fts_set _ast_fts_set
-#undef ftw
-#define ftw _ast_ftw
-#undef ftwalk
-#define ftwalk _ast_ftwalk
-#undef ftwflags
-#define ftwflags _ast_ftwflags
-#undef getcwd
-#define getcwd _ast_getcwd
-extern __MANGLE__ char* getcwd __PROTO__((char*, size_t));
-#undef getdate
-#define getdate _ast_getdate
-#undef getopt
-#define getopt _ast_getopt
-#undef getsubopt
-#define getsubopt _ast_getsubopt
-#undef getopt_long
-#define getopt_long _ast_getopt_long
-#undef getopt_long_only
-#define getopt_long_only _ast_getopt_long_only
-#undef optopt
-#define optopt _ast_optopt
-#undef optarg
-#define optarg _ast_optarg
-#undef optind
-#define optind _ast_optind
-#undef opterr
-#define opterr _ast_opterr
-#undef getwd
-#define getwd _ast_getwd
-extern __MANGLE__ char* getwd __PROTO__((char*));
-#undef glob
-#define glob _ast_glob
-#undef globfree
-#define globfree _ast_globfree
-#undef memdup
-#define memdup _ast_memdup
-#undef memfatal
-#define memfatal _ast_memfatal
-#undef memhash
-#define memhash _ast_memhash
-#undef memsum
-#define memsum _ast_memsum
-#undef mkstemp
-#define mkstemp _ast_mkstemp
-extern __MANGLE__ int mkstemp __PROTO__((char*));
-#undef mktemp
-#define mktemp _ast_mktemp
-extern __MANGLE__ char* mktemp __PROTO__((char*));
-#undef mktime
-#define mktime _ast_mktime
-#undef nftw
-#define nftw _ast_nftw
-#undef optctx
-#define optctx _ast_optctx
-#undef optesc
-#define optesc _ast_optesc
-#undef optget
-#define optget _ast_optget
-#undef opthelp
-#define opthelp _ast_opthelp
-#undef optjoin
-#define optjoin _ast_optjoin
-#undef optstr
-#define optstr _ast_optstr
-#undef optusage
-#define optusage _ast_optusage
-#undef pathaccess
-#define pathaccess _ast_pathaccess
-#undef pathbin
-#define pathbin _ast_pathbin
-#undef pathcanon
-#define pathcanon _ast_pathcanon
-#undef pathcat
-#define pathcat _ast_pathcat
-#undef pathcd
-#define pathcd _ast_pathcd
-#undef pathcheck
-#define pathcheck _ast_pathcheck
-#undef pathexists
-#define pathexists _ast_pathexists
-#undef pathfind
-#define pathfind _ast_pathfind
-#undef pathgetlink
-#define pathgetlink _ast_pathgetlink
-#undef pathinclude
-#define pathinclude _ast_pathinclude
-#undef pathkey
-#define pathkey _ast_pathkey
-#undef pathnative
-#define pathnative _ast_pathnative
-#undef pathpath
-#define pathpath _ast_pathpath
-#undef pathposix
-#define pathposix _ast_pathposix
-#undef pathprobe
-#define pathprobe _ast_pathprobe
-#undef pathprog
-#define pathprog _ast_pathprog
-#undef pathrepl
-#define pathrepl _ast_pathrepl
-#undef pathsetlink
-#define pathsetlink _ast_pathsetlink
-#undef pathshell
-#define pathshell _ast_pathshell
-#undef pathstat
-#define pathstat _ast_pathstat
-#undef pathtemp
-#define pathtemp _ast_pathtemp
-#undef pathtmp
-#define pathtmp _ast_pathtmp
-#undef procclose
-#define procclose _ast_procclose
-#undef procfree
-#define procfree _ast_procfree
-#undef procopen
-#define procopen _ast_procopen
-#undef procrun
-#define procrun _ast_procrun
-#undef putenv
-#define putenv _ast_putenv
-#undef re_comp
-#define re_comp _ast_re_comp
-#undef re_exec
-#define re_exec _ast_re_exec
-#undef realpath
-#define realpath _ast_realpath
-extern __MANGLE__ char* realpath __PROTO__((const char*, char*));
-#undef regaddclass
-#define regaddclass _ast_regaddclass
-#undef regalloc
-#define regalloc _ast_regalloc
-#undef regcache
-#define regcache _ast_regcache
-#undef regclass
-#define regclass _ast_regclass
-#undef regcmp
-#define regcmp _ast_regcmp
-#undef regcollate
-#define regcollate _ast_regcollate
-#undef regcomb
-#define regcomb _ast_regcomb
-#undef regcomp
-#define regcomp _ast_regcomp
-#undef regdecomp
-#define regdecomp _ast_regdecomp
-#undef regdup
-#define regdup _ast_regdup
-#undef regerror
-#define regerror _ast_regerror
-#undef regex
-#define regex _ast_regex
-#undef regexec
-#define regexec _ast_regexec
-#undef regfatal
-#define regfatal _ast_regfatal
-#undef regfatalpat
-#define regfatalpat _ast_regfatalpat
-#undef regfree
-#define regfree _ast_regfree
-#undef regncomp
-#define regncomp _ast_regncomp
-#undef regnexec
-#define regnexec _ast_regnexec
-#undef regrecord
-#define regrecord _ast_regrecord
-#undef regrexec
-#define regrexec _ast_regrexec
-#undef regstat
-#define regstat _ast_regstat
-#undef regsub
-#define regsub _ast_regsub
-#undef regsubcomp
-#define regsubcomp _ast_regsubcomp
-#undef regsubexec
-#define regsubexec _ast_regsubexec
-#undef regsubflags
-#define regsubflags _ast_regsubflags
-#undef regsubfree
-#define regsubfree _ast_regsubfree
-#undef remove
-#define remove _ast_remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#undef resolvepath
-#define resolvepath _ast_resolvepath
-extern __MANGLE__ int resolvepath __PROTO__((const char*, char*, size_t));
-#undef setenv
-#define setenv _ast_setenv
-extern __MANGLE__ int setenv __PROTO__((const char*, const char*, int));
-#undef setenviron
-#define setenviron _ast_setenviron
-#undef sigcritical
-#define sigcritical _ast_sigcritical
-#undef signal
-#define signal _ast_signal
-#undef sigunblock
-#define sigunblock _ast_sigunblock
-#undef stracmp
-#define stracmp _ast_stracmp
-#undef strcopy
-#define strcopy _ast_strcopy
-#undef strelapsed
-#define strelapsed _ast_strelapsed
-#undef stresc
-#define stresc _ast_stresc
-#undef streval
-#define streval _ast_streval
-#undef strexpr
-#define strexpr _ast_strexpr
-#undef strftime
-#define strftime _ast_strftime
-#undef strgid
-#define strgid _ast_strgid
-#undef strgrpmatch
-#define strgrpmatch _ast_strgrpmatch
-#undef strhash
-#define strhash _ast_strhash
-#undef strkey
-#define strkey _ast_strkey
-#undef strlcat
-#define strlcat _ast_strlcat
-extern __MANGLE__ size_t strlcat __PROTO__((char*, const char*, size_t));
-#undef strlcpy
-#define strlcpy _ast_strlcpy
-extern __MANGLE__ size_t strlcpy __PROTO__((char*, const char*, size_t));
-#undef strlook
-#define strlook _ast_strlook
-#undef strmatch
-#define strmatch _ast_strmatch
-#undef strmode
-#define strmode _ast_strmode
-#undef strnacmp
-#define strnacmp _ast_strnacmp
-#undef strncopy
-#define strncopy _ast_strncopy
-#undef strntod
-#define strntod _ast_strntod
-#undef strntol
-#define strntol _ast_strntol
-#undef strntold
-#define strntold _ast_strntold
-#undef strntoll
-#define strntoll _ast_strntoll
-#undef strntoul
-#define strntoul _ast_strntoul
-#undef strntoull
-#define strntoull _ast_strntoull
-#undef stropt
-#define stropt _ast_stropt
-#undef strperm
-#define strperm _ast_strperm
-#undef strpsearch
-#define strpsearch _ast_strpsearch
-#undef strptime
-#define strptime _ast_strptime
-#undef strsearch
-#define strsearch _ast_strsearch
-#undef strsort
-#define strsort _ast_strsort
-#undef strsubmatch
-#define strsubmatch _ast_strsubmatch
-#undef strsum
-#define strsum _ast_strsum
-#undef strtape
-#define strtape _ast_strtape
-#undef strtoip4
-#define strtoip4 _ast_strtoip4
-#undef strton
-#define strton _ast_strton
-#undef strtonll
-#define strtonll _ast_strtonll
-#undef struid
-#define struid _ast_struid
-#undef struniq
-#define struniq _ast_struniq
-#undef system
-#define system _ast_system
-extern __MANGLE__ int system __PROTO__((const char*));
-#undef tempnam
-#define tempnam _ast_tempnam
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-#undef tmpnam
-#define tmpnam _ast_tmpnam
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-#undef touch
-#define touch _ast_touch
-#undef wordexp
-#define wordexp _ast_wordexp
-#undef wordfree
-#define wordfree _ast_wordfree
-#undef unsetenv
-#define unsetenv _ast_unsetenv
-
-/* cannot override local malloc */
-#define _map_malloc 1
-#undef calloc
-#define calloc _ast_calloc
-extern __MANGLE__ __V_* calloc __PROTO__((size_t, size_t));
-#undef cfree
-#define cfree _ast_cfree
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-#undef free
-#define free _ast_free
-extern __MANGLE__ void free __PROTO__((__V_*));
-#undef malloc
-#define malloc _ast_malloc
-extern __MANGLE__ __V_* malloc __PROTO__((size_t));
-#undef memalign
-#define memalign _ast_memalign
-extern __MANGLE__ __V_* memalign __PROTO__((size_t, size_t));
-#undef realloc
-#define realloc _ast_realloc
-extern __MANGLE__ __V_* realloc __PROTO__((__V_*, size_t));
-#undef strdup
-#define strdup _ast_strdup
-extern __MANGLE__ char* strdup __PROTO__((const char*));
-#undef valloc
-#define valloc _ast_valloc
-extern __MANGLE__ __V_* valloc __PROTO__((size_t));
-#undef strtol
-#define strtol _ast_strtol
-#undef strtoul
-#define strtoul _ast_strtoul
-#undef strtoll
-#define strtoll _ast_strtoll
-#undef strtoull
-#define strtoull _ast_strtoull
-#undef strtod
-#define strtod _ast_strtod
-#undef strtold
-#define strtold _ast_strtold
-extern __MANGLE__ long strtol __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned long strtoul __PROTO__((const char*, char**, int));
-extern __MANGLE__ double strtod __PROTO__((const char*, char**));
-#if !_UWIN
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
-extern __MANGLE__ _ast_fltmax_t strtold __PROTO__((const char*, char**));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-extern __MANGLE__ _ast_intmax_t strtoll __PROTO__((const char*, char**, int));
-extern __MANGLE__ unsigned _ast_intmax_t strtoull __PROTO__((const char*, char**, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_mmap.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_mmap.h
deleted file mode 100644
index ce7159ef18..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_mmap.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/mmap by iffe version 2009-12-04 : : */
-#ifndef _def_mmap_ast
-#define _def_mmap_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _sys_mman 1 /* #include <sys/mman.h> ok */
-#define _lib_mmap 1 /* standard mmap interface that works */
-#define _lib_mmap64 1 /* mmap64 interface and implementation work */
-#define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
-#define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-#define _mmap_worthy 2 /* mmap is good */
-
-/* some systems get it wrong but escape concise detection */
-#ifndef _NO_MMAP
-#if __CYGWIN__
-#define _NO_MMAP 1
-#endif
-#endif
-
-#if _NO_MMAP
-#undef _lib_mmap
-#undef _lib_mmap64
-#undef _mmap_anon
-#undef _mmap_devzero
-#undef _mmap_worthy
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_mode.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_mode.h
deleted file mode 100644
index a346a1a7f1..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_mode.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/mode.c by iffe version 2009-12-04 : : */
-#ifndef _def_mode_ast
-#define _def_mode_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define S_ITYPE(m) ((m)&S_IFMT)
-
-#define S_IPERM (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-
-#define _S_IDPERM 1
-#define _S_IDTYPE 1
-
-#define BUFFERSIZE 8192
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_namval.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_namval.h
deleted file mode 100644
index 49e777be1d..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_namval.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-#pragma prototyped
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * common name-value struct support
- */
-
-#ifndef _NAMVAL_H
-#define _NAMVAL_H
-
-typedef struct
-{
- char* name;
- int value;
-#ifdef _NAMVAL_PRIVATE_
- _NAMVAL_PRIVATE_
-#endif
-} Namval_t;
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_ndbm.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_ndbm.h
deleted file mode 100644
index 3ede439064..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_ndbm.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/ndbm by iffe version 2009-12-04 : : */
-#ifndef _def_ndbm_ast
-#define _def_ndbm_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_ndbm 1 /* #include <ndbm.h> ok */
-#include <ndbm.h>
-#define _use_ndbm 1
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_nl_types.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_nl_types.h
deleted file mode 100644
index dc0d5feffe..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_nl_types.h
+++ /dev/null
@@ -1,102 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/nl_types by iffe version 2009-12-04 : : */
-
-#ifndef _def_nl_types_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_nl_types_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_catopen 1 /* catopen() in default lib(s) */
-#define _lib_nl_langinfo 1 /* nl_langinfo() in default lib(s) */
-#define _hdr_nl_types 1 /* #include <nl_types.h> ok */
-#define _hdr_langinfo 1 /* #include <langinfo.h> ok */
-#define _nxt_nl_types <../include/nl_types.h> /* include path for the native <nl_types.h> */
-#define _nxt_nl_types_str "../include/nl_types.h" /* include string for the native <nl_types.h> */
-#include <limits.h>
-#include <../include/nl_types.h> /* the native nl_types.h */
-
-#undef NL_SETMAX
-#define NL_SETMAX 1023
-#undef NL_MSGMAX
-#define NL_MSGMAX 32767
-#undef nl_catd
-#define nl_catd _ast_nl_catd
-#undef catopen
-#define catopen _ast_catopen
-#undef catgets
-#define catgets _ast_catgets
-#undef catclose
-#define catclose _ast_catclose
-
-typedef __V_* nl_catd;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ nl_catd catopen __PROTO__((const char*, int));
-extern __MANGLE__ char* catgets __PROTO__((nl_catd, int, int, const char*));
-extern __MANGLE__ int catclose __PROTO__((nl_catd));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_param.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_param.h
deleted file mode 100644
index 5327a11660..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_param.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/param.sh by iffe version 2009-12-04 : : */
-#ifndef _def_param_ast
-#define _def_param_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#include <sys/param.h>
-#ifndef S_IFDIR
-#include <sys/stat.h>
-#endif
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_standards.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_standards.h
deleted file mode 100644
index 7d804a5e06..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_standards.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/standards by iffe version 2009-12-04 : : */
-#ifndef _def_standards_ast
-#define _def_standards_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* __EXTENSIONS__ works */
-#ifndef __EXTENSIONS__
-#define __EXTENSIONS__ 1
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_stdio.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_stdio.h
deleted file mode 100644
index 1da15a034f..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_stdio.h
+++ /dev/null
@@ -1,587 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/stdio by iffe version 2009-12-04 : : */
-
-#ifndef _SFSTDIO_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SFSTDIO_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define __FILE_typedef 1
-#define _FILE_DEFINED 1
-#define _FILE_defined 1
-#define _FILEDEFED 1
-
-#ifndef __FILE_TAG
-#define __FILE_TAG _sfio_s
-#endif
-
-#undef FILE
-#undef _FILE
-#undef fpos_t
-#undef fpos64_t
-
-typedef struct _sfio_s _sfio_FILE;
-
-#define FILE _sfio_FILE
-#define _FILE FILE
-
-#if !defined(__FILE) && !__CYGWIN__
-#undef __FILE
-#define __FILE FILE
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define BUFSIZ SF_BUFSIZE
-
-#else
-
-#ifndef BUFSIZ
-#define BUFSIZ 8192
-#endif
-
-#ifndef EOF
-#define EOF (-1)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#include <ast_std.h>
-
-#include <sfio_s.h>
-
-#if __cplusplus
-#define _sf_(f) (f)
-#else
-#define _sf_(f) ((struct _sfio_s*)(f))
-#endif
-
-#define _SF_EOF 0000200
-#define _SF_ERROR 0000400
-
-#endif
-
-#ifdef _NO_LARGEFILE64_SOURCE
-#undef _LARGEFILE64_SOURCE
-#endif
-
-#ifdef _LARGEFILE64_SOURCE
-#undef off_t
-#endif
-
-#define fpos_t _ast_fpos_t
-#if _typ_int64_t
-#define fpos64_t _ast_fpos_t
-#endif
-
-typedef struct _ast_fpos_s
-{
- intmax_t _sf_offset;
- unsigned char _sf_state[64 - sizeof(intmax_t)];
-} _ast_fpos_t;
-
-#define _base _data
-#define _ptr _next
-#define _IOFBF 0
-#define _IONBF 1
-#define _IOLBF 2
-
-#if defined(__cplusplus) && defined(__THROW) && !defined(_UWIN)
-
-#undef FILE
-#define FILE FILE
-typedef struct _sfio_s FILE;
-
-#undef strerror
-extern __MANGLE__ char* strerror(int) __THROW;
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-extern __MANGLE__ void flockfile __PROTO__((FILE*));
-extern __MANGLE__ int ftrylockfile __PROTO__((FILE*));
-extern __MANGLE__ void funlockfile __PROTO__((FILE*));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#endif
-
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 1024
-#endif
-#ifndef FOPEN_MAX
-#define FOPEN_MAX 20
-#endif
-#ifndef TMP_MAX
-#define TMP_MAX 17576
-#endif
-
-#define _doprnt _ast_doprnt
-#define _doscan _ast_doscan
-#define asprintf _ast_asprintf
-#define clearerr _ast_clearerr
-#define fclose _ast_fclose
-#define fdopen _ast_fdopen
-#define fflush _ast_fflush
-#define fgetc _ast_fgetc
-#define fgetpos _ast_fgetpos
-#define fgetpos64 _ast_fgetpos64
-#define fgets _ast_fgets
-#define fopen _ast_fopen
-#define fprintf _ast_fprintf
-#define fpurge _ast_fpurge
-#define fputs _ast_fputs
-#define fread _ast_fread
-#define freopen _ast_freopen
-#define fscanf _ast_fscanf
-#define fseek _ast_fseek
-#define fseek64 _ast_fseek64
-#define fseeko _ast_fseeko
-#define fseeko64 _ast_fseeko64
-#define fsetpos _ast_fsetpos
-#define fsetpos64 _ast_fsetpos64
-#define ftell _ast_ftell
-#define ftell64 _ast_ftell64
-#define ftello _ast_ftello
-#define ftello64 _ast_ftello64
-#define fwrite _ast_fwrite
-#define gets _ast_gets
-#define getw _ast_getw
-#define pclose _ast_pclose
-#define popen _ast_popen
-#define printf _ast_printf
-#define puts _ast_puts
-#define putw _ast_putw
-#define rewind _ast_rewind
-#define scanf _ast_scanf
-#define setbuf _ast_setbuf
-#undef setbuffer
-#define setbuffer _ast_setbuffer
-#define setlinebuf _ast_setlinebuf
-#define setvbuf _ast_setvbuf
-#define snprintf _ast_snprintf
-#define sprintf _ast_sprintf
-#define sscanf _ast_sscanf
-#define tmpfile _ast_tmpfile
-#define ungetc _ast_ungetc
-#define vasprintf _ast_vasprintf
-#define vfprintf _ast_vfprintf
-#define vfscanf _ast_vfscanf
-#define vprintf _ast_vprintf
-#define vscanf _ast_vscanf
-#define vsnprintf _ast_vsnprintf
-#define vsprintf _ast_vsprintf
-#define vsscanf _ast_vsscanf
-#define fcloseall _ast_fcloseall
-#define _filbuf _ast__filbuf
-#define fmemopen _ast_fmemopen
-#define __getdelim _ast___getdelim
-#define getdelim _ast_getdelim
-#define getline _ast_getline
-#define clearerr_unlocked _ast_clearerr_unlocked
-#define feof_unlocked _ast_feof_unlocked
-#define ferror_unlocked _ast_ferror_unlocked
-#define fflush_unlocked _ast_fflush_unlocked
-#define fgetc_unlocked _ast_fgetc_unlocked
-#define fgets_unlocked _ast_fgets_unlocked
-#define fileno_unlocked _ast_fileno_unlocked
-#define fputc_unlocked _ast_fputc_unlocked
-#define fputs_unlocked _ast_fputs_unlocked
-#define fread_unlocked _ast_fread_unlocked
-#define fwrite_unlocked _ast_fwrite_unlocked
-#define getc_unlocked _ast_getc_unlocked
-#define getchar_unlocked _ast_getchar_unlocked
-#define putc_unlocked _ast_putc_unlocked
-#define putchar_unlocked _ast_putchar_unlocked
-#define flockfile _ast_flockfile
-#define ftrylockfile _ast_ftrylockfile
-#define funlockfile _ast_funlockfile
-
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:initial
-#endif
-#ifndef P_tmpdir
-#define P_tmpdir "/var/tmp/" /*NOCATLITERAL*/
-#endif
-#ifndef L_ctermid
-#define L_ctermid 9
-#endif
-#ifndef L_tmpnam
-#define L_tmpnam 25
-#endif
-#if defined(__STDPP__directive) && defined(__STDPP__initial)
-__STDPP__directive pragma pp:noinitial
-#endif
-#if defined(__cplusplus) && defined(__THROW)
-extern __MANGLE__ char* ctermid(char*) __THROW;
-#else
-extern __MANGLE__ char* ctermid __PROTO__((char*));
-#endif
-extern __MANGLE__ char* tmpnam __PROTO__((char*));
-extern __MANGLE__ char* tempnam __PROTO__((const char*, const char*));
-extern __MANGLE__ void perror __PROTO__((const char*));
-#ifndef _AST_STD_H
-#ifndef remove
-extern __MANGLE__ int remove __PROTO__((const char*));
-#endif
-#ifndef rename
-extern __MANGLE__ int rename __PROTO__((const char*, const char*));
-#endif
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _doprnt __PROTO__((const char*, va_list, FILE*));
-extern __MANGLE__ int _doscan __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int asprintf __PROTO__((char**, const char*, ...));
-extern __MANGLE__ int clearerr __PROTO__((FILE*));
-extern __MANGLE__ int fclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* fdopen __PROTO__((int, const char*));
-extern __MANGLE__ int feof __PROTO__((FILE*));
-extern __MANGLE__ int ferror __PROTO__((FILE*));
-extern __MANGLE__ int fflush __PROTO__((FILE*));
-extern __MANGLE__ int fgetc __PROTO__((FILE*));
-extern __MANGLE__ int fgetpos __PROTO__((FILE*, fpos_t*));
-extern __MANGLE__ char* fgets __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno __PROTO__((FILE*));
-extern __MANGLE__ FILE* fopen __PROTO__((const char*, const char*));
-extern __MANGLE__ int fprintf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fpurge __PROTO__((FILE*));
-extern __MANGLE__ int fputc __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs __PROTO__((const char*, FILE*));
-extern __MANGLE__ size_t fread __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ FILE* freopen __PROTO__((const char*, const char*, FILE*));
-extern __MANGLE__ int fscanf __PROTO__((FILE*, const char*, ...));
-extern __MANGLE__ int fseek __PROTO__((FILE*, long, int));
-extern __MANGLE__ int fseeko __PROTO__((FILE*, off_t, int));
-extern __MANGLE__ int fsetpos __PROTO__((FILE*, const fpos_t*));
-extern __MANGLE__ long ftell __PROTO__((FILE*));
-extern __MANGLE__ off_t ftello __PROTO__((FILE*));
-extern __MANGLE__ size_t fwrite __PROTO__((const __V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc __PROTO__((FILE*));
-extern __MANGLE__ int getchar __PROTO__((void));
-extern __MANGLE__ char* gets __PROTO__((char*));
-extern __MANGLE__ int getw __PROTO__((FILE*));
-extern __MANGLE__ int pclose __PROTO__((FILE*));
-extern __MANGLE__ FILE* popen __PROTO__((const char*, const char*));
-extern __MANGLE__ int printf __PROTO__((const char*, ...));
-extern __MANGLE__ int putc __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar __PROTO__((int));
-extern __MANGLE__ int puts __PROTO__((const char*));
-extern __MANGLE__ int putw __PROTO__((int, FILE*));
-extern __MANGLE__ void rewind __PROTO__((FILE*));
-extern __MANGLE__ int scanf __PROTO__((const char*, ...));
-extern __MANGLE__ void setbuf __PROTO__((FILE*, char*));
-extern __MANGLE__ int setbuffer __PROTO__((FILE*, char*, int));
-extern __MANGLE__ int setlinebuf __PROTO__((FILE*));
-extern __MANGLE__ int setvbuf __PROTO__((FILE*, char*, int, size_t));
-extern __MANGLE__ int snprintf __PROTO__((char*, int, const char*, ...));
-extern __MANGLE__ int sprintf __PROTO__((char*, const char*, ...));
-extern __MANGLE__ int sscanf __PROTO__((const char*, const char*, ...));
-extern __MANGLE__ FILE* tmpfile __PROTO__((void));
-extern __MANGLE__ int ungetc __PROTO__((int, FILE*));
-extern __MANGLE__ int vasprintf __PROTO__((char**, const char*, va_list));
-extern __MANGLE__ int vfprintf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vfscanf __PROTO__((FILE*, const char*, va_list));
-extern __MANGLE__ int vprintf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vscanf __PROTO__((const char*, va_list));
-extern __MANGLE__ int vsnprintf __PROTO__((char*, int, const char*, va_list));
-extern __MANGLE__ int vsprintf __PROTO__((char*, const char*, va_list));
-extern __MANGLE__ int vsscanf __PROTO__((const char*, const char*, va_list));
-
-#if _typ_int64_t
-
-extern __MANGLE__ int fgetpos64 __PROTO__((FILE*, fpos64_t*));
-extern __MANGLE__ int fsetpos64 __PROTO__((FILE*, const fpos64_t*));
-extern __MANGLE__ int fseek64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int fseeko64 __PROTO__((FILE*, int64_t, int));
-extern __MANGLE__ int64_t ftell64 __PROTO__((FILE*));
-extern __MANGLE__ int64_t ftello64 __PROTO__((FILE*));
-
-#ifdef _LARGEFILE64_SOURCE
-
-#undef fpos_t
-#undef off_t
-#undef fgetpos
-#undef fsetpos
-#undef fseek
-#undef fseeko
-#undef ftell
-#undef ftello
-
-#define fpos_t fpos64_t
-#if _typ_off64_t
-#define off_t off64_t
-#else
-#define off_t int64_t
-#endif
-
-#define fgetpos fgetpos64
-#define fsetpos fsetpos64
-#define fseek fseek64
-#define fseeko fseeko64
-#define ftell ftell64
-#define ftello ftello64
-
-#endif
-
-#endif
-
-extern __MANGLE__ void clearerr_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int feof_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int ferror_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fflush_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fgetc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ char* fgets_unlocked __PROTO__((char*, int, FILE*));
-extern __MANGLE__ int fileno_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int fputc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int fputs_unlocked __PROTO__((char*, FILE*));
-extern __MANGLE__ size_t fread_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ size_t fwrite_unlocked __PROTO__((__V_*, size_t, size_t, FILE*));
-extern __MANGLE__ int getc_unlocked __PROTO__((FILE*));
-extern __MANGLE__ int getchar_unlocked __PROTO__((void));
-extern __MANGLE__ int putc_unlocked __PROTO__((int, FILE*));
-extern __MANGLE__ int putchar_unlocked __PROTO__((int));
-
-#ifdef _USE_GNU
-
-extern __MANGLE__ int fcloseall __PROTO__((void));
-extern __MANGLE__ FILE* fmemopen __PROTO__((__V_*, size_t, const char*));
-extern __MANGLE__ ssize_t __getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getdelim __PROTO__((char**, size_t*, int, FILE*));
-extern __MANGLE__ ssize_t getline __PROTO__((char**, size_t*, FILE*));
-
-#endif
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _BLD_DLL && _DLL_INDIRECT_DATA
-
-#define stdin ((FILE*)_ast_dll->_ast_stdin)
-#define stdout ((FILE*)_ast_dll->_ast_stdout)
-#define stderr ((FILE*)_ast_dll->_ast_stderr)
-
-#else
-
-#define stdin (&_Sfstdin)
-#define stdout (&_Sfstdout)
-#define stderr (&_Sfstderr)
-
-#endif
-
-#if defined(_AST_H) || defined(_SFIO_H)
-
-#define feof(f) sfeof(f)
-#define ferror(f) sferror(f)
-#define fileno(f) sffileno(f)
-#define fputc(c,f) sfputc(f,c)
-#define getc(f) sfgetc(f)
-#define getchar() sfgetc(sfstdin)
-#define putc(c,f) sfputc(f,c)
-#define putchar(c) sfputc(sfstdout,c)
-
-#else
-
-#if !_UWIN
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-#endif
-
-extern __MANGLE__ FILE _Sfstdin;
-extern __MANGLE__ FILE _Sfstdout;
-extern __MANGLE__ FILE _Sfstderr;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#define feof(f) (_sf_(f)->_flags&_SF_EOF)
-#define ferror(f) (_sf_(f)->_flags&_SF_ERROR)
-#define fileno(f) (_sf_(f)->_file)
-#define fputc(c,f) (_sf_(f)->_next>=_sf_(f)->_endw?_sfflsbuf(_sf_(f),(int)((unsigned char)(c))):(int)(*_sf_(f)->_next++=(unsigned char)(c)))
-#define getc(f) (_sf_(f)->_next>=_sf_(f)->_endr?_sffilbuf(_sf_(f),0):(int)(*_sf_(f)->_next++))
-#define getchar() getc(stdin)
-#define putc(c,f) fputc(c,f)
-#define putchar(c) fputc(c,stdout)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _sffilbuf __PROTO__((FILE*, int));
-extern __MANGLE__ int _sfflsbuf __PROTO__((FILE*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_sys.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_sys.h
deleted file mode 100644
index 9d631719b7..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_sys.h
+++ /dev/null
@@ -1,150 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/sys by iffe version 2009-12-04 : : */
-
-#ifndef _AST_SYS_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _AST_SYS_H 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#if __mips == 2 && !defined(_NO_LARGEFILE64_SOURCE)
-#define _NO_LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_NO_LARGEFILE64_SOURCE) && _typ_off64_t && _lib_lseek64 && _lib_stat64
-#if !defined(_LARGEFILE64_SOURCE)
-#define _LARGEFILE64_SOURCE 1
-#endif
-#if !defined(_LARGEFILE_SOURCE)
-#define _LARGEFILE_SOURCE 1
-#endif
-#else
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#undef _typ_off64_t
-#undef _typ_struct_dirent64
-#undef _lib_creat64
-#undef _lib_fstat64
-#undef _lib_fstatvfs64
-#undef _lib_ftruncate64
-#undef _lib_lseek64
-#undef _lib_lstat64
-#undef _lib_mmap64
-#undef _lib_open64
-#undef _lib_readdir64
-#undef _lib_stat64
-#undef _lib_statvfs64
-#undef _lib_truncate64
-#endif
-#if defined(__STDC__) && !defined(__USE_FIXED_PROTOTYPES__)
-#define __USE_FIXED_PROTOTYPES__ 1 /* kick gcc out of the past */
-#endif
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <locale.h>
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _typ_dev_t 1 /* dev_t is a type */
-#define _typ_nlink_t 1 /* nlink_t is a type */
-#define _typ_gid_t 1 /* gid_t is a type */
-#define _typ_mode_t 1 /* mode_t is a type */
-#define _typ_uid_t 1 /* uid_t is a type */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _typ_wchar_t 1 /* wchar_t is a type */
-#define _typ_pid_t 1 /* pid_t is a type */
-#define _typ_ssize_t 1 /* ssize_t is a type */
-#define _typ_wint_t 1 /* wint_t is a type */
-#define _sys_socket 1 /* #include <sys/socket.h> ok */
-#define _typ_socklen_t 1 /* socklen_t is a type */
-#define _typ_size_t 1 /* size_t is a type */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_ino_t 1 /* ino_t is a type */
-#define _typ_off_t 1 /* off_t is a type */
-#define _typ_ptrdiff_t 1 /* ptrdiff_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#define _typ_div_t 1 /* div_t is a type */
-#define _typ_ldiv_t 1 /* ldiv_t is a type */
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-extern __MANGLE__ void cfree __PROTO__((__V_*));
-extern __MANGLE__ int eaccess __PROTO__((const char*, int));
-extern __MANGLE__ int execvpe __PROTO__((const char*, char* const[], char* const[]));
-extern __MANGLE__ __V_* pvalloc __PROTO__((size_t));
-extern __MANGLE__ pid_t spawnveg __PROTO__((const char*, char* const[], char* const[], pid_t));
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#if !defined(va_start)
-#if defined(__STDARG__)
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_time.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_time.h
deleted file mode 100644
index 30bbbdca34..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_time.h
+++ /dev/null
@@ -1,83 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/time by iffe version 2009-12-04 : : */
-
-#ifndef _def_time_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_time_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_nanosleep 1 /* nanosleep() in default lib(s) */
-#define _lib_usleep 1 /* usleep() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_clock_t 1 /* clock_t is a type */
-#define _typ_time_t 1 /* time_t is a type */
-#include <sys/time.h>
-
-#include <sys/times.h>
-
-#if !defined(CLOCKS_PER_SEC) && defined(CLK_TCK)
-#define CLOCKS_PER_SEC CLK_TCK
-#endif
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_tty.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_tty.h
deleted file mode 100644
index 98cac27e57..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_tty.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tty by iffe version 2009-12-04 : : */
-#ifndef _def_tty_ast
-#define _def_tty_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_termios 1 /* #include <termios.h> ok */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#define _mac__POSIX_VDISABLE 1 /* _POSIX_VDISABLE is a macro */
-
-#ifdef _hdr_termios
-# if _mac__POSIX_VDISABLE
-# undef _POSIX_VDISABLE
-# endif
-# include <termios.h>
-#else
-# if defined(_sys_termios) && defined(_lib_tcgetattr)
-# include <sys/termios.h>
-# define _hdr_termios 1
-# else
-# undef _sys_termios
-# endif /* _sys_termios */
-#endif /* _hdr_termios */
-
-#ifdef _hdr_termios
-# undef _hdr_sgtty
-# undef tcgetattr
-# undef tcsetattr
-# undef tcgetpgrp
-# undef tcsetpgrp
-# undef cfgetospeed
-# ifndef TCSANOW
-# define TCSANOW TCSETS
-# define TCSADRAIN TCSETSW
-# define TCSAFLUSH TCSETSF
-# endif /* TCSANOW */
- /* The following corrects bugs in some implementations */
-# if defined(TCSADFLUSH) && !defined(TCSAFLUSH)
-# define TCSAFLUSH TCSADFLUSH
-# endif /* TCSADFLUSH */
-# ifndef _lib_tcgetattr
-# undef tcgetattr
-# define tcgetattr(fd,tty) ioctl(fd, TCGETS, tty)
-# undef tcsetattr
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# undef cfgetospeed
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# endif /* _lib_tcgetattr */
-# undef TIOCGETC
-#else
-# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
-# define cfsetispeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# define cfsetospeed(tp,val) ((tp)->c_cflag &=~ CBAUD,(tp)->c_cflag|=(val))
-# ifdef _hdr_termio
-# include <termio.h>
-# else
-# ifdef _sys_termio
-# include <sys/termio.h>
-# define _hdr_termio 1
-# endif /* _sys_termio */
-# endif /* _hdr_termio */
-# ifdef _hdr_termio
-# define termios termio
-# undef TIOCGETC
-# define tcgetattr(fd,tty) ioctl(fd, TCGETA, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-
-# ifdef _sys_bsdtty
-# include <sys/bsdtty.h>
-# endif /* _sys_bsdtty */
-# else
-# ifdef _hdr_sgtty
-# include <sgtty.h>
-# ifndef LPENDIN
-# ifdef _sys_nttyio
-# include <sys/nttyio.h>
-# endif /* _sys_nttyio */
-# endif /* LPENDIN */
-# define termios sgttyb
-# ifdef TIOCSETN
-# undef TCSETAW
-# endif /* TIOCSETN */
-# ifdef TIOCGETP
-# define tcgetattr(fd,tty) ioctl(fd, TIOCGETP, tty)
-# define tcsetattr(fd,action,tty) ioctl(fd, action, tty)
-# else
-# define tcgetattr(fd,tty) gtty(fd, tty)
-# define tcsetattr(fd,action,tty) stty(fd, tty)
-# endif /* TIOCGETP */
-# else
-# ifdef _sys_ttyio
-# include <sys/ttyio.h>
-# endif
-# endif /* _hdr_sgtty */
-# endif /* hdr_termio */
-
-# ifndef TCSANOW
-# ifdef TCSETAW
-# define TCSANOW TCSETA
-# define TCSAFLUSH TCSETAF
-# else
-# ifdef TIOCSETN
-# define TCSANOW TIOCSETN
-# define TCSADRAIN TIOCSETN
-# define TCSAFLUSH TIOCSETP
-# endif /* TIOCSETN */
-# endif /* TCSETAW */
-# endif /* TCSANOW */
-#endif /* _hdr_termios */
-
-/* set ECHOCTL if driver can echo control charaters as ^c */
-#ifdef LCTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LCTLECH
-# endif /* !ECHOCTL */
-#endif /* LCTLECH */
-#ifdef LNEW_CTLECH
-# ifndef ECHOCTL
-# define ECHOCTL LNEW_CTLECH
-# endif /* !ECHOCTL */
-#endif /* LNEW_CTLECH */
-#ifdef LNEW_PENDIN
-# ifndef PENDIN
-# define PENDIN LNEW_PENDIN
-# endif /* !PENDIN */
-#endif /* LNEW_PENDIN */
-
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_vfork.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_vfork.h
deleted file mode 100644
index f375c530f4..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_vfork.h
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/vfork by iffe version 2009-12-04 : : */
-
-#ifndef _def_vfork_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_vfork_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-extern __MANGLE__ pid_t vfork __PROTO__((void));
-#pragma unknown_control_flow(vfork)
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_wait.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_wait.h
deleted file mode 100644
index 9b9cae33cc..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_wait.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/wait by iffe version 2009-12-04 : : */
-#ifndef _def_wait_ast
-#define _def_wait_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _lib_wait 1 /* wait() in default lib(s) */
-#define _lib_wait3 1 /* wait3() in default lib(s) */
-#define _lib_wait4 1 /* wait4() in default lib(s) */
-#define _lib_waitpid 1 /* waitpid() in default lib(s) */
-#define _sys_wait 1 /* #include <sys/wait.h> ok */
-#define _ok_wif 1 /* posix wait macros ok */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_wchar.h b/usr/src/lib/libast/sparcv9/src/lib/libast/ast_wchar.h
deleted file mode 100644
index 3525ac9f82..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/ast_wchar.h
+++ /dev/null
@@ -1,187 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/wchar by iffe version 2009-12-04 : : */
-
-#ifndef _def_wchar_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_wchar_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _hdr_stdio 1 /* #include <stdio.h> ok */
-#define _hdr_wchar 1 /* #include <wchar.h> ok */
-#define _lib_mbstowcs 1 /* mbstowcs() in default lib(s) */
-#define _lib_wctomb 1 /* wctomb() in default lib(s) */
-#define _lib_wcrtomb 1 /* wcrtomb() in default lib(s) */
-#define _lib_wcslen 1 /* wcslen() in default lib(s) */
-#define _lib_wcstombs 1 /* wcstombs() in default lib(s) */
-#define _lib_wcwidth 1 /* wcwidth() in default lib(s) */
-#define _lib_towlower 1 /* towlower() in default lib(s) */
-#define _lib_towupper 1 /* towupper() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _typ_mbstate_t 1 /* mbstate_t is a type */
-#define _nxt_wchar <../include/wchar.h> /* include path for the native <wchar.h> */
-#define _nxt_wchar_str "../include/wchar.h" /* include string for the native <wchar.h> */
-#ifndef _SFSTDIO_H
-#include <ast_common.h>
-#include <stdio.h>
-#endif
-#if _hdr_wchar && defined(_nxt_wchar)
-#include <../include/wchar.h> /* the native wchar.h */
-#endif
-#if _hdr_wctype
-#include <wctype.h>
-#endif
-
-#ifndef WEOF
-#define WEOF (-1)
-#endif
-
-#undef fgetwc
-#undef fgetws
-#undef fputwc
-#undef fputws
-#undef getwc
-#undef getwchar
-#undef getws
-#undef putwc
-#undef putwchar
-#undef ungetwc
-
-#define fgetwc _ast_fgetwc
-#define fgetws _ast_fgetws
-#define fputwc _ast_fputwc
-#define fputws _ast_fputws
-#define fwide _ast_fwide
-#define fwprintf _ast_fwprintf
-#define fwscanf _ast_fwscanf
-#define getwc _ast_getwc
-#define getwchar _ast_getwchar
-#define getws _ast_getws
-#define putwc _ast_putwc
-#define putwchar _ast_putwchar
-#define swprintf _ast_swprintf
-#define swscanf _ast_swscanf
-#define ungetwc _ast_ungetwc
-#define vfwprintf _ast_vfwprintf
-#define vfwscanf _ast_vfwscanf
-#define vswprintf _ast_vswprintf
-#define vswscanf _ast_vswscanf
-#define vwprintf _ast_vwprintf
-#define vwscanf _ast_vwscanf
-#define wprintf _ast_wprintf
-#define wscanf _ast_wscanf
-
-#if !_typ_mbstate_t
-#undef _typ_mbstate_t
-#define _typ_mbstate_t 1
-typedef char mbstate_t;
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_mbstowcs
-extern __MANGLE__ size_t mbstowcs __PROTO__((wchar_t*, const char*, size_t));
-#endif
-#if !_lib_wctomb
-extern __MANGLE__ int wctomb __PROTO__((char*, wchar_t));
-#endif
-#if !_lib_wcrtomb
-extern __MANGLE__ size_t wcrtomb __PROTO__((char*, wchar_t, mbstate_t*));
-#endif
-#if !_lib_wcslen
-extern __MANGLE__ size_t wcslen __PROTO__((const wchar_t*));
-#endif
-#if !_lib_wcstombs
-extern __MANGLE__ size_t wcstombs __PROTO__((char*, const wchar_t*, size_t));
-#endif
-
-extern __MANGLE__ int fwprintf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ int fwscanf __PROTO__((FILE*, const wchar_t*, ...));
-extern __MANGLE__ wint_t fgetwc __PROTO__((FILE*));
-extern __MANGLE__ wchar_t* fgetws __PROTO__((wchar_t*, int, FILE*));
-extern __MANGLE__ wint_t fputwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ int fputws __PROTO__((const wchar_t*, FILE*));
-extern __MANGLE__ int fwide __PROTO__((FILE*, int));
-extern __MANGLE__ wint_t getwc __PROTO__((FILE*));
-extern __MANGLE__ wint_t getwchar __PROTO__((void));
-extern __MANGLE__ wchar_t* getws __PROTO__((wchar_t*));
-extern __MANGLE__ wint_t putwc __PROTO__((wchar_t, FILE*));
-extern __MANGLE__ wint_t putwchar __PROTO__((wchar_t));
-extern __MANGLE__ int swprintf __PROTO__((wchar_t*, size_t, const wchar_t*, ...));
-extern __MANGLE__ int swscanf __PROTO__((const wchar_t*, const wchar_t*, ...));
-extern __MANGLE__ wint_t ungetwc __PROTO__((wint_t, FILE*));
-extern __MANGLE__ int vfwprintf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vfwscanf __PROTO__((FILE*, const wchar_t*, va_list));
-extern __MANGLE__ int vwprintf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vwscanf __PROTO__((const wchar_t*, va_list));
-extern __MANGLE__ int vswprintf __PROTO__((wchar_t*, size_t, const wchar_t*, va_list));
-extern __MANGLE__ int vswscanf __PROTO__((const wchar_t*, const wchar_t*, va_list));
-extern __MANGLE__ int wprintf __PROTO__((const wchar_t*, ...));
-extern __MANGLE__ int wscanf __PROTO__((const wchar_t*, ...));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/lc.h b/usr/src/lib/libast/sparcv9/src/lib/libast/lc.h
deleted file mode 100644
index 65fdab45ab..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/lc.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1985-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* Phong Vo <kpv@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-/* : : generated by ./lcgen : : */
-
-
-#ifndef _LC_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _LC_H 1
-
-#include <ast.h>
-
-#define LC_abbreviated 0x00001
-#define LC_checked 0x00002
-#define LC_debug 0x00004
-#define LC_default 0x00008
-#define LC_defined 0x00010
-#define LC_local 0x00020
-#define LC_primary 0x00040
-#define LC_qualified 0x00080
-#define LC_undefined 0x00100
-#define LC_utf8 0x00200
-#define LC_verbose 0x00400
-#define LC_setlocale 0x10000
-#define LC_setenv 0x20000
-#define LC_user 0x40000
-#define LC_language_attribute_max 2
-#define LC_territory_language_max 4
-
-struct Lc_s;
-
-typedef struct Lc_info_s
-{
- const struct Lc_s* lc;
- unsigned long number;
- __V_* data;
-} Lc_info_t;
-
-typedef struct Lc_attribute_s
-{
- const char* name;
- unsigned long flags;
- unsigned long index;
-} Lc_attribute_t;
-
-typedef struct Lc_charset_s
-{
- const char* code;
- const char* alternates;
- const char* ms;
- unsigned long index;
-} Lc_charset_t;
-
-typedef struct Lc_language_s
-{
- const char* code;
- const char* name;
- const char* alternates;
- const Lc_charset_t* charset;
- unsigned long flags;
- unsigned long index;
- const Lc_attribute_t* attributes[LC_language_attribute_max];
-} Lc_language_t;
-
-typedef struct Lc_territory_s
-{
- const char* code;
- const char* name;
- unsigned long flags;
- unsigned long index;
- const Lc_language_t* languages[LC_territory_language_max];
-#ifdef _LC_TERRITORY_PRIVATE_
- _LC_TERRITORY_PRIVATE_
-#endif
-} Lc_territory_t;
-
-typedef struct Lc_map_s
-{
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_t* attribute;
-} Lc_map_t;
-
-typedef struct Lc_attribute_list_s
-{
- struct Lc_attribute_list_s* next;
- const Lc_attribute_t* attribute;
-} Lc_attribute_list_t;
-
-typedef struct Lc_s
-{
- const char* name;
- const char* code;
- const Lc_language_t* language;
- const Lc_territory_t* territory;
- const Lc_charset_t* charset;
- const Lc_attribute_list_t* attributes;
- unsigned long flags;
- unsigned long index;
-#ifdef _LC_PRIVATE_
- _LC_PRIVATE_
-#endif
-} Lc_t;
-
-struct Lc_category_s;
-
-typedef int (*Lc_category_set_f) __PROTO__((struct Lc_category_s*));
-
-typedef struct Lc_category_s
-{
- const char* name;
- int external;
- int internal;
- Lc_category_set_f setf;
- Lc_t* prev;
- unsigned int flags;
-} Lc_category_t;
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ size_t lccanon __PROTO__((Lc_t*, unsigned long flags, char*, size_t));
-extern __MANGLE__ Lc_category_t* lccategories __PROTO__((void));
-extern __MANGLE__ int lcindex __PROTO__((int, int));
-extern __MANGLE__ Lc_info_t* lcinfo __PROTO__((int));
-extern __MANGLE__ Lc_t* lcmake __PROTO__((const char*));
-extern __MANGLE__ Lc_t* lcscan __PROTO__((Lc_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/preroot.h b/usr/src/lib/libast/sparcv9/src/lib/libast/preroot.h
deleted file mode 100644
index 8c75c546dc..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/preroot.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/preroot.sh by iffe version 2009-12-04 : : */
-#ifndef _def_preroot_ast
-#define _def_preroot_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-/* preroot not enabled */
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/sig.h b/usr/src/lib/libast/sparcv9/src/lib/libast/sig.h
deleted file mode 100644
index a4cb97abc1..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/sig.h
+++ /dev/null
@@ -1,138 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/sig.sh by iffe version 2009-12-04 : : */
-#ifndef _def_sig_ast
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_sig_ast 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-
-#define sig_info _sig_info_
-
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:hide kill killpg
-#else
-#define kill ______kill
-#define killpg ______killpg
-#endif
-#include <signal.h>
-#if defined(__STDPP__directive) && defined(__STDPP__hide)
-__STDPP__directive pragma pp:nohide kill killpg
-#else
-#undef kill
-#undef killpg
-#endif
-#ifndef sigmask
-#define sigmask(s) (1<<((s)-1))
-#endif
-typedef void (*Sig_handler_t) __PROTO__((int));
-
-
-#define Handler_t Sig_handler_t
-
-#define SIG_REG_PENDING (-1)
-#define SIG_REG_POP 0
-#define SIG_REG_EXEC 00001
-#define SIG_REG_PROC 00002
-#define SIG_REG_TERM 00004
-#define SIG_REG_ALL 00777
-#define SIG_REG_SET 01000
-
-typedef struct
-{
- char** name;
- char** text;
- int sigmax;
-} Sig_info_t;
-
-extern __MANGLE__ int kill __PROTO__((pid_t, int));
-extern __MANGLE__ int killpg __PROTO__((pid_t, int));
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-#if !_BLD_ast && defined(__IMPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-#endif
-
-extern __MANGLE__ Sig_info_t sig_info;
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if _lib_sigflag && _npt_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#if !_lib_sigflag
-extern __MANGLE__ int sigflag __PROTO__((int, int, int));
-#endif
-extern __MANGLE__ int sigcritical __PROTO__((int));
-extern __MANGLE__ int sigunblock __PROTO__((int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/tmx.h b/usr/src/lib/libast/sparcv9/src/lib/libast/tmx.h
deleted file mode 100644
index c650c4af02..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/tmx.h
+++ /dev/null
@@ -1,130 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tmx by iffe version 2009-12-04 : : */
-
-#ifndef _TMX_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TMX_H 1
-/*
- * AT&T Research
- *
- * high resolution Time_t support
- */
-
-#include <tm.h>
-#include <tv.h>
-
-#define TMX_MAXDATE "2554-07-21+23:34:33.709551614 UTC"
-#define TMX_MAXYEAR 2554
-#define TMX_MAXSEC ((Time_t)18446744073)
-#define TMX_MAXNSEC 709551614
-#define TMX_RESOLUTION 1000000000
-
-typedef uint64_t Time_t;
-typedef uint64_t Tmxsec_t;
-typedef uint32_t Tmxnsec_t;
-
-#define tmxsec(t) ((Tmxsec_t)((t)/1000000000))
-#define tmxnsec(t) ((Tmxnsec_t)((t)%1000000000))
-#define tmxsns(s,n) (((((Time_t)(s))*1000000000))+((Time_t)(n)))
-
-#define TMX_NOTIME ((Time_t)(-1))
-#define TMX_NOW tmxgettime()
-#define TMX_MAXTIME tmxsns(TMX_MAXSEC,TMX_MAXNSEC)
-
-#define tmx2tv(t,v) ((v)->tv_nsec=tmxnsec(t),(v)->tv_sec=tmxsec(t))
-#define tv2tmx(v) tmxsns((v)->tv_sec,(v)->tv_nsec)
-
-#define tmxclock(p) tmxsns(((p)?*(p):time(NiL)),0)
-
-#define tmxgetatime(s) tmxsns((s)->st_atime,ST_ATIME_NSEC_GET(s))
-#define tmxgetctime(s) tmxsns((s)->st_ctime,ST_CTIME_NSEC_GET(s))
-#define tmxgetmtime(s) tmxsns((s)->st_mtime,ST_MTIME_NSEC_GET(s))
-
-#define tmxsetatime(s,t) ((s)->st_atime=tmxsec(t),ST_ATIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetctime(s,t) ((s)->st_ctime=tmxsec(t),ST_CTIME_NSEC_SET(s,tmxnsec(t)))
-#define tmxsetmtime(s,t) ((s)->st_mtime=tmxsec(t),ST_MTIME_NSEC_SET(s,tmxnsec(t)))
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Time_t tmxdate __PROTO__((const char*, char**, Time_t));
-extern __MANGLE__ Time_t tmxduration __PROTO__((const char*, char**));
-extern __MANGLE__ char* tmxfmt __PROTO__((char*, size_t, const char*, Time_t));
-extern __MANGLE__ Time_t tmxleap __PROTO__((Time_t));
-extern __MANGLE__ Tm_t* tmxmake __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxscan __PROTO__((const char*, char**, const char*, char**, Time_t, long));
-extern __MANGLE__ int tmxsleep __PROTO__((Time_t));
-extern __MANGLE__ Time_t tmxtime __PROTO__((Tm_t*, int));
-extern __MANGLE__ Tm_t* tmxtm __PROTO__((Tm_t*, Time_t, Tm_zone_t*));
-
-extern __MANGLE__ Time_t tmxgettime __PROTO__((void));
-extern __MANGLE__ int tmxsettime __PROTO__((Time_t));
-
-extern __MANGLE__ int tmxtouch __PROTO__((const char*, Time_t, Time_t, Time_t, int));
-
-extern __MANGLE__ char* fmttmx __PROTO__((const char*, Time_t));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libast/sparcv9/src/lib/libast/tv.h b/usr/src/lib/libast/sparcv9/src/lib/libast/tv.h
deleted file mode 100644
index e3959a1378..0000000000
--- a/usr/src/lib/libast/sparcv9/src/lib/libast/tv.h
+++ /dev/null
@@ -1,111 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/tv by iffe version 2009-12-04 : : */
-
-#ifndef _TV_H
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _TV_H 1
-/*
- * AT&T Research
- *
- * high resolution Tv_t interface definitions
- */
-
-#include <ast.h>
-
-#define TV_NSEC_IGNORE (1000000000L)
-#define TV_TOUCH_RETAIN ((Tv_t*)1)
-
-typedef struct Tv_s
-{
- uint32_t tv_sec;
- uint32_t tv_nsec;
-} Tv_t;
-
-#define ST_ATIME_NSEC_GET(st) ((st)->st_atim.tv_nsec)
-#define ST_CTIME_NSEC_GET(st) ((st)->st_ctim.tv_nsec)
-#define ST_MTIME_NSEC_GET(st) ((st)->st_mtim.tv_nsec)
-
-#define ST_ATIME_NSEC_SET(st,n) (ST_ATIME_NSEC_GET(st)=(n))
-#define ST_CTIME_NSEC_SET(st,n) (ST_CTIME_NSEC_GET(st)=(n))
-#define ST_MTIME_NSEC_SET(st,n) (ST_MTIME_NSEC_GET(st)=(n))
-
-#define tvgetatime(t,s) ((t)->tv_nsec=ST_ATIME_NSEC_GET(s),(t)->tv_sec=(s)->st_atime)
-#define tvgetmtime(t,s) ((t)->tv_nsec=ST_MTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_mtime)
-#define tvgetctime(t,s) ((t)->tv_nsec=ST_CTIME_NSEC_GET(s),(t)->tv_sec=(s)->st_ctime)
-
-#define tvsetatime(t,s) (ST_ATIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_atime=(t)->tv_sec)
-#define tvsetmtime(t,s) (ST_MTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_mtime=(t)->tv_sec)
-#define tvsetctime(t,s) (ST_CTIME_NSEC_SET(s,(t)->tv_nsec),(s)->st_ctime=(t)->tv_sec)
-
-#if _BLD_ast && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int tvgettime __PROTO__((Tv_t*));
-extern __MANGLE__ int tvsettime __PROTO__((const Tv_t*));
-extern __MANGLE__ int tvcmp __PROTO__((const Tv_t*, const Tv_t*));
-extern __MANGLE__ int tvtouch __PROTO__((const char*, const Tv_t*, const Tv_t*, const Tv_t*, int));
-extern __MANGLE__ int tvsleep __PROTO__((const Tv_t*, Tv_t*));
-
-extern __MANGLE__ char* fmttv __PROTO__((const char*, Tv_t*));
-
-#endif
diff --git a/usr/src/lib/libcmd/THIRDPARTYLICENSE b/usr/src/lib/libcmd/THIRDPARTYLICENSE
deleted file mode 100644
index 50c6364c06..0000000000
--- a/usr/src/lib/libcmd/THIRDPARTYLICENSE
+++ /dev/null
@@ -1,245 +0,0 @@
-+------------------------------------------------------------------------------+
-| This license covers all software that refers to the URL |
-| http://www.opensource.org/licenses/cpl1.0.txt |
-+------------------------------------------------------------------------------+
-
-Common Public License Version 1.0
-
- THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
- PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
- THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
- 1. DEFINITIONS
-
- "Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and
- documentation distributed under this Agreement, and
-
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from
- and are distributed by that particular Contributor. A Contribution
- 'originates' from a Contributor if it was added to the Program by
- such Contributor itself or anyone acting on such Contributor's
- behalf. Contributions do not include additions to the Program
- which: (i) are separate modules of software distributed in
- conjunction with the Program under their own license agreement, and
- (ii) are not derivative works of the Program.
-
- "Contributor" means any person or entity that distributes the Program.
-
- "Licensed Patents " mean patent claims licensable by a Contributor
- which are necessarily infringed by the use or sale of its Contribution
- alone or when combined with the Program.
-
- "Program" means the Contributions distributed in accordance with this
- Agreement.
-
- "Recipient" means anyone who receives the Program under this
- Agreement, including all Contributors.
-
- 2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free copyright
- license to reproduce, prepare derivative works of, publicly
- display, publicly perform, distribute and sublicense the
- Contribution of such Contributor, if any, and such derivative
- works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free patent
- license under Licensed Patents to make, use, sell, offer to sell,
- import and otherwise transfer the Contribution of such Contributor,
- if any, in source code and object code form. This patent license
- shall apply to the combination of the Contribution and the Program
- if, at the time the Contribution is added by the Contributor, such
- addition of the Contribution causes such combination to be covered
- by the Licensed Patents. The patent license shall not apply to any
- other combinations which include the Contribution. No hardware per
- se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the
- licenses to its Contributions set forth herein, no assurances are
- provided by any Contributor that the Program does not infringe the
- patent or other intellectual property rights of any other entity.
- Each Contributor disclaims any liability to Recipient for claims
- brought by any other entity based on infringement of intellectual
- property rights or otherwise. As a condition to exercising the
- rights and licenses granted hereunder, each Recipient hereby
- assumes sole responsibility to secure any other intellectual
- property rights needed, if any. For example, if a third party
- patent license is required to allow Recipient to distribute the
- Program, it is Recipient's responsibility to acquire that license
- before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has
- sufficient copyright rights in its Contribution, if any, to grant
- the copyright license set forth in this Agreement.
-
- 3. REQUIREMENTS
-
- A Contributor may choose to distribute the Program in object code form
- under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all
- warranties and conditions, express and implied, including
- warranties or conditions of title and non-infringement, and implied
- warranties or conditions of merchantability and fitness for a
- particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all
- liability for damages, including direct, indirect, special,
- incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement
- are offered by that Contributor alone and not by any other party;
- and
-
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software
- exchange.
-
- When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the
- Program.
-
- Contributors may not remove or alter any copyright notices contained
- within the Program.
-
- Each Contributor must identify itself as the originator of its
- Contribution, if any, in a manner that reasonably allows subsequent
- Recipients to identify the originator of the Contribution.
-
- 4. COMMERCIAL DISTRIBUTION
-
- Commercial distributors of software may accept certain
- responsibilities with respect to end users, business partners and the
- like. While this license is intended to facilitate the commercial use
- of the Program, the Contributor who includes the Program in a
- commercial product offering should do so in a manner which does not
- create potential liability for other Contributors. Therefore, if a
- Contributor includes the Program in a commercial product offering,
- such Contributor ("Commercial Contributor") hereby agrees to defend
- and indemnify every other Contributor ("Indemnified Contributor")
- against any losses, damages and costs (collectively "Losses") arising
- from claims, lawsuits and other legal actions brought by a third party
- against the Indemnified Contributor to the extent caused by the acts
- or omissions of such Commercial Contributor in connection with its
- distribution of the Program in a commercial product offering. The
- obligations in this section do not apply to any claims or Losses
- relating to any actual or alleged intellectual property infringement.
- In order to qualify, an Indemnified Contributor must: a) promptly
- notify the Commercial Contributor in writing of such claim, and b)
- allow the Commercial Contributor to control, and cooperate with the
- Commercial Contributor in, the defense and any related settlement
- negotiations. The Indemnified Contributor may participate in any such
- claim at its own expense.
-
- For example, a Contributor might include the Program in a commercial
- product offering, Product X. That Contributor is then a Commercial
- Contributor. If that Commercial Contributor then makes performance
- claims, or offers warranties related to Product X, those performance
- claims and warranties are such Commercial Contributor's responsibility
- alone. Under this section, the Commercial Contributor would have to
- defend claims against the other Contributors related to those
- performance claims and warranties, and if a court requires any other
- Contributor to pay any damages as a result, the Commercial Contributor
- must pay those damages.
-
- 5. NO WARRANTY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
- PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
- WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
- OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
- responsible for determining the appropriateness of using and
- distributing the Program and assumes all risks associated with its
- exercise of rights under this Agreement, including but not limited to
- the risks and costs of program errors, compliance with applicable
- laws, damage to or loss of data, programs or equipment, and
- unavailability or interruption of operations.
-
- 6. DISCLAIMER OF LIABILITY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
- ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
- WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
- DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
- HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 7. GENERAL
-
- If any provision of this Agreement is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability of
- the remainder of the terms of this Agreement, and without further
- action by the parties hereto, such provision shall be reformed to the
- minimum extent necessary to make such provision valid and enforceable.
-
- If Recipient institutes patent litigation against a Contributor with
- respect to a patent applicable to software (including a cross-claim or
- counterclaim in a lawsuit), then any patent licenses granted by that
- Contributor to such Recipient under this Agreement shall terminate as
- of the date such litigation is filed. In addition, if Recipient
- institutes patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Program
- itself (excluding combinations of the Program with other software or
- hardware) infringes such Recipient's patent(s), then such Recipient's
- rights granted under Section 2(b) shall terminate as of the date such
- litigation is filed.
-
- All Recipient's rights under this Agreement shall terminate if it
- fails to comply with any of the material terms or conditions of this
- Agreement and does not cure such failure in a reasonable period of
- time after becoming aware of such noncompliance. If all Recipient's
- rights under this Agreement terminate, Recipient agrees to cease use
- and distribution of the Program as soon as reasonably practicable.
- However, Recipient's obligations under this Agreement and any licenses
- granted by Recipient relating to the Program shall continue and
- survive.
-
- Everyone is permitted to copy and distribute copies of this Agreement,
- but in order to avoid inconsistency the Agreement is copyrighted and
- may only be modified in the following manner. The Agreement Steward
- reserves the right to publish new versions (including revisions) of
- this Agreement from time to time. No one other than the Agreement
- Steward has the right to modify this Agreement. IBM is the initial
- Agreement Steward. IBM may assign the responsibility to serve as the
- Agreement Steward to a suitable separate entity. Each new version of
- the Agreement will be given a distinguishing version number. The
- Program (including Contributions) may always be distributed subject to
- the version of the Agreement under which it was received. In addition,
- after a new version of the Agreement is published, Contributor may
- elect to distribute the Program (including its Contributions) under
- the new version. Except as expressly stated in Sections 2(a) and 2(b)
- above, Recipient receives no rights or licenses to the intellectual
- property of any Contributor under this Agreement, whether expressly,
- by implication, estoppel or otherwise. All rights in the Program not
- expressly granted under this Agreement are reserved.
-
- This Agreement is governed by the laws of the State of New York and
- the intellectual property laws of the United States of America. No
- party to this Agreement will bring a legal action under this Agreement
- more than one year after the cause of action arose. Each party waives
- its rights to a jury trial in any resulting litigation.
-
-Copyright (c) 2004 by the Open Source Initiative
-This is a copy of the license posted on 2004-10-06 at:
- http://www.opensource.org/licenses/cpl
diff --git a/usr/src/lib/libcmd/THIRDPARTYLICENSE.descrip b/usr/src/lib/libcmd/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index 59afe46fa5..0000000000
--- a/usr/src/lib/libcmd/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-AT&T ADVANCED SOFTWARE TECHNOLOGY COMMAND LIBRARY (LIBCMD)
diff --git a/usr/src/lib/libcmd/amd64/include/ast/cmd.h b/usr/src/lib/libcmd/amd64/include/ast/cmd.h
deleted file mode 100644
index e064222a77..0000000000
--- a/usr/src/lib/libcmd/amd64/include/ast/cmd.h
+++ /dev/null
@@ -1,174 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * builtin cmd definitions
- */
-
-#ifndef _CMD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _CMD_H
-
-#include <ast.h>
-#include <error.h>
-#include <stak.h>
-#include <shcmd.h>
-
-#define cmdinit _cmd_init
-
-#define ERROR_CALLBACK ERROR_SET
-
-#if _BLD_cmd && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#include <cmdext.h>
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if defined(CMD_BUILTIN) && !defined(CMD_STANDALONE)
-#define CMD_STANDALONE CMD_BUILTIN
-#endif
-
-#ifdef CMD_STANDALONE
-
-#define CMD_CONTEXT(c) ((Shbltin_t*)0)
-
-#if CMD_DYNAMIC
-
-#include <dlldefs.h>
-
-#else
-
-extern __MANGLE__ int CMD_STANDALONE __PROTO__((int, char**, __V_*));
-
-#endif
-
-#ifndef CMD_BUILTIN
-
-/*
- * command initialization
- */
-
-static int
-cmdinit __PARAM__((int argc, register char** argv, __V_* context, const char* catalog, int flags), (argc, argv, context, catalog, flags)) __OTORP__(int argc; register char** argv; __V_* context; const char* catalog; int flags;){
- register char* cp;
- register char* pp;
-
- if (cp = strrchr(argv[0], '/'))
- cp++;
- else
- cp = argv[0];
- if (pp = strrchr(cp, '_'))
- cp = pp + 1;
- error_info.id = cp;
- if (!error_info.catalog)
- error_info.catalog = (char*)catalog;
- opt_info.index = 0;
- if (context)
- error_info.flags |= flags & ~(ERROR_CALLBACK|ERROR_NOTIFY);
- return 0;
-}
-
-#endif
-
-int
-main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-#if CMD_DYNAMIC
- register char* s;
- register char* t;
- __V_* dll;
- Shbltin_f fun;
- char buf[64];
-
- if (s = strrchr(argv[0], '/'))
- s++;
- else if (!(s = argv[0]))
- return 127;
- if ((t = strrchr(s, '_')) && *++t)
- s = t;
- buf[0] = '_';
- buf[1] = 'b';
- buf[2] = '_';
- strncpy(buf + 3, s, sizeof(buf) - 4);
- buf[sizeof(buf) - 1] = 0;
- if (t = strchr(buf, '.'))
- *t = 0;
- for (;;)
- {
- if (dll = dlopen(NiL, RTLD_LAZY))
- {
- if (fun = (Shbltin_f)dlsym(dll, buf + 1))
- break;
- if (fun = (Shbltin_f)dlsym(dll, buf))
- break;
- }
- if (dll = dllplug(NiL, "cmd", NiL, RTLD_LAZY, NiL, 0))
- {
- if (fun = (Shbltin_f)dlsym(dll, buf + 1))
- break;
- if (fun = (Shbltin_f)dlsym(dll, buf))
- break;
- }
- return 127;
- }
- return (*fun)(argc, argv, NiL);
-#else
- return CMD_STANDALONE(argc, argv, NiL);
-#endif
-}
-
-#else
-
-#undef cmdinit
-#ifdef _MSC_VER
-#define CMD_CONTEXT(p) ((Shbltin_t*)(p))
-#define cmdinit(a,b,c,d,e) do{if(_cmd_init(a,b,c,d,e))return -1;}while(0)
-#else
-#define CMD_CONTEXT(p) (((p)&&((Shbltin_t*)(p))->version>=20071012&&((Shbltin_t*)(p))->version<20350101)?((Shbltin_t*)(p)):0)
-#define cmdinit(a,b,c,d,e) do{if((c)&&!CMD_CONTEXT(c))c=0;if(_cmd_init(a,b,c,d,e))return -1;}while(0)
-#endif
-
-#if _BLD_cmd && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _cmd_init __PROTO__((int, char**, __V_*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libcmd/amd64/include/ast/cmdext.h b/usr/src/lib/libcmd/amd64/include/ast/cmdext.h
deleted file mode 100644
index 978322e2d3..0000000000
--- a/usr/src/lib/libcmd/amd64/include/ast/cmdext.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-extern __MANGLE__ int b_basename __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cat __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chgrp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chmod __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chown __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cksum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cmp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_comm __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cut __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_date __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_dirname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_egrep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_expr __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fds __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fgrep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fmt __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fold __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_getconf __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_grep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_head __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_id __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_join __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_ln __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_logname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_md5sum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mkdir __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mkfifo __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mktemp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mv __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_paste __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_pathchk __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_pids __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rev __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_readlink __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rm __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rmdir __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_stty __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_sum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_sync __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tail __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tee __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tty __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_uname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_uniq __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_vmstate __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_wc __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_xgrep __PROTO__((int, char**, __V_*));
diff --git a/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/symlink b/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/symlink
deleted file mode 100644
index 50a4f770a0..0000000000
--- a/usr/src/lib/libcmd/amd64/src/lib/libcmd/FEATURE/symlink
+++ /dev/null
@@ -1,8 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libcmd/features/symlink by iffe version 2009-12-04 : : */
-#ifndef _def_symlink_cmd
-#define _def_symlink_cmd 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_lchown 1 /* lchown implemented */
-#endif
diff --git a/usr/src/lib/libcmd/common/cmp.c b/usr/src/lib/libcmd/common/cmp.c
deleted file mode 100644
index db3f8de4b4..0000000000
--- a/usr/src/lib/libcmd/common/cmp.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-#pragma prototyped
-/*
- * David Korn
- * Glenn Fowler
- * AT&T Bell Laboratories
- *
- * cmp
- */
-
-static const char usage[] =
-"[-?\n@(#)$Id: cmp (AT&T Research) 2009-01-05 $\n]"
-USAGE_LICENSE
-"[+NAME?cmp - compare two files]"
-"[+DESCRIPTION?\bcmp\b compares two files \afile1\a and \afile2\a. "
- "\bcmp\b writes no output if the files are the same. By default, "
- "if the files differ, the byte and line number at which the "
- "first difference occurred are written to standard output. Bytes "
- "and lines are numbered beginning with 1.]"
-"[+?If \askip1\a or \askip2\a are specified, or the \b-i\b option is "
- "specified, initial bytes of the corresponding file are skipped "
- "before beginning the compare. The skip values are in bytes or "
- "can have a suffix of \bk\b for kilobytes or \bm\b for megabytes.]"
-"[+?If either \afile1\a or \afiles2\a is \b-\b, \bcmp\b "
- "uses standard input starting at the current location.]"
-"[c:print-chars?Writes control characters as a \b^\b followed by a letter of "
- "the alphabet and precede characters that have the high bit set with "
- "\bM-\b as with \bcat\b(1).]"
-"[i:ignore-initial]#[skip:=0?Sets default skip values for the operands "
- "\askip1\a and \askip2\a to \askip\a.]"
-"[l:verbose?Write the decimal byte number and the differing bytes (in octal) "
- "for each difference.]"
-"[s:quiet|silent?Write nothing for differing files; return non-zero "
- "exit status only.] ]"
-"\n"
-"\nfile1 file2 [skip1 [skip2]]\n"
-"\n"
-"[+EXIT STATUS?]{"
- "[+0?The files or portions compared are identical.]"
- "[+1?The files are different.]"
- "[+>1?An error occurred.]"
-"}"
-"[+SEE ALSO?\bcomm\b(1), \bdiff\b(1), \bcat\b(1)]"
-;
-
-
-#include <cmd.h>
-#include <ls.h>
-#include <ctype.h>
-
-#define CMP_VERBOSE 1
-#define CMP_SILENT 2
-#define CMP_CHARS 4
-
-#define cntl(x) (x&037)
-#define printchar(c) ((c) ^ ('A'-cntl('A')))
-
-static void outchar(Sfio_t *out, register int c, int delim)
-{
- if(c&0200)
- {
- sfputc(out,'M');
- sfputc(out,'-');
- c &= ~0200;
- }
- else if(!isprint(c))
- {
- sfputc(out,'^');
- c = printchar(c);
- }
- sfputc(out,c);
- sfputc(out,delim);
-}
-
-/*
- * compare two files
- */
-
-static int
-cmp(const char* file1, Sfio_t* f1, const char* file2, Sfio_t* f2, int flags)
-{
- register int c1;
- register int c2;
- register unsigned char* p1 = 0;
- register unsigned char* p2 = 0;
- register Sfoff_t lines = 1;
- register unsigned char* e1 = 0;
- register unsigned char* e2 = 0;
- Sfoff_t pos = 0;
- int ret = 0;
- unsigned char* last;
-
- for (;;)
- {
- if ((c1 = e1 - p1) <= 0)
- {
- if (!(p1 = (unsigned char*)sfreserve(f1, SF_UNBOUND, 0)) || (c1 = sfvalue(f1)) <= 0)
- {
- if ((e2 - p2) > 0 || sfreserve(f2, SF_UNBOUND, 0) && sfvalue(f2) > 0)
- {
- ret = 1;
- if (!(flags & CMP_SILENT))
- error(ERROR_exit(1), "EOF on %s", file1);
- }
- return(ret);
- }
- e1 = p1 + c1;
- }
- if ((c2 = e2 - p2) <= 0)
- {
- if (!(p2 = (unsigned char*)sfreserve(f2, SF_UNBOUND, 0)) || (c2 = sfvalue(f2)) <= 0)
- {
- if (!(flags & CMP_SILENT))
- error(ERROR_exit(1), "EOF on %s", file2);
- return(1);
- }
- e2 = p2 + c2;
- }
- if (c1 > c2)
- c1 = c2;
- pos += c1;
- if (flags & CMP_SILENT)
- {
- if (memcmp(p1, p2, c1))
- return(1);
- p1 += c1;
- p2 += c1;
- }
- else
- {
- last = p1 + c1;
- while (p1 < last)
- {
- if ((c1 = *p1++) != *p2++)
- {
- if (flags)
- {
- ret = 1;
- if(flags&CMP_CHARS)
- {
- sfprintf(sfstdout, "%6I*d ", sizeof(pos), pos - (last - p1));
- outchar(sfstdout,c1,' ');
- outchar(sfstdout,*(p2-1),'\n');
- }
- else
- sfprintf(sfstdout, "%6I*d %3o %3o\n", sizeof(pos), pos - (last - p1), c1, *(p2 - 1));
- }
- else
- {
- sfprintf(sfstdout, "%s %s differ: char %I*d, line %I*u\n", file1, file2, sizeof(pos), pos - (last - p1), sizeof(lines), lines);
- return(1);
- }
- }
- if (c1 == '\n')
- lines++;
- }
- }
- }
-}
-
-int
-b_cmp(int argc, register char** argv, void* context)
-{
- char* s;
- char* e;
- Sfio_t* f1 = 0;
- Sfio_t* f2 = 0;
- char* file1;
- char* file2;
- int n;
- off_t o1 = 0;
- off_t o2 = 0;
- struct stat s1;
- struct stat s2;
-
- int flags = 0;
-
- NoP(argc);
- cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- while (n = optget(argv, usage)) switch (n)
- {
- case 'l':
- flags |= CMP_VERBOSE;
- break;
- case 's':
- flags |= CMP_SILENT;
- break;
- case 'c':
- flags |= CMP_CHARS;
- break;
- case 'i':
- o1 = o2 = opt_info.num;
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
- break;
- }
- argv += opt_info.index;
- if (error_info.errors || !(file1 = *argv++) || !(file2 = *argv++))
- error(ERROR_usage(2), "%s", optusage(NiL));
- n = 2;
- if (streq(file1, "-"))
- f1 = sfstdin;
- else if (!(f1 = sfopen(NiL, file1, "r")))
- {
- if (!(flags & CMP_SILENT))
- error(ERROR_system(0), "%s: cannot open", file1);
- goto done;
- }
- if (streq(file2, "-"))
- f2 = sfstdin;
- else if (!(f2 = sfopen(NiL, file2, "r")))
- {
- if (!(flags & CMP_SILENT))
- error(ERROR_system(0), "%s: cannot open", file2);
- goto done;
- }
- if (s = *argv++)
- {
- o1 = strtol(s, &e, 0);
- if (*e)
- {
- error(ERROR_exit(0), "%s: %s: invalid skip", file1, s);
- goto done;
- }
- if (s = *argv++)
- {
- o2 = strtol(s, &e, 0);
- if (*e)
- {
- error(ERROR_exit(0), "%s: %s: invalid skip", file2, s);
- goto done;
- }
- }
- if (*argv)
- {
- error(ERROR_usage(0), "%s", optusage(NiL));
- goto done;
- }
- }
- if (o1 && sfseek(f1, o1, SEEK_SET) != o1)
- {
- if (!(flags & CMP_SILENT))
- error(ERROR_exit(0), "EOF on %s", file1);
- n = 1;
- goto done;
- }
- if (o2 && sfseek(f2, o2, SEEK_SET) != o2)
- {
- if (!(flags & CMP_SILENT))
- error(ERROR_exit(0), "EOF on %s", file2);
- n = 1;
- goto done;
- }
- if (fstat(sffileno(f1), &s1))
- error(ERROR_system(0), "%s: cannot stat", file1);
- else if (fstat(sffileno(f2), &s2))
- error(ERROR_system(0), "%s: cannot stat", file1);
- else if (s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev && o1 == o2)
- n = 0;
- else
- n = ((flags & CMP_SILENT) && S_ISREG(s1.st_mode) && S_ISREG(s2.st_mode) && (s1.st_size - o1) != (s2.st_size - o2)) ? 1 : cmp(file1, f1, file2, f2, flags);
- done:
- if (f1 && f1 != sfstdin) sfclose(f1);
- if (f2 && f2 != sfstdin) sfclose(f2);
- return(n);
-}
diff --git a/usr/src/lib/libcmd/common/grep.c b/usr/src/lib/libcmd/common/grep.c
deleted file mode 100644
index 1e857f087c..0000000000
--- a/usr/src/lib/libcmd/common/grep.c
+++ /dev/null
@@ -1,876 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1995-2009 AT&T Knowledge Ventures *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Knowledge Ventures *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* *
-***********************************************************************/
-#pragma prototyped
-
-static const char usage[] =
-"[-?\n@(#)$Id: grep (AT&T Research) 2006-06-14 $\n]"
-USAGE_LICENSE
-"[+NAME?grep - search lines in files for matching patterns]"
-"[+DESCRIPTION?The \bgrep\b commands search the named input files"
-" for lines containing a match for the given \apatterns\a."
-" Matching lines are printed by default. The standard input is searched"
-" if no files are given or when the file \b-\b is specified.]"
-"[+?There are six variants of \bgrep\b, each one using a different form of"
-" \apattern\a, controlled either by option or the command path"
-" base name. Details of each variant may be found in \bregex\b(3).]"
-" {"
-" [+grep?The default basic regular expressions (no alternations.)]"
-" [+egrep?Extended regular expressions (alternations, one or more.)]"
-" [+pgrep?\bperl\b(1) regular expressions (lenient extended.)]"
-" [+xgrep?Augmented regular expressions (conjunction, negation.)]"
-" [+fgrep?Fixed string expressions.]"
-" [+agrep?Approximate regular expressions (not implemented.)]"
-" }"
-"[G:basic-regexp?\bgrep\b mode (default): basic regular expression \apatterns\a.]"
-"[E:extended-regexp?\begrep\b mode: extended regular expression \apatterns\a.]"
-"[X:augmented-regexp?\bxgrep\b mode: augmented regular expression \apatterns\a.]"
-"[P:perl-regexp?\bpgrep\b mode: \bperl\b(1) regular expression \apatterns\a.]"
-"[F:fixed-string?\bfgrep\b mode: fixed string \apatterns\a.]"
-"[A:approximate-regexp?\bagrep\b mode: approximate regular expression \apatterns\a (not implemented.)]"
-
-"[C:context?Set the matched line context \abefore\a and \aafter\a count."
-" By default only matched lines are printed.]:?"
-" [before[,after]]:=2,2]"
-"[c:count?Only print a matching line count for each file.]"
-"[e:expression|pattern|regexp?Specify a matching \apattern\a. More than one"
-" \apattern\a implies alternation. If this option is specified"
-" then the command line \apattern\a must be omitted.]:"
-" [pattern]"
-"[f:file?Each line in \apattern-file\a is a \apattern\a, placed into a single"
-" alternating expression.]:"
-" [pattern-file]"
-"[H:filename|with-filename?Prefix each matched line with the containing file name.]"
-"[h:no-filename?Suppress containing file name prefix for each matched line.]"
-"[i:ignore-case?Ignore case when matching.]"
-"[l:files-with-matches?Only print file names with at least one match.]"
-"[L:files-without-matches?Only print file names with no matches.]"
-"[b:highlight?Highlight matches using the ansi terminal bold sequence.]"
-"[v:invert-match|revert-match?Invert the \apattern\a match sense.]"
-"[m:label?All patterns must be of the form \alabel\a:\apattern\a. Match and"
-" count output will be prefixed by the corresponding \alabel\a:.]"
-"[O:lenient?Enable lenient \apattern\a interpretation. This is the default.]"
-"[x:line-match|line-regexp?Force \apatterns\a to match complete lines.]"
-"[n:number|line-number?Prefix each matched line with its line number.]"
-"[N:name?Set the standard input file name prefix to"
-" \aname\a.]:[name:=empty]"
-"[q:quiet|silent?Do not print matching lines.]"
-"[S:strict?Enable strict \apattern\a interpretation with diagnostics.]"
-"[s:suppress|no-messages?Suppress error and warning messages.]"
-"[t:total?Only print a single matching line count for all files.]"
-"[T:test?Enable implementation specific tests.]:"
-" [test]"
-"[w:word-match|word-regexp?Force \apatterns\a to match complete words.]"
-"[a?Ignored for GNU compatibility.]"
-"\n"
-"\n[ pattern ] [ file ... ]\n"
-"\n"
-"[+DIAGNOSTICS?Exit status 0 if matches were found, 1 if no matches were found,"
-" where \b-v\b invertes the exit status. Exit status 2 for other"
-" errors that are accompanied by a message on the standard error.]"
-"[+SEE ALSO?\bed\b(1), \bsed\b(1), \bperl\b(1), \bregex\b(3)]"
-"[+CAVEATS?Some expressions of necessity require exponential space"
-" and/or time.]"
-"[+BUGS?Some expressions may use sub-optimal algorithms. For example,"
-" don't use this implementation to compute primes.]"
-;
-
-#include <ast.h>
-#include <ctype.h>
-#include <ccode.h>
-#include <error.h>
-#include <regex.h>
-
-#ifndef EISDIR
-#define EISDIR (-1)
-#endif
-
-/*
- * snarfed from Doug McElroy's C++ version
- *
- * this grep is based on the Posix re package.
- * unfortunately it has to have a nonstandard interface.
- * 1. fgrep does not have usual operators. REG_LITERAL
- * caters for this.
- * 2. grep allows null expressions, hence REG_NULL.
- * 3. it may be possible to combine the multiple
- * patterns of grep into single patterns. important
- * special cases are handled by regcomb().
- * 4. anchoring by -x has to be done separately from
- * compilation (remember that fgrep has no ^ or $ operator),
- * hence REG_LEFT|REG_RIGHT. (An honest, but slow alternative:
- * run regexec with REG_NOSUB off and nmatch=1 and check
- * whether the match is full length)
- */
-
-typedef struct Item_s /* list item - sue me for waste */
-{
- struct Item_s* next; /* next in list */
- regex_t re; /* compiled re */
- Sfulong_t hits; /* labeled pattern matches */
- Sfulong_t total; /* total hits */
- char string[1]; /* string value */
-} Item_t;
-
-typedef struct List_s /* generic list */
-{
- Item_t* head; /* list head */
- Item_t* tail; /* list tail */
-} List_t;
-
-typedef struct State_s /* program state */
-{
- struct
- {
- char* base; /* sfsetbuf buffer */
- size_t size; /* sfsetbuf size */
- int noshare; /* turn off SF_SHARE */
- } buffer;
-
- List_t file; /* pattern file list */
- List_t pattern; /* pattern list */
- List_t re; /* re list */
-
- regmatch_t posvec[1]; /* match position vector */
- regmatch_t* pos; /* match position pointer */
- int posnum; /* number of match positions */
-
- int any; /* if any pattern hit */
- int list; /* list files with hits */
- int notfound; /* some input file not found */
- int options; /* regex options */
-
- Sfulong_t hits; /* total matched pattern count */
-
- unsigned char byline; /* multiple pattern line by line*/
- unsigned char count; /* count number of hits */
- unsigned char label; /* all patterns labeled */
- unsigned char match; /* match sense */
- unsigned char query; /* return status but no output */
- unsigned char number; /* line numbers */
- unsigned char prefix; /* print file prefix */
- unsigned char suppress; /* no unopenable file messages */
- unsigned char words; /* word matches only */
-} State_s;
-
-static void
-addre(State_s *state, List_t* p, char* s)
-{
- int c;
- char* b;
- Item_t* x;
- Sfio_t* t;
-
- b = s;
- if (state->label)
- {
- if (!(s = strchr(s, ':')))
- error(3, "%s: label:pattern expected", b);
- c = s - b;
- s++;
- }
- else
- c = 0;
- if (!(x = newof(0, Item_t, 1, c)))
- error(ERROR_SYSTEM|3, "out of space (pattern `%s')", b);
- if (c)
- memcpy(x->string, b, c);
- if (state->words)
- {
- if (!(t = sfstropen()))
- error(ERROR_SYSTEM|3, "out of space (word pattern `%s')", s);
- if (!(state->options & REG_AUGMENTED))
- sfputc(t, '\\');
- sfputc(t, '<');
- sfputr(t, s, -1);
- if (!(state->options & REG_AUGMENTED))
- sfputc(t, '\\');
- sfputc(t, '>');
- if (!(s = sfstruse(t)))
- error(ERROR_SYSTEM|3, "out of space");
- }
- else
- t = 0;
- if (c = regcomp(&x->re, s, state->options|REG_MULTIPLE))
- regfatal(&x->re, 3, c);
- if (t)
- sfstrclose(t);
- if (!p->head)
- {
- p->head = p->tail = x;
- if (state->number || !regrecord(&x->re))
- state->byline = 1;
- }
- else if (state->label || regcomb(&p->tail->re, &x->re))
- {
- p->tail = p->tail->next = x;
- if (!state->byline && (state->number || !state->label || !regrecord(&x->re)))
- state->byline = 1;
- }
- else
- free(x);
-}
-
-static void
-addstring(State_s *state, List_t* p, char* s)
-{
- Item_t* x;
-
- if (!(x = newof(0, Item_t, 1, strlen(s))))
- error(ERROR_SYSTEM|3, "out of space (string `%s')", s);
- strcpy(x->string, s);
- if (p->head)
- p->tail->next = x;
- else
- p->head = x;
- p->tail = x;
-}
-
-static void
-compile(State_s *state)
-{
- int line;
- size_t n;
- char* s;
- char* t;
- char* file;
- Item_t* x;
- Sfio_t* f;
-
- for (x = state->pattern.head; x; x = x->next)
- addre(state, &state->re, x->string);
- for (x = state->file.head; x; x = x->next)
- {
- s = x->string;
- if (!(f = sfopen(NiL, s, "r")))
- error(ERROR_SYSTEM|4, "%s: cannot open", s);
- else
- {
- file = error_info.file;
- error_info.file = s;
- line = error_info.line;
- error_info.line = 0;
- while (s = (char*)sfreserve(f, SF_UNBOUND, SF_LOCKR))
- {
- if (!(n = sfvalue(f)))
- break;
- if (s[n - 1] != '\n')
- {
- for (t = s + n; t > s && *--t != '\n'; t--);
- if (t == s)
- {
- sfread(f, s, 0);
- break;
- }
- n = t - s + 1;
- }
- s[n - 1] = 0;
- addre(state, &state->re, s);
- s[n - 1] = '\n';
- sfread(f, s, n);
- }
- while ((s = sfgetr(f, '\n', 1)) || (s = sfgetr(f, '\n', -1)))
- {
- error_info.line++;
- addre(state, &state->re, s);
- }
- error_info.file = file;
- error_info.line = line;
- sfclose(f);
- }
- }
- if (!state->re.head)
- error(3, "no pattern");
-}
-
-static void
-highlight(Sfio_t* sp, const char* s, int n, int so, int eo)
-{
- static const char bold[] = {CC_esc,'[','1','m'};
- static const char normal[] = {CC_esc,'[','0','m'};
-
- sfwrite(sp, s, so);
- sfwrite(sp, bold, sizeof(bold));
- sfwrite(sp, s + so, eo - so);
- sfwrite(sp, normal, sizeof(normal));
- sfwrite(sp, s + eo, n - eo);
-}
-
-typedef struct
-{
- State_s *state;
- Item_t *item;
-} record_handle;
-
-static int
-record(void* handle, const char* s, size_t len)
-{
- record_handle *r_x = (record_handle *)handle;
- State_s *state = r_x->state;
- Item_t *item = r_x->item;
-
- item->hits++;
- if (state->query || state->list)
- return -1;
- if (!state->count)
- {
- if (state->prefix)
- sfprintf(sfstdout, "%s:", error_info.file);
- if (state->label)
- sfprintf(sfstdout, "%s:", item->string);
- if (state->pos)
- highlight(sfstdout, s, len + 1, state->pos[0].rm_so, state->pos[0].rm_eo);
- else
- sfwrite(sfstdout, s, len + 1);
- }
- return 0;
-}
-
-static void
-execute(State_s *state, Sfio_t* input, char* name)
-{
- register char* s;
- char* file;
- Item_t* x;
- size_t len;
- int result;
- int line;
-
- Sfulong_t hits = 0;
-
- if (state->buffer.noshare)
- sfset(input, SF_SHARE, 0);
- if (state->buffer.size)
- sfsetbuf(input, state->buffer.base, state->buffer.size);
- if (!name)
- name = "/dev/stdin";
- file = error_info.file;
- error_info.file = name;
- line = error_info.line;
- error_info.line = 0;
- if (state->byline)
- {
- for (;;)
- {
- error_info.line++;
- if (s = sfgetr(input, '\n', 0))
- len = sfvalue(input) - 1;
- else if (s = sfgetr(input, '\n', -1))
- {
- len = sfvalue(input);
- s[len] = '\n';
-#if _you_like_the_noise
- error(1, "newline appended");
-#endif
- }
- else
- {
- if (sferror(input) && errno != EISDIR)
- error(ERROR_SYSTEM|2, "read error");
- break;
- }
- x = state->re.head;
- do
- {
- if (!(result = regnexec(&x->re, s, len, state->posnum, state->pos, 0)))
- {
- if (!state->label)
- break;
- x->hits++;
- if (state->query || state->list)
- goto done;
- if (!state->count)
- {
- if (state->prefix)
- sfprintf(sfstdout, "%s:", name);
- if (state->number)
- sfprintf(sfstdout, "%d:", error_info.line);
- sfprintf(sfstdout, "%s:", x->string);
- if (state->pos)
- highlight(sfstdout, s, len + 1, state->pos[0].rm_so, state->pos[0].rm_eo);
- else
- sfwrite(sfstdout, s, len + 1);
- }
- }
- else if (result != REG_NOMATCH)
- regfatal(&x->re, 3, result);
- } while (x = x->next);
- if (!state->label && (x != 0) == state->match)
- {
- hits++;
- if (state->query || state->list)
- break;
- if (!state->count)
- {
- if (state->prefix)
- sfprintf(sfstdout, "%s:", name);
- if (state->number)
- sfprintf(sfstdout, "%d:", error_info.line);
- if (state->pos)
- highlight(sfstdout, s, len + 1, state->pos[0].rm_so, state->pos[0].rm_eo);
- else
- sfwrite(sfstdout, s, len + 1);
- }
- }
- }
- }
- else
- {
- register char* e;
- register char* t;
- char* r;
-
- static char* span = 0;
- static size_t spansize = 0;
-
- s = e = 0;
- for (;;)
- {
- if (s < e)
- {
- t = span;
- for (;;)
- {
- len = 2 * (e - s) + t - span + 1;
- len = roundof(len, SF_BUFSIZE);
- if (spansize < len)
- {
- spansize = len;
- len = t - span;
- if (!(span = newof(span, char, spansize, 0)))
- error(ERROR_SYSTEM|3, "%s: line longer than %lu characters", name, len + e - s);
- t = span + len;
- }
- len = e - s;
- memcpy(t, s, len);
- t += len;
- if (!(s = sfreserve(input, SF_UNBOUND, 0)) || (len = sfvalue(input)) <= 0)
- {
- if ((sfvalue(input) || sferror(input)) && errno != EISDIR)
- error(ERROR_SYSTEM|2, "%s: read error", name);
- break;
- }
- else if (!(e = memchr(s, '\n', len)))
- e = s + len;
- else
- {
- r = s + len;
- len = (e - s) + t - span;
- len = roundof(len, SF_BUFSIZE);
- if (spansize < len)
- {
- spansize = len;
- len = t - span;
- if (!(span = newof(span, char, spansize, 0)))
- error(ERROR_SYSTEM|3, "%s: line longer than %lu characters", name, len + e - s);
- t = span + len;
- }
- len = e - s;
- memcpy(t, s, len);
- t += len;
- s += len + 1;
- e = r;
- break;
- }
- }
- *t = '\n';
- x = state->re.head;
- do
- {
- record_handle r_x = { state, x };
- if ((result = regrexec(&x->re, span, t - span, state->posnum, state->pos, state->options, '\n', (void*)&r_x, record)) < 0)
- goto done;
- if (result && result != REG_NOMATCH)
- regfatal(&x->re, 3, result);
- } while (x = x->next);
- if (!s)
- break;
- }
- else
- {
- if (!(s = sfreserve(input, SF_UNBOUND, 0)))
- {
- if ((sfvalue(input) || sferror(input)) && errno != EISDIR)
- error(ERROR_SYSTEM|2, "%s: read error", name);
- break;
- }
- if ((len = sfvalue(input)) <= 0)
- break;
- e = s + len;
- }
- t = e;
- while (t > s)
- if (*--t == '\n')
- {
- x = state->re.head;
- do
- {
- record_handle r_x = { state, x };
- if ((result = regrexec(&x->re, s, t - s, state->posnum, state->pos, state->options, '\n', (void*)&r_x, record)) < 0)
- goto done;
- if (result && result != REG_NOMATCH)
- regfatal(&x->re, 3, result);
- } while (x = x->next);
- s = t + 1;
- break;
- }
- }
- }
- done:
- error_info.file = file;
- error_info.line = line;
- if (state->byline && !state->label)
- {
- if (hits && state->list >= 0)
- state->any = 1;
- if (!state->query)
- {
- if (!state->list)
- {
- if (state->count)
- {
- if (state->count & 2)
- state->hits += hits;
- else
- {
- if (state->prefix)
- sfprintf(sfstdout, "%s:", name);
- sfprintf(sfstdout, "%I*u\n", sizeof(hits), hits);
- }
- }
- }
- else if ((hits != 0) == (state->list > 0))
- {
- if (state->list < 0)
- state->any = 1;
- sfprintf(sfstdout, "%s\n", name);
- }
- }
- }
- else
- {
- x = state->re.head;
- do
- {
- if (x->hits && state->list >= 0)
- {
- state->any = 1;
- if (state->query)
- break;
- }
- if (!state->query)
- {
- if (!state->list)
- {
- if (state->count)
- {
- if (state->count & 2)
- {
- x->total += x->hits;
- state->hits += x->hits;
- }
- else
- {
- if (state->prefix)
- sfprintf(sfstdout, "%s:", name);
- if (state->label)
- sfprintf(sfstdout, "%s:", x->string);
- sfprintf(sfstdout, "%I*u\n", sizeof(x->hits), x->hits);
- }
- }
- }
- else if ((x->hits != 0) == (state->list > 0))
- {
- if (state->list < 0)
- state->any = 1;
- if (state->label)
- sfprintf(sfstdout, "%s:%s\n", name, x->string);
- else
- sfprintf(sfstdout, "%s\n", name);
- }
- }
- x->hits = 0;
- } while (x = x->next);
- }
-}
-
-
-static
-int grep_main(int argc, char** argv, void *context)
-{
- int c;
- char* s;
- char* h;
- Sfio_t* f;
- State_s state;
- memset(&state, 0, sizeof(state));
-
- NoP(argc);
- state.match = 1;
- state.options = REG_FIRST|REG_NOSUB|REG_NULL;
- h = 0;
- if (strcmp(astconf("CONFORMANCE", NiL, NiL), "standard"))
- state.options |= REG_LENIENT;
- if (s = strrchr(argv[0], '/'))
- s++;
- else
- s = argv[0];
- switch (*s)
- {
- case 'e':
- case 'E':
- s = "egrep";
- state.options |= REG_EXTENDED;
- break;
- case 'f':
- case 'F':
- s = "fgrep";
- state.options |= REG_LITERAL;
- break;
- case 'p':
- case 'P':
- s = "pgrep";
- state.options |= REG_EXTENDED|REG_LENIENT;
- break;
- case 'x':
- case 'X':
- s = "xgrep";
- state.options |= REG_AUGMENTED;
- break;
- default:
- s = "grep";
- break;
- }
- error_info.id = s;
- while (c = optget(argv, usage))
- switch (c)
- {
- case 'E':
- state.options |= REG_EXTENDED;
- break;
- case 'F':
- state.options |= REG_LITERAL;
- break;
- case 'G':
- state.options &= ~(REG_AUGMENTED|REG_EXTENDED);
- break;
- case 'H':
- state.prefix = opt_info.num;
- break;
- case 'L':
- state.list = -opt_info.num;
- break;
- case 'N':
- h = opt_info.arg;
- break;
- case 'O':
- state.options |= REG_LENIENT;
- break;
- case 'P':
- state.options |= REG_EXTENDED|REG_LENIENT;
- break;
- case 'S':
- state.options &= ~REG_LENIENT;
- break;
- case 'T':
- s = opt_info.arg;
- switch (*s)
- {
- case 'b':
- case 'm':
- c = *s++;
- state.buffer.size = strton(s, &s, NiL, 1);
- if (c == 'b' && !(state.buffer.base = newof(0, char, state.buffer.size, 0)))
- error(ERROR_SYSTEM|3, "out of space [test buffer]");
- if (*s)
- error(3, "%s: invalid characters after test", s);
- break;
- case 'f':
- state.options |= REG_FIRST;
- break;
- case 'l':
- state.options |= REG_LEFT;
- break;
- case 'n':
- state.buffer.noshare = 1;
- break;
- case 'r':
- state.options |= REG_RIGHT;
- break;
- default:
- error(3, "%s: unknown test", s);
- break;
- }
- break;
- case 'X':
- state.options |= REG_AUGMENTED;
- break;
- case 'a':
- break;
- case 'b':
- state.options &= ~(REG_FIRST|REG_NOSUB);
- break;
- case 'c':
- state.count |= 1;
- break;
- case 'e':
- addstring(&state, &state.pattern, opt_info.arg);
- break;
- case 'f':
- addstring(&state, &state.file, opt_info.arg);
- break;
- case 'h':
- state.prefix = 2;
- break;
- case 'i':
- state.options |= REG_ICASE;
- break;
- case 'l':
- state.list = opt_info.num;
- break;
- case 'm':
- state.label = 1;
- break;
- case 'n':
- state.number = 1;
- break;
- case 'q':
- state.query = 1;
- break;
- case 's':
- state.suppress = opt_info.num;
- break;
- case 't':
- state.count |= 2;
- break;
- case 'v':
- if (state.match = !opt_info.num)
- state.options &= ~REG_INVERT;
- else
- state.options |= REG_INVERT;
- break;
- case 'w':
- state.words = 1;
- break;
- case 'x':
- state.options |= REG_LEFT|REG_RIGHT;
- break;
- case '?':
- error(ERROR_USAGE|4, "%s", opt_info.arg);
- break;
- case ':':
- error(2, "%s", opt_info.arg);
- break;
- default:
- error(3, "%s: not implemented", opt_info.name);
- break;
- }
- argv += opt_info.index;
- if ((state.options & REG_LITERAL) && (state.options & (REG_AUGMENTED|REG_EXTENDED)))
- error(3, "-F and -A or -P or -X are incompatible");
- if ((state.options & REG_LITERAL) && state.words)
- error(ERROR_SYSTEM|3, "-F and -w are incompatible");
- if (!state.file.head && !state.pattern.head)
- {
- if (!argv[0])
- error(3, "no pattern");
- addstring(&state, &state.pattern, *argv++);
- }
- if (!(state.options & (REG_FIRST|REG_NOSUB)))
- {
- if (state.count || state.list || state.query || (state.options & REG_INVERT))
- state.options |= REG_FIRST|REG_NOSUB;
- else
- {
- state.pos = state.posvec;
- state.posnum = elementsof(state.posvec);
- }
- }
- compile(&state);
- if (!argv[0])
- {
- state.prefix = h ? 1 : 0;
- execute(&state, sfstdin, h);
- }
- else
- {
- if (state.prefix > 1)
- state.prefix = 0;
- else if (argv[1])
- state.prefix = 1;
- while (s = *argv++)
- {
- if (f = sfopen(NiL, s, "r"))
- {
- execute(&state, f, s);
- sfclose(f);
- if (state.query && state.any)
- break;
- }
- else
- {
- state.notfound = 1;
- if (!state.suppress)
- error(ERROR_SYSTEM|2, "%s: cannot open", s);
- }
- }
- }
- if ((state.count & 2) && !state.query && !state.list)
- {
- if (state.label)
- {
- Item_t* x;
-
- x = state.re.head;
- do
- {
- sfprintf(sfstdout, "%s:%I*u\n", x->string, sizeof(x->total), x->total);
- } while (x = x->next);
- }
- else
- sfprintf(sfstdout, "%I*u\n", sizeof(state.hits), state.hits);
- }
- return (state.notfound && !state.query) ? 2 : !state.any;
-}
-
-
-int b_egrep(int argc, char** argv, void *context)
-{
- return grep_main(argc, argv, context);
-}
-
-int b_grep(int argc, char** argv, void *context)
-{
- return grep_main(argc, argv, context);
-}
-
-int b_fgrep(int argc, char** argv, void *context)
-{
- return grep_main(argc, argv, context);
-}
-
-int b_pgrep(int argc, char** argv, void *context)
-{
- return grep_main(argc, argv, context);
-}
-
-int b_xgrep(int argc, char** argv, void *context)
-{
- return grep_main(argc, argv, context);
-}
diff --git a/usr/src/lib/libcmd/common/readlink.c b/usr/src/lib/libcmd/common/readlink.c
deleted file mode 100644
index 4fc6fcc666..0000000000
--- a/usr/src/lib/libcmd/common/readlink.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2007 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-#pragma prototyped
-
-static const char usage[] =
-"[-?\n@(#)$Id: readlink (AT&T Research) 2008-06-08 $\n]"
-USAGE_LICENSE
-"[+NAME?readlink - read the contents of a symbolic link]"
-"[+DESCRIPTION?\breadlink\b returns the contents of the symbolic "
- "link referred to by the path argument. Unless the \b-f\b "
- "option is specified an error will be returned when the path "
- "is not a symbolic link.]"
-"[f:canonicalize?The returned value will be an absolute pathname that names "
- "the same file, whose resolution does not involve \".\", \"..\", or "
- "symbolic links, otherwise only the exact (relative) value will be returned.]"
-"[n:no-newline?Supress newline at the end.]"
-"[v:verbose?Verbose - print errors.]"
-"[+SEE ALSO?\bbasename\b(1),\bdirname\b(2),\breadlink\b(2),\breadpath\n(2)]"
-;
-
-#include <cmd.h>
-
-int
-b_readlink(int argc, char** argv, void* context)
-{
- register char* s;
- register int i;
- register char* m;
- register char* x;
- int canonicalize = 0,
- nonewline = 0,
- verbose = 0;
- char buf[PATH_MAX+2];
- int len = 0;
- char *filename,
- *resolvedname = NULL;
-
- cmdinit(argc, argv, context, ERROR_CATALOG, 0);
- for (;;)
- {
- switch (optget(argv, usage))
- {
- case 'f':
- canonicalize = opt_info.num;
- continue;
- case 'n':
- nonewline = opt_info.num;
- continue;
- case 'v':
- verbose = opt_info.num;
- continue;
- case '?':
- error(ERROR_usage(2), "%s", opt_info.arg);
- continue;
- case ':':
- error(2, "%s", opt_info.arg);
- continue;
- }
- break;
- }
- argv += opt_info.index;
- argc -= opt_info.index;
- if(error_info.errors || argc != 1)
- error(ERROR_usage(2),"%s", optusage(NiL));
- filename = argv[0];
-
- if (canonicalize)
- {
- len = resolvepath(filename, buf, sizeof(buf)-2);
- }
- else
- {
- len = readlink(filename, buf, sizeof(buf)-2);
- }
-
- if (len != -1)
- resolvedname = buf;
-
- if (!resolvedname)
- {
- if (verbose)
- error(ERROR_system(1),"%s: readlink failed", filename);
- else
- return 1;
- }
-
- if (!nonewline)
- resolvedname[len++] = '\n';
-
- sfwrite(sfstdout, resolvedname, len);
-
- return 0;
-}
diff --git a/usr/src/lib/libcmd/i386/include/ast/cmd.h b/usr/src/lib/libcmd/i386/include/ast/cmd.h
deleted file mode 100644
index e064222a77..0000000000
--- a/usr/src/lib/libcmd/i386/include/ast/cmd.h
+++ /dev/null
@@ -1,174 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * builtin cmd definitions
- */
-
-#ifndef _CMD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _CMD_H
-
-#include <ast.h>
-#include <error.h>
-#include <stak.h>
-#include <shcmd.h>
-
-#define cmdinit _cmd_init
-
-#define ERROR_CALLBACK ERROR_SET
-
-#if _BLD_cmd && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#include <cmdext.h>
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if defined(CMD_BUILTIN) && !defined(CMD_STANDALONE)
-#define CMD_STANDALONE CMD_BUILTIN
-#endif
-
-#ifdef CMD_STANDALONE
-
-#define CMD_CONTEXT(c) ((Shbltin_t*)0)
-
-#if CMD_DYNAMIC
-
-#include <dlldefs.h>
-
-#else
-
-extern __MANGLE__ int CMD_STANDALONE __PROTO__((int, char**, __V_*));
-
-#endif
-
-#ifndef CMD_BUILTIN
-
-/*
- * command initialization
- */
-
-static int
-cmdinit __PARAM__((int argc, register char** argv, __V_* context, const char* catalog, int flags), (argc, argv, context, catalog, flags)) __OTORP__(int argc; register char** argv; __V_* context; const char* catalog; int flags;){
- register char* cp;
- register char* pp;
-
- if (cp = strrchr(argv[0], '/'))
- cp++;
- else
- cp = argv[0];
- if (pp = strrchr(cp, '_'))
- cp = pp + 1;
- error_info.id = cp;
- if (!error_info.catalog)
- error_info.catalog = (char*)catalog;
- opt_info.index = 0;
- if (context)
- error_info.flags |= flags & ~(ERROR_CALLBACK|ERROR_NOTIFY);
- return 0;
-}
-
-#endif
-
-int
-main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-#if CMD_DYNAMIC
- register char* s;
- register char* t;
- __V_* dll;
- Shbltin_f fun;
- char buf[64];
-
- if (s = strrchr(argv[0], '/'))
- s++;
- else if (!(s = argv[0]))
- return 127;
- if ((t = strrchr(s, '_')) && *++t)
- s = t;
- buf[0] = '_';
- buf[1] = 'b';
- buf[2] = '_';
- strncpy(buf + 3, s, sizeof(buf) - 4);
- buf[sizeof(buf) - 1] = 0;
- if (t = strchr(buf, '.'))
- *t = 0;
- for (;;)
- {
- if (dll = dlopen(NiL, RTLD_LAZY))
- {
- if (fun = (Shbltin_f)dlsym(dll, buf + 1))
- break;
- if (fun = (Shbltin_f)dlsym(dll, buf))
- break;
- }
- if (dll = dllplug(NiL, "cmd", NiL, RTLD_LAZY, NiL, 0))
- {
- if (fun = (Shbltin_f)dlsym(dll, buf + 1))
- break;
- if (fun = (Shbltin_f)dlsym(dll, buf))
- break;
- }
- return 127;
- }
- return (*fun)(argc, argv, NiL);
-#else
- return CMD_STANDALONE(argc, argv, NiL);
-#endif
-}
-
-#else
-
-#undef cmdinit
-#ifdef _MSC_VER
-#define CMD_CONTEXT(p) ((Shbltin_t*)(p))
-#define cmdinit(a,b,c,d,e) do{if(_cmd_init(a,b,c,d,e))return -1;}while(0)
-#else
-#define CMD_CONTEXT(p) (((p)&&((Shbltin_t*)(p))->version>=20071012&&((Shbltin_t*)(p))->version<20350101)?((Shbltin_t*)(p)):0)
-#define cmdinit(a,b,c,d,e) do{if((c)&&!CMD_CONTEXT(c))c=0;if(_cmd_init(a,b,c,d,e))return -1;}while(0)
-#endif
-
-#if _BLD_cmd && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _cmd_init __PROTO__((int, char**, __V_*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libcmd/i386/include/ast/cmdext.h b/usr/src/lib/libcmd/i386/include/ast/cmdext.h
deleted file mode 100644
index 978322e2d3..0000000000
--- a/usr/src/lib/libcmd/i386/include/ast/cmdext.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-extern __MANGLE__ int b_basename __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cat __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chgrp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chmod __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chown __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cksum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cmp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_comm __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cut __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_date __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_dirname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_egrep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_expr __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fds __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fgrep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fmt __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fold __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_getconf __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_grep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_head __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_id __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_join __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_ln __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_logname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_md5sum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mkdir __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mkfifo __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mktemp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mv __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_paste __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_pathchk __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_pids __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rev __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_readlink __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rm __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rmdir __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_stty __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_sum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_sync __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tail __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tee __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tty __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_uname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_uniq __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_vmstate __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_wc __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_xgrep __PROTO__((int, char**, __V_*));
diff --git a/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/symlink b/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/symlink
deleted file mode 100644
index c4a03de88a..0000000000
--- a/usr/src/lib/libcmd/i386/src/lib/libcmd/FEATURE/symlink
+++ /dev/null
@@ -1,8 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libcmd/features/symlink by iffe version 2009-12-04 : : */
-#ifndef _def_symlink_cmd
-#define _def_symlink_cmd 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_lchown 1 /* lchown implemented */
-#endif
diff --git a/usr/src/lib/libcmd/sparc/include/ast/cmd.h b/usr/src/lib/libcmd/sparc/include/ast/cmd.h
deleted file mode 100644
index e064222a77..0000000000
--- a/usr/src/lib/libcmd/sparc/include/ast/cmd.h
+++ /dev/null
@@ -1,174 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * builtin cmd definitions
- */
-
-#ifndef _CMD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _CMD_H
-
-#include <ast.h>
-#include <error.h>
-#include <stak.h>
-#include <shcmd.h>
-
-#define cmdinit _cmd_init
-
-#define ERROR_CALLBACK ERROR_SET
-
-#if _BLD_cmd && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#include <cmdext.h>
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if defined(CMD_BUILTIN) && !defined(CMD_STANDALONE)
-#define CMD_STANDALONE CMD_BUILTIN
-#endif
-
-#ifdef CMD_STANDALONE
-
-#define CMD_CONTEXT(c) ((Shbltin_t*)0)
-
-#if CMD_DYNAMIC
-
-#include <dlldefs.h>
-
-#else
-
-extern __MANGLE__ int CMD_STANDALONE __PROTO__((int, char**, __V_*));
-
-#endif
-
-#ifndef CMD_BUILTIN
-
-/*
- * command initialization
- */
-
-static int
-cmdinit __PARAM__((int argc, register char** argv, __V_* context, const char* catalog, int flags), (argc, argv, context, catalog, flags)) __OTORP__(int argc; register char** argv; __V_* context; const char* catalog; int flags;){
- register char* cp;
- register char* pp;
-
- if (cp = strrchr(argv[0], '/'))
- cp++;
- else
- cp = argv[0];
- if (pp = strrchr(cp, '_'))
- cp = pp + 1;
- error_info.id = cp;
- if (!error_info.catalog)
- error_info.catalog = (char*)catalog;
- opt_info.index = 0;
- if (context)
- error_info.flags |= flags & ~(ERROR_CALLBACK|ERROR_NOTIFY);
- return 0;
-}
-
-#endif
-
-int
-main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-#if CMD_DYNAMIC
- register char* s;
- register char* t;
- __V_* dll;
- Shbltin_f fun;
- char buf[64];
-
- if (s = strrchr(argv[0], '/'))
- s++;
- else if (!(s = argv[0]))
- return 127;
- if ((t = strrchr(s, '_')) && *++t)
- s = t;
- buf[0] = '_';
- buf[1] = 'b';
- buf[2] = '_';
- strncpy(buf + 3, s, sizeof(buf) - 4);
- buf[sizeof(buf) - 1] = 0;
- if (t = strchr(buf, '.'))
- *t = 0;
- for (;;)
- {
- if (dll = dlopen(NiL, RTLD_LAZY))
- {
- if (fun = (Shbltin_f)dlsym(dll, buf + 1))
- break;
- if (fun = (Shbltin_f)dlsym(dll, buf))
- break;
- }
- if (dll = dllplug(NiL, "cmd", NiL, RTLD_LAZY, NiL, 0))
- {
- if (fun = (Shbltin_f)dlsym(dll, buf + 1))
- break;
- if (fun = (Shbltin_f)dlsym(dll, buf))
- break;
- }
- return 127;
- }
- return (*fun)(argc, argv, NiL);
-#else
- return CMD_STANDALONE(argc, argv, NiL);
-#endif
-}
-
-#else
-
-#undef cmdinit
-#ifdef _MSC_VER
-#define CMD_CONTEXT(p) ((Shbltin_t*)(p))
-#define cmdinit(a,b,c,d,e) do{if(_cmd_init(a,b,c,d,e))return -1;}while(0)
-#else
-#define CMD_CONTEXT(p) (((p)&&((Shbltin_t*)(p))->version>=20071012&&((Shbltin_t*)(p))->version<20350101)?((Shbltin_t*)(p)):0)
-#define cmdinit(a,b,c,d,e) do{if((c)&&!CMD_CONTEXT(c))c=0;if(_cmd_init(a,b,c,d,e))return -1;}while(0)
-#endif
-
-#if _BLD_cmd && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _cmd_init __PROTO__((int, char**, __V_*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libcmd/sparc/include/ast/cmdext.h b/usr/src/lib/libcmd/sparc/include/ast/cmdext.h
deleted file mode 100644
index 978322e2d3..0000000000
--- a/usr/src/lib/libcmd/sparc/include/ast/cmdext.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-extern __MANGLE__ int b_basename __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cat __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chgrp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chmod __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chown __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cksum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cmp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_comm __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cut __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_date __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_dirname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_egrep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_expr __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fds __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fgrep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fmt __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fold __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_getconf __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_grep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_head __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_id __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_join __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_ln __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_logname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_md5sum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mkdir __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mkfifo __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mktemp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mv __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_paste __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_pathchk __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_pids __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rev __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_readlink __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rm __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rmdir __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_stty __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_sum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_sync __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tail __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tee __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tty __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_uname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_uniq __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_vmstate __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_wc __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_xgrep __PROTO__((int, char**, __V_*));
diff --git a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink b/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink
deleted file mode 100644
index 00b254f70d..0000000000
--- a/usr/src/lib/libcmd/sparc/src/lib/libcmd/FEATURE/symlink
+++ /dev/null
@@ -1,8 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libcmd/features/symlink by iffe version 2009-12-04 : : */
-#ifndef _def_symlink_cmd
-#define _def_symlink_cmd 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_lchown 1 /* lchown implemented */
-#endif
diff --git a/usr/src/lib/libcmd/sparcv9/include/ast/cmd.h b/usr/src/lib/libcmd/sparcv9/include/ast/cmd.h
deleted file mode 100644
index e064222a77..0000000000
--- a/usr/src/lib/libcmd/sparcv9/include/ast/cmd.h
+++ /dev/null
@@ -1,174 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-/*
- * AT&T Research
- *
- * builtin cmd definitions
- */
-
-#ifndef _CMD_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _CMD_H
-
-#include <ast.h>
-#include <error.h>
-#include <stak.h>
-#include <shcmd.h>
-
-#define cmdinit _cmd_init
-
-#define ERROR_CALLBACK ERROR_SET
-
-#if _BLD_cmd && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-#include <cmdext.h>
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#if defined(CMD_BUILTIN) && !defined(CMD_STANDALONE)
-#define CMD_STANDALONE CMD_BUILTIN
-#endif
-
-#ifdef CMD_STANDALONE
-
-#define CMD_CONTEXT(c) ((Shbltin_t*)0)
-
-#if CMD_DYNAMIC
-
-#include <dlldefs.h>
-
-#else
-
-extern __MANGLE__ int CMD_STANDALONE __PROTO__((int, char**, __V_*));
-
-#endif
-
-#ifndef CMD_BUILTIN
-
-/*
- * command initialization
- */
-
-static int
-cmdinit __PARAM__((int argc, register char** argv, __V_* context, const char* catalog, int flags), (argc, argv, context, catalog, flags)) __OTORP__(int argc; register char** argv; __V_* context; const char* catalog; int flags;){
- register char* cp;
- register char* pp;
-
- if (cp = strrchr(argv[0], '/'))
- cp++;
- else
- cp = argv[0];
- if (pp = strrchr(cp, '_'))
- cp = pp + 1;
- error_info.id = cp;
- if (!error_info.catalog)
- error_info.catalog = (char*)catalog;
- opt_info.index = 0;
- if (context)
- error_info.flags |= flags & ~(ERROR_CALLBACK|ERROR_NOTIFY);
- return 0;
-}
-
-#endif
-
-int
-main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-#if CMD_DYNAMIC
- register char* s;
- register char* t;
- __V_* dll;
- Shbltin_f fun;
- char buf[64];
-
- if (s = strrchr(argv[0], '/'))
- s++;
- else if (!(s = argv[0]))
- return 127;
- if ((t = strrchr(s, '_')) && *++t)
- s = t;
- buf[0] = '_';
- buf[1] = 'b';
- buf[2] = '_';
- strncpy(buf + 3, s, sizeof(buf) - 4);
- buf[sizeof(buf) - 1] = 0;
- if (t = strchr(buf, '.'))
- *t = 0;
- for (;;)
- {
- if (dll = dlopen(NiL, RTLD_LAZY))
- {
- if (fun = (Shbltin_f)dlsym(dll, buf + 1))
- break;
- if (fun = (Shbltin_f)dlsym(dll, buf))
- break;
- }
- if (dll = dllplug(NiL, "cmd", NiL, RTLD_LAZY, NiL, 0))
- {
- if (fun = (Shbltin_f)dlsym(dll, buf + 1))
- break;
- if (fun = (Shbltin_f)dlsym(dll, buf))
- break;
- }
- return 127;
- }
- return (*fun)(argc, argv, NiL);
-#else
- return CMD_STANDALONE(argc, argv, NiL);
-#endif
-}
-
-#else
-
-#undef cmdinit
-#ifdef _MSC_VER
-#define CMD_CONTEXT(p) ((Shbltin_t*)(p))
-#define cmdinit(a,b,c,d,e) do{if(_cmd_init(a,b,c,d,e))return -1;}while(0)
-#else
-#define CMD_CONTEXT(p) (((p)&&((Shbltin_t*)(p))->version>=20071012&&((Shbltin_t*)(p))->version<20350101)?((Shbltin_t*)(p)):0)
-#define cmdinit(a,b,c,d,e) do{if((c)&&!CMD_CONTEXT(c))c=0;if(_cmd_init(a,b,c,d,e))return -1;}while(0)
-#endif
-
-#if _BLD_cmd && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ int _cmd_init __PROTO__((int, char**, __V_*, const char*, int));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
-
-#endif
diff --git a/usr/src/lib/libcmd/sparcv9/include/ast/cmdext.h b/usr/src/lib/libcmd/sparcv9/include/ast/cmdext.h
deleted file mode 100644
index 978322e2d3..0000000000
--- a/usr/src/lib/libcmd/sparcv9/include/ast/cmdext.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1992-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-extern __MANGLE__ int b_basename __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cat __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chgrp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chmod __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_chown __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cksum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cmp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_comm __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_cut __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_date __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_dirname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_egrep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_expr __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fds __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fgrep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fmt __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_fold __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_getconf __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_grep __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_head __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_id __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_join __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_ln __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_logname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_md5sum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mkdir __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mkfifo __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mktemp __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_mv __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_paste __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_pathchk __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_pids __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rev __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_readlink __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rm __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_rmdir __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_stty __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_sum __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_sync __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tail __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tee __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_tty __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_uname __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_uniq __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_vmstate __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_wc __PROTO__((int, char**, __V_*));
-extern __MANGLE__ int b_xgrep __PROTO__((int, char**, __V_*));
diff --git a/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/symlink b/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/symlink
deleted file mode 100644
index bf182d7859..0000000000
--- a/usr/src/lib/libcmd/sparcv9/src/lib/libcmd/FEATURE/symlink
+++ /dev/null
@@ -1,8 +0,0 @@
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libcmd/features/symlink by iffe version 2009-12-04 : : */
-#ifndef _def_symlink_cmd
-#define _def_symlink_cmd 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_lchown 1 /* lchown implemented */
-#endif
diff --git a/usr/src/lib/libdll/THIRDPARTYLICENSE b/usr/src/lib/libdll/THIRDPARTYLICENSE
deleted file mode 100644
index 50c6364c06..0000000000
--- a/usr/src/lib/libdll/THIRDPARTYLICENSE
+++ /dev/null
@@ -1,245 +0,0 @@
-+------------------------------------------------------------------------------+
-| This license covers all software that refers to the URL |
-| http://www.opensource.org/licenses/cpl1.0.txt |
-+------------------------------------------------------------------------------+
-
-Common Public License Version 1.0
-
- THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
- PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
- THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
- 1. DEFINITIONS
-
- "Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and
- documentation distributed under this Agreement, and
-
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from
- and are distributed by that particular Contributor. A Contribution
- 'originates' from a Contributor if it was added to the Program by
- such Contributor itself or anyone acting on such Contributor's
- behalf. Contributions do not include additions to the Program
- which: (i) are separate modules of software distributed in
- conjunction with the Program under their own license agreement, and
- (ii) are not derivative works of the Program.
-
- "Contributor" means any person or entity that distributes the Program.
-
- "Licensed Patents " mean patent claims licensable by a Contributor
- which are necessarily infringed by the use or sale of its Contribution
- alone or when combined with the Program.
-
- "Program" means the Contributions distributed in accordance with this
- Agreement.
-
- "Recipient" means anyone who receives the Program under this
- Agreement, including all Contributors.
-
- 2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free copyright
- license to reproduce, prepare derivative works of, publicly
- display, publicly perform, distribute and sublicense the
- Contribution of such Contributor, if any, and such derivative
- works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free patent
- license under Licensed Patents to make, use, sell, offer to sell,
- import and otherwise transfer the Contribution of such Contributor,
- if any, in source code and object code form. This patent license
- shall apply to the combination of the Contribution and the Program
- if, at the time the Contribution is added by the Contributor, such
- addition of the Contribution causes such combination to be covered
- by the Licensed Patents. The patent license shall not apply to any
- other combinations which include the Contribution. No hardware per
- se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the
- licenses to its Contributions set forth herein, no assurances are
- provided by any Contributor that the Program does not infringe the
- patent or other intellectual property rights of any other entity.
- Each Contributor disclaims any liability to Recipient for claims
- brought by any other entity based on infringement of intellectual
- property rights or otherwise. As a condition to exercising the
- rights and licenses granted hereunder, each Recipient hereby
- assumes sole responsibility to secure any other intellectual
- property rights needed, if any. For example, if a third party
- patent license is required to allow Recipient to distribute the
- Program, it is Recipient's responsibility to acquire that license
- before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has
- sufficient copyright rights in its Contribution, if any, to grant
- the copyright license set forth in this Agreement.
-
- 3. REQUIREMENTS
-
- A Contributor may choose to distribute the Program in object code form
- under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all
- warranties and conditions, express and implied, including
- warranties or conditions of title and non-infringement, and implied
- warranties or conditions of merchantability and fitness for a
- particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all
- liability for damages, including direct, indirect, special,
- incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement
- are offered by that Contributor alone and not by any other party;
- and
-
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software
- exchange.
-
- When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the
- Program.
-
- Contributors may not remove or alter any copyright notices contained
- within the Program.
-
- Each Contributor must identify itself as the originator of its
- Contribution, if any, in a manner that reasonably allows subsequent
- Recipients to identify the originator of the Contribution.
-
- 4. COMMERCIAL DISTRIBUTION
-
- Commercial distributors of software may accept certain
- responsibilities with respect to end users, business partners and the
- like. While this license is intended to facilitate the commercial use
- of the Program, the Contributor who includes the Program in a
- commercial product offering should do so in a manner which does not
- create potential liability for other Contributors. Therefore, if a
- Contributor includes the Program in a commercial product offering,
- such Contributor ("Commercial Contributor") hereby agrees to defend
- and indemnify every other Contributor ("Indemnified Contributor")
- against any losses, damages and costs (collectively "Losses") arising
- from claims, lawsuits and other legal actions brought by a third party
- against the Indemnified Contributor to the extent caused by the acts
- or omissions of such Commercial Contributor in connection with its
- distribution of the Program in a commercial product offering. The
- obligations in this section do not apply to any claims or Losses
- relating to any actual or alleged intellectual property infringement.
- In order to qualify, an Indemnified Contributor must: a) promptly
- notify the Commercial Contributor in writing of such claim, and b)
- allow the Commercial Contributor to control, and cooperate with the
- Commercial Contributor in, the defense and any related settlement
- negotiations. The Indemnified Contributor may participate in any such
- claim at its own expense.
-
- For example, a Contributor might include the Program in a commercial
- product offering, Product X. That Contributor is then a Commercial
- Contributor. If that Commercial Contributor then makes performance
- claims, or offers warranties related to Product X, those performance
- claims and warranties are such Commercial Contributor's responsibility
- alone. Under this section, the Commercial Contributor would have to
- defend claims against the other Contributors related to those
- performance claims and warranties, and if a court requires any other
- Contributor to pay any damages as a result, the Commercial Contributor
- must pay those damages.
-
- 5. NO WARRANTY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
- PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
- WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
- OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
- responsible for determining the appropriateness of using and
- distributing the Program and assumes all risks associated with its
- exercise of rights under this Agreement, including but not limited to
- the risks and costs of program errors, compliance with applicable
- laws, damage to or loss of data, programs or equipment, and
- unavailability or interruption of operations.
-
- 6. DISCLAIMER OF LIABILITY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
- ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
- WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
- DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
- HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 7. GENERAL
-
- If any provision of this Agreement is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability of
- the remainder of the terms of this Agreement, and without further
- action by the parties hereto, such provision shall be reformed to the
- minimum extent necessary to make such provision valid and enforceable.
-
- If Recipient institutes patent litigation against a Contributor with
- respect to a patent applicable to software (including a cross-claim or
- counterclaim in a lawsuit), then any patent licenses granted by that
- Contributor to such Recipient under this Agreement shall terminate as
- of the date such litigation is filed. In addition, if Recipient
- institutes patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Program
- itself (excluding combinations of the Program with other software or
- hardware) infringes such Recipient's patent(s), then such Recipient's
- rights granted under Section 2(b) shall terminate as of the date such
- litigation is filed.
-
- All Recipient's rights under this Agreement shall terminate if it
- fails to comply with any of the material terms or conditions of this
- Agreement and does not cure such failure in a reasonable period of
- time after becoming aware of such noncompliance. If all Recipient's
- rights under this Agreement terminate, Recipient agrees to cease use
- and distribution of the Program as soon as reasonably practicable.
- However, Recipient's obligations under this Agreement and any licenses
- granted by Recipient relating to the Program shall continue and
- survive.
-
- Everyone is permitted to copy and distribute copies of this Agreement,
- but in order to avoid inconsistency the Agreement is copyrighted and
- may only be modified in the following manner. The Agreement Steward
- reserves the right to publish new versions (including revisions) of
- this Agreement from time to time. No one other than the Agreement
- Steward has the right to modify this Agreement. IBM is the initial
- Agreement Steward. IBM may assign the responsibility to serve as the
- Agreement Steward to a suitable separate entity. Each new version of
- the Agreement will be given a distinguishing version number. The
- Program (including Contributions) may always be distributed subject to
- the version of the Agreement under which it was received. In addition,
- after a new version of the Agreement is published, Contributor may
- elect to distribute the Program (including its Contributions) under
- the new version. Except as expressly stated in Sections 2(a) and 2(b)
- above, Recipient receives no rights or licenses to the intellectual
- property of any Contributor under this Agreement, whether expressly,
- by implication, estoppel or otherwise. All rights in the Program not
- expressly granted under this Agreement are reserved.
-
- This Agreement is governed by the laws of the State of New York and
- the intellectual property laws of the United States of America. No
- party to this Agreement will bring a legal action under this Agreement
- more than one year after the cause of action arose. Each party waives
- its rights to a jury trial in any resulting litigation.
-
-Copyright (c) 2004 by the Open Source Initiative
-This is a copy of the license posted on 2004-10-06 at:
- http://www.opensource.org/licenses/cpl
diff --git a/usr/src/lib/libdll/THIRDPARTYLICENSE.descrip b/usr/src/lib/libdll/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index 3f4cc4c8fc..0000000000
--- a/usr/src/lib/libdll/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-AT&T ADVANCED SOFTWARE TECHNOLOGY DYNAMIC LINKING LIBRARY (LIBDLL)
diff --git a/usr/src/lib/libdll/amd64/src/lib/libdll/dlldefs.h b/usr/src/lib/libdll/amd64/src/lib/libdll/dlldefs.h
deleted file mode 100644
index 6c7a005b64..0000000000
--- a/usr/src/lib/libdll/amd64/src/lib/libdll/dlldefs.h
+++ /dev/null
@@ -1,129 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_64bit/src/lib/libdll/features/dll by iffe version 2009-12-04 : : */
-
-#ifndef _def_dll_dll
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dll_dll 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_dlfcn 1 /* #include <dlfcn.h> ok */
-#define _LIB_dl 1 /* -ldl is a library */
-#define _lib_dlopen 1 /* dlopen() in default lib(s) */
-#define _DLL_NEXT_PATH "/usr/lib/libc.so.1"
-
-#if defined(__MVS__) && !defined(__SUSV3)
-#define __SUSV3 1
-#endif
-#include <dlfcn.h>
-
-#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */
-#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */
-
-typedef struct Dllinfo_s
-{
- char** sibling; /* sibling dirs on $PATH */
- char* prefix; /* library name prefix */
- char* suffix; /* library name suffix */
- char* env; /* library path env var */
- int flags; /* DLL_INFO_* flags */
-#ifdef _DLLINFO_PRIVATE_
- _DLLINFO_PRIVATE_
-#endif
-} Dllinfo_t;
-
-typedef struct Dllent_s
-{
- char* path;
- char* name;
-#ifdef _DLLENT_PRIVATE_
- _DLLENT_PRIVATE_
-#endif
-} Dllent_t;
-
-typedef struct Dllscan_s
-{
- __V_* pad;
-#ifdef _DLLSCAN_PRIVATE_
- _DLLSCAN_PRIVATE_
-#endif
-} Dllscan_t;
-
-#if _BLD_dll && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Dllinfo_t* dllinfo __PROTO__((void));
-extern __MANGLE__ __V_* dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
-extern __MANGLE__ __V_* dllfind __PROTO__((const char*, const char*, int, char*, size_t));
-extern __MANGLE__ __V_* dllopen __PROTO__((const char*, int));
-extern __MANGLE__ __V_* dllnext __PROTO__((int));
-extern __MANGLE__ __V_* dlllook __PROTO__((__V_*, const char*));
-
-extern __MANGLE__ Dllscan_t* dllsopen __PROTO__((const char*, const char*, const char*));
-extern __MANGLE__ Dllent_t* dllsread __PROTO__((Dllscan_t*));
-extern __MANGLE__ int dllsclose __PROTO__((Dllscan_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libdll/i386/src/lib/libdll/dlldefs.h b/usr/src/lib/libdll/i386/src/lib/libdll/dlldefs.h
deleted file mode 100644
index 8f1dfc4543..0000000000
--- a/usr/src/lib/libdll/i386/src/lib/libdll/dlldefs.h
+++ /dev/null
@@ -1,129 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_i386_32bit/src/lib/libdll/features/dll by iffe version 2009-12-04 : : */
-
-#ifndef _def_dll_dll
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dll_dll 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_dlfcn 1 /* #include <dlfcn.h> ok */
-#define _LIB_dl 1 /* -ldl is a library */
-#define _lib_dlopen 1 /* dlopen() in default lib(s) */
-#define _DLL_NEXT_PATH "/usr/lib/libc.so.1"
-
-#if defined(__MVS__) && !defined(__SUSV3)
-#define __SUSV3 1
-#endif
-#include <dlfcn.h>
-
-#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */
-#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */
-
-typedef struct Dllinfo_s
-{
- char** sibling; /* sibling dirs on $PATH */
- char* prefix; /* library name prefix */
- char* suffix; /* library name suffix */
- char* env; /* library path env var */
- int flags; /* DLL_INFO_* flags */
-#ifdef _DLLINFO_PRIVATE_
- _DLLINFO_PRIVATE_
-#endif
-} Dllinfo_t;
-
-typedef struct Dllent_s
-{
- char* path;
- char* name;
-#ifdef _DLLENT_PRIVATE_
- _DLLENT_PRIVATE_
-#endif
-} Dllent_t;
-
-typedef struct Dllscan_s
-{
- __V_* pad;
-#ifdef _DLLSCAN_PRIVATE_
- _DLLSCAN_PRIVATE_
-#endif
-} Dllscan_t;
-
-#if _BLD_dll && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Dllinfo_t* dllinfo __PROTO__((void));
-extern __MANGLE__ __V_* dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
-extern __MANGLE__ __V_* dllfind __PROTO__((const char*, const char*, int, char*, size_t));
-extern __MANGLE__ __V_* dllopen __PROTO__((const char*, int));
-extern __MANGLE__ __V_* dllnext __PROTO__((int));
-extern __MANGLE__ __V_* dlllook __PROTO__((__V_*, const char*));
-
-extern __MANGLE__ Dllscan_t* dllsopen __PROTO__((const char*, const char*, const char*));
-extern __MANGLE__ Dllent_t* dllsread __PROTO__((Dllscan_t*));
-extern __MANGLE__ int dllsclose __PROTO__((Dllscan_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libdll/sparc/src/lib/libdll/dlldefs.h b/usr/src/lib/libdll/sparc/src/lib/libdll/dlldefs.h
deleted file mode 100644
index 7f5cd08a38..0000000000
--- a/usr/src/lib/libdll/sparc/src/lib/libdll/dlldefs.h
+++ /dev/null
@@ -1,129 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_32bit/src/lib/libdll/features/dll by iffe version 2009-12-04 : : */
-
-#ifndef _def_dll_dll
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dll_dll 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_dlfcn 1 /* #include <dlfcn.h> ok */
-#define _LIB_dl 1 /* -ldl is a library */
-#define _lib_dlopen 1 /* dlopen() in default lib(s) */
-#define _DLL_NEXT_PATH "/usr/lib/libc.so.1"
-
-#if defined(__MVS__) && !defined(__SUSV3)
-#define __SUSV3 1
-#endif
-#include <dlfcn.h>
-
-#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */
-#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */
-
-typedef struct Dllinfo_s
-{
- char** sibling; /* sibling dirs on $PATH */
- char* prefix; /* library name prefix */
- char* suffix; /* library name suffix */
- char* env; /* library path env var */
- int flags; /* DLL_INFO_* flags */
-#ifdef _DLLINFO_PRIVATE_
- _DLLINFO_PRIVATE_
-#endif
-} Dllinfo_t;
-
-typedef struct Dllent_s
-{
- char* path;
- char* name;
-#ifdef _DLLENT_PRIVATE_
- _DLLENT_PRIVATE_
-#endif
-} Dllent_t;
-
-typedef struct Dllscan_s
-{
- __V_* pad;
-#ifdef _DLLSCAN_PRIVATE_
- _DLLSCAN_PRIVATE_
-#endif
-} Dllscan_t;
-
-#if _BLD_dll && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Dllinfo_t* dllinfo __PROTO__((void));
-extern __MANGLE__ __V_* dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
-extern __MANGLE__ __V_* dllfind __PROTO__((const char*, const char*, int, char*, size_t));
-extern __MANGLE__ __V_* dllopen __PROTO__((const char*, int));
-extern __MANGLE__ __V_* dllnext __PROTO__((int));
-extern __MANGLE__ __V_* dlllook __PROTO__((__V_*, const char*));
-
-extern __MANGLE__ Dllscan_t* dllsopen __PROTO__((const char*, const char*, const char*));
-extern __MANGLE__ Dllent_t* dllsread __PROTO__((Dllscan_t*));
-extern __MANGLE__ int dllsclose __PROTO__((Dllscan_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libdll/sparcv9/src/lib/libdll/dlldefs.h b/usr/src/lib/libdll/sparcv9/src/lib/libdll/dlldefs.h
deleted file mode 100644
index 306ed8c1d5..0000000000
--- a/usr/src/lib/libdll/sparcv9/src/lib/libdll/dlldefs.h
+++ /dev/null
@@ -1,129 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libdll/features/dll by iffe version 2009-12-04 : : */
-
-#ifndef _def_dll_dll
-#if !defined(__PROTO__)
-# if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_dll_dll 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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 _hdr_dlfcn 1 /* #include <dlfcn.h> ok */
-#define _LIB_dl 1 /* -ldl is a library */
-#define _lib_dlopen 1 /* dlopen() in default lib(s) */
-#define _DLL_NEXT_PATH "/usr/lib/libc.so.1"
-
-#if defined(__MVS__) && !defined(__SUSV3)
-#define __SUSV3 1
-#endif
-#include <dlfcn.h>
-
-#define DLL_INFO_PREVER 0x0001 /* pre-suffix style version */
-#define DLL_INFO_DOTVER 0x0002 /* post-suffix style version */
-
-typedef struct Dllinfo_s
-{
- char** sibling; /* sibling dirs on $PATH */
- char* prefix; /* library name prefix */
- char* suffix; /* library name suffix */
- char* env; /* library path env var */
- int flags; /* DLL_INFO_* flags */
-#ifdef _DLLINFO_PRIVATE_
- _DLLINFO_PRIVATE_
-#endif
-} Dllinfo_t;
-
-typedef struct Dllent_s
-{
- char* path;
- char* name;
-#ifdef _DLLENT_PRIVATE_
- _DLLENT_PRIVATE_
-#endif
-} Dllent_t;
-
-typedef struct Dllscan_s
-{
- __V_* pad;
-#ifdef _DLLSCAN_PRIVATE_
- _DLLSCAN_PRIVATE_
-#endif
-} Dllscan_t;
-
-#if _BLD_dll && defined(__EXPORT__)
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-#endif
-
-extern __MANGLE__ Dllinfo_t* dllinfo __PROTO__((void));
-extern __MANGLE__ __V_* dllplug __PROTO__((const char*, const char*, const char*, int, char*, size_t));
-extern __MANGLE__ __V_* dllfind __PROTO__((const char*, const char*, int, char*, size_t));
-extern __MANGLE__ __V_* dllopen __PROTO__((const char*, int));
-extern __MANGLE__ __V_* dllnext __PROTO__((int));
-extern __MANGLE__ __V_* dlllook __PROTO__((__V_*, const char*));
-
-extern __MANGLE__ Dllscan_t* dllsopen __PROTO__((const char*, const char*, const char*));
-extern __MANGLE__ Dllent_t* dllsread __PROTO__((Dllscan_t*));
-extern __MANGLE__ int dllsclose __PROTO__((Dllscan_t*));
-
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-
-#endif
diff --git a/usr/src/lib/libpp/THIRDPARTYLICENSE b/usr/src/lib/libpp/THIRDPARTYLICENSE
deleted file mode 100644
index 50c6364c06..0000000000
--- a/usr/src/lib/libpp/THIRDPARTYLICENSE
+++ /dev/null
@@ -1,245 +0,0 @@
-+------------------------------------------------------------------------------+
-| This license covers all software that refers to the URL |
-| http://www.opensource.org/licenses/cpl1.0.txt |
-+------------------------------------------------------------------------------+
-
-Common Public License Version 1.0
-
- THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
- PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
- THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
- 1. DEFINITIONS
-
- "Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and
- documentation distributed under this Agreement, and
-
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from
- and are distributed by that particular Contributor. A Contribution
- 'originates' from a Contributor if it was added to the Program by
- such Contributor itself or anyone acting on such Contributor's
- behalf. Contributions do not include additions to the Program
- which: (i) are separate modules of software distributed in
- conjunction with the Program under their own license agreement, and
- (ii) are not derivative works of the Program.
-
- "Contributor" means any person or entity that distributes the Program.
-
- "Licensed Patents " mean patent claims licensable by a Contributor
- which are necessarily infringed by the use or sale of its Contribution
- alone or when combined with the Program.
-
- "Program" means the Contributions distributed in accordance with this
- Agreement.
-
- "Recipient" means anyone who receives the Program under this
- Agreement, including all Contributors.
-
- 2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free copyright
- license to reproduce, prepare derivative works of, publicly
- display, publicly perform, distribute and sublicense the
- Contribution of such Contributor, if any, and such derivative
- works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free patent
- license under Licensed Patents to make, use, sell, offer to sell,
- import and otherwise transfer the Contribution of such Contributor,
- if any, in source code and object code form. This patent license
- shall apply to the combination of the Contribution and the Program
- if, at the time the Contribution is added by the Contributor, such
- addition of the Contribution causes such combination to be covered
- by the Licensed Patents. The patent license shall not apply to any
- other combinations which include the Contribution. No hardware per
- se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the
- licenses to its Contributions set forth herein, no assurances are
- provided by any Contributor that the Program does not infringe the
- patent or other intellectual property rights of any other entity.
- Each Contributor disclaims any liability to Recipient for claims
- brought by any other entity based on infringement of intellectual
- property rights or otherwise. As a condition to exercising the
- rights and licenses granted hereunder, each Recipient hereby
- assumes sole responsibility to secure any other intellectual
- property rights needed, if any. For example, if a third party
- patent license is required to allow Recipient to distribute the
- Program, it is Recipient's responsibility to acquire that license
- before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has
- sufficient copyright rights in its Contribution, if any, to grant
- the copyright license set forth in this Agreement.
-
- 3. REQUIREMENTS
-
- A Contributor may choose to distribute the Program in object code form
- under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all
- warranties and conditions, express and implied, including
- warranties or conditions of title and non-infringement, and implied
- warranties or conditions of merchantability and fitness for a
- particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all
- liability for damages, including direct, indirect, special,
- incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement
- are offered by that Contributor alone and not by any other party;
- and
-
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software
- exchange.
-
- When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the
- Program.
-
- Contributors may not remove or alter any copyright notices contained
- within the Program.
-
- Each Contributor must identify itself as the originator of its
- Contribution, if any, in a manner that reasonably allows subsequent
- Recipients to identify the originator of the Contribution.
-
- 4. COMMERCIAL DISTRIBUTION
-
- Commercial distributors of software may accept certain
- responsibilities with respect to end users, business partners and the
- like. While this license is intended to facilitate the commercial use
- of the Program, the Contributor who includes the Program in a
- commercial product offering should do so in a manner which does not
- create potential liability for other Contributors. Therefore, if a
- Contributor includes the Program in a commercial product offering,
- such Contributor ("Commercial Contributor") hereby agrees to defend
- and indemnify every other Contributor ("Indemnified Contributor")
- against any losses, damages and costs (collectively "Losses") arising
- from claims, lawsuits and other legal actions brought by a third party
- against the Indemnified Contributor to the extent caused by the acts
- or omissions of such Commercial Contributor in connection with its
- distribution of the Program in a commercial product offering. The
- obligations in this section do not apply to any claims or Losses
- relating to any actual or alleged intellectual property infringement.
- In order to qualify, an Indemnified Contributor must: a) promptly
- notify the Commercial Contributor in writing of such claim, and b)
- allow the Commercial Contributor to control, and cooperate with the
- Commercial Contributor in, the defense and any related settlement
- negotiations. The Indemnified Contributor may participate in any such
- claim at its own expense.
-
- For example, a Contributor might include the Program in a commercial
- product offering, Product X. That Contributor is then a Commercial
- Contributor. If that Commercial Contributor then makes performance
- claims, or offers warranties related to Product X, those performance
- claims and warranties are such Commercial Contributor's responsibility
- alone. Under this section, the Commercial Contributor would have to
- defend claims against the other Contributors related to those
- performance claims and warranties, and if a court requires any other
- Contributor to pay any damages as a result, the Commercial Contributor
- must pay those damages.
-
- 5. NO WARRANTY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
- PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
- WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
- OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
- responsible for determining the appropriateness of using and
- distributing the Program and assumes all risks associated with its
- exercise of rights under this Agreement, including but not limited to
- the risks and costs of program errors, compliance with applicable
- laws, damage to or loss of data, programs or equipment, and
- unavailability or interruption of operations.
-
- 6. DISCLAIMER OF LIABILITY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
- ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
- WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
- DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
- HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 7. GENERAL
-
- If any provision of this Agreement is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability of
- the remainder of the terms of this Agreement, and without further
- action by the parties hereto, such provision shall be reformed to the
- minimum extent necessary to make such provision valid and enforceable.
-
- If Recipient institutes patent litigation against a Contributor with
- respect to a patent applicable to software (including a cross-claim or
- counterclaim in a lawsuit), then any patent licenses granted by that
- Contributor to such Recipient under this Agreement shall terminate as
- of the date such litigation is filed. In addition, if Recipient
- institutes patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Program
- itself (excluding combinations of the Program with other software or
- hardware) infringes such Recipient's patent(s), then such Recipient's
- rights granted under Section 2(b) shall terminate as of the date such
- litigation is filed.
-
- All Recipient's rights under this Agreement shall terminate if it
- fails to comply with any of the material terms or conditions of this
- Agreement and does not cure such failure in a reasonable period of
- time after becoming aware of such noncompliance. If all Recipient's
- rights under this Agreement terminate, Recipient agrees to cease use
- and distribution of the Program as soon as reasonably practicable.
- However, Recipient's obligations under this Agreement and any licenses
- granted by Recipient relating to the Program shall continue and
- survive.
-
- Everyone is permitted to copy and distribute copies of this Agreement,
- but in order to avoid inconsistency the Agreement is copyrighted and
- may only be modified in the following manner. The Agreement Steward
- reserves the right to publish new versions (including revisions) of
- this Agreement from time to time. No one other than the Agreement
- Steward has the right to modify this Agreement. IBM is the initial
- Agreement Steward. IBM may assign the responsibility to serve as the
- Agreement Steward to a suitable separate entity. Each new version of
- the Agreement will be given a distinguishing version number. The
- Program (including Contributions) may always be distributed subject to
- the version of the Agreement under which it was received. In addition,
- after a new version of the Agreement is published, Contributor may
- elect to distribute the Program (including its Contributions) under
- the new version. Except as expressly stated in Sections 2(a) and 2(b)
- above, Recipient receives no rights or licenses to the intellectual
- property of any Contributor under this Agreement, whether expressly,
- by implication, estoppel or otherwise. All rights in the Program not
- expressly granted under this Agreement are reserved.
-
- This Agreement is governed by the laws of the State of New York and
- the intellectual property laws of the United States of America. No
- party to this Agreement will bring a legal action under this Agreement
- more than one year after the cause of action arose. Each party waives
- its rights to a jury trial in any resulting litigation.
-
-Copyright (c) 2004 by the Open Source Initiative
-This is a copy of the license posted on 2004-10-06 at:
- http://www.opensource.org/licenses/cpl
diff --git a/usr/src/lib/libpp/THIRDPARTYLICENSE.descrip b/usr/src/lib/libpp/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index e82817ee4d..0000000000
--- a/usr/src/lib/libpp/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-AT&T ADVANCED SOFTWARE TECHNOLOGY PREPROCESSOR LIBRARY (LIBPP)
diff --git a/usr/src/lib/libpp/i386/pp.req b/usr/src/lib/libpp/i386/pp.req
deleted file mode 100644
index 6c6437695b..0000000000
--- a/usr/src/lib/libpp/i386/pp.req
+++ /dev/null
@@ -1,2 +0,0 @@
- -lpp
- -last
diff --git a/usr/src/lib/libpp/i386/pp.yacc b/usr/src/lib/libpp/i386/pp.yacc
deleted file mode 100644
index 1de9080a7a..0000000000
--- a/usr/src/lib/libpp/i386/pp.yacc
+++ /dev/null
@@ -1 +0,0 @@
-%token /*generated from pp.h*/ T_DOUBLE 292 T_DOUBLE_L 293 T_FLOAT 294 T_DECIMAL 288 T_DECIMAL_L 289 T_DECIMAL_U 290 T_DECIMAL_UL 291 T_OCTAL 296 T_OCTAL_L 297 T_OCTAL_U 298 T_OCTAL_UL 299 T_HEXADECIMAL 304 T_HEXADECIMAL_L 305 T_HEXADECIMAL_U 306 T_HEXADECIMAL_UL 307 T_HEXDOUBLE 308 T_HEXDOUBLE_L 309 T_ID 257 T_INVALID 258 T_CHARCONST 260 T_WCHARCONST 261 T_STRING 262 T_WSTRING 263 T_PTRMEM 264 T_ADDADD 265 T_SUBSUB 266 T_LSHIFT 267 T_RSHIFT 268 T_LE 269 T_GE 270 T_EQ 271 T_NE 272 T_ANDAND 273 T_OROR 274 T_MPYEQ 275 T_DIVEQ 276 T_MODEQ 277 T_ADDEQ 278 T_SUBEQ 279 T_LSHIFTEQ 280 T_RSHIFTEQ 281 T_ANDEQ 282 T_XOREQ 283 T_OREQ 284 T_VARIADIC 286 T_DOTREF 320 T_PTRMEMREF 321 T_SCOPE 322 T_UMINUS 323
diff --git a/usr/src/lib/libpp/i386/ppdebug.h b/usr/src/lib/libpp/i386/ppdebug.h
deleted file mode 100644
index 9c9f29e795..0000000000
--- a/usr/src/lib/libpp/i386/ppdebug.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
-* preprocessor library debug maps
-*/
-struct map
-{
- char* nam;
- long val;
-};
-static struct map pplexmap[] =
-{
- "PROTO", PROTO,
- "RES1", RES1,
- "RES1a", RES1a,
- "RES1e", RES1e,
- "RES1f", RES1f,
- "RES1h", RES1h,
- "RES1l", RES1l,
- "RES1n", RES1n,
- "RES1o", RES1o,
- "RES1t", RES1t,
- "RES1x", RES1x,
- "RES1y", RES1y,
- "COM1", COM1,
- "COM2", COM2,
- "COM3", COM3,
- "COM4", COM4,
- "COM5", COM5,
- "COM6", COM6,
- "COM7", COM7,
- "NID", NID,
- "LIT", LIT,
- "LIT1", LIT1,
- "LIT2", LIT2,
- "BAD1", BAD1,
- "BAD2", BAD2,
- "DOT", DOT,
- "DOT2", DOT2,
- "WS1", WS1,
- "QUICK", QUICK,
- "QTOK", QTOK,
- "QNUM", QNUM,
- "QEXP", QEXP,
- "QCOM", QCOM,
- "QID", QID,
- "MAC0", MAC0,
- "MACN", MACN,
- "HIT0", HIT0,
- "HITN", HITN,
- "LIT0", LIT0,
- "SHARP1", SHARP1,
- "TOKEN", TOKEN,
- "OCT1", OCT1,
- "OCT2", OCT2,
- "OCT3", OCT3,
- "NOT1", NOT1,
- "PCT1", PCT1,
- "AND1", AND1,
- "STAR1", STAR1,
- "PLUS1", PLUS1,
- "MINUS1", MINUS1,
- "ARROW1", ARROW1,
- "COLON1", COLON1,
- "LT1", LT1,
- "LSH1", LSH1,
- "EQ1", EQ1,
- "RSH1", RSH1,
- "GT1", GT1,
- "CIRC1", CIRC1,
- "OR1", OR1,
- "DEC1", DEC1,
- "DEC2", DEC2,
- "HEX1", HEX1,
- "HEX2", HEX2,
- "HEX3", HEX3,
- "HEX4", HEX4,
- "HEX5", HEX5,
- "HEX6", HEX6,
- "HEX7", HEX7,
- "HEX8", HEX8,
- "DBL1", DBL1,
- "DBL2", DBL2,
- "DBL3", DBL3,
- "DBL4", DBL4,
- "DBL5", DBL5,
- "DOT1", DOT1,
- "HDR1", HDR1,
- "BIN1", BIN1,
- "TERMINAL", TERMINAL,
- "S_CHRB", S_CHRB,
- "S_COMMENT", S_COMMENT,
- "S_EOB", S_EOB,
- "S_LITBEG", S_LITBEG,
- "S_LITEND", S_LITEND,
- "S_LITESC", S_LITESC,
- "S_MACRO", S_MACRO,
- "S_NL", S_NL,
- "S_QUAL", S_QUAL,
- "S_SHARP", S_SHARP,
- "S_VS", S_VS,
- "S_CHR", S_CHR,
- "S_HUH", S_HUH,
- "S_TOK", S_TOK,
- "S_TOKB", S_TOKB,
- "S_WS", S_WS,
- "S_RESERVED", S_RESERVED,
-};
-static struct map ppstatemap[] =
-{
- "ADD", ADD,
- "COLLECTING", COLLECTING,
- "COMPATIBILITY", COMPATIBILITY,
- "COMPILE", COMPILE,
- "CONDITIONAL", CONDITIONAL,
- "DEFINITION", DEFINITION,
- "DIRECTIVE", DIRECTIVE,
- "DISABLE", DISABLE,
- "EOF2NL", EOF2NL,
- "ESCAPE", ESCAPE,
- "FILEPOP", FILEPOP,
- "HEADER", HEADER,
- "HIDDEN", HIDDEN,
- "JOINING", JOINING,
- "NEWLINE", NEWLINE,
- "NOEXPAND", NOEXPAND,
- "NOSPACE", NOSPACE,
- "NOTEXT", NOTEXT,
- "NOVERTICAL", NOVERTICAL,
- "PASSEOF", PASSEOF,
- "PASSTHROUGH", PASSTHROUGH,
- "QUOTE", QUOTE,
- "SKIPCONTROL", SKIPCONTROL,
- "SKIPMACRO", SKIPMACRO,
- "SPACEOUT", SPACEOUT,
- "SQUOTE", SQUOTE,
- "STANDALONE", STANDALONE,
- "STRICT", STRICT,
- "STRIP", STRIP,
- "SYNCLINE", SYNCLINE,
- "TRANSITION", TRANSITION,
- "WARN", WARN,
-};
-static struct map ppmodemap[] =
-{
- "ALLMULTIPLE", ALLMULTIPLE,
- "BUILTIN", BUILTIN,
- "CATLITERAL", CATLITERAL,
- "DUMP", DUMP,
- "EXPOSE", EXPOSE,
- "EXTERNALIZE", EXTERNALIZE,
- "FILEDEPS", FILEDEPS,
- "GENDEPS", GENDEPS,
- "HEADERDEPS", HEADERDEPS,
- "HOSTED", HOSTED,
- "HOSTEDTRANSITION", HOSTEDTRANSITION,
- "INACTIVE", INACTIVE,
- "INIT", INIT,
- "LOADING", LOADING,
- "MARKC", MARKC,
- "MARKHOSTED", MARKHOSTED,
- "MARKMACRO", MARKMACRO,
- "PEDANTIC", PEDANTIC,
- "READONLY", READONLY,
- "RELAX", RELAX,
-};
-static struct map ppoptionmap[] =
-{
- "ELSEIF", ELSEIF,
- "FINAL", FINAL,
- "HEADEREXPAND", HEADEREXPAND,
- "HEADEREXPANDALL", HEADEREXPANDALL,
- "IGNORELINE", IGNORELINE,
- "INITIAL", INITIAL,
- "KEEPNOTEXT", KEEPNOTEXT,
- "KEYARGS", KEYARGS,
- "MODERN", MODERN,
- "NATIVE", NATIVE,
- "NOHASH", NOHASH,
- "NOISE", NOISE,
- "NOISEFILTER", NOISEFILTER,
- "NOPROTO", NOPROTO,
- "PLUSCOMMENT", PLUSCOMMENT,
- "PLUSPLUS", PLUSPLUS,
- "PLUSSPLICE", PLUSSPLICE,
- "PRAGMAEXPAND", PRAGMAEXPAND,
- "PREDEFINED", PREDEFINED,
- "PREDEFINITIONS", PREDEFINITIONS,
- "PREFIX", PREFIX,
- "PRESERVE", PRESERVE,
- "PROTOTYPED", PROTOTYPED,
- "REGUARD", REGUARD,
- "SPLICECAT", SPLICECAT,
- "SPLICESPACE", SPLICESPACE,
- "STRINGSPAN", STRINGSPAN,
- "STRINGSPLIT", STRINGSPLIT,
- "TRUNCATE", TRUNCATE,
- "ZEOF", ZEOF,
-};
-static struct map ppinmap[] =
-{
- "BUFFER", IN_BUFFER,
- "COPY", IN_COPY,
- "EXPAND", IN_EXPAND,
- "FILE", IN_FILE,
- "INIT", IN_INIT,
- "MACRO", IN_MACRO,
- "MULTILINE", IN_MULTILINE,
- "QUOTE", IN_QUOTE,
- "RESCAN", IN_RESCAN,
- "SQUOTE", IN_SQUOTE,
- "STRING", IN_STRING,
-};
diff --git a/usr/src/lib/libpp/i386/ppdef.h b/usr/src/lib/libpp/i386/ppdef.h
deleted file mode 100644
index 6cb3481f8b..0000000000
--- a/usr/src/lib/libpp/i386/ppdef.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- *
- * Glenn Fowler
- * AT&T Research
- *
- * @(#)pp.tab (AT&T Labs Research) 2006-05-09
- *
- * C preprocessor tables and states
- *
- * + marks extensions to the standard
- *
- */
-
-#define DEFINE 1
-#define ELIF 2
-#define ELSE 3
-#define ENDIF 4
-#define ENDMAC 5
-#define ERROR 6
-#define IF 7
-#define IFDEF 8
-#define IFNDEF 9
-#define INCLUDE 10
-#define LET 11
-#define LINE 12
-#define MACDEF 13
-#define PRAGMA 14
-#define RENAME 15
-#define UNDEF 16
-#define WARNING 17
-
-#define X_ALLMULTIPLE 1
-#define X_ALLPOSSIBLE 2
-#define X_BUILTIN 3
-#define X_CATLITERAL 4
-#define X_CDIR 5
-#define X_CHECKPOINT 6
-#define X_CHOP 7
-#define X_COMPATIBILITY 8
-#define X_DEBUG 9
-#define X_ELSEIF 10
-#define X_EXTERNALIZE 11
-#define X_FINAL 12
-#define X_HIDE 13
-#define X_HEADEREXPAND 14
-#define X_HEADEREXPANDALL 15
-#define X_HOSTED 16
-#define X_HOSTEDTRANSITION 17
-#define X_HOSTDIR 18
-#define X_ID 19
-#define X_IGNORE 20
-#define X_INCLUDE 21
-#define X_INITIAL 22
-#define X_KEYARGS 23
-#define X_LINE 24
-#define X_LINEBASE 25
-#define X_LINEFILE 26
-#define X_LINEID 27
-#define X_LINETYPE 28
-#define X_MACREF 29
-#define X_MAP 30
-#define X_MAPINCLUDE 31
-#define X_MODERN 32
-#define X_MULTIPLE 33
-#define X_NATIVE 34
-#define X_NOTE 35
-#define X_OPSPACE 36
-#define X_PASSTHROUGH 37
-#define X_PEDANTIC 38
-#define X_PLUSCOMMENT 39
-#define X_PLUSPLUS 40
-#define X_PLUSSPLICE 41
-#define X_PRAGMAFLAGS 42
-#define X_PRAGMAEXPAND 43
-#define X_PREDEFINED 44
-#define X_PREFIX 45
-#define X_PRESERVE 46
-#define X_PROTO 47
-#define X_PROTOTYPED 48
-#define X_QUOTE 49
-#define X_READONLY 50
-#define X_REGUARD 51
-#define X_RESERVED 52
-#define X_SPACEOUT 53
-#define X_SPLICECAT 54
-#define X_SPLICESPACE 55
-#define X_STANDARD 56
-#define X_STATEMENT 57
-#define X_STRICT 58
-#define X_STRINGSPAN 59
-#define X_STRINGSPLIT 60
-#define X_SYSTEM_HEADER 61
-#define X_TEST 62
-#define X_TEXT 63
-#define X_TRANSITION 64
-#define X_TRUNCATE 65
-#define X_VENDOR 66
-#define X_VERSION 67
-#define X_WARN 68
-#define X_ZEOF 69
-#define X_last_option 69
-
-#define X_DEFINED 70
-#define X_EXISTS 71
-#define X_INCLUDED 72
-#define X_MATCH 73
-#define X_NOTICED 74
-#define X_OPTION 75
-#define X_SIZEOF 76
-#define X_STRCMP 77
-
-#define R_DEFINED 1
-
-#define ADD (1<<0)
-#define COLLECTING (1<<1)
-#define COMPATIBILITY (1<<2)
-#define COMPILE (1<<3)
-#define CONDITIONAL (1<<4)
-#define DEFINITION (1<<5)
-#define DIRECTIVE (1<<6)
-#define DISABLE (1<<7)
-#define EOF2NL (1<<8)
-#define ESCAPE (1<<9)
-#define FILEPOP (1<<10)
-#define HEADER (1<<11)
-#define HIDDEN (1<<12)
-#define JOINING (1<<13)
-#define NEWLINE (1<<14)
-#define NOEXPAND (1L<<15)
-#define NOSPACE (1L<<16)
-#define NOTEXT (1L<<17)
-#define NOVERTICAL (1L<<18)
-#define PASSEOF (1L<<19)
-#define PASSTHROUGH (1L<<20)
-#define QUOTE (1L<<21)
-#define SKIPCONTROL (1L<<22)
-#define SKIPMACRO (1L<<23)
-#define SPACEOUT (1L<<24)
-#define SQUOTE (1L<<25)
-#define STANDALONE (1L<<26)
-#define STRICT (1L<<27)
-#define STRIP (1L<<28)
-#define SYNCLINE (1L<<29)
-#define TRANSITION (1L<<30)
-#define WARN (1L<<31)
-
-#define ALLMULTIPLE (1<<0)
-#define BUILTIN (1<<1)
-#define CATLITERAL (1<<2)
-#define DUMP (1<<3)
-#define EXPOSE (1<<4)
-#define EXTERNALIZE (1<<5)
-#define FILEDEPS (1<<6)
-#define GENDEPS (1<<7)
-#define HEADERDEPS (1<<8)
-#define HOSTED (1<<9)
-#define HOSTEDTRANSITION (1<<10)
-#define INACTIVE (1<<11)
-#define INIT (1<<12)
-#define LOADING (1<<13)
-#define MARKC (1<<14)
-#define MARKHOSTED (1L<<15)
-#define MARKMACRO (1L<<16)
-#define PEDANTIC (1L<<17)
-#define READONLY (1L<<18)
-#define RELAX (1L<<19)
-
-#define ALLPOSSIBLE (1<<0)
-#define DEFINITIONS (1<<1)
-#define ELSEIF (1<<2)
-#define FINAL (1<<3)
-#define HEADEREXPAND (1<<4)
-#define HEADEREXPANDALL (1<<5)
-#define IGNORELINE (1<<6)
-#define INITIAL (1<<7)
-#define KEEPNOTEXT (1<<8)
-#define KEYARGS (1<<9)
-#define MODERN (1<<10)
-#define NATIVE (1<<11)
-#define NOHASH (1<<12)
-#define NOISE (1<<13)
-#define NOISEFILTER (1<<14)
-#define NOPROTO (1L<<15)
-#define PLUSCOMMENT (1L<<16)
-#define PLUSPLUS (1L<<17)
-#define PLUSSPLICE (1L<<18)
-#define PRAGMAEXPAND (1L<<19)
-#define PREDEFINED (1L<<20)
-#define PREDEFINITIONS (1L<<21)
-#define PREFIX (1L<<22)
-#define PRESERVE (1L<<23)
-#define PROTOTYPED (1L<<24)
-#define REGUARD (1L<<25)
-#define SPLICECAT (1L<<26)
-#define SPLICESPACE (1L<<27)
-#define STRINGSPAN (1L<<28)
-#define STRINGSPLIT (1L<<29)
-#define TRUNCATE (1L<<30)
-#define ZEOF (1L<<31)
-
-#define V__PRAGMA 78
-#define V_ARGC 79
-#define V_BASE 80
-#define V_DATE 81
-#define V_FILE 82
-#define V_FUNCTION 83
-#define V_LINE 84
-#define V_PATH 85
-#define V_SOURCE 86
-#define V_STDC 87
-#define V_TIME 88
-#define V_VERSION 89
-#define V_DEFAULT 90
-#define V_DIRECTIVE 91
-#define V_EMPTY 92
-#define V_GETENV 93
-#define V_GETMAC 94
-#define V_GETOPT 95
-#define V_GETPRD 96
-#define V_ITERATE 97
diff --git a/usr/src/lib/libpp/i386/pptab.h b/usr/src/lib/libpp/i386/pptab.h
deleted file mode 100644
index d153e8e65c..0000000000
--- a/usr/src/lib/libpp/i386/pptab.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- *
- * Glenn Fowler
- * AT&T Research
- *
- * @(#)pp.tab (AT&T Labs Research) 2006-05-09
- *
- * C preprocessor tables and states
- *
- * + marks extensions to the standard
- *
- */
-
-static struct ppkeyword directives[] =
-{
- "define", DEFINE,
- "elif", ELIF,
- "else", ELSE,
- "endif", ENDIF,
- "+endmac", ENDMAC,
- "error", ERROR,
- "if", IF,
- "ifdef", IFDEF,
- "ifndef", IFNDEF,
- "include", INCLUDE,
- "+let", LET,
- "line", LINE,
- "+macdef", MACDEF,
- "pragma", PRAGMA,
- "+rename", RENAME,
- "undef", UNDEF,
- "+warning", WARNING,
- 0, 0
-};
-
-static struct ppkeyword options[] =
-{
- "allmultiple", X_ALLMULTIPLE,
- "allpossible", X_ALLPOSSIBLE,
- "builtin", X_BUILTIN,
- "catliteral", X_CATLITERAL,
- "cdir", X_CDIR,
- "checkpoint", X_CHECKPOINT,
- "chop", X_CHOP,
- "compatibility", X_COMPATIBILITY,
- "debug", X_DEBUG,
- "elseif", X_ELSEIF,
- "externalize", X_EXTERNALIZE,
- "final", X_FINAL,
- "hide", X_HIDE,
- "headerexpand", X_HEADEREXPAND,
- "headerexpandall", X_HEADEREXPANDALL,
- "hosted", X_HOSTED,
- "hostedtransition", X_HOSTEDTRANSITION,
- "hostdir", X_HOSTDIR,
- "id", X_ID,
- "ignore", X_IGNORE,
- "include", X_INCLUDE,
- "initial", X_INITIAL,
- "keyargs", X_KEYARGS,
- "line", X_LINE,
- "linebase", X_LINEBASE,
- "linefile", X_LINEFILE,
- "lineid", X_LINEID,
- "linetype", X_LINETYPE,
- "macref", X_MACREF,
- "map", X_MAP,
- "mapinclude", X_MAPINCLUDE,
- "modern", X_MODERN,
- "multiple", X_MULTIPLE,
- "native", X_NATIVE,
- "note", X_NOTE,
- "opspace", X_OPSPACE,
- "passthrough", X_PASSTHROUGH,
- "pedantic", X_PEDANTIC,
- "pluscomment", X_PLUSCOMMENT,
- "plusplus", X_PLUSPLUS,
- "plussplice", X_PLUSSPLICE,
- "pragmaflags", X_PRAGMAFLAGS,
- "pragmaexpand", X_PRAGMAEXPAND,
- "predefined", X_PREDEFINED,
- "prefix", X_PREFIX,
- "preserve", X_PRESERVE,
- "proto", X_PROTO,
- "prototyped", X_PROTOTYPED,
- "quote", X_QUOTE,
- "readonly", X_READONLY,
- "reguard", X_REGUARD,
- "reserved", X_RESERVED,
- "spaceout", X_SPACEOUT,
- "splicecat", X_SPLICECAT,
- "splicespace", X_SPLICESPACE,
- "standard", X_STANDARD,
- "statement", X_STATEMENT,
- "strict", X_STRICT,
- "stringspan", X_STRINGSPAN,
- "stringsplit", X_STRINGSPLIT,
- "system_header", X_SYSTEM_HEADER,
- "test", X_TEST,
- "text", X_TEXT,
- "transition", X_TRANSITION,
- "truncate", X_TRUNCATE,
- "vendor", X_VENDOR,
- "version", X_VERSION,
- "warn", X_WARN,
- "zeof", X_ZEOF,
- 0, 0
-};
-
-static struct ppkeyword predicates[] =
-{
- "defined", X_DEFINED,
- "+exists", X_EXISTS,
- "+included", X_INCLUDED,
- "+match", X_MATCH,
- "+noticed", X_NOTICED,
- "+option", X_OPTION,
- "sizeof", X_SIZEOF,
- "+strcmp", X_STRCMP,
- 0, 0
-};
-
-static struct ppkeyword readonlys[] =
-{
- "defined", R_DEFINED,
- 0, 0
-};
-
-static struct ppkeyword variables[] =
-{
- "_Pragma", V__PRAGMA,
- "+ARGC", V_ARGC,
- "+BASE", V_BASE,
- "DATE", V_DATE,
- "FILE", V_FILE,
- "+FUNCTION", V_FUNCTION,
- "LINE", V_LINE,
- "+PATH", V_PATH,
- "+SOURCE", V_SOURCE,
- "-STDC", V_STDC,
- "TIME", V_TIME,
- "+VERSION", V_VERSION,
- "-default", V_DEFAULT,
- "-directive", V_DIRECTIVE,
- "-empty", V_EMPTY,
- "-getenv", V_GETENV,
- "-getmac", V_GETMAC,
- "-getopt", V_GETOPT,
- "-getprd", V_GETPRD,
- "-iterate", V_ITERATE,
- 0, 0
-};
diff --git a/usr/src/lib/libpp/sparc/pp.req b/usr/src/lib/libpp/sparc/pp.req
deleted file mode 100644
index 6c6437695b..0000000000
--- a/usr/src/lib/libpp/sparc/pp.req
+++ /dev/null
@@ -1,2 +0,0 @@
- -lpp
- -last
diff --git a/usr/src/lib/libpp/sparc/pp.yacc b/usr/src/lib/libpp/sparc/pp.yacc
deleted file mode 100644
index 1de9080a7a..0000000000
--- a/usr/src/lib/libpp/sparc/pp.yacc
+++ /dev/null
@@ -1 +0,0 @@
-%token /*generated from pp.h*/ T_DOUBLE 292 T_DOUBLE_L 293 T_FLOAT 294 T_DECIMAL 288 T_DECIMAL_L 289 T_DECIMAL_U 290 T_DECIMAL_UL 291 T_OCTAL 296 T_OCTAL_L 297 T_OCTAL_U 298 T_OCTAL_UL 299 T_HEXADECIMAL 304 T_HEXADECIMAL_L 305 T_HEXADECIMAL_U 306 T_HEXADECIMAL_UL 307 T_HEXDOUBLE 308 T_HEXDOUBLE_L 309 T_ID 257 T_INVALID 258 T_CHARCONST 260 T_WCHARCONST 261 T_STRING 262 T_WSTRING 263 T_PTRMEM 264 T_ADDADD 265 T_SUBSUB 266 T_LSHIFT 267 T_RSHIFT 268 T_LE 269 T_GE 270 T_EQ 271 T_NE 272 T_ANDAND 273 T_OROR 274 T_MPYEQ 275 T_DIVEQ 276 T_MODEQ 277 T_ADDEQ 278 T_SUBEQ 279 T_LSHIFTEQ 280 T_RSHIFTEQ 281 T_ANDEQ 282 T_XOREQ 283 T_OREQ 284 T_VARIADIC 286 T_DOTREF 320 T_PTRMEMREF 321 T_SCOPE 322 T_UMINUS 323
diff --git a/usr/src/lib/libpp/sparc/ppdebug.h b/usr/src/lib/libpp/sparc/ppdebug.h
deleted file mode 100644
index 9c9f29e795..0000000000
--- a/usr/src/lib/libpp/sparc/ppdebug.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
-* preprocessor library debug maps
-*/
-struct map
-{
- char* nam;
- long val;
-};
-static struct map pplexmap[] =
-{
- "PROTO", PROTO,
- "RES1", RES1,
- "RES1a", RES1a,
- "RES1e", RES1e,
- "RES1f", RES1f,
- "RES1h", RES1h,
- "RES1l", RES1l,
- "RES1n", RES1n,
- "RES1o", RES1o,
- "RES1t", RES1t,
- "RES1x", RES1x,
- "RES1y", RES1y,
- "COM1", COM1,
- "COM2", COM2,
- "COM3", COM3,
- "COM4", COM4,
- "COM5", COM5,
- "COM6", COM6,
- "COM7", COM7,
- "NID", NID,
- "LIT", LIT,
- "LIT1", LIT1,
- "LIT2", LIT2,
- "BAD1", BAD1,
- "BAD2", BAD2,
- "DOT", DOT,
- "DOT2", DOT2,
- "WS1", WS1,
- "QUICK", QUICK,
- "QTOK", QTOK,
- "QNUM", QNUM,
- "QEXP", QEXP,
- "QCOM", QCOM,
- "QID", QID,
- "MAC0", MAC0,
- "MACN", MACN,
- "HIT0", HIT0,
- "HITN", HITN,
- "LIT0", LIT0,
- "SHARP1", SHARP1,
- "TOKEN", TOKEN,
- "OCT1", OCT1,
- "OCT2", OCT2,
- "OCT3", OCT3,
- "NOT1", NOT1,
- "PCT1", PCT1,
- "AND1", AND1,
- "STAR1", STAR1,
- "PLUS1", PLUS1,
- "MINUS1", MINUS1,
- "ARROW1", ARROW1,
- "COLON1", COLON1,
- "LT1", LT1,
- "LSH1", LSH1,
- "EQ1", EQ1,
- "RSH1", RSH1,
- "GT1", GT1,
- "CIRC1", CIRC1,
- "OR1", OR1,
- "DEC1", DEC1,
- "DEC2", DEC2,
- "HEX1", HEX1,
- "HEX2", HEX2,
- "HEX3", HEX3,
- "HEX4", HEX4,
- "HEX5", HEX5,
- "HEX6", HEX6,
- "HEX7", HEX7,
- "HEX8", HEX8,
- "DBL1", DBL1,
- "DBL2", DBL2,
- "DBL3", DBL3,
- "DBL4", DBL4,
- "DBL5", DBL5,
- "DOT1", DOT1,
- "HDR1", HDR1,
- "BIN1", BIN1,
- "TERMINAL", TERMINAL,
- "S_CHRB", S_CHRB,
- "S_COMMENT", S_COMMENT,
- "S_EOB", S_EOB,
- "S_LITBEG", S_LITBEG,
- "S_LITEND", S_LITEND,
- "S_LITESC", S_LITESC,
- "S_MACRO", S_MACRO,
- "S_NL", S_NL,
- "S_QUAL", S_QUAL,
- "S_SHARP", S_SHARP,
- "S_VS", S_VS,
- "S_CHR", S_CHR,
- "S_HUH", S_HUH,
- "S_TOK", S_TOK,
- "S_TOKB", S_TOKB,
- "S_WS", S_WS,
- "S_RESERVED", S_RESERVED,
-};
-static struct map ppstatemap[] =
-{
- "ADD", ADD,
- "COLLECTING", COLLECTING,
- "COMPATIBILITY", COMPATIBILITY,
- "COMPILE", COMPILE,
- "CONDITIONAL", CONDITIONAL,
- "DEFINITION", DEFINITION,
- "DIRECTIVE", DIRECTIVE,
- "DISABLE", DISABLE,
- "EOF2NL", EOF2NL,
- "ESCAPE", ESCAPE,
- "FILEPOP", FILEPOP,
- "HEADER", HEADER,
- "HIDDEN", HIDDEN,
- "JOINING", JOINING,
- "NEWLINE", NEWLINE,
- "NOEXPAND", NOEXPAND,
- "NOSPACE", NOSPACE,
- "NOTEXT", NOTEXT,
- "NOVERTICAL", NOVERTICAL,
- "PASSEOF", PASSEOF,
- "PASSTHROUGH", PASSTHROUGH,
- "QUOTE", QUOTE,
- "SKIPCONTROL", SKIPCONTROL,
- "SKIPMACRO", SKIPMACRO,
- "SPACEOUT", SPACEOUT,
- "SQUOTE", SQUOTE,
- "STANDALONE", STANDALONE,
- "STRICT", STRICT,
- "STRIP", STRIP,
- "SYNCLINE", SYNCLINE,
- "TRANSITION", TRANSITION,
- "WARN", WARN,
-};
-static struct map ppmodemap[] =
-{
- "ALLMULTIPLE", ALLMULTIPLE,
- "BUILTIN", BUILTIN,
- "CATLITERAL", CATLITERAL,
- "DUMP", DUMP,
- "EXPOSE", EXPOSE,
- "EXTERNALIZE", EXTERNALIZE,
- "FILEDEPS", FILEDEPS,
- "GENDEPS", GENDEPS,
- "HEADERDEPS", HEADERDEPS,
- "HOSTED", HOSTED,
- "HOSTEDTRANSITION", HOSTEDTRANSITION,
- "INACTIVE", INACTIVE,
- "INIT", INIT,
- "LOADING", LOADING,
- "MARKC", MARKC,
- "MARKHOSTED", MARKHOSTED,
- "MARKMACRO", MARKMACRO,
- "PEDANTIC", PEDANTIC,
- "READONLY", READONLY,
- "RELAX", RELAX,
-};
-static struct map ppoptionmap[] =
-{
- "ELSEIF", ELSEIF,
- "FINAL", FINAL,
- "HEADEREXPAND", HEADEREXPAND,
- "HEADEREXPANDALL", HEADEREXPANDALL,
- "IGNORELINE", IGNORELINE,
- "INITIAL", INITIAL,
- "KEEPNOTEXT", KEEPNOTEXT,
- "KEYARGS", KEYARGS,
- "MODERN", MODERN,
- "NATIVE", NATIVE,
- "NOHASH", NOHASH,
- "NOISE", NOISE,
- "NOISEFILTER", NOISEFILTER,
- "NOPROTO", NOPROTO,
- "PLUSCOMMENT", PLUSCOMMENT,
- "PLUSPLUS", PLUSPLUS,
- "PLUSSPLICE", PLUSSPLICE,
- "PRAGMAEXPAND", PRAGMAEXPAND,
- "PREDEFINED", PREDEFINED,
- "PREDEFINITIONS", PREDEFINITIONS,
- "PREFIX", PREFIX,
- "PRESERVE", PRESERVE,
- "PROTOTYPED", PROTOTYPED,
- "REGUARD", REGUARD,
- "SPLICECAT", SPLICECAT,
- "SPLICESPACE", SPLICESPACE,
- "STRINGSPAN", STRINGSPAN,
- "STRINGSPLIT", STRINGSPLIT,
- "TRUNCATE", TRUNCATE,
- "ZEOF", ZEOF,
-};
-static struct map ppinmap[] =
-{
- "BUFFER", IN_BUFFER,
- "COPY", IN_COPY,
- "EXPAND", IN_EXPAND,
- "FILE", IN_FILE,
- "INIT", IN_INIT,
- "MACRO", IN_MACRO,
- "MULTILINE", IN_MULTILINE,
- "QUOTE", IN_QUOTE,
- "RESCAN", IN_RESCAN,
- "SQUOTE", IN_SQUOTE,
- "STRING", IN_STRING,
-};
diff --git a/usr/src/lib/libpp/sparc/ppdef.h b/usr/src/lib/libpp/sparc/ppdef.h
deleted file mode 100644
index 6cb3481f8b..0000000000
--- a/usr/src/lib/libpp/sparc/ppdef.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- *
- * Glenn Fowler
- * AT&T Research
- *
- * @(#)pp.tab (AT&T Labs Research) 2006-05-09
- *
- * C preprocessor tables and states
- *
- * + marks extensions to the standard
- *
- */
-
-#define DEFINE 1
-#define ELIF 2
-#define ELSE 3
-#define ENDIF 4
-#define ENDMAC 5
-#define ERROR 6
-#define IF 7
-#define IFDEF 8
-#define IFNDEF 9
-#define INCLUDE 10
-#define LET 11
-#define LINE 12
-#define MACDEF 13
-#define PRAGMA 14
-#define RENAME 15
-#define UNDEF 16
-#define WARNING 17
-
-#define X_ALLMULTIPLE 1
-#define X_ALLPOSSIBLE 2
-#define X_BUILTIN 3
-#define X_CATLITERAL 4
-#define X_CDIR 5
-#define X_CHECKPOINT 6
-#define X_CHOP 7
-#define X_COMPATIBILITY 8
-#define X_DEBUG 9
-#define X_ELSEIF 10
-#define X_EXTERNALIZE 11
-#define X_FINAL 12
-#define X_HIDE 13
-#define X_HEADEREXPAND 14
-#define X_HEADEREXPANDALL 15
-#define X_HOSTED 16
-#define X_HOSTEDTRANSITION 17
-#define X_HOSTDIR 18
-#define X_ID 19
-#define X_IGNORE 20
-#define X_INCLUDE 21
-#define X_INITIAL 22
-#define X_KEYARGS 23
-#define X_LINE 24
-#define X_LINEBASE 25
-#define X_LINEFILE 26
-#define X_LINEID 27
-#define X_LINETYPE 28
-#define X_MACREF 29
-#define X_MAP 30
-#define X_MAPINCLUDE 31
-#define X_MODERN 32
-#define X_MULTIPLE 33
-#define X_NATIVE 34
-#define X_NOTE 35
-#define X_OPSPACE 36
-#define X_PASSTHROUGH 37
-#define X_PEDANTIC 38
-#define X_PLUSCOMMENT 39
-#define X_PLUSPLUS 40
-#define X_PLUSSPLICE 41
-#define X_PRAGMAFLAGS 42
-#define X_PRAGMAEXPAND 43
-#define X_PREDEFINED 44
-#define X_PREFIX 45
-#define X_PRESERVE 46
-#define X_PROTO 47
-#define X_PROTOTYPED 48
-#define X_QUOTE 49
-#define X_READONLY 50
-#define X_REGUARD 51
-#define X_RESERVED 52
-#define X_SPACEOUT 53
-#define X_SPLICECAT 54
-#define X_SPLICESPACE 55
-#define X_STANDARD 56
-#define X_STATEMENT 57
-#define X_STRICT 58
-#define X_STRINGSPAN 59
-#define X_STRINGSPLIT 60
-#define X_SYSTEM_HEADER 61
-#define X_TEST 62
-#define X_TEXT 63
-#define X_TRANSITION 64
-#define X_TRUNCATE 65
-#define X_VENDOR 66
-#define X_VERSION 67
-#define X_WARN 68
-#define X_ZEOF 69
-#define X_last_option 69
-
-#define X_DEFINED 70
-#define X_EXISTS 71
-#define X_INCLUDED 72
-#define X_MATCH 73
-#define X_NOTICED 74
-#define X_OPTION 75
-#define X_SIZEOF 76
-#define X_STRCMP 77
-
-#define R_DEFINED 1
-
-#define ADD (1<<0)
-#define COLLECTING (1<<1)
-#define COMPATIBILITY (1<<2)
-#define COMPILE (1<<3)
-#define CONDITIONAL (1<<4)
-#define DEFINITION (1<<5)
-#define DIRECTIVE (1<<6)
-#define DISABLE (1<<7)
-#define EOF2NL (1<<8)
-#define ESCAPE (1<<9)
-#define FILEPOP (1<<10)
-#define HEADER (1<<11)
-#define HIDDEN (1<<12)
-#define JOINING (1<<13)
-#define NEWLINE (1<<14)
-#define NOEXPAND (1L<<15)
-#define NOSPACE (1L<<16)
-#define NOTEXT (1L<<17)
-#define NOVERTICAL (1L<<18)
-#define PASSEOF (1L<<19)
-#define PASSTHROUGH (1L<<20)
-#define QUOTE (1L<<21)
-#define SKIPCONTROL (1L<<22)
-#define SKIPMACRO (1L<<23)
-#define SPACEOUT (1L<<24)
-#define SQUOTE (1L<<25)
-#define STANDALONE (1L<<26)
-#define STRICT (1L<<27)
-#define STRIP (1L<<28)
-#define SYNCLINE (1L<<29)
-#define TRANSITION (1L<<30)
-#define WARN (1L<<31)
-
-#define ALLMULTIPLE (1<<0)
-#define BUILTIN (1<<1)
-#define CATLITERAL (1<<2)
-#define DUMP (1<<3)
-#define EXPOSE (1<<4)
-#define EXTERNALIZE (1<<5)
-#define FILEDEPS (1<<6)
-#define GENDEPS (1<<7)
-#define HEADERDEPS (1<<8)
-#define HOSTED (1<<9)
-#define HOSTEDTRANSITION (1<<10)
-#define INACTIVE (1<<11)
-#define INIT (1<<12)
-#define LOADING (1<<13)
-#define MARKC (1<<14)
-#define MARKHOSTED (1L<<15)
-#define MARKMACRO (1L<<16)
-#define PEDANTIC (1L<<17)
-#define READONLY (1L<<18)
-#define RELAX (1L<<19)
-
-#define ALLPOSSIBLE (1<<0)
-#define DEFINITIONS (1<<1)
-#define ELSEIF (1<<2)
-#define FINAL (1<<3)
-#define HEADEREXPAND (1<<4)
-#define HEADEREXPANDALL (1<<5)
-#define IGNORELINE (1<<6)
-#define INITIAL (1<<7)
-#define KEEPNOTEXT (1<<8)
-#define KEYARGS (1<<9)
-#define MODERN (1<<10)
-#define NATIVE (1<<11)
-#define NOHASH (1<<12)
-#define NOISE (1<<13)
-#define NOISEFILTER (1<<14)
-#define NOPROTO (1L<<15)
-#define PLUSCOMMENT (1L<<16)
-#define PLUSPLUS (1L<<17)
-#define PLUSSPLICE (1L<<18)
-#define PRAGMAEXPAND (1L<<19)
-#define PREDEFINED (1L<<20)
-#define PREDEFINITIONS (1L<<21)
-#define PREFIX (1L<<22)
-#define PRESERVE (1L<<23)
-#define PROTOTYPED (1L<<24)
-#define REGUARD (1L<<25)
-#define SPLICECAT (1L<<26)
-#define SPLICESPACE (1L<<27)
-#define STRINGSPAN (1L<<28)
-#define STRINGSPLIT (1L<<29)
-#define TRUNCATE (1L<<30)
-#define ZEOF (1L<<31)
-
-#define V__PRAGMA 78
-#define V_ARGC 79
-#define V_BASE 80
-#define V_DATE 81
-#define V_FILE 82
-#define V_FUNCTION 83
-#define V_LINE 84
-#define V_PATH 85
-#define V_SOURCE 86
-#define V_STDC 87
-#define V_TIME 88
-#define V_VERSION 89
-#define V_DEFAULT 90
-#define V_DIRECTIVE 91
-#define V_EMPTY 92
-#define V_GETENV 93
-#define V_GETMAC 94
-#define V_GETOPT 95
-#define V_GETPRD 96
-#define V_ITERATE 97
diff --git a/usr/src/lib/libpp/sparc/pptab.h b/usr/src/lib/libpp/sparc/pptab.h
deleted file mode 100644
index d153e8e65c..0000000000
--- a/usr/src/lib/libpp/sparc/pptab.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- *
- * Glenn Fowler
- * AT&T Research
- *
- * @(#)pp.tab (AT&T Labs Research) 2006-05-09
- *
- * C preprocessor tables and states
- *
- * + marks extensions to the standard
- *
- */
-
-static struct ppkeyword directives[] =
-{
- "define", DEFINE,
- "elif", ELIF,
- "else", ELSE,
- "endif", ENDIF,
- "+endmac", ENDMAC,
- "error", ERROR,
- "if", IF,
- "ifdef", IFDEF,
- "ifndef", IFNDEF,
- "include", INCLUDE,
- "+let", LET,
- "line", LINE,
- "+macdef", MACDEF,
- "pragma", PRAGMA,
- "+rename", RENAME,
- "undef", UNDEF,
- "+warning", WARNING,
- 0, 0
-};
-
-static struct ppkeyword options[] =
-{
- "allmultiple", X_ALLMULTIPLE,
- "allpossible", X_ALLPOSSIBLE,
- "builtin", X_BUILTIN,
- "catliteral", X_CATLITERAL,
- "cdir", X_CDIR,
- "checkpoint", X_CHECKPOINT,
- "chop", X_CHOP,
- "compatibility", X_COMPATIBILITY,
- "debug", X_DEBUG,
- "elseif", X_ELSEIF,
- "externalize", X_EXTERNALIZE,
- "final", X_FINAL,
- "hide", X_HIDE,
- "headerexpand", X_HEADEREXPAND,
- "headerexpandall", X_HEADEREXPANDALL,
- "hosted", X_HOSTED,
- "hostedtransition", X_HOSTEDTRANSITION,
- "hostdir", X_HOSTDIR,
- "id", X_ID,
- "ignore", X_IGNORE,
- "include", X_INCLUDE,
- "initial", X_INITIAL,
- "keyargs", X_KEYARGS,
- "line", X_LINE,
- "linebase", X_LINEBASE,
- "linefile", X_LINEFILE,
- "lineid", X_LINEID,
- "linetype", X_LINETYPE,
- "macref", X_MACREF,
- "map", X_MAP,
- "mapinclude", X_MAPINCLUDE,
- "modern", X_MODERN,
- "multiple", X_MULTIPLE,
- "native", X_NATIVE,
- "note", X_NOTE,
- "opspace", X_OPSPACE,
- "passthrough", X_PASSTHROUGH,
- "pedantic", X_PEDANTIC,
- "pluscomment", X_PLUSCOMMENT,
- "plusplus", X_PLUSPLUS,
- "plussplice", X_PLUSSPLICE,
- "pragmaflags", X_PRAGMAFLAGS,
- "pragmaexpand", X_PRAGMAEXPAND,
- "predefined", X_PREDEFINED,
- "prefix", X_PREFIX,
- "preserve", X_PRESERVE,
- "proto", X_PROTO,
- "prototyped", X_PROTOTYPED,
- "quote", X_QUOTE,
- "readonly", X_READONLY,
- "reguard", X_REGUARD,
- "reserved", X_RESERVED,
- "spaceout", X_SPACEOUT,
- "splicecat", X_SPLICECAT,
- "splicespace", X_SPLICESPACE,
- "standard", X_STANDARD,
- "statement", X_STATEMENT,
- "strict", X_STRICT,
- "stringspan", X_STRINGSPAN,
- "stringsplit", X_STRINGSPLIT,
- "system_header", X_SYSTEM_HEADER,
- "test", X_TEST,
- "text", X_TEXT,
- "transition", X_TRANSITION,
- "truncate", X_TRUNCATE,
- "vendor", X_VENDOR,
- "version", X_VERSION,
- "warn", X_WARN,
- "zeof", X_ZEOF,
- 0, 0
-};
-
-static struct ppkeyword predicates[] =
-{
- "defined", X_DEFINED,
- "+exists", X_EXISTS,
- "+included", X_INCLUDED,
- "+match", X_MATCH,
- "+noticed", X_NOTICED,
- "+option", X_OPTION,
- "sizeof", X_SIZEOF,
- "+strcmp", X_STRCMP,
- 0, 0
-};
-
-static struct ppkeyword readonlys[] =
-{
- "defined", R_DEFINED,
- 0, 0
-};
-
-static struct ppkeyword variables[] =
-{
- "_Pragma", V__PRAGMA,
- "+ARGC", V_ARGC,
- "+BASE", V_BASE,
- "DATE", V_DATE,
- "FILE", V_FILE,
- "+FUNCTION", V_FUNCTION,
- "LINE", V_LINE,
- "+PATH", V_PATH,
- "+SOURCE", V_SOURCE,
- "-STDC", V_STDC,
- "TIME", V_TIME,
- "+VERSION", V_VERSION,
- "-default", V_DEFAULT,
- "-directive", V_DIRECTIVE,
- "-empty", V_EMPTY,
- "-getenv", V_GETENV,
- "-getmac", V_GETMAC,
- "-getopt", V_GETOPT,
- "-getprd", V_GETPRD,
- "-iterate", V_ITERATE,
- 0, 0
-};
diff --git a/usr/src/lib/libshell/Makefile.com b/usr/src/lib/libshell/Makefile.com
deleted file mode 100644
index 9880bf8e12..0000000000
--- a/usr/src/lib/libshell/Makefile.com
+++ /dev/null
@@ -1,174 +0,0 @@
-#
-# 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) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2019, Joyent, Inc.
-#
-
-SHELL=/usr/bin/ksh93
-
-LIBRARY= libshell.a
-VERS= .1
-
-OBJECTS= \
- bltins/alarm.o \
- bltins/cd_pwd.o \
- bltins/cflow.o \
- bltins/enum.o \
- bltins/getopts.o \
- bltins/hist.o \
- bltins/misc.o \
- bltins/poll_solaris.o \
- bltins/print.o \
- bltins/read.o \
- bltins/regress.o \
- bltins/shiocmd_solaris.o \
- bltins/sleep.o \
- bltins/test.o \
- bltins/trap.o \
- bltins/typeset.o \
- bltins/ulimit.o \
- bltins/umask.o \
- bltins/whence.o \
- data/aliases.o \
- data/builtins.o \
- data/keywords.o \
- data/lexstates.o \
- data/limits.o \
- data/msg.o \
- data/options.o \
- data/signals.o \
- data/strdata.o \
- data/testops.o \
- data/variables.o \
- edit/completion.o \
- edit/edit.o \
- edit/emacs.o \
- edit/hexpand.o \
- edit/history.o \
- edit/vi.o \
- sh/args.o \
- sh/arith.o \
- sh/array.o \
- sh/defs.o \
- sh/deparse.o \
- sh/expand.o \
- sh/fault.o \
- sh/fcin.o \
- sh/init.o \
- sh/io.o \
- sh/jobs.o \
- sh/lex.o \
- sh/macro.o \
- sh/main.o \
- sh/name.o \
- sh/nvdisc.o \
- sh/nvtree.o \
- sh/nvtype.o \
- sh/parse.o \
- sh/path.o \
- sh/streval.o \
- sh/string.o \
- sh/subshell.o \
- sh/tdump.o \
- sh/timers.o \
- sh/trestore.o \
- sh/waitevent.o \
- sh/xec.o
-
-# We are storing the object files into subdirs avoid the
-# confusion with having too many object files in the toplevel pics/
-# directory (this matches the way how the original AST build system
-# deals with this "logistic" issue) - the rules below ensure that
-# the destination directory is available.
-OBJDIRS = \
- bltins \
- data \
- edit \
- sh
-PICSDIRS= $(OBJDIRS:%=pics/%)
-mkpicdirs:
- @mkdir -p $(PICSDIRS)
-
-# Specify the MACH we currently use to build and test ksh
-LIBSHELLMACH= $(TARGETMACH)
-LIBSHELLBASE=..
-
-include ../../Makefile.astmsg
-
-include ../../Makefile.lib
-
-# mapfile-vers does not live with the sources in in common/ to make
-# automated code updates easier.
-MAPFILES= ../mapfile-vers
-
-# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
-include ../../../Makefile.ast
-
-LIBS = $(DYNLIB)
-
-LDLIBS += \
- -lcmd \
- -ldll \
- -last \
- -lsocket \
- -lm \
- -lc
-
-
-SRCDIR = ../common
-
-# 1. Make sure that the -D/-U defines in CPPFLAGS below are in sync
-# with usr/src/cmd/ksh/Makefile.com
-# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
-# case - it MUST come as the last element but future changes in -D options
-# may then cause silent breakage in the AST sources because the last -D
-# option specified overrides previous -D options so we prefer the current
-# way to explicitly list each single flag.
-CPPFLAGS = \
- $(DTEXTDOM) $(DTS_ERRNO) \
- $(LIBSHELLCPPFLAGS)
-
-CFLAGS += \
- $(ASTCFLAGS)
-CFLAGS64 += \
- $(ASTCFLAGS64)
-
-CERRWARN += -_gcc=-Wno-parentheses
-CERRWARN += -_gcc=-Wno-unused-value
-CERRWARN += -_gcc=-Wno-unused-variable
-CERRWARN += -_gcc=-Wno-unused-function
-CERRWARN += $(CNOWARN_UNINIT)
-CERRWARN += -_gcc=-Wno-clobbered
-CERRWARN += -_gcc=-Wno-char-subscripts
-
-# smatch gets out of memory on common/sh/macro.c
-SMATCH = off
-
-pics/sh/macro.o := CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
-pics/sh/nvdisc.o := CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
-
-.KEEP_STATE:
-
-all: mkpicdirs .WAIT $(LIBS)
-
-include ../../Makefile.targ
diff --git a/usr/src/lib/libshell/THIRDPARTYLICENSE b/usr/src/lib/libshell/THIRDPARTYLICENSE
deleted file mode 100644
index 50c6364c06..0000000000
--- a/usr/src/lib/libshell/THIRDPARTYLICENSE
+++ /dev/null
@@ -1,245 +0,0 @@
-+------------------------------------------------------------------------------+
-| This license covers all software that refers to the URL |
-| http://www.opensource.org/licenses/cpl1.0.txt |
-+------------------------------------------------------------------------------+
-
-Common Public License Version 1.0
-
- THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
- PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
- THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
- 1. DEFINITIONS
-
- "Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and
- documentation distributed under this Agreement, and
-
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from
- and are distributed by that particular Contributor. A Contribution
- 'originates' from a Contributor if it was added to the Program by
- such Contributor itself or anyone acting on such Contributor's
- behalf. Contributions do not include additions to the Program
- which: (i) are separate modules of software distributed in
- conjunction with the Program under their own license agreement, and
- (ii) are not derivative works of the Program.
-
- "Contributor" means any person or entity that distributes the Program.
-
- "Licensed Patents " mean patent claims licensable by a Contributor
- which are necessarily infringed by the use or sale of its Contribution
- alone or when combined with the Program.
-
- "Program" means the Contributions distributed in accordance with this
- Agreement.
-
- "Recipient" means anyone who receives the Program under this
- Agreement, including all Contributors.
-
- 2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free copyright
- license to reproduce, prepare derivative works of, publicly
- display, publicly perform, distribute and sublicense the
- Contribution of such Contributor, if any, and such derivative
- works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free patent
- license under Licensed Patents to make, use, sell, offer to sell,
- import and otherwise transfer the Contribution of such Contributor,
- if any, in source code and object code form. This patent license
- shall apply to the combination of the Contribution and the Program
- if, at the time the Contribution is added by the Contributor, such
- addition of the Contribution causes such combination to be covered
- by the Licensed Patents. The patent license shall not apply to any
- other combinations which include the Contribution. No hardware per
- se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the
- licenses to its Contributions set forth herein, no assurances are
- provided by any Contributor that the Program does not infringe the
- patent or other intellectual property rights of any other entity.
- Each Contributor disclaims any liability to Recipient for claims
- brought by any other entity based on infringement of intellectual
- property rights or otherwise. As a condition to exercising the
- rights and licenses granted hereunder, each Recipient hereby
- assumes sole responsibility to secure any other intellectual
- property rights needed, if any. For example, if a third party
- patent license is required to allow Recipient to distribute the
- Program, it is Recipient's responsibility to acquire that license
- before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has
- sufficient copyright rights in its Contribution, if any, to grant
- the copyright license set forth in this Agreement.
-
- 3. REQUIREMENTS
-
- A Contributor may choose to distribute the Program in object code form
- under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all
- warranties and conditions, express and implied, including
- warranties or conditions of title and non-infringement, and implied
- warranties or conditions of merchantability and fitness for a
- particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all
- liability for damages, including direct, indirect, special,
- incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement
- are offered by that Contributor alone and not by any other party;
- and
-
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software
- exchange.
-
- When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the
- Program.
-
- Contributors may not remove or alter any copyright notices contained
- within the Program.
-
- Each Contributor must identify itself as the originator of its
- Contribution, if any, in a manner that reasonably allows subsequent
- Recipients to identify the originator of the Contribution.
-
- 4. COMMERCIAL DISTRIBUTION
-
- Commercial distributors of software may accept certain
- responsibilities with respect to end users, business partners and the
- like. While this license is intended to facilitate the commercial use
- of the Program, the Contributor who includes the Program in a
- commercial product offering should do so in a manner which does not
- create potential liability for other Contributors. Therefore, if a
- Contributor includes the Program in a commercial product offering,
- such Contributor ("Commercial Contributor") hereby agrees to defend
- and indemnify every other Contributor ("Indemnified Contributor")
- against any losses, damages and costs (collectively "Losses") arising
- from claims, lawsuits and other legal actions brought by a third party
- against the Indemnified Contributor to the extent caused by the acts
- or omissions of such Commercial Contributor in connection with its
- distribution of the Program in a commercial product offering. The
- obligations in this section do not apply to any claims or Losses
- relating to any actual or alleged intellectual property infringement.
- In order to qualify, an Indemnified Contributor must: a) promptly
- notify the Commercial Contributor in writing of such claim, and b)
- allow the Commercial Contributor to control, and cooperate with the
- Commercial Contributor in, the defense and any related settlement
- negotiations. The Indemnified Contributor may participate in any such
- claim at its own expense.
-
- For example, a Contributor might include the Program in a commercial
- product offering, Product X. That Contributor is then a Commercial
- Contributor. If that Commercial Contributor then makes performance
- claims, or offers warranties related to Product X, those performance
- claims and warranties are such Commercial Contributor's responsibility
- alone. Under this section, the Commercial Contributor would have to
- defend claims against the other Contributors related to those
- performance claims and warranties, and if a court requires any other
- Contributor to pay any damages as a result, the Commercial Contributor
- must pay those damages.
-
- 5. NO WARRANTY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
- PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
- WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
- OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
- responsible for determining the appropriateness of using and
- distributing the Program and assumes all risks associated with its
- exercise of rights under this Agreement, including but not limited to
- the risks and costs of program errors, compliance with applicable
- laws, damage to or loss of data, programs or equipment, and
- unavailability or interruption of operations.
-
- 6. DISCLAIMER OF LIABILITY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
- ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
- WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
- DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
- HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 7. GENERAL
-
- If any provision of this Agreement is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability of
- the remainder of the terms of this Agreement, and without further
- action by the parties hereto, such provision shall be reformed to the
- minimum extent necessary to make such provision valid and enforceable.
-
- If Recipient institutes patent litigation against a Contributor with
- respect to a patent applicable to software (including a cross-claim or
- counterclaim in a lawsuit), then any patent licenses granted by that
- Contributor to such Recipient under this Agreement shall terminate as
- of the date such litigation is filed. In addition, if Recipient
- institutes patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Program
- itself (excluding combinations of the Program with other software or
- hardware) infringes such Recipient's patent(s), then such Recipient's
- rights granted under Section 2(b) shall terminate as of the date such
- litigation is filed.
-
- All Recipient's rights under this Agreement shall terminate if it
- fails to comply with any of the material terms or conditions of this
- Agreement and does not cure such failure in a reasonable period of
- time after becoming aware of such noncompliance. If all Recipient's
- rights under this Agreement terminate, Recipient agrees to cease use
- and distribution of the Program as soon as reasonably practicable.
- However, Recipient's obligations under this Agreement and any licenses
- granted by Recipient relating to the Program shall continue and
- survive.
-
- Everyone is permitted to copy and distribute copies of this Agreement,
- but in order to avoid inconsistency the Agreement is copyrighted and
- may only be modified in the following manner. The Agreement Steward
- reserves the right to publish new versions (including revisions) of
- this Agreement from time to time. No one other than the Agreement
- Steward has the right to modify this Agreement. IBM is the initial
- Agreement Steward. IBM may assign the responsibility to serve as the
- Agreement Steward to a suitable separate entity. Each new version of
- the Agreement will be given a distinguishing version number. The
- Program (including Contributions) may always be distributed subject to
- the version of the Agreement under which it was received. In addition,
- after a new version of the Agreement is published, Contributor may
- elect to distribute the Program (including its Contributions) under
- the new version. Except as expressly stated in Sections 2(a) and 2(b)
- above, Recipient receives no rights or licenses to the intellectual
- property of any Contributor under this Agreement, whether expressly,
- by implication, estoppel or otherwise. All rights in the Program not
- expressly granted under this Agreement are reserved.
-
- This Agreement is governed by the laws of the State of New York and
- the intellectual property laws of the United States of America. No
- party to this Agreement will bring a legal action under this Agreement
- more than one year after the cause of action arose. Each party waives
- its rights to a jury trial in any resulting litigation.
-
-Copyright (c) 2004 by the Open Source Initiative
-This is a copy of the license posted on 2004-10-06 at:
- http://www.opensource.org/licenses/cpl
diff --git a/usr/src/lib/libshell/THIRDPARTYLICENSE.descrip b/usr/src/lib/libshell/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index 72b0590dc6..0000000000
--- a/usr/src/lib/libshell/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-PORTIONS OF AT&T KSH93 SOFTWARE (LIBSHELL)
diff --git a/usr/src/lib/libshell/amd64/include/ast/history.h b/usr/src/lib/libshell/amd64/include/ast/history.h
deleted file mode 100644
index 1b0f3ce403..0000000000
--- a/usr/src/lib/libshell/amd64/include/ast/history.h
+++ /dev/null
@@ -1,84 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef HIST_VERSION
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * Interface for history mechanism
- * written by David Korn
- *
- */
-
-#include <ast.h>
-
-#define HIST_CHAR '!'
-#define HIST_VERSION 1 /* history file format version no. */
-
-typedef struct
-{
- Sfdisc_t histdisc; /* discipline for history */
- Sfio_t *histfp; /* history file stream pointer */
- char *histname; /* name of history file */
- int32_t histind; /* current command number index */
- int histsize; /* number of accessible history lines */
-#ifdef _HIST_PRIVATE
- _HIST_PRIVATE
-#endif /* _HIST_PRIVATE */
-} History_t;
-
-typedef struct
-{
- int hist_command;
- int hist_line;
- int hist_char;
-} Histloc_t;
-
-/* the following are readonly */
-extern __MANGLE__ const char hist_fname[];
-
-extern __MANGLE__ int _Hist;
-#define hist_min(hp) ((_Hist=((int)((hp)->histind-(hp)->histsize)))>=0?_Hist:0)
-#define hist_max(hp) ((int)((hp)->histind))
-/* these are the history interface routines */
-extern __MANGLE__ int sh_histinit __PROTO__((__V_ *));
-extern __MANGLE__ void hist_cancel __PROTO__((History_t*));
-extern __MANGLE__ void hist_close __PROTO__((History_t*));
-extern __MANGLE__ int hist_copy __PROTO__((char*, int, int, int));
-extern __MANGLE__ void hist_eof __PROTO__((History_t*));
-extern __MANGLE__ Histloc_t hist_find __PROTO__((History_t*,char*,int, int, int));
-extern __MANGLE__ void hist_flush __PROTO__((History_t*));
-extern __MANGLE__ void hist_list __PROTO__((History_t*,Sfio_t*, off_t, int, char*));
-extern __MANGLE__ int hist_match __PROTO__((History_t*,off_t, char*, int*));
-extern __MANGLE__ off_t hist_tell __PROTO__((History_t*,int));
-extern __MANGLE__ off_t hist_seek __PROTO__((History_t*,int));
-extern __MANGLE__ char *hist_word __PROTO__((char*, int, int));
-#if SHOPT_ESH
- extern __MANGLE__ Histloc_t hist_locate __PROTO__((History_t*,int, int, int));
-#endif /* SHOPT_ESH */
-
-#endif /* HIST_VERSION */
diff --git a/usr/src/lib/libshell/amd64/include/ast/nval.h b/usr/src/lib/libshell/amd64/include/ast/nval.h
deleted file mode 100644
index f5be4fa865..0000000000
--- a/usr/src/lib/libshell/amd64/include/ast/nval.h
+++ /dev/null
@@ -1,323 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef NV_DEFAULT
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * David Korn
- * AT&T Labs
- *
- * Interface definitions of structures for name-value pairs
- * These structures are used for named variables, functions and aliases
- *
- */
-
-
-#include <ast.h>
-#include <cdt.h>
-#include <option.h>
-
-/* for compatibility with old hash library */
-#define Hashtab_t Dt_t
-#define HASH_BUCKET 1
-#define HASH_NOSCOPE 2
-#define HASH_SCOPE 4
-#define hashscope(x) dtvnext(x)
-
-typedef struct Namval Namval_t;
-typedef struct Namfun Namfun_t;
-typedef struct Namdisc Namdisc_t;
-typedef struct Nambfun Nambfun_t;
-typedef struct Namarray Namarr_t;
-typedef struct Namdecl Namdecl_t;
-
-/*
- * This defines the template for nodes that have their own assignment
- * and or lookup functions
- */
-struct Namdisc
-{
- size_t dsize;
- void (*putval) __PROTO__((Namval_t*, const char*, int, Namfun_t*));
- char *(*getval) __PROTO__((Namval_t*, Namfun_t*));
- Sfdouble_t (*getnum) __PROTO__((Namval_t*, Namfun_t*));
- char *(*setdisc) __PROTO__((Namval_t*, const char*, Namval_t*, Namfun_t*));
- Namval_t *(*createf) __PROTO__((Namval_t*, const char*, int, Namfun_t*));
- Namfun_t *(*clonef) __PROTO__((Namval_t*, Namval_t*, int, Namfun_t*));
- char *(*namef) __PROTO__((Namval_t*, Namfun_t*));
- Namval_t *(*nextf) __PROTO__((Namval_t*, Dt_t*, Namfun_t*));
- Namval_t *(*typef) __PROTO__((Namval_t*, Namfun_t*));
- int (*readf) __PROTO__((Namval_t*, Sfio_t*, int, Namfun_t*));
- int (*writef) __PROTO__((Namval_t*, Sfio_t*, int, Namfun_t*));
-};
-
-struct Namfun
-{
- const Namdisc_t *disc;
- char nofree;
- unsigned char subshell;
- unsigned short dsize;
- Namfun_t *next;
- char *last;
- Namval_t *type;
-};
-
-struct Nambfun
-{
- Namfun_t fun;
- int num;
- const char **bnames;
- Namval_t *bltins[1];
-};
-
-/* This is an array template header */
-struct Namarray
-{
- Namfun_t hdr;
- long nelem; /* number of elements */
- __V_ *(*fun) __PROTO__((Namval_t*,const char*,int)); /* associative arrays */
- Namval_t *parent; /* for multi-dimensional */
- Dt_t *table; /* for subscripts */
- __V_ *scope; /* non-zerp when scoped */
-};
-
-/* The context pointer for declaration command */
-struct Namdecl
-{
- Namval_t *tp; /* point to type */
- const char *optstring;
- __V_ *optinfof;
-};
-
-/* attributes of name-value node attribute flags */
-
-#define NV_DEFAULT 0
-/* This defines the attributes for an attributed name-value pair node */
-struct Namval
-{
- Dtlink_t nvlink; /* space for cdt links */
- char *nvname; /* pointer to name of the node */
- unsigned short nvflag; /* attributes */
- unsigned short nvsize; /* size or base */
-#ifdef _NV_PRIVATE
- _NV_PRIVATE
-#else
- Namfun_t *nvfun;
- char *nvalue;
- char *nvprivate;
-#endif /* _NV_PRIVATE */
-};
-
-#define NV_CLASS ".sh.type"
-#define NV_DATA "_" /* special class or instance variable */
-#define NV_MINSZ (sizeof(struct Namval)-sizeof(Dtlink_t)-sizeof(char*))
-#define nv_namptr(p,n) ((Namval_t*)((char*)(p)+(n)*NV_MINSZ-sizeof(Dtlink_t)))
-
-/* The following attributes are for internal use */
-#define NV_NOFREE 0x200 /* don't free the space when releasing value */
-#define NV_ARRAY 0x400 /* node is an array */
-#define NV_REF 0x4000 /* reference bit */
-#define NV_TABLE 0x800 /* node is a dictionary table */
-#define NV_IMPORT 0x1000 /* value imported from environment */
-#define NV_MINIMAL NV_IMPORT /* node does not contain all fields */
-
-#define NV_INTEGER 0x2 /* integer attribute */
-/* The following attributes are valid only when NV_INTEGER is off */
-#define NV_LTOU 0x4 /* convert to uppercase */
-#define NV_UTOL 0x8 /* convert to lowercase */
-#define NV_ZFILL 0x10 /* right justify and fill with leading zeros */
-#define NV_RJUST 0x20 /* right justify and blank fill */
-#define NV_LJUST 0x40 /* left justify and blank fill */
-#define NV_BINARY 0x100 /* fixed size data buffer */
-#define NV_RAW NV_LJUST /* used only with NV_BINARY */
-#define NV_HOST (NV_RJUST|NV_LJUST) /* map to host filename */
-
-/* The following attributes do not effect the value */
-#define NV_RDONLY 0x1 /* readonly bit */
-#define NV_EXPORT 0x2000 /* export bit */
-#define NV_TAGGED 0x8000 /* user define tag bit */
-
-/* The following are used with NV_INTEGER */
-#define NV_SHORT (NV_RJUST) /* when integers are not long */
-#define NV_LONG (NV_UTOL) /* for long long and long double */
-#define NV_UNSIGN (NV_LTOU) /* for unsigned quantities */
-#define NV_DOUBLE (NV_INTEGER|NV_ZFILL) /* for floating point */
-#define NV_EXPNOTE (NV_LJUST) /* for scientific notation */
-#define NV_HEXFLOAT (NV_LTOU) /* for C99 base16 float notation */
-
-/* options for nv_open */
-
-#define NV_APPEND 0x10000 /* append value */
-#define NV_MOVE 0x8000000 /* for use with nv_clone */
-#define NV_ADD 8
- /* add node if not found */
-#define NV_ASSIGN NV_NOFREE /* assignment is possible */
-#define NV_NOASSIGN 0 /* backward compatibility */
-#define NV_NOARRAY 0x200000 /* array name not possible */
-#define NV_IARRAY 0x400000 /* for indexed array */
-#define NV_NOREF NV_REF /* don't follow reference */
-#define NV_IDENT 0x80 /* name must be identifier */
-#define NV_VARNAME 0x20000 /* name must be ?(.)id*(.id) */
-#define NV_NOADD 0x40000 /* do not add node */
-#define NV_NOSCOPE 0x80000 /* look only in current scope */
-#define NV_NOFAIL 0x100000 /* return 0 on failure, no msg */
-#define NV_NODISC NV_IDENT /* ignore disciplines */
-
-#define NV_FUNCT NV_IDENT /* option for nv_create */
-#define NV_BLTINOPT NV_ZFILL /* mark builtins in libcmd */
-
-#define NV_PUBLIC (~(NV_NOSCOPE|NV_ASSIGN|NV_IDENT|NV_VARNAME|NV_NOADD))
-
-/* numeric types */
-#define NV_INT16P (NV_LJUST|NV_SHORT|NV_INTEGER)
-#define NV_INT16 (NV_SHORT|NV_INTEGER)
-#define NV_UINT16 (NV_UNSIGN|NV_SHORT|NV_INTEGER)
-#define NV_UINT16P (NV_LJUSTNV_UNSIGN|NV_SHORT|NV_INTEGER)
-#define NV_INT32 (NV_INTEGER)
-#define NV_UNT32 (NV_UNSIGN|NV_INTEGER)
-#define NV_INT64 (NV_LONG|NV_INTEGER)
-#define NV_UINT64 (NV_UNSIGN|NV_LONG|NV_INTEGER)
-#define NV_FLOAT (NV_SHORT|NV_DOUBLE)
-#define NV_LDOUBLE (NV_LONG|NV_DOUBLE)
-
-/* name-value pair macros */
-#define nv_isattr(np,f) ((np)->nvflag & (f))
-#define nv_onattr(n,f) ((n)->nvflag |= (f))
-#define nv_offattr(n,f) ((n)->nvflag &= ~(f))
-#define nv_isarray(np) (nv_isattr((np),NV_ARRAY))
-
-/* The following are operations for associative arrays */
-#define NV_AINIT 1 /* initialize */
-#define NV_AFREE 2 /* free array */
-#define NV_ANEXT 3 /* advance to next subscript */
-#define NV_ANAME 4 /* return subscript name */
-#define NV_ADELETE 5 /* delete current subscript */
-#define NV_AADD 6 /* add subscript if not found */
-#define NV_ACURRENT 7 /* return current subscript Namval_t* */
-#define NV_ASETSUB 8 /* set current subscript */
-
-/* The following are for nv_disc */
-#define NV_FIRST 1
-#define NV_LAST 2
-#define NV_POP 3
-#define NV_CLONE 4
-
-/* The following are operations for nv_putsub() */
-#define ARRAY_BITS 22
-#define ARRAY_ADD (1L<<ARRAY_BITS) /* add subscript if not found */
-#define ARRAY_SCAN (2L<<ARRAY_BITS) /* For ${array[@]} */
-#define ARRAY_UNDEF (4L<<ARRAY_BITS) /* For ${array} */
-
-
-/* These are disciplines provided by the library for use with nv_discfun */
-#define NV_DCADD 0 /* used to add named disciplines */
-#define NV_DCRESTRICT 1 /* variable that are restricted in rsh */
-
-#if defined(__EXPORT__) && defined(_DLL)
-# ifdef _BLD_shell
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-# else
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-# endif /* _BLD_shell */
-#endif /* _DLL */
-/* prototype for array interface*/
-extern __MANGLE__ Namarr_t *nv_arrayptr __PROTO__((Namval_t*));
-extern __MANGLE__ Namarr_t *nv_setarray __PROTO__((Namval_t*,__V_*(*)(Namval_t*,const char*,int)));
-extern __MANGLE__ int nv_arraynsub __PROTO__((Namarr_t*));
-extern __MANGLE__ __V_ *nv_associative __PROTO__((Namval_t*,const char*,int));
-extern __MANGLE__ int nv_aindex __PROTO__((Namval_t*));
-extern __MANGLE__ int nv_nextsub __PROTO__((Namval_t*));
-extern __MANGLE__ char *nv_getsub __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_putsub __PROTO__((Namval_t*, char*, long));
-extern __MANGLE__ Namval_t *nv_opensub __PROTO__((Namval_t*));
-
-/* name-value pair function prototypes */
-extern __MANGLE__ int nv_adddisc __PROTO__((Namval_t*, const char**, Namval_t**));
-extern __MANGLE__ int nv_clone __PROTO__((Namval_t*, Namval_t*, int));
-extern __MANGLE__ void nv_close __PROTO__((Namval_t*));
-extern __MANGLE__ __V_ *nv_context __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_create __PROTO__((const char*, Dt_t*, int,Namfun_t*));
-extern __MANGLE__ void nv_delete __PROTO__((Namval_t*, Dt_t*, int));
-extern __MANGLE__ Dt_t *nv_dict __PROTO__((Namval_t*));
-extern __MANGLE__ Sfdouble_t nv_getn __PROTO__((Namval_t*, Namfun_t*));
-extern __MANGLE__ Sfdouble_t nv_getnum __PROTO__((Namval_t*));
-extern __MANGLE__ char *nv_getv __PROTO__((Namval_t*, Namfun_t*));
-extern __MANGLE__ char *nv_getval __PROTO__((Namval_t*));
-extern __MANGLE__ Namfun_t *nv_hasdisc __PROTO__((Namval_t*, const Namdisc_t*));
-extern __MANGLE__ int nv_isnull __PROTO__((Namval_t*));
-extern __MANGLE__ Namfun_t *nv_isvtree __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_lastdict __PROTO__((void));
-extern __MANGLE__ Namval_t *nv_mkinttype __PROTO__((char*, size_t, int, const char*, Namdisc_t*));
-extern __MANGLE__ void nv_newattr __PROTO__((Namval_t*,unsigned,int));
-extern __MANGLE__ void nv_newtype __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_open __PROTO__((const char*,Dt_t*,int));
-extern __MANGLE__ void nv_putval __PROTO__((Namval_t*,const char*,int));
-extern __MANGLE__ void nv_putv __PROTO__((Namval_t*,const char*,int,Namfun_t*));
-extern __MANGLE__ int nv_rename __PROTO__((Namval_t*,int));
-extern __MANGLE__ int nv_scan __PROTO__((Dt_t*,void(*)(Namval_t*,__V_*),__V_*,int,int));
-extern __MANGLE__ char *nv_setdisc __PROTO__((Namval_t*,const char*,Namval_t*,Namfun_t*));
-extern __MANGLE__ void nv_setref __PROTO__((Namval_t*, Dt_t*,int));
-extern __MANGLE__ int nv_settype __PROTO__((Namval_t*, Namval_t*, int));
-extern __MANGLE__ void nv_setvec __PROTO__((Namval_t*,int,int,char*[]));
-extern __MANGLE__ void nv_setvtree __PROTO__((Namval_t*));
-extern __MANGLE__ int nv_setsize __PROTO__((Namval_t*,int));
-extern __MANGLE__ Namfun_t *nv_disc __PROTO__((Namval_t*,Namfun_t*,int));
-extern __MANGLE__ void nv_unset __PROTO__((Namval_t*)); /*obsolete */
-extern __MANGLE__ void _nv_unset __PROTO__((Namval_t*,int));
-extern __MANGLE__ Namval_t *nv_search __PROTO__((const char *, Dt_t*, int));
-extern __MANGLE__ char *nv_name __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_type __PROTO__((Namval_t*));
-extern __MANGLE__ void nv_addtype __PROTO__((Namval_t*,const char*, Optdisc_t*, size_t));
-extern __MANGLE__ const Namdisc_t *nv_discfun __PROTO__((int));
-
-#ifdef _DLL
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif /* _DLL */
-
-#define nv_unset(np) _nv_unset(np,0)
-#define nv_size(np) nv_setsize((np),-1)
-#define nv_stack(np,nf) nv_disc(np,nf,0)
-
-#if 0
-/*
- * The names of many functions were changed in early '95
- * Here is a mapping to the old names
- */
-# define nv_istype(np) nv_isattr(np)
-# define nv_newtype(np) nv_newattr(np)
-# define nv_namset(np,a,b) nv_open(np,a,b)
-# define nv_free(np) nv_unset(np,0)
-# define nv_settype(np,a,b,c) nv_setdisc(np,a,b,c)
-# define nv_search(np,a,b) nv_open(np,a,((b)?0:NV_NOADD))
-# define settype setdisc
-#endif
-
-#endif /* NV_DEFAULT */
diff --git a/usr/src/lib/libshell/amd64/include/ast/shell.h b/usr/src/lib/libshell/amd64/include/ast/shell.h
deleted file mode 100644
index a8c1d85c3b..0000000000
--- a/usr/src/lib/libshell/amd64/include/ast/shell.h
+++ /dev/null
@@ -1,264 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef SH_INTERACTIVE
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * David Korn
- * AT&T Labs
- *
- * Interface definitions for shell command language
- *
- */
-
-#include <ast.h>
-#include <cdt.h>
-#ifdef _SH_PRIVATE
-# include "name.h"
-#else
-# include <nval.h>
-#endif /* _SH_PRIVATE */
-
-#define SH_VERSION 20071012
-
-#undef NOT_USED
-#define NOT_USED(x) (&x,1)
-
-/* options */
-typedef struct
-{
- unsigned long v[4];
-}
-Shopt_t;
-
-typedef struct Shell_s Shell_t;
-
-typedef void (*Shinit_f) __PROTO__((Shell_t*, int));
-typedef int (*Shwait_f) __PROTO__((int, long, int));
-
-union Shnode_u;
-typedef union Shnode_u Shnode_t;
-
-#define SH_CFLAG 0
-#define SH_HISTORY 1 /* used also as a state */
-#define SH_ERREXIT 2 /* used also as a state */
-#define SH_VERBOSE 3 /* used also as a state */
-#define SH_MONITOR 4 /* used also as a state */
-#define SH_INTERACTIVE 5 /* used also as a state */
-#define SH_RESTRICTED 6
-#define SH_XTRACE 7
-#define SH_KEYWORD 8
-#define SH_NOUNSET 9
-#define SH_NOGLOB 10
-#define SH_ALLEXPORT 11
-#define SH_PFSH 12
-#define SH_IGNOREEOF 13
-#define SH_NOCLOBBER 14
-#define SH_MARKDIRS 15
-#define SH_BGNICE 16
-#define SH_VI 17
-#define SH_VIRAW 18
-#define SH_TFLAG 19
-#define SH_TRACKALL 20
-#define SH_SFLAG 21
-#define SH_NOEXEC 22
-#define SH_GMACS 24
-#define SH_EMACS 25
-#define SH_PRIVILEGED 26
-#define SH_SUBSHARE 27 /* subshell shares state with parent */
-#define SH_NOLOG 28
-#define SH_NOTIFY 29
-#define SH_DICTIONARY 30
-#define SH_PIPEFAIL 32
-#define SH_GLOBSTARS 33
-#define SH_XARGS 34
-#define SH_RC 35
-#define SH_SHOWME 36
-
-/*
- * passed as flags to builtins in Nambltin_t struct when BLT_OPTIM is on
- */
-#define SH_BEGIN_OPTIM 0x1
-#define SH_END_OPTIM 0x2
-
-/* The following type is used for error messages */
-
-/* error messages */
-extern __MANGLE__ const char e_defpath[];
-extern __MANGLE__ const char e_found[];
-extern __MANGLE__ const char e_nospace[];
-extern __MANGLE__ const char e_format[];
-extern __MANGLE__ const char e_number[];
-extern __MANGLE__ const char e_restricted[];
-extern __MANGLE__ const char e_recursive[];
-extern __MANGLE__ char e_version[];
-
-typedef struct sh_scope
-{
- struct sh_scope *par_scope;
- int argc;
- char **argv;
- char *cmdname;
- char *filename;
- char *funname;
- int lineno;
- Dt_t *var_tree;
- struct sh_scope *self;
-} Shscope_t;
-
-/*
- * Saves the state of the shell
- */
-
-struct Shell_s
-{
- Shopt_t options; /* set -o options */
- Dt_t *var_tree; /* for shell variables */
- Dt_t *fun_tree; /* for shell functions */
- Dt_t *alias_tree; /* for alias names */
- Dt_t *bltin_tree; /* for builtin commands */
- Shscope_t *topscope; /* pointer to top-level scope */
- int inlineno; /* line number of current input file */
- int exitval; /* most recent exit value */
- unsigned char trapnote; /* set when trap/signal is pending */
- char shcomp; /* set when runing shcomp */
- short subshell; /* set for virtual subshell */
-#ifdef _SH_PRIVATE
- _SH_PRIVATE
-#endif /* _SH_PRIVATE */
-};
-
-/* flags for sh_parse */
-#define SH_NL 1 /* Treat new-lines as ; */
-#define SH_EOF 2 /* EOF causes syntax error */
-
-/* symbolic values for sh_iogetiop */
-#define SH_IOCOPROCESS (-2)
-#define SH_IOHISTFILE (-3)
-
-#include <cmd.h>
-
-/* symbolic value for sh_fdnotify */
-#define SH_FDCLOSE (-1)
-
-#undef getenv /* -lshell provides its own */
-
-#if defined(__EXPORT__) && defined(_DLL)
-# ifdef _BLD_shell
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-# endif /* _BLD_shell */
-#endif /* _DLL */
-
-extern __MANGLE__ Dt_t *sh_bltin_tree __PROTO__((void));
-extern __MANGLE__ void sh_subfork __PROTO__((void));
-extern __MANGLE__ Shell_t *sh_init __PROTO__((int,char*[],Shinit_f));
-extern __MANGLE__ int sh_reinit __PROTO__((char*[]));
-extern __MANGLE__ int sh_eval __PROTO__((Sfio_t*,int));
-extern __MANGLE__ void sh_delay __PROTO__((double));
-extern __MANGLE__ __V_ *sh_parse __PROTO__((Shell_t*, Sfio_t*,int));
-extern __MANGLE__ int sh_trap __PROTO__((const char*,int));
-extern __MANGLE__ int sh_fun __PROTO__((Namval_t*,Namval_t*, char*[]));
-extern __MANGLE__ int sh_funscope __PROTO__((int,char*[],int(*)(__V_*),__V_*,int));
-extern __MANGLE__ Sfio_t *sh_iogetiop __PROTO__((int,int));
-extern __MANGLE__ int sh_main __PROTO__((int, char*[], Shinit_f));
-extern __MANGLE__ int sh_run __PROTO__((int, char*[]));
-extern __MANGLE__ void sh_menu __PROTO__((Sfio_t*, int, char*[]));
-extern __MANGLE__ Namval_t *sh_addbuiltin __PROTO__((const char*, int(*)(int, char*[],__V_*), __V_*));
-extern __MANGLE__ char *sh_fmtq __PROTO__((const char*));
-extern __MANGLE__ char *sh_fmtqf __PROTO__((const char*, int, int));
-extern __MANGLE__ Sfdouble_t sh_strnum __PROTO__((const char*, char**, int));
-extern __MANGLE__ int sh_access __PROTO__((const char*,int));
-extern __MANGLE__ int sh_close __PROTO__((int));
-extern __MANGLE__ int sh_dup __PROTO__((int));
-extern __MANGLE__ void sh_exit __PROTO__((int));
-extern __MANGLE__ int sh_fcntl __PROTO__((int, int, ...));
-extern __MANGLE__ Sfio_t *sh_fd2sfio __PROTO__((int));
-extern __MANGLE__ int (*sh_fdnotify __PROTO__((int(*)(int,int)))) __PROTO__((int,int));
-extern __MANGLE__ Shell_t *sh_getinterp __PROTO__((void));
-extern __MANGLE__ int sh_open __PROTO__((const char*, int, ...));
-extern __MANGLE__ int sh_openmax __PROTO__((void));
-extern __MANGLE__ Sfio_t *sh_pathopen __PROTO__((const char*));
-extern __MANGLE__ ssize_t sh_read __PROTO__((int, __V_*, size_t));
-extern __MANGLE__ ssize_t sh_write __PROTO__((int, const __V_*, size_t));
-extern __MANGLE__ off_t sh_seek __PROTO__((int, off_t, int));
-extern __MANGLE__ int sh_pipe __PROTO__((int[]));
-extern __MANGLE__ mode_t sh_umask __PROTO__((mode_t));
-extern __MANGLE__ __V_ *sh_waitnotify __PROTO__((Shwait_f));
-extern __MANGLE__ Shscope_t *sh_getscope __PROTO__((int,int));
-extern __MANGLE__ Shscope_t *sh_setscope __PROTO__((Shscope_t*));
-extern __MANGLE__ void sh_sigcheck __PROTO__((void));
-extern __MANGLE__ unsigned long sh_isoption __PROTO__((int));
-extern __MANGLE__ unsigned long sh_onoption __PROTO__((int));
-extern __MANGLE__ unsigned long sh_offoption __PROTO__((int));
-extern __MANGLE__ int sh_waitsafe __PROTO__((void));
-extern __MANGLE__ int sh_exec __PROTO__((const Shnode_t*,int));
-
-#if SHOPT_DYNAMIC
- extern __MANGLE__ __V_ **sh_getliblist __PROTO__((void));
-#endif /* SHOPT_DYNAMIC */
-
-/*
- * direct access to sh is obsolete, use sh_getinterp() instead
- */
-#if !defined(_SH_PRIVATE) && defined(__IMPORT__) && !defined(_BLD_shell)
- extern __MANGLE__ __IMPORT__ Shell_t sh;
-#else
- extern __MANGLE__ Shell_t sh;
-#endif
-
-#ifdef _DLL
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif /* _DLL */
-
-#ifndef _SH_PRIVATE
-# define access(a,b) sh_access(a,b)
-# define close(a) sh_close(a)
-# define exit(a) sh_exit(a)
-# define fcntl(a,b,c) sh_fcntl(a,b,c)
-# define pipe(a) sh_pipe(a)
-# define read(a,b,c) sh_read(a,b,c)
-# define write(a,b,c) sh_write(a,b,c)
-# define umask(a) sh_umask(a)
-# define dup sh_dup
-# if _lib_lseek64
-# define open64 sh_open
-# define lseek64 sh_seek
-# else
-# define open sh_open
-# define lseek sh_seek
-# endif
-#endif /* !_SH_PRIVATE */
-
-#define SH_SIGSET 4
-#define SH_EXITSIG 0400 /* signal exit bit */
-#define SH_EXITMASK (SH_EXITSIG-1) /* normal exit status bits */
-#define SH_RUNPROG -1022 /* needs to be negative and < 256 */
-
-#endif /* SH_INTERACTIVE */
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct
deleted file mode 100644
index 7206f410fa..0000000000
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/acct
+++ /dev/null
@@ -1,13 +0,0 @@
-/* : : 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_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_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) */
-#define _sys_acct 1 /* #include <sys/acct.h> ok */
-#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds
deleted file mode 100644
index 0cc37f2781..0000000000
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/cmds
+++ /dev/null
@@ -1,37 +0,0 @@
-/* : : 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_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_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) */
-#define _bin_newgrp 1 /* /bin/newgrp found */
-#define _usr_bin_newgrp 1 /* /usr/bin/newgrp found */
-#define _cmd_test 1 /* test in ?(/usr)/(bin|etc|ucb) */
-#define _bin_test 1 /* /bin/test found */
-#define _usr_bin_test 1 /* /usr/bin/test found */
-#define _usr_ucb_test 1 /* /usr/ucb/test found */
-#define _cmd_id 1 /* id in ?(/usr)/(bin|etc|ucb) */
-#define _bin_id 1 /* /bin/id found */
-#define _usr_bin_id 1 /* /usr/bin/id found */
-#define _cmd_wc 1 /* wc in ?(/usr)/(bin|etc|ucb) */
-#define _bin_wc 1 /* /bin/wc found */
-#define _usr_bin_wc 1 /* /usr/bin/wc found */
-#define _usr_ucb_wc 1 /* /usr/ucb/wc found */
-#define _cmd_cut 1 /* cut in ?(/usr)/(bin|etc|ucb) */
-#define _bin_cut 1 /* /bin/cut found */
-#define _usr_bin_cut 1 /* /usr/bin/cut found */
-#define _cmd_logname 1 /* logname in ?(/usr)/(bin|etc|ucb) */
-#define _bin_logname 1 /* /bin/logname found */
-#define _usr_bin_logname 1 /* /usr/bin/logname found */
-#define _cmd_pfexec 1 /* pfexec in ?(/usr)/(bin|etc|ucb) */
-#define _bin_pfexec 1 /* /bin/pfexec found */
-#define _usr_bin_pfexec 1 /* /usr/bin/pfexec found */
-#define _cmd_tput 1 /* tput in ?(/usr)/(bin|etc|ucb) */
-#define _bin_tput 1 /* /bin/tput found */
-#define _usr_bin_tput 1 /* /usr/bin/tput found */
-#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic
deleted file mode 100644
index 0e3fdfa1b3..0000000000
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/dynamic
+++ /dev/null
@@ -1,22 +0,0 @@
-/* : : 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_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_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
-#include <dlldefs.h>
-#endif
-#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
-# define SHOPT_FS_3D 1
-#endif /* !SHOPT_FS_3D */
-#if SHOPT_FS_3D
-# undef mount
-# include <fs3d.h>
-#endif /* SHOPT_FS_3D */
-
-#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs
deleted file mode 100644
index 53e7f14ddb..0000000000
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/execargs
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : 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_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_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/options b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options
deleted file mode 100644
index 1db7ff29eb..0000000000
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/options
+++ /dev/null
@@ -1,25 +0,0 @@
-/* : : 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_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_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
-#ifndef SHOPT_DEVFD
-# define SHOPT_DEVFD 1
-#endif
-#undef SHOPT_PFSH
-#undef SHOPT_TEST_L
-#ifndef SHOPT_SYSRC
-# define SHOPT_SYSRC 1
-#endif
-#undef SHOPT_UCB
-#if !_PACKAGE_ast && ( (MB_LEN_MAX-1)<=0 || !defined(_lib_mbtowc) )
-# undef SHOPT_MULTIBYTE
-#endif
-
-#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat
deleted file mode 100644
index 7e03d66551..0000000000
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/pstat
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : 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_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_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
deleted file mode 100644
index 64cf916a2b..0000000000
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/rlimits
+++ /dev/null
@@ -1,20 +0,0 @@
-/* : : 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_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_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 */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_ulimit 1 /* ulimit() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_rlim_t 1 /* rlim_t is a type */
-#endif
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys
deleted file mode 100644
index 43f3314feb..0000000000
--- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/ttys
+++ /dev/null
@@ -1,20 +0,0 @@
-/* : : 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_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_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 */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#endif
diff --git a/usr/src/lib/libshell/common/features/cmds b/usr/src/lib/libshell/common/features/cmds
deleted file mode 100644
index 106198caa1..0000000000
--- a/usr/src/lib/libshell/common/features/cmds
+++ /dev/null
@@ -1 +0,0 @@
-cmd newgrp,test,id,wc,cut,logname,universe,pfexec,tput
diff --git a/usr/src/lib/libshell/common/features/math b/usr/src/lib/libshell/common/features/math
deleted file mode 100644
index 2a720e673c..0000000000
--- a/usr/src/lib/libshell/common/features/math
+++ /dev/null
@@ -1,4 +0,0 @@
-lib,npt absl,acosl,acoshl,asinl,asinhl,atanl,atan2l,expl,cosl,coshl math.h
-lib,npt fabsl,powl,hypotl,fmodl,logl,sinl,sinhl,sqrtl,tanl,tanhl math.h
-lib,npt strtold,isinf,isinfl,isnan,isnanl,isnormal,isnormall math.h
-lib,npt finite,finitel,isfinite math.h
diff --git a/usr/src/lib/libshell/common/features/rlimits b/usr/src/lib/libshell/common/features/rlimits
deleted file mode 100644
index f2ffe192cf..0000000000
--- a/usr/src/lib/libshell/common/features/rlimits
+++ /dev/null
@@ -1,3 +0,0 @@
-hdr,sys resource,vlimit
-lib getrlimit,ulimit,vlimit
-typ rlim_t sys/types.h sys/resource.h
diff --git a/usr/src/lib/libshell/common/fun/title b/usr/src/lib/libshell/common/fun/title
deleted file mode 100644
index cf3efdcb00..0000000000
--- a/usr/src/lib/libshell/common/fun/title
+++ /dev/null
@@ -1,57 +0,0 @@
-# add to (+), delete from (-), set [=], or print (.) window title
-# arguments are eval'd before printing
-# title text string exported in TITLE_TEXT
-
-function title # [ + | - | = | . ] title ...
-{
- typeset x t="$TITLE_TEXT"
-
- case $1 in
- +) shift
- case $# in
- 0) ;;
- *) for x
- do case " $t " in
- *" $x "*) ;;
- " ") t=$x ;;
- *) t="$t $x" ;;
- esac
- done
- case $t in
- $TITLE_TEXT) return 1 ;;
- esac
- ;;
- esac
- ;;
- -) shift
- case $# in
- 0) ;;
- *) for x
- do case " $t " in
- *" $x "*) t="${t%?( )$x*}${t##*$x?( )}" ;;
- esac
- done
- case $t in
- $TITLE_TEXT) return 1 ;;
- esac
- ;;
- esac
- ;;
- .) print -r -- "$TITLE_TEXT"
- return 0
- ;;
- =) shift
- t="$*"
- ;;
- *) t="$*"
- ;;
- esac
- export TITLE_TEXT="$t"
- eval x=\"$t\"
- case $TERM in
- 630*) print -nr -- $'\E[?'"${#x}"$';0v'"${x}" ;;
- uwin*|*vt100|xterm*) print -nr -- $'\E]0;'"${x}"$'\a' ;;
- *) return 1 ;;
- esac
- return 0
-}
diff --git a/usr/src/lib/libshell/common/include/variables.h b/usr/src/lib/libshell/common/include/variables.h
deleted file mode 100644
index 5afad98b59..0000000000
--- a/usr/src/lib/libshell/common/include/variables.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-#pragma prototyped
-
-#ifndef SH_VALNOD
-
-#include <option.h>
-#include "FEATURE/options"
-#include "FEATURE/dynamic"
-
-/* The following defines are coordinated with data in data/variables.c */
-
-#define PATHNOD (sh.bltin_nodes)
-#define PS1NOD (sh.bltin_nodes+1)
-#define PS2NOD (sh.bltin_nodes+2)
-#define IFSNOD (sh.bltin_nodes+3)
-#define PWDNOD (sh.bltin_nodes+4)
-#define HOME (sh.bltin_nodes+5)
-#define MAILNOD (sh.bltin_nodes+6)
-#define REPLYNOD (sh.bltin_nodes+7)
-#define SHELLNOD (sh.bltin_nodes+8)
-#define EDITNOD (sh.bltin_nodes+9)
-#define MCHKNOD (sh.bltin_nodes+10)
-#define RANDNOD (sh.bltin_nodes+11)
-#define ENVNOD (sh.bltin_nodes+12)
-#define HISTFILE (sh.bltin_nodes+13)
-#define HISTSIZE (sh.bltin_nodes+14)
-#define HISTEDIT (sh.bltin_nodes+15)
-#define HISTCUR (sh.bltin_nodes+16)
-#define FCEDNOD (sh.bltin_nodes+17)
-#define CDPNOD (sh.bltin_nodes+18)
-#define MAILPNOD (sh.bltin_nodes+19)
-#define PS3NOD (sh.bltin_nodes+20)
-#define OLDPWDNOD (sh.bltin_nodes+21)
-#define VISINOD (sh.bltin_nodes+22)
-#define COLUMNS (sh.bltin_nodes+23)
-#define LINES (sh.bltin_nodes+24)
-#define PPIDNOD (sh.bltin_nodes+25)
-#define L_ARGNOD (sh.bltin_nodes+26)
-#define TMOUTNOD (sh.bltin_nodes+27)
-#define SECONDS (sh.bltin_nodes+28)
-#define LINENO (sh.bltin_nodes+29)
-#define OPTARGNOD (sh.bltin_nodes+30)
-#define OPTINDNOD (sh.bltin_nodes+31)
-#define PS4NOD (sh.bltin_nodes+32)
-#define FPATHNOD (sh.bltin_nodes+33)
-#define LANGNOD (sh.bltin_nodes+34)
-#define LCALLNOD (sh.bltin_nodes+35)
-#define LCCOLLNOD (sh.bltin_nodes+36)
-#define LCTYPENOD (sh.bltin_nodes+37)
-#define LCMSGNOD (sh.bltin_nodes+38)
-#define LCNUMNOD (sh.bltin_nodes+39)
-#define FIGNORENOD (sh.bltin_nodes+40)
-#define VERSIONNOD (sh.bltin_nodes+41)
-#define JOBMAXNOD (sh.bltin_nodes+42)
-#define DOTSHNOD (sh.bltin_nodes+43)
-#define ED_CHRNOD (sh.bltin_nodes+44)
-#define ED_COLNOD (sh.bltin_nodes+45)
-#define ED_TXTNOD (sh.bltin_nodes+46)
-#define ED_MODENOD (sh.bltin_nodes+47)
-#define SH_NAMENOD (sh.bltin_nodes+48)
-#define SH_SUBSCRNOD (sh.bltin_nodes+49)
-#define SH_VALNOD (sh.bltin_nodes+50)
-#define SH_VERSIONNOD (sh.bltin_nodes+51)
-#define SH_DOLLARNOD (sh.bltin_nodes+52)
-#define SH_MATCHNOD (sh.bltin_nodes+53)
-#define SH_COMMANDNOD (sh.bltin_nodes+54)
-#define SH_PATHNAMENOD (sh.bltin_nodes+55)
-#define SH_FUNNAMENOD (sh.bltin_nodes+56)
-#define SH_SUBSHELLNOD (sh.bltin_nodes+57)
-#define SH_LEVELNOD (sh.bltin_nodes+58)
-#define SH_LINENO (sh.bltin_nodes+59)
-#define SH_STATS (sh.bltin_nodes+60)
-#define SHLVL (sh.bltin_nodes+61)
-#if SHOPT_FS_3D
-# define VPATHNOD (sh.bltin_nodes+62)
-# define NFS_3D 1
-#else
-# define NFS_3D 0
-#endif /* SHOPT_FS_3D */
-#if SHOPT_VPIX
-# define DOSPATHNOD (sh.bltin_nodes+62+NFS_3D)
-# define VPIXNOD (sh.bltin_nodes+63+NFS_3D)
-# define NVPIX (NFS_3D+2)
-#else
-# define NVPIX NFS_3D
-#endif /* SHOPT_VPIX */
-#ifdef apollo
-# define SYSTYPENOD (sh.bltin_nodes+62+NVPIX)
-#endif /* apollo */
-
-#endif /* SH_VALNOD */
diff --git a/usr/src/lib/libshell/common/tests/arrays2.sh b/usr/src/lib/libshell/common/tests/arrays2.sh
deleted file mode 100644
index 21037f1075..0000000000
--- a/usr/src/lib/libshell/common/tests/arrays2.sh
+++ /dev/null
@@ -1,123 +0,0 @@
-########################################################################
-# #
-# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
-# and is licensed under the #
-# Common Public License, Version 1.0 #
-# by AT&T Intellectual Property #
-# #
-# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
-# #
-# Information and Software Systems Research #
-# AT&T Research #
-# Florham Park NJ #
-# #
-# David Korn <dgk@research.att.com> #
-# #
-########################################################################
-function err_exit
-{
- print -u2 -n "\t"
- print -u2 -r ${Command}[$1]: "${@:2}"
- let Errors+=1
-}
-alias err_exit='err_exit $LINENO'
-
-Command=${0##*/}
-integer Errors=0
-for ((i=0; i < 4; i++ ))
-do for ((j=0; j < 5; j++ ))
- do a[i][j]=$i$j
- done
-done
-for ((i=0; i < 4; i++ ))
-do for ((j=0; j < 5; j++ ))
- do [[ ${a[i][j]} == "$i$j" ]] || err_exit "\${a[$i][$j]} != $i$j"
- done
-done
-for ((i=0; i < 4; i++ ))
-do j=0;for k in ${a[i][@]}
- do [[ $k == "$i$j" ]] || err_exit "\${a[i][@]} != $i$j"
- (( j++ ))
- done
-done
-unset a
-a=(
- ( 00 01 02 03 04 )
- ( 10 11 12 13 14 15)
- ( 20 21 22 23 24 )
- ( 30 31 32 33 34 )
-)
-
-function check
-{
- nameref a=$1
- nameref b=a[2]
- typeset c=$1
- integer i j
- for ((i=0; i < 4; i++ ))
- do for ((j=0; j < 5; j++ ))
- do [[ ${a[$i][$j]} == "$i$j" ]] || err_exit "\${$c[$i][$j]} != $i$j"
- done
- done
- (( ${#a[@]} == 4 )) || err_exit "\${#$c[@]} not 4"
- (( ${#a[0][@]} == 5 )) || err_exit "\${#$c[0][@]} not 5"
- (( ${#a[1][@]} == 6 )) || err_exit "\${#$c[1][@]} not 6"
- set -s -- ${!a[@]}
- [[ ${@} == '0 1 2 3' ]] || err_exit "\${!$c[@]} not 0 1 2 3"
- set -s -- ${!a[0][@]}
- [[ ${@} == '0 1 2 3 4' ]] || err_exit "\${!$c[0][@]} not 0 1 2 3 4"
- set -s -- ${!a[1][@]}
- [[ ${@} == '0 1 2 3 4 5' ]] || err_exit "\${!$c[1][@]} not 0 1 2 3 4 5"
- [[ $a == 00 ]] || err_exit "\$$c is not 00"
- [[ ${a[0]} == 00 ]] || err_exit "\${$a[0]} is not 00"
- [[ ${a[0][0]} == 00 ]] || err_exit "${a[0][0]} is not 00"
- [[ ${a[0][0][0]} == 00 ]] || err_exit "\${$c[0][0][0]} is not 00"
- [[ ${a[0][0][1]} == '' ]] || err_exit "\${$c[0][0][1]} is not empty"
- [[ ${b[3]} == 23 ]] || err_exit "${!b}[3] not = 23"
-}
-
-check a
-
-unset a
-typeset -A a
-for ((i=0; i < 4; i++ ))
-do for ((j=0; j < 5; j++ ))
- do a[$i][j]=$i$j
- done
-done
-for ((i=0; i < 4; i++ ))
-do for ((j=0; j < 5; j++ ))
- do [[ ${a[$i][j]} == "$i$j" ]] || err_exit "\${a[$i][$j]} == $i$j"
- done
-done
-a[1][5]=15
-b=(
- [0]=( 00 01 02 03 04 )
- [1]=( 10 11 12 13 14 15)
- [2]=( 20 21 22 23 24 )
- [3]=( 30 31 32 33 34 )
-)
-check b
-[[ ${a[1][@]} == "${b[1][@]}" ]] || err_exit "a[1] not equal to b[1]"
-c=(
- [0]=( [0]=00 [1]=01 [2]=02 [3]=03 [4]=04 )
- [1]=( [0]=10 [1]=11 [2]=12 [3]=13 [4]=14 [5]=15)
- [2]=( [0]=20 [1]=21 [2]=22 [3]=23 [4]=24 )
- [3]=( [0]=30 [1]=31 [2]=32 [3]=33 [4]=34 )
-)
-check c
-typeset -A d
-d[0]=( [0]=00 [1]=01 [2]=02 [3]=03 [4]=04 )
-d[1]=( [0]=10 [1]=11 [2]=12 [3]=13 [4]=14 [5]=15)
-d[2]=( [0]=20 [1]=21 [2]=22 [3]=23 [4]=24 )
-d[3]=( [0]=30 [1]=31 [2]=32 [3]=33 [4]=34 )
-check d
-unset a b c d
-[[ ${a-set} ]] || err_exit "a is set after unset"
-[[ ${b-set} ]] || err_exit "b is set after unset"
-[[ ${c-set} ]] || err_exit "c is set after unset"
-[[ ${d-set} ]] || err_exit "c is set after unset"
-exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/coprocess.sh b/usr/src/lib/libshell/common/tests/coprocess.sh
deleted file mode 100644
index f24697e55f..0000000000
--- a/usr/src/lib/libshell/common/tests/coprocess.sh
+++ /dev/null
@@ -1,313 +0,0 @@
-########################################################################
-# #
-# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
-# and is licensed under the #
-# Common Public License, Version 1.0 #
-# by AT&T Intellectual Property #
-# #
-# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
-# #
-# Information and Software Systems Research #
-# AT&T Research #
-# Florham Park NJ #
-# #
-# David Korn <dgk@research.att.com> #
-# #
-########################################################################
-# test the behavior of co-processes
-function err_exit
-{
- print -u2 -n "\t"
- print -u2 -r ${Command}[$1]: "${@:2}"
- let Errors+=1
-}
-alias err_exit='err_exit $LINENO'
-
-Command=${0##*/}
-integer Errors=0
-
-tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
-trap "cd /; rm -rf $tmp" EXIT
-
-if [[ -d /cygdrive ]]
-then err_exit cygwin detected - coprocess tests disabled - enable at the risk of wedging your system
- exit $((Errors))
-fi
-
-function ping # id
-{
- integer x=0
- while ((x++ < 5))
- do read -r
- print -r "$1 $REPLY"
- done
-}
-
-cat |&
-print -p "hello"
-read -p line
-[[ $line == hello ]] || err_exit 'coprocessing fails'
-exec 5>&p 6<&p
-print -u5 'hello again' || err_exit 'write on u5 fails'
-read -u6 line
-[[ $line == 'hello again' ]] || err_exit 'coprocess after moving fds fails'
-exec 5<&- 6<&-
-wait $!
-
-ping three |&
-exec 3>&p
-ping four |&
-exec 4>&p
-ping pipe |&
-
-integer count
-for i in three four pipe four pipe four three pipe pipe three pipe
-do case $i in
- three) to=-u3;;
- four) to=-u4;;
- pipe) to=-p;;
- esac
- (( count++ ))
- print $to $i $count
-done
-
-while ((count > 0))
-do (( count-- ))
- read -p
- set -- $REPLY
- if [[ $1 != $2 ]]
- then err_exit "$1 does not match $2"
- fi
- case $1 in
- three) ;;
- four) ;;
- pipe) ;;
- *) err_exit "unknown message +|$REPLY|+" ;;
- esac
-done
-kill $(jobs -p) 2>/dev/null
-
-file=$tmp/regress
-cat > $file <<\!
-/bin/cat |&
-!
-chmod +x $file
-sleep 10 |&
-$file 2> /dev/null || err_exit "parent coprocess prevents script coprocess"
-exec 5<&p 6>&p
-exec 5<&- 6>&-
-kill $(jobs -p) 2>/dev/null
-
-${SHELL-ksh} |&
-cop=$!
-exp=Done
-print -p $'print hello | cat\nprint '$exp
-read -t 5 -p
-read -t 5 -p
-got=$REPLY
-if [[ $got != $exp ]]
-then err_exit "${SHELL-ksh} coprocess io failed -- got '$got', expected '$exp'"
-fi
-exec 5<&p 6>&p
-exec 5<&- 6>&-
-{ sleep 4; kill $cop; } 2>/dev/null &
-spy=$!
-if wait $cop 2>/dev/null
-then kill $spy 2>/dev/null
-else err_exit "coprocess hung after 'exec 5<&p 6>&p; exec 5<&- 6>&-'"
-fi
-wait
-
-{
-echo line1 | grep 'line2'
-echo line2 | grep 'line1'
-} |&
-SECONDS=0 count=0
-while read -p -t 10 line
-do ((count++))
-done
-if (( SECONDS > 8 ))
-then err_exit "read -p hanging (SECONDS=$SECONDS count=$count)"
-fi
-wait $!
-
-( sleep 3 |& sleep 1 && kill $!; sleep 1; sleep 3 |& sleep 1 && kill $! ) ||
- err_exit "coprocess cleanup not working correctly"
-{ : |& } 2>/dev/null ||
- err_exit "subshell coprocess lingers in parent"
-wait $!
-
-unset N r e
-integer N=5
-e=12345
-(
- integer i
- for ((i = 1; i <= N; i++))
- do print $i |&
- read -p r
- print -n $r
- wait $!
- done
- print
-) 2>/dev/null | read -t 10 r
-[[ $r == $e ]] || err_exit "coprocess timing bug -- expected $e, got '$r'"
-r=
-(
- integer i
- for ((i = 1; i <= N; i++))
- do print $i |&
- sleep 0.01
- r=$r$(cat <&p)
- wait $!
- done
- print $r
-) 2>/dev/null | read -t 10 r
-[[ $r == $e ]] || err_exit "coprocess command substitution bug -- expected $e, got '$r'"
-
-(
- /bin/cat |&
- sleep 0.01
- exec 6>&p
- print -u6 ok
- exec 6>&-
- sleep 1
- kill $! 2> /dev/null
-) && err_exit 'coprocess with subshell would hang'
-for sig in IOT ABRT
-do if ( trap - $sig ) 2> /dev/null
- then if [[ $( { sig=$sig $SHELL 2> /dev/null <<- '++EOF++'
- cat |&
- pid=$!
- trap "print TRAP" $sig
- (
- sleep 2
- kill -$sig $$
- sleep 2
- kill -$sig $$
- kill $pid
- sleep 2
- kill $$
- ) &
- read -p
- ++EOF++
- } ) != $'TRAP\nTRAP' ]] 2> /dev/null
- then err_exit 'traps when reading from coprocess not working'
- fi
- break
- fi
-done
-
-trap 'sleep_pid=; kill $pid; err_exit "coprocess 1 hung"' TERM
-{ sleep 5; kill $$; } &
-sleep_pid=$!
-builtin cat
-cat |&
-pid=$!
-exec 5<&p 6>&p
-print -u6 hi; read -u5
-[[ $REPLY == hi ]] || err_exit 'REPLY is $REPLY not hi'
-exec 6>&-
-wait $pid
-trap - TERM
-[[ $sleep_pid ]] && kill $sleep_pid
-
-trap 'sleep_pid=; kill $pid; err_exit "coprocess 2 hung"' TERM
-{ sleep 5; kill $$; } &
-sleep_pid=$!
-cat |&
-pid=$!
-print foo >&p 2> /dev/null || err_exit 'first write of foo to coprocess failed'
-print foo >&p 2> /dev/null || err_exit 'second write of foo to coprocess failed'
-kill $pid
-wait $pid 2> /dev/null
-trap - TERM
-[[ $sleep_pid ]] && kill $sleep_pid
-
-trap 'sleep_pid=; kill $pid; err_exit "coprocess 3 hung"' TERM
-{ sleep 5; kill $$; } &
-sleep_pid=$!
-cat |&
-pid=$!
-print -p foo
-print -p bar
-read <&p || err_exit 'first read from coprocess failed'
-[[ $REPLY == foo ]] || err_exit "first REPLY is $REPLY not foo"
-read <&p || err_exit 'second read from coprocess failed'
-[[ $REPLY == bar ]] || err_exit "second REPLY is $REPLY not bar"
-kill $pid
-wait $pid 2> /dev/null
-trap - TERM
-[[ $sleep_pid ]] && kill $sleep_pid
-
-exp=ksh
-got=$(print -r $'#00315
-COATTRIBUTES=\'label=make \'
-# @(#)$Id: libcoshell (AT&T Research) 2008-04-28 $
-_COSHELL_msgfd=5
-{ { (eval \'function fun { trap \":\" 0; return 1; }; trap \"exit 0\" 0; fun; exit 1\') && PATH= print -u$_COSHELL_msgfd ksh; } || { times && echo bsh >&$_COSHELL_msgfd; } || { echo osh >&$_COSHELL_msgfd; }; } >/dev/null 2>&1' | $SHELL 5>&1)
-[[ $got == $exp ]] || err_exit "coshell(3) identification sequence failed -- expected '$exp', got '$got'"
-
-function cop
-{
- read
- print ok
-}
-
-exp=ok
-
-cop |&
-pid=$!
-if print -p yo 2>/dev/null
-then read -p got
-else got='no coprocess'
-fi
-[[ $got == $exp ]] || err_exit "main coprocess main query failed -- expected $exp, got '$got'"
-kill $pid 2>/dev/null
-wait
-
-cop |&
-pid=$!
-(
-if print -p yo 2>/dev/null
-then read -p got
-else got='no coprocess'
-fi
-[[ $got == $exp ]] || err_exit "main coprocess subshell query failed -- expected $exp, got '$got'"
-)
-kill $pid 2>/dev/null
-wait
-
-exp='no coprocess'
-
-(
-cop |&
-print $! > $tmp/pid
-)
-pid=$(<$tmp/pid)
-if print -p yo 2>/dev/null
-then read -p got
-else got=$exp
-fi
-[[ $got == $exp ]] || err_exit "subshell coprocess main query failed -- expected $exp, got '$got'"
-kill $pid 2>/dev/null
-wait
-
-(
-cop |&
-print $! > $tmp/pid
-)
-pid=$(<$tmp/pid)
-(
-if print -p yo 2>/dev/null
-then read -p got
-else got=$exp
-fi
-[[ $got == $exp ]] || err_exit "subshell coprocess subshell query failed -- expected $exp, got '$got'"
-kill $pid 2>/dev/null
-wait
-)
-
-exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/heredoc.sh b/usr/src/lib/libshell/common/tests/heredoc.sh
deleted file mode 100644
index cd68e697c7..0000000000
--- a/usr/src/lib/libshell/common/tests/heredoc.sh
+++ /dev/null
@@ -1,255 +0,0 @@
-########################################################################
-# #
-# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
-# and is licensed under the #
-# Common Public License, Version 1.0 #
-# by AT&T Intellectual Property #
-# #
-# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
-# #
-# Information and Software Systems Research #
-# AT&T Research #
-# Florham Park NJ #
-# #
-# David Korn <dgk@research.att.com> #
-# #
-########################################################################
-function err_exit
-{
- print -u2 -n "\t"
- print -u2 -r ${Command}[$1]: "${@:2}"
- let Errors+=1
-}
-alias err_exit='err_exit $LINENO'
-
-Command=${0##*/}
-integer Errors=0
-
-tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
-trap "cd /; rm -rf $tmp" EXIT
-
-f=$tmp/here1
-g=$tmp/here2
-cat > $f <<!
-hello world
-!
-if [[ $(<$f) != 'hello world' ]]
-then err_exit "'hello world' here doc not working"
-fi
-cat > $g <<\!
-hello world
-!
-cmp $f $g 2> /dev/null || err_exit "'hello world' quoted here doc not working"
-cat > $g <<- !
- hello world
-!
-cmp $f $g 2> /dev/null || err_exit "'hello world' tabbed here doc not working"
-cat > $g <<- \!
- hello world
-!
-cmp $f $g 2> /dev/null || err_exit "'hello world' quoted tabbed here doc not working"
-x=hello
-cat > $g <<!
-$x world
-!
-cmp $f $g 2> /dev/null || err_exit "'$x world' here doc not working"
-cat > $g <<!
-$(print hello) world
-!
-cmp $f $g 2> /dev/null || err_exit "'$(print hello) world' here doc not working"
-cat > $f <<\!!
-!@#$%%^^&*()_+~"::~;'`<>?/.,{}[]
-!!
-if [[ $(<$f) != '!@#$%%^^&*()_+~"::~;'\''`<>?/.,{}[]' ]]
-then err_exit "'hello world' here doc not working"
-fi
-cat > $g <<!!
-!@#\$%%^^&*()_+~"::~;'\`<>?/.,{}[]
-!!
-cmp $f $g 2> /dev/null || err_exit "unquoted here doc not working"
-exec 3<<!
- foo
-!
-if [[ $(<&3) != ' foo' ]]
-then err_exit "leading tabs stripped with <<!"
-fi
-$SHELL -c "
-eval `echo 'cat <<x'` "|| err_exit "eval `echo 'cat <<x'` core dumps"
-cat > /dev/null <<EOF # comments should not cause core dumps
-abc
-EOF
-cat >$g << :
-:
-:
-cmp /dev/null $g 2> /dev/null || err_exit "empty here doc not working"
-x=$(print $( cat <<HUP
-hello
-HUP
-)
-)
-if [[ $x != hello ]]
-then err_exit "here doc inside command sub not working"
-fi
-y=$(cat <<!
-${x:+${x}}
-!
-)
-if [[ $y != "${x:+${x}}" ]]
-then err_exit '${x:+${x}} not working in here document'
-fi
-$SHELL -c '
-x=0
-while (( x < 100 ))
-do ((x = x+1))
- cat << EOF
-EOF
-done
-' 2> /dev/null || err_exit '100 empty here docs fails'
-{
- print 'builtin -d cat
- cat <<- EOF'
- for ((i=0; i < 100; i++))
- do print XXXXXXXXXXXXXXXXXXXX
- done
- print ' XXX$(date)XXXX
- EOF'
-} > $f
-chmod +x "$f"
-$SHELL "$f" > /dev/null || err_exit "large here-doc with command substitution fails"
-x=$(/bin/cat <<!
-$0
-!
-)
-[[ "$x" == "$0" ]] || err_exit '$0 not correct inside here documents'
-$SHELL -c 'x=$(
-cat << EOF
-EOF)' 2> /dev/null || err_exit 'here-doc cannot be terminated by )'
-if [[ $( IFS=:;cat <<-!
- $IFS$(print hi)$IFS
- !) != :hi: ]]
-then err_exit '$IFS unset by command substitution in here docs'
-fi
-if x=$($SHELL -c 'cat <<< "hello world"' 2> /dev/null)
-then [[ $x == 'hello world' ]] || err_exit '<<< documents not working'
- x=$($SHELL -c 'v="hello world";cat <<< $v' 2> /dev/null)
- [[ $x == 'hello world' ]] || err_exit '<<< documents with $x not working'
- x=$($SHELL -c 'v="hello world";cat <<< "$v"' 2> /dev/null)
- [[ $x == 'hello world' ]] || err_exit '<<< documents with $x not working'
-else err_exit '<<< syntax not supported'
-fi
-if [[ $(cat << EOF #testing
-#abc
-abc
-EOF) != $'#abc\nabc' ]]
-then err_exit 'comments not preserved in here-documents'
-fi
-cat > "$f" <<- '!!!!'
- builtin cat
- : << EOF
- $PWD
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- EOF
- command exec 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-
- x=abc
- cat << EOF
- $x
- EOF
-!!!!
-chmod 755 "$f"
-if [[ $($SHELL "$f") != abc ]]
-then err_exit 'here document descritor was closed'
-fi
-cat > "$f" <<- '!!!!'
- exec 0<&-
- foobar()
- {
- /bin/cat <<- !
- foobar
- !
- }
- : << EOF
- $PWD
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- EOF
- print -r -- "$(foobar)"
-!!!!
-if [[ $($SHELL "$f") != foobar ]]
-then err_exit 'here document with stdin closed failed'
-fi
-printf $'cat <<# \\!!!\n\thello\n\t\tworld\n!!!' > $f
-[[ $($SHELL "$f") == $'hello\n\tworld' ]] || err_exit "<<# not working for quoted here documents"
-printf $'w=world;cat <<# !!!\n\thello\n\t\t$w\n!!!' > $f
-[[ $($SHELL "$f") == $'hello\n\tworld' ]] || err_exit "<<# not working for non-quoted here documents"
-[[ $( $SHELL <<- \++++
- S=( typeset a )
- function S.a.get
- {
- .sh.value=$__a
- }
- __a=1234
- cat <<-EOF
- ${S.a}
- EOF
-++++
-) == 1234 ]] 2> /dev/null || err_exit 'here document with get discipline failed'
-[[ $($SHELL -c 'g(){ print ok;}; cat <<- EOF
- ${ g;}
- EOF
- ' 2> /dev/null) == ok ]] || err_exit '${ command;} not working in heredoc'
-script=$f
-{
-for ((i=0; i < 406; i++))
-do print ': 23456789012345678'
-done
-print : 123456789123
-cat <<- \EOF
-eval "$(
- { cat ; } <<MARKER
- print hello
- MARKER
-)"
-EOF
-} > $script
-chmod +x $script
-[[ $($SHELL $script) == hello ]] 2> /dev/null || err_exit 'heredoc embeded in command substitution fails at buffer boundary'
-
-got=$( cat << EOF
-\
-abc
-EOF)
-[[ $got == abc ]] || err_exit 'line continuation at start of buffer not working'
-
-exit $((Errors))
diff --git a/usr/src/lib/libshell/common/tests/shtests b/usr/src/lib/libshell/common/tests/shtests
deleted file mode 100644
index 645d290574..0000000000
--- a/usr/src/lib/libshell/common/tests/shtests
+++ /dev/null
@@ -1,155 +0,0 @@
-# This program runs ksh regression tests
-# shtests [ name=value ... ] [ --all | --compile ] [ --time ] [ a.sh b.sh ... ]
-
-timesensitive='*@(options|sigchld|subshell).sh'
-
-unset DISPLAY ENV FIGNORE HISTFILE
-LANG=C
-LC_ALL=C
-compile=1
-script=1
-time=1
-vmalloc_options=abort
-while :
-do case $1 in
- -a|--a*)compile=2
- script=2
- ;;
- -c|--c*)compile=2
- script=
- ;;
- -s|--s*)compile=
- script=2
- ;;
- -t|--not*)time=
- ;;
- -v|--nov*)vmalloc_options=
- ;;
- -*) echo $0: $1: invalid option >&2
- exit 2
- ;;
- *=*) n=${1%%=*}
- v=${1#*=}
- eval $n=\'$v\'
- export $n
- ;;
- *) break
- ;;
- esac
- shift
-done
-if [[ $VMALLOC_OPTIONS ]]
-then vmalloc_options=$VMALLOC_OPTIONS
-else VMALLOC_OPTIONS=$vmalloc_options
-fi
-[[ $VMALLOC_OPTIONS ]] || timesensitive=.
-export LANG LC_ALL PATH PWD SHELL VMALLOC_OPTIONS
-PWD=`pwd`
-SHELL=${SHELL-ksh}
-case $0 in
-/*) d=`dirname $0`;;
-*/*) d=$PWD/`dirname $0`;;
-*) d=$PWD;;
-esac
-case $SHELL in
-/*) ;;
-*/*) SHELL=$d/$SHELL;;
-*) SHELL=$(whence $SHELL);;
-esac
-PATH=/bin:/usr/bin
-if [[ -d /usr/ucb ]]
-then PATH=$PATH:/usr/ucb
-fi
-PATH=$PATH:$d
-if [[ $INSTALLROOT && -r $INSTALLROOT/bin/.paths ]]
-then PATH=$INSTALLROOT/bin:$PATH
-fi
-if [[ $compile ]]
-then SHCOMP=${SHCOMP:-shcomp}
- if whence $SHCOMP > /dev/null
- then tmp=$(mktemp -dt) || { echo mktemp -dt failed >&2; exit 1; }
- trap "cd /; rm -rf $tmp" EXIT
- elif [[ $compile != 1 ]]
- then echo $0: --compile: $SHCOMP not found >&2
- exit 1
- else compile=
- fi
-fi
-typeset -A tests
-for i in ${*-*.sh}
-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
- tests[$i]=$t
- T=test
- if (( $t != 1 ))
- then T=${T}s
- fi
- E=error
- if [[ $script ]]
- then echo test $i begins ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"}
- if [[ $i == $timesensitive ]]
- 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 ]"
- else e=$?
- if (( e > 256 ))
- then e=1
- E=signal
- fi
- if (( $e != 1 ))
- then E=${E}s
- fi
- 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 VMALLOC_OPTIONS=$vmalloc_options
- fi
- fi
-done
-if [[ $compile ]]
-then for i in ${*-*.sh}
- do if [[ ! -r $i ]]
- then continue
- fi
- t=${tests[$i]}
- T=test
- if (( $t != 1 ))
- then T=${T}s
- fi
- o=${i##*/}
- o=shcomp-${o%.sh}.ksh
- echo test $o begins ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"}
- E=error
- if $SHCOMP $i > $tmp/$o
- then if [[ $i == $timesensitive ]]
- 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 ]"
- else e=$?
- if (( e > 256 ))
- then e=1
- E=signal
- fi
- if (( $e != 1 ))
- then E=${E}s
- fi
- 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 VMALLOC_OPTIONS=$vmalloc_options
- fi
- else e=$?
- t=1
- T=test
- echo test $o failed to compile ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} with exit code $e "[ $t $T 1 $E ]"
- fi
- done
-fi
diff --git a/usr/src/lib/libshell/common/tests/statics.sh b/usr/src/lib/libshell/common/tests/statics.sh
deleted file mode 100644
index ee13cbebba..0000000000
--- a/usr/src/lib/libshell/common/tests/statics.sh
+++ /dev/null
@@ -1,106 +0,0 @@
-########################################################################
-# #
-# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
-# and is licensed under the #
-# Common Public License, Version 1.0 #
-# by AT&T Intellectual Property #
-# #
-# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
-# #
-# Information and Software Systems Research #
-# AT&T Research #
-# Florham Park NJ #
-# #
-# David Korn <dgk@research.att.com> #
-# #
-########################################################################
-function err_exit2
-{
- print -u2 -n "\t"
- print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors+=1 ))
-}
-
-function testfunc
-{
- integer line_number=$1
- typeset cmd="$2"
- typeset expected_output="$3"
- typeset output
-
- output="$($SHELL -c "${cmd}" 2>&1 )"
-
- [[ "${output}" != "${expected_output}" ]] && err_exit2 ${line_number} "${output} != ${expected_output}"
-}
-alias testfunc='testfunc $LINENO'
-alias err_exit='err_exit2 $LINENO'
-
-Command=${0##*/}
-integer Errors=0
-
-# string
-testfunc '(function l { typeset -S x ; x+="#" ; $1 && print "$x" ; } ; l false ; l false ; l true)' "###"
-testfunc 'function l { typeset -S x=">" ; x+="#" ; $1 && print "$x" ; } ; l false ; l false ; l true' ">###"
-testfunc 'function l { typeset -S x=">" ; x+="#" ; $1 && print "$x" ; } ; l false ; (l false) ; l true' ">##"
-testfunc 'function l { typeset -S x=">" ; x+="#" ; $1 && print "$x" ; } ; l false; ( ulimit -c 0 ; l false) ; l true' ">##"
-
-# integer
-testfunc '(function l { typeset -S -i x ; x+=1 ; $1 && print "$x" ; } ; l false ; l false ; l true )' "3"
-testfunc '(function l { typeset -S -i x ; x+=1 ; $1 && print "$x" ; } ; l false ; (l false) ; l true )' "2"
-
-# float
-testfunc '(function l { float -S x=0.5 ; (( x+=.5 )) ; $1 && print "$x" ; } ; l false ; l false ; l true )' "2"
-testfunc '(function l { float -S x=0.5 ; (( x+=.5 )) ; $1 && print "$x" ; } ; l false ; (l false) ; l true )' "1.5"
-
-# compound variable
-[[ "${
- function l
- {
- typeset -S s=( a=0 b=0 )
-
- (( s.a++, s.b++ ))
-
- $1 && printf 'a=%d, b=%d\n' s.a s.b
- }
- l false ; l false ; l true
-}" != "a=3, b=3" ]] && err_exit "static compound var failed"
-
-
-# array variable
-expected="helloan elementan elementan element"
-got=$(
- function ar
- {
- typeset -a -S s=( "hello" )
-
- s+=( "an element" )
-
- $1 && { printf '%s' "${s[@]}" ; printf '\n' ; }
- }
- ar false ; ar false ; ar true
-)
-[[ $got != $expected ]] && err_exit "static array var failed -- expected '$expected', got '$got'"
-
-
-# Test visibilty of "global" vs. "static" variables. if we have a "static" variable in a
-# function and "unset" it we should see a global variable with the same
-# name, right ?
-integer hx=5
-function test_hx_scope
-{
- integer -S hx=9
- $2 && unset hx
- $1 && printf "hx=%d\n" hx
-}
-test_hx_scope false false
-test_hx_scope false false
-# first test the "unset" call in a $(...) subshell...
-[[ "$( test_hx_scope true true )" != "hx=5" ]] && err_exit "can't see global variable hx after unsetting static variable hx"
-# ... end then test whether the value has changed.
-[[ "${ test_hx_scope true false }" != "hx=9" ]] && err_exit "hx variable somehow changed"
-
-exit $((Errors))
-
diff --git a/usr/src/lib/libshell/common/tests/timetype.sh b/usr/src/lib/libshell/common/tests/timetype.sh
deleted file mode 100644
index 8a2d17d324..0000000000
--- a/usr/src/lib/libshell/common/tests/timetype.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-########################################################################
-# #
-# This software is part of the ast package #
-# Copyright (c) 1982-2010 AT&T Intellectual Property #
-# and is licensed under the #
-# Common Public License, Version 1.0 #
-# by AT&T Intellectual Property #
-# #
-# A copy of the License is available at #
-# http://www.opensource.org/licenses/cpl1.0.txt #
-# (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) #
-# #
-# Information and Software Systems Research #
-# AT&T Research #
-# Florham Park NJ #
-# #
-# David Korn <dgk@research.att.com> #
-# #
-########################################################################
-function err_exit
-{
- print -u2 -n "\t"
- print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors+=1 ))
-}
-alias err_exit='err_exit $LINENO'
-
-Command=${0##*/}
-integer Errors=0
-
-typeset -T Time_t=(
- integer .=-1
- _='%F+%H:%M'
- get()
- {
- if (( _ < 0 ))
- then .sh.value=${ printf "%(${_._})T" now ;}
- else .sh.value=${ printf "%(${_._})T" "#$((_))" ;}
- fi
- }
- set()
- {
- .sh.value=${ printf "%(%#)T" "${.sh.value}";}
- }
-)
-
-d=$(printf "%(%F+%H:%M)T" now)
-integer s=$(printf "%(%#)T" "$d")
-Time_t t=$d
-[[ $t == "$d" ]] || err_exit 'printf %T and Time_t are different'
-(( t == s )) || err_exit 'numerical Time_t not correct'
-t._='%#'
-[[ $t == $s ]] || err_exit 'setting _ to %# not getting correct results'
-unset t
-Time_t tt=(yesterday today tomorrow)
-tt[3]=2pm
-[[ ${!tt[@]} == '0 1 2 3' ]] || err_exit 'indexed array subscript names not correct'
-[[ ${tt[0]} == *+00:00 ]] || err_exit 'tt[0] is not yesterday'
-[[ ${tt[1]} == *+00:00 ]] || err_exit 'tt[1] is not today'
-[[ ${tt[2]} == *+00:00 ]] || err_exit 'tt[2] is not tomorrow'
-[[ ${tt[3]} == *+14:00 ]] || err_exit 'tt[0] is not 2pm'
-unset tt
-Time_t tt=('2008-08-11+00:00:00,yesterday' '2008-08-11+00:00:00,today' '2008-08-11+00:00:00,tomorrow')
-tt[3]=9am
-tt[4]=5pm
-(( (tt[1] - tt[0] ) == 24*3600 )) || err_exit 'today-yesterday not one day'
-(( (tt[2] - tt[1] ) == 24*3600 )) || err_exit 'tomorrow-today not one day'
-(( (tt[4] - tt[3] ) == 8*3600 )) || err_exit '9am .. 5pm is not 8 hours'
-unset tt
-Time_t tt=([yesterday]='2008-08-11+00:00:00,yesterday' [today]='2008-08-11+00:00:00,today' [tomorrow]='2008-08-11+00:00:00,tomorrow')
-tt[2pm]='2008-08-11+00:00:00,2pm'
-[[ ${tt[yesterday]} == *+00:00 ]] || err_exit 'tt[yesterday] is not yesterday'
-[[ ${tt[today]} == *+00:00 ]] || err_exit 'tt[today] is not today'
-[[ ${tt[tomorrow]} == *+00:00 ]] || err_exit 'tt[tomorrow] is not tomorrow'
-[[ ${tt[2pm]} == *+14:00 ]] || err_exit 'tt[2pm] is not 2pm'
-(( (tt[today] - tt[yesterday] ) == 24*3600 )) || err_exit 'today-yesterday not one day'
-(( (tt[tomorrow] - tt[today] ) == 24*3600 )) || err_exit 'tomorrow-today not one day'
-(( (tt[2pm] - tt[today] ) == 14*3600 )) || err_exit '2pm is not 14 hours'
-unset tt
-exit $Errors
diff --git a/usr/src/lib/libshell/common/tests/treemove.sh b/usr/src/lib/libshell/common/tests/treemove.sh
deleted file mode 100644
index 9e83e35e50..0000000000
--- a/usr/src/lib/libshell/common/tests/treemove.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# This test checks whether "typeset -m" correctly moves local variables
-# into a global variable tree.
-#
-# This was reported as CR #XXXXXXXX ("XXXX"):
-# -- snip --
-#XXXX
-# -- snip --
-#
-
-function err_exit
-{
- print -u2 -n "\t"
- print -u2 -r ${Command}[$1]: "${@:2}"
- (( Errors+=1 ))
-}
-
-alias err_exit='err_exit $LINENO'
-
-integer Errors=0
-
-## test start
-typeset -C tree1 tree2
-
-# add node to tree which uses "typeset -m" to move a local variable
-# into tree1.subtree["a_node"]
-function f1
-{
- nameref tr=$1
- typeset -A tr.subtree
- typeset -C node
- node.one="hello"
- node.two="world"
- # move local note into the array
-false
- typeset -m tr.subtree["a_node"]=node
- return 0
-}
-
-# Alternative version which uses "nameref" instead of "typeset -m"
-function f2
-{
- nameref tr=$1
- typeset -A tr.subtree
- nameref node=tr.subtree["a_node"]
- node.one="hello"
- node.two="world"
- return 0
-}
-
-f1 tree1
-f2 tree2
-
-[[ "${tree1.subtree["a_node"].one}" == "hello" ]] || err_exit "expected tree1.subtree[\"a_node\"].one == 'hello', got ${tree1.subtree["a_node"].one}"
-[[ "${tree1.subtree["a_node"].two}" == "world" ]] || err_exit "expected tree1.subtree[\"a_node\"].two == 'world', got ${tree1.subtree["a_node"].two}"
-[[ "${tree1}" == "${tree2}" ]] || err_exit "tree1 and tree2 differ:$'\n'"
-
-# tests done
-exit $((Errors))
diff --git a/usr/src/lib/libshell/i386/include/ast/history.h b/usr/src/lib/libshell/i386/include/ast/history.h
deleted file mode 100644
index 1b0f3ce403..0000000000
--- a/usr/src/lib/libshell/i386/include/ast/history.h
+++ /dev/null
@@ -1,84 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef HIST_VERSION
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * Interface for history mechanism
- * written by David Korn
- *
- */
-
-#include <ast.h>
-
-#define HIST_CHAR '!'
-#define HIST_VERSION 1 /* history file format version no. */
-
-typedef struct
-{
- Sfdisc_t histdisc; /* discipline for history */
- Sfio_t *histfp; /* history file stream pointer */
- char *histname; /* name of history file */
- int32_t histind; /* current command number index */
- int histsize; /* number of accessible history lines */
-#ifdef _HIST_PRIVATE
- _HIST_PRIVATE
-#endif /* _HIST_PRIVATE */
-} History_t;
-
-typedef struct
-{
- int hist_command;
- int hist_line;
- int hist_char;
-} Histloc_t;
-
-/* the following are readonly */
-extern __MANGLE__ const char hist_fname[];
-
-extern __MANGLE__ int _Hist;
-#define hist_min(hp) ((_Hist=((int)((hp)->histind-(hp)->histsize)))>=0?_Hist:0)
-#define hist_max(hp) ((int)((hp)->histind))
-/* these are the history interface routines */
-extern __MANGLE__ int sh_histinit __PROTO__((__V_ *));
-extern __MANGLE__ void hist_cancel __PROTO__((History_t*));
-extern __MANGLE__ void hist_close __PROTO__((History_t*));
-extern __MANGLE__ int hist_copy __PROTO__((char*, int, int, int));
-extern __MANGLE__ void hist_eof __PROTO__((History_t*));
-extern __MANGLE__ Histloc_t hist_find __PROTO__((History_t*,char*,int, int, int));
-extern __MANGLE__ void hist_flush __PROTO__((History_t*));
-extern __MANGLE__ void hist_list __PROTO__((History_t*,Sfio_t*, off_t, int, char*));
-extern __MANGLE__ int hist_match __PROTO__((History_t*,off_t, char*, int*));
-extern __MANGLE__ off_t hist_tell __PROTO__((History_t*,int));
-extern __MANGLE__ off_t hist_seek __PROTO__((History_t*,int));
-extern __MANGLE__ char *hist_word __PROTO__((char*, int, int));
-#if SHOPT_ESH
- extern __MANGLE__ Histloc_t hist_locate __PROTO__((History_t*,int, int, int));
-#endif /* SHOPT_ESH */
-
-#endif /* HIST_VERSION */
diff --git a/usr/src/lib/libshell/i386/include/ast/nval.h b/usr/src/lib/libshell/i386/include/ast/nval.h
deleted file mode 100644
index f5be4fa865..0000000000
--- a/usr/src/lib/libshell/i386/include/ast/nval.h
+++ /dev/null
@@ -1,323 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef NV_DEFAULT
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * David Korn
- * AT&T Labs
- *
- * Interface definitions of structures for name-value pairs
- * These structures are used for named variables, functions and aliases
- *
- */
-
-
-#include <ast.h>
-#include <cdt.h>
-#include <option.h>
-
-/* for compatibility with old hash library */
-#define Hashtab_t Dt_t
-#define HASH_BUCKET 1
-#define HASH_NOSCOPE 2
-#define HASH_SCOPE 4
-#define hashscope(x) dtvnext(x)
-
-typedef struct Namval Namval_t;
-typedef struct Namfun Namfun_t;
-typedef struct Namdisc Namdisc_t;
-typedef struct Nambfun Nambfun_t;
-typedef struct Namarray Namarr_t;
-typedef struct Namdecl Namdecl_t;
-
-/*
- * This defines the template for nodes that have their own assignment
- * and or lookup functions
- */
-struct Namdisc
-{
- size_t dsize;
- void (*putval) __PROTO__((Namval_t*, const char*, int, Namfun_t*));
- char *(*getval) __PROTO__((Namval_t*, Namfun_t*));
- Sfdouble_t (*getnum) __PROTO__((Namval_t*, Namfun_t*));
- char *(*setdisc) __PROTO__((Namval_t*, const char*, Namval_t*, Namfun_t*));
- Namval_t *(*createf) __PROTO__((Namval_t*, const char*, int, Namfun_t*));
- Namfun_t *(*clonef) __PROTO__((Namval_t*, Namval_t*, int, Namfun_t*));
- char *(*namef) __PROTO__((Namval_t*, Namfun_t*));
- Namval_t *(*nextf) __PROTO__((Namval_t*, Dt_t*, Namfun_t*));
- Namval_t *(*typef) __PROTO__((Namval_t*, Namfun_t*));
- int (*readf) __PROTO__((Namval_t*, Sfio_t*, int, Namfun_t*));
- int (*writef) __PROTO__((Namval_t*, Sfio_t*, int, Namfun_t*));
-};
-
-struct Namfun
-{
- const Namdisc_t *disc;
- char nofree;
- unsigned char subshell;
- unsigned short dsize;
- Namfun_t *next;
- char *last;
- Namval_t *type;
-};
-
-struct Nambfun
-{
- Namfun_t fun;
- int num;
- const char **bnames;
- Namval_t *bltins[1];
-};
-
-/* This is an array template header */
-struct Namarray
-{
- Namfun_t hdr;
- long nelem; /* number of elements */
- __V_ *(*fun) __PROTO__((Namval_t*,const char*,int)); /* associative arrays */
- Namval_t *parent; /* for multi-dimensional */
- Dt_t *table; /* for subscripts */
- __V_ *scope; /* non-zerp when scoped */
-};
-
-/* The context pointer for declaration command */
-struct Namdecl
-{
- Namval_t *tp; /* point to type */
- const char *optstring;
- __V_ *optinfof;
-};
-
-/* attributes of name-value node attribute flags */
-
-#define NV_DEFAULT 0
-/* This defines the attributes for an attributed name-value pair node */
-struct Namval
-{
- Dtlink_t nvlink; /* space for cdt links */
- char *nvname; /* pointer to name of the node */
- unsigned short nvflag; /* attributes */
- unsigned short nvsize; /* size or base */
-#ifdef _NV_PRIVATE
- _NV_PRIVATE
-#else
- Namfun_t *nvfun;
- char *nvalue;
- char *nvprivate;
-#endif /* _NV_PRIVATE */
-};
-
-#define NV_CLASS ".sh.type"
-#define NV_DATA "_" /* special class or instance variable */
-#define NV_MINSZ (sizeof(struct Namval)-sizeof(Dtlink_t)-sizeof(char*))
-#define nv_namptr(p,n) ((Namval_t*)((char*)(p)+(n)*NV_MINSZ-sizeof(Dtlink_t)))
-
-/* The following attributes are for internal use */
-#define NV_NOFREE 0x200 /* don't free the space when releasing value */
-#define NV_ARRAY 0x400 /* node is an array */
-#define NV_REF 0x4000 /* reference bit */
-#define NV_TABLE 0x800 /* node is a dictionary table */
-#define NV_IMPORT 0x1000 /* value imported from environment */
-#define NV_MINIMAL NV_IMPORT /* node does not contain all fields */
-
-#define NV_INTEGER 0x2 /* integer attribute */
-/* The following attributes are valid only when NV_INTEGER is off */
-#define NV_LTOU 0x4 /* convert to uppercase */
-#define NV_UTOL 0x8 /* convert to lowercase */
-#define NV_ZFILL 0x10 /* right justify and fill with leading zeros */
-#define NV_RJUST 0x20 /* right justify and blank fill */
-#define NV_LJUST 0x40 /* left justify and blank fill */
-#define NV_BINARY 0x100 /* fixed size data buffer */
-#define NV_RAW NV_LJUST /* used only with NV_BINARY */
-#define NV_HOST (NV_RJUST|NV_LJUST) /* map to host filename */
-
-/* The following attributes do not effect the value */
-#define NV_RDONLY 0x1 /* readonly bit */
-#define NV_EXPORT 0x2000 /* export bit */
-#define NV_TAGGED 0x8000 /* user define tag bit */
-
-/* The following are used with NV_INTEGER */
-#define NV_SHORT (NV_RJUST) /* when integers are not long */
-#define NV_LONG (NV_UTOL) /* for long long and long double */
-#define NV_UNSIGN (NV_LTOU) /* for unsigned quantities */
-#define NV_DOUBLE (NV_INTEGER|NV_ZFILL) /* for floating point */
-#define NV_EXPNOTE (NV_LJUST) /* for scientific notation */
-#define NV_HEXFLOAT (NV_LTOU) /* for C99 base16 float notation */
-
-/* options for nv_open */
-
-#define NV_APPEND 0x10000 /* append value */
-#define NV_MOVE 0x8000000 /* for use with nv_clone */
-#define NV_ADD 8
- /* add node if not found */
-#define NV_ASSIGN NV_NOFREE /* assignment is possible */
-#define NV_NOASSIGN 0 /* backward compatibility */
-#define NV_NOARRAY 0x200000 /* array name not possible */
-#define NV_IARRAY 0x400000 /* for indexed array */
-#define NV_NOREF NV_REF /* don't follow reference */
-#define NV_IDENT 0x80 /* name must be identifier */
-#define NV_VARNAME 0x20000 /* name must be ?(.)id*(.id) */
-#define NV_NOADD 0x40000 /* do not add node */
-#define NV_NOSCOPE 0x80000 /* look only in current scope */
-#define NV_NOFAIL 0x100000 /* return 0 on failure, no msg */
-#define NV_NODISC NV_IDENT /* ignore disciplines */
-
-#define NV_FUNCT NV_IDENT /* option for nv_create */
-#define NV_BLTINOPT NV_ZFILL /* mark builtins in libcmd */
-
-#define NV_PUBLIC (~(NV_NOSCOPE|NV_ASSIGN|NV_IDENT|NV_VARNAME|NV_NOADD))
-
-/* numeric types */
-#define NV_INT16P (NV_LJUST|NV_SHORT|NV_INTEGER)
-#define NV_INT16 (NV_SHORT|NV_INTEGER)
-#define NV_UINT16 (NV_UNSIGN|NV_SHORT|NV_INTEGER)
-#define NV_UINT16P (NV_LJUSTNV_UNSIGN|NV_SHORT|NV_INTEGER)
-#define NV_INT32 (NV_INTEGER)
-#define NV_UNT32 (NV_UNSIGN|NV_INTEGER)
-#define NV_INT64 (NV_LONG|NV_INTEGER)
-#define NV_UINT64 (NV_UNSIGN|NV_LONG|NV_INTEGER)
-#define NV_FLOAT (NV_SHORT|NV_DOUBLE)
-#define NV_LDOUBLE (NV_LONG|NV_DOUBLE)
-
-/* name-value pair macros */
-#define nv_isattr(np,f) ((np)->nvflag & (f))
-#define nv_onattr(n,f) ((n)->nvflag |= (f))
-#define nv_offattr(n,f) ((n)->nvflag &= ~(f))
-#define nv_isarray(np) (nv_isattr((np),NV_ARRAY))
-
-/* The following are operations for associative arrays */
-#define NV_AINIT 1 /* initialize */
-#define NV_AFREE 2 /* free array */
-#define NV_ANEXT 3 /* advance to next subscript */
-#define NV_ANAME 4 /* return subscript name */
-#define NV_ADELETE 5 /* delete current subscript */
-#define NV_AADD 6 /* add subscript if not found */
-#define NV_ACURRENT 7 /* return current subscript Namval_t* */
-#define NV_ASETSUB 8 /* set current subscript */
-
-/* The following are for nv_disc */
-#define NV_FIRST 1
-#define NV_LAST 2
-#define NV_POP 3
-#define NV_CLONE 4
-
-/* The following are operations for nv_putsub() */
-#define ARRAY_BITS 22
-#define ARRAY_ADD (1L<<ARRAY_BITS) /* add subscript if not found */
-#define ARRAY_SCAN (2L<<ARRAY_BITS) /* For ${array[@]} */
-#define ARRAY_UNDEF (4L<<ARRAY_BITS) /* For ${array} */
-
-
-/* These are disciplines provided by the library for use with nv_discfun */
-#define NV_DCADD 0 /* used to add named disciplines */
-#define NV_DCRESTRICT 1 /* variable that are restricted in rsh */
-
-#if defined(__EXPORT__) && defined(_DLL)
-# ifdef _BLD_shell
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-# else
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-# endif /* _BLD_shell */
-#endif /* _DLL */
-/* prototype for array interface*/
-extern __MANGLE__ Namarr_t *nv_arrayptr __PROTO__((Namval_t*));
-extern __MANGLE__ Namarr_t *nv_setarray __PROTO__((Namval_t*,__V_*(*)(Namval_t*,const char*,int)));
-extern __MANGLE__ int nv_arraynsub __PROTO__((Namarr_t*));
-extern __MANGLE__ __V_ *nv_associative __PROTO__((Namval_t*,const char*,int));
-extern __MANGLE__ int nv_aindex __PROTO__((Namval_t*));
-extern __MANGLE__ int nv_nextsub __PROTO__((Namval_t*));
-extern __MANGLE__ char *nv_getsub __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_putsub __PROTO__((Namval_t*, char*, long));
-extern __MANGLE__ Namval_t *nv_opensub __PROTO__((Namval_t*));
-
-/* name-value pair function prototypes */
-extern __MANGLE__ int nv_adddisc __PROTO__((Namval_t*, const char**, Namval_t**));
-extern __MANGLE__ int nv_clone __PROTO__((Namval_t*, Namval_t*, int));
-extern __MANGLE__ void nv_close __PROTO__((Namval_t*));
-extern __MANGLE__ __V_ *nv_context __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_create __PROTO__((const char*, Dt_t*, int,Namfun_t*));
-extern __MANGLE__ void nv_delete __PROTO__((Namval_t*, Dt_t*, int));
-extern __MANGLE__ Dt_t *nv_dict __PROTO__((Namval_t*));
-extern __MANGLE__ Sfdouble_t nv_getn __PROTO__((Namval_t*, Namfun_t*));
-extern __MANGLE__ Sfdouble_t nv_getnum __PROTO__((Namval_t*));
-extern __MANGLE__ char *nv_getv __PROTO__((Namval_t*, Namfun_t*));
-extern __MANGLE__ char *nv_getval __PROTO__((Namval_t*));
-extern __MANGLE__ Namfun_t *nv_hasdisc __PROTO__((Namval_t*, const Namdisc_t*));
-extern __MANGLE__ int nv_isnull __PROTO__((Namval_t*));
-extern __MANGLE__ Namfun_t *nv_isvtree __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_lastdict __PROTO__((void));
-extern __MANGLE__ Namval_t *nv_mkinttype __PROTO__((char*, size_t, int, const char*, Namdisc_t*));
-extern __MANGLE__ void nv_newattr __PROTO__((Namval_t*,unsigned,int));
-extern __MANGLE__ void nv_newtype __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_open __PROTO__((const char*,Dt_t*,int));
-extern __MANGLE__ void nv_putval __PROTO__((Namval_t*,const char*,int));
-extern __MANGLE__ void nv_putv __PROTO__((Namval_t*,const char*,int,Namfun_t*));
-extern __MANGLE__ int nv_rename __PROTO__((Namval_t*,int));
-extern __MANGLE__ int nv_scan __PROTO__((Dt_t*,void(*)(Namval_t*,__V_*),__V_*,int,int));
-extern __MANGLE__ char *nv_setdisc __PROTO__((Namval_t*,const char*,Namval_t*,Namfun_t*));
-extern __MANGLE__ void nv_setref __PROTO__((Namval_t*, Dt_t*,int));
-extern __MANGLE__ int nv_settype __PROTO__((Namval_t*, Namval_t*, int));
-extern __MANGLE__ void nv_setvec __PROTO__((Namval_t*,int,int,char*[]));
-extern __MANGLE__ void nv_setvtree __PROTO__((Namval_t*));
-extern __MANGLE__ int nv_setsize __PROTO__((Namval_t*,int));
-extern __MANGLE__ Namfun_t *nv_disc __PROTO__((Namval_t*,Namfun_t*,int));
-extern __MANGLE__ void nv_unset __PROTO__((Namval_t*)); /*obsolete */
-extern __MANGLE__ void _nv_unset __PROTO__((Namval_t*,int));
-extern __MANGLE__ Namval_t *nv_search __PROTO__((const char *, Dt_t*, int));
-extern __MANGLE__ char *nv_name __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_type __PROTO__((Namval_t*));
-extern __MANGLE__ void nv_addtype __PROTO__((Namval_t*,const char*, Optdisc_t*, size_t));
-extern __MANGLE__ const Namdisc_t *nv_discfun __PROTO__((int));
-
-#ifdef _DLL
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif /* _DLL */
-
-#define nv_unset(np) _nv_unset(np,0)
-#define nv_size(np) nv_setsize((np),-1)
-#define nv_stack(np,nf) nv_disc(np,nf,0)
-
-#if 0
-/*
- * The names of many functions were changed in early '95
- * Here is a mapping to the old names
- */
-# define nv_istype(np) nv_isattr(np)
-# define nv_newtype(np) nv_newattr(np)
-# define nv_namset(np,a,b) nv_open(np,a,b)
-# define nv_free(np) nv_unset(np,0)
-# define nv_settype(np,a,b,c) nv_setdisc(np,a,b,c)
-# define nv_search(np,a,b) nv_open(np,a,((b)?0:NV_NOADD))
-# define settype setdisc
-#endif
-
-#endif /* NV_DEFAULT */
diff --git a/usr/src/lib/libshell/i386/include/ast/shell.h b/usr/src/lib/libshell/i386/include/ast/shell.h
deleted file mode 100644
index a8c1d85c3b..0000000000
--- a/usr/src/lib/libshell/i386/include/ast/shell.h
+++ /dev/null
@@ -1,264 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef SH_INTERACTIVE
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * David Korn
- * AT&T Labs
- *
- * Interface definitions for shell command language
- *
- */
-
-#include <ast.h>
-#include <cdt.h>
-#ifdef _SH_PRIVATE
-# include "name.h"
-#else
-# include <nval.h>
-#endif /* _SH_PRIVATE */
-
-#define SH_VERSION 20071012
-
-#undef NOT_USED
-#define NOT_USED(x) (&x,1)
-
-/* options */
-typedef struct
-{
- unsigned long v[4];
-}
-Shopt_t;
-
-typedef struct Shell_s Shell_t;
-
-typedef void (*Shinit_f) __PROTO__((Shell_t*, int));
-typedef int (*Shwait_f) __PROTO__((int, long, int));
-
-union Shnode_u;
-typedef union Shnode_u Shnode_t;
-
-#define SH_CFLAG 0
-#define SH_HISTORY 1 /* used also as a state */
-#define SH_ERREXIT 2 /* used also as a state */
-#define SH_VERBOSE 3 /* used also as a state */
-#define SH_MONITOR 4 /* used also as a state */
-#define SH_INTERACTIVE 5 /* used also as a state */
-#define SH_RESTRICTED 6
-#define SH_XTRACE 7
-#define SH_KEYWORD 8
-#define SH_NOUNSET 9
-#define SH_NOGLOB 10
-#define SH_ALLEXPORT 11
-#define SH_PFSH 12
-#define SH_IGNOREEOF 13
-#define SH_NOCLOBBER 14
-#define SH_MARKDIRS 15
-#define SH_BGNICE 16
-#define SH_VI 17
-#define SH_VIRAW 18
-#define SH_TFLAG 19
-#define SH_TRACKALL 20
-#define SH_SFLAG 21
-#define SH_NOEXEC 22
-#define SH_GMACS 24
-#define SH_EMACS 25
-#define SH_PRIVILEGED 26
-#define SH_SUBSHARE 27 /* subshell shares state with parent */
-#define SH_NOLOG 28
-#define SH_NOTIFY 29
-#define SH_DICTIONARY 30
-#define SH_PIPEFAIL 32
-#define SH_GLOBSTARS 33
-#define SH_XARGS 34
-#define SH_RC 35
-#define SH_SHOWME 36
-
-/*
- * passed as flags to builtins in Nambltin_t struct when BLT_OPTIM is on
- */
-#define SH_BEGIN_OPTIM 0x1
-#define SH_END_OPTIM 0x2
-
-/* The following type is used for error messages */
-
-/* error messages */
-extern __MANGLE__ const char e_defpath[];
-extern __MANGLE__ const char e_found[];
-extern __MANGLE__ const char e_nospace[];
-extern __MANGLE__ const char e_format[];
-extern __MANGLE__ const char e_number[];
-extern __MANGLE__ const char e_restricted[];
-extern __MANGLE__ const char e_recursive[];
-extern __MANGLE__ char e_version[];
-
-typedef struct sh_scope
-{
- struct sh_scope *par_scope;
- int argc;
- char **argv;
- char *cmdname;
- char *filename;
- char *funname;
- int lineno;
- Dt_t *var_tree;
- struct sh_scope *self;
-} Shscope_t;
-
-/*
- * Saves the state of the shell
- */
-
-struct Shell_s
-{
- Shopt_t options; /* set -o options */
- Dt_t *var_tree; /* for shell variables */
- Dt_t *fun_tree; /* for shell functions */
- Dt_t *alias_tree; /* for alias names */
- Dt_t *bltin_tree; /* for builtin commands */
- Shscope_t *topscope; /* pointer to top-level scope */
- int inlineno; /* line number of current input file */
- int exitval; /* most recent exit value */
- unsigned char trapnote; /* set when trap/signal is pending */
- char shcomp; /* set when runing shcomp */
- short subshell; /* set for virtual subshell */
-#ifdef _SH_PRIVATE
- _SH_PRIVATE
-#endif /* _SH_PRIVATE */
-};
-
-/* flags for sh_parse */
-#define SH_NL 1 /* Treat new-lines as ; */
-#define SH_EOF 2 /* EOF causes syntax error */
-
-/* symbolic values for sh_iogetiop */
-#define SH_IOCOPROCESS (-2)
-#define SH_IOHISTFILE (-3)
-
-#include <cmd.h>
-
-/* symbolic value for sh_fdnotify */
-#define SH_FDCLOSE (-1)
-
-#undef getenv /* -lshell provides its own */
-
-#if defined(__EXPORT__) && defined(_DLL)
-# ifdef _BLD_shell
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-# endif /* _BLD_shell */
-#endif /* _DLL */
-
-extern __MANGLE__ Dt_t *sh_bltin_tree __PROTO__((void));
-extern __MANGLE__ void sh_subfork __PROTO__((void));
-extern __MANGLE__ Shell_t *sh_init __PROTO__((int,char*[],Shinit_f));
-extern __MANGLE__ int sh_reinit __PROTO__((char*[]));
-extern __MANGLE__ int sh_eval __PROTO__((Sfio_t*,int));
-extern __MANGLE__ void sh_delay __PROTO__((double));
-extern __MANGLE__ __V_ *sh_parse __PROTO__((Shell_t*, Sfio_t*,int));
-extern __MANGLE__ int sh_trap __PROTO__((const char*,int));
-extern __MANGLE__ int sh_fun __PROTO__((Namval_t*,Namval_t*, char*[]));
-extern __MANGLE__ int sh_funscope __PROTO__((int,char*[],int(*)(__V_*),__V_*,int));
-extern __MANGLE__ Sfio_t *sh_iogetiop __PROTO__((int,int));
-extern __MANGLE__ int sh_main __PROTO__((int, char*[], Shinit_f));
-extern __MANGLE__ int sh_run __PROTO__((int, char*[]));
-extern __MANGLE__ void sh_menu __PROTO__((Sfio_t*, int, char*[]));
-extern __MANGLE__ Namval_t *sh_addbuiltin __PROTO__((const char*, int(*)(int, char*[],__V_*), __V_*));
-extern __MANGLE__ char *sh_fmtq __PROTO__((const char*));
-extern __MANGLE__ char *sh_fmtqf __PROTO__((const char*, int, int));
-extern __MANGLE__ Sfdouble_t sh_strnum __PROTO__((const char*, char**, int));
-extern __MANGLE__ int sh_access __PROTO__((const char*,int));
-extern __MANGLE__ int sh_close __PROTO__((int));
-extern __MANGLE__ int sh_dup __PROTO__((int));
-extern __MANGLE__ void sh_exit __PROTO__((int));
-extern __MANGLE__ int sh_fcntl __PROTO__((int, int, ...));
-extern __MANGLE__ Sfio_t *sh_fd2sfio __PROTO__((int));
-extern __MANGLE__ int (*sh_fdnotify __PROTO__((int(*)(int,int)))) __PROTO__((int,int));
-extern __MANGLE__ Shell_t *sh_getinterp __PROTO__((void));
-extern __MANGLE__ int sh_open __PROTO__((const char*, int, ...));
-extern __MANGLE__ int sh_openmax __PROTO__((void));
-extern __MANGLE__ Sfio_t *sh_pathopen __PROTO__((const char*));
-extern __MANGLE__ ssize_t sh_read __PROTO__((int, __V_*, size_t));
-extern __MANGLE__ ssize_t sh_write __PROTO__((int, const __V_*, size_t));
-extern __MANGLE__ off_t sh_seek __PROTO__((int, off_t, int));
-extern __MANGLE__ int sh_pipe __PROTO__((int[]));
-extern __MANGLE__ mode_t sh_umask __PROTO__((mode_t));
-extern __MANGLE__ __V_ *sh_waitnotify __PROTO__((Shwait_f));
-extern __MANGLE__ Shscope_t *sh_getscope __PROTO__((int,int));
-extern __MANGLE__ Shscope_t *sh_setscope __PROTO__((Shscope_t*));
-extern __MANGLE__ void sh_sigcheck __PROTO__((void));
-extern __MANGLE__ unsigned long sh_isoption __PROTO__((int));
-extern __MANGLE__ unsigned long sh_onoption __PROTO__((int));
-extern __MANGLE__ unsigned long sh_offoption __PROTO__((int));
-extern __MANGLE__ int sh_waitsafe __PROTO__((void));
-extern __MANGLE__ int sh_exec __PROTO__((const Shnode_t*,int));
-
-#if SHOPT_DYNAMIC
- extern __MANGLE__ __V_ **sh_getliblist __PROTO__((void));
-#endif /* SHOPT_DYNAMIC */
-
-/*
- * direct access to sh is obsolete, use sh_getinterp() instead
- */
-#if !defined(_SH_PRIVATE) && defined(__IMPORT__) && !defined(_BLD_shell)
- extern __MANGLE__ __IMPORT__ Shell_t sh;
-#else
- extern __MANGLE__ Shell_t sh;
-#endif
-
-#ifdef _DLL
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif /* _DLL */
-
-#ifndef _SH_PRIVATE
-# define access(a,b) sh_access(a,b)
-# define close(a) sh_close(a)
-# define exit(a) sh_exit(a)
-# define fcntl(a,b,c) sh_fcntl(a,b,c)
-# define pipe(a) sh_pipe(a)
-# define read(a,b,c) sh_read(a,b,c)
-# define write(a,b,c) sh_write(a,b,c)
-# define umask(a) sh_umask(a)
-# define dup sh_dup
-# if _lib_lseek64
-# define open64 sh_open
-# define lseek64 sh_seek
-# else
-# define open sh_open
-# define lseek sh_seek
-# endif
-#endif /* !_SH_PRIVATE */
-
-#define SH_SIGSET 4
-#define SH_EXITSIG 0400 /* signal exit bit */
-#define SH_EXITMASK (SH_EXITSIG-1) /* normal exit status bits */
-#define SH_RUNPROG -1022 /* needs to be negative and < 256 */
-
-#endif /* SH_INTERACTIVE */
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct
deleted file mode 100644
index 1eacd5748b..0000000000
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/acct
+++ /dev/null
@@ -1,13 +0,0 @@
-/* : : 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_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_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) */
-#define _sys_acct 1 /* #include <sys/acct.h> ok */
-#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds
deleted file mode 100644
index 624e61d6aa..0000000000
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/cmds
+++ /dev/null
@@ -1,37 +0,0 @@
-/* : : 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_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_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) */
-#define _bin_newgrp 1 /* /bin/newgrp found */
-#define _usr_bin_newgrp 1 /* /usr/bin/newgrp found */
-#define _cmd_test 1 /* test in ?(/usr)/(bin|etc|ucb) */
-#define _bin_test 1 /* /bin/test found */
-#define _usr_bin_test 1 /* /usr/bin/test found */
-#define _usr_ucb_test 1 /* /usr/ucb/test found */
-#define _cmd_id 1 /* id in ?(/usr)/(bin|etc|ucb) */
-#define _bin_id 1 /* /bin/id found */
-#define _usr_bin_id 1 /* /usr/bin/id found */
-#define _cmd_wc 1 /* wc in ?(/usr)/(bin|etc|ucb) */
-#define _bin_wc 1 /* /bin/wc found */
-#define _usr_bin_wc 1 /* /usr/bin/wc found */
-#define _usr_ucb_wc 1 /* /usr/ucb/wc found */
-#define _cmd_cut 1 /* cut in ?(/usr)/(bin|etc|ucb) */
-#define _bin_cut 1 /* /bin/cut found */
-#define _usr_bin_cut 1 /* /usr/bin/cut found */
-#define _cmd_logname 1 /* logname in ?(/usr)/(bin|etc|ucb) */
-#define _bin_logname 1 /* /bin/logname found */
-#define _usr_bin_logname 1 /* /usr/bin/logname found */
-#define _cmd_pfexec 1 /* pfexec in ?(/usr)/(bin|etc|ucb) */
-#define _bin_pfexec 1 /* /bin/pfexec found */
-#define _usr_bin_pfexec 1 /* /usr/bin/pfexec found */
-#define _cmd_tput 1 /* tput in ?(/usr)/(bin|etc|ucb) */
-#define _bin_tput 1 /* /bin/tput found */
-#define _usr_bin_tput 1 /* /usr/bin/tput found */
-#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic
deleted file mode 100644
index 1eec287fc4..0000000000
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/dynamic
+++ /dev/null
@@ -1,22 +0,0 @@
-/* : : 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_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_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
-#include <dlldefs.h>
-#endif
-#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
-# define SHOPT_FS_3D 1
-#endif /* !SHOPT_FS_3D */
-#if SHOPT_FS_3D
-# undef mount
-# include <fs3d.h>
-#endif /* SHOPT_FS_3D */
-
-#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs
deleted file mode 100644
index 932467ae55..0000000000
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/execargs
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : 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_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_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/options b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options
deleted file mode 100644
index a17b564638..0000000000
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/options
+++ /dev/null
@@ -1,25 +0,0 @@
-/* : : 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_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_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
-#ifndef SHOPT_DEVFD
-# define SHOPT_DEVFD 1
-#endif
-#undef SHOPT_PFSH
-#undef SHOPT_TEST_L
-#ifndef SHOPT_SYSRC
-# define SHOPT_SYSRC 1
-#endif
-#undef SHOPT_UCB
-#if !_PACKAGE_ast && ( (MB_LEN_MAX-1)<=0 || !defined(_lib_mbtowc) )
-# undef SHOPT_MULTIBYTE
-#endif
-
-#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat
deleted file mode 100644
index abb87a7d96..0000000000
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/pstat
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : 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_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_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
deleted file mode 100644
index 89aa709889..0000000000
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/rlimits
+++ /dev/null
@@ -1,20 +0,0 @@
-/* : : 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_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_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 */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_ulimit 1 /* ulimit() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_rlim_t 1 /* rlim_t is a type */
-#endif
diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys
deleted file mode 100644
index 6c6422a04d..0000000000
--- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/ttys
+++ /dev/null
@@ -1,20 +0,0 @@
-/* : : 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_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_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 */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#endif
diff --git a/usr/src/lib/libshell/misc/ERRATA.txt b/usr/src/lib/libshell/misc/ERRATA.txt
deleted file mode 100644
index 184b6aa01e..0000000000
--- a/usr/src/lib/libshell/misc/ERRATA.txt
+++ /dev/null
@@ -1,1017 +0,0 @@
-#
-# 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) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# ERRATA.txt
-#
-# Errata/problems/notes about problems in the current sources
-#
-
-######## Errata #001: ########
-The usage of |posix_spawn()| has been manually disabled because there seems to be a
-race condition which cases sporadic failures like this:
--- snip --
-$ builtin | fgrep sum | fgrep sum
-/usr/ast/bin/sum
-/usr/bin/sum
-$ builtin | fgrep sum | fgrep sum
-fgrep: fgrep: cannot execute [Exec format error]
--- snip --.
-The following files have been changed:
--- snip --
-Index: src/lib/libast/sparcv9/include/ast/ast_lib.h
-===================================================================
---- usr/src/lib/libast/sparcv9/include/ast/ast_lib.h (revision 888)
-+++ usr/src/lib/libast/sparcv9/include/ast/ast_lib.h (working copy)
-@@ -160,7 +160,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/sparcv9/src/lib/libast/ast_lib.h
-===================================================================
---- usr/src/lib/libast/sparcv9/src/lib/libast/ast_lib.h (revision 888)
-+++ usr/src/lib/libast/sparcv9/src/lib/libast/ast_lib.h (working copy)
-@@ -139,7 +139,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib
-===================================================================
---- usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib (revision 888)
-+++ usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib (working copy)
-@@ -139,7 +139,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/sparc/include/ast/ast_lib.h
-===================================================================
---- usr/src/lib/libast/sparc/include/ast/ast_lib.h (revision 888)
-+++ usr/src/lib/libast/sparc/include/ast/ast_lib.h (working copy)
-@@ -171,7 +171,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/sparc/src/lib/libast/ast_lib.h
-===================================================================
---- usr/src/lib/libast/sparc/src/lib/libast/ast_lib.h (revision 888)
-+++ usr/src/lib/libast/sparc/src/lib/libast/ast_lib.h (working copy)
-@@ -150,7 +150,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/sparc/src/lib/libast/FEATURE/lib
-===================================================================
---- usr/src/lib/libast/sparc/src/lib/libast/FEATURE/lib (revision 888)
-+++ usr/src/lib/libast/sparc/src/lib/libast/FEATURE/lib (working copy)
-@@ -150,7 +150,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/i386/include/ast/ast_lib.h
-===================================================================
---- usr/src/lib/libast/i386/include/ast/ast_lib.h (revision 888)
-+++ usr/src/lib/libast/i386/include/ast/ast_lib.h (working copy)
-@@ -171,7 +171,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/i386/src/lib/libast/ast_lib.h
-===================================================================
---- usr/src/lib/libast/i386/src/lib/libast/ast_lib.h (revision 888)
-+++ usr/src/lib/libast/i386/src/lib/libast/ast_lib.h (working copy)
-@@ -150,7 +150,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/i386/src/lib/libast/FEATURE/lib
-===================================================================
---- usr/src/lib/libast/i386/src/lib/libast/FEATURE/lib (revision 888)
-+++ usr/src/lib/libast/i386/src/lib/libast/FEATURE/lib (working copy)
-@@ -150,7 +150,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/amd64/include/ast/ast_lib.h
-===================================================================
---- usr/src/lib/libast/amd64/include/ast/ast_lib.h (revision 888)
-+++ usr/src/lib/libast/amd64/include/ast/ast_lib.h (working copy)
-@@ -160,7 +160,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/amd64/src/lib/libast/ast_lib.h
-===================================================================
---- usr/src/lib/libast/amd64/src/lib/libast/ast_lib.h (revision 888)
-+++ usr/src/lib/libast/amd64/src/lib/libast/ast_lib.h (working copy)
-@@ -139,7 +139,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
-Index: src/lib/libast/amd64/src/lib/libast/FEATURE/lib
-===================================================================
---- usr/src/lib/libast/amd64/src/lib/libast/FEATURE/lib (revision 888)
-+++ usr/src/lib/libast/amd64/src/lib/libast/FEATURE/lib (working copy)
-@@ -139,7 +139,7 @@
- #define _hdr_unistd 1 /* #include <unistd.h> ok */
- #define _lib_vfork 1 /* vfork exists and it works */
- #define _real_vfork 1 /* vfork child shares data with parent */
--#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */
-+#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */
- #define _stream_peek 1 /* ioctl(I_PEEK) works */
- #define _socket_peek 1 /* recv(MSG_PEEK) works */
- #define _hdr_string 1 /* #include <string.h> ok */
--- snip --
-
-
-######## Errata #002: ########
-The usage of |mmap()| has been manually enabled to improve I/O performance.
-The following files have been changed:
--- snip --
-Index: usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h
-===================================================================
---- usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h (revision 1701)
-+++ usr/src/lib/libast/sparcv9/include/ast/ast_mmap.h (working copy)
-@@ -28,6 +28,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/sparcv9/src/lib/libast/ast_mmap.h
-===================================================================
---- usr/src/lib/libast/sparcv9/src/lib/libast/ast_mmap.h (revision 1701)
-+++ usr/src/lib/libast/sparcv9/src/lib/libast/ast_mmap.h (working copy)
-@@ -7,6 +7,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mmap
-===================================================================
---- usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mmap (revision 1701)
-+++ usr/src/lib/libast/sparcv9/src/lib/libast/FEATURE/mmap (working copy)
-@@ -7,6 +7,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/sparc/include/ast/ast_mmap.h
-===================================================================
---- usr/src/lib/libast/sparc/include/ast/ast_mmap.h (revision 1701)
-+++ usr/src/lib/libast/sparc/include/ast/ast_mmap.h (working copy)
-@@ -28,7 +28,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
--#define _mmap_worthy 1 /* mmap is good */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h
-===================================================================
---- usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h (revision 1701)
-+++ usr/src/lib/libast/sparc/src/lib/libast/ast_mmap.h (working copy)
-@@ -7,7 +7,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
--#define _mmap_worthy 1 /* mmap is good */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mmap
-===================================================================
---- usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mmap (revision 1701)
-+++ usr/src/lib/libast/sparc/src/lib/libast/FEATURE/mmap (working copy)
-@@ -7,7 +7,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
--#define _mmap_worthy 1 /* mmap is good */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/i386/include/ast/ast_mmap.h
-===================================================================
---- usr/src/lib/libast/i386/include/ast/ast_mmap.h (revision 1701)
-+++ usr/src/lib/libast/i386/include/ast/ast_mmap.h (working copy)
-@@ -28,6 +28,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/i386/src/lib/libast/ast_mmap.h
-===================================================================
---- usr/src/lib/libast/i386/src/lib/libast/ast_mmap.h (revision 1701)
-+++ usr/src/lib/libast/i386/src/lib/libast/ast_mmap.h (working copy)
-@@ -7,6 +7,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/i386/src/lib/libast/FEATURE/mmap
-===================================================================
---- usr/src/lib/libast/i386/src/lib/libast/FEATURE/mmap (revision 1701)
-+++ usr/src/lib/libast/i386/src/lib/libast/FEATURE/mmap (working copy)
-@@ -7,6 +7,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/amd64/include/ast/ast_mmap.h
-===================================================================
---- usr/src/lib/libast/amd64/include/ast/ast_mmap.h (revision 1701)
-+++ usr/src/lib/libast/amd64/include/ast/ast_mmap.h (working copy)
-@@ -28,6 +28,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/amd64/src/lib/libast/ast_mmap.h
-===================================================================
---- usr/src/lib/libast/amd64/src/lib/libast/ast_mmap.h (revision 1701)
-+++ usr/src/lib/libast/amd64/src/lib/libast/ast_mmap.h (working copy)
-@@ -7,6 +7,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
-Index: usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mmap
-===================================================================
---- usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mmap (revision 1701)
-+++ usr/src/lib/libast/amd64/src/lib/libast/FEATURE/mmap (working copy)
-@@ -7,6 +7,7 @@
- #define _lib_mmap64 1 /* mmap64 interface and implementation work */
- #define _mmap_anon 1 /* use mmap MAP_ANON to get raw memory */
- #define _mmap_devzero 1 /* use mmap on /dev/zero to get raw memory */
-+#define _mmap_worthy 2 /* mmap is good */
-
- /* some systems get it wrong but escape concise detection */
- #ifndef _NO_MMAP
--- snip --
-
-
-######## Errata #003: ########
-A workaround was added for a problem with the "multiline" editor mode which
-occurs when the edit line becomes longer than the terminal's width and the
-terminal cursor is not at position 0 when PS1 is send to the terminal.
-
-For example: The user executes a $ printf "foo"<enter> # the prompt will start
-at position 3 instead of 0. If the user enters a command which is longer than
-the terminal width and then removes enougth characters that the edit line fits
-again into one line the "foo" at the beginning will be overwritten with the
-prompt.
-
-The workaround is to add $(printf "%*s\r%s" COLUMNS "") at the beginning of
-PS1 set by /etc/ksh.kshrc, this causes the shell to move to the beginning
-of the next line if the terminal cursor is not at position 0.
-
-
-######## Errata #004: ########
-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.
-The following files have been changed:
--- snip --
-Index: usr/src/lib/libsum/common/sum-crc.c
-===================================================================
---- usr/src/lib/libsum/common/sum-crc.c (revision 1724)
-+++ usr/src/lib/libsum/common/sum-crc.c (working copy)
-@@ -48,7 +48,8 @@
- Crcnum_t init;
- Crcnum_t done;
- Crcnum_t xorsize;
-- Crcnum_t tab[256];
-+ const Crcnum_t *tab; /* use |const| to give the compiler a hint that the data won't change */
-+ Crcnum_t tabdata[256];
- unsigned int addsize;
- unsigned int rotate;
- } Crc_t;
-@@ -56,6 +57,62 @@
- #define CRC(p,s,c) (s = (s >> 8) ^ (p)->tab[(s ^ (c)) & 0xff])
- #define CRCROTATE(p,s,c) (s = (s << 8) ^ (p)->tab[((s >> 24) ^ (c)) & 0xff])
-
-+static const
-+Crcnum_t posix_cksum_tab[256] = {
-+ 0x00000000U,
-+ 0x04c11db7U, 0x09823b6eU, 0x0d4326d9U, 0x130476dcU, 0x17c56b6bU,
-+ 0x1a864db2U, 0x1e475005U, 0x2608edb8U, 0x22c9f00fU, 0x2f8ad6d6U,
-+ 0x2b4bcb61U, 0x350c9b64U, 0x31cd86d3U, 0x3c8ea00aU, 0x384fbdbdU,
-+ 0x4c11db70U, 0x48d0c6c7U, 0x4593e01eU, 0x4152fda9U, 0x5f15adacU,
-+ 0x5bd4b01bU, 0x569796c2U, 0x52568b75U, 0x6a1936c8U, 0x6ed82b7fU,
-+ 0x639b0da6U, 0x675a1011U, 0x791d4014U, 0x7ddc5da3U, 0x709f7b7aU,
-+ 0x745e66cdU, 0x9823b6e0U, 0x9ce2ab57U, 0x91a18d8eU, 0x95609039U,
-+ 0x8b27c03cU, 0x8fe6dd8bU, 0x82a5fb52U, 0x8664e6e5U, 0xbe2b5b58U,
-+ 0xbaea46efU, 0xb7a96036U, 0xb3687d81U, 0xad2f2d84U, 0xa9ee3033U,
-+ 0xa4ad16eaU, 0xa06c0b5dU, 0xd4326d90U, 0xd0f37027U, 0xddb056feU,
-+ 0xd9714b49U, 0xc7361b4cU, 0xc3f706fbU, 0xceb42022U, 0xca753d95U,
-+ 0xf23a8028U, 0xf6fb9d9fU, 0xfbb8bb46U, 0xff79a6f1U, 0xe13ef6f4U,
-+ 0xe5ffeb43U, 0xe8bccd9aU, 0xec7dd02dU, 0x34867077U, 0x30476dc0U,
-+ 0x3d044b19U, 0x39c556aeU, 0x278206abU, 0x23431b1cU, 0x2e003dc5U,
-+ 0x2ac12072U, 0x128e9dcfU, 0x164f8078U, 0x1b0ca6a1U, 0x1fcdbb16U,
-+ 0x018aeb13U, 0x054bf6a4U, 0x0808d07dU, 0x0cc9cdcaU, 0x7897ab07U,
-+ 0x7c56b6b0U, 0x71159069U, 0x75d48ddeU, 0x6b93dddbU, 0x6f52c06cU,
-+ 0x6211e6b5U, 0x66d0fb02U, 0x5e9f46bfU, 0x5a5e5b08U, 0x571d7dd1U,
-+ 0x53dc6066U, 0x4d9b3063U, 0x495a2dd4U, 0x44190b0dU, 0x40d816baU,
-+ 0xaca5c697U, 0xa864db20U, 0xa527fdf9U, 0xa1e6e04eU, 0xbfa1b04bU,
-+ 0xbb60adfcU, 0xb6238b25U, 0xb2e29692U, 0x8aad2b2fU, 0x8e6c3698U,
-+ 0x832f1041U, 0x87ee0df6U, 0x99a95df3U, 0x9d684044U, 0x902b669dU,
-+ 0x94ea7b2aU, 0xe0b41de7U, 0xe4750050U, 0xe9362689U, 0xedf73b3eU,
-+ 0xf3b06b3bU, 0xf771768cU, 0xfa325055U, 0xfef34de2U, 0xc6bcf05fU,
-+ 0xc27dede8U, 0xcf3ecb31U, 0xcbffd686U, 0xd5b88683U, 0xd1799b34U,
-+ 0xdc3abdedU, 0xd8fba05aU, 0x690ce0eeU, 0x6dcdfd59U, 0x608edb80U,
-+ 0x644fc637U, 0x7a089632U, 0x7ec98b85U, 0x738aad5cU, 0x774bb0ebU,
-+ 0x4f040d56U, 0x4bc510e1U, 0x46863638U, 0x42472b8fU, 0x5c007b8aU,
-+ 0x58c1663dU, 0x558240e4U, 0x51435d53U, 0x251d3b9eU, 0x21dc2629U,
-+ 0x2c9f00f0U, 0x285e1d47U, 0x36194d42U, 0x32d850f5U, 0x3f9b762cU,
-+ 0x3b5a6b9bU, 0x0315d626U, 0x07d4cb91U, 0x0a97ed48U, 0x0e56f0ffU,
-+ 0x1011a0faU, 0x14d0bd4dU, 0x19939b94U, 0x1d528623U, 0xf12f560eU,
-+ 0xf5ee4bb9U, 0xf8ad6d60U, 0xfc6c70d7U, 0xe22b20d2U, 0xe6ea3d65U,
-+ 0xeba91bbcU, 0xef68060bU, 0xd727bbb6U, 0xd3e6a601U, 0xdea580d8U,
-+ 0xda649d6fU, 0xc423cd6aU, 0xc0e2d0ddU, 0xcda1f604U, 0xc960ebb3U,
-+ 0xbd3e8d7eU, 0xb9ff90c9U, 0xb4bcb610U, 0xb07daba7U, 0xae3afba2U,
-+ 0xaafbe615U, 0xa7b8c0ccU, 0xa379dd7bU, 0x9b3660c6U, 0x9ff77d71U,
-+ 0x92b45ba8U, 0x9675461fU, 0x8832161aU, 0x8cf30badU, 0x81b02d74U,
-+ 0x857130c3U, 0x5d8a9099U, 0x594b8d2eU, 0x5408abf7U, 0x50c9b640U,
-+ 0x4e8ee645U, 0x4a4ffbf2U, 0x470cdd2bU, 0x43cdc09cU, 0x7b827d21U,
-+ 0x7f436096U, 0x7200464fU, 0x76c15bf8U, 0x68860bfdU, 0x6c47164aU,
-+ 0x61043093U, 0x65c52d24U, 0x119b4be9U, 0x155a565eU, 0x18197087U,
-+ 0x1cd86d30U, 0x029f3d35U, 0x065e2082U, 0x0b1d065bU, 0x0fdc1becU,
-+ 0x3793a651U, 0x3352bbe6U, 0x3e119d3fU, 0x3ad08088U, 0x2497d08dU,
-+ 0x2056cd3aU, 0x2d15ebe3U, 0x29d4f654U, 0xc5a92679U, 0xc1683bceU,
-+ 0xcc2b1d17U, 0xc8ea00a0U, 0xd6ad50a5U, 0xd26c4d12U, 0xdf2f6bcbU,
-+ 0xdbee767cU, 0xe3a1cbc1U, 0xe760d676U, 0xea23f0afU, 0xeee2ed18U,
-+ 0xf0a5bd1dU, 0xf464a0aaU, 0xf9278673U, 0xfde69bc4U, 0x89b8fd09U,
-+ 0x8d79e0beU, 0x803ac667U, 0x84fbdbd0U, 0x9abc8bd5U, 0x9e7d9662U,
-+ 0x933eb0bbU, 0x97ffad0cU, 0xafb010b1U, 0xab710d06U, 0xa6322bdfU,
-+ 0xa2f33668U, 0xbcb4666dU, 0xb8757bdaU, 0xb5365d03U, 0xb1f740b4U
-+};
-+
- static Sum_t*
- crc_open(const Method_t* method, const char* name)
- {
-@@ -73,62 +130,80 @@
- sum->method = (Method_t*)method;
- sum->name = name;
- }
-- polynomial = 0xedb88320;
-- s = name;
-- while (*(t = s))
-+
-+ if(!strcmp(name, "crc-0x04c11db7-rotate-done-size"))
- {
-- for (t = s, v = 0; *s && *s != '-'; s++)
-- if (*s == '=' && !v)
-- v = s;
-- i = (v ? v : s) - t;
-- if (isdigit(*t) || v && i >= 4 && strneq(t, "poly", 4) && (t = v + 1))
-- polynomial = strtoul(t, NiL, 0);
-- else if (strneq(t, "done", i))
-- sum->done = v ? strtoul(v + 1, NiL, 0) : ~sum->done;
-- else if (strneq(t, "init", i))
-- sum->init = v ? strtoul(v + 1, NiL, 0) : ~sum->init;
-- else if (strneq(t, "rotate", i))
-- sum->rotate = 1;
-- else if (strneq(t, "size", i))
-- {
-- sum->addsize = 1;
-- if (v)
-- sum->xorsize = strtoul(v + 1, NiL, 0);
-- }
-- if (*s == '-')
-- s++;
-+ sum->init=0;
-+ sum->done=0xffffffff;
-+ sum->xorsize=0x0;
-+ sum->addsize=0x1;
-+ sum->rotate=1;
-+
-+ /* Optimized codepath for POSIX cksum to save startup time */
-+ sum->tab=posix_cksum_tab;
- }
-- if (sum->rotate)
-+ else
- {
-- Crcnum_t t;
-- Crcnum_t p[8];
--
-- p[0] = polynomial;
-- for (i = 1; i < 8; i++)
-- p[i] = (p[i-1] << 1) ^ ((p[i-1] & 0x80000000) ? polynomial : 0);
-- for (i = 0; i < elementsof(sum->tab); i++)
-+ polynomial = 0xedb88320;
-+ s = name;
-+ while (*(t = s))
- {
-- t = 0;
-- x = i;
-- for (j = 0; j < 8; j++)
-+ for (t = s, v = 0; *s && *s != '-'; s++)
-+ if (*s == '=' && !v)
-+ v = s;
-+ i = (v ? v : s) - t;
-+ if (isdigit(*t) || v && i >= 4 && strneq(t, "poly", 4) && (t = v + 1))
-+ polynomial = strtoul(t, NiL, 0);
-+ else if (strneq(t, "done", i))
-+ sum->done = v ? strtoul(v + 1, NiL, 0) : ~sum->done;
-+ else if (strneq(t, "init", i))
-+ sum->init = v ? strtoul(v + 1, NiL, 0) : ~sum->init;
-+ else if (strneq(t, "rotate", i))
-+ sum->rotate = 1;
-+ else if (strneq(t, "size", i))
- {
-- if (x & 1)
-- t ^= p[j];
-- x >>= 1;
-+ sum->addsize = 1;
-+ if (v)
-+ sum->xorsize = strtoul(v + 1, NiL, 0);
- }
-- sum->tab[i] = t;
-+ if (*s == '-')
-+ s++;
- }
-- }
-- else
-- {
-- for (i = 0; i < elementsof(sum->tab); i++)
-+ if (sum->rotate)
- {
-- x = i;
-- for (j = 0; j < 8; j++)
-- x = (x>>1) ^ ((x & 1) ? polynomial : 0);
-- sum->tab[i] = x;
-+ Crcnum_t t;
-+ Crcnum_t p[8];
-+
-+ p[0] = polynomial;
-+ for (i = 1; i < 8; i++)
-+ p[i] = (p[i-1] << 1) ^ ((p[i-1] & 0x80000000) ? polynomial : 0);
-+ for (i = 0; i < elementsof(sum->tabdata); i++)
-+ {
-+ t = 0;
-+ x = i;
-+ for (j = 0; j < 8; j++)
-+ {
-+ if (x & 1)
-+ t ^= p[j];
-+ x >>= 1;
-+ }
-+ sum->tabdata[i] = t;
-+ }
- }
-+ else
-+ {
-+ for (i = 0; i < elementsof(sum->tabdata); i++)
-+ {
-+ x = i;
-+ for (j = 0; j < 8; j++)
-+ x = (x>>1) ^ ((x & 1) ? polynomial : 0);
-+ sum->tabdata[i] = x;
-+ }
-+ }
-+
-+ sum->tab=sum->tabdata;
- }
-+
- return (Sum_t*)sum;
- }
-
-@@ -141,11 +216,77 @@
- return 0;
- }
-
-+#if defined(__SUNPRO_C) || defined(__GNUC__)
-+
-+#if defined(__SUNPRO_C)
-+# include <sun_prefetch.h>
-+# define sum_prefetch(addr) sun_prefetch_read_many((void *)(addr))
-+#elif defined(__GNUC__)
-+# define sum_prefetch(addr) __builtin_prefetch((addr), 0, 3)
-+#else
-+# error Unknown compiler
-+#endif
-+
-+#define CBLOCK_SIZE (64)
-+#pragma unroll(16)
-+
- static int
- crc_block(Sum_t* p, const void* s, size_t n)
- {
- Crc_t* sum = (Crc_t*)p;
- register Crcnum_t c = sum->sum;
-+ register const unsigned char* b = (const unsigned char*)s;
-+ register const unsigned char* e = b + n;
-+ unsigned short i;
-+
-+ sum_prefetch(b);
-+
-+ if (sum->rotate)
-+ {
-+ while (n > CBLOCK_SIZE)
-+ {
-+ sum_prefetch(b+CBLOCK_SIZE);
-+ for(i=0 ; i < CBLOCK_SIZE ; i++)
-+ {
-+ CRCROTATE(sum, c, *b++);
-+ }
-+
-+ n-=CBLOCK_SIZE;
-+ }
-+
-+ while (b < e)
-+ {
-+ CRCROTATE(sum, c, *b++);
-+ }
-+ }
-+ else
-+ {
-+ while (n > CBLOCK_SIZE)
-+ {
-+ sum_prefetch(b+CBLOCK_SIZE);
-+ for(i=0 ; i < CBLOCK_SIZE ; i++)
-+ {
-+ CRC(sum, c, *b++);
-+ }
-+
-+ n-=CBLOCK_SIZE;
-+ }
-+
-+ while (b < e)
-+ {
-+ CRC(sum, c, *b++);
-+ }
-+ }
-+
-+ sum->sum = c;
-+ return 0;
-+}
-+#else
-+static int
-+crc_block(Sum_t* p, const void* s, size_t n)
-+{
-+ Crc_t* sum = (Crc_t*)p;
-+ register Crcnum_t c = sum->sum;
- register unsigned char* b = (unsigned char*)s;
- register unsigned char* e = b + n;
-
-@@ -158,6 +299,7 @@
- sum->sum = c;
- return 0;
- }
-+#endif /* defined(__SUNPRO_C) || defined(__GNUC__) */
-
- static int
- crc_done(Sum_t* p)
-Index: usr/src/lib/libsum/common/sum-att.c
-===================================================================
---- usr/src/lib/libsum/common/sum-att.c (revision 1724)
-+++ usr/src/lib/libsum/common/sum-att.c (working copy)
-@@ -35,10 +35,73 @@
- #define att_data long_data
- #define att_scale 512
-
-+#if defined(__SUNPRO_C) || defined(__GNUC__)
-+
-+#if defined(__SUNPRO_C)
-+# include <sun_prefetch.h>
-+# define sum_prefetch(addr) sun_prefetch_read_many((void *)(addr))
-+#elif defined(__GNUC__)
-+# define sum_prefetch(addr) __builtin_prefetch((addr), 0, 3)
-+#else
-+# error Unknown compiler
-+#endif
-+
-+#define CBLOCK_SIZE (64)
-+#pragma unroll(16)
-+
-+/* Inmos transputer would love this algorithm */
- static int
- att_block(register Sum_t* p, const void* s, size_t n)
- {
- register uint32_t c = ((Integral_t*)p)->sum;
-+ register const unsigned char* b = (const unsigned char*)s;
-+ register const unsigned char* e = b + n;
-+ register uint32_t s0, s1, s2, s3, s4, s5, s6, s7;
-+ register unsigned int i;
-+
-+ s0=s1=s2=s3=s4=s5=s6=s7=0U;
-+
-+ sum_prefetch((void *)b);
-+
-+ while (n > CBLOCK_SIZE)
-+ {
-+ sum_prefetch((b+CBLOCK_SIZE));
-+
-+ /* Compiler will unroll for() loops per #pragma unroll */
-+ for (i=0 ; i < (CBLOCK_SIZE/8) ; i++)
-+ {
-+ /*
-+ * use s0-s7 to decouple calculations (this improves pipelining)
-+ * because each operation is completely independent from it's
-+ * siblings
-+ */
-+ s0+=b[0];
-+ s1+=b[1];
-+ s2+=b[2];
-+ s3+=b[3];
-+ s4+=b[4];
-+ s5+=b[5];
-+ s6+=b[6];
-+ s7+=b[7];
-+
-+ b+=8;
-+ n-=8;
-+ }
-+ }
-+
-+ c+=s0+s1+s2+s3+s4+s5+s6+s7;
-+
-+ while (b < e)
-+ c += *b++;
-+ ((Integral_t*)p)->sum = c;
-+ return 0;
-+}
-+
-+#else
-+static int
-+att_block(register Sum_t* p, const void* s, size_t n)
-+{
-+ register uint32_t c = ((Integral_t*)p)->sum;
- register unsigned char* b = (unsigned char*)s;
- register unsigned char* e = b + n;
-
-@@ -47,6 +110,7 @@
- ((Integral_t*)p)->sum = c;
- return 0;
- }
-+#endif /* defined(__SUNPRO_C) || defined(__GNUC__) */
-
- static int
- 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
deleted file mode 100644
index ceff00f77c..0000000000
--- a/usr/src/lib/libshell/misc/buildksh93.readme
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# 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) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# buildksh93.readme
-#
-
-* Intro:
-"buildksh93.sh" is a small build script used to build the AT&T "ast-ksh"
-and "ast-open" packages using its native (nmake-based) build system
-which is needed to build the iffe-generated (header) files (each time
-for { 32bit SPARC, 64bit SPARC, 32bit i386, 64bit AMD64, 32bit S390,
-64bit S390x }) which are moved later to their matching OS/Net build
-directories.
-
-THIS SCRIPT IS NOT INTENDED FOR NORMAL USAGE.
-
-
-* Note that buildksh93.sh modifies the build behaviour of the AST build
-system, including enforcing C99/XPG6 semantics (which is MANDATORY!!)
-and feeding additional libraries (like libnsl, libsocket, librt etc.)
-to the feature look system (called "iffe" (="if feature exists")) to
-ensure all features needed for the Solaris version of ksh93 are
-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.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.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:
-# - "build.solaris.sparc.32bit.suncc" - 32bit SPARC
-# - "build.solaris.sparc.64bit.suncc" - 64bit SPARC
-# - "build.solaris.i386.32bit.suncc" - 32bit x86/i386
-# - "build.solaris.i386.64bit.suncc" - 64bit x86/AMD64
-# - "build.solaris.s390.32bit.gcc" - 32bit SystemZ/S390
-# - "build.solaris.s390.64bit.gcc" - 64bit SystemZ/S390x
-# )
-$ time nice ksh ../buildksh93.sh "build.solaris.sparc.32bit.suncc" 2>&1 | tee -a buildlog.log
-
-## Test ksh93:
-$ time nice ksh ../buildksh93.sh "testshell" 2>&1 | tee -a buildlog.log
-
-## Generated binaries and headers can be found in the arch/$(PLATFORM)/
-## subdirectory.
-
-
-# EOF.
diff --git a/usr/src/lib/libshell/misc/buildksh93.sh b/usr/src/lib/libshell/misc/buildksh93.sh
deleted file mode 100644
index d89941d278..0000000000
--- a/usr/src/lib/libshell/misc/buildksh93.sh
+++ /dev/null
@@ -1,562 +0,0 @@
-#!/bin/ksh -p
-# (note we use "/bin/ksh -p" for Linux/pdksh support in this script)
-
-#
-# 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) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# buildksh93.sh - ast-ksh standalone build script for the
-# OpenSolaris ksh93-integration project
-#
-
-# 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/~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
-{
- print -u2 "${progname}: $*"
- exit 1
-}
-
-set -o errexit
-set -o xtrace
-
-typeset progname="$(basename "${0}")"
-typeset buildmode="$1"
-
-if [[ "${buildmode}" == "" ]] ; then
- fatal_error "buildmode required."
-fi
-
-# Make sure we use the C locale during building to avoid any unintended
-# side-effects
-export LANG=C
-export LC_ALL=$LANG LC_MONETARY=$LANG LC_NUMERIC=$LANG LC_MESSAGES=$LANG LC_COLLATE=$LANG LC_CTYPE=$LANG
-# Make sure the POSIX/XPG6 tools are in front of /usr/bin (/bin is needed for Linux after /usr/bin)
-export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/bin:/opt/SUNWspro/bin
-
-# Make sure the POSIX/XPG6 packages are installed (mandatory for building
-# our version of ksh93 correctly).
-if [[ "$(uname -s)" == "SunOS" ]] ; then
- if [[ ! -x "/usr/xpg6/bin/tr" ]] ; then
- fatal_error "XPG6/4 packages (SUNWxcu6,SUNWxcu4) not installed."
- fi
-fi
-
-function print_solaris_builtin_header
-{
-# Make sure to use \\ instead of \ for continuations
-cat <<ENDOFTEXT
-/*
- * 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) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _SOLARIS_KSH_CMDLIST_H
-#define _SOLARIS_KSH_CMDLIST_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * List builtins for Solaris.
- * The list here is partially autogenerated and partially hand-picked
- * based on compatibility with the native Solaris versions of these
- * tools
- */
-
-/*
- * Commands which are 100% compatible with native Solaris versions (/bin is
- * a softlink to ./usr/bin, ksh93 takes care about the lookup)
- */
-#define BINCMDLIST(f) \\
- { "/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
-#define USRBINCMDLIST(f) \\
- { "/usr/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
-#define SBINCMDLIST(f) \\
- { "/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
- */
-#define ASTCMDLIST(f) \\
- { "/usr/ast/bin/" #f, NV_BLTIN|NV_BLTINOPT|NV_NOFREE, bltin(f) },
-
-/* undo ast_map.h #defines to avoid collision */
-#undef basename
-#undef dirname
-#undef mktemp
-
-/* Generated data, do not edit. */
-ASTCMDLIST(basename)
-GNUCMDLIST(basename)
-XPG4CMDLIST(basename)
-ASTCMDLIST(cat)
-BINCMDLIST(cat)
-ASTCMDLIST(chgrp)
-// XPG4CMDLIST(chgrp)
-ASTCMDLIST(chmod)
-ASTCMDLIST(chown)
-// XPG4CMDLIST(chown)
-BINCMDLIST(chown)
-ASTCMDLIST(cksum)
-BINCMDLIST(cksum)
-GNUCMDLIST(cksum)
-ASTCMDLIST(cmp)
-BINCMDLIST(cmp)
-ASTCMDLIST(comm)
-BINCMDLIST(comm)
-GNUCMDLIST(comm)
-ASTCMDLIST(cp)
-// XPG4CMDLIST(cp)
-ASTCMDLIST(cut)
-BINCMDLIST(cut)
-GNUCMDLIST(cut)
-ASTCMDLIST(date)
-// XPG4CMDLIST(date)
-ASTCMDLIST(dirname)
-BINCMDLIST(dirname)
-GNUCMDLIST(dirname)
-// ASTCMDLIST(egrep)
-// XPG4CMDLIST(egrep)
-ASTCMDLIST(expr)
-GNUCMDLIST(expr)
-XPG6CMDLIST(expr)
-ASTCMDLIST(fds)
-// ASTCMDLIST(fgrep)
-// XPG4CMDLIST(fgrep)
-ASTCMDLIST(fmt)
-ASTCMDLIST(fold)
-BINCMDLIST(fold)
-GNUCMDLIST(fold)
-// ASTCMDLIST(grep)
-// XPG4CMDLIST(grep)
-ASTCMDLIST(head)
-BINCMDLIST(head)
-ASTCMDLIST(id)
-XPG4CMDLIST(id)
-ASTCMDLIST(join)
-BINCMDLIST(join)
-GNUCMDLIST(join)
-ASTCMDLIST(ln)
-// XPG4CMDLIST(ln)
-ASTCMDLIST(logname)
-BINCMDLIST(logname)
-GNUCMDLIST(logname)
-ASTCMDLIST(md5sum)
-ASTCMDLIST(mkdir)
-BINCMDLIST(mkdir)
-GNUCMDLIST(mkdir)
-ASTCMDLIST(mkfifo)
-BINCMDLIST(mkfifo)
-GNUCMDLIST(mkfifo)
-ASTCMDLIST(mktemp)
-BINCMDLIST(mktemp)
-GNUCMDLIST(mktemp)
-ASTCMDLIST(mv)
-// XPG4CMDLIST(mv)
-ASTCMDLIST(paste)
-BINCMDLIST(paste)
-GNUCMDLIST(paste)
-ASTCMDLIST(pathchk)
-BINCMDLIST(pathchk)
-GNUCMDLIST(pathchk)
-// ASTCMDLIST(readlink)
-ASTCMDLIST(rev)
-BINCMDLIST(rev)
-ASTCMDLIST(rm)
-XPG4CMDLIST(rm)
-ASTCMDLIST(rmdir)
-BINCMDLIST(rmdir)
-GNUCMDLIST(rmdir)
-GNUCMDLIST(sleep)
-ASTCMDLIST(stty)
-// XPG4CMDLIST(stty)
-ASTCMDLIST(sum)
-BINCMDLIST(sum)
-ASTCMDLIST(sync)
-BINCMDLIST(sync)
-GNUCMDLIST(sync)
-SBINCMDLIST(sync)
-SUSRBINCMDLIST(sync)
-ASTCMDLIST(tail)
-BINCMDLIST(tail)
-XPG4CMDLIST(tail)
-ASTCMDLIST(tee)
-BINCMDLIST(tee)
-GNUCMDLIST(tee)
-ASTCMDLIST(tty)
-BINCMDLIST(tty)
-GNUCMDLIST(tty)
-ASTCMDLIST(uname)
-ASTCMDLIST(uniq)
-BINCMDLIST(uniq)
-GNUCMDLIST(uniq)
-ASTCMDLIST(wc)
-BINCMDLIST(wc)
-GNUCMDLIST(wc)
-// ASTCMDLIST(xgrep)
-// BINCMDLIST(xgrep)
-
-/* Mandatory for ksh93 test suite and AST scripts */
-BINCMDLIST(getconf)
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* !_SOLARIS_KSH_CMDLIST_H */
-
-ENDOFTEXT
-}
-
-function build_shell
-{
- set -o errexit
- set -o xtrace
-
- # OS.cputype.XXbit.compiler
- case "${buildmode}" in
- *.linux.*)
- # ksh93+AST config flags
- bast_flags="-DSHOPT_CMDLIB_BLTIN=0 -DSH_CMDLIB_DIR=\\\"/usr/ast/bin\\\" -DSHOPT_SYSRC -D_map_libc=1"
-
- # gcc flags
- bgcc99="gcc -std=gnu99 "
- bgcc_ccflags="${bon_flags} ${bast_flags} -g"
-
- case "${buildmode}" in
- # Linux i386
- *.i386.32bit.gcc*) HOSTTYPE="linux.i386" CC="${bgcc99} -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}"
- ;;
- *)
- fatal_error "build_shell: Illegal Linux type/compiler build mode \"${buildmode}\"."
- ;;
- esac
- ;;
- *.solaris.*)
- # Notes:
- # 1. Do not remove/modify these flags or their order before either
- # asking the project leads at
- # http://www.opensolaris.org/os/project/ksh93-integration/
- # These flags all have a purpose, even if they look
- # weird/redundant/etc. at the first look.
- #
- # 2. We use -KPIC here since -Kpic is too small on 64bit sparc and
- # on 32bit it's close to the barrier so we use it for both 32bit and
- # 64bit to avoid later suprises when people update libast in the
- # future
- #
- # 3. "-D_map_libc=1" is needed to force map.c to add a "_ast_" prefix to all
- # AST symbol names which may otherwise collide with Solaris/Linux libc
- #
- # 4. "-DSHOPT_SYSRC" enables /etc/ksh.kshrc support (AST default is currently
- # to enable it if /etc/ksh.kshrc or /etc/bash.bashrc are available on the
- # build machine).
- #
- # 5. -D_lib_socket=1 -lsocket -lnsl" was added to make sure ksh93 is compiled
- # with networking support enabled, the current AST build infratructure has
- # problems with detecting networking support in Solaris.
- #
- # 6. "-xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1" is used to force
- # the compiler into C99 mode. Otherwise ksh93 will be much slower and lacks
- # lots of arithmethic functions.
- #
- # 7. "-D_TS_ERRNO -D_REENTRANT" are flags taken from the default OS/Net
- # build system.
- #
- # 8. "-xpagesize_stack=64K is used on SPARC to enhance the performace
- #
- # 9. -DSHOPT_CMDLIB_BLTIN=0 -DSH_CMDLIB_DIR=\\\"/usr/ast/bin\\\" -DSHOPT_CMDLIB_HDR=\\\"/home/test001/ksh93/ast_ksh_20070322/solaris_cmdlist.h\\\"
- # is used to bind all ksh93 builtins to a "virtual" directory
- # called "/usr/ast/bin/" and to adjust the list of builtins
- # enabled by default to those defined by PSARC 2006/550
-
- solaris_builtin_header="${PWD}/tmp_solaris_builtin_header.h"
- print_solaris_builtin_header >"${solaris_builtin_header}"
-
- # OS/Net build flags
- bon_flags="-D_TS_ERRNO -D_REENTRANT"
-
- # ksh93+AST config flags
- bast_flags="-DSHOPT_CMDLIB_BLTIN=0 -DSH_CMDLIB_DIR=\\\"/usr/ast/bin\\\" -DSHOPT_CMDLIB_HDR=\\\"${solaris_builtin_header}\\\" -DSHOPT_SYSRC -D_map_libc=1"
-
- # Sun Studio flags
- bsunc99="/opt/SUNWspro/bin/cc -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1"
- bsuncc_app_ccflags_sparc="-xpagesize_stack=64K" # use bsuncc_app_ccflags_sparc only for final executables
- bsuncc_ccflags="${bon_flags} -KPIC -g -xs -xspace -Xa -xstrconst -z combreloc -xildoff -xcsi -errtags=yes ${bast_flags} -D_lib_socket=1 -lsocket -lnsl"
-
- # gcc flags
- bgcc99="/usr/sfw/bin/gcc -std=gnu99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1"
- bgcc_warnflags="-Wall -Wextra -Wno-unknown-pragmas -Wno-missing-braces -Wno-sign-compare -Wno-parentheses -Wno-uninitialized -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs -Wno-char-subscripts -Wno-switch"
- bgcc_ccflags="${bon_flags} ${bgcc_warnflags} ${bast_flags} -D_lib_socket=1 -lsocket -lnsl"
-
- case "${buildmode}" in
- # for -m32/-m64 flags see usr/src/Makefile.master, makefile symbols *_XARCH/co.
- *.i386.32bit.suncc*) HOSTTYPE="sol11.i386" CC="${bsunc99} -m32" cc_sharedlib="-G" CCFLAGS="${bsuncc_ccflags}" ;;
- *.i386.64bit.suncc*) HOSTTYPE="sol11.i386" CC="${bsunc99} -m64 -KPIC" cc_sharedlib="-G" CCFLAGS="${bsuncc_ccflags}" ;;
- *.sparc.32bit.suncc*) HOSTTYPE="sol11.sun4" CC="${bsunc99} -m32" cc_sharedlib="-G" CCFLAGS="${bsuncc_ccflags}" bsuncc_app_ccflags="${bsuncc_app_ccflags_sparc}" ;;
- *.sparc.64bit.suncc*) HOSTTYPE="sol11.sun4" CC="${bsunc99} -m64 -dalign -KPIC" cc_sharedlib="-G" CCFLAGS="${bsuncc_ccflags}" bsuncc_app_ccflags="${bsuncc_app_ccflags_sparc}" ;;
-
- *.i386.32bit.gcc*) HOSTTYPE="sol11.i386" CC="${bgcc99} -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
- *.i386.64bit.gcc*) HOSTTYPE="sol11.i386" CC="${bgcc99} -m64 -mtune=opteron -Ui386 -U__i386 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
- *.sparc.32bit.gcc*) HOSTTYPE="sol11.sun4" CC="${bgcc99} -m32 -mcpu=v8 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
- *.sparc.64bit.gcc*) HOSTTYPE="sol11.sun4" CC="${bgcc99} -m64 -mcpu=v9 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
- *.s390.32bit.gcc*) HOSTTYPE="sol11.s390" CC="${bgcc99} -m32 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
- *.s390.64bit.gcc*) HOSTTYPE="sol11.s390" CC="${bgcc99} -m64 -fPIC" cc_sharedlib="-shared" CCFLAGS="${bgcc_ccflags}" ;;
-
- *)
- fatal_error "build_shell: Illegal Solaris type/compiler build mode \"${buildmode}\"."
- ;;
- esac
- ;;
- *)
- fatal_error "Illegal OS build mode \"${buildmode}\"."
- ;;
- esac
-
- # some prechecks
- [[ -z "${CCFLAGS}" ]] && fatal_error "build_shell: CCFLAGS is empty."
- [[ -z "${CC}" ]] && fatal_error "build_shell: CC is empty."
- [[ -z "${HOSTTYPE}" ]] && fatal_error "build_shell: HOSTTYPE is empty."
- [[ ! -f "bin/package" ]] && fatal_error "build_shell: bin/package missing."
- [[ ! -x "bin/package" ]] && fatal_error "build_shell: bin/package not executable."
-
- export CCFLAGS CC HOSTTYPE
-
- # build ksh93
- bin/package make CCFLAGS="${CCFLAGS}" CC="${CC}" HOSTTYPE="${HOSTTYPE}"
-
- root="${PWD}/arch/${HOSTTYPE}"
- [[ -d "$root" ]] || fatal_error "build_shell: directory ${root} not found."
- log="${root}/lib/package/gen/make.out"
-
- [[ -s $log ]] || fatal_error "build_shell: no make.out log found."
-
- if [[ -f ${root}/lib/libast-g.a ]] then link_libast="ast-g" ; else link_libast="ast" ; fi
- if [[ -f ${root}/lib/libdll-g.a ]] then link_libdll="dll-g" ; else link_libdll="dll" ; fi
- if [[ -f ${root}/lib/libsum-g.a ]] then link_libsum="sum-g" ; else link_libsum="sum" ; fi
- if [[ -f ${root}/lib/libcmd-g.a ]] then link_libcmd="cmd-g" ; else link_libcmd="cmd" ; fi
- if [[ -f ${root}/lib/libshell-g.a ]] then link_libshell="shell-g" ; else link_libshell="shell" ; fi
-
- if [[ "${buildmode}" != *.staticshell* ]] ; then
- # libcmd causes some trouble since there is a squatter in solaris
- # This has been fixed in Solaris 11/B48 but may require adjustments
- # for older Solaris releases
- for lib in libast libdll libsum libcmd libshell ; do
- case "$lib" in
- libshell)
- base="src/cmd/ksh93/"
- vers=1
- link="-L${root}/lib/ -l${link_libcmd} -l${link_libsum} -l${link_libdll} -l${link_libast} -lm"
- ;;
- libdll)
- base="src/lib/${lib}"
- vers=1
- link="-ldl"
- ;;
- libast)
- base="src/lib/${lib}"
- vers=1
- link="-lm"
- ;;
- *)
- base="src/lib/${lib}"
- vers=1
- link="-L${root}/lib/ -l${link_libast} -lm"
- ;;
- esac
-
- (
- cd "${root}/${base}"
-
- if [[ -f ${lib}-g.a ]] ; then lib_a="${lib}-g.a" ; else lib_a="${lib}.a" ; fi
-
- if [[ "${buildmode}" == *solaris* ]] ; then
- ${CC} ${cc_sharedlib} ${CCFLAGS} -Bdirect -Wl,-zallextract -Wl,-zmuldefs -o "${root}/lib/${lib}.so.${vers}" "${lib_a}" $link
- else
- ${CC} ${cc_sharedlib} ${CCFLAGS} -Wl,--whole-archive -Wl,-zmuldefs "${lib_a}" -Wl,--no-whole-archive -o "${root}/lib/${lib}.so.${vers}" $link
- fi
-
- #rm ${lib}.a
- mv "${lib_a}" "disabled_${lib_a}_"
-
- cd "${root}/lib"
- ln -sf "${lib}.so.${vers}" "${lib}.so"
- )
- done
-
- (
- base=src/cmd/ksh93
- cd "${root}/${base}"
- rm -f \
- "${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"
-
- 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
- else
- ${CC} ${CCFLAGS} ${bsuncc_app_ccflags} -L${root}/lib/ -o ksh pmain.o -lshell -lcmd -lsum -ldll -last -lm
- fi
-
- file ksh
- file shcomp
-
- export LD_LIBRARY_PATH="${root}/lib:${LD_LIBRARY_PATH}"
- export LD_LIBRARY_PATH_32="${root}/lib:${LD_LIBRARY_PATH_32}"
- export LD_LIBRARY_PATH_64="${root}/lib:${LD_LIBRARY_PATH_64}"
- ldd ksh
- )
- fi
-}
-
-function test_builtin_getconf
-{
-(
- print "# testing getconf builtin..."
- set +o errexit
- export PATH=/bin:/usr/bin
- for lang in ${TEST_LANG} ; do
- (
- printf "## testing LANG=%s\n" "${lang}"
- export LC_ALL="${lang}" LANG="${lang}"
- ${SHELL} -c '/usr/bin/getconf -a |
- while read i ; do
- t="${i%:*}" ; a="$(getconf "$t" 2>/dev/null)" ;
- b="$(/usr/bin/getconf "$t" 2>/dev/null)" ; [ "$a" != "$b" ] && print "# |$t|:|$a| != |$b|" ;
- done'
- )
- done
- print "# testing getconf done."
-)
-}
-
-function test_shell
-{
- set -o errexit
- set -o xtrace
-
- ulimit -s 65536 # need larger stack on 64bit SPARC to pass all tests
-
- export SHELL="$(ls -1 $PWD/arch/*/src/cmd/ksh93/ksh)"
- export LD_LIBRARY_PATH="$(ls -1ad $PWD/arch/*/lib):${LD_LIBRARY_PATH}"
- export LD_LIBRARY_PATH_32="$(ls -1ad $PWD/arch/*/lib):${LD_LIBRARY_PATH_32}"
- export LD_LIBRARY_PATH_64="$(ls -1ad $PWD/arch/*/lib):${LD_LIBRARY_PATH_64}"
- printf "## SHELL is |%s|\n" "${SHELL}"
- printf "## LD_LIBRARY_PATH is |%s|\n" "${LD_LIBRARY_PATH}"
-
- [[ ! -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 zh_CN.GB18030 en_US.UTF-8"
-
- case "${buildmode}" in
- testshell.bcheck*)
- for lang in ${TEST_LANG} ; do
- (
- export LC_ALL="${lang}" LANG="${lang}"
- for i in ./src/cmd/ksh93/tests/*.sh ; do
- bc_logfile="$(basename "$i").$$.bcheck"
- rm -f "${bc_logfile}"
- /opt/SUNWspro/bin/bcheck -q -access -o "${bc_logfile}" ${SHELL} ./src/cmd/ksh93/tests/shtests \
- LD_LIBRARY_PATH_64="$LD_LIBRARY_PATH_64" \
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
- LD_LIBRARY_PATH_32="$LD_LIBRARY_PATH_32"\
- LC_ALL="${lang}" LANG="${lang}" \
- VMALLOC_OPTIONS=abort \
- "$i"
- cat "${bc_logfile}"
- done
- )
- done
- ;;
- testshell.builtin.getconf)
- test_builtin_getconf
- ;;
- testshell)
- for lang in ${TEST_LANG} ; do
- (
- export LC_ALL="${lang}" LANG="${lang}"
- for i in ./src/cmd/ksh93/tests/*.sh ; do
- ${SHELL} ./src/cmd/ksh93/tests/shtests -a \
- LD_LIBRARY_PATH_64="$LD_LIBRARY_PATH_64" \
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
- LD_LIBRARY_PATH_32="$LD_LIBRARY_PATH_32" \
- LC_ALL="${lang}" LANG="${lang}" \
- VMALLOC_OPTIONS=abort \
- SHCOMP=$PWD/arch/*/bin/shcomp \
- "$i"
- done
- )
- done
- test_builtin_getconf
- ;;
- esac
-}
-
-# main
-case "${buildmode}" in
- build.*) build_shell ;;
- testshell*) test_shell ;;
- *) fatal_error "Illegal build mode \"${buildmode}\"." ;;
-esac
-# EOF.
diff --git a/usr/src/lib/libshell/misc/filelist.txt b/usr/src/lib/libshell/misc/filelist.txt
deleted file mode 100644
index 5a2c7cc9dd..0000000000
--- a/usr/src/lib/libshell/misc/filelist.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-#
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# usr/src/lib/libshell/misc/filelist.txt
-# List deleted/moved/etc. files between AT& AST and OS/Net source repositories
-#
-# Format is <keyword> <filename>
-#
-# Currently know keywords are:
-# ON_DELETED = upstream file removed from OS/Net workspace
-#
-ON_DELETED usr/src/cmd/ast/msgcc/Mamfile
-ON_DELETED usr/src/lib/libast/amd64/src/lib/libast/ast.req
-ON_DELETED usr/src/lib/libast/amd64/src/lib/libast/conf
-ON_DELETED usr/src/lib/libast/amd64/src/lib/libast/conflim.h
-ON_DELETED usr/src/lib/libast/common/Makefile
-ON_DELETED usr/src/lib/libast/common/Mamfile
-ON_DELETED usr/src/lib/libast/common/astsa/README
-ON_DELETED usr/src/lib/libast/common/astsa/align.h
-ON_DELETED usr/src/lib/libast/common/astsa/ast.h
-ON_DELETED usr/src/lib/libast/common/astsa/astwinsize.c
-ON_DELETED usr/src/lib/libast/common/astsa/ccode.h
-ON_DELETED usr/src/lib/libast/common/astsa/lclib.h
-ON_DELETED usr/src/lib/libast/common/astsa/sig.h
-ON_DELETED usr/src/lib/libast/common/astsa/strmatch.c
-ON_DELETED usr/src/lib/libast/common/astsa/times.h
-ON_DELETED usr/src/lib/libast/common/comp/fakelink.h
-ON_DELETED usr/src/lib/libast/common/comp/fmtmsg.h
-ON_DELETED usr/src/lib/libast/common/comp/gross_sgi.h
-ON_DELETED usr/src/lib/libast/common/comp/syslog.h
-ON_DELETED usr/src/lib/libast/common/comp/sysloglib.h
-ON_DELETED usr/src/lib/libast/common/dir/dirstd.h
-ON_DELETED usr/src/lib/libast/common/misc/magic.tab
-ON_DELETED usr/src/lib/libast/common/port/atmain.C
-ON_DELETED usr/src/lib/libast/common/uwin/mathimpl.h
-ON_DELETED usr/src/lib/libast/common/uwin/mini.sym
-ON_DELETED usr/src/lib/libast/common/uwin/rlib.h
-ON_DELETED usr/src/lib/libast/i386/src/lib/libast/ast.req
-ON_DELETED usr/src/lib/libast/i386/src/lib/libast/conf
-ON_DELETED usr/src/lib/libast/i386/src/lib/libast/conflim.h
-ON_DELETED usr/src/lib/libast/sparc/src/lib/libast/ast.req
-ON_DELETED usr/src/lib/libast/sparc/src/lib/libast/conf
-ON_DELETED usr/src/lib/libast/sparc/src/lib/libast/conflim.h
-ON_DELETED usr/src/lib/libast/sparcv9/src/lib/libast/ast.req
-ON_DELETED usr/src/lib/libast/sparcv9/src/lib/libast/conf
-ON_DELETED usr/src/lib/libast/sparcv9/src/lib/libast/conflim.h
-ON_DELETED usr/src/lib/libcmd/common/Makefile
-ON_DELETED usr/src/lib/libcmd/common/Mamfile
-ON_DELETED usr/src/lib/libdll/common/Makefile
-ON_DELETED usr/src/lib/libdll/common/Mamfile
-ON_DELETED usr/src/lib/libpp/common/Makefile
-ON_DELETED usr/src/lib/libpp/common/Mamfile
-ON_DELETED usr/src/lib/libpp/common/probe.win32
-ON_DELETED usr/src/lib/libpp/i386/gentab
-ON_DELETED usr/src/lib/libpp/i386/ppkey.yacc
-ON_DELETED usr/src/lib/libpp/i386/probe
-ON_DELETED usr/src/lib/libpp/i386/probe.sh
-ON_DELETED usr/src/lib/libpp/sparc/gentab
-ON_DELETED usr/src/lib/libpp/sparc/ppkey.yacc
-ON_DELETED usr/src/lib/libpp/sparc/probe
-ON_DELETED usr/src/lib/libpp/sparc/probe.sh
-ON_DELETED usr/src/lib/libshell/common/Makefile
-ON_DELETED usr/src/lib/libshell/common/Mamfile
-ON_DELETED usr/src/lib/libshell/common/mamexec
-ON_DELETED usr/src/lib/libshell/common/mamstate.c
-ON_DELETED usr/src/lib/libshell/common/shopen.mk
-# EOF.
diff --git a/usr/src/lib/libshell/sparc/include/ast/history.h b/usr/src/lib/libshell/sparc/include/ast/history.h
deleted file mode 100644
index 1b0f3ce403..0000000000
--- a/usr/src/lib/libshell/sparc/include/ast/history.h
+++ /dev/null
@@ -1,84 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef HIST_VERSION
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * Interface for history mechanism
- * written by David Korn
- *
- */
-
-#include <ast.h>
-
-#define HIST_CHAR '!'
-#define HIST_VERSION 1 /* history file format version no. */
-
-typedef struct
-{
- Sfdisc_t histdisc; /* discipline for history */
- Sfio_t *histfp; /* history file stream pointer */
- char *histname; /* name of history file */
- int32_t histind; /* current command number index */
- int histsize; /* number of accessible history lines */
-#ifdef _HIST_PRIVATE
- _HIST_PRIVATE
-#endif /* _HIST_PRIVATE */
-} History_t;
-
-typedef struct
-{
- int hist_command;
- int hist_line;
- int hist_char;
-} Histloc_t;
-
-/* the following are readonly */
-extern __MANGLE__ const char hist_fname[];
-
-extern __MANGLE__ int _Hist;
-#define hist_min(hp) ((_Hist=((int)((hp)->histind-(hp)->histsize)))>=0?_Hist:0)
-#define hist_max(hp) ((int)((hp)->histind))
-/* these are the history interface routines */
-extern __MANGLE__ int sh_histinit __PROTO__((__V_ *));
-extern __MANGLE__ void hist_cancel __PROTO__((History_t*));
-extern __MANGLE__ void hist_close __PROTO__((History_t*));
-extern __MANGLE__ int hist_copy __PROTO__((char*, int, int, int));
-extern __MANGLE__ void hist_eof __PROTO__((History_t*));
-extern __MANGLE__ Histloc_t hist_find __PROTO__((History_t*,char*,int, int, int));
-extern __MANGLE__ void hist_flush __PROTO__((History_t*));
-extern __MANGLE__ void hist_list __PROTO__((History_t*,Sfio_t*, off_t, int, char*));
-extern __MANGLE__ int hist_match __PROTO__((History_t*,off_t, char*, int*));
-extern __MANGLE__ off_t hist_tell __PROTO__((History_t*,int));
-extern __MANGLE__ off_t hist_seek __PROTO__((History_t*,int));
-extern __MANGLE__ char *hist_word __PROTO__((char*, int, int));
-#if SHOPT_ESH
- extern __MANGLE__ Histloc_t hist_locate __PROTO__((History_t*,int, int, int));
-#endif /* SHOPT_ESH */
-
-#endif /* HIST_VERSION */
diff --git a/usr/src/lib/libshell/sparc/include/ast/nval.h b/usr/src/lib/libshell/sparc/include/ast/nval.h
deleted file mode 100644
index f5be4fa865..0000000000
--- a/usr/src/lib/libshell/sparc/include/ast/nval.h
+++ /dev/null
@@ -1,323 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef NV_DEFAULT
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * David Korn
- * AT&T Labs
- *
- * Interface definitions of structures for name-value pairs
- * These structures are used for named variables, functions and aliases
- *
- */
-
-
-#include <ast.h>
-#include <cdt.h>
-#include <option.h>
-
-/* for compatibility with old hash library */
-#define Hashtab_t Dt_t
-#define HASH_BUCKET 1
-#define HASH_NOSCOPE 2
-#define HASH_SCOPE 4
-#define hashscope(x) dtvnext(x)
-
-typedef struct Namval Namval_t;
-typedef struct Namfun Namfun_t;
-typedef struct Namdisc Namdisc_t;
-typedef struct Nambfun Nambfun_t;
-typedef struct Namarray Namarr_t;
-typedef struct Namdecl Namdecl_t;
-
-/*
- * This defines the template for nodes that have their own assignment
- * and or lookup functions
- */
-struct Namdisc
-{
- size_t dsize;
- void (*putval) __PROTO__((Namval_t*, const char*, int, Namfun_t*));
- char *(*getval) __PROTO__((Namval_t*, Namfun_t*));
- Sfdouble_t (*getnum) __PROTO__((Namval_t*, Namfun_t*));
- char *(*setdisc) __PROTO__((Namval_t*, const char*, Namval_t*, Namfun_t*));
- Namval_t *(*createf) __PROTO__((Namval_t*, const char*, int, Namfun_t*));
- Namfun_t *(*clonef) __PROTO__((Namval_t*, Namval_t*, int, Namfun_t*));
- char *(*namef) __PROTO__((Namval_t*, Namfun_t*));
- Namval_t *(*nextf) __PROTO__((Namval_t*, Dt_t*, Namfun_t*));
- Namval_t *(*typef) __PROTO__((Namval_t*, Namfun_t*));
- int (*readf) __PROTO__((Namval_t*, Sfio_t*, int, Namfun_t*));
- int (*writef) __PROTO__((Namval_t*, Sfio_t*, int, Namfun_t*));
-};
-
-struct Namfun
-{
- const Namdisc_t *disc;
- char nofree;
- unsigned char subshell;
- unsigned short dsize;
- Namfun_t *next;
- char *last;
- Namval_t *type;
-};
-
-struct Nambfun
-{
- Namfun_t fun;
- int num;
- const char **bnames;
- Namval_t *bltins[1];
-};
-
-/* This is an array template header */
-struct Namarray
-{
- Namfun_t hdr;
- long nelem; /* number of elements */
- __V_ *(*fun) __PROTO__((Namval_t*,const char*,int)); /* associative arrays */
- Namval_t *parent; /* for multi-dimensional */
- Dt_t *table; /* for subscripts */
- __V_ *scope; /* non-zerp when scoped */
-};
-
-/* The context pointer for declaration command */
-struct Namdecl
-{
- Namval_t *tp; /* point to type */
- const char *optstring;
- __V_ *optinfof;
-};
-
-/* attributes of name-value node attribute flags */
-
-#define NV_DEFAULT 0
-/* This defines the attributes for an attributed name-value pair node */
-struct Namval
-{
- Dtlink_t nvlink; /* space for cdt links */
- char *nvname; /* pointer to name of the node */
- unsigned short nvflag; /* attributes */
- unsigned short nvsize; /* size or base */
-#ifdef _NV_PRIVATE
- _NV_PRIVATE
-#else
- Namfun_t *nvfun;
- char *nvalue;
- char *nvprivate;
-#endif /* _NV_PRIVATE */
-};
-
-#define NV_CLASS ".sh.type"
-#define NV_DATA "_" /* special class or instance variable */
-#define NV_MINSZ (sizeof(struct Namval)-sizeof(Dtlink_t)-sizeof(char*))
-#define nv_namptr(p,n) ((Namval_t*)((char*)(p)+(n)*NV_MINSZ-sizeof(Dtlink_t)))
-
-/* The following attributes are for internal use */
-#define NV_NOFREE 0x200 /* don't free the space when releasing value */
-#define NV_ARRAY 0x400 /* node is an array */
-#define NV_REF 0x4000 /* reference bit */
-#define NV_TABLE 0x800 /* node is a dictionary table */
-#define NV_IMPORT 0x1000 /* value imported from environment */
-#define NV_MINIMAL NV_IMPORT /* node does not contain all fields */
-
-#define NV_INTEGER 0x2 /* integer attribute */
-/* The following attributes are valid only when NV_INTEGER is off */
-#define NV_LTOU 0x4 /* convert to uppercase */
-#define NV_UTOL 0x8 /* convert to lowercase */
-#define NV_ZFILL 0x10 /* right justify and fill with leading zeros */
-#define NV_RJUST 0x20 /* right justify and blank fill */
-#define NV_LJUST 0x40 /* left justify and blank fill */
-#define NV_BINARY 0x100 /* fixed size data buffer */
-#define NV_RAW NV_LJUST /* used only with NV_BINARY */
-#define NV_HOST (NV_RJUST|NV_LJUST) /* map to host filename */
-
-/* The following attributes do not effect the value */
-#define NV_RDONLY 0x1 /* readonly bit */
-#define NV_EXPORT 0x2000 /* export bit */
-#define NV_TAGGED 0x8000 /* user define tag bit */
-
-/* The following are used with NV_INTEGER */
-#define NV_SHORT (NV_RJUST) /* when integers are not long */
-#define NV_LONG (NV_UTOL) /* for long long and long double */
-#define NV_UNSIGN (NV_LTOU) /* for unsigned quantities */
-#define NV_DOUBLE (NV_INTEGER|NV_ZFILL) /* for floating point */
-#define NV_EXPNOTE (NV_LJUST) /* for scientific notation */
-#define NV_HEXFLOAT (NV_LTOU) /* for C99 base16 float notation */
-
-/* options for nv_open */
-
-#define NV_APPEND 0x10000 /* append value */
-#define NV_MOVE 0x8000000 /* for use with nv_clone */
-#define NV_ADD 8
- /* add node if not found */
-#define NV_ASSIGN NV_NOFREE /* assignment is possible */
-#define NV_NOASSIGN 0 /* backward compatibility */
-#define NV_NOARRAY 0x200000 /* array name not possible */
-#define NV_IARRAY 0x400000 /* for indexed array */
-#define NV_NOREF NV_REF /* don't follow reference */
-#define NV_IDENT 0x80 /* name must be identifier */
-#define NV_VARNAME 0x20000 /* name must be ?(.)id*(.id) */
-#define NV_NOADD 0x40000 /* do not add node */
-#define NV_NOSCOPE 0x80000 /* look only in current scope */
-#define NV_NOFAIL 0x100000 /* return 0 on failure, no msg */
-#define NV_NODISC NV_IDENT /* ignore disciplines */
-
-#define NV_FUNCT NV_IDENT /* option for nv_create */
-#define NV_BLTINOPT NV_ZFILL /* mark builtins in libcmd */
-
-#define NV_PUBLIC (~(NV_NOSCOPE|NV_ASSIGN|NV_IDENT|NV_VARNAME|NV_NOADD))
-
-/* numeric types */
-#define NV_INT16P (NV_LJUST|NV_SHORT|NV_INTEGER)
-#define NV_INT16 (NV_SHORT|NV_INTEGER)
-#define NV_UINT16 (NV_UNSIGN|NV_SHORT|NV_INTEGER)
-#define NV_UINT16P (NV_LJUSTNV_UNSIGN|NV_SHORT|NV_INTEGER)
-#define NV_INT32 (NV_INTEGER)
-#define NV_UNT32 (NV_UNSIGN|NV_INTEGER)
-#define NV_INT64 (NV_LONG|NV_INTEGER)
-#define NV_UINT64 (NV_UNSIGN|NV_LONG|NV_INTEGER)
-#define NV_FLOAT (NV_SHORT|NV_DOUBLE)
-#define NV_LDOUBLE (NV_LONG|NV_DOUBLE)
-
-/* name-value pair macros */
-#define nv_isattr(np,f) ((np)->nvflag & (f))
-#define nv_onattr(n,f) ((n)->nvflag |= (f))
-#define nv_offattr(n,f) ((n)->nvflag &= ~(f))
-#define nv_isarray(np) (nv_isattr((np),NV_ARRAY))
-
-/* The following are operations for associative arrays */
-#define NV_AINIT 1 /* initialize */
-#define NV_AFREE 2 /* free array */
-#define NV_ANEXT 3 /* advance to next subscript */
-#define NV_ANAME 4 /* return subscript name */
-#define NV_ADELETE 5 /* delete current subscript */
-#define NV_AADD 6 /* add subscript if not found */
-#define NV_ACURRENT 7 /* return current subscript Namval_t* */
-#define NV_ASETSUB 8 /* set current subscript */
-
-/* The following are for nv_disc */
-#define NV_FIRST 1
-#define NV_LAST 2
-#define NV_POP 3
-#define NV_CLONE 4
-
-/* The following are operations for nv_putsub() */
-#define ARRAY_BITS 22
-#define ARRAY_ADD (1L<<ARRAY_BITS) /* add subscript if not found */
-#define ARRAY_SCAN (2L<<ARRAY_BITS) /* For ${array[@]} */
-#define ARRAY_UNDEF (4L<<ARRAY_BITS) /* For ${array} */
-
-
-/* These are disciplines provided by the library for use with nv_discfun */
-#define NV_DCADD 0 /* used to add named disciplines */
-#define NV_DCRESTRICT 1 /* variable that are restricted in rsh */
-
-#if defined(__EXPORT__) && defined(_DLL)
-# ifdef _BLD_shell
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-# else
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-# endif /* _BLD_shell */
-#endif /* _DLL */
-/* prototype for array interface*/
-extern __MANGLE__ Namarr_t *nv_arrayptr __PROTO__((Namval_t*));
-extern __MANGLE__ Namarr_t *nv_setarray __PROTO__((Namval_t*,__V_*(*)(Namval_t*,const char*,int)));
-extern __MANGLE__ int nv_arraynsub __PROTO__((Namarr_t*));
-extern __MANGLE__ __V_ *nv_associative __PROTO__((Namval_t*,const char*,int));
-extern __MANGLE__ int nv_aindex __PROTO__((Namval_t*));
-extern __MANGLE__ int nv_nextsub __PROTO__((Namval_t*));
-extern __MANGLE__ char *nv_getsub __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_putsub __PROTO__((Namval_t*, char*, long));
-extern __MANGLE__ Namval_t *nv_opensub __PROTO__((Namval_t*));
-
-/* name-value pair function prototypes */
-extern __MANGLE__ int nv_adddisc __PROTO__((Namval_t*, const char**, Namval_t**));
-extern __MANGLE__ int nv_clone __PROTO__((Namval_t*, Namval_t*, int));
-extern __MANGLE__ void nv_close __PROTO__((Namval_t*));
-extern __MANGLE__ __V_ *nv_context __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_create __PROTO__((const char*, Dt_t*, int,Namfun_t*));
-extern __MANGLE__ void nv_delete __PROTO__((Namval_t*, Dt_t*, int));
-extern __MANGLE__ Dt_t *nv_dict __PROTO__((Namval_t*));
-extern __MANGLE__ Sfdouble_t nv_getn __PROTO__((Namval_t*, Namfun_t*));
-extern __MANGLE__ Sfdouble_t nv_getnum __PROTO__((Namval_t*));
-extern __MANGLE__ char *nv_getv __PROTO__((Namval_t*, Namfun_t*));
-extern __MANGLE__ char *nv_getval __PROTO__((Namval_t*));
-extern __MANGLE__ Namfun_t *nv_hasdisc __PROTO__((Namval_t*, const Namdisc_t*));
-extern __MANGLE__ int nv_isnull __PROTO__((Namval_t*));
-extern __MANGLE__ Namfun_t *nv_isvtree __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_lastdict __PROTO__((void));
-extern __MANGLE__ Namval_t *nv_mkinttype __PROTO__((char*, size_t, int, const char*, Namdisc_t*));
-extern __MANGLE__ void nv_newattr __PROTO__((Namval_t*,unsigned,int));
-extern __MANGLE__ void nv_newtype __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_open __PROTO__((const char*,Dt_t*,int));
-extern __MANGLE__ void nv_putval __PROTO__((Namval_t*,const char*,int));
-extern __MANGLE__ void nv_putv __PROTO__((Namval_t*,const char*,int,Namfun_t*));
-extern __MANGLE__ int nv_rename __PROTO__((Namval_t*,int));
-extern __MANGLE__ int nv_scan __PROTO__((Dt_t*,void(*)(Namval_t*,__V_*),__V_*,int,int));
-extern __MANGLE__ char *nv_setdisc __PROTO__((Namval_t*,const char*,Namval_t*,Namfun_t*));
-extern __MANGLE__ void nv_setref __PROTO__((Namval_t*, Dt_t*,int));
-extern __MANGLE__ int nv_settype __PROTO__((Namval_t*, Namval_t*, int));
-extern __MANGLE__ void nv_setvec __PROTO__((Namval_t*,int,int,char*[]));
-extern __MANGLE__ void nv_setvtree __PROTO__((Namval_t*));
-extern __MANGLE__ int nv_setsize __PROTO__((Namval_t*,int));
-extern __MANGLE__ Namfun_t *nv_disc __PROTO__((Namval_t*,Namfun_t*,int));
-extern __MANGLE__ void nv_unset __PROTO__((Namval_t*)); /*obsolete */
-extern __MANGLE__ void _nv_unset __PROTO__((Namval_t*,int));
-extern __MANGLE__ Namval_t *nv_search __PROTO__((const char *, Dt_t*, int));
-extern __MANGLE__ char *nv_name __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_type __PROTO__((Namval_t*));
-extern __MANGLE__ void nv_addtype __PROTO__((Namval_t*,const char*, Optdisc_t*, size_t));
-extern __MANGLE__ const Namdisc_t *nv_discfun __PROTO__((int));
-
-#ifdef _DLL
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif /* _DLL */
-
-#define nv_unset(np) _nv_unset(np,0)
-#define nv_size(np) nv_setsize((np),-1)
-#define nv_stack(np,nf) nv_disc(np,nf,0)
-
-#if 0
-/*
- * The names of many functions were changed in early '95
- * Here is a mapping to the old names
- */
-# define nv_istype(np) nv_isattr(np)
-# define nv_newtype(np) nv_newattr(np)
-# define nv_namset(np,a,b) nv_open(np,a,b)
-# define nv_free(np) nv_unset(np,0)
-# define nv_settype(np,a,b,c) nv_setdisc(np,a,b,c)
-# define nv_search(np,a,b) nv_open(np,a,((b)?0:NV_NOADD))
-# define settype setdisc
-#endif
-
-#endif /* NV_DEFAULT */
diff --git a/usr/src/lib/libshell/sparc/include/ast/shell.h b/usr/src/lib/libshell/sparc/include/ast/shell.h
deleted file mode 100644
index a8c1d85c3b..0000000000
--- a/usr/src/lib/libshell/sparc/include/ast/shell.h
+++ /dev/null
@@ -1,264 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef SH_INTERACTIVE
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * David Korn
- * AT&T Labs
- *
- * Interface definitions for shell command language
- *
- */
-
-#include <ast.h>
-#include <cdt.h>
-#ifdef _SH_PRIVATE
-# include "name.h"
-#else
-# include <nval.h>
-#endif /* _SH_PRIVATE */
-
-#define SH_VERSION 20071012
-
-#undef NOT_USED
-#define NOT_USED(x) (&x,1)
-
-/* options */
-typedef struct
-{
- unsigned long v[4];
-}
-Shopt_t;
-
-typedef struct Shell_s Shell_t;
-
-typedef void (*Shinit_f) __PROTO__((Shell_t*, int));
-typedef int (*Shwait_f) __PROTO__((int, long, int));
-
-union Shnode_u;
-typedef union Shnode_u Shnode_t;
-
-#define SH_CFLAG 0
-#define SH_HISTORY 1 /* used also as a state */
-#define SH_ERREXIT 2 /* used also as a state */
-#define SH_VERBOSE 3 /* used also as a state */
-#define SH_MONITOR 4 /* used also as a state */
-#define SH_INTERACTIVE 5 /* used also as a state */
-#define SH_RESTRICTED 6
-#define SH_XTRACE 7
-#define SH_KEYWORD 8
-#define SH_NOUNSET 9
-#define SH_NOGLOB 10
-#define SH_ALLEXPORT 11
-#define SH_PFSH 12
-#define SH_IGNOREEOF 13
-#define SH_NOCLOBBER 14
-#define SH_MARKDIRS 15
-#define SH_BGNICE 16
-#define SH_VI 17
-#define SH_VIRAW 18
-#define SH_TFLAG 19
-#define SH_TRACKALL 20
-#define SH_SFLAG 21
-#define SH_NOEXEC 22
-#define SH_GMACS 24
-#define SH_EMACS 25
-#define SH_PRIVILEGED 26
-#define SH_SUBSHARE 27 /* subshell shares state with parent */
-#define SH_NOLOG 28
-#define SH_NOTIFY 29
-#define SH_DICTIONARY 30
-#define SH_PIPEFAIL 32
-#define SH_GLOBSTARS 33
-#define SH_XARGS 34
-#define SH_RC 35
-#define SH_SHOWME 36
-
-/*
- * passed as flags to builtins in Nambltin_t struct when BLT_OPTIM is on
- */
-#define SH_BEGIN_OPTIM 0x1
-#define SH_END_OPTIM 0x2
-
-/* The following type is used for error messages */
-
-/* error messages */
-extern __MANGLE__ const char e_defpath[];
-extern __MANGLE__ const char e_found[];
-extern __MANGLE__ const char e_nospace[];
-extern __MANGLE__ const char e_format[];
-extern __MANGLE__ const char e_number[];
-extern __MANGLE__ const char e_restricted[];
-extern __MANGLE__ const char e_recursive[];
-extern __MANGLE__ char e_version[];
-
-typedef struct sh_scope
-{
- struct sh_scope *par_scope;
- int argc;
- char **argv;
- char *cmdname;
- char *filename;
- char *funname;
- int lineno;
- Dt_t *var_tree;
- struct sh_scope *self;
-} Shscope_t;
-
-/*
- * Saves the state of the shell
- */
-
-struct Shell_s
-{
- Shopt_t options; /* set -o options */
- Dt_t *var_tree; /* for shell variables */
- Dt_t *fun_tree; /* for shell functions */
- Dt_t *alias_tree; /* for alias names */
- Dt_t *bltin_tree; /* for builtin commands */
- Shscope_t *topscope; /* pointer to top-level scope */
- int inlineno; /* line number of current input file */
- int exitval; /* most recent exit value */
- unsigned char trapnote; /* set when trap/signal is pending */
- char shcomp; /* set when runing shcomp */
- short subshell; /* set for virtual subshell */
-#ifdef _SH_PRIVATE
- _SH_PRIVATE
-#endif /* _SH_PRIVATE */
-};
-
-/* flags for sh_parse */
-#define SH_NL 1 /* Treat new-lines as ; */
-#define SH_EOF 2 /* EOF causes syntax error */
-
-/* symbolic values for sh_iogetiop */
-#define SH_IOCOPROCESS (-2)
-#define SH_IOHISTFILE (-3)
-
-#include <cmd.h>
-
-/* symbolic value for sh_fdnotify */
-#define SH_FDCLOSE (-1)
-
-#undef getenv /* -lshell provides its own */
-
-#if defined(__EXPORT__) && defined(_DLL)
-# ifdef _BLD_shell
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-# endif /* _BLD_shell */
-#endif /* _DLL */
-
-extern __MANGLE__ Dt_t *sh_bltin_tree __PROTO__((void));
-extern __MANGLE__ void sh_subfork __PROTO__((void));
-extern __MANGLE__ Shell_t *sh_init __PROTO__((int,char*[],Shinit_f));
-extern __MANGLE__ int sh_reinit __PROTO__((char*[]));
-extern __MANGLE__ int sh_eval __PROTO__((Sfio_t*,int));
-extern __MANGLE__ void sh_delay __PROTO__((double));
-extern __MANGLE__ __V_ *sh_parse __PROTO__((Shell_t*, Sfio_t*,int));
-extern __MANGLE__ int sh_trap __PROTO__((const char*,int));
-extern __MANGLE__ int sh_fun __PROTO__((Namval_t*,Namval_t*, char*[]));
-extern __MANGLE__ int sh_funscope __PROTO__((int,char*[],int(*)(__V_*),__V_*,int));
-extern __MANGLE__ Sfio_t *sh_iogetiop __PROTO__((int,int));
-extern __MANGLE__ int sh_main __PROTO__((int, char*[], Shinit_f));
-extern __MANGLE__ int sh_run __PROTO__((int, char*[]));
-extern __MANGLE__ void sh_menu __PROTO__((Sfio_t*, int, char*[]));
-extern __MANGLE__ Namval_t *sh_addbuiltin __PROTO__((const char*, int(*)(int, char*[],__V_*), __V_*));
-extern __MANGLE__ char *sh_fmtq __PROTO__((const char*));
-extern __MANGLE__ char *sh_fmtqf __PROTO__((const char*, int, int));
-extern __MANGLE__ Sfdouble_t sh_strnum __PROTO__((const char*, char**, int));
-extern __MANGLE__ int sh_access __PROTO__((const char*,int));
-extern __MANGLE__ int sh_close __PROTO__((int));
-extern __MANGLE__ int sh_dup __PROTO__((int));
-extern __MANGLE__ void sh_exit __PROTO__((int));
-extern __MANGLE__ int sh_fcntl __PROTO__((int, int, ...));
-extern __MANGLE__ Sfio_t *sh_fd2sfio __PROTO__((int));
-extern __MANGLE__ int (*sh_fdnotify __PROTO__((int(*)(int,int)))) __PROTO__((int,int));
-extern __MANGLE__ Shell_t *sh_getinterp __PROTO__((void));
-extern __MANGLE__ int sh_open __PROTO__((const char*, int, ...));
-extern __MANGLE__ int sh_openmax __PROTO__((void));
-extern __MANGLE__ Sfio_t *sh_pathopen __PROTO__((const char*));
-extern __MANGLE__ ssize_t sh_read __PROTO__((int, __V_*, size_t));
-extern __MANGLE__ ssize_t sh_write __PROTO__((int, const __V_*, size_t));
-extern __MANGLE__ off_t sh_seek __PROTO__((int, off_t, int));
-extern __MANGLE__ int sh_pipe __PROTO__((int[]));
-extern __MANGLE__ mode_t sh_umask __PROTO__((mode_t));
-extern __MANGLE__ __V_ *sh_waitnotify __PROTO__((Shwait_f));
-extern __MANGLE__ Shscope_t *sh_getscope __PROTO__((int,int));
-extern __MANGLE__ Shscope_t *sh_setscope __PROTO__((Shscope_t*));
-extern __MANGLE__ void sh_sigcheck __PROTO__((void));
-extern __MANGLE__ unsigned long sh_isoption __PROTO__((int));
-extern __MANGLE__ unsigned long sh_onoption __PROTO__((int));
-extern __MANGLE__ unsigned long sh_offoption __PROTO__((int));
-extern __MANGLE__ int sh_waitsafe __PROTO__((void));
-extern __MANGLE__ int sh_exec __PROTO__((const Shnode_t*,int));
-
-#if SHOPT_DYNAMIC
- extern __MANGLE__ __V_ **sh_getliblist __PROTO__((void));
-#endif /* SHOPT_DYNAMIC */
-
-/*
- * direct access to sh is obsolete, use sh_getinterp() instead
- */
-#if !defined(_SH_PRIVATE) && defined(__IMPORT__) && !defined(_BLD_shell)
- extern __MANGLE__ __IMPORT__ Shell_t sh;
-#else
- extern __MANGLE__ Shell_t sh;
-#endif
-
-#ifdef _DLL
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif /* _DLL */
-
-#ifndef _SH_PRIVATE
-# define access(a,b) sh_access(a,b)
-# define close(a) sh_close(a)
-# define exit(a) sh_exit(a)
-# define fcntl(a,b,c) sh_fcntl(a,b,c)
-# define pipe(a) sh_pipe(a)
-# define read(a,b,c) sh_read(a,b,c)
-# define write(a,b,c) sh_write(a,b,c)
-# define umask(a) sh_umask(a)
-# define dup sh_dup
-# if _lib_lseek64
-# define open64 sh_open
-# define lseek64 sh_seek
-# else
-# define open sh_open
-# define lseek sh_seek
-# endif
-#endif /* !_SH_PRIVATE */
-
-#define SH_SIGSET 4
-#define SH_EXITSIG 0400 /* signal exit bit */
-#define SH_EXITMASK (SH_EXITSIG-1) /* normal exit status bits */
-#define SH_RUNPROG -1022 /* needs to be negative and < 256 */
-
-#endif /* SH_INTERACTIVE */
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct
deleted file mode 100644
index 0521a3c2c0..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/acct
+++ /dev/null
@@ -1,13 +0,0 @@
-/* : : 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_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_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) */
-#define _sys_acct 1 /* #include <sys/acct.h> ok */
-#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds
deleted file mode 100644
index a68e07ab37..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/cmds
+++ /dev/null
@@ -1,37 +0,0 @@
-/* : : 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_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_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) */
-#define _bin_newgrp 1 /* /bin/newgrp found */
-#define _usr_bin_newgrp 1 /* /usr/bin/newgrp found */
-#define _cmd_test 1 /* test in ?(/usr)/(bin|etc|ucb) */
-#define _bin_test 1 /* /bin/test found */
-#define _usr_bin_test 1 /* /usr/bin/test found */
-#define _usr_ucb_test 1 /* /usr/ucb/test found */
-#define _cmd_id 1 /* id in ?(/usr)/(bin|etc|ucb) */
-#define _bin_id 1 /* /bin/id found */
-#define _usr_bin_id 1 /* /usr/bin/id found */
-#define _cmd_wc 1 /* wc in ?(/usr)/(bin|etc|ucb) */
-#define _bin_wc 1 /* /bin/wc found */
-#define _usr_bin_wc 1 /* /usr/bin/wc found */
-#define _usr_ucb_wc 1 /* /usr/ucb/wc found */
-#define _cmd_cut 1 /* cut in ?(/usr)/(bin|etc|ucb) */
-#define _bin_cut 1 /* /bin/cut found */
-#define _usr_bin_cut 1 /* /usr/bin/cut found */
-#define _cmd_logname 1 /* logname in ?(/usr)/(bin|etc|ucb) */
-#define _bin_logname 1 /* /bin/logname found */
-#define _usr_bin_logname 1 /* /usr/bin/logname found */
-#define _cmd_pfexec 1 /* pfexec in ?(/usr)/(bin|etc|ucb) */
-#define _bin_pfexec 1 /* /bin/pfexec found */
-#define _usr_bin_pfexec 1 /* /usr/bin/pfexec found */
-#define _cmd_tput 1 /* tput in ?(/usr)/(bin|etc|ucb) */
-#define _bin_tput 1 /* /bin/tput found */
-#define _usr_bin_tput 1 /* /usr/bin/tput found */
-#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic
deleted file mode 100644
index a74c7841a8..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/dynamic
+++ /dev/null
@@ -1,22 +0,0 @@
-/* : : 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_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_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
-#include <dlldefs.h>
-#endif
-#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
-# define SHOPT_FS_3D 1
-#endif /* !SHOPT_FS_3D */
-#if SHOPT_FS_3D
-# undef mount
-# include <fs3d.h>
-#endif /* SHOPT_FS_3D */
-
-#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs
deleted file mode 100644
index 5a14cde36f..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/execargs
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : 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_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_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/math b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math
deleted file mode 100644
index 5472de8ac6..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/math
+++ /dev/null
@@ -1,183 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : 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)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_math_ksh93 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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_20100309/build_sparc_32bit/src/cmd/ksh93/data/math.tab : : */
-
-typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
-
-#include <ast_standards.h>
-#include <math.h>
-#include <ieeefp.h>
-
-static Sfdouble_t local_finite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return finite(a1);}
-static int local_fpclassify __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclassify(a1);}
-static int local_isfinite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isfinite(a1);}
-static int local_isgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreater(a1,a2);}
-static int local_isgreaterequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreaterequal(a1,a2);}
-static int local_isinf __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isinf(a1);}
-static int local_isless __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isless(a1,a2);}
-static int local_islessequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessequal(a1,a2);}
-static int local_islessgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessgreater(a1,a2);}
-static int local_isnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isnormal(a1);}
-#ifdef FP_SUBNORMAL
-static int local_issubnormal __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_SUBNORMAL; }
-#endif
-static int local_isunordered __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isunordered(a1,a2);}
-#ifdef FP_ZERO
-static int local_iszero __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_ZERO; }
-#endif
-static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return signbit(a1);}
-
-/*
- * first byte is two-digit octal number. Last digit is number of args
- * first digit is 0 if return value is double, 1 for integer
- */
-const struct mathtab shtab_math[] =
-{
- "\001acos", (Math_f)acosl,
- "\001acosh", (Math_f)acoshl,
- "\001asin", (Math_f)asinl,
- "\001asinh", (Math_f)asinhl,
- "\001atan", (Math_f)atanl,
- "\002atan2", (Math_f)atan2l,
- "\001atanh", (Math_f)atanhl,
- "\001cbrt", (Math_f)cbrtl,
- "\001ceil", (Math_f)ceill,
- "\002copysign", (Math_f)copysignl,
- "\001cos", (Math_f)cosl,
- "\001cosh", (Math_f)coshl,
- "\001erf", (Math_f)erfl,
- "\001erfc", (Math_f)erfcl,
- "\001exp", (Math_f)expl,
- "\001exp2", (Math_f)exp2l,
- "\001expm1", (Math_f)expm1l,
- "\001fabs", (Math_f)fabsl,
- "\001abs", (Math_f)fabsl,
- "\002fdim", (Math_f)fdiml,
- "\001finite", (Math_f)local_finite,
- "\001floor", (Math_f)floorl,
- "\001int", (Math_f)floorl,
- "\003fma", (Math_f)fmal,
- "\002fmax", (Math_f)fmaxl,
- "\002fmin", (Math_f)fminl,
- "\002fmod", (Math_f)fmodl,
- "\011fpclassify", (Math_f)local_fpclassify,
- "\002hypot", (Math_f)hypotl,
- "\011ilogb", (Math_f)ilogbl,
- "\011isfinite", (Math_f)local_isfinite,
- "\012isgreater", (Math_f)local_isgreater,
- "\012isgreaterequal", (Math_f)local_isgreaterequal,
- "\011isinf", (Math_f)local_isinf,
- "\012isless", (Math_f)local_isless,
- "\012islessequal", (Math_f)local_islessequal,
- "\012islessgreater", (Math_f)local_islessgreater,
- "\011isnan", (Math_f)isnanl,
- "\011isnormal", (Math_f)local_isnormal,
-#ifdef FP_SUBNORMAL
- "\011issubnormal", (Math_f)local_issubnormal,
-#endif
- "\012isunordered", (Math_f)local_isunordered,
-#ifdef FP_ZERO
- "\011iszero", (Math_f)local_iszero,
-#endif
- "\001j0", (Math_f)j0l,
- "\001j1", (Math_f)j1l,
- "\002jn", (Math_f)jnl,
- "\001lgamma", (Math_f)lgammal,
- "\001log", (Math_f)logl,
- "\001log10", (Math_f)log10l,
- "\001log1p", (Math_f)log1pl,
- "\001log2", (Math_f)log2l,
- "\001logb", (Math_f)logbl,
- "\001nearbyint", (Math_f)nearbyintl,
- "\002nextafter", (Math_f)nextafterl,
- "\002nexttoward", (Math_f)nexttowardl,
- "\002pow", (Math_f)powl,
- "\002remainder", (Math_f)remainderl,
- "\001rint", (Math_f)rintl,
- "\001round", (Math_f)roundl,
- "\002scalb", (Math_f)scalbl,
- "\002scalbn", (Math_f)scalbnl,
- "\011signbit", (Math_f)local_signbit,
- "\001sin", (Math_f)sinl,
- "\001sinh", (Math_f)sinhl,
- "\001sqrt", (Math_f)sqrtl,
- "\001tan", (Math_f)tanl,
- "\001tanh", (Math_f)tanhl,
- "\001tgamma", (Math_f)tgammal,
- "\001trunc", (Math_f)truncl,
- "\001y0", (Math_f)y0l,
- "\001y1", (Math_f)y1l,
- "\002yn", (Math_f)ynl,
- "", (Math_f)0
-};
-#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options
deleted file mode 100644
index ad28f7a1fe..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/options
+++ /dev/null
@@ -1,25 +0,0 @@
-/* : : 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_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_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
-#ifndef SHOPT_DEVFD
-# define SHOPT_DEVFD 1
-#endif
-#undef SHOPT_PFSH
-#undef SHOPT_TEST_L
-#ifndef SHOPT_SYSRC
-# define SHOPT_SYSRC 1
-#endif
-#undef SHOPT_UCB
-#if !_PACKAGE_ast && ( (MB_LEN_MAX-1)<=0 || !defined(_lib_mbtowc) )
-# undef SHOPT_MULTIBYTE
-#endif
-
-#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat
deleted file mode 100644
index b80003c053..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/pstat
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : 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_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_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
deleted file mode 100644
index c3421ba013..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/rlimits
+++ /dev/null
@@ -1,20 +0,0 @@
-/* : : 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_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_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 */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_ulimit 1 /* ulimit() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_rlim_t 1 /* rlim_t is a type */
-#endif
diff --git a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys b/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys
deleted file mode 100644
index 6d2b6b2203..0000000000
--- a/usr/src/lib/libshell/sparc/src/cmd/ksh93/FEATURE/ttys
+++ /dev/null
@@ -1,20 +0,0 @@
-/* : : 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_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_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 */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#endif
diff --git a/usr/src/lib/libshell/sparcv9/include/ast/history.h b/usr/src/lib/libshell/sparcv9/include/ast/history.h
deleted file mode 100644
index 1b0f3ce403..0000000000
--- a/usr/src/lib/libshell/sparcv9/include/ast/history.h
+++ /dev/null
@@ -1,84 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef HIST_VERSION
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * Interface for history mechanism
- * written by David Korn
- *
- */
-
-#include <ast.h>
-
-#define HIST_CHAR '!'
-#define HIST_VERSION 1 /* history file format version no. */
-
-typedef struct
-{
- Sfdisc_t histdisc; /* discipline for history */
- Sfio_t *histfp; /* history file stream pointer */
- char *histname; /* name of history file */
- int32_t histind; /* current command number index */
- int histsize; /* number of accessible history lines */
-#ifdef _HIST_PRIVATE
- _HIST_PRIVATE
-#endif /* _HIST_PRIVATE */
-} History_t;
-
-typedef struct
-{
- int hist_command;
- int hist_line;
- int hist_char;
-} Histloc_t;
-
-/* the following are readonly */
-extern __MANGLE__ const char hist_fname[];
-
-extern __MANGLE__ int _Hist;
-#define hist_min(hp) ((_Hist=((int)((hp)->histind-(hp)->histsize)))>=0?_Hist:0)
-#define hist_max(hp) ((int)((hp)->histind))
-/* these are the history interface routines */
-extern __MANGLE__ int sh_histinit __PROTO__((__V_ *));
-extern __MANGLE__ void hist_cancel __PROTO__((History_t*));
-extern __MANGLE__ void hist_close __PROTO__((History_t*));
-extern __MANGLE__ int hist_copy __PROTO__((char*, int, int, int));
-extern __MANGLE__ void hist_eof __PROTO__((History_t*));
-extern __MANGLE__ Histloc_t hist_find __PROTO__((History_t*,char*,int, int, int));
-extern __MANGLE__ void hist_flush __PROTO__((History_t*));
-extern __MANGLE__ void hist_list __PROTO__((History_t*,Sfio_t*, off_t, int, char*));
-extern __MANGLE__ int hist_match __PROTO__((History_t*,off_t, char*, int*));
-extern __MANGLE__ off_t hist_tell __PROTO__((History_t*,int));
-extern __MANGLE__ off_t hist_seek __PROTO__((History_t*,int));
-extern __MANGLE__ char *hist_word __PROTO__((char*, int, int));
-#if SHOPT_ESH
- extern __MANGLE__ Histloc_t hist_locate __PROTO__((History_t*,int, int, int));
-#endif /* SHOPT_ESH */
-
-#endif /* HIST_VERSION */
diff --git a/usr/src/lib/libshell/sparcv9/include/ast/nval.h b/usr/src/lib/libshell/sparcv9/include/ast/nval.h
deleted file mode 100644
index f5be4fa865..0000000000
--- a/usr/src/lib/libshell/sparcv9/include/ast/nval.h
+++ /dev/null
@@ -1,323 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef NV_DEFAULT
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * David Korn
- * AT&T Labs
- *
- * Interface definitions of structures for name-value pairs
- * These structures are used for named variables, functions and aliases
- *
- */
-
-
-#include <ast.h>
-#include <cdt.h>
-#include <option.h>
-
-/* for compatibility with old hash library */
-#define Hashtab_t Dt_t
-#define HASH_BUCKET 1
-#define HASH_NOSCOPE 2
-#define HASH_SCOPE 4
-#define hashscope(x) dtvnext(x)
-
-typedef struct Namval Namval_t;
-typedef struct Namfun Namfun_t;
-typedef struct Namdisc Namdisc_t;
-typedef struct Nambfun Nambfun_t;
-typedef struct Namarray Namarr_t;
-typedef struct Namdecl Namdecl_t;
-
-/*
- * This defines the template for nodes that have their own assignment
- * and or lookup functions
- */
-struct Namdisc
-{
- size_t dsize;
- void (*putval) __PROTO__((Namval_t*, const char*, int, Namfun_t*));
- char *(*getval) __PROTO__((Namval_t*, Namfun_t*));
- Sfdouble_t (*getnum) __PROTO__((Namval_t*, Namfun_t*));
- char *(*setdisc) __PROTO__((Namval_t*, const char*, Namval_t*, Namfun_t*));
- Namval_t *(*createf) __PROTO__((Namval_t*, const char*, int, Namfun_t*));
- Namfun_t *(*clonef) __PROTO__((Namval_t*, Namval_t*, int, Namfun_t*));
- char *(*namef) __PROTO__((Namval_t*, Namfun_t*));
- Namval_t *(*nextf) __PROTO__((Namval_t*, Dt_t*, Namfun_t*));
- Namval_t *(*typef) __PROTO__((Namval_t*, Namfun_t*));
- int (*readf) __PROTO__((Namval_t*, Sfio_t*, int, Namfun_t*));
- int (*writef) __PROTO__((Namval_t*, Sfio_t*, int, Namfun_t*));
-};
-
-struct Namfun
-{
- const Namdisc_t *disc;
- char nofree;
- unsigned char subshell;
- unsigned short dsize;
- Namfun_t *next;
- char *last;
- Namval_t *type;
-};
-
-struct Nambfun
-{
- Namfun_t fun;
- int num;
- const char **bnames;
- Namval_t *bltins[1];
-};
-
-/* This is an array template header */
-struct Namarray
-{
- Namfun_t hdr;
- long nelem; /* number of elements */
- __V_ *(*fun) __PROTO__((Namval_t*,const char*,int)); /* associative arrays */
- Namval_t *parent; /* for multi-dimensional */
- Dt_t *table; /* for subscripts */
- __V_ *scope; /* non-zerp when scoped */
-};
-
-/* The context pointer for declaration command */
-struct Namdecl
-{
- Namval_t *tp; /* point to type */
- const char *optstring;
- __V_ *optinfof;
-};
-
-/* attributes of name-value node attribute flags */
-
-#define NV_DEFAULT 0
-/* This defines the attributes for an attributed name-value pair node */
-struct Namval
-{
- Dtlink_t nvlink; /* space for cdt links */
- char *nvname; /* pointer to name of the node */
- unsigned short nvflag; /* attributes */
- unsigned short nvsize; /* size or base */
-#ifdef _NV_PRIVATE
- _NV_PRIVATE
-#else
- Namfun_t *nvfun;
- char *nvalue;
- char *nvprivate;
-#endif /* _NV_PRIVATE */
-};
-
-#define NV_CLASS ".sh.type"
-#define NV_DATA "_" /* special class or instance variable */
-#define NV_MINSZ (sizeof(struct Namval)-sizeof(Dtlink_t)-sizeof(char*))
-#define nv_namptr(p,n) ((Namval_t*)((char*)(p)+(n)*NV_MINSZ-sizeof(Dtlink_t)))
-
-/* The following attributes are for internal use */
-#define NV_NOFREE 0x200 /* don't free the space when releasing value */
-#define NV_ARRAY 0x400 /* node is an array */
-#define NV_REF 0x4000 /* reference bit */
-#define NV_TABLE 0x800 /* node is a dictionary table */
-#define NV_IMPORT 0x1000 /* value imported from environment */
-#define NV_MINIMAL NV_IMPORT /* node does not contain all fields */
-
-#define NV_INTEGER 0x2 /* integer attribute */
-/* The following attributes are valid only when NV_INTEGER is off */
-#define NV_LTOU 0x4 /* convert to uppercase */
-#define NV_UTOL 0x8 /* convert to lowercase */
-#define NV_ZFILL 0x10 /* right justify and fill with leading zeros */
-#define NV_RJUST 0x20 /* right justify and blank fill */
-#define NV_LJUST 0x40 /* left justify and blank fill */
-#define NV_BINARY 0x100 /* fixed size data buffer */
-#define NV_RAW NV_LJUST /* used only with NV_BINARY */
-#define NV_HOST (NV_RJUST|NV_LJUST) /* map to host filename */
-
-/* The following attributes do not effect the value */
-#define NV_RDONLY 0x1 /* readonly bit */
-#define NV_EXPORT 0x2000 /* export bit */
-#define NV_TAGGED 0x8000 /* user define tag bit */
-
-/* The following are used with NV_INTEGER */
-#define NV_SHORT (NV_RJUST) /* when integers are not long */
-#define NV_LONG (NV_UTOL) /* for long long and long double */
-#define NV_UNSIGN (NV_LTOU) /* for unsigned quantities */
-#define NV_DOUBLE (NV_INTEGER|NV_ZFILL) /* for floating point */
-#define NV_EXPNOTE (NV_LJUST) /* for scientific notation */
-#define NV_HEXFLOAT (NV_LTOU) /* for C99 base16 float notation */
-
-/* options for nv_open */
-
-#define NV_APPEND 0x10000 /* append value */
-#define NV_MOVE 0x8000000 /* for use with nv_clone */
-#define NV_ADD 8
- /* add node if not found */
-#define NV_ASSIGN NV_NOFREE /* assignment is possible */
-#define NV_NOASSIGN 0 /* backward compatibility */
-#define NV_NOARRAY 0x200000 /* array name not possible */
-#define NV_IARRAY 0x400000 /* for indexed array */
-#define NV_NOREF NV_REF /* don't follow reference */
-#define NV_IDENT 0x80 /* name must be identifier */
-#define NV_VARNAME 0x20000 /* name must be ?(.)id*(.id) */
-#define NV_NOADD 0x40000 /* do not add node */
-#define NV_NOSCOPE 0x80000 /* look only in current scope */
-#define NV_NOFAIL 0x100000 /* return 0 on failure, no msg */
-#define NV_NODISC NV_IDENT /* ignore disciplines */
-
-#define NV_FUNCT NV_IDENT /* option for nv_create */
-#define NV_BLTINOPT NV_ZFILL /* mark builtins in libcmd */
-
-#define NV_PUBLIC (~(NV_NOSCOPE|NV_ASSIGN|NV_IDENT|NV_VARNAME|NV_NOADD))
-
-/* numeric types */
-#define NV_INT16P (NV_LJUST|NV_SHORT|NV_INTEGER)
-#define NV_INT16 (NV_SHORT|NV_INTEGER)
-#define NV_UINT16 (NV_UNSIGN|NV_SHORT|NV_INTEGER)
-#define NV_UINT16P (NV_LJUSTNV_UNSIGN|NV_SHORT|NV_INTEGER)
-#define NV_INT32 (NV_INTEGER)
-#define NV_UNT32 (NV_UNSIGN|NV_INTEGER)
-#define NV_INT64 (NV_LONG|NV_INTEGER)
-#define NV_UINT64 (NV_UNSIGN|NV_LONG|NV_INTEGER)
-#define NV_FLOAT (NV_SHORT|NV_DOUBLE)
-#define NV_LDOUBLE (NV_LONG|NV_DOUBLE)
-
-/* name-value pair macros */
-#define nv_isattr(np,f) ((np)->nvflag & (f))
-#define nv_onattr(n,f) ((n)->nvflag |= (f))
-#define nv_offattr(n,f) ((n)->nvflag &= ~(f))
-#define nv_isarray(np) (nv_isattr((np),NV_ARRAY))
-
-/* The following are operations for associative arrays */
-#define NV_AINIT 1 /* initialize */
-#define NV_AFREE 2 /* free array */
-#define NV_ANEXT 3 /* advance to next subscript */
-#define NV_ANAME 4 /* return subscript name */
-#define NV_ADELETE 5 /* delete current subscript */
-#define NV_AADD 6 /* add subscript if not found */
-#define NV_ACURRENT 7 /* return current subscript Namval_t* */
-#define NV_ASETSUB 8 /* set current subscript */
-
-/* The following are for nv_disc */
-#define NV_FIRST 1
-#define NV_LAST 2
-#define NV_POP 3
-#define NV_CLONE 4
-
-/* The following are operations for nv_putsub() */
-#define ARRAY_BITS 22
-#define ARRAY_ADD (1L<<ARRAY_BITS) /* add subscript if not found */
-#define ARRAY_SCAN (2L<<ARRAY_BITS) /* For ${array[@]} */
-#define ARRAY_UNDEF (4L<<ARRAY_BITS) /* For ${array} */
-
-
-/* These are disciplines provided by the library for use with nv_discfun */
-#define NV_DCADD 0 /* used to add named disciplines */
-#define NV_DCRESTRICT 1 /* variable that are restricted in rsh */
-
-#if defined(__EXPORT__) && defined(_DLL)
-# ifdef _BLD_shell
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-# else
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __IMPORT__
-# endif /* _BLD_shell */
-#endif /* _DLL */
-/* prototype for array interface*/
-extern __MANGLE__ Namarr_t *nv_arrayptr __PROTO__((Namval_t*));
-extern __MANGLE__ Namarr_t *nv_setarray __PROTO__((Namval_t*,__V_*(*)(Namval_t*,const char*,int)));
-extern __MANGLE__ int nv_arraynsub __PROTO__((Namarr_t*));
-extern __MANGLE__ __V_ *nv_associative __PROTO__((Namval_t*,const char*,int));
-extern __MANGLE__ int nv_aindex __PROTO__((Namval_t*));
-extern __MANGLE__ int nv_nextsub __PROTO__((Namval_t*));
-extern __MANGLE__ char *nv_getsub __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_putsub __PROTO__((Namval_t*, char*, long));
-extern __MANGLE__ Namval_t *nv_opensub __PROTO__((Namval_t*));
-
-/* name-value pair function prototypes */
-extern __MANGLE__ int nv_adddisc __PROTO__((Namval_t*, const char**, Namval_t**));
-extern __MANGLE__ int nv_clone __PROTO__((Namval_t*, Namval_t*, int));
-extern __MANGLE__ void nv_close __PROTO__((Namval_t*));
-extern __MANGLE__ __V_ *nv_context __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_create __PROTO__((const char*, Dt_t*, int,Namfun_t*));
-extern __MANGLE__ void nv_delete __PROTO__((Namval_t*, Dt_t*, int));
-extern __MANGLE__ Dt_t *nv_dict __PROTO__((Namval_t*));
-extern __MANGLE__ Sfdouble_t nv_getn __PROTO__((Namval_t*, Namfun_t*));
-extern __MANGLE__ Sfdouble_t nv_getnum __PROTO__((Namval_t*));
-extern __MANGLE__ char *nv_getv __PROTO__((Namval_t*, Namfun_t*));
-extern __MANGLE__ char *nv_getval __PROTO__((Namval_t*));
-extern __MANGLE__ Namfun_t *nv_hasdisc __PROTO__((Namval_t*, const Namdisc_t*));
-extern __MANGLE__ int nv_isnull __PROTO__((Namval_t*));
-extern __MANGLE__ Namfun_t *nv_isvtree __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_lastdict __PROTO__((void));
-extern __MANGLE__ Namval_t *nv_mkinttype __PROTO__((char*, size_t, int, const char*, Namdisc_t*));
-extern __MANGLE__ void nv_newattr __PROTO__((Namval_t*,unsigned,int));
-extern __MANGLE__ void nv_newtype __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_open __PROTO__((const char*,Dt_t*,int));
-extern __MANGLE__ void nv_putval __PROTO__((Namval_t*,const char*,int));
-extern __MANGLE__ void nv_putv __PROTO__((Namval_t*,const char*,int,Namfun_t*));
-extern __MANGLE__ int nv_rename __PROTO__((Namval_t*,int));
-extern __MANGLE__ int nv_scan __PROTO__((Dt_t*,void(*)(Namval_t*,__V_*),__V_*,int,int));
-extern __MANGLE__ char *nv_setdisc __PROTO__((Namval_t*,const char*,Namval_t*,Namfun_t*));
-extern __MANGLE__ void nv_setref __PROTO__((Namval_t*, Dt_t*,int));
-extern __MANGLE__ int nv_settype __PROTO__((Namval_t*, Namval_t*, int));
-extern __MANGLE__ void nv_setvec __PROTO__((Namval_t*,int,int,char*[]));
-extern __MANGLE__ void nv_setvtree __PROTO__((Namval_t*));
-extern __MANGLE__ int nv_setsize __PROTO__((Namval_t*,int));
-extern __MANGLE__ Namfun_t *nv_disc __PROTO__((Namval_t*,Namfun_t*,int));
-extern __MANGLE__ void nv_unset __PROTO__((Namval_t*)); /*obsolete */
-extern __MANGLE__ void _nv_unset __PROTO__((Namval_t*,int));
-extern __MANGLE__ Namval_t *nv_search __PROTO__((const char *, Dt_t*, int));
-extern __MANGLE__ char *nv_name __PROTO__((Namval_t*));
-extern __MANGLE__ Namval_t *nv_type __PROTO__((Namval_t*));
-extern __MANGLE__ void nv_addtype __PROTO__((Namval_t*,const char*, Optdisc_t*, size_t));
-extern __MANGLE__ const Namdisc_t *nv_discfun __PROTO__((int));
-
-#ifdef _DLL
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif /* _DLL */
-
-#define nv_unset(np) _nv_unset(np,0)
-#define nv_size(np) nv_setsize((np),-1)
-#define nv_stack(np,nf) nv_disc(np,nf,0)
-
-#if 0
-/*
- * The names of many functions were changed in early '95
- * Here is a mapping to the old names
- */
-# define nv_istype(np) nv_isattr(np)
-# define nv_newtype(np) nv_newattr(np)
-# define nv_namset(np,a,b) nv_open(np,a,b)
-# define nv_free(np) nv_unset(np,0)
-# define nv_settype(np,a,b,c) nv_setdisc(np,a,b,c)
-# define nv_search(np,a,b) nv_open(np,a,((b)?0:NV_NOADD))
-# define settype setdisc
-#endif
-
-#endif /* NV_DEFAULT */
diff --git a/usr/src/lib/libshell/sparcv9/include/ast/shell.h b/usr/src/lib/libshell/sparcv9/include/ast/shell.h
deleted file mode 100644
index a8c1d85c3b..0000000000
--- a/usr/src/lib/libshell/sparcv9/include/ast/shell.h
+++ /dev/null
@@ -1,264 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1982-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* David Korn <dgk@research.att.com> *
-* *
-***********************************************************************/
-
-#ifndef SH_INTERACTIVE
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-/*
- * David Korn
- * AT&T Labs
- *
- * Interface definitions for shell command language
- *
- */
-
-#include <ast.h>
-#include <cdt.h>
-#ifdef _SH_PRIVATE
-# include "name.h"
-#else
-# include <nval.h>
-#endif /* _SH_PRIVATE */
-
-#define SH_VERSION 20071012
-
-#undef NOT_USED
-#define NOT_USED(x) (&x,1)
-
-/* options */
-typedef struct
-{
- unsigned long v[4];
-}
-Shopt_t;
-
-typedef struct Shell_s Shell_t;
-
-typedef void (*Shinit_f) __PROTO__((Shell_t*, int));
-typedef int (*Shwait_f) __PROTO__((int, long, int));
-
-union Shnode_u;
-typedef union Shnode_u Shnode_t;
-
-#define SH_CFLAG 0
-#define SH_HISTORY 1 /* used also as a state */
-#define SH_ERREXIT 2 /* used also as a state */
-#define SH_VERBOSE 3 /* used also as a state */
-#define SH_MONITOR 4 /* used also as a state */
-#define SH_INTERACTIVE 5 /* used also as a state */
-#define SH_RESTRICTED 6
-#define SH_XTRACE 7
-#define SH_KEYWORD 8
-#define SH_NOUNSET 9
-#define SH_NOGLOB 10
-#define SH_ALLEXPORT 11
-#define SH_PFSH 12
-#define SH_IGNOREEOF 13
-#define SH_NOCLOBBER 14
-#define SH_MARKDIRS 15
-#define SH_BGNICE 16
-#define SH_VI 17
-#define SH_VIRAW 18
-#define SH_TFLAG 19
-#define SH_TRACKALL 20
-#define SH_SFLAG 21
-#define SH_NOEXEC 22
-#define SH_GMACS 24
-#define SH_EMACS 25
-#define SH_PRIVILEGED 26
-#define SH_SUBSHARE 27 /* subshell shares state with parent */
-#define SH_NOLOG 28
-#define SH_NOTIFY 29
-#define SH_DICTIONARY 30
-#define SH_PIPEFAIL 32
-#define SH_GLOBSTARS 33
-#define SH_XARGS 34
-#define SH_RC 35
-#define SH_SHOWME 36
-
-/*
- * passed as flags to builtins in Nambltin_t struct when BLT_OPTIM is on
- */
-#define SH_BEGIN_OPTIM 0x1
-#define SH_END_OPTIM 0x2
-
-/* The following type is used for error messages */
-
-/* error messages */
-extern __MANGLE__ const char e_defpath[];
-extern __MANGLE__ const char e_found[];
-extern __MANGLE__ const char e_nospace[];
-extern __MANGLE__ const char e_format[];
-extern __MANGLE__ const char e_number[];
-extern __MANGLE__ const char e_restricted[];
-extern __MANGLE__ const char e_recursive[];
-extern __MANGLE__ char e_version[];
-
-typedef struct sh_scope
-{
- struct sh_scope *par_scope;
- int argc;
- char **argv;
- char *cmdname;
- char *filename;
- char *funname;
- int lineno;
- Dt_t *var_tree;
- struct sh_scope *self;
-} Shscope_t;
-
-/*
- * Saves the state of the shell
- */
-
-struct Shell_s
-{
- Shopt_t options; /* set -o options */
- Dt_t *var_tree; /* for shell variables */
- Dt_t *fun_tree; /* for shell functions */
- Dt_t *alias_tree; /* for alias names */
- Dt_t *bltin_tree; /* for builtin commands */
- Shscope_t *topscope; /* pointer to top-level scope */
- int inlineno; /* line number of current input file */
- int exitval; /* most recent exit value */
- unsigned char trapnote; /* set when trap/signal is pending */
- char shcomp; /* set when runing shcomp */
- short subshell; /* set for virtual subshell */
-#ifdef _SH_PRIVATE
- _SH_PRIVATE
-#endif /* _SH_PRIVATE */
-};
-
-/* flags for sh_parse */
-#define SH_NL 1 /* Treat new-lines as ; */
-#define SH_EOF 2 /* EOF causes syntax error */
-
-/* symbolic values for sh_iogetiop */
-#define SH_IOCOPROCESS (-2)
-#define SH_IOHISTFILE (-3)
-
-#include <cmd.h>
-
-/* symbolic value for sh_fdnotify */
-#define SH_FDCLOSE (-1)
-
-#undef getenv /* -lshell provides its own */
-
-#if defined(__EXPORT__) && defined(_DLL)
-# ifdef _BLD_shell
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__ __EXPORT__
-# endif /* _BLD_shell */
-#endif /* _DLL */
-
-extern __MANGLE__ Dt_t *sh_bltin_tree __PROTO__((void));
-extern __MANGLE__ void sh_subfork __PROTO__((void));
-extern __MANGLE__ Shell_t *sh_init __PROTO__((int,char*[],Shinit_f));
-extern __MANGLE__ int sh_reinit __PROTO__((char*[]));
-extern __MANGLE__ int sh_eval __PROTO__((Sfio_t*,int));
-extern __MANGLE__ void sh_delay __PROTO__((double));
-extern __MANGLE__ __V_ *sh_parse __PROTO__((Shell_t*, Sfio_t*,int));
-extern __MANGLE__ int sh_trap __PROTO__((const char*,int));
-extern __MANGLE__ int sh_fun __PROTO__((Namval_t*,Namval_t*, char*[]));
-extern __MANGLE__ int sh_funscope __PROTO__((int,char*[],int(*)(__V_*),__V_*,int));
-extern __MANGLE__ Sfio_t *sh_iogetiop __PROTO__((int,int));
-extern __MANGLE__ int sh_main __PROTO__((int, char*[], Shinit_f));
-extern __MANGLE__ int sh_run __PROTO__((int, char*[]));
-extern __MANGLE__ void sh_menu __PROTO__((Sfio_t*, int, char*[]));
-extern __MANGLE__ Namval_t *sh_addbuiltin __PROTO__((const char*, int(*)(int, char*[],__V_*), __V_*));
-extern __MANGLE__ char *sh_fmtq __PROTO__((const char*));
-extern __MANGLE__ char *sh_fmtqf __PROTO__((const char*, int, int));
-extern __MANGLE__ Sfdouble_t sh_strnum __PROTO__((const char*, char**, int));
-extern __MANGLE__ int sh_access __PROTO__((const char*,int));
-extern __MANGLE__ int sh_close __PROTO__((int));
-extern __MANGLE__ int sh_dup __PROTO__((int));
-extern __MANGLE__ void sh_exit __PROTO__((int));
-extern __MANGLE__ int sh_fcntl __PROTO__((int, int, ...));
-extern __MANGLE__ Sfio_t *sh_fd2sfio __PROTO__((int));
-extern __MANGLE__ int (*sh_fdnotify __PROTO__((int(*)(int,int)))) __PROTO__((int,int));
-extern __MANGLE__ Shell_t *sh_getinterp __PROTO__((void));
-extern __MANGLE__ int sh_open __PROTO__((const char*, int, ...));
-extern __MANGLE__ int sh_openmax __PROTO__((void));
-extern __MANGLE__ Sfio_t *sh_pathopen __PROTO__((const char*));
-extern __MANGLE__ ssize_t sh_read __PROTO__((int, __V_*, size_t));
-extern __MANGLE__ ssize_t sh_write __PROTO__((int, const __V_*, size_t));
-extern __MANGLE__ off_t sh_seek __PROTO__((int, off_t, int));
-extern __MANGLE__ int sh_pipe __PROTO__((int[]));
-extern __MANGLE__ mode_t sh_umask __PROTO__((mode_t));
-extern __MANGLE__ __V_ *sh_waitnotify __PROTO__((Shwait_f));
-extern __MANGLE__ Shscope_t *sh_getscope __PROTO__((int,int));
-extern __MANGLE__ Shscope_t *sh_setscope __PROTO__((Shscope_t*));
-extern __MANGLE__ void sh_sigcheck __PROTO__((void));
-extern __MANGLE__ unsigned long sh_isoption __PROTO__((int));
-extern __MANGLE__ unsigned long sh_onoption __PROTO__((int));
-extern __MANGLE__ unsigned long sh_offoption __PROTO__((int));
-extern __MANGLE__ int sh_waitsafe __PROTO__((void));
-extern __MANGLE__ int sh_exec __PROTO__((const Shnode_t*,int));
-
-#if SHOPT_DYNAMIC
- extern __MANGLE__ __V_ **sh_getliblist __PROTO__((void));
-#endif /* SHOPT_DYNAMIC */
-
-/*
- * direct access to sh is obsolete, use sh_getinterp() instead
- */
-#if !defined(_SH_PRIVATE) && defined(__IMPORT__) && !defined(_BLD_shell)
- extern __MANGLE__ __IMPORT__ Shell_t sh;
-#else
- extern __MANGLE__ Shell_t sh;
-#endif
-
-#ifdef _DLL
-#undef __MANGLE__
-#define __MANGLE__ __LINKAGE__
-#endif /* _DLL */
-
-#ifndef _SH_PRIVATE
-# define access(a,b) sh_access(a,b)
-# define close(a) sh_close(a)
-# define exit(a) sh_exit(a)
-# define fcntl(a,b,c) sh_fcntl(a,b,c)
-# define pipe(a) sh_pipe(a)
-# define read(a,b,c) sh_read(a,b,c)
-# define write(a,b,c) sh_write(a,b,c)
-# define umask(a) sh_umask(a)
-# define dup sh_dup
-# if _lib_lseek64
-# define open64 sh_open
-# define lseek64 sh_seek
-# else
-# define open sh_open
-# define lseek sh_seek
-# endif
-#endif /* !_SH_PRIVATE */
-
-#define SH_SIGSET 4
-#define SH_EXITSIG 0400 /* signal exit bit */
-#define SH_EXITMASK (SH_EXITSIG-1) /* normal exit status bits */
-#define SH_RUNPROG -1022 /* needs to be negative and < 256 */
-
-#endif /* SH_INTERACTIVE */
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct
deleted file mode 100644
index 41a73df04b..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/acct
+++ /dev/null
@@ -1,13 +0,0 @@
-/* : : 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_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_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) */
-#define _sys_acct 1 /* #include <sys/acct.h> ok */
-#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds
deleted file mode 100644
index 1b049f5eb2..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/cmds
+++ /dev/null
@@ -1,37 +0,0 @@
-/* : : 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_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_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) */
-#define _bin_newgrp 1 /* /bin/newgrp found */
-#define _usr_bin_newgrp 1 /* /usr/bin/newgrp found */
-#define _cmd_test 1 /* test in ?(/usr)/(bin|etc|ucb) */
-#define _bin_test 1 /* /bin/test found */
-#define _usr_bin_test 1 /* /usr/bin/test found */
-#define _usr_ucb_test 1 /* /usr/ucb/test found */
-#define _cmd_id 1 /* id in ?(/usr)/(bin|etc|ucb) */
-#define _bin_id 1 /* /bin/id found */
-#define _usr_bin_id 1 /* /usr/bin/id found */
-#define _cmd_wc 1 /* wc in ?(/usr)/(bin|etc|ucb) */
-#define _bin_wc 1 /* /bin/wc found */
-#define _usr_bin_wc 1 /* /usr/bin/wc found */
-#define _usr_ucb_wc 1 /* /usr/ucb/wc found */
-#define _cmd_cut 1 /* cut in ?(/usr)/(bin|etc|ucb) */
-#define _bin_cut 1 /* /bin/cut found */
-#define _usr_bin_cut 1 /* /usr/bin/cut found */
-#define _cmd_logname 1 /* logname in ?(/usr)/(bin|etc|ucb) */
-#define _bin_logname 1 /* /bin/logname found */
-#define _usr_bin_logname 1 /* /usr/bin/logname found */
-#define _cmd_pfexec 1 /* pfexec in ?(/usr)/(bin|etc|ucb) */
-#define _bin_pfexec 1 /* /bin/pfexec found */
-#define _usr_bin_pfexec 1 /* /usr/bin/pfexec found */
-#define _cmd_tput 1 /* tput in ?(/usr)/(bin|etc|ucb) */
-#define _bin_tput 1 /* /bin/tput found */
-#define _usr_bin_tput 1 /* /usr/bin/tput found */
-#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic
deleted file mode 100644
index e58ac233c1..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/dynamic
+++ /dev/null
@@ -1,22 +0,0 @@
-/* : : 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_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_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
-#include <dlldefs.h>
-#endif
-#if !defined(SHOPT_FS_3D) && SHOPT_DYNAMIC
-# define SHOPT_FS_3D 1
-#endif /* !SHOPT_FS_3D */
-#if SHOPT_FS_3D
-# undef mount
-# include <fs3d.h>
-#endif /* SHOPT_FS_3D */
-
-#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs
deleted file mode 100644
index bbb4e0ab1e..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/execargs
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : 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_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_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/math b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math
deleted file mode 100644
index 79b497ce1f..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/math
+++ /dev/null
@@ -1,183 +0,0 @@
-
-/* : : generated by proto : : */
-/* : : 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)
-# if defined(__cplusplus)
-# define __LINKAGE__ "C"
-# else
-# define __LINKAGE__
-# endif
-# define __STDARG__
-# define __PROTO__(x) x
-# define __OTORP__(x)
-# define __PARAM__(n,o) n
-# if !defined(__STDC__) && !defined(__cplusplus)
-# if !defined(c_plusplus)
-# define const
-# endif
-# define signed
-# define void int
-# define volatile
-# define __V_ char
-# else
-# define __V_ void
-# endif
-# else
-# define __PROTO__(x) ()
-# define __OTORP__(x) x
-# define __PARAM__(n,o) o
-# define __LINKAGE__
-# define __V_ char
-# define const
-# define signed
-# define void int
-# define volatile
-# endif
-# define __MANGLE__ __LINKAGE__
-# if defined(__cplusplus) || defined(c_plusplus)
-# define __VARARG__ ...
-# else
-# define __VARARG__
-# endif
-# if defined(__STDARG__)
-# define __VA_START__(p,a) va_start(p,a)
-# else
-# define __VA_START__(p,a) va_start(p)
-# endif
-# if !defined(__INLINE__)
-# if defined(__cplusplus)
-# define __INLINE__ extern __MANGLE__ inline
-# else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define __INLINE__ __inline
-# endif
-# endif
-# endif
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _def_math_ksh93 1
-#define _sys_types 1 /* #include <sys/types.h> ok */
-#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_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_20100309/build_sparc_64bit/src/cmd/ksh93/data/math.tab : : */
-
-typedef Sfdouble_t (*Math_f) __PROTO__((Sfdouble_t,...));
-
-#include <ast_standards.h>
-#include <math.h>
-#include <ieeefp.h>
-
-static Sfdouble_t local_finite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return finite(a1);}
-static int local_fpclassify __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return fpclassify(a1);}
-static int local_isfinite __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isfinite(a1);}
-static int local_isgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreater(a1,a2);}
-static int local_isgreaterequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isgreaterequal(a1,a2);}
-static int local_isinf __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isinf(a1);}
-static int local_isless __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isless(a1,a2);}
-static int local_islessequal __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessequal(a1,a2);}
-static int local_islessgreater __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return islessgreater(a1,a2);}
-static int local_isnormal __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return isnormal(a1);}
-#ifdef FP_SUBNORMAL
-static int local_issubnormal __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_SUBNORMAL; }
-#endif
-static int local_isunordered __PARAM__((Sfdouble_t a1,Sfdouble_t a2), (a1, a2)) __OTORP__(Sfdouble_t a1;Sfdouble_t a2;){return isunordered(a1,a2);}
-#ifdef FP_ZERO
-static int local_iszero __PARAM__((Sfdouble_t x), (x)) __OTORP__(Sfdouble_t x;){ return fpclassify(x) == FP_ZERO; }
-#endif
-static int local_signbit __PARAM__((Sfdouble_t a1), (a1)) __OTORP__(Sfdouble_t a1;){return signbit(a1);}
-
-/*
- * first byte is two-digit octal number. Last digit is number of args
- * first digit is 0 if return value is double, 1 for integer
- */
-const struct mathtab shtab_math[] =
-{
- "\001acos", (Math_f)acosl,
- "\001acosh", (Math_f)acoshl,
- "\001asin", (Math_f)asinl,
- "\001asinh", (Math_f)asinhl,
- "\001atan", (Math_f)atanl,
- "\002atan2", (Math_f)atan2l,
- "\001atanh", (Math_f)atanhl,
- "\001cbrt", (Math_f)cbrtl,
- "\001ceil", (Math_f)ceill,
- "\002copysign", (Math_f)copysignl,
- "\001cos", (Math_f)cosl,
- "\001cosh", (Math_f)coshl,
- "\001erf", (Math_f)erfl,
- "\001erfc", (Math_f)erfcl,
- "\001exp", (Math_f)expl,
- "\001exp2", (Math_f)exp2l,
- "\001expm1", (Math_f)expm1l,
- "\001fabs", (Math_f)fabsl,
- "\001abs", (Math_f)fabsl,
- "\002fdim", (Math_f)fdiml,
- "\001finite", (Math_f)local_finite,
- "\001floor", (Math_f)floorl,
- "\001int", (Math_f)floorl,
- "\003fma", (Math_f)fmal,
- "\002fmax", (Math_f)fmaxl,
- "\002fmin", (Math_f)fminl,
- "\002fmod", (Math_f)fmodl,
- "\011fpclassify", (Math_f)local_fpclassify,
- "\002hypot", (Math_f)hypotl,
- "\011ilogb", (Math_f)ilogbl,
- "\011isfinite", (Math_f)local_isfinite,
- "\012isgreater", (Math_f)local_isgreater,
- "\012isgreaterequal", (Math_f)local_isgreaterequal,
- "\011isinf", (Math_f)local_isinf,
- "\012isless", (Math_f)local_isless,
- "\012islessequal", (Math_f)local_islessequal,
- "\012islessgreater", (Math_f)local_islessgreater,
- "\011isnan", (Math_f)isnanl,
- "\011isnormal", (Math_f)local_isnormal,
-#ifdef FP_SUBNORMAL
- "\011issubnormal", (Math_f)local_issubnormal,
-#endif
- "\012isunordered", (Math_f)local_isunordered,
-#ifdef FP_ZERO
- "\011iszero", (Math_f)local_iszero,
-#endif
- "\001j0", (Math_f)j0l,
- "\001j1", (Math_f)j1l,
- "\002jn", (Math_f)jnl,
- "\001lgamma", (Math_f)lgammal,
- "\001log", (Math_f)logl,
- "\001log10", (Math_f)log10l,
- "\001log1p", (Math_f)log1pl,
- "\001log2", (Math_f)log2l,
- "\001logb", (Math_f)logbl,
- "\001nearbyint", (Math_f)nearbyintl,
- "\002nextafter", (Math_f)nextafterl,
- "\002nexttoward", (Math_f)nexttowardl,
- "\002pow", (Math_f)powl,
- "\002remainder", (Math_f)remainderl,
- "\001rint", (Math_f)rintl,
- "\001round", (Math_f)roundl,
- "\002scalb", (Math_f)scalbl,
- "\002scalbn", (Math_f)scalbnl,
- "\011signbit", (Math_f)local_signbit,
- "\001sin", (Math_f)sinl,
- "\001sinh", (Math_f)sinhl,
- "\001sqrt", (Math_f)sqrtl,
- "\001tan", (Math_f)tanl,
- "\001tanh", (Math_f)tanhl,
- "\001tgamma", (Math_f)tgammal,
- "\001trunc", (Math_f)truncl,
- "\001y0", (Math_f)y0l,
- "\001y1", (Math_f)y1l,
- "\002yn", (Math_f)ynl,
- "", (Math_f)0
-};
-#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options
deleted file mode 100644
index d5d031e0ec..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/options
+++ /dev/null
@@ -1,25 +0,0 @@
-/* : : 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_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_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
-#ifndef SHOPT_DEVFD
-# define SHOPT_DEVFD 1
-#endif
-#undef SHOPT_PFSH
-#undef SHOPT_TEST_L
-#ifndef SHOPT_SYSRC
-# define SHOPT_SYSRC 1
-#endif
-#undef SHOPT_UCB
-#if !_PACKAGE_ast && ( (MB_LEN_MAX-1)<=0 || !defined(_lib_mbtowc) )
-# undef SHOPT_MULTIBYTE
-#endif
-
-#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat
deleted file mode 100644
index d5872dfca9..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/pstat
+++ /dev/null
@@ -1,11 +0,0 @@
-/* : : 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_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_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
deleted file mode 100644
index 3fd7e9715a..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/rlimits
+++ /dev/null
@@ -1,20 +0,0 @@
-/* : : 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_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_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 */
-#define _lib_getrlimit 1 /* getrlimit() in default lib(s) */
-#define _lib_ulimit 1 /* ulimit() in default lib(s) */
-#define _hdr_time 1 /* #include <time.h> ok */
-#define _sys_time 1 /* #include <sys/time.h> ok */
-#define _sys_times 1 /* #include <sys/times.h> ok */
-#define _hdr_stddef 1 /* #include <stddef.h> ok */
-#define _hdr_stdlib 1 /* #include <stdlib.h> ok */
-#define _typ_rlim_t 1 /* rlim_t is a type */
-#endif
diff --git a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys b/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys
deleted file mode 100644
index a5da4d7141..0000000000
--- a/usr/src/lib/libshell/sparcv9/src/cmd/ksh93/FEATURE/ttys
+++ /dev/null
@@ -1,20 +0,0 @@
-/* : : 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_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_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 */
-#define _hdr_termio 1 /* #include <termio.h> ok */
-#define _hdr_sgtty 1 /* #include <sgtty.h> ok */
-#define _sys_termios 1 /* #include <sys/termios.h> ok */
-#define _sys_termio 1 /* #include <sys/termio.h> ok */
-#define _sys_ioctl 1 /* #include <sys/ioctl.h> ok */
-#define _sys_filio 1 /* #include <sys/filio.h> ok */
-#define _lib_tcgetattr 1 /* tcgetattr() in default lib(s) */
-#define _lib_tcgetpgrp 1 /* tcgetpgrp() in default lib(s) */
-#endif
diff --git a/usr/src/lib/libsum/THIRDPARTYLICENSE b/usr/src/lib/libsum/THIRDPARTYLICENSE
deleted file mode 100644
index 50c6364c06..0000000000
--- a/usr/src/lib/libsum/THIRDPARTYLICENSE
+++ /dev/null
@@ -1,245 +0,0 @@
-+------------------------------------------------------------------------------+
-| This license covers all software that refers to the URL |
-| http://www.opensource.org/licenses/cpl1.0.txt |
-+------------------------------------------------------------------------------+
-
-Common Public License Version 1.0
-
- THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON
- PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
- THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
- 1. DEFINITIONS
-
- "Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and
- documentation distributed under this Agreement, and
-
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from
- and are distributed by that particular Contributor. A Contribution
- 'originates' from a Contributor if it was added to the Program by
- such Contributor itself or anyone acting on such Contributor's
- behalf. Contributions do not include additions to the Program
- which: (i) are separate modules of software distributed in
- conjunction with the Program under their own license agreement, and
- (ii) are not derivative works of the Program.
-
- "Contributor" means any person or entity that distributes the Program.
-
- "Licensed Patents " mean patent claims licensable by a Contributor
- which are necessarily infringed by the use or sale of its Contribution
- alone or when combined with the Program.
-
- "Program" means the Contributions distributed in accordance with this
- Agreement.
-
- "Recipient" means anyone who receives the Program under this
- Agreement, including all Contributors.
-
- 2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free copyright
- license to reproduce, prepare derivative works of, publicly
- display, publicly perform, distribute and sublicense the
- Contribution of such Contributor, if any, and such derivative
- works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby
- grants Recipient a non-exclusive, worldwide, royalty-free patent
- license under Licensed Patents to make, use, sell, offer to sell,
- import and otherwise transfer the Contribution of such Contributor,
- if any, in source code and object code form. This patent license
- shall apply to the combination of the Contribution and the Program
- if, at the time the Contribution is added by the Contributor, such
- addition of the Contribution causes such combination to be covered
- by the Licensed Patents. The patent license shall not apply to any
- other combinations which include the Contribution. No hardware per
- se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the
- licenses to its Contributions set forth herein, no assurances are
- provided by any Contributor that the Program does not infringe the
- patent or other intellectual property rights of any other entity.
- Each Contributor disclaims any liability to Recipient for claims
- brought by any other entity based on infringement of intellectual
- property rights or otherwise. As a condition to exercising the
- rights and licenses granted hereunder, each Recipient hereby
- assumes sole responsibility to secure any other intellectual
- property rights needed, if any. For example, if a third party
- patent license is required to allow Recipient to distribute the
- Program, it is Recipient's responsibility to acquire that license
- before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has
- sufficient copyright rights in its Contribution, if any, to grant
- the copyright license set forth in this Agreement.
-
- 3. REQUIREMENTS
-
- A Contributor may choose to distribute the Program in object code form
- under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all
- warranties and conditions, express and implied, including
- warranties or conditions of title and non-infringement, and implied
- warranties or conditions of merchantability and fitness for a
- particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all
- liability for damages, including direct, indirect, special,
- incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement
- are offered by that Contributor alone and not by any other party;
- and
-
- iv) states that source code for the Program is available from such
- Contributor, and informs licensees how to obtain it in a reasonable
- manner on or through a medium customarily used for software
- exchange.
-
- When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the
- Program.
-
- Contributors may not remove or alter any copyright notices contained
- within the Program.
-
- Each Contributor must identify itself as the originator of its
- Contribution, if any, in a manner that reasonably allows subsequent
- Recipients to identify the originator of the Contribution.
-
- 4. COMMERCIAL DISTRIBUTION
-
- Commercial distributors of software may accept certain
- responsibilities with respect to end users, business partners and the
- like. While this license is intended to facilitate the commercial use
- of the Program, the Contributor who includes the Program in a
- commercial product offering should do so in a manner which does not
- create potential liability for other Contributors. Therefore, if a
- Contributor includes the Program in a commercial product offering,
- such Contributor ("Commercial Contributor") hereby agrees to defend
- and indemnify every other Contributor ("Indemnified Contributor")
- against any losses, damages and costs (collectively "Losses") arising
- from claims, lawsuits and other legal actions brought by a third party
- against the Indemnified Contributor to the extent caused by the acts
- or omissions of such Commercial Contributor in connection with its
- distribution of the Program in a commercial product offering. The
- obligations in this section do not apply to any claims or Losses
- relating to any actual or alleged intellectual property infringement.
- In order to qualify, an Indemnified Contributor must: a) promptly
- notify the Commercial Contributor in writing of such claim, and b)
- allow the Commercial Contributor to control, and cooperate with the
- Commercial Contributor in, the defense and any related settlement
- negotiations. The Indemnified Contributor may participate in any such
- claim at its own expense.
-
- For example, a Contributor might include the Program in a commercial
- product offering, Product X. That Contributor is then a Commercial
- Contributor. If that Commercial Contributor then makes performance
- claims, or offers warranties related to Product X, those performance
- claims and warranties are such Commercial Contributor's responsibility
- alone. Under this section, the Commercial Contributor would have to
- defend claims against the other Contributors related to those
- performance claims and warranties, and if a court requires any other
- Contributor to pay any damages as a result, the Commercial Contributor
- must pay those damages.
-
- 5. NO WARRANTY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
- PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
- WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
- OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
- responsible for determining the appropriateness of using and
- distributing the Program and assumes all risks associated with its
- exercise of rights under this Agreement, including but not limited to
- the risks and costs of program errors, compliance with applicable
- laws, damage to or loss of data, programs or equipment, and
- unavailability or interruption of operations.
-
- 6. DISCLAIMER OF LIABILITY
-
- EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
- ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
- WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
- DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
- HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 7. GENERAL
-
- If any provision of this Agreement is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability of
- the remainder of the terms of this Agreement, and without further
- action by the parties hereto, such provision shall be reformed to the
- minimum extent necessary to make such provision valid and enforceable.
-
- If Recipient institutes patent litigation against a Contributor with
- respect to a patent applicable to software (including a cross-claim or
- counterclaim in a lawsuit), then any patent licenses granted by that
- Contributor to such Recipient under this Agreement shall terminate as
- of the date such litigation is filed. In addition, if Recipient
- institutes patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Program
- itself (excluding combinations of the Program with other software or
- hardware) infringes such Recipient's patent(s), then such Recipient's
- rights granted under Section 2(b) shall terminate as of the date such
- litigation is filed.
-
- All Recipient's rights under this Agreement shall terminate if it
- fails to comply with any of the material terms or conditions of this
- Agreement and does not cure such failure in a reasonable period of
- time after becoming aware of such noncompliance. If all Recipient's
- rights under this Agreement terminate, Recipient agrees to cease use
- and distribution of the Program as soon as reasonably practicable.
- However, Recipient's obligations under this Agreement and any licenses
- granted by Recipient relating to the Program shall continue and
- survive.
-
- Everyone is permitted to copy and distribute copies of this Agreement,
- but in order to avoid inconsistency the Agreement is copyrighted and
- may only be modified in the following manner. The Agreement Steward
- reserves the right to publish new versions (including revisions) of
- this Agreement from time to time. No one other than the Agreement
- Steward has the right to modify this Agreement. IBM is the initial
- Agreement Steward. IBM may assign the responsibility to serve as the
- Agreement Steward to a suitable separate entity. Each new version of
- the Agreement will be given a distinguishing version number. The
- Program (including Contributions) may always be distributed subject to
- the version of the Agreement under which it was received. In addition,
- after a new version of the Agreement is published, Contributor may
- elect to distribute the Program (including its Contributions) under
- the new version. Except as expressly stated in Sections 2(a) and 2(b)
- above, Recipient receives no rights or licenses to the intellectual
- property of any Contributor under this Agreement, whether expressly,
- by implication, estoppel or otherwise. All rights in the Program not
- expressly granted under this Agreement are reserved.
-
- This Agreement is governed by the laws of the State of New York and
- the intellectual property laws of the United States of America. No
- party to this Agreement will bring a legal action under this Agreement
- more than one year after the cause of action arose. Each party waives
- its rights to a jury trial in any resulting litigation.
-
-Copyright (c) 2004 by the Open Source Initiative
-This is a copy of the license posted on 2004-10-06 at:
- http://www.opensource.org/licenses/cpl
diff --git a/usr/src/lib/libsum/THIRDPARTYLICENSE.descrip b/usr/src/lib/libsum/THIRDPARTYLICENSE.descrip
deleted file mode 100644
index ce5312f88b..0000000000
--- a/usr/src/lib/libsum/THIRDPARTYLICENSE.descrip
+++ /dev/null
@@ -1 +0,0 @@
-AT&T ADVANCED SOFTWARE TECHNOLOGY CHECKSUM LIBRARY (LIBSUM)
diff --git a/usr/src/lib/libsum/amd64/include/ast/sum.h b/usr/src/lib/libsum/amd64/include/ast/sum.h
deleted file mode 100644
index f82fee47d6..0000000000
--- a/usr/src/lib/libsum/amd64/include/ast/sum.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * checksum library interface
- */
-
-#ifndef _SUM_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SUM_H
-
-#include <ast.h>
-
-#define SUM_SIZE (1<<0) /* print size too */
-#define SUM_SCALE (1<<1) /* traditional size scale */
-#define SUM_TOTAL (1<<2) /* print totals since sumopen */
-#define SUM_LEGACY (1<<3) /* legacy field widths */
-
-#define _SUM_PUBLIC_ const char* name;
-
-typedef struct Sumdata_s
-{
- uint32_t size;
- uint32_t num;
- __V_* buf;
-} Sumdata_t;
-
-typedef struct Sum_s
-{
- _SUM_PUBLIC_
-#ifdef _SUM_PRIVATE_
- _SUM_PRIVATE_
-#endif
-} Sum_t;
-
-extern __MANGLE__ Sum_t* sumopen __PROTO__((const char*));
-extern __MANGLE__ int suminit __PROTO__((Sum_t*));
-extern __MANGLE__ int sumblock __PROTO__((Sum_t*, const __V_*, size_t));
-extern __MANGLE__ int sumdone __PROTO__((Sum_t*));
-extern __MANGLE__ int sumdata __PROTO__((Sum_t*, Sumdata_t*));
-extern __MANGLE__ int sumprint __PROTO__((Sum_t*, Sfio_t*, int, size_t));
-extern __MANGLE__ int sumusage __PROTO__((Sfio_t*));
-extern __MANGLE__ int sumclose __PROTO__((Sum_t*));
-
-#endif
diff --git a/usr/src/lib/libsum/i386/include/ast/sum.h b/usr/src/lib/libsum/i386/include/ast/sum.h
deleted file mode 100644
index f82fee47d6..0000000000
--- a/usr/src/lib/libsum/i386/include/ast/sum.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * checksum library interface
- */
-
-#ifndef _SUM_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SUM_H
-
-#include <ast.h>
-
-#define SUM_SIZE (1<<0) /* print size too */
-#define SUM_SCALE (1<<1) /* traditional size scale */
-#define SUM_TOTAL (1<<2) /* print totals since sumopen */
-#define SUM_LEGACY (1<<3) /* legacy field widths */
-
-#define _SUM_PUBLIC_ const char* name;
-
-typedef struct Sumdata_s
-{
- uint32_t size;
- uint32_t num;
- __V_* buf;
-} Sumdata_t;
-
-typedef struct Sum_s
-{
- _SUM_PUBLIC_
-#ifdef _SUM_PRIVATE_
- _SUM_PRIVATE_
-#endif
-} Sum_t;
-
-extern __MANGLE__ Sum_t* sumopen __PROTO__((const char*));
-extern __MANGLE__ int suminit __PROTO__((Sum_t*));
-extern __MANGLE__ int sumblock __PROTO__((Sum_t*, const __V_*, size_t));
-extern __MANGLE__ int sumdone __PROTO__((Sum_t*));
-extern __MANGLE__ int sumdata __PROTO__((Sum_t*, Sumdata_t*));
-extern __MANGLE__ int sumprint __PROTO__((Sum_t*, Sfio_t*, int, size_t));
-extern __MANGLE__ int sumusage __PROTO__((Sfio_t*));
-extern __MANGLE__ int sumclose __PROTO__((Sum_t*));
-
-#endif
diff --git a/usr/src/lib/libsum/sparc/include/ast/sum.h b/usr/src/lib/libsum/sparc/include/ast/sum.h
deleted file mode 100644
index f82fee47d6..0000000000
--- a/usr/src/lib/libsum/sparc/include/ast/sum.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * checksum library interface
- */
-
-#ifndef _SUM_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SUM_H
-
-#include <ast.h>
-
-#define SUM_SIZE (1<<0) /* print size too */
-#define SUM_SCALE (1<<1) /* traditional size scale */
-#define SUM_TOTAL (1<<2) /* print totals since sumopen */
-#define SUM_LEGACY (1<<3) /* legacy field widths */
-
-#define _SUM_PUBLIC_ const char* name;
-
-typedef struct Sumdata_s
-{
- uint32_t size;
- uint32_t num;
- __V_* buf;
-} Sumdata_t;
-
-typedef struct Sum_s
-{
- _SUM_PUBLIC_
-#ifdef _SUM_PRIVATE_
- _SUM_PRIVATE_
-#endif
-} Sum_t;
-
-extern __MANGLE__ Sum_t* sumopen __PROTO__((const char*));
-extern __MANGLE__ int suminit __PROTO__((Sum_t*));
-extern __MANGLE__ int sumblock __PROTO__((Sum_t*, const __V_*, size_t));
-extern __MANGLE__ int sumdone __PROTO__((Sum_t*));
-extern __MANGLE__ int sumdata __PROTO__((Sum_t*, Sumdata_t*));
-extern __MANGLE__ int sumprint __PROTO__((Sum_t*, Sfio_t*, int, size_t));
-extern __MANGLE__ int sumusage __PROTO__((Sfio_t*));
-extern __MANGLE__ int sumclose __PROTO__((Sum_t*));
-
-#endif
diff --git a/usr/src/lib/libsum/sparcv9/include/ast/sum.h b/usr/src/lib/libsum/sparcv9/include/ast/sum.h
deleted file mode 100644
index f82fee47d6..0000000000
--- a/usr/src/lib/libsum/sparcv9/include/ast/sum.h
+++ /dev/null
@@ -1,74 +0,0 @@
-
-/* : : generated by proto : : */
-/***********************************************************************
-* *
-* This software is part of the ast package *
-* Copyright (c) 1996-2010 AT&T Intellectual Property *
-* and is licensed under the *
-* Common Public License, Version 1.0 *
-* by AT&T Intellectual Property *
-* *
-* A copy of the License is available at *
-* http://www.opensource.org/licenses/cpl1.0.txt *
-* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
-* *
-* Information and Software Systems Research *
-* AT&T Research *
-* Florham Park NJ *
-* *
-* Glenn Fowler <gsf@research.att.com> *
-* *
-***********************************************************************/
-
-
-/*
- * Glenn Fowler
- * AT&T Research
- *
- * checksum library interface
- */
-
-#ifndef _SUM_H
-#if !defined(__PROTO__)
-#include <prototyped.h>
-#endif
-#if !defined(__LINKAGE__)
-#define __LINKAGE__ /* 2004-08-11 transition */
-#endif
-
-#define _SUM_H
-
-#include <ast.h>
-
-#define SUM_SIZE (1<<0) /* print size too */
-#define SUM_SCALE (1<<1) /* traditional size scale */
-#define SUM_TOTAL (1<<2) /* print totals since sumopen */
-#define SUM_LEGACY (1<<3) /* legacy field widths */
-
-#define _SUM_PUBLIC_ const char* name;
-
-typedef struct Sumdata_s
-{
- uint32_t size;
- uint32_t num;
- __V_* buf;
-} Sumdata_t;
-
-typedef struct Sum_s
-{
- _SUM_PUBLIC_
-#ifdef _SUM_PRIVATE_
- _SUM_PRIVATE_
-#endif
-} Sum_t;
-
-extern __MANGLE__ Sum_t* sumopen __PROTO__((const char*));
-extern __MANGLE__ int suminit __PROTO__((Sum_t*));
-extern __MANGLE__ int sumblock __PROTO__((Sum_t*, const __V_*, size_t));
-extern __MANGLE__ int sumdone __PROTO__((Sum_t*));
-extern __MANGLE__ int sumdata __PROTO__((Sum_t*, Sumdata_t*));
-extern __MANGLE__ int sumprint __PROTO__((Sum_t*, Sfio_t*, int, size_t));
-extern __MANGLE__ int sumusage __PROTO__((Sfio_t*));
-extern __MANGLE__ int sumclose __PROTO__((Sum_t*));
-
-#endif
diff --git a/usr/src/man/man1/ksh93.1 b/usr/src/man/man1/ksh93.1
index 4c679c0acb..8bf182d3ec 100644
--- a/usr/src/man/man1/ksh93.1
+++ b/usr/src/man/man1/ksh93.1
@@ -1,13 +1,13 @@
'\" te
.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
-.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
+.\" To view license terms, see http://www.eclipse.org/org/documents/epl-v10.html
.\" Portions Copyright (c) 2009, Sun Microsystems, Inc.
-.TH KSH93 1 "Jun 27, 2018"
+.\" Portions Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
+.TH KSH93 1 "Jan 06, 2020"
.SH NAME
ksh93, rksh93 \- Korn Shell, a standard and restricted command and programming
language
.SH SYNOPSIS
-.LP
.nf
\fBksh93\fR [\fB\(+-abcefhikmnoprstuvxBCD\fR] [\fB-R\fR \fIfile\fR] [ \fB\(+-o\fR \fIoption\fR] ...
[-] [\fIarg\fR ...]
@@ -20,7 +20,6 @@ language
.fi
.SH DESCRIPTION
-.LP
\fBksh93\fR is a command and programming language that executes commands read
from a terminal or a file. \fBrksh93\fR is a restricted version of the command
interpreter \fBksh93\fR. \fBrksh93\fR is used to set up login names and
@@ -30,7 +29,6 @@ standard shell.
.LP
See \fBInvocation\fR for the meaning of arguments to the shell.
.SS "Definitions"
-.LP
A \fImetacharacter\fR is defined as one of the following characters:
.sp
.in +2
@@ -70,7 +68,6 @@ environment and built-ins that are found before performing a path search (see
some of these built-ins behave differently than other built-ins and are called
special built-ins.
.SS "Commands"
-.LP
A \fIsimple-command\fR is a list of variable assignments (see \fBVariable
Assignments\fR) or a sequence of \fIblank\fR-separated words which can be
preceded by a list of variable assignments. See the \fBEnvironment\fR section
@@ -129,8 +126,8 @@ last simple-command executed in the command.
.sp
.ne 2
.na
-\fB\fBfor\fR \fIvname\fR \fB[ in\fR \fIword\fR \fB\&... ] ;do\fR \fIlist\fR
-\fB;done\fR\fR
+\fBfor\fR \fIvname\fR \fB[ in\fR \fIword\fR \fB\&... ] ;do\fR \fIlist\fR
+\fB;done\fR
.ad
.sp .6
.RS 4n
@@ -144,8 +141,8 @@ there are no more words in the list. See \fBParameter Expansion\fR.
.sp
.ne 2
.na
-\fB\fB(( [\fR\fIexpr1\fR\fB] ; [\fR\fIexpr2\fR] ; [\fIexpr3\fR\fB] )) ;do\fR
-\fIlist\fR \fB;done\fR\fR
+\fBfor (( [\fR\fIexpr1\fR\fB] ; [\fR\fIexpr2\fR] ; [\fIexpr3\fR\fB] )) ;do\fR
+\fIlist\fR \fB;done\fR
.ad
.sp .6
.RS 4n
@@ -159,8 +156,8 @@ evaluated to \fB1\fR. See \fBArithmetic Evaluation\fR.
.sp
.ne 2
.na
-\fB\fBselect\fR \fIvname\fR [ in \fIword\fR \fB\&... ] ;do\fR \fIlist\fR
-\fB;done\fR\fR
+\fBselect\fR \fIvname\fR [ in \fIword\fR \fB\&... ] ;do\fR \fIlist\fR
+\fB;done\fR
.ad
.sp .6
.RS 4n
@@ -182,8 +179,8 @@ displaying the \fBPS3\fR prompt for the next selection.
.sp
.ne 2
.na
-\fB\fBcase\fR \fIword\fR \fBin [ [(]\fR \fIpattern\fR \fB[ |\fR \fIpattern\fR
-\fB] ... )\fR \fIlist\fR \fB;; ] ... esac\fR\fR
+\fBcase\fR \fIword\fR \fBin [ [(]\fR \fIpattern\fR \fB[ |\fR \fIpattern\fR
+\fB] ... )\fR \fIlist\fR \fB;; ] ... esac\fR
.ad
.sp .6
.RS 4n
@@ -198,8 +195,8 @@ is used in place of \fB;;\fR the next subsequent list, if any, is executed.
.sp
.ne 2
.na
-\fB\fBif\fR \fIlist\fR \fB;then\fR \fIlist\fR \fB[ ;elif\fR \fIlist\fR
-\fB;then\fR \fIlist\fR ] \fB\&... [ ;else\fR \fIlist\fR \fB]\fR \fB;fi\fR\fR
+\fBif\fR \fIlist\fR \fB;then\fR \fIlist\fR \fB[ ;elif\fR \fIlist\fR
+\fB;then\fR \fIlist\fR ] \fB\&... [ ;else\fR \fIlist\fR \fB]\fR \fB;fi\fR
.ad
.sp .6
.RS 4n
@@ -216,11 +213,11 @@ exit status.
.sp
.ne 2
.na
-\fB\fBwhile\fR \fIlist\fR \fB;do\fR \fIlist\fR \fB;done\fR\fR
+\fBwhile\fR \fIlist\fR \fB;do\fR \fIlist\fR \fB;done\fR
.ad
.br
.na
-\fBuntil \fIlist\fR \fB;do\fR \fIlist\fR \fB;done\fR\fR
+\fBuntil \fIlist\fR \fB;do\fR \fIlist\fR \fB;done\fR
.ad
.sp .6
.RS 4n
@@ -235,7 +232,7 @@ termination test.
.sp
.ne 2
.na
-\fB\fB((\fR\fIexpression\fR\fB))\fR\fR
+\fB((\fR\fIexpression\fR\fB))\fR
.ad
.sp .6
.RS 4n
@@ -248,14 +245,21 @@ described in this manual page. If the value of the arithmetic expression is
.sp
.ne 2
.na
-\fB\fB(\fR\fIlist\fR\fB;)\fR\fR
+\fB(\fR\fIlist\fR\fB)\fR
.ad
.sp .6
.RS 4n
-Execute list in a separate environment. If two adjacent open parentheses are
-needed for nesting, a SPACE must be inserted to avoid evaluation as an
+Execute \fIlist\fR in a separate environment. If two adjacent open parentheses
+are needed for nesting, a SPACE must be inserted to avoid evaluation as an
arithmetic command as described in this section.
+.RE
+
+.sp
+.ne 2
+.na
+\fB{\fR \fIlist\fR\fB;}
.sp
+.RS 4n
\fIlist\fR is simply executed. Unlike the metacharacters, \fB(\fR and \fB)\fR,
\fB{\fR and \fB}\fR are \fIreserved words\fR and must occur at the beginning of
a line or after a \fB;\fR to be recognized.
@@ -264,7 +268,7 @@ a line or after a \fB;\fR to be recognized.
.sp
.ne 2
.na
-\fB\fB[[\fR \fIexpression\fR \fB]]\fR\fR
+\fB[[\fR \fIexpression\fR \fB]]\fR
.ad
.sp .6
.RS 4n
@@ -276,16 +280,16 @@ of \fIexpression\fR.
.sp
.ne 2
.na
-\fB\fBfunction\fR \fIvarname\fR \fB{\fR \fIlist\fR \fB;}\fR\fR
+\fBfunction\fR \fIvarname\fR \fB{\fR \fIlist\fR \fB;}\fR
.ad
.br
.na
-\fB\fIvarname\fR \fB() {\fR \fIlist\fR \fB;}\fR\fR
+\fB\fIvarname\fR \fB() {\fR \fIlist\fR \fB;}\fR
.ad
.sp .6
.RS 4n
Define a function which is referenced by \fIvarname\fR. A function whose
-\fIvarname\fR contains a \fB\&.\fR is called a discipline function and the
+\fIvarname\fR contains a dot (\fB\&.\fR) is called a discipline function and the
portion of the \fIvarname\fR preceding the last \fB\&.\fR must refer to an
existing variable.
.sp
@@ -299,7 +303,19 @@ it. See \fBFunctions\fR.
.sp
.ne 2
.na
-\fB\fBtime [\fR \fIpipeline\fR \fB]\fR\fR
+\fBnamespace\fR \fIidentifier\fR \fB{\fR \fIlist\fR \fB};\fR
+.ad
+.sp .6
+.RS 4n
+Defines or uses the name space \fIidentifier\fR and runs the commands in
+\fIlist\fR in this name space.
+See \fBName Spaces\fR.
+.RE
+
+.sp
+.ne 2
+.na
+\fBtime [\fR \fIpipeline\fR \fB]\fR
.ad
.sp .6
.RS 4n
@@ -315,7 +331,7 @@ See \fBShell Variables\fR for a description of the \fBTIMEFORMAT\fR variable.
.LP
The following reserved words are recognized as reserved only when they are the
first word of a command and are not quoted:
-.br
+.sp
.in +2
\fBcase\fR
.in -2
@@ -388,29 +404,29 @@ first word of a command and are not quoted:
\fB!\fR
.in -2
.SS "Variable Assignments"
-.LP
One or more variable assignments can start a simple command or can be arguments
-to the \fBtypeset\fR, \fBexport\fR, or \fBreadonly\fR special built-in
-commands. The syntax for an \fIassignment\fR is of the form:
+to the \fBtypeset\fR, \fBenum\fR, \fBexport\fR, or \fBreadonly\fR special
+built-in commands. The syntax for an \fIassignment\fR is of the form:
.sp
.ne 2
.na
-\fB\fIvarname\fR\fB=\fR\fIword\fR\fR
+\fB\fIvarname\fR\fB=\fR\fIword\fR
.ad
.br
.na
-\fB\fIvarname\fR\fB[\fR\fIword\fR\fB]=\fR\fIword\fR\fR
+\fB\fIvarname\fR\fB[\fR\fIword\fR\fB]=\fR\fIword\fR
.ad
.sp .6
.RS 4n
No space is permitted between \fIvarname\fR and the \fB=\fR or between \fB=\fR
and \fIword\fR.
+The variable \fIvarname\fR is unset before the assignment.
.RE
.sp
.ne 2
.na
-\fB\fIvarname\fR\fB=(\fR\fIassignlist\fR\fB)\fR\fR
+\fB\fIvarname\fR\fB=(\fR\fIassignlist\fR\fB)\fR
.ad
.sp .6
.RS 4n
@@ -419,7 +435,7 @@ No space is permitted between \fIvarname\fR and the \fB=\fR. An
.sp
.ne 2
.na
-\fB\fIword ...\fR\fR
+\fB\fIword ...\fR
.ad
.sp .6
.RS 4n
@@ -429,7 +445,7 @@ Indexed array assignment.
.sp
.ne 2
.na
-\fB\fB[\fR\fIword\fR\fB]=\fR\fIword ...\fR\fR
+\fB[\fR\fIword\fR\fB]=\fR\fIword ...\fR
.ad
.sp .6
.RS 4n
@@ -440,7 +456,7 @@ indexed array instead.
.sp
.ne 2
.na
-\fB\fIassignment ...\fR\fR
+\fB\fIassignment ...\fR
.ad
.sp .6
.RS 4n
@@ -456,7 +472,7 @@ elements to be defined.
.sp
.ne 2
.na
-\fB\fBtypeset [\fR\fIoptions\fR] \fIassignment\fR \fB\&...\fR\fR
+\fBtypeset [\fR\fIoptions\fR] \fIassignment\fR \fB\&...\fR
.ad
.sp .6
.RS 4n
@@ -464,6 +480,16 @@ Nested variable assignment. Multiple assignments can be specified by separating
each of them with a \fB;\fR. The previous value is unset before the assignment.
.RE
+.sp
+.ne 2
+.na
+\fB.\fR \fIfilename\fR
+.ad
+.sp .6
+.RS 4n
+Include the assignment commands contained in \fIfilename\fR.
+.RE
+
In addition, a \fB+=\fR can be used in place of the \fB=\fR to signify adding
to or appending to the previous value. When \fB+=\fR is applied to an
arithmetic type, \fIword\fR is evaluated as an arithmetic expression and added
@@ -471,24 +497,29 @@ to the current value. When applied to a string variable, the value defined by
\fIword\fR is appended to the value. For compound assignments, the previous
value is not unset and the new values are appended to the current ones provided
that the types are compatible.
+
+The right hand side of a variable assignment undergoes all the expansion
+listed below except word splitting, brace expansion, and file name generation.
+When the left hand side is an assignment is a compound variable and
+the right hand is the name of a compound variable, the compound variable
+on the right will be copied or appended to the compound variable on the left.
+
.RE
.SS "Comments"
-.LP
A word beginning with \fB#\fR causes that word and all the following characters
up to a NEWLINE to be commented, or ignored.
.SS "Aliasing"
-.LP
The first word of each command is replaced by the text of an alias if an alias
for this word has been defined. An alias name consists of any number of
characters excluding metacharacters, quoting characters, file expansion
characters, parameter expansion characters, command substitution characters,
-and \fB=\fR. The replacement string can contain any valid shell script
-including the metacharacters listed in the \fBCommands\fR section. The first
-word of each command in the replaced text, other than any that are in the
-process of being replaced, are tested for aliases. If the last character of the
-alias value is a BLANK then the word following the alias is also checked for
-alias substitution.
+the characters \fB/\fR and \fB=\fR. The replacement string can contain any
+valid shell script including the metacharacters listed in the \fBCommands\fR
+section. The first word of each command in the replaced text, other than any
+that are in the process of being replaced, are tested for aliases. If the last
+character of the alias value is a BLANK then the word following the alias is
+also checked for alias substitution.
.sp
.LP
Aliases can be used to redefine built-in commands but cannot be used to
@@ -506,6 +537,7 @@ are compiled into the shell but can be unset or redefined:
.nf
autoload='typeset -fu'
command='command '
+compound='typeset -C'
fc=hist
float='typeset -lE'
functions='typeset -f'
@@ -526,7 +558,6 @@ type='whence -v'
.sp
.SS "Tilde Substitution"
-.LP
After alias substitution is performed, each word is checked to see if it begins
with an unquoted tilde (\fB~\fR). For tilde substitution, \fIword\fR also
refers to the \fIword\fR portion of parameter expansion. See \fBParameter
@@ -546,28 +577,28 @@ attempted when the value of the assignment begins with a \fB~\fR, and when a
\fB~\fR appears after a colon (\fB:\fR). The \fB:\fR also terminates a \fB~\fR
login name.
.SS "Command Substitution"
-.LP
The standard output from a command enclosed in parentheses preceded by a dollar
-sign (\fB$\fR) or a pair of grave accents (\fB``\fR) can be used as part or all
-of a word. Trailing NEWLINEs are removed. In the second (obsolete) form, the
-string between the quotes is processed for special quoting characters before
-the command is executed. See \fBQuoting\fR.
+sign ( \fB$(\fR\fIlist\fR\fB)\fR ), or in a brace group preceded by a dollar
+sign ( \fB${\fR \fIlist\fR\fB;}\fR ), or in a pair of grave accents (\fB``\fR)
+can be used as part or all of a word. Trailing NEWLINEs are removed. In the
+second case, the \fB{\fR and \fB}\fR are treated as a reserved words so that
+\fB{\fR must be followed by a blank and \fB}\fR must appear at the beginning of
+the line or follow a \fB;\fR. In the third (obsolete) form, the string between
+the quotes is processed for special quoting characters before the command is
+executed. See \fBQuoting\fR.
.sp
.LP
The command substitution \fB$(cat file)\fR can be replaced by the equivalent
but faster \fB$(<file)\fR. The command substitution \fB$(\fR\fIn\fR\fB<#)\fR
-expands to the current byte offset for file descriptor \fIn\fR.
+expands to the current byte offset for file descriptor \fIn\fR. Except for the
+second form, the command list is run in a subshell so that no side effects are
+possible. For the second form, the final \fB}\fR will be recognized as a
+reserved word after any token.
.SS "Arithmetic Substitution"
-.LP
An arithmetic expression enclosed in double parentheses preceded by a dollar
sign ( \fB$((\fR\fIarithmetic_expression\fR\fB))\fR) is replaced by the value
of the arithmetic expression within the double parentheses.
.SS "Process Substitution"
-.LP
-Process substitution is only available on versions of the UNIX operating system
-that support the \fB/dev/fd\fR directory for naming open files.
-.sp
-.LP
Each command argument of the form \fB<(\fR\fIlist\fR\fB)\fR or
\fB>(\fR\fIlist\fR\fB)\fR runs process \fIlist\fR asynchronously connected to
some file in \fB/dev/fd\fR. The name of this file becomes the argument to the
@@ -593,8 +624,11 @@ respectively, \fBpaste\fRs the results together, and sends it to the processes
\fIprocess1\fR and \fIprocess2\fR. It also displays the results to the standard
output. The file, which is passed as an argument to the command, is a UNIX
\fBpipe\fR(2). Programs that expect to \fBlseek\fR(2) on the file do not work.
+.sp
+Process substitution of the form \fB<\fR(\fIlist\fR\fB)\fR can also be used
+with the \fB<\fR redirection operator which causes the output of list to be
+standard input or the input for whatever file descriptor is specified.
.SS "Parameter Expansion"
-.LP
A parameter is a variable, one or more digits, or any of the characters
\fB*\fR, \fB@\fR, \fB#\fR, \fB?\fR, \fB-\fR, \fB$\fR, and \fB!\fR. A variable
is denoted by a \fIvname\fR. To create a variable whose \fIvname\fR contains a
@@ -609,11 +643,15 @@ values and attributes to the environment.
The shell supports both indexed and associative arrays. An element of an array
variable is referenced by a subscript. A subscript for an indexed array is
denoted by an arithmetic expression, (see \fBArithmetic Evaluation\fR), between
-a \fB[\fR and a \fB]\fR. Use \fBset -A\fR \fIvname value ...\fR to assign
-values to an indexed array. The value of all subscripts must be in the range of
-\fB0\fR through \fB1,048,575\fR. Indexed arrays do not need to be declared. Any
-reference to a variable with a valid subscript is legal and an array is created
-if necessary.
+a \fB[\fR and a \fB]\fR.
+To assign values to an indexed array, use \fIvname\fR\fB=(\fR\fIvalue\fR
+\&...\fB)\fR or \fBset -A\fR \fIvname value ...\fR .
+The value of all subscripts must be in the range of
+\fB0\fR through \fB4,194,303\fR. A negative subscript is treated as an offset
+from the maximum current index +1 so that -1 refers to the last element.
+Indexed arrays can be declared with the \fB-a\fR option to typeset. Indexed
+arrays need not be declared. Any reference to a variable with a valid
+subscript is legal and an array will be created if necessary.
.sp
.LP
An associative array is created with the \fB-A\fR option to \fBtypeset\fR. A
@@ -644,23 +682,36 @@ or
.fi
.in -2
.sp
-
-.sp
-.LP
-No space is allowed before or after the \fB=\fR. A \fInameref\fR is a variable
-that is a reference to another variable. A \fInameref\fR is created with the
-\fB-n\fR attribute of \fBtypeset\fR. The value of the variable at the time of
-the \fBtypeset\fR command becomes the variable that is referenced whenever the
-\fInameref\fR variable is used. The name of a \fInameref\fR cannot contain a
-dot (\fI\&.\fR). When a variable or function name contains a \fB\&.,\fR and the
-portion of the name up to the first \fB\&.\fR matches the name of a
-\fInameref\fR, the variable referred to is obtained by replacing the
-\fInameref\fR portion with the name of the variable referenced by the
-\fInameref\fR. If a \fInameref\fR is used as the index of a \fBfor\fR loop, a
-name reference is established for each item in the list. A \fInameref\fR
-provides a convenient way to refer to the variable inside a function whose name
-is passed as an argument to a function. For example, if the name of a variable
-is passed as the first argument to a function, the command
+Note that no space is allowed before or after the \fB=\fR.
+.sp
+Attributes assigned by the \fItypeset\fR special built-in command apply to all
+elements of the array.
+An array element can be a simple variable, a compound variable or an array
+variable.
+An element of an indexed array can be either an indexed array or an associative
+array.
+An element of an associative array can also be either.
+To refer to an array element that is part of an array
+element, concatenate the subscript in brackets. For example, to refer
+to the \fIfoobar\fR element of an associative array that is defined as the
+third element of the indexed array, use
+\fB${\fIvname\fR\fB[\fR\fI3\fR\fB][\fR\fIfoobar\fR\fB]}\fR
+.sp
+.LP
+A \fInameref\fR is a variable that is a reference to another variable. A
+\fInameref\fR is created with the \fB-n\fR attribute of \fBtypeset\fR. The
+value of the variable at the time of the \fBtypeset\fR command becomes the
+variable that is referenced whenever the \fInameref\fR variable is used. The
+name of a \fInameref\fR cannot contain a dot (\fI\&.\fR). When a variable or
+function name contains a dot (\fB\&.\fR) and the portion of the name up to the
+first \fB\&.\fR matches the name of a \fInameref\fR, the variable referred to
+is obtained by replacing the \fInameref\fR portion with the name of the
+variable referenced by the \fInameref\fR. If a \fInameref\fR is used as the
+index of a \fBfor\fR loop, a name reference is established for each item in the
+list. A \fInameref\fR provides a convenient way to refer to the variable inside
+a function whose name is passed as an argument to a function. For example, if
+the name of a variable is passed as the first argument to a function, the
+command
.sp
.in +2
.nf
@@ -673,17 +724,18 @@ is passed as the first argument to a function, the command
.LP
inside the function causes references and assignments to \fIvar\fR to be
references and assignments to the variable whose name has been passed to the
-function. If either of the floating point attributes, \fB-E\fR, or \fB-F\fR, or
-the integer attribute, \fB-i\fR, is set for \fIvname\fR, then the \fIvalue\fR
-is subject to arithmetic evaluation as described in this manual page.
-Positional parameters, parameters denoted by a number, can be assigned values
-with the \fBset\fR special built-in command. Parameter \fB$0\fR is set from
-argument zero when the shell is invoked. The character \fB$\fR is used to
-introduce substitutable parameters.
+function. If any of the floating point attributes, \fB-E\fR,\fB-F\fR or
+\fB-X\fR, or the integer attribute, \fB-i\fR, is set for \fIvname\fR, then the
+\fIvalue\fR is subject to arithmetic evaluation as described in this manual
+page. Positional parameters, parameters denoted by a number, can be assigned
+values with the \fBset\fR special built-in command. Parameter \fB$0\fR is set
+from argument zero when the shell is invoked.
+.sp
+The character \fB$\fR is used to introduce substitutable parameters.
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB}\fR
.ad
.sp .6
.RS 4n
@@ -691,20 +743,24 @@ The shell reads all the characters from \fB${\fR to the matching \fB}\fR as
part of the same word even if it contains braces or metacharacters. The value,
if any, of the parameter is substituted. The braces are required when
\fIparameter\fR is followed by a letter, digit, or underscore that is not to be
-interpreted as part of its name, when the variable name contains a \fB\&.\fR,
-or when a variable is subscripted. If \fIparameter\fR is one or more digits
-then it is a positional parameter. A positional parameter of more than one
-digit must be enclosed in braces. If \fIparameter\fR is \fB*\fR or \fB@\fR,
-then all the positional parameters, starting with \fB$1\fR, are substituted and
-separated by a field separator character. If an array \fIvname\fR with
-subscript \fB*\fR or \fB@\fR is used, then the value for each of the elements
-is substituted, separated by the first character of the value of \fBIFS\fR.
+interpreted as part of its name or when the variable name contains a dot
+(\fB\&.\fR). The braces are also required when a variable is subscripted unless
+it is part of an Arithmetic Expression or a Conditional Expression. If
+\fIparameter\fR is one or more digits then it is a positional parameter. A
+positional parameter of more than one digit must be enclosed in braces. If
+\fIparameter\fR is \fB*\fR or \fB@\fR, then all the positional parameters,
+starting with \fB$1\fR, are substituted and separated by a field separator
+character. If an array \fIvname\fR with last subscript \fB*\fR or \fB@\fR is
+used, or for index arrays of the form \fIsub1\fR \fB\&..\fR \fIsub2\fR is used,
+then the value for each of the elements between \fIsub1\fR and \fIsub2\fR
+inclusive (or all elements for \fB*\fR and \fB@\fR) is substituted, separated
+by the first character of the value of \fBIFS\fR.
.RE
.sp
.ne 2
.na
-\fB\fB${#\fR\fIparameter\fR\fB}\fR\fR
+\fB${#\fR\fIparameter\fR\fB}\fR
.ad
.sp .6
.RS 4n
@@ -716,21 +772,31 @@ substituted.
.sp
.ne 2
.na
-\fB\fB${#\fR\fIvname\fR\fB[*]}\fR\fR
+\fB${#\fR\fIvname\fR\fB[*]}\fR
.ad
.br
.na
-\fB\fB${#\fR\fIvname\fR\fB[@]}\fR\fR
+\fB${#\fR\fIvname\fR\fB[@]}\fR
.ad
.sp .6
.RS 4n
The number of elements in the array \fIvname\fR is substituted.
.RE
+.ne 2
+.na
+\fB${@\fR\fIvname\fR\fB}\fR
+.ad
+.sp .6
+.RS 4n
+Expands to the type name or attributes of the variable referred to by
+\fIvname\fR. See \fIType Variables\fR.
+.RE
+
.sp
.ne 2
.na
-\fB\fB${!\fR\fIvname\fR\fB}\fR\fR
+\fB${!\fR\fIvname\fR\fB}\fR
.ad
.sp .6
.RS 4n
@@ -741,22 +807,26 @@ Expands to the name of the variable referred to by \fIvname\fR. This is
.sp
.ne 2
.na
-\fB\fB${!\fR\fIvname\fR\fB[\fR\fIsubscript\fR\fB]}\fR\fR
+\fB${!\fR\fIvname\fR\fB[\fR\fIsubscript\fR\fB]}\fR
.ad
.sp .6
.RS 4n
-Expands to name of the subscript unless \fIsubscript\fR is \fB*\fR or \fB@\fR.
+Expands to name of the subscript unless \fIsubscript\fR is \fB*\fR or \fB@\fR,
+or of the form \fIsub1\fR \fB..\fR \fIsub2\fR.
When \fIsubscript\fR is \fB*\fR, the list of array subscripts for \fIvname\fR
is generated. For a variable that is not an array, the value is \fB0\fR if the
-variable is set. Otherwise it is \fBnull\fR. When \fIsubscript\fR is \fB@\fR,
+variable is set, otherwise it is \fBnull\fR. When \fIsubscript\fR is \fB@\fR,
it is the same as \fB$ {\fR\fIvname\fR\fB[\fR\fI*\fR\fB]}\fR, except that when
used in double quotes, each array subscript yields a separate argument.
+When subscript is of the form \fIsub1\fR \fB..\fR \fIsub2\fR it expands to the
+list of subscripts between \fIsub1\fR and \fIsub2\fR inclusive using the same
+quoting rules as \fB@\fR.
.RE
.sp
.ne 2
.na
-\fB\fB${!\fR\fIprefix\fR\fB*}\fR\fR
+\fB${!\fR\fIprefix\fR\fB*}\fR
.ad
.sp .6
.RS 4n
@@ -766,97 +836,52 @@ Expands to the names of the variables whose names begin with \fIprefix\fR.
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB:-\fR\fIword\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB:-\fR\fIword\fR\fB}\fR
.ad
.sp .6
.RS 4n
If \fIparameter\fR is set and is non-null then substitute its value. Otherwise
substitute \fIword\fR.
-.sp
-\fIword\fR is not evaluated unless it is to be used as the substituted string.
-.sp
-In the following example, \fBpwd\fR is executed only if \fBd\fR is not set or
-is NULL:
-.sp
-.in +2
-.nf
-print ${d:-$(pwd)}
-.fi
-.in -2
-.sp
-
-If the colon (\fB:\fR ) is omitted from the expression, the shell only checks
-whether \fIparameter\fR is set or not.
.RE
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB:=\fR\fIword\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB:=\fR\fIword\fR\fB}\fR
.ad
.sp .6
.RS 4n
If \fIparameter\fR is not set or is \fBnull\fR, set it to \fIword\fR. The value
of the parameter is then substituted. Positional parameters cannot be assigned
to in this way.
-.sp
-\fIword\fR is not evaluated unless it is to be used as the substituted string.
-.sp
-In the following example, \fBpwd\fR is executed only if \fBd\fR is not set or
-is NULL:
-.sp
-.in +2
-.nf
-print ${d:-$(pwd)}
-.fi
-.in -2
-.sp
-
-If the colon (\fB:\fR) is omitted from the expression, the shell only checks
-whether \fIparameter\fR is set or not.
.RE
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB:?\fR\fIword\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB:?\fR\fIword\fR\fB}\fR
.ad
.sp .6
.RS 4n
If \fIparameter\fR is set and is non-null, substitute its value. Otherwise,
print \fIword\fR and exit from the shell , if the shell is not interactive. If
\fIword\fR is omitted then a standard message is printed.
-.sp
-\fIword\fR is not evaluated unless it is to be used as the substituted string.
-.sp
-In the following example, \fBpwd\fR is executed only if \fBd\fR is not set or
-is NULL:
-.sp
-.in +2
-.nf
-print ${d:-$(pwd)}
-.fi
-.in -2
-.sp
-
-If the colon (\fB:\fR ) is omitted from the expression, the shell only checks
-whether \fIparameter\fR is set or not.
.RE
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB:+\fR\fIword\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB:+\fR\fIword\fR\fB}\fR
.ad
.sp .6
.RS 4n
If \fIparameter\fR is set and is non-null, substitute \fIword\fR. Otherwise
substitute nothing.
-.sp
-\fIword\fR is not evaluated unless it is to be used as the substituted string.
-.sp
-In the following example, \fBpwd\fR is executed only if \fBd\fR is not set or
-is NULL:
+.RE
+
+In the above, \fIword\fR is not evaluated unless it is to be used as the
+substituted string. In the following example, \fBpwd\fR is executed only if
+\fBd\fR is not set or is NULL:
.sp
.in +2
.nf
@@ -867,16 +892,15 @@ print ${d:-$(pwd)}
If the colon (\fB:\fR) is omitted from the expression, the shell only checks
whether \fIparameter\fR is set or not.
-.RE
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB:\fR\fIoffset\fR:\fIlength\fR}\fR
+\fB${\fR\fIparameter\fR\fB:\fR\fIoffset\fR:\fIlength\fR}\fR
.ad
.br
.na
-\fB\fB${\fR\fIparameter\fR\fB:\fR\fIoffset\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB:\fR\fIoffset\fR\fB}\fR
.ad
.sp .6
.RS 4n
@@ -899,11 +923,11 @@ subscript for indexed arrays. The order for associative arrays is unspecified.
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB#\fR\fIpattern\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB#\fR\fIpattern\fR\fB}\fR
.ad
.br
.na
-\fB\fB${\fR\fIparameter\fR\fB##\fR\fIpattern\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB##\fR\fIpattern\fR\fB}\fR
.ad
.sp .6
.RS 4n
@@ -920,11 +944,11 @@ to each element in turn.
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB%\fR\fIpattern\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB%\fR\fIpattern\fR\fB}\fR
.ad
.br
.na
-\fB\fB${\fR\fIparameter\fR\fB%%\fR\fIpattern\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB%%\fR\fIpattern\fR\fB}\fR
.ad
.sp .6
.RS 4n
@@ -940,19 +964,19 @@ applied to each element in turn.
.sp
.ne 2
.na
-\fB\fB${\fR\fIparameter\fR\fB/\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB/\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR
.ad
.br
.na
-\fB\fB${\fR\fIparameter\fR\fB//\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB//\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR
.ad
.br
.na
-\fB\fB${\fR\fIparameter\fR\fB/#\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB/#\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR
.ad
.br
.na
-\fB\fB${\fR\fIparameter\fR\fB/%\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR\fR
+\fB${\fR\fIparameter\fR\fB/%\fR\fIpattern\fR\fB/\fR\fIstring\fR\fB}\fR
.ad
.sp .6
.RS 4n
@@ -984,7 +1008,7 @@ The following parameters are automatically set by the shell:
.sp
.ne 2
.na
-\fB\fB#\fR\fR
+\fB#\fR
.ad
.RS 19n
The number of positional parameters in decimal.
@@ -993,7 +1017,7 @@ The number of positional parameters in decimal.
.sp
.ne 2
.na
-\fB\fB-\fR\fR
+\fB-\fR
.ad
.RS 19n
Options supplied to the shell on invocation or by the \fBset\fR command.
@@ -1002,7 +1026,7 @@ Options supplied to the shell on invocation or by the \fBset\fR command.
.sp
.ne 2
.na
-\fB\fB?\fR\fR
+\fB?\fR
.ad
.RS 19n
The decimal value returned by the last executed command.
@@ -1011,7 +1035,7 @@ The decimal value returned by the last executed command.
.sp
.ne 2
.na
-\fB\fB$\fR\fR
+\fB$\fR
.ad
.RS 19n
The process number of this shell.
@@ -1020,7 +1044,7 @@ The process number of this shell.
.sp
.ne 2
.na
-\fB\fB_\fR\fR
+\fB_\fR
.ad
.RS 19n
Initially, the value of \fB_\fR is the absolute pathname of the shell or script
@@ -1035,17 +1059,20 @@ mail.
.sp
.ne 2
.na
-\fB\fB!\fR\fR
+\fB!\fR
.ad
.RS 19n
-The process number of the last background command invoked or the most recent
-job put in the background with the \fBbg\fR built-in command.
+The process id or the pool name and job number of the last background command
+invoked or the most recent job put in the background with the
+\fBbg\fR built-in command. Background jobs started in a named pool with be
+in the form \fIpool\fR.\fInumber\fR where \fIpool\fR is the pool name and
+\fInumber\fR is the job number within that pool.
.RE
.sp
.ne 2
.na
-\fB\fB\&.sh.command\fR\fR
+\fB\&.sh.command\fR
.ad
.RS 19n
When processing a \fBDEBUG\fR trap, this variable contains the current command
@@ -1055,7 +1082,7 @@ line that is about to run.
.sp
.ne 2
.na
-\fB\fB\&.sh.edchar\fR\fR
+\fB\&.sh.edchar\fR
.ad
.RS 19n
This variable contains the value of the keyboard character (or sequence of
@@ -1068,7 +1095,7 @@ caused the trap. See the \fBKey Bindings\fR section of this manual page.
.sp
.ne 2
.na
-\fB\fB\&.sh.edcol\fR\fR
+\fB\&.sh.edcol\fR
.ad
.RS 19n
The character position of the cursor at the time of the most recent \fBKEYBD\fR
@@ -1078,7 +1105,7 @@ trap.
.sp
.ne 2
.na
-\fB\fB\&.sh.edmode\fR\fR
+\fB\&.sh.edmode\fR
.ad
.RS 19n
The value is set to ESC when processing a \fBKEYBD\fR trap while in \fBvi\fR
@@ -1089,7 +1116,7 @@ insert mode. Otherwise, \fB\&.sh.edmode\fR is null when processing a
.sp
.ne 2
.na
-\fB\fB\&.sh.edtext\fR\fR
+\fB\&.sh.edtext\fR
.ad
.RS 19n
The characters in the input buffer at the time of the most recent \fBKEYBD\fR
@@ -1099,7 +1126,7 @@ trap. The value is null when not processing a \fBKEYBD\fR trap.
.sp
.ne 2
.na
-\fB\fB\&.sh.file\fR\fR
+\fB\&.sh.file\fR
.ad
.RS 19n
The pathname of the file than contains the current command.
@@ -1108,7 +1135,7 @@ The pathname of the file than contains the current command.
.sp
.ne 2
.na
-\fB\fB\&.sh.fun\fR\fR
+\fB\&.sh.fun\fR
.ad
.RS 19n
The name of the current function that is being executed.
@@ -1117,7 +1144,7 @@ The name of the current function that is being executed.
.sp
.ne 2
.na
-\fB\fB\&.sh.match\fR\fR
+\fB\&.sh.match\fR
.ad
.RS 19n
An indexed array which stores the most recent match and sub-pattern matches
@@ -1131,7 +1158,17 @@ assigned a new value.
.sp
.ne 2
.na
-\fB\fB\&.sh.name\fR\fR
+\fB\&.sh.math\fR
+.ad
+.RS 19n
+Used for defining arithmetic functions (see \fIArithmetic evaluation\fR) and
+stores the list of user-defined arithmetic functions.
+.RE
+
+.sp
+.ne 2
+.na
+\fB\&.sh.name\fR
.ad
.RS 19n
Set to the name of the variable at the time that a discipline function is
@@ -1141,7 +1178,7 @@ invoked.
.sp
.ne 2
.na
-\fB\fB\&.sh.subscript\fR\fR
+\fB\&.sh.subscript\fR
.ad
.RS 19n
Set to the name subscript of the variable at the time that a discipline
@@ -1151,7 +1188,7 @@ function is invoked.
.sp
.ne 2
.na
-\fB\fB\&.sh.subshell\fR\fR
+\fB\&.sh.subshell\fR
.ad
.RS 19n
The current depth for sub-shells and command substitution.
@@ -1160,17 +1197,20 @@ The current depth for sub-shells and command substitution.
.sp
.ne 2
.na
-\fB\fB\&.sh.value\fR\fR
+\fB\&.sh.value\fR
.ad
.RS 19n
Set to the value of the variable at the time that the set or append discipline
-function is invoked.
+function is invoked. When a user-defined arithmetic function is invoked, the
+value of \fB.sh.value\fR is saved and \fB.sh.value\fR is set to long double
+precision floating point. \fB.sh.value\fR is restored when the function
+returns.
.RE
.sp
.ne 2
.na
-\fB\fB\&.sh.version\fR\fR
+\fB\&.sh.version\fR
.ad
.RS 19n
Set to a value that identifies the version of this shell.
@@ -1179,7 +1219,7 @@ Set to a value that identifies the version of this shell.
.sp
.ne 2
.na
-\fB\fBLINENO\fR\fR
+\fBLINENO\fR
.ad
.RS 19n
The current line number within the script or function being executed.
@@ -1188,7 +1228,7 @@ The current line number within the script or function being executed.
.sp
.ne 2
.na
-\fB\fBOLDPWD\fR\fR
+\fBOLDPWD\fR
.ad
.RS 19n
The previous working directory set by the \fBcd\fR command.
@@ -1197,7 +1237,7 @@ The previous working directory set by the \fBcd\fR command.
.sp
.ne 2
.na
-\fB\fBOPTARG\fR\fR
+\fBOPTARG\fR
.ad
.RS 19n
The value of the last option argument processed by the \fBgetopts\fR built-in
@@ -1207,7 +1247,7 @@ command.
.sp
.ne 2
.na
-\fB\fBOPTIND\fR\fR
+\fBOPTIND\fR
.ad
.RS 19n
The index of the last option argument processed by the \fBgetopts\fR built-in
@@ -1217,7 +1257,7 @@ command.
.sp
.ne 2
.na
-\fB\fBPPID\fR\fR
+\fBPPID\fR
.ad
.RS 19n
The process number of the parent of the shell.
@@ -1226,7 +1266,7 @@ The process number of the parent of the shell.
.sp
.ne 2
.na
-\fB\fBPWD\fR\fR
+\fBPWD\fR
.ad
.RS 19n
The present working directory set by the \fBcd\fR command.
@@ -1235,7 +1275,7 @@ The present working directory set by the \fBcd\fR command.
.sp
.ne 2
.na
-\fB\fBRANDOM\fR\fR
+\fBRANDOM\fR
.ad
.RS 19n
Each time this variable is referenced, a random integer, uniformly distributed
@@ -1246,7 +1286,7 @@ can be initialized by assigning a numeric value to \fBRANDOM\fR.
.sp
.ne 2
.na
-\fB\fBREPLY\fR\fR
+\fBREPLY\fR
.ad
.RS 19n
This variable is set by the \fBselect\fR statement and by the \fBread\fR
@@ -1256,7 +1296,7 @@ built-in command when no arguments are supplied.
.sp
.ne 2
.na
-\fB\fBSECONDS\fR\fR
+\fBSECONDS\fR
.ad
.RS 19n
Each time this variable is referenced, the number of seconds since shell
@@ -1266,12 +1306,23 @@ seconds since the assignment.
.RE
.sp
+.ne 2
+.na
+\fBSHLVL\fR
+.ad
+.RS 19n
+An integer variable the is incremented each time the shell is invoked and is
+exported. If \fBSHLVL\fR is not in the environment when the shell is invoked,
+it is set to 1.
+.RE
+
+.sp
.LP
The following variables are used by the shell:
.sp
.ne 2
.na
-\fB\fBCDPATH\fR\fR
+\fBCDPATH\fR
.ad
.RS 14n
Defines the search path for the \fBcd\fR command.
@@ -1280,7 +1331,7 @@ Defines the search path for the \fBcd\fR command.
.sp
.ne 2
.na
-\fB\fBCOLUMNS\fR\fR
+\fBCOLUMNS\fR
.ad
.RS 14n
Defines the width of the edit window for the shell edit modes and for printing
@@ -1290,7 +1341,7 @@ select lists.
.sp
.ne 2
.na
-\fB\fBEDITOR\fR\fR
+\fBEDITOR\fR
.ad
.RS 14n
If the \fBVISUAL\fR variable is not set, the value of this variable is checked
@@ -1304,7 +1355,7 @@ page.
.sp
.ne 2
.na
-\fB\fBENV\fR\fR
+\fBENV\fR
.ad
.RS 14n
Performs parameter expansion, command substitution, and arithmetic substitution
@@ -1320,7 +1371,7 @@ See the \fBInvocation\fR section of this manual page.
.sp
.ne 2
.na
-\fB\fBFCEDIT\fR\fR
+\fBFCEDIT\fR
.ad
.RS 14n
Obsolete name for the default editor name for the \fBhist\fR command.
@@ -1332,7 +1383,7 @@ The shell specifies a default value to \fBFCEDIT\fR.
.sp
.ne 2
.na
-\fB\fBFIGNORE\fR\fR
+\fBFIGNORE\fR
.ad
.RS 14n
A pattern that defines the set of file names that is ignored when performing
@@ -1342,7 +1393,7 @@ file name matching.
.sp
.ne 2
.na
-\fB\fBFPATH\fR\fR
+\fBFPATH\fR
.ad
.RS 14n
The search path for function definitions. The directories in this path are
@@ -1357,7 +1408,7 @@ adjacent colon (\fB:\fR) characters or a beginning or ending colon (\fB:\fR).
.sp
.ne 2
.na
-\fB\fBHISTCMD\fR\fR
+\fBHISTCMD\fR
.ad
.RS 14n
The number of the current command in the history file.
@@ -1366,7 +1417,7 @@ The number of the current command in the history file.
.sp
.ne 2
.na
-\fB\fBHISTEDIT\fR\fR
+\fBHISTEDIT\fR
.ad
.RS 14n
The name for the default editor name for the \fBhist\fR command.
@@ -1375,7 +1426,7 @@ The name for the default editor name for the \fBhist\fR command.
.sp
.ne 2
.na
-\fB\fBHISTFILE\fR\fR
+\fBHISTFILE\fR
.ad
.RS 14n
If this variable is set when the shell is invoked, the value is the pathname of
@@ -1386,7 +1437,7 @@ Re-entry\fR section of this manual page.
.sp
.ne 2
.na
-\fB\fBHISTSIZE\fR\fR
+\fBHISTSIZE\fR
.ad
.RS 14n
If this variable is set when the shell is invoked, then the number of
@@ -1397,7 +1448,7 @@ or equal to this number. The default is \fB512\fR.
.sp
.ne 2
.na
-\fB\fBHOME\fR\fR
+\fBHOME\fR
.ad
.RS 14n
The default argument (home directory) for the \fBcd\fR command.
@@ -1408,7 +1459,7 @@ The default argument (home directory) for the \fBcd\fR command.
.sp
.ne 2
.na
-\fB\fBIFS\fR\fR
+\fBIFS\fR
.ad
.RS 14n
Internal field separators, normally SPACE, TAB, and NEWLINE that are used to
@@ -1432,7 +1483,18 @@ The shell specifies a default value to \fBIFS\fR.
.sp
.ne 2
.na
-\fB\fBLANG\fR\fR
+\fBJOBMAX\fR
+.ad
+.RS 14n
+This variable defines the maximum number running background jobs that can run
+at a time. When this limit is reached, the shell will wait for a job to
+complete before staring a new job.
+.RE
+
+.sp
+.ne 2
+.na
+\fBLANG\fR
.ad
.RS 14n
This variable determines the locale category for any category not specifically
@@ -1442,7 +1504,7 @@ selected with a variable starting with \fBLC_\fR or \fBLANG\fR.
.sp
.ne 2
.na
-\fB\fBLC_ALL\fR\fR
+\fBLC_ALL\fR
.ad
.RS 14n
This variable overrides the value of the \fBLANG\fR variable and any other
@@ -1452,7 +1514,7 @@ This variable overrides the value of the \fBLANG\fR variable and any other
.sp
.ne 2
.na
-\fB\fBLC_COLLATE\fR\fR
+\fBLC_COLLATE\fR
.ad
.RS 14n
This variable determines the locale category for character collation
@@ -1462,7 +1524,7 @@ information.
.sp
.ne 2
.na
-\fB\fBLC_CTYPE\fR\fR
+\fBLC_CTYPE\fR
.ad
.RS 14n
This variable determines the locale category for character handling functions.
@@ -1473,7 +1535,7 @@ Generation\fR section of this manual page.
.sp
.ne 2
.na
-\fB\fBLC_NUMERIC\fR\fR
+\fBLC_NUMERIC\fR
.ad
.RS 14n
This variable determines the locale category for the decimal point character.
@@ -1482,7 +1544,7 @@ This variable determines the locale category for the decimal point character.
.sp
.ne 2
.na
-\fB\fBLINES\fR\fR
+\fBLINES\fR
.ad
.RS 14n
If this variable is set, the value is used to determine the column length for
@@ -1493,7 +1555,7 @@ printing select lists. Select lists prints vertically until about two-thirds of
.sp
.ne 2
.na
-\fB\fBMAIL\fR\fR
+\fBMAIL\fR
.ad
.RS 14n
If this variable is set to the name of a mail file \fBand\fR the \fBMAILPATH\fR
@@ -1507,7 +1569,7 @@ specified file.
.sp
.ne 2
.na
-\fB\fBMAILCHECK\fR\fR
+\fBMAILCHECK\fR
.ad
.RS 14n
Specifies how often in seconds the shell checks for changes in the modification
@@ -1521,7 +1583,7 @@ The shell specifies a default value to \fBMAILCHECK\fR.
.sp
.ne 2
.na
-\fB\fBMAILPATH\fR\fR
+\fBMAILPATH\fR
.ad
.RS 14n
A colon ( \fB:\fR ) separated list of file names. If this variable is set, then
@@ -1536,7 +1598,7 @@ message is \fByou have mail in $_\fR.
.sp
.ne 2
.na
-\fB\fBPATH\fR\fR
+\fBPATH\fR
.ad
.RS 14n
The search path for commands. Except in \fB\&.profile\fR, users cannot change
@@ -1549,7 +1611,7 @@ The shell specifies a default value to \fBPATH\fR.
.sp
.ne 2
.na
-\fB\fBPS1\fR\fR
+\fBPS1\fR
.ad
.RS 14n
The value of this variable is expanded for parameter expansion, command
@@ -1565,7 +1627,7 @@ The shell specifies a default value to \fBPS1\fR.
.sp
.ne 2
.na
-\fB\fBPS2\fR\fR
+\fBPS2\fR
.ad
.RS 14n
Secondary prompt string, by default, \fB>\fR.
@@ -1576,7 +1638,7 @@ The shell specifies a default value to \fBPS2\fR.
.sp
.ne 2
.na
-\fB\fBPS3\fR\fR
+\fBPS3\fR
.ad
.RS 14n
Selection prompt string used within a select loop, by default \fB#?\fR.
@@ -1587,7 +1649,7 @@ The shell specifies a default value to \fBPS3\fR.
.sp
.ne 2
.na
-\fB\fBPS4\fR\fR
+\fBPS4\fR
.ad
.RS 14n
The value of this variable is expanded for parameter evaluation, command
@@ -1601,7 +1663,7 @@ The shell specifies a default value to \fBPS4\fR.
.sp
.ne 2
.na
-\fB\fBSHELL\fR\fR
+\fBSHELL\fR
.ad
.RS 14n
The pathname of the shell is kept in the environment. At invocation, if the
@@ -1615,7 +1677,7 @@ basename of this variable is \fBrsh\fR, \fBrksh\fR, \fBrksh93\fR, or
.sp
.ne 2
.na
-\fB\fBTIMEFORMAT\fR\fR
+\fBTIMEFORMAT\fR
.ad
.RS 14n
The value of this parameter is used as a format string specifying how the
@@ -1627,7 +1689,7 @@ The format sequences and their meanings are as follows.
.sp
.ne 2
.na
-\fB\fB%%\fR\fR
+\fB%%\fR
.ad
.sp .6
.RS 4n
@@ -1637,7 +1699,7 @@ A literal \fB%\fR.
.sp
.ne 2
.na
-\fB\fB%[\fIp\fR][l]R\fR\fR
+\fB%[\fIp\fR][l]R\fR
.ad
.sp .6
.RS 4n
@@ -1647,7 +1709,7 @@ The elapsed time in seconds.
.sp
.ne 2
.na
-\fB\fB%[\fIp\fR][l]U\fR\fR
+\fB%[\fIp\fR][l]U\fR
.ad
.sp .6
.RS 4n
@@ -1657,7 +1719,7 @@ The number of CPU seconds spent in user mode.
.sp
.ne 2
.na
-\fB\fB%[\fIp\fR][l]S\fR\fR
+\fB%[\fIp\fR][l]S\fR
.ad
.sp .6
.RS 4n
@@ -1667,7 +1729,7 @@ The number of CPU seconds spent in system mode.
.sp
.ne 2
.na
-\fB\fB%P\fR\fR
+\fB%P\fR
.ad
.sp .6
.RS 4n
@@ -1693,7 +1755,7 @@ is used. If the value is null, no timing information is displayed.
.sp
.ne 2
.na
-\fB\fBTMOUT\fR\fR
+\fBTMOUT\fR
.ad
.RS 14n
If set to a value greater than zero, \fBTMOUT\fR is the default time-out value
@@ -1709,7 +1771,7 @@ The shell specifies a default value to \fBTMOUT\fR.
.sp
.ne 2
.na
-\fB\fBVISUAL\fR\fR
+\fBVISUAL\fR
.ad
.RS 14n
If the value of this variable matches the pattern \fB*[Vv][Ii]*\fR, then the
@@ -1720,7 +1782,6 @@ value of \fBVISUAL\fR overrides the value of \fBEDITOR\fR.
.RE
.SS "Field Splitting"
-.LP
After parameter expansion and command substitution, the results of
substitutions are scanned for the field separator characters (those found in
\fBIFS\fR) and split into distinct fields where such characters are found.
@@ -1766,7 +1827,6 @@ In the remaining forms, a field is created for each number starting at
\fB{a,z}{1..5..3%02d}{b..c}x\fR expands to the 8 fields, \fBa01bx, a01cx,
a04bx, a04cx, z01bx, z01cx, z04bx,\fR and \fBz04cx\fR.
.SS "File Name Generation"
-.LP
Following splitting, each field is scanned for the characters \fB*\fR, \fB?\fR,
\fB(\fR, and \fB[\fR, unless the \fB-f\fR option has been set. If one of these
characters appears, then the word is regarded as a pattern.
@@ -1787,7 +1847,7 @@ character \fB\&.\fR itself. For other uses of pattern matching the \fB/\fR and
.sp
.ne 2
.na
-\fB\fB*\fR\fR
+\fB*\fR
.ad
.RS 11n
Match any string, including the null string. When used for file name expansion,
@@ -1799,7 +1859,7 @@ all files and zero or more directories and subdirectories. If the two adjacent
.sp
.ne 2
.na
-\fB\fB?\fR\fR
+\fB?\fR
.ad
.RS 11n
Matches any single character.
@@ -1813,11 +1873,11 @@ Matches any single character.
.RS 11n
Match any one of the enclosed characters. A pair of characters separated by
\fB-\fR matches any character lexically between the pair, inclusive. If the
-first character following the opening \fB[\fR is a \fB!\fR, any character not
-enclosed is matched. A \fB-\fR can be included in the character set by putting
-it as the first or last character. Within \fB[\fR and \fB]\fR, character
-classes can be specified with the syntax \fB[:\fR\fIclass\fR\fB:]\fR where
-\fIclass\fR is one of the following classes defined in the \fBANSI-C\fR
+first character following the opening \fB[\fR is a \fB!\fR or \fB^\fR, any
+character not enclosed is matched. A \fB-\fR can be included in the character
+set by putting it as the first or last character. Within \fB[\fR and \fB]\fR,
+character classes can be specified with the syntax \fB[:\fR\fIclass\fR\fB:]\fR
+where \fIclass\fR is one of the following classes defined in the \fBANSI-C\fR
standard:
.sp
.in +2
@@ -1846,7 +1906,7 @@ patterns can be formed with one or more of the following sub-patterns:
.sp
.ne 2
.na
-\fB\fB?(\fR\fIpattern-list\fR\fB)\fR\fR
+\fB?(\fR\fIpattern-list\fR\fB)\fR
.ad
.RS 22n
Optionally matches any one of the specified patterns.
@@ -1855,7 +1915,7 @@ Optionally matches any one of the specified patterns.
.sp
.ne 2
.na
-\fB\fB*(\fR\fIpattern-list\fR\fB)\fR\fR
+\fB*(\fR\fIpattern-list\fR\fB)\fR
.ad
.RS 22n
Matches zero or more occurrences of the specified patterns.
@@ -1864,7 +1924,7 @@ Matches zero or more occurrences of the specified patterns.
.sp
.ne 2
.na
-\fB\fB+(\fR\fIpattern-list\fR\fB)\fR\fR
+\fB+(\fR\fIpattern-list\fR\fB)\fR
.ad
.RS 22n
Matches one or more occurrences of the specified patterns.
@@ -1873,7 +1933,7 @@ Matches one or more occurrences of the specified patterns.
.sp
.ne 2
.na
-\fB\fB{\fR\fIn\fR\fB(\fR\fIpattern-list\fR\fB)\fR\fR
+\fB{\fR\fIn\fR\fB(\fR\fIpattern-list\fR\fB)\fR
.ad
.RS 22n
Matches \fIn\fR occurrences of the specified patterns.
@@ -1882,7 +1942,7 @@ Matches \fIn\fR occurrences of the specified patterns.
.sp
.ne 2
.na
-\fB\fB{\fR\fIm\fR\fB,\fR\fIn\fR\fB(\fR\fIpattern-list\fR\fB)\fR\fR
+\fB{\fR\fIm\fR\fB,\fR\fIn\fR\fB(\fR\fIpattern-list\fR\fB)\fR
.ad
.RS 22n
Matches from \fIm\fR to \fIn\fR occurrences of the specified patterns. If
@@ -1893,7 +1953,7 @@ occurrences are matched.
.sp
.ne 2
.na
-\fB\fB@(\fR\fIpattern-list\fR\fB)\fR\fR
+\fB@(\fR\fIpattern-list\fR\fB)\fR
.ad
.RS 22n
Matches exactly one of the specified patterns.
@@ -1902,7 +1962,7 @@ Matches exactly one of the specified patterns.
.sp
.ne 2
.na
-\fB\fB!(\fR\fIpattern-list\fR\fB)\fR\fR
+\fB!(\fR\fIpattern-list\fR\fB)\fR
.ad
.RS 22n
Matches anything except one of the specified patterns.
@@ -1925,7 +1985,7 @@ character. In addition the following escape sequences are recognized:
.sp
.ne 2
.na
-\fB\fB\ed\fR\fR
+\fB\ed\fR
.ad
.RS 7n
Matches any character in the digit class.
@@ -1934,7 +1994,7 @@ Matches any character in the digit class.
.sp
.ne 2
.na
-\fB\fB\eD\fR\fR
+\fB\eD\fR
.ad
.RS 7n
Matches any character not in the digit class.
@@ -1943,7 +2003,7 @@ Matches any character not in the digit class.
.sp
.ne 2
.na
-\fB\fB\es\fR\fR
+\fB\es\fR
.ad
.RS 7n
Matches any character in the space class.
@@ -1952,7 +2012,7 @@ Matches any character in the space class.
.sp
.ne 2
.na
-\fB\fB\eS\fR\fR
+\fB\eS\fR
.ad
.RS 7n
Matches any character not in the space class.
@@ -1961,7 +2021,7 @@ Matches any character not in the space class.
.sp
.ne 2
.na
-\fB\fB\ew\fR\fR
+\fB\ew\fR
.ad
.RS 7n
Matches any character in the word class.
@@ -1970,7 +2030,7 @@ Matches any character in the word class.
.sp
.ne 2
.na
-\fB\fB\eW\fR\fR
+\fB\eW\fR
.ad
.RS 7n
Matches any character not in the word class.
@@ -1989,7 +2049,7 @@ of a \fIpattern-pair\fR is alphanumeric except for the following:
.sp
.ne 2
.na
-\fB\fBD\fR\fR
+\fBD\fR
.ad
.RS 5n
Causes the ending character to terminate the search for this pattern without
@@ -1999,7 +2059,7 @@ finding a match.
.sp
.ne 2
.na
-\fB\fBE\fR\fR
+\fBE\fR
.ad
.RS 5n
Causes the ending character to be interpreted as an escape character.
@@ -2008,7 +2068,7 @@ Causes the ending character to be interpreted as an escape character.
.sp
.ne 2
.na
-\fB\fBL\fR\fR
+\fBL\fR
.ad
.RS 5n
Causes the ending character to be interpreted as a quote character causing all
@@ -2018,7 +2078,7 @@ characters to be ignored when looking for a match.
.sp
.ne 2
.na
-\fB\fBQ\fR\fR
+\fBQ\fR
.ad
.RS 5n
Causes the ending character to be interpreted as a quote character causing all
@@ -2044,12 +2104,14 @@ A pattern can contain sub-patterns of the form
\fB~(\fR\fIoptions\fR\fB:\fR\fIpattern-list\fR\fB)\fR, where either
\fIoptions\fR or \fB:\fR\fIpattern-list\fR can be omitted. Unlike the other
compound patterns, these sub-patterns are not counted in the numbered
-sub-patterns. If \fIoptions\fR is present, it can consist of one or more of the
+sub-patterns. \fB:\fR\fIpattern-list\fR must be omitted for options
+\fBF, G, N\fR and \fBV\fR below.
+If \fIoptions\fR is present, it can consist of one or more of the
following:
.sp
.ne 2
.na
-\fB\fB+\fR\fR
+\fB+\fR
.ad
.RS 5n
Enable the following options. This is the default.
@@ -2058,7 +2120,7 @@ Enable the following options. This is the default.
.sp
.ne 2
.na
-\fB\fB-\fR\fR
+\fB-\fR
.ad
.RS 5n
Disable the following options.
@@ -2067,7 +2129,7 @@ Disable the following options.
.sp
.ne 2
.na
-\fB\fBE\fR\fR
+\fBE\fR
.ad
.RS 5n
The remainder of the pattern uses extended regular expression syntax like the
@@ -2077,7 +2139,7 @@ The remainder of the pattern uses extended regular expression syntax like the
.sp
.ne 2
.na
-\fB\fBF\fR\fR
+\fBF\fR
.ad
.RS 5n
The remainder of the pattern uses \fBfgrep\fR(1) expression syntax.
@@ -2086,7 +2148,7 @@ The remainder of the pattern uses \fBfgrep\fR(1) expression syntax.
.sp
.ne 2
.na
-\fB\fBg\fR\fR
+\fBg\fR
.ad
.RS 5n
File the longest match (greedy).
@@ -2097,7 +2159,7 @@ This is the default.
.sp
.ne 2
.na
-\fB\fBG\fR\fR
+\fBG\fR
.ad
.RS 5n
The remainder of the pattern uses basic regular expression syntax like the
@@ -2107,7 +2169,7 @@ The remainder of the pattern uses basic regular expression syntax like the
.sp
.ne 2
.na
-\fB\fBi\fR\fR
+\fBi\fR
.ad
.RS 5n
Treat the match as case insensitive.
@@ -2116,7 +2178,7 @@ Treat the match as case insensitive.
.sp
.ne 2
.na
-\fB\fBK\fR\fR
+\fBK\fR
.ad
.RS 5n
The remainder of the pattern uses shell pattern syntax.
@@ -2127,7 +2189,7 @@ This is the default.
.sp
.ne 2
.na
-\fB\fBl\fR\fR
+\fBl\fR
.ad
.RS 5n
Left anchor the pattern.
@@ -2138,7 +2200,7 @@ This is the default for \fBK\fR style patterns.
.sp
.ne 2
.na
-\fB\fBN\fR\fR
+\fBN\fR
.ad
.RS 5n
This is ignored. However, when it is the first letter and is used with file
@@ -2149,7 +2211,7 @@ string.
.sp
.ne 2
.na
-\fB\fBr\fR\fR
+\fBr\fR
.ad
.RS 5n
Right anchor the pattern.
@@ -2158,41 +2220,40 @@ This is the default for \fBK\fR style patterns.
.RE
.sp
-.LP
-If both \fIoptions\fR and \fB:\fR\fIpattern-list\fR are specified, then the
-options apply only to \fIpattern-list\fR. Otherwise, these options remain in
-effect until they are disabled by a subsequent \fB~(...)\fR or at the end of
-the sub-pattern containing \fB~(...)\fR.
-.SS "Quoting"
-.LP
-Each of the metacharacters listed in the \fBDefinitions\fR has a special
-meaning to the shell.
+.ne 2
+.na
+\fBX\fR
+.ad
+.RS 5n
+The remainder of the pattern uses augmented regular expression syntax.
+.RE
+
.sp
.ne 2
.na
-\fB\fBg\fR\fR
+\fBP\fR
.ad
.RS 5n
-File the longest match (greedy). This is the default.
+The remainder of the pattern uses \fIperl\fR(1) regular expression syntax. Not
+all perl regular expression syntax is currently implemented.
.RE
.sp
.ne 2
.na
-\fB\fBi\fR\fR
+\fBV\fR
.ad
.RS 5n
-Treat the match as case insensitive.
+The remainder of the pattern uses System V regular expression syntax.
.RE
.sp
.LP
If both \fIoptions\fR and \fB:\fR\fIpattern-list\fR are specified, then the
-options apply only to \fIpattern-list\fR. Otherwise, the options remain in
+options apply only to \fIpattern-list\fR. Otherwise, these options remain in
effect until they are disabled by a subsequent \fB~(...)\fR or at the end of
the sub-pattern containing \fB~(...)\fR.
-.sp
-.LP
+.SS "Quoting"
Each of the metacharacters listed in the \fBDefinitions\fR section of this
manual page has a special meaning to the shell and causes termination of a word
unless quoted. A character can be quoted, that is, made to stand for itself, by
@@ -2204,7 +2265,7 @@ processed as an \fBANSI-C\fR string except for the following:
.sp
.ne 2
.na
-\fB\fB\e0\fR\fR
+\fB\e0\fR
.ad
.RS 19n
Causes the remainder of the string to be ignored.
@@ -2213,7 +2274,7 @@ Causes the remainder of the string to be ignored.
.sp
.ne 2
.na
-\fB\fB\ec\fR\fIx\fR\fR
+\fB\ec\fR\fIx\fR
.ad
.RS 19n
Expands to the character CTRL-x.
@@ -2222,7 +2283,7 @@ Expands to the character CTRL-x.
.sp
.ne 2
.na
-\fB\fB\eC\fR[\fB\&.\fR\fIname\fR\fB\&.\fR]\fR
+\fB\eC\fR[\fB\&.\fR\fIname\fR\fB\&.\fR]\fR
.ad
.RS 19n
Expands to the collating element \fIname\fR.
@@ -2231,7 +2292,7 @@ Expands to the collating element \fIname\fR.
.sp
.ne 2
.na
-\fB\fB\ee\fR\fR
+\fB\ee\fR
.ad
.RS 19n
Equivalent to the escape character (\fBASCII\fR 033),
@@ -2240,7 +2301,7 @@ Equivalent to the escape character (\fBASCII\fR 033),
.sp
.ne 2
.na
-\fB\fB\eE\fR\fR
+\fB\eE\fR
.ad
.RS 19n
Equivalent to the escape character (\fBASCII\fR 033),
@@ -2257,7 +2318,7 @@ when not quoted or when used as a variable assignment value or as a file name.
However, when used as a command argument, \fB"$*"\fR is equivalent to
\fB"$1\fId\fR$2\fId\fR..."\fR, where \fId\fR is the first character of the IFS
variable, whereas \fB"$@"\fR is equivalent to \fB"$1" "$2" ....\fR Inside grave
-quote marks (\fB``\fR), \fB\\fR quotes the characters \fB\e\fR, \fB`\fR, and
+quote marks (\fB``\fR), \fB\\\fR quotes the characters \fB\e\fR, \fB`\fR, and
\fB$\fR. If the grave quotes occur within double quotes, then \fB\e\fR also
quotes the character \fB"\fR.
.sp
@@ -2266,7 +2327,6 @@ The special meaning of reserved words or aliases can be removed by quoting any
character of the reserved word. The recognition of function names or built-in
command names cannot be altered by quoting them.
.SS "Arithmetic Evaluation"
-.LP
The shell performs arithmetic evaluation for arithmetic substitution, to
evaluate an arithmetic command, to evaluate an indexed array subscript, and to
evaluate arguments to the built-in commands \fBshift\fR and \fBlet\fR.
@@ -2275,15 +2335,17 @@ command printf that correspond to numeric format specifiers in the format
operand. See \fBprintf\fR(1). Evaluations are performed using double precision
floating point arithmetic or long double precision floating point for systems
that provide this data type. Floating point constants follow the \fBANSI-C\fR
-programming language floating point conventions. Integer constants follow the
-\fBANSI-C\fR programming language integer constant conventions although only
-single byte character constants are recognized and character casts are not
-recognized. Constants can be of the form \fB[\fR\fIbase#\fR\fB]\fR\fIn\fR where
-\fIbase\fR is a decimal number between two and sixty-four representing the
-arithmetic base and \fIn\fR is a number in that base. The digits greater than
-\fB9\fR are represented by the lower case letters, the upper case letters,
-\fB@\fR, and \fB_\fR respectively. For bases less than or equal to \fB36\fR,
-upper and lower case characters can be used interchangeably.
+programming language floating point conventions. The floating point constants
+\fBNan\fR and \fBInf\fR can be used to represent "not a number" and
+infinity respectively. Integer constants follow the \fBANSI-C\fR programming
+language integer constant conventions although only single byte character
+constants are recognized and character casts are not recognized. Constants can
+be of the form \fB[\fR\fIbase#\fR\fB]\fR\fIn\fR where \fIbase\fR is a decimal
+number between two and sixty-four representing the arithmetic base and \fIn\fR
+is a number in that base. The digits greater than \fB9\fR are represented by
+the lower case letters, the upper case letters, \fB@\fR, and \fB_\fR
+respectively. For bases less than or equal to \fB36\fR, upper and lower case
+characters can be used interchangeably.
.sp
.LP
An arithmetic expression uses the same syntax, precedence, and associativity of
@@ -2302,27 +2364,48 @@ be used within an arithmetic expression:
.sp
.in +2
.nf
-abs acos acosh asin asinh atan atan2 atanh cbrt
-copysign cos cosh erf erfc exp exp2 expm1 fabs
-fdim finite floor fma fmax fmod hypot ilogb
-int isinf isnan lgamma log log2 logb
-nearbyint nextafter nexttoward pow remainder
-rint round sin sinh sqrt tan tanh tgamma trunc
+rint round sin sinh sqrt tan tanh tgamma trunc abs acos
+acosh asin asinh atan atan2 atanh cbrt ceil copysign cos
+cosh erf erfc exp exp2 expm1 fabs fpclassify fdim finite
+floor fma fmax fmin fmod hypot ilogb int isfinite sinf isnan
+isnormal issubnormal issubor- dered iszero j0 j1 jn lgamma
+log log10 log2 logb nearbyint nextafter nexttoward pow
+remainder rint round scanb signbit sin sinh sqrt tan tanh
+tgamma trunc y0 y1 yn
.fi
.in -2
.sp
.sp
.LP
+In addition, arithmetic functions can be defined as shell functions with a
+variant of the \fBfunction\fR \fIname\fR syntax:
+
+\fBfunction .sh.math.\fR\fIname\fR \fIident\fR ... \fB{\fR \fIlist\fR \fB;}\fR
+.RS 5
+where \fIname\fR is the function name used in the arithmetic expression and
+each identified \fIident\fR is a name reference to the long double precision
+floating point argument. The value of \fB.sh.value\fR when the function returns
+is the value of this function. User defined functions can take up to 3
+arguments and override C math library functions.
+.RE
+
+.sp
+.LP
An internal representation of a \fIvariable\fR as a double precision floating
-point can be specified with the \fB-E [\fR\fIn\fR\fB]\fR or \fB-F
-[\fR\fIn\fR\fB]\fR option of the \fBtypeset\fR special built-in command. The
+point can be specified with the \fB-E [\fR\fIn\fR\fB]\fR, \fB-F
+[\fR\fIn\fR\fB]\fR, or \fB-X [\fR\fIn\fR\fB]\fR options of the \fBtypeset\fR
+special built-in command. The
\fB-E\fR option causes the expansion of the value to be represented using
scientific notation when it is expanded. The optional option argument \fIn\fR
defines the number of significant figures. The \fB-F\fR option causes the
expansion to be represented as a floating decimal number when it is expanded.
The optional option argument \fIn\fR defines the number of places after the
-decimal point in this case.
+decimal point in this case. The \fB-X\fR option causes the expansion to be
+represented using the \fB%a\fR format defined by ISO C-99. The optional option
+argument n defines the number of places after the decimal (or radix) point in
+this case.
+
.sp
.LP
An internal integer representation of a \fIvariable\fR can be specified with
@@ -2333,11 +2416,10 @@ base 10 is used.
.sp
.LP
Arithmetic evaluation is performed on the value of each assignment to a
-variable with the \fB-E\fR, \fB-F\fR, or \fB-i\fR option. Assigning a floating
-point number to a variable whose type is an integer causes the fractional part
-to be truncated.
+variable with the \fB-E\fR, \fB-F\fR, \fB-X\fR or \fB-i\fR option. Assigning a
+floating point number to a variable whose type is an integer causes the
+fractional part to be truncated.
.SS "Prompting"
-.LP
When used interactively, the shell prompts with the value of \fBPS1\fR after
expanding it for parameter expansion, command substitution, and arithmetic
substitution, before reading a command. In addition, each single \fB!\fR in the
@@ -2346,7 +2428,6 @@ prompt is replaced by the command number. A \fB!!\fR is required to place
needed to complete a command, then the secondary prompt, that is, the value of
\fBPS2\fR, is issued.
.SS "Conditional Expressions"
-.LP
A \fBconditional expression\fR is used with the \fB[[\fR compound command to
test attributes of files and to compare strings. Field splitting and file name
generation are not performed on the words between \fB[[\fR and \fB]]\fR.
@@ -2357,7 +2438,7 @@ binary expressions:
.sp
.ne 2
.na
-\fB\fB-a\fR \fIfile\fR\fR
+\fB-a\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists.
@@ -2368,7 +2449,7 @@ This option is the same as \fB-e\fR. This option is obsolete.
.sp
.ne 2
.na
-\fB\fB-b\fR \fIfile\fR\fR
+\fB-b\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is a block special file.
@@ -2377,7 +2458,7 @@ True, if \fIfile\fR exists and is a block special file.
.sp
.ne 2
.na
-\fB\fB-c\fR \fIfile\fR\fR
+\fB-c\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is a character special file.
@@ -2386,7 +2467,7 @@ True, if \fIfile\fR exists and is a character special file.
.sp
.ne 2
.na
-\fB\fB-d\fR \fIfile\fR\fR
+\fB-d\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is a directory.
@@ -2395,7 +2476,7 @@ True, if \fIfile\fR exists and is a directory.
.sp
.ne 2
.na
-\fB\fB-e\fR \fIfile\fR\fR
+\fB-e\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists.
@@ -2404,7 +2485,7 @@ True, if \fIfile\fR exists.
.sp
.ne 2
.na
-\fB\fB-f\fR \fIfile\fR\fR
+\fB-f\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is an ordinary file.
@@ -2413,7 +2494,7 @@ True, if \fIfile\fR exists and is an ordinary file.
.sp
.ne 2
.na
-\fB\fB-g\fR \fIfile\fR\fR
+\fB-g\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and it has its \fBsetgid\fR bit set.
@@ -2422,7 +2503,7 @@ True, if \fIfile\fR exists and it has its \fBsetgid\fR bit set.
.sp
.ne 2
.na
-\fB\fB-G\fR \fIfile\fR\fR
+\fB-G\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and its group matches the effective group id of this
@@ -2432,7 +2513,7 @@ process.
.sp
.ne 2
.na
-\fB\fB-h\fR \fIfile\fR\fR
+\fB-h\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is a symbolic link.
@@ -2441,7 +2522,7 @@ True, if \fIfile\fR exists and is a symbolic link.
.sp
.ne 2
.na
-\fB\fB-k\fR \fIfile\fR\fR
+\fB-k\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and it has its sticky bit set.
@@ -2450,7 +2531,7 @@ True, if \fIfile\fR exists and it has its sticky bit set.
.sp
.ne 2
.na
-\fB\fB-L\fR \fIfile\fR\fR
+\fB-L\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is a symbolic link.
@@ -2459,7 +2540,7 @@ True, if \fIfile\fR exists and is a symbolic link.
.sp
.ne 2
.na
-\fB\fB-n\fR \fIstring\fR\fR
+\fB-n\fR \fIstring\fR
.ad
.RS 21n
True, if length of \fIstring\fR is \fBnon-zero\fR.
@@ -2468,7 +2549,7 @@ True, if length of \fIstring\fR is \fBnon-zero\fR.
.sp
.ne 2
.na
-\fB\fB-N\fR \fIfile\fR\fR
+\fB-N\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and the modification time is greater than the last
@@ -2478,7 +2559,7 @@ access time.
.sp
.ne 2
.na
-\fB\fB-o\fR \fIoption\fR\fR
+\fB-o\fR \fIoption\fR
.ad
.RS 21n
True, if option named \fIoption\fR is on.
@@ -2487,7 +2568,7 @@ True, if option named \fIoption\fR is on.
.sp
.ne 2
.na
-\fB\fB-o\fR \fI?option\fR\fR
+\fB-o\fR \fI?option\fR
.ad
.RS 21n
True, if option named \fIoption\fR is a valid option name.
@@ -2496,7 +2577,7 @@ True, if option named \fIoption\fR is a valid option name.
.sp
.ne 2
.na
-\fB\fB-O\fR \fIfile\fR\fR
+\fB-O\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is owned by the effective user id of this
@@ -2506,7 +2587,7 @@ process.
.sp
.ne 2
.na
-\fB\fB-p\fR \fIfile\fR\fR
+\fB-p\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is a \fBFIFO\fR special file or a pipe.
@@ -2515,7 +2596,7 @@ True, if \fIfile\fR exists and is a \fBFIFO\fR special file or a pipe.
.sp
.ne 2
.na
-\fB\fB-r\fR \fIfile\fR\fR
+\fB-r\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is readable by current process.
@@ -2524,7 +2605,16 @@ True, if \fIfile\fR exists and is readable by current process.
.sp
.ne 2
.na
-\fB\fB-s\fR \fIfile\fR\fR
+\fB-R\fR \fIname\fR
+.ad
+.RS 21n
+True if variable \fIname\fR is a name reference.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-s\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and has size greater than zero.
@@ -2533,7 +2623,7 @@ True, if \fIfile\fR exists and has size greater than zero.
.sp
.ne 2
.na
-\fB\fB-S\fR \fIfile\fR\fR
+\fB-S\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is a socket.
@@ -2542,7 +2632,7 @@ True, if \fIfile\fR exists and is a socket.
.sp
.ne 2
.na
-\fB\fB-t\fR \fIfildes\fR\fR
+\fB-t\fR \fIfildes\fR
.ad
.RS 21n
True, if file descriptor number \fIfildes\fR is open and associated with a
@@ -2552,7 +2642,7 @@ terminal device.
.sp
.ne 2
.na
-\fB\fB-u\fR \fIfile\fR\fR
+\fB-u\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and it has its \fBsetuid\fR bit set.
@@ -2561,7 +2651,16 @@ True, if \fIfile\fR exists and it has its \fBsetuid\fR bit set.
.sp
.ne 2
.na
-\fB\fB-w\fR \fIfile\fR\fR
+\fB-v\fR \fIname\fR
+.ad
+.RS 21n
+True, if variable \fIname\fR is a valid variable name and is set.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-w\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is writable by current process.
@@ -2570,7 +2669,7 @@ True, if \fIfile\fR exists and is writable by current process.
.sp
.ne 2
.na
-\fB\fB-x\fR \fIfile\fR\fR
+\fB-x\fR \fIfile\fR
.ad
.RS 21n
True, if \fIfile\fR exists and is executable by current process. If \fIfile\fR
@@ -2581,7 +2680,7 @@ search in the directory.
.sp
.ne 2
.na
-\fB\fB-z\fR \fIstring\fR\fR
+\fB-z\fR \fIstring\fR
.ad
.RS 21n
True, if length of \fIstring\fR is zero.
@@ -2590,7 +2689,7 @@ True, if length of \fIstring\fR is zero.
.sp
.ne 2
.na
-\fB\fIfile1\fR \fB-ef\fR \fIfile2\fR\fR
+\fB\fIfile1\fR \fB-ef\fR \fIfile2\fR
.ad
.RS 21n
True, if \fIfile1\fR and \fIfile2\fR exist and refer to the same file.
@@ -2599,7 +2698,7 @@ True, if \fIfile1\fR and \fIfile2\fR exist and refer to the same file.
.sp
.ne 2
.na
-\fB\fIfile1\fR \fB-nt\fR \fIfile2\fR\fR
+\fB\fIfile1\fR \fB-nt\fR \fIfile2\fR
.ad
.RS 21n
True, if \fIfile1\fR exists and \fIfile2\fR does not, or \fIfile1\fR is newer
@@ -2609,7 +2708,7 @@ than \fIfile2\fR.
.sp
.ne 2
.na
-\fB\fIfile1\fR \fB-ot\fR \fIfile2\fR\fR
+\fB\fIfile1\fR \fB-ot\fR \fIfile2\fR
.ad
.RS 21n
True, if \fIfile2\fR exists and \fIfile1\fR does not, or \fIfile1\fR is older
@@ -2619,7 +2718,7 @@ than \fIfile2\fR.
.sp
.ne 2
.na
-\fB\fIstring\fR\fR
+\fB\fIstring\fR
.ad
.RS 21n
True, if \fIstring\fR is not null.
@@ -2628,7 +2727,7 @@ True, if \fIstring\fR is not null.
.sp
.ne 2
.na
-\fB\fIstring\fR \fB==\fR \fIpattern\fR\fR
+\fB\fIstring\fR \fB==\fR \fIpattern\fR
.ad
.RS 21n
True, if \fIstring\fR matches \fIpattern\fR. Any part of \fIpattern\fR can be
@@ -2640,7 +2739,7 @@ sub-pattern matches.
.sp
.ne 2
.na
-\fB\fIstring\fR \fB=\fR \fIpattern\fR\fR
+\fB\fIstring\fR \fB=\fR \fIpattern\fR
.ad
.RS 21n
Same as \fB==\fR, but is obsolete.
@@ -2649,7 +2748,7 @@ Same as \fB==\fR, but is obsolete.
.sp
.ne 2
.na
-\fB\fIstring\fR \fB!=\fR \fIpattern\fR\fR
+\fB\fIstring\fR \fB!=\fR \fIpattern\fR
.ad
.RS 21n
True, if \fIstring\fR does not match \fIpattern\fR. When the \fIstring\fR
@@ -2660,7 +2759,7 @@ match and sub-pattern matches.
.sp
.ne 2
.na
-\fB\fIstring\fR \fB=~\fR \fIere\fR\fR
+\fB\fIstring\fR \fB=~\fR \fIere\fR
.ad
.RS 21n
True if \fIstring\fR matches the pattern \fB~(E)\fR\fIere\fR where \fIere\fR is
@@ -2670,7 +2769,7 @@ an extended regular expression.
.sp
.ne 2
.na
-\fB\fIstring1\fR \fB<\fR \fIstring2\fR\fR
+\fB\fIstring1\fR \fB<\fR \fIstring2\fR
.ad
.RS 21n
True, if \fIstring1\fR comes before \fIstring2\fR based on \fBASCII\fR value of
@@ -2680,7 +2779,7 @@ their characters.
.sp
.ne 2
.na
-\fB\fIstring1\fR \fB>\fR \fIstring2\fR\fR
+\fB\fIstring1\fR \fB>\fR \fIstring2\fR
.ad
.RS 21n
True, if \fIstring1\fR comes after \fIstring2\fR based on \fBASCII\fR value of
@@ -2688,15 +2787,16 @@ their characters.
.RE
.sp
-.LP
-In each of the following expressions, if \fIfile\fR is of the form
+In each of the above expressions, if \fIfile\fR is of the form
\fB/dev/fd/\fR\fIn\fR, where \fIn\fR is an integer, the test is applied to the
-open file whose descriptor number is \fIn\fR. The following obsolete arithmetic
-comparisons are supported:
+open file whose descriptor number is \fIn\fR.
+.sp
+.LP
+The following obsolete arithmetic comparisons are also supported:
.sp
.ne 2
.na
-\fB\fIexp1\fR \fB-eq\fR \fIexp2\fR\fR
+\fB\fIexp1\fR \fB-eq\fR \fIexp2\fR
.ad
.RS 17n
True, if \fIexp1\fR is equal to \fIexp2\fR.
@@ -2705,7 +2805,7 @@ True, if \fIexp1\fR is equal to \fIexp2\fR.
.sp
.ne 2
.na
-\fB\fIexp1\fR \fB-ge\fR \fIexp2\fR\fR
+\fB\fIexp1\fR \fB-ge\fR \fIexp2\fR
.ad
.RS 17n
True, if \fIexp1\fR is greater than or equal to \fIexp2\fR.
@@ -2714,7 +2814,7 @@ True, if \fIexp1\fR is greater than or equal to \fIexp2\fR.
.sp
.ne 2
.na
-\fB\fIexp1\fR \fB-gt\fR \fIexp2\fR\fR
+\fB\fIexp1\fR \fB-gt\fR \fIexp2\fR
.ad
.RS 17n
True, if \fIexp1\fR is greater than \fIexp2\fR.
@@ -2723,7 +2823,7 @@ True, if \fIexp1\fR is greater than \fIexp2\fR.
.sp
.ne 2
.na
-\fB\fIexp1\fR \fB-le\fR \fIexp2\fR\fR
+\fB\fIexp1\fR \fB-le\fR \fIexp2\fR
.ad
.RS 17n
True, if \fIexp1\fR is less than or equal to \fIexp2\fR.
@@ -2732,7 +2832,7 @@ True, if \fIexp1\fR is less than or equal to \fIexp2\fR.
.sp
.ne 2
.na
-\fB\fIexp1\fR \fB-lt\fR \fIexp2\fR\fR
+\fB\fIexp1\fR \fB-lt\fR \fIexp2\fR
.ad
.RS 17n
True, if \fIexp1\fR is less than \fIexp2\fR.
@@ -2741,7 +2841,7 @@ True, if \fIexp1\fR is less than \fIexp2\fR.
.sp
.ne 2
.na
-\fB\fIexp1\fR \fB-ne\fR \fIexp2\fR\fR
+\fB\fIexp1\fR \fB-ne\fR \fIexp2\fR
.ad
.RS 17n
True, if \fIexp1\fR is not equal to \fIexp2\fR.
@@ -2754,7 +2854,7 @@ the following, listed in decreasing order of precedence:
.sp
.ne 2
.na
-\fB\fB(\fR\fIexpression\fR\fB)\fR\fR
+\fB(\fR\fIexpression\fR\fB)\fR
.ad
.RS 30n
True, if \fIexpression\fR is true. Used to group expressions.
@@ -2763,7 +2863,7 @@ True, if \fIexpression\fR is true. Used to group expressions.
.sp
.ne 2
.na
-\fB\fB!\fR \fIexpression\fR\fR
+\fB!\fR \fIexpression\fR
.ad
.RS 30n
True, if \fIexpression\fR is false.
@@ -2772,7 +2872,7 @@ True, if \fIexpression\fR is false.
.sp
.ne 2
.na
-\fB\fIexpression1\fR \fB&&\fR \fIexpression2\fR\fR
+\fB\fIexpression1\fR \fB&&\fR \fIexpression2\fR
.ad
.RS 30n
True, if \fIexpression1\fR and \fIexpression2\fR are both true.
@@ -2781,14 +2881,13 @@ True, if \fIexpression1\fR and \fIexpression2\fR are both true.
.sp
.ne 2
.na
-\fB\fIexpression1\fR \fB||\fR \fIexpression2\fR\fR
+\fB\fIexpression1\fR \fB||\fR \fIexpression2\fR
.ad
.RS 30n
True, if either \fIexpression1\fR or \fIexpression2\fR is true.
.RE
.SS "Input and Output"
-.LP
Before a command is executed, its input and output can be redirected using a
special notation interpreted by the shell. The following can appear anywhere in
a simple command or can precede or follow a command and are \fBnot\fR passed on
@@ -2813,7 +2912,7 @@ operators.
.sp
.ne 2
.na
-\fB\fB<\fR\fIword\fR\fR
+\fB<\fR\fIword\fR
.ad
.RS 14n
Use file \fIword\fR as standard input (file descriptor 0).
@@ -2822,7 +2921,7 @@ Use file \fIword\fR as standard input (file descriptor 0).
.sp
.ne 2
.na
-\fB\fB>\fR\fIword\fR\fR
+\fB>\fR\fIword\fR
.ad
.RS 14n
Use file \fIword\fR as standard output (file descriptor 1). If the file does
@@ -2833,7 +2932,7 @@ option is on, this causes an error. Otherwise, it is truncated to zero length.
.sp
.ne 2
.na
-\fB\fB>|\fR\fIword\fR\fR
+\fB>|\fR\fIword\fR
.ad
.RS 14n
Same as \fB>\fR, except that it overrides the \fBnoclobber\fR option.
@@ -2842,7 +2941,18 @@ Same as \fB>\fR, except that it overrides the \fBnoclobber\fR option.
.sp
.ne 2
.na
-\fB\fB>>\fR\fIword\fR\fR
+\fB>;\fR\fIword\fR
+.ad
+.RS 14n
+Write output to a temporary file. If the command completes successfully rename
+it to word, otherwise, delete the temporary file. >;word cannot be used with
+the \fBexec\fR(2) built-in.
+.RE
+
+.sp
+.ne 2
+.na
+\fB>>\fR\fIword\fR
.ad
.RS 14n
Use file \fIword\fR as standard output. If the file exists, then output is
@@ -2853,7 +2963,7 @@ created.
.sp
.ne 2
.na
-\fB\fB<>\fR\fIword\fR\fR
+\fB<>\fR\fIword\fR
.ad
.RS 14n
Open file \fIword\fR for reading and writing as standard input.
@@ -2862,7 +2972,7 @@ Open file \fIword\fR for reading and writing as standard input.
.sp
.ne 2
.na
-\fB\fB<<\fR\fB[-]\fR\fIword\fR\fR
+\fB<<\fR\fB[-]\fR\fIword\fR
.ad
.RS 14n
The shell input is read up to a line that is the same as \fIword\fR after any
@@ -2884,7 +2994,7 @@ columns for the purposes of determining the indentation.
.sp
.ne 2
.na
-\fB\fB<<<\fR\fIword\fR\fR
+\fB<<<\fR\fIword\fR
.ad
.RS 14n
A short form of here document in which \fIword\fR becomes the contents of the
@@ -2895,7 +3005,7 @@ arithmetic substitution occur.
.sp
.ne 2
.na
-\fB\fB<&\fR\fIdigit\fR\fR
+\fB<&\fR\fIdigit\fR
.ad
.RS 14n
The standard input is duplicated from file descriptor \fIdigit\fR, and
@@ -2905,7 +3015,7 @@ similarly for the standard output using \fB>&\fR\fIdigit\fR. See \fBdup\fR(2).
.sp
.ne 2
.na
-\fB\fB<&\fR\fIdigit\fR\fB-\fR\fR
+\fB<&\fR\fIdigit\fR\fB-\fR
.ad
.RS 14n
The file descriptor specified by \fIdigit\fR is moved to standard input.
@@ -2915,7 +3025,7 @@ Similarly for the standard output using \fB>&\fR\fIdigit\fR\fB-\fR.
.sp
.ne 2
.na
-\fB\fB<&-\fR\fR
+\fB<&-\fR
.ad
.RS 14n
The standard input is closed. Similarly for the standard output using
@@ -2925,7 +3035,7 @@ The standard input is closed. Similarly for the standard output using
.sp
.ne 2
.na
-\fB\fB<&p\fR\fR
+\fB<&p\fR
.ad
.RS 14n
The input from the co-process is moved to standard input.
@@ -2934,7 +3044,7 @@ The input from the co-process is moved to standard input.
.sp
.ne 2
.na
-\fB\fB>&p\fR\fR
+\fB>&p\fR
.ad
.RS 14n
The output to the co-process is moved to standard output.
@@ -2943,7 +3053,7 @@ The output to the co-process is moved to standard output.
.sp
.ne 2
.na
-\fB\fB<#((\fR\fIexpr\fR\fB))\fR\fR
+\fB<#((\fR\fIexpr\fR\fB))\fR
.ad
.RS 14n
Evaluate arithmetic expression \fIexpr\fR and position file descriptor 0 to the
@@ -2955,7 +3065,7 @@ when evaluating \fIexpr\fR.
.sp
.ne 2
.na
-\fB\fB>#((\fR\fIexpr\fR\fB))\fR\fR
+\fB>#((\fR\fIexpr\fR\fB))\fR
.ad
.RS 14n
The same as \fB<#\fR except applies to file descriptor 1.
@@ -2964,7 +3074,7 @@ The same as \fB<#\fR except applies to file descriptor 1.
.sp
.ne 2
.na
-\fB\fB<#\fR\fIpattern\fR\fR
+\fB<#\fR\fIpattern\fR
.ad
.RS 14n
Seek forward to the beginning of the next line containing pattern.
@@ -2973,7 +3083,7 @@ Seek forward to the beginning of the next line containing pattern.
.sp
.ne 2
.na
-\fB\fB<##\fR\fIpattern\fR\fR
+\fB<##\fR\fIpattern\fR
.ad
.RS 14n
The same as \fB<#\fR, except that the portion of the file that is skipped is
@@ -3037,7 +3147,6 @@ input for the command is the empty file \fB/dev/null\fR. Otherwise, the
environment for the execution of a command contains the file descriptors of the
invoking shell as modified by input and output specifications.
.SS "Environment"
-.LP
The \fIenvironment\fR is a list of name-value pairs that is passed to an
executed program in the same way as a normal argument list. See
\fBenviron\fR(5).
@@ -3100,7 +3209,6 @@ echo a=b c
This feature is intended for use with scripts written for early versions of the
shell and its use in new scripts is strongly discouraged.
.SS "Functions"
-.LP
For historical reasons, there are two ways to define functions, the
\fBname()\fR syntax and the \fBfunction\fR \fBname\fR syntax. These are
described in the \fBCommands\fR section of this manual page.
@@ -3149,7 +3257,6 @@ Functions that need to be defined across separate invocations of the shell
should be placed in a directory and the \fBFPATH\fR variable should contain the
name of this directory. They can also be specified in the \fBENV\fR file.
.SS "Discipline Functions"
-.LP
Each variable can have zero or more discipline functions associated with it.
The shell initially understands the discipline names \fBget\fR, \fBset\fR,
\fBappend\fR, and \fBunset\fR but on most systems others can be added at run
@@ -3175,8 +3282,87 @@ discipline function is called, \fB\&.sh.subscript\fR is the subscript of the
variable, and \fB\&.sh.value\fR contains the value being assigned inside the
\fBset\fR discipline function. For the \fBset\fR discipline, changing
\fB\&.sh.value\fR changes the value that gets assigned.
+The variable \fB_\fR is a reference to the variable including the subscript if
+any. For the set discipline, changing \fB\&.sh.value\fR will change the value
+that gets assigned. Finally, the expansion \fB${\fR \fIvar.name\fR\fB}\fR,
+when name is the name of a discipline, and there is no variable of this name,
+is equivalent to the command substitution \fB${\fR\fIvar.name\fR\fB;}\fR.
+
+.SS "Name Spaces"
+Commands and functions that are executed as part of the \fIlist\fR
+of a \fBnamespace\fR command that modify variables or create new ones, create
+a new variable whose name is the name of the name space as given by
+\fIidentifier\fR preceded by two dots (\fB\&..\fR).
+When a variable whose name is \fIname\fR is referenced, it is first searched
+for using \fB.\fR\fIidentifier\fR\fB.\fR\fIname\fR\fB.\fR
+Similarly, a function defined by a command in the \fBnamespace\fR \fIlist\fR
+is created using the name space name preceded by two dots (\fB\&..\fR).
+.PP
+When the \fIlist\fR of a \fBnamespace\fR command contains a \fBnamespace\fR
+command, the names of variables and functions that are created consist
+of the variable or function name preceded by the list of \fIidentifier\fRs
+each preceded by two dots (\fB\&..\fR).
+.PP
+Outside of a name space, a variable or function created inside a
+name space can be referenced by preceding it with the name space name.
+.PP
+By default, variables staring with \fB.sh\fR are in the \fBsh\fR name space.
+
+.SS "Typed Variables"
+Typed variables provide a way to create data structure and objects. A type can
+be defined either by a shared library, by the \fBenum\fR built-in command
+described below, or by using the new \fB-T\fR option of the \fBtypeset\fR
+built-in command. With the \fB-T\fR option of \fBtypeset\fR, the type name,
+specified as an option argument to \fB-T\fR, is set with a compound variable
+assignment that defines the type. Function definitions can appear inside the
+compound variable assignment and these become discipline functions for this
+type and can be invoked or redefined by each instance of the type. The function
+name \fBcreate\fR is treated specially. It is invoked for each instance of the
+type that is created but is not inherited and cannot be redefined for each
+instance.
+
+When a type is defined a special built-in command of that name is added. These
+built-ins are declaration commands and follow the same expansion rules as all
+the special built-in commands defined below that are preceded by a dot
+(\fB\&.\fR). These commands can subsequently be used inside further type
+definitions. The man page for these commands can be generated by using the
+\fB--man\fR option or any of the other \fB--\fR options described with
+\fBgetopts\fR. The \fB-r, -a, -A, -h\fR and \fB-S\fR options of \fBtypeset\fR
+are permitted with each of these new built-ins.
+
+An instance of a type is created by invoking the type name
+followed by one or more instance names.
+Each instance of the type is initialized with a copy of the sub-variables
+except for sub-variables that are defined with the \fB-s\fR
+option. Variables defined with \fB-S\fR are shared by all instances of the
+type. Each instance can change the value of any sub-variable and can also
+define new discipline functions of the same names as those defined by the type
+definition as well as any standard discipline names. No additional
+sub-variables can be defined for any instance.
+
+When defining a type, if the value of a sub-variable is not set and the
+\fB-r\fR attribute is specified, it causes the sub-variable to be a required
+sub-variable. Whenever an instance of a type is created, all required
+sub-variables must be specified. These sub-variables become readonly in each
+instance.
+
+When \fBunset\fR is invoked on a sub-variable within a type, and the \fB-r\fR
+attribute has not been specified for this field, the value is reset to the
+default value associative with the type. Invoking \fBunset\fR on a type
+instance not contained within another type deletes all sub-variables and the
+variable itself.
+
+A type definition can be derived from another type definition by defining the
+first sub-variable name as \fB_\fR and defining its type as the base type. Any
+remaining definitions will be additions and modifications that apply to the new
+type. If the new type name is the same is that of the base type, the type will
+be replaced and the original type will no longer be accessible.
+
+The \fBtypeset\fR command with \fB-T\fR and no option argument or operands will
+write all the type definitions to standard output in a form that that can be
+read in to create all the types.
+
.SS "Jobs"
-.LP
If the monitor option of the \fBset\fR command is turned on, an interactive
shell associates a job with each pipeline. It keeps a table of current jobs,
printed by the \fBjobs\fR command, and assigns them small integer numbers. When
@@ -3213,12 +3399,16 @@ option, then background jobs stop when they try to produce output like they do
when they try to read input.
.sp
.LP
+A job pool is a collection of jobs started with \fIlist\fR \fB&\fR associated
+with a name.
+.sp
+.LP
There are several ways to refer to jobs in the shell. A job can be referred to
by the process id of any process of the job or by one of the following:
.sp
.ne 2
.na
-\fB\fB%\fR\fInumber\fR\fR
+\fB%\fR\fInumber\fR
.ad
.RS 12n
The job with the specified number.
@@ -3227,7 +3417,25 @@ The job with the specified number.
.sp
.ne 2
.na
-\fB\fB%\fR\fIstring\fR\fR
+\fIpool\fR
+.ad
+.RS 12n
+All the jobs in the job pool named by \fIpool\fR.
+.RE
+
+.sp
+.ne 2
+.na
+\fIpool\fR\fB.\fR\fInumber\fR
+.ad
+.RS 12n
+The job number \fInumber\fR in the pool named by \fIpool\fR.
+.RE
+
+.sp
+.ne 2
+.na
+\fB%\fR\fIstring\fR
.ad
.RS 12n
Any job whose command line begins with \fIstring\fR.
@@ -3236,7 +3444,7 @@ Any job whose command line begins with \fIstring\fR.
.sp
.ne 2
.na
-\fB\fB%?\fR\fIstring\fR\fR
+\fB%?\fR\fIstring\fR
.ad
.RS 12n
Any job whose command line contains \fIstring\fR.
@@ -3245,7 +3453,7 @@ Any job whose command line contains \fIstring\fR.
.sp
.ne 2
.na
-\fB\fB%%\fR\fR
+\fB%%\fR
.ad
.RS 12n
Current job.
@@ -3254,7 +3462,7 @@ Current job.
.sp
.ne 2
.na
-\fB\fB%+\fR\fR
+\fB%+\fR
.ad
.RS 12n
Equivalent to \fB%%\fR.
@@ -3263,13 +3471,21 @@ Equivalent to \fB%%\fR.
.sp
.ne 2
.na
-\fB\fB%-\fR\fR
+\fB%-\fR
.ad
.RS 12n
Previous job.
.RE
.sp
+.ne 2
+In addition, unless noted otherwise, wherever a job can be specified,
+the name of a background job pool can be used to represent all the
+jobs in that pool.
+.na
+.ad
+
+.sp
.LP
The shell learns immediately whenever a process changes state. It normally
informs you whenever a job becomes blocked so that no further progress is
@@ -3289,13 +3505,11 @@ does not warn you a second time, and the stopped jobs are terminated. When a
login shell receives a \fBHUP\fR signal, it sends a \fBHUP\fR signal to each
job that has not been disowned with the \fBdisown\fR built-in command.
.SS "Signals"
-.LP
The \fBINT\fR and \fBQUIT\fR signals for an invoked command are ignored if the
command is followed by \fB&\fR and the \fBmonitor\fR option is not active.
Otherwise, signals have the values inherited by the shell from its parent. See
the \fBtrap\fR built-in command.
.SS "Execution"
-.LP
Each time a command is read, the substitutions are carried out. If the command
name matches one of the ones in the \fBSpecial Built-in Commands\fR section of
this manual page, it is executed within the current shell process. Next, the
@@ -3310,53 +3524,80 @@ special built-in command or a user defined function, but it is one of the
built-in commands, it is executed in the current shell process.
.sp
.LP
-The shell variable \fBPATH\fR defines the search path for the directory
-containing the command. Alternative directory names are separated by a colon
-(\fB:\fR). The default path is \fB/bin:/usr/bin:\fR, specifying \fB/bin\fR,
-\fB/usr/bin\fR, and the current directory in that order. The current directory
-can be specified by two or more adjacent colons, or by a colon at the beginning
-or end of the path list. If the command name contains a slash (\fB/\fR), the
-search path is not used. Otherwise, each directory in the path is searched for
-an executable file of the specified name that is not a directory. If found, and
-if the shell determines that there is a built-in version of a command
-corresponding to a specified pathname, this built-in is invoked in the current
-process. If found, and this directory is also contained in the value of the
-\fBFPATH\fR variable, then this file is loaded into the current shell
-environment as if it were the argument to the . command except that only preset
-aliases are expanded, and a function of the specified name is executed as
-described in this manual page. If not found, and the file \fB\&.paths\fR is
-found, and this file contains a line of the form \fBFPATH=\fR\fIpath\fR where
-\fIpath\fR is an existing directory, and this directory contains a file of the
-specified name, then this file is loaded into the current shell environment as
-if it were the argument to the \fB\&. special\fR built-in command and a
-function of the specified name is executed. Otherwise, if found, a process is
-created and an attempt is made to execute the command using \fBexec\fR(2).
+The shell variables \fBPATH\fR and \fBFPATH\fR define the search path for the
+directory containing the command. Alternative directory names are separated by
+a colon (\fB:\fR). The default path is \fB/bin:/usr/bin:\fR, specifying
+\fB/bin\fR, \fB/usr/bin\fR, and the current directory in that order. The
+current directory can be specified by two or more adjacent colons, or by a
+colon at the beginning or end of the path list. If the command name contains a
+slash (\fB/\fR), the search path is not used. Otherwise, each directory in the
+list of directories defined by \fBPATH\fR and \fBFPATH\fR is checked in order.
+If the directory being searched is contained in the value of the \fBFPATH\fR
+variable and contains a file whose name matches the command being searched,
+then this file is loaded into the current shell environment as if it were the
+argument to the . command except that only preset aliases are expanded, and a
+function of the specified name is executed as described in this manual page.
.sp
.LP
-When an executable is found, the directory where it is found in is searched for
-a file named \fB\&.paths\fR. If this file is found and it contains a line of
-the form \fBBUILTIN_LIB=\fR\fIvalue\fR, the library named by \fIvalue\fR is
-searched for as if it were an option argument to \fBbuiltin -f\fR, and if it
-contains a built-in of the specified name this is executed instead of a command
-by this name. Otherwise, if this file is found and it contains a line of the
-form \fIname\fR\fB=\fR\fIvalue\fR in the first or second line, then the
-environment variable \fIname\fR is modified by prepending the directory
-specified by \fIvalue\fR to the directory list. If \fIvalue\fR is not an
-absolute directory, then it specifies a directory relative to the directory
-that the executable was found. If the environment variable \fIname\fR does not
-already exist it is added to the environment list for the specified command.
+If this directory is not in \fBFPATH\fR, the shell first determines whether
+there is a built-in version of a command corresponding to a given pathname and,
+if so, it is invoked in the current process. If no built-in is found, the shell
+checks for a file named \fB\&.paths\fR in this directory. If found and there is
+a line of the form:
+.sp
+.in +2
+\fBFPATH=\fR\fIpath\fR
+.in -2
+.sp
+where \fIpath\fR is an existing directory, then that directory is searched
+immediately after the current directory as if it were found in the \fBFPATH\fR
+variable. If \fIpath\fR does not begin with \fB/\fR, it is checked for relative
+to the directory being searched.
.sp
.LP
+The \fB\&.paths\fR file is then checked for a line of the form:
+.sp
+.in +2
+\fBPLUGIN_LIB=\fR\fIlibname\fR [ \fB:\fR \fIlibname\fR \fB]\fR ...
+.in -2
+.sp
+Each library named by \fIlibname\fR will be searched for as if it were an
+option argument to \fBbuiltin -f\fR and, if it contains a built-in of the
+specified name, this is executed instead of a command by this name.
+.sp
+.LP
+Any built-in loaded from a library found this way will be associated with the
+directory containing the \fB.paths\fR file so it will only execute if not found
+in an earlier directory.
+.sp
+.LP
+Finally, the directory will be checked for a file of the given name.
If the file has execute permission but is not an \fBa.out\fR file, it is
assumed to be a file containing shell commands. A separate shell is spawned to
read it. All non-exported variables are removed in this case. If the shell
command file doesn't have read permission, and/or if the \fBsetuid\fR and
\fBsetgid\fR bits are set on the file, then the shell executes an agent whose
job it is to set up the permissions and execute the shell with the shell
-command file passed down as an open file. A parenthesized command is executed
-in a sub-shell without removing non-exported variables.
+command file passed down as an open file.
+
+If the \fB.paths\fR contains a line of the form:
+.sp
+.in +2
+\fBname=\fR\fIvalue\fR
+.in -2
+.sp
+in the
+first or second line, then the environment variable \fIname\fR is modified by
+prepending the directory specified by \fIvalue\fR to the directory list. If
+\fIvalue\fR is not an absolute directory, then it specifies a directory
+relative to the directory in which the executable was found. If the environment
+variable \fIname\fR does not already exist it will be added to the environment
+list for the specified command.
+
+A parenthesized command is executed in a sub-shell without removing
+non-exported variables.
+
.SS "Command Re-entry"
-.LP
The text of the last \fBHISTSIZE\fR (default 512) commands entered from a
terminal device is saved in a history file. The file \fB$HOME/.sh_history\fR is
used if the \fBHISTFILE\fR variable is not set or if the file it names is not
@@ -3378,7 +3619,6 @@ execution. For example, with the preset alias \fBr\fR, which is aliased to
command which starts with the letter \fBc\fR, replacing the first occurrence of
the string bad with the string good.
.SS "Inline Editing Options"
-.LP
Normally, each command line entered from a terminal device is simply typed
followed by a NEWLINE (RETURN or LINE FEED). If either the \fBemacs\fR,
\fBgmacs\fR, or \fBvi\fR option is active, the user can edit the command line.
@@ -3433,7 +3673,6 @@ does not yield a unique match, a subsequent TAB provides a numbered list of
matching alternatives. A specific selection can be made by entering the
selection number followed by a TAB.
.SS "Key Bindings"
-.LP
The \fBKEYBD\fR trap can be used to intercept keys as they are typed and change
the characters that are actually seen by the shell. This trap is executed after
each character (or sequence of characters when the first character is ESC) is
@@ -3454,7 +3693,6 @@ already in this mode.
This trap is not invoked for characters entered as arguments to editing
directives, or while reading input for a character search.
.SS "\fBemacs\fR Editing Mode"
-.LP
This mode is entered by enabling either the \fBemacs\fR or \fBgmacs\fR option.
The only difference between these two modes is the way they handle \fB^T\fR. To
edit, the user moves the cursor to the point needing correction and then
@@ -3480,7 +3718,7 @@ except when noted.
.sp
.ne 2
.na
-\fB\fB^F\fR\fR
+\fB^F\fR
.ad
.RS 13n
Move the cursor forward (right) one character.
@@ -3489,7 +3727,7 @@ Move the cursor forward (right) one character.
.sp
.ne 2
.na
-\fB\fBM-[C\fR\fR
+\fBM-[C\fR
.ad
.RS 13n
Move the cursor forward (right) one character.
@@ -3498,7 +3736,7 @@ Move the cursor forward (right) one character.
.sp
.ne 2
.na
-\fB\fBM-f\fR\fR
+\fBM-f\fR
.ad
.RS 13n
Move the cursor forward one word. The \fBemacs\fR editor's idea of a word is a
@@ -3508,7 +3746,7 @@ string of characters consisting of only letters, digits and underscores.
.sp
.ne 2
.na
-\fB\fB^B\fR\fR
+\fB^B\fR
.ad
.RS 13n
Move the cursor backward (left) one character.
@@ -3517,7 +3755,7 @@ Move the cursor backward (left) one character.
.sp
.ne 2
.na
-\fB\fBM-[D\fR\fR
+\fBM-[D\fR
.ad
.RS 13n
Move the cursor backward (left) one character.
@@ -3526,7 +3764,7 @@ Move the cursor backward (left) one character.
.sp
.ne 2
.na
-\fB\fBM-b\fR\fR
+\fBM-b\fR
.ad
.RS 13n
Move the cursor backward one word.
@@ -3535,7 +3773,7 @@ Move the cursor backward one word.
.sp
.ne 2
.na
-\fB\fB^A\fR\fR
+\fB^A\fR
.ad
.RS 13n
Move the cursor to the beginning of the line.
@@ -3544,7 +3782,7 @@ Move the cursor to the beginning of the line.
.sp
.ne 2
.na
-\fB\fBM-[H\fR\fR
+\fBM-[H\fR
.ad
.RS 13n
Move the cursor to the beginning of the line.
@@ -3553,7 +3791,7 @@ Move the cursor to the beginning of the line.
.sp
.ne 2
.na
-\fB\fB^E\fR\fR
+\fB^E\fR
.ad
.RS 13n
Move the cursor to the end of the line.
@@ -3562,7 +3800,7 @@ Move the cursor to the end of the line.
.sp
.ne 2
.na
-\fB\fBM-[Y\fR\fR
+\fBM-[Y\fR
.ad
.RS 13n
Move the cursor to the end of line.
@@ -3571,7 +3809,7 @@ Move the cursor to the end of line.
.sp
.ne 2
.na
-\fB\fB^]\fR\fIchar\fR\fR
+\fB^]\fR\fIchar\fR
.ad
.RS 13n
Move the cursor forward to the character \fIchar\fR on the current line.
@@ -3580,7 +3818,7 @@ Move the cursor forward to the character \fIchar\fR on the current line.
.sp
.ne 2
.na
-\fB\fBM-^]\fR\fIchar\fR\fR
+\fBM-^]\fR\fIchar\fR
.ad
.RS 13n
Move the cursor backwards to the character \fIchar\fR on the current line.
@@ -3589,7 +3827,7 @@ Move the cursor backwards to the character \fIchar\fR on the current line.
.sp
.ne 2
.na
-\fB\fB^X^X\fR\fR
+\fB^X^X\fR
.ad
.RS 13n
Interchange the cursor and the mark.
@@ -3598,7 +3836,7 @@ Interchange the cursor and the mark.
.sp
.ne 2
.na
-\fB\fIerase\fR\fR
+\fB\fIerase\fR
.ad
.RS 13n
Delete the previous character. The user-defined erase character is defined by
@@ -3608,7 +3846,7 @@ the \fBstty\fR(1) command, and is usually \fB^H\fR or \fB#\fR.
.sp
.ne 2
.na
-\fB\fIlnext\fR\fR
+\fB\fIlnext\fR
.ad
.RS 13n
Removes the next character's editing features. The user-defined literal next
@@ -3619,7 +3857,7 @@ defined.
.sp
.ne 2
.na
-\fB\fB^D\fR\fR
+\fB^D\fR
.ad
.RS 13n
Delete the current character.
@@ -3628,7 +3866,7 @@ Delete the current character.
.sp
.ne 2
.na
-\fB\fBM-d\fR\fR
+\fBM-d\fR
.ad
.RS 13n
Delete the current word.
@@ -3637,7 +3875,7 @@ Delete the current word.
.sp
.ne 2
.na
-\fB\fBM-^H\fR\fR
+\fBM-^H\fR
.ad
.RS 13n
MetaBACKSPACE. Delete the previous word.
@@ -3646,7 +3884,7 @@ MetaBACKSPACE. Delete the previous word.
.sp
.ne 2
.na
-\fB\fBM-h\fR\fR
+\fBM-h\fR
.ad
.RS 13n
Delete the previous word.
@@ -3655,7 +3893,7 @@ Delete the previous word.
.sp
.ne 2
.na
-\fB\fBM-^?\fR\fR
+\fBM-^?\fR
.ad
.RS 13n
MetaDEL. Delete the previous word. If your interrupt character is \fB^?\fR
@@ -3665,7 +3903,7 @@ MetaDEL. Delete the previous word. If your interrupt character is \fB^?\fR
.sp
.ne 2
.na
-\fB\fB^T\fR\fR
+\fB^T\fR
.ad
.RS 13n
Transpose the current character with the previous character, and advance the
@@ -3676,7 +3914,7 @@ mode.
.sp
.ne 2
.na
-\fB\fB^C\fR\fR
+\fB^C\fR
.ad
.RS 13n
Capitalize the current character.
@@ -3685,7 +3923,7 @@ Capitalize the current character.
.sp
.ne 2
.na
-\fB\fBM-c\fR\fR
+\fBM-c\fR
.ad
.RS 13n
Capitalize the current word.
@@ -3694,7 +3932,7 @@ Capitalize the current word.
.sp
.ne 2
.na
-\fB\fBM-l\fR\fR
+\fBM-l\fR
.ad
.RS 13n
Change the current word to lower case.
@@ -3703,7 +3941,7 @@ Change the current word to lower case.
.sp
.ne 2
.na
-\fB\fB^K\fR\fR
+\fB^K\fR
.ad
.RS 13n
Delete from the cursor to the end of the line. If preceded by a numerical
@@ -3716,7 +3954,7 @@ to specified cursor position.
.sp
.ne 2
.na
-\fB\fB^W\fR\fR
+\fB^W\fR
.ad
.RS 13n
Kill from the cursor to the mark.
@@ -3725,7 +3963,7 @@ Kill from the cursor to the mark.
.sp
.ne 2
.na
-\fB\fBM-p\fR\fR
+\fBM-p\fR
.ad
.RS 13n
Push the region from the cursor to the mark on the stack.
@@ -3734,7 +3972,7 @@ Push the region from the cursor to the mark on the stack.
.sp
.ne 2
.na
-\fB\fIkill\fR\fR
+\fB\fIkill\fR
.ad
.RS 13n
Kill the entire current line. The user-defined kill character is defined by the
@@ -3746,7 +3984,7 @@ This is useful when using paper terminals.
.sp
.ne 2
.na
-\fB\fB^Y\fR\fR
+\fB^Y\fR
.ad
.RS 13n
Restore the last item removed from line. Yank the item back to the line.
@@ -3755,7 +3993,7 @@ Restore the last item removed from line. Yank the item back to the line.
.sp
.ne 2
.na
-\fB\fB^L\fR\fR
+\fB^L\fR
.ad
.RS 13n
Line feed and print the current line.
@@ -3764,7 +4002,7 @@ Line feed and print the current line.
.sp
.ne 2
.na
-\fB\fBM-^L\fR\fR
+\fBM-^L\fR
.ad
.RS 13n
Clear the screen.
@@ -3773,7 +4011,7 @@ Clear the screen.
.sp
.ne 2
.na
-\fB\fB^@\fR\fR
+\fB^@\fR
.ad
.RS 13n
Null character. Set mark.
@@ -3782,7 +4020,7 @@ Null character. Set mark.
.sp
.ne 2
.na
-\fB\fBM-\fR\fIspace\fR\fR
+\fBM-\fR\fIspace\fR
.ad
.RS 13n
MetaSPACE. Set the mark.
@@ -3791,7 +4029,7 @@ MetaSPACE. Set the mark.
.sp
.ne 2
.na
-\fB\fB^J\fR\fR
+\fB^J\fR
.ad
.RS 13n
New line. Execute the current line.
@@ -3800,7 +4038,7 @@ New line. Execute the current line.
.sp
.ne 2
.na
-\fB\fB^M\fR\fR
+\fB^M\fR
.ad
.RS 13n
Return. Execute the current line.
@@ -3809,7 +4047,7 @@ Return. Execute the current line.
.sp
.ne 2
.na
-\fB\fBEOF\fR\fR
+\fBEOF\fR
.ad
.RS 13n
End-of-file character, normally \fB^D\fR, is processed as an \fBend-of-file\fR
@@ -3819,7 +4057,7 @@ only if the current line is null.
.sp
.ne 2
.na
-\fB\fB^P\fR\fR
+\fB^P\fR
.ad
.RS 13n
Fetch the previous command. Each time \fB^P\fR is entered the previous command
@@ -3830,7 +4068,7 @@ of a multi-line command.
.sp
.ne 2
.na
-\fB\fBM-[A\fR\fR
+\fBM-[A\fR
.ad
.RS 13n
Equivalent to \fB^P\fR.
@@ -3839,7 +4077,7 @@ Equivalent to \fB^P\fR.
.sp
.ne 2
.na
-\fB\fBM-<\fR\fR
+\fBM-<\fR
.ad
.RS 13n
Fetch the least recent (oldest) history line.
@@ -3848,7 +4086,7 @@ Fetch the least recent (oldest) history line.
.sp
.ne 2
.na
-\fB\fBM->\fR\fR
+\fBM->\fR
.ad
.RS 13n
Fetch the most recent (youngest) history line.
@@ -3857,7 +4095,7 @@ Fetch the most recent (youngest) history line.
.sp
.ne 2
.na
-\fB\fB^N\fR\fR
+\fB^N\fR
.ad
.RS 13n
Fetch the next command line. Each time \fB^N\fR is entered the next command
@@ -3867,7 +4105,7 @@ line forward in time is accessed.
.sp
.ne 2
.na
-\fB\fBM-[B\fR\fR
+\fBM-[B\fR
.ad
.RS 13n
Equivalent to \fB^N\fR.
@@ -3876,7 +4114,7 @@ Equivalent to \fB^N\fR.
.sp
.ne 2
.na
-\fB\fB^R\fR\fIstring\fR\fR
+\fB^R\fR\fIstring\fR
.ad
.RS 13n
Reverse search history for a previous command line containing \fIstring\fR. If
@@ -3890,7 +4128,7 @@ case a parameter of zero reverses the direction of the search.
.sp
.ne 2
.na
-\fB\fB^O\fR\fR
+\fB^O\fR
.ad
.RS 13n
Operate. Execute the current line and fetch the next line relative to current
@@ -3900,7 +4138,7 @@ line from the history file.
.sp
.ne 2
.na
-\fB\fBM-\fR\fIdigits\fR\fR
+\fBM-\fR\fIdigits\fR
.ad
.RS 13n
Escape. Define numeric parameter. The digits are taken as a parameter to the
@@ -3913,7 +4151,7 @@ next command. The commands that accept a parameter are: \fB^F\fR, \fB^B\fR,
.sp
.ne 2
.na
-\fB\fBM-\fR\fIletter\fR\fR
+\fBM-\fR\fIletter\fR
.ad
.RS 13n
Soft-key. Search the alias list for an alias by the name \fIletter\fR. If an
@@ -3924,7 +4162,7 @@ alias of \fIletter\fR is defined, insert its value on the input queue.
.sp
.ne 2
.na
-\fB\fBM-[\fR\fIletter\fR\fR
+\fBM-[\fR\fIletter\fR
.ad
.RS 13n
Soft key. Search the alias list for an alias by the name \fIletter\fR. If an
@@ -3935,7 +4173,7 @@ used to program function keys on many terminals.
.sp
.ne 2
.na
-\fB\fBM-.\fR\fR
+\fBM-.\fR
.ad
.RS 13n
The last word of the previous command is inserted on the line. If preceded by a
@@ -3946,7 +4184,7 @@ rather than the last word.
.sp
.ne 2
.na
-\fB\fBM-_\fR\fR
+\fBM-_\fR
.ad
.RS 13n
Same as \fBM-.\fR.
@@ -3955,7 +4193,7 @@ Same as \fBM-.\fR.
.sp
.ne 2
.na
-\fB\fBM-*\fR\fR
+\fBM-*\fR
.ad
.RS 13n
Attempt filename generation on the current word. As asterisk is appended if the
@@ -3965,7 +4203,7 @@ word does not match any file or contain any special pattern characters.
.sp
.ne 2
.na
-\fB\fBM-\fRESC\fR
+\fBM-\fRESC\fR
.ad
.RS 13n
Command or file name completion as described in this manual page.
@@ -3974,7 +4212,7 @@ Command or file name completion as described in this manual page.
.sp
.ne 2
.na
-\fB\fB^I\fRTAB\fR
+\fB^I\fRTAB\fR
.ad
.RS 13n
Attempts command or file name completion as described in this manual page. If a
@@ -3985,7 +4223,7 @@ If no match is found or entered after SPACE, a TAB is inserted.
.sp
.ne 2
.na
-\fB\fBM-=\fR\fR
+\fBM-=\fR
.ad
.RS 13n
If not preceded by a numeric parameter, generates the list of matching commands
@@ -3998,7 +4236,7 @@ is not on a word, the word is inserted instead.
.sp
.ne 2
.na
-\fB\fB^U\fR\fR
+\fB^U\fR
.ad
.RS 13n
Multiply parameter of next command by \fB4\fR.
@@ -4007,7 +4245,7 @@ Multiply parameter of next command by \fB4\fR.
.sp
.ne 2
.na
-\fB\fB\e\fR\fR
+\fB\e\fR
.ad
.RS 13n
Escape the next character. Editing characters, the user's erase, kill and
@@ -4019,7 +4257,7 @@ character's editing features, if any.
.sp
.ne 2
.na
-\fB\fBM-^V\fR\fR
+\fBM-^V\fR
.ad
.RS 13n
Display the version of the shell.
@@ -4028,7 +4266,7 @@ Display the version of the shell.
.sp
.ne 2
.na
-\fB\fBM-#\fR\fR
+\fBM-#\fR
.ad
.RS 13n
If the line does not begin with a \fB#\fR, a \fB#\fR is inserted at the
@@ -4039,7 +4277,6 @@ deleted.
.RE
.SS "\fBvi\fR Editing Mode"
-.LP
There are two typing modes. Initially, when you enter a command you are in the
input mode. To edit, the user enters control mode by typing ESC (033) and moves
the cursor to the point needing correction and then inserts or deletes
@@ -4060,7 +4297,6 @@ If the option \fBviraw\fR is also set, the terminal is always have canonical
processing disabled. This mode is implicit for systems that do not support two
alternate end of line delimiters, and might be helpful for certain terminals.
.SS "Input Edit Commands"
-.LP
By default the editor is in input mode.
.sp
.LP
@@ -4078,7 +4314,7 @@ User defined erase character as defined by the \fBstty\fR command, usually
.sp
.ne 2
.na
-\fB\fB^W\fR\fR
+\fB^W\fR
.ad
.RS 10n
Delete the previous blank separated word. On some systems the \fBviraw\fR
@@ -4098,7 +4334,7 @@ As the first character of the line causes the shell to terminate unless the
.sp
.ne 2
.na
-\fB\fIlnext\fR\fR
+\fB\fIlnext\fR
.ad
.RS 10n
User defined literal next character as defined by the \fBstty\fR(1) or \fB^V\fR
@@ -4109,7 +4345,7 @@ systems the \fBviraw\fR option might be required for this to work.
.sp
.ne 2
.na
-\fB\fB\e\fR\fR
+\fB\e\fR
.ad
.RS 10n
Escape the next ERASE or KILL character.
@@ -4118,7 +4354,7 @@ Escape the next ERASE or KILL character.
.sp
.ne 2
.na
-\fB\fB^I\fR TAB\fR
+\fB^I\fR TAB\fR
.ad
.RS 10n
Attempts command or file name completion as described in this manual page and
@@ -4128,7 +4364,6 @@ after SPACE, a TAB is inserted.
.RE
.SS "Motion Edit Commands"
-.LP
The motion edit commands move the cursor.
.sp
.LP
@@ -4136,7 +4371,7 @@ The following motion edit commands are supported:
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]l\fR\fR
+\fB[\fR\fIcount\fR\fB]l\fR
.ad
.RS 13n
Move the cursor forward (right) one character.
@@ -4145,7 +4380,7 @@ Move the cursor forward (right) one character.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB][C\fR\fR
+\fB[\fR\fIcount\fR\fB][C\fR
.ad
.RS 13n
Move the cursor forward (right) one character.
@@ -4154,7 +4389,7 @@ Move the cursor forward (right) one character.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]w\fR\fR
+\fB[\fR\fIcount\fR\fB]w\fR
.ad
.RS 13n
Move the cursor forward one alphanumeric word.
@@ -4163,7 +4398,7 @@ Move the cursor forward one alphanumeric word.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]W\fR\fR
+\fB[\fR\fIcount\fR\fB]W\fR
.ad
.RS 13n
Move the cursor to the beginning of the next word that follows a blank.
@@ -4172,7 +4407,7 @@ Move the cursor to the beginning of the next word that follows a blank.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]e\fR\fR
+\fB[\fR\fIcount\fR\fB]e\fR
.ad
.RS 13n
Move the cursor to the end of the word.
@@ -4181,7 +4416,7 @@ Move the cursor to the end of the word.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]E\fR\fR
+\fB[\fR\fIcount\fR\fB]E\fR
.ad
.RS 13n
Move the cursor to the end of the current blank delimited word.
@@ -4190,7 +4425,7 @@ Move the cursor to the end of the current blank delimited word.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]h\fR\fR
+\fB[\fR\fIcount\fR\fB]h\fR
.ad
.RS 13n
Move the cursor backward (left) one character.
@@ -4199,7 +4434,7 @@ Move the cursor backward (left) one character.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB][D\fR\fR
+\fB[\fR\fIcount\fR\fB][D\fR
.ad
.RS 13n
Move the cursor backward (left) one character.
@@ -4208,7 +4443,7 @@ Move the cursor backward (left) one character.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]b\fR\fR
+\fB[\fR\fIcount\fR\fB]b\fR
.ad
.RS 13n
Move the cursor backward one word.
@@ -4217,7 +4452,7 @@ Move the cursor backward one word.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]B\fR\fR
+\fB[\fR\fIcount\fR\fB]B\fR
.ad
.RS 13n
Move the cursor to the preceding blank separated word.
@@ -4226,7 +4461,7 @@ Move the cursor to the preceding blank separated word.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]|\fR\fR
+\fB[\fR\fIcount\fR\fB]|\fR
.ad
.RS 13n
Move the cursor to column \fIcount\fR.
@@ -4235,7 +4470,7 @@ Move the cursor to column \fIcount\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]f\fR\fIc\fR\fR
+\fB[\fR\fIcount\fR\fB]f\fR\fIc\fR
.ad
.RS 13n
Find the next character \fIc\fR in the current line.
@@ -4244,7 +4479,7 @@ Find the next character \fIc\fR in the current line.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]F\fR\fIc\fR\fR
+\fB[\fR\fIcount\fR\fB]F\fR\fIc\fR
.ad
.RS 13n
Find the previous character \fIc\fR in the current line.
@@ -4253,7 +4488,7 @@ Find the previous character \fIc\fR in the current line.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]t\fR\fIC\fR\fR
+\fB[\fR\fIcount\fR\fB]t\fR\fIC\fR
.ad
.RS 13n
Equivalent to \fBf\fR followed by \fBh\fR.
@@ -4262,7 +4497,7 @@ Equivalent to \fBf\fR followed by \fBh\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]T\fR\fIc\fR\fR
+\fB[\fR\fIcount\fR\fB]T\fR\fIc\fR
.ad
.RS 13n
Equivalent to \fBF\fR followed by \fBl\fR.
@@ -4271,7 +4506,7 @@ Equivalent to \fBF\fR followed by \fBl\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB];\fR\fR
+\fB[\fR\fIcount\fR\fB];\fR
.ad
.RS 13n
Repeat \fIcount\fR times the last single character find command: \fBf\fR,
@@ -4281,7 +4516,7 @@ Repeat \fIcount\fR times the last single character find command: \fBf\fR,
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB],\fR\fR
+\fB[\fR\fIcount\fR\fB],\fR
.ad
.RS 13n
Reverse the last single character find command \fIcount\fR times.
@@ -4290,7 +4525,7 @@ Reverse the last single character find command \fIcount\fR times.
.sp
.ne 2
.na
-\fB\fB0\fR\fR
+\fB0\fR
.ad
.RS 13n
Move the cursor to the start of line.
@@ -4299,7 +4534,7 @@ Move the cursor to the start of line.
.sp
.ne 2
.na
-\fB\fB^\fR\fR
+\fB^\fR
.ad
.RS 13n
Move the cursor to start of line.
@@ -4308,7 +4543,7 @@ Move the cursor to start of line.
.sp
.ne 2
.na
-\fB\fB[H\fR\fR
+\fB[H\fR
.ad
.RS 13n
Move the cursor to the first non-blank character in the line.
@@ -4317,7 +4552,7 @@ Move the cursor to the first non-blank character in the line.
.sp
.ne 2
.na
-\fB\fB$\fR\fR
+\fB$\fR
.ad
.RS 13n
Move the cursor to the end of the line.
@@ -4326,7 +4561,7 @@ Move the cursor to the end of the line.
.sp
.ne 2
.na
-\fB\fB[Y\fR\fR
+\fB[Y\fR
.ad
.RS 13n
Move the cursor to the end of the line.
@@ -4335,7 +4570,7 @@ Move the cursor to the end of the line.
.sp
.ne 2
.na
-\fB\fB%\fR\fR
+\fB%\fR
.ad
.RS 13n
Moves to balancing \fB(\fR, \fB)\fR, \fB{\fR, \fB}\fR, \fB[\fR, or \fB]\fR. If
@@ -4345,7 +4580,6 @@ first.
.RE
.SS "Search Edit Commands"
-.LP
The search edit commands access your command history.
.sp
.LP
@@ -4353,7 +4587,7 @@ The following search edit commands are supported:
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]k\fR\fR
+\fB[\fR\fIcount\fR\fB]k\fR
.ad
.RS 13n
Fetch the previous command. Each time \fBk\fR is entered, the previous command
@@ -4363,7 +4597,7 @@ back in time is accessed.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]-\fR\fR
+\fB[\fR\fIcount\fR\fB]-\fR
.ad
.RS 13n
Fetch the previous command. Each time \fBk\fR is entered, the previous command
@@ -4375,7 +4609,7 @@ Equivalent to \fBk\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB][A\fR\fR
+\fB[\fR\fIcount\fR\fB][A\fR
.ad
.RS 13n
Fetch the previous command. Each time \fBk\fR is entered, the previous command
@@ -4387,7 +4621,7 @@ Equivalent to \fBk\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]j\fR\fR
+\fB[\fR\fIcount\fR\fB]j\fR
.ad
.RS 13n
Fetch the next command. Each time \fBj\fR is entered, the next command forward
@@ -4397,7 +4631,7 @@ in time is accessed.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]+\fR\fR
+\fB[\fR\fIcount\fR\fB]+\fR
.ad
.RS 13n
Fetch the next command. Each time \fBj\fR is entered, the next command forward
@@ -4409,7 +4643,7 @@ Equivalent to \fBj\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB][B\fR\fR
+\fB[\fR\fIcount\fR\fB][B\fR
.ad
.RS 13n
Fetch the next command. Each time \fBj\fR is entered, the next command forward
@@ -4421,7 +4655,7 @@ Equivalent to \fBj\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]G\fR\fR
+\fB[\fR\fIcount\fR\fB]G\fR
.ad
.RS 13n
Fetch command number \fIcount\fR. The default is the least recent history
@@ -4431,7 +4665,7 @@ command.
.sp
.ne 2
.na
-\fB\fB/\fR\fIstring\fR\fR
+\fB/\fR\fIstring\fR
.ad
.RS 13n
Search backward through history for a previous command containing \fIstring\fR.
@@ -4443,7 +4677,7 @@ null, the previous string is used.
.sp
.ne 2
.na
-\fB\fB?\fR\fIstring\fR\fR
+\fB?\fR\fIstring\fR
.ad
.RS 13n
Search forward through history for a previous command containing \fIstring\fR.
@@ -4457,7 +4691,7 @@ Same as \fI/\fR except that search is in the forward direction.
.sp
.ne 2
.na
-\fB\fBn\fR\fR
+\fBn\fR
.ad
.RS 13n
Search in the backwards direction for the next match of the last pattern to
@@ -4467,7 +4701,7 @@ Search in the backwards direction for the next match of the last pattern to
.sp
.ne 2
.na
-\fB\fBN\fR\fR
+\fBN\fR
.ad
.RS 13n
Search in the forward direction for next match of the last pattern to \fI/\fR
@@ -4475,12 +4709,11 @@ or \fI?\fR.
.RE
.SS "Text Modification Edit Commands"
-.LP
The following commands modify the line:
.sp
.ne 2
.na
-\fB\fBa\fR\fR
+\fBa\fR
.ad
.RS 19n
Enter input mode and enter text after the current character.
@@ -4489,7 +4722,7 @@ Enter input mode and enter text after the current character.
.sp
.ne 2
.na
-\fB\fBA\fR\fR
+\fBA\fR
.ad
.RS 19n
Append text to the end of the line. Equivalent to \fB$a\fR.
@@ -4498,11 +4731,11 @@ Append text to the end of the line. Equivalent to \fB$a\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]c\fR\fImotion\fR\fR
+\fB[\fR\fIcount\fR\fB]c\fR\fImotion\fR
.ad
.br
.na
-\fB\fBc[\fR\fIcount\fR\fB]\fR\fImotion\fR\fR
+\fBc[\fR\fIcount\fR\fB]\fR\fImotion\fR
.ad
.RS 19n
Delete current character through the character that \fImotion\fR would move the
@@ -4513,7 +4746,7 @@ deleted and input mode entered.
.sp
.ne 2
.na
-\fB\fBC\fR\fR
+\fBC\fR
.ad
.RS 19n
Delete the current character through the end of line and enter input mode.
@@ -4523,7 +4756,7 @@ Equivalent to \fBc$\fR.
.sp
.ne 2
.na
-\fB\fBS\fR\fR
+\fBS\fR
.ad
.RS 19n
Equivalent to \fBcc\fR.
@@ -4532,7 +4765,7 @@ Equivalent to \fBcc\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]s\fR\fR
+\fB[\fR\fIcount\fR\fB]s\fR
.ad
.RS 19n
Replace characters under the cursor in input mode.
@@ -4541,7 +4774,7 @@ Replace characters under the cursor in input mode.
.sp
.ne 2
.na
-\fB\fBD[\fR\fIcount\fR\fB]d\fR\fImotion\fR\fR
+\fBD[\fR\fIcount\fR\fB]d\fR\fImotion\fR
.ad
.RS 19n
Delete the current character through the end of line. Equivalent to d$.
@@ -4550,7 +4783,7 @@ Delete the current character through the end of line. Equivalent to d$.
.sp
.ne 2
.na
-\fB\fBd[\fR\fIcount\fR\fB]\fR\fImotion\fR\fR
+\fBd[\fR\fIcount\fR\fB]\fR\fImotion\fR
.ad
.RS 19n
Delete current character through the character that \fImotion\fR would move to.
@@ -4560,7 +4793,7 @@ If \fImotion\fR is d , the entire line is deleted.
.sp
.ne 2
.na
-\fB\fBi\fR\fR
+\fBi\fR
.ad
.RS 19n
Enter input mode and insert text before the current character.
@@ -4569,7 +4802,7 @@ Enter input mode and insert text before the current character.
.sp
.ne 2
.na
-\fB\fBI\fR\fR
+\fBI\fR
.ad
.RS 19n
Insert text before the beginning of the line. Equivalent to \fB0i\fR.
@@ -4578,7 +4811,7 @@ Insert text before the beginning of the line. Equivalent to \fB0i\fR.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]P\fR\fR
+\fB[\fR\fIcount\fR\fB]P\fR
.ad
.RS 19n
Place the previous text modification before the cursor.
@@ -4587,7 +4820,7 @@ Place the previous text modification before the cursor.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]p\fR\fR
+\fB[\fR\fIcount\fR\fB]p\fR
.ad
.RS 19n
Place the previous text modification after the cursor.
@@ -4596,7 +4829,7 @@ Place the previous text modification after the cursor.
.sp
.ne 2
.na
-\fB\fBR\fR\fR
+\fBR\fR
.ad
.RS 19n
Enter input mode and replace characters on the screen with characters you type
@@ -4606,7 +4839,7 @@ overlay fashion.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]r\fR\fIc\fR\fR
+\fB[\fR\fIcount\fR\fB]r\fR\fIc\fR
.ad
.RS 19n
Replace the \fIcount\fR characters starting at the current cursor position with
@@ -4616,7 +4849,7 @@ Replace the \fIcount\fR characters starting at the current cursor position with
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]x\fR\fR
+\fB[\fR\fIcount\fR\fB]x\fR
.ad
.RS 19n
Delete current character.
@@ -4625,7 +4858,7 @@ Delete current character.
.sp
.ne 2
.na
-\fB\fB[\fIcount\fR]X\fR\fR
+\fB[\fIcount\fR]X\fR
.ad
.RS 19n
Delete preceding character.
@@ -4634,7 +4867,7 @@ Delete preceding character.
.sp
.ne 2
.na
-\fB\fB[\fIcount\fR].\fR\fR
+\fB[\fIcount\fR].\fR
.ad
.RS 19n
Repeat the previous text modification command.
@@ -4643,7 +4876,7 @@ Repeat the previous text modification command.
.sp
.ne 2
.na
-\fB\fB[\fIcount\fR]~\fR\fR
+\fB[\fIcount\fR]~\fR
.ad
.RS 19n
Invert the case of the \fIcount\fR characters starting at the current cursor
@@ -4653,7 +4886,7 @@ position and advance the cursor.
.sp
.ne 2
.na
-\fB\fB[\fIcount\fR]_\fR\fR
+\fB[\fIcount\fR]_\fR
.ad
.RS 19n
Causes the \fIcount\fR word of the previous command to be appended and input
@@ -4663,7 +4896,7 @@ mode entered. The last word is used if \fIcount\fR is omitted.
.sp
.ne 2
.na
-\fB\fB*\fR\fR
+\fB*\fR
.ad
.RS 19n
Causes an \fB*\fR to be appended to the current word and file name generation
@@ -4674,23 +4907,22 @@ replaced by the matching pattern and input mode is entered.
.sp
.ne 2
.na
-\fB\fB\e\fR\fR
+\fB\e\fR
.ad
.RS 19n
Command or file name completion as described in this manual page.
.RE
.SS "Other Edit Commands"
-.LP
The following miscellaneous edit commands are supported:
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]y\fR\fImotion\fR\fR
+\fB[\fR\fIcount\fR\fB]y\fR\fImotion\fR
.ad
.br
.na
-\fB\fBy[\fR\fIcount\fR\fB]\fR\fImotion\fR\fR
+\fBy[\fR\fIcount\fR\fB]\fR\fImotion\fR
.ad
.RS 18n
Yank the current character through the character to which \fImotion\fR would
@@ -4701,7 +4933,7 @@ cursor position are unchanged.
.sp
.ne 2
.na
-\fB\fByy\fR\fR
+\fByy\fR
.ad
.RS 18n
Yank the current line.
@@ -4710,7 +4942,7 @@ Yank the current line.
.sp
.ne 2
.na
-\fB\fBY\fR\fR
+\fBY\fR
.ad
.RS 18n
Yank the current line from the current cursor location to the end of the line.
@@ -4720,7 +4952,7 @@ Equivalent to \fBy$\fR.
.sp
.ne 2
.na
-\fB\fBu\fR\fR
+\fBu\fR
.ad
.RS 18n
Undo the last text modifying command.
@@ -4729,7 +4961,7 @@ Undo the last text modifying command.
.sp
.ne 2
.na
-\fB\fBU\fR\fR
+\fBU\fR
.ad
.RS 18n
Undo all the text modifying commands performed on current line.
@@ -4738,7 +4970,7 @@ Undo all the text modifying commands performed on current line.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]V\fR\fR
+\fB[\fR\fIcount\fR\fB]V\fR
.ad
.RS 18n
Return the command :
@@ -4756,7 +4988,7 @@ in the input buffer. If \fIcount\fR is omitted, the current line is used.
.sp
.ne 2
.na
-\fB\fB^L\fR\fR
+\fB^L\fR
.ad
.RS 18n
Line feed and print the current line. This command only works in control mode.
@@ -4765,7 +4997,7 @@ Line feed and print the current line. This command only works in control mode.
.sp
.ne 2
.na
-\fB\fB^J\fR\fR
+\fB^J\fR
.ad
.RS 18n
New line. Execute the current line, regardless of mode.
@@ -4774,7 +5006,7 @@ New line. Execute the current line, regardless of mode.
.sp
.ne 2
.na
-\fB\fB^M\fR\fR
+\fB^M\fR
.ad
.RS 18n
Return. Execute the current line, regardless of mode.
@@ -4783,7 +5015,7 @@ Return. Execute the current line, regardless of mode.
.sp
.ne 2
.na
-\fB\fB#\fR\fR
+\fB#\fR
.ad
.RS 18n
If the first character of the command is a \fB#\fR , delete this \fB#\fR and
@@ -4800,7 +5032,7 @@ history file.
.sp
.ne 2
.na
-\fB\fB[\fR\fIcount\fR\fB]=\fR\fR
+\fB[\fR\fIcount\fR\fB]=\fR
.ad
.RS 18n
If \fIcount\fR is not specified, generate the list of matching commands or file
@@ -4814,7 +5046,7 @@ not on a word, it is inserted after the current cursor location.
.sp
.ne 2
.na
-\fB\fB@\fR\fIletter\fR\fR
+\fB@\fR\fIletter\fR
.ad
.RS 18n
Search your alias list for an alias by the name \fIletter\fR. If an alias of
@@ -4824,14 +5056,13 @@ this name is defined, insert its value on the input queue for processing.
.sp
.ne 2
.na
-\fB\fB^V\fR\fR
+\fB^V\fR
.ad
.RS 18n
Display version of the shell.
.RE
.SS "Built-in Commands"
-.LP
The following simple-commands are executed in the shell process. Input and
output redirection is permitted. Unless otherwise indicated, the output is
written on file descriptor \fB1\fR and the exit status, when there is no syntax
@@ -4876,7 +5107,7 @@ field splitting and file name generation are not performed.
.sp
.ne 2
.na
-\fB\fB+ : [\fR\fIarg ...\fR\fB]\fR\fR
+\fB+ : [\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -4886,7 +5117,7 @@ The command only expands parameters.
.sp
.ne 2
.na
-\fB\fB+ .\fR \fIname\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fB+ .\fR \fIname\fR \fB[\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -4905,8 +5136,8 @@ last command executed.
.sp
.ne 2
.na
-\fB\fB++ alias [\fR\fB-ptx\fR\fB] [\fR\fIname\fR\fB[
-=\fR\fIvalue\fR\fB]] ...\fR\fR
+\fB++ alias [\fR\fB-ptx\fR\fB] [\fR\fIname\fR\fB[
+=\fR\fIvalue\fR\fB]] ...\fR
.ad
.sp .6
.RS 4n
@@ -4929,7 +5160,7 @@ obsolete -x option has no effect. The exit status is \fBnon-zero\fR if a
.sp
.ne 2
.na
-\fB\fBbg [\fR \fIjob\fR\fB\&...]\fR\fR
+\fBbg [\fR \fIjob\fR\fB\&...]\fR
.ad
.sp .6
.RS 4n
@@ -4942,7 +5173,7 @@ a description of the format of \fIjob\fR.
.sp
.ne 2
.na
-\fB\fB+ break [\fR\fIn\fR\fB]\fR\fR
+\fB+ break [\fR\fIn\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -4953,8 +5184,8 @@ loop, if any. If \fIn\fR is specified, then break \fIn\fR levels.
.sp
.ne 2
.na
-\fB\fBbuiltin [\fR\fB-ds\fR \fB] [\fR\fB-f\fR \fIfile\fR\fB]
-[\fR\fIname ...\fR\fB]\fR\fR
+\fBbuiltin [\fR\fB-ds\fR \fB] [\fR\fB-f\fR \fIfile\fR\fB]
+[\fR\fIname ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -4962,7 +5193,13 @@ If \fIname\fR is not specified, and no \fB-f\fR option is specified, the
built-ins are printed on standard output. The \fB-s\fR option prints only the
special built-ins. Otherwise, each \fIname\fR represents the pathname whose
basename is the name of the built-in. The entry point function name is
-determined by prepending \fIb\fR to the built-in name. The ISO C/C++ prototype
+determined by prepending \fIb_\fR to the built-in name. A built-in specified by
+a pathname will only be executed when that pathname would be found during the
+path search. Built-ins found in libraries loaded via the \fB.paths\fR file will
+be associate with the pathname of the directory containing the \fB.paths\fR
+file.
+.sp
+The ISO C/C++ prototype
is \fBb\fR\fImycommand(int argc, char *argv[], void *context)\fR for the
built-in command \fImycommand\fR where \fIargv\fR is an array of \fIargc\fR
elements and \fIcontext\fR is an optional pointer to a \fBShell_t\fR structure
@@ -4982,11 +5219,11 @@ argument of \fB0\fR.
.sp
.ne 2
.na
-\fB\fBcd\fR \fB[\fR\fB-LP\fR\fB] [\fR\fIarg\fR\fB]\fR\fR
+\fBcd\fR \fB[\fR\fB-LP\fR\fB] [\fR\fIarg\fR\fB]\fR
.ad
.br
.na
-\fB\fBcd\fR \fB[\fR\fB-LP\fR\fB]\fR \fIold\fR \fInew\fR\fR
+\fBcd\fR \fB[\fR\fB-LP\fR\fB]\fR \fIold\fR \fInew\fR
.ad
.sp .6
.RS 4n
@@ -5017,8 +5254,8 @@ determines which method is used. The \fBcd\fR command cannot be executed by
.sp
.ne 2
.na
-\fB\fBcommand\fR \fB[\fR\fB-pvVx\fR\fB]\fR \fIname\fR
-\fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fBcommand\fR \fB[\fR\fB-pvVx\fR\fB]\fR \fIname\fR
+\fB[\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5048,7 +5285,7 @@ With the \fB-v\fR option, \fBcommand\fR is equivalent to the built-in
.sp
.ne 2
.na
-\fB\fB+continue\fR \fB[\fR\fIn\fR\fB]\fR\fR
+\fB+continue\fR \fB[\fR\fIn\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5060,7 +5297,7 @@ Resumes the next iteration of the enclosing \fBfor\fR, \fBwhile\fR,
.sp
.ne 2
.na
-\fB\fBdisown\fR \fB[\fR\fIjob...\fR\fB]\fR\fR
+\fBdisown\fR \fB[\fR\fIjob...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5071,7 +5308,7 @@ all active jobs if \fIjob\fR is omitted, when a login shell terminates.
.sp
.ne 2
.na
-\fB\fBecho\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fBecho\fR \fB[\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5085,7 +5322,21 @@ this section should be used. See \fBecho\fR(1) for usage and description.
.sp
.ne 2
.na
-\fB\fB+eval\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fB++enum [ -i ]\fR \fItype\fR\fB[\fR=(\fIvalue\fR ...) \fB]\fR
+.ad
+.sp .6
+.RS 4n
+Creates a declaration command named type that is an integer type that allows
+one of the specified values as enumeration names. If \fI=(value ...)\fR is
+omitted, then type must be an indexed array variable with at least two elements
+and the values are taken from this array variable. If \fB-i\fR is specified
+the values are case insensitive.
+.RE
+
+.sp
+.ne 2
+.na
+\fB+eval\fR \fB[\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5096,8 +5347,8 @@ executed.
.sp
.ne 2
.na
-\fB\fB+exec\fR [\fB-c\fR] [\fB-a\fR \fIname ...\fR]
-\fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fB+exec\fR [\fB-c\fR] [\fB-a\fR \fIname ...\fR]
+\fB[\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5116,7 +5367,7 @@ mechanism are closed when invoking another program.
.sp
.ne 2
.na
-\fB\fB+exit\fR \fB[\fR\fIn\fR\fB]\fR\fR
+\fB+exit\fR \fB[\fR\fIn\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5130,22 +5381,24 @@ option turned on. See \fBset\fR.
.sp
.ne 2
.na
-\fB\fB++export\fR \fB[\fR\fB-p\fR\fB]\fR
-\fB[\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]] ...\fR\fR
+\fB++export\fR \fB[\fR\fB-p\fR\fB]\fR
+\fB[\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]] ...\fR
.ad
.sp .6
.RS 4n
If \fIname\fR is not specified, the names and values of each variable with the
export attribute are printed with the values quoted in a manner that allows
-them to be re-entered. The \fB-p\fR option causes the word export to be
-inserted before each one. Otherwise, the specified \fIname\fRs are marked for
-automatic export to the environment of subsequently-executed commands.
+them to be re-entered. The \fBexport\fR command is the same as \fBtypeset -x\fR
+except that if you use \fBexport\fR within a function, no local variable is
+created. The \fB-p\fR option causes the word export to be inserted before each
+one. Otherwise, the specified \fIname\fRs are marked for automatic export to
+the environment of subsequently-executed commands.
.RE
.sp
.ne 2
.na
-\fB\fBfalse\fR\fR
+\fBfalse\fR
.ad
.sp .6
.RS 4n
@@ -5155,7 +5408,7 @@ Does nothing, and exits \fB1\fR. Used with \fBuntil\fR for infinite loops.
.sp
.ne 2
.na
-\fB\fBfg\fR \fB[\fR\fIjob ...\fR\fB]\fR\fR
+\fBfg\fR \fB[\fR\fIjob ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5168,7 +5421,7 @@ description of the format of \fIjob\fR.
.sp
.ne 2
.na
-\fB\fBgetconf\fR \fB[\fR\fIname\fR \fB[\fR\fIpathname\fR\fB]]\fR\fR
+\fBgetconf\fR \fB[\fR\fIname\fR \fB[\fR\fIpathname\fR\fB]]\fR
.ad
.sp .6
.RS 4n
@@ -5186,8 +5439,8 @@ pathname \fB/\fR is used for each of the parameters that requires
.sp
.ne 2
.na
-\fB\fBgetopts\fR \fB[\fR \fB-a\fR \fIname\fR\fB]\fR \fIoptstring\fR \fIvname\fR
-\fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fBgetopts\fR \fB[\fR \fB-a\fR \fIname\fR\fB]\fR \fIoptstring\fR \fIvname\fR
+\fB[\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5217,8 +5470,8 @@ specified as the first option.
.sp
.ne 2
.na
-\fB\fBhist\fR \fB[\fR \fB-e\fR \fIename\fR\fB]\fR\fB[\fR\fB-nlr\fR\fB]\fR
-\fB[\fR \fIfirst\fR\fB[\fR\fIlast\fR \fB] ]\fR\fR
+\fBhist\fR \fB[\fR \fB-e\fR \fIename\fR\fB]\fR\fB[\fR\fB-nlr\fR\fB]\fR
+\fB[\fR \fIfirst\fR\fB[\fR\fIlast\fR \fB] ]\fR
.ad
.br
.na
@@ -5226,8 +5479,8 @@ specified as the first option.
.ad
.br
.na
-\fB\fBhist\fR \fB-s\fR \fB[\fR \fIold\fR\fB=\fR\fInew\fR \fB] [\fR
-\fIcommand\fR\fB]\fR\fR
+\fBhist\fR \fB-s\fR \fB[\fR \fIold\fR\fB=\fR\fInew\fR \fB] [\fR
+\fIcommand\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5254,7 +5507,7 @@ the optional substitution \fIold\fR\fB=\fR\fInew\fR is performed.
.sp
.ne 2
.na
-\fB\fBjobs\fR \fB-lnp\fR \fB[\fR\fIjob ...\fR\fB]\fR\fR
+\fBjobs\fR \fB-lnp\fR \fB[\fR\fIjob ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5268,15 +5521,15 @@ listed. See \fBJobs\fR for a description of the format of \fIjob\fR.
.sp
.ne 2
.na
-\fB\fBkill\fR \fB[\fR\fB-s\fR \fIsigname\fR\fB]\fR \fIjob ...\fR\fR
+\fBkill\fR \fB[\fR\fB-s\fR \fIsigname\fR\fB]\fR \fIjob ...\fR
.ad
.br
.na
-\fB\fBkill\fR \fB[\fR\fB-n\fR \fIsignum\fR\fB]\fR \fIjob ...\fR\fR
+\fBkill\fR \fB[\fR\fB-n\fR \fIsignum\fR\fB]\fR \fIjob ...\fR
.ad
.br
.na
-\fB\fBkill\fR \fB-l\fR \fB[\fR\fIsig ...\fR\fB]\fR\fR
+\fBkill\fR \fB-Ll\fR \fB[\fR\fIsig ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5290,30 +5543,34 @@ specified jobs or processes. Signals are either specified by number with the
up), then the job or process is sent a \fBCONT\fR (continue) signal if it is
stopped. The argument \fIjob\fR can be the process id of a process that is not
a member of one of the active jobs. See \fBJobs\fR for a description of the
-format of \fIjob\fR. In the third form, \fBkill -l\fR, if \fIsig\fR is not
-specified, the signal names are listed. Otherwise, for each \fIsig\fR that is a
-name, the corresponding signal number is listed. For each \fIsig\fR that is a
-number, the signal name corresponding to the least significant 8 bits of
-\fIsig\fR is listed.
+format of \fIjob\fR. In the third form, \fBkill -l\fR or \fBkill -L\fR, if
+\fIsig\fR is not specified, the signal names are listed. The \fB-l\fR option
+lists only the signal names whereas \fB-L\fR lists each signal name and
+corresponding number. Otherwise, for each \fIsig\fR that is a name, the
+corresponding signal number is listed. For each \fIsig\fR that is a number, the
+signal name corresponding to the least significant 8 bits of \fIsig\fR is
+listed.
.RE
.sp
.ne 2
.na
-\fB\fBlet\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fBlet\fR \fB[\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
-Each \fIarg\fR is a separate arithmetic expression to be evaluated. See the
-\fBArithmetic Evaluation\fR section of this manual page for a description of
-arithmetic expression evaluation. The exit status is \fB0\fR if the value of
-the last expression is \fBnon-zero\fR, and \fB1\fR otherwise.
+Each \fIarg\fR is a separate arithmetic expression to be evaluated.
+\fBlet\fR only recognizes octal constants starting with \fB0\fR when the
+\fBset\fR option \fBletoctal\fR is on. See the \fBArithmetic Evaluation\fR
+section of this manual page for a description of arithmetic expression
+evaluation. The exit status is \fB0\fR if the value of the last expression is
+\fBnon-zero\fR, and \fB1\fR otherwise.
.RE
.sp
.ne 2
.na
-\fB\fB+newgrp\fR \fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fB+newgrp\fR \fB[\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5323,8 +5580,8 @@ Equivalent to \fBexec\fR \fB/bin/newgrp\fR \fIarg ...\fR
.sp
.ne 2
.na
-\fB\fBprint\fR [\fB-Renprs\fR] \fB[\fR \fB-u\fR \fIunit\fR\fB] [\fR \fB-f\fR
-\fIformat\fR \fB] [\fR \fIarg ...\fR\fB]\fR\fR
+\fBprint\fR [\fB-CRenprsv\fR] \fB[\fR \fB-u\fR \fIunit\fR\fB] [\fR \fB-f\fR
+\fIformat\fR \fB] [\fR \fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5336,7 +5593,7 @@ specified, the following escape conventions are applied:
.sp
.ne 2
.na
-\fB\fB\ea\fR\fR
+\fB\ea\fR
.ad
.RS 8n
Alert character (\fBASCII\fR 07)
@@ -5345,7 +5602,7 @@ Alert character (\fBASCII\fR 07)
.sp
.ne 2
.na
-\fB\fB\eb\fR\fR
+\fB\eb\fR
.ad
.RS 8n
Backspace character (\fBASCII\fR 010)
@@ -5354,7 +5611,7 @@ Backspace character (\fBASCII\fR 010)
.sp
.ne 2
.na
-\fB\fB\ec\fR\fR
+\fB\ec\fR
.ad
.RS 8n
Causes print to end without processing more arguments and not adding a NEWLINE
@@ -5363,7 +5620,7 @@ Causes print to end without processing more arguments and not adding a NEWLINE
.sp
.ne 2
.na
-\fB\fB\ef\fR\fR
+\fB\ef\fR
.ad
.RS 8n
Form-feed character (\fBASCII\fR 014)
@@ -5372,7 +5629,7 @@ Form-feed character (\fBASCII\fR 014)
.sp
.ne 2
.na
-\fB\fB\en\fR\fR
+\fB\en\fR
.ad
.RS 8n
NEWLINE character (\fBASCII\fR 012)
@@ -5381,7 +5638,7 @@ NEWLINE character (\fBASCII\fR 012)
.sp
.ne 2
.na
-\fB\fB\er\fR\fR
+\fB\er\fR
.ad
.RS 8n
RETURN character (\fBASCII\fR 015)
@@ -5390,7 +5647,7 @@ RETURN character (\fBASCII\fR 015)
.sp
.ne 2
.na
-\fB\fB\et\fR\fR
+\fB\et\fR
.ad
.RS 8n
TAB character (\fBASCII\fR 011)
@@ -5399,7 +5656,7 @@ TAB character (\fBASCII\fR 011)
.sp
.ne 2
.na
-\fB\fB\ev\fR\fR
+\fB\ev\fR
.ad
.RS 8n
Vertical TAB character (\fBASCII\fR 013)
@@ -5408,7 +5665,7 @@ Vertical TAB character (\fBASCII\fR 013)
.sp
.ne 2
.na
-\fB\fB\eE\fR\fR
+\fB\eE\fR
.ad
.RS 8n
Escape character (\fBASCII\fR 033)
@@ -5417,7 +5674,7 @@ Escape character (\fBASCII\fR 033)
.sp
.ne 2
.na
-\fB\fB\e\e\fR\fR
+\fB\e\e\fR
.ad
.RS 8n
Backslash character \fB\e\fR
@@ -5426,7 +5683,7 @@ Backslash character \fB\e\fR
.sp
.ne 2
.na
-\fB\fB\e0\fR\fIx\fR\fR
+\fB\e0\fR\fIx\fR
.ad
.RS 8n
Character defined by the 1, 2, or 3-digit octal string specified by \fIx\fR
@@ -5436,17 +5693,21 @@ The \fB-R\fR option prints all subsequent arguments and options other than
\fB-n\fR. The \fB-e\fR causes the escape conventions to be applied This is the
default behavior. It reverses the effect of an earlier \fB-r\fR. The \fB-p\fR
option causes the arguments to be written onto the pipe of the process spawned
-with \fB|&\fR instead of standard output. The \fB-s\fR option causes the
-arguments to be written onto the history file instead of standard output. The
-\fB-u\fR option can be used to specify a one digit file descriptor unit number
-\fIunit\fR on which the output is placed. The default is \fB1\fR. If the option
-\fB-n\fR is used, no NEWLINE is added to the output.
+with \fB|&\fR instead of standard output. The \fB-v\fR option treats each
+\fIarg\fR as a variable name and writes the value in the \fBprintf %B\fR
+format. The \fB-C\fR option treats each \fIarg\fR as a variable name and
+writes the values in the \fBprintf %#B\fR format.
+The \fB-s\fR option causes the arguments to be written onto the history file
+instead of standard output. The \fB-u\fR option can be used to specify a one
+digit file descriptor unit number \fIunit\fR on which the output is placed. The
+default is \fB1\fR. If the option \fB-n\fR is used, no NEWLINE is added to the
+output.
.RE
.sp
.ne 2
.na
-\fB\fBprintf\fR \fIformat\fR\fB[\fR\fIarg ...\fR\fB]\fR\fR
+\fBprintf\fR \fIformat\fR\fB [\fR\fIarg ...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5454,38 +5715,173 @@ The arguments \fIarg\fR are printed on standard output in accordance with the
\fBANSI-C\fR formatting rules associated with the format string \fIformat\fR.
If the number of arguments exceeds the number of format specifications, the
format string is reused to format remaining arguments. The following extensions
-can also be used: A \fB%b\fR format can be used instead of \fB%s\fR to cause
+can also be used:
+
+.sp
+.ne 2
+.na
+\fB%b\fR
+.ad
+.sp .6
+.RS 4n
+A \fB%b\fR format can be used instead of \fB%s\fR to cause
escape sequences in the corresponding \fIarg\fR to be expanded as described in
-\fBprint\fR. A \fB%B\fR option causes each of the arguments to be treated as
+\fBprint\fR.
+.RE
+
+.sp
+.ne 2
+.na
+\fB%B\fR
+.ad
+.sp .6
+.RS 4n
+A \fB%B\fR option causes each of the arguments to be treated as
variable names and the binary value of the variables is printed. This is most
-useful for variables with an attribute of b. A \fB%H\fR format can be used
+useful for variables with an attribute of b.
+.RE
+
+.sp
+.ne 2
+.na
+\fB%H\fR
+.ad
+.sp .6
+.RS 4n
+A \fB%H\fR format can be used
instead of \fB%s\fR to cause characters in \fIarg\fR that are special in
-\fBHTML\fR and \fBXML\fR to be output as their entity name. A \fB%P\fR format
-can be used instead of \fB%s\fR to cause \fIarg\fR to be interpreted as an
-extended regular expression and be printed as a shell pattern. A \fB%R\fR
+\fBHTML\fR and \fBXML\fR to be output as their entity name. The alternate
+flag \fB#\fR formats the output for use as a URI.
+.RE
+
+.sp
+.ne 2
+.na
+\fB%P\fR
+.ad
+.sp .6
+.RS 4n
+A \fB%P\fR format can be used instead of \fB%s\fR to cause \fIarg\fR to be
+interpreted as an extended regular expression and be printed as a shell
+pattern.
+.RE
+
+
+.sp
+.ne 2
+.na
+\fB%R\fR
+.ad
+.sp .6
+.RS 4n
+A \fB%R\fR
format can be used instead of \fB%s\fR to cause \fIarg\fR to be interpreted as
-a shell pattern and to be printed as an extended regular expression. A \fB%q\fR
-format can be used instead of \fB%\fRs to cause the resulting string to be
-quoted in a manner than can be input again to the shell. A
-\fB%(\fR\fIdate-format\fR\fB)T\fR format can be use to treat an argument as a
+a shell pattern and to be printed as an extended regular expression.
+.RE
+
+.sp
+.ne 2
+.na
+\fB%q\fR
+.ad
+.sp .6
+.RS 4n
+A \fB%q\fR format can be used instead of \fB%\fRs to cause the resulting string
+to be quoted in a manner than can be input again to the shell. When \fBq\fR is
+preceded by the alternative format specifier, \fB#\fR, the string is quoted in
+manner suitable as a field in a \fB.csv\fR format file.
+.RE
+
+.sp
+.ne 2
+.na
+\fB%(\fIdate-format\fR\fB)\fR
+.ad
+.sp .6
+.RS 4n
+A \fB%(\fR\fIdate-format\fR\fB)T\fR format can be use to treat an argument as a
date/time string and to format the date/time according to the \fIdate-format\fR
-as defined for the \fBdate\fR(1) command. A \fB%Z\fR format outputs a byte
-whose value is 0. The precision field of the %d format can be followed by a .
-and the output base. In this case, the \fB#\fR flag character causes
-\fBbase\fR\fI#\fR to be prepended. The \fB#\fR flag when used with the \fBd\fR
-specifier without an output base, causes the output to be displayed in
-thousands units with one of the suffixes \fBk\fR \fBM\fR \fBG\fR \fBT\fR
-\fBP\fR \fBE\fR to indicate the unit. The \fB#\fR flag when used with the i
-specifier causes the output to be displayed in \fB1024\fR with one of the
-suffixes \fBKi\fR \fBMi\fR \fBGi\fR \fBTi\fR \fBPi\fR \fBEi\fR to indicate the
-unit. The \fB=\fR flag has been added to center the output within the specified
-field width.
+as defined for the \fBdate\fR(1) command.
+.RE
+
+
+.sp
+.ne 2
+.na
+\fB%Z\fR
+.ad
+.sp .6
+.RS 4n
+A \fB%Z\fR format outputs a byte whose value is 0.
+.RE
+
+.sp
+.ne 2
+.na
+\fB%d\fR
+.ad
+.sp .6
+.RS 4n
+The precision field of the %d format can be followed by a . and the output
+base. In this case, the \fB#\fR flag character causes \fBbase\fR\fI#\fR to be
+prepended.
.RE
.sp
.ne 2
.na
-\fB\fBpwd\fR [\fB-LP\fR]\fR
+\fB#\fR
+.ad
+.sp .6
+.RS 4n
+The \fB#\fR flag, when used with the \fB%d\fR format without an output base,
+displays the output in powers of 1000 indicated by one of the following
+suffixes: \fBk M G T P E\fR, and when used with the \fB%i\fR format displays
+the output in powers of 1024 indicated by one of the following suffixes:
+\fBKi Mi Gi Ti Pi Ei\fR.
+
+.RE
+
+.sp
+.ne 2
+.na
+\fB=\fR
+.ad
+.sp .6
+.RS 4n
+The \fB=\fR flag centers the output within the specified field width.
+.RE
+
+.sp
+.ne 2
+.na
+\fBL\fR
+.ad
+.sp .6
+.RS 4n
+The \fBL\fR flag, when used with the \fB%c\fR or \fB%s\fR
+formats, treats precision as character width instead of byte count.
+.RE
+
+.sp
+.ne 2
+.na
+\fB,\fR
+.ad
+.sp .6
+.RS 4n
+The \fB,\fR flag, when used with the \fB%d\fR or \fB%f\fR
+formats, separates groups of digits with the grouping delimiter
+(, in groups of 3 in the C locale).
+.RE
+
+
+.RE
+
+.sp
+.ne 2
+.na
+\fBpwd\fR [\fB-LP\fR]\fR
.ad
.sp .6
.RS 4n
@@ -5499,10 +5895,10 @@ used.
.sp
.ne 2
.na
-\fB\fBread\fR \fB[\fR\fB-Aprs\fR\fB] [\fR\fB-d\fR \fIdelim\fR\fB] [\fR \fB-n\fR
+\fBread\fR \fB[\fR\fB-ACSprsv\fR\fB] [\fR\fB-d\fR \fIdelim\fR\fB] [\fR \fB-n\fR
\fIn\fR\fB] [[\fR \fB-N\fR \fIn\fR\fB] [[\fR\fB-t\fR \fItimeout\fR\fB]
[\fR\fB-u\fR \fIunit\fR\fB] [\fR\fIvname\fR\fB?\fR\fIprompt\fR\fB] [\fR
-\fIvname ...\fR \fB]\fR\fR
+\fIvname ...\fR \fB]\fR
.ad
.sp .6
.RS 4n
@@ -5523,7 +5919,12 @@ are stored directly into the variable. If the -v is specified, then the value
of the first \fIvname\fR is used as a default value when reading from a
terminal device. The \fB-A\fR option causes the variable \fIvname\fR to be
unset and each field that is read to be stored in successive elements of the
-indexed array \fIvname\fR. The \fB-p\fR option causes the input line to be
+indexed array \fIvname\fR. The \fB-C\fR option causes the variable vname to be
+read as a compound variable. Blanks will be ignored when finding the beginning
+open parenthesis. The \fB-S\fR option causes the line to be treated like a
+record in a .csv format file so that double quotes can be used to allow the
+delimiter character and the new-line character to appear within a field.
+The \fB-p\fR option causes the input line to be
taken from the input pipe of a process spawned by the shell using \fB|&\fR. If
the \fB-s\fR option is present, the input is saved as a command in the history
file. The option \fB-u\fR can be used to specify a one digit file descriptor
@@ -5541,8 +5942,8 @@ end-of-file is encountered or read has timed out.
.sp
.ne 2
.na
-\fB\fB++readonly\fR \fB[\fR\fB-p\fR\fB] [\fR
-\fIvname\fR\fB[=\fR\fIvalue\fR\fB]] ...\fR\fR
+\fB++readonly\fR \fB[\fR\fB-p\fR\fB] [\fR
+\fIvname\fR\fB[=\fR\fIvalue\fR\fB]] ...\fR
.ad
.sp .6
.RS 4n
@@ -5556,7 +5957,7 @@ be inserted before each one. Otherwise, the specified \fIvname\fRs are marked
.sp
.ne 2
.na
-\fB\fB+return\fR \fB[\fR\fIn\fR\fB]\fR\fR
+\fB+return\fR \fB[\fR\fIn\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5570,8 +5971,8 @@ script, then it behaves the same as exit.
.sp
.ne 2
.na
-\fB\fB+set [ \(+-BCGabefhkmnoprstuvx] [\(+-o [\fR \fIoption\fR \fB] ] ... [
-\(+-A\fR \fIvname\fR\fB]\fR \fB[\fR\fIarg...\fR\fB]\fR\fR
+\fB+set [ \(+-BCGabefhkmnoprstuvx] [\(+-o [\fR \fIoption\fR \fB] ] ... [
+\(+-A\fR \fIvname\fR\fB]\fR \fB[\fR\fIarg...\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -5579,7 +5980,7 @@ The \fBset\fR command supports the following options:
.sp
.ne 2
.na
-\fB\fB-a\fR\fR
+\fB-a\fR
.ad
.sp .6
.RS 4n
@@ -5589,7 +5990,7 @@ All subsequent variables that are defined are automatically exported.
.sp
.ne 2
.na
-\fB\fB-A\fR\fR
+\fB-A\fR
.ad
.sp .6
.RS 4n
@@ -5601,7 +6002,7 @@ unset first.
.sp
.ne 2
.na
-\fB\fB-b\fR\fR
+\fB-b\fR
.ad
.sp .6
.RS 4n
@@ -5612,7 +6013,7 @@ than waiting for the next prompt.
.sp
.ne 2
.na
-\fB\fB-B\fR\fR
+\fB-B\fR
.ad
.sp .6
.RS 4n
@@ -5622,7 +6023,7 @@ Enable brace pattern field generation. This is the default behavior.
.sp
.ne 2
.na
-\fB\fB-C\fR\fR
+\fB-C\fR
.ad
.sp .6
.RS 4n
@@ -5634,18 +6035,20 @@ file when turned on.
.sp
.ne 2
.na
-\fB\fB-e\fR\fR
+\fB-e\fR
.ad
.sp .6
.RS 4n
-If a command has a \fBnon-zero\fR exit status, execute the \fBERR\fR trap, if
-set, and exit. This mode is disabled while reading profiles.
+Unless contained in a \fB||\fR or \fB&&\fR command, or the command following an
+\fBif\fR, \fBwhile\fR or \fBuntil\fR command or in the pipeline following
+\fB!\fR, if a command has a non-zero exit status, execute the \fBERR\fR trap,
+if set, and exit. This mode is disabled while reading profiles.
.RE
.sp
.ne 2
.na
-\fB\fB-f\fR\fR
+\fB-f\fR
.ad
.sp .6
.RS 4n
@@ -5655,7 +6058,7 @@ Disables file name generation.
.sp
.ne 2
.na
-\fB\fB-G\fR\fR
+\fB-G\fR
.ad
.sp .6
.RS 4n
@@ -5667,7 +6070,7 @@ by a \fB/\fR only directories and subdirectories are matched.
.sp
.ne 2
.na
-\fB\fB-h\fR\fR
+\fB-h\fR
.ad
.sp .6
.RS 4n
@@ -5677,7 +6080,7 @@ Each command becomes a tracked alias when first encountered.
.sp
.ne 2
.na
-\fB\fB-k\fR\fR
+\fB-k\fR
.ad
.sp .6
.RS 4n
@@ -5688,7 +6091,7 @@ command, not just those that precede the command name.
.sp
.ne 2
.na
-\fB\fB-m\fR\fR
+\fB-m\fR
.ad
.sp .6
.RS 4n
@@ -5701,7 +6104,7 @@ for interactive shells.
.sp
.ne 2
.na
-\fB\fB-n\fR\fR
+\fB-n\fR
.ad
.sp .6
.RS 4n
@@ -5712,7 +6115,7 @@ Ignored for interactive shells.
.sp
.ne 2
.na
-\fB\fB-o\fR\fR
+\fB-o\fR
.ad
.sp .6
.RS 4n
@@ -5725,7 +6128,7 @@ The following argument can be one of the following option names:
.sp
.ne 2
.na
-\fB\fBallexport\fR\fR
+\fBallexport\fR
.ad
.sp .6
.RS 4n
@@ -5735,7 +6138,7 @@ Same as \fB-a\fR.
.sp
.ne 2
.na
-\fB\fBbgnice\fR\fR
+\fBbgnice\fR
.ad
.sp .6
.RS 4n
@@ -5745,7 +6148,7 @@ All background jobs are run at a lower priority. This is the default mode.
.sp
.ne 2
.na
-\fB\fBbraceexpand\fR\fR
+\fBbraceexpand\fR
.ad
.sp .6
.RS 4n
@@ -5755,7 +6158,7 @@ Same as \fB-\fRB.
.sp
.ne 2
.na
-\fB\fBemacs\fR\fR
+\fBemacs\fR
.ad
.sp .6
.RS 4n
@@ -5765,7 +6168,7 @@ Puts you in an \fBemacs\fR style inline editor for command entry.
.sp
.ne 2
.na
-\fB\fBerrexit\fR\fR
+\fBerrexit\fR
.ad
.sp .6
.RS 4n
@@ -5775,7 +6178,7 @@ Same as \fB-e\fR.
.sp
.ne 2
.na
-\fB\fBglobstar\fR\fR
+\fBglobstar\fR
.ad
.sp .6
.RS 4n
@@ -5785,7 +6188,7 @@ Same as \fB-G\fR.
.sp
.ne 2
.na
-\fB\fBgmacs\fR\fR
+\fBgmacs\fR
.ad
.sp .6
.RS 4n
@@ -5795,7 +6198,7 @@ Puts you in a \fBgmacs\fR style inline editor for command entry.
.sp
.ne 2
.na
-\fB\fBignoreeof\fR\fR
+\fBignoreeof\fR
.ad
.sp .6
.RS 4n
@@ -5805,7 +6208,7 @@ The shell does not exit on end-of-file. The command \fBexit\fR must be used.
.sp
.ne 2
.na
-\fB\fBkeyword\fR\fR
+\fBkeyword\fR
.ad
.sp .6
.RS 4n
@@ -5815,7 +6218,17 @@ Same as \fB-k\fR.
.sp
.ne 2
.na
-\fB\fBmarkdirs\fR\fR
+\fBletoctal\fR
+.ad
+.sp .6
+.RS 4n
+The \fBlet\fR command allows octal constants starting with \fB0\fR.
+.RE
+
+.sp
+.ne 2
+.na
+\fBmarkdirs\fR
.ad
.sp .6
.RS 4n
@@ -5826,7 +6239,7 @@ appended.
.sp
.ne 2
.na
-\fB\fBmonitor\fR\fR
+\fBmonitor\fR
.ad
.sp .6
.RS 4n
@@ -5836,7 +6249,7 @@ Same as \fB-m\fR.
.sp
.ne 2
.na
-\fB\fBmultiline\fR\fR
+\fBmultiline\fR
.ad
.sp .6
.RS 4n
@@ -5847,7 +6260,7 @@ than the width of the screen. This might not work for all terminals.
.sp
.ne 2
.na
-\fB\fBnoclobber\fR\fR
+\fBnoclobber\fR
.ad
.sp .6
.RS 4n
@@ -5857,7 +6270,7 @@ Same as \fB-C\fR.
.sp
.ne 2
.na
-\fB\fBnoexec\fR\fR
+\fBnoexec\fR
.ad
.sp .6
.RS 4n
@@ -5867,7 +6280,7 @@ Same as \fB-n\fR.
.sp
.ne 2
.na
-\fB\fBnoglob\fR\fR
+\fBnoglob\fR
.ad
.sp .6
.RS 4n
@@ -5877,7 +6290,7 @@ Same as \fB-f\fR.
.sp
.ne 2
.na
-\fB\fBnolog\fR\fR
+\fBnolog\fR
.ad
.sp .6
.RS 4n
@@ -5887,7 +6300,7 @@ Do not save function definitions in the history file.
.sp
.ne 2
.na
-\fB\fBnotify\fR\fR
+\fBnotify\fR
.ad
.sp .6
.RS 4n
@@ -5897,7 +6310,7 @@ Same as \fB-b\fR.
.sp
.ne 2
.na
-\fB\fBnounset\fR\fR
+\fBnounset\fR
.ad
.sp .6
.RS 4n
@@ -5907,7 +6320,7 @@ Same as \fB-u\fR.
.sp
.ne 2
.na
-\fB\fBpipefail\fR\fR
+\fBpipefail\fR
.ad
.sp .6
.RS 4n
@@ -5919,7 +6332,7 @@ to fail or zero if no command has failed.
.sp
.ne 2
.na
-\fB\fBprivileged\fR\fR
+\fBprivileged\fR
.ad
.sp .6
.RS 4n
@@ -5929,7 +6342,7 @@ Same as \fB-p\fR.
.sp
.ne 2
.na
-\fB\fBshowme\fR\fR
+\fBshowme\fR
.ad
.sp .6
.RS 4n
@@ -5941,7 +6354,7 @@ Otherwise, the leading \fB;\fR is ignored.
.sp
.ne 2
.na
-\fB\fBtrackall\fR\fR
+\fBtrackall\fR
.ad
.sp .6
.RS 4n
@@ -5951,7 +6364,7 @@ Same as \fB-h\fR.
.sp
.ne 2
.na
-\fB\fBverbose\fR\fR
+\fBverbose\fR
.ad
.sp .6
.RS 4n
@@ -5961,7 +6374,7 @@ Same as \fB-v\fR.
.sp
.ne 2
.na
-\fB\fBvi\fR\fR
+\fBvi\fR
.ad
.sp .6
.RS 4n
@@ -5972,7 +6385,7 @@ escape character 033. This puts you in control mode. A return sends the line.
.sp
.ne 2
.na
-\fB\fBviraw\fR\fR
+\fBviraw\fR
.ad
.sp .6
.RS 4n
@@ -5982,7 +6395,7 @@ Each character is processed as it is typed in \fBvi\fR mode.
.sp
.ne 2
.na
-\fB\fBxtrace\fR\fR
+\fBxtrace\fR
.ad
.sp .6
.RS 4n
@@ -5996,7 +6409,7 @@ If no option name is supplied, the current options settings are printed.
.sp
.ne 2
.na
-\fB\fB-p\fR\fR
+\fB-p\fR
.ad
.sp .6
.RS 4n
@@ -6010,7 +6423,7 @@ be set to the real \fBuid\fR and \fBgid\fR.
.sp
.ne 2
.na
-\fB\fB-r\fR\fR
+\fB-r\fR
.ad
.sp .6
.RS 4n
@@ -6020,7 +6433,7 @@ Enables the restricted shell. This option cannot be unset once set.
.sp
.ne 2
.na
-\fB\fB-s\fR\fR
+\fB-s\fR
.ad
.sp .6
.RS 4n
@@ -6030,7 +6443,7 @@ Sort the positional parameters lexicographically.
.sp
.ne 2
.na
-\fB\fB-t\fR\fR
+\fB-t\fR
.ad
.sp .6
.RS 4n
@@ -6040,7 +6453,7 @@ Obsolete. Exit after reading and executing one command.
.sp
.ne 2
.na
-\fB\fB-u\fR\fR
+\fB-u\fR
.ad
.sp .6
.RS 4n
@@ -6050,7 +6463,7 @@ Treat \fBunset\fR parameters as an error when substituting.
.sp
.ne 2
.na
-\fB\fB-v\fR\fR
+\fB-v\fR
.ad
.sp .6
.RS 4n
@@ -6060,7 +6473,7 @@ Print shell input lines as they are read.
.sp
.ne 2
.na
-\fB\fB-x\fR\fR
+\fB-x\fR
.ad
.sp .6
.RS 4n
@@ -6070,7 +6483,7 @@ Print commands and their arguments as they are executed.
.sp
.ne 2
.na
-\fB\fB--\fR\fR
+\fB--\fR
.ad
.sp .6
.RS 4n
@@ -6092,7 +6505,7 @@ all variables are printed on the standard output.
.sp
.ne 2
.na
-\fB\fB+shift\fR \fB[\fR\fIn\fR\fB]\fR\fR
+\fB+shift\fR \fB[\fR\fIn\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -6105,7 +6518,7 @@ equal to \fB$#\fR.
.sp
.ne 2
.na
-\fB\fBsleep\fR \fIseconds\fR\fR
+\fBsleep\fR \fIseconds\fR
.ad
.sp .6
.RS 4n
@@ -6116,8 +6529,8 @@ specified by \fIseconds\fR.
.sp
.ne 2
.na
-\fB\fB+trap\fR \fB-p\fR \fB[\fR\fIaction\fR\fB]\fR
-\fB[\fR\fIsig\fR\fB] ...\fR\fR
+\fB+trap\fR \fB-p\fR \fB[\fR\fIaction\fR\fB]\fR
+\fB[\fR\fIsig\fR\fB] ...\fR
.ad
.sp .6
.RS 4n
@@ -6148,7 +6561,7 @@ a list of commands associated with each signal number.
.sp
.ne 2
.na
-\fB\fBtrue\fR\fR
+\fBtrue\fR
.ad
.sp .6
.RS 4n
@@ -6158,8 +6571,12 @@ Does nothing, and exits \fB0\fR. Used with while for infinite loops.
.sp
.ne 2
.na
-\fB\fB++typeset [\(+-AHflabnprtux ] [ \(+-EFLRZi[\fR\fIn\fR\fB] ] [\fR
-\fIvname\fR\fB[=\fR\fIvalue\fR \fB] ]\fR\fR
+\fB++typeset [\(+-ACHSfblmnprtux ] [ \(+-EFLRXZi[\fR\fIn\fR\fB] ]
+[ \(+-M \fB[ \fImapname\fR \fB] ]
+[ -T [ \fR\fItname\fR\fB=(\fR\fIassign_list\fR\fB) ] ]
+[ -h \fR\fIstr\fR\fB ]
+[ -a [\fR\fItype\fR\fB] ]
+[ \fR\fIvname\fR\fB[=\fR\fIvalue\fR \fB] ]\fR
.ad
.sp .6
.RS 4n
@@ -6182,7 +6599,7 @@ The following list of attributes can be specified:
.sp
.ne 2
.na
-\fB\fB-a\fR\fR
+\fB-a\fR
.ad
.RS 6n
Declares \fIvname\fR to be an indexed array. This is optional unless except for
@@ -6192,7 +6609,7 @@ compound variable assignments.
.sp
.ne 2
.na
-\fB\fB-A\fR\fR
+\fB-A\fR
.ad
.RS 6n
Declares \fIvname\fR to be an associative array. Sub-scripts are strings rather
@@ -6202,7 +6619,7 @@ than arithmetic expressions.
.sp
.ne 2
.na
-\fB\fB-b\fR\fR
+\fB-b\fR
.ad
.RS 6n
The variable can hold any number of bytes of data. The data can be text or
@@ -6218,7 +6635,18 @@ the data.
.sp
.ne 2
.na
-\fB\fB-E\fR\fR
+\fB-C\fR
+.ad
+.RS 6n
+Causes each \fIvname\fR to be a compound variable. If \fIvalue\fR names
+a compound variable it is copied into \fIvname\fR. Otherwise, it unsets each
+vname.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-E\fR
.ad
.RS 6n
Declares \fIvname\fR to be a double precision floating point number. If \fIn\fR
@@ -6229,7 +6657,7 @@ when expanding \fIvname\fR. Otherwise, ten significant figures is used.
.sp
.ne 2
.na
-\fB\fB-f\fR\fR
+\fB-f\fR
.ad
.RS 6n
The names refer to function names rather than variable names. No assignments
@@ -6242,6 +6670,26 @@ definition is displayed on standard output. If \fB+f\fR is specified, then a
line containing the function name followed by a shell comment containing the
line number and path name of the file where this function was defined, if any,
is displayed.
+The names refer to function names rather than variable names.
+No assignments can be made and the only other valid options are
+\fB-S, -t, -u\fR and \fB-x\fR.
+The \fB-S\fR can be used with discipline functions defined in a type to
+indicate that the function is static. For a static function, the same method
+will be used by all instances of that type no matter which instance references
+it. In addition, it can only use value of variables from the original type
+definition. These discipline functions cannot be redefined in any type
+instance.
+The \fB-t\fR option turns on execution tracing for this function.
+The \fB-u\fR option causes this function to be marked undefined.
+The \fBFPATH\fR variable will be searched to find the function definition
+when the function is referenced.
+If no options other than \fB-f\fR is specified, then the function definition
+will be displayed on standard output. If \fB+f\fR is specified, then a line
+containing the function name followed by a shell comment containing the line
+number and path name of the file where this function was defined, if any, is
+displayed. The exit status can be used to determine whether the function is
+defined so that \fBtypeset -f .sh.math.\fR \fIname\fR will return 0 when math
+function \fIname\fR is defined and non-zero otherwise.
.sp
The \fB-i\fR attribute cannot be specified with \fB-f\fR.
.RE
@@ -6249,7 +6697,7 @@ The \fB-i\fR attribute cannot be specified with \fB-f\fR.
.sp
.ne 2
.na
-\fB\fB-F\fR\fR
+\fB-F\fR
.ad
.RS 6n
Declares \fIvname\fR to be a double precision floating point number. If \fIn\fR
@@ -6261,7 +6709,19 @@ point is used.
.sp
.ne 2
.na
-\fB\fB-H\fR\fR
+\fB-h\fR
+.ad
+.RS 6n
+Used within type definitions to add information when generating information
+about the sub-variable on the man page. It is ignored when used outside of a
+type definition. When used with \fB-f\fR the information is associated with the
+corresponding discipline function.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-H\fR
.ad
.RS 6n
This option provides UNIX to hostname file mapping on non-UNIX machines.
@@ -6270,7 +6730,7 @@ This option provides UNIX to hostname file mapping on non-UNIX machines.
.sp
.ne 2
.na
-\fB\fB-i\fR\fR
+\fB-i\fR
.ad
.RS 6n
Declares \fIvname\fR to be represented internally as integer. The right hand
@@ -6285,17 +6745,19 @@ The \fB-i\fR attribute cannot be specified along with \fB-R\fR, \fB-L\fR,
.sp
.ne 2
.na
-\fB\fB-l\fR\fR
+\fB-l\fR
.ad
.RS 6n
-All uppercase characters are converted to lowercase. The uppercase option,
-\fB-u\fR, is turned off.
+Used with \fB-i, -E\fR or \fB-F\fR to indicate long integer, or long float.
+Otherwise, all upper-case characters are converted to lower-case.
+The upper-case option, \fB-u\fR, is turned off.
+Equivalent to \fB-M tolower\fR.
.RE
.sp
.ne 2
.na
-\fB\fB-L\fR\fR
+\fB-L\fR
.ad
.RS 6n
Left justify and remove leading blanks from \fIvalue\fR. If \fIn\fR is
@@ -6310,7 +6772,32 @@ The \fB-i\fR attribute cannot be specified with \fB-L\fR.
.sp
.ne 2
.na
-\fB\fB-n\fR\fR
+\fB-m\fR
+.ad
+.RS 6n
+moves or renames the variable. The value is the name of a variable whose value
+will be moved to \fIvname\fR. The original variable will be unset. Cannot be
+used with any other options.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-M\fR
+.ad
+.RS 6n
+Use the character mapping \fImapping\fR such as \fBtolower\fR
+and \fBtoupper\fR when assigning a value to each of the specified operands.
+When \fImapping\fR is specified and there are not operands, all variables
+that use this mapping are written to standard output.
+When \fImapping\fR is omitted and there are no operands, all mapped
+variables are written to standard output.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-n\fR
.ad
.RS 6n
Declares \fIvname\fR to be a reference to the variable whose name is defined by
@@ -6321,7 +6808,18 @@ inside a function whose name has been passed as an argument.
.sp
.ne 2
.na
-\fB\fB-R\fR\fR
+\fB-p\fR
+.ad
+.RS 6n
+The name, attributes and values for the given \fIvname\fR
+are written on standard output in a form that can be used as shell input.
+If \fB+p\fR is specified, then the values are not displayed.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-R\fR
.ad
.RS 6n
Right justify and fill with leading blanks. If \fIn\fR is \fBnon-zero\fR, it
@@ -6335,7 +6833,7 @@ The \fB-i\fR attribute cannot be specified with \fB-R\fR.
.sp
.ne 2
.na
-\fB\fB-r\fR\fR
+\fB-r\fR
.ad
.RS 6n
The specified \fIvname\fRs are marked read-only and these names cannot be
@@ -6345,7 +6843,20 @@ changed by subsequent assignment.
.sp
.ne 2
.na
-\fB\fB-t\fR\fR
+\fB-S\fR
+.ad
+.RS 6n
+When used within the \fIassign_list\fR of a type definition, it causes the
+specified sub-variable to be shared by all instances of the type. When used
+inside a function defined with the \fBfunction\fR reserved word, the specified
+variables will have \fIfunction static\fR scope. Otherwise, the variable is
+unset prior to processing the assignment list.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-t\fR
.ad
.RS 6n
Tags the variables. Tags are user definable and have no special meaning to the
@@ -6355,28 +6866,54 @@ shell.
.sp
.ne 2
.na
-\fB\fB-u\fR\fR
+\fB-T\fR
.ad
.RS 6n
-All lowercase characters are converted to uppercase. The lowercase option,
-\fB-l\fR, is turned off.
+If followed by \fItname\fR, it creates a type named by \fItname\fR using the
+compound assignment \fIassign_list\fR to \fItname\fR. Otherwise, it writes all
+the type definitions to standard output.
.RE
.sp
.ne 2
.na
-\fB\fB-x\fR\fR
+\fB-u\fR
+.ad
+.RS 6n
+When given along with \fB-i\fR specifies unsigned integer.
+Otherwise, all lower-case characters are converted to upper-case.
+The lower-case option, \fB-l\fR, is turned off.
+Equivalent to \fB-M toupper\fR.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-x\fR
.ad
.RS 6n
The specified \fIvname\fRs are marked for automatic export to the environment
-of subsequently-executed commands. Variables whose names contain a . cannot be
-exported.
+of subsequently-executed commands. Variables whose names contain a \fB.\fR
+cannot be exported.
.RE
.sp
.ne 2
.na
-\fB\fB-Z\fR\fR
+\fB-X\fR
+.ad
+.RS 6n
+Declares \fIvname\fR to be a double precision floating point number
+and expands using the \fB%a\fR format of ISO-C99.
+If \fIn\fR is non-zero, it defines the number of hex digits after
+the radix point that is used when expanding \fIvname\fR.
+The default is 10.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-Z\fR
.ad
.RS 6n
Right justify and fill with leading zeros if the first non-blank character is a
@@ -6393,7 +6930,7 @@ The \fB-i\fR attribute cannot be specified with \fB-Z\fR.
.sp
.ne 2
.na
-\fB\fBulimit [\fR\fB-HSacdfmnpstv\fR\fB] [\fR \fIlimit\fR\fB]\fR\fR
+\fBulimit [\fR\fB-HSacdfmnpstv\fR\fB] [\fR \fIlimit\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -6409,7 +6946,7 @@ The following are the available resource limits:
.sp
.ne 2
.na
-\fB\fB-a\fR\fR
+\fB-a\fR
.ad
.RS 6n
Lists all of the current resource limits.
@@ -6418,7 +6955,7 @@ Lists all of the current resource limits.
.sp
.ne 2
.na
-\fB\fB-c\fR\fR
+\fB-c\fR
.ad
.RS 6n
The number of 512-byte blocks on the size of core dumps.
@@ -6427,7 +6964,7 @@ The number of 512-byte blocks on the size of core dumps.
.sp
.ne 2
.na
-\fB\fB-d\fR\fR
+\fB-d\fR
.ad
.RS 6n
The number of Kbytes on the size of the data area.
@@ -6436,7 +6973,7 @@ The number of Kbytes on the size of the data area.
.sp
.ne 2
.na
-\fB\fB-f\fR\fR
+\fB-f\fR
.ad
.RS 6n
The number of 512-byte blocks on files that can be written by the current
@@ -6446,7 +6983,7 @@ process or by child processes (files of any size can be read).
.sp
.ne 2
.na
-\fB\fB-H\fR\fR
+\fB-H\fR
.ad
.RS 6n
Specifies a hard limit for the specified resource.
@@ -6461,7 +6998,7 @@ this case, the soft limit is printed unless \fB-H\fR is specified.
.sp
.ne 2
.na
-\fB\fB-m\fR\fR
+\fB-m\fR
.ad
.RS 6n
The number of Kbytes on the size of physical memory.
@@ -6470,7 +7007,7 @@ The number of Kbytes on the size of physical memory.
.sp
.ne 2
.na
-\fB\fB-n\fR\fR
+\fB-n\fR
.ad
.RS 6n
The number of file descriptors plus 1.
@@ -6479,7 +7016,7 @@ The number of file descriptors plus 1.
.sp
.ne 2
.na
-\fB\fB-p\fR\fR
+\fB-p\fR
.ad
.RS 6n
The number of 512-byte blocks for pipe buffering.
@@ -6488,7 +7025,7 @@ The number of 512-byte blocks for pipe buffering.
.sp
.ne 2
.na
-\fB\fB-s\fR\fR
+\fB-s\fR
.ad
.RS 6n
The number of Kbytes on the size of the stack area.
@@ -6497,7 +7034,7 @@ The number of Kbytes on the size of the stack area.
.sp
.ne 2
.na
-\fB\fB-S\fR\fR
+\fB-S\fR
.ad
.RS 6n
Specifies a soft limit for the specified resource.
@@ -6512,7 +7049,7 @@ this case, the soft limit is printed unless \fB-H\fR is specified.
.sp
.ne 2
.na
-\fB\fB-t\fR\fR
+\fB-t\fR
.ad
.RS 6n
The number of CPU seconds to be used by each process.
@@ -6521,7 +7058,7 @@ The number of CPU seconds to be used by each process.
.sp
.ne 2
.na
-\fB\fB-v\fR\fR
+\fB-v\fR
.ad
.RS 6n
The number of Kbytes for virtual memory.
@@ -6532,7 +7069,7 @@ The number of Kbytes for virtual memory.
.sp
.ne 2
.na
-\fB\fBumask\fR \fB[\fR\fB-S\fR\fB]\fR\fB[\fR\fImask\fR\fB]\fR\fR
+\fBumask\fR \fB[\fR\fB-S\fR\fB]\fR\fB[\fR\fImask\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -6551,7 +7088,7 @@ See \fBumask\fR(2)
.sp
.ne 2
.na
-\fB\fB+unalias\fR \fB[\fR\fB-a\fR\fB]\fR \fIname\fR\fR
+\fB+unalias\fR \fB[\fR\fB-a\fR\fB]\fR \fIname\fR
.ad
.sp .6
.RS 4n
@@ -6562,7 +7099,7 @@ list. The \fB-a\fR option causes all the aliases to be unset.
.sp
.ne 2
.na
-\fB\fB+unset\fR \fB[\fR\fB-fnv\fR\fB]\fR \fIvname\fR\fR
+\fB+unset\fR \fB[\fR\fB-fnv\fR\fB]\fR \fIvname\fR
.ad
.sp .6
.RS 4n
@@ -6580,7 +7117,7 @@ their special meaning even if they are subsequently assigned to.
.sp
.ne 2
.na
-\fB\fBwait\fR \fB[\fR\fIjob\fR\fB]\fR\fR
+\fBwait\fR \fB[\fR\fIjob\fR\fB]\fR
.ad
.sp .6
.RS 4n
@@ -6594,7 +7131,7 @@ of the format of \fIjob\fR.
.sp
.ne 2
.na
-\fB\fBwhence\fR \fB[\fR\fB-afpv\fR\fB]\fR \fIname ...\fR\fR
+\fBwhence\fR \fB[\fR\fB-afpv\fR\fB]\fR \fIname ...\fR
.ad
.sp .6
.RS 4n
@@ -6607,7 +7144,6 @@ the specified name to be reported.
.RE
.SS "Invocation"
-.LP
If the shell is invoked by \fBexec\fR(2), and the first character of argument
zero (\fB$0\fR) is \fB-\fR, then the shell is assumed to be a login shell and
commands are read from \fB/etc/profile\fR and then from either .\fBprofile\fR
@@ -6630,7 +7166,7 @@ by the shell when it is invoked:
.sp
.ne 2
.na
-\fB\fB-c\fR\fR
+\fB-c\fR
.ad
.RS 15n
If the \fB-c\fR option is present, then commands are read from the first
@@ -6641,7 +7177,7 @@ If the \fB-c\fR option is present, then commands are read from the first
.sp
.ne 2
.na
-\fB\fB-D\fR\fR
+\fB-D\fR
.ad
.RS 15n
A list of all double quoted strings that are preceded by a \fB$\fR is printed
@@ -6653,7 +7189,17 @@ executed.
.sp
.ne 2
.na
-\fB\fB-i\fR\fR
+\fB-E\fR
+.ad
+.RS 15n
+Reads the file named by the \fBENV\fR variable or by \fB$HOME/.kshrc\fR if
+not defined after the profiles.
+.RE
+
+.sp
+.ne 2
+.na
+\fB-i\fR
.ad
.RS 15n
If the \fB-i\fR option is present or if the shell input and output are attached
@@ -6666,7 +7212,17 @@ interruptible). In all cases, \fBQUIT\fR is ignored by the shell.
.sp
.ne 2
.na
-\fB\fB-R\fR \fIfilename\fR\fR
+\fB-P\fR
+.ad
+.RS 15n
+If \fB-P\fR or \fB-o\fR profile is present, the shell is a profile shell
+(see \fBpfexec\fR(1)).
+.RE
+
+.sp
+.ne 2
+.na
+\fB-R\fR \fIfilename\fR
.ad
.RS 15n
The \fB-R\fR \fIfilename\fR option is used to generate a cross reference
@@ -6677,7 +7233,7 @@ references for variables and commands.
.sp
.ne 2
.na
-\fB\fB-r\fR\fR
+\fB-r\fR
.ad
.RS 15n
If the \fB-r\fR option is present, the shell is a restricted shell.
@@ -6686,7 +7242,7 @@ If the \fB-r\fR option is present, the shell is a restricted shell.
.sp
.ne 2
.na
-\fB\fB-s\fR\fR
+\fB-s\fR
.ad
.RS 15n
If the \fB-s\fR option is present or if no arguments remain, then commands are
@@ -6699,7 +7255,6 @@ read from the standard input. Shell output, except for the output of the
The remaining options and arguments are described under the \fBset\fR command.
An optional \fB-\fR as the first argument is ignored.
.SS "\fBrksh93\fR Only"
-.LP
\fBrksh93\fR is used to set up login names and execution environments whose
capabilities are more controlled than those of the standard shell.
.sp
@@ -6766,17 +7321,15 @@ the user in an appropriate directory (probably not the login directory). The
system administrator often sets up a directory of commands, for example,
\fB/usr/rbin\fR, that can be safely invoked by \fBrksh\fR.
.SH USAGE
-.LP
See \fBlargefile\fR(5) for the description of the behavior of \fBksh93\fR and
\fBrksh93\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
bytes).
.SH EXIT STATUS
-.LP
The following exit values are returned:
.sp
.ne 2
.na
-\fB\fBnon-zero\fR\fR
+\fBnon-zero\fR
.ad
.sp .6
.RS 4n
@@ -6791,7 +7344,7 @@ sub-shell is abandoned.
.sp
.ne 2
.na
-\fB\fIexit status of last command executed\fR\fR
+\fB\fIexit status of last command executed\fR
.ad
.sp .6
.RS 4n
@@ -6808,7 +7361,7 @@ See the \fBksh93 exit\fR command for additional details.
.SH FILES
.ne 2
.na
-\fB\fB/etc/profile\fR\fR
+\fB/etc/profile\fR
.ad
.sp .6
.RS 4n
@@ -6818,7 +7371,7 @@ The system initialization file, executed for login shells.
.sp
.ne 2
.na
-\fB\fB/etc/ksh.kshrc\fR\fR
+\fB/etc/ksh.kshrc\fR
.ad
.sp .6
.RS 4n
@@ -6828,7 +7381,7 @@ The system wide startup file, executed for interactive shells.
.sp
.ne 2
.na
-\fB\fB$HOME/.profile\fR\fR
+\fB$HOME/.profile\fR
.ad
.sp .6
.RS 4n
@@ -6839,7 +7392,7 @@ The personal initialization file, executed for login shells after
.sp
.ne 2
.na
-\fB\fB$HOME/.kshrc\fR\fR
+\fB$HOME/.kshrc\fR
.ad
.sp .6
.RS 4n
@@ -6850,7 +7403,7 @@ interactive shells when \fBENV\fR is not set.
.sp
.ne 2
.na
-\fB\fB/etc/suid-profile\fR\fR
+\fB/etc/suid-profile\fR
.ad
.sp .6
.RS 4n
@@ -6861,7 +7414,7 @@ initialization file when the real and effective user or group id do not match.
.sp
.ne 2
.na
-\fB\fB/dev/null\fR\fR
+\fB/dev/null\fR
.ad
.sp .6
.RS 4n
@@ -6869,10 +7422,8 @@ NULL device.
.RE
.SH AUTHORS
-.LP
David Korn, \fBdgk@research.att.com\fR
.SH ATTRIBUTES
-.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -6891,10 +7442,9 @@ Interface Stability See below.
The scripting interface is Uncommitted. The environment variables,
\fB\&.paths\fR feature, and editing modes are Volatile.
.SH SEE ALSO
-.LP
\fBcat\fR(1), \fBcd\fR(1), \fBchmod\fR(1), \fBcut\fR(1), \fBdate\fR(1),
\fBegrep\fR(1), \fBecho\fR(1), \fBegrep\fR(1), \fBenv\fR(1), \fBfgrep\fR(1),
-\fBgrep\fR(1), \fBlogin\fR(1), \fBnewgrp\fR(1), \fBpaste\fR(1),
+\fBgrep\fR(1), \fBlogin\fR(1), \fBnewgrp\fR(1), \fBpaste\fR(1), \fBpfexec\fR(1),
\fBprintf\fR(1), \fBstty\fR(1), \fBtest\fR(1), \fBumask\fR(1), \fBvi\fR(1),
\fBdup\fR(2), \fBexec\fR(2), \fBfork\fR(2), \fBioctl\fR(2), \fBlseek\fR(2),
\fBpathconf\fR(2), \fBpipe\fR(2), \fBsysconf\fR(3C), \fBulimit\fR(2),
@@ -6910,7 +7460,6 @@ Programming Language\fR, Prentice Hall, 1995.
\fIPOSIX-Part 2: Shell and Utilities, IEEE Std 1003.2-1992, ISO/IEC 9945-2\fR,
IEEE, 1993.
.SH NOTES
-.LP
\fBksh93\fR scripts should choose shell function names outside the namespace
used by reserved keywords of the ISO C99, C++ and JAVA languages to avoid
collisions with future enhancements to \fBksh93\fR.
diff --git a/usr/src/pkg/manifests/SUNWcs.mf b/usr/src/pkg/manifests/SUNWcs.mf
index 968aacc77e..ed17267840 100644
--- a/usr/src/pkg/manifests/SUNWcs.mf
+++ b/usr/src/pkg/manifests/SUNWcs.mf
@@ -28,6 +28,7 @@
# Copyright 2019 Peter Tribble.
# Copyright 2019 Joyent, Inc.
# Copyright (c) 2011, 2015 by Delphix. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
<include SUNWcs.man1.inc>
@@ -1629,6 +1630,7 @@ license usr/src/cmd/which/THIRDPARTYLICENSE \
license usr/src/cmd/xstr/THIRDPARTYLICENSE \
license=usr/src/cmd/xstr/THIRDPARTYLICENSE
license usr/src/common/bzip2/LICENSE license=usr/src/common/bzip2/LICENSE
+license usr/src/contrib/ast/LICENSE license=usr/src/contrib/ast/LICENSE
link path=bin target=./usr/bin
link path=etc/TIMEZONE target=./default/init
link path=etc/autopush target=../sbin/autopush
diff --git a/usr/src/pkg/manifests/developer-astdev.mf b/usr/src/pkg/manifests/developer-astdev.mf
index 5070b4fb7b..b4b25b1a86 100644
--- a/usr/src/pkg/manifests/developer-astdev.mf
+++ b/usr/src/pkg/manifests/developer-astdev.mf
@@ -52,7 +52,4 @@ file path=usr/share/man/man1/msgget.1
legacy pkg=SUNWastdev desc="AT&T AST development utilities" \
name="AT&T AST development utilities"
license cr_Sun license=cr_Sun
-license usr/src/cmd/ast/THIRDPARTYLICENSE \
- license=usr/src/cmd/ast/THIRDPARTYLICENSE
-license usr/src/lib/libpp/THIRDPARTYLICENSE \
- license=usr/src/lib/libpp/THIRDPARTYLICENSE
+license usr/src/contrib/ast/LICENSE license=usr/src/contrib/ast/LICENSE
diff --git a/usr/src/pkg/manifests/source-demo-system.mf b/usr/src/pkg/manifests/source-demo-system.mf
index 70c783c070..b2aaf94cbf 100644
--- a/usr/src/pkg/manifests/source-demo-system.mf
+++ b/usr/src/pkg/manifests/source-demo-system.mf
@@ -21,6 +21,7 @@
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
set name=pkg.fmri value=pkg:/source/demo/system@$(PKGVERS)
@@ -82,7 +83,6 @@ file path=usr/demo/ksh/bin/xmldocumenttree1 mode=0755
file path=usr/demo/ksh/fun/dirs mode=0755
file path=usr/demo/ksh/fun/popd mode=0755
file path=usr/demo/ksh/fun/pushd mode=0755
-file path=usr/demo/ksh/fun/title mode=0755
file path=usr/demo/ksh/src/cpvprint.sh
file path=usr/demo/ksh/src/crawlsrccomments.sh
file path=usr/demo/ksh/src/filemutexdemo1.sh
@@ -119,6 +119,7 @@ file path=usr/demo/ksh/tests/bracket.sh
file path=usr/demo/ksh/tests/builtins.sh
file path=usr/demo/ksh/tests/case.sh
file path=usr/demo/ksh/tests/comvar.sh
+file path=usr/demo/ksh/tests/comvario.sh
file path=usr/demo/ksh/tests/coprocess.sh
file path=usr/demo/ksh/tests/cubetype.sh
file path=usr/demo/ksh/tests/enum.sh
@@ -128,13 +129,20 @@ file path=usr/demo/ksh/tests/functions.sh
file path=usr/demo/ksh/tests/glob.sh
file path=usr/demo/ksh/tests/grep.sh
file path=usr/demo/ksh/tests/heredoc.sh
+file path=usr/demo/ksh/tests/illumos_13434_chunked_heredoc.sh
file path=usr/demo/ksh/tests/io.sh
+file path=usr/demo/ksh/tests/leaks.sh
+file path=usr/demo/ksh/tests/locale.sh
+file path=usr/demo/ksh/tests/math.sh
file path=usr/demo/ksh/tests/nameref.sh
+file path=usr/demo/ksh/tests/namespace.sh
file path=usr/demo/ksh/tests/options.sh
file path=usr/demo/ksh/tests/path.sh
file path=usr/demo/ksh/tests/pointtype.sh
+file path=usr/demo/ksh/tests/pty.sh
file path=usr/demo/ksh/tests/quoting.sh
file path=usr/demo/ksh/tests/quoting2.sh
+file path=usr/demo/ksh/tests/readcsv.sh
file path=usr/demo/ksh/tests/recttype.sh
file path=usr/demo/ksh/tests/restricted.sh
file path=usr/demo/ksh/tests/return.sh
@@ -285,5 +293,4 @@ legacy pkg=SUNWosdem \
name="OS demo source"
license cr_Sun license=cr_Sun
license lic_CDDL license=lic_CDDL
-license usr/src/lib/libshell/THIRDPARTYLICENSE \
- license=usr/src/lib/libshell/THIRDPARTYLICENSE
+license usr/src/contrib/ast/LICENSE license=usr/src/contrib/ast/LICENSE
diff --git a/usr/src/pkg/manifests/system-header.mf b/usr/src/pkg/manifests/system-header.mf
index c35efe456f..0aceb689d6 100644
--- a/usr/src/pkg/manifests/system-header.mf
+++ b/usr/src/pkg/manifests/system-header.mf
@@ -28,7 +28,7 @@
# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
# Copyright 2020 Joyent, Inc.
# Copyright 2019 Peter Tribble.
-# Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
set name=pkg.fmri value=pkg:/system/header@$(PKGVERS)
@@ -215,7 +215,9 @@ file path=usr/include/asm/sunddi.h
file path=usr/include/asm/thread.h
file path=usr/include/assert.h
file path=usr/include/ast/align.h
+file path=usr/include/ast/aso.h
file path=usr/include/ast/ast.h
+file path=usr/include/ast/ast_api.h
file path=usr/include/ast/ast_botch.h
file path=usr/include/ast/ast_ccode.h
file path=usr/include/ast/ast_common.h
@@ -235,21 +237,24 @@ file path=usr/include/ast/ast_namval.h
file path=usr/include/ast/ast_ndbm.h
file path=usr/include/ast/ast_nl_types.h
file path=usr/include/ast/ast_param.h
+file path=usr/include/ast/ast_sizeof.h
file path=usr/include/ast/ast_standards.h
file path=usr/include/ast/ast_std.h
file path=usr/include/ast/ast_stdio.h
file path=usr/include/ast/ast_sys.h
file path=usr/include/ast/ast_time.h
file path=usr/include/ast/ast_tty.h
-file path=usr/include/ast/ast_version.h
file path=usr/include/ast/ast_vfork.h
file path=usr/include/ast/ast_wait.h
file path=usr/include/ast/ast_wchar.h
+file path=usr/include/ast/ast_wctype.h
file path=usr/include/ast/ast_windows.h
file path=usr/include/ast/bytesex.h
file path=usr/include/ast/ccode.h
file path=usr/include/ast/cdt.h
+file path=usr/include/ast/cdtlib.h
file path=usr/include/ast/cmd.h
+file path=usr/include/ast/cmdarg.h
file path=usr/include/ast/cmdext.h
file path=usr/include/ast/debug.h
file path=usr/include/ast/dirent.h
@@ -317,6 +322,7 @@ file path=usr/include/ast/vecargs.h
file path=usr/include/ast/vmalloc.h
file path=usr/include/ast/wait.h
file path=usr/include/ast/wchar.h
+file path=usr/include/ast/wctype.h
file path=usr/include/ast/wordexp.h
file path=usr/include/atomic.h
file path=usr/include/attr.h
diff --git a/usr/src/pkg/manifests/system-library.mf b/usr/src/pkg/manifests/system-library.mf
index 1ab189080b..529e110714 100644
--- a/usr/src/pkg/manifests/system-library.mf
+++ b/usr/src/pkg/manifests/system-library.mf
@@ -588,16 +588,11 @@ license usr/src/common/mpi/THIRDPARTYLICENSE \
license=usr/src/common/mpi/THIRDPARTYLICENSE
license usr/src/common/util/THIRDPARTYLICENSE.multi3 \
license=usr/src/common/util/THIRDPARTYLICENSE.multi3
-license usr/src/lib/libast/THIRDPARTYLICENSE \
- license=usr/src/lib/libast/THIRDPARTYLICENSE
+license usr/src/contrib/ast/LICENSE license=usr/src/contrib/ast/LICENSE
license usr/src/lib/libbsdmalloc/THIRDPARTYLICENSE \
license=usr/src/lib/libbsdmalloc/THIRDPARTYLICENSE
license usr/src/lib/libc/THIRDPARTYLICENSE \
license=usr/src/lib/libc/THIRDPARTYLICENSE
-license usr/src/lib/libcmd/THIRDPARTYLICENSE \
- license=usr/src/lib/libcmd/THIRDPARTYLICENSE
-license usr/src/lib/libdll/THIRDPARTYLICENSE \
- license=usr/src/lib/libdll/THIRDPARTYLICENSE
license usr/src/lib/libdwarf/THIRDPARTYLICENSE \
license=usr/src/lib/libdwarf/THIRDPARTYLICENSE
license usr/src/lib/libinetutil/common/THIRDPARTYLICENSE \
@@ -612,10 +607,6 @@ license usr/src/lib/libresolv/THIRDPARTYLICENSE \
license=usr/src/lib/libresolv/THIRDPARTYLICENSE
license usr/src/lib/libresolv2/THIRDPARTYLICENSE \
license=usr/src/lib/libresolv2/THIRDPARTYLICENSE
-license usr/src/lib/libshell/THIRDPARTYLICENSE \
- license=usr/src/lib/libshell/THIRDPARTYLICENSE
-license usr/src/lib/libsum/THIRDPARTYLICENSE \
- license=usr/src/lib/libsum/THIRDPARTYLICENSE
license usr/src/lib/pam_modules/authtok_check/THIRDPARTYLICENSE \
license=usr/src/lib/pam_modules/authtok_check/THIRDPARTYLICENSE
license usr/src/lib/passwdutil/THIRDPARTYLICENSE \
diff --git a/usr/src/tools/findunref/exception_list.open b/usr/src/tools/findunref/exception_list.open
index ae18a9c8ac..22394e667d 100644
--- a/usr/src/tools/findunref/exception_list.open
+++ b/usr/src/tools/findunref/exception_list.open
@@ -24,6 +24,7 @@
# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
# Copyright 2020 Joyent, Inc.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
#
# open-tree exception list
@@ -49,65 +50,6 @@
./usr/src/uts/intel/sys/acpi
#
-# Ignore ksh93/ast-related files that are only used to resync our build
-# configuration with upstream.
-#
-./usr/src/lib/libast/*/src/lib/libast/FEATURE
-./usr/src/lib/libast/*/src/lib/libast/ast_namval.h
-./usr/src/lib/libast/common/comp/conf.*
-./usr/src/lib/libast/common/features
-./usr/src/lib/libast/common/include/ast_windows.h
-./usr/src/lib/libast/common/port/lc.tab
-./usr/src/lib/libast/common/port/lcgen.c
-./usr/src/lib/libcmd/*/src/lib/libcmd/FEATURE
-./usr/src/lib/libcmd/common/features
-./usr/src/lib/libdll/*/src/lib/libdll/FEATURE
-./usr/src/lib/libdll/common/features
-./usr/src/lib/libpp/*/pp.*
-./usr/src/lib/libpp/common/gentab.sh
-./usr/src/lib/libpp/common/ppsym.c
-./usr/src/lib/libpp/i386/ppdebug.h
-./usr/src/lib/libpp/sparc/ppdebug.h
-./usr/src/lib/libshell/*/src/cmd/ksh93/FEATURE
-./usr/src/lib/libshell/common/data/math.tab
-./usr/src/lib/libshell/common/features
-./usr/src/lib/libshell/misc/buildksh93.sh
-./usr/src/lib/libshell/misc/buildksh93.readme
-
-#
-# Ignore ksh93/ast-related "iffe" (if feature enabled) probe
-#
-./usr/src/lib/libsum/common/features/sum
-
-#
-# Ignore ksh93/ast-related upstream source, currently superseded by
-# a per-platform version of sum.h, since we use libmd.so.1 for some
-# ciphers.
-#
-./usr/src/lib/libsum/common/sum.h
-
-#
-# Ignore ksh93/ast-related test programs.
-#
-./usr/src/cmd/ast/msgcc/msgcc.tst
-./usr/src/lib/libast/common/port/astmath.c
-
-#
-# Ignore ksh93/ast-related source components that are not currently
-# used but may be useful later.
-#
-./usr/src/lib/libcmd/common/cksum.c
-./usr/src/lib/libcmd/common/md5sum.c
-./usr/src/lib/libcmd/common/sum.c
-./usr/src/lib/libshell/common/bltins/mkservice.c
-./usr/src/lib/libshell/common/data/bash_pre_rc.sh
-./usr/src/lib/libshell/common/include/env.h
-./usr/src/lib/libshell/common/sh/bash.c
-./usr/src/lib/libshell/common/sh/env.c
-./usr/src/lib/libshell/common/sh/shcomp.c
-./usr/src/lib/libshell/common/sh/suid_exec.c
-
-#
# Ignore any files built as part of the nightly program itself.
#
# ISUSED - let checkpaths know that the next entry is good.